vendor.js 1.1 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 11:
  53. /*!***************************************************************!*\
  54. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  55. \***************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  59. function _defineProperty(obj, key, value) {
  60. key = toPropertyKey(key);
  61. if (key in obj) {
  62. Object.defineProperty(obj, key, {
  63. value: value,
  64. enumerable: true,
  65. configurable: true,
  66. writable: true
  67. });
  68. } else {
  69. obj[key] = value;
  70. }
  71. return obj;
  72. }
  73. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  74. /***/ }),
  75. /***/ 12:
  76. /*!**************************************************************!*\
  77. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  78. \**************************************************************/
  79. /*! no static exports found */
  80. /***/ (function(module, exports, __webpack_require__) {
  81. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  82. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  83. function toPropertyKey(t) {
  84. var i = toPrimitive(t, "string");
  85. return "symbol" == _typeof(i) ? i : i + "";
  86. }
  87. module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  88. /***/ }),
  89. /***/ 13:
  90. /*!*******************************************************!*\
  91. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  92. \*******************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports) {
  95. function _typeof(o) {
  96. "@babel/helpers - typeof";
  97. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  98. return typeof o;
  99. } : function (o) {
  100. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  101. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
  102. }
  103. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  104. /***/ }),
  105. /***/ 14:
  106. /*!************************************************************!*\
  107. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  108. \************************************************************/
  109. /*! no static exports found */
  110. /***/ (function(module, exports, __webpack_require__) {
  111. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  112. function toPrimitive(t, r) {
  113. if ("object" != _typeof(t) || !t) return t;
  114. var e = t[Symbol.toPrimitive];
  115. if (void 0 !== e) {
  116. var i = e.call(t, r || "default");
  117. if ("object" != _typeof(i)) return i;
  118. throw new TypeError("@@toPrimitive must return a primitive value.");
  119. }
  120. return ("string" === r ? String : Number)(t);
  121. }
  122. module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  123. /***/ }),
  124. /***/ 15:
  125. /*!**********************************************************!*\
  126. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  127. \**********************************************************/
  128. /*! no static exports found */
  129. /***/ (function(module, exports, __webpack_require__) {
  130. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  131. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  132. function _construct(t, e, r) {
  133. if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
  134. var o = [null];
  135. o.push.apply(o, e);
  136. var p = new (t.bind.apply(t, o))();
  137. return r && setPrototypeOf(p, r.prototype), p;
  138. }
  139. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  140. /***/ }),
  141. /***/ 16:
  142. /*!***************************************************************!*\
  143. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  144. \***************************************************************/
  145. /*! no static exports found */
  146. /***/ (function(module, exports) {
  147. function _setPrototypeOf(o, p) {
  148. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  149. o.__proto__ = p;
  150. return o;
  151. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  152. return _setPrototypeOf(o, p);
  153. }
  154. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  155. /***/ }),
  156. /***/ 17:
  157. /*!*************************************************************************!*\
  158. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  159. \*************************************************************************/
  160. /*! no static exports found */
  161. /***/ (function(module, exports) {
  162. function _isNativeReflectConstruct() {
  163. try {
  164. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  165. } catch (t) {}
  166. return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
  167. return !!t;
  168. }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
  169. }
  170. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  171. /***/ }),
  172. /***/ 18:
  173. /*!******************************************************************!*\
  174. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  175. \******************************************************************/
  176. /*! no static exports found */
  177. /***/ (function(module, exports, __webpack_require__) {
  178. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  179. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  180. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  181. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  182. function _toConsumableArray(arr) {
  183. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  184. }
  185. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  186. /***/ }),
  187. /***/ 19:
  188. /*!******************************************************************!*\
  189. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  190. \******************************************************************/
  191. /*! no static exports found */
  192. /***/ (function(module, exports, __webpack_require__) {
  193. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  194. function _arrayWithoutHoles(arr) {
  195. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  196. }
  197. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  198. /***/ }),
  199. /***/ 2:
  200. /*!************************************************************!*\
  201. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  202. \************************************************************/
  203. /*! no static exports found */
  204. /***/ (function(module, exports, __webpack_require__) {
  205. "use strict";
  206. /* WEBPACK VAR INJECTION */(function(wx, global) {
  207. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  208. Object.defineProperty(exports, "__esModule", {
  209. value: true
  210. });
  211. exports.createApp = createApp;
  212. exports.createComponent = createComponent;
  213. exports.createPage = createPage;
  214. exports.createPlugin = createPlugin;
  215. exports.createSubpackageApp = createSubpackageApp;
  216. exports.default = void 0;
  217. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  218. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  219. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  220. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  221. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  222. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  223. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  224. 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; }
  225. 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; }
  226. var realAtob;
  227. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  228. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  229. if (typeof atob !== 'function') {
  230. realAtob = function realAtob(str) {
  231. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  232. if (!b64re.test(str)) {
  233. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  234. }
  235. // Adding the padding if missing, for semplicity
  236. str += '=='.slice(2 - (str.length & 3));
  237. var bitmap;
  238. var result = '';
  239. var r1;
  240. var r2;
  241. var i = 0;
  242. for (; i < str.length;) {
  243. 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++)));
  244. 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);
  245. }
  246. return result;
  247. };
  248. } else {
  249. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  250. realAtob = atob;
  251. }
  252. function b64DecodeUnicode(str) {
  253. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  254. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  255. }).join(''));
  256. }
  257. function getCurrentUserInfo() {
  258. var token = wx.getStorageSync('uni_id_token') || '';
  259. var tokenArr = token.split('.');
  260. if (!token || tokenArr.length !== 3) {
  261. return {
  262. uid: null,
  263. role: [],
  264. permission: [],
  265. tokenExpired: 0
  266. };
  267. }
  268. var userInfo;
  269. try {
  270. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  271. } catch (error) {
  272. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  273. }
  274. userInfo.tokenExpired = userInfo.exp * 1000;
  275. delete userInfo.exp;
  276. delete userInfo.iat;
  277. return userInfo;
  278. }
  279. function uniIdMixin(Vue) {
  280. Vue.prototype.uniIDHasRole = function (roleId) {
  281. var _getCurrentUserInfo = getCurrentUserInfo(),
  282. role = _getCurrentUserInfo.role;
  283. return role.indexOf(roleId) > -1;
  284. };
  285. Vue.prototype.uniIDHasPermission = function (permissionId) {
  286. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  287. permission = _getCurrentUserInfo2.permission;
  288. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  289. };
  290. Vue.prototype.uniIDTokenValid = function () {
  291. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  292. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  293. return tokenExpired > Date.now();
  294. };
  295. }
  296. var _toString = Object.prototype.toString;
  297. var hasOwnProperty = Object.prototype.hasOwnProperty;
  298. function isFn(fn) {
  299. return typeof fn === 'function';
  300. }
  301. function isStr(str) {
  302. return typeof str === 'string';
  303. }
  304. function isObject(obj) {
  305. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  306. }
  307. function isPlainObject(obj) {
  308. return _toString.call(obj) === '[object Object]';
  309. }
  310. function hasOwn(obj, key) {
  311. return hasOwnProperty.call(obj, key);
  312. }
  313. function noop() {}
  314. /**
  315. * Create a cached version of a pure function.
  316. */
  317. function cached(fn) {
  318. var cache = Object.create(null);
  319. return function cachedFn(str) {
  320. var hit = cache[str];
  321. return hit || (cache[str] = fn(str));
  322. };
  323. }
  324. /**
  325. * Camelize a hyphen-delimited string.
  326. */
  327. var camelizeRE = /-(\w)/g;
  328. var camelize = cached(function (str) {
  329. return str.replace(camelizeRE, function (_, c) {
  330. return c ? c.toUpperCase() : '';
  331. });
  332. });
  333. function sortObject(obj) {
  334. var sortObj = {};
  335. if (isPlainObject(obj)) {
  336. Object.keys(obj).sort().forEach(function (key) {
  337. sortObj[key] = obj[key];
  338. });
  339. }
  340. return !Object.keys(sortObj) ? obj : sortObj;
  341. }
  342. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  343. var globalInterceptors = {};
  344. var scopedInterceptors = {};
  345. function mergeHook(parentVal, childVal) {
  346. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  347. return res ? dedupeHooks(res) : res;
  348. }
  349. function dedupeHooks(hooks) {
  350. var res = [];
  351. for (var i = 0; i < hooks.length; i++) {
  352. if (res.indexOf(hooks[i]) === -1) {
  353. res.push(hooks[i]);
  354. }
  355. }
  356. return res;
  357. }
  358. function removeHook(hooks, hook) {
  359. var index = hooks.indexOf(hook);
  360. if (index !== -1) {
  361. hooks.splice(index, 1);
  362. }
  363. }
  364. function mergeInterceptorHook(interceptor, option) {
  365. Object.keys(option).forEach(function (hook) {
  366. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  367. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  368. }
  369. });
  370. }
  371. function removeInterceptorHook(interceptor, option) {
  372. if (!interceptor || !option) {
  373. return;
  374. }
  375. Object.keys(option).forEach(function (hook) {
  376. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  377. removeHook(interceptor[hook], option[hook]);
  378. }
  379. });
  380. }
  381. function addInterceptor(method, option) {
  382. if (typeof method === 'string' && isPlainObject(option)) {
  383. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  384. } else if (isPlainObject(method)) {
  385. mergeInterceptorHook(globalInterceptors, method);
  386. }
  387. }
  388. function removeInterceptor(method, option) {
  389. if (typeof method === 'string') {
  390. if (isPlainObject(option)) {
  391. removeInterceptorHook(scopedInterceptors[method], option);
  392. } else {
  393. delete scopedInterceptors[method];
  394. }
  395. } else if (isPlainObject(method)) {
  396. removeInterceptorHook(globalInterceptors, method);
  397. }
  398. }
  399. function wrapperHook(hook, params) {
  400. return function (data) {
  401. return hook(data, params) || data;
  402. };
  403. }
  404. function isPromise(obj) {
  405. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  406. }
  407. function queue(hooks, data, params) {
  408. var promise = false;
  409. for (var i = 0; i < hooks.length; i++) {
  410. var hook = hooks[i];
  411. if (promise) {
  412. promise = Promise.resolve(wrapperHook(hook, params));
  413. } else {
  414. var res = hook(data, params);
  415. if (isPromise(res)) {
  416. promise = Promise.resolve(res);
  417. }
  418. if (res === false) {
  419. return {
  420. then: function then() {}
  421. };
  422. }
  423. }
  424. }
  425. return promise || {
  426. then: function then(callback) {
  427. return callback(data);
  428. }
  429. };
  430. }
  431. function wrapperOptions(interceptor) {
  432. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  433. ['success', 'fail', 'complete'].forEach(function (name) {
  434. if (Array.isArray(interceptor[name])) {
  435. var oldCallback = options[name];
  436. options[name] = function callbackInterceptor(res) {
  437. queue(interceptor[name], res, options).then(function (res) {
  438. /* eslint-disable no-mixed-operators */
  439. return isFn(oldCallback) && oldCallback(res) || res;
  440. });
  441. };
  442. }
  443. });
  444. return options;
  445. }
  446. function wrapperReturnValue(method, returnValue) {
  447. var returnValueHooks = [];
  448. if (Array.isArray(globalInterceptors.returnValue)) {
  449. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  450. }
  451. var interceptor = scopedInterceptors[method];
  452. if (interceptor && Array.isArray(interceptor.returnValue)) {
  453. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  454. }
  455. returnValueHooks.forEach(function (hook) {
  456. returnValue = hook(returnValue) || returnValue;
  457. });
  458. return returnValue;
  459. }
  460. function getApiInterceptorHooks(method) {
  461. var interceptor = Object.create(null);
  462. Object.keys(globalInterceptors).forEach(function (hook) {
  463. if (hook !== 'returnValue') {
  464. interceptor[hook] = globalInterceptors[hook].slice();
  465. }
  466. });
  467. var scopedInterceptor = scopedInterceptors[method];
  468. if (scopedInterceptor) {
  469. Object.keys(scopedInterceptor).forEach(function (hook) {
  470. if (hook !== 'returnValue') {
  471. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  472. }
  473. });
  474. }
  475. return interceptor;
  476. }
  477. function invokeApi(method, api, options) {
  478. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  479. params[_key - 3] = arguments[_key];
  480. }
  481. var interceptor = getApiInterceptorHooks(method);
  482. if (interceptor && Object.keys(interceptor).length) {
  483. if (Array.isArray(interceptor.invoke)) {
  484. var res = queue(interceptor.invoke, options);
  485. return res.then(function (options) {
  486. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  487. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  488. });
  489. } else {
  490. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  491. }
  492. }
  493. return api.apply(void 0, [options].concat(params));
  494. }
  495. var promiseInterceptor = {
  496. returnValue: function returnValue(res) {
  497. if (!isPromise(res)) {
  498. return res;
  499. }
  500. return new Promise(function (resolve, reject) {
  501. res.then(function (res) {
  502. if (res[0]) {
  503. reject(res[0]);
  504. } else {
  505. resolve(res[1]);
  506. }
  507. });
  508. });
  509. }
  510. };
  511. 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/;
  512. var CONTEXT_API_RE = /^create|Manager$/;
  513. // Context例外情况
  514. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  515. // 同步例外情况
  516. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  517. var CALLBACK_API_RE = /^on|^off/;
  518. function isContextApi(name) {
  519. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  520. }
  521. function isSyncApi(name) {
  522. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  523. }
  524. function isCallbackApi(name) {
  525. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  526. }
  527. function handlePromise(promise) {
  528. return promise.then(function (data) {
  529. return [null, data];
  530. }).catch(function (err) {
  531. return [err];
  532. });
  533. }
  534. function shouldPromise(name) {
  535. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  536. return false;
  537. }
  538. return true;
  539. }
  540. /* eslint-disable no-extend-native */
  541. if (!Promise.prototype.finally) {
  542. Promise.prototype.finally = function (callback) {
  543. var promise = this.constructor;
  544. return this.then(function (value) {
  545. return promise.resolve(callback()).then(function () {
  546. return value;
  547. });
  548. }, function (reason) {
  549. return promise.resolve(callback()).then(function () {
  550. throw reason;
  551. });
  552. });
  553. };
  554. }
  555. function promisify(name, api) {
  556. if (!shouldPromise(name) || !isFn(api)) {
  557. return api;
  558. }
  559. return function promiseApi() {
  560. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  561. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  562. params[_key2 - 1] = arguments[_key2];
  563. }
  564. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  565. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  566. }
  567. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  568. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  569. success: resolve,
  570. fail: reject
  571. })].concat(params));
  572. })));
  573. };
  574. }
  575. var EPS = 1e-4;
  576. var BASE_DEVICE_WIDTH = 750;
  577. var isIOS = false;
  578. var deviceWidth = 0;
  579. var deviceDPR = 0;
  580. function checkDeviceWidth() {
  581. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  582. platform = _wx$getSystemInfoSync.platform,
  583. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  584. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  585. deviceWidth = windowWidth;
  586. deviceDPR = pixelRatio;
  587. isIOS = platform === 'ios';
  588. }
  589. function upx2px(number, newDeviceWidth) {
  590. if (deviceWidth === 0) {
  591. checkDeviceWidth();
  592. }
  593. number = Number(number);
  594. if (number === 0) {
  595. return 0;
  596. }
  597. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  598. if (result < 0) {
  599. result = -result;
  600. }
  601. result = Math.floor(result + EPS);
  602. if (result === 0) {
  603. if (deviceDPR === 1 || !isIOS) {
  604. result = 1;
  605. } else {
  606. result = 0.5;
  607. }
  608. }
  609. return number < 0 ? -result : result;
  610. }
  611. var LOCALE_ZH_HANS = 'zh-Hans';
  612. var LOCALE_ZH_HANT = 'zh-Hant';
  613. var LOCALE_EN = 'en';
  614. var LOCALE_FR = 'fr';
  615. var LOCALE_ES = 'es';
  616. var messages = {};
  617. var locale;
  618. {
  619. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  620. }
  621. function initI18nMessages() {
  622. if (!isEnableLocale()) {
  623. return;
  624. }
  625. var localeKeys = Object.keys(__uniConfig.locales);
  626. if (localeKeys.length) {
  627. localeKeys.forEach(function (locale) {
  628. var curMessages = messages[locale];
  629. var userMessages = __uniConfig.locales[locale];
  630. if (curMessages) {
  631. Object.assign(curMessages, userMessages);
  632. } else {
  633. messages[locale] = userMessages;
  634. }
  635. });
  636. }
  637. }
  638. initI18nMessages();
  639. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  640. var t = i18n.t;
  641. var i18nMixin = i18n.mixin = {
  642. beforeCreate: function beforeCreate() {
  643. var _this = this;
  644. var unwatch = i18n.i18n.watchLocale(function () {
  645. _this.$forceUpdate();
  646. });
  647. this.$once('hook:beforeDestroy', function () {
  648. unwatch();
  649. });
  650. },
  651. methods: {
  652. $$t: function $$t(key, values) {
  653. return t(key, values);
  654. }
  655. }
  656. };
  657. var setLocale = i18n.setLocale;
  658. var getLocale = i18n.getLocale;
  659. function initAppLocale(Vue, appVm, locale) {
  660. var state = Vue.observable({
  661. locale: locale || i18n.getLocale()
  662. });
  663. var localeWatchers = [];
  664. appVm.$watchLocale = function (fn) {
  665. localeWatchers.push(fn);
  666. };
  667. Object.defineProperty(appVm, '$locale', {
  668. get: function get() {
  669. return state.locale;
  670. },
  671. set: function set(v) {
  672. state.locale = v;
  673. localeWatchers.forEach(function (watch) {
  674. return watch(v);
  675. });
  676. }
  677. });
  678. }
  679. function isEnableLocale() {
  680. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  681. }
  682. function include(str, parts) {
  683. return !!parts.find(function (part) {
  684. return str.indexOf(part) !== -1;
  685. });
  686. }
  687. function startsWith(str, parts) {
  688. return parts.find(function (part) {
  689. return str.indexOf(part) === 0;
  690. });
  691. }
  692. function normalizeLocale(locale, messages) {
  693. if (!locale) {
  694. return;
  695. }
  696. locale = locale.trim().replace(/_/g, '-');
  697. if (messages && messages[locale]) {
  698. return locale;
  699. }
  700. locale = locale.toLowerCase();
  701. if (locale === 'chinese') {
  702. // 支付宝
  703. return LOCALE_ZH_HANS;
  704. }
  705. if (locale.indexOf('zh') === 0) {
  706. if (locale.indexOf('-hans') > -1) {
  707. return LOCALE_ZH_HANS;
  708. }
  709. if (locale.indexOf('-hant') > -1) {
  710. return LOCALE_ZH_HANT;
  711. }
  712. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  713. return LOCALE_ZH_HANT;
  714. }
  715. return LOCALE_ZH_HANS;
  716. }
  717. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  718. if (lang) {
  719. return lang;
  720. }
  721. }
  722. // export function initI18n() {
  723. // const localeKeys = Object.keys(__uniConfig.locales || {})
  724. // if (localeKeys.length) {
  725. // localeKeys.forEach((locale) =>
  726. // i18n.add(locale, __uniConfig.locales[locale])
  727. // )
  728. // }
  729. // }
  730. function getLocale$1() {
  731. // 优先使用 $locale
  732. if (isFn(getApp)) {
  733. var app = getApp({
  734. allowDefault: true
  735. });
  736. if (app && app.$vm) {
  737. return app.$vm.$locale;
  738. }
  739. }
  740. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  741. }
  742. function setLocale$1(locale) {
  743. var app = isFn(getApp) ? getApp() : false;
  744. if (!app) {
  745. return false;
  746. }
  747. var oldLocale = app.$vm.$locale;
  748. if (oldLocale !== locale) {
  749. app.$vm.$locale = locale;
  750. onLocaleChangeCallbacks.forEach(function (fn) {
  751. return fn({
  752. locale: locale
  753. });
  754. });
  755. return true;
  756. }
  757. return false;
  758. }
  759. var onLocaleChangeCallbacks = [];
  760. function onLocaleChange(fn) {
  761. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  762. onLocaleChangeCallbacks.push(fn);
  763. }
  764. }
  765. if (typeof global !== 'undefined') {
  766. global.getLocale = getLocale$1;
  767. }
  768. var interceptors = {
  769. promiseInterceptor: promiseInterceptor
  770. };
  771. var baseApi = /*#__PURE__*/Object.freeze({
  772. __proto__: null,
  773. upx2px: upx2px,
  774. getLocale: getLocale$1,
  775. setLocale: setLocale$1,
  776. onLocaleChange: onLocaleChange,
  777. addInterceptor: addInterceptor,
  778. removeInterceptor: removeInterceptor,
  779. interceptors: interceptors
  780. });
  781. function findExistsPageIndex(url) {
  782. var pages = getCurrentPages();
  783. var len = pages.length;
  784. while (len--) {
  785. var page = pages[len];
  786. if (page.$page && page.$page.fullPath === url) {
  787. return len;
  788. }
  789. }
  790. return -1;
  791. }
  792. var redirectTo = {
  793. name: function name(fromArgs) {
  794. if (fromArgs.exists === 'back' && fromArgs.delta) {
  795. return 'navigateBack';
  796. }
  797. return 'redirectTo';
  798. },
  799. args: function args(fromArgs) {
  800. if (fromArgs.exists === 'back' && fromArgs.url) {
  801. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  802. if (existsPageIndex !== -1) {
  803. var delta = getCurrentPages().length - 1 - existsPageIndex;
  804. if (delta > 0) {
  805. fromArgs.delta = delta;
  806. }
  807. }
  808. }
  809. }
  810. };
  811. var previewImage = {
  812. args: function args(fromArgs) {
  813. var currentIndex = parseInt(fromArgs.current);
  814. if (isNaN(currentIndex)) {
  815. return;
  816. }
  817. var urls = fromArgs.urls;
  818. if (!Array.isArray(urls)) {
  819. return;
  820. }
  821. var len = urls.length;
  822. if (!len) {
  823. return;
  824. }
  825. if (currentIndex < 0) {
  826. currentIndex = 0;
  827. } else if (currentIndex >= len) {
  828. currentIndex = len - 1;
  829. }
  830. if (currentIndex > 0) {
  831. fromArgs.current = urls[currentIndex];
  832. fromArgs.urls = urls.filter(function (item, index) {
  833. return index < currentIndex ? item !== urls[currentIndex] : true;
  834. });
  835. } else {
  836. fromArgs.current = urls[0];
  837. }
  838. return {
  839. indicator: false,
  840. loop: false
  841. };
  842. }
  843. };
  844. var UUID_KEY = '__DC_STAT_UUID';
  845. var deviceId;
  846. function useDeviceId(result) {
  847. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  848. if (!deviceId) {
  849. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  850. wx.setStorage({
  851. key: UUID_KEY,
  852. data: deviceId
  853. });
  854. }
  855. result.deviceId = deviceId;
  856. }
  857. function addSafeAreaInsets(result) {
  858. if (result.safeArea) {
  859. var safeArea = result.safeArea;
  860. result.safeAreaInsets = {
  861. top: safeArea.top,
  862. left: safeArea.left,
  863. right: result.windowWidth - safeArea.right,
  864. bottom: result.screenHeight - safeArea.bottom
  865. };
  866. }
  867. }
  868. function populateParameters(result) {
  869. var _result$brand = result.brand,
  870. brand = _result$brand === void 0 ? '' : _result$brand,
  871. _result$model = result.model,
  872. model = _result$model === void 0 ? '' : _result$model,
  873. _result$system = result.system,
  874. system = _result$system === void 0 ? '' : _result$system,
  875. _result$language = result.language,
  876. language = _result$language === void 0 ? '' : _result$language,
  877. theme = result.theme,
  878. version = result.version,
  879. platform = result.platform,
  880. fontSizeSetting = result.fontSizeSetting,
  881. SDKVersion = result.SDKVersion,
  882. pixelRatio = result.pixelRatio,
  883. deviceOrientation = result.deviceOrientation;
  884. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  885. var extraParam = {};
  886. // osName osVersion
  887. var osName = '';
  888. var osVersion = '';
  889. {
  890. osName = system.split(' ')[0] || '';
  891. osVersion = system.split(' ')[1] || '';
  892. }
  893. var hostVersion = version;
  894. // deviceType
  895. var deviceType = getGetDeviceType(result, model);
  896. // deviceModel
  897. var deviceBrand = getDeviceBrand(brand);
  898. // hostName
  899. var _hostName = getHostName(result);
  900. // deviceOrientation
  901. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  902. // devicePixelRatio
  903. var _devicePixelRatio = pixelRatio;
  904. // SDKVersion
  905. var _SDKVersion = SDKVersion;
  906. // hostLanguage
  907. var hostLanguage = language.replace(/_/g, '-');
  908. // wx.getAccountInfoSync
  909. var parameters = {
  910. appId: "__UNI__1EF8770",
  911. appName: "速立保",
  912. appVersion: "1.0.0",
  913. appVersionCode: "100",
  914. appLanguage: getAppLanguage(hostLanguage),
  915. uniCompileVersion: "4.29",
  916. uniRuntimeVersion: "4.29",
  917. uniPlatform: undefined || "mp-weixin",
  918. deviceBrand: deviceBrand,
  919. deviceModel: model,
  920. deviceType: deviceType,
  921. devicePixelRatio: _devicePixelRatio,
  922. deviceOrientation: _deviceOrientation,
  923. osName: osName.toLocaleLowerCase(),
  924. osVersion: osVersion,
  925. hostTheme: theme,
  926. hostVersion: hostVersion,
  927. hostLanguage: hostLanguage,
  928. hostName: _hostName,
  929. hostSDKVersion: _SDKVersion,
  930. hostFontSizeSetting: fontSizeSetting,
  931. windowTop: 0,
  932. windowBottom: 0,
  933. // TODO
  934. osLanguage: undefined,
  935. osTheme: undefined,
  936. ua: undefined,
  937. hostPackageName: undefined,
  938. browserName: undefined,
  939. browserVersion: undefined
  940. };
  941. Object.assign(result, parameters, extraParam);
  942. }
  943. function getGetDeviceType(result, model) {
  944. var deviceType = result.deviceType || 'phone';
  945. {
  946. var deviceTypeMaps = {
  947. ipad: 'pad',
  948. windows: 'pc',
  949. mac: 'pc'
  950. };
  951. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  952. var _model = model.toLocaleLowerCase();
  953. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  954. var _m = deviceTypeMapsKeys[index];
  955. if (_model.indexOf(_m) !== -1) {
  956. deviceType = deviceTypeMaps[_m];
  957. break;
  958. }
  959. }
  960. }
  961. return deviceType;
  962. }
  963. function getDeviceBrand(brand) {
  964. var deviceBrand = brand;
  965. if (deviceBrand) {
  966. deviceBrand = brand.toLocaleLowerCase();
  967. }
  968. return deviceBrand;
  969. }
  970. function getAppLanguage(defaultLanguage) {
  971. return getLocale$1 ? getLocale$1() : defaultLanguage;
  972. }
  973. function getHostName(result) {
  974. var _platform = 'WeChat';
  975. var _hostName = result.hostName || _platform; // mp-jd
  976. {
  977. if (result.environment) {
  978. _hostName = result.environment;
  979. } else if (result.host && result.host.env) {
  980. _hostName = result.host.env;
  981. }
  982. }
  983. return _hostName;
  984. }
  985. var getSystemInfo = {
  986. returnValue: function returnValue(result) {
  987. useDeviceId(result);
  988. addSafeAreaInsets(result);
  989. populateParameters(result);
  990. }
  991. };
  992. var showActionSheet = {
  993. args: function args(fromArgs) {
  994. if ((0, _typeof2.default)(fromArgs) === 'object') {
  995. fromArgs.alertText = fromArgs.title;
  996. }
  997. }
  998. };
  999. var getAppBaseInfo = {
  1000. returnValue: function returnValue(result) {
  1001. var _result = result,
  1002. version = _result.version,
  1003. language = _result.language,
  1004. SDKVersion = _result.SDKVersion,
  1005. theme = _result.theme;
  1006. var _hostName = getHostName(result);
  1007. var hostLanguage = language.replace('_', '-');
  1008. result = sortObject(Object.assign(result, {
  1009. appId: "__UNI__1EF8770",
  1010. appName: "速立保",
  1011. appVersion: "1.0.0",
  1012. appVersionCode: "100",
  1013. appLanguage: getAppLanguage(hostLanguage),
  1014. hostVersion: version,
  1015. hostLanguage: hostLanguage,
  1016. hostName: _hostName,
  1017. hostSDKVersion: SDKVersion,
  1018. hostTheme: theme
  1019. }));
  1020. }
  1021. };
  1022. var getDeviceInfo = {
  1023. returnValue: function returnValue(result) {
  1024. var _result2 = result,
  1025. brand = _result2.brand,
  1026. model = _result2.model;
  1027. var deviceType = getGetDeviceType(result, model);
  1028. var deviceBrand = getDeviceBrand(brand);
  1029. useDeviceId(result);
  1030. result = sortObject(Object.assign(result, {
  1031. deviceType: deviceType,
  1032. deviceBrand: deviceBrand,
  1033. deviceModel: model
  1034. }));
  1035. }
  1036. };
  1037. var getWindowInfo = {
  1038. returnValue: function returnValue(result) {
  1039. addSafeAreaInsets(result);
  1040. result = sortObject(Object.assign(result, {
  1041. windowTop: 0,
  1042. windowBottom: 0
  1043. }));
  1044. }
  1045. };
  1046. var getAppAuthorizeSetting = {
  1047. returnValue: function returnValue(result) {
  1048. var locationReducedAccuracy = result.locationReducedAccuracy;
  1049. result.locationAccuracy = 'unsupported';
  1050. if (locationReducedAccuracy === true) {
  1051. result.locationAccuracy = 'reduced';
  1052. } else if (locationReducedAccuracy === false) {
  1053. result.locationAccuracy = 'full';
  1054. }
  1055. }
  1056. };
  1057. // import navigateTo from 'uni-helpers/navigate-to'
  1058. var compressImage = {
  1059. args: function args(fromArgs) {
  1060. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  1061. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  1062. fromArgs.compressHeight = fromArgs.compressedHeight;
  1063. }
  1064. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  1065. fromArgs.compressWidth = fromArgs.compressedWidth;
  1066. }
  1067. }
  1068. };
  1069. var protocols = {
  1070. redirectTo: redirectTo,
  1071. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  1072. previewImage: previewImage,
  1073. getSystemInfo: getSystemInfo,
  1074. getSystemInfoSync: getSystemInfo,
  1075. showActionSheet: showActionSheet,
  1076. getAppBaseInfo: getAppBaseInfo,
  1077. getDeviceInfo: getDeviceInfo,
  1078. getWindowInfo: getWindowInfo,
  1079. getAppAuthorizeSetting: getAppAuthorizeSetting,
  1080. compressImage: compressImage
  1081. };
  1082. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  1083. var canIUses = [];
  1084. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  1085. function processCallback(methodName, method, returnValue) {
  1086. return function (res) {
  1087. return method(processReturnValue(methodName, res, returnValue));
  1088. };
  1089. }
  1090. function processArgs(methodName, fromArgs) {
  1091. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1092. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1093. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  1094. if (isPlainObject(fromArgs)) {
  1095. // 一般 api 的参数解析
  1096. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  1097. if (isFn(argsOption)) {
  1098. argsOption = argsOption(fromArgs, toArgs) || {};
  1099. }
  1100. for (var key in fromArgs) {
  1101. if (hasOwn(argsOption, key)) {
  1102. var keyOption = argsOption[key];
  1103. if (isFn(keyOption)) {
  1104. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1105. }
  1106. if (!keyOption) {
  1107. // 不支持的参数
  1108. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  1109. } else if (isStr(keyOption)) {
  1110. // 重写参数 key
  1111. toArgs[keyOption] = fromArgs[key];
  1112. } else if (isPlainObject(keyOption)) {
  1113. // {name:newName,value:value}可重新指定参数 key:value
  1114. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1115. }
  1116. } else if (CALLBACKS.indexOf(key) !== -1) {
  1117. if (isFn(fromArgs[key])) {
  1118. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  1119. }
  1120. } else {
  1121. if (!keepFromArgs) {
  1122. toArgs[key] = fromArgs[key];
  1123. }
  1124. }
  1125. }
  1126. return toArgs;
  1127. } else if (isFn(fromArgs)) {
  1128. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1129. }
  1130. return fromArgs;
  1131. }
  1132. function processReturnValue(methodName, res, returnValue) {
  1133. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  1134. if (isFn(protocols.returnValue)) {
  1135. // 处理通用 returnValue
  1136. res = protocols.returnValue(methodName, res);
  1137. }
  1138. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1139. }
  1140. function wrapper(methodName, method) {
  1141. if (hasOwn(protocols, methodName)) {
  1142. var protocol = protocols[methodName];
  1143. if (!protocol) {
  1144. // 暂不支持的 api
  1145. return function () {
  1146. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1147. };
  1148. }
  1149. return function (arg1, arg2) {
  1150. // 目前 api 最多两个参数
  1151. var options = protocol;
  1152. if (isFn(protocol)) {
  1153. options = protocol(arg1);
  1154. }
  1155. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1156. var args = [arg1];
  1157. if (typeof arg2 !== 'undefined') {
  1158. args.push(arg2);
  1159. }
  1160. if (isFn(options.name)) {
  1161. methodName = options.name(arg1);
  1162. } else if (isStr(options.name)) {
  1163. methodName = options.name;
  1164. }
  1165. var returnValue = wx[methodName].apply(wx, args);
  1166. if (isSyncApi(methodName)) {
  1167. // 同步 api
  1168. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1169. }
  1170. return returnValue;
  1171. };
  1172. }
  1173. return method;
  1174. }
  1175. var todoApis = Object.create(null);
  1176. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1177. function createTodoApi(name) {
  1178. return function todoApi(_ref) {
  1179. var fail = _ref.fail,
  1180. complete = _ref.complete;
  1181. var res = {
  1182. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1183. };
  1184. isFn(fail) && fail(res);
  1185. isFn(complete) && complete(res);
  1186. };
  1187. }
  1188. TODOS.forEach(function (name) {
  1189. todoApis[name] = createTodoApi(name);
  1190. });
  1191. var providers = {
  1192. oauth: ['weixin'],
  1193. share: ['weixin'],
  1194. payment: ['wxpay'],
  1195. push: ['weixin']
  1196. };
  1197. function getProvider(_ref2) {
  1198. var service = _ref2.service,
  1199. success = _ref2.success,
  1200. fail = _ref2.fail,
  1201. complete = _ref2.complete;
  1202. var res = false;
  1203. if (providers[service]) {
  1204. res = {
  1205. errMsg: 'getProvider:ok',
  1206. service: service,
  1207. provider: providers[service]
  1208. };
  1209. isFn(success) && success(res);
  1210. } else {
  1211. res = {
  1212. errMsg: 'getProvider:fail service not found'
  1213. };
  1214. isFn(fail) && fail(res);
  1215. }
  1216. isFn(complete) && complete(res);
  1217. }
  1218. var extraApi = /*#__PURE__*/Object.freeze({
  1219. __proto__: null,
  1220. getProvider: getProvider
  1221. });
  1222. var getEmitter = function () {
  1223. var Emitter;
  1224. return function getUniEmitter() {
  1225. if (!Emitter) {
  1226. Emitter = new _vue.default();
  1227. }
  1228. return Emitter;
  1229. };
  1230. }();
  1231. function apply(ctx, method, args) {
  1232. return ctx[method].apply(ctx, args);
  1233. }
  1234. function $on() {
  1235. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1236. }
  1237. function $off() {
  1238. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1239. }
  1240. function $once() {
  1241. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1242. }
  1243. function $emit() {
  1244. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1245. }
  1246. var eventApi = /*#__PURE__*/Object.freeze({
  1247. __proto__: null,
  1248. $on: $on,
  1249. $off: $off,
  1250. $once: $once,
  1251. $emit: $emit
  1252. });
  1253. /**
  1254. * 框架内 try-catch
  1255. */
  1256. /**
  1257. * 开发者 try-catch
  1258. */
  1259. function tryCatch(fn) {
  1260. return function () {
  1261. try {
  1262. return fn.apply(fn, arguments);
  1263. } catch (e) {
  1264. // TODO
  1265. console.error(e);
  1266. }
  1267. };
  1268. }
  1269. function getApiCallbacks(params) {
  1270. var apiCallbacks = {};
  1271. for (var name in params) {
  1272. var param = params[name];
  1273. if (isFn(param)) {
  1274. apiCallbacks[name] = tryCatch(param);
  1275. delete params[name];
  1276. }
  1277. }
  1278. return apiCallbacks;
  1279. }
  1280. var cid;
  1281. var cidErrMsg;
  1282. var enabled;
  1283. function normalizePushMessage(message) {
  1284. try {
  1285. return JSON.parse(message);
  1286. } catch (e) {}
  1287. return message;
  1288. }
  1289. function invokePushCallback(args) {
  1290. if (args.type === 'enabled') {
  1291. enabled = true;
  1292. } else if (args.type === 'clientId') {
  1293. cid = args.cid;
  1294. cidErrMsg = args.errMsg;
  1295. invokeGetPushCidCallbacks(cid, args.errMsg);
  1296. } else if (args.type === 'pushMsg') {
  1297. var message = {
  1298. type: 'receive',
  1299. data: normalizePushMessage(args.message)
  1300. };
  1301. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1302. var callback = onPushMessageCallbacks[i];
  1303. callback(message);
  1304. // 该消息已被阻止
  1305. if (message.stopped) {
  1306. break;
  1307. }
  1308. }
  1309. } else if (args.type === 'click') {
  1310. onPushMessageCallbacks.forEach(function (callback) {
  1311. callback({
  1312. type: 'click',
  1313. data: normalizePushMessage(args.message)
  1314. });
  1315. });
  1316. }
  1317. }
  1318. var getPushCidCallbacks = [];
  1319. function invokeGetPushCidCallbacks(cid, errMsg) {
  1320. getPushCidCallbacks.forEach(function (callback) {
  1321. callback(cid, errMsg);
  1322. });
  1323. getPushCidCallbacks.length = 0;
  1324. }
  1325. function getPushClientId(args) {
  1326. if (!isPlainObject(args)) {
  1327. args = {};
  1328. }
  1329. var _getApiCallbacks = getApiCallbacks(args),
  1330. success = _getApiCallbacks.success,
  1331. fail = _getApiCallbacks.fail,
  1332. complete = _getApiCallbacks.complete;
  1333. var hasSuccess = isFn(success);
  1334. var hasFail = isFn(fail);
  1335. var hasComplete = isFn(complete);
  1336. Promise.resolve().then(function () {
  1337. if (typeof enabled === 'undefined') {
  1338. enabled = false;
  1339. cid = '';
  1340. cidErrMsg = 'uniPush is not enabled';
  1341. }
  1342. getPushCidCallbacks.push(function (cid, errMsg) {
  1343. var res;
  1344. if (cid) {
  1345. res = {
  1346. errMsg: 'getPushClientId:ok',
  1347. cid: cid
  1348. };
  1349. hasSuccess && success(res);
  1350. } else {
  1351. res = {
  1352. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1353. };
  1354. hasFail && fail(res);
  1355. }
  1356. hasComplete && complete(res);
  1357. });
  1358. if (typeof cid !== 'undefined') {
  1359. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1360. }
  1361. });
  1362. }
  1363. var onPushMessageCallbacks = [];
  1364. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1365. var onPushMessage = function onPushMessage(fn) {
  1366. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1367. onPushMessageCallbacks.push(fn);
  1368. }
  1369. };
  1370. var offPushMessage = function offPushMessage(fn) {
  1371. if (!fn) {
  1372. onPushMessageCallbacks.length = 0;
  1373. } else {
  1374. var index = onPushMessageCallbacks.indexOf(fn);
  1375. if (index > -1) {
  1376. onPushMessageCallbacks.splice(index, 1);
  1377. }
  1378. }
  1379. };
  1380. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1381. if (!baseInfo) {
  1382. baseInfo = wx.getSystemInfoSync();
  1383. }
  1384. var host = baseInfo ? baseInfo.host : null;
  1385. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1386. var api = /*#__PURE__*/Object.freeze({
  1387. __proto__: null,
  1388. shareVideoMessage: shareVideoMessage,
  1389. getPushClientId: getPushClientId,
  1390. onPushMessage: onPushMessage,
  1391. offPushMessage: offPushMessage,
  1392. invokePushCallback: invokePushCallback
  1393. });
  1394. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1395. function findVmByVueId(vm, vuePid) {
  1396. var $children = vm.$children;
  1397. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1398. for (var i = $children.length - 1; i >= 0; i--) {
  1399. var childVm = $children[i];
  1400. if (childVm.$scope._$vueId === vuePid) {
  1401. return childVm;
  1402. }
  1403. }
  1404. // 反向递归查找
  1405. var parentVm;
  1406. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1407. parentVm = findVmByVueId($children[_i], vuePid);
  1408. if (parentVm) {
  1409. return parentVm;
  1410. }
  1411. }
  1412. }
  1413. function initBehavior(options) {
  1414. return Behavior(options);
  1415. }
  1416. function isPage() {
  1417. return !!this.route;
  1418. }
  1419. function initRelation(detail) {
  1420. this.triggerEvent('__l', detail);
  1421. }
  1422. function selectAllComponents(mpInstance, selector, $refs) {
  1423. var components = mpInstance.selectAllComponents(selector) || [];
  1424. components.forEach(function (component) {
  1425. var ref = component.dataset.ref;
  1426. $refs[ref] = component.$vm || toSkip(component);
  1427. {
  1428. if (component.dataset.vueGeneric === 'scoped') {
  1429. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1430. selectAllComponents(scopedComponent, selector, $refs);
  1431. });
  1432. }
  1433. }
  1434. });
  1435. }
  1436. function syncRefs(refs, newRefs) {
  1437. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1438. var newKeys = Object.keys(newRefs);
  1439. newKeys.forEach(function (key) {
  1440. var oldValue = refs[key];
  1441. var newValue = newRefs[key];
  1442. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1443. return oldValue.includes(value);
  1444. })) {
  1445. return;
  1446. }
  1447. refs[key] = newValue;
  1448. oldKeys.delete(key);
  1449. });
  1450. oldKeys.forEach(function (key) {
  1451. delete refs[key];
  1452. });
  1453. return refs;
  1454. }
  1455. function initRefs(vm) {
  1456. var mpInstance = vm.$scope;
  1457. var refs = {};
  1458. Object.defineProperty(vm, '$refs', {
  1459. get: function get() {
  1460. var $refs = {};
  1461. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1462. // TODO 暂不考虑 for 中的 scoped
  1463. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1464. forComponents.forEach(function (component) {
  1465. var ref = component.dataset.ref;
  1466. if (!$refs[ref]) {
  1467. $refs[ref] = [];
  1468. }
  1469. $refs[ref].push(component.$vm || toSkip(component));
  1470. });
  1471. return syncRefs(refs, $refs);
  1472. }
  1473. });
  1474. }
  1475. function handleLink(event) {
  1476. var _ref3 = event.detail || event.value,
  1477. vuePid = _ref3.vuePid,
  1478. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1479. var parentVm;
  1480. if (vuePid) {
  1481. parentVm = findVmByVueId(this.$vm, vuePid);
  1482. }
  1483. if (!parentVm) {
  1484. parentVm = this.$vm;
  1485. }
  1486. vueOptions.parent = parentVm;
  1487. }
  1488. function markMPComponent(component) {
  1489. // 在 Vue 中标记为小程序组件
  1490. var IS_MP = '__v_isMPComponent';
  1491. Object.defineProperty(component, IS_MP, {
  1492. configurable: true,
  1493. enumerable: false,
  1494. value: true
  1495. });
  1496. return component;
  1497. }
  1498. function toSkip(obj) {
  1499. var OB = '__ob__';
  1500. var SKIP = '__v_skip';
  1501. if (isObject(obj) && Object.isExtensible(obj)) {
  1502. // 避免被 @vue/composition-api 观测
  1503. Object.defineProperty(obj, OB, {
  1504. configurable: true,
  1505. enumerable: false,
  1506. value: (0, _defineProperty2.default)({}, SKIP, true)
  1507. });
  1508. }
  1509. return obj;
  1510. }
  1511. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1512. function initWorkletMethods(mpMethods, vueMethods) {
  1513. if (vueMethods) {
  1514. Object.keys(vueMethods).forEach(function (name) {
  1515. var matches = name.match(WORKLET_RE);
  1516. if (matches) {
  1517. var workletName = matches[1];
  1518. mpMethods[name] = vueMethods[name];
  1519. mpMethods[workletName] = vueMethods[workletName];
  1520. }
  1521. });
  1522. }
  1523. }
  1524. var MPPage = Page;
  1525. var MPComponent = Component;
  1526. var customizeRE = /:/g;
  1527. var customize = cached(function (str) {
  1528. return camelize(str.replace(customizeRE, '-'));
  1529. });
  1530. function initTriggerEvent(mpInstance) {
  1531. var oldTriggerEvent = mpInstance.triggerEvent;
  1532. var newTriggerEvent = function newTriggerEvent(event) {
  1533. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1534. args[_key3 - 1] = arguments[_key3];
  1535. }
  1536. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1537. if (this.$vm || this.dataset && this.dataset.comType) {
  1538. event = customize(event);
  1539. } else {
  1540. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1541. var newEvent = customize(event);
  1542. if (newEvent !== event) {
  1543. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1544. }
  1545. }
  1546. return oldTriggerEvent.apply(this, [event].concat(args));
  1547. };
  1548. try {
  1549. // 京东小程序 triggerEvent 为只读
  1550. mpInstance.triggerEvent = newTriggerEvent;
  1551. } catch (error) {
  1552. mpInstance._triggerEvent = newTriggerEvent;
  1553. }
  1554. }
  1555. function initHook(name, options, isComponent) {
  1556. var oldHook = options[name];
  1557. options[name] = function () {
  1558. markMPComponent(this);
  1559. initTriggerEvent(this);
  1560. if (oldHook) {
  1561. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1562. args[_key4] = arguments[_key4];
  1563. }
  1564. return oldHook.apply(this, args);
  1565. }
  1566. };
  1567. }
  1568. if (!MPPage.__$wrappered) {
  1569. MPPage.__$wrappered = true;
  1570. Page = function Page() {
  1571. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1572. initHook('onLoad', options);
  1573. return MPPage(options);
  1574. };
  1575. Page.after = MPPage.after;
  1576. Component = function Component() {
  1577. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1578. initHook('created', options);
  1579. return MPComponent(options);
  1580. };
  1581. }
  1582. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1583. function initMocks(vm, mocks) {
  1584. var mpInstance = vm.$mp[vm.mpType];
  1585. mocks.forEach(function (mock) {
  1586. if (hasOwn(mpInstance, mock)) {
  1587. vm[mock] = mpInstance[mock];
  1588. }
  1589. });
  1590. }
  1591. function hasHook(hook, vueOptions) {
  1592. if (!vueOptions) {
  1593. return true;
  1594. }
  1595. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1596. return true;
  1597. }
  1598. vueOptions = vueOptions.default || vueOptions;
  1599. if (isFn(vueOptions)) {
  1600. if (isFn(vueOptions.extendOptions[hook])) {
  1601. return true;
  1602. }
  1603. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1604. return true;
  1605. }
  1606. return false;
  1607. }
  1608. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1609. return true;
  1610. }
  1611. var mixins = vueOptions.mixins;
  1612. if (Array.isArray(mixins)) {
  1613. return !!mixins.find(function (mixin) {
  1614. return hasHook(hook, mixin);
  1615. });
  1616. }
  1617. }
  1618. function initHooks(mpOptions, hooks, vueOptions) {
  1619. hooks.forEach(function (hook) {
  1620. if (hasHook(hook, vueOptions)) {
  1621. mpOptions[hook] = function (args) {
  1622. return this.$vm && this.$vm.__call_hook(hook, args);
  1623. };
  1624. }
  1625. });
  1626. }
  1627. function initUnknownHooks(mpOptions, vueOptions) {
  1628. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1629. findHooks(vueOptions).forEach(function (hook) {
  1630. return initHook$1(mpOptions, hook, excludes);
  1631. });
  1632. }
  1633. function findHooks(vueOptions) {
  1634. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1635. if (vueOptions) {
  1636. Object.keys(vueOptions).forEach(function (name) {
  1637. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1638. hooks.push(name);
  1639. }
  1640. });
  1641. }
  1642. return hooks;
  1643. }
  1644. function initHook$1(mpOptions, hook, excludes) {
  1645. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1646. mpOptions[hook] = function (args) {
  1647. return this.$vm && this.$vm.__call_hook(hook, args);
  1648. };
  1649. }
  1650. }
  1651. function initVueComponent(Vue, vueOptions) {
  1652. vueOptions = vueOptions.default || vueOptions;
  1653. var VueComponent;
  1654. if (isFn(vueOptions)) {
  1655. VueComponent = vueOptions;
  1656. } else {
  1657. VueComponent = Vue.extend(vueOptions);
  1658. }
  1659. vueOptions = VueComponent.options;
  1660. return [VueComponent, vueOptions];
  1661. }
  1662. function initSlots(vm, vueSlots) {
  1663. if (Array.isArray(vueSlots) && vueSlots.length) {
  1664. var $slots = Object.create(null);
  1665. vueSlots.forEach(function (slotName) {
  1666. $slots[slotName] = true;
  1667. });
  1668. vm.$scopedSlots = vm.$slots = $slots;
  1669. }
  1670. }
  1671. function initVueIds(vueIds, mpInstance) {
  1672. vueIds = (vueIds || '').split(',');
  1673. var len = vueIds.length;
  1674. if (len === 1) {
  1675. mpInstance._$vueId = vueIds[0];
  1676. } else if (len === 2) {
  1677. mpInstance._$vueId = vueIds[0];
  1678. mpInstance._$vuePid = vueIds[1];
  1679. }
  1680. }
  1681. function initData(vueOptions, context) {
  1682. var data = vueOptions.data || {};
  1683. var methods = vueOptions.methods || {};
  1684. if (typeof data === 'function') {
  1685. try {
  1686. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1687. } catch (e) {
  1688. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"速立保","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1689. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1690. }
  1691. }
  1692. } else {
  1693. try {
  1694. // 对 data 格式化
  1695. data = JSON.parse(JSON.stringify(data));
  1696. } catch (e) {}
  1697. }
  1698. if (!isPlainObject(data)) {
  1699. data = {};
  1700. }
  1701. Object.keys(methods).forEach(function (methodName) {
  1702. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1703. data[methodName] = methods[methodName];
  1704. }
  1705. });
  1706. return data;
  1707. }
  1708. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1709. function createObserver(name) {
  1710. return function observer(newVal, oldVal) {
  1711. if (this.$vm) {
  1712. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1713. }
  1714. };
  1715. }
  1716. function initBehaviors(vueOptions, initBehavior) {
  1717. var vueBehaviors = vueOptions.behaviors;
  1718. var vueExtends = vueOptions.extends;
  1719. var vueMixins = vueOptions.mixins;
  1720. var vueProps = vueOptions.props;
  1721. if (!vueProps) {
  1722. vueOptions.props = vueProps = [];
  1723. }
  1724. var behaviors = [];
  1725. if (Array.isArray(vueBehaviors)) {
  1726. vueBehaviors.forEach(function (behavior) {
  1727. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1728. if (behavior === 'uni://form-field') {
  1729. if (Array.isArray(vueProps)) {
  1730. vueProps.push('name');
  1731. vueProps.push('value');
  1732. } else {
  1733. vueProps.name = {
  1734. type: String,
  1735. default: ''
  1736. };
  1737. vueProps.value = {
  1738. type: [String, Number, Boolean, Array, Object, Date],
  1739. default: ''
  1740. };
  1741. }
  1742. }
  1743. });
  1744. }
  1745. if (isPlainObject(vueExtends) && vueExtends.props) {
  1746. behaviors.push(initBehavior({
  1747. properties: initProperties(vueExtends.props, true)
  1748. }));
  1749. }
  1750. if (Array.isArray(vueMixins)) {
  1751. vueMixins.forEach(function (vueMixin) {
  1752. if (isPlainObject(vueMixin) && vueMixin.props) {
  1753. behaviors.push(initBehavior({
  1754. properties: initProperties(vueMixin.props, true)
  1755. }));
  1756. }
  1757. });
  1758. }
  1759. return behaviors;
  1760. }
  1761. function parsePropType(key, type, defaultValue, file) {
  1762. // [String]=>String
  1763. if (Array.isArray(type) && type.length === 1) {
  1764. return type[0];
  1765. }
  1766. return type;
  1767. }
  1768. function initProperties(props) {
  1769. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1770. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1771. var options = arguments.length > 3 ? arguments[3] : undefined;
  1772. var properties = {};
  1773. if (!isBehavior) {
  1774. properties.vueId = {
  1775. type: String,
  1776. value: ''
  1777. };
  1778. {
  1779. if (options.virtualHost) {
  1780. properties.virtualHostStyle = {
  1781. type: null,
  1782. value: ''
  1783. };
  1784. properties.virtualHostClass = {
  1785. type: null,
  1786. value: ''
  1787. };
  1788. }
  1789. }
  1790. // scopedSlotsCompiler auto
  1791. properties.scopedSlotsCompiler = {
  1792. type: String,
  1793. value: ''
  1794. };
  1795. properties.vueSlots = {
  1796. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1797. type: null,
  1798. value: [],
  1799. observer: function observer(newVal, oldVal) {
  1800. var $slots = Object.create(null);
  1801. newVal.forEach(function (slotName) {
  1802. $slots[slotName] = true;
  1803. });
  1804. this.setData({
  1805. $slots: $slots
  1806. });
  1807. }
  1808. };
  1809. }
  1810. if (Array.isArray(props)) {
  1811. // ['title']
  1812. props.forEach(function (key) {
  1813. properties[key] = {
  1814. type: null,
  1815. observer: createObserver(key)
  1816. };
  1817. });
  1818. } else if (isPlainObject(props)) {
  1819. // {title:{type:String,default:''},content:String}
  1820. Object.keys(props).forEach(function (key) {
  1821. var opts = props[key];
  1822. if (isPlainObject(opts)) {
  1823. // title:{type:String,default:''}
  1824. var value = opts.default;
  1825. if (isFn(value)) {
  1826. value = value();
  1827. }
  1828. opts.type = parsePropType(key, opts.type);
  1829. properties[key] = {
  1830. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1831. value: value,
  1832. observer: createObserver(key)
  1833. };
  1834. } else {
  1835. // content:String
  1836. var type = parsePropType(key, opts);
  1837. properties[key] = {
  1838. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1839. observer: createObserver(key)
  1840. };
  1841. }
  1842. });
  1843. }
  1844. return properties;
  1845. }
  1846. function wrapper$1(event) {
  1847. // TODO 又得兼容 mpvue 的 mp 对象
  1848. try {
  1849. event.mp = JSON.parse(JSON.stringify(event));
  1850. } catch (e) {}
  1851. event.stopPropagation = noop;
  1852. event.preventDefault = noop;
  1853. event.target = event.target || {};
  1854. if (!hasOwn(event, 'detail')) {
  1855. event.detail = {};
  1856. }
  1857. if (hasOwn(event, 'markerId')) {
  1858. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1859. event.detail.markerId = event.markerId;
  1860. }
  1861. if (isPlainObject(event.detail)) {
  1862. event.target = Object.assign({}, event.target, event.detail);
  1863. }
  1864. return event;
  1865. }
  1866. function getExtraValue(vm, dataPathsArray) {
  1867. var context = vm;
  1868. dataPathsArray.forEach(function (dataPathArray) {
  1869. var dataPath = dataPathArray[0];
  1870. var value = dataPathArray[2];
  1871. if (dataPath || typeof value !== 'undefined') {
  1872. // ['','',index,'disable']
  1873. var propPath = dataPathArray[1];
  1874. var valuePath = dataPathArray[3];
  1875. var vFor;
  1876. if (Number.isInteger(dataPath)) {
  1877. vFor = dataPath;
  1878. } else if (!dataPath) {
  1879. vFor = context;
  1880. } else if (typeof dataPath === 'string' && dataPath) {
  1881. if (dataPath.indexOf('#s#') === 0) {
  1882. vFor = dataPath.substr(3);
  1883. } else {
  1884. vFor = vm.__get_value(dataPath, context);
  1885. }
  1886. }
  1887. if (Number.isInteger(vFor)) {
  1888. context = value;
  1889. } else if (!propPath) {
  1890. context = vFor[value];
  1891. } else {
  1892. if (Array.isArray(vFor)) {
  1893. context = vFor.find(function (vForItem) {
  1894. return vm.__get_value(propPath, vForItem) === value;
  1895. });
  1896. } else if (isPlainObject(vFor)) {
  1897. context = Object.keys(vFor).find(function (vForKey) {
  1898. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1899. });
  1900. } else {
  1901. console.error('v-for 暂不支持循环数据:', vFor);
  1902. }
  1903. }
  1904. if (valuePath) {
  1905. context = vm.__get_value(valuePath, context);
  1906. }
  1907. }
  1908. });
  1909. return context;
  1910. }
  1911. function processEventExtra(vm, extra, event, __args__) {
  1912. var extraObj = {};
  1913. if (Array.isArray(extra) && extra.length) {
  1914. /**
  1915. *[
  1916. * ['data.items', 'data.id', item.data.id],
  1917. * ['metas', 'id', meta.id]
  1918. *],
  1919. *[
  1920. * ['data.items', 'data.id', item.data.id],
  1921. * ['metas', 'id', meta.id]
  1922. *],
  1923. *'test'
  1924. */
  1925. extra.forEach(function (dataPath, index) {
  1926. if (typeof dataPath === 'string') {
  1927. if (!dataPath) {
  1928. // model,prop.sync
  1929. extraObj['$' + index] = vm;
  1930. } else {
  1931. if (dataPath === '$event') {
  1932. // $event
  1933. extraObj['$' + index] = event;
  1934. } else if (dataPath === 'arguments') {
  1935. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1936. } else if (dataPath.indexOf('$event.') === 0) {
  1937. // $event.target.value
  1938. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1939. } else {
  1940. extraObj['$' + index] = vm.__get_value(dataPath);
  1941. }
  1942. }
  1943. } else {
  1944. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1945. }
  1946. });
  1947. }
  1948. return extraObj;
  1949. }
  1950. function getObjByArray(arr) {
  1951. var obj = {};
  1952. for (var i = 1; i < arr.length; i++) {
  1953. var element = arr[i];
  1954. obj[element[0]] = element[1];
  1955. }
  1956. return obj;
  1957. }
  1958. function processEventArgs(vm, event) {
  1959. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1960. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1961. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1962. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1963. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1964. // fixed 用户直接触发 mpInstance.triggerEvent
  1965. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1966. if (isCustom) {
  1967. // 自定义事件
  1968. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1969. if (!args.length) {
  1970. // 无参数,直接传入 event 或 detail 数组
  1971. if (isCustomMPEvent) {
  1972. return [event];
  1973. }
  1974. return __args__;
  1975. }
  1976. }
  1977. var extraObj = processEventExtra(vm, extra, event, __args__);
  1978. var ret = [];
  1979. args.forEach(function (arg) {
  1980. if (arg === '$event') {
  1981. if (methodName === '__set_model' && !isCustom) {
  1982. // input v-model value
  1983. ret.push(event.target.value);
  1984. } else {
  1985. if (isCustom && !isCustomMPEvent) {
  1986. ret.push(__args__[0]);
  1987. } else {
  1988. // wxcomponent 组件或内置组件
  1989. ret.push(event);
  1990. }
  1991. }
  1992. } else {
  1993. if (Array.isArray(arg) && arg[0] === 'o') {
  1994. ret.push(getObjByArray(arg));
  1995. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1996. ret.push(extraObj[arg]);
  1997. } else {
  1998. ret.push(arg);
  1999. }
  2000. }
  2001. });
  2002. return ret;
  2003. }
  2004. var ONCE = '~';
  2005. var CUSTOM = '^';
  2006. function isMatchEventType(eventType, optType) {
  2007. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  2008. }
  2009. function getContextVm(vm) {
  2010. var $parent = vm.$parent;
  2011. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  2012. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  2013. $parent = $parent.$parent;
  2014. }
  2015. return $parent && $parent.$parent;
  2016. }
  2017. function handleEvent(event) {
  2018. var _this2 = this;
  2019. event = wrapper$1(event);
  2020. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  2021. var dataset = (event.currentTarget || event.target).dataset;
  2022. if (!dataset) {
  2023. return console.warn('事件信息不存在');
  2024. }
  2025. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  2026. if (!eventOpts) {
  2027. return console.warn('事件信息不存在');
  2028. }
  2029. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  2030. var eventType = event.type;
  2031. var ret = [];
  2032. eventOpts.forEach(function (eventOpt) {
  2033. var type = eventOpt[0];
  2034. var eventsArray = eventOpt[1];
  2035. var isCustom = type.charAt(0) === CUSTOM;
  2036. type = isCustom ? type.slice(1) : type;
  2037. var isOnce = type.charAt(0) === ONCE;
  2038. type = isOnce ? type.slice(1) : type;
  2039. if (eventsArray && isMatchEventType(eventType, type)) {
  2040. eventsArray.forEach(function (eventArray) {
  2041. var methodName = eventArray[0];
  2042. if (methodName) {
  2043. var handlerCtx = _this2.$vm;
  2044. if (handlerCtx.$options.generic) {
  2045. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  2046. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  2047. }
  2048. if (methodName === '$emit') {
  2049. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  2050. return;
  2051. }
  2052. var handler = handlerCtx[methodName];
  2053. if (!isFn(handler)) {
  2054. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  2055. var path = _this2.route || _this2.is;
  2056. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  2057. }
  2058. if (isOnce) {
  2059. if (handler.once) {
  2060. return;
  2061. }
  2062. handler.once = true;
  2063. }
  2064. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  2065. params = Array.isArray(params) ? params : [];
  2066. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  2067. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  2068. // eslint-disable-next-line no-sparse-arrays
  2069. params = params.concat([,,,,,,,,,, event]);
  2070. }
  2071. ret.push(handler.apply(handlerCtx, params));
  2072. }
  2073. });
  2074. }
  2075. });
  2076. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  2077. return ret[0];
  2078. }
  2079. }
  2080. var eventChannels = {};
  2081. function getEventChannel(id) {
  2082. var eventChannel = eventChannels[id];
  2083. delete eventChannels[id];
  2084. return eventChannel;
  2085. }
  2086. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  2087. function initEventChannel() {
  2088. _vue.default.prototype.getOpenerEventChannel = function () {
  2089. // 微信小程序使用自身getOpenerEventChannel
  2090. {
  2091. return this.$scope.getOpenerEventChannel();
  2092. }
  2093. };
  2094. var callHook = _vue.default.prototype.__call_hook;
  2095. _vue.default.prototype.__call_hook = function (hook, args) {
  2096. if (hook === 'onLoad' && args && args.__id__) {
  2097. this.__eventChannel__ = getEventChannel(args.__id__);
  2098. delete args.__id__;
  2099. }
  2100. return callHook.call(this, hook, args);
  2101. };
  2102. }
  2103. function initScopedSlotsParams() {
  2104. var center = {};
  2105. var parents = {};
  2106. function currentId(fn) {
  2107. var vueIds = this.$options.propsData.vueId;
  2108. if (vueIds) {
  2109. var vueId = vueIds.split(',')[0];
  2110. fn(vueId);
  2111. }
  2112. }
  2113. _vue.default.prototype.$hasSSP = function (vueId) {
  2114. var slot = center[vueId];
  2115. if (!slot) {
  2116. parents[vueId] = this;
  2117. this.$on('hook:destroyed', function () {
  2118. delete parents[vueId];
  2119. });
  2120. }
  2121. return slot;
  2122. };
  2123. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  2124. var slot = center[vueId];
  2125. if (slot) {
  2126. var params = slot[name] || [];
  2127. if (needAll) {
  2128. return params;
  2129. }
  2130. return params[0];
  2131. }
  2132. };
  2133. _vue.default.prototype.$setSSP = function (name, value) {
  2134. var index = 0;
  2135. currentId.call(this, function (vueId) {
  2136. var slot = center[vueId];
  2137. var params = slot[name] = slot[name] || [];
  2138. params.push(value);
  2139. index = params.length - 1;
  2140. });
  2141. return index;
  2142. };
  2143. _vue.default.prototype.$initSSP = function () {
  2144. currentId.call(this, function (vueId) {
  2145. center[vueId] = {};
  2146. });
  2147. };
  2148. _vue.default.prototype.$callSSP = function () {
  2149. currentId.call(this, function (vueId) {
  2150. if (parents[vueId]) {
  2151. parents[vueId].$forceUpdate();
  2152. }
  2153. });
  2154. };
  2155. _vue.default.mixin({
  2156. destroyed: function destroyed() {
  2157. var propsData = this.$options.propsData;
  2158. var vueId = propsData && propsData.vueId;
  2159. if (vueId) {
  2160. delete center[vueId];
  2161. delete parents[vueId];
  2162. }
  2163. }
  2164. });
  2165. }
  2166. function parseBaseApp(vm, _ref4) {
  2167. var mocks = _ref4.mocks,
  2168. initRefs = _ref4.initRefs;
  2169. initEventChannel();
  2170. {
  2171. initScopedSlotsParams();
  2172. }
  2173. if (vm.$options.store) {
  2174. _vue.default.prototype.$store = vm.$options.store;
  2175. }
  2176. uniIdMixin(_vue.default);
  2177. _vue.default.prototype.mpHost = "mp-weixin";
  2178. _vue.default.mixin({
  2179. beforeCreate: function beforeCreate() {
  2180. if (!this.$options.mpType) {
  2181. return;
  2182. }
  2183. this.mpType = this.$options.mpType;
  2184. this.$mp = (0, _defineProperty2.default)({
  2185. data: {}
  2186. }, this.mpType, this.$options.mpInstance);
  2187. this.$scope = this.$options.mpInstance;
  2188. delete this.$options.mpType;
  2189. delete this.$options.mpInstance;
  2190. if (this.mpType === 'page' && typeof getApp === 'function') {
  2191. // hack vue-i18n
  2192. var app = getApp();
  2193. if (app.$vm && app.$vm.$i18n) {
  2194. this._i18n = app.$vm.$i18n;
  2195. }
  2196. }
  2197. if (this.mpType !== 'app') {
  2198. initRefs(this);
  2199. initMocks(this, mocks);
  2200. }
  2201. }
  2202. });
  2203. var appOptions = {
  2204. onLaunch: function onLaunch(args) {
  2205. if (this.$vm) {
  2206. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2207. return;
  2208. }
  2209. {
  2210. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2211. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2212. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2213. }
  2214. }
  2215. this.$vm = vm;
  2216. this.$vm.$mp = {
  2217. app: this
  2218. };
  2219. this.$vm.$scope = this;
  2220. // vm 上也挂载 globalData
  2221. this.$vm.globalData = this.globalData;
  2222. this.$vm._isMounted = true;
  2223. this.$vm.__call_hook('mounted', args);
  2224. this.$vm.__call_hook('onLaunch', args);
  2225. }
  2226. };
  2227. // 兼容旧版本 globalData
  2228. appOptions.globalData = vm.$options.globalData || {};
  2229. // 将 methods 中的方法挂在 getApp() 中
  2230. var methods = vm.$options.methods;
  2231. if (methods) {
  2232. Object.keys(methods).forEach(function (name) {
  2233. appOptions[name] = methods[name];
  2234. });
  2235. }
  2236. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2237. initHooks(appOptions, hooks);
  2238. initUnknownHooks(appOptions, vm.$options);
  2239. return appOptions;
  2240. }
  2241. function parseApp(vm) {
  2242. return parseBaseApp(vm, {
  2243. mocks: mocks,
  2244. initRefs: initRefs
  2245. });
  2246. }
  2247. function createApp(vm) {
  2248. App(parseApp(vm));
  2249. return vm;
  2250. }
  2251. var encodeReserveRE = /[!'()*]/g;
  2252. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2253. return '%' + c.charCodeAt(0).toString(16);
  2254. };
  2255. var commaRE = /%2C/g;
  2256. // fixed encodeURIComponent which is more conformant to RFC3986:
  2257. // - escapes [!'()*]
  2258. // - preserve commas
  2259. var encode = function encode(str) {
  2260. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2261. };
  2262. function stringifyQuery(obj) {
  2263. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2264. var res = obj ? Object.keys(obj).map(function (key) {
  2265. var val = obj[key];
  2266. if (val === undefined) {
  2267. return '';
  2268. }
  2269. if (val === null) {
  2270. return encodeStr(key);
  2271. }
  2272. if (Array.isArray(val)) {
  2273. var result = [];
  2274. val.forEach(function (val2) {
  2275. if (val2 === undefined) {
  2276. return;
  2277. }
  2278. if (val2 === null) {
  2279. result.push(encodeStr(key));
  2280. } else {
  2281. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2282. }
  2283. });
  2284. return result.join('&');
  2285. }
  2286. return encodeStr(key) + '=' + encodeStr(val);
  2287. }).filter(function (x) {
  2288. return x.length > 0;
  2289. }).join('&') : null;
  2290. return res ? "?".concat(res) : '';
  2291. }
  2292. function parseBaseComponent(vueComponentOptions) {
  2293. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2294. isPage = _ref5.isPage,
  2295. initRelation = _ref5.initRelation;
  2296. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2297. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2298. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2299. VueComponent = _initVueComponent2[0],
  2300. vueOptions = _initVueComponent2[1];
  2301. var options = _objectSpread({
  2302. multipleSlots: true,
  2303. // styleIsolation: 'apply-shared',
  2304. addGlobalClass: true
  2305. }, vueOptions.options || {});
  2306. {
  2307. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2308. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2309. Object.assign(options, vueOptions['mp-weixin'].options);
  2310. }
  2311. }
  2312. var componentOptions = {
  2313. options: options,
  2314. data: initData(vueOptions, _vue.default.prototype),
  2315. behaviors: initBehaviors(vueOptions, initBehavior),
  2316. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2317. lifetimes: {
  2318. attached: function attached() {
  2319. var properties = this.properties;
  2320. var options = {
  2321. mpType: isPage.call(this) ? 'page' : 'component',
  2322. mpInstance: this,
  2323. propsData: properties
  2324. };
  2325. initVueIds(properties.vueId, this);
  2326. // 处理父子关系
  2327. initRelation.call(this, {
  2328. vuePid: this._$vuePid,
  2329. vueOptions: options
  2330. });
  2331. // 初始化 vue 实例
  2332. this.$vm = new VueComponent(options);
  2333. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2334. initSlots(this.$vm, properties.vueSlots);
  2335. // 触发首次 setData
  2336. this.$vm.$mount();
  2337. },
  2338. ready: function ready() {
  2339. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2340. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2341. if (this.$vm) {
  2342. this.$vm._isMounted = true;
  2343. this.$vm.__call_hook('mounted');
  2344. this.$vm.__call_hook('onReady');
  2345. }
  2346. },
  2347. detached: function detached() {
  2348. this.$vm && this.$vm.$destroy();
  2349. }
  2350. },
  2351. pageLifetimes: {
  2352. show: function show(args) {
  2353. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2354. },
  2355. hide: function hide() {
  2356. this.$vm && this.$vm.__call_hook('onPageHide');
  2357. },
  2358. resize: function resize(size) {
  2359. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2360. }
  2361. },
  2362. methods: {
  2363. __l: handleLink,
  2364. __e: handleEvent
  2365. }
  2366. };
  2367. // externalClasses
  2368. if (vueOptions.externalClasses) {
  2369. componentOptions.externalClasses = vueOptions.externalClasses;
  2370. }
  2371. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2372. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2373. componentOptions.methods[callMethod] = function (args) {
  2374. return this.$vm[callMethod](args);
  2375. };
  2376. });
  2377. }
  2378. if (needVueOptions) {
  2379. return [componentOptions, vueOptions, VueComponent];
  2380. }
  2381. if (isPage) {
  2382. return componentOptions;
  2383. }
  2384. return [componentOptions, VueComponent];
  2385. }
  2386. function parseComponent(vueComponentOptions, needVueOptions) {
  2387. return parseBaseComponent(vueComponentOptions, {
  2388. isPage: isPage,
  2389. initRelation: initRelation
  2390. }, needVueOptions);
  2391. }
  2392. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2393. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2394. function parseBasePage(vuePageOptions) {
  2395. var _parseComponent = parseComponent(vuePageOptions, true),
  2396. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2397. pageOptions = _parseComponent2[0],
  2398. vueOptions = _parseComponent2[1];
  2399. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2400. pageOptions.methods.onLoad = function (query) {
  2401. this.options = query;
  2402. var copyQuery = Object.assign({}, query);
  2403. delete copyQuery.__id__;
  2404. this.$page = {
  2405. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2406. };
  2407. this.$vm.$mp.query = query; // 兼容 mpvue
  2408. this.$vm.__call_hook('onLoad', query);
  2409. };
  2410. {
  2411. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2412. }
  2413. {
  2414. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2415. }
  2416. return pageOptions;
  2417. }
  2418. function parsePage(vuePageOptions) {
  2419. return parseBasePage(vuePageOptions);
  2420. }
  2421. function createPage(vuePageOptions) {
  2422. {
  2423. return Component(parsePage(vuePageOptions));
  2424. }
  2425. }
  2426. function createComponent(vueOptions) {
  2427. {
  2428. return Component(parseComponent(vueOptions));
  2429. }
  2430. }
  2431. function createSubpackageApp(vm) {
  2432. var appOptions = parseApp(vm);
  2433. var app = getApp({
  2434. allowDefault: true
  2435. });
  2436. vm.$scope = app;
  2437. var globalData = app.globalData;
  2438. if (globalData) {
  2439. Object.keys(appOptions.globalData).forEach(function (name) {
  2440. if (!hasOwn(globalData, name)) {
  2441. globalData[name] = appOptions.globalData[name];
  2442. }
  2443. });
  2444. }
  2445. Object.keys(appOptions).forEach(function (name) {
  2446. if (!hasOwn(app, name)) {
  2447. app[name] = appOptions[name];
  2448. }
  2449. });
  2450. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2451. wx.onAppShow(function () {
  2452. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2453. args[_key5] = arguments[_key5];
  2454. }
  2455. vm.__call_hook('onShow', args);
  2456. });
  2457. }
  2458. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2459. wx.onAppHide(function () {
  2460. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2461. args[_key6] = arguments[_key6];
  2462. }
  2463. vm.__call_hook('onHide', args);
  2464. });
  2465. }
  2466. if (isFn(appOptions.onLaunch)) {
  2467. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2468. vm.__call_hook('onLaunch', args);
  2469. }
  2470. return vm;
  2471. }
  2472. function createPlugin(vm) {
  2473. var appOptions = parseApp(vm);
  2474. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2475. wx.onAppShow(function () {
  2476. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2477. args[_key7] = arguments[_key7];
  2478. }
  2479. vm.__call_hook('onShow', args);
  2480. });
  2481. }
  2482. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2483. wx.onAppHide(function () {
  2484. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2485. args[_key8] = arguments[_key8];
  2486. }
  2487. vm.__call_hook('onHide', args);
  2488. });
  2489. }
  2490. if (isFn(appOptions.onLaunch)) {
  2491. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2492. vm.__call_hook('onLaunch', args);
  2493. }
  2494. return vm;
  2495. }
  2496. todos.forEach(function (todoApi) {
  2497. protocols[todoApi] = false;
  2498. });
  2499. canIUses.forEach(function (canIUseApi) {
  2500. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2501. if (!wx.canIUse(apiName)) {
  2502. protocols[canIUseApi] = false;
  2503. }
  2504. });
  2505. var uni = {};
  2506. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2507. uni = new Proxy({}, {
  2508. get: function get(target, name) {
  2509. if (hasOwn(target, name)) {
  2510. return target[name];
  2511. }
  2512. if (baseApi[name]) {
  2513. return baseApi[name];
  2514. }
  2515. if (api[name]) {
  2516. return promisify(name, api[name]);
  2517. }
  2518. {
  2519. if (extraApi[name]) {
  2520. return promisify(name, extraApi[name]);
  2521. }
  2522. if (todoApis[name]) {
  2523. return promisify(name, todoApis[name]);
  2524. }
  2525. }
  2526. if (eventApi[name]) {
  2527. return eventApi[name];
  2528. }
  2529. return promisify(name, wrapper(name, wx[name]));
  2530. },
  2531. set: function set(target, name, value) {
  2532. target[name] = value;
  2533. return true;
  2534. }
  2535. });
  2536. } else {
  2537. Object.keys(baseApi).forEach(function (name) {
  2538. uni[name] = baseApi[name];
  2539. });
  2540. {
  2541. Object.keys(todoApis).forEach(function (name) {
  2542. uni[name] = promisify(name, todoApis[name]);
  2543. });
  2544. Object.keys(extraApi).forEach(function (name) {
  2545. uni[name] = promisify(name, extraApi[name]);
  2546. });
  2547. }
  2548. Object.keys(eventApi).forEach(function (name) {
  2549. uni[name] = eventApi[name];
  2550. });
  2551. Object.keys(api).forEach(function (name) {
  2552. uni[name] = promisify(name, api[name]);
  2553. });
  2554. Object.keys(wx).forEach(function (name) {
  2555. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2556. uni[name] = promisify(name, wrapper(name, wx[name]));
  2557. }
  2558. });
  2559. }
  2560. wx.createApp = createApp;
  2561. wx.createPage = createPage;
  2562. wx.createComponent = createComponent;
  2563. wx.createSubpackageApp = createSubpackageApp;
  2564. wx.createPlugin = createPlugin;
  2565. var uni$1 = uni;
  2566. var _default = uni$1;
  2567. exports.default = _default;
  2568. /* 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)))
  2569. /***/ }),
  2570. /***/ 20:
  2571. /*!****************************************************************!*\
  2572. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2573. \****************************************************************/
  2574. /*! no static exports found */
  2575. /***/ (function(module, exports) {
  2576. function _iterableToArray(iter) {
  2577. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2578. }
  2579. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2580. /***/ }),
  2581. /***/ 21:
  2582. /*!******************************************************************!*\
  2583. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2584. \******************************************************************/
  2585. /*! no static exports found */
  2586. /***/ (function(module, exports) {
  2587. function _nonIterableSpread() {
  2588. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2589. }
  2590. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2591. /***/ }),
  2592. /***/ 22:
  2593. /*!*************************************************************!*\
  2594. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2595. \*************************************************************/
  2596. /*! no static exports found */
  2597. /***/ (function(module, exports, __webpack_require__) {
  2598. "use strict";
  2599. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2600. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2601. Object.defineProperty(exports, "__esModule", {
  2602. value: true
  2603. });
  2604. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2605. exports.compileI18nJsonStr = compileI18nJsonStr;
  2606. exports.hasI18nJson = hasI18nJson;
  2607. exports.initVueI18n = initVueI18n;
  2608. exports.isI18nStr = isI18nStr;
  2609. exports.isString = void 0;
  2610. exports.normalizeLocale = normalizeLocale;
  2611. exports.parseI18nJson = parseI18nJson;
  2612. exports.resolveLocale = resolveLocale;
  2613. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2614. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2615. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2616. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2617. var isObject = function isObject(val) {
  2618. return val !== null && (0, _typeof2.default)(val) === 'object';
  2619. };
  2620. var defaultDelimiters = ['{', '}'];
  2621. var BaseFormatter = /*#__PURE__*/function () {
  2622. function BaseFormatter() {
  2623. (0, _classCallCheck2.default)(this, BaseFormatter);
  2624. this._caches = Object.create(null);
  2625. }
  2626. (0, _createClass2.default)(BaseFormatter, [{
  2627. key: "interpolate",
  2628. value: function interpolate(message, values) {
  2629. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2630. if (!values) {
  2631. return [message];
  2632. }
  2633. var tokens = this._caches[message];
  2634. if (!tokens) {
  2635. tokens = parse(message, delimiters);
  2636. this._caches[message] = tokens;
  2637. }
  2638. return compile(tokens, values);
  2639. }
  2640. }]);
  2641. return BaseFormatter;
  2642. }();
  2643. exports.Formatter = BaseFormatter;
  2644. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2645. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2646. function parse(format, _ref) {
  2647. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2648. startDelimiter = _ref2[0],
  2649. endDelimiter = _ref2[1];
  2650. var tokens = [];
  2651. var position = 0;
  2652. var text = '';
  2653. while (position < format.length) {
  2654. var char = format[position++];
  2655. if (char === startDelimiter) {
  2656. if (text) {
  2657. tokens.push({
  2658. type: 'text',
  2659. value: text
  2660. });
  2661. }
  2662. text = '';
  2663. var sub = '';
  2664. char = format[position++];
  2665. while (char !== undefined && char !== endDelimiter) {
  2666. sub += char;
  2667. char = format[position++];
  2668. }
  2669. var isClosed = char === endDelimiter;
  2670. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2671. tokens.push({
  2672. value: sub,
  2673. type: type
  2674. });
  2675. }
  2676. // else if (char === '%') {
  2677. // // when found rails i18n syntax, skip text capture
  2678. // if (format[position] !== '{') {
  2679. // text += char
  2680. // }
  2681. // }
  2682. else {
  2683. text += char;
  2684. }
  2685. }
  2686. text && tokens.push({
  2687. type: 'text',
  2688. value: text
  2689. });
  2690. return tokens;
  2691. }
  2692. function compile(tokens, values) {
  2693. var compiled = [];
  2694. var index = 0;
  2695. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2696. if (mode === 'unknown') {
  2697. return compiled;
  2698. }
  2699. while (index < tokens.length) {
  2700. var token = tokens[index];
  2701. switch (token.type) {
  2702. case 'text':
  2703. compiled.push(token.value);
  2704. break;
  2705. case 'list':
  2706. compiled.push(values[parseInt(token.value, 10)]);
  2707. break;
  2708. case 'named':
  2709. if (mode === 'named') {
  2710. compiled.push(values[token.value]);
  2711. } else {
  2712. if (true) {
  2713. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2714. }
  2715. }
  2716. break;
  2717. case 'unknown':
  2718. if (true) {
  2719. console.warn("Detect 'unknown' type of token!");
  2720. }
  2721. break;
  2722. }
  2723. index++;
  2724. }
  2725. return compiled;
  2726. }
  2727. var LOCALE_ZH_HANS = 'zh-Hans';
  2728. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2729. var LOCALE_ZH_HANT = 'zh-Hant';
  2730. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2731. var LOCALE_EN = 'en';
  2732. exports.LOCALE_EN = LOCALE_EN;
  2733. var LOCALE_FR = 'fr';
  2734. exports.LOCALE_FR = LOCALE_FR;
  2735. var LOCALE_ES = 'es';
  2736. exports.LOCALE_ES = LOCALE_ES;
  2737. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2738. var hasOwn = function hasOwn(val, key) {
  2739. return hasOwnProperty.call(val, key);
  2740. };
  2741. var defaultFormatter = new BaseFormatter();
  2742. function include(str, parts) {
  2743. return !!parts.find(function (part) {
  2744. return str.indexOf(part) !== -1;
  2745. });
  2746. }
  2747. function startsWith(str, parts) {
  2748. return parts.find(function (part) {
  2749. return str.indexOf(part) === 0;
  2750. });
  2751. }
  2752. function normalizeLocale(locale, messages) {
  2753. if (!locale) {
  2754. return;
  2755. }
  2756. locale = locale.trim().replace(/_/g, '-');
  2757. if (messages && messages[locale]) {
  2758. return locale;
  2759. }
  2760. locale = locale.toLowerCase();
  2761. if (locale === 'chinese') {
  2762. // 支付宝
  2763. return LOCALE_ZH_HANS;
  2764. }
  2765. if (locale.indexOf('zh') === 0) {
  2766. if (locale.indexOf('-hans') > -1) {
  2767. return LOCALE_ZH_HANS;
  2768. }
  2769. if (locale.indexOf('-hant') > -1) {
  2770. return LOCALE_ZH_HANT;
  2771. }
  2772. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2773. return LOCALE_ZH_HANT;
  2774. }
  2775. return LOCALE_ZH_HANS;
  2776. }
  2777. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2778. if (messages && Object.keys(messages).length > 0) {
  2779. locales = Object.keys(messages);
  2780. }
  2781. var lang = startsWith(locale, locales);
  2782. if (lang) {
  2783. return lang;
  2784. }
  2785. }
  2786. var I18n = /*#__PURE__*/function () {
  2787. function I18n(_ref3) {
  2788. var locale = _ref3.locale,
  2789. fallbackLocale = _ref3.fallbackLocale,
  2790. messages = _ref3.messages,
  2791. watcher = _ref3.watcher,
  2792. formater = _ref3.formater;
  2793. (0, _classCallCheck2.default)(this, I18n);
  2794. this.locale = LOCALE_EN;
  2795. this.fallbackLocale = LOCALE_EN;
  2796. this.message = {};
  2797. this.messages = {};
  2798. this.watchers = [];
  2799. if (fallbackLocale) {
  2800. this.fallbackLocale = fallbackLocale;
  2801. }
  2802. this.formater = formater || defaultFormatter;
  2803. this.messages = messages || {};
  2804. this.setLocale(locale || LOCALE_EN);
  2805. if (watcher) {
  2806. this.watchLocale(watcher);
  2807. }
  2808. }
  2809. (0, _createClass2.default)(I18n, [{
  2810. key: "setLocale",
  2811. value: function setLocale(locale) {
  2812. var _this = this;
  2813. var oldLocale = this.locale;
  2814. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2815. if (!this.messages[this.locale]) {
  2816. // 可能初始化时不存在
  2817. this.messages[this.locale] = {};
  2818. }
  2819. this.message = this.messages[this.locale];
  2820. // 仅发生变化时,通知
  2821. if (oldLocale !== this.locale) {
  2822. this.watchers.forEach(function (watcher) {
  2823. watcher(_this.locale, oldLocale);
  2824. });
  2825. }
  2826. }
  2827. }, {
  2828. key: "getLocale",
  2829. value: function getLocale() {
  2830. return this.locale;
  2831. }
  2832. }, {
  2833. key: "watchLocale",
  2834. value: function watchLocale(fn) {
  2835. var _this2 = this;
  2836. var index = this.watchers.push(fn) - 1;
  2837. return function () {
  2838. _this2.watchers.splice(index, 1);
  2839. };
  2840. }
  2841. }, {
  2842. key: "add",
  2843. value: function add(locale, message) {
  2844. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2845. var curMessages = this.messages[locale];
  2846. if (curMessages) {
  2847. if (override) {
  2848. Object.assign(curMessages, message);
  2849. } else {
  2850. Object.keys(message).forEach(function (key) {
  2851. if (!hasOwn(curMessages, key)) {
  2852. curMessages[key] = message[key];
  2853. }
  2854. });
  2855. }
  2856. } else {
  2857. this.messages[locale] = message;
  2858. }
  2859. }
  2860. }, {
  2861. key: "f",
  2862. value: function f(message, values, delimiters) {
  2863. return this.formater.interpolate(message, values, delimiters).join('');
  2864. }
  2865. }, {
  2866. key: "t",
  2867. value: function t(key, locale, values) {
  2868. var message = this.message;
  2869. if (typeof locale === 'string') {
  2870. locale = normalizeLocale(locale, this.messages);
  2871. locale && (message = this.messages[locale]);
  2872. } else {
  2873. values = locale;
  2874. }
  2875. if (!hasOwn(message, key)) {
  2876. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  2877. return key;
  2878. }
  2879. return this.formater.interpolate(message[key], values).join('');
  2880. }
  2881. }]);
  2882. return I18n;
  2883. }();
  2884. exports.I18n = I18n;
  2885. function watchAppLocale(appVm, i18n) {
  2886. // 需要保证 watch 的触发在组件渲染之前
  2887. if (appVm.$watchLocale) {
  2888. // vue2
  2889. appVm.$watchLocale(function (newLocale) {
  2890. i18n.setLocale(newLocale);
  2891. });
  2892. } else {
  2893. appVm.$watch(function () {
  2894. return appVm.$locale;
  2895. }, function (newLocale) {
  2896. i18n.setLocale(newLocale);
  2897. });
  2898. }
  2899. }
  2900. function getDefaultLocale() {
  2901. if (typeof uni !== 'undefined' && uni.getLocale) {
  2902. return uni.getLocale();
  2903. }
  2904. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  2905. if (typeof global !== 'undefined' && global.getLocale) {
  2906. return global.getLocale();
  2907. }
  2908. return LOCALE_EN;
  2909. }
  2910. function initVueI18n(locale) {
  2911. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2912. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  2913. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  2914. // 兼容旧版本入参
  2915. if (typeof locale !== 'string') {
  2916. var _ref4 = [messages, locale];
  2917. locale = _ref4[0];
  2918. messages = _ref4[1];
  2919. }
  2920. if (typeof locale !== 'string') {
  2921. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  2922. locale = getDefaultLocale();
  2923. }
  2924. if (typeof fallbackLocale !== 'string') {
  2925. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  2926. }
  2927. var i18n = new I18n({
  2928. locale: locale,
  2929. fallbackLocale: fallbackLocale,
  2930. messages: messages,
  2931. watcher: watcher
  2932. });
  2933. var _t = function t(key, values) {
  2934. if (typeof getApp !== 'function') {
  2935. // app view
  2936. /* eslint-disable no-func-assign */
  2937. _t = function t(key, values) {
  2938. return i18n.t(key, values);
  2939. };
  2940. } else {
  2941. var isWatchedAppLocale = false;
  2942. _t = function t(key, values) {
  2943. var appVm = getApp().$vm;
  2944. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  2945. // options: {
  2946. // type: Array,
  2947. // default () {
  2948. // return [{
  2949. // icon: 'shop',
  2950. // text: t("uni-goods-nav.options.shop"),
  2951. // }, {
  2952. // icon: 'cart',
  2953. // text: t("uni-goods-nav.options.cart")
  2954. // }]
  2955. // }
  2956. // },
  2957. if (appVm) {
  2958. // 触发响应式
  2959. appVm.$locale;
  2960. if (!isWatchedAppLocale) {
  2961. isWatchedAppLocale = true;
  2962. watchAppLocale(appVm, i18n);
  2963. }
  2964. }
  2965. return i18n.t(key, values);
  2966. };
  2967. }
  2968. return _t(key, values);
  2969. };
  2970. return {
  2971. i18n: i18n,
  2972. f: function f(message, values, delimiters) {
  2973. return i18n.f(message, values, delimiters);
  2974. },
  2975. t: function t(key, values) {
  2976. return _t(key, values);
  2977. },
  2978. add: function add(locale, message) {
  2979. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2980. return i18n.add(locale, message, override);
  2981. },
  2982. watch: function watch(fn) {
  2983. return i18n.watchLocale(fn);
  2984. },
  2985. getLocale: function getLocale() {
  2986. return i18n.getLocale();
  2987. },
  2988. setLocale: function setLocale(newLocale) {
  2989. return i18n.setLocale(newLocale);
  2990. }
  2991. };
  2992. }
  2993. var isString = function isString(val) {
  2994. return typeof val === 'string';
  2995. };
  2996. exports.isString = isString;
  2997. var formater;
  2998. function hasI18nJson(jsonObj, delimiters) {
  2999. if (!formater) {
  3000. formater = new BaseFormatter();
  3001. }
  3002. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3003. var value = jsonObj[key];
  3004. if (isString(value)) {
  3005. if (isI18nStr(value, delimiters)) {
  3006. return true;
  3007. }
  3008. } else {
  3009. return hasI18nJson(value, delimiters);
  3010. }
  3011. });
  3012. }
  3013. function parseI18nJson(jsonObj, values, delimiters) {
  3014. if (!formater) {
  3015. formater = new BaseFormatter();
  3016. }
  3017. walkJsonObj(jsonObj, function (jsonObj, key) {
  3018. var value = jsonObj[key];
  3019. if (isString(value)) {
  3020. if (isI18nStr(value, delimiters)) {
  3021. jsonObj[key] = compileStr(value, values, delimiters);
  3022. }
  3023. } else {
  3024. parseI18nJson(value, values, delimiters);
  3025. }
  3026. });
  3027. return jsonObj;
  3028. }
  3029. function compileI18nJsonStr(jsonStr, _ref5) {
  3030. var locale = _ref5.locale,
  3031. locales = _ref5.locales,
  3032. delimiters = _ref5.delimiters;
  3033. if (!isI18nStr(jsonStr, delimiters)) {
  3034. return jsonStr;
  3035. }
  3036. if (!formater) {
  3037. formater = new BaseFormatter();
  3038. }
  3039. var localeValues = [];
  3040. Object.keys(locales).forEach(function (name) {
  3041. if (name !== locale) {
  3042. localeValues.push({
  3043. locale: name,
  3044. values: locales[name]
  3045. });
  3046. }
  3047. });
  3048. localeValues.unshift({
  3049. locale: locale,
  3050. values: locales[locale]
  3051. });
  3052. try {
  3053. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3054. } catch (e) {}
  3055. return jsonStr;
  3056. }
  3057. function isI18nStr(value, delimiters) {
  3058. return value.indexOf(delimiters[0]) > -1;
  3059. }
  3060. function compileStr(value, values, delimiters) {
  3061. return formater.interpolate(value, values, delimiters).join('');
  3062. }
  3063. function compileValue(jsonObj, key, localeValues, delimiters) {
  3064. var value = jsonObj[key];
  3065. if (isString(value)) {
  3066. // 存在国际化
  3067. if (isI18nStr(value, delimiters)) {
  3068. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3069. if (localeValues.length > 1) {
  3070. // 格式化国际化语言
  3071. var valueLocales = jsonObj[key + 'Locales'] = {};
  3072. localeValues.forEach(function (localValue) {
  3073. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3074. });
  3075. }
  3076. }
  3077. } else {
  3078. compileJsonObj(value, localeValues, delimiters);
  3079. }
  3080. }
  3081. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3082. walkJsonObj(jsonObj, function (jsonObj, key) {
  3083. compileValue(jsonObj, key, localeValues, delimiters);
  3084. });
  3085. return jsonObj;
  3086. }
  3087. function walkJsonObj(jsonObj, walk) {
  3088. if (Array.isArray(jsonObj)) {
  3089. for (var i = 0; i < jsonObj.length; i++) {
  3090. if (walk(jsonObj, i)) {
  3091. return true;
  3092. }
  3093. }
  3094. } else if (isObject(jsonObj)) {
  3095. for (var key in jsonObj) {
  3096. if (walk(jsonObj, key)) {
  3097. return true;
  3098. }
  3099. }
  3100. }
  3101. return false;
  3102. }
  3103. function resolveLocale(locales) {
  3104. return function (locale) {
  3105. if (!locale) {
  3106. return locale;
  3107. }
  3108. locale = normalizeLocale(locale) || locale;
  3109. return resolveLocaleChain(locale).find(function (locale) {
  3110. return locales.indexOf(locale) > -1;
  3111. });
  3112. };
  3113. }
  3114. function resolveLocaleChain(locale) {
  3115. var chain = [];
  3116. var tokens = locale.split('-');
  3117. while (tokens.length) {
  3118. chain.push(tokens.join('-'));
  3119. tokens.pop();
  3120. }
  3121. return chain;
  3122. }
  3123. /* 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)))
  3124. /***/ }),
  3125. /***/ 23:
  3126. /*!***************************************************************!*\
  3127. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3128. \***************************************************************/
  3129. /*! no static exports found */
  3130. /***/ (function(module, exports) {
  3131. function _classCallCheck(instance, Constructor) {
  3132. if (!(instance instanceof Constructor)) {
  3133. throw new TypeError("Cannot call a class as a function");
  3134. }
  3135. }
  3136. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3137. /***/ }),
  3138. /***/ 231:
  3139. /*!************************************************************!*\
  3140. !*** E:/盈通/sulibao-mini/libs/mixin/template_page_mixin.js ***!
  3141. \************************************************************/
  3142. /*! no static exports found */
  3143. /***/ (function(module, exports, __webpack_require__) {
  3144. /* WEBPACK VAR INJECTION */(function(uni) {var _regeneratorRuntime = __webpack_require__(/*! @babel/runtime/regenerator */ 75);
  3145. var _asyncToGenerator = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 77);
  3146. /**
  3147. * 演示页面mixin
  3148. */
  3149. module.exports = {
  3150. data: function data() {
  3151. return {};
  3152. },
  3153. onLoad: function onLoad() {
  3154. // 更新顶部导航栏信息
  3155. this.updateCustomBarInfo();
  3156. },
  3157. methods: {
  3158. // 点击左上角返回按钮时触发事件
  3159. goBack: function goBack() {
  3160. // 通过判断当前页面的页面栈信息,是否有上一页进行返回,如果没有则跳转到首页
  3161. var pages = getCurrentPages();
  3162. if (pages && pages.length > 0) {
  3163. var firstPage = pages[0];
  3164. if (pages.length == 1 && (!firstPage.route || firstPage.route != 'pages/index')) {
  3165. uni.reLaunch({
  3166. url: '/pages/index'
  3167. });
  3168. } else {
  3169. uni.navigateBack({
  3170. delta: 1
  3171. });
  3172. }
  3173. } else {
  3174. uni.reLaunch({
  3175. url: '/pages/index'
  3176. });
  3177. }
  3178. },
  3179. // 更新顶部导航栏信息
  3180. updateCustomBarInfo: function updateCustomBarInfo() {
  3181. var _this = this;
  3182. return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
  3183. var customBarHeight, statusBarHeight, navBarInfo;
  3184. return _regeneratorRuntime.wrap(function _callee$(_context) {
  3185. while (1) {
  3186. switch (_context.prev = _context.next) {
  3187. case 0:
  3188. // 获取vuex中的自定义顶栏的高度
  3189. customBarHeight = _this.vuex_custom_bar_height;
  3190. statusBarHeight = _this.vuex_status_bar_height; // 如果获取失败则重新获取
  3191. if (customBarHeight) {
  3192. _context.next = 15;
  3193. break;
  3194. }
  3195. _context.prev = 3;
  3196. _context.next = 6;
  3197. return _this.$t.updateCustomBar();
  3198. case 6:
  3199. navBarInfo = _context.sent;
  3200. customBarHeight = navBarInfo.customBarHeight;
  3201. statusBarHeight = navBarInfo.statusBarHeight;
  3202. _context.next = 15;
  3203. break;
  3204. case 11:
  3205. _context.prev = 11;
  3206. _context.t0 = _context["catch"](3);
  3207. setTimeout(function () {
  3208. _this.updateCustomBarInfo();
  3209. }, 10);
  3210. return _context.abrupt("return");
  3211. case 15:
  3212. // 更新vuex中的导航栏信息
  3213. _this.$t.vuex('vuex_status_bar_height', statusBarHeight);
  3214. _this.$t.vuex('vuex_custom_bar_height', customBarHeight);
  3215. case 17:
  3216. case "end":
  3217. return _context.stop();
  3218. }
  3219. }
  3220. }, _callee, null, [[3, 11]]);
  3221. }))();
  3222. }
  3223. }
  3224. };
  3225. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  3226. /***/ }),
  3227. /***/ 24:
  3228. /*!************************************************************!*\
  3229. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3230. \************************************************************/
  3231. /*! no static exports found */
  3232. /***/ (function(module, exports, __webpack_require__) {
  3233. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3234. function _defineProperties(target, props) {
  3235. for (var i = 0; i < props.length; i++) {
  3236. var descriptor = props[i];
  3237. descriptor.enumerable = descriptor.enumerable || false;
  3238. descriptor.configurable = true;
  3239. if ("value" in descriptor) descriptor.writable = true;
  3240. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3241. }
  3242. }
  3243. function _createClass(Constructor, protoProps, staticProps) {
  3244. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3245. if (staticProps) _defineProperties(Constructor, staticProps);
  3246. Object.defineProperty(Constructor, "prototype", {
  3247. writable: false
  3248. });
  3249. return Constructor;
  3250. }
  3251. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3252. /***/ }),
  3253. /***/ 25:
  3254. /*!******************************************************************************************!*\
  3255. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3256. \******************************************************************************************/
  3257. /*! exports provided: default */
  3258. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3259. "use strict";
  3260. __webpack_require__.r(__webpack_exports__);
  3261. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3262. * Vue.js v2.6.11
  3263. * (c) 2014-2023 Evan You
  3264. * Released under the MIT License.
  3265. */
  3266. /* */
  3267. var emptyObject = Object.freeze({});
  3268. // These helpers produce better VM code in JS engines due to their
  3269. // explicitness and function inlining.
  3270. function isUndef (v) {
  3271. return v === undefined || v === null
  3272. }
  3273. function isDef (v) {
  3274. return v !== undefined && v !== null
  3275. }
  3276. function isTrue (v) {
  3277. return v === true
  3278. }
  3279. function isFalse (v) {
  3280. return v === false
  3281. }
  3282. /**
  3283. * Check if value is primitive.
  3284. */
  3285. function isPrimitive (value) {
  3286. return (
  3287. typeof value === 'string' ||
  3288. typeof value === 'number' ||
  3289. // $flow-disable-line
  3290. typeof value === 'symbol' ||
  3291. typeof value === 'boolean'
  3292. )
  3293. }
  3294. /**
  3295. * Quick object check - this is primarily used to tell
  3296. * Objects from primitive values when we know the value
  3297. * is a JSON-compliant type.
  3298. */
  3299. function isObject (obj) {
  3300. return obj !== null && typeof obj === 'object'
  3301. }
  3302. /**
  3303. * Get the raw type string of a value, e.g., [object Object].
  3304. */
  3305. var _toString = Object.prototype.toString;
  3306. function toRawType (value) {
  3307. return _toString.call(value).slice(8, -1)
  3308. }
  3309. /**
  3310. * Strict object type check. Only returns true
  3311. * for plain JavaScript objects.
  3312. */
  3313. function isPlainObject (obj) {
  3314. return _toString.call(obj) === '[object Object]'
  3315. }
  3316. function isRegExp (v) {
  3317. return _toString.call(v) === '[object RegExp]'
  3318. }
  3319. /**
  3320. * Check if val is a valid array index.
  3321. */
  3322. function isValidArrayIndex (val) {
  3323. var n = parseFloat(String(val));
  3324. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3325. }
  3326. function isPromise (val) {
  3327. return (
  3328. isDef(val) &&
  3329. typeof val.then === 'function' &&
  3330. typeof val.catch === 'function'
  3331. )
  3332. }
  3333. /**
  3334. * Convert a value to a string that is actually rendered.
  3335. */
  3336. function toString (val) {
  3337. return val == null
  3338. ? ''
  3339. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3340. ? JSON.stringify(val, null, 2)
  3341. : String(val)
  3342. }
  3343. /**
  3344. * Convert an input value to a number for persistence.
  3345. * If the conversion fails, return original string.
  3346. */
  3347. function toNumber (val) {
  3348. var n = parseFloat(val);
  3349. return isNaN(n) ? val : n
  3350. }
  3351. /**
  3352. * Make a map and return a function for checking if a key
  3353. * is in that map.
  3354. */
  3355. function makeMap (
  3356. str,
  3357. expectsLowerCase
  3358. ) {
  3359. var map = Object.create(null);
  3360. var list = str.split(',');
  3361. for (var i = 0; i < list.length; i++) {
  3362. map[list[i]] = true;
  3363. }
  3364. return expectsLowerCase
  3365. ? function (val) { return map[val.toLowerCase()]; }
  3366. : function (val) { return map[val]; }
  3367. }
  3368. /**
  3369. * Check if a tag is a built-in tag.
  3370. */
  3371. var isBuiltInTag = makeMap('slot,component', true);
  3372. /**
  3373. * Check if an attribute is a reserved attribute.
  3374. */
  3375. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3376. /**
  3377. * Remove an item from an array.
  3378. */
  3379. function remove (arr, item) {
  3380. if (arr.length) {
  3381. var index = arr.indexOf(item);
  3382. if (index > -1) {
  3383. return arr.splice(index, 1)
  3384. }
  3385. }
  3386. }
  3387. /**
  3388. * Check whether an object has the property.
  3389. */
  3390. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3391. function hasOwn (obj, key) {
  3392. return hasOwnProperty.call(obj, key)
  3393. }
  3394. /**
  3395. * Create a cached version of a pure function.
  3396. */
  3397. function cached (fn) {
  3398. var cache = Object.create(null);
  3399. return (function cachedFn (str) {
  3400. var hit = cache[str];
  3401. return hit || (cache[str] = fn(str))
  3402. })
  3403. }
  3404. /**
  3405. * Camelize a hyphen-delimited string.
  3406. */
  3407. var camelizeRE = /-(\w)/g;
  3408. var camelize = cached(function (str) {
  3409. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3410. });
  3411. /**
  3412. * Capitalize a string.
  3413. */
  3414. var capitalize = cached(function (str) {
  3415. return str.charAt(0).toUpperCase() + str.slice(1)
  3416. });
  3417. /**
  3418. * Hyphenate a camelCase string.
  3419. */
  3420. var hyphenateRE = /\B([A-Z])/g;
  3421. var hyphenate = cached(function (str) {
  3422. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3423. });
  3424. /**
  3425. * Simple bind polyfill for environments that do not support it,
  3426. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3427. * since native bind is now performant enough in most browsers.
  3428. * But removing it would mean breaking code that was able to run in
  3429. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3430. */
  3431. /* istanbul ignore next */
  3432. function polyfillBind (fn, ctx) {
  3433. function boundFn (a) {
  3434. var l = arguments.length;
  3435. return l
  3436. ? l > 1
  3437. ? fn.apply(ctx, arguments)
  3438. : fn.call(ctx, a)
  3439. : fn.call(ctx)
  3440. }
  3441. boundFn._length = fn.length;
  3442. return boundFn
  3443. }
  3444. function nativeBind (fn, ctx) {
  3445. return fn.bind(ctx)
  3446. }
  3447. var bind = Function.prototype.bind
  3448. ? nativeBind
  3449. : polyfillBind;
  3450. /**
  3451. * Convert an Array-like object to a real Array.
  3452. */
  3453. function toArray (list, start) {
  3454. start = start || 0;
  3455. var i = list.length - start;
  3456. var ret = new Array(i);
  3457. while (i--) {
  3458. ret[i] = list[i + start];
  3459. }
  3460. return ret
  3461. }
  3462. /**
  3463. * Mix properties into target object.
  3464. */
  3465. function extend (to, _from) {
  3466. for (var key in _from) {
  3467. to[key] = _from[key];
  3468. }
  3469. return to
  3470. }
  3471. /**
  3472. * Merge an Array of Objects into a single Object.
  3473. */
  3474. function toObject (arr) {
  3475. var res = {};
  3476. for (var i = 0; i < arr.length; i++) {
  3477. if (arr[i]) {
  3478. extend(res, arr[i]);
  3479. }
  3480. }
  3481. return res
  3482. }
  3483. /* eslint-disable no-unused-vars */
  3484. /**
  3485. * Perform no operation.
  3486. * Stubbing args to make Flow happy without leaving useless transpiled code
  3487. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3488. */
  3489. function noop (a, b, c) {}
  3490. /**
  3491. * Always return false.
  3492. */
  3493. var no = function (a, b, c) { return false; };
  3494. /* eslint-enable no-unused-vars */
  3495. /**
  3496. * Return the same value.
  3497. */
  3498. var identity = function (_) { return _; };
  3499. /**
  3500. * Check if two values are loosely equal - that is,
  3501. * if they are plain objects, do they have the same shape?
  3502. */
  3503. function looseEqual (a, b) {
  3504. if (a === b) { return true }
  3505. var isObjectA = isObject(a);
  3506. var isObjectB = isObject(b);
  3507. if (isObjectA && isObjectB) {
  3508. try {
  3509. var isArrayA = Array.isArray(a);
  3510. var isArrayB = Array.isArray(b);
  3511. if (isArrayA && isArrayB) {
  3512. return a.length === b.length && a.every(function (e, i) {
  3513. return looseEqual(e, b[i])
  3514. })
  3515. } else if (a instanceof Date && b instanceof Date) {
  3516. return a.getTime() === b.getTime()
  3517. } else if (!isArrayA && !isArrayB) {
  3518. var keysA = Object.keys(a);
  3519. var keysB = Object.keys(b);
  3520. return keysA.length === keysB.length && keysA.every(function (key) {
  3521. return looseEqual(a[key], b[key])
  3522. })
  3523. } else {
  3524. /* istanbul ignore next */
  3525. return false
  3526. }
  3527. } catch (e) {
  3528. /* istanbul ignore next */
  3529. return false
  3530. }
  3531. } else if (!isObjectA && !isObjectB) {
  3532. return String(a) === String(b)
  3533. } else {
  3534. return false
  3535. }
  3536. }
  3537. /**
  3538. * Return the first index at which a loosely equal value can be
  3539. * found in the array (if value is a plain object, the array must
  3540. * contain an object of the same shape), or -1 if it is not present.
  3541. */
  3542. function looseIndexOf (arr, val) {
  3543. for (var i = 0; i < arr.length; i++) {
  3544. if (looseEqual(arr[i], val)) { return i }
  3545. }
  3546. return -1
  3547. }
  3548. /**
  3549. * Ensure a function is called only once.
  3550. */
  3551. function once (fn) {
  3552. var called = false;
  3553. return function () {
  3554. if (!called) {
  3555. called = true;
  3556. fn.apply(this, arguments);
  3557. }
  3558. }
  3559. }
  3560. var ASSET_TYPES = [
  3561. 'component',
  3562. 'directive',
  3563. 'filter'
  3564. ];
  3565. var LIFECYCLE_HOOKS = [
  3566. 'beforeCreate',
  3567. 'created',
  3568. 'beforeMount',
  3569. 'mounted',
  3570. 'beforeUpdate',
  3571. 'updated',
  3572. 'beforeDestroy',
  3573. 'destroyed',
  3574. 'activated',
  3575. 'deactivated',
  3576. 'errorCaptured',
  3577. 'serverPrefetch'
  3578. ];
  3579. /* */
  3580. var config = ({
  3581. /**
  3582. * Option merge strategies (used in core/util/options)
  3583. */
  3584. // $flow-disable-line
  3585. optionMergeStrategies: Object.create(null),
  3586. /**
  3587. * Whether to suppress warnings.
  3588. */
  3589. silent: false,
  3590. /**
  3591. * Show production mode tip message on boot?
  3592. */
  3593. productionTip: "development" !== 'production',
  3594. /**
  3595. * Whether to enable devtools
  3596. */
  3597. devtools: "development" !== 'production',
  3598. /**
  3599. * Whether to record perf
  3600. */
  3601. performance: false,
  3602. /**
  3603. * Error handler for watcher errors
  3604. */
  3605. errorHandler: null,
  3606. /**
  3607. * Warn handler for watcher warns
  3608. */
  3609. warnHandler: null,
  3610. /**
  3611. * Ignore certain custom elements
  3612. */
  3613. ignoredElements: [],
  3614. /**
  3615. * Custom user key aliases for v-on
  3616. */
  3617. // $flow-disable-line
  3618. keyCodes: Object.create(null),
  3619. /**
  3620. * Check if a tag is reserved so that it cannot be registered as a
  3621. * component. This is platform-dependent and may be overwritten.
  3622. */
  3623. isReservedTag: no,
  3624. /**
  3625. * Check if an attribute is reserved so that it cannot be used as a component
  3626. * prop. This is platform-dependent and may be overwritten.
  3627. */
  3628. isReservedAttr: no,
  3629. /**
  3630. * Check if a tag is an unknown element.
  3631. * Platform-dependent.
  3632. */
  3633. isUnknownElement: no,
  3634. /**
  3635. * Get the namespace of an element
  3636. */
  3637. getTagNamespace: noop,
  3638. /**
  3639. * Parse the real tag name for the specific platform.
  3640. */
  3641. parsePlatformTagName: identity,
  3642. /**
  3643. * Check if an attribute must be bound using property, e.g. value
  3644. * Platform-dependent.
  3645. */
  3646. mustUseProp: no,
  3647. /**
  3648. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3649. * This will significantly reduce performance if set to false.
  3650. */
  3651. async: true,
  3652. /**
  3653. * Exposed for legacy reasons
  3654. */
  3655. _lifecycleHooks: LIFECYCLE_HOOKS
  3656. });
  3657. /* */
  3658. /**
  3659. * unicode letters used for parsing html tags, component names and property paths.
  3660. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3661. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3662. */
  3663. 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/;
  3664. /**
  3665. * Check if a string starts with $ or _
  3666. */
  3667. function isReserved (str) {
  3668. var c = (str + '').charCodeAt(0);
  3669. return c === 0x24 || c === 0x5F
  3670. }
  3671. /**
  3672. * Define a property.
  3673. */
  3674. function def (obj, key, val, enumerable) {
  3675. Object.defineProperty(obj, key, {
  3676. value: val,
  3677. enumerable: !!enumerable,
  3678. writable: true,
  3679. configurable: true
  3680. });
  3681. }
  3682. /**
  3683. * Parse simple path.
  3684. */
  3685. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3686. function parsePath (path) {
  3687. if (bailRE.test(path)) {
  3688. return
  3689. }
  3690. var segments = path.split('.');
  3691. return function (obj) {
  3692. for (var i = 0; i < segments.length; i++) {
  3693. if (!obj) { return }
  3694. obj = obj[segments[i]];
  3695. }
  3696. return obj
  3697. }
  3698. }
  3699. /* */
  3700. // can we use __proto__?
  3701. var hasProto = '__proto__' in {};
  3702. // Browser environment sniffing
  3703. var inBrowser = typeof window !== 'undefined';
  3704. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3705. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3706. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  3707. var isIE = UA && /msie|trident/.test(UA);
  3708. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3709. var isEdge = UA && UA.indexOf('edge/') > 0;
  3710. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3711. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3712. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3713. var isPhantomJS = UA && /phantomjs/.test(UA);
  3714. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3715. // Firefox has a "watch" function on Object.prototype...
  3716. var nativeWatch = ({}).watch;
  3717. if (inBrowser) {
  3718. try {
  3719. var opts = {};
  3720. Object.defineProperty(opts, 'passive', ({
  3721. get: function get () {
  3722. }
  3723. })); // https://github.com/facebook/flow/issues/285
  3724. window.addEventListener('test-passive', null, opts);
  3725. } catch (e) {}
  3726. }
  3727. // this needs to be lazy-evaled because vue may be required before
  3728. // vue-server-renderer can set VUE_ENV
  3729. var _isServer;
  3730. var isServerRendering = function () {
  3731. if (_isServer === undefined) {
  3732. /* istanbul ignore if */
  3733. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3734. // detect presence of vue-server-renderer and avoid
  3735. // Webpack shimming the process
  3736. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3737. } else {
  3738. _isServer = false;
  3739. }
  3740. }
  3741. return _isServer
  3742. };
  3743. // detect devtools
  3744. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3745. /* istanbul ignore next */
  3746. function isNative (Ctor) {
  3747. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3748. }
  3749. var hasSymbol =
  3750. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3751. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3752. var _Set;
  3753. /* istanbul ignore if */ // $flow-disable-line
  3754. if (typeof Set !== 'undefined' && isNative(Set)) {
  3755. // use native Set when available.
  3756. _Set = Set;
  3757. } else {
  3758. // a non-standard Set polyfill that only works with primitive keys.
  3759. _Set = /*@__PURE__*/(function () {
  3760. function Set () {
  3761. this.set = Object.create(null);
  3762. }
  3763. Set.prototype.has = function has (key) {
  3764. return this.set[key] === true
  3765. };
  3766. Set.prototype.add = function add (key) {
  3767. this.set[key] = true;
  3768. };
  3769. Set.prototype.clear = function clear () {
  3770. this.set = Object.create(null);
  3771. };
  3772. return Set;
  3773. }());
  3774. }
  3775. /* */
  3776. var warn = noop;
  3777. var tip = noop;
  3778. var generateComponentTrace = (noop); // work around flow check
  3779. var formatComponentName = (noop);
  3780. if (true) {
  3781. var hasConsole = typeof console !== 'undefined';
  3782. var classifyRE = /(?:^|[-_])(\w)/g;
  3783. var classify = function (str) { return str
  3784. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3785. .replace(/[-_]/g, ''); };
  3786. warn = function (msg, vm) {
  3787. var trace = vm ? generateComponentTrace(vm) : '';
  3788. if (config.warnHandler) {
  3789. config.warnHandler.call(null, msg, vm, trace);
  3790. } else if (hasConsole && (!config.silent)) {
  3791. console.error(("[Vue warn]: " + msg + trace));
  3792. }
  3793. };
  3794. tip = function (msg, vm) {
  3795. if (hasConsole && (!config.silent)) {
  3796. console.warn("[Vue tip]: " + msg + (
  3797. vm ? generateComponentTrace(vm) : ''
  3798. ));
  3799. }
  3800. };
  3801. formatComponentName = function (vm, includeFile) {
  3802. if (vm.$root === vm) {
  3803. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3804. return ('') + vm.$options.__file
  3805. }
  3806. return '<Root>'
  3807. }
  3808. var options = typeof vm === 'function' && vm.cid != null
  3809. ? vm.options
  3810. : vm._isVue
  3811. ? vm.$options || vm.constructor.options
  3812. : vm;
  3813. var name = options.name || options._componentTag;
  3814. var file = options.__file;
  3815. if (!name && file) {
  3816. var match = file.match(/([^/\\]+)\.vue$/);
  3817. name = match && match[1];
  3818. }
  3819. return (
  3820. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3821. (file && includeFile !== false ? (" at " + file) : '')
  3822. )
  3823. };
  3824. var repeat = function (str, n) {
  3825. var res = '';
  3826. while (n) {
  3827. if (n % 2 === 1) { res += str; }
  3828. if (n > 1) { str += str; }
  3829. n >>= 1;
  3830. }
  3831. return res
  3832. };
  3833. generateComponentTrace = function (vm) {
  3834. if (vm._isVue && vm.$parent) {
  3835. var tree = [];
  3836. var currentRecursiveSequence = 0;
  3837. while (vm && vm.$options.name !== 'PageBody') {
  3838. if (tree.length > 0) {
  3839. var last = tree[tree.length - 1];
  3840. if (last.constructor === vm.constructor) {
  3841. currentRecursiveSequence++;
  3842. vm = vm.$parent;
  3843. continue
  3844. } else if (currentRecursiveSequence > 0) {
  3845. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3846. currentRecursiveSequence = 0;
  3847. }
  3848. }
  3849. !vm.$options.isReserved && tree.push(vm);
  3850. vm = vm.$parent;
  3851. }
  3852. return '\n\nfound in\n\n' + tree
  3853. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3854. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3855. : formatComponentName(vm))); })
  3856. .join('\n')
  3857. } else {
  3858. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3859. }
  3860. };
  3861. }
  3862. /* */
  3863. var uid = 0;
  3864. /**
  3865. * A dep is an observable that can have multiple
  3866. * directives subscribing to it.
  3867. */
  3868. var Dep = function Dep () {
  3869. this.id = uid++;
  3870. this.subs = [];
  3871. };
  3872. Dep.prototype.addSub = function addSub (sub) {
  3873. this.subs.push(sub);
  3874. };
  3875. Dep.prototype.removeSub = function removeSub (sub) {
  3876. remove(this.subs, sub);
  3877. };
  3878. Dep.prototype.depend = function depend () {
  3879. if (Dep.SharedObject.target) {
  3880. Dep.SharedObject.target.addDep(this);
  3881. }
  3882. };
  3883. Dep.prototype.notify = function notify () {
  3884. // stabilize the subscriber list first
  3885. var subs = this.subs.slice();
  3886. if ( true && !config.async) {
  3887. // subs aren't sorted in scheduler if not running async
  3888. // we need to sort them now to make sure they fire in correct
  3889. // order
  3890. subs.sort(function (a, b) { return a.id - b.id; });
  3891. }
  3892. for (var i = 0, l = subs.length; i < l; i++) {
  3893. subs[i].update();
  3894. }
  3895. };
  3896. // The current target watcher being evaluated.
  3897. // This is globally unique because only one watcher
  3898. // can be evaluated at a time.
  3899. // fixed by xxxxxx (nvue shared vuex)
  3900. /* eslint-disable no-undef */
  3901. Dep.SharedObject = {};
  3902. Dep.SharedObject.target = null;
  3903. Dep.SharedObject.targetStack = [];
  3904. function pushTarget (target) {
  3905. Dep.SharedObject.targetStack.push(target);
  3906. Dep.SharedObject.target = target;
  3907. Dep.target = target;
  3908. }
  3909. function popTarget () {
  3910. Dep.SharedObject.targetStack.pop();
  3911. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3912. Dep.target = Dep.SharedObject.target;
  3913. }
  3914. /* */
  3915. var VNode = function VNode (
  3916. tag,
  3917. data,
  3918. children,
  3919. text,
  3920. elm,
  3921. context,
  3922. componentOptions,
  3923. asyncFactory
  3924. ) {
  3925. this.tag = tag;
  3926. this.data = data;
  3927. this.children = children;
  3928. this.text = text;
  3929. this.elm = elm;
  3930. this.ns = undefined;
  3931. this.context = context;
  3932. this.fnContext = undefined;
  3933. this.fnOptions = undefined;
  3934. this.fnScopeId = undefined;
  3935. this.key = data && data.key;
  3936. this.componentOptions = componentOptions;
  3937. this.componentInstance = undefined;
  3938. this.parent = undefined;
  3939. this.raw = false;
  3940. this.isStatic = false;
  3941. this.isRootInsert = true;
  3942. this.isComment = false;
  3943. this.isCloned = false;
  3944. this.isOnce = false;
  3945. this.asyncFactory = asyncFactory;
  3946. this.asyncMeta = undefined;
  3947. this.isAsyncPlaceholder = false;
  3948. };
  3949. var prototypeAccessors = { child: { configurable: true } };
  3950. // DEPRECATED: alias for componentInstance for backwards compat.
  3951. /* istanbul ignore next */
  3952. prototypeAccessors.child.get = function () {
  3953. return this.componentInstance
  3954. };
  3955. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3956. var createEmptyVNode = function (text) {
  3957. if ( text === void 0 ) text = '';
  3958. var node = new VNode();
  3959. node.text = text;
  3960. node.isComment = true;
  3961. return node
  3962. };
  3963. function createTextVNode (val) {
  3964. return new VNode(undefined, undefined, undefined, String(val))
  3965. }
  3966. // optimized shallow clone
  3967. // used for static nodes and slot nodes because they may be reused across
  3968. // multiple renders, cloning them avoids errors when DOM manipulations rely
  3969. // on their elm reference.
  3970. function cloneVNode (vnode) {
  3971. var cloned = new VNode(
  3972. vnode.tag,
  3973. vnode.data,
  3974. // #7975
  3975. // clone children array to avoid mutating original in case of cloning
  3976. // a child.
  3977. vnode.children && vnode.children.slice(),
  3978. vnode.text,
  3979. vnode.elm,
  3980. vnode.context,
  3981. vnode.componentOptions,
  3982. vnode.asyncFactory
  3983. );
  3984. cloned.ns = vnode.ns;
  3985. cloned.isStatic = vnode.isStatic;
  3986. cloned.key = vnode.key;
  3987. cloned.isComment = vnode.isComment;
  3988. cloned.fnContext = vnode.fnContext;
  3989. cloned.fnOptions = vnode.fnOptions;
  3990. cloned.fnScopeId = vnode.fnScopeId;
  3991. cloned.asyncMeta = vnode.asyncMeta;
  3992. cloned.isCloned = true;
  3993. return cloned
  3994. }
  3995. /*
  3996. * not type checking this file because flow doesn't play well with
  3997. * dynamically accessing methods on Array prototype
  3998. */
  3999. var arrayProto = Array.prototype;
  4000. var arrayMethods = Object.create(arrayProto);
  4001. var methodsToPatch = [
  4002. 'push',
  4003. 'pop',
  4004. 'shift',
  4005. 'unshift',
  4006. 'splice',
  4007. 'sort',
  4008. 'reverse'
  4009. ];
  4010. /**
  4011. * Intercept mutating methods and emit events
  4012. */
  4013. methodsToPatch.forEach(function (method) {
  4014. // cache original method
  4015. var original = arrayProto[method];
  4016. def(arrayMethods, method, function mutator () {
  4017. var args = [], len = arguments.length;
  4018. while ( len-- ) args[ len ] = arguments[ len ];
  4019. var result = original.apply(this, args);
  4020. var ob = this.__ob__;
  4021. var inserted;
  4022. switch (method) {
  4023. case 'push':
  4024. case 'unshift':
  4025. inserted = args;
  4026. break
  4027. case 'splice':
  4028. inserted = args.slice(2);
  4029. break
  4030. }
  4031. if (inserted) { ob.observeArray(inserted); }
  4032. // notify change
  4033. ob.dep.notify();
  4034. return result
  4035. });
  4036. });
  4037. /* */
  4038. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4039. /**
  4040. * In some cases we may want to disable observation inside a component's
  4041. * update computation.
  4042. */
  4043. var shouldObserve = true;
  4044. function toggleObserving (value) {
  4045. shouldObserve = value;
  4046. }
  4047. /**
  4048. * Observer class that is attached to each observed
  4049. * object. Once attached, the observer converts the target
  4050. * object's property keys into getter/setters that
  4051. * collect dependencies and dispatch updates.
  4052. */
  4053. var Observer = function Observer (value) {
  4054. this.value = value;
  4055. this.dep = new Dep();
  4056. this.vmCount = 0;
  4057. def(value, '__ob__', this);
  4058. if (Array.isArray(value)) {
  4059. if (hasProto) {
  4060. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4061. if(value.push !== value.__proto__.push){
  4062. copyAugment(value, arrayMethods, arrayKeys);
  4063. } else {
  4064. protoAugment(value, arrayMethods);
  4065. }
  4066. }
  4067. } else {
  4068. copyAugment(value, arrayMethods, arrayKeys);
  4069. }
  4070. this.observeArray(value);
  4071. } else {
  4072. this.walk(value);
  4073. }
  4074. };
  4075. /**
  4076. * Walk through all properties and convert them into
  4077. * getter/setters. This method should only be called when
  4078. * value type is Object.
  4079. */
  4080. Observer.prototype.walk = function walk (obj) {
  4081. var keys = Object.keys(obj);
  4082. for (var i = 0; i < keys.length; i++) {
  4083. defineReactive$$1(obj, keys[i]);
  4084. }
  4085. };
  4086. /**
  4087. * Observe a list of Array items.
  4088. */
  4089. Observer.prototype.observeArray = function observeArray (items) {
  4090. for (var i = 0, l = items.length; i < l; i++) {
  4091. observe(items[i]);
  4092. }
  4093. };
  4094. // helpers
  4095. /**
  4096. * Augment a target Object or Array by intercepting
  4097. * the prototype chain using __proto__
  4098. */
  4099. function protoAugment (target, src) {
  4100. /* eslint-disable no-proto */
  4101. target.__proto__ = src;
  4102. /* eslint-enable no-proto */
  4103. }
  4104. /**
  4105. * Augment a target Object or Array by defining
  4106. * hidden properties.
  4107. */
  4108. /* istanbul ignore next */
  4109. function copyAugment (target, src, keys) {
  4110. for (var i = 0, l = keys.length; i < l; i++) {
  4111. var key = keys[i];
  4112. def(target, key, src[key]);
  4113. }
  4114. }
  4115. /**
  4116. * Attempt to create an observer instance for a value,
  4117. * returns the new observer if successfully observed,
  4118. * or the existing observer if the value already has one.
  4119. */
  4120. function observe (value, asRootData) {
  4121. if (!isObject(value) || value instanceof VNode) {
  4122. return
  4123. }
  4124. var ob;
  4125. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4126. ob = value.__ob__;
  4127. } else if (
  4128. shouldObserve &&
  4129. !isServerRendering() &&
  4130. (Array.isArray(value) || isPlainObject(value)) &&
  4131. Object.isExtensible(value) &&
  4132. !value._isVue &&
  4133. !value.__v_isMPComponent
  4134. ) {
  4135. ob = new Observer(value);
  4136. }
  4137. if (asRootData && ob) {
  4138. ob.vmCount++;
  4139. }
  4140. return ob
  4141. }
  4142. /**
  4143. * Define a reactive property on an Object.
  4144. */
  4145. function defineReactive$$1 (
  4146. obj,
  4147. key,
  4148. val,
  4149. customSetter,
  4150. shallow
  4151. ) {
  4152. var dep = new Dep();
  4153. var property = Object.getOwnPropertyDescriptor(obj, key);
  4154. if (property && property.configurable === false) {
  4155. return
  4156. }
  4157. // cater for pre-defined getter/setters
  4158. var getter = property && property.get;
  4159. var setter = property && property.set;
  4160. if ((!getter || setter) && arguments.length === 2) {
  4161. val = obj[key];
  4162. }
  4163. var childOb = !shallow && observe(val);
  4164. Object.defineProperty(obj, key, {
  4165. enumerable: true,
  4166. configurable: true,
  4167. get: function reactiveGetter () {
  4168. var value = getter ? getter.call(obj) : val;
  4169. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4170. dep.depend();
  4171. if (childOb) {
  4172. childOb.dep.depend();
  4173. if (Array.isArray(value)) {
  4174. dependArray(value);
  4175. }
  4176. }
  4177. }
  4178. return value
  4179. },
  4180. set: function reactiveSetter (newVal) {
  4181. var value = getter ? getter.call(obj) : val;
  4182. /* eslint-disable no-self-compare */
  4183. if (newVal === value || (newVal !== newVal && value !== value)) {
  4184. return
  4185. }
  4186. /* eslint-enable no-self-compare */
  4187. if ( true && customSetter) {
  4188. customSetter();
  4189. }
  4190. // #7981: for accessor properties without setter
  4191. if (getter && !setter) { return }
  4192. if (setter) {
  4193. setter.call(obj, newVal);
  4194. } else {
  4195. val = newVal;
  4196. }
  4197. childOb = !shallow && observe(newVal);
  4198. dep.notify();
  4199. }
  4200. });
  4201. }
  4202. /**
  4203. * Set a property on an object. Adds the new property and
  4204. * triggers change notification if the property doesn't
  4205. * already exist.
  4206. */
  4207. function set (target, key, val) {
  4208. if ( true &&
  4209. (isUndef(target) || isPrimitive(target))
  4210. ) {
  4211. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4212. }
  4213. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4214. target.length = Math.max(target.length, key);
  4215. target.splice(key, 1, val);
  4216. return val
  4217. }
  4218. if (key in target && !(key in Object.prototype)) {
  4219. target[key] = val;
  4220. return val
  4221. }
  4222. var ob = (target).__ob__;
  4223. if (target._isVue || (ob && ob.vmCount)) {
  4224. true && warn(
  4225. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4226. 'at runtime - declare it upfront in the data option.'
  4227. );
  4228. return val
  4229. }
  4230. if (!ob) {
  4231. target[key] = val;
  4232. return val
  4233. }
  4234. defineReactive$$1(ob.value, key, val);
  4235. ob.dep.notify();
  4236. return val
  4237. }
  4238. /**
  4239. * Delete a property and trigger change if necessary.
  4240. */
  4241. function del (target, key) {
  4242. if ( true &&
  4243. (isUndef(target) || isPrimitive(target))
  4244. ) {
  4245. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4246. }
  4247. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4248. target.splice(key, 1);
  4249. return
  4250. }
  4251. var ob = (target).__ob__;
  4252. if (target._isVue || (ob && ob.vmCount)) {
  4253. true && warn(
  4254. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4255. '- just set it to null.'
  4256. );
  4257. return
  4258. }
  4259. if (!hasOwn(target, key)) {
  4260. return
  4261. }
  4262. delete target[key];
  4263. if (!ob) {
  4264. return
  4265. }
  4266. ob.dep.notify();
  4267. }
  4268. /**
  4269. * Collect dependencies on array elements when the array is touched, since
  4270. * we cannot intercept array element access like property getters.
  4271. */
  4272. function dependArray (value) {
  4273. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4274. e = value[i];
  4275. e && e.__ob__ && e.__ob__.dep.depend();
  4276. if (Array.isArray(e)) {
  4277. dependArray(e);
  4278. }
  4279. }
  4280. }
  4281. /* */
  4282. /**
  4283. * Option overwriting strategies are functions that handle
  4284. * how to merge a parent option value and a child option
  4285. * value into the final value.
  4286. */
  4287. var strats = config.optionMergeStrategies;
  4288. /**
  4289. * Options with restrictions
  4290. */
  4291. if (true) {
  4292. strats.el = strats.propsData = function (parent, child, vm, key) {
  4293. if (!vm) {
  4294. warn(
  4295. "option \"" + key + "\" can only be used during instance " +
  4296. 'creation with the `new` keyword.'
  4297. );
  4298. }
  4299. return defaultStrat(parent, child)
  4300. };
  4301. }
  4302. /**
  4303. * Helper that recursively merges two data objects together.
  4304. */
  4305. function mergeData (to, from) {
  4306. if (!from) { return to }
  4307. var key, toVal, fromVal;
  4308. var keys = hasSymbol
  4309. ? Reflect.ownKeys(from)
  4310. : Object.keys(from);
  4311. for (var i = 0; i < keys.length; i++) {
  4312. key = keys[i];
  4313. // in case the object is already observed...
  4314. if (key === '__ob__') { continue }
  4315. toVal = to[key];
  4316. fromVal = from[key];
  4317. if (!hasOwn(to, key)) {
  4318. set(to, key, fromVal);
  4319. } else if (
  4320. toVal !== fromVal &&
  4321. isPlainObject(toVal) &&
  4322. isPlainObject(fromVal)
  4323. ) {
  4324. mergeData(toVal, fromVal);
  4325. }
  4326. }
  4327. return to
  4328. }
  4329. /**
  4330. * Data
  4331. */
  4332. function mergeDataOrFn (
  4333. parentVal,
  4334. childVal,
  4335. vm
  4336. ) {
  4337. if (!vm) {
  4338. // in a Vue.extend merge, both should be functions
  4339. if (!childVal) {
  4340. return parentVal
  4341. }
  4342. if (!parentVal) {
  4343. return childVal
  4344. }
  4345. // when parentVal & childVal are both present,
  4346. // we need to return a function that returns the
  4347. // merged result of both functions... no need to
  4348. // check if parentVal is a function here because
  4349. // it has to be a function to pass previous merges.
  4350. return function mergedDataFn () {
  4351. return mergeData(
  4352. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4353. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4354. )
  4355. }
  4356. } else {
  4357. return function mergedInstanceDataFn () {
  4358. // instance merge
  4359. var instanceData = typeof childVal === 'function'
  4360. ? childVal.call(vm, vm)
  4361. : childVal;
  4362. var defaultData = typeof parentVal === 'function'
  4363. ? parentVal.call(vm, vm)
  4364. : parentVal;
  4365. if (instanceData) {
  4366. return mergeData(instanceData, defaultData)
  4367. } else {
  4368. return defaultData
  4369. }
  4370. }
  4371. }
  4372. }
  4373. strats.data = function (
  4374. parentVal,
  4375. childVal,
  4376. vm
  4377. ) {
  4378. if (!vm) {
  4379. if (childVal && typeof childVal !== 'function') {
  4380. true && warn(
  4381. 'The "data" option should be a function ' +
  4382. 'that returns a per-instance value in component ' +
  4383. 'definitions.',
  4384. vm
  4385. );
  4386. return parentVal
  4387. }
  4388. return mergeDataOrFn(parentVal, childVal)
  4389. }
  4390. return mergeDataOrFn(parentVal, childVal, vm)
  4391. };
  4392. /**
  4393. * Hooks and props are merged as arrays.
  4394. */
  4395. function mergeHook (
  4396. parentVal,
  4397. childVal
  4398. ) {
  4399. var res = childVal
  4400. ? parentVal
  4401. ? parentVal.concat(childVal)
  4402. : Array.isArray(childVal)
  4403. ? childVal
  4404. : [childVal]
  4405. : parentVal;
  4406. return res
  4407. ? dedupeHooks(res)
  4408. : res
  4409. }
  4410. function dedupeHooks (hooks) {
  4411. var res = [];
  4412. for (var i = 0; i < hooks.length; i++) {
  4413. if (res.indexOf(hooks[i]) === -1) {
  4414. res.push(hooks[i]);
  4415. }
  4416. }
  4417. return res
  4418. }
  4419. LIFECYCLE_HOOKS.forEach(function (hook) {
  4420. strats[hook] = mergeHook;
  4421. });
  4422. /**
  4423. * Assets
  4424. *
  4425. * When a vm is present (instance creation), we need to do
  4426. * a three-way merge between constructor options, instance
  4427. * options and parent options.
  4428. */
  4429. function mergeAssets (
  4430. parentVal,
  4431. childVal,
  4432. vm,
  4433. key
  4434. ) {
  4435. var res = Object.create(parentVal || null);
  4436. if (childVal) {
  4437. true && assertObjectType(key, childVal, vm);
  4438. return extend(res, childVal)
  4439. } else {
  4440. return res
  4441. }
  4442. }
  4443. ASSET_TYPES.forEach(function (type) {
  4444. strats[type + 's'] = mergeAssets;
  4445. });
  4446. /**
  4447. * Watchers.
  4448. *
  4449. * Watchers hashes should not overwrite one
  4450. * another, so we merge them as arrays.
  4451. */
  4452. strats.watch = function (
  4453. parentVal,
  4454. childVal,
  4455. vm,
  4456. key
  4457. ) {
  4458. // work around Firefox's Object.prototype.watch...
  4459. if (parentVal === nativeWatch) { parentVal = undefined; }
  4460. if (childVal === nativeWatch) { childVal = undefined; }
  4461. /* istanbul ignore if */
  4462. if (!childVal) { return Object.create(parentVal || null) }
  4463. if (true) {
  4464. assertObjectType(key, childVal, vm);
  4465. }
  4466. if (!parentVal) { return childVal }
  4467. var ret = {};
  4468. extend(ret, parentVal);
  4469. for (var key$1 in childVal) {
  4470. var parent = ret[key$1];
  4471. var child = childVal[key$1];
  4472. if (parent && !Array.isArray(parent)) {
  4473. parent = [parent];
  4474. }
  4475. ret[key$1] = parent
  4476. ? parent.concat(child)
  4477. : Array.isArray(child) ? child : [child];
  4478. }
  4479. return ret
  4480. };
  4481. /**
  4482. * Other object hashes.
  4483. */
  4484. strats.props =
  4485. strats.methods =
  4486. strats.inject =
  4487. strats.computed = function (
  4488. parentVal,
  4489. childVal,
  4490. vm,
  4491. key
  4492. ) {
  4493. if (childVal && "development" !== 'production') {
  4494. assertObjectType(key, childVal, vm);
  4495. }
  4496. if (!parentVal) { return childVal }
  4497. var ret = Object.create(null);
  4498. extend(ret, parentVal);
  4499. if (childVal) { extend(ret, childVal); }
  4500. return ret
  4501. };
  4502. strats.provide = mergeDataOrFn;
  4503. /**
  4504. * Default strategy.
  4505. */
  4506. var defaultStrat = function (parentVal, childVal) {
  4507. return childVal === undefined
  4508. ? parentVal
  4509. : childVal
  4510. };
  4511. /**
  4512. * Validate component names
  4513. */
  4514. function checkComponents (options) {
  4515. for (var key in options.components) {
  4516. validateComponentName(key);
  4517. }
  4518. }
  4519. function validateComponentName (name) {
  4520. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4521. warn(
  4522. 'Invalid component name: "' + name + '". Component names ' +
  4523. 'should conform to valid custom element name in html5 specification.'
  4524. );
  4525. }
  4526. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4527. warn(
  4528. 'Do not use built-in or reserved HTML elements as component ' +
  4529. 'id: ' + name
  4530. );
  4531. }
  4532. }
  4533. /**
  4534. * Ensure all props option syntax are normalized into the
  4535. * Object-based format.
  4536. */
  4537. function normalizeProps (options, vm) {
  4538. var props = options.props;
  4539. if (!props) { return }
  4540. var res = {};
  4541. var i, val, name;
  4542. if (Array.isArray(props)) {
  4543. i = props.length;
  4544. while (i--) {
  4545. val = props[i];
  4546. if (typeof val === 'string') {
  4547. name = camelize(val);
  4548. res[name] = { type: null };
  4549. } else if (true) {
  4550. warn('props must be strings when using array syntax.');
  4551. }
  4552. }
  4553. } else if (isPlainObject(props)) {
  4554. for (var key in props) {
  4555. val = props[key];
  4556. name = camelize(key);
  4557. res[name] = isPlainObject(val)
  4558. ? val
  4559. : { type: val };
  4560. }
  4561. } else if (true) {
  4562. warn(
  4563. "Invalid value for option \"props\": expected an Array or an Object, " +
  4564. "but got " + (toRawType(props)) + ".",
  4565. vm
  4566. );
  4567. }
  4568. options.props = res;
  4569. }
  4570. /**
  4571. * Normalize all injections into Object-based format
  4572. */
  4573. function normalizeInject (options, vm) {
  4574. var inject = options.inject;
  4575. if (!inject) { return }
  4576. var normalized = options.inject = {};
  4577. if (Array.isArray(inject)) {
  4578. for (var i = 0; i < inject.length; i++) {
  4579. normalized[inject[i]] = { from: inject[i] };
  4580. }
  4581. } else if (isPlainObject(inject)) {
  4582. for (var key in inject) {
  4583. var val = inject[key];
  4584. normalized[key] = isPlainObject(val)
  4585. ? extend({ from: key }, val)
  4586. : { from: val };
  4587. }
  4588. } else if (true) {
  4589. warn(
  4590. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4591. "but got " + (toRawType(inject)) + ".",
  4592. vm
  4593. );
  4594. }
  4595. }
  4596. /**
  4597. * Normalize raw function directives into object format.
  4598. */
  4599. function normalizeDirectives (options) {
  4600. var dirs = options.directives;
  4601. if (dirs) {
  4602. for (var key in dirs) {
  4603. var def$$1 = dirs[key];
  4604. if (typeof def$$1 === 'function') {
  4605. dirs[key] = { bind: def$$1, update: def$$1 };
  4606. }
  4607. }
  4608. }
  4609. }
  4610. function assertObjectType (name, value, vm) {
  4611. if (!isPlainObject(value)) {
  4612. warn(
  4613. "Invalid value for option \"" + name + "\": expected an Object, " +
  4614. "but got " + (toRawType(value)) + ".",
  4615. vm
  4616. );
  4617. }
  4618. }
  4619. /**
  4620. * Merge two option objects into a new one.
  4621. * Core utility used in both instantiation and inheritance.
  4622. */
  4623. function mergeOptions (
  4624. parent,
  4625. child,
  4626. vm
  4627. ) {
  4628. if (true) {
  4629. checkComponents(child);
  4630. }
  4631. if (typeof child === 'function') {
  4632. child = child.options;
  4633. }
  4634. normalizeProps(child, vm);
  4635. normalizeInject(child, vm);
  4636. normalizeDirectives(child);
  4637. // Apply extends and mixins on the child options,
  4638. // but only if it is a raw options object that isn't
  4639. // the result of another mergeOptions call.
  4640. // Only merged options has the _base property.
  4641. if (!child._base) {
  4642. if (child.extends) {
  4643. parent = mergeOptions(parent, child.extends, vm);
  4644. }
  4645. if (child.mixins) {
  4646. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4647. parent = mergeOptions(parent, child.mixins[i], vm);
  4648. }
  4649. }
  4650. }
  4651. var options = {};
  4652. var key;
  4653. for (key in parent) {
  4654. mergeField(key);
  4655. }
  4656. for (key in child) {
  4657. if (!hasOwn(parent, key)) {
  4658. mergeField(key);
  4659. }
  4660. }
  4661. function mergeField (key) {
  4662. var strat = strats[key] || defaultStrat;
  4663. options[key] = strat(parent[key], child[key], vm, key);
  4664. }
  4665. return options
  4666. }
  4667. /**
  4668. * Resolve an asset.
  4669. * This function is used because child instances need access
  4670. * to assets defined in its ancestor chain.
  4671. */
  4672. function resolveAsset (
  4673. options,
  4674. type,
  4675. id,
  4676. warnMissing
  4677. ) {
  4678. /* istanbul ignore if */
  4679. if (typeof id !== 'string') {
  4680. return
  4681. }
  4682. var assets = options[type];
  4683. // check local registration variations first
  4684. if (hasOwn(assets, id)) { return assets[id] }
  4685. var camelizedId = camelize(id);
  4686. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4687. var PascalCaseId = capitalize(camelizedId);
  4688. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4689. // fallback to prototype chain
  4690. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4691. if ( true && warnMissing && !res) {
  4692. warn(
  4693. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4694. options
  4695. );
  4696. }
  4697. return res
  4698. }
  4699. /* */
  4700. function validateProp (
  4701. key,
  4702. propOptions,
  4703. propsData,
  4704. vm
  4705. ) {
  4706. var prop = propOptions[key];
  4707. var absent = !hasOwn(propsData, key);
  4708. var value = propsData[key];
  4709. // boolean casting
  4710. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4711. if (booleanIndex > -1) {
  4712. if (absent && !hasOwn(prop, 'default')) {
  4713. value = false;
  4714. } else if (value === '' || value === hyphenate(key)) {
  4715. // only cast empty string / same name to boolean if
  4716. // boolean has higher priority
  4717. var stringIndex = getTypeIndex(String, prop.type);
  4718. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4719. value = true;
  4720. }
  4721. }
  4722. }
  4723. // check default value
  4724. if (value === undefined) {
  4725. value = getPropDefaultValue(vm, prop, key);
  4726. // since the default value is a fresh copy,
  4727. // make sure to observe it.
  4728. var prevShouldObserve = shouldObserve;
  4729. toggleObserving(true);
  4730. observe(value);
  4731. toggleObserving(prevShouldObserve);
  4732. }
  4733. if (
  4734. true
  4735. ) {
  4736. assertProp(prop, key, value, vm, absent);
  4737. }
  4738. return value
  4739. }
  4740. /**
  4741. * Get the default value of a prop.
  4742. */
  4743. function getPropDefaultValue (vm, prop, key) {
  4744. // no default, return undefined
  4745. if (!hasOwn(prop, 'default')) {
  4746. return undefined
  4747. }
  4748. var def = prop.default;
  4749. // warn against non-factory defaults for Object & Array
  4750. if ( true && isObject(def)) {
  4751. warn(
  4752. 'Invalid default value for prop "' + key + '": ' +
  4753. 'Props with type Object/Array must use a factory function ' +
  4754. 'to return the default value.',
  4755. vm
  4756. );
  4757. }
  4758. // the raw prop value was also undefined from previous render,
  4759. // return previous default value to avoid unnecessary watcher trigger
  4760. if (vm && vm.$options.propsData &&
  4761. vm.$options.propsData[key] === undefined &&
  4762. vm._props[key] !== undefined
  4763. ) {
  4764. return vm._props[key]
  4765. }
  4766. // call factory function for non-Function types
  4767. // a value is Function if its prototype is function even across different execution context
  4768. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4769. ? def.call(vm)
  4770. : def
  4771. }
  4772. /**
  4773. * Assert whether a prop is valid.
  4774. */
  4775. function assertProp (
  4776. prop,
  4777. name,
  4778. value,
  4779. vm,
  4780. absent
  4781. ) {
  4782. if (prop.required && absent) {
  4783. warn(
  4784. 'Missing required prop: "' + name + '"',
  4785. vm
  4786. );
  4787. return
  4788. }
  4789. if (value == null && !prop.required) {
  4790. return
  4791. }
  4792. var type = prop.type;
  4793. var valid = !type || type === true;
  4794. var expectedTypes = [];
  4795. if (type) {
  4796. if (!Array.isArray(type)) {
  4797. type = [type];
  4798. }
  4799. for (var i = 0; i < type.length && !valid; i++) {
  4800. var assertedType = assertType(value, type[i]);
  4801. expectedTypes.push(assertedType.expectedType || '');
  4802. valid = assertedType.valid;
  4803. }
  4804. }
  4805. if (!valid) {
  4806. warn(
  4807. getInvalidTypeMessage(name, value, expectedTypes),
  4808. vm
  4809. );
  4810. return
  4811. }
  4812. var validator = prop.validator;
  4813. if (validator) {
  4814. if (!validator(value)) {
  4815. warn(
  4816. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4817. vm
  4818. );
  4819. }
  4820. }
  4821. }
  4822. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4823. function assertType (value, type) {
  4824. var valid;
  4825. var expectedType = getType(type);
  4826. if (simpleCheckRE.test(expectedType)) {
  4827. var t = typeof value;
  4828. valid = t === expectedType.toLowerCase();
  4829. // for primitive wrapper objects
  4830. if (!valid && t === 'object') {
  4831. valid = value instanceof type;
  4832. }
  4833. } else if (expectedType === 'Object') {
  4834. valid = isPlainObject(value);
  4835. } else if (expectedType === 'Array') {
  4836. valid = Array.isArray(value);
  4837. } else {
  4838. valid = value instanceof type;
  4839. }
  4840. return {
  4841. valid: valid,
  4842. expectedType: expectedType
  4843. }
  4844. }
  4845. /**
  4846. * Use function string name to check built-in types,
  4847. * because a simple equality check will fail when running
  4848. * across different vms / iframes.
  4849. */
  4850. function getType (fn) {
  4851. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4852. return match ? match[1] : ''
  4853. }
  4854. function isSameType (a, b) {
  4855. return getType(a) === getType(b)
  4856. }
  4857. function getTypeIndex (type, expectedTypes) {
  4858. if (!Array.isArray(expectedTypes)) {
  4859. return isSameType(expectedTypes, type) ? 0 : -1
  4860. }
  4861. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4862. if (isSameType(expectedTypes[i], type)) {
  4863. return i
  4864. }
  4865. }
  4866. return -1
  4867. }
  4868. function getInvalidTypeMessage (name, value, expectedTypes) {
  4869. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4870. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4871. var expectedType = expectedTypes[0];
  4872. var receivedType = toRawType(value);
  4873. var expectedValue = styleValue(value, expectedType);
  4874. var receivedValue = styleValue(value, receivedType);
  4875. // check if we need to specify expected value
  4876. if (expectedTypes.length === 1 &&
  4877. isExplicable(expectedType) &&
  4878. !isBoolean(expectedType, receivedType)) {
  4879. message += " with value " + expectedValue;
  4880. }
  4881. message += ", got " + receivedType + " ";
  4882. // check if we need to specify received value
  4883. if (isExplicable(receivedType)) {
  4884. message += "with value " + receivedValue + ".";
  4885. }
  4886. return message
  4887. }
  4888. function styleValue (value, type) {
  4889. if (type === 'String') {
  4890. return ("\"" + value + "\"")
  4891. } else if (type === 'Number') {
  4892. return ("" + (Number(value)))
  4893. } else {
  4894. return ("" + value)
  4895. }
  4896. }
  4897. function isExplicable (value) {
  4898. var explicitTypes = ['string', 'number', 'boolean'];
  4899. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4900. }
  4901. function isBoolean () {
  4902. var args = [], len = arguments.length;
  4903. while ( len-- ) args[ len ] = arguments[ len ];
  4904. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4905. }
  4906. /* */
  4907. function handleError (err, vm, info) {
  4908. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4909. // See: https://github.com/vuejs/vuex/issues/1505
  4910. pushTarget();
  4911. try {
  4912. if (vm) {
  4913. var cur = vm;
  4914. while ((cur = cur.$parent)) {
  4915. var hooks = cur.$options.errorCaptured;
  4916. if (hooks) {
  4917. for (var i = 0; i < hooks.length; i++) {
  4918. try {
  4919. var capture = hooks[i].call(cur, err, vm, info) === false;
  4920. if (capture) { return }
  4921. } catch (e) {
  4922. globalHandleError(e, cur, 'errorCaptured hook');
  4923. }
  4924. }
  4925. }
  4926. }
  4927. }
  4928. globalHandleError(err, vm, info);
  4929. } finally {
  4930. popTarget();
  4931. }
  4932. }
  4933. function invokeWithErrorHandling (
  4934. handler,
  4935. context,
  4936. args,
  4937. vm,
  4938. info
  4939. ) {
  4940. var res;
  4941. try {
  4942. res = args ? handler.apply(context, args) : handler.call(context);
  4943. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4944. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4945. // issue #9511
  4946. // avoid catch triggering multiple times when nested calls
  4947. res._handled = true;
  4948. }
  4949. } catch (e) {
  4950. handleError(e, vm, info);
  4951. }
  4952. return res
  4953. }
  4954. function globalHandleError (err, vm, info) {
  4955. if (config.errorHandler) {
  4956. try {
  4957. return config.errorHandler.call(null, err, vm, info)
  4958. } catch (e) {
  4959. // if the user intentionally throws the original error in the handler,
  4960. // do not log it twice
  4961. if (e !== err) {
  4962. logError(e, null, 'config.errorHandler');
  4963. }
  4964. }
  4965. }
  4966. logError(err, vm, info);
  4967. }
  4968. function logError (err, vm, info) {
  4969. if (true) {
  4970. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  4971. }
  4972. /* istanbul ignore else */
  4973. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  4974. console.error(err);
  4975. } else {
  4976. throw err
  4977. }
  4978. }
  4979. /* */
  4980. var callbacks = [];
  4981. var pending = false;
  4982. function flushCallbacks () {
  4983. pending = false;
  4984. var copies = callbacks.slice(0);
  4985. callbacks.length = 0;
  4986. for (var i = 0; i < copies.length; i++) {
  4987. copies[i]();
  4988. }
  4989. }
  4990. // Here we have async deferring wrappers using microtasks.
  4991. // In 2.5 we used (macro) tasks (in combination with microtasks).
  4992. // However, it has subtle problems when state is changed right before repaint
  4993. // (e.g. #6813, out-in transitions).
  4994. // Also, using (macro) tasks in event handler would cause some weird behaviors
  4995. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  4996. // So we now use microtasks everywhere, again.
  4997. // A major drawback of this tradeoff is that there are some scenarios
  4998. // where microtasks have too high a priority and fire in between supposedly
  4999. // sequential events (e.g. #4521, #6690, which have workarounds)
  5000. // or even between bubbling of the same event (#6566).
  5001. var timerFunc;
  5002. // The nextTick behavior leverages the microtask queue, which can be accessed
  5003. // via either native Promise.then or MutationObserver.
  5004. // MutationObserver has wider support, however it is seriously bugged in
  5005. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5006. // completely stops working after triggering a few times... so, if native
  5007. // Promise is available, we will use it:
  5008. /* istanbul ignore next, $flow-disable-line */
  5009. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5010. var p = Promise.resolve();
  5011. timerFunc = function () {
  5012. p.then(flushCallbacks);
  5013. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5014. // it can get stuck in a weird state where callbacks are pushed into the
  5015. // microtask queue but the queue isn't being flushed, until the browser
  5016. // needs to do some other work, e.g. handle a timer. Therefore we can
  5017. // "force" the microtask queue to be flushed by adding an empty timer.
  5018. if (isIOS) { setTimeout(noop); }
  5019. };
  5020. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5021. isNative(MutationObserver) ||
  5022. // PhantomJS and iOS 7.x
  5023. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5024. )) {
  5025. // Use MutationObserver where native Promise is not available,
  5026. // e.g. PhantomJS, iOS7, Android 4.4
  5027. // (#6466 MutationObserver is unreliable in IE11)
  5028. var counter = 1;
  5029. var observer = new MutationObserver(flushCallbacks);
  5030. var textNode = document.createTextNode(String(counter));
  5031. observer.observe(textNode, {
  5032. characterData: true
  5033. });
  5034. timerFunc = function () {
  5035. counter = (counter + 1) % 2;
  5036. textNode.data = String(counter);
  5037. };
  5038. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5039. // Fallback to setImmediate.
  5040. // Technically it leverages the (macro) task queue,
  5041. // but it is still a better choice than setTimeout.
  5042. timerFunc = function () {
  5043. setImmediate(flushCallbacks);
  5044. };
  5045. } else {
  5046. // Fallback to setTimeout.
  5047. timerFunc = function () {
  5048. setTimeout(flushCallbacks, 0);
  5049. };
  5050. }
  5051. function nextTick (cb, ctx) {
  5052. var _resolve;
  5053. callbacks.push(function () {
  5054. if (cb) {
  5055. try {
  5056. cb.call(ctx);
  5057. } catch (e) {
  5058. handleError(e, ctx, 'nextTick');
  5059. }
  5060. } else if (_resolve) {
  5061. _resolve(ctx);
  5062. }
  5063. });
  5064. if (!pending) {
  5065. pending = true;
  5066. timerFunc();
  5067. }
  5068. // $flow-disable-line
  5069. if (!cb && typeof Promise !== 'undefined') {
  5070. return new Promise(function (resolve) {
  5071. _resolve = resolve;
  5072. })
  5073. }
  5074. }
  5075. /* */
  5076. /* not type checking this file because flow doesn't play well with Proxy */
  5077. var initProxy;
  5078. if (true) {
  5079. var allowedGlobals = makeMap(
  5080. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5081. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5082. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5083. 'require' // for Webpack/Browserify
  5084. );
  5085. var warnNonPresent = function (target, key) {
  5086. warn(
  5087. "Property or method \"" + key + "\" is not defined on the instance but " +
  5088. 'referenced during render. Make sure that this property is reactive, ' +
  5089. 'either in the data option, or for class-based components, by ' +
  5090. 'initializing the property. ' +
  5091. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5092. target
  5093. );
  5094. };
  5095. var warnReservedPrefix = function (target, key) {
  5096. warn(
  5097. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5098. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5099. 'prevent conflicts with Vue internals. ' +
  5100. 'See: https://vuejs.org/v2/api/#data',
  5101. target
  5102. );
  5103. };
  5104. var hasProxy =
  5105. typeof Proxy !== 'undefined' && isNative(Proxy);
  5106. if (hasProxy) {
  5107. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5108. config.keyCodes = new Proxy(config.keyCodes, {
  5109. set: function set (target, key, value) {
  5110. if (isBuiltInModifier(key)) {
  5111. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5112. return false
  5113. } else {
  5114. target[key] = value;
  5115. return true
  5116. }
  5117. }
  5118. });
  5119. }
  5120. var hasHandler = {
  5121. has: function has (target, key) {
  5122. var has = key in target;
  5123. var isAllowed = allowedGlobals(key) ||
  5124. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5125. if (!has && !isAllowed) {
  5126. if (key in target.$data) { warnReservedPrefix(target, key); }
  5127. else { warnNonPresent(target, key); }
  5128. }
  5129. return has || !isAllowed
  5130. }
  5131. };
  5132. var getHandler = {
  5133. get: function get (target, key) {
  5134. if (typeof key === 'string' && !(key in target)) {
  5135. if (key in target.$data) { warnReservedPrefix(target, key); }
  5136. else { warnNonPresent(target, key); }
  5137. }
  5138. return target[key]
  5139. }
  5140. };
  5141. initProxy = function initProxy (vm) {
  5142. if (hasProxy) {
  5143. // determine which proxy handler to use
  5144. var options = vm.$options;
  5145. var handlers = options.render && options.render._withStripped
  5146. ? getHandler
  5147. : hasHandler;
  5148. vm._renderProxy = new Proxy(vm, handlers);
  5149. } else {
  5150. vm._renderProxy = vm;
  5151. }
  5152. };
  5153. }
  5154. /* */
  5155. var seenObjects = new _Set();
  5156. /**
  5157. * Recursively traverse an object to evoke all converted
  5158. * getters, so that every nested property inside the object
  5159. * is collected as a "deep" dependency.
  5160. */
  5161. function traverse (val) {
  5162. _traverse(val, seenObjects);
  5163. seenObjects.clear();
  5164. }
  5165. function _traverse (val, seen) {
  5166. var i, keys;
  5167. var isA = Array.isArray(val);
  5168. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5169. return
  5170. }
  5171. if (val.__ob__) {
  5172. var depId = val.__ob__.dep.id;
  5173. if (seen.has(depId)) {
  5174. return
  5175. }
  5176. seen.add(depId);
  5177. }
  5178. if (isA) {
  5179. i = val.length;
  5180. while (i--) { _traverse(val[i], seen); }
  5181. } else {
  5182. keys = Object.keys(val);
  5183. i = keys.length;
  5184. while (i--) { _traverse(val[keys[i]], seen); }
  5185. }
  5186. }
  5187. var mark;
  5188. var measure;
  5189. if (true) {
  5190. var perf = inBrowser && window.performance;
  5191. /* istanbul ignore if */
  5192. if (
  5193. perf &&
  5194. perf.mark &&
  5195. perf.measure &&
  5196. perf.clearMarks &&
  5197. perf.clearMeasures
  5198. ) {
  5199. mark = function (tag) { return perf.mark(tag); };
  5200. measure = function (name, startTag, endTag) {
  5201. perf.measure(name, startTag, endTag);
  5202. perf.clearMarks(startTag);
  5203. perf.clearMarks(endTag);
  5204. // perf.clearMeasures(name)
  5205. };
  5206. }
  5207. }
  5208. /* */
  5209. var normalizeEvent = cached(function (name) {
  5210. var passive = name.charAt(0) === '&';
  5211. name = passive ? name.slice(1) : name;
  5212. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5213. name = once$$1 ? name.slice(1) : name;
  5214. var capture = name.charAt(0) === '!';
  5215. name = capture ? name.slice(1) : name;
  5216. return {
  5217. name: name,
  5218. once: once$$1,
  5219. capture: capture,
  5220. passive: passive
  5221. }
  5222. });
  5223. function createFnInvoker (fns, vm) {
  5224. function invoker () {
  5225. var arguments$1 = arguments;
  5226. var fns = invoker.fns;
  5227. if (Array.isArray(fns)) {
  5228. var cloned = fns.slice();
  5229. for (var i = 0; i < cloned.length; i++) {
  5230. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5231. }
  5232. } else {
  5233. // return handler return value for single handlers
  5234. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5235. }
  5236. }
  5237. invoker.fns = fns;
  5238. return invoker
  5239. }
  5240. function updateListeners (
  5241. on,
  5242. oldOn,
  5243. add,
  5244. remove$$1,
  5245. createOnceHandler,
  5246. vm
  5247. ) {
  5248. var name, def$$1, cur, old, event;
  5249. for (name in on) {
  5250. def$$1 = cur = on[name];
  5251. old = oldOn[name];
  5252. event = normalizeEvent(name);
  5253. if (isUndef(cur)) {
  5254. true && warn(
  5255. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5256. vm
  5257. );
  5258. } else if (isUndef(old)) {
  5259. if (isUndef(cur.fns)) {
  5260. cur = on[name] = createFnInvoker(cur, vm);
  5261. }
  5262. if (isTrue(event.once)) {
  5263. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5264. }
  5265. add(event.name, cur, event.capture, event.passive, event.params);
  5266. } else if (cur !== old) {
  5267. old.fns = cur;
  5268. on[name] = old;
  5269. }
  5270. }
  5271. for (name in oldOn) {
  5272. if (isUndef(on[name])) {
  5273. event = normalizeEvent(name);
  5274. remove$$1(event.name, oldOn[name], event.capture);
  5275. }
  5276. }
  5277. }
  5278. /* */
  5279. /* */
  5280. // fixed by xxxxxx (mp properties)
  5281. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5282. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5283. if (isUndef(propOptions)) {
  5284. return res
  5285. }
  5286. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5287. var attrs = data.attrs;
  5288. var props = data.props;
  5289. if (isDef(attrs) || isDef(props)) {
  5290. for (var key in propOptions) {
  5291. var altKey = hyphenate(key);
  5292. var result = checkProp(res, props, key, altKey, true) ||
  5293. checkProp(res, attrs, key, altKey, false);
  5294. // externalClass
  5295. if (
  5296. result &&
  5297. res[key] &&
  5298. externalClasses.indexOf(altKey) !== -1 &&
  5299. context[camelize(res[key])]
  5300. ) {
  5301. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5302. res[key] = context[camelize(res[key])];
  5303. }
  5304. }
  5305. }
  5306. return res
  5307. }
  5308. function extractPropsFromVNodeData (
  5309. data,
  5310. Ctor,
  5311. tag,
  5312. context// fixed by xxxxxx
  5313. ) {
  5314. // we are only extracting raw values here.
  5315. // validation and default values are handled in the child
  5316. // component itself.
  5317. var propOptions = Ctor.options.props;
  5318. if (isUndef(propOptions)) {
  5319. // fixed by xxxxxx
  5320. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5321. }
  5322. var res = {};
  5323. var attrs = data.attrs;
  5324. var props = data.props;
  5325. if (isDef(attrs) || isDef(props)) {
  5326. for (var key in propOptions) {
  5327. var altKey = hyphenate(key);
  5328. if (true) {
  5329. var keyInLowerCase = key.toLowerCase();
  5330. if (
  5331. key !== keyInLowerCase &&
  5332. attrs && hasOwn(attrs, keyInLowerCase)
  5333. ) {
  5334. tip(
  5335. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5336. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5337. " \"" + key + "\". " +
  5338. "Note that HTML attributes are case-insensitive and camelCased " +
  5339. "props need to use their kebab-case equivalents when using in-DOM " +
  5340. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5341. );
  5342. }
  5343. }
  5344. checkProp(res, props, key, altKey, true) ||
  5345. checkProp(res, attrs, key, altKey, false);
  5346. }
  5347. }
  5348. // fixed by xxxxxx
  5349. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5350. }
  5351. function checkProp (
  5352. res,
  5353. hash,
  5354. key,
  5355. altKey,
  5356. preserve
  5357. ) {
  5358. if (isDef(hash)) {
  5359. if (hasOwn(hash, key)) {
  5360. res[key] = hash[key];
  5361. if (!preserve) {
  5362. delete hash[key];
  5363. }
  5364. return true
  5365. } else if (hasOwn(hash, altKey)) {
  5366. res[key] = hash[altKey];
  5367. if (!preserve) {
  5368. delete hash[altKey];
  5369. }
  5370. return true
  5371. }
  5372. }
  5373. return false
  5374. }
  5375. /* */
  5376. // The template compiler attempts to minimize the need for normalization by
  5377. // statically analyzing the template at compile time.
  5378. //
  5379. // For plain HTML markup, normalization can be completely skipped because the
  5380. // generated render function is guaranteed to return Array<VNode>. There are
  5381. // two cases where extra normalization is needed:
  5382. // 1. When the children contains components - because a functional component
  5383. // may return an Array instead of a single root. In this case, just a simple
  5384. // normalization is needed - if any child is an Array, we flatten the whole
  5385. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5386. // because functional components already normalize their own children.
  5387. function simpleNormalizeChildren (children) {
  5388. for (var i = 0; i < children.length; i++) {
  5389. if (Array.isArray(children[i])) {
  5390. return Array.prototype.concat.apply([], children)
  5391. }
  5392. }
  5393. return children
  5394. }
  5395. // 2. When the children contains constructs that always generated nested Arrays,
  5396. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5397. // with hand-written render functions / JSX. In such cases a full normalization
  5398. // is needed to cater to all possible types of children values.
  5399. function normalizeChildren (children) {
  5400. return isPrimitive(children)
  5401. ? [createTextVNode(children)]
  5402. : Array.isArray(children)
  5403. ? normalizeArrayChildren(children)
  5404. : undefined
  5405. }
  5406. function isTextNode (node) {
  5407. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5408. }
  5409. function normalizeArrayChildren (children, nestedIndex) {
  5410. var res = [];
  5411. var i, c, lastIndex, last;
  5412. for (i = 0; i < children.length; i++) {
  5413. c = children[i];
  5414. if (isUndef(c) || typeof c === 'boolean') { continue }
  5415. lastIndex = res.length - 1;
  5416. last = res[lastIndex];
  5417. // nested
  5418. if (Array.isArray(c)) {
  5419. if (c.length > 0) {
  5420. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5421. // merge adjacent text nodes
  5422. if (isTextNode(c[0]) && isTextNode(last)) {
  5423. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5424. c.shift();
  5425. }
  5426. res.push.apply(res, c);
  5427. }
  5428. } else if (isPrimitive(c)) {
  5429. if (isTextNode(last)) {
  5430. // merge adjacent text nodes
  5431. // this is necessary for SSR hydration because text nodes are
  5432. // essentially merged when rendered to HTML strings
  5433. res[lastIndex] = createTextVNode(last.text + c);
  5434. } else if (c !== '') {
  5435. // convert primitive to vnode
  5436. res.push(createTextVNode(c));
  5437. }
  5438. } else {
  5439. if (isTextNode(c) && isTextNode(last)) {
  5440. // merge adjacent text nodes
  5441. res[lastIndex] = createTextVNode(last.text + c.text);
  5442. } else {
  5443. // default key for nested array children (likely generated by v-for)
  5444. if (isTrue(children._isVList) &&
  5445. isDef(c.tag) &&
  5446. isUndef(c.key) &&
  5447. isDef(nestedIndex)) {
  5448. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5449. }
  5450. res.push(c);
  5451. }
  5452. }
  5453. }
  5454. return res
  5455. }
  5456. /* */
  5457. function initProvide (vm) {
  5458. var provide = vm.$options.provide;
  5459. if (provide) {
  5460. vm._provided = typeof provide === 'function'
  5461. ? provide.call(vm)
  5462. : provide;
  5463. }
  5464. }
  5465. function initInjections (vm) {
  5466. var result = resolveInject(vm.$options.inject, vm);
  5467. if (result) {
  5468. toggleObserving(false);
  5469. Object.keys(result).forEach(function (key) {
  5470. /* istanbul ignore else */
  5471. if (true) {
  5472. defineReactive$$1(vm, key, result[key], function () {
  5473. warn(
  5474. "Avoid mutating an injected value directly since the changes will be " +
  5475. "overwritten whenever the provided component re-renders. " +
  5476. "injection being mutated: \"" + key + "\"",
  5477. vm
  5478. );
  5479. });
  5480. } else {}
  5481. });
  5482. toggleObserving(true);
  5483. }
  5484. }
  5485. function resolveInject (inject, vm) {
  5486. if (inject) {
  5487. // inject is :any because flow is not smart enough to figure out cached
  5488. var result = Object.create(null);
  5489. var keys = hasSymbol
  5490. ? Reflect.ownKeys(inject)
  5491. : Object.keys(inject);
  5492. for (var i = 0; i < keys.length; i++) {
  5493. var key = keys[i];
  5494. // #6574 in case the inject object is observed...
  5495. if (key === '__ob__') { continue }
  5496. var provideKey = inject[key].from;
  5497. var source = vm;
  5498. while (source) {
  5499. if (source._provided && hasOwn(source._provided, provideKey)) {
  5500. result[key] = source._provided[provideKey];
  5501. break
  5502. }
  5503. source = source.$parent;
  5504. }
  5505. if (!source) {
  5506. if ('default' in inject[key]) {
  5507. var provideDefault = inject[key].default;
  5508. result[key] = typeof provideDefault === 'function'
  5509. ? provideDefault.call(vm)
  5510. : provideDefault;
  5511. } else if (true) {
  5512. warn(("Injection \"" + key + "\" not found"), vm);
  5513. }
  5514. }
  5515. }
  5516. return result
  5517. }
  5518. }
  5519. /* */
  5520. /**
  5521. * Runtime helper for resolving raw children VNodes into a slot object.
  5522. */
  5523. function resolveSlots (
  5524. children,
  5525. context
  5526. ) {
  5527. if (!children || !children.length) {
  5528. return {}
  5529. }
  5530. var slots = {};
  5531. for (var i = 0, l = children.length; i < l; i++) {
  5532. var child = children[i];
  5533. var data = child.data;
  5534. // remove slot attribute if the node is resolved as a Vue slot node
  5535. if (data && data.attrs && data.attrs.slot) {
  5536. delete data.attrs.slot;
  5537. }
  5538. // named slots should only be respected if the vnode was rendered in the
  5539. // same context.
  5540. if ((child.context === context || child.fnContext === context) &&
  5541. data && data.slot != null
  5542. ) {
  5543. var name = data.slot;
  5544. var slot = (slots[name] || (slots[name] = []));
  5545. if (child.tag === 'template') {
  5546. slot.push.apply(slot, child.children || []);
  5547. } else {
  5548. slot.push(child);
  5549. }
  5550. } else {
  5551. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5552. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5553. (slots['page'] || (slots['page'] = [])).push(child);
  5554. }else{
  5555. (slots.default || (slots.default = [])).push(child);
  5556. }
  5557. }
  5558. }
  5559. // ignore slots that contains only whitespace
  5560. for (var name$1 in slots) {
  5561. if (slots[name$1].every(isWhitespace)) {
  5562. delete slots[name$1];
  5563. }
  5564. }
  5565. return slots
  5566. }
  5567. function isWhitespace (node) {
  5568. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5569. }
  5570. /* */
  5571. function normalizeScopedSlots (
  5572. slots,
  5573. normalSlots,
  5574. prevSlots
  5575. ) {
  5576. var res;
  5577. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5578. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5579. var key = slots && slots.$key;
  5580. if (!slots) {
  5581. res = {};
  5582. } else if (slots._normalized) {
  5583. // fast path 1: child component re-render only, parent did not change
  5584. return slots._normalized
  5585. } else if (
  5586. isStable &&
  5587. prevSlots &&
  5588. prevSlots !== emptyObject &&
  5589. key === prevSlots.$key &&
  5590. !hasNormalSlots &&
  5591. !prevSlots.$hasNormal
  5592. ) {
  5593. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5594. // only need to normalize once
  5595. return prevSlots
  5596. } else {
  5597. res = {};
  5598. for (var key$1 in slots) {
  5599. if (slots[key$1] && key$1[0] !== '$') {
  5600. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5601. }
  5602. }
  5603. }
  5604. // expose normal slots on scopedSlots
  5605. for (var key$2 in normalSlots) {
  5606. if (!(key$2 in res)) {
  5607. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5608. }
  5609. }
  5610. // avoriaz seems to mock a non-extensible $scopedSlots object
  5611. // and when that is passed down this would cause an error
  5612. if (slots && Object.isExtensible(slots)) {
  5613. (slots)._normalized = res;
  5614. }
  5615. def(res, '$stable', isStable);
  5616. def(res, '$key', key);
  5617. def(res, '$hasNormal', hasNormalSlots);
  5618. return res
  5619. }
  5620. function normalizeScopedSlot(normalSlots, key, fn) {
  5621. var normalized = function () {
  5622. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5623. res = res && typeof res === 'object' && !Array.isArray(res)
  5624. ? [res] // single vnode
  5625. : normalizeChildren(res);
  5626. return res && (
  5627. res.length === 0 ||
  5628. (res.length === 1 && res[0].isComment) // #9658
  5629. ) ? undefined
  5630. : res
  5631. };
  5632. // this is a slot using the new v-slot syntax without scope. although it is
  5633. // compiled as a scoped slot, render fn users would expect it to be present
  5634. // on this.$slots because the usage is semantically a normal slot.
  5635. if (fn.proxy) {
  5636. Object.defineProperty(normalSlots, key, {
  5637. get: normalized,
  5638. enumerable: true,
  5639. configurable: true
  5640. });
  5641. }
  5642. return normalized
  5643. }
  5644. function proxyNormalSlot(slots, key) {
  5645. return function () { return slots[key]; }
  5646. }
  5647. /* */
  5648. /**
  5649. * Runtime helper for rendering v-for lists.
  5650. */
  5651. function renderList (
  5652. val,
  5653. render
  5654. ) {
  5655. var ret, i, l, keys, key;
  5656. if (Array.isArray(val) || typeof val === 'string') {
  5657. ret = new Array(val.length);
  5658. for (i = 0, l = val.length; i < l; i++) {
  5659. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5660. }
  5661. } else if (typeof val === 'number') {
  5662. ret = new Array(val);
  5663. for (i = 0; i < val; i++) {
  5664. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5665. }
  5666. } else if (isObject(val)) {
  5667. if (hasSymbol && val[Symbol.iterator]) {
  5668. ret = [];
  5669. var iterator = val[Symbol.iterator]();
  5670. var result = iterator.next();
  5671. while (!result.done) {
  5672. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5673. result = iterator.next();
  5674. }
  5675. } else {
  5676. keys = Object.keys(val);
  5677. ret = new Array(keys.length);
  5678. for (i = 0, l = keys.length; i < l; i++) {
  5679. key = keys[i];
  5680. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5681. }
  5682. }
  5683. }
  5684. if (!isDef(ret)) {
  5685. ret = [];
  5686. }
  5687. (ret)._isVList = true;
  5688. return ret
  5689. }
  5690. /* */
  5691. /**
  5692. * Runtime helper for rendering <slot>
  5693. */
  5694. function renderSlot (
  5695. name,
  5696. fallback,
  5697. props,
  5698. bindObject
  5699. ) {
  5700. var scopedSlotFn = this.$scopedSlots[name];
  5701. var nodes;
  5702. if (scopedSlotFn) { // scoped slot
  5703. props = props || {};
  5704. if (bindObject) {
  5705. if ( true && !isObject(bindObject)) {
  5706. warn(
  5707. 'slot v-bind without argument expects an Object',
  5708. this
  5709. );
  5710. }
  5711. props = extend(extend({}, bindObject), props);
  5712. }
  5713. // fixed by xxxxxx app-plus scopedSlot
  5714. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5715. } else {
  5716. nodes = this.$slots[name] || fallback;
  5717. }
  5718. var target = props && props.slot;
  5719. if (target) {
  5720. return this.$createElement('template', { slot: target }, nodes)
  5721. } else {
  5722. return nodes
  5723. }
  5724. }
  5725. /* */
  5726. /**
  5727. * Runtime helper for resolving filters
  5728. */
  5729. function resolveFilter (id) {
  5730. return resolveAsset(this.$options, 'filters', id, true) || identity
  5731. }
  5732. /* */
  5733. function isKeyNotMatch (expect, actual) {
  5734. if (Array.isArray(expect)) {
  5735. return expect.indexOf(actual) === -1
  5736. } else {
  5737. return expect !== actual
  5738. }
  5739. }
  5740. /**
  5741. * Runtime helper for checking keyCodes from config.
  5742. * exposed as Vue.prototype._k
  5743. * passing in eventKeyName as last argument separately for backwards compat
  5744. */
  5745. function checkKeyCodes (
  5746. eventKeyCode,
  5747. key,
  5748. builtInKeyCode,
  5749. eventKeyName,
  5750. builtInKeyName
  5751. ) {
  5752. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5753. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5754. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5755. } else if (mappedKeyCode) {
  5756. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5757. } else if (eventKeyName) {
  5758. return hyphenate(eventKeyName) !== key
  5759. }
  5760. }
  5761. /* */
  5762. /**
  5763. * Runtime helper for merging v-bind="object" into a VNode's data.
  5764. */
  5765. function bindObjectProps (
  5766. data,
  5767. tag,
  5768. value,
  5769. asProp,
  5770. isSync
  5771. ) {
  5772. if (value) {
  5773. if (!isObject(value)) {
  5774. true && warn(
  5775. 'v-bind without argument expects an Object or Array value',
  5776. this
  5777. );
  5778. } else {
  5779. if (Array.isArray(value)) {
  5780. value = toObject(value);
  5781. }
  5782. var hash;
  5783. var loop = function ( key ) {
  5784. if (
  5785. key === 'class' ||
  5786. key === 'style' ||
  5787. isReservedAttribute(key)
  5788. ) {
  5789. hash = data;
  5790. } else {
  5791. var type = data.attrs && data.attrs.type;
  5792. hash = asProp || config.mustUseProp(tag, type, key)
  5793. ? data.domProps || (data.domProps = {})
  5794. : data.attrs || (data.attrs = {});
  5795. }
  5796. var camelizedKey = camelize(key);
  5797. var hyphenatedKey = hyphenate(key);
  5798. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5799. hash[key] = value[key];
  5800. if (isSync) {
  5801. var on = data.on || (data.on = {});
  5802. on[("update:" + key)] = function ($event) {
  5803. value[key] = $event;
  5804. };
  5805. }
  5806. }
  5807. };
  5808. for (var key in value) loop( key );
  5809. }
  5810. }
  5811. return data
  5812. }
  5813. /* */
  5814. /**
  5815. * Runtime helper for rendering static trees.
  5816. */
  5817. function renderStatic (
  5818. index,
  5819. isInFor
  5820. ) {
  5821. var cached = this._staticTrees || (this._staticTrees = []);
  5822. var tree = cached[index];
  5823. // if has already-rendered static tree and not inside v-for,
  5824. // we can reuse the same tree.
  5825. if (tree && !isInFor) {
  5826. return tree
  5827. }
  5828. // otherwise, render a fresh tree.
  5829. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5830. this._renderProxy,
  5831. null,
  5832. this // for render fns generated for functional component templates
  5833. );
  5834. markStatic(tree, ("__static__" + index), false);
  5835. return tree
  5836. }
  5837. /**
  5838. * Runtime helper for v-once.
  5839. * Effectively it means marking the node as static with a unique key.
  5840. */
  5841. function markOnce (
  5842. tree,
  5843. index,
  5844. key
  5845. ) {
  5846. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5847. return tree
  5848. }
  5849. function markStatic (
  5850. tree,
  5851. key,
  5852. isOnce
  5853. ) {
  5854. if (Array.isArray(tree)) {
  5855. for (var i = 0; i < tree.length; i++) {
  5856. if (tree[i] && typeof tree[i] !== 'string') {
  5857. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5858. }
  5859. }
  5860. } else {
  5861. markStaticNode(tree, key, isOnce);
  5862. }
  5863. }
  5864. function markStaticNode (node, key, isOnce) {
  5865. node.isStatic = true;
  5866. node.key = key;
  5867. node.isOnce = isOnce;
  5868. }
  5869. /* */
  5870. function bindObjectListeners (data, value) {
  5871. if (value) {
  5872. if (!isPlainObject(value)) {
  5873. true && warn(
  5874. 'v-on without argument expects an Object value',
  5875. this
  5876. );
  5877. } else {
  5878. var on = data.on = data.on ? extend({}, data.on) : {};
  5879. for (var key in value) {
  5880. var existing = on[key];
  5881. var ours = value[key];
  5882. on[key] = existing ? [].concat(existing, ours) : ours;
  5883. }
  5884. }
  5885. }
  5886. return data
  5887. }
  5888. /* */
  5889. function resolveScopedSlots (
  5890. fns, // see flow/vnode
  5891. res,
  5892. // the following are added in 2.6
  5893. hasDynamicKeys,
  5894. contentHashKey
  5895. ) {
  5896. res = res || { $stable: !hasDynamicKeys };
  5897. for (var i = 0; i < fns.length; i++) {
  5898. var slot = fns[i];
  5899. if (Array.isArray(slot)) {
  5900. resolveScopedSlots(slot, res, hasDynamicKeys);
  5901. } else if (slot) {
  5902. // marker for reverse proxying v-slot without scope on this.$slots
  5903. if (slot.proxy) {
  5904. slot.fn.proxy = true;
  5905. }
  5906. res[slot.key] = slot.fn;
  5907. }
  5908. }
  5909. if (contentHashKey) {
  5910. (res).$key = contentHashKey;
  5911. }
  5912. return res
  5913. }
  5914. /* */
  5915. function bindDynamicKeys (baseObj, values) {
  5916. for (var i = 0; i < values.length; i += 2) {
  5917. var key = values[i];
  5918. if (typeof key === 'string' && key) {
  5919. baseObj[values[i]] = values[i + 1];
  5920. } else if ( true && key !== '' && key !== null) {
  5921. // null is a special value for explicitly removing a binding
  5922. warn(
  5923. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5924. this
  5925. );
  5926. }
  5927. }
  5928. return baseObj
  5929. }
  5930. // helper to dynamically append modifier runtime markers to event names.
  5931. // ensure only append when value is already string, otherwise it will be cast
  5932. // to string and cause the type check to miss.
  5933. function prependModifier (value, symbol) {
  5934. return typeof value === 'string' ? symbol + value : value
  5935. }
  5936. /* */
  5937. function installRenderHelpers (target) {
  5938. target._o = markOnce;
  5939. target._n = toNumber;
  5940. target._s = toString;
  5941. target._l = renderList;
  5942. target._t = renderSlot;
  5943. target._q = looseEqual;
  5944. target._i = looseIndexOf;
  5945. target._m = renderStatic;
  5946. target._f = resolveFilter;
  5947. target._k = checkKeyCodes;
  5948. target._b = bindObjectProps;
  5949. target._v = createTextVNode;
  5950. target._e = createEmptyVNode;
  5951. target._u = resolveScopedSlots;
  5952. target._g = bindObjectListeners;
  5953. target._d = bindDynamicKeys;
  5954. target._p = prependModifier;
  5955. }
  5956. /* */
  5957. function FunctionalRenderContext (
  5958. data,
  5959. props,
  5960. children,
  5961. parent,
  5962. Ctor
  5963. ) {
  5964. var this$1 = this;
  5965. var options = Ctor.options;
  5966. // ensure the createElement function in functional components
  5967. // gets a unique context - this is necessary for correct named slot check
  5968. var contextVm;
  5969. if (hasOwn(parent, '_uid')) {
  5970. contextVm = Object.create(parent);
  5971. // $flow-disable-line
  5972. contextVm._original = parent;
  5973. } else {
  5974. // the context vm passed in is a functional context as well.
  5975. // in this case we want to make sure we are able to get a hold to the
  5976. // real context instance.
  5977. contextVm = parent;
  5978. // $flow-disable-line
  5979. parent = parent._original;
  5980. }
  5981. var isCompiled = isTrue(options._compiled);
  5982. var needNormalization = !isCompiled;
  5983. this.data = data;
  5984. this.props = props;
  5985. this.children = children;
  5986. this.parent = parent;
  5987. this.listeners = data.on || emptyObject;
  5988. this.injections = resolveInject(options.inject, parent);
  5989. this.slots = function () {
  5990. if (!this$1.$slots) {
  5991. normalizeScopedSlots(
  5992. data.scopedSlots,
  5993. this$1.$slots = resolveSlots(children, parent)
  5994. );
  5995. }
  5996. return this$1.$slots
  5997. };
  5998. Object.defineProperty(this, 'scopedSlots', ({
  5999. enumerable: true,
  6000. get: function get () {
  6001. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6002. }
  6003. }));
  6004. // support for compiled functional template
  6005. if (isCompiled) {
  6006. // exposing $options for renderStatic()
  6007. this.$options = options;
  6008. // pre-resolve slots for renderSlot()
  6009. this.$slots = this.slots();
  6010. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6011. }
  6012. if (options._scopeId) {
  6013. this._c = function (a, b, c, d) {
  6014. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6015. if (vnode && !Array.isArray(vnode)) {
  6016. vnode.fnScopeId = options._scopeId;
  6017. vnode.fnContext = parent;
  6018. }
  6019. return vnode
  6020. };
  6021. } else {
  6022. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6023. }
  6024. }
  6025. installRenderHelpers(FunctionalRenderContext.prototype);
  6026. function createFunctionalComponent (
  6027. Ctor,
  6028. propsData,
  6029. data,
  6030. contextVm,
  6031. children
  6032. ) {
  6033. var options = Ctor.options;
  6034. var props = {};
  6035. var propOptions = options.props;
  6036. if (isDef(propOptions)) {
  6037. for (var key in propOptions) {
  6038. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6039. }
  6040. } else {
  6041. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6042. if (isDef(data.props)) { mergeProps(props, data.props); }
  6043. }
  6044. var renderContext = new FunctionalRenderContext(
  6045. data,
  6046. props,
  6047. children,
  6048. contextVm,
  6049. Ctor
  6050. );
  6051. var vnode = options.render.call(null, renderContext._c, renderContext);
  6052. if (vnode instanceof VNode) {
  6053. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6054. } else if (Array.isArray(vnode)) {
  6055. var vnodes = normalizeChildren(vnode) || [];
  6056. var res = new Array(vnodes.length);
  6057. for (var i = 0; i < vnodes.length; i++) {
  6058. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6059. }
  6060. return res
  6061. }
  6062. }
  6063. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6064. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6065. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6066. // that should not be matched to match.
  6067. var clone = cloneVNode(vnode);
  6068. clone.fnContext = contextVm;
  6069. clone.fnOptions = options;
  6070. if (true) {
  6071. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6072. }
  6073. if (data.slot) {
  6074. (clone.data || (clone.data = {})).slot = data.slot;
  6075. }
  6076. return clone
  6077. }
  6078. function mergeProps (to, from) {
  6079. for (var key in from) {
  6080. to[camelize(key)] = from[key];
  6081. }
  6082. }
  6083. /* */
  6084. /* */
  6085. /* */
  6086. /* */
  6087. // inline hooks to be invoked on component VNodes during patch
  6088. var componentVNodeHooks = {
  6089. init: function init (vnode, hydrating) {
  6090. if (
  6091. vnode.componentInstance &&
  6092. !vnode.componentInstance._isDestroyed &&
  6093. vnode.data.keepAlive
  6094. ) {
  6095. // kept-alive components, treat as a patch
  6096. var mountedNode = vnode; // work around flow
  6097. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6098. } else {
  6099. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6100. vnode,
  6101. activeInstance
  6102. );
  6103. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6104. }
  6105. },
  6106. prepatch: function prepatch (oldVnode, vnode) {
  6107. var options = vnode.componentOptions;
  6108. var child = vnode.componentInstance = oldVnode.componentInstance;
  6109. updateChildComponent(
  6110. child,
  6111. options.propsData, // updated props
  6112. options.listeners, // updated listeners
  6113. vnode, // new parent vnode
  6114. options.children // new children
  6115. );
  6116. },
  6117. insert: function insert (vnode) {
  6118. var context = vnode.context;
  6119. var componentInstance = vnode.componentInstance;
  6120. if (!componentInstance._isMounted) {
  6121. callHook(componentInstance, 'onServiceCreated');
  6122. callHook(componentInstance, 'onServiceAttached');
  6123. componentInstance._isMounted = true;
  6124. callHook(componentInstance, 'mounted');
  6125. }
  6126. if (vnode.data.keepAlive) {
  6127. if (context._isMounted) {
  6128. // vue-router#1212
  6129. // During updates, a kept-alive component's child components may
  6130. // change, so directly walking the tree here may call activated hooks
  6131. // on incorrect children. Instead we push them into a queue which will
  6132. // be processed after the whole patch process ended.
  6133. queueActivatedComponent(componentInstance);
  6134. } else {
  6135. activateChildComponent(componentInstance, true /* direct */);
  6136. }
  6137. }
  6138. },
  6139. destroy: function destroy (vnode) {
  6140. var componentInstance = vnode.componentInstance;
  6141. if (!componentInstance._isDestroyed) {
  6142. if (!vnode.data.keepAlive) {
  6143. componentInstance.$destroy();
  6144. } else {
  6145. deactivateChildComponent(componentInstance, true /* direct */);
  6146. }
  6147. }
  6148. }
  6149. };
  6150. var hooksToMerge = Object.keys(componentVNodeHooks);
  6151. function createComponent (
  6152. Ctor,
  6153. data,
  6154. context,
  6155. children,
  6156. tag
  6157. ) {
  6158. if (isUndef(Ctor)) {
  6159. return
  6160. }
  6161. var baseCtor = context.$options._base;
  6162. // plain options object: turn it into a constructor
  6163. if (isObject(Ctor)) {
  6164. Ctor = baseCtor.extend(Ctor);
  6165. }
  6166. // if at this stage it's not a constructor or an async component factory,
  6167. // reject.
  6168. if (typeof Ctor !== 'function') {
  6169. if (true) {
  6170. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6171. }
  6172. return
  6173. }
  6174. // async component
  6175. var asyncFactory;
  6176. if (isUndef(Ctor.cid)) {
  6177. asyncFactory = Ctor;
  6178. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6179. if (Ctor === undefined) {
  6180. // return a placeholder node for async component, which is rendered
  6181. // as a comment node but preserves all the raw information for the node.
  6182. // the information will be used for async server-rendering and hydration.
  6183. return createAsyncPlaceholder(
  6184. asyncFactory,
  6185. data,
  6186. context,
  6187. children,
  6188. tag
  6189. )
  6190. }
  6191. }
  6192. data = data || {};
  6193. // resolve constructor options in case global mixins are applied after
  6194. // component constructor creation
  6195. resolveConstructorOptions(Ctor);
  6196. // transform component v-model data into props & events
  6197. if (isDef(data.model)) {
  6198. transformModel(Ctor.options, data);
  6199. }
  6200. // extract props
  6201. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6202. // functional component
  6203. if (isTrue(Ctor.options.functional)) {
  6204. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6205. }
  6206. // extract listeners, since these needs to be treated as
  6207. // child component listeners instead of DOM listeners
  6208. var listeners = data.on;
  6209. // replace with listeners with .native modifier
  6210. // so it gets processed during parent component patch.
  6211. data.on = data.nativeOn;
  6212. if (isTrue(Ctor.options.abstract)) {
  6213. // abstract components do not keep anything
  6214. // other than props & listeners & slot
  6215. // work around flow
  6216. var slot = data.slot;
  6217. data = {};
  6218. if (slot) {
  6219. data.slot = slot;
  6220. }
  6221. }
  6222. // install component management hooks onto the placeholder node
  6223. installComponentHooks(data);
  6224. // return a placeholder vnode
  6225. var name = Ctor.options.name || tag;
  6226. var vnode = new VNode(
  6227. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6228. data, undefined, undefined, undefined, context,
  6229. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6230. asyncFactory
  6231. );
  6232. return vnode
  6233. }
  6234. function createComponentInstanceForVnode (
  6235. vnode, // we know it's MountedComponentVNode but flow doesn't
  6236. parent // activeInstance in lifecycle state
  6237. ) {
  6238. var options = {
  6239. _isComponent: true,
  6240. _parentVnode: vnode,
  6241. parent: parent
  6242. };
  6243. // check inline-template render functions
  6244. var inlineTemplate = vnode.data.inlineTemplate;
  6245. if (isDef(inlineTemplate)) {
  6246. options.render = inlineTemplate.render;
  6247. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6248. }
  6249. return new vnode.componentOptions.Ctor(options)
  6250. }
  6251. function installComponentHooks (data) {
  6252. var hooks = data.hook || (data.hook = {});
  6253. for (var i = 0; i < hooksToMerge.length; i++) {
  6254. var key = hooksToMerge[i];
  6255. var existing = hooks[key];
  6256. var toMerge = componentVNodeHooks[key];
  6257. if (existing !== toMerge && !(existing && existing._merged)) {
  6258. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6259. }
  6260. }
  6261. }
  6262. function mergeHook$1 (f1, f2) {
  6263. var merged = function (a, b) {
  6264. // flow complains about extra args which is why we use any
  6265. f1(a, b);
  6266. f2(a, b);
  6267. };
  6268. merged._merged = true;
  6269. return merged
  6270. }
  6271. // transform component v-model info (value and callback) into
  6272. // prop and event handler respectively.
  6273. function transformModel (options, data) {
  6274. var prop = (options.model && options.model.prop) || 'value';
  6275. var event = (options.model && options.model.event) || 'input'
  6276. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6277. var on = data.on || (data.on = {});
  6278. var existing = on[event];
  6279. var callback = data.model.callback;
  6280. if (isDef(existing)) {
  6281. if (
  6282. Array.isArray(existing)
  6283. ? existing.indexOf(callback) === -1
  6284. : existing !== callback
  6285. ) {
  6286. on[event] = [callback].concat(existing);
  6287. }
  6288. } else {
  6289. on[event] = callback;
  6290. }
  6291. }
  6292. /* */
  6293. var SIMPLE_NORMALIZE = 1;
  6294. var ALWAYS_NORMALIZE = 2;
  6295. // wrapper function for providing a more flexible interface
  6296. // without getting yelled at by flow
  6297. function createElement (
  6298. context,
  6299. tag,
  6300. data,
  6301. children,
  6302. normalizationType,
  6303. alwaysNormalize
  6304. ) {
  6305. if (Array.isArray(data) || isPrimitive(data)) {
  6306. normalizationType = children;
  6307. children = data;
  6308. data = undefined;
  6309. }
  6310. if (isTrue(alwaysNormalize)) {
  6311. normalizationType = ALWAYS_NORMALIZE;
  6312. }
  6313. return _createElement(context, tag, data, children, normalizationType)
  6314. }
  6315. function _createElement (
  6316. context,
  6317. tag,
  6318. data,
  6319. children,
  6320. normalizationType
  6321. ) {
  6322. if (isDef(data) && isDef((data).__ob__)) {
  6323. true && warn(
  6324. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6325. 'Always create fresh vnode data objects in each render!',
  6326. context
  6327. );
  6328. return createEmptyVNode()
  6329. }
  6330. // object syntax in v-bind
  6331. if (isDef(data) && isDef(data.is)) {
  6332. tag = data.is;
  6333. }
  6334. if (!tag) {
  6335. // in case of component :is set to falsy value
  6336. return createEmptyVNode()
  6337. }
  6338. // warn against non-primitive key
  6339. if ( true &&
  6340. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6341. ) {
  6342. {
  6343. warn(
  6344. 'Avoid using non-primitive value as key, ' +
  6345. 'use string/number value instead.',
  6346. context
  6347. );
  6348. }
  6349. }
  6350. // support single function children as default scoped slot
  6351. if (Array.isArray(children) &&
  6352. typeof children[0] === 'function'
  6353. ) {
  6354. data = data || {};
  6355. data.scopedSlots = { default: children[0] };
  6356. children.length = 0;
  6357. }
  6358. if (normalizationType === ALWAYS_NORMALIZE) {
  6359. children = normalizeChildren(children);
  6360. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6361. children = simpleNormalizeChildren(children);
  6362. }
  6363. var vnode, ns;
  6364. if (typeof tag === 'string') {
  6365. var Ctor;
  6366. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6367. if (config.isReservedTag(tag)) {
  6368. // platform built-in elements
  6369. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6370. warn(
  6371. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6372. context
  6373. );
  6374. }
  6375. vnode = new VNode(
  6376. config.parsePlatformTagName(tag), data, children,
  6377. undefined, undefined, context
  6378. );
  6379. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6380. // component
  6381. vnode = createComponent(Ctor, data, context, children, tag);
  6382. } else {
  6383. // unknown or unlisted namespaced elements
  6384. // check at runtime because it may get assigned a namespace when its
  6385. // parent normalizes children
  6386. vnode = new VNode(
  6387. tag, data, children,
  6388. undefined, undefined, context
  6389. );
  6390. }
  6391. } else {
  6392. // direct component options / constructor
  6393. vnode = createComponent(tag, data, context, children);
  6394. }
  6395. if (Array.isArray(vnode)) {
  6396. return vnode
  6397. } else if (isDef(vnode)) {
  6398. if (isDef(ns)) { applyNS(vnode, ns); }
  6399. if (isDef(data)) { registerDeepBindings(data); }
  6400. return vnode
  6401. } else {
  6402. return createEmptyVNode()
  6403. }
  6404. }
  6405. function applyNS (vnode, ns, force) {
  6406. vnode.ns = ns;
  6407. if (vnode.tag === 'foreignObject') {
  6408. // use default namespace inside foreignObject
  6409. ns = undefined;
  6410. force = true;
  6411. }
  6412. if (isDef(vnode.children)) {
  6413. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6414. var child = vnode.children[i];
  6415. if (isDef(child.tag) && (
  6416. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6417. applyNS(child, ns, force);
  6418. }
  6419. }
  6420. }
  6421. }
  6422. // ref #5318
  6423. // necessary to ensure parent re-render when deep bindings like :style and
  6424. // :class are used on slot nodes
  6425. function registerDeepBindings (data) {
  6426. if (isObject(data.style)) {
  6427. traverse(data.style);
  6428. }
  6429. if (isObject(data.class)) {
  6430. traverse(data.class);
  6431. }
  6432. }
  6433. /* */
  6434. function initRender (vm) {
  6435. vm._vnode = null; // the root of the child tree
  6436. vm._staticTrees = null; // v-once cached trees
  6437. var options = vm.$options;
  6438. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6439. var renderContext = parentVnode && parentVnode.context;
  6440. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6441. vm.$scopedSlots = emptyObject;
  6442. // bind the createElement fn to this instance
  6443. // so that we get proper render context inside it.
  6444. // args order: tag, data, children, normalizationType, alwaysNormalize
  6445. // internal version is used by render functions compiled from templates
  6446. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6447. // normalization is always applied for the public version, used in
  6448. // user-written render functions.
  6449. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6450. // $attrs & $listeners are exposed for easier HOC creation.
  6451. // they need to be reactive so that HOCs using them are always updated
  6452. var parentData = parentVnode && parentVnode.data;
  6453. /* istanbul ignore else */
  6454. if (true) {
  6455. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6456. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6457. }, true);
  6458. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6459. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6460. }, true);
  6461. } else {}
  6462. }
  6463. var currentRenderingInstance = null;
  6464. function renderMixin (Vue) {
  6465. // install runtime convenience helpers
  6466. installRenderHelpers(Vue.prototype);
  6467. Vue.prototype.$nextTick = function (fn) {
  6468. return nextTick(fn, this)
  6469. };
  6470. Vue.prototype._render = function () {
  6471. var vm = this;
  6472. var ref = vm.$options;
  6473. var render = ref.render;
  6474. var _parentVnode = ref._parentVnode;
  6475. if (_parentVnode) {
  6476. vm.$scopedSlots = normalizeScopedSlots(
  6477. _parentVnode.data.scopedSlots,
  6478. vm.$slots,
  6479. vm.$scopedSlots
  6480. );
  6481. }
  6482. // set parent vnode. this allows render functions to have access
  6483. // to the data on the placeholder node.
  6484. vm.$vnode = _parentVnode;
  6485. // render self
  6486. var vnode;
  6487. try {
  6488. // There's no need to maintain a stack because all render fns are called
  6489. // separately from one another. Nested component's render fns are called
  6490. // when parent component is patched.
  6491. currentRenderingInstance = vm;
  6492. vnode = render.call(vm._renderProxy, vm.$createElement);
  6493. } catch (e) {
  6494. handleError(e, vm, "render");
  6495. // return error render result,
  6496. // or previous vnode to prevent render error causing blank component
  6497. /* istanbul ignore else */
  6498. if ( true && vm.$options.renderError) {
  6499. try {
  6500. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6501. } catch (e) {
  6502. handleError(e, vm, "renderError");
  6503. vnode = vm._vnode;
  6504. }
  6505. } else {
  6506. vnode = vm._vnode;
  6507. }
  6508. } finally {
  6509. currentRenderingInstance = null;
  6510. }
  6511. // if the returned array contains only a single node, allow it
  6512. if (Array.isArray(vnode) && vnode.length === 1) {
  6513. vnode = vnode[0];
  6514. }
  6515. // return empty vnode in case the render function errored out
  6516. if (!(vnode instanceof VNode)) {
  6517. if ( true && Array.isArray(vnode)) {
  6518. warn(
  6519. 'Multiple root nodes returned from render function. Render function ' +
  6520. 'should return a single root node.',
  6521. vm
  6522. );
  6523. }
  6524. vnode = createEmptyVNode();
  6525. }
  6526. // set parent
  6527. vnode.parent = _parentVnode;
  6528. return vnode
  6529. };
  6530. }
  6531. /* */
  6532. function ensureCtor (comp, base) {
  6533. if (
  6534. comp.__esModule ||
  6535. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6536. ) {
  6537. comp = comp.default;
  6538. }
  6539. return isObject(comp)
  6540. ? base.extend(comp)
  6541. : comp
  6542. }
  6543. function createAsyncPlaceholder (
  6544. factory,
  6545. data,
  6546. context,
  6547. children,
  6548. tag
  6549. ) {
  6550. var node = createEmptyVNode();
  6551. node.asyncFactory = factory;
  6552. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6553. return node
  6554. }
  6555. function resolveAsyncComponent (
  6556. factory,
  6557. baseCtor
  6558. ) {
  6559. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6560. return factory.errorComp
  6561. }
  6562. if (isDef(factory.resolved)) {
  6563. return factory.resolved
  6564. }
  6565. var owner = currentRenderingInstance;
  6566. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6567. // already pending
  6568. factory.owners.push(owner);
  6569. }
  6570. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6571. return factory.loadingComp
  6572. }
  6573. if (owner && !isDef(factory.owners)) {
  6574. var owners = factory.owners = [owner];
  6575. var sync = true;
  6576. var timerLoading = null;
  6577. var timerTimeout = null
  6578. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6579. var forceRender = function (renderCompleted) {
  6580. for (var i = 0, l = owners.length; i < l; i++) {
  6581. (owners[i]).$forceUpdate();
  6582. }
  6583. if (renderCompleted) {
  6584. owners.length = 0;
  6585. if (timerLoading !== null) {
  6586. clearTimeout(timerLoading);
  6587. timerLoading = null;
  6588. }
  6589. if (timerTimeout !== null) {
  6590. clearTimeout(timerTimeout);
  6591. timerTimeout = null;
  6592. }
  6593. }
  6594. };
  6595. var resolve = once(function (res) {
  6596. // cache resolved
  6597. factory.resolved = ensureCtor(res, baseCtor);
  6598. // invoke callbacks only if this is not a synchronous resolve
  6599. // (async resolves are shimmed as synchronous during SSR)
  6600. if (!sync) {
  6601. forceRender(true);
  6602. } else {
  6603. owners.length = 0;
  6604. }
  6605. });
  6606. var reject = once(function (reason) {
  6607. true && warn(
  6608. "Failed to resolve async component: " + (String(factory)) +
  6609. (reason ? ("\nReason: " + reason) : '')
  6610. );
  6611. if (isDef(factory.errorComp)) {
  6612. factory.error = true;
  6613. forceRender(true);
  6614. }
  6615. });
  6616. var res = factory(resolve, reject);
  6617. if (isObject(res)) {
  6618. if (isPromise(res)) {
  6619. // () => Promise
  6620. if (isUndef(factory.resolved)) {
  6621. res.then(resolve, reject);
  6622. }
  6623. } else if (isPromise(res.component)) {
  6624. res.component.then(resolve, reject);
  6625. if (isDef(res.error)) {
  6626. factory.errorComp = ensureCtor(res.error, baseCtor);
  6627. }
  6628. if (isDef(res.loading)) {
  6629. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6630. if (res.delay === 0) {
  6631. factory.loading = true;
  6632. } else {
  6633. timerLoading = setTimeout(function () {
  6634. timerLoading = null;
  6635. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6636. factory.loading = true;
  6637. forceRender(false);
  6638. }
  6639. }, res.delay || 200);
  6640. }
  6641. }
  6642. if (isDef(res.timeout)) {
  6643. timerTimeout = setTimeout(function () {
  6644. timerTimeout = null;
  6645. if (isUndef(factory.resolved)) {
  6646. reject(
  6647. true
  6648. ? ("timeout (" + (res.timeout) + "ms)")
  6649. : undefined
  6650. );
  6651. }
  6652. }, res.timeout);
  6653. }
  6654. }
  6655. }
  6656. sync = false;
  6657. // return in case resolved synchronously
  6658. return factory.loading
  6659. ? factory.loadingComp
  6660. : factory.resolved
  6661. }
  6662. }
  6663. /* */
  6664. function isAsyncPlaceholder (node) {
  6665. return node.isComment && node.asyncFactory
  6666. }
  6667. /* */
  6668. function getFirstComponentChild (children) {
  6669. if (Array.isArray(children)) {
  6670. for (var i = 0; i < children.length; i++) {
  6671. var c = children[i];
  6672. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6673. return c
  6674. }
  6675. }
  6676. }
  6677. }
  6678. /* */
  6679. /* */
  6680. function initEvents (vm) {
  6681. vm._events = Object.create(null);
  6682. vm._hasHookEvent = false;
  6683. // init parent attached events
  6684. var listeners = vm.$options._parentListeners;
  6685. if (listeners) {
  6686. updateComponentListeners(vm, listeners);
  6687. }
  6688. }
  6689. var target;
  6690. function add (event, fn) {
  6691. target.$on(event, fn);
  6692. }
  6693. function remove$1 (event, fn) {
  6694. target.$off(event, fn);
  6695. }
  6696. function createOnceHandler (event, fn) {
  6697. var _target = target;
  6698. return function onceHandler () {
  6699. var res = fn.apply(null, arguments);
  6700. if (res !== null) {
  6701. _target.$off(event, onceHandler);
  6702. }
  6703. }
  6704. }
  6705. function updateComponentListeners (
  6706. vm,
  6707. listeners,
  6708. oldListeners
  6709. ) {
  6710. target = vm;
  6711. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6712. target = undefined;
  6713. }
  6714. function eventsMixin (Vue) {
  6715. var hookRE = /^hook:/;
  6716. Vue.prototype.$on = function (event, fn) {
  6717. var vm = this;
  6718. if (Array.isArray(event)) {
  6719. for (var i = 0, l = event.length; i < l; i++) {
  6720. vm.$on(event[i], fn);
  6721. }
  6722. } else {
  6723. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6724. // optimize hook:event cost by using a boolean flag marked at registration
  6725. // instead of a hash lookup
  6726. if (hookRE.test(event)) {
  6727. vm._hasHookEvent = true;
  6728. }
  6729. }
  6730. return vm
  6731. };
  6732. Vue.prototype.$once = function (event, fn) {
  6733. var vm = this;
  6734. function on () {
  6735. vm.$off(event, on);
  6736. fn.apply(vm, arguments);
  6737. }
  6738. on.fn = fn;
  6739. vm.$on(event, on);
  6740. return vm
  6741. };
  6742. Vue.prototype.$off = function (event, fn) {
  6743. var vm = this;
  6744. // all
  6745. if (!arguments.length) {
  6746. vm._events = Object.create(null);
  6747. return vm
  6748. }
  6749. // array of events
  6750. if (Array.isArray(event)) {
  6751. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6752. vm.$off(event[i$1], fn);
  6753. }
  6754. return vm
  6755. }
  6756. // specific event
  6757. var cbs = vm._events[event];
  6758. if (!cbs) {
  6759. return vm
  6760. }
  6761. if (!fn) {
  6762. vm._events[event] = null;
  6763. return vm
  6764. }
  6765. // specific handler
  6766. var cb;
  6767. var i = cbs.length;
  6768. while (i--) {
  6769. cb = cbs[i];
  6770. if (cb === fn || cb.fn === fn) {
  6771. cbs.splice(i, 1);
  6772. break
  6773. }
  6774. }
  6775. return vm
  6776. };
  6777. Vue.prototype.$emit = function (event) {
  6778. var vm = this;
  6779. if (true) {
  6780. var lowerCaseEvent = event.toLowerCase();
  6781. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6782. tip(
  6783. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6784. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6785. "Note that HTML attributes are case-insensitive and you cannot use " +
  6786. "v-on to listen to camelCase events when using in-DOM templates. " +
  6787. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6788. );
  6789. }
  6790. }
  6791. var cbs = vm._events[event];
  6792. if (cbs) {
  6793. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6794. var args = toArray(arguments, 1);
  6795. var info = "event handler for \"" + event + "\"";
  6796. for (var i = 0, l = cbs.length; i < l; i++) {
  6797. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6798. }
  6799. }
  6800. return vm
  6801. };
  6802. }
  6803. /* */
  6804. var activeInstance = null;
  6805. var isUpdatingChildComponent = false;
  6806. function setActiveInstance(vm) {
  6807. var prevActiveInstance = activeInstance;
  6808. activeInstance = vm;
  6809. return function () {
  6810. activeInstance = prevActiveInstance;
  6811. }
  6812. }
  6813. function initLifecycle (vm) {
  6814. var options = vm.$options;
  6815. // locate first non-abstract parent
  6816. var parent = options.parent;
  6817. if (parent && !options.abstract) {
  6818. while (parent.$options.abstract && parent.$parent) {
  6819. parent = parent.$parent;
  6820. }
  6821. parent.$children.push(vm);
  6822. }
  6823. vm.$parent = parent;
  6824. vm.$root = parent ? parent.$root : vm;
  6825. vm.$children = [];
  6826. vm.$refs = {};
  6827. vm._watcher = null;
  6828. vm._inactive = null;
  6829. vm._directInactive = false;
  6830. vm._isMounted = false;
  6831. vm._isDestroyed = false;
  6832. vm._isBeingDestroyed = false;
  6833. }
  6834. function lifecycleMixin (Vue) {
  6835. Vue.prototype._update = function (vnode, hydrating) {
  6836. var vm = this;
  6837. var prevEl = vm.$el;
  6838. var prevVnode = vm._vnode;
  6839. var restoreActiveInstance = setActiveInstance(vm);
  6840. vm._vnode = vnode;
  6841. // Vue.prototype.__patch__ is injected in entry points
  6842. // based on the rendering backend used.
  6843. if (!prevVnode) {
  6844. // initial render
  6845. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6846. } else {
  6847. // updates
  6848. vm.$el = vm.__patch__(prevVnode, vnode);
  6849. }
  6850. restoreActiveInstance();
  6851. // update __vue__ reference
  6852. if (prevEl) {
  6853. prevEl.__vue__ = null;
  6854. }
  6855. if (vm.$el) {
  6856. vm.$el.__vue__ = vm;
  6857. }
  6858. // if parent is an HOC, update its $el as well
  6859. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6860. vm.$parent.$el = vm.$el;
  6861. }
  6862. // updated hook is called by the scheduler to ensure that children are
  6863. // updated in a parent's updated hook.
  6864. };
  6865. Vue.prototype.$forceUpdate = function () {
  6866. var vm = this;
  6867. if (vm._watcher) {
  6868. vm._watcher.update();
  6869. }
  6870. };
  6871. Vue.prototype.$destroy = function () {
  6872. var vm = this;
  6873. if (vm._isBeingDestroyed) {
  6874. return
  6875. }
  6876. callHook(vm, 'beforeDestroy');
  6877. vm._isBeingDestroyed = true;
  6878. // remove self from parent
  6879. var parent = vm.$parent;
  6880. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6881. remove(parent.$children, vm);
  6882. }
  6883. // teardown watchers
  6884. if (vm._watcher) {
  6885. vm._watcher.teardown();
  6886. }
  6887. var i = vm._watchers.length;
  6888. while (i--) {
  6889. vm._watchers[i].teardown();
  6890. }
  6891. // remove reference from data ob
  6892. // frozen object may not have observer.
  6893. if (vm._data.__ob__) {
  6894. vm._data.__ob__.vmCount--;
  6895. }
  6896. // call the last hook...
  6897. vm._isDestroyed = true;
  6898. // invoke destroy hooks on current rendered tree
  6899. vm.__patch__(vm._vnode, null);
  6900. // fire destroyed hook
  6901. callHook(vm, 'destroyed');
  6902. // turn off all instance listeners.
  6903. vm.$off();
  6904. // remove __vue__ reference
  6905. if (vm.$el) {
  6906. vm.$el.__vue__ = null;
  6907. }
  6908. // release circular reference (#6759)
  6909. if (vm.$vnode) {
  6910. vm.$vnode.parent = null;
  6911. }
  6912. };
  6913. }
  6914. function updateChildComponent (
  6915. vm,
  6916. propsData,
  6917. listeners,
  6918. parentVnode,
  6919. renderChildren
  6920. ) {
  6921. if (true) {
  6922. isUpdatingChildComponent = true;
  6923. }
  6924. // determine whether component has slot children
  6925. // we need to do this before overwriting $options._renderChildren.
  6926. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6927. // dynamic slot names). Static scoped slots compiled from template has the
  6928. // "$stable" marker.
  6929. var newScopedSlots = parentVnode.data.scopedSlots;
  6930. var oldScopedSlots = vm.$scopedSlots;
  6931. var hasDynamicScopedSlot = !!(
  6932. (newScopedSlots && !newScopedSlots.$stable) ||
  6933. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6934. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6935. );
  6936. // Any static slot children from the parent may have changed during parent's
  6937. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6938. // update is necessary to ensure correctness.
  6939. var needsForceUpdate = !!(
  6940. renderChildren || // has new static slots
  6941. vm.$options._renderChildren || // has old static slots
  6942. hasDynamicScopedSlot
  6943. );
  6944. vm.$options._parentVnode = parentVnode;
  6945. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6946. if (vm._vnode) { // update child tree's parent
  6947. vm._vnode.parent = parentVnode;
  6948. }
  6949. vm.$options._renderChildren = renderChildren;
  6950. // update $attrs and $listeners hash
  6951. // these are also reactive so they may trigger child update if the child
  6952. // used them during render
  6953. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6954. vm.$listeners = listeners || emptyObject;
  6955. // update props
  6956. if (propsData && vm.$options.props) {
  6957. toggleObserving(false);
  6958. var props = vm._props;
  6959. var propKeys = vm.$options._propKeys || [];
  6960. for (var i = 0; i < propKeys.length; i++) {
  6961. var key = propKeys[i];
  6962. var propOptions = vm.$options.props; // wtf flow?
  6963. props[key] = validateProp(key, propOptions, propsData, vm);
  6964. }
  6965. toggleObserving(true);
  6966. // keep a copy of raw propsData
  6967. vm.$options.propsData = propsData;
  6968. }
  6969. // fixed by xxxxxx update properties(mp runtime)
  6970. vm._$updateProperties && vm._$updateProperties(vm);
  6971. // update listeners
  6972. listeners = listeners || emptyObject;
  6973. var oldListeners = vm.$options._parentListeners;
  6974. vm.$options._parentListeners = listeners;
  6975. updateComponentListeners(vm, listeners, oldListeners);
  6976. // resolve slots + force update if has children
  6977. if (needsForceUpdate) {
  6978. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  6979. vm.$forceUpdate();
  6980. }
  6981. if (true) {
  6982. isUpdatingChildComponent = false;
  6983. }
  6984. }
  6985. function isInInactiveTree (vm) {
  6986. while (vm && (vm = vm.$parent)) {
  6987. if (vm._inactive) { return true }
  6988. }
  6989. return false
  6990. }
  6991. function activateChildComponent (vm, direct) {
  6992. if (direct) {
  6993. vm._directInactive = false;
  6994. if (isInInactiveTree(vm)) {
  6995. return
  6996. }
  6997. } else if (vm._directInactive) {
  6998. return
  6999. }
  7000. if (vm._inactive || vm._inactive === null) {
  7001. vm._inactive = false;
  7002. for (var i = 0; i < vm.$children.length; i++) {
  7003. activateChildComponent(vm.$children[i]);
  7004. }
  7005. callHook(vm, 'activated');
  7006. }
  7007. }
  7008. function deactivateChildComponent (vm, direct) {
  7009. if (direct) {
  7010. vm._directInactive = true;
  7011. if (isInInactiveTree(vm)) {
  7012. return
  7013. }
  7014. }
  7015. if (!vm._inactive) {
  7016. vm._inactive = true;
  7017. for (var i = 0; i < vm.$children.length; i++) {
  7018. deactivateChildComponent(vm.$children[i]);
  7019. }
  7020. callHook(vm, 'deactivated');
  7021. }
  7022. }
  7023. function callHook (vm, hook) {
  7024. // #7573 disable dep collection when invoking lifecycle hooks
  7025. pushTarget();
  7026. var handlers = vm.$options[hook];
  7027. var info = hook + " hook";
  7028. if (handlers) {
  7029. for (var i = 0, j = handlers.length; i < j; i++) {
  7030. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7031. }
  7032. }
  7033. if (vm._hasHookEvent) {
  7034. vm.$emit('hook:' + hook);
  7035. }
  7036. popTarget();
  7037. }
  7038. /* */
  7039. var MAX_UPDATE_COUNT = 100;
  7040. var queue = [];
  7041. var activatedChildren = [];
  7042. var has = {};
  7043. var circular = {};
  7044. var waiting = false;
  7045. var flushing = false;
  7046. var index = 0;
  7047. /**
  7048. * Reset the scheduler's state.
  7049. */
  7050. function resetSchedulerState () {
  7051. index = queue.length = activatedChildren.length = 0;
  7052. has = {};
  7053. if (true) {
  7054. circular = {};
  7055. }
  7056. waiting = flushing = false;
  7057. }
  7058. // Async edge case #6566 requires saving the timestamp when event listeners are
  7059. // attached. However, calling performance.now() has a perf overhead especially
  7060. // if the page has thousands of event listeners. Instead, we take a timestamp
  7061. // every time the scheduler flushes and use that for all event listeners
  7062. // attached during that flush.
  7063. var currentFlushTimestamp = 0;
  7064. // Async edge case fix requires storing an event listener's attach timestamp.
  7065. var getNow = Date.now;
  7066. // Determine what event timestamp the browser is using. Annoyingly, the
  7067. // timestamp can either be hi-res (relative to page load) or low-res
  7068. // (relative to UNIX epoch), so in order to compare time we have to use the
  7069. // same timestamp type when saving the flush timestamp.
  7070. // All IE versions use low-res event timestamps, and have problematic clock
  7071. // implementations (#9632)
  7072. if (inBrowser && !isIE) {
  7073. var performance = window.performance;
  7074. if (
  7075. performance &&
  7076. typeof performance.now === 'function' &&
  7077. getNow() > document.createEvent('Event').timeStamp
  7078. ) {
  7079. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7080. // smaller than it, it means the event is using a hi-res timestamp,
  7081. // and we need to use the hi-res version for event listener timestamps as
  7082. // well.
  7083. getNow = function () { return performance.now(); };
  7084. }
  7085. }
  7086. /**
  7087. * Flush both queues and run the watchers.
  7088. */
  7089. function flushSchedulerQueue () {
  7090. currentFlushTimestamp = getNow();
  7091. flushing = true;
  7092. var watcher, id;
  7093. // Sort queue before flush.
  7094. // This ensures that:
  7095. // 1. Components are updated from parent to child. (because parent is always
  7096. // created before the child)
  7097. // 2. A component's user watchers are run before its render watcher (because
  7098. // user watchers are created before the render watcher)
  7099. // 3. If a component is destroyed during a parent component's watcher run,
  7100. // its watchers can be skipped.
  7101. queue.sort(function (a, b) { return a.id - b.id; });
  7102. // do not cache length because more watchers might be pushed
  7103. // as we run existing watchers
  7104. for (index = 0; index < queue.length; index++) {
  7105. watcher = queue[index];
  7106. if (watcher.before) {
  7107. watcher.before();
  7108. }
  7109. id = watcher.id;
  7110. has[id] = null;
  7111. watcher.run();
  7112. // in dev build, check and stop circular updates.
  7113. if ( true && has[id] != null) {
  7114. circular[id] = (circular[id] || 0) + 1;
  7115. if (circular[id] > MAX_UPDATE_COUNT) {
  7116. warn(
  7117. 'You may have an infinite update loop ' + (
  7118. watcher.user
  7119. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7120. : "in a component render function."
  7121. ),
  7122. watcher.vm
  7123. );
  7124. break
  7125. }
  7126. }
  7127. }
  7128. // keep copies of post queues before resetting state
  7129. var activatedQueue = activatedChildren.slice();
  7130. var updatedQueue = queue.slice();
  7131. resetSchedulerState();
  7132. // call component updated and activated hooks
  7133. callActivatedHooks(activatedQueue);
  7134. callUpdatedHooks(updatedQueue);
  7135. // devtool hook
  7136. /* istanbul ignore if */
  7137. if (devtools && config.devtools) {
  7138. devtools.emit('flush');
  7139. }
  7140. }
  7141. function callUpdatedHooks (queue) {
  7142. var i = queue.length;
  7143. while (i--) {
  7144. var watcher = queue[i];
  7145. var vm = watcher.vm;
  7146. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7147. callHook(vm, 'updated');
  7148. }
  7149. }
  7150. }
  7151. /**
  7152. * Queue a kept-alive component that was activated during patch.
  7153. * The queue will be processed after the entire tree has been patched.
  7154. */
  7155. function queueActivatedComponent (vm) {
  7156. // setting _inactive to false here so that a render function can
  7157. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7158. vm._inactive = false;
  7159. activatedChildren.push(vm);
  7160. }
  7161. function callActivatedHooks (queue) {
  7162. for (var i = 0; i < queue.length; i++) {
  7163. queue[i]._inactive = true;
  7164. activateChildComponent(queue[i], true /* true */);
  7165. }
  7166. }
  7167. /**
  7168. * Push a watcher into the watcher queue.
  7169. * Jobs with duplicate IDs will be skipped unless it's
  7170. * pushed when the queue is being flushed.
  7171. */
  7172. function queueWatcher (watcher) {
  7173. var id = watcher.id;
  7174. if (has[id] == null) {
  7175. has[id] = true;
  7176. if (!flushing) {
  7177. queue.push(watcher);
  7178. } else {
  7179. // if already flushing, splice the watcher based on its id
  7180. // if already past its id, it will be run next immediately.
  7181. var i = queue.length - 1;
  7182. while (i > index && queue[i].id > watcher.id) {
  7183. i--;
  7184. }
  7185. queue.splice(i + 1, 0, watcher);
  7186. }
  7187. // queue the flush
  7188. if (!waiting) {
  7189. waiting = true;
  7190. if ( true && !config.async) {
  7191. flushSchedulerQueue();
  7192. return
  7193. }
  7194. nextTick(flushSchedulerQueue);
  7195. }
  7196. }
  7197. }
  7198. /* */
  7199. var uid$2 = 0;
  7200. /**
  7201. * A watcher parses an expression, collects dependencies,
  7202. * and fires callback when the expression value changes.
  7203. * This is used for both the $watch() api and directives.
  7204. */
  7205. var Watcher = function Watcher (
  7206. vm,
  7207. expOrFn,
  7208. cb,
  7209. options,
  7210. isRenderWatcher
  7211. ) {
  7212. this.vm = vm;
  7213. if (isRenderWatcher) {
  7214. vm._watcher = this;
  7215. }
  7216. vm._watchers.push(this);
  7217. // options
  7218. if (options) {
  7219. this.deep = !!options.deep;
  7220. this.user = !!options.user;
  7221. this.lazy = !!options.lazy;
  7222. this.sync = !!options.sync;
  7223. this.before = options.before;
  7224. } else {
  7225. this.deep = this.user = this.lazy = this.sync = false;
  7226. }
  7227. this.cb = cb;
  7228. this.id = ++uid$2; // uid for batching
  7229. this.active = true;
  7230. this.dirty = this.lazy; // for lazy watchers
  7231. this.deps = [];
  7232. this.newDeps = [];
  7233. this.depIds = new _Set();
  7234. this.newDepIds = new _Set();
  7235. this.expression = true
  7236. ? expOrFn.toString()
  7237. : undefined;
  7238. // parse expression for getter
  7239. if (typeof expOrFn === 'function') {
  7240. this.getter = expOrFn;
  7241. } else {
  7242. this.getter = parsePath(expOrFn);
  7243. if (!this.getter) {
  7244. this.getter = noop;
  7245. true && warn(
  7246. "Failed watching path: \"" + expOrFn + "\" " +
  7247. 'Watcher only accepts simple dot-delimited paths. ' +
  7248. 'For full control, use a function instead.',
  7249. vm
  7250. );
  7251. }
  7252. }
  7253. this.value = this.lazy
  7254. ? undefined
  7255. : this.get();
  7256. };
  7257. /**
  7258. * Evaluate the getter, and re-collect dependencies.
  7259. */
  7260. Watcher.prototype.get = function get () {
  7261. pushTarget(this);
  7262. var value;
  7263. var vm = this.vm;
  7264. try {
  7265. value = this.getter.call(vm, vm);
  7266. } catch (e) {
  7267. if (this.user) {
  7268. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7269. } else {
  7270. throw e
  7271. }
  7272. } finally {
  7273. // "touch" every property so they are all tracked as
  7274. // dependencies for deep watching
  7275. if (this.deep) {
  7276. traverse(value);
  7277. }
  7278. popTarget();
  7279. this.cleanupDeps();
  7280. }
  7281. return value
  7282. };
  7283. /**
  7284. * Add a dependency to this directive.
  7285. */
  7286. Watcher.prototype.addDep = function addDep (dep) {
  7287. var id = dep.id;
  7288. if (!this.newDepIds.has(id)) {
  7289. this.newDepIds.add(id);
  7290. this.newDeps.push(dep);
  7291. if (!this.depIds.has(id)) {
  7292. dep.addSub(this);
  7293. }
  7294. }
  7295. };
  7296. /**
  7297. * Clean up for dependency collection.
  7298. */
  7299. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7300. var i = this.deps.length;
  7301. while (i--) {
  7302. var dep = this.deps[i];
  7303. if (!this.newDepIds.has(dep.id)) {
  7304. dep.removeSub(this);
  7305. }
  7306. }
  7307. var tmp = this.depIds;
  7308. this.depIds = this.newDepIds;
  7309. this.newDepIds = tmp;
  7310. this.newDepIds.clear();
  7311. tmp = this.deps;
  7312. this.deps = this.newDeps;
  7313. this.newDeps = tmp;
  7314. this.newDeps.length = 0;
  7315. };
  7316. /**
  7317. * Subscriber interface.
  7318. * Will be called when a dependency changes.
  7319. */
  7320. Watcher.prototype.update = function update () {
  7321. /* istanbul ignore else */
  7322. if (this.lazy) {
  7323. this.dirty = true;
  7324. } else if (this.sync) {
  7325. this.run();
  7326. } else {
  7327. queueWatcher(this);
  7328. }
  7329. };
  7330. /**
  7331. * Scheduler job interface.
  7332. * Will be called by the scheduler.
  7333. */
  7334. Watcher.prototype.run = function run () {
  7335. if (this.active) {
  7336. var value = this.get();
  7337. if (
  7338. value !== this.value ||
  7339. // Deep watchers and watchers on Object/Arrays should fire even
  7340. // when the value is the same, because the value may
  7341. // have mutated.
  7342. isObject(value) ||
  7343. this.deep
  7344. ) {
  7345. // set new value
  7346. var oldValue = this.value;
  7347. this.value = value;
  7348. if (this.user) {
  7349. try {
  7350. this.cb.call(this.vm, value, oldValue);
  7351. } catch (e) {
  7352. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7353. }
  7354. } else {
  7355. this.cb.call(this.vm, value, oldValue);
  7356. }
  7357. }
  7358. }
  7359. };
  7360. /**
  7361. * Evaluate the value of the watcher.
  7362. * This only gets called for lazy watchers.
  7363. */
  7364. Watcher.prototype.evaluate = function evaluate () {
  7365. this.value = this.get();
  7366. this.dirty = false;
  7367. };
  7368. /**
  7369. * Depend on all deps collected by this watcher.
  7370. */
  7371. Watcher.prototype.depend = function depend () {
  7372. var i = this.deps.length;
  7373. while (i--) {
  7374. this.deps[i].depend();
  7375. }
  7376. };
  7377. /**
  7378. * Remove self from all dependencies' subscriber list.
  7379. */
  7380. Watcher.prototype.teardown = function teardown () {
  7381. if (this.active) {
  7382. // remove self from vm's watcher list
  7383. // this is a somewhat expensive operation so we skip it
  7384. // if the vm is being destroyed.
  7385. if (!this.vm._isBeingDestroyed) {
  7386. remove(this.vm._watchers, this);
  7387. }
  7388. var i = this.deps.length;
  7389. while (i--) {
  7390. this.deps[i].removeSub(this);
  7391. }
  7392. this.active = false;
  7393. }
  7394. };
  7395. /* */
  7396. var sharedPropertyDefinition = {
  7397. enumerable: true,
  7398. configurable: true,
  7399. get: noop,
  7400. set: noop
  7401. };
  7402. function proxy (target, sourceKey, key) {
  7403. sharedPropertyDefinition.get = function proxyGetter () {
  7404. return this[sourceKey][key]
  7405. };
  7406. sharedPropertyDefinition.set = function proxySetter (val) {
  7407. this[sourceKey][key] = val;
  7408. };
  7409. Object.defineProperty(target, key, sharedPropertyDefinition);
  7410. }
  7411. function initState (vm) {
  7412. vm._watchers = [];
  7413. var opts = vm.$options;
  7414. if (opts.props) { initProps(vm, opts.props); }
  7415. if (opts.methods) { initMethods(vm, opts.methods); }
  7416. if (opts.data) {
  7417. initData(vm);
  7418. } else {
  7419. observe(vm._data = {}, true /* asRootData */);
  7420. }
  7421. if (opts.computed) { initComputed(vm, opts.computed); }
  7422. if (opts.watch && opts.watch !== nativeWatch) {
  7423. initWatch(vm, opts.watch);
  7424. }
  7425. }
  7426. function initProps (vm, propsOptions) {
  7427. var propsData = vm.$options.propsData || {};
  7428. var props = vm._props = {};
  7429. // cache prop keys so that future props updates can iterate using Array
  7430. // instead of dynamic object key enumeration.
  7431. var keys = vm.$options._propKeys = [];
  7432. var isRoot = !vm.$parent;
  7433. // root instance props should be converted
  7434. if (!isRoot) {
  7435. toggleObserving(false);
  7436. }
  7437. var loop = function ( key ) {
  7438. keys.push(key);
  7439. var value = validateProp(key, propsOptions, propsData, vm);
  7440. /* istanbul ignore else */
  7441. if (true) {
  7442. var hyphenatedKey = hyphenate(key);
  7443. if (isReservedAttribute(hyphenatedKey) ||
  7444. config.isReservedAttr(hyphenatedKey)) {
  7445. warn(
  7446. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7447. vm
  7448. );
  7449. }
  7450. defineReactive$$1(props, key, value, function () {
  7451. if (!isRoot && !isUpdatingChildComponent) {
  7452. {
  7453. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7454. return
  7455. }
  7456. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7457. if(
  7458. key === 'value' &&
  7459. Array.isArray(vm.$options.behaviors) &&
  7460. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7461. ){
  7462. return
  7463. }
  7464. if(vm._getFormData){
  7465. return
  7466. }
  7467. var $parent = vm.$parent;
  7468. while($parent){
  7469. if($parent.__next_tick_pending){
  7470. return
  7471. }
  7472. $parent = $parent.$parent;
  7473. }
  7474. }
  7475. warn(
  7476. "Avoid mutating a prop directly since the value will be " +
  7477. "overwritten whenever the parent component re-renders. " +
  7478. "Instead, use a data or computed property based on the prop's " +
  7479. "value. Prop being mutated: \"" + key + "\"",
  7480. vm
  7481. );
  7482. }
  7483. });
  7484. } else {}
  7485. // static props are already proxied on the component's prototype
  7486. // during Vue.extend(). We only need to proxy props defined at
  7487. // instantiation here.
  7488. if (!(key in vm)) {
  7489. proxy(vm, "_props", key);
  7490. }
  7491. };
  7492. for (var key in propsOptions) loop( key );
  7493. toggleObserving(true);
  7494. }
  7495. function initData (vm) {
  7496. var data = vm.$options.data;
  7497. data = vm._data = typeof data === 'function'
  7498. ? getData(data, vm)
  7499. : data || {};
  7500. if (!isPlainObject(data)) {
  7501. data = {};
  7502. true && warn(
  7503. 'data functions should return an object:\n' +
  7504. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7505. vm
  7506. );
  7507. }
  7508. // proxy data on instance
  7509. var keys = Object.keys(data);
  7510. var props = vm.$options.props;
  7511. var methods = vm.$options.methods;
  7512. var i = keys.length;
  7513. while (i--) {
  7514. var key = keys[i];
  7515. if (true) {
  7516. if (methods && hasOwn(methods, key)) {
  7517. warn(
  7518. ("Method \"" + key + "\" has already been defined as a data property."),
  7519. vm
  7520. );
  7521. }
  7522. }
  7523. if (props && hasOwn(props, key)) {
  7524. true && warn(
  7525. "The data property \"" + key + "\" is already declared as a prop. " +
  7526. "Use prop default value instead.",
  7527. vm
  7528. );
  7529. } else if (!isReserved(key)) {
  7530. proxy(vm, "_data", key);
  7531. }
  7532. }
  7533. // observe data
  7534. observe(data, true /* asRootData */);
  7535. }
  7536. function getData (data, vm) {
  7537. // #7573 disable dep collection when invoking data getters
  7538. pushTarget();
  7539. try {
  7540. return data.call(vm, vm)
  7541. } catch (e) {
  7542. handleError(e, vm, "data()");
  7543. return {}
  7544. } finally {
  7545. popTarget();
  7546. }
  7547. }
  7548. var computedWatcherOptions = { lazy: true };
  7549. function initComputed (vm, computed) {
  7550. // $flow-disable-line
  7551. var watchers = vm._computedWatchers = Object.create(null);
  7552. // computed properties are just getters during SSR
  7553. var isSSR = isServerRendering();
  7554. for (var key in computed) {
  7555. var userDef = computed[key];
  7556. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7557. if ( true && getter == null) {
  7558. warn(
  7559. ("Getter is missing for computed property \"" + key + "\"."),
  7560. vm
  7561. );
  7562. }
  7563. if (!isSSR) {
  7564. // create internal watcher for the computed property.
  7565. watchers[key] = new Watcher(
  7566. vm,
  7567. getter || noop,
  7568. noop,
  7569. computedWatcherOptions
  7570. );
  7571. }
  7572. // component-defined computed properties are already defined on the
  7573. // component prototype. We only need to define computed properties defined
  7574. // at instantiation here.
  7575. if (!(key in vm)) {
  7576. defineComputed(vm, key, userDef);
  7577. } else if (true) {
  7578. if (key in vm.$data) {
  7579. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7580. } else if (vm.$options.props && key in vm.$options.props) {
  7581. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7582. }
  7583. }
  7584. }
  7585. }
  7586. function defineComputed (
  7587. target,
  7588. key,
  7589. userDef
  7590. ) {
  7591. var shouldCache = !isServerRendering();
  7592. if (typeof userDef === 'function') {
  7593. sharedPropertyDefinition.get = shouldCache
  7594. ? createComputedGetter(key)
  7595. : createGetterInvoker(userDef);
  7596. sharedPropertyDefinition.set = noop;
  7597. } else {
  7598. sharedPropertyDefinition.get = userDef.get
  7599. ? shouldCache && userDef.cache !== false
  7600. ? createComputedGetter(key)
  7601. : createGetterInvoker(userDef.get)
  7602. : noop;
  7603. sharedPropertyDefinition.set = userDef.set || noop;
  7604. }
  7605. if ( true &&
  7606. sharedPropertyDefinition.set === noop) {
  7607. sharedPropertyDefinition.set = function () {
  7608. warn(
  7609. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7610. this
  7611. );
  7612. };
  7613. }
  7614. Object.defineProperty(target, key, sharedPropertyDefinition);
  7615. }
  7616. function createComputedGetter (key) {
  7617. return function computedGetter () {
  7618. var watcher = this._computedWatchers && this._computedWatchers[key];
  7619. if (watcher) {
  7620. if (watcher.dirty) {
  7621. watcher.evaluate();
  7622. }
  7623. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7624. watcher.depend();
  7625. }
  7626. return watcher.value
  7627. }
  7628. }
  7629. }
  7630. function createGetterInvoker(fn) {
  7631. return function computedGetter () {
  7632. return fn.call(this, this)
  7633. }
  7634. }
  7635. function initMethods (vm, methods) {
  7636. var props = vm.$options.props;
  7637. for (var key in methods) {
  7638. if (true) {
  7639. if (typeof methods[key] !== 'function') {
  7640. warn(
  7641. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7642. "Did you reference the function correctly?",
  7643. vm
  7644. );
  7645. }
  7646. if (props && hasOwn(props, key)) {
  7647. warn(
  7648. ("Method \"" + key + "\" has already been defined as a prop."),
  7649. vm
  7650. );
  7651. }
  7652. if ((key in vm) && isReserved(key)) {
  7653. warn(
  7654. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7655. "Avoid defining component methods that start with _ or $."
  7656. );
  7657. }
  7658. }
  7659. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7660. }
  7661. }
  7662. function initWatch (vm, watch) {
  7663. for (var key in watch) {
  7664. var handler = watch[key];
  7665. if (Array.isArray(handler)) {
  7666. for (var i = 0; i < handler.length; i++) {
  7667. createWatcher(vm, key, handler[i]);
  7668. }
  7669. } else {
  7670. createWatcher(vm, key, handler);
  7671. }
  7672. }
  7673. }
  7674. function createWatcher (
  7675. vm,
  7676. expOrFn,
  7677. handler,
  7678. options
  7679. ) {
  7680. if (isPlainObject(handler)) {
  7681. options = handler;
  7682. handler = handler.handler;
  7683. }
  7684. if (typeof handler === 'string') {
  7685. handler = vm[handler];
  7686. }
  7687. return vm.$watch(expOrFn, handler, options)
  7688. }
  7689. function stateMixin (Vue) {
  7690. // flow somehow has problems with directly declared definition object
  7691. // when using Object.defineProperty, so we have to procedurally build up
  7692. // the object here.
  7693. var dataDef = {};
  7694. dataDef.get = function () { return this._data };
  7695. var propsDef = {};
  7696. propsDef.get = function () { return this._props };
  7697. if (true) {
  7698. dataDef.set = function () {
  7699. warn(
  7700. 'Avoid replacing instance root $data. ' +
  7701. 'Use nested data properties instead.',
  7702. this
  7703. );
  7704. };
  7705. propsDef.set = function () {
  7706. warn("$props is readonly.", this);
  7707. };
  7708. }
  7709. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7710. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7711. Vue.prototype.$set = set;
  7712. Vue.prototype.$delete = del;
  7713. Vue.prototype.$watch = function (
  7714. expOrFn,
  7715. cb,
  7716. options
  7717. ) {
  7718. var vm = this;
  7719. if (isPlainObject(cb)) {
  7720. return createWatcher(vm, expOrFn, cb, options)
  7721. }
  7722. options = options || {};
  7723. options.user = true;
  7724. var watcher = new Watcher(vm, expOrFn, cb, options);
  7725. if (options.immediate) {
  7726. try {
  7727. cb.call(vm, watcher.value);
  7728. } catch (error) {
  7729. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7730. }
  7731. }
  7732. return function unwatchFn () {
  7733. watcher.teardown();
  7734. }
  7735. };
  7736. }
  7737. /* */
  7738. var uid$3 = 0;
  7739. function initMixin (Vue) {
  7740. Vue.prototype._init = function (options) {
  7741. var vm = this;
  7742. // a uid
  7743. vm._uid = uid$3++;
  7744. var startTag, endTag;
  7745. /* istanbul ignore if */
  7746. if ( true && config.performance && mark) {
  7747. startTag = "vue-perf-start:" + (vm._uid);
  7748. endTag = "vue-perf-end:" + (vm._uid);
  7749. mark(startTag);
  7750. }
  7751. // a flag to avoid this being observed
  7752. vm._isVue = true;
  7753. // merge options
  7754. if (options && options._isComponent) {
  7755. // optimize internal component instantiation
  7756. // since dynamic options merging is pretty slow, and none of the
  7757. // internal component options needs special treatment.
  7758. initInternalComponent(vm, options);
  7759. } else {
  7760. vm.$options = mergeOptions(
  7761. resolveConstructorOptions(vm.constructor),
  7762. options || {},
  7763. vm
  7764. );
  7765. }
  7766. /* istanbul ignore else */
  7767. if (true) {
  7768. initProxy(vm);
  7769. } else {}
  7770. // expose real self
  7771. vm._self = vm;
  7772. initLifecycle(vm);
  7773. initEvents(vm);
  7774. initRender(vm);
  7775. callHook(vm, 'beforeCreate');
  7776. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7777. initState(vm);
  7778. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7779. !vm._$fallback && callHook(vm, 'created');
  7780. /* istanbul ignore if */
  7781. if ( true && config.performance && mark) {
  7782. vm._name = formatComponentName(vm, false);
  7783. mark(endTag);
  7784. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7785. }
  7786. if (vm.$options.el) {
  7787. vm.$mount(vm.$options.el);
  7788. }
  7789. };
  7790. }
  7791. function initInternalComponent (vm, options) {
  7792. var opts = vm.$options = Object.create(vm.constructor.options);
  7793. // doing this because it's faster than dynamic enumeration.
  7794. var parentVnode = options._parentVnode;
  7795. opts.parent = options.parent;
  7796. opts._parentVnode = parentVnode;
  7797. var vnodeComponentOptions = parentVnode.componentOptions;
  7798. opts.propsData = vnodeComponentOptions.propsData;
  7799. opts._parentListeners = vnodeComponentOptions.listeners;
  7800. opts._renderChildren = vnodeComponentOptions.children;
  7801. opts._componentTag = vnodeComponentOptions.tag;
  7802. if (options.render) {
  7803. opts.render = options.render;
  7804. opts.staticRenderFns = options.staticRenderFns;
  7805. }
  7806. }
  7807. function resolveConstructorOptions (Ctor) {
  7808. var options = Ctor.options;
  7809. if (Ctor.super) {
  7810. var superOptions = resolveConstructorOptions(Ctor.super);
  7811. var cachedSuperOptions = Ctor.superOptions;
  7812. if (superOptions !== cachedSuperOptions) {
  7813. // super option changed,
  7814. // need to resolve new options.
  7815. Ctor.superOptions = superOptions;
  7816. // check if there are any late-modified/attached options (#4976)
  7817. var modifiedOptions = resolveModifiedOptions(Ctor);
  7818. // update base extend options
  7819. if (modifiedOptions) {
  7820. extend(Ctor.extendOptions, modifiedOptions);
  7821. }
  7822. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7823. if (options.name) {
  7824. options.components[options.name] = Ctor;
  7825. }
  7826. }
  7827. }
  7828. return options
  7829. }
  7830. function resolveModifiedOptions (Ctor) {
  7831. var modified;
  7832. var latest = Ctor.options;
  7833. var sealed = Ctor.sealedOptions;
  7834. for (var key in latest) {
  7835. if (latest[key] !== sealed[key]) {
  7836. if (!modified) { modified = {}; }
  7837. modified[key] = latest[key];
  7838. }
  7839. }
  7840. return modified
  7841. }
  7842. function Vue (options) {
  7843. if ( true &&
  7844. !(this instanceof Vue)
  7845. ) {
  7846. warn('Vue is a constructor and should be called with the `new` keyword');
  7847. }
  7848. this._init(options);
  7849. }
  7850. initMixin(Vue);
  7851. stateMixin(Vue);
  7852. eventsMixin(Vue);
  7853. lifecycleMixin(Vue);
  7854. renderMixin(Vue);
  7855. /* */
  7856. function initUse (Vue) {
  7857. Vue.use = function (plugin) {
  7858. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7859. if (installedPlugins.indexOf(plugin) > -1) {
  7860. return this
  7861. }
  7862. // additional parameters
  7863. var args = toArray(arguments, 1);
  7864. args.unshift(this);
  7865. if (typeof plugin.install === 'function') {
  7866. plugin.install.apply(plugin, args);
  7867. } else if (typeof plugin === 'function') {
  7868. plugin.apply(null, args);
  7869. }
  7870. installedPlugins.push(plugin);
  7871. return this
  7872. };
  7873. }
  7874. /* */
  7875. function initMixin$1 (Vue) {
  7876. Vue.mixin = function (mixin) {
  7877. this.options = mergeOptions(this.options, mixin);
  7878. return this
  7879. };
  7880. }
  7881. /* */
  7882. function initExtend (Vue) {
  7883. /**
  7884. * Each instance constructor, including Vue, has a unique
  7885. * cid. This enables us to create wrapped "child
  7886. * constructors" for prototypal inheritance and cache them.
  7887. */
  7888. Vue.cid = 0;
  7889. var cid = 1;
  7890. /**
  7891. * Class inheritance
  7892. */
  7893. Vue.extend = function (extendOptions) {
  7894. extendOptions = extendOptions || {};
  7895. var Super = this;
  7896. var SuperId = Super.cid;
  7897. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7898. if (cachedCtors[SuperId]) {
  7899. return cachedCtors[SuperId]
  7900. }
  7901. var name = extendOptions.name || Super.options.name;
  7902. if ( true && name) {
  7903. validateComponentName(name);
  7904. }
  7905. var Sub = function VueComponent (options) {
  7906. this._init(options);
  7907. };
  7908. Sub.prototype = Object.create(Super.prototype);
  7909. Sub.prototype.constructor = Sub;
  7910. Sub.cid = cid++;
  7911. Sub.options = mergeOptions(
  7912. Super.options,
  7913. extendOptions
  7914. );
  7915. Sub['super'] = Super;
  7916. // For props and computed properties, we define the proxy getters on
  7917. // the Vue instances at extension time, on the extended prototype. This
  7918. // avoids Object.defineProperty calls for each instance created.
  7919. if (Sub.options.props) {
  7920. initProps$1(Sub);
  7921. }
  7922. if (Sub.options.computed) {
  7923. initComputed$1(Sub);
  7924. }
  7925. // allow further extension/mixin/plugin usage
  7926. Sub.extend = Super.extend;
  7927. Sub.mixin = Super.mixin;
  7928. Sub.use = Super.use;
  7929. // create asset registers, so extended classes
  7930. // can have their private assets too.
  7931. ASSET_TYPES.forEach(function (type) {
  7932. Sub[type] = Super[type];
  7933. });
  7934. // enable recursive self-lookup
  7935. if (name) {
  7936. Sub.options.components[name] = Sub;
  7937. }
  7938. // keep a reference to the super options at extension time.
  7939. // later at instantiation we can check if Super's options have
  7940. // been updated.
  7941. Sub.superOptions = Super.options;
  7942. Sub.extendOptions = extendOptions;
  7943. Sub.sealedOptions = extend({}, Sub.options);
  7944. // cache constructor
  7945. cachedCtors[SuperId] = Sub;
  7946. return Sub
  7947. };
  7948. }
  7949. function initProps$1 (Comp) {
  7950. var props = Comp.options.props;
  7951. for (var key in props) {
  7952. proxy(Comp.prototype, "_props", key);
  7953. }
  7954. }
  7955. function initComputed$1 (Comp) {
  7956. var computed = Comp.options.computed;
  7957. for (var key in computed) {
  7958. defineComputed(Comp.prototype, key, computed[key]);
  7959. }
  7960. }
  7961. /* */
  7962. function initAssetRegisters (Vue) {
  7963. /**
  7964. * Create asset registration methods.
  7965. */
  7966. ASSET_TYPES.forEach(function (type) {
  7967. Vue[type] = function (
  7968. id,
  7969. definition
  7970. ) {
  7971. if (!definition) {
  7972. return this.options[type + 's'][id]
  7973. } else {
  7974. /* istanbul ignore if */
  7975. if ( true && type === 'component') {
  7976. validateComponentName(id);
  7977. }
  7978. if (type === 'component' && isPlainObject(definition)) {
  7979. definition.name = definition.name || id;
  7980. definition = this.options._base.extend(definition);
  7981. }
  7982. if (type === 'directive' && typeof definition === 'function') {
  7983. definition = { bind: definition, update: definition };
  7984. }
  7985. this.options[type + 's'][id] = definition;
  7986. return definition
  7987. }
  7988. };
  7989. });
  7990. }
  7991. /* */
  7992. function getComponentName (opts) {
  7993. return opts && (opts.Ctor.options.name || opts.tag)
  7994. }
  7995. function matches (pattern, name) {
  7996. if (Array.isArray(pattern)) {
  7997. return pattern.indexOf(name) > -1
  7998. } else if (typeof pattern === 'string') {
  7999. return pattern.split(',').indexOf(name) > -1
  8000. } else if (isRegExp(pattern)) {
  8001. return pattern.test(name)
  8002. }
  8003. /* istanbul ignore next */
  8004. return false
  8005. }
  8006. function pruneCache (keepAliveInstance, filter) {
  8007. var cache = keepAliveInstance.cache;
  8008. var keys = keepAliveInstance.keys;
  8009. var _vnode = keepAliveInstance._vnode;
  8010. for (var key in cache) {
  8011. var cachedNode = cache[key];
  8012. if (cachedNode) {
  8013. var name = getComponentName(cachedNode.componentOptions);
  8014. if (name && !filter(name)) {
  8015. pruneCacheEntry(cache, key, keys, _vnode);
  8016. }
  8017. }
  8018. }
  8019. }
  8020. function pruneCacheEntry (
  8021. cache,
  8022. key,
  8023. keys,
  8024. current
  8025. ) {
  8026. var cached$$1 = cache[key];
  8027. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8028. cached$$1.componentInstance.$destroy();
  8029. }
  8030. cache[key] = null;
  8031. remove(keys, key);
  8032. }
  8033. var patternTypes = [String, RegExp, Array];
  8034. var KeepAlive = {
  8035. name: 'keep-alive',
  8036. abstract: true,
  8037. props: {
  8038. include: patternTypes,
  8039. exclude: patternTypes,
  8040. max: [String, Number]
  8041. },
  8042. created: function created () {
  8043. this.cache = Object.create(null);
  8044. this.keys = [];
  8045. },
  8046. destroyed: function destroyed () {
  8047. for (var key in this.cache) {
  8048. pruneCacheEntry(this.cache, key, this.keys);
  8049. }
  8050. },
  8051. mounted: function mounted () {
  8052. var this$1 = this;
  8053. this.$watch('include', function (val) {
  8054. pruneCache(this$1, function (name) { return matches(val, name); });
  8055. });
  8056. this.$watch('exclude', function (val) {
  8057. pruneCache(this$1, function (name) { return !matches(val, name); });
  8058. });
  8059. },
  8060. render: function render () {
  8061. var slot = this.$slots.default;
  8062. var vnode = getFirstComponentChild(slot);
  8063. var componentOptions = vnode && vnode.componentOptions;
  8064. if (componentOptions) {
  8065. // check pattern
  8066. var name = getComponentName(componentOptions);
  8067. var ref = this;
  8068. var include = ref.include;
  8069. var exclude = ref.exclude;
  8070. if (
  8071. // not included
  8072. (include && (!name || !matches(include, name))) ||
  8073. // excluded
  8074. (exclude && name && matches(exclude, name))
  8075. ) {
  8076. return vnode
  8077. }
  8078. var ref$1 = this;
  8079. var cache = ref$1.cache;
  8080. var keys = ref$1.keys;
  8081. var key = vnode.key == null
  8082. // same constructor may get registered as different local components
  8083. // so cid alone is not enough (#3269)
  8084. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8085. : vnode.key;
  8086. if (cache[key]) {
  8087. vnode.componentInstance = cache[key].componentInstance;
  8088. // make current key freshest
  8089. remove(keys, key);
  8090. keys.push(key);
  8091. } else {
  8092. cache[key] = vnode;
  8093. keys.push(key);
  8094. // prune oldest entry
  8095. if (this.max && keys.length > parseInt(this.max)) {
  8096. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8097. }
  8098. }
  8099. vnode.data.keepAlive = true;
  8100. }
  8101. return vnode || (slot && slot[0])
  8102. }
  8103. };
  8104. var builtInComponents = {
  8105. KeepAlive: KeepAlive
  8106. };
  8107. /* */
  8108. function initGlobalAPI (Vue) {
  8109. // config
  8110. var configDef = {};
  8111. configDef.get = function () { return config; };
  8112. if (true) {
  8113. configDef.set = function () {
  8114. warn(
  8115. 'Do not replace the Vue.config object, set individual fields instead.'
  8116. );
  8117. };
  8118. }
  8119. Object.defineProperty(Vue, 'config', configDef);
  8120. // exposed util methods.
  8121. // NOTE: these are not considered part of the public API - avoid relying on
  8122. // them unless you are aware of the risk.
  8123. Vue.util = {
  8124. warn: warn,
  8125. extend: extend,
  8126. mergeOptions: mergeOptions,
  8127. defineReactive: defineReactive$$1
  8128. };
  8129. Vue.set = set;
  8130. Vue.delete = del;
  8131. Vue.nextTick = nextTick;
  8132. // 2.6 explicit observable API
  8133. Vue.observable = function (obj) {
  8134. observe(obj);
  8135. return obj
  8136. };
  8137. Vue.options = Object.create(null);
  8138. ASSET_TYPES.forEach(function (type) {
  8139. Vue.options[type + 's'] = Object.create(null);
  8140. });
  8141. // this is used to identify the "base" constructor to extend all plain-object
  8142. // components with in Weex's multi-instance scenarios.
  8143. Vue.options._base = Vue;
  8144. extend(Vue.options.components, builtInComponents);
  8145. initUse(Vue);
  8146. initMixin$1(Vue);
  8147. initExtend(Vue);
  8148. initAssetRegisters(Vue);
  8149. }
  8150. initGlobalAPI(Vue);
  8151. Object.defineProperty(Vue.prototype, '$isServer', {
  8152. get: isServerRendering
  8153. });
  8154. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8155. get: function get () {
  8156. /* istanbul ignore next */
  8157. return this.$vnode && this.$vnode.ssrContext
  8158. }
  8159. });
  8160. // expose FunctionalRenderContext for ssr runtime helper installation
  8161. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8162. value: FunctionalRenderContext
  8163. });
  8164. Vue.version = '2.6.11';
  8165. /**
  8166. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8167. */
  8168. var ARRAYTYPE = '[object Array]';
  8169. var OBJECTTYPE = '[object Object]';
  8170. var NULLTYPE = '[object Null]';
  8171. var UNDEFINEDTYPE = '[object Undefined]';
  8172. // const FUNCTIONTYPE = '[object Function]'
  8173. function diff(current, pre) {
  8174. var result = {};
  8175. syncKeys(current, pre);
  8176. _diff(current, pre, '', result);
  8177. return result
  8178. }
  8179. function syncKeys(current, pre) {
  8180. if (current === pre) { return }
  8181. var rootCurrentType = type(current);
  8182. var rootPreType = type(pre);
  8183. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8184. if(Object.keys(current).length >= Object.keys(pre).length){
  8185. for (var key in pre) {
  8186. var currentValue = current[key];
  8187. if (currentValue === undefined) {
  8188. current[key] = null;
  8189. } else {
  8190. syncKeys(currentValue, pre[key]);
  8191. }
  8192. }
  8193. }
  8194. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8195. if (current.length >= pre.length) {
  8196. pre.forEach(function (item, index) {
  8197. syncKeys(current[index], item);
  8198. });
  8199. }
  8200. }
  8201. }
  8202. function nullOrUndefined(currentType, preType) {
  8203. if(
  8204. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8205. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8206. ) {
  8207. return false
  8208. }
  8209. return true
  8210. }
  8211. function _diff(current, pre, path, result) {
  8212. if (current === pre) { return }
  8213. var rootCurrentType = type(current);
  8214. var rootPreType = type(pre);
  8215. if (rootCurrentType == OBJECTTYPE) {
  8216. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8217. setResult(result, path, current);
  8218. } else {
  8219. var loop = function ( key ) {
  8220. var currentValue = current[key];
  8221. var preValue = pre[key];
  8222. var currentType = type(currentValue);
  8223. var preType = type(preValue);
  8224. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8225. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8226. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8227. }
  8228. } else if (currentType == ARRAYTYPE) {
  8229. if (preType != ARRAYTYPE) {
  8230. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8231. } else {
  8232. if (currentValue.length < preValue.length) {
  8233. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8234. } else {
  8235. currentValue.forEach(function (item, index) {
  8236. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8237. });
  8238. }
  8239. }
  8240. } else if (currentType == OBJECTTYPE) {
  8241. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8242. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8243. } else {
  8244. for (var subKey in currentValue) {
  8245. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8246. }
  8247. }
  8248. }
  8249. };
  8250. for (var key in current) loop( key );
  8251. }
  8252. } else if (rootCurrentType == ARRAYTYPE) {
  8253. if (rootPreType != ARRAYTYPE) {
  8254. setResult(result, path, current);
  8255. } else {
  8256. if (current.length < pre.length) {
  8257. setResult(result, path, current);
  8258. } else {
  8259. current.forEach(function (item, index) {
  8260. _diff(item, pre[index], path + '[' + index + ']', result);
  8261. });
  8262. }
  8263. }
  8264. } else {
  8265. setResult(result, path, current);
  8266. }
  8267. }
  8268. function setResult(result, k, v) {
  8269. // if (type(v) != FUNCTIONTYPE) {
  8270. result[k] = v;
  8271. // }
  8272. }
  8273. function type(obj) {
  8274. return Object.prototype.toString.call(obj)
  8275. }
  8276. /* */
  8277. function flushCallbacks$1(vm) {
  8278. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8279. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"速立保","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8280. var mpInstance = vm.$scope;
  8281. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8282. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8283. }
  8284. var copies = vm.__next_tick_callbacks.slice(0);
  8285. vm.__next_tick_callbacks.length = 0;
  8286. for (var i = 0; i < copies.length; i++) {
  8287. copies[i]();
  8288. }
  8289. }
  8290. }
  8291. function hasRenderWatcher(vm) {
  8292. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8293. }
  8294. function nextTick$1(vm, cb) {
  8295. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8296. //2.nextTick 之前存在 render watcher
  8297. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8298. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"速立保","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8299. var mpInstance = vm.$scope;
  8300. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8301. ']:nextVueTick');
  8302. }
  8303. return nextTick(cb, vm)
  8304. }else{
  8305. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"速立保","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8306. var mpInstance$1 = vm.$scope;
  8307. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8308. ']:nextMPTick');
  8309. }
  8310. }
  8311. var _resolve;
  8312. if (!vm.__next_tick_callbacks) {
  8313. vm.__next_tick_callbacks = [];
  8314. }
  8315. vm.__next_tick_callbacks.push(function () {
  8316. if (cb) {
  8317. try {
  8318. cb.call(vm);
  8319. } catch (e) {
  8320. handleError(e, vm, 'nextTick');
  8321. }
  8322. } else if (_resolve) {
  8323. _resolve(vm);
  8324. }
  8325. });
  8326. // $flow-disable-line
  8327. if (!cb && typeof Promise !== 'undefined') {
  8328. return new Promise(function (resolve) {
  8329. _resolve = resolve;
  8330. })
  8331. }
  8332. }
  8333. /* */
  8334. function clearInstance(key, value) {
  8335. // 简易去除 Vue 和小程序组件实例
  8336. if (value) {
  8337. if (value._isVue || value.__v_isMPComponent) {
  8338. return {}
  8339. }
  8340. }
  8341. return value
  8342. }
  8343. function cloneWithData(vm) {
  8344. // 确保当前 vm 所有数据被同步
  8345. var ret = Object.create(null);
  8346. var dataKeys = [].concat(
  8347. Object.keys(vm._data || {}),
  8348. Object.keys(vm._computedWatchers || {}));
  8349. dataKeys.reduce(function(ret, key) {
  8350. ret[key] = vm[key];
  8351. return ret
  8352. }, ret);
  8353. // vue-composition-api
  8354. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8355. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8356. if (rawBindings) {
  8357. Object.keys(rawBindings).forEach(function (key) {
  8358. ret[key] = vm[key];
  8359. });
  8360. }
  8361. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8362. Object.assign(ret, vm.$mp.data || {});
  8363. if (
  8364. Array.isArray(vm.$options.behaviors) &&
  8365. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8366. ) { //form-field
  8367. ret['name'] = vm.name;
  8368. ret['value'] = vm.value;
  8369. }
  8370. return JSON.parse(JSON.stringify(ret, clearInstance))
  8371. }
  8372. var patch = function(oldVnode, vnode) {
  8373. var this$1 = this;
  8374. if (vnode === null) { //destroy
  8375. return
  8376. }
  8377. if (this.mpType === 'page' || this.mpType === 'component') {
  8378. var mpInstance = this.$scope;
  8379. var data = Object.create(null);
  8380. try {
  8381. data = cloneWithData(this);
  8382. } catch (err) {
  8383. console.error(err);
  8384. }
  8385. data.__webviewId__ = mpInstance.data.__webviewId__;
  8386. var mpData = Object.create(null);
  8387. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8388. mpData[key] = mpInstance.data[key];
  8389. });
  8390. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8391. if (Object.keys(diffData).length) {
  8392. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"速立保","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8393. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8394. ']差量更新',
  8395. JSON.stringify(diffData));
  8396. }
  8397. this.__next_tick_pending = true;
  8398. mpInstance.setData(diffData, function () {
  8399. this$1.__next_tick_pending = false;
  8400. flushCallbacks$1(this$1);
  8401. });
  8402. } else {
  8403. flushCallbacks$1(this);
  8404. }
  8405. }
  8406. };
  8407. /* */
  8408. function createEmptyRender() {
  8409. }
  8410. function mountComponent$1(
  8411. vm,
  8412. el,
  8413. hydrating
  8414. ) {
  8415. if (!vm.mpType) {//main.js 中的 new Vue
  8416. return vm
  8417. }
  8418. if (vm.mpType === 'app') {
  8419. vm.$options.render = createEmptyRender;
  8420. }
  8421. if (!vm.$options.render) {
  8422. vm.$options.render = createEmptyRender;
  8423. if (true) {
  8424. /* istanbul ignore if */
  8425. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8426. vm.$options.el || el) {
  8427. warn(
  8428. 'You are using the runtime-only build of Vue where the template ' +
  8429. 'compiler is not available. Either pre-compile the templates into ' +
  8430. 'render functions, or use the compiler-included build.',
  8431. vm
  8432. );
  8433. } else {
  8434. warn(
  8435. 'Failed to mount component: template or render function not defined.',
  8436. vm
  8437. );
  8438. }
  8439. }
  8440. }
  8441. !vm._$fallback && callHook(vm, 'beforeMount');
  8442. var updateComponent = function () {
  8443. vm._update(vm._render(), hydrating);
  8444. };
  8445. // we set this to vm._watcher inside the watcher's constructor
  8446. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8447. // component's mounted hook), which relies on vm._watcher being already defined
  8448. new Watcher(vm, updateComponent, noop, {
  8449. before: function before() {
  8450. if (vm._isMounted && !vm._isDestroyed) {
  8451. callHook(vm, 'beforeUpdate');
  8452. }
  8453. }
  8454. }, true /* isRenderWatcher */);
  8455. hydrating = false;
  8456. return vm
  8457. }
  8458. /* */
  8459. function renderClass (
  8460. staticClass,
  8461. dynamicClass
  8462. ) {
  8463. if (isDef(staticClass) || isDef(dynamicClass)) {
  8464. return concat(staticClass, stringifyClass(dynamicClass))
  8465. }
  8466. /* istanbul ignore next */
  8467. return ''
  8468. }
  8469. function concat (a, b) {
  8470. return a ? b ? (a + ' ' + b) : a : (b || '')
  8471. }
  8472. function stringifyClass (value) {
  8473. if (Array.isArray(value)) {
  8474. return stringifyArray(value)
  8475. }
  8476. if (isObject(value)) {
  8477. return stringifyObject(value)
  8478. }
  8479. if (typeof value === 'string') {
  8480. return value
  8481. }
  8482. /* istanbul ignore next */
  8483. return ''
  8484. }
  8485. function stringifyArray (value) {
  8486. var res = '';
  8487. var stringified;
  8488. for (var i = 0, l = value.length; i < l; i++) {
  8489. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8490. if (res) { res += ' '; }
  8491. res += stringified;
  8492. }
  8493. }
  8494. return res
  8495. }
  8496. function stringifyObject (value) {
  8497. var res = '';
  8498. for (var key in value) {
  8499. if (value[key]) {
  8500. if (res) { res += ' '; }
  8501. res += key;
  8502. }
  8503. }
  8504. return res
  8505. }
  8506. /* */
  8507. var parseStyleText = cached(function (cssText) {
  8508. var res = {};
  8509. var listDelimiter = /;(?![^(]*\))/g;
  8510. var propertyDelimiter = /:(.+)/;
  8511. cssText.split(listDelimiter).forEach(function (item) {
  8512. if (item) {
  8513. var tmp = item.split(propertyDelimiter);
  8514. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8515. }
  8516. });
  8517. return res
  8518. });
  8519. // normalize possible array / string values into Object
  8520. function normalizeStyleBinding (bindingStyle) {
  8521. if (Array.isArray(bindingStyle)) {
  8522. return toObject(bindingStyle)
  8523. }
  8524. if (typeof bindingStyle === 'string') {
  8525. return parseStyleText(bindingStyle)
  8526. }
  8527. return bindingStyle
  8528. }
  8529. /* */
  8530. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8531. function getTarget(obj, path) {
  8532. var parts = path.split('.');
  8533. var key = parts[0];
  8534. if (key.indexOf('__$n') === 0) { //number index
  8535. key = parseInt(key.replace('__$n', ''));
  8536. }
  8537. if (parts.length === 1) {
  8538. return obj[key]
  8539. }
  8540. return getTarget(obj[key], parts.slice(1).join('.'))
  8541. }
  8542. function internalMixin(Vue) {
  8543. Vue.config.errorHandler = function(err, vm, info) {
  8544. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8545. console.error(err);
  8546. /* eslint-disable no-undef */
  8547. var app = typeof getApp === 'function' && getApp();
  8548. if (app && app.onError) {
  8549. app.onError(err);
  8550. }
  8551. };
  8552. var oldEmit = Vue.prototype.$emit;
  8553. Vue.prototype.$emit = function(event) {
  8554. if (this.$scope && event) {
  8555. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8556. if (triggerEvent) {
  8557. try {
  8558. triggerEvent.call(this.$scope, event, {
  8559. __args__: toArray(arguments, 1)
  8560. });
  8561. } catch (error) {
  8562. }
  8563. }
  8564. }
  8565. return oldEmit.apply(this, arguments)
  8566. };
  8567. Vue.prototype.$nextTick = function(fn) {
  8568. return nextTick$1(this, fn)
  8569. };
  8570. MP_METHODS.forEach(function (method) {
  8571. Vue.prototype[method] = function(args) {
  8572. if (this.$scope && this.$scope[method]) {
  8573. return this.$scope[method](args)
  8574. }
  8575. // mp-alipay
  8576. if (typeof my === 'undefined') {
  8577. return
  8578. }
  8579. if (method === 'createSelectorQuery') {
  8580. /* eslint-disable no-undef */
  8581. return my.createSelectorQuery(args)
  8582. } else if (method === 'createIntersectionObserver') {
  8583. /* eslint-disable no-undef */
  8584. return my.createIntersectionObserver(args)
  8585. }
  8586. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8587. };
  8588. });
  8589. Vue.prototype.__init_provide = initProvide;
  8590. Vue.prototype.__init_injections = initInjections;
  8591. Vue.prototype.__call_hook = function(hook, args) {
  8592. var vm = this;
  8593. // #7573 disable dep collection when invoking lifecycle hooks
  8594. pushTarget();
  8595. var handlers = vm.$options[hook];
  8596. var info = hook + " hook";
  8597. var ret;
  8598. if (handlers) {
  8599. for (var i = 0, j = handlers.length; i < j; i++) {
  8600. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8601. }
  8602. }
  8603. if (vm._hasHookEvent) {
  8604. vm.$emit('hook:' + hook, args);
  8605. }
  8606. popTarget();
  8607. return ret
  8608. };
  8609. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8610. if (Array.isArray(modifiers)) {
  8611. if (modifiers.indexOf('trim') !== -1) {
  8612. value = value.trim();
  8613. }
  8614. if (modifiers.indexOf('number') !== -1) {
  8615. value = this._n(value);
  8616. }
  8617. }
  8618. if (!target) {
  8619. target = this;
  8620. }
  8621. // 解决动态属性添加
  8622. Vue.set(target, key, value);
  8623. };
  8624. Vue.prototype.__set_sync = function(target, key, value) {
  8625. if (!target) {
  8626. target = this;
  8627. }
  8628. // 解决动态属性添加
  8629. Vue.set(target, key, value);
  8630. };
  8631. Vue.prototype.__get_orig = function(item) {
  8632. if (isPlainObject(item)) {
  8633. return item['$orig'] || item
  8634. }
  8635. return item
  8636. };
  8637. Vue.prototype.__get_value = function(dataPath, target) {
  8638. return getTarget(target || this, dataPath)
  8639. };
  8640. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8641. return renderClass(staticClass, dynamicClass)
  8642. };
  8643. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8644. if (!dynamicStyle && !staticStyle) {
  8645. return ''
  8646. }
  8647. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8648. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8649. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8650. };
  8651. Vue.prototype.__map = function(val, iteratee) {
  8652. //TODO 暂不考虑 string
  8653. var ret, i, l, keys, key;
  8654. if (Array.isArray(val)) {
  8655. ret = new Array(val.length);
  8656. for (i = 0, l = val.length; i < l; i++) {
  8657. ret[i] = iteratee(val[i], i);
  8658. }
  8659. return ret
  8660. } else if (isObject(val)) {
  8661. keys = Object.keys(val);
  8662. ret = Object.create(null);
  8663. for (i = 0, l = keys.length; i < l; i++) {
  8664. key = keys[i];
  8665. ret[key] = iteratee(val[key], key, i);
  8666. }
  8667. return ret
  8668. } else if (typeof val === 'number') {
  8669. ret = new Array(val);
  8670. for (i = 0, l = val; i < l; i++) {
  8671. // 第一个参数暂时仍和小程序一致
  8672. ret[i] = iteratee(i, i);
  8673. }
  8674. return ret
  8675. }
  8676. return []
  8677. };
  8678. }
  8679. /* */
  8680. var LIFECYCLE_HOOKS$1 = [
  8681. //App
  8682. 'onLaunch',
  8683. 'onShow',
  8684. 'onHide',
  8685. 'onUniNViewMessage',
  8686. 'onPageNotFound',
  8687. 'onThemeChange',
  8688. 'onError',
  8689. 'onUnhandledRejection',
  8690. //Page
  8691. 'onInit',
  8692. 'onLoad',
  8693. // 'onShow',
  8694. 'onReady',
  8695. // 'onHide',
  8696. 'onUnload',
  8697. 'onPullDownRefresh',
  8698. 'onReachBottom',
  8699. 'onTabItemTap',
  8700. 'onAddToFavorites',
  8701. 'onShareTimeline',
  8702. 'onShareAppMessage',
  8703. 'onResize',
  8704. 'onPageScroll',
  8705. 'onNavigationBarButtonTap',
  8706. 'onBackPress',
  8707. 'onNavigationBarSearchInputChanged',
  8708. 'onNavigationBarSearchInputConfirmed',
  8709. 'onNavigationBarSearchInputClicked',
  8710. 'onUploadDouyinVideo',
  8711. 'onNFCReadMessage',
  8712. //Component
  8713. // 'onReady', // 兼容旧版本,应该移除该事件
  8714. 'onPageShow',
  8715. 'onPageHide',
  8716. 'onPageResize'
  8717. ];
  8718. function lifecycleMixin$1(Vue) {
  8719. //fixed vue-class-component
  8720. var oldExtend = Vue.extend;
  8721. Vue.extend = function(extendOptions) {
  8722. extendOptions = extendOptions || {};
  8723. var methods = extendOptions.methods;
  8724. if (methods) {
  8725. Object.keys(methods).forEach(function (methodName) {
  8726. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8727. extendOptions[methodName] = methods[methodName];
  8728. delete methods[methodName];
  8729. }
  8730. });
  8731. }
  8732. return oldExtend.call(this, extendOptions)
  8733. };
  8734. var strategies = Vue.config.optionMergeStrategies;
  8735. var mergeHook = strategies.created;
  8736. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8737. strategies[hook] = mergeHook;
  8738. });
  8739. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8740. }
  8741. /* */
  8742. // install platform patch function
  8743. Vue.prototype.__patch__ = patch;
  8744. // public mount method
  8745. Vue.prototype.$mount = function(
  8746. el ,
  8747. hydrating
  8748. ) {
  8749. return mountComponent$1(this, el, hydrating)
  8750. };
  8751. lifecycleMixin$1(Vue);
  8752. internalMixin(Vue);
  8753. /* */
  8754. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8755. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8756. /***/ }),
  8757. /***/ 255:
  8758. /*!*******************************************************************!*\
  8759. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/mixin/components_color.js ***!
  8760. \*******************************************************************/
  8761. /*! no static exports found */
  8762. /***/ (function(module, exports) {
  8763. module.exports = {
  8764. data: function data() {},
  8765. props: {
  8766. // 背景颜色
  8767. backgroundColor: {
  8768. type: String,
  8769. default: ''
  8770. },
  8771. // 字体颜色
  8772. fontColor: {
  8773. type: String,
  8774. default: ''
  8775. },
  8776. // 字体大小
  8777. fontSize: {
  8778. type: Number,
  8779. default: 0
  8780. },
  8781. // 字体大小单位
  8782. fontUnit: {
  8783. type: String,
  8784. default: 'rpx'
  8785. }
  8786. },
  8787. computed: {
  8788. backgroundColorStyle: function backgroundColorStyle() {
  8789. return this.$t.color.getBackgroundColorStyle(this.backgroundColor);
  8790. },
  8791. backgroundColorClass: function backgroundColorClass() {
  8792. return this.$t.color.getBackgroundColorInternalClass(this.backgroundColor);
  8793. },
  8794. fontColorStyle: function fontColorStyle() {
  8795. return this.$t.color.getFontColorStyle(this.fontColor);
  8796. },
  8797. fontColorClass: function fontColorClass() {
  8798. return this.$t.color.getFontColorInternalClass(this.fontColor);
  8799. },
  8800. fontSizeStyle: function fontSizeStyle() {
  8801. return this.$t.string.getLengthUnitValue(this.fontSize, this.fontUnit);
  8802. }
  8803. },
  8804. methods: {}
  8805. };
  8806. /***/ }),
  8807. /***/ 26:
  8808. /*!*************************************!*\
  8809. !*** E:/盈通/sulibao-mini/pages.json ***!
  8810. \*************************************/
  8811. /*! no static exports found */
  8812. /***/ (function(module, exports) {
  8813. /***/ }),
  8814. /***/ 268:
  8815. /*!************************************************************************!*\
  8816. !*** E:/盈通/sulibao-mini/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js ***!
  8817. \************************************************************************/
  8818. /*! no static exports found */
  8819. /***/ (function(module, exports, __webpack_require__) {
  8820. "use strict";
  8821. Object.defineProperty(exports, "__esModule", {
  8822. value: true
  8823. });
  8824. exports.default = void 0;
  8825. var _default = {
  8826. // 将自定义节点设置成虚拟的(去掉自定义组件包裹层),更加接近Vue组件的表现,能更好的使用flex属性
  8827. options: {
  8828. virtualHost: true
  8829. }
  8830. };
  8831. exports.default = _default;
  8832. /***/ }),
  8833. /***/ 269:
  8834. /*!**********************************************************************!*\
  8835. !*** E:/盈通/sulibao-mini/uni_modules/uv-ui-tools/libs/mixin/mixin.js ***!
  8836. \**********************************************************************/
  8837. /*! no static exports found */
  8838. /***/ (function(module, exports, __webpack_require__) {
  8839. "use strict";
  8840. /* WEBPACK VAR INJECTION */(function(uni) {
  8841. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  8842. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  8843. Object.defineProperty(exports, "__esModule", {
  8844. value: true
  8845. });
  8846. exports.default = void 0;
  8847. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  8848. var index = _interopRequireWildcard(__webpack_require__(/*! ../function/index.js */ 270));
  8849. var test = _interopRequireWildcard(__webpack_require__(/*! ../function/test.js */ 271));
  8850. var _route = _interopRequireDefault(__webpack_require__(/*! ../util/route.js */ 274));
  8851. var _debounce = _interopRequireDefault(__webpack_require__(/*! ../function/debounce.js */ 275));
  8852. var _throttle = _interopRequireDefault(__webpack_require__(/*! ../function/throttle.js */ 276));
  8853. function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
  8854. function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
  8855. 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; }
  8856. 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; }
  8857. var _default2 = {
  8858. // 定义每个组件都可能需要用到的外部样式以及类名
  8859. props: {
  8860. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  8861. customStyle: {
  8862. type: [Object, String],
  8863. default: function _default() {
  8864. return {};
  8865. }
  8866. },
  8867. customClass: {
  8868. type: String,
  8869. default: ''
  8870. },
  8871. // 跳转的页面路径
  8872. url: {
  8873. type: String,
  8874. default: ''
  8875. },
  8876. // 页面跳转的类型
  8877. linkType: {
  8878. type: String,
  8879. default: 'navigateTo'
  8880. }
  8881. },
  8882. data: function data() {
  8883. return {};
  8884. },
  8885. onLoad: function onLoad() {
  8886. // getRect挂载到$uv上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  8887. this.$uv.getRect = this.$uvGetRect;
  8888. },
  8889. created: function created() {
  8890. // 组件当中,只有created声明周期,为了能在组件使用,故也在created中将方法挂载到$uv
  8891. this.$uv.getRect = this.$uvGetRect;
  8892. },
  8893. computed: {
  8894. $uv: function $uv() {
  8895. var _uni, _uni$$uv, _uni$$uv$config;
  8896. return _objectSpread(_objectSpread({}, index), {}, {
  8897. test: test,
  8898. route: _route.default,
  8899. debounce: _debounce.default,
  8900. throttle: _throttle.default,
  8901. unit: (_uni = uni) === null || _uni === void 0 ? void 0 : (_uni$$uv = _uni.$uv) === null || _uni$$uv === void 0 ? void 0 : (_uni$$uv$config = _uni$$uv.config) === null || _uni$$uv$config === void 0 ? void 0 : _uni$$uv$config.unit
  8902. });
  8903. },
  8904. /**
  8905. * 生成bem规则类名
  8906. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  8907. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  8908. * @param {String} name 组件名称
  8909. * @param {Array} fixed 一直会存在的类名
  8910. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  8911. * @returns {Array|string}
  8912. */
  8913. bem: function bem() {
  8914. return function (name, fixed, change) {
  8915. var _this = this;
  8916. // 类名前缀
  8917. var prefix = "uv-".concat(name, "--");
  8918. var classes = {};
  8919. if (fixed) {
  8920. fixed.map(function (item) {
  8921. // 这里的类名,会一直存在
  8922. classes[prefix + _this[item]] = true;
  8923. });
  8924. }
  8925. if (change) {
  8926. change.map(function (item) {
  8927. // 这里的类名,会根据this[item]的值为true或者false,而进行添加或者移除某一个类
  8928. _this[item] ? classes[prefix + item] = _this[item] : delete classes[prefix + item];
  8929. });
  8930. }
  8931. return Object.keys(classes);
  8932. // 支付宝,头条小程序无法动态绑定一个数组类名,否则解析出来的结果会带有",",而导致失效
  8933. };
  8934. }
  8935. },
  8936. methods: {
  8937. // 跳转某一个页面
  8938. openPage: function openPage() {
  8939. var urlKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'url';
  8940. var url = this[urlKey];
  8941. if (url) {
  8942. // 执行类似uni.navigateTo的方法
  8943. uni[this.linkType]({
  8944. url: url
  8945. });
  8946. }
  8947. },
  8948. // 查询节点信息
  8949. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  8950. // 解决办法为在组件根部再套一个没有任何作用的view元素
  8951. $uvGetRect: function $uvGetRect(selector, all) {
  8952. var _this2 = this;
  8953. return new Promise(function (resolve) {
  8954. uni.createSelectorQuery().in(_this2)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  8955. if (all && Array.isArray(rect) && rect.length) {
  8956. resolve(rect);
  8957. }
  8958. if (!all && rect) {
  8959. resolve(rect);
  8960. }
  8961. }).exec();
  8962. });
  8963. },
  8964. getParentData: function getParentData() {
  8965. var _this3 = this;
  8966. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  8967. // 避免在created中去定义parent变量
  8968. if (!this.parent) this.parent = {};
  8969. // 这里的本质原理是,通过获取父组件实例(也即类似uv-radio的父组件uv-radio-group的this)
  8970. // 将父组件this中对应的参数,赋值给本组件(uv-radio的this)的parentData对象中对应的属性
  8971. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  8972. // 此处并不会自动更新子组件的数据,而是依赖父组件uv-radio-group去监听data的变化,手动调用更新子组件的方法去重新获取
  8973. this.parent = this.$uv.$parent.call(this, parentName);
  8974. if (this.parent.children) {
  8975. // 如果父组件的children不存在本组件的实例,才将本实例添加到父组件的children中
  8976. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  8977. }
  8978. if (this.parent && this.parentData) {
  8979. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  8980. Object.keys(this.parentData).map(function (key) {
  8981. _this3.parentData[key] = _this3.parent[key];
  8982. });
  8983. }
  8984. },
  8985. // 阻止事件冒泡
  8986. preventEvent: function preventEvent(e) {
  8987. e && typeof e.stopPropagation === 'function' && e.stopPropagation();
  8988. },
  8989. // 空操作
  8990. noop: function noop(e) {
  8991. this.preventEvent(e);
  8992. }
  8993. },
  8994. onReachBottom: function onReachBottom() {
  8995. uni.$emit('uvOnReachBottom');
  8996. },
  8997. beforeDestroy: function beforeDestroy() {
  8998. var _this4 = this;
  8999. // 判断当前页面是否存在parent和chldren,一般在checkbox和checkbox-group父子联动的场景会有此情况
  9000. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  9001. if (this.parent && test.array(this.parent.children)) {
  9002. // 组件销毁时,移除父组件中的children数组中对应的实例
  9003. var childrenList = this.parent.children;
  9004. childrenList.map(function (child, index) {
  9005. // 如果相等,则移除
  9006. if (child === _this4) {
  9007. childrenList.splice(index, 1);
  9008. }
  9009. });
  9010. }
  9011. },
  9012. // 兼容vue3
  9013. unmounted: function unmounted() {
  9014. var _this5 = this;
  9015. if (this.parent && test.array(this.parent.children)) {
  9016. // 组件销毁时,移除父组件中的children数组中对应的实例
  9017. var childrenList = this.parent.children;
  9018. childrenList.map(function (child, index) {
  9019. // 如果相等,则移除
  9020. if (child === _this5) {
  9021. childrenList.splice(index, 1);
  9022. }
  9023. });
  9024. }
  9025. }
  9026. };
  9027. exports.default = _default2;
  9028. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9029. /***/ }),
  9030. /***/ 270:
  9031. /*!*************************************************************************!*\
  9032. !*** E:/盈通/sulibao-mini/uni_modules/uv-ui-tools/libs/function/index.js ***!
  9033. \*************************************************************************/
  9034. /*! no static exports found */
  9035. /***/ (function(module, exports, __webpack_require__) {
  9036. "use strict";
  9037. /* WEBPACK VAR INJECTION */(function(uni) {
  9038. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9039. Object.defineProperty(exports, "__esModule", {
  9040. value: true
  9041. });
  9042. exports.$parent = $parent;
  9043. exports.addStyle = addStyle;
  9044. exports.addUnit = addUnit;
  9045. exports.deepClone = deepClone;
  9046. exports.deepMerge = deepMerge;
  9047. exports.error = error;
  9048. exports.formValidate = formValidate;
  9049. exports.getDuration = getDuration;
  9050. exports.getHistoryPage = getHistoryPage;
  9051. exports.getProperty = getProperty;
  9052. exports.getPx = getPx;
  9053. exports.guid = guid;
  9054. exports.os = os;
  9055. exports.padZero = padZero;
  9056. exports.page = page;
  9057. exports.pages = pages;
  9058. exports.priceFormat = priceFormat;
  9059. exports.queryParams = queryParams;
  9060. exports.random = random;
  9061. exports.randomArray = randomArray;
  9062. exports.range = range;
  9063. exports.setConfig = setConfig;
  9064. exports.setProperty = setProperty;
  9065. exports.sleep = sleep;
  9066. exports.sys = sys;
  9067. exports.timeFormat = timeFormat;
  9068. exports.timeFrom = timeFrom;
  9069. exports.toast = toast;
  9070. exports.trim = trim;
  9071. exports.type2icon = type2icon;
  9072. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  9073. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9074. var _test = __webpack_require__(/*! ./test.js */ 271);
  9075. var _digit = __webpack_require__(/*! ./digit.js */ 272);
  9076. /**
  9077. * @description 如果value小于min,取min;如果value大于max,取max
  9078. * @param {number} min
  9079. * @param {number} max
  9080. * @param {number} value
  9081. */
  9082. function range() {
  9083. var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  9084. var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  9085. var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  9086. return Math.max(min, Math.min(max, Number(value)));
  9087. }
  9088. /**
  9089. * @description 用于获取用户传递值的px值 如果用户传递了"xxpx"或者"xxrpx",取出其数值部分,如果是"xxxrpx"还需要用过uni.upx2px进行转换
  9090. * @param {number|string} value 用户传递值的px值
  9091. * @param {boolean} unit
  9092. * @returns {number|string}
  9093. */
  9094. function getPx(value) {
  9095. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  9096. if ((0, _test.number)(value)) {
  9097. return unit ? "".concat(value, "px") : Number(value);
  9098. }
  9099. // 如果带有rpx,先取出其数值部分,再转为px值
  9100. if (/(rpx|upx)$/.test(value)) {
  9101. return unit ? "".concat(uni.upx2px(parseInt(value)), "px") : Number(uni.upx2px(parseInt(value)));
  9102. }
  9103. return unit ? "".concat(parseInt(value), "px") : parseInt(value);
  9104. }
  9105. /**
  9106. * @description 进行延时,以达到可以简写代码的目的 比如: await uni.$uv.sleep(20)将会阻塞20ms
  9107. * @param {number} value 堵塞时间 单位ms 毫秒
  9108. * @returns {Promise} 返回promise
  9109. */
  9110. function sleep() {
  9111. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 30;
  9112. return new Promise(function (resolve) {
  9113. setTimeout(function () {
  9114. resolve();
  9115. }, value);
  9116. });
  9117. }
  9118. /**
  9119. * @description 运行期判断平台
  9120. * @returns {string} 返回所在平台(小写)
  9121. * @link 运行期判断平台 https://uniapp.dcloud.io/frame?id=判断平台
  9122. */
  9123. function os() {
  9124. return uni.getSystemInfoSync().platform.toLowerCase();
  9125. }
  9126. /**
  9127. * @description 获取系统信息同步接口
  9128. * @link 获取系统信息同步接口 https://uniapp.dcloud.io/api/system/info?id=getsysteminfosync
  9129. */
  9130. function sys() {
  9131. return uni.getSystemInfoSync();
  9132. }
  9133. /**
  9134. * @description 取一个区间数
  9135. * @param {Number} min 最小值
  9136. * @param {Number} max 最大值
  9137. */
  9138. function random(min, max) {
  9139. if (min >= 0 && max > 0 && max >= min) {
  9140. var gab = max - min + 1;
  9141. return Math.floor(Math.random() * gab + min);
  9142. }
  9143. return 0;
  9144. }
  9145. /**
  9146. * @param {Number} len uuid的长度
  9147. * @param {Boolean} firstU 将返回的首字母置为"u"
  9148. * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  9149. */
  9150. function guid() {
  9151. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  9152. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  9153. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  9154. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  9155. var uuid = [];
  9156. radix = radix || chars.length;
  9157. if (len) {
  9158. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  9159. for (var i = 0; i < len; i++) {
  9160. uuid[i] = chars[0 | Math.random() * radix];
  9161. }
  9162. } else {
  9163. var r;
  9164. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  9165. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  9166. uuid[14] = '4';
  9167. for (var _i = 0; _i < 36; _i++) {
  9168. if (!uuid[_i]) {
  9169. r = 0 | Math.random() * 16;
  9170. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  9171. }
  9172. }
  9173. }
  9174. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
  9175. if (firstU) {
  9176. uuid.shift();
  9177. return "u".concat(uuid.join(''));
  9178. }
  9179. return uuid.join('');
  9180. }
  9181. /**
  9182. * @description 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  9183. this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  9184. 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  9185. 值(默认为undefined),就是查找最顶层的$parent
  9186. * @param {string|undefined} name 父组件的参数名
  9187. */
  9188. function $parent() {
  9189. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  9190. var parent = this.$parent;
  9191. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  9192. while (parent) {
  9193. // 父组件
  9194. if (parent.$options && parent.$options.name !== name) {
  9195. // 如果组件的name不相等,继续上一级寻找
  9196. parent = parent.$parent;
  9197. } else {
  9198. return parent;
  9199. }
  9200. }
  9201. return false;
  9202. }
  9203. /**
  9204. * @description 样式转换
  9205. * 对象转字符串,或者字符串转对象
  9206. * @param {object | string} customStyle 需要转换的目标
  9207. * @param {String} target 转换的目的,object-转为对象,string-转为字符串
  9208. * @returns {object|string}
  9209. */
  9210. function addStyle(customStyle) {
  9211. var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'object';
  9212. // 字符串转字符串,对象转对象情形,直接返回
  9213. if ((0, _test.empty)(customStyle) || (0, _typeof2.default)(customStyle) === 'object' && target === 'object' || target === 'string' && typeof customStyle === 'string') {
  9214. return customStyle;
  9215. }
  9216. // 字符串转对象
  9217. if (target === 'object') {
  9218. // 去除字符串样式中的两端空格(中间的空格不能去掉,比如padding: 20px 0如果去掉了就错了),空格是无用的
  9219. customStyle = trim(customStyle);
  9220. // 根据";"将字符串转为数组形式
  9221. var styleArray = customStyle.split(';');
  9222. var style = {};
  9223. // 历遍数组,拼接成对象
  9224. for (var i = 0; i < styleArray.length; i++) {
  9225. // 'font-size:20px;color:red;',如此最后字符串有";"的话,会导致styleArray最后一个元素为空字符串,这里需要过滤
  9226. if (styleArray[i]) {
  9227. var item = styleArray[i].split(':');
  9228. style[trim(item[0])] = trim(item[1]);
  9229. }
  9230. }
  9231. return style;
  9232. }
  9233. // 这里为对象转字符串形式
  9234. var string = '';
  9235. for (var _i2 in customStyle) {
  9236. // 驼峰转为中划线的形式,否则css内联样式,无法识别驼峰样式属性名
  9237. var key = _i2.replace(/([A-Z])/g, '-$1').toLowerCase();
  9238. string += "".concat(key, ":").concat(customStyle[_i2], ";");
  9239. }
  9240. // 去除两端空格
  9241. return trim(string);
  9242. }
  9243. /**
  9244. * @description 添加单位,如果有rpx,upx,%,px等单位结尾或者值为auto,直接返回,否则加上px单位结尾
  9245. * @param {string|number} value 需要添加单位的值
  9246. * @param {string} unit 添加的单位名 比如px
  9247. */
  9248. function addUnit() {
  9249. var _uni, _uni$$uv, _uni$$uv$config, _uni2, _uni2$$uv, _uni2$$uv$config;
  9250. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  9251. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (_uni = uni) !== null && _uni !== void 0 && (_uni$$uv = _uni.$uv) !== null && _uni$$uv !== void 0 && (_uni$$uv$config = _uni$$uv.config) !== null && _uni$$uv$config !== void 0 && _uni$$uv$config.unit ? (_uni2 = uni) === null || _uni2 === void 0 ? void 0 : (_uni2$$uv = _uni2.$uv) === null || _uni2$$uv === void 0 ? void 0 : (_uni2$$uv$config = _uni2$$uv.config) === null || _uni2$$uv$config === void 0 ? void 0 : _uni2$$uv$config.unit : 'px';
  9252. value = String(value);
  9253. // 用uvui内置验证规则中的number判断是否为数值
  9254. return (0, _test.number)(value) ? "".concat(value).concat(unit) : value;
  9255. }
  9256. /**
  9257. * @description 深度克隆
  9258. * @param {object} obj 需要深度克隆的对象
  9259. * @param cache 缓存
  9260. * @returns {*} 克隆后的对象或者原值(不是对象)
  9261. */
  9262. function deepClone(obj) {
  9263. var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new WeakMap();
  9264. if (obj === null || (0, _typeof2.default)(obj) !== 'object') return obj;
  9265. if (cache.has(obj)) return cache.get(obj);
  9266. var clone;
  9267. if (obj instanceof Date) {
  9268. clone = new Date(obj.getTime());
  9269. } else if (obj instanceof RegExp) {
  9270. clone = new RegExp(obj);
  9271. } else if (obj instanceof Map) {
  9272. clone = new Map(Array.from(obj, function (_ref) {
  9273. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  9274. key = _ref2[0],
  9275. value = _ref2[1];
  9276. return [key, deepClone(value, cache)];
  9277. }));
  9278. } else if (obj instanceof Set) {
  9279. clone = new Set(Array.from(obj, function (value) {
  9280. return deepClone(value, cache);
  9281. }));
  9282. } else if (Array.isArray(obj)) {
  9283. clone = obj.map(function (value) {
  9284. return deepClone(value, cache);
  9285. });
  9286. } else if (Object.prototype.toString.call(obj) === '[object Object]') {
  9287. clone = Object.create(Object.getPrototypeOf(obj));
  9288. cache.set(obj, clone);
  9289. for (var _i3 = 0, _Object$entries = Object.entries(obj); _i3 < _Object$entries.length; _i3++) {
  9290. var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i3], 2),
  9291. key = _Object$entries$_i[0],
  9292. value = _Object$entries$_i[1];
  9293. clone[key] = deepClone(value, cache);
  9294. }
  9295. } else {
  9296. clone = Object.assign({}, obj);
  9297. }
  9298. cache.set(obj, clone);
  9299. return clone;
  9300. }
  9301. /**
  9302. * @description JS对象深度合并
  9303. * @param {object} target 需要拷贝的对象
  9304. * @param {object} source 拷贝的来源对象
  9305. * @returns {object|boolean} 深度合并后的对象或者false(入参有不是对象)
  9306. */
  9307. function deepMerge() {
  9308. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9309. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9310. target = deepClone(target);
  9311. if ((0, _typeof2.default)(target) !== 'object' || target === null || (0, _typeof2.default)(source) !== 'object' || source === null) return target;
  9312. var merged = Array.isArray(target) ? target.slice() : Object.assign({}, target);
  9313. for (var prop in source) {
  9314. if (!source.hasOwnProperty(prop)) continue;
  9315. var sourceValue = source[prop];
  9316. var targetValue = merged[prop];
  9317. if (sourceValue instanceof Date) {
  9318. merged[prop] = new Date(sourceValue);
  9319. } else if (sourceValue instanceof RegExp) {
  9320. merged[prop] = new RegExp(sourceValue);
  9321. } else if (sourceValue instanceof Map) {
  9322. merged[prop] = new Map(sourceValue);
  9323. } else if (sourceValue instanceof Set) {
  9324. merged[prop] = new Set(sourceValue);
  9325. } else if ((0, _typeof2.default)(sourceValue) === 'object' && sourceValue !== null) {
  9326. merged[prop] = deepMerge(targetValue, sourceValue);
  9327. } else {
  9328. merged[prop] = sourceValue;
  9329. }
  9330. }
  9331. return merged;
  9332. }
  9333. /**
  9334. * @description error提示
  9335. * @param {*} err 错误内容
  9336. */
  9337. function error(err) {
  9338. // 开发环境才提示,生产环境不会提示
  9339. if (true) {
  9340. console.error("uvui\u63D0\u793A\uFF1A".concat(err));
  9341. }
  9342. }
  9343. /**
  9344. * @description 打乱数组
  9345. * @param {array} array 需要打乱的数组
  9346. * @returns {array} 打乱后的数组
  9347. */
  9348. function randomArray() {
  9349. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  9350. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  9351. return array.sort(function () {
  9352. return Math.random() - 0.5;
  9353. });
  9354. }
  9355. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  9356. // 所以这里做一个兼容polyfill的兼容处理
  9357. if (!String.prototype.padStart) {
  9358. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  9359. String.prototype.padStart = function (maxLength) {
  9360. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  9361. if (Object.prototype.toString.call(fillString) !== '[object String]') {
  9362. throw new TypeError('fillString must be String');
  9363. }
  9364. var str = this;
  9365. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  9366. if (str.length >= maxLength) return String(str);
  9367. var fillLength = maxLength - str.length;
  9368. var times = Math.ceil(fillLength / fillString.length);
  9369. while (times >>= 1) {
  9370. fillString += fillString;
  9371. if (times === 1) {
  9372. fillString += fillString;
  9373. }
  9374. }
  9375. return fillString.slice(0, fillLength) + str;
  9376. };
  9377. }
  9378. /**
  9379. * @description 格式化时间
  9380. * @param {String|Number} dateTime 需要格式化的时间戳
  9381. * @param {String} fmt 格式化规则 yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合 默认yyyy-mm-dd
  9382. * @returns {string} 返回格式化后的字符串
  9383. */
  9384. function timeFormat() {
  9385. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  9386. var formatStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  9387. var date;
  9388. // 若传入时间为假值,则取当前时间
  9389. if (!dateTime) {
  9390. date = new Date();
  9391. }
  9392. // 若为unix秒时间戳,则转为毫秒时间戳(逻辑有点奇怪,但不敢改,以保证历史兼容)
  9393. else if (/^\d{10}$/.test(dateTime === null || dateTime === void 0 ? void 0 : dateTime.toString().trim())) {
  9394. date = new Date(dateTime * 1000);
  9395. }
  9396. // 若用户传入字符串格式时间戳,new Date无法解析,需做兼容
  9397. else if (typeof dateTime === 'string' && /^\d+$/.test(dateTime.trim())) {
  9398. date = new Date(Number(dateTime));
  9399. }
  9400. // 处理平台性差异,在Safari/Webkit中,new Date仅支持/作为分割符的字符串时间
  9401. // 处理 '2022-07-10 01:02:03',跳过 '2022-07-10T01:02:03'
  9402. else if (typeof dateTime === 'string' && dateTime.includes('-') && !dateTime.includes('T')) {
  9403. date = new Date(dateTime.replace(/-/g, '/'));
  9404. }
  9405. // 其他都认为符合 RFC 2822 规范
  9406. else {
  9407. date = new Date(dateTime);
  9408. }
  9409. var timeSource = {
  9410. 'y': date.getFullYear().toString(),
  9411. // 年
  9412. 'm': (date.getMonth() + 1).toString().padStart(2, '0'),
  9413. // 月
  9414. 'd': date.getDate().toString().padStart(2, '0'),
  9415. // 日
  9416. 'h': date.getHours().toString().padStart(2, '0'),
  9417. // 时
  9418. 'M': date.getMinutes().toString().padStart(2, '0'),
  9419. // 分
  9420. 's': date.getSeconds().toString().padStart(2, '0') // 秒
  9421. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  9422. };
  9423. for (var key in timeSource) {
  9424. var _ref3 = new RegExp("".concat(key, "+")).exec(formatStr) || [],
  9425. _ref4 = (0, _slicedToArray2.default)(_ref3, 1),
  9426. ret = _ref4[0];
  9427. if (ret) {
  9428. // 年可能只需展示两位
  9429. var beginIndex = key === 'y' && ret.length === 2 ? 2 : 0;
  9430. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  9431. }
  9432. }
  9433. return formatStr;
  9434. }
  9435. /**
  9436. * @description 时间戳转为多久之前
  9437. * @param {String|Number} timestamp 时间戳
  9438. * @param {String|Boolean} format
  9439. * 格式化规则如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  9440. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  9441. * @returns {string} 转化后的内容
  9442. */
  9443. function timeFrom() {
  9444. var timestamp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  9445. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  9446. if (timestamp == null) timestamp = Number(new Date());
  9447. timestamp = parseInt(timestamp);
  9448. // 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位)
  9449. if (timestamp.toString().length == 10) timestamp *= 1000;
  9450. var timer = new Date().getTime() - timestamp;
  9451. timer = parseInt(timer / 1000);
  9452. // 如果小于5分钟,则返回"刚刚",其他以此类推
  9453. var tips = '';
  9454. switch (true) {
  9455. case timer < 300:
  9456. tips = '刚刚';
  9457. break;
  9458. case timer >= 300 && timer < 3600:
  9459. tips = "".concat(parseInt(timer / 60), "\u5206\u949F\u524D");
  9460. break;
  9461. case timer >= 3600 && timer < 86400:
  9462. tips = "".concat(parseInt(timer / 3600), "\u5C0F\u65F6\u524D");
  9463. break;
  9464. case timer >= 86400 && timer < 2592000:
  9465. tips = "".concat(parseInt(timer / 86400), "\u5929\u524D");
  9466. break;
  9467. default:
  9468. // 如果format为false,则无论什么时间戳,都显示xx之前
  9469. if (format === false) {
  9470. if (timer >= 2592000 && timer < 365 * 86400) {
  9471. tips = "".concat(parseInt(timer / (86400 * 30)), "\u4E2A\u6708\u524D");
  9472. } else {
  9473. tips = "".concat(parseInt(timer / (86400 * 365)), "\u5E74\u524D");
  9474. }
  9475. } else {
  9476. tips = timeFormat(timestamp, format);
  9477. }
  9478. }
  9479. return tips;
  9480. }
  9481. /**
  9482. * @description 去除空格
  9483. * @param String str 需要去除空格的字符串
  9484. * @param String pos both(左右)|left|right|all 默认both
  9485. */
  9486. function trim(str) {
  9487. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  9488. str = String(str);
  9489. if (pos == 'both') {
  9490. return str.replace(/^\s+|\s+$/g, '');
  9491. }
  9492. if (pos == 'left') {
  9493. return str.replace(/^\s*/, '');
  9494. }
  9495. if (pos == 'right') {
  9496. return str.replace(/(\s*$)/g, '');
  9497. }
  9498. if (pos == 'all') {
  9499. return str.replace(/\s+/g, '');
  9500. }
  9501. return str;
  9502. }
  9503. /**
  9504. * @description 对象转url参数
  9505. * @param {object} data,对象
  9506. * @param {Boolean} isPrefix,是否自动加上"?"
  9507. * @param {string} arrayFormat 规则 indices|brackets|repeat|comma
  9508. */
  9509. function queryParams() {
  9510. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9511. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  9512. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  9513. var prefix = isPrefix ? '?' : '';
  9514. var _result = [];
  9515. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  9516. var _loop = function _loop(key) {
  9517. var value = data[key];
  9518. // 去掉为空的参数
  9519. if (['', undefined, null].indexOf(value) >= 0) {
  9520. return "continue";
  9521. }
  9522. // 如果值为数组,另行处理
  9523. if (value.constructor === Array) {
  9524. // e.g. {ids: [1, 2, 3]}
  9525. switch (arrayFormat) {
  9526. case 'indices':
  9527. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  9528. for (var i = 0; i < value.length; i++) {
  9529. _result.push("".concat(key, "[").concat(i, "]=").concat(value[i]));
  9530. }
  9531. break;
  9532. case 'brackets':
  9533. // 结果: ids[]=1&ids[]=2&ids[]=3
  9534. value.forEach(function (_value) {
  9535. _result.push("".concat(key, "[]=").concat(_value));
  9536. });
  9537. break;
  9538. case 'repeat':
  9539. // 结果: ids=1&ids=2&ids=3
  9540. value.forEach(function (_value) {
  9541. _result.push("".concat(key, "=").concat(_value));
  9542. });
  9543. break;
  9544. case 'comma':
  9545. // 结果: ids=1,2,3
  9546. var commaStr = '';
  9547. value.forEach(function (_value) {
  9548. commaStr += (commaStr ? ',' : '') + _value;
  9549. });
  9550. _result.push("".concat(key, "=").concat(commaStr));
  9551. break;
  9552. default:
  9553. value.forEach(function (_value) {
  9554. _result.push("".concat(key, "[]=").concat(_value));
  9555. });
  9556. }
  9557. } else {
  9558. _result.push("".concat(key, "=").concat(value));
  9559. }
  9560. };
  9561. for (var key in data) {
  9562. var _ret = _loop(key);
  9563. if (_ret === "continue") continue;
  9564. }
  9565. return _result.length ? prefix + _result.join('&') : '';
  9566. }
  9567. /**
  9568. * 显示消息提示框
  9569. * @param {String} title 提示的内容,长度与 icon 取值有关。
  9570. * @param {Number} duration 提示的延迟时间,单位毫秒,默认:2000
  9571. */
  9572. function toast(title) {
  9573. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
  9574. uni.showToast({
  9575. title: String(title),
  9576. icon: 'none',
  9577. duration: duration
  9578. });
  9579. }
  9580. /**
  9581. * @description 根据主题type值,获取对应的图标
  9582. * @param {String} type 主题名称,primary|info|error|warning|success
  9583. * @param {boolean} fill 是否使用fill填充实体的图标
  9584. */
  9585. function type2icon() {
  9586. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  9587. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  9588. // 如果非预置值,默认为success
  9589. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  9590. var iconName = '';
  9591. // 目前(2019-12-12),info和primary使用同一个图标
  9592. switch (type) {
  9593. case 'primary':
  9594. iconName = 'info-circle';
  9595. break;
  9596. case 'info':
  9597. iconName = 'info-circle';
  9598. break;
  9599. case 'error':
  9600. iconName = 'close-circle';
  9601. break;
  9602. case 'warning':
  9603. iconName = 'error-circle';
  9604. break;
  9605. case 'success':
  9606. iconName = 'checkmark-circle';
  9607. break;
  9608. default:
  9609. iconName = 'checkmark-circle';
  9610. }
  9611. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  9612. if (fill) iconName += '-fill';
  9613. return iconName;
  9614. }
  9615. /**
  9616. * @description 数字格式化
  9617. * @param {number|string} number 要格式化的数字
  9618. * @param {number} decimals 保留几位小数
  9619. * @param {string} decimalPoint 小数点符号
  9620. * @param {string} thousandsSeparator 千分位符号
  9621. * @returns {string} 格式化后的数字
  9622. */
  9623. function priceFormat(number) {
  9624. var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  9625. var decimalPoint = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';
  9626. var thousandsSeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ',';
  9627. number = "".concat(number).replace(/[^0-9+-Ee.]/g, '');
  9628. var n = !isFinite(+number) ? 0 : +number;
  9629. var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  9630. var sep = typeof thousandsSeparator === 'undefined' ? ',' : thousandsSeparator;
  9631. var dec = typeof decimalPoint === 'undefined' ? '.' : decimalPoint;
  9632. var s = '';
  9633. s = (prec ? (0, _digit.round)(n, prec) + '' : "".concat(Math.round(n))).split('.');
  9634. var re = /(-?\d+)(\d{3})/;
  9635. while (re.test(s[0])) {
  9636. s[0] = s[0].replace(re, "$1".concat(sep, "$2"));
  9637. }
  9638. if ((s[1] || '').length < prec) {
  9639. s[1] = s[1] || '';
  9640. s[1] += new Array(prec - s[1].length + 1).join('0');
  9641. }
  9642. return s.join(dec);
  9643. }
  9644. /**
  9645. * @description 获取duration值
  9646. * 如果带有ms或者s直接返回,如果大于一定值,认为是ms单位,小于一定值,认为是s单位
  9647. * 比如以30位阈值,那么300大于30,可以理解为用户想要的是300ms,而不是想花300s去执行一个动画
  9648. * @param {String|number} value 比如: "1s"|"100ms"|1|100
  9649. * @param {boolean} unit 提示: 如果是false 默认返回number
  9650. * @return {string|number}
  9651. */
  9652. function getDuration(value) {
  9653. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  9654. var valueNum = parseInt(value);
  9655. if (unit) {
  9656. if (/s$/.test(value)) return value;
  9657. return value > 30 ? "".concat(value, "ms") : "".concat(value, "s");
  9658. }
  9659. if (/ms$/.test(value)) return valueNum;
  9660. if (/s$/.test(value)) return valueNum > 30 ? valueNum : valueNum * 1000;
  9661. return valueNum;
  9662. }
  9663. /**
  9664. * @description 日期的月或日补零操作
  9665. * @param {String} value 需要补零的值
  9666. */
  9667. function padZero(value) {
  9668. return "00".concat(value).slice(-2);
  9669. }
  9670. /**
  9671. * @description 在uv-form的子组件内容发生变化,或者失去焦点时,尝试通知uv-form执行校验方法
  9672. * @param {*} instance
  9673. * @param {*} event
  9674. */
  9675. function formValidate(instance, event) {
  9676. var formItem = $parent.call(instance, 'uv-form-item');
  9677. var form = $parent.call(instance, 'uv-form');
  9678. // 如果发生变化的input或者textarea等,其父组件中有uv-form-item或者uv-form等,就执行form的validate方法
  9679. // 同时将form-item的pros传递给form,让其进行精确对象验证
  9680. if (formItem && form) {
  9681. form.validateField(formItem.prop, function () {}, event);
  9682. }
  9683. }
  9684. /**
  9685. * @description 获取某个对象下的属性,用于通过类似'a.b.c'的形式去获取一个对象的的属性的形式
  9686. * @param {object} obj 对象
  9687. * @param {string} key 需要获取的属性字段
  9688. * @returns {*}
  9689. */
  9690. function getProperty(obj, key) {
  9691. if (!obj) {
  9692. return;
  9693. }
  9694. if (typeof key !== 'string' || key === '') {
  9695. return '';
  9696. }
  9697. if (key.indexOf('.') !== -1) {
  9698. var keys = key.split('.');
  9699. var firstObj = obj[keys[0]] || {};
  9700. for (var i = 1; i < keys.length; i++) {
  9701. if (firstObj) {
  9702. firstObj = firstObj[keys[i]];
  9703. }
  9704. }
  9705. return firstObj;
  9706. }
  9707. return obj[key];
  9708. }
  9709. /**
  9710. * @description 设置对象的属性值,如果'a.b.c'的形式进行设置
  9711. * @param {object} obj 对象
  9712. * @param {string} key 需要设置的属性
  9713. * @param {string} value 设置的值
  9714. */
  9715. function setProperty(obj, key, value) {
  9716. if (!obj) {
  9717. return;
  9718. }
  9719. // 递归赋值
  9720. var inFn = function inFn(_obj, keys, v) {
  9721. // 最后一个属性key
  9722. if (keys.length === 1) {
  9723. _obj[keys[0]] = v;
  9724. return;
  9725. }
  9726. // 0~length-1个key
  9727. while (keys.length > 1) {
  9728. var k = keys[0];
  9729. if (!_obj[k] || (0, _typeof2.default)(_obj[k]) !== 'object') {
  9730. _obj[k] = {};
  9731. }
  9732. var _key = keys.shift();
  9733. // 自调用判断是否存在属性,不存在则自动创建对象
  9734. inFn(_obj[k], keys, v);
  9735. }
  9736. };
  9737. if (typeof key !== 'string' || key === '') {} else if (key.indexOf('.') !== -1) {
  9738. // 支持多层级赋值操作
  9739. var keys = key.split('.');
  9740. inFn(obj, keys, value);
  9741. } else {
  9742. obj[key] = value;
  9743. }
  9744. }
  9745. /**
  9746. * @description 获取当前页面路径
  9747. */
  9748. function page() {
  9749. var _pages;
  9750. var pages = getCurrentPages();
  9751. var route = (_pages = pages[pages.length - 1]) === null || _pages === void 0 ? void 0 : _pages.route;
  9752. // 某些特殊情况下(比如页面进行redirectTo时的一些时机),pages可能为空数组
  9753. return "/".concat(route ? route : '');
  9754. }
  9755. /**
  9756. * @description 获取当前路由栈实例数组
  9757. */
  9758. function pages() {
  9759. var pages = getCurrentPages();
  9760. return pages;
  9761. }
  9762. /**
  9763. * 获取页面历史栈指定层实例
  9764. * @param back {number} [0] - 0或者负数,表示获取历史栈的哪一层,0表示获取当前页面实例,-1 表示获取上一个页面实例。默认0。
  9765. */
  9766. function getHistoryPage() {
  9767. var back = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  9768. var pages = getCurrentPages();
  9769. var len = pages.length;
  9770. return pages[len - 1 + back];
  9771. }
  9772. /**
  9773. * @description 修改uvui内置属性值
  9774. * @param {object} props 修改内置props属性
  9775. * @param {object} config 修改内置config属性
  9776. * @param {object} color 修改内置color属性
  9777. * @param {object} zIndex 修改内置zIndex属性
  9778. */
  9779. function setConfig(_ref5) {
  9780. var _ref5$props = _ref5.props,
  9781. props = _ref5$props === void 0 ? {} : _ref5$props,
  9782. _ref5$config = _ref5.config,
  9783. config = _ref5$config === void 0 ? {} : _ref5$config,
  9784. _ref5$color = _ref5.color,
  9785. color = _ref5$color === void 0 ? {} : _ref5$color,
  9786. _ref5$zIndex = _ref5.zIndex,
  9787. zIndex = _ref5$zIndex === void 0 ? {} : _ref5$zIndex;
  9788. var deepMerge = uni.$uv.deepMerge;
  9789. uni.$uv.config = deepMerge(uni.$uv.config, config);
  9790. uni.$uv.props = deepMerge(uni.$uv.props, props);
  9791. uni.$uv.color = deepMerge(uni.$uv.color, color);
  9792. uni.$uv.zIndex = deepMerge(uni.$uv.zIndex, zIndex);
  9793. }
  9794. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9795. /***/ }),
  9796. /***/ 271:
  9797. /*!************************************************************************!*\
  9798. !*** E:/盈通/sulibao-mini/uni_modules/uv-ui-tools/libs/function/test.js ***!
  9799. \************************************************************************/
  9800. /*! no static exports found */
  9801. /***/ (function(module, exports, __webpack_require__) {
  9802. "use strict";
  9803. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9804. Object.defineProperty(exports, "__esModule", {
  9805. value: true
  9806. });
  9807. exports.amount = amount;
  9808. exports.array = array;
  9809. exports.carNo = carNo;
  9810. exports.chinese = chinese;
  9811. exports.code = code;
  9812. exports.contains = contains;
  9813. exports.date = date;
  9814. exports.dateISO = dateISO;
  9815. exports.digits = digits;
  9816. exports.email = email;
  9817. exports.empty = empty;
  9818. exports.enOrNum = enOrNum;
  9819. exports.func = func;
  9820. exports.idCard = idCard;
  9821. exports.image = image;
  9822. exports.jsonString = jsonString;
  9823. exports.landline = landline;
  9824. exports.letter = letter;
  9825. exports.mobile = mobile;
  9826. exports.number = number;
  9827. exports.object = object;
  9828. exports.promise = promise;
  9829. exports.range = range;
  9830. exports.rangeLength = rangeLength;
  9831. exports.regExp = regExp;
  9832. exports.string = string;
  9833. exports.url = url;
  9834. exports.video = video;
  9835. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9836. /**
  9837. * 验证电子邮箱格式
  9838. */
  9839. function email(value) {
  9840. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  9841. }
  9842. /**
  9843. * 验证手机格式
  9844. */
  9845. function mobile(value) {
  9846. return /^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/.test(value);
  9847. }
  9848. /**
  9849. * 验证URL格式
  9850. */
  9851. function url(value) {
  9852. return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value);
  9853. }
  9854. /**
  9855. * 验证日期格式
  9856. */
  9857. function date(value) {
  9858. if (!value) return false;
  9859. // 判断是否数值或者字符串数值(意味着为时间戳),转为数值,否则new Date无法识别字符串时间戳
  9860. if (number(value)) value = +value;
  9861. return !/Invalid|NaN/.test(new Date(value).toString());
  9862. }
  9863. /**
  9864. * 验证ISO类型的日期格式
  9865. */
  9866. function dateISO(value) {
  9867. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  9868. }
  9869. /**
  9870. * 验证十进制数字
  9871. */
  9872. function number(value) {
  9873. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  9874. }
  9875. /**
  9876. * 验证字符串
  9877. */
  9878. function string(value) {
  9879. return typeof value === 'string';
  9880. }
  9881. /**
  9882. * 验证整数
  9883. */
  9884. function digits(value) {
  9885. return /^\d+$/.test(value);
  9886. }
  9887. /**
  9888. * 验证身份证号码
  9889. */
  9890. function idCard(value) {
  9891. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
  9892. }
  9893. /**
  9894. * 是否车牌号
  9895. */
  9896. function carNo(value) {
  9897. // 新能源车牌
  9898. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  9899. // 旧车牌
  9900. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  9901. if (value.length === 7) {
  9902. return creg.test(value);
  9903. }
  9904. if (value.length === 8) {
  9905. return xreg.test(value);
  9906. }
  9907. return false;
  9908. }
  9909. /**
  9910. * 金额,只允许2位小数
  9911. */
  9912. function amount(value) {
  9913. // 金额,只允许保留两位小数
  9914. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  9915. }
  9916. /**
  9917. * 中文
  9918. */
  9919. function chinese(value) {
  9920. var reg = /^[\u4e00-\u9fa5]+$/gi;
  9921. return reg.test(value);
  9922. }
  9923. /**
  9924. * 只能输入字母
  9925. */
  9926. function letter(value) {
  9927. return /^[a-zA-Z]*$/.test(value);
  9928. }
  9929. /**
  9930. * 只能是字母或者数字
  9931. */
  9932. function enOrNum(value) {
  9933. // 英文或者数字
  9934. var reg = /^[0-9a-zA-Z]*$/g;
  9935. return reg.test(value);
  9936. }
  9937. /**
  9938. * 验证是否包含某个值
  9939. */
  9940. function contains(value, param) {
  9941. return value.indexOf(param) >= 0;
  9942. }
  9943. /**
  9944. * 验证一个值范围[min, max]
  9945. */
  9946. function range(value, param) {
  9947. return value >= param[0] && value <= param[1];
  9948. }
  9949. /**
  9950. * 验证一个长度范围[min, max]
  9951. */
  9952. function rangeLength(value, param) {
  9953. return value.length >= param[0] && value.length <= param[1];
  9954. }
  9955. /**
  9956. * 是否固定电话
  9957. */
  9958. function landline(value) {
  9959. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  9960. return reg.test(value);
  9961. }
  9962. /**
  9963. * 判断是否为空
  9964. */
  9965. function empty(value) {
  9966. switch ((0, _typeof2.default)(value)) {
  9967. case 'undefined':
  9968. return true;
  9969. case 'string':
  9970. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  9971. break;
  9972. case 'boolean':
  9973. if (!value) return true;
  9974. break;
  9975. case 'number':
  9976. if (value === 0 || isNaN(value)) return true;
  9977. break;
  9978. case 'object':
  9979. if (value === null || value.length === 0) return true;
  9980. for (var i in value) {
  9981. return false;
  9982. }
  9983. return true;
  9984. }
  9985. return false;
  9986. }
  9987. /**
  9988. * 是否json字符串
  9989. */
  9990. function jsonString(value) {
  9991. if (typeof value === 'string') {
  9992. try {
  9993. var obj = JSON.parse(value);
  9994. if ((0, _typeof2.default)(obj) === 'object' && obj) {
  9995. return true;
  9996. }
  9997. return false;
  9998. } catch (e) {
  9999. return false;
  10000. }
  10001. }
  10002. return false;
  10003. }
  10004. /**
  10005. * 是否数组
  10006. */
  10007. function array(value) {
  10008. if (typeof Array.isArray === 'function') {
  10009. return Array.isArray(value);
  10010. }
  10011. return Object.prototype.toString.call(value) === '[object Array]';
  10012. }
  10013. /**
  10014. * 是否对象
  10015. */
  10016. function object(value) {
  10017. return Object.prototype.toString.call(value) === '[object Object]';
  10018. }
  10019. /**
  10020. * 是否短信验证码
  10021. */
  10022. function code(value) {
  10023. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  10024. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  10025. }
  10026. /**
  10027. * 是否函数方法
  10028. * @param {Object} value
  10029. */
  10030. function func(value) {
  10031. return typeof value === 'function';
  10032. }
  10033. /**
  10034. * 是否promise对象
  10035. * @param {Object} value
  10036. */
  10037. function promise(value) {
  10038. return object(value) && func(value.then) && func(value.catch);
  10039. }
  10040. /** 是否图片格式
  10041. * @param {Object} value
  10042. */
  10043. function image(value) {
  10044. var newValue = value.split('?')[0];
  10045. var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  10046. return IMAGE_REGEXP.test(newValue);
  10047. }
  10048. /**
  10049. * 是否视频格式
  10050. * @param {Object} value
  10051. */
  10052. function video(value) {
  10053. var VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  10054. return VIDEO_REGEXP.test(value);
  10055. }
  10056. /**
  10057. * 是否为正则对象
  10058. * @param {Object}
  10059. * @return {Boolean}
  10060. */
  10061. function regExp(o) {
  10062. return o && Object.prototype.toString.call(o) === '[object RegExp]';
  10063. }
  10064. /***/ }),
  10065. /***/ 272:
  10066. /*!*************************************************************************!*\
  10067. !*** E:/盈通/sulibao-mini/uni_modules/uv-ui-tools/libs/function/digit.js ***!
  10068. \*************************************************************************/
  10069. /*! no static exports found */
  10070. /***/ (function(module, exports, __webpack_require__) {
  10071. "use strict";
  10072. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10073. Object.defineProperty(exports, "__esModule", {
  10074. value: true
  10075. });
  10076. exports.default = void 0;
  10077. exports.divide = divide;
  10078. exports.enableBoundaryChecking = enableBoundaryChecking;
  10079. exports.minus = minus;
  10080. exports.plus = plus;
  10081. exports.round = round;
  10082. exports.times = times;
  10083. var _toArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toArray */ 273));
  10084. var _boundaryCheckingState = true; // 是否进行越界检查的全局开关
  10085. /**
  10086. * 把错误的数据转正
  10087. * @private
  10088. * @example strip(0.09999999999999998)=0.1
  10089. */
  10090. function strip(num) {
  10091. var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 15;
  10092. return +parseFloat(Number(num).toPrecision(precision));
  10093. }
  10094. /**
  10095. * Return digits length of a number
  10096. * @private
  10097. * @param {*number} num Input number
  10098. */
  10099. function digitLength(num) {
  10100. // Get digit length of e
  10101. var eSplit = num.toString().split(/[eE]/);
  10102. var len = (eSplit[0].split('.')[1] || '').length - +(eSplit[1] || 0);
  10103. return len > 0 ? len : 0;
  10104. }
  10105. /**
  10106. * 把小数转成整数,如果是小数则放大成整数
  10107. * @private
  10108. * @param {*number} num 输入数
  10109. */
  10110. function float2Fixed(num) {
  10111. if (num.toString().indexOf('e') === -1) {
  10112. return Number(num.toString().replace('.', ''));
  10113. }
  10114. var dLen = digitLength(num);
  10115. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  10116. }
  10117. /**
  10118. * 检测数字是否越界,如果越界给出提示
  10119. * @private
  10120. * @param {*number} num 输入数
  10121. */
  10122. function checkBoundary(num) {
  10123. if (_boundaryCheckingState) {
  10124. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  10125. console.warn("".concat(num, " \u8D85\u51FA\u4E86\u7CBE\u5EA6\u9650\u5236\uFF0C\u7ED3\u679C\u53EF\u80FD\u4E0D\u6B63\u786E"));
  10126. }
  10127. }
  10128. }
  10129. /**
  10130. * 把递归操作扁平迭代化
  10131. * @param {number[]} arr 要操作的数字数组
  10132. * @param {function} operation 迭代操作
  10133. * @private
  10134. */
  10135. function iteratorOperation(arr, operation) {
  10136. var _arr = (0, _toArray2.default)(arr),
  10137. num1 = _arr[0],
  10138. num2 = _arr[1],
  10139. others = _arr.slice(2);
  10140. var res = operation(num1, num2);
  10141. others.forEach(function (num) {
  10142. res = operation(res, num);
  10143. });
  10144. return res;
  10145. }
  10146. /**
  10147. * 高精度乘法
  10148. * @export
  10149. */
  10150. function times() {
  10151. for (var _len = arguments.length, nums = new Array(_len), _key = 0; _key < _len; _key++) {
  10152. nums[_key] = arguments[_key];
  10153. }
  10154. if (nums.length > 2) {
  10155. return iteratorOperation(nums, times);
  10156. }
  10157. var num1 = nums[0],
  10158. num2 = nums[1];
  10159. var num1Changed = float2Fixed(num1);
  10160. var num2Changed = float2Fixed(num2);
  10161. var baseNum = digitLength(num1) + digitLength(num2);
  10162. var leftValue = num1Changed * num2Changed;
  10163. checkBoundary(leftValue);
  10164. return leftValue / Math.pow(10, baseNum);
  10165. }
  10166. /**
  10167. * 高精度加法
  10168. * @export
  10169. */
  10170. function plus() {
  10171. for (var _len2 = arguments.length, nums = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  10172. nums[_key2] = arguments[_key2];
  10173. }
  10174. if (nums.length > 2) {
  10175. return iteratorOperation(nums, plus);
  10176. }
  10177. var num1 = nums[0],
  10178. num2 = nums[1];
  10179. // 取最大的小数位
  10180. var baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2)));
  10181. // 把小数都转为整数然后再计算
  10182. return (times(num1, baseNum) + times(num2, baseNum)) / baseNum;
  10183. }
  10184. /**
  10185. * 高精度减法
  10186. * @export
  10187. */
  10188. function minus() {
  10189. for (var _len3 = arguments.length, nums = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  10190. nums[_key3] = arguments[_key3];
  10191. }
  10192. if (nums.length > 2) {
  10193. return iteratorOperation(nums, minus);
  10194. }
  10195. var num1 = nums[0],
  10196. num2 = nums[1];
  10197. var baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2)));
  10198. return (times(num1, baseNum) - times(num2, baseNum)) / baseNum;
  10199. }
  10200. /**
  10201. * 高精度除法
  10202. * @export
  10203. */
  10204. function divide() {
  10205. for (var _len4 = arguments.length, nums = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  10206. nums[_key4] = arguments[_key4];
  10207. }
  10208. if (nums.length > 2) {
  10209. return iteratorOperation(nums, divide);
  10210. }
  10211. var num1 = nums[0],
  10212. num2 = nums[1];
  10213. var num1Changed = float2Fixed(num1);
  10214. var num2Changed = float2Fixed(num2);
  10215. checkBoundary(num1Changed);
  10216. checkBoundary(num2Changed);
  10217. // 重要,这里必须用strip进行修正
  10218. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  10219. }
  10220. /**
  10221. * 四舍五入
  10222. * @export
  10223. */
  10224. function round(num, ratio) {
  10225. var base = Math.pow(10, ratio);
  10226. var result = divide(Math.round(Math.abs(times(num, base))), base);
  10227. if (num < 0 && result !== 0) {
  10228. result = times(result, -1);
  10229. }
  10230. // 位数不足则补0
  10231. return result;
  10232. }
  10233. /**
  10234. * 是否进行边界检查,默认开启
  10235. * @param flag 标记开关,true 为开启,false 为关闭,默认为 true
  10236. * @export
  10237. */
  10238. function enableBoundaryChecking() {
  10239. var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  10240. _boundaryCheckingState = flag;
  10241. }
  10242. var _default = {
  10243. times: times,
  10244. plus: plus,
  10245. minus: minus,
  10246. divide: divide,
  10247. round: round,
  10248. enableBoundaryChecking: enableBoundaryChecking
  10249. };
  10250. exports.default = _default;
  10251. /***/ }),
  10252. /***/ 273:
  10253. /*!********************************************************!*\
  10254. !*** ./node_modules/@babel/runtime/helpers/toArray.js ***!
  10255. \********************************************************/
  10256. /*! no static exports found */
  10257. /***/ (function(module, exports, __webpack_require__) {
  10258. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  10259. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  10260. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  10261. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  10262. function _toArray(arr) {
  10263. return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();
  10264. }
  10265. module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10266. /***/ }),
  10267. /***/ 274:
  10268. /*!*********************************************************************!*\
  10269. !*** E:/盈通/sulibao-mini/uni_modules/uv-ui-tools/libs/util/route.js ***!
  10270. \*********************************************************************/
  10271. /*! no static exports found */
  10272. /***/ (function(module, exports, __webpack_require__) {
  10273. "use strict";
  10274. /* WEBPACK VAR INJECTION */(function(uni) {
  10275. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10276. Object.defineProperty(exports, "__esModule", {
  10277. value: true
  10278. });
  10279. exports.default = void 0;
  10280. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 75));
  10281. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 77));
  10282. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  10283. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  10284. var _index = __webpack_require__(/*! @/uni_modules/uv-ui-tools/libs/function/index.js */ 270);
  10285. /**
  10286. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  10287. * 并且带有路由拦截功能
  10288. */
  10289. var Router = /*#__PURE__*/function () {
  10290. function Router() {
  10291. (0, _classCallCheck2.default)(this, Router);
  10292. // 原始属性定义
  10293. this.config = {
  10294. type: 'navigateTo',
  10295. url: '',
  10296. delta: 1,
  10297. // navigateBack页面后退时,回退的层数
  10298. params: {},
  10299. // 传递的参数
  10300. animationType: 'pop-in',
  10301. // 窗口动画,只在APP有效
  10302. animationDuration: 300,
  10303. // 窗口动画持续时间,单位毫秒,只在APP有效
  10304. intercept: false,
  10305. // 是否需要拦截
  10306. events: {} // 页面间通信接口,用于监听被打开页面发送到当前页面的数据。hbuilderx 2.8.9+ 开始支持。
  10307. };
  10308. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  10309. // 这里在构造函数中进行this绑定
  10310. this.route = this.route.bind(this);
  10311. }
  10312. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  10313. (0, _createClass2.default)(Router, [{
  10314. key: "addRootPath",
  10315. value: function addRootPath(url) {
  10316. return url[0] === '/' ? url : "/".concat(url);
  10317. }
  10318. // 整合路由参数
  10319. }, {
  10320. key: "mixinParam",
  10321. value: function mixinParam(url, params) {
  10322. url = url && this.addRootPath(url);
  10323. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  10324. // 如果有url中有get参数,转换后无需带上"?"
  10325. var query = '';
  10326. if (/.*\/.*\?.*=.*/.test(url)) {
  10327. // object对象转为get类型的参数
  10328. query = (0, _index.queryParams)(params, false);
  10329. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  10330. return url += "&".concat(query);
  10331. }
  10332. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  10333. query = (0, _index.queryParams)(params);
  10334. return url += query;
  10335. }
  10336. // 对外的方法名称
  10337. }, {
  10338. key: "route",
  10339. value: function () {
  10340. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  10341. var options,
  10342. params,
  10343. mergeConfig,
  10344. isNext,
  10345. _args = arguments;
  10346. return _regenerator.default.wrap(function _callee$(_context) {
  10347. while (1) {
  10348. switch (_context.prev = _context.next) {
  10349. case 0:
  10350. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  10351. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  10352. // 合并用户的配置和内部的默认配置
  10353. mergeConfig = {};
  10354. if (typeof options === 'string') {
  10355. // 如果options为字符串,则为route(url, params)的形式
  10356. mergeConfig.url = this.mixinParam(options, params);
  10357. mergeConfig.type = 'navigateTo';
  10358. } else {
  10359. mergeConfig = (0, _index.deepMerge)(this.config, options);
  10360. // 否则正常使用mergeConfig中的url和params进行拼接
  10361. mergeConfig.url = this.mixinParam(options.url, options.params);
  10362. }
  10363. // 如果本次跳转的路径和本页面路径一致,不执行跳转,防止用户快速点击跳转按钮,造成多次跳转同一个页面的问题
  10364. if (!(mergeConfig.url === (0, _index.page)())) {
  10365. _context.next = 6;
  10366. break;
  10367. }
  10368. return _context.abrupt("return");
  10369. case 6:
  10370. if (params.intercept) {
  10371. mergeConfig.intercept = params.intercept;
  10372. }
  10373. // params参数也带给拦截器
  10374. mergeConfig.params = params;
  10375. // 合并内外部参数
  10376. mergeConfig = (0, _index.deepMerge)(this.config, mergeConfig);
  10377. // 判断用户是否定义了拦截器
  10378. if (!(typeof mergeConfig.intercept === 'function')) {
  10379. _context.next = 16;
  10380. break;
  10381. }
  10382. _context.next = 12;
  10383. return new Promise(function (resolve, reject) {
  10384. mergeConfig.intercept(mergeConfig, resolve);
  10385. });
  10386. case 12:
  10387. isNext = _context.sent;
  10388. // 如果isNext为true,则执行路由跳转
  10389. isNext && this.openPage(mergeConfig);
  10390. _context.next = 17;
  10391. break;
  10392. case 16:
  10393. this.openPage(mergeConfig);
  10394. case 17:
  10395. case "end":
  10396. return _context.stop();
  10397. }
  10398. }
  10399. }, _callee, this);
  10400. }));
  10401. function route() {
  10402. return _route.apply(this, arguments);
  10403. }
  10404. return route;
  10405. }() // 执行路由跳转
  10406. }, {
  10407. key: "openPage",
  10408. value: function openPage(config) {
  10409. // 解构参数
  10410. var url = config.url,
  10411. type = config.type,
  10412. delta = config.delta,
  10413. animationType = config.animationType,
  10414. animationDuration = config.animationDuration,
  10415. events = config.events;
  10416. if (config.type == 'navigateTo' || config.type == 'to') {
  10417. uni.navigateTo({
  10418. url: url,
  10419. animationType: animationType,
  10420. animationDuration: animationDuration,
  10421. events: events
  10422. });
  10423. }
  10424. if (config.type == 'redirectTo' || config.type == 'redirect') {
  10425. uni.redirectTo({
  10426. url: url
  10427. });
  10428. }
  10429. if (config.type == 'switchTab' || config.type == 'tab') {
  10430. uni.switchTab({
  10431. url: url
  10432. });
  10433. }
  10434. if (config.type == 'reLaunch' || config.type == 'launch') {
  10435. uni.reLaunch({
  10436. url: url
  10437. });
  10438. }
  10439. if (config.type == 'navigateBack' || config.type == 'back') {
  10440. uni.navigateBack({
  10441. delta: delta
  10442. });
  10443. }
  10444. }
  10445. }]);
  10446. return Router;
  10447. }();
  10448. var _default = new Router().route;
  10449. exports.default = _default;
  10450. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  10451. /***/ }),
  10452. /***/ 275:
  10453. /*!****************************************************************************!*\
  10454. !*** E:/盈通/sulibao-mini/uni_modules/uv-ui-tools/libs/function/debounce.js ***!
  10455. \****************************************************************************/
  10456. /*! no static exports found */
  10457. /***/ (function(module, exports, __webpack_require__) {
  10458. "use strict";
  10459. Object.defineProperty(exports, "__esModule", {
  10460. value: true
  10461. });
  10462. exports.default = void 0;
  10463. var timeout = null;
  10464. /**
  10465. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  10466. *
  10467. * @param {Function} func 要执行的回调函数
  10468. * @param {Number} wait 延时的时间
  10469. * @param {Boolean} immediate 是否立即执行
  10470. * @return null
  10471. */
  10472. function debounce(func) {
  10473. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  10474. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  10475. // 清除定时器
  10476. if (timeout !== null) clearTimeout(timeout);
  10477. // 立即执行,此类情况一般用不到
  10478. if (immediate) {
  10479. var callNow = !timeout;
  10480. timeout = setTimeout(function () {
  10481. timeout = null;
  10482. }, wait);
  10483. if (callNow) typeof func === 'function' && func();
  10484. } else {
  10485. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  10486. timeout = setTimeout(function () {
  10487. typeof func === 'function' && func();
  10488. }, wait);
  10489. }
  10490. }
  10491. var _default = debounce;
  10492. exports.default = _default;
  10493. /***/ }),
  10494. /***/ 276:
  10495. /*!****************************************************************************!*\
  10496. !*** E:/盈通/sulibao-mini/uni_modules/uv-ui-tools/libs/function/throttle.js ***!
  10497. \****************************************************************************/
  10498. /*! no static exports found */
  10499. /***/ (function(module, exports, __webpack_require__) {
  10500. "use strict";
  10501. Object.defineProperty(exports, "__esModule", {
  10502. value: true
  10503. });
  10504. exports.default = void 0;
  10505. var timer;
  10506. var flag;
  10507. /**
  10508. * 节流原理:在一定时间内,只能触发一次
  10509. *
  10510. * @param {Function} func 要执行的回调函数
  10511. * @param {Number} wait 延时的时间
  10512. * @param {Boolean} immediate 是否立即执行
  10513. * @return null
  10514. */
  10515. function throttle(func) {
  10516. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  10517. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  10518. if (immediate) {
  10519. if (!flag) {
  10520. flag = true;
  10521. // 如果是立即执行,则在wait毫秒内开始时执行
  10522. typeof func === 'function' && func();
  10523. timer = setTimeout(function () {
  10524. flag = false;
  10525. }, wait);
  10526. }
  10527. } else if (!flag) {
  10528. flag = true;
  10529. // 如果是非立即执行,则在wait毫秒内的结束处执行
  10530. timer = setTimeout(function () {
  10531. flag = false;
  10532. typeof func === 'function' && func();
  10533. }, wait);
  10534. }
  10535. }
  10536. var _default = throttle;
  10537. exports.default = _default;
  10538. /***/ }),
  10539. /***/ 277:
  10540. /*!******************************************************************************!*\
  10541. !*** E:/盈通/sulibao-mini/uni_modules/uv-sticky/components/uv-sticky/props.js ***!
  10542. \******************************************************************************/
  10543. /*! no static exports found */
  10544. /***/ (function(module, exports, __webpack_require__) {
  10545. "use strict";
  10546. /* WEBPACK VAR INJECTION */(function(uni) {
  10547. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10548. Object.defineProperty(exports, "__esModule", {
  10549. value: true
  10550. });
  10551. exports.default = void 0;
  10552. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  10553. var _uni$$uv, _uni$$uv$props;
  10554. 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; }
  10555. 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; }
  10556. var _default = {
  10557. props: _objectSpread({
  10558. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  10559. offsetTop: {
  10560. type: [String, Number],
  10561. default: 0
  10562. },
  10563. // 自定义导航栏的高度
  10564. customNavHeight: {
  10565. type: [String, Number],
  10566. default: 0
  10567. },
  10568. // 是否禁用吸顶功能
  10569. disabled: {
  10570. type: Boolean,
  10571. default: false
  10572. },
  10573. // 吸顶区域的背景颜色
  10574. bgColor: {
  10575. type: String,
  10576. default: 'transparent'
  10577. },
  10578. // z-index值
  10579. zIndex: {
  10580. type: [String, Number],
  10581. default: ''
  10582. },
  10583. // 列表中的索引值
  10584. index: {
  10585. type: [String, Number],
  10586. default: ''
  10587. }
  10588. }, (_uni$$uv = uni.$uv) === null || _uni$$uv === void 0 ? void 0 : (_uni$$uv$props = _uni$$uv.props) === null || _uni$$uv$props === void 0 ? void 0 : _uni$$uv$props.sticky)
  10589. };
  10590. exports.default = _default;
  10591. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  10592. /***/ }),
  10593. /***/ 285:
  10594. /*!*********************************************************************************************!*\
  10595. !*** E:/盈通/sulibao-mini/uni_modules/uni-search-bar/components/uni-search-bar/i18n/index.js ***!
  10596. \*********************************************************************************************/
  10597. /*! no static exports found */
  10598. /***/ (function(module, exports, __webpack_require__) {
  10599. "use strict";
  10600. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10601. Object.defineProperty(exports, "__esModule", {
  10602. value: true
  10603. });
  10604. exports.default = void 0;
  10605. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 286));
  10606. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 287));
  10607. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 288));
  10608. var _default = {
  10609. en: _en.default,
  10610. 'zh-Hans': _zhHans.default,
  10611. 'zh-Hant': _zhHant.default
  10612. };
  10613. exports.default = _default;
  10614. /***/ }),
  10615. /***/ 286:
  10616. /*!********************************************************************************************!*\
  10617. !*** E:/盈通/sulibao-mini/uni_modules/uni-search-bar/components/uni-search-bar/i18n/en.json ***!
  10618. \********************************************************************************************/
  10619. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  10620. /***/ (function(module) {
  10621. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"cancel\",\"uni-search-bar.placeholder\":\"Search enter content\"}");
  10622. /***/ }),
  10623. /***/ 287:
  10624. /*!*************************************************************************************************!*\
  10625. !*** E:/盈通/sulibao-mini/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json ***!
  10626. \*************************************************************************************************/
  10627. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  10628. /***/ (function(module) {
  10629. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"取消\",\"uni-search-bar.placeholder\":\"请输入搜索内容\"}");
  10630. /***/ }),
  10631. /***/ 288:
  10632. /*!*************************************************************************************************!*\
  10633. !*** E:/盈通/sulibao-mini/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json ***!
  10634. \*************************************************************************************************/
  10635. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  10636. /***/ (function(module) {
  10637. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"取消\",\"uni-search-bar.placeholder\":\"請輸入搜索內容\"}");
  10638. /***/ }),
  10639. /***/ 3:
  10640. /*!***********************************!*\
  10641. !*** (webpack)/buildin/global.js ***!
  10642. \***********************************/
  10643. /*! no static exports found */
  10644. /***/ (function(module, exports) {
  10645. var g;
  10646. // This works in non-strict mode
  10647. g = (function() {
  10648. return this;
  10649. })();
  10650. try {
  10651. // This works if eval is allowed (see CSP)
  10652. g = g || new Function("return this")();
  10653. } catch (e) {
  10654. // This works if the window reference is available
  10655. if (typeof window === "object") g = window;
  10656. }
  10657. // g can still be undefined, but nothing to do about it...
  10658. // We return undefined, instead of nothing here, so it's
  10659. // easier to handle this case. if(!global) { ...}
  10660. module.exports = g;
  10661. /***/ }),
  10662. /***/ 30:
  10663. /*!*****************************************!*\
  10664. !*** E:/盈通/sulibao-mini/store/index.js ***!
  10665. \*****************************************/
  10666. /*! no static exports found */
  10667. /***/ (function(module, exports, __webpack_require__) {
  10668. "use strict";
  10669. /* WEBPACK VAR INJECTION */(function(uni) {
  10670. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10671. Object.defineProperty(exports, "__esModule", {
  10672. value: true
  10673. });
  10674. exports.default = void 0;
  10675. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  10676. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 31));
  10677. var _storage = _interopRequireDefault(__webpack_require__(/*! @/utils/storage.js */ 32));
  10678. _vue.default.use(_vuex.default);
  10679. var lifeData = {};
  10680. // 尝试获取本地是否存在lifeData变量,第一次启动时不存在
  10681. try {
  10682. lifeData = uni.getStorageSync('lifeData');
  10683. } catch (e) {}
  10684. // 标记需要永久存储的变量,在每次启动时取出,在state中的变量名
  10685. var saveStateKeys = ['vuex_user'];
  10686. // 保存变量到本地存储
  10687. var saveLifeData = function saveLifeData(key, value) {
  10688. // 判断变量是否在存储数组中
  10689. if (saveStateKeys.indexOf(key) != -1) {
  10690. // 获取本地存储的lifeData对象,将变量添加到对象中
  10691. var tmpLifeData = uni.getStorageSync('lifeData');
  10692. // 第一次启动时不存在,则放一个空对象
  10693. tmpLifeData = tmpLifeData ? tmpLifeData : {}, tmpLifeData[key] = value;
  10694. // 将变量再次放回本地存储中
  10695. uni.setStorageSync('lifeData', tmpLifeData);
  10696. }
  10697. };
  10698. var store = new _vuex.default.Store({
  10699. state: {
  10700. // 如果上面从本地获取的lifeData对象下有对应的属性,就赋值给state中对应的变量
  10701. // 加上vuex_前缀,是防止变量名冲突,也让人一目了然
  10702. vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {
  10703. name: '速立保'
  10704. },
  10705. // 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
  10706. // app版本
  10707. vuex_version: "1.0.0",
  10708. // 是否使用自定义导航栏
  10709. vuex_custom_nav_bar: true,
  10710. // 状态栏高度
  10711. vuex_status_bar_height: 0,
  10712. // 自定义导航栏的高度
  10713. vuex_custom_bar_height: 0,
  10714. token: null,
  10715. openId: null,
  10716. userInfo: null,
  10717. expires_time: null,
  10718. isGOAuth: false,
  10719. //是否已跳转至登录界面,防止路由重复注入
  10720. isFirstLoad: true,
  10721. //是否第一次加载 第一次加载未认证不需要弹框 直接跳转认证
  10722. authPopupShow: false,
  10723. //x-authorize 弹窗是否显示
  10724. engAdmin: false
  10725. },
  10726. mutations: {
  10727. LOGOUT: function LOGOUT(state) {
  10728. state.token = null;
  10729. //state.expires_time = null;
  10730. state.userInfo = null;
  10731. _storage.default.remove('openId');
  10732. _storage.default.remove('userInfo');
  10733. _storage.default.remove('token');
  10734. _storage.default.remove('memberNo');
  10735. _storage.default.remove('myUsername');
  10736. _storage.default.remove('accountName');
  10737. //storage.remove('expires_time')
  10738. },
  10739. LOGIN: function LOGIN(state, _ref) {
  10740. var token = _ref.token,
  10741. openId = _ref.openId,
  10742. expires_time = _ref.expires_time;
  10743. state.token = token;
  10744. state.openId = openId;
  10745. state.expires_time = expires_time;
  10746. _storage.default.set('token', token);
  10747. _storage.default.set('openId', openId);
  10748. _storage.default.set('expires_time', expires_time);
  10749. },
  10750. UPDATE_USERINFO: function UPDATE_USERINFO(state, userInfo) {
  10751. state.userInfo = userInfo;
  10752. _storage.default.set('userInfo', userInfo);
  10753. if (userInfo) {
  10754. _storage.default.set('memberNo', userInfo.member_no);
  10755. _storage.default.set('accountName', userInfo.account_name);
  10756. uni.setStorageSync("myUsername", userInfo.account_name);
  10757. // uni.setStorageSync("myUsername",userInfo.account_name+"m"+userInfo.member_no);
  10758. state.engAdmin = false;
  10759. if (userInfo.engAdmin) {
  10760. state.engAdmin = userInfo.engAdmin;
  10761. }
  10762. }
  10763. },
  10764. SET_GO_AUTH: function SET_GO_AUTH(state, self) {
  10765. state.isGOAuth = self;
  10766. },
  10767. SHOW_AUTH_POPUP_SHOW: function SHOW_AUTH_POPUP_SHOW(state) {
  10768. state.authPopupShow = true;
  10769. },
  10770. HIDE_AUTH_POPUP_SHOW: function HIDE_AUTH_POPUP_SHOW(state) {
  10771. state.authPopupShow = false;
  10772. },
  10773. $tStore: function $tStore(state, payload) {
  10774. // 判断是否多层调用,state中为对象存在的情况,例如user.info.score = 1
  10775. var nameArr = payload.name.split('.');
  10776. var saveKey = '';
  10777. var len = nameArr.length;
  10778. if (len >= 2) {
  10779. var obj = state[nameArr[0]];
  10780. for (var i = 1; i < len - 1; i++) {
  10781. obj = obj[nameArr[i]];
  10782. }
  10783. obj[nameArr[len - 1]] = payload.value;
  10784. saveKey = nameArr[0];
  10785. } else {
  10786. // 单层级变量
  10787. state[payload.name] = payload.value;
  10788. saveKey = payload.name;
  10789. }
  10790. // 保存变量到本地中
  10791. saveLifeData(saveKey, state[saveKey]);
  10792. }
  10793. },
  10794. actions: {},
  10795. getters: {
  10796. token: function token(state) {
  10797. return state.token;
  10798. },
  10799. userInfo: function userInfo(state) {
  10800. return state.userInfo || {};
  10801. },
  10802. expires_time: function expires_time(state) {
  10803. return state.expires_time;
  10804. },
  10805. authPopupShow: function authPopupShow(state) {
  10806. return state.authPopupShow;
  10807. }
  10808. }
  10809. });
  10810. var _default = store;
  10811. exports.default = _default;
  10812. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  10813. /***/ }),
  10814. /***/ 31:
  10815. /*!**************************************************************************************!*\
  10816. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  10817. \**************************************************************************************/
  10818. /*! no static exports found */
  10819. /***/ (function(module, exports, __webpack_require__) {
  10820. "use strict";
  10821. /* WEBPACK VAR INJECTION */(function(global) {/*!
  10822. * vuex v3.6.2
  10823. * (c) 2021 Evan You
  10824. * @license MIT
  10825. */
  10826. function applyMixin (Vue) {
  10827. var version = Number(Vue.version.split('.')[0]);
  10828. if (version >= 2) {
  10829. Vue.mixin({ beforeCreate: vuexInit });
  10830. } else {
  10831. // override init and inject vuex init procedure
  10832. // for 1.x backwards compatibility.
  10833. var _init = Vue.prototype._init;
  10834. Vue.prototype._init = function (options) {
  10835. if ( options === void 0 ) options = {};
  10836. options.init = options.init
  10837. ? [vuexInit].concat(options.init)
  10838. : vuexInit;
  10839. _init.call(this, options);
  10840. };
  10841. }
  10842. /**
  10843. * Vuex init hook, injected into each instances init hooks list.
  10844. */
  10845. function vuexInit () {
  10846. var options = this.$options;
  10847. // store injection
  10848. if (options.store) {
  10849. this.$store = typeof options.store === 'function'
  10850. ? options.store()
  10851. : options.store;
  10852. } else if (options.parent && options.parent.$store) {
  10853. this.$store = options.parent.$store;
  10854. }
  10855. }
  10856. }
  10857. var target = typeof window !== 'undefined'
  10858. ? window
  10859. : typeof global !== 'undefined'
  10860. ? global
  10861. : {};
  10862. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  10863. function devtoolPlugin (store) {
  10864. if (!devtoolHook) { return }
  10865. store._devtoolHook = devtoolHook;
  10866. devtoolHook.emit('vuex:init', store);
  10867. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  10868. store.replaceState(targetState);
  10869. });
  10870. store.subscribe(function (mutation, state) {
  10871. devtoolHook.emit('vuex:mutation', mutation, state);
  10872. }, { prepend: true });
  10873. store.subscribeAction(function (action, state) {
  10874. devtoolHook.emit('vuex:action', action, state);
  10875. }, { prepend: true });
  10876. }
  10877. /**
  10878. * Get the first item that pass the test
  10879. * by second argument function
  10880. *
  10881. * @param {Array} list
  10882. * @param {Function} f
  10883. * @return {*}
  10884. */
  10885. function find (list, f) {
  10886. return list.filter(f)[0]
  10887. }
  10888. /**
  10889. * Deep copy the given object considering circular structure.
  10890. * This function caches all nested objects and its copies.
  10891. * If it detects circular structure, use cached copy to avoid infinite loop.
  10892. *
  10893. * @param {*} obj
  10894. * @param {Array<Object>} cache
  10895. * @return {*}
  10896. */
  10897. function deepCopy (obj, cache) {
  10898. if ( cache === void 0 ) cache = [];
  10899. // just return if obj is immutable value
  10900. if (obj === null || typeof obj !== 'object') {
  10901. return obj
  10902. }
  10903. // if obj is hit, it is in circular structure
  10904. var hit = find(cache, function (c) { return c.original === obj; });
  10905. if (hit) {
  10906. return hit.copy
  10907. }
  10908. var copy = Array.isArray(obj) ? [] : {};
  10909. // put the copy into cache at first
  10910. // because we want to refer it in recursive deepCopy
  10911. cache.push({
  10912. original: obj,
  10913. copy: copy
  10914. });
  10915. Object.keys(obj).forEach(function (key) {
  10916. copy[key] = deepCopy(obj[key], cache);
  10917. });
  10918. return copy
  10919. }
  10920. /**
  10921. * forEach for object
  10922. */
  10923. function forEachValue (obj, fn) {
  10924. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  10925. }
  10926. function isObject (obj) {
  10927. return obj !== null && typeof obj === 'object'
  10928. }
  10929. function isPromise (val) {
  10930. return val && typeof val.then === 'function'
  10931. }
  10932. function assert (condition, msg) {
  10933. if (!condition) { throw new Error(("[vuex] " + msg)) }
  10934. }
  10935. function partial (fn, arg) {
  10936. return function () {
  10937. return fn(arg)
  10938. }
  10939. }
  10940. // Base data struct for store's module, package with some attribute and method
  10941. var Module = function Module (rawModule, runtime) {
  10942. this.runtime = runtime;
  10943. // Store some children item
  10944. this._children = Object.create(null);
  10945. // Store the origin module object which passed by programmer
  10946. this._rawModule = rawModule;
  10947. var rawState = rawModule.state;
  10948. // Store the origin module's state
  10949. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  10950. };
  10951. var prototypeAccessors = { namespaced: { configurable: true } };
  10952. prototypeAccessors.namespaced.get = function () {
  10953. return !!this._rawModule.namespaced
  10954. };
  10955. Module.prototype.addChild = function addChild (key, module) {
  10956. this._children[key] = module;
  10957. };
  10958. Module.prototype.removeChild = function removeChild (key) {
  10959. delete this._children[key];
  10960. };
  10961. Module.prototype.getChild = function getChild (key) {
  10962. return this._children[key]
  10963. };
  10964. Module.prototype.hasChild = function hasChild (key) {
  10965. return key in this._children
  10966. };
  10967. Module.prototype.update = function update (rawModule) {
  10968. this._rawModule.namespaced = rawModule.namespaced;
  10969. if (rawModule.actions) {
  10970. this._rawModule.actions = rawModule.actions;
  10971. }
  10972. if (rawModule.mutations) {
  10973. this._rawModule.mutations = rawModule.mutations;
  10974. }
  10975. if (rawModule.getters) {
  10976. this._rawModule.getters = rawModule.getters;
  10977. }
  10978. };
  10979. Module.prototype.forEachChild = function forEachChild (fn) {
  10980. forEachValue(this._children, fn);
  10981. };
  10982. Module.prototype.forEachGetter = function forEachGetter (fn) {
  10983. if (this._rawModule.getters) {
  10984. forEachValue(this._rawModule.getters, fn);
  10985. }
  10986. };
  10987. Module.prototype.forEachAction = function forEachAction (fn) {
  10988. if (this._rawModule.actions) {
  10989. forEachValue(this._rawModule.actions, fn);
  10990. }
  10991. };
  10992. Module.prototype.forEachMutation = function forEachMutation (fn) {
  10993. if (this._rawModule.mutations) {
  10994. forEachValue(this._rawModule.mutations, fn);
  10995. }
  10996. };
  10997. Object.defineProperties( Module.prototype, prototypeAccessors );
  10998. var ModuleCollection = function ModuleCollection (rawRootModule) {
  10999. // register root module (Vuex.Store options)
  11000. this.register([], rawRootModule, false);
  11001. };
  11002. ModuleCollection.prototype.get = function get (path) {
  11003. return path.reduce(function (module, key) {
  11004. return module.getChild(key)
  11005. }, this.root)
  11006. };
  11007. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  11008. var module = this.root;
  11009. return path.reduce(function (namespace, key) {
  11010. module = module.getChild(key);
  11011. return namespace + (module.namespaced ? key + '/' : '')
  11012. }, '')
  11013. };
  11014. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  11015. update([], this.root, rawRootModule);
  11016. };
  11017. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  11018. var this$1 = this;
  11019. if ( runtime === void 0 ) runtime = true;
  11020. if ((true)) {
  11021. assertRawModule(path, rawModule);
  11022. }
  11023. var newModule = new Module(rawModule, runtime);
  11024. if (path.length === 0) {
  11025. this.root = newModule;
  11026. } else {
  11027. var parent = this.get(path.slice(0, -1));
  11028. parent.addChild(path[path.length - 1], newModule);
  11029. }
  11030. // register nested modules
  11031. if (rawModule.modules) {
  11032. forEachValue(rawModule.modules, function (rawChildModule, key) {
  11033. this$1.register(path.concat(key), rawChildModule, runtime);
  11034. });
  11035. }
  11036. };
  11037. ModuleCollection.prototype.unregister = function unregister (path) {
  11038. var parent = this.get(path.slice(0, -1));
  11039. var key = path[path.length - 1];
  11040. var child = parent.getChild(key);
  11041. if (!child) {
  11042. if ((true)) {
  11043. console.warn(
  11044. "[vuex] trying to unregister module '" + key + "', which is " +
  11045. "not registered"
  11046. );
  11047. }
  11048. return
  11049. }
  11050. if (!child.runtime) {
  11051. return
  11052. }
  11053. parent.removeChild(key);
  11054. };
  11055. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  11056. var parent = this.get(path.slice(0, -1));
  11057. var key = path[path.length - 1];
  11058. if (parent) {
  11059. return parent.hasChild(key)
  11060. }
  11061. return false
  11062. };
  11063. function update (path, targetModule, newModule) {
  11064. if ((true)) {
  11065. assertRawModule(path, newModule);
  11066. }
  11067. // update target module
  11068. targetModule.update(newModule);
  11069. // update nested modules
  11070. if (newModule.modules) {
  11071. for (var key in newModule.modules) {
  11072. if (!targetModule.getChild(key)) {
  11073. if ((true)) {
  11074. console.warn(
  11075. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  11076. 'manual reload is needed'
  11077. );
  11078. }
  11079. return
  11080. }
  11081. update(
  11082. path.concat(key),
  11083. targetModule.getChild(key),
  11084. newModule.modules[key]
  11085. );
  11086. }
  11087. }
  11088. }
  11089. var functionAssert = {
  11090. assert: function (value) { return typeof value === 'function'; },
  11091. expected: 'function'
  11092. };
  11093. var objectAssert = {
  11094. assert: function (value) { return typeof value === 'function' ||
  11095. (typeof value === 'object' && typeof value.handler === 'function'); },
  11096. expected: 'function or object with "handler" function'
  11097. };
  11098. var assertTypes = {
  11099. getters: functionAssert,
  11100. mutations: functionAssert,
  11101. actions: objectAssert
  11102. };
  11103. function assertRawModule (path, rawModule) {
  11104. Object.keys(assertTypes).forEach(function (key) {
  11105. if (!rawModule[key]) { return }
  11106. var assertOptions = assertTypes[key];
  11107. forEachValue(rawModule[key], function (value, type) {
  11108. assert(
  11109. assertOptions.assert(value),
  11110. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  11111. );
  11112. });
  11113. });
  11114. }
  11115. function makeAssertionMessage (path, key, type, value, expected) {
  11116. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  11117. if (path.length > 0) {
  11118. buf += " in module \"" + (path.join('.')) + "\"";
  11119. }
  11120. buf += " is " + (JSON.stringify(value)) + ".";
  11121. return buf
  11122. }
  11123. var Vue; // bind on install
  11124. var Store = function Store (options) {
  11125. var this$1 = this;
  11126. if ( options === void 0 ) options = {};
  11127. // Auto install if it is not done yet and `window` has `Vue`.
  11128. // To allow users to avoid auto-installation in some cases,
  11129. // this code should be placed here. See #731
  11130. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  11131. install(window.Vue);
  11132. }
  11133. if ((true)) {
  11134. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  11135. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  11136. assert(this instanceof Store, "store must be called with the new operator.");
  11137. }
  11138. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  11139. var strict = options.strict; if ( strict === void 0 ) strict = false;
  11140. // store internal state
  11141. this._committing = false;
  11142. this._actions = Object.create(null);
  11143. this._actionSubscribers = [];
  11144. this._mutations = Object.create(null);
  11145. this._wrappedGetters = Object.create(null);
  11146. this._modules = new ModuleCollection(options);
  11147. this._modulesNamespaceMap = Object.create(null);
  11148. this._subscribers = [];
  11149. this._watcherVM = new Vue();
  11150. this._makeLocalGettersCache = Object.create(null);
  11151. // bind commit and dispatch to self
  11152. var store = this;
  11153. var ref = this;
  11154. var dispatch = ref.dispatch;
  11155. var commit = ref.commit;
  11156. this.dispatch = function boundDispatch (type, payload) {
  11157. return dispatch.call(store, type, payload)
  11158. };
  11159. this.commit = function boundCommit (type, payload, options) {
  11160. return commit.call(store, type, payload, options)
  11161. };
  11162. // strict mode
  11163. this.strict = strict;
  11164. var state = this._modules.root.state;
  11165. // init root module.
  11166. // this also recursively registers all sub-modules
  11167. // and collects all module getters inside this._wrappedGetters
  11168. installModule(this, state, [], this._modules.root);
  11169. // initialize the store vm, which is responsible for the reactivity
  11170. // (also registers _wrappedGetters as computed properties)
  11171. resetStoreVM(this, state);
  11172. // apply plugins
  11173. plugins.forEach(function (plugin) { return plugin(this$1); });
  11174. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  11175. if (useDevtools) {
  11176. devtoolPlugin(this);
  11177. }
  11178. };
  11179. var prototypeAccessors$1 = { state: { configurable: true } };
  11180. prototypeAccessors$1.state.get = function () {
  11181. return this._vm._data.$$state
  11182. };
  11183. prototypeAccessors$1.state.set = function (v) {
  11184. if ((true)) {
  11185. assert(false, "use store.replaceState() to explicit replace store state.");
  11186. }
  11187. };
  11188. Store.prototype.commit = function commit (_type, _payload, _options) {
  11189. var this$1 = this;
  11190. // check object-style commit
  11191. var ref = unifyObjectStyle(_type, _payload, _options);
  11192. var type = ref.type;
  11193. var payload = ref.payload;
  11194. var options = ref.options;
  11195. var mutation = { type: type, payload: payload };
  11196. var entry = this._mutations[type];
  11197. if (!entry) {
  11198. if ((true)) {
  11199. console.error(("[vuex] unknown mutation type: " + type));
  11200. }
  11201. return
  11202. }
  11203. this._withCommit(function () {
  11204. entry.forEach(function commitIterator (handler) {
  11205. handler(payload);
  11206. });
  11207. });
  11208. this._subscribers
  11209. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  11210. .forEach(function (sub) { return sub(mutation, this$1.state); });
  11211. if (
  11212. ( true) &&
  11213. options && options.silent
  11214. ) {
  11215. console.warn(
  11216. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  11217. 'Use the filter functionality in the vue-devtools'
  11218. );
  11219. }
  11220. };
  11221. Store.prototype.dispatch = function dispatch (_type, _payload) {
  11222. var this$1 = this;
  11223. // check object-style dispatch
  11224. var ref = unifyObjectStyle(_type, _payload);
  11225. var type = ref.type;
  11226. var payload = ref.payload;
  11227. var action = { type: type, payload: payload };
  11228. var entry = this._actions[type];
  11229. if (!entry) {
  11230. if ((true)) {
  11231. console.error(("[vuex] unknown action type: " + type));
  11232. }
  11233. return
  11234. }
  11235. try {
  11236. this._actionSubscribers
  11237. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  11238. .filter(function (sub) { return sub.before; })
  11239. .forEach(function (sub) { return sub.before(action, this$1.state); });
  11240. } catch (e) {
  11241. if ((true)) {
  11242. console.warn("[vuex] error in before action subscribers: ");
  11243. console.error(e);
  11244. }
  11245. }
  11246. var result = entry.length > 1
  11247. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  11248. : entry[0](payload);
  11249. return new Promise(function (resolve, reject) {
  11250. result.then(function (res) {
  11251. try {
  11252. this$1._actionSubscribers
  11253. .filter(function (sub) { return sub.after; })
  11254. .forEach(function (sub) { return sub.after(action, this$1.state); });
  11255. } catch (e) {
  11256. if ((true)) {
  11257. console.warn("[vuex] error in after action subscribers: ");
  11258. console.error(e);
  11259. }
  11260. }
  11261. resolve(res);
  11262. }, function (error) {
  11263. try {
  11264. this$1._actionSubscribers
  11265. .filter(function (sub) { return sub.error; })
  11266. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  11267. } catch (e) {
  11268. if ((true)) {
  11269. console.warn("[vuex] error in error action subscribers: ");
  11270. console.error(e);
  11271. }
  11272. }
  11273. reject(error);
  11274. });
  11275. })
  11276. };
  11277. Store.prototype.subscribe = function subscribe (fn, options) {
  11278. return genericSubscribe(fn, this._subscribers, options)
  11279. };
  11280. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  11281. var subs = typeof fn === 'function' ? { before: fn } : fn;
  11282. return genericSubscribe(subs, this._actionSubscribers, options)
  11283. };
  11284. Store.prototype.watch = function watch (getter, cb, options) {
  11285. var this$1 = this;
  11286. if ((true)) {
  11287. assert(typeof getter === 'function', "store.watch only accepts a function.");
  11288. }
  11289. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  11290. };
  11291. Store.prototype.replaceState = function replaceState (state) {
  11292. var this$1 = this;
  11293. this._withCommit(function () {
  11294. this$1._vm._data.$$state = state;
  11295. });
  11296. };
  11297. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  11298. if ( options === void 0 ) options = {};
  11299. if (typeof path === 'string') { path = [path]; }
  11300. if ((true)) {
  11301. assert(Array.isArray(path), "module path must be a string or an Array.");
  11302. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  11303. }
  11304. this._modules.register(path, rawModule);
  11305. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  11306. // reset store to update getters...
  11307. resetStoreVM(this, this.state);
  11308. };
  11309. Store.prototype.unregisterModule = function unregisterModule (path) {
  11310. var this$1 = this;
  11311. if (typeof path === 'string') { path = [path]; }
  11312. if ((true)) {
  11313. assert(Array.isArray(path), "module path must be a string or an Array.");
  11314. }
  11315. this._modules.unregister(path);
  11316. this._withCommit(function () {
  11317. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  11318. Vue.delete(parentState, path[path.length - 1]);
  11319. });
  11320. resetStore(this);
  11321. };
  11322. Store.prototype.hasModule = function hasModule (path) {
  11323. if (typeof path === 'string') { path = [path]; }
  11324. if ((true)) {
  11325. assert(Array.isArray(path), "module path must be a string or an Array.");
  11326. }
  11327. return this._modules.isRegistered(path)
  11328. };
  11329. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  11330. this._modules.update(newOptions);
  11331. resetStore(this, true);
  11332. };
  11333. Store.prototype._withCommit = function _withCommit (fn) {
  11334. var committing = this._committing;
  11335. this._committing = true;
  11336. fn();
  11337. this._committing = committing;
  11338. };
  11339. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  11340. function genericSubscribe (fn, subs, options) {
  11341. if (subs.indexOf(fn) < 0) {
  11342. options && options.prepend
  11343. ? subs.unshift(fn)
  11344. : subs.push(fn);
  11345. }
  11346. return function () {
  11347. var i = subs.indexOf(fn);
  11348. if (i > -1) {
  11349. subs.splice(i, 1);
  11350. }
  11351. }
  11352. }
  11353. function resetStore (store, hot) {
  11354. store._actions = Object.create(null);
  11355. store._mutations = Object.create(null);
  11356. store._wrappedGetters = Object.create(null);
  11357. store._modulesNamespaceMap = Object.create(null);
  11358. var state = store.state;
  11359. // init all modules
  11360. installModule(store, state, [], store._modules.root, true);
  11361. // reset vm
  11362. resetStoreVM(store, state, hot);
  11363. }
  11364. function resetStoreVM (store, state, hot) {
  11365. var oldVm = store._vm;
  11366. // bind store public getters
  11367. store.getters = {};
  11368. // reset local getters cache
  11369. store._makeLocalGettersCache = Object.create(null);
  11370. var wrappedGetters = store._wrappedGetters;
  11371. var computed = {};
  11372. forEachValue(wrappedGetters, function (fn, key) {
  11373. // use computed to leverage its lazy-caching mechanism
  11374. // direct inline function use will lead to closure preserving oldVm.
  11375. // using partial to return function with only arguments preserved in closure environment.
  11376. computed[key] = partial(fn, store);
  11377. Object.defineProperty(store.getters, key, {
  11378. get: function () { return store._vm[key]; },
  11379. enumerable: true // for local getters
  11380. });
  11381. });
  11382. // use a Vue instance to store the state tree
  11383. // suppress warnings just in case the user has added
  11384. // some funky global mixins
  11385. var silent = Vue.config.silent;
  11386. Vue.config.silent = true;
  11387. store._vm = new Vue({
  11388. data: {
  11389. $$state: state
  11390. },
  11391. computed: computed
  11392. });
  11393. Vue.config.silent = silent;
  11394. // enable strict mode for new vm
  11395. if (store.strict) {
  11396. enableStrictMode(store);
  11397. }
  11398. if (oldVm) {
  11399. if (hot) {
  11400. // dispatch changes in all subscribed watchers
  11401. // to force getter re-evaluation for hot reloading.
  11402. store._withCommit(function () {
  11403. oldVm._data.$$state = null;
  11404. });
  11405. }
  11406. Vue.nextTick(function () { return oldVm.$destroy(); });
  11407. }
  11408. }
  11409. function installModule (store, rootState, path, module, hot) {
  11410. var isRoot = !path.length;
  11411. var namespace = store._modules.getNamespace(path);
  11412. // register in namespace map
  11413. if (module.namespaced) {
  11414. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  11415. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  11416. }
  11417. store._modulesNamespaceMap[namespace] = module;
  11418. }
  11419. // set state
  11420. if (!isRoot && !hot) {
  11421. var parentState = getNestedState(rootState, path.slice(0, -1));
  11422. var moduleName = path[path.length - 1];
  11423. store._withCommit(function () {
  11424. if ((true)) {
  11425. if (moduleName in parentState) {
  11426. console.warn(
  11427. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  11428. );
  11429. }
  11430. }
  11431. Vue.set(parentState, moduleName, module.state);
  11432. });
  11433. }
  11434. var local = module.context = makeLocalContext(store, namespace, path);
  11435. module.forEachMutation(function (mutation, key) {
  11436. var namespacedType = namespace + key;
  11437. registerMutation(store, namespacedType, mutation, local);
  11438. });
  11439. module.forEachAction(function (action, key) {
  11440. var type = action.root ? key : namespace + key;
  11441. var handler = action.handler || action;
  11442. registerAction(store, type, handler, local);
  11443. });
  11444. module.forEachGetter(function (getter, key) {
  11445. var namespacedType = namespace + key;
  11446. registerGetter(store, namespacedType, getter, local);
  11447. });
  11448. module.forEachChild(function (child, key) {
  11449. installModule(store, rootState, path.concat(key), child, hot);
  11450. });
  11451. }
  11452. /**
  11453. * make localized dispatch, commit, getters and state
  11454. * if there is no namespace, just use root ones
  11455. */
  11456. function makeLocalContext (store, namespace, path) {
  11457. var noNamespace = namespace === '';
  11458. var local = {
  11459. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  11460. var args = unifyObjectStyle(_type, _payload, _options);
  11461. var payload = args.payload;
  11462. var options = args.options;
  11463. var type = args.type;
  11464. if (!options || !options.root) {
  11465. type = namespace + type;
  11466. if (( true) && !store._actions[type]) {
  11467. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  11468. return
  11469. }
  11470. }
  11471. return store.dispatch(type, payload)
  11472. },
  11473. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  11474. var args = unifyObjectStyle(_type, _payload, _options);
  11475. var payload = args.payload;
  11476. var options = args.options;
  11477. var type = args.type;
  11478. if (!options || !options.root) {
  11479. type = namespace + type;
  11480. if (( true) && !store._mutations[type]) {
  11481. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  11482. return
  11483. }
  11484. }
  11485. store.commit(type, payload, options);
  11486. }
  11487. };
  11488. // getters and state object must be gotten lazily
  11489. // because they will be changed by vm update
  11490. Object.defineProperties(local, {
  11491. getters: {
  11492. get: noNamespace
  11493. ? function () { return store.getters; }
  11494. : function () { return makeLocalGetters(store, namespace); }
  11495. },
  11496. state: {
  11497. get: function () { return getNestedState(store.state, path); }
  11498. }
  11499. });
  11500. return local
  11501. }
  11502. function makeLocalGetters (store, namespace) {
  11503. if (!store._makeLocalGettersCache[namespace]) {
  11504. var gettersProxy = {};
  11505. var splitPos = namespace.length;
  11506. Object.keys(store.getters).forEach(function (type) {
  11507. // skip if the target getter is not match this namespace
  11508. if (type.slice(0, splitPos) !== namespace) { return }
  11509. // extract local getter type
  11510. var localType = type.slice(splitPos);
  11511. // Add a port to the getters proxy.
  11512. // Define as getter property because
  11513. // we do not want to evaluate the getters in this time.
  11514. Object.defineProperty(gettersProxy, localType, {
  11515. get: function () { return store.getters[type]; },
  11516. enumerable: true
  11517. });
  11518. });
  11519. store._makeLocalGettersCache[namespace] = gettersProxy;
  11520. }
  11521. return store._makeLocalGettersCache[namespace]
  11522. }
  11523. function registerMutation (store, type, handler, local) {
  11524. var entry = store._mutations[type] || (store._mutations[type] = []);
  11525. entry.push(function wrappedMutationHandler (payload) {
  11526. handler.call(store, local.state, payload);
  11527. });
  11528. }
  11529. function registerAction (store, type, handler, local) {
  11530. var entry = store._actions[type] || (store._actions[type] = []);
  11531. entry.push(function wrappedActionHandler (payload) {
  11532. var res = handler.call(store, {
  11533. dispatch: local.dispatch,
  11534. commit: local.commit,
  11535. getters: local.getters,
  11536. state: local.state,
  11537. rootGetters: store.getters,
  11538. rootState: store.state
  11539. }, payload);
  11540. if (!isPromise(res)) {
  11541. res = Promise.resolve(res);
  11542. }
  11543. if (store._devtoolHook) {
  11544. return res.catch(function (err) {
  11545. store._devtoolHook.emit('vuex:error', err);
  11546. throw err
  11547. })
  11548. } else {
  11549. return res
  11550. }
  11551. });
  11552. }
  11553. function registerGetter (store, type, rawGetter, local) {
  11554. if (store._wrappedGetters[type]) {
  11555. if ((true)) {
  11556. console.error(("[vuex] duplicate getter key: " + type));
  11557. }
  11558. return
  11559. }
  11560. store._wrappedGetters[type] = function wrappedGetter (store) {
  11561. return rawGetter(
  11562. local.state, // local state
  11563. local.getters, // local getters
  11564. store.state, // root state
  11565. store.getters // root getters
  11566. )
  11567. };
  11568. }
  11569. function enableStrictMode (store) {
  11570. store._vm.$watch(function () { return this._data.$$state }, function () {
  11571. if ((true)) {
  11572. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  11573. }
  11574. }, { deep: true, sync: true });
  11575. }
  11576. function getNestedState (state, path) {
  11577. return path.reduce(function (state, key) { return state[key]; }, state)
  11578. }
  11579. function unifyObjectStyle (type, payload, options) {
  11580. if (isObject(type) && type.type) {
  11581. options = payload;
  11582. payload = type;
  11583. type = type.type;
  11584. }
  11585. if ((true)) {
  11586. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  11587. }
  11588. return { type: type, payload: payload, options: options }
  11589. }
  11590. function install (_Vue) {
  11591. if (Vue && _Vue === Vue) {
  11592. if ((true)) {
  11593. console.error(
  11594. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  11595. );
  11596. }
  11597. return
  11598. }
  11599. Vue = _Vue;
  11600. applyMixin(Vue);
  11601. }
  11602. /**
  11603. * Reduce the code which written in Vue.js for getting the state.
  11604. * @param {String} [namespace] - Module's namespace
  11605. * @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.
  11606. * @param {Object}
  11607. */
  11608. var mapState = normalizeNamespace(function (namespace, states) {
  11609. var res = {};
  11610. if (( true) && !isValidMap(states)) {
  11611. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  11612. }
  11613. normalizeMap(states).forEach(function (ref) {
  11614. var key = ref.key;
  11615. var val = ref.val;
  11616. res[key] = function mappedState () {
  11617. var state = this.$store.state;
  11618. var getters = this.$store.getters;
  11619. if (namespace) {
  11620. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  11621. if (!module) {
  11622. return
  11623. }
  11624. state = module.context.state;
  11625. getters = module.context.getters;
  11626. }
  11627. return typeof val === 'function'
  11628. ? val.call(this, state, getters)
  11629. : state[val]
  11630. };
  11631. // mark vuex getter for devtools
  11632. res[key].vuex = true;
  11633. });
  11634. return res
  11635. });
  11636. /**
  11637. * Reduce the code which written in Vue.js for committing the mutation
  11638. * @param {String} [namespace] - Module's namespace
  11639. * @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.
  11640. * @return {Object}
  11641. */
  11642. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  11643. var res = {};
  11644. if (( true) && !isValidMap(mutations)) {
  11645. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  11646. }
  11647. normalizeMap(mutations).forEach(function (ref) {
  11648. var key = ref.key;
  11649. var val = ref.val;
  11650. res[key] = function mappedMutation () {
  11651. var args = [], len = arguments.length;
  11652. while ( len-- ) args[ len ] = arguments[ len ];
  11653. // Get the commit method from store
  11654. var commit = this.$store.commit;
  11655. if (namespace) {
  11656. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  11657. if (!module) {
  11658. return
  11659. }
  11660. commit = module.context.commit;
  11661. }
  11662. return typeof val === 'function'
  11663. ? val.apply(this, [commit].concat(args))
  11664. : commit.apply(this.$store, [val].concat(args))
  11665. };
  11666. });
  11667. return res
  11668. });
  11669. /**
  11670. * Reduce the code which written in Vue.js for getting the getters
  11671. * @param {String} [namespace] - Module's namespace
  11672. * @param {Object|Array} getters
  11673. * @return {Object}
  11674. */
  11675. var mapGetters = normalizeNamespace(function (namespace, getters) {
  11676. var res = {};
  11677. if (( true) && !isValidMap(getters)) {
  11678. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  11679. }
  11680. normalizeMap(getters).forEach(function (ref) {
  11681. var key = ref.key;
  11682. var val = ref.val;
  11683. // The namespace has been mutated by normalizeNamespace
  11684. val = namespace + val;
  11685. res[key] = function mappedGetter () {
  11686. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  11687. return
  11688. }
  11689. if (( true) && !(val in this.$store.getters)) {
  11690. console.error(("[vuex] unknown getter: " + val));
  11691. return
  11692. }
  11693. return this.$store.getters[val]
  11694. };
  11695. // mark vuex getter for devtools
  11696. res[key].vuex = true;
  11697. });
  11698. return res
  11699. });
  11700. /**
  11701. * Reduce the code which written in Vue.js for dispatch the action
  11702. * @param {String} [namespace] - Module's namespace
  11703. * @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.
  11704. * @return {Object}
  11705. */
  11706. var mapActions = normalizeNamespace(function (namespace, actions) {
  11707. var res = {};
  11708. if (( true) && !isValidMap(actions)) {
  11709. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  11710. }
  11711. normalizeMap(actions).forEach(function (ref) {
  11712. var key = ref.key;
  11713. var val = ref.val;
  11714. res[key] = function mappedAction () {
  11715. var args = [], len = arguments.length;
  11716. while ( len-- ) args[ len ] = arguments[ len ];
  11717. // get dispatch function from store
  11718. var dispatch = this.$store.dispatch;
  11719. if (namespace) {
  11720. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  11721. if (!module) {
  11722. return
  11723. }
  11724. dispatch = module.context.dispatch;
  11725. }
  11726. return typeof val === 'function'
  11727. ? val.apply(this, [dispatch].concat(args))
  11728. : dispatch.apply(this.$store, [val].concat(args))
  11729. };
  11730. });
  11731. return res
  11732. });
  11733. /**
  11734. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  11735. * @param {String} namespace
  11736. * @return {Object}
  11737. */
  11738. var createNamespacedHelpers = function (namespace) { return ({
  11739. mapState: mapState.bind(null, namespace),
  11740. mapGetters: mapGetters.bind(null, namespace),
  11741. mapMutations: mapMutations.bind(null, namespace),
  11742. mapActions: mapActions.bind(null, namespace)
  11743. }); };
  11744. /**
  11745. * Normalize the map
  11746. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  11747. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  11748. * @param {Array|Object} map
  11749. * @return {Object}
  11750. */
  11751. function normalizeMap (map) {
  11752. if (!isValidMap(map)) {
  11753. return []
  11754. }
  11755. return Array.isArray(map)
  11756. ? map.map(function (key) { return ({ key: key, val: key }); })
  11757. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  11758. }
  11759. /**
  11760. * Validate whether given map is valid or not
  11761. * @param {*} map
  11762. * @return {Boolean}
  11763. */
  11764. function isValidMap (map) {
  11765. return Array.isArray(map) || isObject(map)
  11766. }
  11767. /**
  11768. * 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.
  11769. * @param {Function} fn
  11770. * @return {Function}
  11771. */
  11772. function normalizeNamespace (fn) {
  11773. return function (namespace, map) {
  11774. if (typeof namespace !== 'string') {
  11775. map = namespace;
  11776. namespace = '';
  11777. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  11778. namespace += '/';
  11779. }
  11780. return fn(namespace, map)
  11781. }
  11782. }
  11783. /**
  11784. * Search a special module from store by namespace. if module not exist, print error message.
  11785. * @param {Object} store
  11786. * @param {String} helper
  11787. * @param {String} namespace
  11788. * @return {Object}
  11789. */
  11790. function getModuleByNamespace (store, helper, namespace) {
  11791. var module = store._modulesNamespaceMap[namespace];
  11792. if (( true) && !module) {
  11793. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  11794. }
  11795. return module
  11796. }
  11797. // Credits: borrowed code from fcomb/redux-logger
  11798. function createLogger (ref) {
  11799. if ( ref === void 0 ) ref = {};
  11800. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  11801. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  11802. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  11803. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  11804. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  11805. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  11806. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  11807. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  11808. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  11809. return function (store) {
  11810. var prevState = deepCopy(store.state);
  11811. if (typeof logger === 'undefined') {
  11812. return
  11813. }
  11814. if (logMutations) {
  11815. store.subscribe(function (mutation, state) {
  11816. var nextState = deepCopy(state);
  11817. if (filter(mutation, prevState, nextState)) {
  11818. var formattedTime = getFormattedTime();
  11819. var formattedMutation = mutationTransformer(mutation);
  11820. var message = "mutation " + (mutation.type) + formattedTime;
  11821. startMessage(logger, message, collapsed);
  11822. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  11823. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  11824. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  11825. endMessage(logger);
  11826. }
  11827. prevState = nextState;
  11828. });
  11829. }
  11830. if (logActions) {
  11831. store.subscribeAction(function (action, state) {
  11832. if (actionFilter(action, state)) {
  11833. var formattedTime = getFormattedTime();
  11834. var formattedAction = actionTransformer(action);
  11835. var message = "action " + (action.type) + formattedTime;
  11836. startMessage(logger, message, collapsed);
  11837. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  11838. endMessage(logger);
  11839. }
  11840. });
  11841. }
  11842. }
  11843. }
  11844. function startMessage (logger, message, collapsed) {
  11845. var startMessage = collapsed
  11846. ? logger.groupCollapsed
  11847. : logger.group;
  11848. // render
  11849. try {
  11850. startMessage.call(logger, message);
  11851. } catch (e) {
  11852. logger.log(message);
  11853. }
  11854. }
  11855. function endMessage (logger) {
  11856. try {
  11857. logger.groupEnd();
  11858. } catch (e) {
  11859. logger.log('—— log end ——');
  11860. }
  11861. }
  11862. function getFormattedTime () {
  11863. var time = new Date();
  11864. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  11865. }
  11866. function repeat (str, times) {
  11867. return (new Array(times + 1)).join(str)
  11868. }
  11869. function pad (num, maxLength) {
  11870. return repeat('0', maxLength - num.toString().length) + num
  11871. }
  11872. var index_cjs = {
  11873. Store: Store,
  11874. install: install,
  11875. version: '3.6.2',
  11876. mapState: mapState,
  11877. mapMutations: mapMutations,
  11878. mapGetters: mapGetters,
  11879. mapActions: mapActions,
  11880. createNamespacedHelpers: createNamespacedHelpers,
  11881. createLogger: createLogger
  11882. };
  11883. module.exports = index_cjs;
  11884. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  11885. /***/ }),
  11886. /***/ 32:
  11887. /*!*******************************************!*\
  11888. !*** E:/盈通/sulibao-mini/utils/storage.js ***!
  11889. \*******************************************/
  11890. /*! no static exports found */
  11891. /***/ (function(module, exports, __webpack_require__) {
  11892. "use strict";
  11893. /* WEBPACK VAR INJECTION */(function(uni) {
  11894. Object.defineProperty(exports, "__esModule", {
  11895. value: true
  11896. });
  11897. exports.default = void 0;
  11898. function set(key, data) {
  11899. var sync = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  11900. try {
  11901. if (sync) {
  11902. return uni.setStorageSync(key, data);
  11903. } else {
  11904. uni.setStorage({
  11905. key: key,
  11906. data: data,
  11907. success: function success(res) {}
  11908. });
  11909. }
  11910. } catch (e) {
  11911. return false;
  11912. }
  11913. }
  11914. function get(key) {
  11915. var sync = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  11916. try {
  11917. if (sync) {
  11918. return uni.getStorageSync(key);
  11919. } else {
  11920. var val = '';
  11921. uni.getStorage({
  11922. key: key,
  11923. success: function success(res) {
  11924. val = res.data;
  11925. }
  11926. });
  11927. return val;
  11928. }
  11929. } catch (e) {
  11930. return false;
  11931. }
  11932. }
  11933. function info() {
  11934. var sync = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  11935. try {
  11936. if (sync) {
  11937. return uni.getStorageInfoSync();
  11938. } else {
  11939. var val = '';
  11940. uni.getStorageInfo({
  11941. success: function success(res) {
  11942. val = res;
  11943. }
  11944. });
  11945. return val;
  11946. }
  11947. } catch (e) {
  11948. return false;
  11949. }
  11950. }
  11951. function remove(key) {
  11952. var sync = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  11953. try {
  11954. if (sync) {
  11955. return uni.removeStorageSync(key);
  11956. } else {
  11957. uni.removeStorage({
  11958. key: key
  11959. });
  11960. }
  11961. } catch (e) {
  11962. return false;
  11963. }
  11964. }
  11965. function clear() {
  11966. var sync = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  11967. try {
  11968. if (sync) {
  11969. return uni.clearStorageSync();
  11970. } else {
  11971. uni.clearStorage();
  11972. }
  11973. } catch (e) {
  11974. return false;
  11975. }
  11976. }
  11977. function has(key) {
  11978. var sync = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  11979. try {
  11980. if (sync) {
  11981. return uni.getStorageSync(key) !== null;
  11982. } else {
  11983. var val = false;
  11984. uni.getStorage({
  11985. key: key,
  11986. success: function success(res) {
  11987. val = res.data !== null;
  11988. }
  11989. });
  11990. return val;
  11991. }
  11992. } catch (e) {
  11993. return false;
  11994. }
  11995. }
  11996. var storage = {
  11997. get: get,
  11998. set: set,
  11999. info: info,
  12000. remove: remove,
  12001. clear: clear,
  12002. has: has
  12003. };
  12004. var _default = storage;
  12005. exports.default = _default;
  12006. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  12007. /***/ }),
  12008. /***/ 33:
  12009. /*!*************************************************************************!*\
  12010. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/function/updateCustomBarInfo.js ***!
  12011. \*************************************************************************/
  12012. /*! no static exports found */
  12013. /***/ (function(module, exports, __webpack_require__) {
  12014. "use strict";
  12015. /* WEBPACK VAR INJECTION */(function(uni, wx) {
  12016. Object.defineProperty(exports, "__esModule", {
  12017. value: true
  12018. });
  12019. exports.default = void 0;
  12020. /**
  12021. * 更新自定义顶部导航栏的高度
  12022. */
  12023. function updateCustomBarInfo() {
  12024. return new Promise(function (resolve, reject) {
  12025. uni.getSystemInfo({
  12026. success: function success(e) {
  12027. var statusBarHeight = 0;
  12028. var customBarHeight = 0;
  12029. statusBarHeight = e.statusBarHeight;
  12030. var custom = wx.getMenuButtonBoundingClientRect();
  12031. customBarHeight = custom.bottom + (custom.top - e.statusBarHeight <= 4 ? custom.top - e.statusBarHeight + 4 : custom.top - e.statusBarHeight);
  12032. resolve({
  12033. statusBarHeight: statusBarHeight,
  12034. customBarHeight: customBarHeight
  12035. });
  12036. },
  12037. fail: function fail(err) {
  12038. console.log("获取设备信息失败", err);
  12039. reject();
  12040. }
  12041. });
  12042. });
  12043. }
  12044. var _default = updateCustomBarInfo;
  12045. exports.default = _default;
  12046. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  12047. /***/ }),
  12048. /***/ 36:
  12049. /*!**********************************************************************************************************!*\
  12050. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  12051. \**********************************************************************************************************/
  12052. /*! exports provided: default */
  12053. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12054. "use strict";
  12055. __webpack_require__.r(__webpack_exports__);
  12056. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  12057. /* globals __VUE_SSR_CONTEXT__ */
  12058. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  12059. // This module is a runtime utility for cleaner component module output and will
  12060. // be included in the final webpack user bundle.
  12061. function normalizeComponent (
  12062. scriptExports,
  12063. render,
  12064. staticRenderFns,
  12065. functionalTemplate,
  12066. injectStyles,
  12067. scopeId,
  12068. moduleIdentifier, /* server only */
  12069. shadowMode, /* vue-cli only */
  12070. components, // fixed by xxxxxx auto components
  12071. renderjs // fixed by xxxxxx renderjs
  12072. ) {
  12073. // Vue.extend constructor export interop
  12074. var options = typeof scriptExports === 'function'
  12075. ? scriptExports.options
  12076. : scriptExports
  12077. // fixed by xxxxxx auto components
  12078. if (components) {
  12079. if (!options.components) {
  12080. options.components = {}
  12081. }
  12082. var hasOwn = Object.prototype.hasOwnProperty
  12083. for (var name in components) {
  12084. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  12085. options.components[name] = components[name]
  12086. }
  12087. }
  12088. }
  12089. // fixed by xxxxxx renderjs
  12090. if (renderjs) {
  12091. if(typeof renderjs.beforeCreate === 'function'){
  12092. renderjs.beforeCreate = [renderjs.beforeCreate]
  12093. }
  12094. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  12095. this[renderjs.__module] = this
  12096. });
  12097. (options.mixins || (options.mixins = [])).push(renderjs)
  12098. }
  12099. // render functions
  12100. if (render) {
  12101. options.render = render
  12102. options.staticRenderFns = staticRenderFns
  12103. options._compiled = true
  12104. }
  12105. // functional template
  12106. if (functionalTemplate) {
  12107. options.functional = true
  12108. }
  12109. // scopedId
  12110. if (scopeId) {
  12111. options._scopeId = 'data-v-' + scopeId
  12112. }
  12113. var hook
  12114. if (moduleIdentifier) { // server build
  12115. hook = function (context) {
  12116. // 2.3 injection
  12117. context =
  12118. context || // cached call
  12119. (this.$vnode && this.$vnode.ssrContext) || // stateful
  12120. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  12121. // 2.2 with runInNewContext: true
  12122. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  12123. context = __VUE_SSR_CONTEXT__
  12124. }
  12125. // inject component styles
  12126. if (injectStyles) {
  12127. injectStyles.call(this, context)
  12128. }
  12129. // register component module identifier for async chunk inferrence
  12130. if (context && context._registeredComponents) {
  12131. context._registeredComponents.add(moduleIdentifier)
  12132. }
  12133. }
  12134. // used by ssr in case component is cached and beforeCreate
  12135. // never gets called
  12136. options._ssrRegister = hook
  12137. } else if (injectStyles) {
  12138. hook = shadowMode
  12139. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  12140. : injectStyles
  12141. }
  12142. if (hook) {
  12143. if (options.functional) {
  12144. // for template-only hot-reload because in that case the render fn doesn't
  12145. // go through the normalizer
  12146. options._injectStyles = hook
  12147. // register for functioal component in vue file
  12148. var originalRender = options.render
  12149. options.render = function renderWithStyleInjection (h, context) {
  12150. hook.call(context)
  12151. return originalRender(h, context)
  12152. }
  12153. } else {
  12154. // inject component registration as beforeCreate hook
  12155. var existing = options.beforeCreate
  12156. options.beforeCreate = existing
  12157. ? [].concat(existing, hook)
  12158. : [hook]
  12159. }
  12160. }
  12161. return {
  12162. exports: scriptExports,
  12163. options: options
  12164. }
  12165. }
  12166. /***/ }),
  12167. /***/ 366:
  12168. /*!************************************************************************************!*\
  12169. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  12170. \************************************************************************************/
  12171. /*! no static exports found */
  12172. /***/ (function(module, exports, __webpack_require__) {
  12173. "use strict";
  12174. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  12175. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12176. Object.defineProperty(exports, "__esModule", {
  12177. value: true
  12178. });
  12179. exports.default = exports.UniCloudError = void 0;
  12180. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 75));
  12181. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 367));
  12182. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  12183. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  12184. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  12185. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 77));
  12186. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  12187. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 368));
  12188. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 369));
  12189. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 370));
  12190. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 371));
  12191. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  12192. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  12193. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 373));
  12194. 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(_e33) { throw _e33; }, 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(_e34) { didErr = true; err = _e34; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  12195. 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); }
  12196. 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; }
  12197. 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; }
  12198. 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; }
  12199. 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); }; }
  12200. 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; } }
  12201. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  12202. function t(e) {
  12203. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  12204. }
  12205. function n(e, t, n) {
  12206. return e(n = {
  12207. path: t,
  12208. exports: {},
  12209. require: function require(e, t) {
  12210. return function () {
  12211. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  12212. }(null == t && n.path);
  12213. }
  12214. }, n.exports), n.exports;
  12215. }
  12216. var s = n(function (e, t) {
  12217. var n;
  12218. e.exports = (n = n || function (e, t) {
  12219. var n = Object.create || function () {
  12220. function e() {}
  12221. return function (t) {
  12222. var n;
  12223. return e.prototype = t, n = new e(), e.prototype = null, n;
  12224. };
  12225. }(),
  12226. s = {},
  12227. r = s.lib = {},
  12228. i = r.Base = {
  12229. extend: function extend(e) {
  12230. var t = n(this);
  12231. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  12232. t.$super.init.apply(this, arguments);
  12233. }), t.init.prototype = t, t.$super = this, t;
  12234. },
  12235. create: function create() {
  12236. var e = this.extend();
  12237. return e.init.apply(e, arguments), e;
  12238. },
  12239. init: function init() {},
  12240. mixIn: function mixIn(e) {
  12241. for (var t in e) {
  12242. e.hasOwnProperty(t) && (this[t] = e[t]);
  12243. }
  12244. e.hasOwnProperty("toString") && (this.toString = e.toString);
  12245. },
  12246. clone: function clone() {
  12247. return this.init.prototype.extend(this);
  12248. }
  12249. },
  12250. o = r.WordArray = i.extend({
  12251. init: function init(e, n) {
  12252. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  12253. },
  12254. toString: function toString(e) {
  12255. return (e || c).stringify(this);
  12256. },
  12257. concat: function concat(e) {
  12258. var t = this.words,
  12259. n = e.words,
  12260. s = this.sigBytes,
  12261. r = e.sigBytes;
  12262. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  12263. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  12264. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  12265. } else for (i = 0; i < r; i += 4) {
  12266. t[s + i >>> 2] = n[i >>> 2];
  12267. }
  12268. return this.sigBytes += r, this;
  12269. },
  12270. clamp: function clamp() {
  12271. var t = this.words,
  12272. n = this.sigBytes;
  12273. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  12274. },
  12275. clone: function clone() {
  12276. var e = i.clone.call(this);
  12277. return e.words = this.words.slice(0), e;
  12278. },
  12279. random: function random(t) {
  12280. for (var n, s = [], r = function r(t) {
  12281. t = t;
  12282. var n = 987654321,
  12283. s = 4294967295;
  12284. return function () {
  12285. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  12286. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  12287. };
  12288. }, i = 0; i < t; i += 4) {
  12289. var a = r(4294967296 * (n || e.random()));
  12290. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  12291. }
  12292. return new o.init(s, t);
  12293. }
  12294. }),
  12295. a = s.enc = {},
  12296. c = a.Hex = {
  12297. stringify: function stringify(e) {
  12298. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  12299. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  12300. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  12301. }
  12302. return s.join("");
  12303. },
  12304. parse: function parse(e) {
  12305. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  12306. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  12307. }
  12308. return new o.init(n, t / 2);
  12309. }
  12310. },
  12311. u = a.Latin1 = {
  12312. stringify: function stringify(e) {
  12313. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  12314. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  12315. s.push(String.fromCharCode(i));
  12316. }
  12317. return s.join("");
  12318. },
  12319. parse: function parse(e) {
  12320. for (var t = e.length, n = [], s = 0; s < t; s++) {
  12321. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  12322. }
  12323. return new o.init(n, t);
  12324. }
  12325. },
  12326. l = a.Utf8 = {
  12327. stringify: function stringify(e) {
  12328. try {
  12329. return decodeURIComponent(escape(u.stringify(e)));
  12330. } catch (e) {
  12331. throw new Error("Malformed UTF-8 data");
  12332. }
  12333. },
  12334. parse: function parse(e) {
  12335. return u.parse(unescape(encodeURIComponent(e)));
  12336. }
  12337. },
  12338. h = r.BufferedBlockAlgorithm = i.extend({
  12339. reset: function reset() {
  12340. this._data = new o.init(), this._nDataBytes = 0;
  12341. },
  12342. _append: function _append(e) {
  12343. "string" == typeof e && (e = l.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  12344. },
  12345. _process: function _process(t) {
  12346. var n = this._data,
  12347. s = n.words,
  12348. r = n.sigBytes,
  12349. i = this.blockSize,
  12350. a = r / (4 * i),
  12351. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  12352. u = e.min(4 * c, r);
  12353. if (c) {
  12354. for (var l = 0; l < c; l += i) {
  12355. this._doProcessBlock(s, l);
  12356. }
  12357. var h = s.splice(0, c);
  12358. n.sigBytes -= u;
  12359. }
  12360. return new o.init(h, u);
  12361. },
  12362. clone: function clone() {
  12363. var e = i.clone.call(this);
  12364. return e._data = this._data.clone(), e;
  12365. },
  12366. _minBufferSize: 0
  12367. });
  12368. r.Hasher = h.extend({
  12369. cfg: i.extend(),
  12370. init: function init(e) {
  12371. this.cfg = this.cfg.extend(e), this.reset();
  12372. },
  12373. reset: function reset() {
  12374. h.reset.call(this), this._doReset();
  12375. },
  12376. update: function update(e) {
  12377. return this._append(e), this._process(), this;
  12378. },
  12379. finalize: function finalize(e) {
  12380. return e && this._append(e), this._doFinalize();
  12381. },
  12382. blockSize: 16,
  12383. _createHelper: function _createHelper(e) {
  12384. return function (t, n) {
  12385. return new e.init(n).finalize(t);
  12386. };
  12387. },
  12388. _createHmacHelper: function _createHmacHelper(e) {
  12389. return function (t, n) {
  12390. return new d.HMAC.init(e, n).finalize(t);
  12391. };
  12392. }
  12393. });
  12394. var d = s.algo = {};
  12395. return s;
  12396. }(Math), n);
  12397. }),
  12398. r = s,
  12399. i = (n(function (e, t) {
  12400. var n;
  12401. e.exports = (n = r, function (e) {
  12402. var t = n,
  12403. s = t.lib,
  12404. r = s.WordArray,
  12405. i = s.Hasher,
  12406. o = t.algo,
  12407. a = [];
  12408. !function () {
  12409. for (var t = 0; t < 64; t++) {
  12410. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  12411. }
  12412. }();
  12413. var c = o.MD5 = i.extend({
  12414. _doReset: function _doReset() {
  12415. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  12416. },
  12417. _doProcessBlock: function _doProcessBlock(e, t) {
  12418. for (var n = 0; n < 16; n++) {
  12419. var s = t + n,
  12420. r = e[s];
  12421. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  12422. }
  12423. var i = this._hash.words,
  12424. o = e[t + 0],
  12425. c = e[t + 1],
  12426. p = e[t + 2],
  12427. f = e[t + 3],
  12428. g = e[t + 4],
  12429. m = e[t + 5],
  12430. y = e[t + 6],
  12431. _ = e[t + 7],
  12432. w = e[t + 8],
  12433. v = e[t + 9],
  12434. I = e[t + 10],
  12435. S = e[t + 11],
  12436. b = e[t + 12],
  12437. k = e[t + 13],
  12438. A = e[t + 14],
  12439. C = e[t + 15],
  12440. P = i[0],
  12441. T = i[1],
  12442. x = i[2],
  12443. O = i[3];
  12444. P = u(P, T, x, O, o, 7, a[0]), O = u(O, P, T, x, c, 12, a[1]), x = u(x, O, P, T, p, 17, a[2]), T = u(T, x, O, P, f, 22, a[3]), P = u(P, T, x, O, g, 7, a[4]), O = u(O, P, T, x, m, 12, a[5]), x = u(x, O, P, T, y, 17, a[6]), T = u(T, x, O, P, _, 22, a[7]), P = u(P, T, x, O, w, 7, a[8]), O = u(O, P, T, x, v, 12, a[9]), x = u(x, O, P, T, I, 17, a[10]), T = u(T, x, O, P, S, 22, a[11]), P = u(P, T, x, O, b, 7, a[12]), O = u(O, P, T, x, k, 12, a[13]), x = u(x, O, P, T, A, 17, a[14]), P = l(P, T = u(T, x, O, P, C, 22, a[15]), x, O, c, 5, a[16]), O = l(O, P, T, x, y, 9, a[17]), x = l(x, O, P, T, S, 14, a[18]), T = l(T, x, O, P, o, 20, a[19]), P = l(P, T, x, O, m, 5, a[20]), O = l(O, P, T, x, I, 9, a[21]), x = l(x, O, P, T, C, 14, a[22]), T = l(T, x, O, P, g, 20, a[23]), P = l(P, T, x, O, v, 5, a[24]), O = l(O, P, T, x, A, 9, a[25]), x = l(x, O, P, T, f, 14, a[26]), T = l(T, x, O, P, w, 20, a[27]), P = l(P, T, x, O, k, 5, a[28]), O = l(O, P, T, x, p, 9, a[29]), x = l(x, O, P, T, _, 14, a[30]), P = h(P, T = l(T, x, O, P, b, 20, a[31]), x, O, m, 4, a[32]), O = h(O, P, T, x, w, 11, a[33]), x = h(x, O, P, T, S, 16, a[34]), T = h(T, x, O, P, A, 23, a[35]), P = h(P, T, x, O, c, 4, a[36]), O = h(O, P, T, x, g, 11, a[37]), x = h(x, O, P, T, _, 16, a[38]), T = h(T, x, O, P, I, 23, a[39]), P = h(P, T, x, O, k, 4, a[40]), O = h(O, P, T, x, o, 11, a[41]), x = h(x, O, P, T, f, 16, a[42]), T = h(T, x, O, P, y, 23, a[43]), P = h(P, T, x, O, v, 4, a[44]), O = h(O, P, T, x, b, 11, a[45]), x = h(x, O, P, T, C, 16, a[46]), P = d(P, T = h(T, x, O, P, p, 23, a[47]), x, O, o, 6, a[48]), O = d(O, P, T, x, _, 10, a[49]), x = d(x, O, P, T, A, 15, a[50]), T = d(T, x, O, P, m, 21, a[51]), P = d(P, T, x, O, b, 6, a[52]), O = d(O, P, T, x, f, 10, a[53]), x = d(x, O, P, T, I, 15, a[54]), T = d(T, x, O, P, c, 21, a[55]), P = d(P, T, x, O, w, 6, a[56]), O = d(O, P, T, x, C, 10, a[57]), x = d(x, O, P, T, y, 15, a[58]), T = d(T, x, O, P, k, 21, a[59]), P = d(P, T, x, O, g, 6, a[60]), O = d(O, P, T, x, S, 10, a[61]), x = d(x, O, P, T, p, 15, a[62]), T = d(T, x, O, P, v, 21, a[63]), i[0] = i[0] + P | 0, i[1] = i[1] + T | 0, i[2] = i[2] + x | 0, i[3] = i[3] + O | 0;
  12445. },
  12446. _doFinalize: function _doFinalize() {
  12447. var t = this._data,
  12448. n = t.words,
  12449. s = 8 * this._nDataBytes,
  12450. r = 8 * t.sigBytes;
  12451. n[r >>> 5] |= 128 << 24 - r % 32;
  12452. var i = e.floor(s / 4294967296),
  12453. o = s;
  12454. 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();
  12455. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  12456. var l = c[u];
  12457. c[u] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8);
  12458. }
  12459. return a;
  12460. },
  12461. clone: function clone() {
  12462. var e = i.clone.call(this);
  12463. return e._hash = this._hash.clone(), e;
  12464. }
  12465. });
  12466. function u(e, t, n, s, r, i, o) {
  12467. var a = e + (t & n | ~t & s) + r + o;
  12468. return (a << i | a >>> 32 - i) + t;
  12469. }
  12470. function l(e, t, n, s, r, i, o) {
  12471. var a = e + (t & s | n & ~s) + r + o;
  12472. return (a << i | a >>> 32 - i) + t;
  12473. }
  12474. function h(e, t, n, s, r, i, o) {
  12475. var a = e + (t ^ n ^ s) + r + o;
  12476. return (a << i | a >>> 32 - i) + t;
  12477. }
  12478. function d(e, t, n, s, r, i, o) {
  12479. var a = e + (n ^ (t | ~s)) + r + o;
  12480. return (a << i | a >>> 32 - i) + t;
  12481. }
  12482. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  12483. }(Math), n.MD5);
  12484. }), n(function (e, t) {
  12485. var n;
  12486. e.exports = (n = r, void function () {
  12487. var e = n,
  12488. t = e.lib.Base,
  12489. s = e.enc.Utf8;
  12490. e.algo.HMAC = t.extend({
  12491. init: function init(e, t) {
  12492. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  12493. var n = e.blockSize,
  12494. r = 4 * n;
  12495. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  12496. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  12497. a[u] ^= 1549556828, c[u] ^= 909522486;
  12498. }
  12499. i.sigBytes = o.sigBytes = r, this.reset();
  12500. },
  12501. reset: function reset() {
  12502. var e = this._hasher;
  12503. e.reset(), e.update(this._iKey);
  12504. },
  12505. update: function update(e) {
  12506. return this._hasher.update(e), this;
  12507. },
  12508. finalize: function finalize(e) {
  12509. var t = this._hasher,
  12510. n = t.finalize(e);
  12511. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  12512. }
  12513. });
  12514. }());
  12515. }), n(function (e, t) {
  12516. e.exports = r.HmacMD5;
  12517. })),
  12518. o = n(function (e, t) {
  12519. e.exports = r.enc.Utf8;
  12520. }),
  12521. a = n(function (e, t) {
  12522. var n;
  12523. e.exports = (n = r, function () {
  12524. var e = n,
  12525. t = e.lib.WordArray;
  12526. function s(e, n, s) {
  12527. for (var r = [], i = 0, o = 0; o < n; o++) {
  12528. if (o % 4) {
  12529. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  12530. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  12531. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  12532. }
  12533. }
  12534. return t.create(r, i);
  12535. }
  12536. e.enc.Base64 = {
  12537. stringify: function stringify(e) {
  12538. var t = e.words,
  12539. n = e.sigBytes,
  12540. s = this._map;
  12541. e.clamp();
  12542. for (var r = [], i = 0; i < n; i += 3) {
  12543. 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++) {
  12544. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  12545. }
  12546. }
  12547. var c = s.charAt(64);
  12548. if (c) for (; r.length % 4;) {
  12549. r.push(c);
  12550. }
  12551. return r.join("");
  12552. },
  12553. parse: function parse(e) {
  12554. var t = e.length,
  12555. n = this._map,
  12556. r = this._reverseMap;
  12557. if (!r) {
  12558. r = this._reverseMap = [];
  12559. for (var i = 0; i < n.length; i++) {
  12560. r[n.charCodeAt(i)] = i;
  12561. }
  12562. }
  12563. var o = n.charAt(64);
  12564. if (o) {
  12565. var a = e.indexOf(o);
  12566. -1 !== a && (t = a);
  12567. }
  12568. return s(e, t, r);
  12569. },
  12570. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  12571. };
  12572. }(), n.enc.Base64);
  12573. });
  12574. var c = "FUNCTION",
  12575. u = "OBJECT",
  12576. l = "CLIENT_DB",
  12577. h = "pending",
  12578. d = "fulfilled",
  12579. p = "rejected";
  12580. function f(e) {
  12581. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  12582. }
  12583. function g(e) {
  12584. return "object" === f(e);
  12585. }
  12586. function m(e) {
  12587. return "function" == typeof e;
  12588. }
  12589. function y(e) {
  12590. return function () {
  12591. try {
  12592. return e.apply(e, arguments);
  12593. } catch (e) {
  12594. console.error(e);
  12595. }
  12596. };
  12597. }
  12598. var _ = "REJECTED",
  12599. w = "NOT_PENDING";
  12600. var v = /*#__PURE__*/function () {
  12601. function v() {
  12602. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12603. e = _ref.createPromise,
  12604. _ref$retryRule = _ref.retryRule,
  12605. t = _ref$retryRule === void 0 ? _ : _ref$retryRule;
  12606. (0, _classCallCheck2.default)(this, v);
  12607. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  12608. }
  12609. (0, _createClass2.default)(v, [{
  12610. key: "needRetry",
  12611. get: function get() {
  12612. if (!this.status) return !0;
  12613. switch (this.retryRule) {
  12614. case _:
  12615. return this.status === p;
  12616. case w:
  12617. return this.status !== h;
  12618. }
  12619. }
  12620. }, {
  12621. key: "exec",
  12622. value: function exec() {
  12623. var _this = this;
  12624. return this.needRetry ? (this.status = h, this.promise = this.createPromise().then(function (e) {
  12625. return _this.status = d, Promise.resolve(e);
  12626. }, function (e) {
  12627. return _this.status = p, Promise.reject(e);
  12628. }), this.promise) : this.promise;
  12629. }
  12630. }]);
  12631. return v;
  12632. }();
  12633. function I(e) {
  12634. return e && "string" == typeof e ? JSON.parse(e) : e;
  12635. }
  12636. var S = "development" === "development",
  12637. b = "mp-weixin",
  12638. k = "true" === undefined || !0 === undefined,
  12639. A = I([]),
  12640. C = "h5" === b ? "web" : "app-plus" === b ? "app" : b,
  12641. P = I(undefined),
  12642. T = I([]) || [],
  12643. x = true;
  12644. var O = "";
  12645. try {
  12646. O = (__webpack_require__(/*! uni-stat-config */ 374).default || __webpack_require__(/*! uni-stat-config */ 374)).appid;
  12647. } catch (e) {}
  12648. var E = {};
  12649. function L(e) {
  12650. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12651. var n, s;
  12652. return n = E, s = e, Object.prototype.hasOwnProperty.call(n, s) || (E[e] = t), E[e];
  12653. }
  12654. "app" === C && (E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  12655. var R = ["invoke", "success", "fail", "complete"],
  12656. U = L("_globalUniCloudInterceptor");
  12657. function N(e, t) {
  12658. U[e] || (U[e] = {}), g(t) && Object.keys(t).forEach(function (n) {
  12659. R.indexOf(n) > -1 && function (e, t, n) {
  12660. var s = U[e][t];
  12661. s || (s = U[e][t] = []), -1 === s.indexOf(n) && m(n) && s.push(n);
  12662. }(e, n, t[n]);
  12663. });
  12664. }
  12665. function D(e, t) {
  12666. U[e] || (U[e] = {}), g(t) ? Object.keys(t).forEach(function (n) {
  12667. R.indexOf(n) > -1 && function (e, t, n) {
  12668. var s = U[e][t];
  12669. if (!s) return;
  12670. var r = s.indexOf(n);
  12671. r > -1 && s.splice(r, 1);
  12672. }(e, n, t[n]);
  12673. }) : delete U[e];
  12674. }
  12675. function q(e, t) {
  12676. return e && 0 !== e.length ? e.reduce(function (e, n) {
  12677. return e.then(function () {
  12678. return n(t);
  12679. });
  12680. }, Promise.resolve()) : Promise.resolve();
  12681. }
  12682. function M(e, t) {
  12683. return U[e] && U[e][t] || [];
  12684. }
  12685. function F(e) {
  12686. N("callObject", e);
  12687. }
  12688. var K = L("_globalUniCloudListener"),
  12689. j = "response",
  12690. $ = "needLogin",
  12691. B = "refreshToken",
  12692. W = "clientdb",
  12693. H = "cloudfunction",
  12694. J = "cloudobject";
  12695. function z(e) {
  12696. return K[e] || (K[e] = []), K[e];
  12697. }
  12698. function V(e, t) {
  12699. var n = z(e);
  12700. n.includes(t) || n.push(t);
  12701. }
  12702. function G(e, t) {
  12703. var n = z(e),
  12704. s = n.indexOf(t);
  12705. -1 !== s && n.splice(s, 1);
  12706. }
  12707. function Y(e, t) {
  12708. var n = z(e);
  12709. for (var _e2 = 0; _e2 < n.length; _e2++) {
  12710. (0, n[_e2])(t);
  12711. }
  12712. }
  12713. var Q,
  12714. X = !1;
  12715. function Z() {
  12716. return Q || (Q = new Promise(function (e) {
  12717. X && e(), function t() {
  12718. if ("function" == typeof getCurrentPages) {
  12719. var _t2 = getCurrentPages();
  12720. _t2 && _t2[0] && (X = !0, e());
  12721. }
  12722. X || setTimeout(function () {
  12723. t();
  12724. }, 30);
  12725. }();
  12726. }), Q);
  12727. }
  12728. function ee(e) {
  12729. var t = {};
  12730. for (var _n2 in e) {
  12731. var _s2 = e[_n2];
  12732. m(_s2) && (t[_n2] = y(_s2));
  12733. }
  12734. return t;
  12735. }
  12736. var te = /*#__PURE__*/function (_Error) {
  12737. (0, _inherits2.default)(te, _Error);
  12738. var _super = _createSuper(te);
  12739. function te(e) {
  12740. var _this2;
  12741. (0, _classCallCheck2.default)(this, te);
  12742. _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;
  12743. return _this2;
  12744. }
  12745. (0, _createClass2.default)(te, [{
  12746. key: "toJson",
  12747. value: function toJson() {
  12748. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  12749. if (!(e >= 10)) return e++, {
  12750. errCode: this.errCode,
  12751. errMsg: this.errMsg,
  12752. errSubject: this.errSubject,
  12753. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  12754. };
  12755. }
  12756. }]);
  12757. return te;
  12758. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  12759. exports.UniCloudError = te;
  12760. var ne = {
  12761. request: function request(e) {
  12762. return uni.request(e);
  12763. },
  12764. uploadFile: function uploadFile(e) {
  12765. return uni.uploadFile(e);
  12766. },
  12767. setStorageSync: function setStorageSync(e, t) {
  12768. return uni.setStorageSync(e, t);
  12769. },
  12770. getStorageSync: function getStorageSync(e) {
  12771. return uni.getStorageSync(e);
  12772. },
  12773. removeStorageSync: function removeStorageSync(e) {
  12774. return uni.removeStorageSync(e);
  12775. },
  12776. clearStorageSync: function clearStorageSync() {
  12777. return uni.clearStorageSync();
  12778. },
  12779. connectSocket: function connectSocket(e) {
  12780. return uni.connectSocket(e);
  12781. }
  12782. };
  12783. function se() {
  12784. return {
  12785. token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"),
  12786. tokenExpired: ne.getStorageSync("uni_id_token_expired")
  12787. };
  12788. }
  12789. function re() {
  12790. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12791. e = _ref2.token,
  12792. t = _ref2.tokenExpired;
  12793. e && ne.setStorageSync("uni_id_token", e), t && ne.setStorageSync("uni_id_token_expired", t);
  12794. }
  12795. var ie, oe;
  12796. function ae() {
  12797. return ie || (ie = uni.getSystemInfoSync()), ie;
  12798. }
  12799. function ce() {
  12800. var e, t;
  12801. try {
  12802. if (uni.getLaunchOptionsSync) {
  12803. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  12804. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  12805. _n3 = _uni$getLaunchOptions.scene,
  12806. _s3 = _uni$getLaunchOptions.channel;
  12807. e = _s3, t = _n3;
  12808. }
  12809. } catch (e) {}
  12810. return {
  12811. channel: e,
  12812. scene: t
  12813. };
  12814. }
  12815. var ue = {};
  12816. function le() {
  12817. var e = uni.getLocale && uni.getLocale() || "en";
  12818. if (oe) return _objectSpread(_objectSpread(_objectSpread({}, ue), oe), {}, {
  12819. locale: e,
  12820. LOCALE: e
  12821. });
  12822. var t = ae(),
  12823. n = t.deviceId,
  12824. s = t.osName,
  12825. r = t.uniPlatform,
  12826. i = t.appId,
  12827. o = ["appId", "appLanguage", "appName", "appVersion", "appVersionCode", "appWgtVersion", "browserName", "browserVersion", "deviceBrand", "deviceId", "deviceModel", "deviceType", "osName", "osVersion", "romName", "romVersion", "ua", "hostName", "hostVersion", "uniPlatform", "uniRuntimeVersion", "uniRuntimeVersionCode", "uniCompilerVersion", "uniCompilerVersionCode"];
  12828. for (var _e3 in t) {
  12829. Object.hasOwnProperty.call(t, _e3) && -1 === o.indexOf(_e3) && delete t[_e3];
  12830. }
  12831. return oe = _objectSpread(_objectSpread({
  12832. PLATFORM: r,
  12833. OS: s,
  12834. APPID: i,
  12835. DEVICEID: n
  12836. }, ce()), t), _objectSpread(_objectSpread(_objectSpread({}, ue), oe), {}, {
  12837. locale: e,
  12838. LOCALE: e
  12839. });
  12840. }
  12841. var he = {
  12842. sign: function sign(e, t) {
  12843. var n = "";
  12844. return Object.keys(e).sort().forEach(function (t) {
  12845. e[t] && (n = n + "&" + t + "=" + e[t]);
  12846. }), n = n.slice(1), i(n, t).toString();
  12847. },
  12848. wrappedRequest: function wrappedRequest(e, t) {
  12849. return new Promise(function (n, s) {
  12850. t(Object.assign(e, {
  12851. complete: function complete(e) {
  12852. e || (e = {}), S && "web" === C && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");
  12853. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  12854. if (!e.statusCode || e.statusCode >= 400) {
  12855. var _n4 = e.data && e.data.error && e.data.error.code || "SYS_ERR",
  12856. _r = e.data && e.data.error && e.data.error.message || e.errMsg || "request:fail";
  12857. return s(new te({
  12858. code: _n4,
  12859. message: _r,
  12860. requestId: t
  12861. }));
  12862. }
  12863. var r = e.data;
  12864. if (r.error) return s(new te({
  12865. code: r.error.code,
  12866. message: r.error.message,
  12867. requestId: t
  12868. }));
  12869. r.result = r.data, r.requestId = t, delete r.data, n(r);
  12870. }
  12871. }));
  12872. });
  12873. },
  12874. toBase64: function toBase64(e) {
  12875. return a.stringify(o.parse(e));
  12876. }
  12877. };
  12878. var de = /*#__PURE__*/function () {
  12879. function de(e) {
  12880. var _this3 = this;
  12881. (0, _classCallCheck2.default)(this, de);
  12882. ["spaceId", "clientSecret"].forEach(function (t) {
  12883. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  12884. }), this.config = Object.assign({}, {
  12885. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  12886. }, 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({
  12887. createPromise: function createPromise() {
  12888. return _this3.requestAuth(_this3.setupRequest({
  12889. method: "serverless.auth.user.anonymousAuthorize",
  12890. params: "{}"
  12891. }, "auth")).then(function (e) {
  12892. if (!e.result || !e.result.accessToken) throw new te({
  12893. code: "AUTH_FAILED",
  12894. message: "获取accessToken失败"
  12895. });
  12896. _this3.setAccessToken(e.result.accessToken);
  12897. });
  12898. },
  12899. retryRule: w
  12900. });
  12901. }
  12902. (0, _createClass2.default)(de, [{
  12903. key: "hasAccessToken",
  12904. get: function get() {
  12905. return !!this.accessToken;
  12906. }
  12907. }, {
  12908. key: "setAccessToken",
  12909. value: function setAccessToken(e) {
  12910. this.accessToken = e;
  12911. }
  12912. }, {
  12913. key: "requestWrapped",
  12914. value: function requestWrapped(e) {
  12915. return he.wrappedRequest(e, this.adapter.request);
  12916. }
  12917. }, {
  12918. key: "requestAuth",
  12919. value: function requestAuth(e) {
  12920. return this.requestWrapped(e);
  12921. }
  12922. }, {
  12923. key: "request",
  12924. value: function request(e, t) {
  12925. var _this4 = this;
  12926. return Promise.resolve().then(function () {
  12927. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  12928. return new Promise(function (e, n) {
  12929. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  12930. }).then(function () {
  12931. return _this4.getAccessToken();
  12932. }).then(function () {
  12933. var t = _this4.rebuildRequest(e);
  12934. return _this4.request(t, !0);
  12935. });
  12936. }) : _this4.getAccessToken().then(function () {
  12937. var t = _this4.rebuildRequest(e);
  12938. return _this4.request(t, !0);
  12939. });
  12940. });
  12941. }
  12942. }, {
  12943. key: "rebuildRequest",
  12944. value: function rebuildRequest(e) {
  12945. var t = Object.assign({}, e);
  12946. 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;
  12947. }
  12948. }, {
  12949. key: "setupRequest",
  12950. value: function setupRequest(e, t) {
  12951. var n = Object.assign({}, e, {
  12952. spaceId: this.config.spaceId,
  12953. timestamp: Date.now()
  12954. }),
  12955. s = {
  12956. "Content-Type": "application/json"
  12957. };
  12958. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = he.sign(n, this.config.clientSecret), {
  12959. url: this.config.requestUrl,
  12960. method: "POST",
  12961. data: n,
  12962. dataType: "json",
  12963. header: s
  12964. };
  12965. }
  12966. }, {
  12967. key: "getAccessToken",
  12968. value: function getAccessToken() {
  12969. return this._getAccessTokenPromiseHub.exec();
  12970. }
  12971. }, {
  12972. key: "authorize",
  12973. value: function () {
  12974. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  12975. return _regenerator.default.wrap(function _callee$(_context) {
  12976. while (1) {
  12977. switch (_context.prev = _context.next) {
  12978. case 0:
  12979. _context.next = 2;
  12980. return this.getAccessToken();
  12981. case 2:
  12982. case "end":
  12983. return _context.stop();
  12984. }
  12985. }
  12986. }, _callee, this);
  12987. }));
  12988. function authorize() {
  12989. return _authorize.apply(this, arguments);
  12990. }
  12991. return authorize;
  12992. }()
  12993. }, {
  12994. key: "callFunction",
  12995. value: function callFunction(e) {
  12996. var t = {
  12997. method: "serverless.function.runtime.invoke",
  12998. params: JSON.stringify({
  12999. functionTarget: e.name,
  13000. functionArgs: e.data || {}
  13001. })
  13002. };
  13003. return this.request(_objectSpread(_objectSpread({}, this.setupRequest(t)), {}, {
  13004. timeout: e.timeout
  13005. }));
  13006. }
  13007. }, {
  13008. key: "getOSSUploadOptionsFromPath",
  13009. value: function getOSSUploadOptionsFromPath(e) {
  13010. var t = {
  13011. method: "serverless.file.resource.generateProximalSign",
  13012. params: JSON.stringify(e)
  13013. };
  13014. return this.request(this.setupRequest(t));
  13015. }
  13016. }, {
  13017. key: "uploadFileToOSS",
  13018. value: function uploadFileToOSS(_ref3) {
  13019. var _this5 = this;
  13020. var e = _ref3.url,
  13021. t = _ref3.formData,
  13022. n = _ref3.name,
  13023. s = _ref3.filePath,
  13024. r = _ref3.fileType,
  13025. i = _ref3.onUploadProgress;
  13026. return new Promise(function (o, a) {
  13027. var c = _this5.adapter.uploadFile({
  13028. url: e,
  13029. formData: t,
  13030. name: n,
  13031. filePath: s,
  13032. fileType: r,
  13033. header: {
  13034. "X-OSS-server-side-encrpytion": "AES256"
  13035. },
  13036. success: function success(e) {
  13037. e && e.statusCode < 400 ? o(e) : a(new te({
  13038. code: "UPLOAD_FAILED",
  13039. message: "文件上传失败"
  13040. }));
  13041. },
  13042. fail: function fail(e) {
  13043. a(new te({
  13044. code: e.code || "UPLOAD_FAILED",
  13045. message: e.message || e.errMsg || "文件上传失败"
  13046. }));
  13047. }
  13048. });
  13049. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  13050. i({
  13051. loaded: e.totalBytesSent,
  13052. total: e.totalBytesExpectedToSend
  13053. });
  13054. });
  13055. });
  13056. }
  13057. }, {
  13058. key: "reportOSSUpload",
  13059. value: function reportOSSUpload(e) {
  13060. var t = {
  13061. method: "serverless.file.resource.report",
  13062. params: JSON.stringify(e)
  13063. };
  13064. return this.request(this.setupRequest(t));
  13065. }
  13066. }, {
  13067. key: "uploadFile",
  13068. value: function () {
  13069. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  13070. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, l, h, d, p, g, m, y, _, _e4, w;
  13071. return _regenerator.default.wrap(function _callee2$(_context2) {
  13072. while (1) {
  13073. switch (_context2.prev = _context2.next) {
  13074. case 0:
  13075. 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;
  13076. if (!("string" !== f(t))) {
  13077. _context2.next = 3;
  13078. break;
  13079. }
  13080. throw new te({
  13081. code: "INVALID_PARAM",
  13082. message: "cloudPath必须为字符串类型"
  13083. });
  13084. case 3:
  13085. if (t = t.trim()) {
  13086. _context2.next = 5;
  13087. break;
  13088. }
  13089. throw new te({
  13090. code: "INVALID_PARAM",
  13091. message: "cloudPath不可为空"
  13092. });
  13093. case 5:
  13094. if (!/:\/\//.test(t)) {
  13095. _context2.next = 7;
  13096. break;
  13097. }
  13098. throw new te({
  13099. code: "INVALID_PARAM",
  13100. message: "cloudPath不合法"
  13101. });
  13102. case 7:
  13103. o = i && i.envType || this.config.envType;
  13104. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  13105. _context2.next = 10;
  13106. break;
  13107. }
  13108. throw new te({
  13109. code: "INVALID_PARAM",
  13110. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  13111. });
  13112. case 10:
  13113. _context2.next = 12;
  13114. return this.getOSSUploadOptionsFromPath({
  13115. env: o,
  13116. filename: s ? t.split("/").pop() : t,
  13117. fileId: s ? t : void 0
  13118. });
  13119. case 12:
  13120. a = _context2.sent.result;
  13121. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  13122. u = a.securityToken;
  13123. l = a.accessKeyId;
  13124. h = a.signature;
  13125. d = a.host;
  13126. p = a.ossPath;
  13127. g = a.id;
  13128. m = a.policy;
  13129. y = a.ossCallbackUrl;
  13130. _ = {
  13131. "Cache-Control": "max-age=2592000",
  13132. "Content-Disposition": "attachment",
  13133. OSSAccessKeyId: l,
  13134. Signature: h,
  13135. host: d,
  13136. id: g,
  13137. key: p,
  13138. policy: m,
  13139. success_action_status: 200
  13140. };
  13141. if (u && (_["x-oss-security-token"] = u), y) {
  13142. _e4 = JSON.stringify({
  13143. callbackUrl: y,
  13144. callbackBody: JSON.stringify({
  13145. fileId: g,
  13146. spaceId: this.config.spaceId
  13147. }),
  13148. callbackBodyType: "application/json"
  13149. });
  13150. _.callback = he.toBase64(_e4);
  13151. }
  13152. w = {
  13153. url: "https://" + a.host,
  13154. formData: _,
  13155. fileName: "file",
  13156. name: "file",
  13157. filePath: e,
  13158. fileType: n
  13159. };
  13160. _context2.next = 27;
  13161. return this.uploadFileToOSS(Object.assign({}, w, {
  13162. onUploadProgress: r
  13163. }));
  13164. case 27:
  13165. if (!y) {
  13166. _context2.next = 29;
  13167. break;
  13168. }
  13169. return _context2.abrupt("return", {
  13170. success: !0,
  13171. filePath: e,
  13172. fileID: c
  13173. });
  13174. case 29:
  13175. _context2.next = 31;
  13176. return this.reportOSSUpload({
  13177. id: g
  13178. });
  13179. case 31:
  13180. if (!_context2.sent.success) {
  13181. _context2.next = 33;
  13182. break;
  13183. }
  13184. return _context2.abrupt("return", {
  13185. success: !0,
  13186. filePath: e,
  13187. fileID: c
  13188. });
  13189. case 33:
  13190. throw new te({
  13191. code: "UPLOAD_FAILED",
  13192. message: "文件上传失败"
  13193. });
  13194. case 34:
  13195. case "end":
  13196. return _context2.stop();
  13197. }
  13198. }
  13199. }, _callee2, this);
  13200. }));
  13201. function uploadFile(_x) {
  13202. return _uploadFile.apply(this, arguments);
  13203. }
  13204. return uploadFile;
  13205. }()
  13206. }, {
  13207. key: "getTempFileURL",
  13208. value: function getTempFileURL() {
  13209. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  13210. e = _ref5.fileList;
  13211. return new Promise(function (t, n) {
  13212. Array.isArray(e) && 0 !== e.length || n(new te({
  13213. code: "INVALID_PARAM",
  13214. message: "fileList的元素必须是非空的字符串"
  13215. })), t({
  13216. fileList: e.map(function (e) {
  13217. return {
  13218. fileID: e,
  13219. tempFileURL: e
  13220. };
  13221. })
  13222. });
  13223. });
  13224. }
  13225. }, {
  13226. key: "getFileInfo",
  13227. value: function () {
  13228. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  13229. var _ref6,
  13230. e,
  13231. t,
  13232. _args3 = arguments;
  13233. return _regenerator.default.wrap(function _callee3$(_context3) {
  13234. while (1) {
  13235. switch (_context3.prev = _context3.next) {
  13236. case 0:
  13237. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  13238. if (!(!Array.isArray(e) || 0 === e.length)) {
  13239. _context3.next = 3;
  13240. break;
  13241. }
  13242. throw new te({
  13243. code: "INVALID_PARAM",
  13244. message: "fileList的元素必须是非空的字符串"
  13245. });
  13246. case 3:
  13247. t = {
  13248. method: "serverless.file.resource.info",
  13249. params: JSON.stringify({
  13250. id: e.map(function (e) {
  13251. return e.split("?")[0];
  13252. }).join(",")
  13253. })
  13254. };
  13255. _context3.next = 6;
  13256. return this.request(this.setupRequest(t));
  13257. case 6:
  13258. _context3.t0 = _context3.sent.result;
  13259. return _context3.abrupt("return", {
  13260. fileList: _context3.t0
  13261. });
  13262. case 8:
  13263. case "end":
  13264. return _context3.stop();
  13265. }
  13266. }
  13267. }, _callee3, this);
  13268. }));
  13269. function getFileInfo() {
  13270. return _getFileInfo.apply(this, arguments);
  13271. }
  13272. return getFileInfo;
  13273. }()
  13274. }]);
  13275. return de;
  13276. }();
  13277. var pe = {
  13278. init: function init(e) {
  13279. var t = new de(e),
  13280. n = {
  13281. signInAnonymously: function signInAnonymously() {
  13282. return t.authorize();
  13283. },
  13284. getLoginState: function getLoginState() {
  13285. return Promise.resolve(!1);
  13286. }
  13287. };
  13288. return t.auth = function () {
  13289. return n;
  13290. }, t.customAuth = t.auth, t;
  13291. }
  13292. };
  13293. var fe = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  13294. var ge;
  13295. !function (e) {
  13296. e.local = "local", e.none = "none", e.session = "session";
  13297. }(ge || (ge = {}));
  13298. var me = function me() {},
  13299. ye = n(function (e, t) {
  13300. var n;
  13301. e.exports = (n = r, function (e) {
  13302. var t = n,
  13303. s = t.lib,
  13304. r = s.WordArray,
  13305. i = s.Hasher,
  13306. o = t.algo,
  13307. a = [],
  13308. c = [];
  13309. !function () {
  13310. function t(t) {
  13311. for (var n = e.sqrt(t), s = 2; s <= n; s++) {
  13312. if (!(t % s)) return !1;
  13313. }
  13314. return !0;
  13315. }
  13316. function n(e) {
  13317. return 4294967296 * (e - (0 | e)) | 0;
  13318. }
  13319. for (var s = 2, r = 0; r < 64;) {
  13320. t(s) && (r < 8 && (a[r] = n(e.pow(s, .5))), c[r] = n(e.pow(s, 1 / 3)), r++), s++;
  13321. }
  13322. }();
  13323. var u = [],
  13324. l = o.SHA256 = i.extend({
  13325. _doReset: function _doReset() {
  13326. this._hash = new r.init(a.slice(0));
  13327. },
  13328. _doProcessBlock: function _doProcessBlock(e, t) {
  13329. for (var n = this._hash.words, s = n[0], r = n[1], i = n[2], o = n[3], a = n[4], l = n[5], h = n[6], d = n[7], p = 0; p < 64; p++) {
  13330. if (p < 16) u[p] = 0 | e[t + p];else {
  13331. var f = u[p - 15],
  13332. g = (f << 25 | f >>> 7) ^ (f << 14 | f >>> 18) ^ f >>> 3,
  13333. m = u[p - 2],
  13334. y = (m << 15 | m >>> 17) ^ (m << 13 | m >>> 19) ^ m >>> 10;
  13335. u[p] = g + u[p - 7] + y + u[p - 16];
  13336. }
  13337. var _ = s & r ^ s & i ^ r & i,
  13338. w = (s << 30 | s >>> 2) ^ (s << 19 | s >>> 13) ^ (s << 10 | s >>> 22),
  13339. v = d + ((a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25)) + (a & l ^ ~a & h) + c[p] + u[p];
  13340. d = h, h = l, l = a, a = o + v | 0, o = i, i = r, r = s, s = v + (w + _) | 0;
  13341. }
  13342. n[0] = n[0] + s | 0, n[1] = n[1] + r | 0, n[2] = n[2] + i | 0, n[3] = n[3] + o | 0, n[4] = n[4] + a | 0, n[5] = n[5] + l | 0, n[6] = n[6] + h | 0, n[7] = n[7] + d | 0;
  13343. },
  13344. _doFinalize: function _doFinalize() {
  13345. var t = this._data,
  13346. n = t.words,
  13347. s = 8 * this._nDataBytes,
  13348. r = 8 * t.sigBytes;
  13349. 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;
  13350. },
  13351. clone: function clone() {
  13352. var e = i.clone.call(this);
  13353. return e._hash = this._hash.clone(), e;
  13354. }
  13355. });
  13356. t.SHA256 = i._createHelper(l), t.HmacSHA256 = i._createHmacHelper(l);
  13357. }(Math), n.SHA256);
  13358. }),
  13359. _e = ye,
  13360. we = n(function (e, t) {
  13361. e.exports = r.HmacSHA256;
  13362. });
  13363. var ve = function ve() {
  13364. var e;
  13365. if (!Promise) {
  13366. e = function e() {}, e.promise = {};
  13367. var _t3 = function _t3() {
  13368. throw new te({
  13369. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  13370. });
  13371. };
  13372. return Object.defineProperty(e.promise, "then", {
  13373. get: _t3
  13374. }), Object.defineProperty(e.promise, "catch", {
  13375. get: _t3
  13376. }), e;
  13377. }
  13378. var t = new Promise(function (t, n) {
  13379. e = function e(_e5, s) {
  13380. return _e5 ? n(_e5) : t(s);
  13381. };
  13382. });
  13383. return e.promise = t, e;
  13384. };
  13385. function Ie(e) {
  13386. return void 0 === e;
  13387. }
  13388. function Se(e) {
  13389. return "[object Null]" === Object.prototype.toString.call(e);
  13390. }
  13391. var be;
  13392. function ke(e) {
  13393. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  13394. var n;
  13395. var _iterator = _createForOfIteratorHelper(t),
  13396. _step;
  13397. try {
  13398. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  13399. var _e6 = _step.value;
  13400. var _t4 = _e6.isMatch,
  13401. _n5 = _e6.genAdapter,
  13402. _s4 = _e6.runtime;
  13403. if (_t4()) return {
  13404. adapter: _n5(),
  13405. runtime: _s4
  13406. };
  13407. }
  13408. } catch (err) {
  13409. _iterator.e(err);
  13410. } finally {
  13411. _iterator.f();
  13412. }
  13413. }
  13414. !function (e) {
  13415. e.WEB = "web", e.WX_MP = "wx_mp";
  13416. }(be || (be = {}));
  13417. var Ae = {
  13418. adapter: null,
  13419. runtime: void 0
  13420. },
  13421. Ce = ["anonymousUuidKey"];
  13422. var Pe = /*#__PURE__*/function (_me) {
  13423. (0, _inherits2.default)(Pe, _me);
  13424. var _super2 = _createSuper(Pe);
  13425. function Pe() {
  13426. var _this6;
  13427. (0, _classCallCheck2.default)(this, Pe);
  13428. _this6 = _super2.call(this), Ae.adapter.root.tcbObject || (Ae.adapter.root.tcbObject = {});
  13429. return _this6;
  13430. }
  13431. (0, _createClass2.default)(Pe, [{
  13432. key: "setItem",
  13433. value: function setItem(e, t) {
  13434. Ae.adapter.root.tcbObject[e] = t;
  13435. }
  13436. }, {
  13437. key: "getItem",
  13438. value: function getItem(e) {
  13439. return Ae.adapter.root.tcbObject[e];
  13440. }
  13441. }, {
  13442. key: "removeItem",
  13443. value: function removeItem(e) {
  13444. delete Ae.adapter.root.tcbObject[e];
  13445. }
  13446. }, {
  13447. key: "clear",
  13448. value: function clear() {
  13449. delete Ae.adapter.root.tcbObject;
  13450. }
  13451. }]);
  13452. return Pe;
  13453. }(me);
  13454. function Te(e, t) {
  13455. switch (e) {
  13456. case "local":
  13457. return t.localStorage || new Pe();
  13458. case "none":
  13459. return new Pe();
  13460. default:
  13461. return t.sessionStorage || new Pe();
  13462. }
  13463. }
  13464. var xe = /*#__PURE__*/function () {
  13465. function xe(e) {
  13466. (0, _classCallCheck2.default)(this, xe);
  13467. if (!this._storage) {
  13468. this._persistence = Ae.adapter.primaryStorage || e.persistence, this._storage = Te(this._persistence, Ae.adapter);
  13469. var _t5 = "access_token_".concat(e.env),
  13470. _n6 = "access_token_expire_".concat(e.env),
  13471. _s5 = "refresh_token_".concat(e.env),
  13472. _r2 = "anonymous_uuid_".concat(e.env),
  13473. _i = "login_type_".concat(e.env),
  13474. _o = "user_info_".concat(e.env);
  13475. this.keys = {
  13476. accessTokenKey: _t5,
  13477. accessTokenExpireKey: _n6,
  13478. refreshTokenKey: _s5,
  13479. anonymousUuidKey: _r2,
  13480. loginTypeKey: _i,
  13481. userInfoKey: _o
  13482. };
  13483. }
  13484. }
  13485. (0, _createClass2.default)(xe, [{
  13486. key: "updatePersistence",
  13487. value: function updatePersistence(e) {
  13488. if (e === this._persistence) return;
  13489. var t = "local" === this._persistence;
  13490. this._persistence = e;
  13491. var n = Te(e, Ae.adapter);
  13492. for (var _e7 in this.keys) {
  13493. var _s6 = this.keys[_e7];
  13494. if (t && Ce.includes(_e7)) continue;
  13495. var _r3 = this._storage.getItem(_s6);
  13496. Ie(_r3) || Se(_r3) || (n.setItem(_s6, _r3), this._storage.removeItem(_s6));
  13497. }
  13498. this._storage = n;
  13499. }
  13500. }, {
  13501. key: "setStore",
  13502. value: function setStore(e, t, n) {
  13503. if (!this._storage) return;
  13504. var s = {
  13505. version: n || "localCachev1",
  13506. content: t
  13507. },
  13508. r = JSON.stringify(s);
  13509. try {
  13510. this._storage.setItem(e, r);
  13511. } catch (e) {
  13512. throw e;
  13513. }
  13514. }
  13515. }, {
  13516. key: "getStore",
  13517. value: function getStore(e, t) {
  13518. try {
  13519. if (!this._storage) return;
  13520. } catch (e) {
  13521. return "";
  13522. }
  13523. t = t || "localCachev1";
  13524. var n = this._storage.getItem(e);
  13525. if (!n) return "";
  13526. if (n.indexOf(t) >= 0) {
  13527. return JSON.parse(n).content;
  13528. }
  13529. return "";
  13530. }
  13531. }, {
  13532. key: "removeStore",
  13533. value: function removeStore(e) {
  13534. this._storage.removeItem(e);
  13535. }
  13536. }]);
  13537. return xe;
  13538. }();
  13539. var Oe = {},
  13540. Ee = {};
  13541. function Le(e) {
  13542. return Oe[e];
  13543. }
  13544. var Re = /*#__PURE__*/(0, _createClass2.default)(function Re(e, t) {
  13545. (0, _classCallCheck2.default)(this, Re);
  13546. this.data = t || null, this.name = e;
  13547. });
  13548. var Ue = /*#__PURE__*/function (_Re) {
  13549. (0, _inherits2.default)(Ue, _Re);
  13550. var _super3 = _createSuper(Ue);
  13551. function Ue(e, t) {
  13552. var _this7;
  13553. (0, _classCallCheck2.default)(this, Ue);
  13554. _this7 = _super3.call(this, "error", {
  13555. error: e,
  13556. data: t
  13557. }), _this7.error = e;
  13558. return _this7;
  13559. }
  13560. return (0, _createClass2.default)(Ue);
  13561. }(Re);
  13562. var Ne = new ( /*#__PURE__*/function () {
  13563. function _class() {
  13564. (0, _classCallCheck2.default)(this, _class);
  13565. this._listeners = {};
  13566. }
  13567. (0, _createClass2.default)(_class, [{
  13568. key: "on",
  13569. value: function on(e, t) {
  13570. return function (e, t, n) {
  13571. n[e] = n[e] || [], n[e].push(t);
  13572. }(e, t, this._listeners), this;
  13573. }
  13574. }, {
  13575. key: "off",
  13576. value: function off(e, t) {
  13577. return function (e, t, n) {
  13578. if (n && n[e]) {
  13579. var _s7 = n[e].indexOf(t);
  13580. -1 !== _s7 && n[e].splice(_s7, 1);
  13581. }
  13582. }(e, t, this._listeners), this;
  13583. }
  13584. }, {
  13585. key: "fire",
  13586. value: function fire(e, t) {
  13587. if (e instanceof Ue) return console.error(e.error), this;
  13588. var n = "string" == typeof e ? new Re(e, t || {}) : e;
  13589. var s = n.name;
  13590. if (this._listens(s)) {
  13591. n.target = this;
  13592. var _e8 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  13593. var _iterator2 = _createForOfIteratorHelper(_e8),
  13594. _step2;
  13595. try {
  13596. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  13597. var _t6 = _step2.value;
  13598. _t6.call(this, n);
  13599. }
  13600. } catch (err) {
  13601. _iterator2.e(err);
  13602. } finally {
  13603. _iterator2.f();
  13604. }
  13605. }
  13606. return this;
  13607. }
  13608. }, {
  13609. key: "_listens",
  13610. value: function _listens(e) {
  13611. return this._listeners[e] && this._listeners[e].length > 0;
  13612. }
  13613. }]);
  13614. return _class;
  13615. }())();
  13616. function De(e, t) {
  13617. Ne.on(e, t);
  13618. }
  13619. function qe(e) {
  13620. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13621. Ne.fire(e, t);
  13622. }
  13623. function Me(e, t) {
  13624. Ne.off(e, t);
  13625. }
  13626. var Fe = "loginStateChanged",
  13627. Ke = "loginStateExpire",
  13628. je = "loginTypeChanged",
  13629. $e = "anonymousConverted",
  13630. Be = "refreshAccessToken";
  13631. var We;
  13632. !function (e) {
  13633. 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";
  13634. }(We || (We = {}));
  13635. var He = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  13636. Je = {
  13637. "X-SDK-Version": "1.3.5"
  13638. };
  13639. function ze(e, t, n) {
  13640. var s = e[t];
  13641. e[t] = function (t) {
  13642. var r = {},
  13643. i = {};
  13644. n.forEach(function (n) {
  13645. var _n$call = n.call(e, t),
  13646. s = _n$call.data,
  13647. o = _n$call.headers;
  13648. Object.assign(r, s), Object.assign(i, o);
  13649. });
  13650. var o = t.data;
  13651. return o && function () {
  13652. var e;
  13653. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e9 in r) {
  13654. o.append(_e9, r[_e9]);
  13655. }
  13656. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  13657. };
  13658. }
  13659. function Ve() {
  13660. var e = Math.random().toString(16).slice(2);
  13661. return {
  13662. data: {
  13663. seqId: e
  13664. },
  13665. headers: _objectSpread(_objectSpread({}, Je), {}, {
  13666. "x-seqid": e
  13667. })
  13668. };
  13669. }
  13670. var Ge = /*#__PURE__*/function () {
  13671. function Ge() {
  13672. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  13673. (0, _classCallCheck2.default)(this, Ge);
  13674. var t;
  13675. this.config = e, this._reqClass = new Ae.adapter.reqClass({
  13676. timeout: this.config.timeout,
  13677. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  13678. restrictedMethods: ["post"]
  13679. }), this._cache = Le(this.config.env), this._localCache = (t = this.config.env, Ee[t]), ze(this._reqClass, "post", [Ve]), ze(this._reqClass, "upload", [Ve]), ze(this._reqClass, "download", [Ve]);
  13680. }
  13681. (0, _createClass2.default)(Ge, [{
  13682. key: "post",
  13683. value: function () {
  13684. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  13685. return _regenerator.default.wrap(function _callee4$(_context4) {
  13686. while (1) {
  13687. switch (_context4.prev = _context4.next) {
  13688. case 0:
  13689. _context4.next = 2;
  13690. return this._reqClass.post(e);
  13691. case 2:
  13692. return _context4.abrupt("return", _context4.sent);
  13693. case 3:
  13694. case "end":
  13695. return _context4.stop();
  13696. }
  13697. }
  13698. }, _callee4, this);
  13699. }));
  13700. function post(_x2) {
  13701. return _post.apply(this, arguments);
  13702. }
  13703. return post;
  13704. }()
  13705. }, {
  13706. key: "upload",
  13707. value: function () {
  13708. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  13709. return _regenerator.default.wrap(function _callee5$(_context5) {
  13710. while (1) {
  13711. switch (_context5.prev = _context5.next) {
  13712. case 0:
  13713. _context5.next = 2;
  13714. return this._reqClass.upload(e);
  13715. case 2:
  13716. return _context5.abrupt("return", _context5.sent);
  13717. case 3:
  13718. case "end":
  13719. return _context5.stop();
  13720. }
  13721. }
  13722. }, _callee5, this);
  13723. }));
  13724. function upload(_x3) {
  13725. return _upload.apply(this, arguments);
  13726. }
  13727. return upload;
  13728. }()
  13729. }, {
  13730. key: "download",
  13731. value: function () {
  13732. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  13733. return _regenerator.default.wrap(function _callee6$(_context6) {
  13734. while (1) {
  13735. switch (_context6.prev = _context6.next) {
  13736. case 0:
  13737. _context6.next = 2;
  13738. return this._reqClass.download(e);
  13739. case 2:
  13740. return _context6.abrupt("return", _context6.sent);
  13741. case 3:
  13742. case "end":
  13743. return _context6.stop();
  13744. }
  13745. }
  13746. }, _callee6, this);
  13747. }));
  13748. function download(_x4) {
  13749. return _download.apply(this, arguments);
  13750. }
  13751. return download;
  13752. }()
  13753. }, {
  13754. key: "refreshAccessToken",
  13755. value: function () {
  13756. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  13757. var e, t;
  13758. return _regenerator.default.wrap(function _callee7$(_context7) {
  13759. while (1) {
  13760. switch (_context7.prev = _context7.next) {
  13761. case 0:
  13762. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  13763. _context7.prev = 1;
  13764. _context7.next = 4;
  13765. return this._refreshAccessTokenPromise;
  13766. case 4:
  13767. e = _context7.sent;
  13768. _context7.next = 10;
  13769. break;
  13770. case 7:
  13771. _context7.prev = 7;
  13772. _context7.t0 = _context7["catch"](1);
  13773. t = _context7.t0;
  13774. case 10:
  13775. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  13776. _context7.next = 12;
  13777. break;
  13778. }
  13779. throw t;
  13780. case 12:
  13781. return _context7.abrupt("return", e);
  13782. case 13:
  13783. case "end":
  13784. return _context7.stop();
  13785. }
  13786. }
  13787. }, _callee7, this, [[1, 7]]);
  13788. }));
  13789. function refreshAccessToken() {
  13790. return _refreshAccessToken2.apply(this, arguments);
  13791. }
  13792. return refreshAccessToken;
  13793. }()
  13794. }, {
  13795. key: "_refreshAccessToken",
  13796. value: function () {
  13797. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  13798. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e10, _e11, _t7, _s8;
  13799. return _regenerator.default.wrap(function _callee8$(_context8) {
  13800. while (1) {
  13801. switch (_context8.prev = _context8.next) {
  13802. case 0:
  13803. _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;
  13804. this._cache.removeStore(e), this._cache.removeStore(t);
  13805. i = this._cache.getStore(n);
  13806. if (i) {
  13807. _context8.next = 5;
  13808. break;
  13809. }
  13810. throw new te({
  13811. message: "未登录CloudBase"
  13812. });
  13813. case 5:
  13814. o = {
  13815. refresh_token: i
  13816. };
  13817. _context8.next = 8;
  13818. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  13819. case 8:
  13820. a = _context8.sent;
  13821. if (!a.data.code) {
  13822. _context8.next = 21;
  13823. break;
  13824. }
  13825. _e10 = a.data.code;
  13826. if (!("SIGN_PARAM_INVALID" === _e10 || "REFRESH_TOKEN_EXPIRED" === _e10 || "INVALID_REFRESH_TOKEN" === _e10)) {
  13827. _context8.next = 20;
  13828. break;
  13829. }
  13830. if (!(this._cache.getStore(s) === We.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e10)) {
  13831. _context8.next = 19;
  13832. break;
  13833. }
  13834. _e11 = this._cache.getStore(r);
  13835. _t7 = this._cache.getStore(n);
  13836. _context8.next = 17;
  13837. return this.send("auth.signInAnonymously", {
  13838. anonymous_uuid: _e11,
  13839. refresh_token: _t7
  13840. });
  13841. case 17:
  13842. _s8 = _context8.sent;
  13843. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  13844. case 19:
  13845. qe(Ke), this._cache.removeStore(n);
  13846. case 20:
  13847. throw new te({
  13848. code: a.data.code,
  13849. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  13850. });
  13851. case 21:
  13852. if (!a.data.access_token) {
  13853. _context8.next = 23;
  13854. break;
  13855. }
  13856. return _context8.abrupt("return", (qe(Be), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  13857. accessToken: a.data.access_token,
  13858. accessTokenExpire: a.data.access_token_expire
  13859. }));
  13860. case 23:
  13861. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  13862. case 24:
  13863. case "end":
  13864. return _context8.stop();
  13865. }
  13866. }
  13867. }, _callee8, this);
  13868. }));
  13869. function _refreshAccessToken() {
  13870. return _refreshAccessToken3.apply(this, arguments);
  13871. }
  13872. return _refreshAccessToken;
  13873. }()
  13874. }, {
  13875. key: "getAccessToken",
  13876. value: function () {
  13877. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  13878. var _this$_cache$keys2, e, t, n, s, r, i;
  13879. return _regenerator.default.wrap(function _callee9$(_context9) {
  13880. while (1) {
  13881. switch (_context9.prev = _context9.next) {
  13882. case 0:
  13883. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  13884. if (this._cache.getStore(n)) {
  13885. _context9.next = 3;
  13886. break;
  13887. }
  13888. throw new te({
  13889. message: "refresh token不存在,登录状态异常"
  13890. });
  13891. case 3:
  13892. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  13893. _context9.t0 = this._shouldRefreshAccessTokenHook;
  13894. if (!_context9.t0) {
  13895. _context9.next = 9;
  13896. break;
  13897. }
  13898. _context9.next = 8;
  13899. return this._shouldRefreshAccessTokenHook(s, r);
  13900. case 8:
  13901. _context9.t0 = !_context9.sent;
  13902. case 9:
  13903. _context9.t1 = _context9.t0;
  13904. if (!_context9.t1) {
  13905. _context9.next = 12;
  13906. break;
  13907. }
  13908. i = !1;
  13909. case 12:
  13910. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  13911. accessToken: s,
  13912. accessTokenExpire: r
  13913. });
  13914. case 13:
  13915. case "end":
  13916. return _context9.stop();
  13917. }
  13918. }
  13919. }, _callee9, this);
  13920. }));
  13921. function getAccessToken() {
  13922. return _getAccessToken.apply(this, arguments);
  13923. }
  13924. return getAccessToken;
  13925. }()
  13926. }, {
  13927. key: "request",
  13928. value: function () {
  13929. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  13930. var s, r, i, _e12, o, _e13, _e14, a, c, u, l, h, d, p, f, g;
  13931. return _regenerator.default.wrap(function _callee10$(_context10) {
  13932. while (1) {
  13933. switch (_context10.prev = _context10.next) {
  13934. case 0:
  13935. s = "x-tcb-trace_".concat(this.config.env);
  13936. r = "application/x-www-form-urlencoded";
  13937. i = _objectSpread({
  13938. action: e,
  13939. env: this.config.env,
  13940. dataVersion: "2019-08-16"
  13941. }, t);
  13942. if (!(-1 === He.indexOf(e))) {
  13943. _context10.next = 10;
  13944. break;
  13945. }
  13946. _e12 = this._cache.keys.refreshTokenKey;
  13947. _context10.t0 = this._cache.getStore(_e12);
  13948. if (!_context10.t0) {
  13949. _context10.next = 10;
  13950. break;
  13951. }
  13952. _context10.next = 9;
  13953. return this.getAccessToken();
  13954. case 9:
  13955. i.access_token = _context10.sent.accessToken;
  13956. case 10:
  13957. if ("storage.uploadFile" === e) {
  13958. o = new FormData();
  13959. for (_e13 in o) {
  13960. o.hasOwnProperty(_e13) && void 0 !== o[_e13] && o.append(_e13, i[_e13]);
  13961. }
  13962. r = "multipart/form-data";
  13963. } else {
  13964. r = "application/json", o = {};
  13965. for (_e14 in i) {
  13966. void 0 !== i[_e14] && (o[_e14] = i[_e14]);
  13967. }
  13968. }
  13969. a = {
  13970. headers: {
  13971. "content-type": r
  13972. }
  13973. };
  13974. n && n.timeout && (a.timeout = n.timeout), n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  13975. c = this._localCache.getStore(s);
  13976. c && (a.headers["X-TCB-Trace"] = c);
  13977. u = t.parse, l = t.inQuery, h = t.search;
  13978. d = {
  13979. env: this.config.env
  13980. };
  13981. u && (d.parse = !0), l && (d = _objectSpread(_objectSpread({}, l), d));
  13982. p = function (e, t) {
  13983. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  13984. var s = /\?/.test(t);
  13985. var r = "";
  13986. for (var _e15 in n) {
  13987. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e15, "=").concat(encodeURIComponent(n[_e15]));
  13988. }
  13989. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  13990. }(fe, "//tcb-api.tencentcloudapi.com/web", d);
  13991. h && (p += h);
  13992. _context10.next = 22;
  13993. return this.post(_objectSpread({
  13994. url: p,
  13995. data: o
  13996. }, a));
  13997. case 22:
  13998. f = _context10.sent;
  13999. g = f.header && f.header["x-tcb-trace"];
  14000. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  14001. _context10.next = 26;
  14002. break;
  14003. }
  14004. throw new te({
  14005. code: "NETWORK_ERROR",
  14006. message: "network request error"
  14007. });
  14008. case 26:
  14009. return _context10.abrupt("return", f);
  14010. case 27:
  14011. case "end":
  14012. return _context10.stop();
  14013. }
  14014. }
  14015. }, _callee10, this);
  14016. }));
  14017. function request(_x5, _x6, _x7) {
  14018. return _request.apply(this, arguments);
  14019. }
  14020. return request;
  14021. }()
  14022. }, {
  14023. key: "send",
  14024. value: function () {
  14025. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  14026. var t,
  14027. n,
  14028. s,
  14029. _s9,
  14030. _args11 = arguments;
  14031. return _regenerator.default.wrap(function _callee11$(_context11) {
  14032. while (1) {
  14033. switch (_context11.prev = _context11.next) {
  14034. case 0:
  14035. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  14036. n = _args11.length > 2 && _args11[2] !== undefined ? _args11[2] : {};
  14037. _context11.next = 4;
  14038. return this.request(e, t, _objectSpread(_objectSpread({}, n), {}, {
  14039. onUploadProgress: t.onUploadProgress
  14040. }));
  14041. case 4:
  14042. s = _context11.sent;
  14043. if (!("ACCESS_TOKEN_EXPIRED" === s.data.code && -1 === He.indexOf(e))) {
  14044. _context11.next = 14;
  14045. break;
  14046. }
  14047. _context11.next = 8;
  14048. return this.refreshAccessToken();
  14049. case 8:
  14050. _context11.next = 10;
  14051. return this.request(e, t, _objectSpread(_objectSpread({}, n), {}, {
  14052. onUploadProgress: t.onUploadProgress
  14053. }));
  14054. case 10:
  14055. _s9 = _context11.sent;
  14056. if (!_s9.data.code) {
  14057. _context11.next = 13;
  14058. break;
  14059. }
  14060. throw new te({
  14061. code: _s9.data.code,
  14062. message: _s9.data.message
  14063. });
  14064. case 13:
  14065. return _context11.abrupt("return", _s9.data);
  14066. case 14:
  14067. if (!s.data.code) {
  14068. _context11.next = 16;
  14069. break;
  14070. }
  14071. throw new te({
  14072. code: s.data.code,
  14073. message: s.data.message
  14074. });
  14075. case 16:
  14076. return _context11.abrupt("return", s.data);
  14077. case 17:
  14078. case "end":
  14079. return _context11.stop();
  14080. }
  14081. }
  14082. }, _callee11, this);
  14083. }));
  14084. function send(_x8) {
  14085. return _send.apply(this, arguments);
  14086. }
  14087. return send;
  14088. }()
  14089. }, {
  14090. key: "setRefreshToken",
  14091. value: function setRefreshToken(e) {
  14092. var _this$_cache$keys3 = this._cache.keys,
  14093. t = _this$_cache$keys3.accessTokenKey,
  14094. n = _this$_cache$keys3.accessTokenExpireKey,
  14095. s = _this$_cache$keys3.refreshTokenKey;
  14096. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  14097. }
  14098. }]);
  14099. return Ge;
  14100. }();
  14101. var Ye = {};
  14102. function Qe(e) {
  14103. return Ye[e];
  14104. }
  14105. var Xe = /*#__PURE__*/function () {
  14106. function Xe(e) {
  14107. (0, _classCallCheck2.default)(this, Xe);
  14108. this.config = e, this._cache = Le(e.env), this._request = Qe(e.env);
  14109. }
  14110. (0, _createClass2.default)(Xe, [{
  14111. key: "setRefreshToken",
  14112. value: function setRefreshToken(e) {
  14113. var _this$_cache$keys4 = this._cache.keys,
  14114. t = _this$_cache$keys4.accessTokenKey,
  14115. n = _this$_cache$keys4.accessTokenExpireKey,
  14116. s = _this$_cache$keys4.refreshTokenKey;
  14117. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  14118. }
  14119. }, {
  14120. key: "setAccessToken",
  14121. value: function setAccessToken(e, t) {
  14122. var _this$_cache$keys5 = this._cache.keys,
  14123. n = _this$_cache$keys5.accessTokenKey,
  14124. s = _this$_cache$keys5.accessTokenExpireKey;
  14125. this._cache.setStore(n, e), this._cache.setStore(s, t);
  14126. }
  14127. }, {
  14128. key: "refreshUserInfo",
  14129. value: function () {
  14130. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  14131. var _yield$this$_request$, e;
  14132. return _regenerator.default.wrap(function _callee12$(_context12) {
  14133. while (1) {
  14134. switch (_context12.prev = _context12.next) {
  14135. case 0:
  14136. _context12.next = 2;
  14137. return this._request.send("auth.getUserInfo", {});
  14138. case 2:
  14139. _yield$this$_request$ = _context12.sent;
  14140. e = _yield$this$_request$.data;
  14141. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  14142. case 5:
  14143. case "end":
  14144. return _context12.stop();
  14145. }
  14146. }
  14147. }, _callee12, this);
  14148. }));
  14149. function refreshUserInfo() {
  14150. return _refreshUserInfo.apply(this, arguments);
  14151. }
  14152. return refreshUserInfo;
  14153. }()
  14154. }, {
  14155. key: "setLocalUserInfo",
  14156. value: function setLocalUserInfo(e) {
  14157. var t = this._cache.keys.userInfoKey;
  14158. this._cache.setStore(t, e);
  14159. }
  14160. }]);
  14161. return Xe;
  14162. }();
  14163. var Ze = /*#__PURE__*/function () {
  14164. function Ze(e) {
  14165. (0, _classCallCheck2.default)(this, Ze);
  14166. if (!e) throw new te({
  14167. code: "PARAM_ERROR",
  14168. message: "envId is not defined"
  14169. });
  14170. this._envId = e, this._cache = Le(this._envId), this._request = Qe(this._envId), this.setUserInfo();
  14171. }
  14172. (0, _createClass2.default)(Ze, [{
  14173. key: "linkWithTicket",
  14174. value: function linkWithTicket(e) {
  14175. if ("string" != typeof e) throw new te({
  14176. code: "PARAM_ERROR",
  14177. message: "ticket must be string"
  14178. });
  14179. return this._request.send("auth.linkWithTicket", {
  14180. ticket: e
  14181. });
  14182. }
  14183. }, {
  14184. key: "linkWithRedirect",
  14185. value: function linkWithRedirect(e) {
  14186. e.signInWithRedirect();
  14187. }
  14188. }, {
  14189. key: "updatePassword",
  14190. value: function updatePassword(e, t) {
  14191. return this._request.send("auth.updatePassword", {
  14192. oldPassword: t,
  14193. newPassword: e
  14194. });
  14195. }
  14196. }, {
  14197. key: "updateEmail",
  14198. value: function updateEmail(e) {
  14199. return this._request.send("auth.updateEmail", {
  14200. newEmail: e
  14201. });
  14202. }
  14203. }, {
  14204. key: "updateUsername",
  14205. value: function updateUsername(e) {
  14206. if ("string" != typeof e) throw new te({
  14207. code: "PARAM_ERROR",
  14208. message: "username must be a string"
  14209. });
  14210. return this._request.send("auth.updateUsername", {
  14211. username: e
  14212. });
  14213. }
  14214. }, {
  14215. key: "getLinkedUidList",
  14216. value: function () {
  14217. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  14218. var _yield$this$_request$2, e, t, n;
  14219. return _regenerator.default.wrap(function _callee13$(_context13) {
  14220. while (1) {
  14221. switch (_context13.prev = _context13.next) {
  14222. case 0:
  14223. _context13.next = 2;
  14224. return this._request.send("auth.getLinkedUidList", {});
  14225. case 2:
  14226. _yield$this$_request$2 = _context13.sent;
  14227. e = _yield$this$_request$2.data;
  14228. t = !1;
  14229. n = e.users;
  14230. return _context13.abrupt("return", (n.forEach(function (e) {
  14231. e.wxOpenId && e.wxPublicId && (t = !0);
  14232. }), {
  14233. users: n,
  14234. hasPrimaryUid: t
  14235. }));
  14236. case 7:
  14237. case "end":
  14238. return _context13.stop();
  14239. }
  14240. }
  14241. }, _callee13, this);
  14242. }));
  14243. function getLinkedUidList() {
  14244. return _getLinkedUidList.apply(this, arguments);
  14245. }
  14246. return getLinkedUidList;
  14247. }()
  14248. }, {
  14249. key: "setPrimaryUid",
  14250. value: function setPrimaryUid(e) {
  14251. return this._request.send("auth.setPrimaryUid", {
  14252. uid: e
  14253. });
  14254. }
  14255. }, {
  14256. key: "unlink",
  14257. value: function unlink(e) {
  14258. return this._request.send("auth.unlink", {
  14259. platform: e
  14260. });
  14261. }
  14262. }, {
  14263. key: "update",
  14264. value: function () {
  14265. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  14266. var t, n, s, r, i, o, _yield$this$_request$3, a;
  14267. return _regenerator.default.wrap(function _callee14$(_context14) {
  14268. while (1) {
  14269. switch (_context14.prev = _context14.next) {
  14270. case 0:
  14271. t = e.nickName;
  14272. n = e.gender;
  14273. s = e.avatarUrl;
  14274. r = e.province;
  14275. i = e.country;
  14276. o = e.city;
  14277. _context14.next = 8;
  14278. return this._request.send("auth.updateUserInfo", {
  14279. nickName: t,
  14280. gender: n,
  14281. avatarUrl: s,
  14282. province: r,
  14283. country: i,
  14284. city: o
  14285. });
  14286. case 8:
  14287. _yield$this$_request$3 = _context14.sent;
  14288. a = _yield$this$_request$3.data;
  14289. this.setLocalUserInfo(a);
  14290. case 11:
  14291. case "end":
  14292. return _context14.stop();
  14293. }
  14294. }
  14295. }, _callee14, this);
  14296. }));
  14297. function update(_x9) {
  14298. return _update.apply(this, arguments);
  14299. }
  14300. return update;
  14301. }()
  14302. }, {
  14303. key: "refresh",
  14304. value: function () {
  14305. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  14306. var _yield$this$_request$4, e;
  14307. return _regenerator.default.wrap(function _callee15$(_context15) {
  14308. while (1) {
  14309. switch (_context15.prev = _context15.next) {
  14310. case 0:
  14311. _context15.next = 2;
  14312. return this._request.send("auth.getUserInfo", {});
  14313. case 2:
  14314. _yield$this$_request$4 = _context15.sent;
  14315. e = _yield$this$_request$4.data;
  14316. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  14317. case 5:
  14318. case "end":
  14319. return _context15.stop();
  14320. }
  14321. }
  14322. }, _callee15, this);
  14323. }));
  14324. function refresh() {
  14325. return _refresh.apply(this, arguments);
  14326. }
  14327. return refresh;
  14328. }()
  14329. }, {
  14330. key: "setUserInfo",
  14331. value: function setUserInfo() {
  14332. var _this8 = this;
  14333. var e = this._cache.keys.userInfoKey,
  14334. t = this._cache.getStore(e);
  14335. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  14336. _this8[e] = t[e];
  14337. }), this.location = {
  14338. country: t.country,
  14339. province: t.province,
  14340. city: t.city
  14341. };
  14342. }
  14343. }, {
  14344. key: "setLocalUserInfo",
  14345. value: function setLocalUserInfo(e) {
  14346. var t = this._cache.keys.userInfoKey;
  14347. this._cache.setStore(t, e), this.setUserInfo();
  14348. }
  14349. }]);
  14350. return Ze;
  14351. }();
  14352. var et = /*#__PURE__*/function () {
  14353. function et(e) {
  14354. (0, _classCallCheck2.default)(this, et);
  14355. if (!e) throw new te({
  14356. code: "PARAM_ERROR",
  14357. message: "envId is not defined"
  14358. });
  14359. this._cache = Le(e);
  14360. var _this$_cache$keys6 = this._cache.keys,
  14361. t = _this$_cache$keys6.refreshTokenKey,
  14362. n = _this$_cache$keys6.accessTokenKey,
  14363. s = _this$_cache$keys6.accessTokenExpireKey,
  14364. r = this._cache.getStore(t),
  14365. i = this._cache.getStore(n),
  14366. o = this._cache.getStore(s);
  14367. this.credential = {
  14368. refreshToken: r,
  14369. accessToken: i,
  14370. accessTokenExpire: o
  14371. }, this.user = new Ze(e);
  14372. }
  14373. (0, _createClass2.default)(et, [{
  14374. key: "isAnonymousAuth",
  14375. get: function get() {
  14376. return this.loginType === We.ANONYMOUS;
  14377. }
  14378. }, {
  14379. key: "isCustomAuth",
  14380. get: function get() {
  14381. return this.loginType === We.CUSTOM;
  14382. }
  14383. }, {
  14384. key: "isWeixinAuth",
  14385. get: function get() {
  14386. return this.loginType === We.WECHAT || this.loginType === We.WECHAT_OPEN || this.loginType === We.WECHAT_PUBLIC;
  14387. }
  14388. }, {
  14389. key: "loginType",
  14390. get: function get() {
  14391. return this._cache.getStore(this._cache.keys.loginTypeKey);
  14392. }
  14393. }]);
  14394. return et;
  14395. }();
  14396. var tt = /*#__PURE__*/function (_Xe) {
  14397. (0, _inherits2.default)(tt, _Xe);
  14398. var _super4 = _createSuper(tt);
  14399. function tt() {
  14400. (0, _classCallCheck2.default)(this, tt);
  14401. return _super4.apply(this, arguments);
  14402. }
  14403. (0, _createClass2.default)(tt, [{
  14404. key: "signIn",
  14405. value: function () {
  14406. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  14407. var _this$_cache$keys7, e, t, n, s, r, _e16;
  14408. return _regenerator.default.wrap(function _callee16$(_context16) {
  14409. while (1) {
  14410. switch (_context16.prev = _context16.next) {
  14411. case 0:
  14412. this._cache.updatePersistence("local");
  14413. _this$_cache$keys7 = this._cache.keys;
  14414. e = _this$_cache$keys7.anonymousUuidKey;
  14415. t = _this$_cache$keys7.refreshTokenKey;
  14416. n = this._cache.getStore(e) || void 0;
  14417. s = this._cache.getStore(t) || void 0;
  14418. _context16.next = 8;
  14419. return this._request.send("auth.signInAnonymously", {
  14420. anonymous_uuid: n,
  14421. refresh_token: s
  14422. });
  14423. case 8:
  14424. r = _context16.sent;
  14425. if (!(r.uuid && r.refresh_token)) {
  14426. _context16.next = 20;
  14427. break;
  14428. }
  14429. this._setAnonymousUUID(r.uuid);
  14430. this.setRefreshToken(r.refresh_token);
  14431. _context16.next = 14;
  14432. return this._request.refreshAccessToken();
  14433. case 14:
  14434. qe(Fe);
  14435. qe(je, {
  14436. env: this.config.env,
  14437. loginType: We.ANONYMOUS,
  14438. persistence: "local"
  14439. });
  14440. _e16 = new et(this.config.env);
  14441. _context16.next = 19;
  14442. return _e16.user.refresh();
  14443. case 19:
  14444. return _context16.abrupt("return", _e16);
  14445. case 20:
  14446. throw new te({
  14447. message: "匿名登录失败"
  14448. });
  14449. case 21:
  14450. case "end":
  14451. return _context16.stop();
  14452. }
  14453. }
  14454. }, _callee16, this);
  14455. }));
  14456. function signIn() {
  14457. return _signIn.apply(this, arguments);
  14458. }
  14459. return signIn;
  14460. }()
  14461. }, {
  14462. key: "linkAndRetrieveDataWithTicket",
  14463. value: function () {
  14464. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  14465. var _this$_cache$keys8, t, n, s, r, i;
  14466. return _regenerator.default.wrap(function _callee17$(_context17) {
  14467. while (1) {
  14468. switch (_context17.prev = _context17.next) {
  14469. case 0:
  14470. _this$_cache$keys8 = this._cache.keys;
  14471. t = _this$_cache$keys8.anonymousUuidKey;
  14472. n = _this$_cache$keys8.refreshTokenKey;
  14473. s = this._cache.getStore(t);
  14474. r = this._cache.getStore(n);
  14475. _context17.next = 7;
  14476. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  14477. anonymous_uuid: s,
  14478. refresh_token: r,
  14479. ticket: e
  14480. });
  14481. case 7:
  14482. i = _context17.sent;
  14483. if (!i.refresh_token) {
  14484. _context17.next = 16;
  14485. break;
  14486. }
  14487. this._clearAnonymousUUID();
  14488. this.setRefreshToken(i.refresh_token);
  14489. _context17.next = 13;
  14490. return this._request.refreshAccessToken();
  14491. case 13:
  14492. qe($e, {
  14493. env: this.config.env
  14494. });
  14495. qe(je, {
  14496. loginType: We.CUSTOM,
  14497. persistence: "local"
  14498. });
  14499. return _context17.abrupt("return", {
  14500. credential: {
  14501. refreshToken: i.refresh_token
  14502. }
  14503. });
  14504. case 16:
  14505. throw new te({
  14506. message: "匿名转化失败"
  14507. });
  14508. case 17:
  14509. case "end":
  14510. return _context17.stop();
  14511. }
  14512. }
  14513. }, _callee17, this);
  14514. }));
  14515. function linkAndRetrieveDataWithTicket(_x10) {
  14516. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  14517. }
  14518. return linkAndRetrieveDataWithTicket;
  14519. }()
  14520. }, {
  14521. key: "_setAnonymousUUID",
  14522. value: function _setAnonymousUUID(e) {
  14523. var _this$_cache$keys9 = this._cache.keys,
  14524. t = _this$_cache$keys9.anonymousUuidKey,
  14525. n = _this$_cache$keys9.loginTypeKey;
  14526. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, We.ANONYMOUS);
  14527. }
  14528. }, {
  14529. key: "_clearAnonymousUUID",
  14530. value: function _clearAnonymousUUID() {
  14531. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  14532. }
  14533. }]);
  14534. return tt;
  14535. }(Xe);
  14536. var nt = /*#__PURE__*/function (_Xe2) {
  14537. (0, _inherits2.default)(nt, _Xe2);
  14538. var _super5 = _createSuper(nt);
  14539. function nt() {
  14540. (0, _classCallCheck2.default)(this, nt);
  14541. return _super5.apply(this, arguments);
  14542. }
  14543. (0, _createClass2.default)(nt, [{
  14544. key: "signIn",
  14545. value: function () {
  14546. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  14547. var t, n;
  14548. return _regenerator.default.wrap(function _callee18$(_context18) {
  14549. while (1) {
  14550. switch (_context18.prev = _context18.next) {
  14551. case 0:
  14552. if (!("string" != typeof e)) {
  14553. _context18.next = 2;
  14554. break;
  14555. }
  14556. throw new te({
  14557. code: "PARAM_ERROR",
  14558. message: "ticket must be a string"
  14559. });
  14560. case 2:
  14561. t = this._cache.keys.refreshTokenKey;
  14562. _context18.next = 5;
  14563. return this._request.send("auth.signInWithTicket", {
  14564. ticket: e,
  14565. refresh_token: this._cache.getStore(t) || ""
  14566. });
  14567. case 5:
  14568. n = _context18.sent;
  14569. if (!n.refresh_token) {
  14570. _context18.next = 15;
  14571. break;
  14572. }
  14573. this.setRefreshToken(n.refresh_token);
  14574. _context18.next = 10;
  14575. return this._request.refreshAccessToken();
  14576. case 10:
  14577. qe(Fe);
  14578. qe(je, {
  14579. env: this.config.env,
  14580. loginType: We.CUSTOM,
  14581. persistence: this.config.persistence
  14582. });
  14583. _context18.next = 14;
  14584. return this.refreshUserInfo();
  14585. case 14:
  14586. return _context18.abrupt("return", new et(this.config.env));
  14587. case 15:
  14588. throw new te({
  14589. message: "自定义登录失败"
  14590. });
  14591. case 16:
  14592. case "end":
  14593. return _context18.stop();
  14594. }
  14595. }
  14596. }, _callee18, this);
  14597. }));
  14598. function signIn(_x11) {
  14599. return _signIn2.apply(this, arguments);
  14600. }
  14601. return signIn;
  14602. }()
  14603. }]);
  14604. return nt;
  14605. }(Xe);
  14606. var st = /*#__PURE__*/function (_Xe3) {
  14607. (0, _inherits2.default)(st, _Xe3);
  14608. var _super6 = _createSuper(st);
  14609. function st() {
  14610. (0, _classCallCheck2.default)(this, st);
  14611. return _super6.apply(this, arguments);
  14612. }
  14613. (0, _createClass2.default)(st, [{
  14614. key: "signIn",
  14615. value: function () {
  14616. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  14617. var n, s, r, i, o;
  14618. return _regenerator.default.wrap(function _callee19$(_context19) {
  14619. while (1) {
  14620. switch (_context19.prev = _context19.next) {
  14621. case 0:
  14622. if (!("string" != typeof e)) {
  14623. _context19.next = 2;
  14624. break;
  14625. }
  14626. throw new te({
  14627. code: "PARAM_ERROR",
  14628. message: "email must be a string"
  14629. });
  14630. case 2:
  14631. n = this._cache.keys.refreshTokenKey;
  14632. _context19.next = 5;
  14633. return this._request.send("auth.signIn", {
  14634. loginType: "EMAIL",
  14635. email: e,
  14636. password: t,
  14637. refresh_token: this._cache.getStore(n) || ""
  14638. });
  14639. case 5:
  14640. s = _context19.sent;
  14641. r = s.refresh_token;
  14642. i = s.access_token;
  14643. o = s.access_token_expire;
  14644. if (!r) {
  14645. _context19.next = 22;
  14646. break;
  14647. }
  14648. this.setRefreshToken(r);
  14649. if (!(i && o)) {
  14650. _context19.next = 15;
  14651. break;
  14652. }
  14653. this.setAccessToken(i, o);
  14654. _context19.next = 17;
  14655. break;
  14656. case 15:
  14657. _context19.next = 17;
  14658. return this._request.refreshAccessToken();
  14659. case 17:
  14660. _context19.next = 19;
  14661. return this.refreshUserInfo();
  14662. case 19:
  14663. qe(Fe);
  14664. qe(je, {
  14665. env: this.config.env,
  14666. loginType: We.EMAIL,
  14667. persistence: this.config.persistence
  14668. });
  14669. return _context19.abrupt("return", new et(this.config.env));
  14670. case 22:
  14671. throw s.code ? new te({
  14672. code: s.code,
  14673. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  14674. }) : new te({
  14675. message: "邮箱登录失败"
  14676. });
  14677. case 23:
  14678. case "end":
  14679. return _context19.stop();
  14680. }
  14681. }
  14682. }, _callee19, this);
  14683. }));
  14684. function signIn(_x12, _x13) {
  14685. return _signIn3.apply(this, arguments);
  14686. }
  14687. return signIn;
  14688. }()
  14689. }, {
  14690. key: "activate",
  14691. value: function () {
  14692. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  14693. return _regenerator.default.wrap(function _callee20$(_context20) {
  14694. while (1) {
  14695. switch (_context20.prev = _context20.next) {
  14696. case 0:
  14697. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  14698. token: e
  14699. }));
  14700. case 1:
  14701. case "end":
  14702. return _context20.stop();
  14703. }
  14704. }
  14705. }, _callee20, this);
  14706. }));
  14707. function activate(_x14) {
  14708. return _activate.apply(this, arguments);
  14709. }
  14710. return activate;
  14711. }()
  14712. }, {
  14713. key: "resetPasswordWithToken",
  14714. value: function () {
  14715. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  14716. return _regenerator.default.wrap(function _callee21$(_context21) {
  14717. while (1) {
  14718. switch (_context21.prev = _context21.next) {
  14719. case 0:
  14720. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  14721. token: e,
  14722. newPassword: t
  14723. }));
  14724. case 1:
  14725. case "end":
  14726. return _context21.stop();
  14727. }
  14728. }
  14729. }, _callee21, this);
  14730. }));
  14731. function resetPasswordWithToken(_x15, _x16) {
  14732. return _resetPasswordWithToken.apply(this, arguments);
  14733. }
  14734. return resetPasswordWithToken;
  14735. }()
  14736. }]);
  14737. return st;
  14738. }(Xe);
  14739. var rt = /*#__PURE__*/function (_Xe4) {
  14740. (0, _inherits2.default)(rt, _Xe4);
  14741. var _super7 = _createSuper(rt);
  14742. function rt() {
  14743. (0, _classCallCheck2.default)(this, rt);
  14744. return _super7.apply(this, arguments);
  14745. }
  14746. (0, _createClass2.default)(rt, [{
  14747. key: "signIn",
  14748. value: function () {
  14749. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  14750. var n, s, r, i, o;
  14751. return _regenerator.default.wrap(function _callee22$(_context22) {
  14752. while (1) {
  14753. switch (_context22.prev = _context22.next) {
  14754. case 0:
  14755. if (!("string" != typeof e)) {
  14756. _context22.next = 2;
  14757. break;
  14758. }
  14759. throw new te({
  14760. code: "PARAM_ERROR",
  14761. message: "username must be a string"
  14762. });
  14763. case 2:
  14764. "string" != typeof t && (t = "", console.warn("password is empty"));
  14765. n = this._cache.keys.refreshTokenKey;
  14766. _context22.next = 6;
  14767. return this._request.send("auth.signIn", {
  14768. loginType: We.USERNAME,
  14769. username: e,
  14770. password: t,
  14771. refresh_token: this._cache.getStore(n) || ""
  14772. });
  14773. case 6:
  14774. s = _context22.sent;
  14775. r = s.refresh_token;
  14776. i = s.access_token_expire;
  14777. o = s.access_token;
  14778. if (!r) {
  14779. _context22.next = 23;
  14780. break;
  14781. }
  14782. this.setRefreshToken(r);
  14783. if (!(o && i)) {
  14784. _context22.next = 16;
  14785. break;
  14786. }
  14787. this.setAccessToken(o, i);
  14788. _context22.next = 18;
  14789. break;
  14790. case 16:
  14791. _context22.next = 18;
  14792. return this._request.refreshAccessToken();
  14793. case 18:
  14794. _context22.next = 20;
  14795. return this.refreshUserInfo();
  14796. case 20:
  14797. qe(Fe);
  14798. qe(je, {
  14799. env: this.config.env,
  14800. loginType: We.USERNAME,
  14801. persistence: this.config.persistence
  14802. });
  14803. return _context22.abrupt("return", new et(this.config.env));
  14804. case 23:
  14805. throw s.code ? new te({
  14806. code: s.code,
  14807. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  14808. }) : new te({
  14809. message: "用户名密码登录失败"
  14810. });
  14811. case 24:
  14812. case "end":
  14813. return _context22.stop();
  14814. }
  14815. }
  14816. }, _callee22, this);
  14817. }));
  14818. function signIn(_x17, _x18) {
  14819. return _signIn4.apply(this, arguments);
  14820. }
  14821. return signIn;
  14822. }()
  14823. }]);
  14824. return rt;
  14825. }(Xe);
  14826. var it = /*#__PURE__*/function () {
  14827. function it(e) {
  14828. (0, _classCallCheck2.default)(this, it);
  14829. this.config = e, this._cache = Le(e.env), this._request = Qe(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), De(je, this._onLoginTypeChanged);
  14830. }
  14831. (0, _createClass2.default)(it, [{
  14832. key: "currentUser",
  14833. get: function get() {
  14834. var e = this.hasLoginState();
  14835. return e && e.user || null;
  14836. }
  14837. }, {
  14838. key: "loginType",
  14839. get: function get() {
  14840. return this._cache.getStore(this._cache.keys.loginTypeKey);
  14841. }
  14842. }, {
  14843. key: "anonymousAuthProvider",
  14844. value: function anonymousAuthProvider() {
  14845. return new tt(this.config);
  14846. }
  14847. }, {
  14848. key: "customAuthProvider",
  14849. value: function customAuthProvider() {
  14850. return new nt(this.config);
  14851. }
  14852. }, {
  14853. key: "emailAuthProvider",
  14854. value: function emailAuthProvider() {
  14855. return new st(this.config);
  14856. }
  14857. }, {
  14858. key: "usernameAuthProvider",
  14859. value: function usernameAuthProvider() {
  14860. return new rt(this.config);
  14861. }
  14862. }, {
  14863. key: "signInAnonymously",
  14864. value: function () {
  14865. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  14866. return _regenerator.default.wrap(function _callee23$(_context23) {
  14867. while (1) {
  14868. switch (_context23.prev = _context23.next) {
  14869. case 0:
  14870. return _context23.abrupt("return", new tt(this.config).signIn());
  14871. case 1:
  14872. case "end":
  14873. return _context23.stop();
  14874. }
  14875. }
  14876. }, _callee23, this);
  14877. }));
  14878. function signInAnonymously() {
  14879. return _signInAnonymously.apply(this, arguments);
  14880. }
  14881. return signInAnonymously;
  14882. }()
  14883. }, {
  14884. key: "signInWithEmailAndPassword",
  14885. value: function () {
  14886. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  14887. return _regenerator.default.wrap(function _callee24$(_context24) {
  14888. while (1) {
  14889. switch (_context24.prev = _context24.next) {
  14890. case 0:
  14891. return _context24.abrupt("return", new st(this.config).signIn(e, t));
  14892. case 1:
  14893. case "end":
  14894. return _context24.stop();
  14895. }
  14896. }
  14897. }, _callee24, this);
  14898. }));
  14899. function signInWithEmailAndPassword(_x19, _x20) {
  14900. return _signInWithEmailAndPassword.apply(this, arguments);
  14901. }
  14902. return signInWithEmailAndPassword;
  14903. }()
  14904. }, {
  14905. key: "signInWithUsernameAndPassword",
  14906. value: function signInWithUsernameAndPassword(e, t) {
  14907. return new rt(this.config).signIn(e, t);
  14908. }
  14909. }, {
  14910. key: "linkAndRetrieveDataWithTicket",
  14911. value: function () {
  14912. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  14913. return _regenerator.default.wrap(function _callee25$(_context25) {
  14914. while (1) {
  14915. switch (_context25.prev = _context25.next) {
  14916. case 0:
  14917. this._anonymousAuthProvider || (this._anonymousAuthProvider = new tt(this.config)), De($e, this._onAnonymousConverted);
  14918. _context25.next = 3;
  14919. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  14920. case 3:
  14921. return _context25.abrupt("return", _context25.sent);
  14922. case 4:
  14923. case "end":
  14924. return _context25.stop();
  14925. }
  14926. }
  14927. }, _callee25, this);
  14928. }));
  14929. function linkAndRetrieveDataWithTicket(_x21) {
  14930. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  14931. }
  14932. return linkAndRetrieveDataWithTicket;
  14933. }()
  14934. }, {
  14935. key: "signOut",
  14936. value: function () {
  14937. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  14938. var _this$_cache$keys10, e, t, n, s, r;
  14939. return _regenerator.default.wrap(function _callee26$(_context26) {
  14940. while (1) {
  14941. switch (_context26.prev = _context26.next) {
  14942. case 0:
  14943. if (!(this.loginType === We.ANONYMOUS)) {
  14944. _context26.next = 2;
  14945. break;
  14946. }
  14947. throw new te({
  14948. message: "匿名用户不支持登出操作"
  14949. });
  14950. case 2:
  14951. _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);
  14952. if (s) {
  14953. _context26.next = 5;
  14954. break;
  14955. }
  14956. return _context26.abrupt("return");
  14957. case 5:
  14958. _context26.next = 7;
  14959. return this._request.send("auth.logout", {
  14960. refresh_token: s
  14961. });
  14962. case 7:
  14963. r = _context26.sent;
  14964. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), qe(Fe), qe(je, {
  14965. env: this.config.env,
  14966. loginType: We.NULL,
  14967. persistence: this.config.persistence
  14968. }), r));
  14969. case 9:
  14970. case "end":
  14971. return _context26.stop();
  14972. }
  14973. }
  14974. }, _callee26, this);
  14975. }));
  14976. function signOut() {
  14977. return _signOut.apply(this, arguments);
  14978. }
  14979. return signOut;
  14980. }()
  14981. }, {
  14982. key: "signUpWithEmailAndPassword",
  14983. value: function () {
  14984. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  14985. return _regenerator.default.wrap(function _callee27$(_context27) {
  14986. while (1) {
  14987. switch (_context27.prev = _context27.next) {
  14988. case 0:
  14989. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  14990. email: e,
  14991. password: t
  14992. }));
  14993. case 1:
  14994. case "end":
  14995. return _context27.stop();
  14996. }
  14997. }
  14998. }, _callee27, this);
  14999. }));
  15000. function signUpWithEmailAndPassword(_x22, _x23) {
  15001. return _signUpWithEmailAndPassword.apply(this, arguments);
  15002. }
  15003. return signUpWithEmailAndPassword;
  15004. }()
  15005. }, {
  15006. key: "sendPasswordResetEmail",
  15007. value: function () {
  15008. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  15009. return _regenerator.default.wrap(function _callee28$(_context28) {
  15010. while (1) {
  15011. switch (_context28.prev = _context28.next) {
  15012. case 0:
  15013. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  15014. email: e
  15015. }));
  15016. case 1:
  15017. case "end":
  15018. return _context28.stop();
  15019. }
  15020. }
  15021. }, _callee28, this);
  15022. }));
  15023. function sendPasswordResetEmail(_x24) {
  15024. return _sendPasswordResetEmail.apply(this, arguments);
  15025. }
  15026. return sendPasswordResetEmail;
  15027. }()
  15028. }, {
  15029. key: "onLoginStateChanged",
  15030. value: function onLoginStateChanged(e) {
  15031. var _this9 = this;
  15032. De(Fe, function () {
  15033. var t = _this9.hasLoginState();
  15034. e.call(_this9, t);
  15035. });
  15036. var t = this.hasLoginState();
  15037. e.call(this, t);
  15038. }
  15039. }, {
  15040. key: "onLoginStateExpired",
  15041. value: function onLoginStateExpired(e) {
  15042. De(Ke, e.bind(this));
  15043. }
  15044. }, {
  15045. key: "onAccessTokenRefreshed",
  15046. value: function onAccessTokenRefreshed(e) {
  15047. De(Be, e.bind(this));
  15048. }
  15049. }, {
  15050. key: "onAnonymousConverted",
  15051. value: function onAnonymousConverted(e) {
  15052. De($e, e.bind(this));
  15053. }
  15054. }, {
  15055. key: "onLoginTypeChanged",
  15056. value: function onLoginTypeChanged(e) {
  15057. var _this10 = this;
  15058. De(je, function () {
  15059. var t = _this10.hasLoginState();
  15060. e.call(_this10, t);
  15061. });
  15062. }
  15063. }, {
  15064. key: "getAccessToken",
  15065. value: function () {
  15066. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  15067. return _regenerator.default.wrap(function _callee29$(_context29) {
  15068. while (1) {
  15069. switch (_context29.prev = _context29.next) {
  15070. case 0:
  15071. _context29.next = 2;
  15072. return this._request.getAccessToken();
  15073. case 2:
  15074. _context29.t0 = _context29.sent.accessToken;
  15075. _context29.t1 = this.config.env;
  15076. return _context29.abrupt("return", {
  15077. accessToken: _context29.t0,
  15078. env: _context29.t1
  15079. });
  15080. case 5:
  15081. case "end":
  15082. return _context29.stop();
  15083. }
  15084. }
  15085. }, _callee29, this);
  15086. }));
  15087. function getAccessToken() {
  15088. return _getAccessToken2.apply(this, arguments);
  15089. }
  15090. return getAccessToken;
  15091. }()
  15092. }, {
  15093. key: "hasLoginState",
  15094. value: function hasLoginState() {
  15095. var e = this._cache.keys.refreshTokenKey;
  15096. return this._cache.getStore(e) ? new et(this.config.env) : null;
  15097. }
  15098. }, {
  15099. key: "isUsernameRegistered",
  15100. value: function () {
  15101. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  15102. var _yield$this$_request$5, t;
  15103. return _regenerator.default.wrap(function _callee30$(_context30) {
  15104. while (1) {
  15105. switch (_context30.prev = _context30.next) {
  15106. case 0:
  15107. if (!("string" != typeof e)) {
  15108. _context30.next = 2;
  15109. break;
  15110. }
  15111. throw new te({
  15112. code: "PARAM_ERROR",
  15113. message: "username must be a string"
  15114. });
  15115. case 2:
  15116. _context30.next = 4;
  15117. return this._request.send("auth.isUsernameRegistered", {
  15118. username: e
  15119. });
  15120. case 4:
  15121. _yield$this$_request$5 = _context30.sent;
  15122. t = _yield$this$_request$5.data;
  15123. return _context30.abrupt("return", t && t.isRegistered);
  15124. case 7:
  15125. case "end":
  15126. return _context30.stop();
  15127. }
  15128. }
  15129. }, _callee30, this);
  15130. }));
  15131. function isUsernameRegistered(_x25) {
  15132. return _isUsernameRegistered.apply(this, arguments);
  15133. }
  15134. return isUsernameRegistered;
  15135. }()
  15136. }, {
  15137. key: "getLoginState",
  15138. value: function getLoginState() {
  15139. return Promise.resolve(this.hasLoginState());
  15140. }
  15141. }, {
  15142. key: "signInWithTicket",
  15143. value: function () {
  15144. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  15145. return _regenerator.default.wrap(function _callee31$(_context31) {
  15146. while (1) {
  15147. switch (_context31.prev = _context31.next) {
  15148. case 0:
  15149. return _context31.abrupt("return", new nt(this.config).signIn(e));
  15150. case 1:
  15151. case "end":
  15152. return _context31.stop();
  15153. }
  15154. }
  15155. }, _callee31, this);
  15156. }));
  15157. function signInWithTicket(_x26) {
  15158. return _signInWithTicket.apply(this, arguments);
  15159. }
  15160. return signInWithTicket;
  15161. }()
  15162. }, {
  15163. key: "shouldRefreshAccessToken",
  15164. value: function shouldRefreshAccessToken(e) {
  15165. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  15166. }
  15167. }, {
  15168. key: "getUserInfo",
  15169. value: function getUserInfo() {
  15170. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  15171. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  15172. requestId: e.seqId
  15173. });
  15174. });
  15175. }
  15176. }, {
  15177. key: "getAuthHeader",
  15178. value: function getAuthHeader() {
  15179. var _this$_cache$keys11 = this._cache.keys,
  15180. e = _this$_cache$keys11.refreshTokenKey,
  15181. t = _this$_cache$keys11.accessTokenKey,
  15182. n = this._cache.getStore(e);
  15183. return {
  15184. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  15185. };
  15186. }
  15187. }, {
  15188. key: "_onAnonymousConverted",
  15189. value: function _onAnonymousConverted(e) {
  15190. var t = e.data.env;
  15191. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  15192. }
  15193. }, {
  15194. key: "_onLoginTypeChanged",
  15195. value: function _onLoginTypeChanged(e) {
  15196. var _e$data = e.data,
  15197. t = _e$data.loginType,
  15198. n = _e$data.persistence,
  15199. s = _e$data.env;
  15200. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  15201. }
  15202. }]);
  15203. return it;
  15204. }();
  15205. var ot = function ot(e, t) {
  15206. t = t || ve();
  15207. var n = Qe(this.config.env),
  15208. s = e.cloudPath,
  15209. r = e.filePath,
  15210. i = e.onUploadProgress,
  15211. _e$fileType = e.fileType,
  15212. o = _e$fileType === void 0 ? "image" : _e$fileType;
  15213. return n.send("storage.getUploadMetadata", {
  15214. path: s
  15215. }).then(function (e) {
  15216. var _e$data2 = e.data,
  15217. a = _e$data2.url,
  15218. c = _e$data2.authorization,
  15219. u = _e$data2.token,
  15220. l = _e$data2.fileId,
  15221. h = _e$data2.cosFileId,
  15222. d = e.requestId,
  15223. p = {
  15224. key: s,
  15225. signature: c,
  15226. "x-cos-meta-fileid": h,
  15227. success_action_status: "201",
  15228. "x-cos-security-token": u
  15229. };
  15230. n.upload({
  15231. url: a,
  15232. data: p,
  15233. file: r,
  15234. name: s,
  15235. fileType: o,
  15236. onUploadProgress: i
  15237. }).then(function (e) {
  15238. 201 === e.statusCode ? t(null, {
  15239. fileID: l,
  15240. requestId: d
  15241. }) : t(new te({
  15242. code: "STORAGE_REQUEST_FAIL",
  15243. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  15244. }));
  15245. }).catch(function (e) {
  15246. t(e);
  15247. });
  15248. }).catch(function (e) {
  15249. t(e);
  15250. }), t.promise;
  15251. },
  15252. at = function at(e, t) {
  15253. t = t || ve();
  15254. var n = Qe(this.config.env),
  15255. s = e.cloudPath;
  15256. return n.send("storage.getUploadMetadata", {
  15257. path: s
  15258. }).then(function (e) {
  15259. t(null, e);
  15260. }).catch(function (e) {
  15261. t(e);
  15262. }), t.promise;
  15263. },
  15264. ct = function ct(_ref7, t) {
  15265. var e = _ref7.fileList;
  15266. if (t = t || ve(), !e || !Array.isArray(e)) return {
  15267. code: "INVALID_PARAM",
  15268. message: "fileList必须是非空的数组"
  15269. };
  15270. var _iterator3 = _createForOfIteratorHelper(e),
  15271. _step3;
  15272. try {
  15273. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  15274. var _t8 = _step3.value;
  15275. if (!_t8 || "string" != typeof _t8) return {
  15276. code: "INVALID_PARAM",
  15277. message: "fileList的元素必须是非空的字符串"
  15278. };
  15279. }
  15280. } catch (err) {
  15281. _iterator3.e(err);
  15282. } finally {
  15283. _iterator3.f();
  15284. }
  15285. var n = {
  15286. fileid_list: e
  15287. };
  15288. return Qe(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  15289. e.code ? t(null, e) : t(null, {
  15290. fileList: e.data.delete_list,
  15291. requestId: e.requestId
  15292. });
  15293. }).catch(function (e) {
  15294. t(e);
  15295. }), t.promise;
  15296. },
  15297. ut = function ut(_ref8, t) {
  15298. var e = _ref8.fileList;
  15299. t = t || ve(), e && Array.isArray(e) || t(null, {
  15300. code: "INVALID_PARAM",
  15301. message: "fileList必须是非空的数组"
  15302. });
  15303. var n = [];
  15304. var _iterator4 = _createForOfIteratorHelper(e),
  15305. _step4;
  15306. try {
  15307. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  15308. var _s10 = _step4.value;
  15309. "object" == (0, _typeof2.default)(_s10) ? (_s10.hasOwnProperty("fileID") && _s10.hasOwnProperty("maxAge") || t(null, {
  15310. code: "INVALID_PARAM",
  15311. message: "fileList的元素必须是包含fileID和maxAge的对象"
  15312. }), n.push({
  15313. fileid: _s10.fileID,
  15314. max_age: _s10.maxAge
  15315. })) : "string" == typeof _s10 ? n.push({
  15316. fileid: _s10
  15317. }) : t(null, {
  15318. code: "INVALID_PARAM",
  15319. message: "fileList的元素必须是字符串"
  15320. });
  15321. }
  15322. } catch (err) {
  15323. _iterator4.e(err);
  15324. } finally {
  15325. _iterator4.f();
  15326. }
  15327. var s = {
  15328. file_list: n
  15329. };
  15330. return Qe(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  15331. e.code ? t(null, e) : t(null, {
  15332. fileList: e.data.download_list,
  15333. requestId: e.requestId
  15334. });
  15335. }).catch(function (e) {
  15336. t(e);
  15337. }), t.promise;
  15338. },
  15339. lt = /*#__PURE__*/function () {
  15340. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  15341. var e, n, s, r;
  15342. return _regenerator.default.wrap(function _callee32$(_context32) {
  15343. while (1) {
  15344. switch (_context32.prev = _context32.next) {
  15345. case 0:
  15346. e = _ref9.fileID;
  15347. _context32.next = 3;
  15348. return ut.call(this, {
  15349. fileList: [{
  15350. fileID: e,
  15351. maxAge: 600
  15352. }]
  15353. });
  15354. case 3:
  15355. n = _context32.sent.fileList[0];
  15356. if (!("SUCCESS" !== n.code)) {
  15357. _context32.next = 6;
  15358. break;
  15359. }
  15360. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  15361. e(n);
  15362. }));
  15363. case 6:
  15364. s = Qe(this.config.env);
  15365. r = n.download_url;
  15366. if (!(r = encodeURI(r), !t)) {
  15367. _context32.next = 10;
  15368. break;
  15369. }
  15370. return _context32.abrupt("return", s.download({
  15371. url: r
  15372. }));
  15373. case 10:
  15374. _context32.t0 = t;
  15375. _context32.next = 13;
  15376. return s.download({
  15377. url: r
  15378. });
  15379. case 13:
  15380. _context32.t1 = _context32.sent;
  15381. (0, _context32.t0)(_context32.t1);
  15382. case 15:
  15383. case "end":
  15384. return _context32.stop();
  15385. }
  15386. }
  15387. }, _callee32, this);
  15388. }));
  15389. return function lt(_x27, _x28) {
  15390. return _ref10.apply(this, arguments);
  15391. };
  15392. }(),
  15393. ht = function ht(_ref11, o) {
  15394. var e = _ref11.name,
  15395. t = _ref11.data,
  15396. n = _ref11.query,
  15397. s = _ref11.parse,
  15398. r = _ref11.search,
  15399. i = _ref11.timeout;
  15400. var a = o || ve();
  15401. var c;
  15402. try {
  15403. c = t ? JSON.stringify(t) : "";
  15404. } catch (e) {
  15405. return Promise.reject(e);
  15406. }
  15407. if (!e) return Promise.reject(new te({
  15408. code: "PARAM_ERROR",
  15409. message: "函数名不能为空"
  15410. }));
  15411. var u = {
  15412. inQuery: n,
  15413. parse: s,
  15414. search: r,
  15415. function_name: e,
  15416. request_data: c
  15417. };
  15418. return Qe(this.config.env).send("functions.invokeFunction", u, {
  15419. timeout: i
  15420. }).then(function (e) {
  15421. if (e.code) a(null, e);else {
  15422. var _t9 = e.data.response_data;
  15423. if (s) a(null, {
  15424. result: _t9,
  15425. requestId: e.requestId
  15426. });else try {
  15427. _t9 = JSON.parse(e.data.response_data), a(null, {
  15428. result: _t9,
  15429. requestId: e.requestId
  15430. });
  15431. } catch (e) {
  15432. a(new te({
  15433. message: "response data must be json"
  15434. }));
  15435. }
  15436. }
  15437. return a.promise;
  15438. }).catch(function (e) {
  15439. a(e);
  15440. }), a.promise;
  15441. },
  15442. dt = {
  15443. timeout: 15e3,
  15444. persistence: "session"
  15445. },
  15446. pt = {};
  15447. var ft = /*#__PURE__*/function () {
  15448. function ft(e) {
  15449. (0, _classCallCheck2.default)(this, ft);
  15450. this.config = e || this.config, this.authObj = void 0;
  15451. }
  15452. (0, _createClass2.default)(ft, [{
  15453. key: "init",
  15454. value: function init(e) {
  15455. switch (Ae.adapter || (this.requestClient = new Ae.adapter.reqClass({
  15456. timeout: e.timeout || 5e3,
  15457. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  15458. })), this.config = _objectSpread(_objectSpread({}, dt), e), !0) {
  15459. case this.config.timeout > 6e5:
  15460. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  15461. break;
  15462. case this.config.timeout < 100:
  15463. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  15464. }
  15465. return new ft(this.config);
  15466. }
  15467. }, {
  15468. key: "auth",
  15469. value: function auth() {
  15470. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15471. e = _ref12.persistence;
  15472. if (this.authObj) return this.authObj;
  15473. var t = e || Ae.adapter.primaryStorage || dt.persistence;
  15474. var n;
  15475. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  15476. var t = e.env;
  15477. Oe[t] = new xe(e), Ee[t] = new xe(_objectSpread(_objectSpread({}, e), {}, {
  15478. persistence: "local"
  15479. }));
  15480. }(this.config), n = this.config, Ye[n.env] = new Ge(n), this.authObj = new it(this.config), this.authObj;
  15481. }
  15482. }, {
  15483. key: "on",
  15484. value: function on(e, t) {
  15485. return De.apply(this, [e, t]);
  15486. }
  15487. }, {
  15488. key: "off",
  15489. value: function off(e, t) {
  15490. return Me.apply(this, [e, t]);
  15491. }
  15492. }, {
  15493. key: "callFunction",
  15494. value: function callFunction(e, t) {
  15495. return ht.apply(this, [e, t]);
  15496. }
  15497. }, {
  15498. key: "deleteFile",
  15499. value: function deleteFile(e, t) {
  15500. return ct.apply(this, [e, t]);
  15501. }
  15502. }, {
  15503. key: "getTempFileURL",
  15504. value: function getTempFileURL(e, t) {
  15505. return ut.apply(this, [e, t]);
  15506. }
  15507. }, {
  15508. key: "downloadFile",
  15509. value: function downloadFile(e, t) {
  15510. return lt.apply(this, [e, t]);
  15511. }
  15512. }, {
  15513. key: "uploadFile",
  15514. value: function uploadFile(e, t) {
  15515. return ot.apply(this, [e, t]);
  15516. }
  15517. }, {
  15518. key: "getUploadMetadata",
  15519. value: function getUploadMetadata(e, t) {
  15520. return at.apply(this, [e, t]);
  15521. }
  15522. }, {
  15523. key: "registerExtension",
  15524. value: function registerExtension(e) {
  15525. pt[e.name] = e;
  15526. }
  15527. }, {
  15528. key: "invokeExtension",
  15529. value: function () {
  15530. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  15531. var n;
  15532. return _regenerator.default.wrap(function _callee33$(_context33) {
  15533. while (1) {
  15534. switch (_context33.prev = _context33.next) {
  15535. case 0:
  15536. n = pt[e];
  15537. if (n) {
  15538. _context33.next = 3;
  15539. break;
  15540. }
  15541. throw new te({
  15542. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  15543. });
  15544. case 3:
  15545. _context33.next = 5;
  15546. return n.invoke(t, this);
  15547. case 5:
  15548. return _context33.abrupt("return", _context33.sent);
  15549. case 6:
  15550. case "end":
  15551. return _context33.stop();
  15552. }
  15553. }
  15554. }, _callee33, this);
  15555. }));
  15556. function invokeExtension(_x29, _x30) {
  15557. return _invokeExtension.apply(this, arguments);
  15558. }
  15559. return invokeExtension;
  15560. }()
  15561. }, {
  15562. key: "useAdapters",
  15563. value: function useAdapters(e) {
  15564. var _ref13 = ke(e) || {},
  15565. t = _ref13.adapter,
  15566. n = _ref13.runtime;
  15567. t && (Ae.adapter = t), n && (Ae.runtime = n);
  15568. }
  15569. }]);
  15570. return ft;
  15571. }();
  15572. var gt = new ft();
  15573. function mt(e, t, n) {
  15574. void 0 === n && (n = {});
  15575. var s = /\?/.test(t),
  15576. r = "";
  15577. for (var i in n) {
  15578. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  15579. }
  15580. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  15581. }
  15582. var yt = /*#__PURE__*/function () {
  15583. function yt() {
  15584. (0, _classCallCheck2.default)(this, yt);
  15585. }
  15586. (0, _createClass2.default)(yt, [{
  15587. key: "post",
  15588. value: function post(e) {
  15589. var t = e.url,
  15590. n = e.data,
  15591. s = e.headers,
  15592. r = e.timeout;
  15593. return new Promise(function (e, i) {
  15594. ne.request({
  15595. url: mt("https:", t),
  15596. data: n,
  15597. method: "POST",
  15598. header: s,
  15599. timeout: r,
  15600. success: function success(t) {
  15601. e(t);
  15602. },
  15603. fail: function fail(e) {
  15604. i(e);
  15605. }
  15606. });
  15607. });
  15608. }
  15609. }, {
  15610. key: "upload",
  15611. value: function upload(e) {
  15612. return new Promise(function (t, n) {
  15613. var s = e.url,
  15614. r = e.file,
  15615. i = e.data,
  15616. o = e.headers,
  15617. a = e.fileType,
  15618. c = ne.uploadFile({
  15619. url: mt("https:", s),
  15620. name: "file",
  15621. formData: Object.assign({}, i),
  15622. filePath: r,
  15623. fileType: a,
  15624. header: o,
  15625. success: function success(e) {
  15626. var n = {
  15627. statusCode: e.statusCode,
  15628. data: e.data || {}
  15629. };
  15630. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  15631. },
  15632. fail: function fail(e) {
  15633. n(new Error(e.errMsg || "uploadFile:fail"));
  15634. }
  15635. });
  15636. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  15637. e.onUploadProgress({
  15638. loaded: t.totalBytesSent,
  15639. total: t.totalBytesExpectedToSend
  15640. });
  15641. });
  15642. });
  15643. }
  15644. }]);
  15645. return yt;
  15646. }();
  15647. var _t = {
  15648. setItem: function setItem(e, t) {
  15649. ne.setStorageSync(e, t);
  15650. },
  15651. getItem: function getItem(e) {
  15652. return ne.getStorageSync(e);
  15653. },
  15654. removeItem: function removeItem(e) {
  15655. ne.removeStorageSync(e);
  15656. },
  15657. clear: function clear() {
  15658. ne.clearStorageSync();
  15659. }
  15660. };
  15661. var wt = {
  15662. genAdapter: function genAdapter() {
  15663. return {
  15664. root: {},
  15665. reqClass: yt,
  15666. localStorage: _t,
  15667. primaryStorage: "local"
  15668. };
  15669. },
  15670. isMatch: function isMatch() {
  15671. return !0;
  15672. },
  15673. runtime: "uni_app"
  15674. };
  15675. gt.useAdapters(wt);
  15676. var vt = gt,
  15677. It = vt.init;
  15678. vt.init = function (e) {
  15679. e.env = e.spaceId;
  15680. var t = It.call(this, e);
  15681. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  15682. var n = t.auth;
  15683. return t.auth = function (e) {
  15684. var t = n.call(this, e);
  15685. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  15686. var n;
  15687. t[e] = (n = t[e], function (e) {
  15688. e = e || {};
  15689. var _ee = ee(e),
  15690. t = _ee.success,
  15691. s = _ee.fail,
  15692. r = _ee.complete;
  15693. if (!(t || s || r)) return n.call(this, e);
  15694. n.call(this, e).then(function (e) {
  15695. t && t(e), r && r(e);
  15696. }, function (e) {
  15697. s && s(e), r && r(e);
  15698. });
  15699. }).bind(t);
  15700. }), t;
  15701. }, t.customAuth = t.auth, t;
  15702. };
  15703. var St = vt;
  15704. function bt(_x31, _x32) {
  15705. return _bt.apply(this, arguments);
  15706. }
  15707. function _bt() {
  15708. _bt = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e, t) {
  15709. var n, _e30, s;
  15710. return _regenerator.default.wrap(function _callee59$(_context59) {
  15711. while (1) {
  15712. switch (_context59.prev = _context59.next) {
  15713. case 0:
  15714. n = "http://".concat(e, ":").concat(t, "/system/ping");
  15715. _context59.prev = 1;
  15716. _context59.next = 4;
  15717. return s = {
  15718. url: n,
  15719. timeout: 500
  15720. }, new Promise(function (e, t) {
  15721. ne.request(_objectSpread(_objectSpread({}, s), {}, {
  15722. success: function success(t) {
  15723. e(t);
  15724. },
  15725. fail: function fail(e) {
  15726. t(e);
  15727. }
  15728. }));
  15729. });
  15730. case 4:
  15731. _e30 = _context59.sent;
  15732. return _context59.abrupt("return", !(!_e30.data || 0 !== _e30.data.code));
  15733. case 8:
  15734. _context59.prev = 8;
  15735. _context59.t0 = _context59["catch"](1);
  15736. return _context59.abrupt("return", !1);
  15737. case 11:
  15738. case "end":
  15739. return _context59.stop();
  15740. }
  15741. }
  15742. }, _callee59, null, [[1, 8]]);
  15743. }));
  15744. return _bt.apply(this, arguments);
  15745. }
  15746. function kt(_x33, _x34) {
  15747. return _kt.apply(this, arguments);
  15748. }
  15749. function _kt() {
  15750. _kt = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee60(e, t) {
  15751. var n, s, _r10;
  15752. return _regenerator.default.wrap(function _callee60$(_context60) {
  15753. while (1) {
  15754. switch (_context60.prev = _context60.next) {
  15755. case 0:
  15756. s = 0;
  15757. case 1:
  15758. if (!(s < e.length)) {
  15759. _context60.next = 11;
  15760. break;
  15761. }
  15762. _r10 = e[s];
  15763. _context60.next = 5;
  15764. return bt(_r10, t);
  15765. case 5:
  15766. if (!_context60.sent) {
  15767. _context60.next = 8;
  15768. break;
  15769. }
  15770. n = _r10;
  15771. return _context60.abrupt("break", 11);
  15772. case 8:
  15773. s++;
  15774. _context60.next = 1;
  15775. break;
  15776. case 11:
  15777. return _context60.abrupt("return", {
  15778. address: n,
  15779. port: t
  15780. });
  15781. case 12:
  15782. case "end":
  15783. return _context60.stop();
  15784. }
  15785. }
  15786. }, _callee60);
  15787. }));
  15788. return _kt.apply(this, arguments);
  15789. }
  15790. var At = {
  15791. "serverless.file.resource.generateProximalSign": "storage/generate-proximal-sign",
  15792. "serverless.file.resource.report": "storage/report",
  15793. "serverless.file.resource.delete": "storage/delete",
  15794. "serverless.file.resource.getTempFileURL": "storage/get-temp-file-url"
  15795. };
  15796. var Ct = /*#__PURE__*/function () {
  15797. function Ct(e) {
  15798. (0, _classCallCheck2.default)(this, Ct);
  15799. if (["spaceId", "clientSecret"].forEach(function (t) {
  15800. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  15801. }), !e.endpoint) throw new Error("集群空间未配置ApiEndpoint,配置后需要重新关联服务空间后生效");
  15802. this.config = Object.assign({}, e), this.config.provider = "dcloud", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.adapter = ne;
  15803. }
  15804. (0, _createClass2.default)(Ct, [{
  15805. key: "request",
  15806. value: function () {
  15807. var _request2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  15808. var _this11 = this;
  15809. var t,
  15810. n,
  15811. _args34 = arguments;
  15812. return _regenerator.default.wrap(function _callee34$(_context34) {
  15813. while (1) {
  15814. switch (_context34.prev = _context34.next) {
  15815. case 0:
  15816. t = _args34.length > 1 && _args34[1] !== undefined ? _args34[1] : !0;
  15817. n = S && t;
  15818. if (!n) {
  15819. _context34.next = 8;
  15820. break;
  15821. }
  15822. _context34.next = 5;
  15823. return this.setupLocalRequest(e);
  15824. case 5:
  15825. _context34.t0 = _context34.sent;
  15826. _context34.next = 9;
  15827. break;
  15828. case 8:
  15829. _context34.t0 = this.setupRequest(e);
  15830. case 9:
  15831. e = _context34.t0;
  15832. return _context34.abrupt("return", Promise.resolve().then(function () {
  15833. return n ? _this11.requestLocal(e) : he.wrappedRequest(e, _this11.adapter.request);
  15834. }));
  15835. case 11:
  15836. case "end":
  15837. return _context34.stop();
  15838. }
  15839. }
  15840. }, _callee34, this);
  15841. }));
  15842. function request(_x35) {
  15843. return _request2.apply(this, arguments);
  15844. }
  15845. return request;
  15846. }()
  15847. }, {
  15848. key: "requestLocal",
  15849. value: function requestLocal(e) {
  15850. var _this12 = this;
  15851. return new Promise(function (t, n) {
  15852. _this12.adapter.request(Object.assign(e, {
  15853. complete: function complete(e) {
  15854. if (e || (e = {}), !e.statusCode || e.statusCode >= 400) {
  15855. var _t10 = e.data && e.data.code || "SYS_ERR",
  15856. _s11 = e.data && e.data.message || "request:fail";
  15857. return n(new te({
  15858. code: _t10,
  15859. message: _s11
  15860. }));
  15861. }
  15862. t({
  15863. success: !0,
  15864. result: e.data
  15865. });
  15866. }
  15867. }));
  15868. });
  15869. }
  15870. }, {
  15871. key: "setupRequest",
  15872. value: function setupRequest(e) {
  15873. var t = Object.assign({}, e, {
  15874. spaceId: this.config.spaceId,
  15875. timestamp: Date.now()
  15876. }),
  15877. n = {
  15878. "Content-Type": "application/json"
  15879. };
  15880. n["x-serverless-sign"] = he.sign(t, this.config.clientSecret);
  15881. var s = le();
  15882. n["x-client-info"] = encodeURIComponent(JSON.stringify(s));
  15883. var _se = se(),
  15884. r = _se.token;
  15885. return n["x-client-token"] = r, {
  15886. url: this.config.requestUrl,
  15887. method: "POST",
  15888. data: t,
  15889. dataType: "json",
  15890. header: JSON.parse(JSON.stringify(n))
  15891. };
  15892. }
  15893. }, {
  15894. key: "setupLocalRequest",
  15895. value: function () {
  15896. var _setupLocalRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  15897. var t, _se2, n, s, _ref14, r, i, _yield$kt, o;
  15898. return _regenerator.default.wrap(function _callee35$(_context35) {
  15899. while (1) {
  15900. switch (_context35.prev = _context35.next) {
  15901. case 0:
  15902. t = le();
  15903. _se2 = se();
  15904. n = _se2.token;
  15905. s = Object.assign({}, e, {
  15906. spaceId: this.config.spaceId,
  15907. timestamp: Date.now(),
  15908. clientInfo: t,
  15909. token: n
  15910. });
  15911. _ref14 = this.__dev__ && this.__dev__.debugInfo || {};
  15912. r = _ref14.address;
  15913. i = _ref14.servePort;
  15914. _context35.next = 9;
  15915. return kt(r, i);
  15916. case 9:
  15917. _yield$kt = _context35.sent;
  15918. o = _yield$kt.address;
  15919. return _context35.abrupt("return", {
  15920. url: "http://".concat(o, ":").concat(i, "/").concat(At[e.method]),
  15921. method: "POST",
  15922. data: s,
  15923. dataType: "json",
  15924. header: JSON.parse(JSON.stringify({
  15925. "Content-Type": "application/json"
  15926. }))
  15927. });
  15928. case 12:
  15929. case "end":
  15930. return _context35.stop();
  15931. }
  15932. }
  15933. }, _callee35, this);
  15934. }));
  15935. function setupLocalRequest(_x36) {
  15936. return _setupLocalRequest.apply(this, arguments);
  15937. }
  15938. return setupLocalRequest;
  15939. }()
  15940. }, {
  15941. key: "callFunction",
  15942. value: function callFunction(e) {
  15943. var t = {
  15944. method: "serverless.function.runtime.invoke",
  15945. params: JSON.stringify({
  15946. functionTarget: e.name,
  15947. functionArgs: e.data || {}
  15948. })
  15949. };
  15950. return this.request(t, !1);
  15951. }
  15952. }, {
  15953. key: "getUploadFileOptions",
  15954. value: function getUploadFileOptions(e) {
  15955. var t = {
  15956. method: "serverless.file.resource.generateProximalSign",
  15957. params: JSON.stringify(e)
  15958. };
  15959. return this.request(t);
  15960. }
  15961. }, {
  15962. key: "reportUploadFile",
  15963. value: function reportUploadFile(e) {
  15964. var t = {
  15965. method: "serverless.file.resource.report",
  15966. params: JSON.stringify(e)
  15967. };
  15968. return this.request(t);
  15969. }
  15970. }, {
  15971. key: "uploadFile",
  15972. value: function uploadFile(_ref15) {
  15973. var _this13 = this;
  15974. var e = _ref15.filePath,
  15975. t = _ref15.cloudPath,
  15976. _ref15$fileType = _ref15.fileType,
  15977. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  15978. s = _ref15.onUploadProgress;
  15979. if (!t) throw new te({
  15980. code: "CLOUDPATH_REQUIRED",
  15981. message: "cloudPath不可为空"
  15982. });
  15983. var r;
  15984. return this.getUploadFileOptions({
  15985. cloudPath: t
  15986. }).then(function (t) {
  15987. var _t$result = t.result,
  15988. i = _t$result.url,
  15989. o = _t$result.formData,
  15990. a = _t$result.name;
  15991. return r = t.result.fileUrl, new Promise(function (t, r) {
  15992. var c = _this13.adapter.uploadFile({
  15993. url: i,
  15994. formData: o,
  15995. name: a,
  15996. filePath: e,
  15997. fileType: n,
  15998. success: function success(e) {
  15999. e && e.statusCode < 400 ? t(e) : r(new te({
  16000. code: "UPLOAD_FAILED",
  16001. message: "文件上传失败"
  16002. }));
  16003. },
  16004. fail: function fail(e) {
  16005. r(new te({
  16006. code: e.code || "UPLOAD_FAILED",
  16007. message: e.message || e.errMsg || "文件上传失败"
  16008. }));
  16009. }
  16010. });
  16011. "function" == typeof s && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  16012. s({
  16013. loaded: e.totalBytesSent,
  16014. total: e.totalBytesExpectedToSend
  16015. });
  16016. });
  16017. });
  16018. }).then(function () {
  16019. return _this13.reportUploadFile({
  16020. cloudPath: t
  16021. });
  16022. }).then(function (t) {
  16023. return new Promise(function (n, s) {
  16024. t.success ? n({
  16025. success: !0,
  16026. filePath: e,
  16027. fileID: r
  16028. }) : s(new te({
  16029. code: "UPLOAD_FAILED",
  16030. message: "文件上传失败"
  16031. }));
  16032. });
  16033. });
  16034. }
  16035. }, {
  16036. key: "deleteFile",
  16037. value: function deleteFile(_ref16) {
  16038. var e = _ref16.fileList;
  16039. var t = {
  16040. method: "serverless.file.resource.delete",
  16041. params: JSON.stringify({
  16042. fileList: e
  16043. })
  16044. };
  16045. return this.request(t).then(function (e) {
  16046. if (e.success) return e.result;
  16047. throw new te({
  16048. code: "DELETE_FILE_FAILED",
  16049. message: "删除文件失败"
  16050. });
  16051. });
  16052. }
  16053. }, {
  16054. key: "getTempFileURL",
  16055. value: function getTempFileURL() {
  16056. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16057. e = _ref17.fileList,
  16058. t = _ref17.maxAge;
  16059. if (!Array.isArray(e) || 0 === e.length) throw new te({
  16060. code: "INVALID_PARAM",
  16061. message: "fileList的元素必须是非空的字符串"
  16062. });
  16063. var n = {
  16064. method: "serverless.file.resource.getTempFileURL",
  16065. params: JSON.stringify({
  16066. fileList: e,
  16067. maxAge: t
  16068. })
  16069. };
  16070. return this.request(n).then(function (e) {
  16071. if (e.success) return {
  16072. fileList: e.result.fileList.map(function (e) {
  16073. return {
  16074. fileID: e.fileID,
  16075. tempFileURL: e.tempFileURL
  16076. };
  16077. })
  16078. };
  16079. throw new te({
  16080. code: "GET_TEMP_FILE_URL_FAILED",
  16081. message: "获取临时文件链接失败"
  16082. });
  16083. });
  16084. }
  16085. }]);
  16086. return Ct;
  16087. }();
  16088. var Pt = {
  16089. init: function init(e) {
  16090. var t = new Ct(e),
  16091. n = {
  16092. signInAnonymously: function signInAnonymously() {
  16093. return Promise.resolve();
  16094. },
  16095. getLoginState: function getLoginState() {
  16096. return Promise.resolve(!1);
  16097. }
  16098. };
  16099. return t.auth = function () {
  16100. return n;
  16101. }, t.customAuth = t.auth, t;
  16102. }
  16103. },
  16104. Tt = n(function (e, t) {
  16105. e.exports = r.enc.Hex;
  16106. });
  16107. function xt() {
  16108. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) {
  16109. var t = 16 * Math.random() | 0;
  16110. return ("x" === e ? t : 3 & t | 8).toString(16);
  16111. });
  16112. }
  16113. function Ot() {
  16114. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  16115. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16116. var n = t.data,
  16117. s = t.functionName,
  16118. r = t.method,
  16119. i = t.headers,
  16120. _t$signHeaderKeys = t.signHeaderKeys,
  16121. o = _t$signHeaderKeys === void 0 ? [] : _t$signHeaderKeys,
  16122. a = t.config,
  16123. c = Date.now(),
  16124. u = xt(),
  16125. l = Object.assign({}, i, {
  16126. "x-from-app-id": a.spaceAppId,
  16127. "x-from-env-id": a.spaceId,
  16128. "x-to-env-id": a.spaceId,
  16129. "x-from-instance-id": c,
  16130. "x-from-function-name": s,
  16131. "x-client-timestamp": c,
  16132. "x-alipay-source": "client",
  16133. "x-request-id": u,
  16134. "x-alipay-callid": u,
  16135. "x-trace-id": u
  16136. }),
  16137. h = ["x-from-app-id", "x-from-env-id", "x-to-env-id", "x-from-instance-id", "x-from-function-name", "x-client-timestamp"].concat(o),
  16138. _ref18 = e.split("?") || [],
  16139. _ref19 = (0, _slicedToArray2.default)(_ref18, 2),
  16140. _ref19$ = _ref19[0],
  16141. d = _ref19$ === void 0 ? "" : _ref19$,
  16142. _ref19$2 = _ref19[1],
  16143. p = _ref19$2 === void 0 ? "" : _ref19$2,
  16144. f = function (e) {
  16145. var t = e.signedHeaders.join(";"),
  16146. n = e.signedHeaders.map(function (t) {
  16147. return "".concat(t.toLowerCase(), ":").concat(e.headers[t], "\n");
  16148. }).join(""),
  16149. s = _e(e.body).toString(Tt),
  16150. r = "".concat(e.method.toUpperCase(), "\n").concat(e.path, "\n").concat(e.query, "\n").concat(n, "\n").concat(t, "\n").concat(s, "\n"),
  16151. i = _e(r).toString(Tt),
  16152. o = "HMAC-SHA256\n".concat(e.timestamp, "\n").concat(i, "\n"),
  16153. a = we(o, e.secretKey).toString(Tt);
  16154. return "HMAC-SHA256 Credential=".concat(e.secretId, ", SignedHeaders=").concat(t, ", Signature=").concat(a);
  16155. }({
  16156. path: d,
  16157. query: p,
  16158. method: r,
  16159. headers: l,
  16160. timestamp: c,
  16161. body: JSON.stringify(n),
  16162. secretId: a.accessKey,
  16163. secretKey: a.secretKey,
  16164. signedHeaders: h.sort()
  16165. });
  16166. return {
  16167. url: "".concat(a.endpoint).concat(e),
  16168. headers: Object.assign({}, l, {
  16169. Authorization: f
  16170. })
  16171. };
  16172. }
  16173. function Et(_ref20) {
  16174. var e = _ref20.url,
  16175. t = _ref20.data,
  16176. _ref20$method = _ref20.method,
  16177. n = _ref20$method === void 0 ? "POST" : _ref20$method,
  16178. _ref20$headers = _ref20.headers,
  16179. s = _ref20$headers === void 0 ? {} : _ref20$headers,
  16180. r = _ref20.timeout;
  16181. return new Promise(function (i, o) {
  16182. ne.request({
  16183. url: e,
  16184. method: n,
  16185. data: "object" == (0, _typeof2.default)(t) ? JSON.stringify(t) : t,
  16186. header: s,
  16187. dataType: "json",
  16188. timeout: r,
  16189. complete: function complete() {
  16190. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  16191. var t = s["x-trace-id"] || "";
  16192. if (!e.statusCode || e.statusCode >= 400) {
  16193. var _ref21 = e.data || {},
  16194. _n7 = _ref21.message,
  16195. _s12 = _ref21.errMsg,
  16196. _r4 = _ref21.trace_id;
  16197. return o(new te({
  16198. code: "SYS_ERR",
  16199. message: _n7 || _s12 || "request:fail",
  16200. requestId: _r4 || t
  16201. }));
  16202. }
  16203. i({
  16204. status: e.statusCode,
  16205. data: e.data,
  16206. headers: e.header,
  16207. requestId: t
  16208. });
  16209. }
  16210. });
  16211. });
  16212. }
  16213. function Lt(e, t) {
  16214. var n = e.path,
  16215. s = e.data,
  16216. _e$method = e.method,
  16217. r = _e$method === void 0 ? "GET" : _e$method,
  16218. _Ot = Ot(n, {
  16219. functionName: "",
  16220. data: s,
  16221. method: r,
  16222. headers: {
  16223. "x-alipay-cloud-mode": "oss",
  16224. "x-data-api-type": "oss",
  16225. "x-expire-timestamp": Date.now() + 6e4
  16226. },
  16227. signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"],
  16228. config: t
  16229. }),
  16230. i = _Ot.url,
  16231. o = _Ot.headers;
  16232. return Et({
  16233. url: i,
  16234. data: s,
  16235. method: r,
  16236. headers: o
  16237. }).then(function (e) {
  16238. var t = e.data || {};
  16239. if (!t.success) throw new te({
  16240. code: e.errCode,
  16241. message: e.errMsg,
  16242. requestId: e.requestId
  16243. });
  16244. return t.data || {};
  16245. }).catch(function (e) {
  16246. throw new te({
  16247. code: e.errCode,
  16248. message: e.errMsg,
  16249. requestId: e.requestId
  16250. });
  16251. });
  16252. }
  16253. function Rt() {
  16254. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  16255. var t = e.trim().replace(/^cloud:\/\//, ""),
  16256. n = t.indexOf("/");
  16257. if (n <= 0) throw new te({
  16258. code: "INVALID_PARAM",
  16259. message: "fileID不合法"
  16260. });
  16261. var s = t.substring(0, n),
  16262. r = t.substring(n + 1);
  16263. return s !== this.config.spaceId && console.warn("file ".concat(e, " does not belong to env ").concat(this.config.spaceId)), r;
  16264. }
  16265. function Ut() {
  16266. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  16267. return "cloud://".concat(this.config.spaceId, "/").concat(e.replace(/^\/+/, ""));
  16268. }
  16269. var Nt = /*#__PURE__*/function () {
  16270. function Nt(e) {
  16271. (0, _classCallCheck2.default)(this, Nt);
  16272. this.config = e;
  16273. }
  16274. (0, _createClass2.default)(Nt, [{
  16275. key: "signedURL",
  16276. value: function signedURL(e) {
  16277. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16278. var n = "/ws/function/".concat(e),
  16279. s = this.config.wsEndpoint.replace(/^ws(s)?:\/\//, ""),
  16280. r = Object.assign({}, t, {
  16281. accessKeyId: this.config.accessKey,
  16282. signatureNonce: xt(),
  16283. timestamp: "" + Date.now()
  16284. }),
  16285. i = [n, ["accessKeyId", "authorization", "signatureNonce", "timestamp"].sort().map(function (e) {
  16286. return r[e] ? "".concat(e, "=").concat(r[e]) : null;
  16287. }).filter(Boolean).join("&"), "host:".concat(s)].join("\n"),
  16288. o = ["HMAC-SHA256", _e(i).toString(Tt)].join("\n"),
  16289. a = we(o, this.config.secretKey).toString(Tt),
  16290. c = Object.keys(r).map(function (e) {
  16291. return "".concat(e, "=").concat(encodeURIComponent(r[e]));
  16292. }).join("&");
  16293. return "".concat(this.config.wsEndpoint).concat(n, "?").concat(c, "&signature=").concat(a);
  16294. }
  16295. }]);
  16296. return Nt;
  16297. }();
  16298. var Dt = /*#__PURE__*/function () {
  16299. function Dt(e) {
  16300. (0, _classCallCheck2.default)(this, Dt);
  16301. if (["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach(function (t) {
  16302. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  16303. }), e.endpoint) {
  16304. if ("string" != typeof e.endpoint) throw new Error("endpoint must be string");
  16305. if (!/^https:\/\//.test(e.endpoint)) throw new Error("endpoint must start with https://");
  16306. e.endpoint = e.endpoint.replace(/\/$/, "");
  16307. }
  16308. this.config = Object.assign({}, e, {
  16309. endpoint: e.endpoint || "https://".concat(e.spaceId, ".api-hz.cloudbasefunction.cn"),
  16310. wsEndpoint: e.wsEndpoint || "wss://".concat(e.spaceId, ".api-hz.cloudbasefunction.cn")
  16311. }), this._websocket = new Nt(this.config);
  16312. }
  16313. (0, _createClass2.default)(Dt, [{
  16314. key: "callFunction",
  16315. value: function callFunction(e) {
  16316. return function (e, t) {
  16317. var n = e.name,
  16318. s = e.data,
  16319. _e$async = e.async,
  16320. r = _e$async === void 0 ? !1 : _e$async,
  16321. i = e.timeout,
  16322. o = "POST",
  16323. a = {
  16324. "x-to-function-name": n
  16325. };
  16326. r && (a["x-function-invoke-type"] = "async");
  16327. var _Ot2 = Ot("/functions/invokeFunction", {
  16328. functionName: n,
  16329. data: s,
  16330. method: o,
  16331. headers: a,
  16332. signHeaderKeys: ["x-to-function-name"],
  16333. config: t
  16334. }),
  16335. c = _Ot2.url,
  16336. u = _Ot2.headers;
  16337. return Et({
  16338. url: c,
  16339. data: s,
  16340. method: o,
  16341. headers: u,
  16342. timeout: i
  16343. }).then(function (e) {
  16344. var t = 0;
  16345. if (r) {
  16346. var _n8 = e.data || {};
  16347. t = "200" === _n8.errCode ? 0 : _n8.errCode, e.data = _n8.data || {}, e.errMsg = _n8.errMsg;
  16348. }
  16349. if (0 !== t) throw new te({
  16350. code: t,
  16351. message: e.errMsg,
  16352. requestId: e.requestId
  16353. });
  16354. return {
  16355. errCode: t,
  16356. success: 0 === t,
  16357. requestId: e.requestId,
  16358. result: e.data
  16359. };
  16360. }).catch(function (e) {
  16361. throw new te({
  16362. code: e.errCode,
  16363. message: e.errMsg,
  16364. requestId: e.requestId
  16365. });
  16366. });
  16367. }(e, this.config);
  16368. }
  16369. }, {
  16370. key: "uploadFileToOSS",
  16371. value: function uploadFileToOSS(_ref22) {
  16372. var e = _ref22.url,
  16373. t = _ref22.filePath,
  16374. n = _ref22.fileType,
  16375. s = _ref22.formData,
  16376. r = _ref22.onUploadProgress;
  16377. return new Promise(function (i, o) {
  16378. var a = ne.uploadFile({
  16379. url: e,
  16380. filePath: t,
  16381. fileType: n,
  16382. formData: s,
  16383. name: "file",
  16384. success: function success(e) {
  16385. e && e.statusCode < 400 ? i(e) : o(new te({
  16386. code: "UPLOAD_FAILED",
  16387. message: "文件上传失败"
  16388. }));
  16389. },
  16390. fail: function fail(e) {
  16391. o(new te({
  16392. code: e.code || "UPLOAD_FAILED",
  16393. message: e.message || e.errMsg || "文件上传失败"
  16394. }));
  16395. }
  16396. });
  16397. "function" == typeof r && a && "function" == typeof a.onProgressUpdate && a.onProgressUpdate(function (e) {
  16398. r({
  16399. loaded: e.totalBytesSent,
  16400. total: e.totalBytesExpectedToSend
  16401. });
  16402. });
  16403. });
  16404. }
  16405. }, {
  16406. key: "uploadFile",
  16407. value: function () {
  16408. var _uploadFile2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(_ref23) {
  16409. var e, _ref23$cloudPath, t, _ref23$fileType, n, s, r, i, o, a, c;
  16410. return _regenerator.default.wrap(function _callee36$(_context36) {
  16411. while (1) {
  16412. switch (_context36.prev = _context36.next) {
  16413. case 0:
  16414. 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;
  16415. if (!("string" !== f(t))) {
  16416. _context36.next = 3;
  16417. break;
  16418. }
  16419. throw new te({
  16420. code: "INVALID_PARAM",
  16421. message: "cloudPath必须为字符串类型"
  16422. });
  16423. case 3:
  16424. if (t = t.trim()) {
  16425. _context36.next = 5;
  16426. break;
  16427. }
  16428. throw new te({
  16429. code: "INVALID_PARAM",
  16430. message: "cloudPath不可为空"
  16431. });
  16432. case 5:
  16433. if (!/:\/\//.test(t)) {
  16434. _context36.next = 7;
  16435. break;
  16436. }
  16437. throw new te({
  16438. code: "INVALID_PARAM",
  16439. message: "cloudPath不合法"
  16440. });
  16441. case 7:
  16442. _context36.next = 9;
  16443. return Lt({
  16444. path: "/".concat(t.replace(/^\//, ""), "?post_url")
  16445. }, this.config);
  16446. case 9:
  16447. r = _context36.sent;
  16448. i = r.file_id;
  16449. o = r.upload_url;
  16450. a = r.form_data;
  16451. c = a && a.reduce(function (e, t) {
  16452. return e[t.key] = t.value, e;
  16453. }, {});
  16454. return _context36.abrupt("return", this.uploadFileToOSS({
  16455. url: o,
  16456. filePath: e,
  16457. fileType: n,
  16458. formData: c,
  16459. onUploadProgress: s
  16460. }).then(function () {
  16461. return {
  16462. fileID: i
  16463. };
  16464. }));
  16465. case 15:
  16466. case "end":
  16467. return _context36.stop();
  16468. }
  16469. }
  16470. }, _callee36, this);
  16471. }));
  16472. function uploadFile(_x37) {
  16473. return _uploadFile2.apply(this, arguments);
  16474. }
  16475. return uploadFile;
  16476. }()
  16477. }, {
  16478. key: "getTempFileURL",
  16479. value: function () {
  16480. var _getTempFileURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(_ref24) {
  16481. var _this14 = this;
  16482. var e;
  16483. return _regenerator.default.wrap(function _callee37$(_context37) {
  16484. while (1) {
  16485. switch (_context37.prev = _context37.next) {
  16486. case 0:
  16487. e = _ref24.fileList;
  16488. return _context37.abrupt("return", new Promise(function (t, n) {
  16489. (!e || e.length < 0) && n(new te({
  16490. errCode: "INVALID_PARAM",
  16491. errMsg: "fileList不能为空数组"
  16492. })), e.length > 50 && n(new te({
  16493. errCode: "INVALID_PARAM",
  16494. errMsg: "fileList数组长度不能超过50"
  16495. }));
  16496. var s = [];
  16497. var _iterator5 = _createForOfIteratorHelper(e),
  16498. _step5;
  16499. try {
  16500. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  16501. var _t11 = _step5.value;
  16502. "string" !== f(_t11) && n(new te({
  16503. errCode: "INVALID_PARAM",
  16504. errMsg: "fileList的元素必须是非空的字符串"
  16505. }));
  16506. var _e17 = Rt.call(_this14, _t11);
  16507. s.push({
  16508. file_id: _e17,
  16509. expire: 600
  16510. });
  16511. }
  16512. } catch (err) {
  16513. _iterator5.e(err);
  16514. } finally {
  16515. _iterator5.f();
  16516. }
  16517. Lt({
  16518. path: "/?download_url",
  16519. data: {
  16520. file_list: s
  16521. },
  16522. method: "POST"
  16523. }, _this14.config).then(function (e) {
  16524. var _e$file_list = e.file_list,
  16525. n = _e$file_list === void 0 ? [] : _e$file_list;
  16526. t({
  16527. fileList: n.map(function (e) {
  16528. return {
  16529. fileID: Ut.call(_this14, e.file_id),
  16530. tempFileURL: e.download_url
  16531. };
  16532. })
  16533. });
  16534. }).catch(function (e) {
  16535. return n(e);
  16536. });
  16537. }));
  16538. case 2:
  16539. case "end":
  16540. return _context37.stop();
  16541. }
  16542. }
  16543. }, _callee37);
  16544. }));
  16545. function getTempFileURL(_x38) {
  16546. return _getTempFileURL.apply(this, arguments);
  16547. }
  16548. return getTempFileURL;
  16549. }()
  16550. }, {
  16551. key: "connectWebSocket",
  16552. value: function () {
  16553. var _connectWebSocket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(e) {
  16554. var t, n;
  16555. return _regenerator.default.wrap(function _callee38$(_context38) {
  16556. while (1) {
  16557. switch (_context38.prev = _context38.next) {
  16558. case 0:
  16559. t = e.name, n = e.query;
  16560. return _context38.abrupt("return", ne.connectSocket({
  16561. url: this._websocket.signedURL(t, n),
  16562. complete: function complete() {}
  16563. }));
  16564. case 2:
  16565. case "end":
  16566. return _context38.stop();
  16567. }
  16568. }
  16569. }, _callee38, this);
  16570. }));
  16571. function connectWebSocket(_x39) {
  16572. return _connectWebSocket.apply(this, arguments);
  16573. }
  16574. return connectWebSocket;
  16575. }()
  16576. }]);
  16577. return Dt;
  16578. }();
  16579. var qt = {
  16580. init: function init(e) {
  16581. e.provider = "alipay";
  16582. var t = new Dt(e);
  16583. return t.auth = function () {
  16584. return {
  16585. signInAnonymously: function signInAnonymously() {
  16586. return Promise.resolve();
  16587. },
  16588. getLoginState: function getLoginState() {
  16589. return Promise.resolve(!0);
  16590. }
  16591. };
  16592. }, t;
  16593. }
  16594. };
  16595. function Mt(_ref25) {
  16596. var e = _ref25.data;
  16597. var t;
  16598. t = le();
  16599. var n = JSON.parse(JSON.stringify(e || {}));
  16600. if (Object.assign(n, {
  16601. clientInfo: t
  16602. }), !n.uniIdToken) {
  16603. var _se3 = se(),
  16604. _e18 = _se3.token;
  16605. _e18 && (n.uniIdToken = _e18);
  16606. }
  16607. return n;
  16608. }
  16609. function Ft() {
  16610. return _Ft.apply(this, arguments);
  16611. }
  16612. function _Ft() {
  16613. _Ft = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee61() {
  16614. var _this27 = this;
  16615. var e,
  16616. _this$__dev__,
  16617. t,
  16618. n,
  16619. s,
  16620. r,
  16621. i,
  16622. o,
  16623. _args8 = arguments;
  16624. return _regenerator.default.wrap(function _callee61$(_context61) {
  16625. while (1) {
  16626. switch (_context61.prev = _context61.next) {
  16627. case 0:
  16628. e = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
  16629. _context61.next = 3;
  16630. return this.__dev__.initLocalNetwork();
  16631. case 3:
  16632. _this$__dev__ = this.__dev__, t = _this$__dev__.localAddress, n = _this$__dev__.localPort, s = {
  16633. aliyun: "aliyun",
  16634. tencent: "tcb",
  16635. alipay: "alipay",
  16636. dcloud: "dcloud"
  16637. }[this.config.provider], r = this.config.spaceId, i = "http://".concat(t, ":").concat(n, "/system/check-function"), o = "http://".concat(t, ":").concat(n, "/cloudfunctions/").concat(e.name);
  16638. return _context61.abrupt("return", new Promise(function (t, n) {
  16639. ne.request({
  16640. method: "POST",
  16641. url: i,
  16642. data: {
  16643. name: e.name,
  16644. platform: C,
  16645. provider: s,
  16646. spaceId: r
  16647. },
  16648. timeout: 3e3,
  16649. success: function success(e) {
  16650. t(e);
  16651. },
  16652. fail: function fail() {
  16653. t({
  16654. data: {
  16655. code: "NETWORK_ERROR",
  16656. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  16657. }
  16658. });
  16659. }
  16660. });
  16661. }).then(function () {
  16662. var _ref67 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16663. e = _ref67.data;
  16664. var _ref68 = e || {},
  16665. t = _ref68.code,
  16666. n = _ref68.message;
  16667. return {
  16668. code: 0 === t ? 0 : t || "SYS_ERR",
  16669. message: n || "SYS_ERR"
  16670. };
  16671. }).then(function (_ref69) {
  16672. var t = _ref69.code,
  16673. n = _ref69.message;
  16674. if (0 !== t) {
  16675. switch (t) {
  16676. case "MODULE_ENCRYPTED":
  16677. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e.name, "\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"));
  16678. break;
  16679. case "FUNCTION_ENCRYPTED":
  16680. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e.name, "\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"));
  16681. break;
  16682. case "ACTION_ENCRYPTED":
  16683. console.error(n || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  16684. break;
  16685. case "NETWORK_ERROR":
  16686. console.error(n || "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下");
  16687. break;
  16688. case "SWITCH_TO_CLOUD":
  16689. break;
  16690. default:
  16691. {
  16692. var _e31 = "\u68C0\u6D4B\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u51FA\u73B0\u9519\u8BEF\uFF1A".concat(n, "\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u73AF\u5883\u6216\u91CD\u542F\u5BA2\u6237\u7AEF\u518D\u8BD5");
  16693. throw console.error(_e31), new Error(_e31);
  16694. }
  16695. }
  16696. return _this27._callCloudFunction(e);
  16697. }
  16698. return new Promise(function (t, n) {
  16699. var r = Mt.call(_this27, {
  16700. data: e.data
  16701. });
  16702. ne.request({
  16703. method: "POST",
  16704. url: o,
  16705. data: {
  16706. provider: s,
  16707. platform: C,
  16708. param: r
  16709. },
  16710. timeout: e.timeout,
  16711. success: function success() {
  16712. var _ref70 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16713. e = _ref70.statusCode,
  16714. s = _ref70.data;
  16715. return !e || e >= 400 ? n(new te({
  16716. code: s.code || "SYS_ERR",
  16717. message: s.message || "request:fail"
  16718. })) : t({
  16719. result: s
  16720. });
  16721. },
  16722. fail: function fail(e) {
  16723. n(new te({
  16724. code: e.code || e.errCode || "SYS_ERR",
  16725. message: e.message || e.errMsg || "request:fail"
  16726. }));
  16727. }
  16728. });
  16729. });
  16730. }));
  16731. case 5:
  16732. case "end":
  16733. return _context61.stop();
  16734. }
  16735. }
  16736. }, _callee61, this);
  16737. }));
  16738. return _Ft.apply(this, arguments);
  16739. }
  16740. var Kt = [{
  16741. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  16742. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  16743. mode: "append"
  16744. }];
  16745. var jt = /[\\^$.*+?()[\]{}|]/g,
  16746. $t = RegExp(jt.source);
  16747. function Bt(e, t, n) {
  16748. return e.replace(new RegExp((s = t) && $t.test(s) ? s.replace(jt, "\\$&") : s, "g"), n);
  16749. var s;
  16750. }
  16751. var Wt = "none",
  16752. Ht = "request",
  16753. Jt = "response",
  16754. zt = "both";
  16755. var Vt = /*#__PURE__*/function () {
  16756. function Vt() {
  16757. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16758. e = _ref26.secretType,
  16759. t = _ref26.uniCloudIns;
  16760. (0, _classCallCheck2.default)(this, Vt);
  16761. this.clientType = "", this.secretType = e || Wt, this.uniCloudIns = t;
  16762. var _this$uniCloudIns$con = this.uniCloudIns.config,
  16763. n = _this$uniCloudIns$con.provider,
  16764. s = _this$uniCloudIns$con.spaceId;
  16765. var r;
  16766. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  16767. }
  16768. (0, _createClass2.default)(Vt, [{
  16769. key: "getSystemInfo",
  16770. value: function getSystemInfo() {
  16771. return this._systemInfo || (this._systemInfo = ae()), this._systemInfo;
  16772. }
  16773. }, {
  16774. key: "appId",
  16775. get: function get() {
  16776. return this.getSystemInfo().appId;
  16777. }
  16778. }, {
  16779. key: "deviceId",
  16780. get: function get() {
  16781. return this.getSystemInfo().deviceId;
  16782. }
  16783. }, {
  16784. key: "encryptData",
  16785. value: function () {
  16786. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(e) {
  16787. return _regenerator.default.wrap(function _callee39$(_context39) {
  16788. while (1) {
  16789. switch (_context39.prev = _context39.next) {
  16790. case 0:
  16791. return _context39.abrupt("return", this.secretType === Wt ? e : this.platformEncryptData(e));
  16792. case 1:
  16793. case "end":
  16794. return _context39.stop();
  16795. }
  16796. }
  16797. }, _callee39, this);
  16798. }));
  16799. function encryptData(_x40) {
  16800. return _encryptData.apply(this, arguments);
  16801. }
  16802. return encryptData;
  16803. }()
  16804. }, {
  16805. key: "decryptResult",
  16806. value: function () {
  16807. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40(e) {
  16808. var _ref27, t, n;
  16809. return _regenerator.default.wrap(function _callee40$(_context40) {
  16810. while (1) {
  16811. switch (_context40.prev = _context40.next) {
  16812. case 0:
  16813. if (!(this.secretType === Wt)) {
  16814. _context40.next = 2;
  16815. break;
  16816. }
  16817. return _context40.abrupt("return", e);
  16818. case 2:
  16819. _ref27 = e || {}, t = _ref27.errCode, n = _ref27.content;
  16820. return _context40.abrupt("return", t || !n ? e : this.secretType === Ht ? n : this.platformDecryptResult(e));
  16821. case 4:
  16822. case "end":
  16823. return _context40.stop();
  16824. }
  16825. }
  16826. }, _callee40, this);
  16827. }));
  16828. function decryptResult(_x41) {
  16829. return _decryptResult.apply(this, arguments);
  16830. }
  16831. return decryptResult;
  16832. }()
  16833. }, {
  16834. key: "wrapVerifyClientCallFunction",
  16835. value: function wrapVerifyClientCallFunction(e) {
  16836. var t = this;
  16837. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41() {
  16838. var _ref29,
  16839. n,
  16840. _ref29$data,
  16841. s,
  16842. r,
  16843. _args41 = arguments;
  16844. return _regenerator.default.wrap(function _callee41$(_context41) {
  16845. while (1) {
  16846. switch (_context41.prev = _context41.next) {
  16847. case 0:
  16848. _ref29 = _args41.length > 0 && _args41[0] !== undefined ? _args41[0] : {}, n = _ref29.name, _ref29$data = _ref29.data, s = _ref29$data === void 0 ? {} : _ref29$data;
  16849. _context41.next = 3;
  16850. return t.prepare();
  16851. case 3:
  16852. _context41.next = 5;
  16853. return t.platformGetSignOption();
  16854. case 5:
  16855. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context41.sent;
  16856. _context41.next = 8;
  16857. return e({
  16858. name: n,
  16859. data: s
  16860. });
  16861. case 8:
  16862. r = _context41.sent;
  16863. _context41.t0 = t.isClientKeyNotFound(r);
  16864. if (!_context41.t0) {
  16865. _context41.next = 19;
  16866. break;
  16867. }
  16868. _context41.next = 13;
  16869. return t.prepare({
  16870. forceUpdate: !0
  16871. });
  16872. case 13:
  16873. _context41.next = 15;
  16874. return t.platformGetSignOption();
  16875. case 15:
  16876. s._uniCloudOptions = _context41.sent;
  16877. _context41.next = 18;
  16878. return e({
  16879. name: n,
  16880. data: s
  16881. });
  16882. case 18:
  16883. r = _context41.sent;
  16884. case 19:
  16885. return _context41.abrupt("return", r);
  16886. case 20:
  16887. case "end":
  16888. return _context41.stop();
  16889. }
  16890. }
  16891. }, _callee41);
  16892. }));
  16893. }
  16894. }, {
  16895. key: "wrapEncryptDataCallFunction",
  16896. value: function wrapEncryptDataCallFunction(e) {
  16897. var t = this;
  16898. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
  16899. var _ref31,
  16900. n,
  16901. _ref31$data,
  16902. s,
  16903. r,
  16904. i,
  16905. _r5,
  16906. _args42 = arguments;
  16907. return _regenerator.default.wrap(function _callee42$(_context42) {
  16908. while (1) {
  16909. switch (_context42.prev = _context42.next) {
  16910. case 0:
  16911. _ref31 = _args42.length > 0 && _args42[0] !== undefined ? _args42[0] : {}, n = _ref31.name, _ref31$data = _ref31.data, s = _ref31$data === void 0 ? {} : _ref31$data;
  16912. _context42.next = 3;
  16913. return t.prepare();
  16914. case 3:
  16915. _context42.next = 5;
  16916. return t.encryptData(s);
  16917. case 5:
  16918. r = _context42.sent;
  16919. _context42.next = 8;
  16920. return e({
  16921. name: n,
  16922. data: r
  16923. });
  16924. case 8:
  16925. i = _context42.sent;
  16926. if (!t.isClientKeyNotFound(i)) {
  16927. _context42.next = 21;
  16928. break;
  16929. }
  16930. _context42.next = 12;
  16931. return t.prepare({
  16932. forceUpdate: !0
  16933. });
  16934. case 12:
  16935. _context42.next = 14;
  16936. return t.encryptData(s);
  16937. case 14:
  16938. _r5 = _context42.sent;
  16939. _context42.next = 17;
  16940. return t.platformGetSignOption();
  16941. case 17:
  16942. s._uniCloudOptions = _context42.sent;
  16943. _context42.next = 20;
  16944. return e({
  16945. name: n,
  16946. data: _r5
  16947. });
  16948. case 20:
  16949. i = _context42.sent;
  16950. case 21:
  16951. _context42.next = 23;
  16952. return t.decryptResult(i.result);
  16953. case 23:
  16954. i.result = _context42.sent;
  16955. return _context42.abrupt("return", i);
  16956. case 25:
  16957. case "end":
  16958. return _context42.stop();
  16959. }
  16960. }
  16961. }, _callee42);
  16962. }));
  16963. }
  16964. }]);
  16965. return Vt;
  16966. }();
  16967. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  16968. function Gt(e) {
  16969. return parseInt(e) === e;
  16970. }
  16971. function Yt(e) {
  16972. if (!Gt(e.length)) return !1;
  16973. for (var t = 0; t < e.length; t++) {
  16974. if (!Gt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  16975. }
  16976. return !0;
  16977. }
  16978. function Qt(e, t) {
  16979. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  16980. if (Array.isArray(e)) {
  16981. if (!Yt(e)) throw new Error("Array contains invalid value: " + e);
  16982. return new Uint8Array(e);
  16983. }
  16984. if (Gt(e.length) && Yt(e)) return new Uint8Array(e);
  16985. throw new Error("unsupported array-like object");
  16986. }
  16987. function Xt(e) {
  16988. return new Uint8Array(e);
  16989. }
  16990. function Zt(e, t, n, s, r) {
  16991. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  16992. }
  16993. var en,
  16994. tn = {
  16995. toBytes: function toBytes(e) {
  16996. var t = [],
  16997. n = 0;
  16998. for (e = encodeURI(e); n < e.length;) {
  16999. var s = e.charCodeAt(n++);
  17000. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  17001. }
  17002. return Qt(t);
  17003. },
  17004. fromBytes: function fromBytes(e) {
  17005. for (var t = [], n = 0; n < e.length;) {
  17006. var s = e[n];
  17007. 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);
  17008. }
  17009. return t.join("");
  17010. }
  17011. },
  17012. nn = (en = "0123456789abcdef", {
  17013. toBytes: function toBytes(e) {
  17014. for (var t = [], n = 0; n < e.length; n += 2) {
  17015. t.push(parseInt(e.substr(n, 2), 16));
  17016. }
  17017. return t;
  17018. },
  17019. fromBytes: function fromBytes(e) {
  17020. for (var t = [], n = 0; n < e.length; n++) {
  17021. var s = e[n];
  17022. t.push(en[(240 & s) >> 4] + en[15 & s]);
  17023. }
  17024. return t.join("");
  17025. }
  17026. }),
  17027. sn = {
  17028. 16: 10,
  17029. 24: 12,
  17030. 32: 14
  17031. },
  17032. rn = [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],
  17033. on = [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],
  17034. an = [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],
  17035. cn = [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],
  17036. un = [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],
  17037. ln = [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],
  17038. hn = [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],
  17039. dn = [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],
  17040. pn = [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],
  17041. fn = [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],
  17042. gn = [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],
  17043. mn = [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],
  17044. yn = [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],
  17045. _n = [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],
  17046. wn = [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];
  17047. function vn(e) {
  17048. for (var t = [], n = 0; n < e.length; n += 4) {
  17049. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  17050. }
  17051. return t;
  17052. }
  17053. var In = /*#__PURE__*/function () {
  17054. function In(e) {
  17055. (0, _classCallCheck2.default)(this, In);
  17056. if (!(this instanceof In)) throw Error("AES must be instanitated with `new`");
  17057. Object.defineProperty(this, "key", {
  17058. value: Qt(e, !0)
  17059. }), this._prepare();
  17060. }
  17061. (0, _createClass2.default)(In, [{
  17062. key: "_prepare",
  17063. value: function _prepare() {
  17064. var e = sn[this.key.length];
  17065. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  17066. this._Ke = [], this._Kd = [];
  17067. for (var t = 0; t <= e; t++) {
  17068. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  17069. }
  17070. var n,
  17071. s = 4 * (e + 1),
  17072. r = this.key.length / 4,
  17073. i = vn(this.key);
  17074. for (t = 0; t < r; t++) {
  17075. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  17076. }
  17077. for (var o, a = 0, c = r; c < s;) {
  17078. if (o = i[r - 1], i[0] ^= on[o >> 16 & 255] << 24 ^ on[o >> 8 & 255] << 16 ^ on[255 & o] << 8 ^ on[o >> 24 & 255] ^ rn[a] << 24, a += 1, 8 != r) for (t = 1; t < r; t++) {
  17079. i[t] ^= i[t - 1];
  17080. } else {
  17081. for (t = 1; t < r / 2; t++) {
  17082. i[t] ^= i[t - 1];
  17083. }
  17084. o = i[r / 2 - 1], i[r / 2] ^= on[255 & o] ^ on[o >> 8 & 255] << 8 ^ on[o >> 16 & 255] << 16 ^ on[o >> 24 & 255] << 24;
  17085. for (t = r / 2 + 1; t < r; t++) {
  17086. i[t] ^= i[t - 1];
  17087. }
  17088. }
  17089. for (t = 0; t < r && c < s;) {
  17090. u = c >> 2, l = c % 4, this._Ke[u][l] = i[t], this._Kd[e - u][l] = i[t++], c++;
  17091. }
  17092. }
  17093. for (var u = 1; u < e; u++) {
  17094. for (var l = 0; l < 4; l++) {
  17095. o = this._Kd[u][l], this._Kd[u][l] = mn[o >> 24 & 255] ^ yn[o >> 16 & 255] ^ _n[o >> 8 & 255] ^ wn[255 & o];
  17096. }
  17097. }
  17098. }
  17099. }, {
  17100. key: "encrypt",
  17101. value: function encrypt(e) {
  17102. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  17103. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = vn(e), r = 0; r < 4; r++) {
  17104. s[r] ^= this._Ke[0][r];
  17105. }
  17106. for (var i = 1; i < t; i++) {
  17107. for (r = 0; r < 4; r++) {
  17108. n[r] = cn[s[r] >> 24 & 255] ^ un[s[(r + 1) % 4] >> 16 & 255] ^ ln[s[(r + 2) % 4] >> 8 & 255] ^ hn[255 & s[(r + 3) % 4]] ^ this._Ke[i][r];
  17109. }
  17110. s = n.slice();
  17111. }
  17112. var o,
  17113. a = Xt(16);
  17114. for (r = 0; r < 4; r++) {
  17115. o = this._Ke[t][r], a[4 * r] = 255 & (on[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (on[s[(r + 1) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (on[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (on[255 & s[(r + 3) % 4]] ^ o);
  17116. }
  17117. return a;
  17118. }
  17119. }, {
  17120. key: "decrypt",
  17121. value: function decrypt(e) {
  17122. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  17123. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = vn(e), r = 0; r < 4; r++) {
  17124. s[r] ^= this._Kd[0][r];
  17125. }
  17126. for (var i = 1; i < t; i++) {
  17127. for (r = 0; r < 4; r++) {
  17128. n[r] = dn[s[r] >> 24 & 255] ^ pn[s[(r + 3) % 4] >> 16 & 255] ^ fn[s[(r + 2) % 4] >> 8 & 255] ^ gn[255 & s[(r + 1) % 4]] ^ this._Kd[i][r];
  17129. }
  17130. s = n.slice();
  17131. }
  17132. var o,
  17133. a = Xt(16);
  17134. for (r = 0; r < 4; r++) {
  17135. o = this._Kd[t][r], a[4 * r] = 255 & (an[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (an[s[(r + 3) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (an[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (an[255 & s[(r + 1) % 4]] ^ o);
  17136. }
  17137. return a;
  17138. }
  17139. }]);
  17140. return In;
  17141. }();
  17142. var Sn = /*#__PURE__*/function () {
  17143. function Sn(e) {
  17144. (0, _classCallCheck2.default)(this, Sn);
  17145. if (!(this instanceof Sn)) throw Error("AES must be instanitated with `new`");
  17146. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new In(e);
  17147. }
  17148. (0, _createClass2.default)(Sn, [{
  17149. key: "encrypt",
  17150. value: function encrypt(e) {
  17151. if ((e = Qt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  17152. for (var t = Xt(e.length), n = Xt(16), s = 0; s < e.length; s += 16) {
  17153. Zt(e, n, 0, s, s + 16), Zt(n = this._aes.encrypt(n), t, s);
  17154. }
  17155. return t;
  17156. }
  17157. }, {
  17158. key: "decrypt",
  17159. value: function decrypt(e) {
  17160. if ((e = Qt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  17161. for (var t = Xt(e.length), n = Xt(16), s = 0; s < e.length; s += 16) {
  17162. Zt(e, n, 0, s, s + 16), Zt(n = this._aes.decrypt(n), t, s);
  17163. }
  17164. return t;
  17165. }
  17166. }]);
  17167. return Sn;
  17168. }();
  17169. var bn = /*#__PURE__*/function () {
  17170. function bn(e, t) {
  17171. (0, _classCallCheck2.default)(this, bn);
  17172. if (!(this instanceof bn)) throw Error("AES must be instanitated with `new`");
  17173. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  17174. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  17175. } else t = Xt(16);
  17176. this._lastCipherblock = Qt(t, !0), this._aes = new In(e);
  17177. }
  17178. (0, _createClass2.default)(bn, [{
  17179. key: "encrypt",
  17180. value: function encrypt(e) {
  17181. if ((e = Qt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  17182. for (var t = Xt(e.length), n = Xt(16), s = 0; s < e.length; s += 16) {
  17183. Zt(e, n, 0, s, s + 16);
  17184. for (var r = 0; r < 16; r++) {
  17185. n[r] ^= this._lastCipherblock[r];
  17186. }
  17187. this._lastCipherblock = this._aes.encrypt(n), Zt(this._lastCipherblock, t, s);
  17188. }
  17189. return t;
  17190. }
  17191. }, {
  17192. key: "decrypt",
  17193. value: function decrypt(e) {
  17194. if ((e = Qt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  17195. for (var t = Xt(e.length), n = Xt(16), s = 0; s < e.length; s += 16) {
  17196. Zt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  17197. for (var r = 0; r < 16; r++) {
  17198. t[s + r] = n[r] ^ this._lastCipherblock[r];
  17199. }
  17200. Zt(e, this._lastCipherblock, 0, s, s + 16);
  17201. }
  17202. return t;
  17203. }
  17204. }]);
  17205. return bn;
  17206. }();
  17207. var kn = /*#__PURE__*/function () {
  17208. function kn(e, t, n) {
  17209. (0, _classCallCheck2.default)(this, kn);
  17210. if (!(this instanceof kn)) throw Error("AES must be instanitated with `new`");
  17211. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  17212. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  17213. } else t = Xt(16);
  17214. n || (n = 1), this.segmentSize = n, this._shiftRegister = Qt(t, !0), this._aes = new In(e);
  17215. }
  17216. (0, _createClass2.default)(kn, [{
  17217. key: "encrypt",
  17218. value: function encrypt(e) {
  17219. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  17220. for (var t, n = Qt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  17221. t = this._aes.encrypt(this._shiftRegister);
  17222. for (var r = 0; r < this.segmentSize; r++) {
  17223. n[s + r] ^= t[r];
  17224. }
  17225. Zt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Zt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  17226. }
  17227. return n;
  17228. }
  17229. }, {
  17230. key: "decrypt",
  17231. value: function decrypt(e) {
  17232. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  17233. for (var t, n = Qt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  17234. t = this._aes.encrypt(this._shiftRegister);
  17235. for (var r = 0; r < this.segmentSize; r++) {
  17236. n[s + r] ^= t[r];
  17237. }
  17238. Zt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Zt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  17239. }
  17240. return n;
  17241. }
  17242. }]);
  17243. return kn;
  17244. }();
  17245. var An = /*#__PURE__*/function () {
  17246. function An(e, t) {
  17247. (0, _classCallCheck2.default)(this, An);
  17248. if (!(this instanceof An)) throw Error("AES must be instanitated with `new`");
  17249. if (this.description = "Output Feedback", this.name = "ofb", t) {
  17250. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  17251. } else t = Xt(16);
  17252. this._lastPrecipher = Qt(t, !0), this._lastPrecipherIndex = 16, this._aes = new In(e);
  17253. }
  17254. (0, _createClass2.default)(An, [{
  17255. key: "encrypt",
  17256. value: function encrypt(e) {
  17257. for (var t = Qt(e, !0), n = 0; n < t.length; n++) {
  17258. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  17259. }
  17260. return t;
  17261. }
  17262. }, {
  17263. key: "decrypt",
  17264. value: function decrypt(e) {
  17265. return this.encrypt(e);
  17266. }
  17267. }]);
  17268. return An;
  17269. }();
  17270. var Cn = /*#__PURE__*/function () {
  17271. function Cn(e) {
  17272. (0, _classCallCheck2.default)(this, Cn);
  17273. if (!(this instanceof Cn)) throw Error("Counter must be instanitated with `new`");
  17274. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = Xt(16), this.setValue(e)) : this.setBytes(e);
  17275. }
  17276. (0, _createClass2.default)(Cn, [{
  17277. key: "setValue",
  17278. value: function setValue(e) {
  17279. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  17280. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  17281. for (var t = 15; t >= 0; --t) {
  17282. this._counter[t] = e % 256, e = parseInt(e / 256);
  17283. }
  17284. }
  17285. }, {
  17286. key: "setBytes",
  17287. value: function setBytes(e) {
  17288. if (16 != (e = Qt(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  17289. this._counter = e;
  17290. }
  17291. }, {
  17292. key: "increment",
  17293. value: function increment() {
  17294. for (var e = 15; e >= 0; e--) {
  17295. if (255 !== this._counter[e]) {
  17296. this._counter[e]++;
  17297. break;
  17298. }
  17299. this._counter[e] = 0;
  17300. }
  17301. }
  17302. }]);
  17303. return Cn;
  17304. }();
  17305. var Pn = /*#__PURE__*/function () {
  17306. function Pn(e, t) {
  17307. (0, _classCallCheck2.default)(this, Pn);
  17308. if (!(this instanceof Pn)) throw Error("AES must be instanitated with `new`");
  17309. this.description = "Counter", this.name = "ctr", t instanceof Cn || (t = new Cn(t)), this._counter = t, this._remainingCounter = null, this._remainingCounterIndex = 16, this._aes = new In(e);
  17310. }
  17311. (0, _createClass2.default)(Pn, [{
  17312. key: "encrypt",
  17313. value: function encrypt(e) {
  17314. for (var t = Qt(e, !0), n = 0; n < t.length; n++) {
  17315. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  17316. }
  17317. return t;
  17318. }
  17319. }, {
  17320. key: "decrypt",
  17321. value: function decrypt(e) {
  17322. return this.encrypt(e);
  17323. }
  17324. }]);
  17325. return Pn;
  17326. }();
  17327. var Tn = {
  17328. AES: In,
  17329. Counter: Cn,
  17330. ModeOfOperation: {
  17331. ecb: Sn,
  17332. cbc: bn,
  17333. cfb: kn,
  17334. ofb: An,
  17335. ctr: Pn
  17336. },
  17337. utils: {
  17338. hex: nn,
  17339. utf8: tn
  17340. },
  17341. padding: {
  17342. pkcs7: {
  17343. pad: function pad(e) {
  17344. var t = 16 - (e = Qt(e, !0)).length % 16,
  17345. n = Xt(e.length + t);
  17346. Zt(e, n);
  17347. for (var s = e.length; s < n.length; s++) {
  17348. n[s] = t;
  17349. }
  17350. return n;
  17351. },
  17352. strip: function strip(e) {
  17353. if ((e = Qt(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  17354. var t = e[e.length - 1];
  17355. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  17356. for (var n = e.length - t, s = 0; s < t; s++) {
  17357. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  17358. }
  17359. var r = Xt(n);
  17360. return Zt(e, r, 0, 0, n), r;
  17361. }
  17362. }
  17363. },
  17364. _arrayTest: {
  17365. coerceArray: Qt,
  17366. createArray: Xt,
  17367. copyArray: Zt
  17368. }
  17369. };
  17370. function xn(e, t, n) {
  17371. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  17372. r = Tn.utils.utf8.toBytes(n),
  17373. i = Tn.utils.utf8.toBytes(e),
  17374. o = new Tn.ModeOfOperation.cbc(s, r),
  17375. a = Tn.padding.pkcs7.pad(i),
  17376. c = o.encrypt(a);
  17377. return uni.arrayBufferToBase64(c);
  17378. }
  17379. var On = {
  17380. code: 2e4,
  17381. message: "System error"
  17382. },
  17383. En = {
  17384. code: 20101,
  17385. message: "Invalid client"
  17386. },
  17387. Ln = {
  17388. code: 20102,
  17389. message: "Get encrypt key failed"
  17390. },
  17391. Rn = {
  17392. 10001: "Secure network is not supported on current playground or unimpsdk",
  17393. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  17394. 10009: "Encrypt payload failed",
  17395. 10010: "Decrypt response failed"
  17396. };
  17397. function Un(e) {
  17398. var _ref32 = e || {},
  17399. t = _ref32.errSubject,
  17400. n = _ref32.subject,
  17401. s = _ref32.errCode,
  17402. r = _ref32.errMsg,
  17403. i = _ref32.code,
  17404. o = _ref32.message,
  17405. a = _ref32.cause;
  17406. return new te({
  17407. subject: t || n || "uni-secure-network",
  17408. code: s || i || On.code,
  17409. message: r || o,
  17410. cause: a
  17411. });
  17412. }
  17413. var Nn,
  17414. Dn,
  17415. qn = null;
  17416. var Mn = /*#__PURE__*/function (_Vt) {
  17417. (0, _inherits2.default)(Mn, _Vt);
  17418. var _super8 = _createSuper(Mn);
  17419. function Mn(e) {
  17420. var _this15;
  17421. (0, _classCallCheck2.default)(this, Mn);
  17422. _this15 = _super8.call(this, e), _this15.clientType = "mp-weixin", _this15.userEncryptKey = null;
  17423. return _this15;
  17424. }
  17425. (0, _createClass2.default)(Mn, [{
  17426. key: "isLogin",
  17427. value: function isLogin() {
  17428. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  17429. }
  17430. }, {
  17431. key: "prepare",
  17432. value: function () {
  17433. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  17434. return _regenerator.default.wrap(function _callee43$(_context43) {
  17435. while (1) {
  17436. switch (_context43.prev = _context43.next) {
  17437. case 0:
  17438. if (this.isLogin()) {
  17439. _context43.next = 7;
  17440. break;
  17441. }
  17442. if (this.scopedGlobalCache.initPromise) {
  17443. _context43.next = 3;
  17444. break;
  17445. }
  17446. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  17447. case 3:
  17448. _context43.next = 5;
  17449. return this.scopedGlobalCache.initPromise;
  17450. case 5:
  17451. if (this.isLogin()) {
  17452. _context43.next = 7;
  17453. break;
  17454. }
  17455. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  17456. case 7:
  17457. case "end":
  17458. return _context43.stop();
  17459. }
  17460. }
  17461. }, _callee43, this);
  17462. }));
  17463. function prepare() {
  17464. return _prepare2.apply(this, arguments);
  17465. }
  17466. return prepare;
  17467. }()
  17468. }, {
  17469. key: "getUserEncryptKey",
  17470. value: function () {
  17471. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  17472. var _this16 = this;
  17473. var e;
  17474. return _regenerator.default.wrap(function _callee44$(_context44) {
  17475. while (1) {
  17476. switch (_context44.prev = _context44.next) {
  17477. case 0:
  17478. if (!this.userEncryptKey) {
  17479. _context44.next = 2;
  17480. break;
  17481. }
  17482. return _context44.abrupt("return", this.userEncryptKey);
  17483. case 2:
  17484. if (!(qn && qn.expireTime)) {
  17485. _context44.next = 6;
  17486. break;
  17487. }
  17488. e = Date.now();
  17489. if (!(qn.expireTime - e > 0)) {
  17490. _context44.next = 6;
  17491. break;
  17492. }
  17493. return _context44.abrupt("return", (this.userEncryptKey = qn, this.userEncryptKey));
  17494. case 6:
  17495. return _context44.abrupt("return", new Promise(function (e, t) {
  17496. uni.getUserCryptoManager().getLatestUserKey({
  17497. success: function success(t) {
  17498. qn = t, _this16.userEncryptKey = t, e(_this16.userEncryptKey);
  17499. },
  17500. fail: function fail(e) {
  17501. t(Un(_objectSpread(_objectSpread({}, Ln), {}, {
  17502. cause: e
  17503. })));
  17504. }
  17505. });
  17506. }));
  17507. case 7:
  17508. case "end":
  17509. return _context44.stop();
  17510. }
  17511. }
  17512. }, _callee44, this);
  17513. }));
  17514. function getUserEncryptKey() {
  17515. return _getUserEncryptKey.apply(this, arguments);
  17516. }
  17517. return getUserEncryptKey;
  17518. }()
  17519. }, {
  17520. key: "getWxAppId",
  17521. value: function getWxAppId() {
  17522. return wx.getAccountInfoSync().miniProgram.appId;
  17523. }
  17524. }, {
  17525. key: "platformGetSignOption",
  17526. value: function () {
  17527. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  17528. var _yield$this$getUserEn, e, t, n;
  17529. return _regenerator.default.wrap(function _callee45$(_context45) {
  17530. while (1) {
  17531. switch (_context45.prev = _context45.next) {
  17532. case 0:
  17533. _context45.next = 2;
  17534. return this.getUserEncryptKey();
  17535. case 2:
  17536. _yield$this$getUserEn = _context45.sent;
  17537. e = _yield$this$getUserEn.encryptKey;
  17538. t = _yield$this$getUserEn.iv;
  17539. n = _yield$this$getUserEn.version;
  17540. return _context45.abrupt("return", {
  17541. verifyClientSign: xn(JSON.stringify({
  17542. data: JSON.stringify({}),
  17543. appId: this.appId,
  17544. deviceId: this.deviceId,
  17545. wxAppId: this.getWxAppId(),
  17546. simulator: "devtools" === ae().platform,
  17547. timestamp: Date.now()
  17548. }), e, t),
  17549. encryptKeyId: n,
  17550. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  17551. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  17552. });
  17553. case 7:
  17554. case "end":
  17555. return _context45.stop();
  17556. }
  17557. }
  17558. }, _callee45, this);
  17559. }));
  17560. function platformGetSignOption() {
  17561. return _platformGetSignOption.apply(this, arguments);
  17562. }
  17563. return platformGetSignOption;
  17564. }()
  17565. }, {
  17566. key: "platformEncryptData",
  17567. value: function () {
  17568. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46(e) {
  17569. var _yield$this$getUserEn2, t, n, s, r;
  17570. return _regenerator.default.wrap(function _callee46$(_context46) {
  17571. while (1) {
  17572. switch (_context46.prev = _context46.next) {
  17573. case 0:
  17574. _context46.next = 2;
  17575. return this.getUserEncryptKey();
  17576. case 2:
  17577. _yield$this$getUserEn2 = _context46.sent;
  17578. t = _yield$this$getUserEn2.encryptKey;
  17579. n = _yield$this$getUserEn2.iv;
  17580. s = _yield$this$getUserEn2.version;
  17581. r = {
  17582. secretType: this.secretType,
  17583. encryptKeyId: s,
  17584. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  17585. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  17586. };
  17587. return _context46.abrupt("return", this.secretType === Jt ? {
  17588. content: e,
  17589. _uniCloudOptions: r
  17590. } : {
  17591. content: xn(JSON.stringify({
  17592. data: JSON.stringify(e),
  17593. appId: this.appId,
  17594. deviceId: this.deviceId,
  17595. wxAppId: this.getWxAppId(),
  17596. simulator: "devtools" === ae().platform,
  17597. timestamp: Date.now()
  17598. }), t, n),
  17599. _uniCloudOptions: r
  17600. });
  17601. case 8:
  17602. case "end":
  17603. return _context46.stop();
  17604. }
  17605. }
  17606. }, _callee46, this);
  17607. }));
  17608. function platformEncryptData(_x42) {
  17609. return _platformEncryptData.apply(this, arguments);
  17610. }
  17611. return platformEncryptData;
  17612. }()
  17613. }, {
  17614. key: "platformDecryptResult",
  17615. value: function () {
  17616. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47(e) {
  17617. var t, _yield$this$getUserEn3, n, s;
  17618. return _regenerator.default.wrap(function _callee47$(_context47) {
  17619. while (1) {
  17620. switch (_context47.prev = _context47.next) {
  17621. case 0:
  17622. t = e.content;
  17623. _context47.next = 3;
  17624. return this.getUserEncryptKey();
  17625. case 3:
  17626. _yield$this$getUserEn3 = _context47.sent;
  17627. n = _yield$this$getUserEn3.encryptKey;
  17628. s = _yield$this$getUserEn3.iv;
  17629. return _context47.abrupt("return", JSON.parse(function (e, t, n) {
  17630. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  17631. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  17632. i = Tn.utils.utf8.toBytes(n),
  17633. o = new Tn.ModeOfOperation.cbc(r, i),
  17634. a = Tn.padding.pkcs7.strip(o.decrypt(s));
  17635. return Tn.utils.utf8.fromBytes(a);
  17636. }(t, n, s)));
  17637. case 7:
  17638. case "end":
  17639. return _context47.stop();
  17640. }
  17641. }
  17642. }, _callee47, this);
  17643. }));
  17644. function platformDecryptResult(_x43) {
  17645. return _platformDecryptResult.apply(this, arguments);
  17646. }
  17647. return platformDecryptResult;
  17648. }()
  17649. }, {
  17650. key: "isClientKeyNotFound",
  17651. value: function isClientKeyNotFound() {
  17652. return !1;
  17653. }
  17654. }]);
  17655. return Mn;
  17656. }(Vt);
  17657. function Fn(e) {
  17658. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  17659. n = {};
  17660. var _loop = function _loop(_s13) {
  17661. var r = t[_s13];
  17662. n[r] = function () {
  17663. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  17664. t[_key] = arguments[_key];
  17665. }
  17666. return new Promise(function (n, s) {
  17667. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  17668. var _ref33 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17669. e = _ref33.type,
  17670. t = _ref33.data,
  17671. r = _ref33.errCode,
  17672. i = _ref33.errMsg,
  17673. o = _ref33.errSubject,
  17674. a = _ref33.message;
  17675. "success" === e ? n(t) : s(Un({
  17676. errCode: r,
  17677. errMsg: Rn[r] || i || a,
  17678. errSubject: o
  17679. }));
  17680. }])) : s(Un({
  17681. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  17682. }));
  17683. });
  17684. };
  17685. };
  17686. for (var _s13 = 0; _s13 < t.length; _s13++) {
  17687. _loop(_s13);
  17688. }
  17689. return n;
  17690. }
  17691. var Kn = /*#__PURE__*/function (_Vt2) {
  17692. (0, _inherits2.default)(Kn, _Vt2);
  17693. var _super9 = _createSuper(Kn);
  17694. function Kn(e) {
  17695. var _this17;
  17696. (0, _classCallCheck2.default)(this, Kn);
  17697. _this17 = _super9.call(this, e), _this17.clientType = "app", _this17.appUtils = _objectSpread({}, Fn(uni.requireNativePlugin("plus"))), _this17.systemInfo = Nn || (Nn = ae());
  17698. return _this17;
  17699. }
  17700. (0, _createClass2.default)(Kn, [{
  17701. key: "hasClientKey",
  17702. value: function () {
  17703. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48() {
  17704. return _regenerator.default.wrap(function _callee48$(_context48) {
  17705. while (1) {
  17706. switch (_context48.prev = _context48.next) {
  17707. case 0:
  17708. _context48.next = 2;
  17709. return this.appUtils.hasClientKey({
  17710. provider: this.provider,
  17711. spaceId: this.spaceId
  17712. });
  17713. case 2:
  17714. this._hasClientKey = _context48.sent;
  17715. return _context48.abrupt("return", this._hasClientKey);
  17716. case 4:
  17717. case "end":
  17718. return _context48.stop();
  17719. }
  17720. }
  17721. }, _callee48, this);
  17722. }));
  17723. function hasClientKey() {
  17724. return _hasClientKey.apply(this, arguments);
  17725. }
  17726. return hasClientKey;
  17727. }()
  17728. }, {
  17729. key: "getAppClientKey",
  17730. value: function () {
  17731. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49() {
  17732. var _yield$this$appUtils$, e, t, n, s, r;
  17733. return _regenerator.default.wrap(function _callee49$(_context49) {
  17734. while (1) {
  17735. switch (_context49.prev = _context49.next) {
  17736. case 0:
  17737. _context49.next = 2;
  17738. return this.appUtils.encryptGetClientKeyPayload({
  17739. data: JSON.stringify({})
  17740. });
  17741. case 2:
  17742. _yield$this$appUtils$ = _context49.sent;
  17743. e = _yield$this$appUtils$.data;
  17744. t = _yield$this$appUtils$.key;
  17745. _context49.next = 7;
  17746. return this.uniCloudIns.callFunction({
  17747. name: "DCloud-clientDB",
  17748. data: {
  17749. redirectTo: "encryption",
  17750. action: "getAppClientKey",
  17751. data: e,
  17752. key: t
  17753. }
  17754. });
  17755. case 7:
  17756. _context49.t0 = _context49.sent.result;
  17757. if (_context49.t0) {
  17758. _context49.next = 10;
  17759. break;
  17760. }
  17761. _context49.t0 = {};
  17762. case 10:
  17763. n = _context49.t0;
  17764. if (!(0 !== n.errCode)) {
  17765. _context49.next = 13;
  17766. break;
  17767. }
  17768. throw function (e) {
  17769. return new te({
  17770. subject: e.errSubject || "uni-secure-network",
  17771. code: e.errCode || e.code || On.code,
  17772. message: e.errMsg || e.message
  17773. });
  17774. }(n);
  17775. case 13:
  17776. s = n.clientKey, r = n.key;
  17777. _context49.next = 16;
  17778. return this.appUtils.setClientKey({
  17779. provider: this.provider,
  17780. spaceId: this.spaceId,
  17781. clientKey: s,
  17782. key: r
  17783. });
  17784. case 16:
  17785. case "end":
  17786. return _context49.stop();
  17787. }
  17788. }
  17789. }, _callee49, this);
  17790. }));
  17791. function getAppClientKey() {
  17792. return _getAppClientKey.apply(this, arguments);
  17793. }
  17794. return getAppClientKey;
  17795. }()
  17796. }, {
  17797. key: "ensureClientKey",
  17798. value: function () {
  17799. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  17800. var _this18 = this;
  17801. var _ref34,
  17802. _ref34$forceUpdate,
  17803. e,
  17804. _args50 = arguments;
  17805. return _regenerator.default.wrap(function _callee50$(_context50) {
  17806. while (1) {
  17807. switch (_context50.prev = _context50.next) {
  17808. case 0:
  17809. _ref34 = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {}, _ref34$forceUpdate = _ref34.forceUpdate, e = _ref34$forceUpdate === void 0 ? !1 : _ref34$forceUpdate;
  17810. _context50.t1 = !0;
  17811. _context50.next = 4;
  17812. return this.hasClientKey();
  17813. case 4:
  17814. _context50.t2 = _context50.sent;
  17815. _context50.t0 = _context50.t1 !== _context50.t2;
  17816. if (_context50.t0) {
  17817. _context50.next = 8;
  17818. break;
  17819. }
  17820. _context50.t0 = e;
  17821. case 8:
  17822. if (!_context50.t0) {
  17823. _context50.next = 10;
  17824. break;
  17825. }
  17826. return _context50.abrupt("return", (e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus === h || !e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus !== p || (this.scopedGlobalCache.initPromise = this.getAppClientKey(), this.scopedGlobalCache.initPromise.then(function (e) {
  17827. _this18.scopedGlobalCache.initStatus = d;
  17828. }).catch(function (e) {
  17829. throw _this18.scopedGlobalCache.initStatus = p, e;
  17830. }), this.scopedGlobalCache.initStatus = h), this.scopedGlobalCache.initPromise));
  17831. case 10:
  17832. case "end":
  17833. return _context50.stop();
  17834. }
  17835. }
  17836. }, _callee50, this);
  17837. }));
  17838. function ensureClientKey() {
  17839. return _ensureClientKey.apply(this, arguments);
  17840. }
  17841. return ensureClientKey;
  17842. }()
  17843. }, {
  17844. key: "prepare",
  17845. value: function () {
  17846. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  17847. var _ref35,
  17848. _ref35$forceUpdate,
  17849. e,
  17850. _args51 = arguments;
  17851. return _regenerator.default.wrap(function _callee51$(_context51) {
  17852. while (1) {
  17853. switch (_context51.prev = _context51.next) {
  17854. case 0:
  17855. _ref35 = _args51.length > 0 && _args51[0] !== undefined ? _args51[0] : {}, _ref35$forceUpdate = _ref35.forceUpdate, e = _ref35$forceUpdate === void 0 ? !1 : _ref35$forceUpdate;
  17856. _context51.next = 3;
  17857. return this.ensureClientKey({
  17858. forceUpdate: e
  17859. });
  17860. case 3:
  17861. case "end":
  17862. return _context51.stop();
  17863. }
  17864. }
  17865. }, _callee51, this);
  17866. }));
  17867. function prepare() {
  17868. return _prepare3.apply(this, arguments);
  17869. }
  17870. return prepare;
  17871. }()
  17872. }, {
  17873. key: "platformGetSignOption",
  17874. value: function () {
  17875. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  17876. var _yield$this$appUtils$2, e, t;
  17877. return _regenerator.default.wrap(function _callee52$(_context52) {
  17878. while (1) {
  17879. switch (_context52.prev = _context52.next) {
  17880. case 0:
  17881. _context52.next = 2;
  17882. return this.appUtils.encrypt({
  17883. provider: this.provider,
  17884. spaceId: this.spaceId,
  17885. data: JSON.stringify({})
  17886. });
  17887. case 2:
  17888. _yield$this$appUtils$2 = _context52.sent;
  17889. e = _yield$this$appUtils$2.data;
  17890. t = _yield$this$appUtils$2.key;
  17891. return _context52.abrupt("return", {
  17892. verifyClientSign: e,
  17893. encryptKeyId: t
  17894. });
  17895. case 6:
  17896. case "end":
  17897. return _context52.stop();
  17898. }
  17899. }
  17900. }, _callee52, this);
  17901. }));
  17902. function platformGetSignOption() {
  17903. return _platformGetSignOption2.apply(this, arguments);
  17904. }
  17905. return platformGetSignOption;
  17906. }()
  17907. }, {
  17908. key: "platformEncryptData",
  17909. value: function () {
  17910. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53(e) {
  17911. var _yield$this$appUtils$3, t, n, s;
  17912. return _regenerator.default.wrap(function _callee53$(_context53) {
  17913. while (1) {
  17914. switch (_context53.prev = _context53.next) {
  17915. case 0:
  17916. _context53.next = 2;
  17917. return this.appUtils.encrypt({
  17918. provider: this.provider,
  17919. spaceId: this.spaceId,
  17920. data: JSON.stringify(e)
  17921. });
  17922. case 2:
  17923. _yield$this$appUtils$3 = _context53.sent;
  17924. t = _yield$this$appUtils$3.data;
  17925. n = _yield$this$appUtils$3.key;
  17926. s = {
  17927. secretType: this.secretType,
  17928. encryptKeyId: n
  17929. };
  17930. return _context53.abrupt("return", this.secretType === Jt ? {
  17931. content: e,
  17932. _uniCloudOptions: s
  17933. } : {
  17934. content: t,
  17935. _uniCloudOptions: s
  17936. });
  17937. case 7:
  17938. case "end":
  17939. return _context53.stop();
  17940. }
  17941. }
  17942. }, _callee53, this);
  17943. }));
  17944. function platformEncryptData(_x44) {
  17945. return _platformEncryptData2.apply(this, arguments);
  17946. }
  17947. return platformEncryptData;
  17948. }()
  17949. }, {
  17950. key: "platformDecryptResult",
  17951. value: function () {
  17952. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54(e) {
  17953. var t, _e$_uniCloudOptions, n, s, r;
  17954. return _regenerator.default.wrap(function _callee54$(_context54) {
  17955. while (1) {
  17956. switch (_context54.prev = _context54.next) {
  17957. case 0:
  17958. t = e.content;
  17959. _e$_uniCloudOptions = e._uniCloudOptions;
  17960. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  17961. s = n.encryptKeyId;
  17962. _context54.next = 6;
  17963. return this.appUtils.decrypt({
  17964. provider: this.provider,
  17965. spaceId: this.spaceId,
  17966. data: t,
  17967. key: s
  17968. });
  17969. case 6:
  17970. r = _context54.sent;
  17971. return _context54.abrupt("return", JSON.parse(r.data));
  17972. case 8:
  17973. case "end":
  17974. return _context54.stop();
  17975. }
  17976. }
  17977. }, _callee54, this);
  17978. }));
  17979. function platformDecryptResult(_x45) {
  17980. return _platformDecryptResult2.apply(this, arguments);
  17981. }
  17982. return platformDecryptResult;
  17983. }()
  17984. }, {
  17985. key: "isClientKeyNotFound",
  17986. value: function isClientKeyNotFound() {
  17987. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17988. var t = e.result || {};
  17989. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  17990. }
  17991. }]);
  17992. return Kn;
  17993. }(Vt);
  17994. function jn() {
  17995. var _ref36 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17996. e = _ref36.secretType;
  17997. return e === Ht || e === Jt || e === zt;
  17998. }
  17999. function $n() {
  18000. var _ref37 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18001. e = _ref37.name,
  18002. _ref37$data = _ref37.data,
  18003. t = _ref37$data === void 0 ? {} : _ref37$data;
  18004. return "app" === C && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  18005. }
  18006. function Bn() {
  18007. var _ref38 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18008. e = _ref38.provider,
  18009. t = _ref38.spaceId,
  18010. n = _ref38.functionName;
  18011. var _ae = ae(),
  18012. s = _ae.appId,
  18013. r = _ae.uniPlatform,
  18014. i = _ae.osName;
  18015. var o = r;
  18016. "app" === r && (o = i);
  18017. var a = function () {
  18018. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18019. e = _ref39.provider,
  18020. t = _ref39.spaceId;
  18021. var n = A;
  18022. if (!n) return {};
  18023. e = function (e) {
  18024. return "tencent" === e ? "tcb" : e;
  18025. }(e);
  18026. var s = n.find(function (n) {
  18027. return n.provider === e && n.spaceId === t;
  18028. });
  18029. return s && s.config;
  18030. }({
  18031. provider: e,
  18032. spaceId: t
  18033. });
  18034. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  18035. var c = a.accessControl.function || {},
  18036. u = Object.keys(c);
  18037. if (0 === u.length) return !0;
  18038. var l = function (e, t) {
  18039. var n, s, r;
  18040. for (var _i2 = 0; _i2 < e.length; _i2++) {
  18041. var _o2 = e[_i2];
  18042. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  18043. return e.trim();
  18044. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  18045. }
  18046. return n || s || r;
  18047. }(u, n);
  18048. if (!l) return !1;
  18049. if ((c[l] || []).find(function () {
  18050. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  18051. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  18052. })) return !0;
  18053. 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")), Un(En);
  18054. }
  18055. function Wn(_ref40) {
  18056. var e = _ref40.functionName,
  18057. t = _ref40.result,
  18058. n = _ref40.logPvd;
  18059. if (S && this.__dev__.debugLog && t && t.requestId) {
  18060. var _s14 = JSON.stringify({
  18061. spaceId: this.config.spaceId,
  18062. functionName: e,
  18063. requestId: t.requestId
  18064. });
  18065. console.log("[".concat(n, "-request]").concat(_s14, "[/").concat(n, "-request]"));
  18066. }
  18067. }
  18068. function Hn(e) {
  18069. var t = e.callFunction,
  18070. n = function n(_n9) {
  18071. var _this19 = this;
  18072. var s = _n9.name;
  18073. _n9.data = Mt.call(e, {
  18074. data: _n9.data
  18075. });
  18076. var r = {
  18077. aliyun: "aliyun",
  18078. tencent: "tcb",
  18079. tcb: "tcb",
  18080. alipay: "alipay",
  18081. dcloud: "dcloud"
  18082. }[this.config.provider],
  18083. i = jn(_n9),
  18084. o = $n(_n9),
  18085. a = i || o;
  18086. return t.call(this, _n9).then(function (e) {
  18087. return e.errCode = 0, !a && Wn.call(_this19, {
  18088. functionName: s,
  18089. result: e,
  18090. logPvd: r
  18091. }), Promise.resolve(e);
  18092. }, function (e) {
  18093. return !a && Wn.call(_this19, {
  18094. functionName: s,
  18095. result: e,
  18096. logPvd: r
  18097. }), e && e.message && (e.message = function () {
  18098. var _ref41 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18099. _ref41$message = _ref41.message,
  18100. e = _ref41$message === void 0 ? "" : _ref41$message,
  18101. _ref41$extraInfo = _ref41.extraInfo,
  18102. t = _ref41$extraInfo === void 0 ? {} : _ref41$extraInfo,
  18103. _ref41$formatter = _ref41.formatter,
  18104. n = _ref41$formatter === void 0 ? [] : _ref41$formatter;
  18105. for (var _s15 = 0; _s15 < n.length; _s15++) {
  18106. var _n$_s = n[_s15],
  18107. _r6 = _n$_s.rule,
  18108. _i3 = _n$_s.content,
  18109. _o3 = _n$_s.mode,
  18110. _a = e.match(_r6);
  18111. if (!_a) continue;
  18112. var _c = _i3;
  18113. for (var _e19 = 1; _e19 < _a.length; _e19++) {
  18114. _c = Bt(_c, "{$".concat(_e19, "}"), _a[_e19]);
  18115. }
  18116. for (var _e20 in t) {
  18117. _c = Bt(_c, "{".concat(_e20, "}"), t[_e20]);
  18118. }
  18119. return "replace" === _o3 ? _c : e + _c;
  18120. }
  18121. return e;
  18122. }({
  18123. message: "[".concat(_n9.name, "]: ").concat(e.message),
  18124. formatter: Kt,
  18125. extraInfo: {
  18126. functionName: s
  18127. }
  18128. })), Promise.reject(e);
  18129. });
  18130. };
  18131. e.callFunction = function (t) {
  18132. var _e$config = e.config,
  18133. s = _e$config.provider,
  18134. r = _e$config.spaceId,
  18135. i = t.name;
  18136. var o, a;
  18137. if (t.data = t.data || {}, S && e.__dev__.debugInfo && !e.__dev__.debugInfo.forceRemote && T ? (e._callCloudFunction || (e._callCloudFunction = n, e._callLocalFunction = Ft), o = Ft) : o = n, o = o.bind(e), $n(t)) a = n.call(e, t);else if (function (_ref42) {
  18138. var e = _ref42.name,
  18139. _ref42$data = _ref42.data,
  18140. t = _ref42$data === void 0 ? {} : _ref42$data;
  18141. return "mp-weixin" === C && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  18142. }(t)) a = o.call(e, t);else if (jn(t)) {
  18143. a = new Dn({
  18144. secretType: t.secretType,
  18145. uniCloudIns: e
  18146. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  18147. } else if (Bn({
  18148. provider: s,
  18149. spaceId: r,
  18150. functionName: i
  18151. })) {
  18152. a = new Dn({
  18153. secretType: t.secretType,
  18154. uniCloudIns: e
  18155. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  18156. } else a = o(t);
  18157. return Object.defineProperty(a, "result", {
  18158. get: function get() {
  18159. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  18160. }
  18161. }), a.then(function (e) {
  18162. return "undefined" != typeof UTSJSONObject && (e.result = new UTSJSONObject(e.result)), e;
  18163. });
  18164. };
  18165. }
  18166. Dn = "mp-weixin" !== C && "app" !== C ? /*#__PURE__*/function () {
  18167. function _class2() {
  18168. (0, _classCallCheck2.default)(this, _class2);
  18169. throw Un({
  18170. message: "Platform ".concat(C, " is not supported by secure network")
  18171. });
  18172. }
  18173. return (0, _createClass2.default)(_class2);
  18174. }() : k ? "mp-weixin" === C ? Mn : Kn : /*#__PURE__*/function () {
  18175. function _class3() {
  18176. (0, _classCallCheck2.default)(this, _class3);
  18177. throw Un({
  18178. message: "Platform ".concat(C, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  18179. });
  18180. }
  18181. return (0, _createClass2.default)(_class3);
  18182. }();
  18183. var Jn = Symbol("CLIENT_DB_INTERNAL");
  18184. function zn(e, t) {
  18185. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Jn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  18186. get: function get(e, n, s) {
  18187. if ("_uniClient" === n) return null;
  18188. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  18189. if (n in e || "string" != typeof n) {
  18190. var _t12 = e[n];
  18191. return "function" == typeof _t12 ? _t12.bind(e) : _t12;
  18192. }
  18193. return t.get(e, n, s);
  18194. }
  18195. });
  18196. }
  18197. function Vn(e) {
  18198. return {
  18199. on: function on(t, n) {
  18200. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  18201. },
  18202. off: function off(t, n) {
  18203. e[t] = e[t] || [];
  18204. var s = e[t].indexOf(n);
  18205. -1 !== s && e[t].splice(s, 1);
  18206. }
  18207. };
  18208. }
  18209. var Gn = ["db.Geo", "db.command", "command.aggregate"];
  18210. function Yn(e, t) {
  18211. return Gn.indexOf("".concat(e, ".").concat(t)) > -1;
  18212. }
  18213. function Qn(e) {
  18214. switch (f(e)) {
  18215. case "array":
  18216. return e.map(function (e) {
  18217. return Qn(e);
  18218. });
  18219. case "object":
  18220. return e._internalType === Jn || Object.keys(e).forEach(function (t) {
  18221. e[t] = Qn(e[t]);
  18222. }), e;
  18223. case "regexp":
  18224. return {
  18225. $regexp: {
  18226. source: e.source,
  18227. flags: e.flags
  18228. }
  18229. };
  18230. case "date":
  18231. return {
  18232. $date: e.toISOString()
  18233. };
  18234. default:
  18235. return e;
  18236. }
  18237. }
  18238. function Xn(e) {
  18239. return e && e.content && e.content.$method;
  18240. }
  18241. var Zn = /*#__PURE__*/function () {
  18242. function Zn(e, t, n) {
  18243. (0, _classCallCheck2.default)(this, Zn);
  18244. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  18245. }
  18246. (0, _createClass2.default)(Zn, [{
  18247. key: "toJSON",
  18248. value: function toJSON() {
  18249. var e = this;
  18250. var t = [e.content];
  18251. for (; e.prevStage;) {
  18252. e = e.prevStage, t.push(e.content);
  18253. }
  18254. return {
  18255. $db: t.reverse().map(function (e) {
  18256. return {
  18257. $method: e.$method,
  18258. $param: Qn(e.$param)
  18259. };
  18260. })
  18261. };
  18262. }
  18263. }, {
  18264. key: "toString",
  18265. value: function toString() {
  18266. return JSON.stringify(this.toJSON());
  18267. }
  18268. }, {
  18269. key: "getAction",
  18270. value: function getAction() {
  18271. var e = this.toJSON().$db.find(function (e) {
  18272. return "action" === e.$method;
  18273. });
  18274. return e && e.$param && e.$param[0];
  18275. }
  18276. }, {
  18277. key: "getCommand",
  18278. value: function getCommand() {
  18279. return {
  18280. $db: this.toJSON().$db.filter(function (e) {
  18281. return "action" !== e.$method;
  18282. })
  18283. };
  18284. }
  18285. }, {
  18286. key: "isAggregate",
  18287. get: function get() {
  18288. var e = this;
  18289. for (; e;) {
  18290. var t = Xn(e),
  18291. _n10 = Xn(e.prevStage);
  18292. if ("aggregate" === t && "collection" === _n10 || "pipeline" === t) return !0;
  18293. e = e.prevStage;
  18294. }
  18295. return !1;
  18296. }
  18297. }, {
  18298. key: "isCommand",
  18299. get: function get() {
  18300. var e = this;
  18301. for (; e;) {
  18302. if ("command" === Xn(e)) return !0;
  18303. e = e.prevStage;
  18304. }
  18305. return !1;
  18306. }
  18307. }, {
  18308. key: "isAggregateCommand",
  18309. get: function get() {
  18310. var e = this;
  18311. for (; e;) {
  18312. var t = Xn(e),
  18313. _n11 = Xn(e.prevStage);
  18314. if ("aggregate" === t && "command" === _n11) return !0;
  18315. e = e.prevStage;
  18316. }
  18317. return !1;
  18318. }
  18319. }, {
  18320. key: "getNextStageFn",
  18321. value: function getNextStageFn(e) {
  18322. var t = this;
  18323. return function () {
  18324. return es({
  18325. $method: e,
  18326. $param: Qn(Array.from(arguments))
  18327. }, t, t._database);
  18328. };
  18329. }
  18330. }, {
  18331. key: "count",
  18332. get: function get() {
  18333. return this.isAggregate ? this.getNextStageFn("count") : function () {
  18334. return this._send("count", Array.from(arguments));
  18335. };
  18336. }
  18337. }, {
  18338. key: "remove",
  18339. get: function get() {
  18340. return this.isCommand ? this.getNextStageFn("remove") : function () {
  18341. return this._send("remove", Array.from(arguments));
  18342. };
  18343. }
  18344. }, {
  18345. key: "get",
  18346. value: function get() {
  18347. return this._send("get", Array.from(arguments));
  18348. }
  18349. }, {
  18350. key: "add",
  18351. get: function get() {
  18352. return this.isCommand ? this.getNextStageFn("add") : function () {
  18353. return this._send("add", Array.from(arguments));
  18354. };
  18355. }
  18356. }, {
  18357. key: "update",
  18358. value: function update() {
  18359. return this._send("update", Array.from(arguments));
  18360. }
  18361. }, {
  18362. key: "end",
  18363. value: function end() {
  18364. return this._send("end", Array.from(arguments));
  18365. }
  18366. }, {
  18367. key: "set",
  18368. get: function get() {
  18369. return this.isCommand ? this.getNextStageFn("set") : function () {
  18370. throw new Error("JQL禁止使用set方法");
  18371. };
  18372. }
  18373. }, {
  18374. key: "_send",
  18375. value: function _send(e, t) {
  18376. var n = this.getAction(),
  18377. s = this.getCommand();
  18378. if (s.$db.push({
  18379. $method: e,
  18380. $param: Qn(t)
  18381. }), S) {
  18382. var _e21 = s.$db.find(function (e) {
  18383. return "collection" === e.$method;
  18384. }),
  18385. _t13 = _e21 && _e21.$param;
  18386. _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- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  18387. }
  18388. return this._database._callCloudFunction({
  18389. action: n,
  18390. command: s
  18391. });
  18392. }
  18393. }]);
  18394. return Zn;
  18395. }();
  18396. function es(e, t, n) {
  18397. return zn(new Zn(e, t, n), {
  18398. get: function get(e, t) {
  18399. var s = "db";
  18400. return e && e.content && (s = e.content.$method), Yn(s, t) ? es({
  18401. $method: t
  18402. }, e, n) : function () {
  18403. return es({
  18404. $method: t,
  18405. $param: Qn(Array.from(arguments))
  18406. }, e, n);
  18407. };
  18408. }
  18409. });
  18410. }
  18411. function ts(_ref43) {
  18412. var e = _ref43.path,
  18413. t = _ref43.method;
  18414. return /*#__PURE__*/function () {
  18415. function _class4() {
  18416. (0, _classCallCheck2.default)(this, _class4);
  18417. this.param = Array.from(arguments);
  18418. }
  18419. (0, _createClass2.default)(_class4, [{
  18420. key: "toJSON",
  18421. value: function toJSON() {
  18422. return {
  18423. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  18424. return {
  18425. $method: e
  18426. };
  18427. })), [{
  18428. $method: t,
  18429. $param: this.param
  18430. }])
  18431. };
  18432. }
  18433. }, {
  18434. key: "toString",
  18435. value: function toString() {
  18436. return JSON.stringify(this.toJSON());
  18437. }
  18438. }]);
  18439. return _class4;
  18440. }();
  18441. }
  18442. function ns(e) {
  18443. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18444. return zn(new e(t), {
  18445. get: function get(e, t) {
  18446. return Yn("db", t) ? es({
  18447. $method: t
  18448. }, null, e) : function () {
  18449. return es({
  18450. $method: t,
  18451. $param: Qn(Array.from(arguments))
  18452. }, null, e);
  18453. };
  18454. }
  18455. });
  18456. }
  18457. var ss = /*#__PURE__*/function (_ref44) {
  18458. (0, _inherits2.default)(ss, _ref44);
  18459. var _super10 = _createSuper(ss);
  18460. function ss() {
  18461. (0, _classCallCheck2.default)(this, ss);
  18462. return _super10.apply(this, arguments);
  18463. }
  18464. (0, _createClass2.default)(ss, [{
  18465. key: "_parseResult",
  18466. value: function _parseResult(e) {
  18467. return this._isJQL ? e.result : e;
  18468. }
  18469. }, {
  18470. key: "_callCloudFunction",
  18471. value: function _callCloudFunction(_ref45) {
  18472. var _this20 = this;
  18473. var e = _ref45.action,
  18474. t = _ref45.command,
  18475. n = _ref45.multiCommand,
  18476. s = _ref45.queryList;
  18477. function r(e, t) {
  18478. if (n && s) for (var _n12 = 0; _n12 < s.length; _n12++) {
  18479. var _r7 = s[_n12];
  18480. _r7.udb && "function" == typeof _r7.udb.setResult && (t ? _r7.udb.setResult(t) : _r7.udb.setResult(e.result.dataList[_n12]));
  18481. }
  18482. }
  18483. var i = this,
  18484. o = this._isJQL ? "databaseForJQL" : "database";
  18485. function a(e) {
  18486. return i._callback("error", [e]), q(M(o, "fail"), e).then(function () {
  18487. return q(M(o, "complete"), e);
  18488. }).then(function () {
  18489. return r(null, e), Y(j, {
  18490. type: W,
  18491. content: e
  18492. }), Promise.reject(e);
  18493. });
  18494. }
  18495. var c = q(M(o, "invoke")),
  18496. u = this._uniClient;
  18497. return c.then(function () {
  18498. return u.callFunction({
  18499. name: "DCloud-clientDB",
  18500. type: l,
  18501. data: {
  18502. action: e,
  18503. command: t,
  18504. multiCommand: n
  18505. }
  18506. });
  18507. }).then(function (e) {
  18508. var _e$result = e.result,
  18509. t = _e$result.code,
  18510. n = _e$result.message,
  18511. s = _e$result.token,
  18512. c = _e$result.tokenExpired,
  18513. _e$result$systemInfo = _e$result.systemInfo,
  18514. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  18515. if (u) for (var _e22 = 0; _e22 < u.length; _e22++) {
  18516. var _u$_e = u[_e22],
  18517. _t14 = _u$_e.level,
  18518. _n13 = _u$_e.message,
  18519. _s16 = _u$_e.detail,
  18520. _r8 = console["app" === C && "warn" === _t14 ? "error" : _t14] || console.log;
  18521. var _i4 = "[System Info]" + _n13;
  18522. _s16 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s16)), _r8(_i4);
  18523. }
  18524. if (t) {
  18525. return a(new te({
  18526. code: t,
  18527. message: n,
  18528. requestId: e.requestId
  18529. }));
  18530. }
  18531. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (re({
  18532. token: s,
  18533. tokenExpired: c
  18534. }), _this20._callbackAuth("refreshToken", [{
  18535. token: s,
  18536. tokenExpired: c
  18537. }]), _this20._callback("refreshToken", [{
  18538. token: s,
  18539. tokenExpired: c
  18540. }]), Y(B, {
  18541. token: s,
  18542. tokenExpired: c
  18543. }));
  18544. var l = [{
  18545. prop: "affectedDocs",
  18546. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  18547. }, {
  18548. prop: "code",
  18549. tips: "code不再推荐使用,请使用errCode替代"
  18550. }, {
  18551. prop: "message",
  18552. tips: "message不再推荐使用,请使用errMsg替代"
  18553. }];
  18554. var _loop2 = function _loop2(_t15) {
  18555. var _l$_t = l[_t15],
  18556. n = _l$_t.prop,
  18557. s = _l$_t.tips;
  18558. if (n in e.result) {
  18559. var _t16 = e.result[n];
  18560. Object.defineProperty(e.result, n, {
  18561. get: function get() {
  18562. return console.warn(s), _t16;
  18563. }
  18564. });
  18565. }
  18566. };
  18567. for (var _t15 = 0; _t15 < l.length; _t15++) {
  18568. _loop2(_t15);
  18569. }
  18570. return function (e) {
  18571. return q(M(o, "success"), e).then(function () {
  18572. return q(M(o, "complete"), e);
  18573. }).then(function () {
  18574. r(e, null);
  18575. var t = i._parseResult(e);
  18576. return Y(j, {
  18577. type: W,
  18578. content: t
  18579. }), Promise.resolve(t);
  18580. });
  18581. }(e);
  18582. }, function (e) {
  18583. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  18584. return a(new te({
  18585. code: e.code || "SYSTEM_ERROR",
  18586. message: e.message,
  18587. requestId: e.requestId
  18588. }));
  18589. });
  18590. }
  18591. }]);
  18592. return ss;
  18593. }( /*#__PURE__*/function () {
  18594. function _class5() {
  18595. var _ref46 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18596. _ref46$uniClient = _ref46.uniClient,
  18597. e = _ref46$uniClient === void 0 ? {} : _ref46$uniClient,
  18598. _ref46$isJQL = _ref46.isJQL,
  18599. t = _ref46$isJQL === void 0 ? !1 : _ref46$isJQL;
  18600. (0, _classCallCheck2.default)(this, _class5);
  18601. this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t || (this.auth = Vn(this._authCallBacks)), this._isJQL = t, Object.assign(this, Vn(this._dbCallBacks)), this.env = zn({}, {
  18602. get: function get(e, t) {
  18603. return {
  18604. $env: t
  18605. };
  18606. }
  18607. }), this.Geo = zn({}, {
  18608. get: function get(e, t) {
  18609. return ts({
  18610. path: ["Geo"],
  18611. method: t
  18612. });
  18613. }
  18614. }), this.serverDate = ts({
  18615. path: [],
  18616. method: "serverDate"
  18617. }), this.RegExp = ts({
  18618. path: [],
  18619. method: "RegExp"
  18620. });
  18621. }
  18622. (0, _createClass2.default)(_class5, [{
  18623. key: "getCloudEnv",
  18624. value: function getCloudEnv(e) {
  18625. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  18626. return {
  18627. $env: e.replace("$cloudEnv_", "")
  18628. };
  18629. }
  18630. }, {
  18631. key: "_callback",
  18632. value: function _callback(e, t) {
  18633. var n = this._dbCallBacks;
  18634. n[e] && n[e].forEach(function (e) {
  18635. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  18636. });
  18637. }
  18638. }, {
  18639. key: "_callbackAuth",
  18640. value: function _callbackAuth(e, t) {
  18641. var n = this._authCallBacks;
  18642. n[e] && n[e].forEach(function (e) {
  18643. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  18644. });
  18645. }
  18646. }, {
  18647. key: "multiSend",
  18648. value: function multiSend() {
  18649. var e = Array.from(arguments),
  18650. t = e.map(function (e) {
  18651. var t = e.getAction(),
  18652. n = e.getCommand();
  18653. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  18654. return {
  18655. action: t,
  18656. command: n
  18657. };
  18658. });
  18659. return this._callCloudFunction({
  18660. multiCommand: t,
  18661. queryList: e
  18662. });
  18663. }
  18664. }]);
  18665. return _class5;
  18666. }());
  18667. var rs = "token无效,跳转登录页面",
  18668. is = "token过期,跳转登录页面",
  18669. os = {
  18670. TOKEN_INVALID_TOKEN_EXPIRED: is,
  18671. TOKEN_INVALID_INVALID_CLIENTID: rs,
  18672. TOKEN_INVALID: rs,
  18673. TOKEN_INVALID_WRONG_TOKEN: rs,
  18674. TOKEN_INVALID_ANONYMOUS_USER: rs
  18675. },
  18676. as = {
  18677. "uni-id-token-expired": is,
  18678. "uni-id-check-token-failed": rs,
  18679. "uni-id-token-not-exist": rs,
  18680. "uni-id-check-device-feature-failed": rs
  18681. };
  18682. function cs(e, t) {
  18683. var n = "";
  18684. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  18685. }
  18686. function us() {
  18687. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  18688. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  18689. var n = [],
  18690. s = [];
  18691. return e.forEach(function (e) {
  18692. !0 === e.needLogin ? n.push(cs(t, e.path)) : !1 === e.needLogin && s.push(cs(t, e.path));
  18693. }), {
  18694. needLoginPage: n,
  18695. notNeedLoginPage: s
  18696. };
  18697. }
  18698. function ls(e) {
  18699. return e.split("?")[0].replace(/^\//, "");
  18700. }
  18701. function hs() {
  18702. return function (e) {
  18703. var t = e && e.$page && e.$page.fullPath || "";
  18704. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  18705. }(function () {
  18706. var e = getCurrentPages();
  18707. return e[e.length - 1];
  18708. }());
  18709. }
  18710. function ds() {
  18711. return ls(hs());
  18712. }
  18713. function ps() {
  18714. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  18715. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18716. if (!e) return !1;
  18717. if (!(t && t.list && t.list.length)) return !1;
  18718. var n = t.list,
  18719. s = ls(e);
  18720. return n.some(function (e) {
  18721. return e.pagePath === s;
  18722. });
  18723. }
  18724. var fs = !!_pages.default.uniIdRouter;
  18725. var _ref47 = function () {
  18726. var _ref28 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  18727. _ref28$pages = _ref28.pages,
  18728. t = _ref28$pages === void 0 ? [] : _ref28$pages,
  18729. _ref28$subPackages = _ref28.subPackages,
  18730. n = _ref28$subPackages === void 0 ? [] : _ref28$subPackages,
  18731. _ref28$uniIdRouter = _ref28.uniIdRouter,
  18732. s = _ref28$uniIdRouter === void 0 ? {} : _ref28$uniIdRouter,
  18733. _ref28$tabBar = _ref28.tabBar,
  18734. r = _ref28$tabBar === void 0 ? {} : _ref28$tabBar;
  18735. var i = s.loginPage,
  18736. _s$needLogin = s.needLogin,
  18737. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  18738. _s$resToLogin = s.resToLogin,
  18739. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  18740. _us = us(t),
  18741. c = _us.needLoginPage,
  18742. u = _us.notNeedLoginPage,
  18743. _ref30 = function () {
  18744. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  18745. var t = [],
  18746. n = [];
  18747. return e.forEach(function (e) {
  18748. var s = e.root,
  18749. _e$pages = e.pages,
  18750. r = _e$pages === void 0 ? [] : _e$pages,
  18751. _us2 = us(r, s),
  18752. i = _us2.needLoginPage,
  18753. o = _us2.notNeedLoginPage;
  18754. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  18755. }), {
  18756. needLoginPage: t,
  18757. notNeedLoginPage: n
  18758. };
  18759. }(n),
  18760. l = _ref30.needLoginPage,
  18761. h = _ref30.notNeedLoginPage;
  18762. return {
  18763. loginPage: i,
  18764. routerNeedLogin: o,
  18765. resToLogin: a,
  18766. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(l)),
  18767. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(h)),
  18768. loginPageInTabBar: ps(i, r)
  18769. };
  18770. }(),
  18771. gs = _ref47.loginPage,
  18772. ms = _ref47.routerNeedLogin,
  18773. ys = _ref47.resToLogin,
  18774. _s = _ref47.needLoginPage,
  18775. ws = _ref47.notNeedLoginPage,
  18776. vs = _ref47.loginPageInTabBar;
  18777. if (_s.indexOf(gs) > -1) throw new Error("Login page [".concat(gs, "] should not be \"needLogin\", please check your pages.json"));
  18778. function Is(e) {
  18779. var t = ds();
  18780. if ("/" === e.charAt(0)) return e;
  18781. var _e$split = e.split("?"),
  18782. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  18783. n = _e$split2[0],
  18784. s = _e$split2[1],
  18785. r = n.replace(/^\//, "").split("/"),
  18786. i = t.split("/");
  18787. i.pop();
  18788. for (var _e23 = 0; _e23 < r.length; _e23++) {
  18789. var _t17 = r[_e23];
  18790. ".." === _t17 ? i.pop() : "." !== _t17 && i.push(_t17);
  18791. }
  18792. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  18793. }
  18794. function Ss(e) {
  18795. var t = ls(Is(e));
  18796. return !(ws.indexOf(t) > -1) && (_s.indexOf(t) > -1 || ms.some(function (t) {
  18797. return function (e, t) {
  18798. return new RegExp(t).test(e);
  18799. }(e, t);
  18800. }));
  18801. }
  18802. function bs(_ref48) {
  18803. var e = _ref48.redirect;
  18804. var t = ls(e),
  18805. n = ls(gs);
  18806. return ds() !== n && t !== n;
  18807. }
  18808. function ks() {
  18809. var _ref49 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18810. e = _ref49.api,
  18811. t = _ref49.redirect;
  18812. if (!t || !bs({
  18813. redirect: t
  18814. })) return;
  18815. var n = function (e, t) {
  18816. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  18817. }(gs, t);
  18818. vs ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  18819. var s = {
  18820. navigateTo: uni.navigateTo,
  18821. redirectTo: uni.redirectTo,
  18822. switchTab: uni.switchTab,
  18823. reLaunch: uni.reLaunch
  18824. };
  18825. setTimeout(function () {
  18826. s[e]({
  18827. url: n
  18828. });
  18829. }, 0);
  18830. }
  18831. function As() {
  18832. var _ref50 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18833. e = _ref50.url;
  18834. var t = {
  18835. abortLoginPageJump: !1,
  18836. autoToLoginPage: !1
  18837. },
  18838. n = function () {
  18839. var _se4 = se(),
  18840. e = _se4.token,
  18841. t = _se4.tokenExpired;
  18842. var n;
  18843. if (e) {
  18844. if (t < Date.now()) {
  18845. var _e24 = "uni-id-token-expired";
  18846. n = {
  18847. errCode: _e24,
  18848. errMsg: as[_e24]
  18849. };
  18850. }
  18851. } else {
  18852. var _e25 = "uni-id-check-token-failed";
  18853. n = {
  18854. errCode: _e25,
  18855. errMsg: as[_e25]
  18856. };
  18857. }
  18858. return n;
  18859. }();
  18860. if (Ss(e) && n) {
  18861. n.uniIdRedirectUrl = e;
  18862. if (z($).length > 0) return setTimeout(function () {
  18863. Y($, n);
  18864. }, 0), t.abortLoginPageJump = !0, t;
  18865. t.autoToLoginPage = !0;
  18866. }
  18867. return t;
  18868. }
  18869. function Cs() {
  18870. !function () {
  18871. var e = hs(),
  18872. _As = As({
  18873. url: e
  18874. }),
  18875. t = _As.abortLoginPageJump,
  18876. n = _As.autoToLoginPage;
  18877. t || n && ks({
  18878. api: "redirectTo",
  18879. redirect: e
  18880. });
  18881. }();
  18882. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  18883. var _loop3 = function _loop3(_t18) {
  18884. var n = e[_t18];
  18885. uni.addInterceptor(n, {
  18886. invoke: function invoke(e) {
  18887. var _As2 = As({
  18888. url: e.url
  18889. }),
  18890. t = _As2.abortLoginPageJump,
  18891. s = _As2.autoToLoginPage;
  18892. return t ? e : s ? (ks({
  18893. api: n,
  18894. redirect: Is(e.url)
  18895. }), !1) : e;
  18896. }
  18897. });
  18898. };
  18899. for (var _t18 = 0; _t18 < e.length; _t18++) {
  18900. _loop3(_t18);
  18901. }
  18902. }
  18903. function Ps() {
  18904. this.onResponse(function (e) {
  18905. var t = e.type,
  18906. n = e.content;
  18907. var s = !1;
  18908. switch (t) {
  18909. case "cloudobject":
  18910. s = function (e) {
  18911. if ("object" != (0, _typeof2.default)(e)) return !1;
  18912. var _ref51 = e || {},
  18913. t = _ref51.errCode;
  18914. return t in as;
  18915. }(n);
  18916. break;
  18917. case "clientdb":
  18918. s = function (e) {
  18919. if ("object" != (0, _typeof2.default)(e)) return !1;
  18920. var _ref52 = e || {},
  18921. t = _ref52.errCode;
  18922. return t in os;
  18923. }(n);
  18924. }
  18925. s && function () {
  18926. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  18927. var t = z($);
  18928. Z().then(function () {
  18929. var n = hs();
  18930. if (n && bs({
  18931. redirect: n
  18932. })) return t.length > 0 ? Y($, Object.assign({
  18933. uniIdRedirectUrl: n
  18934. }, e)) : void (gs && ks({
  18935. api: "navigateTo",
  18936. redirect: n
  18937. }));
  18938. });
  18939. }(n);
  18940. });
  18941. }
  18942. function Ts(e) {
  18943. !function (e) {
  18944. e.onResponse = function (e) {
  18945. V(j, e);
  18946. }, e.offResponse = function (e) {
  18947. G(j, e);
  18948. };
  18949. }(e), function (e) {
  18950. e.onNeedLogin = function (e) {
  18951. V($, e);
  18952. }, e.offNeedLogin = function (e) {
  18953. G($, e);
  18954. }, fs && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = !0, Z().then(function () {
  18955. Cs.call(e);
  18956. }), ys && Ps.call(e)));
  18957. }(e), function (e) {
  18958. e.onRefreshToken = function (e) {
  18959. V(B, e);
  18960. }, e.offRefreshToken = function (e) {
  18961. G(B, e);
  18962. };
  18963. }(e);
  18964. }
  18965. var xs;
  18966. var Os = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  18967. Es = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  18968. function Ls() {
  18969. var e = se().token || "",
  18970. t = e.split(".");
  18971. if (!e || 3 !== t.length) return {
  18972. uid: null,
  18973. role: [],
  18974. permission: [],
  18975. tokenExpired: 0
  18976. };
  18977. var n;
  18978. try {
  18979. n = JSON.parse((s = t[1], decodeURIComponent(xs(s).split("").map(function (e) {
  18980. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  18981. }).join(""))));
  18982. } catch (e) {
  18983. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  18984. }
  18985. var s;
  18986. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  18987. }
  18988. xs = "function" != typeof atob ? function (e) {
  18989. if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !Es.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  18990. var t;
  18991. e += "==".slice(2 - (3 & e.length));
  18992. for (var n, s, r = "", i = 0; i < e.length;) {
  18993. t = Os.indexOf(e.charAt(i++)) << 18 | Os.indexOf(e.charAt(i++)) << 12 | (n = Os.indexOf(e.charAt(i++))) << 6 | (s = Os.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);
  18994. }
  18995. return r;
  18996. } : atob;
  18997. var Rs = n(function (e, t) {
  18998. Object.defineProperty(t, "__esModule", {
  18999. value: !0
  19000. });
  19001. var n = "chooseAndUploadFile:ok",
  19002. s = "chooseAndUploadFile:fail";
  19003. function r(e, t) {
  19004. return e.tempFiles.forEach(function (e, n) {
  19005. 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("."));
  19006. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  19007. return e.path;
  19008. })), e;
  19009. }
  19010. function i(e, t, _ref53) {
  19011. var s = _ref53.onChooseFile,
  19012. r = _ref53.onUploadProgress;
  19013. return t.then(function (e) {
  19014. if (s) {
  19015. var _t19 = s(e);
  19016. if (void 0 !== _t19) return Promise.resolve(_t19).then(function (t) {
  19017. return void 0 === t ? e : t;
  19018. });
  19019. }
  19020. return e;
  19021. }).then(function (t) {
  19022. return !1 === t ? {
  19023. errMsg: n,
  19024. tempFilePaths: [],
  19025. tempFiles: []
  19026. } : function (e, t) {
  19027. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  19028. var r = arguments.length > 3 ? arguments[3] : undefined;
  19029. (t = Object.assign({}, t)).errMsg = n;
  19030. var i = t.tempFiles,
  19031. o = i.length;
  19032. var a = 0;
  19033. return new Promise(function (n) {
  19034. for (; a < s;) {
  19035. c();
  19036. }
  19037. function c() {
  19038. var s = a++;
  19039. if (s >= o) return void (!i.find(function (e) {
  19040. return !e.url && !e.errMsg;
  19041. }) && n(t));
  19042. var u = i[s];
  19043. e.uploadFile({
  19044. provider: u.provider,
  19045. filePath: u.path,
  19046. cloudPath: u.cloudPath,
  19047. fileType: u.fileType,
  19048. cloudPathAsRealPath: u.cloudPathAsRealPath,
  19049. onUploadProgress: function onUploadProgress(e) {
  19050. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  19051. }
  19052. }).then(function (e) {
  19053. u.url = e.fileID, s < o && c();
  19054. }).catch(function (e) {
  19055. u.errMsg = e.errMsg || e.message, s < o && c();
  19056. });
  19057. }
  19058. });
  19059. }(e, t, 5, r);
  19060. });
  19061. }
  19062. t.initChooseAndUploadFile = function (e) {
  19063. return function () {
  19064. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  19065. type: "all"
  19066. };
  19067. return "image" === t.type ? i(e, function (e) {
  19068. var t = e.count,
  19069. n = e.sizeType,
  19070. _e$sourceType = e.sourceType,
  19071. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  19072. o = e.extension;
  19073. return new Promise(function (e, a) {
  19074. uni.chooseImage({
  19075. count: t,
  19076. sizeType: n,
  19077. sourceType: i,
  19078. extension: o,
  19079. success: function success(t) {
  19080. e(r(t, "image"));
  19081. },
  19082. fail: function fail(e) {
  19083. a({
  19084. errMsg: e.errMsg.replace("chooseImage:fail", s)
  19085. });
  19086. }
  19087. });
  19088. });
  19089. }(t), t) : "video" === t.type ? i(e, function (e) {
  19090. var t = e.camera,
  19091. n = e.compressed,
  19092. i = e.maxDuration,
  19093. _e$sourceType2 = e.sourceType,
  19094. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  19095. a = e.extension;
  19096. return new Promise(function (e, c) {
  19097. uni.chooseVideo({
  19098. camera: t,
  19099. compressed: n,
  19100. maxDuration: i,
  19101. sourceType: o,
  19102. extension: a,
  19103. success: function success(t) {
  19104. var n = t.tempFilePath,
  19105. s = t.duration,
  19106. i = t.size,
  19107. o = t.height,
  19108. a = t.width;
  19109. e(r({
  19110. errMsg: "chooseVideo:ok",
  19111. tempFilePaths: [n],
  19112. tempFiles: [{
  19113. name: t.tempFile && t.tempFile.name || "",
  19114. path: n,
  19115. size: i,
  19116. type: t.tempFile && t.tempFile.type || "",
  19117. width: a,
  19118. height: o,
  19119. duration: s,
  19120. fileType: "video",
  19121. cloudPath: ""
  19122. }]
  19123. }, "video"));
  19124. },
  19125. fail: function fail(e) {
  19126. c({
  19127. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  19128. });
  19129. }
  19130. });
  19131. });
  19132. }(t), t) : i(e, function (e) {
  19133. var t = e.count,
  19134. n = e.extension;
  19135. return new Promise(function (e, i) {
  19136. var o = uni.chooseFile;
  19137. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  19138. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  19139. });
  19140. o({
  19141. type: "all",
  19142. count: t,
  19143. extension: n,
  19144. success: function success(t) {
  19145. e(r(t));
  19146. },
  19147. fail: function fail(e) {
  19148. i({
  19149. errMsg: e.errMsg.replace("chooseFile:fail", s)
  19150. });
  19151. }
  19152. });
  19153. });
  19154. }(t), t);
  19155. };
  19156. };
  19157. }),
  19158. Us = t(Rs);
  19159. var Ns = "manual";
  19160. function Ds(e) {
  19161. return {
  19162. props: {
  19163. localdata: {
  19164. type: Array,
  19165. default: function _default() {
  19166. return [];
  19167. }
  19168. },
  19169. options: {
  19170. type: [Object, Array],
  19171. default: function _default() {
  19172. return {};
  19173. }
  19174. },
  19175. spaceInfo: {
  19176. type: Object,
  19177. default: function _default() {
  19178. return {};
  19179. }
  19180. },
  19181. collection: {
  19182. type: [String, Array],
  19183. default: ""
  19184. },
  19185. action: {
  19186. type: String,
  19187. default: ""
  19188. },
  19189. field: {
  19190. type: String,
  19191. default: ""
  19192. },
  19193. orderby: {
  19194. type: String,
  19195. default: ""
  19196. },
  19197. where: {
  19198. type: [String, Object],
  19199. default: ""
  19200. },
  19201. pageData: {
  19202. type: String,
  19203. default: "add"
  19204. },
  19205. pageCurrent: {
  19206. type: Number,
  19207. default: 1
  19208. },
  19209. pageSize: {
  19210. type: Number,
  19211. default: 20
  19212. },
  19213. getcount: {
  19214. type: [Boolean, String],
  19215. default: !1
  19216. },
  19217. gettree: {
  19218. type: [Boolean, String],
  19219. default: !1
  19220. },
  19221. gettreepath: {
  19222. type: [Boolean, String],
  19223. default: !1
  19224. },
  19225. startwith: {
  19226. type: String,
  19227. default: ""
  19228. },
  19229. limitlevel: {
  19230. type: Number,
  19231. default: 10
  19232. },
  19233. groupby: {
  19234. type: String,
  19235. default: ""
  19236. },
  19237. groupField: {
  19238. type: String,
  19239. default: ""
  19240. },
  19241. distinct: {
  19242. type: [Boolean, String],
  19243. default: !1
  19244. },
  19245. foreignKey: {
  19246. type: String,
  19247. default: ""
  19248. },
  19249. loadtime: {
  19250. type: String,
  19251. default: "auto"
  19252. },
  19253. manual: {
  19254. type: Boolean,
  19255. default: !1
  19256. }
  19257. },
  19258. data: function data() {
  19259. return {
  19260. mixinDatacomLoading: !1,
  19261. mixinDatacomHasMore: !1,
  19262. mixinDatacomResData: [],
  19263. mixinDatacomErrorMessage: "",
  19264. mixinDatacomPage: {},
  19265. mixinDatacomError: null
  19266. };
  19267. },
  19268. created: function created() {
  19269. var _this21 = this;
  19270. this.mixinDatacomPage = {
  19271. current: this.pageCurrent,
  19272. size: this.pageSize,
  19273. count: 0
  19274. }, this.$watch(function () {
  19275. var e = [];
  19276. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  19277. e.push(_this21[t]);
  19278. }), e;
  19279. }, function (e, t) {
  19280. if (_this21.loadtime === Ns) return;
  19281. var n = !1;
  19282. var s = [];
  19283. for (var _r9 = 2; _r9 < e.length; _r9++) {
  19284. e[_r9] !== t[_r9] && (s.push(e[_r9]), n = !0);
  19285. }
  19286. e[0] !== t[0] && (_this21.mixinDatacomPage.current = _this21.pageCurrent), _this21.mixinDatacomPage.size = _this21.pageSize, _this21.onMixinDatacomPropsChange(n, s);
  19287. });
  19288. },
  19289. methods: {
  19290. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  19291. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  19292. var _this22 = this;
  19293. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19294. _ref54$getone = _ref54.getone,
  19295. e = _ref54$getone === void 0 ? !1 : _ref54$getone,
  19296. t = _ref54.success,
  19297. n = _ref54.fail;
  19298. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomError = null, this.mixinDatacomGet().then(function (n) {
  19299. _this22.mixinDatacomLoading = !1;
  19300. var _n$result = n.result,
  19301. s = _n$result.data,
  19302. r = _n$result.count;
  19303. _this22.getcount && (_this22.mixinDatacomPage.count = r), _this22.mixinDatacomHasMore = s.length < _this22.pageSize;
  19304. var i = e ? s.length ? s[0] : void 0 : s;
  19305. _this22.mixinDatacomResData = i, t && t(i);
  19306. }).catch(function (e) {
  19307. _this22.mixinDatacomLoading = !1, _this22.mixinDatacomErrorMessage = e, _this22.mixinDatacomError = e, n && n(e);
  19308. }));
  19309. },
  19310. mixinDatacomGet: function mixinDatacomGet() {
  19311. var _n14;
  19312. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  19313. var n;
  19314. t = t || {}, n = "undefined" != typeof __uniX && __uniX ? e.databaseForJQL(this.spaceInfo) : e.database(this.spaceInfo);
  19315. var s = t.action || this.action;
  19316. s && (n = n.action(s));
  19317. var r = t.collection || this.collection;
  19318. n = Array.isArray(r) ? (_n14 = n).collection.apply(_n14, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  19319. var i = t.where || this.where;
  19320. i && Object.keys(i).length && (n = n.where(i));
  19321. var o = t.field || this.field;
  19322. o && (n = n.field(o));
  19323. var a = t.foreignKey || this.foreignKey;
  19324. a && (n = n.foreignKey(a));
  19325. var c = t.groupby || this.groupby;
  19326. c && (n = n.groupBy(c));
  19327. var u = t.groupField || this.groupField;
  19328. u && (n = n.groupField(u));
  19329. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  19330. var l = t.orderby || this.orderby;
  19331. l && (n = n.orderBy(l));
  19332. var h = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  19333. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  19334. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  19335. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  19336. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  19337. m = {
  19338. getCount: p
  19339. },
  19340. y = {
  19341. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  19342. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  19343. };
  19344. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (h - 1)).limit(d).get(m), n;
  19345. }
  19346. }
  19347. };
  19348. }
  19349. function qs(e) {
  19350. return function (t) {
  19351. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19352. n = function (e) {
  19353. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19354. 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;
  19355. }({
  19356. customUI: !1,
  19357. loadingOptions: {
  19358. title: "加载中...",
  19359. mask: !0
  19360. },
  19361. errorOptions: {
  19362. type: "modal",
  19363. retry: !1
  19364. }
  19365. }, n);
  19366. var _n15 = n,
  19367. s = _n15.customUI,
  19368. r = _n15.loadingOptions,
  19369. i = _n15.errorOptions,
  19370. o = _n15.parseSystemError,
  19371. a = !s;
  19372. return new Proxy({}, {
  19373. get: function get(s, c) {
  19374. switch (c) {
  19375. case "toString":
  19376. return "[object UniCloudObject]";
  19377. case "toJSON":
  19378. return {};
  19379. }
  19380. return function () {
  19381. var _ref55 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19382. e = _ref55.fn,
  19383. t = _ref55.interceptorName,
  19384. n = _ref55.getCallbackArgs;
  19385. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  19386. var _len2,
  19387. s,
  19388. _key2,
  19389. r,
  19390. i,
  19391. o,
  19392. _args = arguments;
  19393. return _regenerator.default.wrap(function _callee55$(_context55) {
  19394. while (1) {
  19395. switch (_context55.prev = _context55.next) {
  19396. case 0:
  19397. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  19398. s[_key2] = _args[_key2];
  19399. }
  19400. r = n ? n({
  19401. params: s
  19402. }) : {};
  19403. _context55.prev = 2;
  19404. _context55.next = 5;
  19405. return q(M(t, "invoke"), _objectSpread({}, r));
  19406. case 5:
  19407. _context55.next = 7;
  19408. return e.apply(void 0, s);
  19409. case 7:
  19410. i = _context55.sent;
  19411. _context55.next = 10;
  19412. return q(M(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  19413. result: i
  19414. }));
  19415. case 10:
  19416. return _context55.abrupt("return", i);
  19417. case 13:
  19418. _context55.prev = 13;
  19419. _context55.t0 = _context55["catch"](2);
  19420. o = _context55.t0;
  19421. _context55.next = 18;
  19422. return q(M(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  19423. error: o
  19424. }));
  19425. case 18:
  19426. throw o;
  19427. case 19:
  19428. _context55.prev = 19;
  19429. _context55.next = 22;
  19430. return q(M(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  19431. error: o
  19432. }) : _objectSpread(_objectSpread({}, r), {}, {
  19433. result: i
  19434. }));
  19435. case 22:
  19436. return _context55.finish(19);
  19437. case 23:
  19438. case "end":
  19439. return _context55.stop();
  19440. }
  19441. }
  19442. }, _callee55, null, [[2, 13, 19, 23]]);
  19443. }));
  19444. }({
  19445. fn: function () {
  19446. var _s17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57() {
  19447. var h,
  19448. _len3,
  19449. l,
  19450. _key3,
  19451. d,
  19452. p,
  19453. _ref57,
  19454. f,
  19455. g,
  19456. m,
  19457. y,
  19458. _e26,
  19459. _yield,
  19460. _t20,
  19461. _n16,
  19462. _args4 = arguments;
  19463. return _regenerator.default.wrap(function _callee57$(_context57) {
  19464. while (1) {
  19465. switch (_context57.prev = _context57.next) {
  19466. case 0:
  19467. a && uni.showLoading({
  19468. title: r.title,
  19469. mask: r.mask
  19470. });
  19471. for (_len3 = _args4.length, l = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  19472. l[_key3] = _args4[_key3];
  19473. }
  19474. d = {
  19475. name: t,
  19476. type: u,
  19477. data: {
  19478. method: c,
  19479. params: l
  19480. }
  19481. };
  19482. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  19483. var n = t.data.method,
  19484. s = e.secretMethods || {},
  19485. r = s[n] || s["*"];
  19486. r && (t.secretType = r);
  19487. }(n, d);
  19488. p = !1;
  19489. _context57.prev = 5;
  19490. _context57.next = 8;
  19491. return e.callFunction(d);
  19492. case 8:
  19493. h = _context57.sent;
  19494. _context57.next = 14;
  19495. break;
  19496. case 11:
  19497. _context57.prev = 11;
  19498. _context57.t0 = _context57["catch"](5);
  19499. p = !0, h = {
  19500. result: new te(_context57.t0)
  19501. };
  19502. case 14:
  19503. _ref57 = h.result || {}, f = _ref57.errSubject, g = _ref57.errCode, m = _ref57.errMsg, y = _ref57.newToken;
  19504. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (re(y), Y(B, _objectSpread({}, y))), g)) {
  19505. _context57.next = 39;
  19506. break;
  19507. }
  19508. _e26 = m;
  19509. if (!(p && o)) {
  19510. _context57.next = 24;
  19511. break;
  19512. }
  19513. _context57.next = 20;
  19514. return o({
  19515. objectName: t,
  19516. methodName: c,
  19517. params: l,
  19518. errSubject: f,
  19519. errCode: g,
  19520. errMsg: m
  19521. });
  19522. case 20:
  19523. _context57.t1 = _context57.sent.errMsg;
  19524. if (_context57.t1) {
  19525. _context57.next = 23;
  19526. break;
  19527. }
  19528. _context57.t1 = m;
  19529. case 23:
  19530. _e26 = _context57.t1;
  19531. case 24:
  19532. if (!a) {
  19533. _context57.next = 37;
  19534. break;
  19535. }
  19536. if (!("toast" === i.type)) {
  19537. _context57.next = 29;
  19538. break;
  19539. }
  19540. uni.showToast({
  19541. title: _e26,
  19542. icon: "none"
  19543. });
  19544. _context57.next = 37;
  19545. break;
  19546. case 29:
  19547. if (!("modal" !== i.type)) {
  19548. _context57.next = 31;
  19549. break;
  19550. }
  19551. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  19552. case 31:
  19553. _context57.next = 33;
  19554. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56() {
  19555. var _ref59,
  19556. e,
  19557. t,
  19558. n,
  19559. s,
  19560. r,
  19561. _args2 = arguments;
  19562. return _regenerator.default.wrap(function _callee56$(_context56) {
  19563. while (1) {
  19564. switch (_context56.prev = _context56.next) {
  19565. case 0:
  19566. _ref59 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref59.title, t = _ref59.content, n = _ref59.showCancel, s = _ref59.cancelText, r = _ref59.confirmText;
  19567. return _context56.abrupt("return", new Promise(function (i, o) {
  19568. uni.showModal({
  19569. title: e,
  19570. content: t,
  19571. showCancel: n,
  19572. cancelText: s,
  19573. confirmText: r,
  19574. success: function success(e) {
  19575. i(e);
  19576. },
  19577. fail: function fail() {
  19578. i({
  19579. confirm: !1,
  19580. cancel: !0
  19581. });
  19582. }
  19583. });
  19584. }));
  19585. case 2:
  19586. case "end":
  19587. return _context56.stop();
  19588. }
  19589. }
  19590. }, _callee56);
  19591. }))({
  19592. title: "提示",
  19593. content: _e26,
  19594. showCancel: i.retry,
  19595. cancelText: "取消",
  19596. confirmText: i.retry ? "重试" : "确定"
  19597. });
  19598. case 33:
  19599. _yield = _context57.sent;
  19600. _t20 = _yield.confirm;
  19601. if (!(i.retry && _t20)) {
  19602. _context57.next = 37;
  19603. break;
  19604. }
  19605. return _context57.abrupt("return", s.apply(void 0, l));
  19606. case 37:
  19607. _n16 = new te({
  19608. subject: f,
  19609. code: g,
  19610. message: m,
  19611. requestId: h.requestId
  19612. });
  19613. throw _n16.detail = h.result, Y(j, {
  19614. type: J,
  19615. content: _n16
  19616. }), _n16;
  19617. case 39:
  19618. return _context57.abrupt("return", (Y(j, {
  19619. type: J,
  19620. content: h.result
  19621. }), h.result));
  19622. case 40:
  19623. case "end":
  19624. return _context57.stop();
  19625. }
  19626. }
  19627. }, _callee57, null, [[5, 11]]);
  19628. }));
  19629. function s() {
  19630. return _s17.apply(this, arguments);
  19631. }
  19632. return s;
  19633. }(),
  19634. interceptorName: "callObject",
  19635. getCallbackArgs: function getCallbackArgs() {
  19636. var _ref60 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19637. e = _ref60.params;
  19638. return {
  19639. objectName: t,
  19640. methodName: c,
  19641. params: e
  19642. };
  19643. }
  19644. });
  19645. }
  19646. });
  19647. };
  19648. }
  19649. function Ms(e) {
  19650. return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  19651. }
  19652. function Fs() {
  19653. return _Fs.apply(this, arguments);
  19654. }
  19655. function _Fs() {
  19656. _Fs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee62() {
  19657. var _ref71,
  19658. e,
  19659. _ref71$callLoginByWei,
  19660. t,
  19661. n,
  19662. s,
  19663. r,
  19664. _args9 = arguments;
  19665. return _regenerator.default.wrap(function _callee62$(_context62) {
  19666. while (1) {
  19667. switch (_context62.prev = _context62.next) {
  19668. case 0:
  19669. _ref71 = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {}, e = _ref71.openid, _ref71$callLoginByWei = _ref71.callLoginByWeixin, t = _ref71$callLoginByWei === void 0 ? !1 : _ref71$callLoginByWei;
  19670. n = Ms(this);
  19671. if (!("mp-weixin" !== C)) {
  19672. _context62.next = 4;
  19673. break;
  19674. }
  19675. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(C, "`"));
  19676. case 4:
  19677. if (!(e && t)) {
  19678. _context62.next = 6;
  19679. break;
  19680. }
  19681. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  19682. case 6:
  19683. if (!e) {
  19684. _context62.next = 8;
  19685. break;
  19686. }
  19687. return _context62.abrupt("return", (n.mpWeixinOpenid = e, {}));
  19688. case 8:
  19689. _context62.next = 10;
  19690. return new Promise(function (e, t) {
  19691. uni.login({
  19692. success: function success(t) {
  19693. e(t.code);
  19694. },
  19695. fail: function fail(e) {
  19696. t(new Error(e.errMsg));
  19697. }
  19698. });
  19699. });
  19700. case 10:
  19701. s = _context62.sent;
  19702. r = this.importObject("uni-id-co", {
  19703. customUI: !0
  19704. });
  19705. _context62.next = 14;
  19706. return r.secureNetworkHandshakeByWeixin({
  19707. code: s,
  19708. callLoginByWeixin: t
  19709. });
  19710. case 14:
  19711. n.mpWeixinCode = s;
  19712. return _context62.abrupt("return", {
  19713. code: s
  19714. });
  19715. case 16:
  19716. case "end":
  19717. return _context62.stop();
  19718. }
  19719. }
  19720. }, _callee62, this);
  19721. }));
  19722. return _Fs.apply(this, arguments);
  19723. }
  19724. function Ks(_x46) {
  19725. return _Ks.apply(this, arguments);
  19726. }
  19727. function _Ks() {
  19728. _Ks = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee63(e) {
  19729. var t;
  19730. return _regenerator.default.wrap(function _callee63$(_context63) {
  19731. while (1) {
  19732. switch (_context63.prev = _context63.next) {
  19733. case 0:
  19734. t = Ms(this);
  19735. return _context63.abrupt("return", (t.initPromise || (t.initPromise = Fs.call(this, e).then(function (e) {
  19736. return e;
  19737. }).catch(function (e) {
  19738. throw delete t.initPromise, e;
  19739. })), t.initPromise));
  19740. case 2:
  19741. case "end":
  19742. return _context63.stop();
  19743. }
  19744. }
  19745. }, _callee63, this);
  19746. }));
  19747. return _Ks.apply(this, arguments);
  19748. }
  19749. function js(e) {
  19750. return function () {
  19751. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19752. t = _ref61.openid,
  19753. _ref61$callLoginByWei = _ref61.callLoginByWeixin,
  19754. n = _ref61$callLoginByWei === void 0 ? !1 : _ref61$callLoginByWei;
  19755. return Ks.call(e, {
  19756. openid: t,
  19757. callLoginByWeixin: n
  19758. });
  19759. };
  19760. }
  19761. function $s(e) {
  19762. !function (e) {
  19763. ue = e;
  19764. }(e);
  19765. }
  19766. function Bs(e) {
  19767. var t = {
  19768. getSystemInfo: uni.getSystemInfo,
  19769. getPushClientId: uni.getPushClientId
  19770. };
  19771. return function (n) {
  19772. return new Promise(function (s, r) {
  19773. t[e](_objectSpread(_objectSpread({}, n), {}, {
  19774. success: function success(e) {
  19775. s(e);
  19776. },
  19777. fail: function fail(e) {
  19778. r(e);
  19779. }
  19780. }));
  19781. });
  19782. };
  19783. }
  19784. var Ws = /*#__PURE__*/function (_ref62) {
  19785. (0, _inherits2.default)(Ws, _ref62);
  19786. var _super11 = _createSuper(Ws);
  19787. function Ws() {
  19788. var _this23;
  19789. (0, _classCallCheck2.default)(this, Ws);
  19790. _this23 = _super11.call(this), _this23._uniPushMessageCallback = _this23._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this23)), _this23._currentMessageId = -1, _this23._payloadQueue = [];
  19791. return _this23;
  19792. }
  19793. (0, _createClass2.default)(Ws, [{
  19794. key: "init",
  19795. value: function init() {
  19796. var _this24 = this;
  19797. return Promise.all([Bs("getSystemInfo")(), Bs("getPushClientId")()]).then(function () {
  19798. var _ref63 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  19799. _ref64 = (0, _slicedToArray2.default)(_ref63, 2),
  19800. _ref64$ = _ref64[0];
  19801. _ref64$ = _ref64$ === void 0 ? {} : _ref64$;
  19802. var e = _ref64$.appId,
  19803. _ref64$2 = _ref64[1];
  19804. _ref64$2 = _ref64$2 === void 0 ? {} : _ref64$2;
  19805. var t = _ref64$2.cid;
  19806. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  19807. if (!t) throw new Error("Invalid push client id");
  19808. _this24._appId = e, _this24._pushClientId = t, _this24._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this24.emit("open"), _this24._initMessageListener();
  19809. }, function (e) {
  19810. throw _this24.emit("error", e), _this24.close(), e;
  19811. });
  19812. }
  19813. }, {
  19814. key: "open",
  19815. value: function () {
  19816. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58() {
  19817. return _regenerator.default.wrap(function _callee58$(_context58) {
  19818. while (1) {
  19819. switch (_context58.prev = _context58.next) {
  19820. case 0:
  19821. return _context58.abrupt("return", this.init());
  19822. case 1:
  19823. case "end":
  19824. return _context58.stop();
  19825. }
  19826. }
  19827. }, _callee58, this);
  19828. }));
  19829. function open() {
  19830. return _open.apply(this, arguments);
  19831. }
  19832. return open;
  19833. }()
  19834. }, {
  19835. key: "_isUniCloudSSE",
  19836. value: function _isUniCloudSSE(e) {
  19837. if ("receive" !== e.type) return !1;
  19838. var t = e && e.data && e.data.payload;
  19839. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  19840. }
  19841. }, {
  19842. key: "_receivePushMessage",
  19843. value: function _receivePushMessage(e) {
  19844. if (!this._isUniCloudSSE(e)) return;
  19845. var t = e && e.data && e.data.payload,
  19846. n = t.action,
  19847. s = t.messageId,
  19848. r = t.message;
  19849. this._payloadQueue.push({
  19850. action: n,
  19851. messageId: s,
  19852. message: r
  19853. }), this._consumMessage();
  19854. }
  19855. }, {
  19856. key: "_consumMessage",
  19857. value: function _consumMessage() {
  19858. var _this25 = this;
  19859. for (;;) {
  19860. var _e27 = this._payloadQueue.find(function (e) {
  19861. return e.messageId === _this25._currentMessageId + 1;
  19862. });
  19863. if (!_e27) break;
  19864. this._currentMessageId++, this._parseMessagePayload(_e27);
  19865. }
  19866. }
  19867. }, {
  19868. key: "_parseMessagePayload",
  19869. value: function _parseMessagePayload(e) {
  19870. var t = e.action,
  19871. n = e.messageId,
  19872. s = e.message;
  19873. "end" === t ? this._end({
  19874. messageId: n,
  19875. message: s
  19876. }) : "message" === t && this._appendMessage({
  19877. messageId: n,
  19878. message: s
  19879. });
  19880. }
  19881. }, {
  19882. key: "_appendMessage",
  19883. value: function _appendMessage() {
  19884. var _ref65 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19885. e = _ref65.messageId,
  19886. t = _ref65.message;
  19887. this.emit("message", t);
  19888. }
  19889. }, {
  19890. key: "_end",
  19891. value: function _end() {
  19892. var _ref66 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19893. e = _ref66.messageId,
  19894. t = _ref66.message;
  19895. this.emit("end", t), this.close();
  19896. }
  19897. }, {
  19898. key: "_initMessageListener",
  19899. value: function _initMessageListener() {
  19900. uni.onPushMessage(this._uniPushMessageCallback);
  19901. }
  19902. }, {
  19903. key: "_destroy",
  19904. value: function _destroy() {
  19905. uni.offPushMessage(this._uniPushMessageCallback);
  19906. }
  19907. }, {
  19908. key: "toJSON",
  19909. value: function toJSON() {
  19910. return {
  19911. appId: this._appId,
  19912. pushClientId: this._pushClientId,
  19913. seqId: this._seqId
  19914. };
  19915. }
  19916. }, {
  19917. key: "close",
  19918. value: function close() {
  19919. this._destroy(), this.emit("close");
  19920. }
  19921. }]);
  19922. return Ws;
  19923. }( /*#__PURE__*/function () {
  19924. function _class6() {
  19925. (0, _classCallCheck2.default)(this, _class6);
  19926. this._callback = {};
  19927. }
  19928. (0, _createClass2.default)(_class6, [{
  19929. key: "addListener",
  19930. value: function addListener(e, t) {
  19931. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  19932. }
  19933. }, {
  19934. key: "on",
  19935. value: function on(e, t) {
  19936. return this.addListener(e, t);
  19937. }
  19938. }, {
  19939. key: "removeListener",
  19940. value: function removeListener(e, t) {
  19941. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  19942. var n = this._callback[e];
  19943. if (!n) return;
  19944. var s = function (e, t) {
  19945. for (var _n17 = e.length - 1; _n17 >= 0; _n17--) {
  19946. if (e[_n17] === t) return _n17;
  19947. }
  19948. return -1;
  19949. }(n, t);
  19950. n.splice(s, 1);
  19951. }
  19952. }, {
  19953. key: "off",
  19954. value: function off(e, t) {
  19955. return this.removeListener(e, t);
  19956. }
  19957. }, {
  19958. key: "removeAllListener",
  19959. value: function removeAllListener(e) {
  19960. delete this._callback[e];
  19961. }
  19962. }, {
  19963. key: "emit",
  19964. value: function emit(e) {
  19965. var n = this._callback[e];
  19966. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  19967. t[_key4 - 1] = arguments[_key4];
  19968. }
  19969. if (n) for (var _e28 = 0; _e28 < n.length; _e28++) {
  19970. n[_e28].apply(n, t);
  19971. }
  19972. }
  19973. }]);
  19974. return _class6;
  19975. }());
  19976. function Hs(_x47) {
  19977. return _Hs.apply(this, arguments);
  19978. }
  19979. function _Hs() {
  19980. _Hs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee64(e) {
  19981. var _ae2, _e32, _t22, t, _t$debugInfo, n, s, _yield$kt2, r, i, o;
  19982. return _regenerator.default.wrap(function _callee64$(_context64) {
  19983. while (1) {
  19984. switch (_context64.prev = _context64.next) {
  19985. case 0:
  19986. if (S) {
  19987. _context64.next = 2;
  19988. break;
  19989. }
  19990. return _context64.abrupt("return", Promise.resolve());
  19991. case 2:
  19992. if ("app" === C) {
  19993. _ae2 = ae(), _e32 = _ae2.osName, _t22 = _ae2.osVersion;
  19994. "ios" === _e32 && function (e) {
  19995. if (!e || "string" != typeof e) return 0;
  19996. var t = e.match(/^(\d+)./);
  19997. return t && t[1] ? parseInt(t[1]) : 0;
  19998. }(_t22) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发期间需要,发行后不需要)");
  19999. }
  20000. t = e.__dev__;
  20001. if (t.debugInfo) {
  20002. _context64.next = 6;
  20003. break;
  20004. }
  20005. return _context64.abrupt("return");
  20006. case 6:
  20007. _t$debugInfo = t.debugInfo;
  20008. n = _t$debugInfo.address;
  20009. s = _t$debugInfo.servePort;
  20010. _context64.next = 11;
  20011. return kt(n, s);
  20012. case 11:
  20013. _yield$kt2 = _context64.sent;
  20014. r = _yield$kt2.address;
  20015. if (!r) {
  20016. _context64.next = 15;
  20017. break;
  20018. }
  20019. return _context64.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  20020. case 15:
  20021. i = console["app" === C ? "error" : "warn"];
  20022. o = "";
  20023. 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" === C && (o += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === C.indexOf("mp-") && (o += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t.debugInfo.forceRemote)) {
  20024. _context64.next = 19;
  20025. break;
  20026. }
  20027. throw new Error(o);
  20028. case 19:
  20029. i(o);
  20030. case 20:
  20031. case "end":
  20032. return _context64.stop();
  20033. }
  20034. }
  20035. }, _callee64);
  20036. }));
  20037. return _Hs.apply(this, arguments);
  20038. }
  20039. function Js(e) {
  20040. e._initPromiseHub || (e._initPromiseHub = new v({
  20041. createPromise: function createPromise() {
  20042. var t = Promise.resolve();
  20043. var n;
  20044. n = 1, t = new Promise(function (e) {
  20045. setTimeout(function () {
  20046. e();
  20047. }, n);
  20048. });
  20049. var s = e.auth();
  20050. return t.then(function () {
  20051. return s.getLoginState();
  20052. }).then(function (e) {
  20053. return e ? Promise.resolve() : s.signInAnonymously();
  20054. });
  20055. }
  20056. }));
  20057. }
  20058. var zs = {
  20059. tcb: St,
  20060. tencent: St,
  20061. aliyun: pe,
  20062. private: Pt,
  20063. dcloud: Pt,
  20064. alipay: qt
  20065. };
  20066. var Vs = new ( /*#__PURE__*/function () {
  20067. function _class7() {
  20068. (0, _classCallCheck2.default)(this, _class7);
  20069. }
  20070. (0, _createClass2.default)(_class7, [{
  20071. key: "init",
  20072. value: function init(e) {
  20073. var t = {};
  20074. var n = zs[e.provider];
  20075. if (!n) throw new Error("未提供正确的provider参数");
  20076. t = n.init(e), S && function (e) {
  20077. if (!S) return;
  20078. var t = {};
  20079. e.__dev__ = t, t.debugLog = S && ("web" === C && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === C);
  20080. var n = P;
  20081. n && !n.code && (t.debugInfo = n);
  20082. var s = new v({
  20083. createPromise: function createPromise() {
  20084. return Hs(e);
  20085. }
  20086. });
  20087. t.initLocalNetwork = function () {
  20088. return s.exec();
  20089. };
  20090. }(t), Js(t), Hn(t), function (e) {
  20091. var t = e.uploadFile;
  20092. e.uploadFile = function (e) {
  20093. return t.call(this, e);
  20094. };
  20095. }(t), function (e) {
  20096. e.database = function (t) {
  20097. if (t && Object.keys(t).length > 0) return e.init(t).database();
  20098. if (this._database) return this._database;
  20099. var n = ns(ss, {
  20100. uniClient: e
  20101. });
  20102. return this._database = n, n;
  20103. }, e.databaseForJQL = function (t) {
  20104. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  20105. if (this._databaseForJQL) return this._databaseForJQL;
  20106. var n = ns(ss, {
  20107. uniClient: e,
  20108. isJQL: !0
  20109. });
  20110. return this._databaseForJQL = n, n;
  20111. };
  20112. }(t), function (e) {
  20113. e.getCurrentUserInfo = Ls, e.chooseAndUploadFile = Us.initChooseAndUploadFile(e), Object.assign(e, {
  20114. get mixinDatacom() {
  20115. return Ds(e);
  20116. }
  20117. }), e.SSEChannel = Ws, e.initSecureNetworkByWeixin = js(e), e.setCustomClientInfo = $s, e.importObject = qs(e);
  20118. }(t);
  20119. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  20120. if (!t[e]) return;
  20121. var n = t[e];
  20122. t[e] = function () {
  20123. return n.apply(t, Array.from(arguments));
  20124. }, t[e] = function (e, t) {
  20125. return function (n) {
  20126. var _this26 = this;
  20127. var s = !1;
  20128. if ("callFunction" === t) {
  20129. var _e29 = n && n.type || c;
  20130. s = _e29 !== c;
  20131. }
  20132. var r = "callFunction" === t && !s,
  20133. i = this._initPromiseHub.exec();
  20134. n = n || {};
  20135. var _ee2 = ee(n),
  20136. o = _ee2.success,
  20137. a = _ee2.fail,
  20138. u = _ee2.complete,
  20139. l = i.then(function () {
  20140. return s ? Promise.resolve() : q(M(t, "invoke"), n);
  20141. }).then(function () {
  20142. return e.call(_this26, n);
  20143. }).then(function (e) {
  20144. return s ? Promise.resolve(e) : q(M(t, "success"), e).then(function () {
  20145. return q(M(t, "complete"), e);
  20146. }).then(function () {
  20147. return r && Y(j, {
  20148. type: H,
  20149. content: e
  20150. }), Promise.resolve(e);
  20151. });
  20152. }, function (e) {
  20153. return s ? Promise.reject(e) : q(M(t, "fail"), e).then(function () {
  20154. return q(M(t, "complete"), e);
  20155. }).then(function () {
  20156. return Y(j, {
  20157. type: H,
  20158. content: e
  20159. }), Promise.reject(e);
  20160. });
  20161. });
  20162. if (!(o || a || u)) return l;
  20163. l.then(function (e) {
  20164. o && o(e), u && u(e), r && Y(j, {
  20165. type: H,
  20166. content: e
  20167. });
  20168. }, function (e) {
  20169. a && a(e), u && u(e), r && Y(j, {
  20170. type: H,
  20171. content: e
  20172. });
  20173. });
  20174. };
  20175. }(t[e], e).bind(t);
  20176. }), t.init = this.init, t;
  20177. }
  20178. }]);
  20179. return _class7;
  20180. }())();
  20181. (function () {
  20182. var e = T;
  20183. var t = {};
  20184. if (e && 1 === e.length) t = e[0], Vs = Vs.init(t), Vs._isDefault = !0;else {
  20185. var _t21 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  20186. var _n18;
  20187. _n18 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : x ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t21.forEach(function (e) {
  20188. Vs[e] = function () {
  20189. return console.error(_n18), Promise.reject(new te({
  20190. code: "SYS_ERR",
  20191. message: _n18
  20192. }));
  20193. };
  20194. });
  20195. }
  20196. Object.assign(Vs, {
  20197. get mixinDatacom() {
  20198. return Ds(Vs);
  20199. }
  20200. }), Ts(Vs), Vs.addInterceptor = N, Vs.removeInterceptor = D, Vs.interceptObject = F, S && "web" === C && (window.uniCloud = Vs);
  20201. })();
  20202. var Gs = Vs;
  20203. exports.default = Gs;
  20204. /* 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"]))
  20205. /***/ }),
  20206. /***/ 367:
  20207. /*!**********************************************************************!*\
  20208. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  20209. \**********************************************************************/
  20210. /*! no static exports found */
  20211. /***/ (function(module, exports) {
  20212. function _assertThisInitialized(self) {
  20213. if (self === void 0) {
  20214. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  20215. }
  20216. return self;
  20217. }
  20218. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20219. /***/ }),
  20220. /***/ 368:
  20221. /*!*********************************************************!*\
  20222. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  20223. \*********************************************************/
  20224. /*! no static exports found */
  20225. /***/ (function(module, exports, __webpack_require__) {
  20226. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  20227. function _inherits(subClass, superClass) {
  20228. if (typeof superClass !== "function" && superClass !== null) {
  20229. throw new TypeError("Super expression must either be null or a function");
  20230. }
  20231. subClass.prototype = Object.create(superClass && superClass.prototype, {
  20232. constructor: {
  20233. value: subClass,
  20234. writable: true,
  20235. configurable: true
  20236. }
  20237. });
  20238. Object.defineProperty(subClass, "prototype", {
  20239. writable: false
  20240. });
  20241. if (superClass) setPrototypeOf(subClass, superClass);
  20242. }
  20243. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20244. /***/ }),
  20245. /***/ 369:
  20246. /*!**************************************************************************!*\
  20247. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  20248. \**************************************************************************/
  20249. /*! no static exports found */
  20250. /***/ (function(module, exports, __webpack_require__) {
  20251. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  20252. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 367);
  20253. function _possibleConstructorReturn(self, call) {
  20254. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  20255. return call;
  20256. } else if (call !== void 0) {
  20257. throw new TypeError("Derived constructors may only return object or undefined");
  20258. }
  20259. return assertThisInitialized(self);
  20260. }
  20261. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20262. /***/ }),
  20263. /***/ 37:
  20264. /*!*********************************************************!*\
  20265. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/index.js ***!
  20266. \*********************************************************/
  20267. /*! no static exports found */
  20268. /***/ (function(module, exports, __webpack_require__) {
  20269. "use strict";
  20270. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20271. Object.defineProperty(exports, "__esModule", {
  20272. value: true
  20273. });
  20274. exports.default = void 0;
  20275. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  20276. var _pageLifetimes = __webpack_require__(/*! ./lifecycle/pageLifetimes */ 38);
  20277. var _clone = __webpack_require__(/*! ./methods/clone */ 39);
  20278. var _dataset = __webpack_require__(/*! ./methods/dataset */ 40);
  20279. var _escape = __webpack_require__(/*! ./methods/escape */ 41);
  20280. var _event = __webpack_require__(/*! ./methods/event */ 42);
  20281. var _getTabBar = __webpack_require__(/*! ./methods/getTabBar */ 43);
  20282. var _relation = __webpack_require__(/*! ./methods/relation */ 44);
  20283. var _selectComponent = __webpack_require__(/*! ./methods/selectComponent */ 45);
  20284. var _setData = __webpack_require__(/*! ./methods/setData */ 46);
  20285. 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; }
  20286. 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; }
  20287. var _default = {
  20288. install: function install(Vue, option) {
  20289. Vue.mixin(_objectSpread(_objectSpread({}, _pageLifetimes.pageLifetimes), {}, {
  20290. methods: {
  20291. clone: _clone.clone,
  20292. handleDataset: _dataset.handleDataset,
  20293. escape2Html: _escape.escape2Html,
  20294. html2Escape: _escape.html2Escape,
  20295. parseEventDynamicCode: _event.parseEventDynamicCode,
  20296. getTabBar: _getTabBar.getTabBar,
  20297. getRelationNodes: _relation.getRelationNodes,
  20298. zpSelectComponent: _selectComponent.selectComponent,
  20299. zpSelectAllComponents: _selectComponent.selectAllComponents,
  20300. setData: _setData.setData
  20301. }
  20302. }));
  20303. }
  20304. };
  20305. exports.default = _default;
  20306. /***/ }),
  20307. /***/ 370:
  20308. /*!***************************************************************!*\
  20309. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  20310. \***************************************************************/
  20311. /*! no static exports found */
  20312. /***/ (function(module, exports) {
  20313. function _getPrototypeOf(o) {
  20314. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  20315. return o.__proto__ || Object.getPrototypeOf(o);
  20316. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20317. return _getPrototypeOf(o);
  20318. }
  20319. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20320. /***/ }),
  20321. /***/ 371:
  20322. /*!****************************************************************!*\
  20323. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  20324. \****************************************************************/
  20325. /*! no static exports found */
  20326. /***/ (function(module, exports, __webpack_require__) {
  20327. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 370);
  20328. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  20329. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 372);
  20330. var construct = __webpack_require__(/*! ./construct.js */ 15);
  20331. function _wrapNativeSuper(Class) {
  20332. var _cache = typeof Map === "function" ? new Map() : undefined;
  20333. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  20334. if (Class === null || !isNativeFunction(Class)) return Class;
  20335. if (typeof Class !== "function") {
  20336. throw new TypeError("Super expression must either be null or a function");
  20337. }
  20338. if (typeof _cache !== "undefined") {
  20339. if (_cache.has(Class)) return _cache.get(Class);
  20340. _cache.set(Class, Wrapper);
  20341. }
  20342. function Wrapper() {
  20343. return construct(Class, arguments, getPrototypeOf(this).constructor);
  20344. }
  20345. Wrapper.prototype = Object.create(Class.prototype, {
  20346. constructor: {
  20347. value: Wrapper,
  20348. enumerable: false,
  20349. writable: true,
  20350. configurable: true
  20351. }
  20352. });
  20353. return setPrototypeOf(Wrapper, Class);
  20354. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20355. return _wrapNativeSuper(Class);
  20356. }
  20357. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20358. /***/ }),
  20359. /***/ 372:
  20360. /*!*****************************************************************!*\
  20361. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  20362. \*****************************************************************/
  20363. /*! no static exports found */
  20364. /***/ (function(module, exports) {
  20365. function _isNativeFunction(fn) {
  20366. try {
  20367. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  20368. } catch (e) {
  20369. return typeof fn === "function";
  20370. }
  20371. }
  20372. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20373. /***/ }),
  20374. /***/ 373:
  20375. /*!******************************************************************!*\
  20376. !*** E:/盈通/sulibao-mini/pages.json?{"type":"origin-pages-json"} ***!
  20377. \******************************************************************/
  20378. /*! no static exports found */
  20379. /***/ (function(module, exports, __webpack_require__) {
  20380. "use strict";
  20381. Object.defineProperty(exports, "__esModule", {
  20382. value: true
  20383. });
  20384. exports.default = void 0;
  20385. var _default = {
  20386. "easycom": {
  20387. "^tn-(.*)": "@/tuniao-ui/components/tn-$1/tn-$1.vue"
  20388. },
  20389. "pages": [{
  20390. "path": "pages/index/index",
  20391. "style": {
  20392. "navigationBarTitleText": "速立保"
  20393. }
  20394. }, {
  20395. "path": "pages/index/auth",
  20396. "style": {
  20397. "navigationBarTitleText": ""
  20398. }
  20399. }, {
  20400. "path": "pages/login/login",
  20401. "style": {
  20402. "navigationBarTitleText": "登录"
  20403. }
  20404. }, {
  20405. "path": "pages/login/info",
  20406. "style": {
  20407. "navigationBarTitleText": "用户协议"
  20408. }
  20409. }, {
  20410. "path": "pages/mine/need",
  20411. "style": {
  20412. "navigationBarTitleText": "我的需求"
  20413. }
  20414. }, {
  20415. "path": "pages/mine/share",
  20416. "style": {
  20417. "navigationBarTitleText": "我的供应"
  20418. }
  20419. }, {
  20420. "path": "pages/webview/web-view",
  20421. "style": {
  20422. "navigationBarTitleText": ""
  20423. }
  20424. }, {
  20425. "path": "pages/mine/coll",
  20426. "style": {
  20427. "navigationBarTitleText": "我的收藏"
  20428. }
  20429. }, {
  20430. "path": "pages/comm/search",
  20431. "style": {
  20432. "navigationBarTitleText": "搜索"
  20433. }
  20434. }, {
  20435. "path": "pages/mine/feedback",
  20436. "style": {
  20437. "navigationBarTitleText": "问题反馈",
  20438. "enablePullDownRefresh": true
  20439. }
  20440. }, {
  20441. "path": "pages/mine/addFeed",
  20442. "style": {
  20443. "navigationBarTitleText": "问题反馈"
  20444. }
  20445. }, {
  20446. "path": "pages/mine/about",
  20447. "style": {
  20448. "navigationBarTitleText": "了解速立保"
  20449. }
  20450. }, {
  20451. "path": "pages/comm/search2",
  20452. "style": {
  20453. "navigationBarTitleText": "搜索"
  20454. }
  20455. }, {
  20456. "path": "pages/index/detail/detail",
  20457. "style": {
  20458. "navigationBarTitleText": "详情"
  20459. }
  20460. }, {
  20461. "path": "pages/login/loginByCode",
  20462. "style": {
  20463. "navigationBarTitleText": "账号登录"
  20464. }
  20465. }, {
  20466. "path": "pages/home/home",
  20467. "style": {
  20468. "navigationBarTitleText": "我要什么"
  20469. }
  20470. }, {
  20471. "path": "pages/mine/mine",
  20472. "style": {
  20473. "navigationBarTitleText": "我的"
  20474. }
  20475. }, {
  20476. "path": "pages/comm/comm",
  20477. "style": {
  20478. "navigationBarTitleText": "我有什么"
  20479. }
  20480. }, {
  20481. "path": "pages/index/aichat",
  20482. "style": {
  20483. "navigationBarTitleText": "速立保AI",
  20484. "usingComponents": {
  20485. "agent-ui": "/components/agent-ui/index"
  20486. }
  20487. }
  20488. }],
  20489. "subPackages": [{
  20490. "root": "homePages",
  20491. "pages": []
  20492. }, {
  20493. "root": "circlePages",
  20494. "pages": [{
  20495. "path": "circle",
  20496. "style": {
  20497. "navigationBarTitleText": "晒帖子",
  20498. "enablePullDownRefresh": false
  20499. }
  20500. }, {
  20501. "path": "addShare",
  20502. "style": {
  20503. "navigationBarTitleText": "发布供应"
  20504. }
  20505. }]
  20506. }, {
  20507. "root": "minePages",
  20508. "pages": [{
  20509. "path": "set",
  20510. "style": {
  20511. "navigationBarTitleText": "设置",
  20512. "enablePullDownRefresh": false
  20513. }
  20514. }]
  20515. }],
  20516. "tabBar": {
  20517. "color": "#868585",
  20518. "selectedColor": "#005DA6",
  20519. "list": [{
  20520. "pagePath": "pages/index/index",
  20521. "text": "供需发布平台",
  20522. "iconPath": "static/ui/home.png",
  20523. "selectedIconPath": "static/ui/home1.png"
  20524. }, {
  20525. "pagePath": "pages/home/home",
  20526. "text": "我要什么",
  20527. "iconPath": "static/ui/need.png",
  20528. "selectedIconPath": "static/ui/need1.png"
  20529. }, {
  20530. "pagePath": "pages/comm/comm",
  20531. "text": "我有什么",
  20532. "iconPath": "static/ui/share.png",
  20533. "selectedIconPath": "static/ui/share1.png"
  20534. }, {
  20535. "pagePath": "pages/mine/mine",
  20536. "text": "我的",
  20537. "iconPath": "static/ui/me.png",
  20538. "selectedIconPath": "static/ui/me1.png"
  20539. }]
  20540. },
  20541. "globalStyle": {
  20542. "navigationStyle": "custom",
  20543. "navigationBarTextStyle": "black",
  20544. "navigationBarTitleText": "速立保",
  20545. "navigationBarBackgroundColor": "#fff",
  20546. "backgroundColor": "#F8F8F8"
  20547. }
  20548. };
  20549. exports.default = _default;
  20550. /***/ }),
  20551. /***/ 374:
  20552. /*!*****************************************************!*\
  20553. !*** E:/盈通/sulibao-mini/pages.json?{"type":"stat"} ***!
  20554. \*****************************************************/
  20555. /*! no static exports found */
  20556. /***/ (function(module, exports, __webpack_require__) {
  20557. "use strict";
  20558. Object.defineProperty(exports, "__esModule", {
  20559. value: true
  20560. });
  20561. exports.default = void 0;
  20562. var _default = {
  20563. "appid": "__UNI__1EF8770"
  20564. };
  20565. exports.default = _default;
  20566. /***/ }),
  20567. /***/ 38:
  20568. /*!***************************************************************************!*\
  20569. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/lifecycle/pageLifetimes.js ***!
  20570. \***************************************************************************/
  20571. /*! no static exports found */
  20572. /***/ (function(module, exports, __webpack_require__) {
  20573. "use strict";
  20574. Object.defineProperty(exports, "__esModule", {
  20575. value: true
  20576. });
  20577. exports.pageLifetimes = void 0;
  20578. /**
  20579. * 组件pageLifetimes处理,需在页面生命周期里调用
  20580. * @param {Object} node
  20581. * @param {Object} lifeName
  20582. */
  20583. function handlePageLifetime(node, lifeName) {
  20584. node.$children.map(function (child) {
  20585. if (typeof child[lifeName] == 'function') child[lifeName]();
  20586. handlePageLifetime(child, lifeName);
  20587. });
  20588. }
  20589. var pageLifetimes = {
  20590. onLoad: function onLoad() {
  20591. // uni.onWindowResize(CALLBACK) 监听窗口尺寸变化事件
  20592. // 平台差异说明
  20593. // App H5 微信小程序 支付宝小程序 百度小程序 抖音小程序 飞书小程序 QQ小程序
  20594. // √ √ √ x x x √ √
  20595. },
  20596. onShow: function onShow() {
  20597. handlePageLifetime(this, "handlePageShow");
  20598. },
  20599. onHide: function onHide() {
  20600. handlePageLifetime(this, "handlePageHide");
  20601. },
  20602. onResize: function onResize() {
  20603. //onResize 监听窗口尺寸变化 App、微信小程序、快手小程序
  20604. handlePageLifetime(this, "handlePageResize");
  20605. }
  20606. };
  20607. exports.pageLifetimes = pageLifetimes;
  20608. /***/ }),
  20609. /***/ 382:
  20610. /*!***********************************************************************************************************!*\
  20611. !*** E:/盈通/sulibao-mini/uni_modules/uni-file-picker/components/uni-file-picker/choose-and-upload-file.js ***!
  20612. \***********************************************************************************************************/
  20613. /*! no static exports found */
  20614. /***/ (function(module, exports, __webpack_require__) {
  20615. "use strict";
  20616. /* WEBPACK VAR INJECTION */(function(uni, wx, uniCloud) {
  20617. Object.defineProperty(exports, "__esModule", {
  20618. value: true
  20619. });
  20620. exports.chooseAndUploadFile = chooseAndUploadFile;
  20621. exports.uploadCloudFiles = uploadCloudFiles;
  20622. var ERR_MSG_OK = 'chooseAndUploadFile:ok';
  20623. var ERR_MSG_FAIL = 'chooseAndUploadFile:fail';
  20624. function chooseImage(opts) {
  20625. var count = opts.count,
  20626. _opts$sizeType = opts.sizeType,
  20627. sizeType = _opts$sizeType === void 0 ? ['original', 'compressed'] : _opts$sizeType,
  20628. sourceType = opts.sourceType,
  20629. extension = opts.extension;
  20630. return new Promise(function (resolve, reject) {
  20631. // 微信由于旧接口不再维护,针对微信小程序平台改用chooseMedia接口
  20632. uni.chooseMedia({
  20633. count: count,
  20634. sizeType: sizeType,
  20635. sourceType: sourceType,
  20636. mediaType: ['image'],
  20637. extension: extension,
  20638. success: function success(res) {
  20639. res.tempFiles.forEach(function (item) {
  20640. item.path = item.tempFilePath;
  20641. });
  20642. resolve(normalizeChooseAndUploadFileRes(res, 'image'));
  20643. },
  20644. fail: function fail(res) {
  20645. reject({
  20646. errMsg: res.errMsg.replace('chooseImage:fail', ERR_MSG_FAIL)
  20647. });
  20648. }
  20649. });
  20650. });
  20651. }
  20652. function chooseVideo(opts) {
  20653. var count = opts.count,
  20654. camera = opts.camera,
  20655. compressed = opts.compressed,
  20656. maxDuration = opts.maxDuration,
  20657. sourceType = opts.sourceType,
  20658. extension = opts.extension;
  20659. return new Promise(function (resolve, reject) {
  20660. // 微信由于旧接口不再维护,针对微信小程序平台改用chooseMedia接口
  20661. uni.chooseMedia({
  20662. count: count,
  20663. compressed: compressed,
  20664. maxDuration: maxDuration,
  20665. sourceType: sourceType,
  20666. extension: extension,
  20667. mediaType: ['video'],
  20668. success: function success(res) {
  20669. var tempFiles = res.tempFiles;
  20670. resolve(normalizeChooseAndUploadFileRes({
  20671. errMsg: 'chooseVideo:ok',
  20672. tempFiles: tempFiles.map(function (item) {
  20673. return {
  20674. name: item.name || '',
  20675. path: item.tempFilePath,
  20676. thumbTempFilePath: item.thumbTempFilePath,
  20677. size: item.size,
  20678. type: res.tempFile && res.tempFile.type || '',
  20679. width: item.width,
  20680. height: item.height,
  20681. duration: item.duration,
  20682. fileType: 'video',
  20683. cloudPath: ''
  20684. };
  20685. })
  20686. }, 'video'));
  20687. },
  20688. fail: function fail(res) {
  20689. reject({
  20690. errMsg: res.errMsg.replace('chooseVideo:fail', ERR_MSG_FAIL)
  20691. });
  20692. }
  20693. });
  20694. });
  20695. }
  20696. function chooseAll(opts) {
  20697. var count = opts.count,
  20698. extension = opts.extension;
  20699. return new Promise(function (resolve, reject) {
  20700. var chooseFile = uni.chooseFile;
  20701. if (typeof wx !== 'undefined' && typeof wx.chooseMessageFile === 'function') {
  20702. chooseFile = wx.chooseMessageFile;
  20703. }
  20704. if (typeof chooseFile !== 'function') {
  20705. return reject({
  20706. errMsg: ERR_MSG_FAIL + ' 请指定 type 类型,该平台仅支持选择 image 或 video。'
  20707. });
  20708. }
  20709. chooseFile({
  20710. type: 'all',
  20711. count: count,
  20712. extension: extension,
  20713. success: function success(res) {
  20714. resolve(normalizeChooseAndUploadFileRes(res));
  20715. },
  20716. fail: function fail(res) {
  20717. reject({
  20718. errMsg: res.errMsg.replace('chooseFile:fail', ERR_MSG_FAIL)
  20719. });
  20720. }
  20721. });
  20722. });
  20723. }
  20724. function normalizeChooseAndUploadFileRes(res, fileType) {
  20725. res.tempFiles.forEach(function (item, index) {
  20726. if (!item.name) {
  20727. item.name = item.path.substring(item.path.lastIndexOf('/') + 1);
  20728. }
  20729. if (fileType) {
  20730. item.fileType = fileType;
  20731. }
  20732. item.cloudPath = Date.now() + '_' + index + item.name.substring(item.name.lastIndexOf('.'));
  20733. });
  20734. if (!res.tempFilePaths) {
  20735. res.tempFilePaths = res.tempFiles.map(function (file) {
  20736. return file.path;
  20737. });
  20738. }
  20739. return res;
  20740. }
  20741. function uploadCloudFiles(files) {
  20742. var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
  20743. var _onUploadProgress = arguments.length > 2 ? arguments[2] : undefined;
  20744. files = JSON.parse(JSON.stringify(files));
  20745. var len = files.length;
  20746. var count = 0;
  20747. var self = this;
  20748. return new Promise(function (resolve) {
  20749. while (count < max) {
  20750. next();
  20751. }
  20752. function next() {
  20753. var cur = count++;
  20754. if (cur >= len) {
  20755. !files.find(function (item) {
  20756. return !item.url && !item.errMsg;
  20757. }) && resolve(files);
  20758. return;
  20759. }
  20760. var fileItem = files[cur];
  20761. var index = self.files.findIndex(function (v) {
  20762. return v.uuid === fileItem.uuid;
  20763. });
  20764. fileItem.url = '';
  20765. delete fileItem.errMsg;
  20766. uniCloud.uploadFile({
  20767. filePath: fileItem.path,
  20768. cloudPath: fileItem.cloudPath,
  20769. fileType: fileItem.fileType,
  20770. onUploadProgress: function onUploadProgress(res) {
  20771. res.index = index;
  20772. _onUploadProgress && _onUploadProgress(res);
  20773. }
  20774. }).then(function (res) {
  20775. fileItem.url = res.fileID;
  20776. fileItem.index = index;
  20777. if (cur < len) {
  20778. next();
  20779. }
  20780. }).catch(function (res) {
  20781. fileItem.errMsg = res.errMsg || res.message;
  20782. fileItem.index = index;
  20783. if (cur < len) {
  20784. next();
  20785. }
  20786. });
  20787. }
  20788. });
  20789. }
  20790. function uploadFiles(choosePromise, _ref) {
  20791. var onChooseFile = _ref.onChooseFile,
  20792. onUploadProgress = _ref.onUploadProgress;
  20793. return choosePromise.then(function (res) {
  20794. if (onChooseFile) {
  20795. var customChooseRes = onChooseFile(res);
  20796. if (typeof customChooseRes !== 'undefined') {
  20797. return Promise.resolve(customChooseRes).then(function (chooseRes) {
  20798. return typeof chooseRes === 'undefined' ? res : chooseRes;
  20799. });
  20800. }
  20801. }
  20802. return res;
  20803. }).then(function (res) {
  20804. if (res === false) {
  20805. return {
  20806. errMsg: ERR_MSG_OK,
  20807. tempFilePaths: [],
  20808. tempFiles: []
  20809. };
  20810. }
  20811. return res;
  20812. });
  20813. }
  20814. function chooseAndUploadFile() {
  20815. var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  20816. type: 'all'
  20817. };
  20818. if (opts.type === 'image') {
  20819. return uploadFiles(chooseImage(opts), opts);
  20820. } else if (opts.type === 'video') {
  20821. return uploadFiles(chooseVideo(opts), opts);
  20822. }
  20823. return uploadFiles(chooseAll(opts), opts);
  20824. }
  20825. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js */ 366)["default"]))
  20826. /***/ }),
  20827. /***/ 383:
  20828. /*!******************************************************************************************!*\
  20829. !*** E:/盈通/sulibao-mini/uni_modules/uni-file-picker/components/uni-file-picker/utils.js ***!
  20830. \******************************************************************************************/
  20831. /*! no static exports found */
  20832. /***/ (function(module, exports, __webpack_require__) {
  20833. "use strict";
  20834. /* WEBPACK VAR INJECTION */(function(uni) {
  20835. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20836. Object.defineProperty(exports, "__esModule", {
  20837. value: true
  20838. });
  20839. exports.get_files_and_is_max = exports.get_file_info = exports.get_file_ext = exports.get_file_data = exports.get_extname = void 0;
  20840. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 75));
  20841. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 77));
  20842. /**
  20843. * 获取文件名和后缀
  20844. * @param {String} name
  20845. */
  20846. var get_file_ext = function get_file_ext(name) {
  20847. var last_len = name.lastIndexOf('.');
  20848. var len = name.length;
  20849. return {
  20850. name: name.substring(0, last_len),
  20851. ext: name.substring(last_len + 1, len)
  20852. };
  20853. };
  20854. /**
  20855. * 获取扩展名
  20856. * @param {Array} fileExtname
  20857. */
  20858. exports.get_file_ext = get_file_ext;
  20859. var get_extname = function get_extname(fileExtname) {
  20860. if (!Array.isArray(fileExtname)) {
  20861. var extname = fileExtname.replace(/(\[|\])/g, '');
  20862. return extname.split(',');
  20863. } else {
  20864. return fileExtname;
  20865. }
  20866. return [];
  20867. };
  20868. /**
  20869. * 获取文件和检测是否可选
  20870. */
  20871. exports.get_extname = get_extname;
  20872. var get_files_and_is_max = function get_files_and_is_max(res, _extname) {
  20873. var filePaths = [];
  20874. var files = [];
  20875. if (!_extname || _extname.length === 0) {
  20876. return {
  20877. filePaths: filePaths,
  20878. files: files
  20879. };
  20880. }
  20881. res.tempFiles.forEach(function (v) {
  20882. var fileFullName = get_file_ext(v.name);
  20883. var extname = fileFullName.ext.toLowerCase();
  20884. if (_extname.indexOf(extname) !== -1) {
  20885. files.push(v);
  20886. filePaths.push(v.path);
  20887. }
  20888. });
  20889. if (files.length !== res.tempFiles.length) {
  20890. uni.showToast({
  20891. title: "\u5F53\u524D\u9009\u62E9\u4E86".concat(res.tempFiles.length, "\u4E2A\u6587\u4EF6 \uFF0C").concat(res.tempFiles.length - files.length, " \u4E2A\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E"),
  20892. icon: 'none',
  20893. duration: 5000
  20894. });
  20895. }
  20896. return {
  20897. filePaths: filePaths,
  20898. files: files
  20899. };
  20900. };
  20901. /**
  20902. * 获取图片信息
  20903. * @param {Object} filepath
  20904. */
  20905. exports.get_files_and_is_max = get_files_and_is_max;
  20906. var get_file_info = function get_file_info(filepath) {
  20907. return new Promise(function (resolve, reject) {
  20908. uni.getImageInfo({
  20909. src: filepath,
  20910. success: function success(res) {
  20911. resolve(res);
  20912. },
  20913. fail: function fail(err) {
  20914. reject(err);
  20915. }
  20916. });
  20917. });
  20918. };
  20919. /**
  20920. * 获取封装数据
  20921. */
  20922. exports.get_file_info = get_file_info;
  20923. var get_file_data = /*#__PURE__*/function () {
  20924. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(files) {
  20925. var type,
  20926. fileFullName,
  20927. extname,
  20928. filedata,
  20929. imageinfo,
  20930. _args = arguments;
  20931. return _regenerator.default.wrap(function _callee$(_context) {
  20932. while (1) {
  20933. switch (_context.prev = _context.next) {
  20934. case 0:
  20935. type = _args.length > 1 && _args[1] !== undefined ? _args[1] : 'image';
  20936. // 最终需要上传数据库的数据
  20937. fileFullName = get_file_ext(files.name);
  20938. extname = fileFullName.ext.toLowerCase();
  20939. filedata = {
  20940. name: files.name,
  20941. uuid: files.uuid,
  20942. extname: extname || '',
  20943. cloudPath: files.cloudPath,
  20944. fileType: files.fileType,
  20945. thumbTempFilePath: files.thumbTempFilePath,
  20946. url: files.path || files.path,
  20947. size: files.size,
  20948. //单位是字节
  20949. image: {},
  20950. path: files.path,
  20951. video: {}
  20952. };
  20953. if (!(type === 'image')) {
  20954. _context.next = 14;
  20955. break;
  20956. }
  20957. _context.next = 7;
  20958. return get_file_info(files.path);
  20959. case 7:
  20960. imageinfo = _context.sent;
  20961. delete filedata.video;
  20962. filedata.image.width = imageinfo.width;
  20963. filedata.image.height = imageinfo.height;
  20964. filedata.image.location = imageinfo.path;
  20965. _context.next = 15;
  20966. break;
  20967. case 14:
  20968. delete filedata.image;
  20969. case 15:
  20970. return _context.abrupt("return", filedata);
  20971. case 16:
  20972. case "end":
  20973. return _context.stop();
  20974. }
  20975. }
  20976. }, _callee);
  20977. }));
  20978. return function get_file_data(_x) {
  20979. return _ref.apply(this, arguments);
  20980. };
  20981. }();
  20982. exports.get_file_data = get_file_data;
  20983. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  20984. /***/ }),
  20985. /***/ 39:
  20986. /*!*****************************************************************!*\
  20987. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/methods/clone.js ***!
  20988. \*****************************************************************/
  20989. /*! no static exports found */
  20990. /***/ (function(module, exports, __webpack_require__) {
  20991. "use strict";
  20992. Object.defineProperty(exports, "__esModule", {
  20993. value: true
  20994. });
  20995. exports.clone = clone;
  20996. /**
  20997. * 用于处理对props进行赋值的情况
  20998. * //简单处理一下就行了
  20999. *
  21000. * @param {*} target
  21001. * @returns
  21002. */
  21003. function clone(target) {
  21004. return JSON.parse(JSON.stringify(target));
  21005. }
  21006. /***/ }),
  21007. /***/ 398:
  21008. /*!*********************************************************************************!*\
  21009. !*** E:/盈通/sulibao-mini/uni_modules/uni-forms/components/uni-forms/validate.js ***!
  21010. \*********************************************************************************/
  21011. /*! no static exports found */
  21012. /***/ (function(module, exports, __webpack_require__) {
  21013. "use strict";
  21014. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21015. Object.defineProperty(exports, "__esModule", {
  21016. value: true
  21017. });
  21018. exports.default = void 0;
  21019. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 75));
  21020. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 368));
  21021. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 369));
  21022. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 370));
  21023. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 77));
  21024. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  21025. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  21026. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  21027. 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); }; }
  21028. 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; } }
  21029. var pattern = {
  21030. email: /^\S+?@\S+?\.\S+?$/,
  21031. idcard: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
  21032. url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i')
  21033. };
  21034. var FORMAT_MAPPING = {
  21035. "int": 'integer',
  21036. "bool": 'boolean',
  21037. "double": 'number',
  21038. "long": 'number',
  21039. "password": 'string'
  21040. // "fileurls": 'array'
  21041. };
  21042. function formatMessage(args) {
  21043. var resources = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  21044. var defaultMessage = ['label'];
  21045. defaultMessage.forEach(function (item) {
  21046. if (args[item] === undefined) {
  21047. args[item] = '';
  21048. }
  21049. });
  21050. var str = resources;
  21051. for (var key in args) {
  21052. var reg = new RegExp('{' + key + '}');
  21053. str = str.replace(reg, args[key]);
  21054. }
  21055. return str;
  21056. }
  21057. function isEmptyValue(value, type) {
  21058. if (value === undefined || value === null) {
  21059. return true;
  21060. }
  21061. if (typeof value === 'string' && !value) {
  21062. return true;
  21063. }
  21064. if (Array.isArray(value) && !value.length) {
  21065. return true;
  21066. }
  21067. if (type === 'object' && !Object.keys(value).length) {
  21068. return true;
  21069. }
  21070. return false;
  21071. }
  21072. var types = {
  21073. integer: function integer(value) {
  21074. return types.number(value) && parseInt(value, 10) === value;
  21075. },
  21076. string: function string(value) {
  21077. return typeof value === 'string';
  21078. },
  21079. number: function number(value) {
  21080. if (isNaN(value)) {
  21081. return false;
  21082. }
  21083. return typeof value === 'number';
  21084. },
  21085. "boolean": function boolean(value) {
  21086. return typeof value === 'boolean';
  21087. },
  21088. "float": function float(value) {
  21089. return types.number(value) && !types.integer(value);
  21090. },
  21091. array: function array(value) {
  21092. return Array.isArray(value);
  21093. },
  21094. object: function object(value) {
  21095. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  21096. },
  21097. date: function date(value) {
  21098. return value instanceof Date;
  21099. },
  21100. timestamp: function timestamp(value) {
  21101. if (!this.integer(value) || Math.abs(value).toString().length > 16) {
  21102. return false;
  21103. }
  21104. return true;
  21105. },
  21106. file: function file(value) {
  21107. return typeof value.url === 'string';
  21108. },
  21109. email: function email(value) {
  21110. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  21111. },
  21112. url: function url(value) {
  21113. return typeof value === 'string' && !!value.match(pattern.url);
  21114. },
  21115. pattern: function pattern(reg, value) {
  21116. try {
  21117. return new RegExp(reg).test(value);
  21118. } catch (e) {
  21119. return false;
  21120. }
  21121. },
  21122. method: function method(value) {
  21123. return typeof value === 'function';
  21124. },
  21125. idcard: function idcard(value) {
  21126. return typeof value === 'string' && !!value.match(pattern.idcard);
  21127. },
  21128. 'url-https': function urlHttps(value) {
  21129. return this.url(value) && value.startsWith('https://');
  21130. },
  21131. 'url-scheme': function urlScheme(value) {
  21132. return value.startsWith('://');
  21133. },
  21134. 'url-web': function urlWeb(value) {
  21135. return false;
  21136. }
  21137. };
  21138. var RuleValidator = /*#__PURE__*/function () {
  21139. function RuleValidator(message) {
  21140. (0, _classCallCheck2.default)(this, RuleValidator);
  21141. this._message = message;
  21142. }
  21143. (0, _createClass2.default)(RuleValidator, [{
  21144. key: "validateRule",
  21145. value: function () {
  21146. var _validateRule = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(fieldKey, fieldValue, value, data, allData) {
  21147. var result, rules, hasRequired, message, i, rule, vt, now, resultExpr;
  21148. return _regenerator.default.wrap(function _callee$(_context) {
  21149. while (1) {
  21150. switch (_context.prev = _context.next) {
  21151. case 0:
  21152. result = null;
  21153. rules = fieldValue.rules;
  21154. hasRequired = rules.findIndex(function (item) {
  21155. return item.required;
  21156. });
  21157. if (!(hasRequired < 0)) {
  21158. _context.next = 8;
  21159. break;
  21160. }
  21161. if (!(value === null || value === undefined)) {
  21162. _context.next = 6;
  21163. break;
  21164. }
  21165. return _context.abrupt("return", result);
  21166. case 6:
  21167. if (!(typeof value === 'string' && !value.length)) {
  21168. _context.next = 8;
  21169. break;
  21170. }
  21171. return _context.abrupt("return", result);
  21172. case 8:
  21173. message = this._message;
  21174. if (!(rules === undefined)) {
  21175. _context.next = 11;
  21176. break;
  21177. }
  21178. return _context.abrupt("return", message['default']);
  21179. case 11:
  21180. i = 0;
  21181. case 12:
  21182. if (!(i < rules.length)) {
  21183. _context.next = 35;
  21184. break;
  21185. }
  21186. rule = rules[i];
  21187. vt = this._getValidateType(rule);
  21188. Object.assign(rule, {
  21189. label: fieldValue.label || "[\"".concat(fieldKey, "\"]")
  21190. });
  21191. if (!RuleValidatorHelper[vt]) {
  21192. _context.next = 20;
  21193. break;
  21194. }
  21195. result = RuleValidatorHelper[vt](rule, value, message);
  21196. if (!(result != null)) {
  21197. _context.next = 20;
  21198. break;
  21199. }
  21200. return _context.abrupt("break", 35);
  21201. case 20:
  21202. if (!rule.validateExpr) {
  21203. _context.next = 26;
  21204. break;
  21205. }
  21206. now = Date.now();
  21207. resultExpr = rule.validateExpr(value, allData, now);
  21208. if (!(resultExpr === false)) {
  21209. _context.next = 26;
  21210. break;
  21211. }
  21212. result = this._getMessage(rule, rule.errorMessage || this._message['default']);
  21213. return _context.abrupt("break", 35);
  21214. case 26:
  21215. if (!rule.validateFunction) {
  21216. _context.next = 32;
  21217. break;
  21218. }
  21219. _context.next = 29;
  21220. return this.validateFunction(rule, value, data, allData, vt);
  21221. case 29:
  21222. result = _context.sent;
  21223. if (!(result !== null)) {
  21224. _context.next = 32;
  21225. break;
  21226. }
  21227. return _context.abrupt("break", 35);
  21228. case 32:
  21229. i++;
  21230. _context.next = 12;
  21231. break;
  21232. case 35:
  21233. if (result !== null) {
  21234. result = message.TAG + result;
  21235. }
  21236. return _context.abrupt("return", result);
  21237. case 37:
  21238. case "end":
  21239. return _context.stop();
  21240. }
  21241. }
  21242. }, _callee, this);
  21243. }));
  21244. function validateRule(_x, _x2, _x3, _x4, _x5) {
  21245. return _validateRule.apply(this, arguments);
  21246. }
  21247. return validateRule;
  21248. }()
  21249. }, {
  21250. key: "validateFunction",
  21251. value: function () {
  21252. var _validateFunction = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(rule, value, data, allData, vt) {
  21253. var result, callbackMessage, res;
  21254. return _regenerator.default.wrap(function _callee2$(_context2) {
  21255. while (1) {
  21256. switch (_context2.prev = _context2.next) {
  21257. case 0:
  21258. result = null;
  21259. _context2.prev = 1;
  21260. callbackMessage = null;
  21261. _context2.next = 5;
  21262. return rule.validateFunction(rule, value, allData || data, function (message) {
  21263. callbackMessage = message;
  21264. });
  21265. case 5:
  21266. res = _context2.sent;
  21267. if (callbackMessage || typeof res === 'string' && res || res === false) {
  21268. result = this._getMessage(rule, callbackMessage || res, vt);
  21269. }
  21270. _context2.next = 12;
  21271. break;
  21272. case 9:
  21273. _context2.prev = 9;
  21274. _context2.t0 = _context2["catch"](1);
  21275. result = this._getMessage(rule, _context2.t0.message, vt);
  21276. case 12:
  21277. return _context2.abrupt("return", result);
  21278. case 13:
  21279. case "end":
  21280. return _context2.stop();
  21281. }
  21282. }
  21283. }, _callee2, this, [[1, 9]]);
  21284. }));
  21285. function validateFunction(_x6, _x7, _x8, _x9, _x10) {
  21286. return _validateFunction.apply(this, arguments);
  21287. }
  21288. return validateFunction;
  21289. }()
  21290. }, {
  21291. key: "_getMessage",
  21292. value: function _getMessage(rule, message, vt) {
  21293. return formatMessage(rule, message || rule.errorMessage || this._message[vt] || message['default']);
  21294. }
  21295. }, {
  21296. key: "_getValidateType",
  21297. value: function _getValidateType(rule) {
  21298. var result = '';
  21299. if (rule.required) {
  21300. result = 'required';
  21301. } else if (rule.format) {
  21302. result = 'format';
  21303. } else if (rule.arrayType) {
  21304. result = 'arrayTypeFormat';
  21305. } else if (rule.range) {
  21306. result = 'range';
  21307. } else if (rule.maximum !== undefined || rule.minimum !== undefined) {
  21308. result = 'rangeNumber';
  21309. } else if (rule.maxLength !== undefined || rule.minLength !== undefined) {
  21310. result = 'rangeLength';
  21311. } else if (rule.pattern) {
  21312. result = 'pattern';
  21313. } else if (rule.validateFunction) {
  21314. result = 'validateFunction';
  21315. }
  21316. return result;
  21317. }
  21318. }]);
  21319. return RuleValidator;
  21320. }();
  21321. var RuleValidatorHelper = {
  21322. required: function required(rule, value, message) {
  21323. if (rule.required && isEmptyValue(value, rule.format || (0, _typeof2.default)(value))) {
  21324. return formatMessage(rule, rule.errorMessage || message.required);
  21325. }
  21326. return null;
  21327. },
  21328. range: function range(rule, value, message) {
  21329. var range = rule.range,
  21330. errorMessage = rule.errorMessage;
  21331. var list = new Array(range.length);
  21332. for (var i = 0; i < range.length; i++) {
  21333. var item = range[i];
  21334. if (types.object(item) && item.value !== undefined) {
  21335. list[i] = item.value;
  21336. } else {
  21337. list[i] = item;
  21338. }
  21339. }
  21340. var result = false;
  21341. if (Array.isArray(value)) {
  21342. result = new Set(value.concat(list)).size === list.length;
  21343. } else {
  21344. if (list.indexOf(value) > -1) {
  21345. result = true;
  21346. }
  21347. }
  21348. if (!result) {
  21349. return formatMessage(rule, errorMessage || message['enum']);
  21350. }
  21351. return null;
  21352. },
  21353. rangeNumber: function rangeNumber(rule, value, message) {
  21354. if (!types.number(value)) {
  21355. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  21356. }
  21357. var minimum = rule.minimum,
  21358. maximum = rule.maximum,
  21359. exclusiveMinimum = rule.exclusiveMinimum,
  21360. exclusiveMaximum = rule.exclusiveMaximum;
  21361. var min = exclusiveMinimum ? value <= minimum : value < minimum;
  21362. var max = exclusiveMaximum ? value >= maximum : value > maximum;
  21363. if (minimum !== undefined && min) {
  21364. return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMinimum ? 'exclusiveMinimum' : 'minimum']);
  21365. } else if (maximum !== undefined && max) {
  21366. return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMaximum ? 'exclusiveMaximum' : 'maximum']);
  21367. } else if (minimum !== undefined && maximum !== undefined && (min || max)) {
  21368. return formatMessage(rule, rule.errorMessage || message['number'].range);
  21369. }
  21370. return null;
  21371. },
  21372. rangeLength: function rangeLength(rule, value, message) {
  21373. if (!types.string(value) && !types.array(value)) {
  21374. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  21375. }
  21376. var min = rule.minLength;
  21377. var max = rule.maxLength;
  21378. var val = value.length;
  21379. if (min !== undefined && val < min) {
  21380. return formatMessage(rule, rule.errorMessage || message['length'].minLength);
  21381. } else if (max !== undefined && val > max) {
  21382. return formatMessage(rule, rule.errorMessage || message['length'].maxLength);
  21383. } else if (min !== undefined && max !== undefined && (val < min || val > max)) {
  21384. return formatMessage(rule, rule.errorMessage || message['length'].range);
  21385. }
  21386. return null;
  21387. },
  21388. pattern: function pattern(rule, value, message) {
  21389. if (!types['pattern'](rule.pattern, value)) {
  21390. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  21391. }
  21392. return null;
  21393. },
  21394. format: function format(rule, value, message) {
  21395. var customTypes = Object.keys(types);
  21396. var format = FORMAT_MAPPING[rule.format] ? FORMAT_MAPPING[rule.format] : rule.format || rule.arrayType;
  21397. if (customTypes.indexOf(format) > -1) {
  21398. if (!types[format](value)) {
  21399. return formatMessage(rule, rule.errorMessage || message.typeError);
  21400. }
  21401. }
  21402. return null;
  21403. },
  21404. arrayTypeFormat: function arrayTypeFormat(rule, value, message) {
  21405. if (!Array.isArray(value)) {
  21406. return formatMessage(rule, rule.errorMessage || message.typeError);
  21407. }
  21408. for (var i = 0; i < value.length; i++) {
  21409. var element = value[i];
  21410. var formatResult = this.format(rule, element, message);
  21411. if (formatResult !== null) {
  21412. return formatResult;
  21413. }
  21414. }
  21415. return null;
  21416. }
  21417. };
  21418. var SchemaValidator = /*#__PURE__*/function (_RuleValidator) {
  21419. (0, _inherits2.default)(SchemaValidator, _RuleValidator);
  21420. var _super = _createSuper(SchemaValidator);
  21421. function SchemaValidator(schema, options) {
  21422. var _this;
  21423. (0, _classCallCheck2.default)(this, SchemaValidator);
  21424. _this = _super.call(this, SchemaValidator.message);
  21425. _this._schema = schema;
  21426. _this._options = options || null;
  21427. return _this;
  21428. }
  21429. (0, _createClass2.default)(SchemaValidator, [{
  21430. key: "updateSchema",
  21431. value: function updateSchema(schema) {
  21432. this._schema = schema;
  21433. }
  21434. }, {
  21435. key: "validate",
  21436. value: function () {
  21437. var _validate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data, allData) {
  21438. var result;
  21439. return _regenerator.default.wrap(function _callee3$(_context3) {
  21440. while (1) {
  21441. switch (_context3.prev = _context3.next) {
  21442. case 0:
  21443. result = this._checkFieldInSchema(data);
  21444. if (result) {
  21445. _context3.next = 5;
  21446. break;
  21447. }
  21448. _context3.next = 4;
  21449. return this.invokeValidate(data, false, allData);
  21450. case 4:
  21451. result = _context3.sent;
  21452. case 5:
  21453. return _context3.abrupt("return", result.length ? result[0] : null);
  21454. case 6:
  21455. case "end":
  21456. return _context3.stop();
  21457. }
  21458. }
  21459. }, _callee3, this);
  21460. }));
  21461. function validate(_x11, _x12) {
  21462. return _validate.apply(this, arguments);
  21463. }
  21464. return validate;
  21465. }()
  21466. }, {
  21467. key: "validateAll",
  21468. value: function () {
  21469. var _validateAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data, allData) {
  21470. var result;
  21471. return _regenerator.default.wrap(function _callee4$(_context4) {
  21472. while (1) {
  21473. switch (_context4.prev = _context4.next) {
  21474. case 0:
  21475. result = this._checkFieldInSchema(data);
  21476. if (result) {
  21477. _context4.next = 5;
  21478. break;
  21479. }
  21480. _context4.next = 4;
  21481. return this.invokeValidate(data, true, allData);
  21482. case 4:
  21483. result = _context4.sent;
  21484. case 5:
  21485. return _context4.abrupt("return", result);
  21486. case 6:
  21487. case "end":
  21488. return _context4.stop();
  21489. }
  21490. }
  21491. }, _callee4, this);
  21492. }));
  21493. function validateAll(_x13, _x14) {
  21494. return _validateAll.apply(this, arguments);
  21495. }
  21496. return validateAll;
  21497. }()
  21498. }, {
  21499. key: "validateUpdate",
  21500. value: function () {
  21501. var _validateUpdate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data, allData) {
  21502. var result;
  21503. return _regenerator.default.wrap(function _callee5$(_context5) {
  21504. while (1) {
  21505. switch (_context5.prev = _context5.next) {
  21506. case 0:
  21507. result = this._checkFieldInSchema(data);
  21508. if (result) {
  21509. _context5.next = 5;
  21510. break;
  21511. }
  21512. _context5.next = 4;
  21513. return this.invokeValidateUpdate(data, false, allData);
  21514. case 4:
  21515. result = _context5.sent;
  21516. case 5:
  21517. return _context5.abrupt("return", result.length ? result[0] : null);
  21518. case 6:
  21519. case "end":
  21520. return _context5.stop();
  21521. }
  21522. }
  21523. }, _callee5, this);
  21524. }));
  21525. function validateUpdate(_x15, _x16) {
  21526. return _validateUpdate.apply(this, arguments);
  21527. }
  21528. return validateUpdate;
  21529. }()
  21530. }, {
  21531. key: "invokeValidate",
  21532. value: function () {
  21533. var _invokeValidate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(data, all, allData) {
  21534. var result, schema, key, value, errorMessage;
  21535. return _regenerator.default.wrap(function _callee6$(_context6) {
  21536. while (1) {
  21537. switch (_context6.prev = _context6.next) {
  21538. case 0:
  21539. result = [];
  21540. schema = this._schema;
  21541. _context6.t0 = _regenerator.default.keys(schema);
  21542. case 3:
  21543. if ((_context6.t1 = _context6.t0()).done) {
  21544. _context6.next = 15;
  21545. break;
  21546. }
  21547. key = _context6.t1.value;
  21548. value = schema[key];
  21549. _context6.next = 8;
  21550. return this.validateRule(key, value, data[key], data, allData);
  21551. case 8:
  21552. errorMessage = _context6.sent;
  21553. if (!(errorMessage != null)) {
  21554. _context6.next = 13;
  21555. break;
  21556. }
  21557. result.push({
  21558. key: key,
  21559. errorMessage: errorMessage
  21560. });
  21561. if (all) {
  21562. _context6.next = 13;
  21563. break;
  21564. }
  21565. return _context6.abrupt("break", 15);
  21566. case 13:
  21567. _context6.next = 3;
  21568. break;
  21569. case 15:
  21570. return _context6.abrupt("return", result);
  21571. case 16:
  21572. case "end":
  21573. return _context6.stop();
  21574. }
  21575. }
  21576. }, _callee6, this);
  21577. }));
  21578. function invokeValidate(_x17, _x18, _x19) {
  21579. return _invokeValidate.apply(this, arguments);
  21580. }
  21581. return invokeValidate;
  21582. }()
  21583. }, {
  21584. key: "invokeValidateUpdate",
  21585. value: function () {
  21586. var _invokeValidateUpdate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(data, all, allData) {
  21587. var result, key, errorMessage;
  21588. return _regenerator.default.wrap(function _callee7$(_context7) {
  21589. while (1) {
  21590. switch (_context7.prev = _context7.next) {
  21591. case 0:
  21592. result = [];
  21593. _context7.t0 = _regenerator.default.keys(data);
  21594. case 2:
  21595. if ((_context7.t1 = _context7.t0()).done) {
  21596. _context7.next = 13;
  21597. break;
  21598. }
  21599. key = _context7.t1.value;
  21600. _context7.next = 6;
  21601. return this.validateRule(key, this._schema[key], data[key], data, allData);
  21602. case 6:
  21603. errorMessage = _context7.sent;
  21604. if (!(errorMessage != null)) {
  21605. _context7.next = 11;
  21606. break;
  21607. }
  21608. result.push({
  21609. key: key,
  21610. errorMessage: errorMessage
  21611. });
  21612. if (all) {
  21613. _context7.next = 11;
  21614. break;
  21615. }
  21616. return _context7.abrupt("break", 13);
  21617. case 11:
  21618. _context7.next = 2;
  21619. break;
  21620. case 13:
  21621. return _context7.abrupt("return", result);
  21622. case 14:
  21623. case "end":
  21624. return _context7.stop();
  21625. }
  21626. }
  21627. }, _callee7, this);
  21628. }));
  21629. function invokeValidateUpdate(_x20, _x21, _x22) {
  21630. return _invokeValidateUpdate.apply(this, arguments);
  21631. }
  21632. return invokeValidateUpdate;
  21633. }()
  21634. }, {
  21635. key: "_checkFieldInSchema",
  21636. value: function _checkFieldInSchema(data) {
  21637. var keys = Object.keys(data);
  21638. var keys2 = Object.keys(this._schema);
  21639. if (new Set(keys.concat(keys2)).size === keys2.length) {
  21640. return '';
  21641. }
  21642. var noExistFields = keys.filter(function (key) {
  21643. return keys2.indexOf(key) < 0;
  21644. });
  21645. var errorMessage = formatMessage({
  21646. field: JSON.stringify(noExistFields)
  21647. }, SchemaValidator.message.TAG + SchemaValidator.message['defaultInvalid']);
  21648. return [{
  21649. key: 'invalid',
  21650. errorMessage: errorMessage
  21651. }];
  21652. }
  21653. }]);
  21654. return SchemaValidator;
  21655. }(RuleValidator);
  21656. function Message() {
  21657. return {
  21658. TAG: "",
  21659. default: '验证错误',
  21660. defaultInvalid: '提交的字段{field}在数据库中并不存在',
  21661. validateFunction: '验证无效',
  21662. required: '{label}必填',
  21663. 'enum': '{label}超出范围',
  21664. timestamp: '{label}格式无效',
  21665. whitespace: '{label}不能为空',
  21666. typeError: '{label}类型无效',
  21667. date: {
  21668. format: '{label}日期{value}格式无效',
  21669. parse: '{label}日期无法解析,{value}无效',
  21670. invalid: '{label}日期{value}无效'
  21671. },
  21672. length: {
  21673. minLength: '{label}长度不能少于{minLength}',
  21674. maxLength: '{label}长度不能超过{maxLength}',
  21675. range: '{label}必须介于{minLength}和{maxLength}之间'
  21676. },
  21677. number: {
  21678. minimum: '{label}不能小于{minimum}',
  21679. maximum: '{label}不能大于{maximum}',
  21680. exclusiveMinimum: '{label}不能小于等于{minimum}',
  21681. exclusiveMaximum: '{label}不能大于等于{maximum}',
  21682. range: '{label}必须介于{minimum}and{maximum}之间'
  21683. },
  21684. pattern: {
  21685. mismatch: '{label}格式不匹配'
  21686. }
  21687. };
  21688. }
  21689. SchemaValidator.message = new Message();
  21690. var _default = SchemaValidator;
  21691. exports.default = _default;
  21692. /***/ }),
  21693. /***/ 399:
  21694. /*!******************************************************************************!*\
  21695. !*** E:/盈通/sulibao-mini/uni_modules/uni-forms/components/uni-forms/utils.js ***!
  21696. \******************************************************************************/
  21697. /*! no static exports found */
  21698. /***/ (function(module, exports, __webpack_require__) {
  21699. "use strict";
  21700. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21701. Object.defineProperty(exports, "__esModule", {
  21702. value: true
  21703. });
  21704. exports.typeFilter = exports.type = exports.setDataValue = exports.realName = exports.rawData = exports.objSet = exports.objGet = exports.name2arr = exports.isRequiredField = exports.isRealName = exports.isNumber = exports.isEqual = exports.isBoolean = exports.getValue = exports.getDataValueType = exports.getDataValue = exports.deepCopy = void 0;
  21705. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  21706. /**
  21707. * 简单处理对象拷贝
  21708. * @param {Obejct} 被拷贝对象
  21709. * @@return {Object} 拷贝对象
  21710. */
  21711. var deepCopy = function deepCopy(val) {
  21712. return JSON.parse(JSON.stringify(val));
  21713. };
  21714. /**
  21715. * 过滤数字类型
  21716. * @param {String} format 数字类型
  21717. * @@return {Boolean} 返回是否为数字类型
  21718. */
  21719. exports.deepCopy = deepCopy;
  21720. var typeFilter = function typeFilter(format) {
  21721. return format === 'int' || format === 'double' || format === 'number' || format === 'timestamp';
  21722. };
  21723. /**
  21724. * 把 value 转换成指定的类型,用于处理初始值,原因是初始值需要入库不能为 undefined
  21725. * @param {String} key 字段名
  21726. * @param {any} value 字段值
  21727. * @param {Object} rules 表单校验规则
  21728. */
  21729. exports.typeFilter = typeFilter;
  21730. var getValue = function getValue(key, value, rules) {
  21731. var isRuleNumType = rules.find(function (val) {
  21732. return val.format && typeFilter(val.format);
  21733. });
  21734. var isRuleBoolType = rules.find(function (val) {
  21735. return val.format && val.format === 'boolean' || val.format === 'bool';
  21736. });
  21737. // 输入类型为 number
  21738. if (!!isRuleNumType) {
  21739. if (!value && value !== 0) {
  21740. value = null;
  21741. } else {
  21742. value = isNumber(Number(value)) ? Number(value) : value;
  21743. }
  21744. }
  21745. // 输入类型为 boolean
  21746. if (!!isRuleBoolType) {
  21747. value = isBoolean(value) ? value : false;
  21748. }
  21749. return value;
  21750. };
  21751. /**
  21752. * 获取表单数据
  21753. * @param {String|Array} name 真实名称,需要使用 realName 获取
  21754. * @param {Object} data 原始数据
  21755. * @param {any} value 需要设置的值
  21756. */
  21757. exports.getValue = getValue;
  21758. var setDataValue = function setDataValue(field, formdata, value) {
  21759. formdata[field] = value;
  21760. return value || '';
  21761. };
  21762. /**
  21763. * 获取表单数据
  21764. * @param {String|Array} field 真实名称,需要使用 realName 获取
  21765. * @param {Object} data 原始数据
  21766. */
  21767. exports.setDataValue = setDataValue;
  21768. var getDataValue = function getDataValue(field, data) {
  21769. return objGet(data, field);
  21770. };
  21771. /**
  21772. * 获取表单类型
  21773. * @param {String|Array} field 真实名称,需要使用 realName 获取
  21774. */
  21775. exports.getDataValue = getDataValue;
  21776. var getDataValueType = function getDataValueType(field, data) {
  21777. var value = getDataValue(field, data);
  21778. return {
  21779. type: type(value),
  21780. value: value
  21781. };
  21782. };
  21783. /**
  21784. * 获取表单可用的真实name
  21785. * @param {String|Array} name 表单name
  21786. * @@return {String} 表单可用的真实name
  21787. */
  21788. exports.getDataValueType = getDataValueType;
  21789. var realName = function realName(name) {
  21790. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21791. var base_name = _basePath(name);
  21792. if ((0, _typeof2.default)(base_name) === 'object' && Array.isArray(base_name) && base_name.length > 1) {
  21793. var realname = base_name.reduce(function (a, b) {
  21794. return a += "#".concat(b);
  21795. }, '_formdata_');
  21796. return realname;
  21797. }
  21798. return base_name[0] || name;
  21799. };
  21800. /**
  21801. * 判断是否表单可用的真实name
  21802. * @param {String|Array} name 表单name
  21803. * @@return {String} 表单可用的真实name
  21804. */
  21805. exports.realName = realName;
  21806. var isRealName = function isRealName(name) {
  21807. var reg = /^_formdata_#*/;
  21808. return reg.test(name);
  21809. };
  21810. /**
  21811. * 获取表单数据的原始格式
  21812. * @@return {Object|Array} object 需要解析的数据
  21813. */
  21814. exports.isRealName = isRealName;
  21815. var rawData = function rawData() {
  21816. var object = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  21817. var name = arguments.length > 1 ? arguments[1] : undefined;
  21818. var newData = JSON.parse(JSON.stringify(object));
  21819. var formData = {};
  21820. for (var i in newData) {
  21821. var path = name2arr(i);
  21822. objSet(formData, path, newData[i]);
  21823. }
  21824. return formData;
  21825. };
  21826. /**
  21827. * 真实name还原为 array
  21828. * @param {*} name
  21829. */
  21830. exports.rawData = rawData;
  21831. var name2arr = function name2arr(name) {
  21832. var field = name.replace('_formdata_#', '');
  21833. field = field.split('#').map(function (v) {
  21834. return isNumber(v) ? Number(v) : v;
  21835. });
  21836. return field;
  21837. };
  21838. /**
  21839. * 对象中设置值
  21840. * @param {Object|Array} object 源数据
  21841. * @param {String| Array} path 'a.b.c' 或 ['a',0,'b','c']
  21842. * @param {String} value 需要设置的值
  21843. */
  21844. exports.name2arr = name2arr;
  21845. var objSet = function objSet(object, path, value) {
  21846. if ((0, _typeof2.default)(object) !== 'object') return object;
  21847. _basePath(path).reduce(function (o, k, i, _) {
  21848. if (i === _.length - 1) {
  21849. // 若遍历结束直接赋值
  21850. o[k] = value;
  21851. return null;
  21852. } else if (k in o) {
  21853. // 若存在对应路径,则返回找到的对象,进行下一次遍历
  21854. return o[k];
  21855. } else {
  21856. // 若不存在对应路径,则创建对应对象,若下一路径是数字,新对象赋值为空数组,否则赋值为空对象
  21857. o[k] = /^[0-9]{1,}$/.test(_[i + 1]) ? [] : {};
  21858. return o[k];
  21859. }
  21860. }, object);
  21861. // 返回object
  21862. return object;
  21863. };
  21864. // 处理 path, path有三种形式:'a[0].b.c'、'a.0.b.c' 和 ['a','0','b','c'],需要统一处理成数组,便于后续使用
  21865. exports.objSet = objSet;
  21866. function _basePath(path) {
  21867. // 若是数组,则直接返回
  21868. if (Array.isArray(path)) return path;
  21869. // 若有 '[',']',则替换成将 '[' 替换成 '.',去掉 ']'
  21870. return path.replace(/\[/g, '.').replace(/\]/g, '').split('.');
  21871. }
  21872. /**
  21873. * 从对象中获取值
  21874. * @param {Object|Array} object 源数据
  21875. * @param {String| Array} path 'a.b.c' 或 ['a',0,'b','c']
  21876. * @param {String} defaultVal 如果无法从调用链中获取值的默认值
  21877. */
  21878. var objGet = function objGet(object, path) {
  21879. var defaultVal = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'undefined';
  21880. // 先将path处理成统一格式
  21881. var newPath = _basePath(path);
  21882. // 递归处理,返回最后结果
  21883. var val = newPath.reduce(function (o, k) {
  21884. return (o || {})[k];
  21885. }, object);
  21886. return !val || val !== undefined ? val : defaultVal;
  21887. };
  21888. /**
  21889. * 是否为 number 类型
  21890. * @param {any} num 需要判断的值
  21891. * @return {Boolean} 是否为 number
  21892. */
  21893. exports.objGet = objGet;
  21894. var isNumber = function isNumber(num) {
  21895. return !isNaN(Number(num));
  21896. };
  21897. /**
  21898. * 是否为 boolean 类型
  21899. * @param {any} bool 需要判断的值
  21900. * @return {Boolean} 是否为 boolean
  21901. */
  21902. exports.isNumber = isNumber;
  21903. var isBoolean = function isBoolean(bool) {
  21904. return typeof bool === 'boolean';
  21905. };
  21906. /**
  21907. * 是否有必填字段
  21908. * @param {Object} rules 规则
  21909. * @return {Boolean} 是否有必填字段
  21910. */
  21911. exports.isBoolean = isBoolean;
  21912. var isRequiredField = function isRequiredField(rules) {
  21913. var isNoField = false;
  21914. for (var i = 0; i < rules.length; i++) {
  21915. var ruleData = rules[i];
  21916. if (ruleData.required) {
  21917. isNoField = true;
  21918. break;
  21919. }
  21920. }
  21921. return isNoField;
  21922. };
  21923. /**
  21924. * 获取数据类型
  21925. * @param {Any} obj 需要获取数据类型的值
  21926. */
  21927. exports.isRequiredField = isRequiredField;
  21928. var type = function type(obj) {
  21929. var class2type = {};
  21930. // 生成class2type映射
  21931. "Boolean Number String Function Array Date RegExp Object Error".split(" ").map(function (item, index) {
  21932. class2type["[object " + item + "]"] = item.toLowerCase();
  21933. });
  21934. if (obj == null) {
  21935. return obj + "";
  21936. }
  21937. return (0, _typeof2.default)(obj) === "object" || typeof obj === "function" ? class2type[Object.prototype.toString.call(obj)] || "object" : (0, _typeof2.default)(obj);
  21938. };
  21939. /**
  21940. * 判断两个值是否相等
  21941. * @param {any} a 值
  21942. * @param {any} b 值
  21943. * @return {Boolean} 是否相等
  21944. */
  21945. exports.type = type;
  21946. var isEqual = function isEqual(a, b) {
  21947. //如果a和b本来就全等
  21948. if (a === b) {
  21949. //判断是否为0和-0
  21950. return a !== 0 || 1 / a === 1 / b;
  21951. }
  21952. //判断是否为null和undefined
  21953. if (a == null || b == null) {
  21954. return a === b;
  21955. }
  21956. //接下来判断a和b的数据类型
  21957. var classNameA = toString.call(a),
  21958. classNameB = toString.call(b);
  21959. //如果数据类型不相等,则返回false
  21960. if (classNameA !== classNameB) {
  21961. return false;
  21962. }
  21963. //如果数据类型相等,再根据不同数据类型分别判断
  21964. switch (classNameA) {
  21965. case '[object RegExp]':
  21966. case '[object String]':
  21967. //进行字符串转换比较
  21968. return '' + a === '' + b;
  21969. case '[object Number]':
  21970. //进行数字转换比较,判断是否为NaN
  21971. if (+a !== +a) {
  21972. return +b !== +b;
  21973. }
  21974. //判断是否为0或-0
  21975. return +a === 0 ? 1 / +a === 1 / b : +a === +b;
  21976. case '[object Date]':
  21977. case '[object Boolean]':
  21978. return +a === +b;
  21979. }
  21980. //如果是对象类型
  21981. if (classNameA == '[object Object]') {
  21982. //获取a和b的属性长度
  21983. var propsA = Object.getOwnPropertyNames(a),
  21984. propsB = Object.getOwnPropertyNames(b);
  21985. if (propsA.length != propsB.length) {
  21986. return false;
  21987. }
  21988. for (var i = 0; i < propsA.length; i++) {
  21989. var propName = propsA[i];
  21990. //如果对应属性对应值不相等,则返回false
  21991. if (a[propName] !== b[propName]) {
  21992. return false;
  21993. }
  21994. }
  21995. return true;
  21996. }
  21997. //如果是数组类型
  21998. if (classNameA == '[object Array]') {
  21999. if (a.toString() == b.toString()) {
  22000. return true;
  22001. }
  22002. return false;
  22003. }
  22004. };
  22005. exports.isEqual = isEqual;
  22006. /***/ }),
  22007. /***/ 4:
  22008. /*!**********************************************************************!*\
  22009. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  22010. \**********************************************************************/
  22011. /*! no static exports found */
  22012. /***/ (function(module, exports) {
  22013. function _interopRequireDefault(obj) {
  22014. return obj && obj.__esModule ? obj : {
  22015. "default": obj
  22016. };
  22017. }
  22018. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22019. /***/ }),
  22020. /***/ 40:
  22021. /*!*******************************************************************!*\
  22022. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/methods/dataset.js ***!
  22023. \*******************************************************************/
  22024. /*! no static exports found */
  22025. /***/ (function(module, exports, __webpack_require__) {
  22026. "use strict";
  22027. Object.defineProperty(exports, "__esModule", {
  22028. value: true
  22029. });
  22030. exports.handleDataset = handleDataset;
  22031. /**
  22032. * 用于处理dataset
  22033. * 自定义组件的事件里,是获取不到e.currentTarget.dataset的
  22034. * 因此收集data-参数,手动传进去
  22035. *
  22036. * @param {*} event
  22037. * @param {*} dataSet
  22038. */
  22039. function handleDataset(event) {
  22040. var dataSet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  22041. if (event && !event.currentTarget) {
  22042. if (dataSet.tagId) {
  22043. event.currentTarget = {
  22044. id: dataSet.tagId
  22045. };
  22046. } else {
  22047. event.currentTarget = {
  22048. dataset: dataSet
  22049. };
  22050. }
  22051. }
  22052. }
  22053. /***/ }),
  22054. /***/ 41:
  22055. /*!******************************************************************!*\
  22056. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/methods/escape.js ***!
  22057. \******************************************************************/
  22058. /*! no static exports found */
  22059. /***/ (function(module, exports, __webpack_require__) {
  22060. "use strict";
  22061. Object.defineProperty(exports, "__esModule", {
  22062. value: true
  22063. });
  22064. exports.escape2Html = escape2Html;
  22065. exports.html2Escape = html2Escape;
  22066. /**
  22067. * 转义符换成普通字符
  22068. * @param {*} str
  22069. * @returns
  22070. */
  22071. function escape2Html(str) {
  22072. if (!str) return str;
  22073. var arrEntities = {
  22074. 'lt': '<',
  22075. 'gt': '>',
  22076. 'nbsp': ' ',
  22077. 'amp': '&',
  22078. 'quot': '"'
  22079. };
  22080. return str.replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) {
  22081. return arrEntities[t];
  22082. });
  22083. }
  22084. /**
  22085. * 普通字符转换成转义符
  22086. * @param {*} sHtml
  22087. * @returns
  22088. */
  22089. function html2Escape(sHtml) {
  22090. if (!sHtml) return sHtml;
  22091. return sHtml.replace(/[<>&"]/g, function (c) {
  22092. return {
  22093. '<': '&lt;',
  22094. '>': '&gt;',
  22095. '&': '&amp;',
  22096. '"': '&quot;'
  22097. }[c];
  22098. });
  22099. }
  22100. /***/ }),
  22101. /***/ 414:
  22102. /*!*******************************************************!*\
  22103. !*** E:/盈通/sulibao-mini/components/agent-ui/tools.js ***!
  22104. \*******************************************************/
  22105. /*! no static exports found */
  22106. /***/ (function(module, exports, __webpack_require__) {
  22107. "use strict";
  22108. /* WEBPACK VAR INJECTION */(function(wx) {
  22109. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22110. Object.defineProperty(exports, "__esModule", {
  22111. value: true
  22112. });
  22113. exports.checkConfig = exports.ThrottleFn = void 0;
  22114. exports.randomSelectInitquestion = randomSelectInitquestion;
  22115. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  22116. var checkConfig = function checkConfig(chatMode, agentConfig, modelConfig) {
  22117. var _ref = agentConfig || {},
  22118. botId = _ref.botId;
  22119. var _ref2 = modelConfig || {},
  22120. modelProvider = _ref2.modelProvider,
  22121. quickResponseModel = _ref2.quickResponseModel,
  22122. deepReasoningModel = _ref2.deepReasoningModel;
  22123. // 检测AI能力,不存在提示用户
  22124. if (!wx.cloud.extend || !wx.cloud.extend.AI) {
  22125. return [false, '使用AI能力需基础库为3.7.7及以上,请升级基础库版本或微信客户端'];
  22126. }
  22127. if (!['bot', 'model'].includes(chatMode)) {
  22128. return [false, 'chatMode 不正确,值应为“bot”或“model”'];
  22129. }
  22130. if (chatMode === 'bot' && !botId) {
  22131. return [false, '当前chatMode值为bot,请配置botId'];
  22132. }
  22133. if (chatMode === 'model' && (!modelProvider || !quickResponseModel)) {
  22134. return [false, '当前chatMode值为model,请配置modelProvider和quickResponseModel'];
  22135. }
  22136. return [true, ''];
  22137. };
  22138. // 随机选取三个问题
  22139. exports.checkConfig = checkConfig;
  22140. function randomSelectInitquestion() {
  22141. var question = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  22142. var num = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
  22143. if (question.length <= num) {
  22144. return (0, _toConsumableArray2.default)(question);
  22145. }
  22146. var set = new Set();
  22147. while (set.size < num) {
  22148. var randomIndex = Math.floor(Math.random() * question.length);
  22149. set.add(question[randomIndex]);
  22150. }
  22151. return Array.from(set);
  22152. }
  22153. function Throttle() {
  22154. var timer = null;
  22155. return function (fn) {
  22156. if (!timer) {
  22157. timer = setTimeout(function () {
  22158. fn();
  22159. timer = null;
  22160. }, 50);
  22161. }
  22162. };
  22163. }
  22164. // 频繁渲染会阻塞UI线程,这里节流一下
  22165. var ThrottleFn = Throttle();
  22166. exports.ThrottleFn = ThrottleFn;
  22167. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  22168. /***/ }),
  22169. /***/ 415:
  22170. /*!*****************************************************!*\
  22171. !*** E:/盈通/sulibao-mini/components/agent-ui/md5.js ***!
  22172. \*****************************************************/
  22173. /*! no static exports found */
  22174. /***/ (function(module, exports, __webpack_require__) {
  22175. var __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  22176. !function (n) {
  22177. 'use strict';
  22178. function d(n, t) {
  22179. var r = (65535 & n) + (65535 & t);
  22180. return (n >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r;
  22181. }
  22182. function f(n, t, r, e, o, u) {
  22183. return d(function (n, t) {
  22184. return n << t | n >>> 32 - t;
  22185. }(d(d(t, n), d(e, u)), o), r);
  22186. }
  22187. function l(n, t, r, e, o, u, c) {
  22188. return f(t & r | ~t & e, n, t, o, u, c);
  22189. }
  22190. function g(n, t, r, e, o, u, c) {
  22191. return f(t & e | r & ~e, n, t, o, u, c);
  22192. }
  22193. function v(n, t, r, e, o, u, c) {
  22194. return f(t ^ r ^ e, n, t, o, u, c);
  22195. }
  22196. function m(n, t, r, e, o, u, c) {
  22197. return f(r ^ (t | ~e), n, t, o, u, c);
  22198. }
  22199. function i(n, t) {
  22200. var r;
  22201. var e;
  22202. var o;
  22203. var u;
  22204. var c;
  22205. n[t >> 5] |= 128 << t % 32;
  22206. n[14 + (t + 64 >>> 9 << 4)] = t;
  22207. var f = 1732584193;
  22208. var i = -271733879;
  22209. var a = -1732584194;
  22210. var h = 271733878;
  22211. for (r = 0; r < n.length; r += 16) {
  22212. i = m(i = m(i = m(i = m(i = v(i = v(i = v(i = v(i = g(i = g(i = g(i = g(i = l(i = l(i = l(i = l(o = i, a = l(u = a, h = l(c = h, f = l(e = f, i, a, h, n[r], 7, -680876936), i, a, n[r + 1], 12, -389564586), f, i, n[r + 2], 17, 606105819), h, f, n[r + 3], 22, -1044525330), a = l(a, h = l(h, f = l(f, i, a, h, n[r + 4], 7, -176418897), i, a, n[r + 5], 12, 1200080426), f, i, n[r + 6], 17, -1473231341), h, f, n[r + 7], 22, -45705983), a = l(a, h = l(h, f = l(f, i, a, h, n[r + 8], 7, 1770035416), i, a, n[r + 9], 12, -1958414417), f, i, n[r + 10], 17, -42063), h, f, n[r + 11], 22, -1990404162), a = l(a, h = l(h, f = l(f, i, a, h, n[r + 12], 7, 1804603682), i, a, n[r + 13], 12, -40341101), f, i, n[r + 14], 17, -1502002290), h, f, n[r + 15], 22, 1236535329), a = g(a, h = g(h, f = g(f, i, a, h, n[r + 1], 5, -165796510), i, a, n[r + 6], 9, -1069501632), f, i, n[r + 11], 14, 643717713), h, f, n[r], 20, -373897302), a = g(a, h = g(h, f = g(f, i, a, h, n[r + 5], 5, -701558691), i, a, n[r + 10], 9, 38016083), f, i, n[r + 15], 14, -660478335), h, f, n[r + 4], 20, -405537848), a = g(a, h = g(h, f = g(f, i, a, h, n[r + 9], 5, 568446438), i, a, n[r + 14], 9, -1019803690), f, i, n[r + 3], 14, -187363961), h, f, n[r + 8], 20, 1163531501), a = g(a, h = g(h, f = g(f, i, a, h, n[r + 13], 5, -1444681467), i, a, n[r + 2], 9, -51403784), f, i, n[r + 7], 14, 1735328473), h, f, n[r + 12], 20, -1926607734), a = v(a, h = v(h, f = v(f, i, a, h, n[r + 5], 4, -378558), i, a, n[r + 8], 11, -2022574463), f, i, n[r + 11], 16, 1839030562), h, f, n[r + 14], 23, -35309556), a = v(a, h = v(h, f = v(f, i, a, h, n[r + 1], 4, -1530992060), i, a, n[r + 4], 11, 1272893353), f, i, n[r + 7], 16, -155497632), h, f, n[r + 10], 23, -1094730640), a = v(a, h = v(h, f = v(f, i, a, h, n[r + 13], 4, 681279174), i, a, n[r], 11, -358537222), f, i, n[r + 3], 16, -722521979), h, f, n[r + 6], 23, 76029189), a = v(a, h = v(h, f = v(f, i, a, h, n[r + 9], 4, -640364487), i, a, n[r + 12], 11, -421815835), f, i, n[r + 15], 16, 530742520), h, f, n[r + 2], 23, -995338651), a = m(a, h = m(h, f = m(f, i, a, h, n[r], 6, -198630844), i, a, n[r + 7], 10, 1126891415), f, i, n[r + 14], 15, -1416354905), h, f, n[r + 5], 21, -57434055), a = m(a, h = m(h, f = m(f, i, a, h, n[r + 12], 6, 1700485571), i, a, n[r + 3], 10, -1894986606), f, i, n[r + 10], 15, -1051523), h, f, n[r + 1], 21, -2054922799), a = m(a, h = m(h, f = m(f, i, a, h, n[r + 8], 6, 1873313359), i, a, n[r + 15], 10, -30611744), f, i, n[r + 6], 15, -1560198380), h, f, n[r + 13], 21, 1309151649), a = m(a, h = m(h, f = m(f, i, a, h, n[r + 4], 6, -145523070), i, a, n[r + 11], 10, -1120210379), f, i, n[r + 2], 15, 718787259), h, f, n[r + 9], 21, -343485551);
  22213. f = d(f, e);
  22214. i = d(i, o);
  22215. a = d(a, u);
  22216. h = d(h, c);
  22217. }
  22218. return [f, i, a, h];
  22219. }
  22220. function a(n) {
  22221. var t;
  22222. var r = '';
  22223. var e = 32 * n.length;
  22224. for (t = 0; t < e; t += 8) {
  22225. r += String.fromCharCode(n[t >> 5] >>> t % 32 & 255);
  22226. }
  22227. return r;
  22228. }
  22229. function h(n) {
  22230. var t;
  22231. var r = [];
  22232. for (r[(n.length >> 2) - 1] = void 0, t = 0; t < r.length; t += 1) {
  22233. r[t] = 0;
  22234. }
  22235. var e = 8 * n.length;
  22236. for (t = 0; t < e; t += 8) {
  22237. r[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32;
  22238. }
  22239. return r;
  22240. }
  22241. function e(n) {
  22242. var t;
  22243. var r;
  22244. var e = '0123456789abcdef';
  22245. var o = '';
  22246. for (r = 0; r < n.length; r += 1) {
  22247. t = n.charCodeAt(r);
  22248. o += e.charAt(t >>> 4 & 15) + e.charAt(15 & t);
  22249. }
  22250. return o;
  22251. }
  22252. function r(n) {
  22253. return unescape(encodeURIComponent(n));
  22254. }
  22255. function o(n) {
  22256. return function (n) {
  22257. return a(i(h(n), 8 * n.length));
  22258. }(r(n));
  22259. }
  22260. function u(n, t) {
  22261. return function (n, t) {
  22262. var r;
  22263. var e;
  22264. var o = h(n);
  22265. var u = [];
  22266. var c = [];
  22267. for (u[15] = c[15] = void 0, 16 < o.length && (o = i(o, 8 * n.length)), r = 0; r < 16; r += 1) {
  22268. u[r] = 909522486 ^ o[r];
  22269. c[r] = 1549556828 ^ o[r];
  22270. }
  22271. e = i(u.concat(h(t)), 512 + 8 * t.length);
  22272. return a(i(c.concat(e), 640));
  22273. }(r(n), r(t));
  22274. }
  22275. function t(n, t, r) {
  22276. return t ? r ? u(t, n) : function (n, t) {
  22277. return e(u(n, t));
  22278. }(t, n) : r ? o(n) : function (n) {
  22279. return e(o(n));
  22280. }(n);
  22281. }
  22282. true ? !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  22283. return t;
  22284. }).call(exports, __webpack_require__, exports, module),
  22285. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
  22286. }(this);
  22287. /***/ }),
  22288. /***/ 42:
  22289. /*!*****************************************************************!*\
  22290. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/methods/event.js ***!
  22291. \*****************************************************************/
  22292. /*! no static exports found */
  22293. /***/ (function(module, exports, __webpack_require__) {
  22294. "use strict";
  22295. Object.defineProperty(exports, "__esModule", {
  22296. value: true
  22297. });
  22298. exports.parseEventDynamicCode = parseEventDynamicCode;
  22299. /**
  22300. * 解析事件里的动态函数名,这种没有()的函数名,在uniapp不被执行
  22301. * 比如:<view bindtap="{{openId==undefined?'denglu':'hy_to'}}">立即</view>
  22302. * @param {*} exp
  22303. */
  22304. function parseEventDynamicCode(e, exp) {
  22305. if (typeof this[exp] === 'function') {
  22306. this[exp](e);
  22307. }
  22308. }
  22309. /***/ }),
  22310. /***/ 43:
  22311. /*!*********************************************************************!*\
  22312. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/methods/getTabBar.js ***!
  22313. \*********************************************************************/
  22314. /*! no static exports found */
  22315. /***/ (function(module, exports, __webpack_require__) {
  22316. "use strict";
  22317. Object.defineProperty(exports, "__esModule", {
  22318. value: true
  22319. });
  22320. exports.getTabBar = getTabBar;
  22321. /**
  22322. * 接管getTabBar函数,默认uni-app是没有这个函数的
  22323. * 适用于使用custom-tab-bar自定义导航栏的小程序项目
  22324. * 需注意:
  22325. * 1.custom-tab-bar下面仍是小程序文件
  22326. * 2.pages.json里面需使用条件编译区分好小程序和非小程序的tabBar配置
  22327. */
  22328. function getTabBar() {
  22329. return {
  22330. setData: function setData(obj) {
  22331. var _this$$mp, _this$$mp$page, _this$$mp2, _this$$mp2$page;
  22332. if (typeof ((_this$$mp = this.$mp) === null || _this$$mp === void 0 ? void 0 : (_this$$mp$page = _this$$mp.page) === null || _this$$mp$page === void 0 ? void 0 : _this$$mp$page.getTabBar) === 'function' && (_this$$mp2 = this.$mp) !== null && _this$$mp2 !== void 0 && (_this$$mp2$page = _this$$mp2.page) !== null && _this$$mp2$page !== void 0 && _this$$mp2$page.getTabBar()) {
  22333. this.$mp.page.getTabBar().setData(obj);
  22334. } else {
  22335. console.log("当前平台不支持getTabBar(),已稍作处理,详细请参见相关文档。");
  22336. }
  22337. }
  22338. };
  22339. }
  22340. /***/ }),
  22341. /***/ 44:
  22342. /*!********************************************************************!*\
  22343. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/methods/relation.js ***!
  22344. \********************************************************************/
  22345. /*! no static exports found */
  22346. /***/ (function(module, exports, __webpack_require__) {
  22347. "use strict";
  22348. Object.defineProperty(exports, "__esModule", {
  22349. value: true
  22350. });
  22351. exports.getRelationNodes = getRelationNodes;
  22352. /**
  22353. * 组件间关系
  22354. * 注意:须与p-f-unicom配合使用!!!
  22355. * @param {*} name
  22356. * @returns
  22357. */
  22358. function getRelationNodes(name) {
  22359. if (!this.$unicom) throw "this.getRelationNodes()需与p-f-unicom配合使用!";
  22360. return this.$unicom('@' + name);
  22361. }
  22362. /***/ }),
  22363. /***/ 45:
  22364. /*!***************************************************************************!*\
  22365. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/methods/selectComponent.js ***!
  22366. \***************************************************************************/
  22367. /*! no static exports found */
  22368. /***/ (function(module, exports, __webpack_require__) {
  22369. "use strict";
  22370. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22371. Object.defineProperty(exports, "__esModule", {
  22372. value: true
  22373. });
  22374. exports.selectAllComponents = selectAllComponents;
  22375. exports.selectComponent = selectComponent;
  22376. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  22377. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  22378. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  22379. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  22380. var createTraverse = function createTraverse() {
  22381. var stop = false;
  22382. return function traverse(root, callback) {
  22383. if (!stop && typeof callback === 'function') {
  22384. var children = root.$children;
  22385. for (var index = 0; !stop && index < children.length; index++) {
  22386. var element = children[index];
  22387. stop = callback(element) === true;
  22388. traverse(element, callback);
  22389. }
  22390. }
  22391. };
  22392. };
  22393. /**
  22394. * 安全的JSON.stringify
  22395. * @param {Object} node
  22396. */
  22397. function safeStringify(node) {
  22398. var cache = [];
  22399. var str = JSON.stringify(node, function (key, value) {
  22400. if ((0, _typeof2.default)(value) === 'object' && value !== null) {
  22401. if (cache.indexOf(value) !== -1) {
  22402. // 移除
  22403. return;
  22404. }
  22405. // 收集所有的值
  22406. cache.push(value);
  22407. }
  22408. return value;
  22409. });
  22410. cache = null; // 清空变量,便于垃圾回收机制回收
  22411. return str;
  22412. }
  22413. var match = function match(node, selector) {
  22414. var _vnode$context$$vnode, _vnode, _vnode$context;
  22415. var vnode = node._vnode;
  22416. //好家伙,在微信小程序里,node里面根本找不到class,因此这种方式没法搞了
  22417. //关键之处!
  22418. // console.log("attrs", (vnode.context.$vnode.data));
  22419. vnode = (_vnode$context$$vnode = (_vnode = vnode) === null || _vnode === void 0 ? void 0 : (_vnode$context = _vnode.context) === null || _vnode$context === void 0 ? void 0 : _vnode$context.$vnode) !== null && _vnode$context$$vnode !== void 0 ? _vnode$context$$vnode : "";
  22420. //console.log(vnode.data) --> [Object] {"staticClass":"bar","attrs":{"_i":0}} at selectComponent.js:72
  22421. if (!vnode || !vnode.data) {
  22422. return false;
  22423. }
  22424. var attrs = vnode.data.attrs || {};
  22425. var staticClass = vnode.data.staticClass || '';
  22426. var id = attrs.id || '';
  22427. if (selector[0] === '#') {
  22428. return selector.substr(1) === id;
  22429. } else {
  22430. staticClass = staticClass.trim().split(' ');
  22431. selector = selector.substr(1).split('.');
  22432. return selector.reduce(function (a, c) {
  22433. return a && staticClass.includes(c);
  22434. }, true);
  22435. }
  22436. };
  22437. var selectorBuilder = function selectorBuilder(selector) {
  22438. selector = selector.replace(/>>>/g, '>');
  22439. selector = selector.split('>').map(function (s) {
  22440. return s.trim().split(' ').join("').descendant('");
  22441. }).join("').child('");
  22442. // 替换掉new Function方式,因为小程序不支持new Function和eval
  22443. //return new Function('Selector', 'node', 'all', `return new Selector(node, all).descendant('` + selector + `')`);
  22444. return function (Selector, node, all) {
  22445. return new Selector(node, all).descendant(selector);
  22446. };
  22447. };
  22448. var Selector = /*#__PURE__*/function () {
  22449. function Selector(node) {
  22450. var all = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  22451. (0, _classCallCheck2.default)(this, Selector);
  22452. this.nodes = [node];
  22453. this.all = all;
  22454. }
  22455. (0, _createClass2.default)(Selector, [{
  22456. key: "child",
  22457. value: function child(selector) {
  22458. var matches = [];
  22459. if (this.all) {
  22460. this.nodes.forEach(function (node) {
  22461. var _matches;
  22462. (_matches = matches).push.apply(_matches, (0, _toConsumableArray2.default)(node.$children.filter(function (node) {
  22463. return match(node, selector);
  22464. })));
  22465. });
  22466. } else {
  22467. if (this.nodes.length > 0) {
  22468. var node = this.nodes[0].$children.find(function (node) {
  22469. return match(node, selector);
  22470. });
  22471. matches = node ? [node] : [];
  22472. }
  22473. }
  22474. this.nodes = matches;
  22475. return this;
  22476. }
  22477. }, {
  22478. key: "descendant",
  22479. value: function descendant(selector) {
  22480. var _this = this;
  22481. var matches = [];
  22482. this.nodes.forEach(function (root) {
  22483. createTraverse()(root, function (node) {
  22484. if (match(node, selector)) {
  22485. matches.push(node);
  22486. return !_this.all;
  22487. }
  22488. });
  22489. });
  22490. this.nodes = matches;
  22491. return this;
  22492. }
  22493. }]);
  22494. return Selector;
  22495. }(); ////////////////////////////////////////////selectComponent//////////////////////////////////////////////////
  22496. /**
  22497. * 其他平台,如APP
  22498. * @param {Object} selector
  22499. */
  22500. function selectComponentOther(selector) {
  22501. var selectors = selector.split(',').map(function (s) {
  22502. return s.trim();
  22503. });
  22504. if (!selectors[0]) {
  22505. return null;
  22506. }
  22507. var querySelector = selectorBuilder(selectors[0]);
  22508. return querySelector(Selector, this, false, selector).nodes[0];
  22509. }
  22510. /**
  22511. * 还是用这个微信小程序的实现吧
  22512. * @param {Object} selector
  22513. */
  22514. var selectComponentWeiXin2 = function selectComponentWeiXin2(selector) {
  22515. var _this$$scope$selectCo;
  22516. console.log(".$scope", this.$scope.selectComponent(selector));
  22517. return ((_this$$scope$selectCo = this.$scope.selectComponent(selector)) === null || _this$$scope$selectCo === void 0 ? void 0 : _this$$scope$selectCo.data) || undefined;
  22518. };
  22519. /**
  22520. * selectComponent
  22521. * @param {Object} args
  22522. */
  22523. function selectComponent(args) {
  22524. // console.log(".$scope",this.$scope)
  22525. //H5和小程序能正常使用这个函数
  22526. //重写selectComponent函数,因为默认会多一层$vm
  22527. return selectComponentWeiXin2.call(this, args);
  22528. }
  22529. ////////////////////////////////////////////selectAllComponents//////////////////////////////////////////////////
  22530. /**
  22531. * 其他平台,如APP
  22532. * @param {Object} selector
  22533. */
  22534. function selectAllComponentsOther(selector) {
  22535. var _this2 = this;
  22536. var selectors = selector.split(',').map(function (s) {
  22537. return s.trim();
  22538. });
  22539. var selected = [];
  22540. selectors.forEach(function (selector) {
  22541. var querySelector = selectorBuilder(selector);
  22542. selected = selected.concat(querySelector(Selector, _this2, true, selector).nodes);
  22543. });
  22544. return selected;
  22545. }
  22546. /**
  22547. * 还是用这个微信小程序的实现吧
  22548. * @param {Object} selector
  22549. */
  22550. var selectAllComponentsWeiXin2 = function selectAllComponentsWeiXin2(selector) {
  22551. var list = this.$scope.selectAllComponents(selector) || [];
  22552. list = list.map(function (item) {
  22553. return item.data;
  22554. });
  22555. return list;
  22556. };
  22557. /**
  22558. * selectAllComponents
  22559. * @param {Object} args
  22560. */
  22561. function selectAllComponents(args) {
  22562. //H5和小程序能正常使用这个函数
  22563. //重写selectComponent函数,因为默认会多一层$vm
  22564. return selectAllComponentsWeiXin2.call(this, args);
  22565. }
  22566. /***/ }),
  22567. /***/ 458:
  22568. /*!******************************************************************************************!*\
  22569. !*** E:/盈通/sulibao-mini/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js ***!
  22570. \******************************************************************************************/
  22571. /*! no static exports found */
  22572. /***/ (function(module, exports, __webpack_require__) {
  22573. "use strict";
  22574. Object.defineProperty(exports, "__esModule", {
  22575. value: true
  22576. });
  22577. exports.fontData = void 0;
  22578. var fontData = [{
  22579. "font_class": "arrow-down",
  22580. "unicode": "\uE6BE"
  22581. }, {
  22582. "font_class": "arrow-left",
  22583. "unicode": "\uE6BC"
  22584. }, {
  22585. "font_class": "arrow-right",
  22586. "unicode": "\uE6BB"
  22587. }, {
  22588. "font_class": "arrow-up",
  22589. "unicode": "\uE6BD"
  22590. }, {
  22591. "font_class": "auth",
  22592. "unicode": "\uE6AB"
  22593. }, {
  22594. "font_class": "auth-filled",
  22595. "unicode": "\uE6CC"
  22596. }, {
  22597. "font_class": "back",
  22598. "unicode": "\uE6B9"
  22599. }, {
  22600. "font_class": "bars",
  22601. "unicode": "\uE627"
  22602. }, {
  22603. "font_class": "calendar",
  22604. "unicode": "\uE6A0"
  22605. }, {
  22606. "font_class": "calendar-filled",
  22607. "unicode": "\uE6C0"
  22608. }, {
  22609. "font_class": "camera",
  22610. "unicode": "\uE65A"
  22611. }, {
  22612. "font_class": "camera-filled",
  22613. "unicode": "\uE658"
  22614. }, {
  22615. "font_class": "cart",
  22616. "unicode": "\uE631"
  22617. }, {
  22618. "font_class": "cart-filled",
  22619. "unicode": "\uE6D0"
  22620. }, {
  22621. "font_class": "chat",
  22622. "unicode": "\uE65D"
  22623. }, {
  22624. "font_class": "chat-filled",
  22625. "unicode": "\uE659"
  22626. }, {
  22627. "font_class": "chatboxes",
  22628. "unicode": "\uE696"
  22629. }, {
  22630. "font_class": "chatboxes-filled",
  22631. "unicode": "\uE692"
  22632. }, {
  22633. "font_class": "chatbubble",
  22634. "unicode": "\uE697"
  22635. }, {
  22636. "font_class": "chatbubble-filled",
  22637. "unicode": "\uE694"
  22638. }, {
  22639. "font_class": "checkbox",
  22640. "unicode": "\uE62B"
  22641. }, {
  22642. "font_class": "checkbox-filled",
  22643. "unicode": "\uE62C"
  22644. }, {
  22645. "font_class": "checkmarkempty",
  22646. "unicode": "\uE65C"
  22647. }, {
  22648. "font_class": "circle",
  22649. "unicode": "\uE65B"
  22650. }, {
  22651. "font_class": "circle-filled",
  22652. "unicode": "\uE65E"
  22653. }, {
  22654. "font_class": "clear",
  22655. "unicode": "\uE66D"
  22656. }, {
  22657. "font_class": "close",
  22658. "unicode": "\uE673"
  22659. }, {
  22660. "font_class": "closeempty",
  22661. "unicode": "\uE66C"
  22662. }, {
  22663. "font_class": "cloud-download",
  22664. "unicode": "\uE647"
  22665. }, {
  22666. "font_class": "cloud-download-filled",
  22667. "unicode": "\uE646"
  22668. }, {
  22669. "font_class": "cloud-upload",
  22670. "unicode": "\uE645"
  22671. }, {
  22672. "font_class": "cloud-upload-filled",
  22673. "unicode": "\uE648"
  22674. }, {
  22675. "font_class": "color",
  22676. "unicode": "\uE6CF"
  22677. }, {
  22678. "font_class": "color-filled",
  22679. "unicode": "\uE6C9"
  22680. }, {
  22681. "font_class": "compose",
  22682. "unicode": "\uE67F"
  22683. }, {
  22684. "font_class": "contact",
  22685. "unicode": "\uE693"
  22686. }, {
  22687. "font_class": "contact-filled",
  22688. "unicode": "\uE695"
  22689. }, {
  22690. "font_class": "down",
  22691. "unicode": "\uE6B8"
  22692. }, {
  22693. "font_class": "bottom",
  22694. "unicode": "\uE6B8"
  22695. }, {
  22696. "font_class": "download",
  22697. "unicode": "\uE68D"
  22698. }, {
  22699. "font_class": "download-filled",
  22700. "unicode": "\uE681"
  22701. }, {
  22702. "font_class": "email",
  22703. "unicode": "\uE69E"
  22704. }, {
  22705. "font_class": "email-filled",
  22706. "unicode": "\uE69A"
  22707. }, {
  22708. "font_class": "eye",
  22709. "unicode": "\uE651"
  22710. }, {
  22711. "font_class": "eye-filled",
  22712. "unicode": "\uE66A"
  22713. }, {
  22714. "font_class": "eye-slash",
  22715. "unicode": "\uE6B3"
  22716. }, {
  22717. "font_class": "eye-slash-filled",
  22718. "unicode": "\uE6B4"
  22719. }, {
  22720. "font_class": "fire",
  22721. "unicode": "\uE6A1"
  22722. }, {
  22723. "font_class": "fire-filled",
  22724. "unicode": "\uE6C5"
  22725. }, {
  22726. "font_class": "flag",
  22727. "unicode": "\uE65F"
  22728. }, {
  22729. "font_class": "flag-filled",
  22730. "unicode": "\uE660"
  22731. }, {
  22732. "font_class": "folder-add",
  22733. "unicode": "\uE6A9"
  22734. }, {
  22735. "font_class": "folder-add-filled",
  22736. "unicode": "\uE6C8"
  22737. }, {
  22738. "font_class": "font",
  22739. "unicode": "\uE6A3"
  22740. }, {
  22741. "font_class": "forward",
  22742. "unicode": "\uE6BA"
  22743. }, {
  22744. "font_class": "gear",
  22745. "unicode": "\uE664"
  22746. }, {
  22747. "font_class": "gear-filled",
  22748. "unicode": "\uE661"
  22749. }, {
  22750. "font_class": "gift",
  22751. "unicode": "\uE6A4"
  22752. }, {
  22753. "font_class": "gift-filled",
  22754. "unicode": "\uE6C4"
  22755. }, {
  22756. "font_class": "hand-down",
  22757. "unicode": "\uE63D"
  22758. }, {
  22759. "font_class": "hand-down-filled",
  22760. "unicode": "\uE63C"
  22761. }, {
  22762. "font_class": "hand-up",
  22763. "unicode": "\uE63F"
  22764. }, {
  22765. "font_class": "hand-up-filled",
  22766. "unicode": "\uE63E"
  22767. }, {
  22768. "font_class": "headphones",
  22769. "unicode": "\uE630"
  22770. }, {
  22771. "font_class": "heart",
  22772. "unicode": "\uE639"
  22773. }, {
  22774. "font_class": "heart-filled",
  22775. "unicode": "\uE641"
  22776. }, {
  22777. "font_class": "help",
  22778. "unicode": "\uE679"
  22779. }, {
  22780. "font_class": "help-filled",
  22781. "unicode": "\uE674"
  22782. }, {
  22783. "font_class": "home",
  22784. "unicode": "\uE662"
  22785. }, {
  22786. "font_class": "home-filled",
  22787. "unicode": "\uE663"
  22788. }, {
  22789. "font_class": "image",
  22790. "unicode": "\uE670"
  22791. }, {
  22792. "font_class": "image-filled",
  22793. "unicode": "\uE678"
  22794. }, {
  22795. "font_class": "images",
  22796. "unicode": "\uE650"
  22797. }, {
  22798. "font_class": "images-filled",
  22799. "unicode": "\uE64B"
  22800. }, {
  22801. "font_class": "info",
  22802. "unicode": "\uE669"
  22803. }, {
  22804. "font_class": "info-filled",
  22805. "unicode": "\uE649"
  22806. }, {
  22807. "font_class": "left",
  22808. "unicode": "\uE6B7"
  22809. }, {
  22810. "font_class": "link",
  22811. "unicode": "\uE6A5"
  22812. }, {
  22813. "font_class": "list",
  22814. "unicode": "\uE644"
  22815. }, {
  22816. "font_class": "location",
  22817. "unicode": "\uE6AE"
  22818. }, {
  22819. "font_class": "location-filled",
  22820. "unicode": "\uE6AF"
  22821. }, {
  22822. "font_class": "locked",
  22823. "unicode": "\uE66B"
  22824. }, {
  22825. "font_class": "locked-filled",
  22826. "unicode": "\uE668"
  22827. }, {
  22828. "font_class": "loop",
  22829. "unicode": "\uE633"
  22830. }, {
  22831. "font_class": "mail-open",
  22832. "unicode": "\uE643"
  22833. }, {
  22834. "font_class": "mail-open-filled",
  22835. "unicode": "\uE63A"
  22836. }, {
  22837. "font_class": "map",
  22838. "unicode": "\uE667"
  22839. }, {
  22840. "font_class": "map-filled",
  22841. "unicode": "\uE666"
  22842. }, {
  22843. "font_class": "map-pin",
  22844. "unicode": "\uE6AD"
  22845. }, {
  22846. "font_class": "map-pin-ellipse",
  22847. "unicode": "\uE6AC"
  22848. }, {
  22849. "font_class": "medal",
  22850. "unicode": "\uE6A2"
  22851. }, {
  22852. "font_class": "medal-filled",
  22853. "unicode": "\uE6C3"
  22854. }, {
  22855. "font_class": "mic",
  22856. "unicode": "\uE671"
  22857. }, {
  22858. "font_class": "mic-filled",
  22859. "unicode": "\uE677"
  22860. }, {
  22861. "font_class": "micoff",
  22862. "unicode": "\uE67E"
  22863. }, {
  22864. "font_class": "micoff-filled",
  22865. "unicode": "\uE6B0"
  22866. }, {
  22867. "font_class": "minus",
  22868. "unicode": "\uE66F"
  22869. }, {
  22870. "font_class": "minus-filled",
  22871. "unicode": "\uE67D"
  22872. }, {
  22873. "font_class": "more",
  22874. "unicode": "\uE64D"
  22875. }, {
  22876. "font_class": "more-filled",
  22877. "unicode": "\uE64E"
  22878. }, {
  22879. "font_class": "navigate",
  22880. "unicode": "\uE66E"
  22881. }, {
  22882. "font_class": "navigate-filled",
  22883. "unicode": "\uE67A"
  22884. }, {
  22885. "font_class": "notification",
  22886. "unicode": "\uE6A6"
  22887. }, {
  22888. "font_class": "notification-filled",
  22889. "unicode": "\uE6C1"
  22890. }, {
  22891. "font_class": "paperclip",
  22892. "unicode": "\uE652"
  22893. }, {
  22894. "font_class": "paperplane",
  22895. "unicode": "\uE672"
  22896. }, {
  22897. "font_class": "paperplane-filled",
  22898. "unicode": "\uE675"
  22899. }, {
  22900. "font_class": "person",
  22901. "unicode": "\uE699"
  22902. }, {
  22903. "font_class": "person-filled",
  22904. "unicode": "\uE69D"
  22905. }, {
  22906. "font_class": "personadd",
  22907. "unicode": "\uE69F"
  22908. }, {
  22909. "font_class": "personadd-filled",
  22910. "unicode": "\uE698"
  22911. }, {
  22912. "font_class": "personadd-filled-copy",
  22913. "unicode": "\uE6D1"
  22914. }, {
  22915. "font_class": "phone",
  22916. "unicode": "\uE69C"
  22917. }, {
  22918. "font_class": "phone-filled",
  22919. "unicode": "\uE69B"
  22920. }, {
  22921. "font_class": "plus",
  22922. "unicode": "\uE676"
  22923. }, {
  22924. "font_class": "plus-filled",
  22925. "unicode": "\uE6C7"
  22926. }, {
  22927. "font_class": "plusempty",
  22928. "unicode": "\uE67B"
  22929. }, {
  22930. "font_class": "pulldown",
  22931. "unicode": "\uE632"
  22932. }, {
  22933. "font_class": "pyq",
  22934. "unicode": "\uE682"
  22935. }, {
  22936. "font_class": "qq",
  22937. "unicode": "\uE680"
  22938. }, {
  22939. "font_class": "redo",
  22940. "unicode": "\uE64A"
  22941. }, {
  22942. "font_class": "redo-filled",
  22943. "unicode": "\uE655"
  22944. }, {
  22945. "font_class": "refresh",
  22946. "unicode": "\uE657"
  22947. }, {
  22948. "font_class": "refresh-filled",
  22949. "unicode": "\uE656"
  22950. }, {
  22951. "font_class": "refreshempty",
  22952. "unicode": "\uE6BF"
  22953. }, {
  22954. "font_class": "reload",
  22955. "unicode": "\uE6B2"
  22956. }, {
  22957. "font_class": "right",
  22958. "unicode": "\uE6B5"
  22959. }, {
  22960. "font_class": "scan",
  22961. "unicode": "\uE62A"
  22962. }, {
  22963. "font_class": "search",
  22964. "unicode": "\uE654"
  22965. }, {
  22966. "font_class": "settings",
  22967. "unicode": "\uE653"
  22968. }, {
  22969. "font_class": "settings-filled",
  22970. "unicode": "\uE6CE"
  22971. }, {
  22972. "font_class": "shop",
  22973. "unicode": "\uE62F"
  22974. }, {
  22975. "font_class": "shop-filled",
  22976. "unicode": "\uE6CD"
  22977. }, {
  22978. "font_class": "smallcircle",
  22979. "unicode": "\uE67C"
  22980. }, {
  22981. "font_class": "smallcircle-filled",
  22982. "unicode": "\uE665"
  22983. }, {
  22984. "font_class": "sound",
  22985. "unicode": "\uE684"
  22986. }, {
  22987. "font_class": "sound-filled",
  22988. "unicode": "\uE686"
  22989. }, {
  22990. "font_class": "spinner-cycle",
  22991. "unicode": "\uE68A"
  22992. }, {
  22993. "font_class": "staff",
  22994. "unicode": "\uE6A7"
  22995. }, {
  22996. "font_class": "staff-filled",
  22997. "unicode": "\uE6CB"
  22998. }, {
  22999. "font_class": "star",
  23000. "unicode": "\uE688"
  23001. }, {
  23002. "font_class": "star-filled",
  23003. "unicode": "\uE68F"
  23004. }, {
  23005. "font_class": "starhalf",
  23006. "unicode": "\uE683"
  23007. }, {
  23008. "font_class": "trash",
  23009. "unicode": "\uE687"
  23010. }, {
  23011. "font_class": "trash-filled",
  23012. "unicode": "\uE685"
  23013. }, {
  23014. "font_class": "tune",
  23015. "unicode": "\uE6AA"
  23016. }, {
  23017. "font_class": "tune-filled",
  23018. "unicode": "\uE6CA"
  23019. }, {
  23020. "font_class": "undo",
  23021. "unicode": "\uE64F"
  23022. }, {
  23023. "font_class": "undo-filled",
  23024. "unicode": "\uE64C"
  23025. }, {
  23026. "font_class": "up",
  23027. "unicode": "\uE6B6"
  23028. }, {
  23029. "font_class": "top",
  23030. "unicode": "\uE6B6"
  23031. }, {
  23032. "font_class": "upload",
  23033. "unicode": "\uE690"
  23034. }, {
  23035. "font_class": "upload-filled",
  23036. "unicode": "\uE68E"
  23037. }, {
  23038. "font_class": "videocam",
  23039. "unicode": "\uE68C"
  23040. }, {
  23041. "font_class": "videocam-filled",
  23042. "unicode": "\uE689"
  23043. }, {
  23044. "font_class": "vip",
  23045. "unicode": "\uE6A8"
  23046. }, {
  23047. "font_class": "vip-filled",
  23048. "unicode": "\uE6C6"
  23049. }, {
  23050. "font_class": "wallet",
  23051. "unicode": "\uE6B1"
  23052. }, {
  23053. "font_class": "wallet-filled",
  23054. "unicode": "\uE6C2"
  23055. }, {
  23056. "font_class": "weibo",
  23057. "unicode": "\uE68B"
  23058. }, {
  23059. "font_class": "weixin",
  23060. "unicode": "\uE691"
  23061. }];
  23062. // export const fontData = JSON.parse<IconsDataItem>(fontDataJson)
  23063. exports.fontData = fontData;
  23064. /***/ }),
  23065. /***/ 46:
  23066. /*!*******************************************************************!*\
  23067. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/methods/setData.js ***!
  23068. \*******************************************************************/
  23069. /*! no static exports found */
  23070. /***/ (function(module, exports, __webpack_require__) {
  23071. "use strict";
  23072. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  23073. Object.defineProperty(exports, "__esModule", {
  23074. value: true
  23075. });
  23076. exports.setData = setData;
  23077. var _set2 = _interopRequireDefault(__webpack_require__(/*! ../utils/_set */ 47));
  23078. var _debounce = _interopRequireDefault(__webpack_require__(/*! ../utils/debounce */ 48));
  23079. /**
  23080. * 老setData polyfill
  23081. * 用于转换后的uniapp的项目能直接使用this.setData()函数
  23082. * @param {*} obj
  23083. * @param {*} callback
  23084. */
  23085. function oldSetData(obj, callback) {
  23086. var that = this;
  23087. var handleData = function handleData(tepData, tepKey, afterKey) {
  23088. var tepData2 = tepData;
  23089. tepKey = tepKey.split('.');
  23090. tepKey.forEach(function (item) {
  23091. if (tepData[item] === null || tepData[item] === undefined) {
  23092. var reg = /^[0-9]+$/;
  23093. tepData[item] = reg.test(afterKey) ? [] : {};
  23094. tepData2 = tepData[item];
  23095. } else {
  23096. tepData2 = tepData[item];
  23097. }
  23098. });
  23099. return tepData2;
  23100. };
  23101. var isFn = function isFn(value) {
  23102. return typeof value == 'function' || false;
  23103. };
  23104. Object.keys(obj).forEach(function (key) {
  23105. var val = obj[key];
  23106. key = key.replace(/\]/g, '').replace(/\[/g, '.');
  23107. var front, after;
  23108. var index_after = key.lastIndexOf('.');
  23109. if (index_after != -1) {
  23110. after = key.slice(index_after + 1);
  23111. front = handleData(that, key.slice(0, index_after), after);
  23112. } else {
  23113. after = key;
  23114. front = that;
  23115. }
  23116. if (front.$data && front.$data[after] === undefined) {
  23117. Object.defineProperty(front, after, {
  23118. get: function get() {
  23119. return front.$data[after];
  23120. },
  23121. set: function set(newValue) {
  23122. front.$data[after] = newValue;
  23123. that.hasOwnProperty("$forceUpdate") && that.$forceUpdate();
  23124. },
  23125. enumerable: true,
  23126. configurable: true
  23127. });
  23128. front[after] = val;
  23129. } else {
  23130. that.$set(front, after, val);
  23131. }
  23132. });
  23133. // this.$forceUpdate();
  23134. isFn(callback) && this.$nextTick(callback);
  23135. }
  23136. /**
  23137. * 变量名正则
  23138. */
  23139. var variableNameReg = /^([^\x00-\xff]|[a-zA-Z_$])([^\x00-\xff]|[a-zA-Z0-9_$])*$/;
  23140. /**
  23141. * 2022-10-31 重写setData
  23142. * 2023-05-08 增加微信“简易双向绑定”支持
  23143. * 用于转换后的uniapp的项目能直接使用this.setData()函数
  23144. * @param {Object} obj
  23145. * @param {Object} callback
  23146. */
  23147. function setData(obj) {
  23148. var _this = this;
  23149. var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  23150. Object.keys(obj).forEach(function (key) {
  23151. (0, _set2.default)(_this, key, obj[key]);
  23152. //处理微信“简易双向绑定”
  23153. if (variableNameReg.test(key) && key.endsWith("Clone")) {
  23154. var propName = key.replace(/Clone$/, "");
  23155. if (_this.$options && _this.$options.propsData[propName]) {
  23156. _this.$emit("update:".concat(propName), obj[key]);
  23157. }
  23158. }
  23159. });
  23160. this.$forceUpdate();
  23161. if (typeof callback == 'function') this.$nextTick(callback);
  23162. }
  23163. /***/ }),
  23164. /***/ 47:
  23165. /*!**************************************************************!*\
  23166. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/utils/_set.js ***!
  23167. \**************************************************************/
  23168. /*! no static exports found */
  23169. /***/ (function(module, exports, __webpack_require__) {
  23170. "use strict";
  23171. Object.defineProperty(exports, "__esModule", {
  23172. value: true
  23173. });
  23174. exports.default = void 0;
  23175. /**
  23176. * lodash set
  23177. * @param {*} obj
  23178. * @param {*} path
  23179. * @param {*} value
  23180. * @returns
  23181. */
  23182. function _set(obj, path, value) {
  23183. if (Object(obj) !== obj) return obj; // When obj is not an object
  23184. // If not yet an array, get the keys from the string-path
  23185. if (!Array.isArray(path)) path = path.toString().match(/[^.[\]]+/g) || [];
  23186. path.slice(0, -1).reduce(function (a, c, i) {
  23187. return (
  23188. // Iterate all of them except the last one
  23189. Object(a[c]) === a[c] // Does the key exist and is its value an object?
  23190. // Yes: then follow that path
  23191. ? a[c]
  23192. // No: create the key. Is the next key a potential array-index?
  23193. : a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1] ? [] // Yes: assign a new array object
  23194. : {}
  23195. );
  23196. },
  23197. // No: assign a new plain object
  23198. obj)[path[path.length - 1]] = value; // Finally assign the value to the last key
  23199. return obj; // Return the top-level object to allow chaining
  23200. }
  23201. var _default = _set;
  23202. exports.default = _default;
  23203. /***/ }),
  23204. /***/ 48:
  23205. /*!******************************************************************!*\
  23206. !*** E:/盈通/sulibao-mini/uni_modules/zp-mixins/utils/debounce.js ***!
  23207. \******************************************************************/
  23208. /*! no static exports found */
  23209. /***/ (function(module, exports, __webpack_require__) {
  23210. "use strict";
  23211. Object.defineProperty(exports, "__esModule", {
  23212. value: true
  23213. });
  23214. exports.default = void 0;
  23215. /**
  23216. * 防抖
  23217. * @param {Object} scope //引用的this,发现不显式传this,拿不到。
  23218. * @param {Object} fn
  23219. * @param {Object} delay
  23220. */
  23221. var t = null;
  23222. var debounce = function debounce(scope, fn, delay) {
  23223. if (t !== null) {
  23224. clearTimeout(t);
  23225. }
  23226. t = setTimeout(function () {
  23227. scope[fn]();
  23228. }, delay);
  23229. };
  23230. var _default = debounce;
  23231. exports.default = _default;
  23232. /***/ }),
  23233. /***/ 49:
  23234. /*!*********************************************!*\
  23235. !*** E:/盈通/sulibao-mini/tuniao-ui/index.js ***!
  23236. \*********************************************/
  23237. /*! no static exports found */
  23238. /***/ (function(module, exports, __webpack_require__) {
  23239. "use strict";
  23240. /* WEBPACK VAR INJECTION */(function(uni) {
  23241. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  23242. Object.defineProperty(exports, "__esModule", {
  23243. value: true
  23244. });
  23245. exports.default = void 0;
  23246. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 50));
  23247. var _updateCustomBarInfo = _interopRequireDefault(__webpack_require__(/*! ./libs/function/updateCustomBarInfo.js */ 33));
  23248. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 51));
  23249. var _message = _interopRequireDefault(__webpack_require__(/*! ./libs/function/message.js */ 52));
  23250. var _uuid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/uuid.js */ 53));
  23251. var _array = _interopRequireDefault(__webpack_require__(/*! ./libs/function/array.js */ 54));
  23252. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 55));
  23253. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 56));
  23254. var _string = _interopRequireDefault(__webpack_require__(/*! ./libs/function/string.js */ 57));
  23255. var _number = _interopRequireDefault(__webpack_require__(/*! ./libs/function/number.js */ 58));
  23256. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 59));
  23257. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 60));
  23258. var _color2 = _interopRequireDefault(__webpack_require__(/*! ./libs/config/color.js */ 61));
  23259. // 引入全局mixin
  23260. // 调试输出信息
  23261. function wranning(str) {
  23262. // 开发环境进行信息输出,主要是一些报错信息
  23263. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  23264. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  23265. if (true) {
  23266. console.warn(str);
  23267. }
  23268. }
  23269. // 更新自定义状态栏的信息
  23270. var $t = {
  23271. updateCustomBar: _updateCustomBarInfo.default,
  23272. color: _color.default,
  23273. message: _message.default,
  23274. uuid: _uuid.default,
  23275. array: _array.default,
  23276. test: _test.default,
  23277. $parent: _$parent.default,
  23278. string: _string.default,
  23279. number: _number.default,
  23280. deepClone: _deepClone.default,
  23281. zIndex: _zIndex.default,
  23282. colorInfo: _color2.default
  23283. };
  23284. // 挂载到uni对象上
  23285. uni.$t = $t;
  23286. var install = function install(Vue) {
  23287. // 全局混入
  23288. Vue.mixin(_mixin.default);
  23289. // Filter格式化
  23290. Vue.prototype.$t = $t;
  23291. };
  23292. var _default = {
  23293. install: install
  23294. };
  23295. exports.default = _default;
  23296. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  23297. /***/ }),
  23298. /***/ 5:
  23299. /*!**************************************************************!*\
  23300. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  23301. \**************************************************************/
  23302. /*! no static exports found */
  23303. /***/ (function(module, exports, __webpack_require__) {
  23304. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  23305. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  23306. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  23307. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  23308. function _slicedToArray(arr, i) {
  23309. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  23310. }
  23311. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  23312. /***/ }),
  23313. /***/ 50:
  23314. /*!********************************************************!*\
  23315. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/mixin/mixin.js ***!
  23316. \********************************************************/
  23317. /*! no static exports found */
  23318. /***/ (function(module, exports, __webpack_require__) {
  23319. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  23320. data: function data() {
  23321. return {};
  23322. },
  23323. onLoad: function onLoad() {
  23324. // getRect挂载再$t上,用为这个方法需要使用in(this),所以无法把它独立层一个单独的文件导出
  23325. this.$t.getRect = this._tGetRect;
  23326. },
  23327. beforeDestory: function beforeDestory() {
  23328. var _this = this;
  23329. // 判断当前页面是否存在parent和children
  23330. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  23331. if (this.parent && uni.$t.test.array(this.parent.children)) {
  23332. // 组件销毁时,移除子组件在父组件children数组中的实例
  23333. var childrenList = this.parent.children;
  23334. childrenList.map(function (child, index) {
  23335. // 如果相对,则移除
  23336. if (child === _this) {
  23337. childrenList.splice(index, 1);
  23338. }
  23339. });
  23340. }
  23341. },
  23342. methods: {
  23343. /**
  23344. * 查询节点信息
  23345. * 当前方法在支付宝小程序中无法获取组件跟接点的尺寸
  23346. * 解决办法:为组件根部再套一个没有任何作用的view元素
  23347. */
  23348. _tGetRect: function _tGetRect(selector, all) {
  23349. var _this2 = this;
  23350. return new Promise(function (resolve) {
  23351. uni.createSelectorQuery().in(_this2)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  23352. if (all && Array.isArray(rect) && rect.length) {
  23353. resolve(rect);
  23354. }
  23355. if (!all && rect) {
  23356. resolve(rect);
  23357. }
  23358. }).exec();
  23359. });
  23360. },
  23361. /**
  23362. * 获取父组件的数据
  23363. */
  23364. getParentData: function getParentData() {
  23365. var _this3 = this;
  23366. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  23367. // 避免再created中定义parent变量
  23368. if (!this.parent) this.parent = false;
  23369. // 通过获取父组件实例
  23370. // 将父组件this中对应的参数,赋值给本组件的parentData对象中对应的属性
  23371. // 头条小程序不支持通过this.parent.xxx去监听父组件参数的变化,所以需要本方法进行实现
  23372. this.parent = this.$t.$parent.call(this, parentName);
  23373. if (this.parent) {
  23374. // 遍历parentData中的属性,将parent中同名的属性赋值给parentData
  23375. Object.keys(this.parentData).map(function (key) {
  23376. _this3.parentData[key] = _this3.parent[key];
  23377. });
  23378. }
  23379. },
  23380. /**
  23381. * 阻止事件冒泡
  23382. */
  23383. preventEvent: function preventEvent(e) {
  23384. e && e.stopPropagation && e.stopPropagation();
  23385. }
  23386. }
  23387. };
  23388. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  23389. /***/ }),
  23390. /***/ 501:
  23391. /*!***********************************************************************************!*\
  23392. !*** E:/盈通/sulibao-mini/components/agent-ui/wd-markdown/utils/markdown-it.min.js ***!
  23393. \***********************************************************************************/
  23394. /*! no static exports found */
  23395. /***/ (function(module, exports, __webpack_require__) {
  23396. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _toConsumableArray = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18);
  23397. var _classCallCheck = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23);
  23398. var _createClass = __webpack_require__(/*! @babel/runtime/helpers/createClass */ 24);
  23399. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  23400. 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(_e124) { throw _e124; }, 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(_e125) { didErr = true; err = _e125; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  23401. 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); }
  23402. 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; }
  23403. !function (e, t) {
  23404. "object" == ( false ? undefined : _typeof(exports)) && "undefined" != typeof module ? module.exports = t() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (t),
  23405. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  23406. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  23407. __WEBPACK_AMD_DEFINE_FACTORY__),
  23408. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
  23409. }(this, function () {
  23410. var T = {};
  23411. function n(e, t) {
  23412. var r = function (t) {
  23413. var r = T[t];
  23414. if (!r) {
  23415. r = T[t] = [];
  23416. for (var _t2 = 0; _t2 < 128; _t2++) {
  23417. var _e2 = String.fromCharCode(_t2);
  23418. r.push(_e2);
  23419. }
  23420. for (var _e3 = 0; _e3 < t.length; _e3++) {
  23421. var n = t.charCodeAt(_e3);
  23422. r[n] = "%" + ("0" + n.toString(16).toUpperCase()).slice(-2);
  23423. }
  23424. }
  23425. return r;
  23426. }(t = "string" != typeof t ? n.defaultChars : t);
  23427. return e.replace(/(%[a-f0-9]{2})+/gi, function (i) {
  23428. var s = "";
  23429. for (var _n = 0, _e4 = i.length; _n < _e4; _n += 3) {
  23430. var o = parseInt(i.slice(_n + 1, _n + 3), 16);
  23431. if (o < 128) s += r[o];else {
  23432. if (192 == (224 & o) && _n + 3 < _e4) {
  23433. var u = parseInt(i.slice(_n + 4, _n + 6), 16);
  23434. if (128 == (192 & u)) {
  23435. var _e5 = o << 6 & 1984 | 63 & u;
  23436. s += _e5 < 128 ? "��" : String.fromCharCode(_e5), _n += 3;
  23437. continue;
  23438. }
  23439. }
  23440. if (224 == (240 & o) && _n + 6 < _e4) {
  23441. var _t3 = parseInt(i.slice(_n + 4, _n + 6), 16),
  23442. _r = parseInt(i.slice(_n + 7, _n + 9), 16);
  23443. if (128 == (192 & _t3) && 128 == (192 & _r)) {
  23444. var _e6 = o << 12 & 61440 | _t3 << 6 & 4032 | 63 & _r;
  23445. s += _e6 < 2048 || 55296 <= _e6 && _e6 <= 57343 ? "���" : String.fromCharCode(_e6), _n += 6;
  23446. continue;
  23447. }
  23448. }
  23449. if (240 == (248 & o) && _n + 9 < _e4) {
  23450. var _e7 = parseInt(i.slice(_n + 4, _n + 6), 16),
  23451. _t4 = parseInt(i.slice(_n + 7, _n + 9), 16),
  23452. _r2 = parseInt(i.slice(_n + 10, _n + 12), 16);
  23453. if (128 == (192 & _e7) && 128 == (192 & _t4) && 128 == (192 & _r2)) {
  23454. u = o << 18 & 1835008 | _e7 << 12 & 258048 | _t4 << 6 & 4032 | 63 & _r2;
  23455. u < 65536 || 1114111 < u ? s += "����" : (u -= 65536, s += String.fromCharCode(55296 + (u >> 10), 56320 + (1023 & u))), _n += 9;
  23456. continue;
  23457. }
  23458. }
  23459. s += "�";
  23460. }
  23461. }
  23462. return s;
  23463. });
  23464. }
  23465. n.defaultChars = ";/?:@&=+$,#", n.componentChars = "";
  23466. var R = {};
  23467. function r(n, e, i) {
  23468. "string" != typeof e && (i = e, e = r.defaultChars), void 0 === i && (i = !0);
  23469. var s = function (t) {
  23470. var r = R[t];
  23471. if (!r) {
  23472. r = R[t] = [];
  23473. for (var _t5 = 0; _t5 < 128; _t5++) {
  23474. var _e8 = String.fromCharCode(_t5);
  23475. /^[0-9a-z]$/i.test(_e8) ? r.push(_e8) : r.push("%" + ("0" + _t5.toString(16).toUpperCase()).slice(-2));
  23476. }
  23477. for (var _e9 = 0; _e9 < t.length; _e9++) {
  23478. r[t.charCodeAt(_e9)] = t[_e9];
  23479. }
  23480. }
  23481. return r;
  23482. }(e);
  23483. var o = "";
  23484. for (var _t6 = 0, _r3 = n.length; _t6 < _r3; _t6++) {
  23485. var _e10 = n.charCodeAt(_t6);
  23486. if (i && 37 === _e10 && _t6 + 2 < _r3 && /^[0-9a-f]{2}$/i.test(n.slice(_t6 + 1, _t6 + 3))) o += n.slice(_t6, _t6 + 3), _t6 += 2;else if (_e10 < 128) o += s[_e10];else if (55296 <= _e10 && _e10 <= 57343) {
  23487. if (55296 <= _e10 && _e10 <= 56319 && _t6 + 1 < _r3) {
  23488. var _e11 = n.charCodeAt(_t6 + 1);
  23489. if (56320 <= _e11 && _e11 <= 57343) {
  23490. o += encodeURIComponent(n[_t6] + n[_t6 + 1]), _t6++;
  23491. continue;
  23492. }
  23493. }
  23494. o += "%EF%BF%BD";
  23495. } else o += encodeURIComponent(n[_t6]);
  23496. }
  23497. return o;
  23498. }
  23499. function i(e) {
  23500. var t = "";
  23501. return t = (t = (t += e.protocol || "") + (e.slashes ? "//" : "")) + (e.auth ? e.auth + "@" : ""), e.hostname && -1 !== e.hostname.indexOf(":") ? t += "[" + e.hostname + "]" : t += e.hostname || "", t = (t = (t = (t += e.port ? ":" + e.port : "") + (e.pathname || "")) + (e.search || "")) + (e.hash || "");
  23502. }
  23503. function s() {
  23504. this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
  23505. }
  23506. r.defaultChars = ";/?:@&=+$,-_.!~*'()#", r.componentChars = "-_.!~*'()";
  23507. var N = /^([a-z0-9.+-]+:)/i,
  23508. P = /:[0-9]*$/,
  23509. O = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
  23510. j = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"]),
  23511. Z = ["'"].concat(j),
  23512. $ = ["%", "/", "?", ";", "#"].concat(Z),
  23513. U = ["/", "?", "#"],
  23514. H = /^[+a-z0-9A-Z_-]{0,63}$/,
  23515. V = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
  23516. G = {
  23517. javascript: !0,
  23518. "javascript:": !0
  23519. },
  23520. W = {
  23521. http: !0,
  23522. https: !0,
  23523. ftp: !0,
  23524. gopher: !0,
  23525. file: !0,
  23526. "http:": !0,
  23527. "https:": !0,
  23528. "ftp:": !0,
  23529. "gopher:": !0,
  23530. "file:": !0
  23531. };
  23532. function J(e, t) {
  23533. var r;
  23534. return e && e instanceof s ? e : ((r = new s()).parse(e, t), r);
  23535. }
  23536. s.prototype.parse = function (e, t) {
  23537. var r,
  23538. s,
  23539. n,
  23540. o = e;
  23541. if (o = o.trim(), !t && 1 === e.split("#").length) {
  23542. var _e12 = O.exec(o);
  23543. if (_e12) return this.pathname = _e12[1], _e12[2] && (this.search = _e12[2]), this;
  23544. }
  23545. var i = N.exec(o);
  23546. if (i && (i = i[0], r = i.toLowerCase(), this.protocol = i, o = o.substr(i.length)), (t || i || o.match(/^\/\/[^@\/]+@[^@\/]+/)) && (!(n = "//" === o.substr(0, 2)) || i && G[i] || (o = o.substr(2), this.slashes = !0)), !G[i] && (n || i && !W[i])) {
  23547. var _e13,
  23548. _t7,
  23549. _r4 = -1;
  23550. for (var _e14 = 0; _e14 < U.length; _e14++) {
  23551. -1 !== (s = o.indexOf(U[_e14])) && (-1 === _r4 || s < _r4) && (_r4 = s);
  23552. }
  23553. -1 !== (_t7 = -1 === _r4 ? o.lastIndexOf("@") : o.lastIndexOf("@", _r4)) && (_e13 = o.slice(0, _t7), o = o.slice(_t7 + 1), this.auth = _e13), _r4 = -1;
  23554. for (var _e15 = 0; _e15 < $.length; _e15++) {
  23555. -1 !== (s = o.indexOf($[_e15])) && (-1 === _r4 || s < _r4) && (_r4 = s);
  23556. }
  23557. -1 === _r4 && (_r4 = o.length), ":" === o[_r4 - 1] && _r4--;
  23558. var _n2 = o.slice(0, _r4),
  23559. _i = (o = o.slice(_r4), this.parseHost(_n2), this.hostname = this.hostname || "", "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1]);
  23560. if (!_i) {
  23561. var _s = this.hostname.split(/\./);
  23562. for (var _i2 = 0, _e16 = _s.length; _i2 < _e16; _i2++) {
  23563. var _n3 = _s[_i2];
  23564. if (_n3 && !_n3.match(H)) {
  23565. var _r5 = "";
  23566. for (var _e17 = 0, _t8 = _n3.length; _e17 < _t8; _e17++) {
  23567. 127 < _n3.charCodeAt(_e17) ? _r5 += "x" : _r5 += _n3[_e17];
  23568. }
  23569. if (!_r5.match(H)) {
  23570. var _e18 = _s.slice(0, _i2),
  23571. _t9 = _s.slice(_i2 + 1),
  23572. _r6 = _n3.match(V);
  23573. _r6 && (_e18.push(_r6[1]), _t9.unshift(_r6[2])), _t9.length && (o = _t9.join(".") + o), this.hostname = _e18.join(".");
  23574. break;
  23575. }
  23576. }
  23577. }
  23578. }
  23579. 255 < this.hostname.length && (this.hostname = ""), _i && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
  23580. }
  23581. e = o.indexOf("#"), -1 !== e && (this.hash = o.substr(e), o = o.slice(0, e)), t = o.indexOf("?");
  23582. return -1 !== t && (this.search = o.substr(t), o = o.slice(0, t)), o && (this.pathname = o), W[r] && this.hostname && !this.pathname && (this.pathname = ""), this;
  23583. }, s.prototype.parseHost = function (e) {
  23584. var t = P.exec(e);
  23585. t && (":" !== (t = t[0]) && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e);
  23586. };
  23587. var u,
  23588. a,
  23589. o,
  23590. l,
  23591. Q = Object.freeze({
  23592. __proto__: null,
  23593. decode: n,
  23594. encode: r,
  23595. format: i,
  23596. parse: J
  23597. }),
  23598. X = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,
  23599. Y = /[\0-\x1F\x7F-\x9F]/,
  23600. K = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,
  23601. ee = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,
  23602. te = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,
  23603. re = Object.freeze({
  23604. __proto__: null,
  23605. Any: X,
  23606. Cc: Y,
  23607. Cf: /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,
  23608. P: K,
  23609. S: ee,
  23610. Z: te
  23611. }),
  23612. ne = new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function (e) {
  23613. return e.charCodeAt(0);
  23614. })),
  23615. ie = new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function (e) {
  23616. return e.charCodeAt(0);
  23617. }));
  23618. var se = new Map([[0, 65533], [128, 8364], [130, 8218], [131, 402], [132, 8222], [133, 8230], [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249], [140, 338], [142, 381], [145, 8216], [146, 8217], [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732], [153, 8482], [154, 353], [155, 8250], [156, 339], [158, 382], [159, 376]]),
  23619. oe = null != (x = String.fromCodePoint) ? x : function (e) {
  23620. var t = "";
  23621. return 65535 < e && (e -= 65536, t += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t += String.fromCharCode(e);
  23622. };
  23623. function ue(e) {
  23624. return e >= u.ZERO && e <= u.NINE;
  23625. }
  23626. (x = u = u || {})[x.NUM = 35] = "NUM", x[x.SEMI = 59] = "SEMI", x[x.EQUALS = 61] = "EQUALS", x[x.ZERO = 48] = "ZERO", x[x.NINE = 57] = "NINE", x[x.LOWER_A = 97] = "LOWER_A", x[x.LOWER_F = 102] = "LOWER_F", x[x.LOWER_X = 120] = "LOWER_X", x[x.LOWER_Z = 122] = "LOWER_Z", x[x.UPPER_A = 65] = "UPPER_A", x[x.UPPER_F = 70] = "UPPER_F", x[x.UPPER_Z = 90] = "UPPER_Z", (x = a = a || {})[x.VALUE_LENGTH = 49152] = "VALUE_LENGTH", x[x.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", x[x.JUMP_TABLE = 127] = "JUMP_TABLE", (x = o = o || {})[x.EntityStart = 0] = "EntityStart", x[x.NumericStart = 1] = "NumericStart", x[x.NumericDecimal = 2] = "NumericDecimal", x[x.NumericHex = 3] = "NumericHex", x[x.NamedEntity = 4] = "NamedEntity", (x = l = l || {})[x.Legacy = 0] = "Legacy", x[x.Strict = 1] = "Strict", x[x.Attribute = 2] = "Attribute";
  23627. var ae = /*#__PURE__*/function () {
  23628. "use strict";
  23629. function ae(e, t, r) {
  23630. _classCallCheck(this, ae);
  23631. this.decodeTree = e, this.emitCodePoint = t, this.errors = r, this.state = o.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = l.Strict;
  23632. }
  23633. _createClass(ae, [{
  23634. key: "startEntity",
  23635. value: function startEntity(e) {
  23636. this.decodeMode = e, this.state = o.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
  23637. }
  23638. }, {
  23639. key: "write",
  23640. value: function write(e, t) {
  23641. switch (this.state) {
  23642. case o.EntityStart:
  23643. return e.charCodeAt(t) === u.NUM ? (this.state = o.NumericStart, this.consumed += 1, this.stateNumericStart(e, t + 1)) : (this.state = o.NamedEntity, this.stateNamedEntity(e, t));
  23644. case o.NumericStart:
  23645. return this.stateNumericStart(e, t);
  23646. case o.NumericDecimal:
  23647. return this.stateNumericDecimal(e, t);
  23648. case o.NumericHex:
  23649. return this.stateNumericHex(e, t);
  23650. case o.NamedEntity:
  23651. return this.stateNamedEntity(e, t);
  23652. }
  23653. }
  23654. }, {
  23655. key: "stateNumericStart",
  23656. value: function stateNumericStart(e, t) {
  23657. return t >= e.length ? -1 : (32 | e.charCodeAt(t)) === u.LOWER_X ? (this.state = o.NumericHex, this.consumed += 1, this.stateNumericHex(e, t + 1)) : (this.state = o.NumericDecimal, this.stateNumericDecimal(e, t));
  23658. }
  23659. }, {
  23660. key: "addToNumericResult",
  23661. value: function addToNumericResult(e, t, r, n) {
  23662. t !== r && (r = r - t, this.result = this.result * Math.pow(n, r) + parseInt(e.substr(t, r), n), this.consumed += r);
  23663. }
  23664. }, {
  23665. key: "stateNumericHex",
  23666. value: function stateNumericHex(e, t) {
  23667. for (var r, n = t; t < e.length;) {
  23668. var i = e.charCodeAt(t);
  23669. if (!(ue(i) || (r = i) >= u.UPPER_A && r <= u.UPPER_F || r >= u.LOWER_A && r <= u.LOWER_F)) return this.addToNumericResult(e, n, t, 16), this.emitNumericEntity(i, 3);
  23670. t += 1;
  23671. }
  23672. return this.addToNumericResult(e, n, t, 16), -1;
  23673. }
  23674. }, {
  23675. key: "stateNumericDecimal",
  23676. value: function stateNumericDecimal(e, t) {
  23677. for (var r = t; t < e.length;) {
  23678. var n = e.charCodeAt(t);
  23679. if (!ue(n)) return this.addToNumericResult(e, r, t, 10), this.emitNumericEntity(n, 2);
  23680. t += 1;
  23681. }
  23682. return this.addToNumericResult(e, r, t, 10), -1;
  23683. }
  23684. }, {
  23685. key: "emitNumericEntity",
  23686. value: function emitNumericEntity(e, t) {
  23687. var r;
  23688. if (this.consumed <= t) return null != (t = this.errors) && t.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
  23689. if (e === u.SEMI) this.consumed += 1;else if (this.decodeMode === l.Strict) return 0;
  23690. return this.emitCodePoint(55296 <= (t = this.result) && t <= 57343 || 1114111 < t ? 65533 : null != (r = se.get(t)) ? r : t, this.consumed), this.errors && (e !== u.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
  23691. }
  23692. }, {
  23693. key: "stateNamedEntity",
  23694. value: function stateNamedEntity(e, t) {
  23695. var r,
  23696. n = this.decodeTree;
  23697. var i = n[this.treeIndex],
  23698. s = (i & a.VALUE_LENGTH) >> 14;
  23699. for (; t < e.length; t++, this.excess++) {
  23700. var o = e.charCodeAt(t);
  23701. if (this.treeIndex = function (r, e, t, n) {
  23702. var i = (e & a.BRANCH_LENGTH) >> 7,
  23703. s = e & a.JUMP_TABLE;
  23704. if (0 == i) return 0 != s && n === s ? t : -1;
  23705. if (s) {
  23706. var _e19 = n - s;
  23707. return _e19 < 0 || _e19 >= i ? -1 : r[t + _e19] - 1;
  23708. }
  23709. var o = t,
  23710. u = o + i - 1;
  23711. for (; o <= u;) {
  23712. var _e20 = o + u >>> 1,
  23713. _t10 = r[_e20];
  23714. if (_t10 < n) o = 1 + _e20;else {
  23715. if (!(_t10 > n)) return r[_e20 + i];
  23716. u = _e20 - 1;
  23717. }
  23718. }
  23719. return -1;
  23720. }(n, i, this.treeIndex + Math.max(1, s), o), this.treeIndex < 0) return 0 === this.result || this.decodeMode === l.Attribute && (0 === s || (r = o) === u.EQUALS || r >= u.UPPER_A && r <= u.UPPER_Z || r >= u.LOWER_A && r <= u.LOWER_Z || ue(r)) ? 0 : this.emitNotTerminatedNamedEntity();
  23721. if (i = n[this.treeIndex], 0 !== (s = (i & a.VALUE_LENGTH) >> 14)) {
  23722. if (o === u.SEMI) return this.emitNamedEntityData(this.treeIndex, s, this.consumed + this.excess);
  23723. this.decodeMode !== l.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
  23724. }
  23725. }
  23726. return -1;
  23727. }
  23728. }, {
  23729. key: "emitNotTerminatedNamedEntity",
  23730. value: function emitNotTerminatedNamedEntity() {
  23731. var e = this.result,
  23732. t = this.decodeTree,
  23733. t = (t[e] & a.VALUE_LENGTH) >> 14;
  23734. return this.emitNamedEntityData(e, t, this.consumed), null != (e = this.errors) && e.missingSemicolonAfterCharacterReference(), this.consumed;
  23735. }
  23736. }, {
  23737. key: "emitNamedEntityData",
  23738. value: function emitNamedEntityData(e, t, r) {
  23739. var n = this.decodeTree;
  23740. return this.emitCodePoint(1 === t ? n[e] & ~a.VALUE_LENGTH : n[e + 1], r), 3 === t && this.emitCodePoint(n[e + 2], r), r;
  23741. }
  23742. }, {
  23743. key: "end",
  23744. value: function end() {
  23745. var e;
  23746. switch (this.state) {
  23747. case o.NamedEntity:
  23748. return 0 === this.result || this.decodeMode === l.Attribute && this.result !== this.treeIndex ? 0 : this.emitNotTerminatedNamedEntity();
  23749. case o.NumericDecimal:
  23750. return this.emitNumericEntity(0, 2);
  23751. case o.NumericHex:
  23752. return this.emitNumericEntity(0, 3);
  23753. case o.NumericStart:
  23754. return null != (e = this.errors) && e.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
  23755. case o.EntityStart:
  23756. return 0;
  23757. }
  23758. }
  23759. }]);
  23760. return ae;
  23761. }();
  23762. function le(e) {
  23763. var s = "",
  23764. o = new ae(e, function (e) {
  23765. return s += oe(e);
  23766. });
  23767. return function (t, r) {
  23768. var n = 0,
  23769. i = 0;
  23770. for (; 0 <= (i = t.indexOf("&", i));) {
  23771. s += t.slice(n, i), o.startEntity(r);
  23772. var _e21 = o.write(t, i + 1);
  23773. if (_e21 < 0) {
  23774. n = i + o.end();
  23775. break;
  23776. }
  23777. n = i + _e21, i = 0 === _e21 ? n + 1 : n;
  23778. }
  23779. var e = s + t.slice(n);
  23780. return s = "", e;
  23781. };
  23782. }
  23783. var ce = le(ne);
  23784. function he(e) {
  23785. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : l.Legacy;
  23786. return ce(e, t);
  23787. }
  23788. function pe(e) {
  23789. return "[object String]" === Object.prototype.toString.call(e);
  23790. }
  23791. le(ie);
  23792. var fe = Object.prototype.hasOwnProperty;
  23793. function c(r) {
  23794. return Array.prototype.slice.call(arguments, 1).forEach(function (t) {
  23795. if (t) {
  23796. if ("object" != _typeof(t)) throw new TypeError(t + "must be object");
  23797. Object.keys(t).forEach(function (e) {
  23798. r[e] = t[e];
  23799. });
  23800. }
  23801. }), r;
  23802. }
  23803. function de(e, t, r) {
  23804. return [].concat(e.slice(0, t), r, e.slice(t + 1));
  23805. }
  23806. function _e(e) {
  23807. return !(55296 <= e && e <= 57343 || 64976 <= e && e <= 65007 || !(65535 & ~e && 65534 != (65535 & e)) || 0 <= e && e <= 8 || 11 === e || 14 <= e && e <= 31 || 127 <= e && e <= 159 || 1114111 < e);
  23808. }
  23809. function h(e) {
  23810. var t;
  23811. return 65535 < e ? (t = 55296 + ((e -= 65536) >> 10), String.fromCharCode(t, 56320 + (1023 & e))) : String.fromCharCode(e);
  23812. }
  23813. var me = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,
  23814. ge = new RegExp(me.source + "|" + /&([a-z#][a-z0-9]{1,31});/gi.source, "gi"),
  23815. ke = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;
  23816. function p(e) {
  23817. return e.indexOf("\\") < 0 && e.indexOf("&") < 0 ? e : e.replace(ge, function (e, t, r) {
  23818. return t || function (t, r) {
  23819. if (35 === r.charCodeAt(0) && ke.test(r)) {
  23820. var _e22 = "x" === r[1].toLowerCase() ? parseInt(r.slice(2), 16) : parseInt(r.slice(1), 10);
  23821. return _e(_e22) ? h(_e22) : t;
  23822. }
  23823. var e = he(t);
  23824. return e !== t ? e : t;
  23825. }(e, r);
  23826. });
  23827. }
  23828. var De = /[&<>"]/,
  23829. Ce = /[&<>"]/g,
  23830. ye = {
  23831. "&": "&amp;",
  23832. "<": "&lt;",
  23833. ">": "&gt;",
  23834. '"': "&quot;"
  23835. };
  23836. function Ee(e) {
  23837. return ye[e];
  23838. }
  23839. function f(e) {
  23840. return De.test(e) ? e.replace(Ce, Ee) : e;
  23841. }
  23842. var Ae = /[.?*+^$[\]\\(){}|-]/g;
  23843. function g(e) {
  23844. switch (e) {
  23845. case 9:
  23846. case 32:
  23847. return !0;
  23848. }
  23849. return !1;
  23850. }
  23851. function y(e) {
  23852. if (8192 <= e && e <= 8202) return !0;
  23853. switch (e) {
  23854. case 9:
  23855. case 10:
  23856. case 11:
  23857. case 12:
  23858. case 13:
  23859. case 32:
  23860. case 160:
  23861. case 5760:
  23862. case 8239:
  23863. case 8287:
  23864. case 12288:
  23865. return !0;
  23866. }
  23867. return !1;
  23868. }
  23869. function E(e) {
  23870. return K.test(e) || ee.test(e);
  23871. }
  23872. function A(e) {
  23873. switch (e) {
  23874. case 33:
  23875. case 34:
  23876. case 35:
  23877. case 36:
  23878. case 37:
  23879. case 38:
  23880. case 39:
  23881. case 40:
  23882. case 41:
  23883. case 42:
  23884. case 43:
  23885. case 44:
  23886. case 45:
  23887. case 46:
  23888. case 47:
  23889. case 58:
  23890. case 59:
  23891. case 60:
  23892. case 61:
  23893. case 62:
  23894. case 63:
  23895. case 64:
  23896. case 91:
  23897. case 92:
  23898. case 93:
  23899. case 94:
  23900. case 95:
  23901. case 96:
  23902. case 123:
  23903. case 124:
  23904. case 125:
  23905. case 126:
  23906. return !0;
  23907. default:
  23908. return !1;
  23909. }
  23910. }
  23911. function _(e) {
  23912. return e = e.trim().replace(/\s+/g, " "), (e = "Ṿ" === "ẞ".toLowerCase() ? e.replace(/\u1e9e/g, "ß") : e).toLowerCase().toUpperCase();
  23913. }
  23914. var Fe = Object.freeze({
  23915. __proto__: null,
  23916. arrayReplaceAt: de,
  23917. assign: c,
  23918. escapeHtml: f,
  23919. escapeRE: function escapeRE(e) {
  23920. return e.replace(Ae, "\\$&");
  23921. },
  23922. fromCodePoint: h,
  23923. has: function has(e, t) {
  23924. return fe.call(e, t);
  23925. },
  23926. isMdAsciiPunct: A,
  23927. isPunctChar: E,
  23928. isSpace: g,
  23929. isString: pe,
  23930. isValidEntityCode: _e,
  23931. isWhiteSpace: y,
  23932. lib: {
  23933. mdurl: Q,
  23934. ucmicro: re
  23935. },
  23936. normalizeReference: _,
  23937. unescapeAll: p,
  23938. unescapeMd: function unescapeMd(e) {
  23939. return e.indexOf("\\") < 0 ? e : e.replace(me, "$1");
  23940. }
  23941. }),
  23942. be = Object.freeze({
  23943. __proto__: null,
  23944. parseLinkDestination: function parseLinkDestination(t, r, n) {
  23945. var i,
  23946. s = r;
  23947. var o = {
  23948. ok: !1,
  23949. pos: 0,
  23950. str: ""
  23951. };
  23952. if (60 === t.charCodeAt(s)) for (s++; s < n;) {
  23953. if (10 === (i = t.charCodeAt(s))) return o;
  23954. if (60 === i) return o;
  23955. if (62 === i) return o.pos = s + 1, o.str = p(t.slice(r + 1, s)), o.ok = !0, o;
  23956. 92 === i && s + 1 < n ? s += 2 : s++;
  23957. } else {
  23958. var _e23 = 0;
  23959. for (; s < n && 32 !== (i = t.charCodeAt(s)) && !(i < 32 || 127 === i);) {
  23960. if (92 === i && s + 1 < n) {
  23961. if (32 === t.charCodeAt(s + 1)) break;
  23962. s += 2;
  23963. } else {
  23964. if (40 === i && 32 < ++_e23) return o;
  23965. if (41 === i) {
  23966. if (0 === _e23) break;
  23967. _e23--;
  23968. }
  23969. s++;
  23970. }
  23971. }
  23972. r !== s && 0 === _e23 && (o.str = p(t.slice(r, s)), o.pos = s, o.ok = !0);
  23973. }
  23974. return o;
  23975. },
  23976. parseLinkLabel: function parseLinkLabel(e, t, r) {
  23977. var n, i, s, o;
  23978. var u = e.posMax,
  23979. a = e.pos;
  23980. for (e.pos = t + 1, n = 1; e.pos < u;) {
  23981. if (93 === (s = e.src.charCodeAt(e.pos)) && 0 === --n) {
  23982. i = !0;
  23983. break;
  23984. }
  23985. if (o = e.pos, e.md.inline.skipToken(e), 91 === s) if (o === e.pos - 1) n++;else if (r) return e.pos = a, -1;
  23986. }
  23987. var l = -1;
  23988. return i && (l = e.pos), e.pos = a, l;
  23989. },
  23990. parseLinkTitle: function parseLinkTitle(t, r, n, e) {
  23991. var i,
  23992. s = r;
  23993. var o = {
  23994. ok: !1,
  23995. can_continue: !1,
  23996. pos: 0,
  23997. str: "",
  23998. marker: 0
  23999. };
  24000. if (e) o.str = e.str, o.marker = e.marker;else {
  24001. if (s >= n) return o;
  24002. var _e24 = t.charCodeAt(s);
  24003. if (34 !== _e24 && 39 !== _e24 && 40 !== _e24) return o;
  24004. r++, s++, 40 === _e24 && (_e24 = 41), o.marker = _e24;
  24005. }
  24006. for (; s < n;) {
  24007. if ((i = t.charCodeAt(s)) === o.marker) return o.pos = s + 1, o.str += p(t.slice(r, s)), o.ok = !0, o;
  24008. if (40 === i && 41 === o.marker) return o;
  24009. 92 === i && s + 1 < n && s++, s++;
  24010. }
  24011. return o.can_continue = !0, o.str += p(t.slice(r, s)), o;
  24012. }
  24013. });
  24014. var e = {};
  24015. function d() {
  24016. this.rules = c({}, e);
  24017. }
  24018. function t() {
  24019. this.__rules__ = [], this.__cache__ = null;
  24020. }
  24021. function m(e, t, r) {
  24022. this.type = e, this.tag = t, this.attrs = null, this.map = null, this.nesting = r, this.level = 0, this.children = null, this.content = "", this.markup = "", this.info = "", this.meta = null, this.block = !1, this.hidden = !1;
  24023. }
  24024. function ve(e, t, r) {
  24025. this.src = e, this.env = r, this.tokens = [], this.inlineMode = !1, this.md = t;
  24026. }
  24027. e.code_inline = function (e, t, r, n, i) {
  24028. e = e[t];
  24029. return "<code" + i.renderAttrs(e) + ">" + f(e.content) + "</code>";
  24030. }, e.code_block = function (e, t, r, n, i) {
  24031. var s = e[t];
  24032. return "<pre" + i.renderAttrs(s) + "><code>" + f(e[t].content) + "</code></pre>\n";
  24033. }, e.fence = function (e, t, n, r, i) {
  24034. var s = e[t],
  24035. t = s.info ? p(s.info).trim() : "";
  24036. var o,
  24037. u = "",
  24038. a = "";
  24039. if (t) {
  24040. var _e25 = t.split(/(\s+)/g);
  24041. u = _e25[0], a = _e25.slice(2).join("");
  24042. }
  24043. if (0 === (o = n.highlight && n.highlight(s.content, u, a) || f(s.content)).indexOf("<pre")) return o + "\n";
  24044. if (t) {
  24045. var _e26 = s.attrIndex("class"),
  24046. _t11 = s.attrs ? s.attrs.slice() : [],
  24047. _r7 = (_e26 < 0 ? _t11.push(["class", n.langPrefix + u]) : (_t11[_e26] = _t11[_e26].slice(), _t11[_e26][1] += " " + n.langPrefix + u), {
  24048. attrs: _t11
  24049. });
  24050. return "<pre><code".concat(i.renderAttrs(_r7), ">").concat(o, "</code></pre>\n");
  24051. }
  24052. return "<pre><code".concat(i.renderAttrs(s), ">").concat(o, "</code></pre>\n");
  24053. }, e.image = function (e, t, r, n, i) {
  24054. var s = e[t];
  24055. return s.attrs[s.attrIndex("alt")][1] = i.renderInlineAsText(s.children, r, n), i.renderToken(e, t, r);
  24056. }, e.hardbreak = function (e, t, r) {
  24057. return r.xhtmlOut ? "<br />\n" : "<br>\n";
  24058. }, e.softbreak = function (e, t, r) {
  24059. return r.breaks ? r.xhtmlOut ? "<br />\n" : "<br>\n" : "\n";
  24060. }, e.text = function (e, t) {
  24061. return f(e[t].content);
  24062. }, e.html_block = function (e, t) {
  24063. return e[t].content;
  24064. }, e.html_inline = function (e, t) {
  24065. return e[t].content;
  24066. }, d.prototype.renderAttrs = function (e) {
  24067. var t, r, n;
  24068. if (!e.attrs) return "";
  24069. for (n = "", t = 0, r = e.attrs.length; t < r; t++) {
  24070. n += " " + f(e.attrs[t][0]) + '="' + f(e.attrs[t][1]) + '"';
  24071. }
  24072. return n;
  24073. }, d.prototype.renderToken = function (t, r, e) {
  24074. var n = t[r];
  24075. var i = "";
  24076. if (n.hidden) return "";
  24077. n.block && -1 !== n.nesting && r && t[r - 1].hidden && (i += "\n"), i = (i += (-1 === n.nesting ? "</" : "<") + n.tag) + this.renderAttrs(n), 0 === n.nesting && e.xhtmlOut && (i += " /");
  24078. var s = !1;
  24079. if (n.block && (s = !0, 1 === n.nesting) && r + 1 < t.length) {
  24080. var _e27 = t[r + 1];
  24081. ("inline" === _e27.type || _e27.hidden || -1 === _e27.nesting && _e27.tag === n.tag) && (s = !1);
  24082. }
  24083. return i += s ? ">\n" : ">";
  24084. }, d.prototype.renderInline = function (r, n, i) {
  24085. var s = "";
  24086. var o = this.rules;
  24087. for (var _e28 = 0, _t12 = r.length; _e28 < _t12; _e28++) {
  24088. var u = r[_e28].type;
  24089. void 0 !== o[u] ? s += o[u](r, _e28, n, i, this) : s += this.renderToken(r, _e28, n);
  24090. }
  24091. return s;
  24092. }, d.prototype.renderInlineAsText = function (r, n, i) {
  24093. var s = "";
  24094. for (var _e29 = 0, _t13 = r.length; _e29 < _t13; _e29++) {
  24095. switch (r[_e29].type) {
  24096. case "text":
  24097. case "html_inline":
  24098. case "html_block":
  24099. s += r[_e29].content;
  24100. break;
  24101. case "image":
  24102. s += this.renderInlineAsText(r[_e29].children, n, i);
  24103. break;
  24104. case "softbreak":
  24105. case "hardbreak":
  24106. s += "\n";
  24107. }
  24108. }
  24109. return s;
  24110. }, d.prototype.render = function (r, n, i) {
  24111. var s = "";
  24112. var o = this.rules;
  24113. for (var _e30 = 0, _t14 = r.length; _e30 < _t14; _e30++) {
  24114. var u = r[_e30].type;
  24115. "inline" === u ? s += this.renderInline(r[_e30].children, n, i) : void 0 !== o[u] ? s += o[u](r, _e30, n, i, this) : s += this.renderToken(r, _e30, n, i);
  24116. }
  24117. return s;
  24118. }, t.prototype.__find__ = function (t) {
  24119. for (var _e31 = 0; _e31 < this.__rules__.length; _e31++) {
  24120. if (this.__rules__[_e31].name === t) return _e31;
  24121. }
  24122. return -1;
  24123. }, t.prototype.__compile__ = function () {
  24124. var r = this,
  24125. t = [""];
  24126. r.__rules__.forEach(function (e) {
  24127. e.enabled && e.alt.forEach(function (e) {
  24128. t.indexOf(e) < 0 && t.push(e);
  24129. });
  24130. }), r.__cache__ = {}, t.forEach(function (t) {
  24131. r.__cache__[t] = [], r.__rules__.forEach(function (e) {
  24132. !e.enabled || t && e.alt.indexOf(t) < 0 || r.__cache__[t].push(e.fn);
  24133. });
  24134. });
  24135. }, t.prototype.at = function (e, t, r) {
  24136. var n = this.__find__(e),
  24137. r = r || {};
  24138. if (-1 === n) throw new Error("Parser rule not found: " + e);
  24139. this.__rules__[n].fn = t, this.__rules__[n].alt = r.alt || [], this.__cache__ = null;
  24140. }, t.prototype.before = function (e, t, r, n) {
  24141. var i = this.__find__(e),
  24142. n = n || {};
  24143. if (-1 === i) throw new Error("Parser rule not found: " + e);
  24144. this.__rules__.splice(i, 0, {
  24145. name: t,
  24146. enabled: !0,
  24147. fn: r,
  24148. alt: n.alt || []
  24149. }), this.__cache__ = null;
  24150. }, t.prototype.after = function (e, t, r, n) {
  24151. var i = this.__find__(e),
  24152. n = n || {};
  24153. if (-1 === i) throw new Error("Parser rule not found: " + e);
  24154. this.__rules__.splice(i + 1, 0, {
  24155. name: t,
  24156. enabled: !0,
  24157. fn: r,
  24158. alt: n.alt || []
  24159. }), this.__cache__ = null;
  24160. }, t.prototype.push = function (e, t, r) {
  24161. this.__rules__.push({
  24162. name: e,
  24163. enabled: !0,
  24164. fn: t,
  24165. alt: (r || {}).alt || []
  24166. }), this.__cache__ = null;
  24167. }, t.prototype.enable = function (e, r) {
  24168. Array.isArray(e) || (e = [e]);
  24169. var n = [];
  24170. return e.forEach(function (e) {
  24171. var t = this.__find__(e);
  24172. if (t < 0) {
  24173. if (r) return;
  24174. throw new Error("Rules manager: invalid rule name " + e);
  24175. }
  24176. this.__rules__[t].enabled = !0, n.push(e);
  24177. }, this), this.__cache__ = null, n;
  24178. }, t.prototype.enableOnly = function (e, t) {
  24179. Array.isArray(e) || (e = [e]), this.__rules__.forEach(function (e) {
  24180. e.enabled = !1;
  24181. }), this.enable(e, t);
  24182. }, t.prototype.disable = function (e, r) {
  24183. Array.isArray(e) || (e = [e]);
  24184. var n = [];
  24185. return e.forEach(function (e) {
  24186. var t = this.__find__(e);
  24187. if (t < 0) {
  24188. if (r) return;
  24189. throw new Error("Rules manager: invalid rule name " + e);
  24190. }
  24191. this.__rules__[t].enabled = !1, n.push(e);
  24192. }, this), this.__cache__ = null, n;
  24193. }, t.prototype.getRules = function (e) {
  24194. return null === this.__cache__ && this.__compile__(), this.__cache__[e] || [];
  24195. }, m.prototype.attrIndex = function (r) {
  24196. if (this.attrs) {
  24197. var n = this.attrs;
  24198. for (var _e32 = 0, _t15 = n.length; _e32 < _t15; _e32++) {
  24199. if (n[_e32][0] === r) return _e32;
  24200. }
  24201. }
  24202. return -1;
  24203. }, m.prototype.attrPush = function (e) {
  24204. this.attrs ? this.attrs.push(e) : this.attrs = [e];
  24205. }, m.prototype.attrSet = function (e, t) {
  24206. var r = this.attrIndex(e),
  24207. e = [e, t];
  24208. r < 0 ? this.attrPush(e) : this.attrs[r] = e;
  24209. }, m.prototype.attrGet = function (e) {
  24210. e = this.attrIndex(e);
  24211. var t = null;
  24212. return t = 0 <= e ? this.attrs[e][1] : t;
  24213. }, m.prototype.attrJoin = function (e, t) {
  24214. var r = this.attrIndex(e);
  24215. r < 0 ? this.attrPush([e, t]) : this.attrs[r][1] = this.attrs[r][1] + " " + t;
  24216. }, ve.prototype.Token = m;
  24217. var xe = /\r\n?|\n/g,
  24218. we = /\0/g;
  24219. var ze = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/,
  24220. Se = /\((c|tm|r)\)/i,
  24221. qe = /\((c|tm|r)\)/gi,
  24222. Be = {
  24223. c: "©",
  24224. r: "®",
  24225. tm: "™"
  24226. };
  24227. function Le(e, t) {
  24228. return Be[t.toLowerCase()];
  24229. }
  24230. var Ie = /['"]/,
  24231. Me = /['"]/g;
  24232. function F(e, t, r) {
  24233. return e.slice(0, t) + r + e.slice(t + 1);
  24234. }
  24235. var Te = [["normalize", function (e) {
  24236. var t;
  24237. t = (t = e.src.replace(xe, "\n")).replace(we, "�"), e.src = t;
  24238. }], ["block", function (e) {
  24239. var t;
  24240. e.inlineMode ? ((t = new e.Token("inline", "", 0)).content = e.src, t.map = [0, 1], t.children = [], e.tokens.push(t)) : e.md.block.parse(e.src, e.md, e.env, e.tokens);
  24241. }], ["inline", function (r) {
  24242. var n = r.tokens;
  24243. for (var _e33 = 0, _t16 = n.length; _e33 < _t16; _e33++) {
  24244. var i = n[_e33];
  24245. "inline" === i.type && r.md.inline.parse(i.content, r.md, r.env, i.children);
  24246. }
  24247. }], ["linkify", function (u) {
  24248. var a = u.tokens;
  24249. var r;
  24250. if (u.md.options.linkify) for (var _o = 0, _e34 = a.length; _o < _e34; _o++) {
  24251. if ("inline" === a[_o].type && u.md.linkify.pretest(a[_o].content)) {
  24252. var _s2 = a[_o].children,
  24253. _t17 = 0;
  24254. for (var _e35 = _s2.length - 1; 0 <= _e35; _e35--) {
  24255. var l = _s2[_e35];
  24256. if ("link_close" !== l.type) {
  24257. if ("html_inline" === l.type && (/^<a[>\s]/i.test(r = l.content) && 0 < _t17 && _t17--, /^<\/a\s*>/i.test(l.content)) && _t17++, !(0 < _t17) && "text" === l.type && u.md.linkify.test(l.content)) {
  24258. var _t18 = l.content,
  24259. _r8 = u.md.linkify.match(_t18);
  24260. var c = [];
  24261. var _n4 = l.level,
  24262. _i3 = 0;
  24263. 0 < _r8.length && 0 === _r8[0].index && 0 < _e35 && "text_special" === _s2[_e35 - 1].type && (_r8 = _r8.slice(1));
  24264. for (var _e36 = 0; _e36 < _r8.length; _e36++) {
  24265. var h = _r8[_e36].url,
  24266. h = u.md.normalizeLink(h);
  24267. if (u.md.validateLink(h)) {
  24268. var p = _r8[_e36].text,
  24269. p = _r8[_e36].schema ? "mailto:" !== _r8[_e36].schema || /^mailto:/i.test(p) ? u.md.normalizeLinkText(p) : u.md.normalizeLinkText("mailto:" + p).replace(/^mailto:/, "") : u.md.normalizeLinkText("http://" + p).replace(/^http:\/\//, ""),
  24270. f = _r8[_e36].index;
  24271. if (f > _i3) {
  24272. var _e37 = new u.Token("text", "", 0);
  24273. _e37.content = _t18.slice(_i3, f), _e37.level = _n4, c.push(_e37);
  24274. }
  24275. f = new u.Token("link_open", "a", 1), h = (f.attrs = [["href", h]], f.level = _n4++, f.markup = "linkify", f.info = "auto", c.push(f), new u.Token("text", "", 0)), f = (h.content = p, h.level = _n4, c.push(h), new u.Token("link_close", "a", -1));
  24276. f.level = --_n4, f.markup = "linkify", f.info = "auto", c.push(f), _i3 = _r8[_e36].lastIndex;
  24277. }
  24278. }
  24279. if (_i3 < _t18.length) {
  24280. var _e38 = new u.Token("text", "", 0);
  24281. _e38.content = _t18.slice(_i3), _e38.level = _n4, c.push(_e38);
  24282. }
  24283. a[_o].children = _s2 = de(_s2, _e35, c);
  24284. }
  24285. } else for (_e35--; _s2[_e35].level !== l.level && "link_open" !== _s2[_e35].type;) {
  24286. _e35--;
  24287. }
  24288. }
  24289. }
  24290. }
  24291. }], ["replacements", function (e) {
  24292. var r;
  24293. if (e.md.options.typographer) for (r = e.tokens.length - 1; 0 <= r; r--) {
  24294. if ("inline" === e.tokens[r].type && (Se.test(e.tokens[r].content) && function (t) {
  24295. var r = 0;
  24296. for (var _e39 = t.length - 1; 0 <= _e39; _e39--) {
  24297. var n = t[_e39];
  24298. "text" !== n.type || r || (n.content = n.content.replace(qe, Le)), "link_open" === n.type && "auto" === n.info && r--, "link_close" === n.type && "auto" === n.info && r++;
  24299. }
  24300. }(e.tokens[r].children), ze.test(e.tokens[r].content))) {
  24301. n = void 0;
  24302. i = void 0;
  24303. var n = e.tokens[r].children;
  24304. var _t19 = 0;
  24305. for (var _e40 = n.length - 1; 0 <= _e40; _e40--) {
  24306. var i = n[_e40];
  24307. "text" !== i.type || _t19 || ze.test(i.content) && (i.content = i.content.replace(/\+-/g, "±").replace(/\.{2,}/g, "…").replace(/([?!])\u2026/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---(?=[^-]|$)/gm, "$1—").replace(/(^|\s)--(?=\s|$)/gm, "$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm, "$1–")), "link_open" === i.type && "auto" === i.info && _t19--, "link_close" === i.type && "auto" === i.info && _t19++;
  24308. }
  24309. }
  24310. }
  24311. }], ["smartquotes", function (t) {
  24312. if (t.md.options.typographer) for (var _e41 = t.tokens.length - 1; 0 <= _e41; _e41--) {
  24313. if ("inline" === t.tokens[_e41].type && Ie.test(t.tokens[_e41].content)) {
  24314. l = void 0;
  24315. c = void 0;
  24316. h = void 0;
  24317. p = void 0;
  24318. f = void 0;
  24319. d = void 0;
  24320. _ = void 0;
  24321. m = void 0;
  24322. g = void 0;
  24323. k = void 0;
  24324. D = void 0;
  24325. C = void 0;
  24326. var l = t.tokens[_e41].children;
  24327. var c = t;
  24328. var _a = void 0;
  24329. var h = [];
  24330. for (var _u = 0; _u < l.length; _u++) {
  24331. var p = l[_u],
  24332. f = l[_u].level;
  24333. for (_a = h.length - 1; 0 <= _a && !(h[_a].level <= f); _a--) {
  24334. ;
  24335. }
  24336. if (h.length = _a + 1, "text" === p.type) {
  24337. var _i4 = p.content,
  24338. _s3 = 0,
  24339. _o2 = _i4.length;
  24340. e: for (; _s3 < _o2;) {
  24341. Me.lastIndex = _s3;
  24342. var d = Me.exec(_i4);
  24343. if (!d) break;
  24344. var _e42 = !0,
  24345. _t20 = !0;
  24346. _s3 = d.index + 1;
  24347. var _ = "'" === d[0];
  24348. var _r9 = 32;
  24349. if (0 <= d.index - 1) _r9 = _i4.charCodeAt(d.index - 1);else for (_a = _u - 1; 0 <= _a && "softbreak" !== l[_a].type && "hardbreak" !== l[_a].type; _a--) {
  24350. if (l[_a].content) {
  24351. _r9 = l[_a].content.charCodeAt(l[_a].content.length - 1);
  24352. break;
  24353. }
  24354. }
  24355. var _n5 = 32;
  24356. if (_s3 < _o2) _n5 = _i4.charCodeAt(_s3);else for (_a = _u + 1; _a < l.length && "softbreak" !== l[_a].type && "hardbreak" !== l[_a].type; _a++) {
  24357. if (l[_a].content) {
  24358. _n5 = l[_a].content.charCodeAt(0);
  24359. break;
  24360. }
  24361. }
  24362. var m = A(_r9) || E(String.fromCharCode(_r9)),
  24363. g = A(_n5) || E(String.fromCharCode(_n5)),
  24364. k = y(_r9),
  24365. D = y(_n5);
  24366. if (D ? _e42 = !1 : !g || k || m || (_e42 = !1), k ? _t20 = !1 : !m || D || g || (_t20 = !1), 34 === _n5 && '"' === d[0] && 48 <= _r9 && _r9 <= 57 && (_t20 = _e42 = !1), _e42 && _t20 && (_e42 = m, _t20 = g), _e42 || _t20) {
  24367. if (_t20) for (_a = h.length - 1; 0 <= _a; _a--) {
  24368. var C = h[_a];
  24369. if (h[_a].level < f) break;
  24370. if (C.single === _ && h[_a].level === f) {
  24371. var _e43 = void 0,
  24372. _t21 = void 0;
  24373. C = h[_a], _t21 = _ ? (_e43 = c.md.options.quotes[2], c.md.options.quotes[3]) : (_e43 = c.md.options.quotes[0], c.md.options.quotes[1]), p.content = F(p.content, d.index, _t21), l[C.token].content = F(l[C.token].content, C.pos, _e43), _s3 += _t21.length - 1, C.token === _u && (_s3 += _e43.length - 1), _i4 = p.content, _o2 = _i4.length, h.length = _a;
  24374. continue e;
  24375. }
  24376. }
  24377. _e42 ? h.push({
  24378. token: _u,
  24379. pos: d.index,
  24380. single: _,
  24381. level: f
  24382. }) : _t20 && _ && (p.content = F(p.content, d.index, "’"));
  24383. } else _ && (p.content = F(p.content, d.index, "’"));
  24384. }
  24385. }
  24386. }
  24387. }
  24388. }
  24389. }], ["text_join", function (e) {
  24390. var n,
  24391. i,
  24392. s = e.tokens,
  24393. t = s.length;
  24394. for (var _r10 = 0; _r10 < t; _r10++) {
  24395. if ("inline" === s[_r10].type) {
  24396. var _e44 = s[_r10].children,
  24397. _t22 = _e44.length;
  24398. for (n = 0; n < _t22; n++) {
  24399. "text_special" === _e44[n].type && (_e44[n].type = "text");
  24400. }
  24401. for (n = i = 0; n < _t22; n++) {
  24402. "text" === _e44[n].type && n + 1 < _t22 && "text" === _e44[n + 1].type ? _e44[n + 1].content = _e44[n].content + _e44[n + 1].content : (n !== i && (_e44[i] = _e44[n]), i++);
  24403. }
  24404. n !== i && (_e44.length = i);
  24405. }
  24406. }
  24407. }]];
  24408. function Re() {
  24409. this.ruler = new t();
  24410. for (var _e45 = 0; _e45 < Te.length; _e45++) {
  24411. this.ruler.push(Te[_e45][0], Te[_e45][1]);
  24412. }
  24413. }
  24414. function k(e, t, r, n) {
  24415. this.src = e, this.md = t, this.env = r, this.tokens = n, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0;
  24416. var o = this.src;
  24417. for (var _e46 = 0, _t23 = 0, _r11 = 0, _n6 = 0, _i5 = o.length, _s4 = !1; _t23 < _i5; _t23++) {
  24418. var u = o.charCodeAt(_t23);
  24419. if (!_s4) {
  24420. if (g(u)) {
  24421. _r11++, 9 === u ? _n6 += 4 - _n6 % 4 : _n6++;
  24422. continue;
  24423. }
  24424. _s4 = !0;
  24425. }
  24426. 10 !== u && _t23 !== _i5 - 1 || (10 !== u && _t23++, this.bMarks.push(_e46), this.eMarks.push(_t23), this.tShift.push(_r11), this.sCount.push(_n6), this.bsCount.push(0), _s4 = !1, _r11 = 0, _n6 = 0, _e46 = _t23 + 1);
  24427. }
  24428. this.bMarks.push(o.length), this.eMarks.push(o.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
  24429. }
  24430. function Ne(e, t) {
  24431. var r = e.bMarks[t] + e.tShift[t],
  24432. t = e.eMarks[t];
  24433. return e.src.slice(r, t);
  24434. }
  24435. function Pe(e) {
  24436. var t = [],
  24437. r = e.length;
  24438. var n = 0,
  24439. i = e.charCodeAt(n),
  24440. s = !1,
  24441. o = 0,
  24442. u = "";
  24443. for (; n < r;) {
  24444. 124 === i && (o = s ? (u += e.substring(o, n - 1), n) : (t.push(u + e.substring(o, n)), u = "", n + 1)), s = 92 === i, n++, i = e.charCodeAt(n);
  24445. }
  24446. return t.push(u + e.substring(o)), t;
  24447. }
  24448. function Oe(e, t) {
  24449. var r = e.eMarks[t],
  24450. t = e.bMarks[t] + e.tShift[t],
  24451. n = e.src.charCodeAt(t++);
  24452. return 42 !== n && 45 !== n && 43 !== n || t < r && !g(e.src.charCodeAt(t)) ? -1 : t;
  24453. }
  24454. function je(e, t) {
  24455. var r = e.bMarks[t] + e.tShift[t],
  24456. n = e.eMarks[t];
  24457. var i = r;
  24458. if (i + 1 >= n) return -1;
  24459. var s = e.src.charCodeAt(i++);
  24460. if (s < 48 || 57 < s) return -1;
  24461. for (;;) {
  24462. if (i >= n) return -1;
  24463. if (!(48 <= (s = e.src.charCodeAt(i++)) && s <= 57)) {
  24464. if (41 === s || 46 === s) break;
  24465. return -1;
  24466. }
  24467. if (10 <= i - r) return -1;
  24468. }
  24469. return i < n && !g(s = e.src.charCodeAt(i)) ? -1 : i;
  24470. }
  24471. Re.prototype.process = function (r) {
  24472. var n = this.ruler.getRules("");
  24473. for (var _e47 = 0, _t24 = n.length; _e47 < _t24; _e47++) {
  24474. n[_e47](r);
  24475. }
  24476. }, Re.prototype.State = ve, k.prototype.push = function (e, t, r) {
  24477. e = new m(e, t, r);
  24478. return e.block = !0, r < 0 && this.level--, e.level = this.level, 0 < r && this.level++, this.tokens.push(e), e;
  24479. }, k.prototype.isEmpty = function (e) {
  24480. return this.bMarks[e] + this.tShift[e] >= this.eMarks[e];
  24481. }, k.prototype.skipEmptyLines = function (e) {
  24482. for (var t = this.lineMax; e < t && !(this.bMarks[e] + this.tShift[e] < this.eMarks[e]); e++) {
  24483. ;
  24484. }
  24485. return e;
  24486. }, k.prototype.skipSpaces = function (e) {
  24487. for (var t = this.src.length; e < t && g(this.src.charCodeAt(e)); e++) {
  24488. ;
  24489. }
  24490. return e;
  24491. }, k.prototype.skipSpacesBack = function (e, t) {
  24492. if (!(e <= t)) for (; t < e;) {
  24493. if (!g(this.src.charCodeAt(--e))) return e + 1;
  24494. }
  24495. return e;
  24496. }, k.prototype.skipChars = function (e, t) {
  24497. for (var r = this.src.length; e < r && this.src.charCodeAt(e) === t; e++) {
  24498. ;
  24499. }
  24500. return e;
  24501. }, k.prototype.skipCharsBack = function (e, t, r) {
  24502. if (!(e <= r)) for (; r < e;) {
  24503. if (t !== this.src.charCodeAt(--e)) return e + 1;
  24504. }
  24505. return e;
  24506. }, k.prototype.getLines = function (e, s, o, u) {
  24507. if (s <= e) return "";
  24508. var a = new Array(s - e);
  24509. for (var _n7 = 0, _i6 = e; _i6 < s; _i6++, _n7++) {
  24510. var _t25 = 0;
  24511. var l = this.bMarks[_i6];
  24512. var _e48 = void 0,
  24513. _r12 = l;
  24514. for (_e48 = _i6 + 1 < s || u ? this.eMarks[_i6] + 1 : this.eMarks[_i6]; _r12 < _e48 && _t25 < o;) {
  24515. var _e49 = this.src.charCodeAt(_r12);
  24516. if (g(_e49)) 9 === _e49 ? _t25 += 4 - (_t25 + this.bsCount[_i6]) % 4 : _t25++;else {
  24517. if (!(_r12 - l < this.tShift[_i6])) break;
  24518. _t25++;
  24519. }
  24520. _r12++;
  24521. }
  24522. a[_n7] = _t25 > o ? new Array(_t25 - o + 1).join(" ") + this.src.slice(_r12, _e48) : this.src.slice(_r12, _e48);
  24523. }
  24524. return a.join("");
  24525. }, k.prototype.Token = m;
  24526. var Ze = "<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",
  24527. $e = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",
  24528. Ue = new RegExp("^(?:" + Ze + "|" + $e + "|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),
  24529. He = new RegExp("^(?:" + Ze + "|" + $e + ")"),
  24530. D = [[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0], [/^<!--/, /-->/, !0], [/^<\?/, /\?>/, !0], [/^<![A-Z]/, />/, !0], [/^<!\[CDATA\[/, /\]\]>/, !0], [new RegExp("^</?(" + ["address", "article", "aside", "base", "basefont", "blockquote", "body", "caption", "center", "col", "colgroup", "dd", "details", "dialog", "dir", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hr", "html", "iframe", "legend", "li", "link", "main", "menu", "menuitem", "nav", "noframes", "ol", "optgroup", "option", "p", "param", "search", "section", "summary", "table", "tbody", "td", "tfoot", "th", "thead", "title", "tr", "track", "ul"].join("|") + ")(?=(\\s|/?>|$))", "i"), /^$/, !0], [new RegExp(He.source + "\\s*$"), /^$/, !1]],
  24531. C = [["table", function (n, i, s, e) {
  24532. if (s < i + 2) return !1;
  24533. var o = i + 1;
  24534. if (n.sCount[o] < n.blkIndent) return !1;
  24535. if (4 <= n.sCount[o] - n.blkIndent) return !1;
  24536. var t = n.bMarks[o] + n.tShift[o];
  24537. if (t >= n.eMarks[o]) return !1;
  24538. var r = n.src.charCodeAt(t++);
  24539. if (124 !== r && 45 !== r && 58 !== r) return !1;
  24540. if (t >= n.eMarks[o]) return !1;
  24541. var u = n.src.charCodeAt(t++);
  24542. if (124 !== u && 45 !== u && 58 !== u && !g(u)) return !1;
  24543. if (45 === r && g(u)) return !1;
  24544. for (; t < n.eMarks[o];) {
  24545. var _e50 = n.src.charCodeAt(t);
  24546. if (124 !== _e50 && 45 !== _e50 && 58 !== _e50 && !g(_e50)) return !1;
  24547. t++;
  24548. }
  24549. var a = Ne(n, i + 1),
  24550. l = a.split("|");
  24551. var c = [];
  24552. for (var _t26 = 0; _t26 < l.length; _t26++) {
  24553. var _e51 = l[_t26].trim();
  24554. if (!_e51) {
  24555. if (0 === _t26 || _t26 === l.length - 1) continue;
  24556. return !1;
  24557. }
  24558. if (!/^:?-+:?$/.test(_e51)) return !1;
  24559. 58 === _e51.charCodeAt(_e51.length - 1) ? c.push(58 === _e51.charCodeAt(0) ? "center" : "right") : 58 === _e51.charCodeAt(0) ? c.push("left") : c.push("");
  24560. }
  24561. if (-1 === (a = Ne(n, i).trim()).indexOf("|")) return !1;
  24562. if (4 <= n.sCount[i] - n.blkIndent) return !1;
  24563. (l = Pe(a)).length && "" === l[0] && l.shift(), l.length && "" === l[l.length - 1] && l.pop();
  24564. var h = l.length;
  24565. if (0 === h || h !== c.length) return !1;
  24566. if (!e) {
  24567. var r = n.parentType,
  24568. p = (n.parentType = "table", n.md.block.ruler.getRules("blockquote")),
  24569. u = [i, 0];
  24570. n.push("table_open", "table", 1).map = u, n.push("thead_open", "thead", 1).map = [i, i + 1], n.push("tr_open", "tr", 1).map = [i, i + 1];
  24571. for (var _r13 = 0; _r13 < l.length; _r13++) {
  24572. var _e53 = n.push("th_open", "th", 1),
  24573. _t28 = (c[_r13] && (_e53.attrs = [["style", "text-align:" + c[_r13]]]), n.push("inline", "", 0));
  24574. _t28.content = l[_r13].trim(), _t28.children = [], n.push("th_close", "th", -1);
  24575. }
  24576. var _e52,
  24577. _t27 = (n.push("tr_close", "tr", -1), n.push("thead_close", "thead", -1), 0);
  24578. for (o = i + 2; o < s && !(n.sCount[o] < n.blkIndent); o++) {
  24579. var _r14 = !1;
  24580. for (var _e54 = 0, _t29 = p.length; _e54 < _t29; _e54++) {
  24581. if (p[_e54](n, o, s, !0)) {
  24582. _r14 = !0;
  24583. break;
  24584. }
  24585. }
  24586. if (_r14) break;
  24587. if (!(a = Ne(n, o).trim())) break;
  24588. if (4 <= n.sCount[o] - n.blkIndent) break;
  24589. if ((l = Pe(a)).length && "" === l[0] && l.shift(), l.length && "" === l[l.length - 1] && l.pop(), 65536 < (_t27 += h - l.length)) break;
  24590. o === i + 2 && (n.push("tbody_open", "tbody", 1).map = _e52 = [i + 2, 0]), n.push("tr_open", "tr", 1).map = [o, o + 1];
  24591. for (var _r15 = 0; _r15 < h; _r15++) {
  24592. var _e55 = n.push("td_open", "td", 1),
  24593. _t30 = (c[_r15] && (_e55.attrs = [["style", "text-align:" + c[_r15]]]), n.push("inline", "", 0));
  24594. _t30.content = l[_r15] ? l[_r15].trim() : "", _t30.children = [], n.push("td_close", "td", -1);
  24595. }
  24596. n.push("tr_close", "tr", -1);
  24597. }
  24598. _e52 && (n.push("tbody_close", "tbody", -1), _e52[1] = o), n.push("table_close", "table", -1), u[1] = o, n.parentType = r, n.line = o;
  24599. }
  24600. return !0;
  24601. }, ["paragraph", "reference"]], ["code", function (e, t, r) {
  24602. if (e.sCount[t] - e.blkIndent < 4) return !1;
  24603. var n = t + 1,
  24604. i = n;
  24605. for (; n < r;) {
  24606. if (e.isEmpty(n)) n++;else {
  24607. if (!(4 <= e.sCount[n] - e.blkIndent)) break;
  24608. n++, i = n;
  24609. }
  24610. }
  24611. e.line = i;
  24612. var s = e.push("code_block", "code", 0);
  24613. return s.content = e.getLines(t, i, 4 + e.blkIndent, !1) + "\n", s.map = [t, e.line], !0;
  24614. }], ["fence", function (r, n, i, s) {
  24615. var o = r.bMarks[n] + r.tShift[n],
  24616. u = r.eMarks[n];
  24617. if (4 <= r.sCount[n] - r.blkIndent) return !1;
  24618. if (o + 3 > u) return !1;
  24619. var a = r.src.charCodeAt(o);
  24620. if (126 !== a && 96 !== a) return !1;
  24621. var l = o,
  24622. c = (o = r.skipChars(o, a)) - l;
  24623. if (c < 3) return !1;
  24624. var h = r.src.slice(l, o),
  24625. p = r.src.slice(o, u);
  24626. if (96 === a && 0 <= p.indexOf(String.fromCharCode(a))) return !1;
  24627. if (!s) {
  24628. var _e56 = n,
  24629. _t31 = !1;
  24630. for (; !(++_e56 >= i || (o = l = r.bMarks[_e56] + r.tShift[_e56], u = r.eMarks[_e56], o < u && r.sCount[_e56] < r.blkIndent));) {
  24631. if (r.src.charCodeAt(o) === a && !(4 <= r.sCount[_e56] - r.blkIndent || (o = r.skipChars(o, a)) - l < c || (o = r.skipSpaces(o)) < u)) {
  24632. _t31 = !0;
  24633. break;
  24634. }
  24635. }
  24636. c = r.sCount[n], r.line = _e56 + (_t31 ? 1 : 0);
  24637. s = r.push("fence", "code", 0);
  24638. s.info = p, s.content = r.getLines(n + 1, _e56, c, !0), s.markup = h, s.map = [n, r.line];
  24639. }
  24640. return !0;
  24641. }, ["paragraph", "reference", "blockquote", "list"]], ["blockquote", function (o, t, n, e) {
  24642. var u = o.bMarks[t] + o.tShift[t],
  24643. a = void o.eMarks[t];
  24644. var r = o.lineMax;
  24645. if (4 <= o.sCount[t] - o.blkIndent) return !1;
  24646. if (62 !== o.src.charCodeAt(u)) return !1;
  24647. if (!e) {
  24648. var l = [],
  24649. c = [],
  24650. h = [],
  24651. p = [],
  24652. f = o.md.block.ruler.getRules("blockquote"),
  24653. e = o.parentType;
  24654. var _i7,
  24655. _s5 = !(o.parentType = "blockquote");
  24656. for (_i7 = t; _i7 < n; _i7++) {
  24657. var _e57 = o.sCount[_i7] < o.blkIndent;
  24658. if (u = o.bMarks[_i7] + o.tShift[_i7], a = o.eMarks[_i7], u >= a) break;
  24659. if (62 !== o.src.charCodeAt(u++) || _e57) {
  24660. if (_s5) break;
  24661. var _r16 = !1;
  24662. for (var _e58 = 0, _t32 = f.length; _e58 < _t32; _e58++) {
  24663. if (f[_e58](o, _i7, n, !0)) {
  24664. _r16 = !0;
  24665. break;
  24666. }
  24667. }
  24668. if (_r16) {
  24669. o.lineMax = _i7, 0 !== o.blkIndent && (l.push(o.bMarks[_i7]), c.push(o.bsCount[_i7]), p.push(o.tShift[_i7]), h.push(o.sCount[_i7]), o.sCount[_i7] -= o.blkIndent);
  24670. break;
  24671. }
  24672. l.push(o.bMarks[_i7]), c.push(o.bsCount[_i7]), p.push(o.tShift[_i7]), h.push(o.sCount[_i7]), o.sCount[_i7] = -1;
  24673. } else {
  24674. var _e59 = void 0,
  24675. _t33 = void 0,
  24676. _r17 = o.sCount[_i7] + 1,
  24677. _n8 = (32 === o.src.charCodeAt(u) ? (u++, _r17++, _t33 = !1, _e59 = !0) : 9 === o.src.charCodeAt(u) ? (_e59 = !0, _t33 = (o.bsCount[_i7] + _r17) % 4 != 3 || (u++, _r17++, !1)) : _e59 = !1, _r17);
  24678. for (l.push(o.bMarks[_i7]), o.bMarks[_i7] = u; u < a;) {
  24679. var _e60 = o.src.charCodeAt(u);
  24680. if (!g(_e60)) break;
  24681. 9 === _e60 ? _n8 += 4 - (_n8 + o.bsCount[_i7] + (_t33 ? 1 : 0)) % 4 : _n8++, u++;
  24682. }
  24683. _s5 = u >= a, c.push(o.bsCount[_i7]), o.bsCount[_i7] = o.sCount[_i7] + 1 + (_e59 ? 1 : 0), h.push(o.sCount[_i7]), o.sCount[_i7] = _n8 - _r17, p.push(o.tShift[_i7]), o.tShift[_i7] = u - o.bMarks[_i7];
  24684. }
  24685. }
  24686. var d = o.blkIndent,
  24687. _ = (o.blkIndent = 0, o.push("blockquote_open", "blockquote", 1)),
  24688. m = (_.markup = ">", [t, 0]);
  24689. _.map = m, o.md.block.tokenize(o, t, _i7), o.push("blockquote_close", "blockquote", -1).markup = ">", o.lineMax = r, o.parentType = e, m[1] = o.line;
  24690. for (var _e61 = 0; _e61 < p.length; _e61++) {
  24691. o.bMarks[_e61 + t] = l[_e61], o.tShift[_e61 + t] = p[_e61], o.sCount[_e61 + t] = h[_e61], o.bsCount[_e61 + t] = c[_e61];
  24692. }
  24693. o.blkIndent = d;
  24694. }
  24695. return !0;
  24696. }, ["paragraph", "reference", "blockquote", "list"]], ["hr", function (t, e, r, n) {
  24697. var i = t.eMarks[e];
  24698. if (4 <= t.sCount[e] - t.blkIndent) return !1;
  24699. var s = t.bMarks[e] + t.tShift[e];
  24700. var o = t.src.charCodeAt(s++);
  24701. if (42 !== o && 45 !== o && 95 !== o) return !1;
  24702. var u = 1;
  24703. for (; s < i;) {
  24704. var _e62 = t.src.charCodeAt(s++);
  24705. if (_e62 !== o && !g(_e62)) return !1;
  24706. _e62 === o && u++;
  24707. }
  24708. return !(u < 3 || (n || (t.line = e + 1, (n = t.push("hr", "hr", 0)).map = [e, t.line], n.markup = Array(u + 1).join(String.fromCharCode(o))), 0));
  24709. }, ["paragraph", "reference", "blockquote", "list"]], ["list", function (d, n, _, e) {
  24710. var m,
  24711. g,
  24712. k,
  24713. D,
  24714. C = n,
  24715. y = !0;
  24716. if (4 <= d.sCount[C] - d.blkIndent) return !1;
  24717. if (0 <= d.listIndent && 4 <= d.sCount[C] - d.listIndent && d.sCount[C] < d.blkIndent) return !1;
  24718. var E,
  24719. i,
  24720. A,
  24721. t = !1;
  24722. if (e && "paragraph" === d.parentType && d.sCount[C] >= d.blkIndent && (t = !0), 0 <= (A = je(d, C))) {
  24723. if (E = !0, k = d.bMarks[C] + d.tShift[C], i = Number(d.src.slice(k, A - 1)), t && 1 !== i) return !1;
  24724. } else {
  24725. if (!(0 <= (A = Oe(d, C)))) return !1;
  24726. E = !1;
  24727. }
  24728. if (t && d.skipSpaces(A) >= d.eMarks[C]) return !1;
  24729. if (!e) {
  24730. var _h = d.src.charCodeAt(A - 1),
  24731. _e63 = d.tokens.length,
  24732. _t34 = (E ? (D = d.push("ordered_list_open", "ol", 1), 1 !== i && (D.attrs = [["start", i]])) : D = d.push("bullet_list_open", "ul", 1), [C, 0]),
  24733. _p = (D.map = _t34, D.markup = String.fromCharCode(_h), !1),
  24734. _f = d.md.block.ruler.getRules("list"),
  24735. _r18 = d.parentType;
  24736. for (d.parentType = "list"; C < _;) {
  24737. g = A, m = d.eMarks[C];
  24738. var _e64 = d.sCount[C] + A - (d.bMarks[C] + d.tShift[C]),
  24739. _t35 = _e64;
  24740. for (; g < m;) {
  24741. var _e65 = d.src.charCodeAt(g);
  24742. if (9 === _e65) _t35 += 4 - (_t35 + d.bsCount[C]) % 4;else {
  24743. if (32 !== _e65) break;
  24744. _t35++;
  24745. }
  24746. g++;
  24747. }
  24748. var _r19 = g,
  24749. _n9 = void 0,
  24750. _i8 = _e64 + (_n9 = 4 < (_n9 = _r19 >= m ? 1 : _t35 - _e64) ? 1 : _n9),
  24751. _s6 = ((D = d.push("list_item_open", "li", 1)).markup = String.fromCharCode(_h), [C, 0]),
  24752. _o3 = (D.map = _s6, E && (D.info = d.src.slice(k, A - 1)), d.tight),
  24753. _u2 = d.tShift[C],
  24754. _a2 = d.sCount[C],
  24755. _l = d.listIndent;
  24756. if (d.listIndent = d.blkIndent, d.blkIndent = _i8, d.tight = !0, d.tShift[C] = _r19 - d.bMarks[C], d.sCount[C] = _t35, _r19 >= m && d.isEmpty(C + 1) ? d.line = Math.min(d.line + 2, _) : d.md.block.tokenize(d, C, _, !0), d.tight && !_p || (y = !1), _p = 1 < d.line - C && d.isEmpty(d.line - 1), d.blkIndent = d.listIndent, d.listIndent = _l, d.tShift[C] = _u2, d.sCount[C] = _a2, d.tight = _o3, (D = d.push("list_item_close", "li", -1)).markup = String.fromCharCode(_h), C = d.line, (_s6[1] = C) >= _) break;
  24757. if (d.sCount[C] < d.blkIndent) break;
  24758. if (4 <= d.sCount[C] - d.blkIndent) break;
  24759. var _c = !1;
  24760. for (var _e66 = 0, _t36 = _f.length; _e66 < _t36; _e66++) {
  24761. if (_f[_e66](d, C, _, !0)) {
  24762. _c = !0;
  24763. break;
  24764. }
  24765. }
  24766. if (_c) break;
  24767. if (E) {
  24768. if ((A = je(d, C)) < 0) break;
  24769. k = d.bMarks[C] + d.tShift[C];
  24770. } else if ((A = Oe(d, C)) < 0) break;
  24771. if (_h !== d.src.charCodeAt(A - 1)) break;
  24772. }
  24773. if ((D = E ? d.push("ordered_list_close", "ol", -1) : d.push("bullet_list_close", "ul", -1)).markup = String.fromCharCode(_h), _t34[1] = C, d.line = C, d.parentType = _r18, y) {
  24774. var s = d;
  24775. n = _e63;
  24776. var o = s.level + 2;
  24777. for (var _e67 = n + 2, _t37 = s.tokens.length - 2; _e67 < _t37; _e67++) {
  24778. s.tokens[_e67].level === o && "paragraph_open" === s.tokens[_e67].type && (s.tokens[_e67 + 2].hidden = !0, s.tokens[_e67].hidden = !0, _e67 += 2);
  24779. }
  24780. }
  24781. }
  24782. return !0;
  24783. }, ["paragraph", "reference", "blockquote"]], ["reference", function (o, e, t, r) {
  24784. var n = o.bMarks[e] + o.tShift[e],
  24785. i = o.eMarks[e],
  24786. s = e + 1;
  24787. if (4 <= o.sCount[e] - o.blkIndent) return !1;
  24788. if (91 !== o.src.charCodeAt(n)) return !1;
  24789. function u(i) {
  24790. var s = o.lineMax;
  24791. if (s <= i || o.isEmpty(i)) return null;
  24792. var e = !1;
  24793. if (3 < o.sCount[i] - o.blkIndent && (e = !0), !(e = o.sCount[i] < 0 ? !0 : e)) {
  24794. var _r20 = o.md.block.ruler.getRules("reference"),
  24795. _e68 = o.parentType,
  24796. _n10 = !(o.parentType = "reference");
  24797. for (var _e69 = 0, _t38 = _r20.length; _e69 < _t38; _e69++) {
  24798. if (_r20[_e69](o, i, s, !0)) {
  24799. _n10 = !0;
  24800. break;
  24801. }
  24802. }
  24803. if (o.parentType = _e68, _n10) return null;
  24804. }
  24805. var t = o.bMarks[i] + o.tShift[i],
  24806. r = o.eMarks[i];
  24807. return o.src.slice(t, r + 1);
  24808. }
  24809. var a = o.src.slice(n, i + 1),
  24810. l = (i = a.length, -1);
  24811. for (n = 1; n < i; n++) {
  24812. var _e70 = a.charCodeAt(n);
  24813. if (91 === _e70) return !1;
  24814. if (93 === _e70) {
  24815. l = n;
  24816. break;
  24817. }
  24818. if (10 === _e70) {
  24819. var _e71 = u(s);
  24820. null !== _e71 && (a += _e71, i = a.length, s++);
  24821. } else if (92 === _e70 && ++n < i && 10 === a.charCodeAt(n)) {
  24822. var _e72 = u(s);
  24823. null !== _e72 && (a += _e72, i = a.length, s++);
  24824. }
  24825. }
  24826. if (l < 0 || 58 !== a.charCodeAt(l + 1)) return !1;
  24827. for (n = l + 2; n < i; n++) {
  24828. var _e73 = a.charCodeAt(n);
  24829. if (10 === _e73) {
  24830. var _e74 = u(s);
  24831. null !== _e74 && (a += _e74, i = a.length, s++);
  24832. } else if (!g(_e73)) break;
  24833. }
  24834. e = o.md.helpers.parseLinkDestination(a, n, i);
  24835. if (!e.ok) return !1;
  24836. var c = o.md.normalizeLink(e.str);
  24837. if (!o.md.validateLink(c)) return !1;
  24838. for (var e = n = e.pos, h = s, p = n; n < i; n++) {
  24839. var _e75 = a.charCodeAt(n);
  24840. if (10 === _e75) {
  24841. var _e76 = u(s);
  24842. null !== _e76 && (a += _e76, i = a.length, s++);
  24843. } else if (!g(_e75)) break;
  24844. }
  24845. var f,
  24846. d = o.md.helpers.parseLinkTitle(a, n, i);
  24847. for (; d.can_continue;) {
  24848. var _e77 = u(s);
  24849. if (null === _e77) break;
  24850. a += _e77, n = i, i = a.length, s++, d = o.md.helpers.parseLinkTitle(a, n, i, d);
  24851. }
  24852. for (n < i && p !== n && d.ok ? (f = d.str, n = d.pos) : (f = "", n = e, s = h); n < i && g(a.charCodeAt(n));) {
  24853. n++;
  24854. }
  24855. if (n < i && 10 !== a.charCodeAt(n) && f) for (f = "", n = e, s = h; n < i && g(a.charCodeAt(n));) {
  24856. n++;
  24857. }
  24858. return !(n < i && 10 !== a.charCodeAt(n) || !(p = _(a.slice(1, l))) || (r || (void 0 === o.env.references && (o.env.references = {}), void 0 === o.env.references[p] && (o.env.references[p] = {
  24859. title: f,
  24860. href: c
  24861. }), o.line = s), 0));
  24862. }], ["html_block", function (e, t, r, n) {
  24863. var i = e.bMarks[t] + e.tShift[t],
  24864. s = e.eMarks[t];
  24865. if (4 <= e.sCount[t] - e.blkIndent) return !1;
  24866. if (!e.md.options.html) return !1;
  24867. if (60 !== e.src.charCodeAt(i)) return !1;
  24868. var o = e.src.slice(i, s),
  24869. u = 0;
  24870. for (; u < D.length && !D[u][0].test(o); u++) {
  24871. ;
  24872. }
  24873. if (u === D.length) return !1;
  24874. if (n) return D[u][2];
  24875. var a = t + 1;
  24876. if (!D[u][1].test(o)) for (; a < r && !(e.sCount[a] < e.blkIndent); a++) {
  24877. if (i = e.bMarks[a] + e.tShift[a], s = e.eMarks[a], o = e.src.slice(i, s), D[u][1].test(o)) {
  24878. 0 !== o.length && a++;
  24879. break;
  24880. }
  24881. }
  24882. e.line = a;
  24883. n = e.push("html_block", "", 0);
  24884. return n.map = [t, a], n.content = e.getLines(t, a, e.blkIndent, !0), !0;
  24885. }, ["paragraph", "reference", "blockquote"]], ["heading", function (e, t, r, n) {
  24886. var i = e.bMarks[t] + e.tShift[t],
  24887. s = e.eMarks[t];
  24888. if (4 <= e.sCount[t] - e.blkIndent) return !1;
  24889. var o = e.src.charCodeAt(i);
  24890. if (35 !== o || i >= s) return !1;
  24891. var u = 1;
  24892. for (o = e.src.charCodeAt(++i); 35 === o && i < s && u <= 6;) {
  24893. u++, o = e.src.charCodeAt(++i);
  24894. }
  24895. return !(6 < u || i < s && !g(o) || (n || (s = e.skipSpacesBack(s, i), (n = e.skipCharsBack(s, 35, i)) > i && g(e.src.charCodeAt(n - 1)) && (s = n), e.line = t + 1, (n = e.push("heading_open", "h" + String(u), 1)).markup = "########".slice(0, u), n.map = [t, e.line], (n = e.push("inline", "", 0)).content = e.src.slice(i, s).trim(), n.map = [t, e.line], n.children = [], e.push("heading_close", "h" + String(u), -1).markup = "########".slice(0, u)), 0));
  24896. }, ["paragraph", "reference", "blockquote"]], ["lheading", function (n, e, i) {
  24897. var s = n.md.block.ruler.getRules("paragraph");
  24898. if (4 <= n.sCount[e] - n.blkIndent) return !1;
  24899. var t,
  24900. r,
  24901. o = n.parentType;
  24902. n.parentType = "paragraph";
  24903. var u,
  24904. a = 0,
  24905. l = e + 1;
  24906. for (; l < i && !n.isEmpty(l); l++) {
  24907. if (!(3 < n.sCount[l] - n.blkIndent)) {
  24908. if (n.sCount[l] >= n.blkIndent) {
  24909. var c = n.bMarks[l] + n.tShift[l];
  24910. var _e78 = n.eMarks[l];
  24911. if (c < _e78 && (45 === (u = n.src.charCodeAt(c)) || 61 === u) && (c = n.skipChars(c, u), n.skipSpaces(c) >= _e78)) {
  24912. a = 61 === u ? 1 : 2;
  24913. break;
  24914. }
  24915. }
  24916. if (!(n.sCount[l] < 0)) {
  24917. var _r21 = !1;
  24918. for (var _e79 = 0, _t39 = s.length; _e79 < _t39; _e79++) {
  24919. if (s[_e79](n, l, i, !0)) {
  24920. _r21 = !0;
  24921. break;
  24922. }
  24923. }
  24924. if (_r21) break;
  24925. }
  24926. }
  24927. }
  24928. return !!a && (t = n.getLines(e, l, n.blkIndent, !1).trim(), n.line = l + 1, (r = n.push("heading_open", "h" + String(a), 1)).markup = String.fromCharCode(u), r.map = [e, n.line], (r = n.push("inline", "", 0)).content = t, r.map = [e, n.line - 1], r.children = [], n.push("heading_close", "h" + String(a), -1).markup = String.fromCharCode(u), n.parentType = o, !0);
  24929. }], ["paragraph", function (n, e, i) {
  24930. var s = n.md.block.ruler.getRules("paragraph"),
  24931. t = n.parentType;
  24932. var o = e + 1;
  24933. for (n.parentType = "paragraph"; o < i && !n.isEmpty(o); o++) {
  24934. if (!(3 < n.sCount[o] - n.blkIndent || n.sCount[o] < 0)) {
  24935. var _r22 = !1;
  24936. for (var _e80 = 0, _t40 = s.length; _e80 < _t40; _e80++) {
  24937. if (s[_e80](n, o, i, !0)) {
  24938. _r22 = !0;
  24939. break;
  24940. }
  24941. }
  24942. if (_r22) break;
  24943. }
  24944. }
  24945. var r = n.getLines(e, o, n.blkIndent, !1).trim(),
  24946. u = (n.line = o, n.push("paragraph_open", "p", 1).map = [e, n.line], n.push("inline", "", 0));
  24947. return u.content = r, u.map = [e, n.line], u.children = [], n.push("paragraph_close", "p", -1), n.parentType = t, !0;
  24948. }]];
  24949. function b() {
  24950. this.ruler = new t();
  24951. for (var _e81 = 0; _e81 < C.length; _e81++) {
  24952. this.ruler.push(C[_e81][0], C[_e81][1], {
  24953. alt: (C[_e81][2] || []).slice()
  24954. });
  24955. }
  24956. }
  24957. function v(e, t, r, n) {
  24958. this.src = e, this.env = r, this.md = t, this.tokens = n, this.tokens_meta = Array(n.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1, this.linkLevel = 0;
  24959. }
  24960. b.prototype.tokenize = function (n, e, i) {
  24961. var s = this.ruler.getRules(""),
  24962. o = s.length,
  24963. u = n.md.options.maxNesting;
  24964. var a = e,
  24965. l = !1;
  24966. for (; a < i && (n.line = a = n.skipEmptyLines(a), !(a >= i)) && !(n.sCount[a] < n.blkIndent);) {
  24967. if (n.level >= u) {
  24968. n.line = i;
  24969. break;
  24970. }
  24971. var _t41 = n.line,
  24972. _r23 = !1;
  24973. for (var _e82 = 0; _e82 < o; _e82++) {
  24974. if (_r23 = s[_e82](n, a, i, !1)) {
  24975. if (_t41 >= n.line) throw new Error("block rule didn't increment state.line");
  24976. break;
  24977. }
  24978. }
  24979. if (!_r23) throw new Error("none of the block rules matched");
  24980. n.tight = !l, n.isEmpty(n.line - 1) && (l = !0), (a = n.line) < i && n.isEmpty(a) && (l = !0, a++, n.line = a);
  24981. }
  24982. }, b.prototype.parse = function (e, t, r, n) {
  24983. e && (e = new this.State(e, t, r, n), this.tokenize(e, e.line, e.lineMax));
  24984. }, b.prototype.State = k, v.prototype.pushPending = function () {
  24985. var e = new m("text", "", 0);
  24986. return e.content = this.pending, e.level = this.pendingLevel, this.tokens.push(e), this.pending = "", e;
  24987. }, v.prototype.push = function (e, t, r) {
  24988. this.pending && this.pushPending();
  24989. e = new m(e, t, r);
  24990. var n = null;
  24991. return r < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), e.level = this.level, 0 < r && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], n = {
  24992. delimiters: this.delimiters
  24993. }), this.pendingLevel = this.level, this.tokens.push(e), this.tokens_meta.push(n), e;
  24994. }, v.prototype.scanDelims = function (e, t) {
  24995. var r = this.posMax,
  24996. n = this.src.charCodeAt(e),
  24997. i = 0 < e ? this.src.charCodeAt(e - 1) : 32;
  24998. var s = e;
  24999. for (; s < r && this.src.charCodeAt(s) === n;) {
  25000. s++;
  25001. }
  25002. var e = s - e,
  25003. o = s < r ? this.src.charCodeAt(s) : 32,
  25004. u = A(i) || E(String.fromCharCode(i)),
  25005. a = A(o) || E(String.fromCharCode(o)),
  25006. i = y(i),
  25007. o = y(o),
  25008. l = !o && (!a || i || u),
  25009. i = !i && (!u || o || a);
  25010. return {
  25011. can_open: l && (t || !i || u),
  25012. can_close: i && (t || !l || a),
  25013. length: e
  25014. };
  25015. }, v.prototype.Token = m;
  25016. var Ve = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,
  25017. Ge = [];
  25018. for (var _e83 = 0; _e83 < 256; _e83++) {
  25019. Ge.push(0);
  25020. }
  25021. function We(r, n) {
  25022. var i,
  25023. s = [],
  25024. e = n.length;
  25025. for (var _t42 = 0; _t42 < e; _t42++) {
  25026. var _e84 = n[_t42];
  25027. var o;
  25028. 126 === _e84.marker && -1 !== _e84.end && (o = n[_e84.end], (i = r.tokens[_e84.token]).type = "s_open", i.tag = "s", i.nesting = 1, i.markup = "~~", i.content = "", (i = r.tokens[o.token]).type = "s_close", i.tag = "s", i.nesting = -1, i.markup = "~~", i.content = "", "text" === r.tokens[o.token - 1].type) && "~" === r.tokens[o.token - 1].content && s.push(o.token - 1);
  25029. }
  25030. for (; s.length;) {
  25031. var _e85 = s.pop(),
  25032. _t43 = _e85 + 1;
  25033. for (; _t43 < r.tokens.length && "s_close" === r.tokens[_t43].type;) {
  25034. _t43++;
  25035. }
  25036. _e85 !== --_t43 && (i = r.tokens[_t43], r.tokens[_t43] = r.tokens[_e85], r.tokens[_e85] = i);
  25037. }
  25038. }
  25039. "\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function (e) {
  25040. Ge[e.charCodeAt(0)] = 1;
  25041. });
  25042. var x = {
  25043. tokenize: function tokenize(t, e) {
  25044. var r = t.pos,
  25045. n = t.src.charCodeAt(r);
  25046. if (e) return !1;
  25047. if (126 !== n) return !1;
  25048. var i = t.scanDelims(t.pos, !0);
  25049. var s = i.length;
  25050. var o = String.fromCharCode(n);
  25051. if (s < 2) return !1;
  25052. var u;
  25053. s % 2 && ((u = t.push("text", "", 0)).content = o, s--);
  25054. for (var _e86 = 0; _e86 < s; _e86 += 2) {
  25055. (u = t.push("text", "", 0)).content = o + o, t.delimiters.push({
  25056. marker: n,
  25057. length: 0,
  25058. token: t.tokens.length - 1,
  25059. end: -1,
  25060. open: i.can_open,
  25061. close: i.can_close
  25062. });
  25063. }
  25064. return t.pos += i.length, !0;
  25065. },
  25066. postProcess: function postProcess(t) {
  25067. var r = t.tokens_meta,
  25068. n = t.tokens_meta.length;
  25069. We(t, t.delimiters);
  25070. for (var _e87 = 0; _e87 < n; _e87++) {
  25071. r[_e87] && r[_e87].delimiters && We(t, r[_e87].delimiters);
  25072. }
  25073. }
  25074. };
  25075. function Je(t, r) {
  25076. for (var _e88 = r.length - 1; 0 <= _e88; _e88--) {
  25077. var n,
  25078. i,
  25079. s,
  25080. o,
  25081. u = r[_e88];
  25082. 95 !== u.marker && 42 !== u.marker || -1 !== u.end && (n = r[u.end], i = 0 < _e88 && r[_e88 - 1].end === u.end + 1 && r[_e88 - 1].marker === u.marker && r[_e88 - 1].token === u.token - 1 && r[u.end + 1].token === n.token + 1, s = String.fromCharCode(u.marker), (o = t.tokens[u.token]).type = i ? "strong_open" : "em_open", o.tag = i ? "strong" : "em", o.nesting = 1, o.markup = i ? s + s : s, o.content = "", (o = t.tokens[n.token]).type = i ? "strong_close" : "em_close", o.tag = i ? "strong" : "em", o.nesting = -1, o.markup = i ? s + s : s, o.content = "", i) && (t.tokens[r[_e88 - 1].token].content = "", t.tokens[r[u.end + 1].token].content = "", _e88--);
  25083. }
  25084. }
  25085. var Qe = {
  25086. tokenize: function tokenize(t, e) {
  25087. var r = t.pos,
  25088. n = t.src.charCodeAt(r);
  25089. if (e) return !1;
  25090. if (95 !== n && 42 !== n) return !1;
  25091. var i = t.scanDelims(t.pos, 42 === n);
  25092. for (var _e89 = 0; _e89 < i.length; _e89++) {
  25093. t.push("text", "", 0).content = String.fromCharCode(n), t.delimiters.push({
  25094. marker: n,
  25095. length: i.length,
  25096. token: t.tokens.length - 1,
  25097. end: -1,
  25098. open: i.can_open,
  25099. close: i.can_close
  25100. });
  25101. }
  25102. return t.pos += i.length, !0;
  25103. },
  25104. postProcess: function postProcess(t) {
  25105. var r = t.tokens_meta,
  25106. n = t.tokens_meta.length;
  25107. Je(t, t.delimiters);
  25108. for (var _e90 = 0; _e90 < n; _e90++) {
  25109. r[_e90] && r[_e90].delimiters && Je(t, r[_e90].delimiters);
  25110. }
  25111. }
  25112. },
  25113. Xe = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,
  25114. Ye = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/,
  25115. Ke = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,
  25116. et = /^&([a-z][a-z0-9]{1,31});/i;
  25117. function tt(u) {
  25118. var t = {},
  25119. r = u.length;
  25120. if (r) {
  25121. var _e91 = 0,
  25122. _o4 = -2;
  25123. var a = [];
  25124. for (var _s7 = 0; _s7 < r; _s7++) {
  25125. var _i9 = u[_s7];
  25126. if (a.push(0), u[_e91].marker === _i9.marker && _o4 === _i9.token - 1 || (_e91 = _s7), _o4 = _i9.token, _i9.length = _i9.length || 0, _i9.close) {
  25127. t.hasOwnProperty(_i9.marker) || (t[_i9.marker] = [-1, -1, -1, -1, -1, -1]);
  25128. var l = t[_i9.marker][(_i9.open ? 3 : 0) + _i9.length % 3];
  25129. var _r24 = _e91 - a[_e91] - 1,
  25130. _n11 = _r24;
  25131. for (; _r24 > l; _r24 -= a[_r24] + 1) {
  25132. var _t44 = u[_r24];
  25133. if (_t44.marker === _i9.marker && _t44.open && _t44.end < 0) {
  25134. var _e92 = !1;
  25135. if (!(_e92 = !_t44.close && !_i9.open || (_t44.length + _i9.length) % 3 != 0 || _t44.length % 3 == 0 && _i9.length % 3 == 0 ? _e92 : !0)) {
  25136. var _e93 = 0 < _r24 && !u[_r24 - 1].open ? a[_r24 - 1] + 1 : 0;
  25137. a[_s7] = _s7 - _r24 + _e93, a[_r24] = _e93, _i9.open = !1, _t44.end = _s7, _t44.close = !1, _n11 = -1, _o4 = -2;
  25138. break;
  25139. }
  25140. }
  25141. }
  25142. -1 !== _n11 && (t[_i9.marker][(_i9.open ? 3 : 0) + (_i9.length || 0) % 3] = _n11);
  25143. }
  25144. }
  25145. }
  25146. }
  25147. var rt = [["text", function (e, t) {
  25148. var r = e.pos;
  25149. for (; r < e.posMax && !function (e) {
  25150. switch (e) {
  25151. case 10:
  25152. case 33:
  25153. case 35:
  25154. case 36:
  25155. case 37:
  25156. case 38:
  25157. case 42:
  25158. case 43:
  25159. case 45:
  25160. case 58:
  25161. case 60:
  25162. case 61:
  25163. case 62:
  25164. case 64:
  25165. case 91:
  25166. case 92:
  25167. case 93:
  25168. case 94:
  25169. case 95:
  25170. case 96:
  25171. case 123:
  25172. case 125:
  25173. case 126:
  25174. return 1;
  25175. default:
  25176. return;
  25177. }
  25178. }(e.src.charCodeAt(r));) {
  25179. r++;
  25180. }
  25181. return r !== e.pos && (t || (e.pending += e.src.slice(e.pos, r)), e.pos = r, !0);
  25182. }], ["linkify", function (r, e) {
  25183. if (!r.md.options.linkify) return !1;
  25184. if (0 < r.linkLevel) return !1;
  25185. var t = r.pos;
  25186. if (t + 3 > r.posMax) return !1;
  25187. if (58 !== r.src.charCodeAt(t)) return !1;
  25188. if (47 !== r.src.charCodeAt(t + 1)) return !1;
  25189. if (47 !== r.src.charCodeAt(t + 2)) return !1;
  25190. var n = r.pending.match(Ve);
  25191. if (!n) return !1;
  25192. var n = n[1],
  25193. i = r.md.linkify.matchAtStart(r.src.slice(t - n.length));
  25194. if (!i) return !1;
  25195. var s = i.url;
  25196. if (s.length <= n.length) return !1;
  25197. s = s.replace(/\*+$/, "");
  25198. i = r.md.normalizeLink(s);
  25199. if (!r.md.validateLink(i)) return !1;
  25200. if (!e) {
  25201. r.pending = r.pending.slice(0, -n.length);
  25202. var _e94 = r.push("link_open", "a", 1),
  25203. _t45 = (_e94.attrs = [["href", i]], _e94.markup = "linkify", _e94.info = "auto", r.push("text", "", 0).content = r.md.normalizeLinkText(s), r.push("link_close", "a", -1));
  25204. _t45.markup = "linkify", _t45.info = "auto";
  25205. }
  25206. return r.pos += s.length - n.length, !0;
  25207. }], ["newline", function (t, e) {
  25208. var r = t.pos;
  25209. if (10 !== t.src.charCodeAt(r)) return !1;
  25210. var n = t.pending.length - 1,
  25211. i = t.posMax;
  25212. if (!e) if (0 <= n && 32 === t.pending.charCodeAt(n)) {
  25213. if (1 <= n && 32 === t.pending.charCodeAt(n - 1)) {
  25214. var _e95 = n - 1;
  25215. for (; 1 <= _e95 && 32 === t.pending.charCodeAt(_e95 - 1);) {
  25216. _e95--;
  25217. }
  25218. t.pending = t.pending.slice(0, _e95), t.push("hardbreak", "br", 0);
  25219. } else t.pending = t.pending.slice(0, -1), t.push("softbreak", "br", 0);
  25220. } else t.push("softbreak", "br", 0);
  25221. for (r++; r < i && g(t.src.charCodeAt(r));) {
  25222. r++;
  25223. }
  25224. return t.pos = r, !0;
  25225. }], ["escape", function (r, e) {
  25226. var n = r.pos;
  25227. var i = r.posMax;
  25228. if (92 !== r.src.charCodeAt(n)) return !1;
  25229. if (++n >= i) return !1;
  25230. var s = r.src.charCodeAt(n);
  25231. if (10 === s) {
  25232. for (e || r.push("hardbreak", "br", 0), n++; n < i && g(s = r.src.charCodeAt(n));) {
  25233. n++;
  25234. }
  25235. r.pos = n;
  25236. } else {
  25237. var _t46 = r.src[n];
  25238. if (55296 <= s && s <= 56319 && n + 1 < i) {
  25239. var _e96 = r.src.charCodeAt(n + 1);
  25240. 56320 <= _e96 && _e96 <= 57343 && (_t46 += r.src[n + 1], n++);
  25241. }
  25242. var o = "\\" + _t46;
  25243. if (!e) {
  25244. var _e97 = r.push("text_special", "", 0);
  25245. s < 256 && 0 !== Ge[s] ? _e97.content = _t46 : _e97.content = o, _e97.markup = o, _e97.info = "escape";
  25246. }
  25247. r.pos = n + 1;
  25248. }
  25249. return !0;
  25250. }], ["backticks", function (n, i) {
  25251. var s = n.pos;
  25252. if (96 !== n.src.charCodeAt(s)) return !1;
  25253. var e = s;
  25254. s++;
  25255. for (var o = n.posMax; s < o && 96 === n.src.charCodeAt(s);) {
  25256. s++;
  25257. }
  25258. var u = n.src.slice(e, s),
  25259. a = u.length;
  25260. if (!(n.backticksScanned && (n.backticks[a] || 0) <= e)) {
  25261. var _t47,
  25262. _r25 = s;
  25263. for (; -1 !== (_t47 = n.src.indexOf("`", _r25));) {
  25264. for (_r25 = _t47 + 1; _r25 < o && 96 === n.src.charCodeAt(_r25);) {
  25265. _r25++;
  25266. }
  25267. var _e98 = _r25 - _t47;
  25268. if (_e98 === a) {
  25269. if (!i) {
  25270. var _e99 = n.push("code_inline", "code", 0);
  25271. _e99.markup = u, _e99.content = n.src.slice(s, _t47).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
  25272. }
  25273. return n.pos = _r25, !0;
  25274. }
  25275. n.backticks[_e98] = _t47;
  25276. }
  25277. n.backticksScanned = !0;
  25278. }
  25279. return i || (n.pending += u), n.pos += a, !0;
  25280. }], ["strikethrough", x.tokenize], ["emphasis", Qe.tokenize], ["link", function (t, e) {
  25281. var r,
  25282. n,
  25283. i,
  25284. s,
  25285. o = "",
  25286. u = "",
  25287. a = t.pos,
  25288. l = !0;
  25289. if (91 !== t.src.charCodeAt(t.pos)) return !1;
  25290. var c = t.pos,
  25291. h = t.posMax,
  25292. p = t.pos + 1,
  25293. f = t.md.helpers.parseLinkLabel(t, t.pos, !0);
  25294. if (f < 0) return !1;
  25295. var d = f + 1;
  25296. if (d < h && 40 === t.src.charCodeAt(d)) {
  25297. for (l = !1, d++; d < h && (g(r = t.src.charCodeAt(d)) || 10 === r); d++) {
  25298. ;
  25299. }
  25300. if (d >= h) return !1;
  25301. if (a = d, (i = t.md.helpers.parseLinkDestination(t.src, d, t.posMax)).ok) {
  25302. for (o = t.md.normalizeLink(i.str), t.md.validateLink(o) ? d = i.pos : o = "", a = d; d < h && (g(r = t.src.charCodeAt(d)) || 10 === r); d++) {
  25303. ;
  25304. }
  25305. if (i = t.md.helpers.parseLinkTitle(t.src, d, t.posMax), d < h && a !== d && i.ok) for (u = i.str, d = i.pos; d < h && (g(r = t.src.charCodeAt(d)) || 10 === r); d++) {
  25306. ;
  25307. }
  25308. }
  25309. (d >= h || 41 !== t.src.charCodeAt(d)) && (l = !0), d++;
  25310. }
  25311. if (l) {
  25312. if (void 0 === t.env.references) return !1;
  25313. if (d < h && 91 === t.src.charCodeAt(d) && (a = d + 1, 0 <= (d = t.md.helpers.parseLinkLabel(t, d))) ? n = t.src.slice(a, d++) : d = f + 1, n = n || t.src.slice(p, f), !(s = t.env.references[_(n)])) return t.pos = c, !1;
  25314. o = s.href, u = s.title;
  25315. }
  25316. if (!e) {
  25317. t.pos = p, t.posMax = f;
  25318. var _e100 = [["href", o]];
  25319. t.push("link_open", "a", 1).attrs = _e100, u && _e100.push(["title", u]), t.linkLevel++, t.md.inline.tokenize(t), t.linkLevel--, t.push("link_close", "a", -1);
  25320. }
  25321. return t.pos = d, t.posMax = h, !0;
  25322. }], ["image", function (n, e) {
  25323. var t,
  25324. i,
  25325. r,
  25326. s,
  25327. o,
  25328. u,
  25329. a,
  25330. l,
  25331. c = "";
  25332. var h = n.pos,
  25333. p = n.posMax;
  25334. if (33 !== n.src.charCodeAt(n.pos)) return !1;
  25335. if (91 !== n.src.charCodeAt(n.pos + 1)) return !1;
  25336. var f = n.pos + 2,
  25337. d = n.md.helpers.parseLinkLabel(n, n.pos + 1, !1);
  25338. if (d < 0) return !1;
  25339. if ((s = d + 1) < p && 40 === n.src.charCodeAt(s)) {
  25340. for (s++; s < p && (g(t = n.src.charCodeAt(s)) || 10 === t); s++) {
  25341. ;
  25342. }
  25343. if (s >= p) return !1;
  25344. for (l = s, (u = n.md.helpers.parseLinkDestination(n.src, s, n.posMax)).ok && (c = n.md.normalizeLink(u.str), n.md.validateLink(c) ? s = u.pos : c = ""), l = s; s < p && (g(t = n.src.charCodeAt(s)) || 10 === t); s++) {
  25345. ;
  25346. }
  25347. if (u = n.md.helpers.parseLinkTitle(n.src, s, n.posMax), s < p && l !== s && u.ok) for (a = u.str, s = u.pos; s < p && (g(t = n.src.charCodeAt(s)) || 10 === t); s++) {
  25348. ;
  25349. } else a = "";
  25350. if (s >= p || 41 !== n.src.charCodeAt(s)) return n.pos = h, !1;
  25351. s++;
  25352. } else {
  25353. if (void 0 === n.env.references) return !1;
  25354. if (s < p && 91 === n.src.charCodeAt(s) && (l = s + 1, 0 <= (s = n.md.helpers.parseLinkLabel(n, s))) ? r = n.src.slice(l, s++) : s = d + 1, r = r || n.src.slice(f, d), !(o = n.env.references[_(r)])) return n.pos = h, !1;
  25355. c = o.href, a = o.title;
  25356. }
  25357. if (!e) {
  25358. i = n.src.slice(f, d);
  25359. var _e101 = [],
  25360. _t48 = (n.md.inline.parse(i, n.md, n.env, _e101), n.push("image", "img", 0)),
  25361. _r26 = [["src", c], ["alt", ""]];
  25362. _t48.attrs = _r26, _t48.children = _e101, _t48.content = i, a && _r26.push(["title", a]);
  25363. }
  25364. return n.pos = s, n.posMax = p, !0;
  25365. }], ["autolink", function (n, i) {
  25366. var r = n.pos;
  25367. if (60 === n.src.charCodeAt(r)) {
  25368. var _e102 = n.pos,
  25369. _t49 = n.posMax;
  25370. for (;;) {
  25371. if (++r >= _t49) return !1;
  25372. var _e103 = n.src.charCodeAt(r);
  25373. if (60 === _e103) return !1;
  25374. if (62 === _e103) break;
  25375. }
  25376. var s = n.src.slice(_e102 + 1, r);
  25377. if (Ye.test(s)) {
  25378. var _r27 = n.md.normalizeLink(s);
  25379. if (!n.md.validateLink(_r27)) return !1;
  25380. if (!i) {
  25381. var _e104 = n.push("link_open", "a", 1),
  25382. _t50 = (_e104.attrs = [["href", _r27]], _e104.markup = "autolink", _e104.info = "auto", n.push("text", "", 0).content = n.md.normalizeLinkText(s), n.push("link_close", "a", -1));
  25383. _t50.markup = "autolink", _t50.info = "auto";
  25384. }
  25385. return n.pos += s.length + 2, !0;
  25386. }
  25387. if (Xe.test(s)) {
  25388. var _r28 = n.md.normalizeLink("mailto:" + s);
  25389. if (!n.md.validateLink(_r28)) return !1;
  25390. if (!i) {
  25391. var _e105 = n.push("link_open", "a", 1),
  25392. _t51 = (_e105.attrs = [["href", _r28]], _e105.markup = "autolink", _e105.info = "auto", n.push("text", "", 0).content = n.md.normalizeLinkText(s), n.push("link_close", "a", -1));
  25393. _t51.markup = "autolink", _t51.info = "auto";
  25394. }
  25395. return n.pos += s.length + 2, !0;
  25396. }
  25397. }
  25398. return !1;
  25399. }], ["html_inline", function (t, e) {
  25400. if (!t.md.options.html) return !1;
  25401. var r = t.posMax,
  25402. n = t.pos;
  25403. if (60 !== t.src.charCodeAt(n) || r <= n + 2) return !1;
  25404. var r = t.src.charCodeAt(n + 1);
  25405. if (33 !== r && 63 !== r && 47 !== r && !(97 <= (r = 32 | r) && r <= 122)) return !1;
  25406. r = t.src.slice(n).match(Ue);
  25407. if (!r) return !1;
  25408. if (!e) {
  25409. var _e106 = t.push("html_inline", "", 0);
  25410. _e106.content = r[0], n = _e106.content, /^<a[>\s]/i.test(n) && t.linkLevel++, /^<\/a\s*>/i.test(_e106.content) && t.linkLevel--;
  25411. }
  25412. return t.pos += r[0].length, !0;
  25413. }], ["entity", function (n, e) {
  25414. var t = n.pos,
  25415. r = n.posMax;
  25416. if (38 === n.src.charCodeAt(t) && !(t + 1 >= r)) if (35 === n.src.charCodeAt(t + 1)) {
  25417. var _r29 = n.src.slice(t).match(Ke);
  25418. if (_r29) {
  25419. if (!e) {
  25420. var _e107 = "x" === _r29[1][0].toLowerCase() ? parseInt(_r29[1].slice(1), 16) : parseInt(_r29[1], 10),
  25421. _t52 = n.push("text_special", "", 0);
  25422. _t52.content = _e(_e107) ? h(_e107) : h(65533), _t52.markup = _r29[0], _t52.info = "entity";
  25423. }
  25424. return n.pos += _r29[0].length, !0;
  25425. }
  25426. } else {
  25427. var _r30 = n.src.slice(t).match(et);
  25428. if (_r30) {
  25429. var _t53 = he(_r30[0]);
  25430. if (_t53 !== _r30[0]) {
  25431. if (!e) {
  25432. var _e108 = n.push("text_special", "", 0);
  25433. _e108.content = _t53, _e108.markup = _r30[0], _e108.info = "entity";
  25434. }
  25435. return n.pos += _r30[0].length, !0;
  25436. }
  25437. }
  25438. }
  25439. return !1;
  25440. }]],
  25441. nt = [["balance_pairs", function (e) {
  25442. var t = e.tokens_meta,
  25443. r = e.tokens_meta.length;
  25444. tt(e.delimiters);
  25445. for (var _e109 = 0; _e109 < r; _e109++) {
  25446. t[_e109] && t[_e109].delimiters && tt(t[_e109].delimiters);
  25447. }
  25448. }], ["strikethrough", x.postProcess], ["emphasis", Qe.postProcess], ["fragments_join", function (e) {
  25449. var t,
  25450. r,
  25451. n = 0;
  25452. var i = e.tokens,
  25453. s = e.tokens.length;
  25454. for (t = r = 0; t < s; t++) {
  25455. i[t].nesting < 0 && n--, i[t].level = n, 0 < i[t].nesting && n++, "text" === i[t].type && t + 1 < s && "text" === i[t + 1].type ? i[t + 1].content = i[t].content + i[t + 1].content : (t !== r && (i[r] = i[t]), r++);
  25456. }
  25457. t !== r && (i.length = r);
  25458. }]];
  25459. function w() {
  25460. this.ruler = new t();
  25461. for (var _e110 = 0; _e110 < rt.length; _e110++) {
  25462. this.ruler.push(rt[_e110][0], rt[_e110][1]);
  25463. }
  25464. this.ruler2 = new t();
  25465. for (var _e111 = 0; _e111 < nt.length; _e111++) {
  25466. this.ruler2.push(nt[_e111][0], nt[_e111][1]);
  25467. }
  25468. }
  25469. function it(r) {
  25470. return Array.prototype.slice.call(arguments, 1).forEach(function (t) {
  25471. t && Object.keys(t).forEach(function (e) {
  25472. r[e] = t[e];
  25473. });
  25474. }), r;
  25475. }
  25476. function z(e) {
  25477. return Object.prototype.toString.call(e);
  25478. }
  25479. function st(e) {
  25480. return "[object Function]" === z(e);
  25481. }
  25482. function ot(e) {
  25483. return e.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
  25484. }
  25485. w.prototype.skipToken = function (r) {
  25486. var n = r.pos,
  25487. i = this.ruler.getRules(""),
  25488. s = i.length,
  25489. e = r.md.options.maxNesting,
  25490. o = r.cache;
  25491. if (void 0 !== o[n]) r.pos = o[n];else {
  25492. var _t54 = !1;
  25493. if (r.level < e) {
  25494. for (var _e112 = 0; _e112 < s; _e112++) {
  25495. if (r.level++, _t54 = i[_e112](r, !0), r.level--, _t54) {
  25496. if (r.pos <= n) throw new Error("inline rule didn't increment state.pos");
  25497. break;
  25498. }
  25499. }
  25500. } else r.pos = r.posMax;
  25501. _t54 || r.pos++, o[n] = r.pos;
  25502. }
  25503. }, w.prototype.tokenize = function (r) {
  25504. for (var n = this.ruler.getRules(""), i = n.length, e = r.posMax, s = r.md.options.maxNesting; r.pos < e;) {
  25505. var o = r.pos;
  25506. var _t55 = !1;
  25507. if (r.level < s) for (var _e113 = 0; _e113 < i; _e113++) {
  25508. if (_t55 = n[_e113](r, !1)) {
  25509. if (o >= r.pos) throw new Error("inline rule didn't increment state.pos");
  25510. break;
  25511. }
  25512. }
  25513. if (_t55) {
  25514. if (e <= r.pos) break;
  25515. } else r.pending += r.src[r.pos++];
  25516. }
  25517. r.pending && r.pushPending();
  25518. }, w.prototype.parse = function (e, t, r, n) {
  25519. var i = new this.State(e, t, r, n),
  25520. s = (this.tokenize(i), this.ruler2.getRules("")),
  25521. o = s.length;
  25522. for (var _e114 = 0; _e114 < o; _e114++) {
  25523. s[_e114](i);
  25524. }
  25525. }, w.prototype.State = v;
  25526. var ut = {
  25527. fuzzyLink: !0,
  25528. fuzzyEmail: !0,
  25529. fuzzyIP: !1
  25530. },
  25531. at = {
  25532. "http:": {
  25533. validate: function validate(e, t, r) {
  25534. e = e.slice(t);
  25535. return r.re.http || (r.re.http = new RegExp("^\\/\\/" + r.re.src_auth + r.re.src_host_port_strict + r.re.src_path, "i")), r.re.http.test(e) ? e.match(r.re.http)[0].length : 0;
  25536. }
  25537. },
  25538. "https:": "http:",
  25539. "ftp:": "http:",
  25540. "//": {
  25541. validate: function validate(e, t, r) {
  25542. var n = e.slice(t);
  25543. return r.re.no_http || (r.re.no_http = new RegExp("^" + r.re.src_auth + "(?:localhost|(?:(?:" + r.re.src_domain + ")\\.)+" + r.re.src_domain_root + ")" + r.re.src_port + r.re.src_host_terminator + r.re.src_path, "i")), !r.re.no_http.test(n) || 3 <= t && ":" === e[t - 3] || 3 <= t && "/" === e[t - 3] ? 0 : n.match(r.re.no_http)[0].length;
  25544. }
  25545. },
  25546. "mailto:": {
  25547. validate: function validate(e, t, r) {
  25548. e = e.slice(t);
  25549. return r.re.mailto || (r.re.mailto = new RegExp("^" + r.re.src_email_name + "@" + r.re.src_host_strict, "i")), r.re.mailto.test(e) ? e.match(r.re.mailto)[0].length : 0;
  25550. }
  25551. }
  25552. },
  25553. lt = "a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",
  25554. ct = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");
  25555. function ht(i) {
  25556. var t = i.re = function (e) {
  25557. var t = {};
  25558. e = i.__opts__ || {}, t.src_Any = X.source, t.src_Cc = Y.source, t.src_Z = te.source, t.src_P = K.source, t.src_ZPCc = [t.src_Z, t.src_P, t.src_Cc].join("|"), t.src_ZCc = [t.src_Z, t.src_Cc].join("|");
  25559. return t.src_pseudo_letter = "(?:(?![><|]|" + t.src_ZPCc + ")" + t.src_Any + ")", t.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", t.src_auth = "(?:(?:(?!" + t.src_ZCc + "|[@/\\[\\]()]).)+@)?", t.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", t.src_host_terminator = "(?=$|[><|]|" + t.src_ZPCc + ")(?!" + (e["---"] ? "-(?!--)|" : "-|") + "_|:\\d|\\.-|\\.(?!$|" + t.src_ZPCc + "))", t.src_path = "(?:[/?#](?:(?!" + t.src_ZCc + "|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!" + t.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + t.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + t.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + t.src_ZCc + '|["]).)+\\"|\\\'(?:(?!' + t.src_ZCc + "|[']).)+\\'|\\'(?=" + t.src_pseudo_letter + "|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" + t.src_ZCc + "|[.]|$)|" + (e["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + ",(?!" + t.src_ZCc + "|$)|;(?!" + t.src_ZCc + "|$)|\\!+(?!" + t.src_ZCc + "|[!]|$)|\\?(?!" + t.src_ZCc + "|[?]|$))+|\\/)?", t.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*', t.src_xn = "xn--[a-z0-9\\-]{1,59}", t.src_domain_root = "(?:" + t.src_xn + "|" + t.src_pseudo_letter + "{1,63})", t.src_domain = "(?:" + t.src_xn + "|(?:" + t.src_pseudo_letter + ")|(?:" + t.src_pseudo_letter + "(?:-|" + t.src_pseudo_letter + "){0,61}" + t.src_pseudo_letter + "))", t.src_host = "(?:(?:(?:(?:" + t.src_domain + ")\\.)*" + t.src_domain + "))", t.tpl_host_fuzzy = "(?:" + t.src_ip4 + "|(?:(?:(?:" + t.src_domain + ")\\.)+(?:%TLDS%)))", t.tpl_host_no_ip_fuzzy = "(?:(?:(?:" + t.src_domain + ")\\.)+(?:%TLDS%))", t.src_host_strict = t.src_host + t.src_host_terminator, t.tpl_host_fuzzy_strict = t.tpl_host_fuzzy + t.src_host_terminator, t.src_host_port_strict = t.src_host + t.src_port + t.src_host_terminator, t.tpl_host_port_fuzzy_strict = t.tpl_host_fuzzy + t.src_port + t.src_host_terminator, t.tpl_host_port_no_ip_fuzzy_strict = t.tpl_host_no_ip_fuzzy + t.src_port + t.src_host_terminator, t.tpl_host_fuzzy_test = "localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" + t.src_ZPCc + "|>|$))", t.tpl_email_fuzzy = '(^|[><|]|"|\\(|' + t.src_ZCc + ")(" + t.src_email_name + "@" + t.tpl_host_fuzzy_strict + ")", t.tpl_link_fuzzy = "(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + t.src_ZPCc + "))((?![$+<=>^`||])" + t.tpl_host_port_fuzzy_strict + t.src_path + ")", t.tpl_link_no_ip_fuzzy = "(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + t.src_ZPCc + "))((?![$+<=>^`||])" + t.tpl_host_port_no_ip_fuzzy_strict + t.src_path + ")", t;
  25560. }(),
  25561. e = i.__tlds__.slice();
  25562. function r(e) {
  25563. return e.replace("%TLDS%", t.src_tlds);
  25564. }
  25565. i.onCompile(), i.__tlds_replaced__ || e.push(lt), e.push(t.src_xn), t.src_tlds = e.join("|"), t.email_fuzzy = RegExp(r(t.tpl_email_fuzzy), "i"), t.link_fuzzy = RegExp(r(t.tpl_link_fuzzy), "i"), t.link_no_ip_fuzzy = RegExp(r(t.tpl_link_no_ip_fuzzy), "i"), t.host_fuzzy_test = RegExp(r(t.tpl_host_fuzzy_test), "i");
  25566. var s = [];
  25567. function o(e, t) {
  25568. throw new Error('(LinkifyIt) Invalid schema "' + e + '": ' + t);
  25569. }
  25570. i.__compiled__ = {}, Object.keys(i.__schemas__).forEach(function (e) {
  25571. var t,
  25572. r,
  25573. n = i.__schemas__[e];
  25574. null !== n && (i.__compiled__[e] = t = {
  25575. validate: null,
  25576. link: null
  25577. }, "[object Object]" === z(n) ? ("[object RegExp]" !== z(n.validate) ? st(n.validate) ? t.validate = n.validate : o(e, n) : t.validate = (r = n.validate, function (e, t) {
  25578. e = e.slice(t);
  25579. return r.test(e) ? e.match(r)[0].length : 0;
  25580. }), st(n.normalize) ? t.normalize = n.normalize : n.normalize ? o(e, n) : t.normalize = function (e, t) {
  25581. t.normalize(e);
  25582. }) : "[object String]" !== z(n) ? o(e, n) : s.push(e));
  25583. }), s.forEach(function (e) {
  25584. i.__compiled__[i.__schemas__[e]] && (i.__compiled__[e].validate = i.__compiled__[i.__schemas__[e]].validate, i.__compiled__[e].normalize = i.__compiled__[i.__schemas__[e]].normalize);
  25585. }), i.__compiled__[""] = {
  25586. validate: null,
  25587. normalize: function normalize(e, t) {
  25588. t.normalize(e);
  25589. }
  25590. };
  25591. var n = Object.keys(i.__compiled__).filter(function (e) {
  25592. return 0 < e.length && i.__compiled__[e];
  25593. }).map(ot).join("|");
  25594. i.re.schema_test = RegExp("(^|(?!_)(?:[><|]|" + t.src_ZPCc + "))(" + n + ")", "i"), i.re.schema_search = RegExp("(^|(?!_)(?:[><|]|" + t.src_ZPCc + "))(" + n + ")", "ig"), i.re.schema_at_start = RegExp("^" + i.re.schema_search.source, "i"), i.re.pretest = RegExp("(" + i.re.schema_test.source + ")|(" + i.re.host_fuzzy_test.source + ")|@", "i"), (n = i).__index__ = -1, n.__text_cache__ = "";
  25595. }
  25596. function pt(e, t) {
  25597. var r = e.__index__,
  25598. n = e.__last_index__,
  25599. i = e.__text_cache__.slice(r, n);
  25600. this.schema = e.__schema__.toLowerCase(), this.index = r + t, this.lastIndex = n + t, this.raw = i, this.text = i, this.url = i;
  25601. }
  25602. function ft(e, t) {
  25603. t = new pt(e, t);
  25604. return e.__compiled__[t.schema].normalize(t, e), t;
  25605. }
  25606. function S(e, t) {
  25607. if (!(this instanceof S)) return new S(e, t);
  25608. var r;
  25609. t || (r = e, Object.keys(r || {}).reduce(function (e, t) {
  25610. return e || ut.hasOwnProperty(t);
  25611. }, !1) && (t = e, e = {})), this.__opts__ = it({}, ut, t), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = it({}, at, e), this.__compiled__ = {}, this.__tlds__ = ct, this.__tlds_replaced__ = !1, this.re = {}, ht(this);
  25612. }
  25613. S.prototype.add = function (e, t) {
  25614. return this.__schemas__[e] = t, ht(this), this;
  25615. }, S.prototype.set = function (e) {
  25616. return this.__opts__ = it(this.__opts__, e), this;
  25617. }, S.prototype.test = function (e) {
  25618. if (this.__text_cache__ = e, this.__index__ = -1, !e.length) return !1;
  25619. var t, r, n, i, s, o, u, a;
  25620. if (this.re.schema_test.test(e)) for ((u = this.re.schema_search).lastIndex = 0; null !== (t = u.exec(e));) {
  25621. if (i = this.testSchemaAt(e, t[2], u.lastIndex)) {
  25622. this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + i;
  25623. break;
  25624. }
  25625. }
  25626. return this.__opts__.fuzzyLink && this.__compiled__["http:"] && 0 <= (a = e.search(this.re.host_fuzzy_test)) && (this.__index__ < 0 || a < this.__index__) && null !== (r = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) && (s = r.index + r[1].length, this.__index__ < 0 || s < this.__index__) && (this.__schema__ = "", this.__index__ = s, this.__last_index__ = r.index + r[0].length), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && 0 <= e.indexOf("@") && null !== (n = e.match(this.re.email_fuzzy)) && (s = n.index + n[1].length, o = n.index + n[0].length, this.__index__ < 0 || s < this.__index__ || s === this.__index__ && o > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = s, this.__last_index__ = o), 0 <= this.__index__;
  25627. }, S.prototype.pretest = function (e) {
  25628. return this.re.pretest.test(e);
  25629. }, S.prototype.testSchemaAt = function (e, t, r) {
  25630. return this.__compiled__[t.toLowerCase()] ? this.__compiled__[t.toLowerCase()].validate(e, r, this) : 0;
  25631. }, S.prototype.match = function (e) {
  25632. var t = [];
  25633. var r = 0,
  25634. n = (0 <= this.__index__ && this.__text_cache__ === e && (t.push(ft(this, r)), r = this.__last_index__), r ? e.slice(r) : e);
  25635. for (; this.test(n);) {
  25636. t.push(ft(this, r)), n = n.slice(this.__last_index__), r += this.__last_index__;
  25637. }
  25638. return t.length ? t : null;
  25639. }, S.prototype.matchAtStart = function (e) {
  25640. var t;
  25641. return this.__text_cache__ = e, this.__index__ = -1, e.length && (t = this.re.schema_at_start.exec(e)) && (e = this.testSchemaAt(e, t[2], t[0].length)) ? (this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + e, ft(this, 0)) : null;
  25642. }, S.prototype.tlds = function (e, t) {
  25643. return e = Array.isArray(e) ? e : [e], t ? this.__tlds__ = this.__tlds__.concat(e).sort().filter(function (e, t, r) {
  25644. return e !== r[t - 1];
  25645. }).reverse() : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0), ht(this), this;
  25646. }, S.prototype.normalize = function (e) {
  25647. e.schema || (e.url = "http://" + e.url), "mailto:" !== e.schema || /^mailto:/i.test(e.url) || (e.url = "mailto:" + e.url);
  25648. }, S.prototype.onCompile = function () {};
  25649. var q = 2147483647,
  25650. B = 36,
  25651. dt = /^xn--/,
  25652. _t = /[^\0-\x7F]/,
  25653. mt = /[\x2E\u3002\uFF0E\uFF61]/g,
  25654. gt = {
  25655. overflow: "Overflow: input needs wider integers to process",
  25656. "not-basic": "Illegal input >= 0x80 (not a basic code point)",
  25657. "invalid-input": "Invalid input"
  25658. },
  25659. L = Math.floor,
  25660. kt = String.fromCharCode;
  25661. function I(e) {
  25662. throw new RangeError(gt[e]);
  25663. }
  25664. function Dt(e, t) {
  25665. var r = e.split("@");
  25666. var n = "";
  25667. 1 < r.length && (n = r[0] + "@", e = r[1]);
  25668. r = function (e, t) {
  25669. var r = [];
  25670. var n = e.length;
  25671. for (; n--;) {
  25672. r[n] = t(e[n]);
  25673. }
  25674. return r;
  25675. }((e = e.replace(mt, ".")).split("."), t).join(".");
  25676. return n + r;
  25677. }
  25678. function Ct(t) {
  25679. var r = [];
  25680. var n = 0,
  25681. e = t.length;
  25682. for (; n < e;) {
  25683. var i = t.charCodeAt(n++);
  25684. if (55296 <= i && i <= 56319 && n < e) {
  25685. var _e115 = t.charCodeAt(n++);
  25686. 56320 == (64512 & _e115) ? r.push(((1023 & i) << 10) + (1023 & _e115) + 65536) : (r.push(i), n--);
  25687. } else r.push(i);
  25688. }
  25689. return r;
  25690. }
  25691. function yt(e, t) {
  25692. return e + 22 + 75 * (e < 26) - ((0 != t) << 5);
  25693. }
  25694. function Et(e, t, r) {
  25695. var n = 0;
  25696. for (e = r ? L(e / 700) : e >> 1, e += L(e / t); 455 < e; n += B) {
  25697. e = L(e / 35);
  25698. }
  25699. return L(n + 36 * e / (e + 38));
  25700. }
  25701. function At(i) {
  25702. var t = [],
  25703. s = i.length;
  25704. var o = 0,
  25705. r = 128,
  25706. u = 72,
  25707. a = i.lastIndexOf("-");
  25708. a < 0 && (a = 0);
  25709. for (var _e116 = 0; _e116 < a; ++_e116) {
  25710. 128 <= i.charCodeAt(_e116) && I("not-basic"), t.push(i.charCodeAt(_e116));
  25711. }
  25712. for (var _n12 = 0 < a ? a + 1 : 0; _n12 < s;) {
  25713. var _e117 = o;
  25714. for (var _t56 = 1, _r31 = B;; _r31 += B) {
  25715. _n12 >= s && I("invalid-input");
  25716. var _e118 = 48 <= (l = i.charCodeAt(_n12++)) && l < 58 ? l - 48 + 26 : 65 <= l && l < 91 ? l - 65 : 97 <= l && l < 123 ? l - 97 : B;
  25717. _e118 >= B && I("invalid-input"), _e118 > L((q - o) / _t56) && I("overflow"), o += _e118 * _t56;
  25718. var l = _r31 <= u ? 1 : _r31 >= u + 26 ? 26 : _r31 - u;
  25719. if (_e118 < l) break;
  25720. l = B - l;
  25721. _t56 > L(q / l) && I("overflow"), _t56 *= l;
  25722. }
  25723. var c = t.length + 1;
  25724. u = Et(o - _e117, c, 0 == _e117), L(o / c) > q - r && I("overflow"), r += L(o / c), o %= c, t.splice(o++, 0, r);
  25725. }
  25726. return String.fromCodePoint.apply(String, t);
  25727. }
  25728. function Ft(r) {
  25729. var s = [],
  25730. e = (r = Ct(r)).length,
  25731. n = 128,
  25732. o = 0,
  25733. u = 72;
  25734. var _iterator = _createForOfIteratorHelper(r),
  25735. _step;
  25736. try {
  25737. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  25738. var _e122 = _step.value;
  25739. _e122 < 128 && s.push(kt(_e122));
  25740. }
  25741. } catch (err) {
  25742. _iterator.e(err);
  25743. } finally {
  25744. _iterator.f();
  25745. }
  25746. var a = s.length,
  25747. l = a;
  25748. for (a && s.push("-"); l < e;) {
  25749. var _t57 = q;
  25750. var _iterator2 = _createForOfIteratorHelper(r),
  25751. _step2;
  25752. try {
  25753. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  25754. var _e119 = _step2.value;
  25755. _e119 >= n && _e119 < _t57 && (_t57 = _e119);
  25756. }
  25757. } catch (err) {
  25758. _iterator2.e(err);
  25759. } finally {
  25760. _iterator2.f();
  25761. }
  25762. var c = l + 1;
  25763. _t57 - n > L((q - o) / c) && I("overflow"), o += (_t57 - n) * c, n = _t57;
  25764. var _iterator3 = _createForOfIteratorHelper(r),
  25765. _step3;
  25766. try {
  25767. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  25768. var _e120 = _step3.value;
  25769. if (_e120 < n && ++o > q && I("overflow"), _e120 === n) {
  25770. var _i10 = o;
  25771. for (var _n13 = B;; _n13 += B) {
  25772. var _e121 = _n13 <= u ? 1 : _n13 >= u + 26 ? 26 : _n13 - u;
  25773. if (_i10 < _e121) break;
  25774. var _t58 = _i10 - _e121,
  25775. _r32 = B - _e121;
  25776. s.push(kt(yt(_e121 + _t58 % _r32, 0))), _i10 = L(_t58 / _r32);
  25777. }
  25778. s.push(kt(yt(_i10, 0))), u = Et(o, c, l === a), o = 0, ++l;
  25779. }
  25780. }
  25781. } catch (err) {
  25782. _iterator3.e(err);
  25783. } finally {
  25784. _iterator3.f();
  25785. }
  25786. ++o, ++n;
  25787. }
  25788. return s.join("");
  25789. }
  25790. var bt = {
  25791. version: "2.3.1",
  25792. ucs2: {
  25793. decode: Ct,
  25794. encode: function encode(e) {
  25795. return String.fromCodePoint.apply(String, _toConsumableArray(e));
  25796. }
  25797. },
  25798. decode: At,
  25799. encode: Ft,
  25800. toASCII: function toASCII(e) {
  25801. return Dt(e, function (e) {
  25802. return _t.test(e) ? "xn--" + Ft(e) : e;
  25803. });
  25804. },
  25805. toUnicode: function toUnicode(e) {
  25806. return Dt(e, function (e) {
  25807. return dt.test(e) ? At(e.slice(4).toLowerCase()) : e;
  25808. });
  25809. }
  25810. },
  25811. vt = {
  25812. default: {
  25813. options: {
  25814. html: !1,
  25815. xhtmlOut: !1,
  25816. breaks: !1,
  25817. langPrefix: "language-",
  25818. linkify: !1,
  25819. typographer: !1,
  25820. quotes: "“”‘’",
  25821. highlight: null,
  25822. maxNesting: 100
  25823. },
  25824. components: {
  25825. core: {},
  25826. block: {},
  25827. inline: {}
  25828. }
  25829. },
  25830. zero: {
  25831. options: {
  25832. html: !1,
  25833. xhtmlOut: !1,
  25834. breaks: !1,
  25835. langPrefix: "language-",
  25836. linkify: !1,
  25837. typographer: !1,
  25838. quotes: "“”‘’",
  25839. highlight: null,
  25840. maxNesting: 20
  25841. },
  25842. components: {
  25843. core: {
  25844. rules: ["normalize", "block", "inline", "text_join"]
  25845. },
  25846. block: {
  25847. rules: ["paragraph"]
  25848. },
  25849. inline: {
  25850. rules: ["text"],
  25851. rules2: ["balance_pairs", "fragments_join"]
  25852. }
  25853. }
  25854. },
  25855. commonmark: {
  25856. options: {
  25857. html: !0,
  25858. xhtmlOut: !0,
  25859. breaks: !1,
  25860. langPrefix: "language-",
  25861. linkify: !1,
  25862. typographer: !1,
  25863. quotes: "“”‘’",
  25864. highlight: null,
  25865. maxNesting: 20
  25866. },
  25867. components: {
  25868. core: {
  25869. rules: ["normalize", "block", "inline", "text_join"]
  25870. },
  25871. block: {
  25872. rules: ["blockquote", "code", "fence", "heading", "hr", "html_block", "lheading", "list", "reference", "paragraph"]
  25873. },
  25874. inline: {
  25875. rules: ["autolink", "backticks", "emphasis", "entity", "escape", "html_inline", "image", "link", "newline", "text"],
  25876. rules2: ["balance_pairs", "emphasis", "fragments_join"]
  25877. }
  25878. }
  25879. }
  25880. },
  25881. xt = /^(vbscript|javascript|file|data):/,
  25882. wt = /^data:image\/(gif|png|jpeg|webp);/;
  25883. function zt(e) {
  25884. e = e.trim().toLowerCase();
  25885. return !xt.test(e) || wt.test(e);
  25886. }
  25887. var St = ["http:", "https:", "mailto:"];
  25888. function qt(e) {
  25889. var t = J(e, !0);
  25890. if (t.hostname && (!t.protocol || 0 <= St.indexOf(t.protocol))) try {
  25891. t.hostname = bt.toASCII(t.hostname);
  25892. } catch (e) {}
  25893. return r(i(t));
  25894. }
  25895. function Bt(e) {
  25896. var t = J(e, !0);
  25897. if (t.hostname && (!t.protocol || 0 <= St.indexOf(t.protocol))) try {
  25898. t.hostname = bt.toUnicode(t.hostname);
  25899. } catch (e) {}
  25900. return n(i(t), n.defaultChars + "%");
  25901. }
  25902. function M(e, t) {
  25903. if (!(this instanceof M)) return new M(e, t);
  25904. t || pe(e) || (t = e || {}, e = "default"), this.inline = new w(), this.block = new b(), this.core = new Re(), this.renderer = new d(), this.linkify = new S(), this.validateLink = zt, this.normalizeLink = qt, this.normalizeLinkText = Bt, this.utils = Fe, this.helpers = c({}, be), this.options = {}, this.configure(e), t && this.set(t);
  25905. }
  25906. return M.prototype.set = function (e) {
  25907. return c(this.options, e), this;
  25908. }, M.prototype.configure = function (t) {
  25909. var r = this;
  25910. if (pe(t)) {
  25911. var _e123 = t;
  25912. if (!(t = vt[_e123])) throw new Error('Wrong `markdown-it` preset "' + _e123 + '", check name');
  25913. }
  25914. if (t) return t.options && r.set(t.options), t.components && Object.keys(t.components).forEach(function (e) {
  25915. t.components[e].rules && r[e].ruler.enableOnly(t.components[e].rules), t.components[e].rules2 && r[e].ruler2.enableOnly(t.components[e].rules2);
  25916. }), this;
  25917. throw new Error("Wrong `markdown-it` preset, can't be empty");
  25918. }, M.prototype.enable = function (t, e) {
  25919. var r = [];
  25920. Array.isArray(t) || (t = [t]), ["core", "block", "inline"].forEach(function (e) {
  25921. r = r.concat(this[e].ruler.enable(t, !0));
  25922. }, this), r = r.concat(this.inline.ruler2.enable(t, !0));
  25923. var n = t.filter(function (e) {
  25924. return r.indexOf(e) < 0;
  25925. });
  25926. if (n.length && !e) throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + n);
  25927. return this;
  25928. }, M.prototype.disable = function (t, e) {
  25929. var r = [];
  25930. Array.isArray(t) || (t = [t]), ["core", "block", "inline"].forEach(function (e) {
  25931. r = r.concat(this[e].ruler.disable(t, !0));
  25932. }, this), r = r.concat(this.inline.ruler2.disable(t, !0));
  25933. var n = t.filter(function (e) {
  25934. return r.indexOf(e) < 0;
  25935. });
  25936. if (n.length && !e) throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + n);
  25937. return this;
  25938. }, M.prototype.use = function (e) {
  25939. var t = [this].concat(Array.prototype.slice.call(arguments, 1));
  25940. return e.apply(e, t), this;
  25941. }, M.prototype.parse = function (e, t) {
  25942. if ("string" != typeof e) throw new Error("Input data should be a String");
  25943. e = new this.core.State(e, this, t);
  25944. return this.core.process(e), e.tokens;
  25945. }, M.prototype.render = function (e, t) {
  25946. return this.renderer.render(this.parse(e, t = t || {}), this.options, t);
  25947. }, M.prototype.parseInline = function (e, t) {
  25948. e = new this.core.State(e, this, t);
  25949. return e.inlineMode = !0, this.core.process(e), e.tokens;
  25950. }, M.prototype.renderInline = function (e, t) {
  25951. return this.renderer.render(this.parseInline(e, t = t || {}), this.options, t);
  25952. }, M;
  25953. });
  25954. /***/ }),
  25955. /***/ 502:
  25956. /*!*********************************************************************************!*\
  25957. !*** E:/盈通/sulibao-mini/components/agent-ui/wd-markdown/utils/highlight.min.js ***!
  25958. \*********************************************************************************/
  25959. /*! no static exports found */
  25960. /***/ (function(module, exports, __webpack_require__) {
  25961. "use strict";
  25962. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  25963. Object.defineProperty(exports, "__esModule", {
  25964. value: true
  25965. });
  25966. exports.default = _default;
  25967. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 371));
  25968. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  25969. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 368));
  25970. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 369));
  25971. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 370));
  25972. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  25973. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  25974. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  25975. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  25976. 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); }; }
  25977. 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; } }
  25978. function deepFreeze(t) {
  25979. return t instanceof Map ? t.clear = t.delete = t.set = function () {
  25980. throw new Error("map is read-only");
  25981. } : t instanceof Set && (t.add = t.clear = t.delete = function () {
  25982. throw new Error("set is read-only");
  25983. }), Object.freeze(t), Object.getOwnPropertyNames(t).forEach(function (e) {
  25984. var e = t[e],
  25985. n = (0, _typeof2.default)(e);
  25986. "object" != n && "function" != n || Object.isFrozen(e) || deepFreeze(e);
  25987. }), t;
  25988. }
  25989. var Response = /*#__PURE__*/function () {
  25990. function Response(e) {
  25991. (0, _classCallCheck2.default)(this, Response);
  25992. void 0 === e.data && (e.data = {}), this.setData(e.data), this.isMatchIgnored = !1;
  25993. }
  25994. (0, _createClass2.default)(Response, [{
  25995. key: "ignoreMatch",
  25996. value: function ignoreMatch() {
  25997. this.isMatchIgnored = !0;
  25998. }
  25999. }]);
  26000. return Response;
  26001. }();
  26002. function escapeHTML(e) {
  26003. return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
  26004. }
  26005. function inherit$1(e) {
  26006. var t = Object.create(null);
  26007. for (var i in e) {
  26008. t[i] = e[i];
  26009. }
  26010. for (var _len = arguments.length, n = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  26011. n[_key - 1] = arguments[_key];
  26012. }
  26013. return n.forEach(function (e) {
  26014. for (var n in e) {
  26015. t[n] = e[n];
  26016. }
  26017. }), t;
  26018. }
  26019. var SPAN_CLOSE = "</span>",
  26020. emitsWrappingTags = function emitsWrappingTags(e) {
  26021. return !!e.scope;
  26022. },
  26023. scopeToCSSClass = function scopeToCSSClass(e, _ref) {
  26024. var n = _ref.prefix;
  26025. var t;
  26026. return e.startsWith("language:") ? e.replace("language:", "language-") : e.includes(".") ? ["" + n + (t = e.split(".")).shift()].concat((0, _toConsumableArray2.default)(t.map(function (e, n) {
  26027. return "" + e + "_".repeat(n + 1);
  26028. }))).join(" ") : "" + n + e;
  26029. };
  26030. var HTMLRenderer = /*#__PURE__*/function () {
  26031. function HTMLRenderer(e, n) {
  26032. (0, _classCallCheck2.default)(this, HTMLRenderer);
  26033. this.buffer = "", this.classPrefix = n.classPrefix, e.walk(this);
  26034. }
  26035. (0, _createClass2.default)(HTMLRenderer, [{
  26036. key: "addText",
  26037. value: function addText(e) {
  26038. this.buffer += escapeHTML(e);
  26039. }
  26040. }, {
  26041. key: "openNode",
  26042. value: function openNode(e) {
  26043. emitsWrappingTags(e) && (e = scopeToCSSClass(e.scope, {
  26044. prefix: this.classPrefix
  26045. }), this.span(e));
  26046. }
  26047. }, {
  26048. key: "closeNode",
  26049. value: function closeNode(e) {
  26050. emitsWrappingTags(e) && (this.buffer += SPAN_CLOSE);
  26051. }
  26052. }, {
  26053. key: "value",
  26054. value: function value() {
  26055. return this.buffer;
  26056. }
  26057. }, {
  26058. key: "span",
  26059. value: function span(e) {
  26060. this.buffer += "<span class=\"".concat(e, "\">");
  26061. }
  26062. }]);
  26063. return HTMLRenderer;
  26064. }();
  26065. var newNode = function newNode() {
  26066. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  26067. var n = {
  26068. children: []
  26069. };
  26070. return Object.assign(n, e), n;
  26071. };
  26072. var TokenTree = /*#__PURE__*/function () {
  26073. function TokenTree() {
  26074. (0, _classCallCheck2.default)(this, TokenTree);
  26075. this.rootNode = newNode(), this.stack = [this.rootNode];
  26076. }
  26077. (0, _createClass2.default)(TokenTree, [{
  26078. key: "top",
  26079. get: function get() {
  26080. return this.stack[this.stack.length - 1];
  26081. }
  26082. }, {
  26083. key: "root",
  26084. get: function get() {
  26085. return this.rootNode;
  26086. }
  26087. }, {
  26088. key: "add",
  26089. value: function add(e) {
  26090. this.top.children.push(e);
  26091. }
  26092. }, {
  26093. key: "openNode",
  26094. value: function openNode(e) {
  26095. e = newNode({
  26096. scope: e
  26097. });
  26098. this.add(e), this.stack.push(e);
  26099. }
  26100. }, {
  26101. key: "closeNode",
  26102. value: function closeNode() {
  26103. if (1 < this.stack.length) return this.stack.pop();
  26104. }
  26105. }, {
  26106. key: "closeAllNodes",
  26107. value: function closeAllNodes() {
  26108. for (; this.closeNode();) {
  26109. ;
  26110. }
  26111. }
  26112. }, {
  26113. key: "toJSON",
  26114. value: function toJSON() {
  26115. return JSON.stringify(this.rootNode, null, 4);
  26116. }
  26117. }, {
  26118. key: "walk",
  26119. value: function walk(e) {
  26120. return this.constructor._walk(e, this.rootNode);
  26121. }
  26122. }], [{
  26123. key: "_walk",
  26124. value: function _walk(n, e) {
  26125. var _this = this;
  26126. return "string" == typeof e ? n.addText(e) : e.children && (n.openNode(e), e.children.forEach(function (e) {
  26127. return _this._walk(n, e);
  26128. }), n.closeNode(e)), n;
  26129. }
  26130. }, {
  26131. key: "_collapse",
  26132. value: function _collapse(e) {
  26133. "string" != typeof e && e.children && (e.children.every(function (e) {
  26134. return "string" == typeof e;
  26135. }) ? e.children = [e.children.join("")] : e.children.forEach(function (e) {
  26136. TokenTree._collapse(e);
  26137. }));
  26138. }
  26139. }]);
  26140. return TokenTree;
  26141. }();
  26142. var TokenTreeEmitter = /*#__PURE__*/function (_TokenTree) {
  26143. (0, _inherits2.default)(TokenTreeEmitter, _TokenTree);
  26144. var _super = _createSuper(TokenTreeEmitter);
  26145. function TokenTreeEmitter(e) {
  26146. var _this2;
  26147. (0, _classCallCheck2.default)(this, TokenTreeEmitter);
  26148. _this2 = _super.call(this), _this2.options = e;
  26149. return _this2;
  26150. }
  26151. (0, _createClass2.default)(TokenTreeEmitter, [{
  26152. key: "addText",
  26153. value: function addText(e) {
  26154. "" !== e && this.add(e);
  26155. }
  26156. }, {
  26157. key: "startScope",
  26158. value: function startScope(e) {
  26159. this.openNode(e);
  26160. }
  26161. }, {
  26162. key: "endScope",
  26163. value: function endScope() {
  26164. this.closeNode();
  26165. }
  26166. }, {
  26167. key: "__addSublanguage",
  26168. value: function __addSublanguage(e, n) {
  26169. e = e.root;
  26170. n && (e.scope = "language:" + n), this.add(e);
  26171. }
  26172. }, {
  26173. key: "toHTML",
  26174. value: function toHTML() {
  26175. return new HTMLRenderer(this, this.options).value();
  26176. }
  26177. }, {
  26178. key: "finalize",
  26179. value: function finalize() {
  26180. return this.closeAllNodes(), !0;
  26181. }
  26182. }]);
  26183. return TokenTreeEmitter;
  26184. }(TokenTree);
  26185. function source(e) {
  26186. return e ? "string" == typeof e ? e : e.source : null;
  26187. }
  26188. function lookahead(e) {
  26189. return concat("(?=", e, ")");
  26190. }
  26191. function anyNumberOfTimes(e) {
  26192. return concat("(?:", e, ")*");
  26193. }
  26194. function optional(e) {
  26195. return concat("(?:", e, ")?");
  26196. }
  26197. function concat() {
  26198. for (var _len2 = arguments.length, e = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  26199. e[_key2] = arguments[_key2];
  26200. }
  26201. return e.map(function (e) {
  26202. return source(e);
  26203. }).join("");
  26204. }
  26205. function stripOptionsFromArgs(e) {
  26206. var n = e[e.length - 1];
  26207. return "object" == (0, _typeof2.default)(n) && n.constructor === Object ? (e.splice(e.length - 1, 1), n) : {};
  26208. }
  26209. function either() {
  26210. for (var _len3 = arguments.length, e = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  26211. e[_key3] = arguments[_key3];
  26212. }
  26213. return "(" + (stripOptionsFromArgs(e).capture ? "" : "?:") + e.map(function (e) {
  26214. return source(e);
  26215. }).join("|") + ")";
  26216. }
  26217. function countMatchGroups(e) {
  26218. return new RegExp(e.toString() + "|").exec("").length - 1;
  26219. }
  26220. function startsWith(e, n) {
  26221. e = e && e.exec(n);
  26222. return e && 0 === e.index;
  26223. }
  26224. var BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
  26225. function _rewriteBackreferences(e, _ref2) {
  26226. var n = _ref2.joinWith;
  26227. var o = 0;
  26228. return e.map(function (e) {
  26229. var n = o += 1;
  26230. var t = source(e),
  26231. i = "";
  26232. for (; 0 < t.length;) {
  26233. var r = BACKREF_RE.exec(t);
  26234. if (!r) {
  26235. i += t;
  26236. break;
  26237. }
  26238. i += t.substring(0, r.index), t = t.substring(r.index + r[0].length), "\\" === r[0][0] && r[1] ? i += "\\" + String(Number(r[1]) + n) : (i += r[0], "(" === r[0] && o++);
  26239. }
  26240. return i;
  26241. }).map(function (e) {
  26242. return "(".concat(e, ")");
  26243. }).join(n);
  26244. }
  26245. var MATCH_NOTHING_RE = /\b\B/,
  26246. IDENT_RE = "[a-zA-Z]\\w*",
  26247. UNDERSCORE_IDENT_RE = "[a-zA-Z_]\\w*",
  26248. NUMBER_RE = "\\b\\d+(\\.\\d+)?",
  26249. C_NUMBER_RE = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",
  26250. BINARY_NUMBER_RE = "\\b(0b[01]+)",
  26251. RE_STARTERS_RE = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",
  26252. SHEBANG = function SHEBANG() {
  26253. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  26254. var n = /^#![ ]*\//;
  26255. return e.binary && (e.begin = concat(n, /.*\b/, e.binary, /\b.*/)), inherit$1({
  26256. scope: "meta",
  26257. begin: n,
  26258. end: /$/,
  26259. relevance: 0,
  26260. "on:begin": function onBegin(e, n) {
  26261. 0 !== e.index && n.ignoreMatch();
  26262. }
  26263. }, e);
  26264. },
  26265. BACKSLASH_ESCAPE = {
  26266. begin: "\\\\[\\s\\S]",
  26267. relevance: 0
  26268. },
  26269. APOS_STRING_MODE = {
  26270. scope: "string",
  26271. begin: "'",
  26272. end: "'",
  26273. illegal: "\\n",
  26274. contains: [BACKSLASH_ESCAPE]
  26275. },
  26276. QUOTE_STRING_MODE = {
  26277. scope: "string",
  26278. begin: '"',
  26279. end: '"',
  26280. illegal: "\\n",
  26281. contains: [BACKSLASH_ESCAPE]
  26282. },
  26283. PHRASAL_WORDS_MODE = {
  26284. begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
  26285. },
  26286. COMMENT = function COMMENT(e, n) {
  26287. var t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  26288. e = inherit$1({
  26289. scope: "comment",
  26290. begin: e,
  26291. end: n,
  26292. contains: []
  26293. }, t), e.contains.push({
  26294. scope: "doctag",
  26295. begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
  26296. end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
  26297. excludeBegin: !0,
  26298. relevance: 0
  26299. }), n = either("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
  26300. return e.contains.push({
  26301. begin: concat(/[ ]+/, "(", n, /[.]?[:]?([.][ ]|[ ])/, "){3}")
  26302. }), e;
  26303. },
  26304. C_LINE_COMMENT_MODE = COMMENT("//", "$"),
  26305. C_BLOCK_COMMENT_MODE = COMMENT("/\\*", "\\*/"),
  26306. HASH_COMMENT_MODE = COMMENT("#", "$"),
  26307. NUMBER_MODE = {
  26308. scope: "number",
  26309. begin: NUMBER_RE,
  26310. relevance: 0
  26311. },
  26312. C_NUMBER_MODE = {
  26313. scope: "number",
  26314. begin: C_NUMBER_RE,
  26315. relevance: 0
  26316. },
  26317. BINARY_NUMBER_MODE = {
  26318. scope: "number",
  26319. begin: BINARY_NUMBER_RE,
  26320. relevance: 0
  26321. },
  26322. REGEXP_MODE = {
  26323. scope: "regexp",
  26324. begin: /\/(?=[^/\n]*\/)/,
  26325. end: /\/[gimuy]*/,
  26326. contains: [BACKSLASH_ESCAPE, {
  26327. begin: /\[/,
  26328. end: /\]/,
  26329. relevance: 0,
  26330. contains: [BACKSLASH_ESCAPE]
  26331. }]
  26332. },
  26333. TITLE_MODE = {
  26334. scope: "title",
  26335. begin: IDENT_RE,
  26336. relevance: 0
  26337. },
  26338. UNDERSCORE_TITLE_MODE = {
  26339. scope: "title",
  26340. begin: UNDERSCORE_IDENT_RE,
  26341. relevance: 0
  26342. },
  26343. METHOD_GUARD = {
  26344. begin: "\\.\\s*" + UNDERSCORE_IDENT_RE,
  26345. relevance: 0
  26346. },
  26347. END_SAME_AS_BEGIN = function END_SAME_AS_BEGIN(e) {
  26348. return Object.assign(e, {
  26349. "on:begin": function onBegin(e, n) {
  26350. n.data._beginMatch = e[1];
  26351. },
  26352. "on:end": function onEnd(e, n) {
  26353. n.data._beginMatch !== e[1] && n.ignoreMatch();
  26354. }
  26355. });
  26356. };
  26357. var MODES = Object.freeze({
  26358. __proto__: null,
  26359. APOS_STRING_MODE: APOS_STRING_MODE,
  26360. BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,
  26361. BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,
  26362. BINARY_NUMBER_RE: BINARY_NUMBER_RE,
  26363. COMMENT: COMMENT,
  26364. C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,
  26365. C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,
  26366. C_NUMBER_MODE: C_NUMBER_MODE,
  26367. C_NUMBER_RE: C_NUMBER_RE,
  26368. END_SAME_AS_BEGIN: END_SAME_AS_BEGIN,
  26369. HASH_COMMENT_MODE: HASH_COMMENT_MODE,
  26370. IDENT_RE: IDENT_RE,
  26371. MATCH_NOTHING_RE: MATCH_NOTHING_RE,
  26372. METHOD_GUARD: METHOD_GUARD,
  26373. NUMBER_MODE: NUMBER_MODE,
  26374. NUMBER_RE: NUMBER_RE,
  26375. PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,
  26376. QUOTE_STRING_MODE: QUOTE_STRING_MODE,
  26377. REGEXP_MODE: REGEXP_MODE,
  26378. RE_STARTERS_RE: RE_STARTERS_RE,
  26379. SHEBANG: SHEBANG,
  26380. TITLE_MODE: TITLE_MODE,
  26381. UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,
  26382. UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE
  26383. });
  26384. function skipIfHasPrecedingDot(e, n) {
  26385. "." === e.input[e.index - 1] && n.ignoreMatch();
  26386. }
  26387. function scopeClassName(e, n) {
  26388. void 0 !== e.className && (e.scope = e.className, delete e.className);
  26389. }
  26390. function beginKeywords(e, n) {
  26391. n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = skipIfHasPrecedingDot, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, void 0 === e.relevance) && (e.relevance = 0);
  26392. }
  26393. function compileIllegal(e, n) {
  26394. Array.isArray(e.illegal) && (e.illegal = either.apply(void 0, (0, _toConsumableArray2.default)(e.illegal)));
  26395. }
  26396. function compileMatch(e, n) {
  26397. if (e.match) {
  26398. if (e.begin || e.end) throw new Error("begin & end are not supported with match");
  26399. e.begin = e.match, delete e.match;
  26400. }
  26401. }
  26402. function compileRelevance(e, n) {
  26403. void 0 === e.relevance && (e.relevance = 1);
  26404. }
  26405. var beforeMatchExt = function beforeMatchExt(n, e) {
  26406. if (n.beforeMatch) {
  26407. if (n.starts) throw new Error("beforeMatch cannot be used with starts");
  26408. var t = Object.assign({}, n);
  26409. Object.keys(n).forEach(function (e) {
  26410. delete n[e];
  26411. }), n.keywords = t.keywords, n.begin = concat(t.beforeMatch, lookahead(t.begin)), n.starts = {
  26412. relevance: 0,
  26413. contains: [Object.assign(t, {
  26414. endsParent: !0
  26415. })]
  26416. }, n.relevance = 0, delete t.beforeMatch;
  26417. }
  26418. },
  26419. COMMON_KEYWORDS = ["of", "and", "for", "in", "not", "or", "if", "then", "parent", "list", "value"],
  26420. DEFAULT_KEYWORD_SCOPE = "keyword";
  26421. function compileKeywords(n, t) {
  26422. var e = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_KEYWORD_SCOPE;
  26423. var i = Object.create(null);
  26424. return "string" == typeof n ? r(e, n.split(" ")) : Array.isArray(n) ? r(e, n) : Object.keys(n).forEach(function (e) {
  26425. Object.assign(i, compileKeywords(n[e], t, e));
  26426. }), i;
  26427. function r(n, e) {
  26428. (e = t ? e.map(function (e) {
  26429. return e.toLowerCase();
  26430. }) : e).forEach(function (e) {
  26431. e = e.split("|");
  26432. i[e[0]] = [n, scoreForKeyword(e[0], e[1])];
  26433. });
  26434. }
  26435. }
  26436. function scoreForKeyword(e, n) {
  26437. return n ? Number(n) : commonKeyword(e) ? 0 : 1;
  26438. }
  26439. function commonKeyword(e) {
  26440. return COMMON_KEYWORDS.includes(e.toLowerCase());
  26441. }
  26442. var seenDeprecations = {},
  26443. error = function error(e) {
  26444. console.error(e);
  26445. },
  26446. warn = function warn(e) {
  26447. var _console;
  26448. for (var _len4 = arguments.length, n = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  26449. n[_key4 - 1] = arguments[_key4];
  26450. }
  26451. (_console = console).log.apply(_console, ["WARN: " + e].concat(n));
  26452. },
  26453. deprecated = function deprecated(e, n) {
  26454. seenDeprecations[e + "/" + n] || (console.log("Deprecated as of ".concat(e, ". ") + n), seenDeprecations[e + "/" + n] = !0);
  26455. },
  26456. MultiClassError = new Error();
  26457. function remapScopeNames(e, n, _ref3) {
  26458. var t = _ref3.key;
  26459. var i = 0;
  26460. var r = e[t],
  26461. o = {},
  26462. a = {};
  26463. for (var _e = 1; _e <= n.length; _e++) {
  26464. a[_e + i] = r[_e], o[_e + i] = !0, i += countMatchGroups(n[_e - 1]);
  26465. }
  26466. e[t] = a, e[t]._emit = o, e[t]._multi = !0;
  26467. }
  26468. function beginMultiClass(e) {
  26469. if (Array.isArray(e.begin)) {
  26470. if (e.skip || e.excludeBegin || e.returnBegin) throw error("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), MultiClassError;
  26471. if ("object" != (0, _typeof2.default)(e.beginScope) || null === e.beginScope) throw error("beginScope must be object"), MultiClassError;
  26472. remapScopeNames(e, e.begin, {
  26473. key: "beginScope"
  26474. }), e.begin = _rewriteBackreferences(e.begin, {
  26475. joinWith: ""
  26476. });
  26477. }
  26478. }
  26479. function endMultiClass(e) {
  26480. if (Array.isArray(e.end)) {
  26481. if (e.skip || e.excludeEnd || e.returnEnd) throw error("skip, excludeEnd, returnEnd not compatible with endScope: {}"), MultiClassError;
  26482. if ("object" != (0, _typeof2.default)(e.endScope) || null === e.endScope) throw error("endScope must be object"), MultiClassError;
  26483. remapScopeNames(e, e.end, {
  26484. key: "endScope"
  26485. }), e.end = _rewriteBackreferences(e.end, {
  26486. joinWith: ""
  26487. });
  26488. }
  26489. }
  26490. function scopeSugar(e) {
  26491. e.scope && "object" == (0, _typeof2.default)(e.scope) && null !== e.scope && (e.beginScope = e.scope, delete e.scope);
  26492. }
  26493. function MultiClass(e) {
  26494. scopeSugar(e), "string" == typeof e.beginScope && (e.beginScope = {
  26495. _wrap: e.beginScope
  26496. }), "string" == typeof e.endScope && (e.endScope = {
  26497. _wrap: e.endScope
  26498. }), beginMultiClass(e), endMultiClass(e);
  26499. }
  26500. function compileLanguage(o) {
  26501. function a(e, n) {
  26502. return new RegExp(source(e), "m" + (o.case_insensitive ? "i" : "") + (o.unicodeRegex ? "u" : "") + (n ? "g" : ""));
  26503. }
  26504. var n = /*#__PURE__*/function () {
  26505. function n() {
  26506. (0, _classCallCheck2.default)(this, n);
  26507. this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
  26508. }
  26509. (0, _createClass2.default)(n, [{
  26510. key: "addRule",
  26511. value: function addRule(e, _n) {
  26512. _n.position = this.position++, this.matchIndexes[this.matchAt] = _n, this.regexes.push([_n, e]), this.matchAt += countMatchGroups(e) + 1;
  26513. }
  26514. }, {
  26515. key: "compile",
  26516. value: function compile() {
  26517. 0 === this.regexes.length && (this.exec = function () {
  26518. return null;
  26519. });
  26520. var e = this.regexes.map(function (e) {
  26521. return e[1];
  26522. });
  26523. this.matcherRe = a(_rewriteBackreferences(e, {
  26524. joinWith: "|"
  26525. }), !0), this.lastIndex = 0;
  26526. }
  26527. }, {
  26528. key: "exec",
  26529. value: function exec(e) {
  26530. this.matcherRe.lastIndex = this.lastIndex;
  26531. var _n2,
  26532. t,
  26533. e = this.matcherRe.exec(e);
  26534. return e ? (_n2 = e.findIndex(function (e, _n3) {
  26535. return 0 < _n3 && void 0 !== e;
  26536. }), t = this.matchIndexes[_n2], e.splice(0, _n2), Object.assign(e, t)) : null;
  26537. }
  26538. }]);
  26539. return n;
  26540. }();
  26541. var s = /*#__PURE__*/function () {
  26542. function s() {
  26543. (0, _classCallCheck2.default)(this, s);
  26544. this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
  26545. }
  26546. (0, _createClass2.default)(s, [{
  26547. key: "getMatcher",
  26548. value: function getMatcher(e) {
  26549. if (this.multiRegexes[e]) return this.multiRegexes[e];
  26550. var t = new n();
  26551. return this.rules.slice(e).forEach(function (_ref4) {
  26552. var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
  26553. e = _ref5[0],
  26554. n = _ref5[1];
  26555. return t.addRule(e, n);
  26556. }), t.compile(), this.multiRegexes[e] = t;
  26557. }
  26558. }, {
  26559. key: "resumingScanAtSamePosition",
  26560. value: function resumingScanAtSamePosition() {
  26561. return 0 !== this.regexIndex;
  26562. }
  26563. }, {
  26564. key: "considerAll",
  26565. value: function considerAll() {
  26566. this.regexIndex = 0;
  26567. }
  26568. }, {
  26569. key: "addRule",
  26570. value: function addRule(e, n) {
  26571. this.rules.push([e, n]), "begin" === n.type && this.count++;
  26572. }
  26573. }, {
  26574. key: "exec",
  26575. value: function exec(e) {
  26576. var n = this.getMatcher(this.regexIndex);
  26577. n.lastIndex = this.lastIndex;
  26578. var t = n.exec(e);
  26579. return !this.resumingScanAtSamePosition() || t && t.index === this.lastIndex || ((n = this.getMatcher(0)).lastIndex = this.lastIndex + 1, t = n.exec(e)), t && (this.regexIndex += t.position + 1, this.regexIndex === this.count) && this.considerAll(), t;
  26580. }
  26581. }]);
  26582. return s;
  26583. }();
  26584. if (o.compilerExtensions || (o.compilerExtensions = []), o.contains && o.contains.includes("self")) throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
  26585. return o.classNameAliases = inherit$1(o.classNameAliases || {}), function n(t, i) {
  26586. var r = t;
  26587. if (!t.isCompiled) {
  26588. var _ref6;
  26589. [scopeClassName, compileMatch, MultiClass, beforeMatchExt].forEach(function (e) {
  26590. return e(t, i);
  26591. }), o.compilerExtensions.forEach(function (e) {
  26592. return e(t, i);
  26593. }), t.__beforeBegin = null, [beginKeywords, compileIllegal, compileRelevance].forEach(function (e) {
  26594. return e(t, i);
  26595. }), t.isCompiled = !0;
  26596. var e = null;
  26597. "object" == (0, _typeof2.default)(t.keywords) && t.keywords.$pattern && (t.keywords = Object.assign({}, t.keywords), e = t.keywords.$pattern, delete t.keywords.$pattern), e = e || /\w+/, t.keywords && (t.keywords = compileKeywords(t.keywords, o.case_insensitive)), r.keywordPatternRe = a(e, !0), i && (t.begin || (t.begin = /\B|\b/), r.beginRe = a(r.begin), t.end || t.endsWithParent || (t.end = /\B|\b/), t.end && (r.endRe = a(r.end)), r.terminatorEnd = source(r.end) || "", t.endsWithParent) && i.terminatorEnd && (r.terminatorEnd += (t.end ? "|" : "") + i.terminatorEnd), t.illegal && (r.illegalRe = a(t.illegal)), t.contains || (t.contains = []), t.contains = (_ref6 = []).concat.apply(_ref6, (0, _toConsumableArray2.default)(t.contains.map(function (e) {
  26598. return expandOrCloneMode("self" === e ? t : e);
  26599. }))), t.contains.forEach(function (e) {
  26600. n(e, r);
  26601. }), t.starts && n(t.starts, i), r.matcher = function (e) {
  26602. var n = new s();
  26603. return e.contains.forEach(function (e) {
  26604. return n.addRule(e.begin, {
  26605. rule: e,
  26606. type: "begin"
  26607. });
  26608. }), e.terminatorEnd && n.addRule(e.terminatorEnd, {
  26609. type: "end"
  26610. }), e.illegal && n.addRule(e.illegal, {
  26611. type: "illegal"
  26612. }), n;
  26613. }(r);
  26614. }
  26615. return r;
  26616. }(o);
  26617. }
  26618. function dependencyOnParent(e) {
  26619. return !!e && (e.endsWithParent || dependencyOnParent(e.starts));
  26620. }
  26621. function expandOrCloneMode(n) {
  26622. return n.variants && !n.cachedVariants && (n.cachedVariants = n.variants.map(function (e) {
  26623. return inherit$1(n, {
  26624. variants: null
  26625. }, e);
  26626. })), n.cachedVariants || (dependencyOnParent(n) ? inherit$1(n, {
  26627. starts: n.starts ? inherit$1(n.starts) : null
  26628. }) : Object.isFrozen(n) ? inherit$1(n) : n);
  26629. }
  26630. var version = "11.9.0";
  26631. var HTMLInjectionError = /*#__PURE__*/function (_Error) {
  26632. (0, _inherits2.default)(HTMLInjectionError, _Error);
  26633. var _super2 = _createSuper(HTMLInjectionError);
  26634. function HTMLInjectionError(e, n) {
  26635. var _this3;
  26636. (0, _classCallCheck2.default)(this, HTMLInjectionError);
  26637. _this3 = _super2.call(this, e), _this3.name = "HTMLInjectionError", _this3.html = n;
  26638. return _this3;
  26639. }
  26640. return (0, _createClass2.default)(HTMLInjectionError);
  26641. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  26642. var escape = escapeHTML,
  26643. inherit = inherit$1,
  26644. NO_MATCH = Symbol("nomatch"),
  26645. MAX_KEYWORD_HITS = 7,
  26646. HLJS = function HLJS(i) {
  26647. var y = Object.create(null),
  26648. a = Object.create(null),
  26649. r = [],
  26650. A = !0,
  26651. v = "Could not find the language '{}', did you forget to load/include a language module?",
  26652. o = {
  26653. disableAutodetect: !0,
  26654. name: "Plain text",
  26655. contains: []
  26656. },
  26657. C = {
  26658. ignoreUnescapedHTML: !1,
  26659. throwUnescapedHTML: !1,
  26660. noHighlightRe: /^(no-?highlight)$/i,
  26661. languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
  26662. classPrefix: "hljs-",
  26663. cssSelector: "pre code",
  26664. languages: null,
  26665. __emitter: TokenTreeEmitter
  26666. };
  26667. function s(e) {
  26668. return C.noHighlightRe.test(e);
  26669. }
  26670. function l(e, n, t) {
  26671. var i = "",
  26672. r = "";
  26673. "object" == (0, _typeof2.default)(n) ? (i = e, t = n.ignoreIllegals, r = n.language) : (deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated."), deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), r = e, i = n), void 0 === t && (t = !0);
  26674. e = {
  26675. code: i,
  26676. language: r
  26677. }, u("before:highlight", e), n = e.result || D(e.language, e.code, t);
  26678. return n.code = e.code, u("after:highlight", n), n;
  26679. }
  26680. function D(i, r, o, e) {
  26681. var a = Object.create(null);
  26682. function s() {
  26683. if (_.keywords) {
  26684. var _e2 = 0,
  26685. _n4 = (_.keywordPatternRe.lastIndex = 0, _.keywordPatternRe.exec(O)),
  26686. _t = "";
  26687. for (; _n4;) {
  26688. var _o, _o2;
  26689. _t += O.substring(_e2, _n4.index);
  26690. var i,
  26691. r = E.case_insensitive ? _n4[0].toLowerCase() : _n4[0],
  26692. o = _.keywords[r];
  26693. !o || ((_o = o, _o2 = (0, _slicedToArray2.default)(_o, 2), o = _o2[0], i = _o2[1]), m.addText(_t), _t = "", a[r] = (a[r] || 0) + 1, a[r] <= MAX_KEYWORD_HITS && (R += i), o.startsWith("_")) ? _t += _n4[0] : (r = E.classNameAliases[o] || o, c(_n4[0], r)), _e2 = _.keywordPatternRe.lastIndex, _n4 = _.keywordPatternRe.exec(O);
  26694. }
  26695. _t += O.substring(_e2), m.addText(_t);
  26696. } else m.addText(O);
  26697. }
  26698. function l() {
  26699. (null != _.subLanguage ? function () {
  26700. if ("" !== O) {
  26701. var _e3 = null;
  26702. if ("string" == typeof _.subLanguage) {
  26703. if (!y[_.subLanguage]) return m.addText(O);
  26704. _e3 = D(_.subLanguage, O, !0, b[_.subLanguage]), b[_.subLanguage] = _e3._top;
  26705. } else _e3 = I(O, _.subLanguage.length ? _.subLanguage : null);
  26706. 0 < _.relevance && (R += _e3.relevance), m.__addSublanguage(_e3._emitter, _e3.language);
  26707. }
  26708. } : s)(), O = "";
  26709. }
  26710. function c(e, n) {
  26711. "" !== e && (m.startScope(n), m.addText(e), m.endScope());
  26712. }
  26713. function g(e, n) {
  26714. var t = 1;
  26715. for (var i, r, o = n.length - 1; t <= o;) {
  26716. e._emit[t] && (i = E.classNameAliases[e[t]] || e[t], r = n[t], i ? c(r, i) : (O = r, s(), O = "")), t++;
  26717. }
  26718. }
  26719. function u(e, n) {
  26720. e.scope && "string" == typeof e.scope && m.openNode(E.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (c(O, E.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), O = "") : e.beginScope._multi && (g(e.beginScope, n), O = "")), _ = Object.create(e, {
  26721. parent: {
  26722. value: _
  26723. }
  26724. });
  26725. }
  26726. function d(e) {
  26727. var n,
  26728. t,
  26729. i = e[0],
  26730. r = e.rule,
  26731. o = new Response(r);
  26732. for (var _i = 0, _arr = [r.__beforeBegin, r["on:begin"]]; _i < _arr.length; _i++) {
  26733. n = _arr[_i];
  26734. if (n && (n(e, o), o.isMatchIgnored)) return t = i, 0 === _.matcher.regexIndex ? (O += t[0], 1) : (w = !0, 0);
  26735. }
  26736. return r.skip ? O += i : (r.excludeBegin && (O += i), l(), r.returnBegin || r.excludeBegin || (O = i)), u(r, e), r.returnBegin ? 0 : i.length;
  26737. }
  26738. function h(e) {
  26739. var n = e[0],
  26740. t = r.substring(e.index),
  26741. i = function e(n, t, i) {
  26742. var r = startsWith(n.endRe, i);
  26743. var o;
  26744. if (r = r && (!n["on:end"] || (o = new Response(n), n["on:end"](t, o), !o.isMatchIgnored)) && r) {
  26745. for (; n.endsParent && n.parent;) {
  26746. n = n.parent;
  26747. }
  26748. return n;
  26749. }
  26750. if (n.endsWithParent) return e(n.parent, t, i);
  26751. }(_, e, t);
  26752. if (!i) return NO_MATCH;
  26753. t = _;
  26754. for (_.endScope && _.endScope._wrap ? (l(), c(n, _.endScope._wrap)) : _.endScope && _.endScope._multi ? (l(), g(_.endScope, e)) : t.skip ? O += n : (t.returnEnd || t.excludeEnd || (O += n), l(), t.excludeEnd && (O = n)); _.scope && m.closeNode(), _.skip || _.subLanguage || (R += _.relevance), (_ = _.parent) !== i.parent;) {
  26755. ;
  26756. }
  26757. return i.starts && u(i.starts, e), t.returnEnd ? 0 : n.length;
  26758. }
  26759. var p = {};
  26760. function n(e, n) {
  26761. var t = n && n[0];
  26762. if (O += e, null == t) return l(), 0;
  26763. if ("begin" === p.type && "end" === n.type && p.index === n.index && "" === t) {
  26764. if (O += r.slice(n.index, n.index + 1), A) return 1;
  26765. throw (e = new Error("0 width match regex (".concat(i, ")"))).languageName = i, e.badRule = p.rule, e;
  26766. }
  26767. if ("begin" === (p = n).type) return d(n);
  26768. if ("illegal" === n.type && !o) throw (e = new Error('Illegal lexeme "' + t + '" for mode "' + (_.scope || "<unnamed>") + '"')).mode = _, e;
  26769. if ("end" === n.type) {
  26770. e = h(n);
  26771. if (e !== NO_MATCH) return e;
  26772. }
  26773. if ("illegal" === n.type && "" === t) return 1;
  26774. if (1e5 < S && S > 3 * n.index) throw new Error("potential infinite loop, way more iterations than matches");
  26775. return O += t, t.length;
  26776. }
  26777. var E = k(i);
  26778. if (!E) throw error(v.replace("{}", i)), new Error('Unknown language: "' + i + '"');
  26779. var t = compileLanguage(E);
  26780. var f = "",
  26781. _ = e || t,
  26782. b = {},
  26783. m = new C.__emitter(C);
  26784. var M = [];
  26785. for (var _e4 = _; _e4 !== E; _e4 = _e4.parent) {
  26786. _e4.scope && M.unshift(_e4.scope);
  26787. }
  26788. M.forEach(function (e) {
  26789. return m.openNode(e);
  26790. });
  26791. var O = "",
  26792. R = 0,
  26793. N = 0,
  26794. S = 0,
  26795. w = !1;
  26796. try {
  26797. if (E.__emitTokens) E.__emitTokens(r, m);else {
  26798. for (_.matcher.considerAll();;) {
  26799. S++, w ? w = !1 : _.matcher.considerAll(), _.matcher.lastIndex = N;
  26800. var T = _.matcher.exec(r);
  26801. if (!T) break;
  26802. var x = n(r.substring(N, T.index), T);
  26803. N = T.index + x;
  26804. }
  26805. n(r.substring(N));
  26806. }
  26807. return m.finalize(), f = m.toHTML(), {
  26808. language: i,
  26809. value: f,
  26810. relevance: R,
  26811. illegal: !1,
  26812. _emitter: m,
  26813. _top: _
  26814. };
  26815. } catch (e) {
  26816. if (e.message && e.message.includes("Illegal")) return {
  26817. language: i,
  26818. value: escape(r),
  26819. illegal: !0,
  26820. relevance: 0,
  26821. _illegalBy: {
  26822. message: e.message,
  26823. index: N,
  26824. context: r.slice(N - 100, N + 100),
  26825. mode: e.mode,
  26826. resultSoFar: f
  26827. },
  26828. _emitter: m
  26829. };
  26830. if (A) return {
  26831. language: i,
  26832. value: escape(r),
  26833. illegal: !1,
  26834. relevance: 0,
  26835. errorRaised: e,
  26836. _emitter: m,
  26837. _top: _
  26838. };
  26839. throw e;
  26840. }
  26841. }
  26842. function I(n, e) {
  26843. e = e || C.languages || Object.keys(y);
  26844. t = n, (i = {
  26845. value: escape(t),
  26846. illegal: !1,
  26847. relevance: 0,
  26848. _top: o,
  26849. _emitter: new C.__emitter(C)
  26850. })._emitter.addText(t);
  26851. var t = i,
  26852. i = e.filter(k).filter(g).map(function (e) {
  26853. return D(e, n, !1);
  26854. }),
  26855. e = (i.unshift(t), i.sort(function (e, n) {
  26856. if (e.relevance !== n.relevance) return n.relevance - e.relevance;
  26857. if (e.language && n.language) {
  26858. if (k(e.language).supersetOf === n.language) return 1;
  26859. if (k(n.language).supersetOf === e.language) return -1;
  26860. }
  26861. return 0;
  26862. })),
  26863. _e5 = e,
  26864. _e6 = (0, _slicedToArray2.default)(_e5, 2),
  26865. t = _e6[0],
  26866. i = _e6[1],
  26867. e = t;
  26868. return e.secondBest = i, e;
  26869. }
  26870. function n(e) {
  26871. t = (n = e).className + " ", t += n.parentNode ? n.parentNode.className : "";
  26872. var n = (o = C.languageDetectRe.exec(t)) ? ((r = k(o[1])) || (warn(v.replace("{}", o[1])), warn("Falling back to no-highlight mode for this block.", n)), r ? o[1] : "no-highlight") : t.split(/\s+/).find(function (e) {
  26873. return s(e) || k(e);
  26874. });
  26875. if (!s(n)) if (u("before:highlightElement", {
  26876. el: e,
  26877. language: n
  26878. }), e.dataset.highlighted) console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);else {
  26879. if (0 < e.children.length) if (C.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), C.throwUnescapedHTML) throw new HTMLInjectionError("One of your code blocks includes unescaped HTML.", e.innerHTML);
  26880. var t,
  26881. i,
  26882. r = e.textContent,
  26883. o = n ? l(r, {
  26884. language: n,
  26885. ignoreIllegals: !0
  26886. }) : I(r);
  26887. e.innerHTML = o.value, e.dataset.highlighted = "yes", t = e, i = o.language, n = (n = n) && a[n] || i, t.classList.add("hljs"), t.classList.add("language-" + n), e.result = {
  26888. language: o.language,
  26889. re: o.relevance,
  26890. relevance: o.relevance
  26891. }, o.secondBest && (e.secondBest = {
  26892. language: o.secondBest.language,
  26893. relevance: o.secondBest.relevance
  26894. }), u("after:highlightElement", {
  26895. el: e,
  26896. result: o,
  26897. text: r
  26898. });
  26899. }
  26900. }
  26901. var e = !1;
  26902. function t() {
  26903. "loading" === document.readyState ? e = !0 : document.querySelectorAll(C.cssSelector).forEach(n);
  26904. }
  26905. function k(e) {
  26906. return e = (e || "").toLowerCase(), y[e] || y[a[e]];
  26907. }
  26908. function c(e, _ref7) {
  26909. var n = _ref7.languageName;
  26910. (e = "string" == typeof e ? [e] : e).forEach(function (e) {
  26911. a[e.toLowerCase()] = n;
  26912. });
  26913. }
  26914. function g(e) {
  26915. e = k(e);
  26916. return e && !e.disableAutodetect;
  26917. }
  26918. function u(e, n) {
  26919. var t = e;
  26920. r.forEach(function (e) {
  26921. e[t] && e[t](n);
  26922. });
  26923. }
  26924. for (var d in "undefined" != typeof window && window.addEventListener && window.addEventListener("DOMContentLoaded", function () {
  26925. e && t();
  26926. }, !1), Object.assign(i, {
  26927. highlight: l,
  26928. highlightAuto: I,
  26929. highlightAll: t,
  26930. highlightElement: n,
  26931. highlightBlock: function highlightBlock(e) {
  26932. return deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0"), deprecated("10.7.0", "Please use highlightElement now."), n(e);
  26933. },
  26934. configure: function configure(e) {
  26935. C = inherit(C, e);
  26936. },
  26937. initHighlighting: function initHighlighting() {
  26938. t(), deprecated("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
  26939. },
  26940. initHighlightingOnLoad: function initHighlightingOnLoad() {
  26941. t(), deprecated("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
  26942. },
  26943. registerLanguage: function registerLanguage(n, e) {
  26944. var t = null;
  26945. try {
  26946. t = e(i);
  26947. } catch (e) {
  26948. if (error("Language definition for '{}' could not be registered.".replace("{}", n)), !A) throw e;
  26949. error(e), t = o;
  26950. }
  26951. t.name || (t.name = n), (y[n] = t).rawDefinition = e.bind(null, i), t.aliases && c(t.aliases, {
  26952. languageName: n
  26953. });
  26954. },
  26955. unregisterLanguage: function unregisterLanguage(e) {
  26956. delete y[e];
  26957. for (var _i2 = 0, _Object$keys = Object.keys(a); _i2 < _Object$keys.length; _i2++) {
  26958. var n = _Object$keys[_i2];
  26959. a[n] === e && delete a[n];
  26960. }
  26961. },
  26962. listLanguages: function listLanguages() {
  26963. return Object.keys(y);
  26964. },
  26965. getLanguage: k,
  26966. registerAliases: c,
  26967. autoDetection: g,
  26968. inherit: inherit,
  26969. addPlugin: function addPlugin(e) {
  26970. var n;
  26971. (n = e)["before:highlightBlock"] && !n["before:highlightElement"] && (n["before:highlightElement"] = function (e) {
  26972. n["before:highlightBlock"](Object.assign({
  26973. block: e.el
  26974. }, e));
  26975. }), n["after:highlightBlock"] && !n["after:highlightElement"] && (n["after:highlightElement"] = function (e) {
  26976. n["after:highlightBlock"](Object.assign({
  26977. block: e.el
  26978. }, e));
  26979. }), r.push(e);
  26980. },
  26981. removePlugin: function removePlugin(e) {
  26982. -1 !== (e = r.indexOf(e)) && r.splice(e, 1);
  26983. }
  26984. }), i.debugMode = function () {
  26985. A = !1;
  26986. }, i.safeMode = function () {
  26987. A = !0;
  26988. }, i.versionString = version, i.regex = {
  26989. concat: concat,
  26990. lookahead: lookahead,
  26991. either: either,
  26992. optional: optional,
  26993. anyNumberOfTimes: anyNumberOfTimes
  26994. }, MODES) {
  26995. "object" == (0, _typeof2.default)(MODES[d]) && deepFreeze(MODES[d]);
  26996. }
  26997. return Object.assign(i, MODES), i;
  26998. },
  26999. highlight = HLJS({});
  27000. highlight.newInstance = function () {
  27001. return HLJS({});
  27002. }, (highlight.HighlightJS = highlight).default = highlight;
  27003. function _default() {
  27004. return highlight;
  27005. }
  27006. /***/ }),
  27007. /***/ 503:
  27008. /*!***************************************************************************************!*\
  27009. !*** E:/盈通/sulibao-mini/components/agent-ui/wd-markdown/utils/hljs_javascript.min.js ***!
  27010. \***************************************************************************************/
  27011. /*! no static exports found */
  27012. /***/ (function(module, exports, __webpack_require__) {
  27013. "use strict";
  27014. Object.defineProperty(exports, "__esModule", {
  27015. value: true
  27016. });
  27017. exports.default = void 0;
  27018. var _default = function _default() {
  27019. {
  27020. var I = "[A-Za-z$_][0-9A-Za-z$_]*",
  27021. x = ["as", "in", "of", "if", "for", "while", "finally", "var", "new", "function", "do", "return", "void", "else", "break", "catch", "instanceof", "with", "throw", "case", "default", "try", "switch", "continue", "typeof", "delete", "let", "yield", "const", "class", "debugger", "async", "await", "static", "import", "from", "export", "extends"],
  27022. O = ["true", "false", "null", "undefined", "NaN", "Infinity"],
  27023. C = ["Object", "Function", "Boolean", "Symbol", "Math", "Date", "Number", "BigInt", "String", "RegExp", "Array", "Float32Array", "Float64Array", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Int32Array", "Uint16Array", "Uint32Array", "BigInt64Array", "BigUint64Array", "Set", "Map", "WeakSet", "WeakMap", "ArrayBuffer", "SharedArrayBuffer", "Atomics", "DataView", "JSON", "Promise", "Generator", "GeneratorFunction", "AsyncFunction", "Reflect", "Proxy", "Intl", "WebAssembly"],
  27024. M = ["Error", "EvalError", "InternalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError"],
  27025. T = ["setInterval", "setTimeout", "clearInterval", "clearTimeout", "require", "exports", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "unescape"],
  27026. B = ["arguments", "this", "super", "console", "window", "document", "localStorage", "sessionStorage", "module", "global"],
  27027. $ = [].concat(T, C, M);
  27028. return function (e) {
  27029. var n = e.regex,
  27030. a = I,
  27031. t = /<[A-Za-z0-9\\._:-]+/,
  27032. s = /\/[A-Za-z0-9\\._:-]+>|\/>/,
  27033. r = function r(e, n) {
  27034. var _ref;
  27035. var a,
  27036. t,
  27037. s = e[0].length + e.index,
  27038. r = e.input[s];
  27039. ("<" === r || "," === r || (">" === r && ((_ref = [e, {
  27040. after: s
  27041. }.after], r = _ref[0], a = _ref[1]), t = "</" + r[0].slice(1), -1 === r.input.indexOf(t, a)) && n.ignoreMatch(), (r = e.input.substring(s)).match(/^\s*=/)) || (t = r.match(/^\s+extends\s+/)) && 0 === t.index) && n.ignoreMatch();
  27042. },
  27043. c = {
  27044. $pattern: I,
  27045. keyword: x,
  27046. literal: O,
  27047. built_in: $,
  27048. "variable.language": B
  27049. },
  27050. i = "[0-9](_?[0-9])*",
  27051. o = "\\.(".concat(i, ")"),
  27052. l = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",
  27053. b = {
  27054. className: "number",
  27055. variants: [{
  27056. begin: "(\\b(".concat(l, ")((").concat(o, ")|\\.)?|(").concat(o, "))[eE][+-]?(").concat(i, ")\\b")
  27057. }, {
  27058. begin: "\\b(".concat(l, ")\\b((").concat(o, ")\\b|\\.)?|(").concat(o, ")\\b")
  27059. }, {
  27060. begin: "\\b(0|[1-9](_?[0-9])*)n\\b"
  27061. }, {
  27062. begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"
  27063. }, {
  27064. begin: "\\b0[bB][0-1](_?[0-1])*n?\\b"
  27065. }, {
  27066. begin: "\\b0[oO][0-7](_?[0-7])*n?\\b"
  27067. }, {
  27068. begin: "\\b0[0-7]+n?\\b"
  27069. }],
  27070. relevance: 0
  27071. },
  27072. d = {
  27073. className: "subst",
  27074. begin: "\\$\\{",
  27075. end: "\\}",
  27076. keywords: c,
  27077. contains: []
  27078. },
  27079. g = {
  27080. begin: "html`",
  27081. end: "",
  27082. starts: {
  27083. end: "`",
  27084. returnEnd: !1,
  27085. contains: [e.BACKSLASH_ESCAPE, d],
  27086. subLanguage: "xml"
  27087. }
  27088. },
  27089. u = {
  27090. begin: "css`",
  27091. end: "",
  27092. starts: {
  27093. end: "`",
  27094. returnEnd: !1,
  27095. contains: [e.BACKSLASH_ESCAPE, d],
  27096. subLanguage: "css"
  27097. }
  27098. },
  27099. m = {
  27100. begin: "gql`",
  27101. end: "",
  27102. starts: {
  27103. end: "`",
  27104. returnEnd: !1,
  27105. contains: [e.BACKSLASH_ESCAPE, d],
  27106. subLanguage: "graphql"
  27107. }
  27108. },
  27109. E = {
  27110. className: "string",
  27111. begin: "`",
  27112. end: "`",
  27113. contains: [e.BACKSLASH_ESCAPE, d]
  27114. },
  27115. A = {
  27116. className: "comment",
  27117. variants: [e.COMMENT(/\/\*\*(?!\/)/, "\\*/", {
  27118. relevance: 0,
  27119. contains: [{
  27120. begin: "(?=@[A-Za-z]+)",
  27121. relevance: 0,
  27122. contains: [{
  27123. className: "doctag",
  27124. begin: "@[A-Za-z]+"
  27125. }, {
  27126. className: "type",
  27127. begin: "\\{",
  27128. end: "\\}",
  27129. excludeEnd: !0,
  27130. excludeBegin: !0,
  27131. relevance: 0
  27132. }, {
  27133. className: "variable",
  27134. begin: a + "(?=\\s*(-)|$)",
  27135. endsParent: !0,
  27136. relevance: 0
  27137. }, {
  27138. begin: /(?=[^\n])\s/,
  27139. relevance: 0
  27140. }]
  27141. }]
  27142. }), e.C_BLOCK_COMMENT_MODE, e.C_LINE_COMMENT_MODE]
  27143. },
  27144. y = [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, g, u, m, E, {
  27145. match: /\$\d+/
  27146. }, b];
  27147. d.contains = y.concat({
  27148. begin: /\{/,
  27149. end: /\}/,
  27150. keywords: c,
  27151. contains: ["self"].concat(y)
  27152. });
  27153. var N = [].concat(A, d.contains),
  27154. N = N.concat([{
  27155. begin: /\(/,
  27156. end: /\)/,
  27157. keywords: c,
  27158. contains: ["self"].concat(N)
  27159. }]),
  27160. _ = {
  27161. className: "params",
  27162. begin: /\(/,
  27163. end: /\)/,
  27164. excludeBegin: !0,
  27165. excludeEnd: !0,
  27166. keywords: c,
  27167. contains: N
  27168. },
  27169. h = {
  27170. variants: [{
  27171. match: [/class/, /\s+/, a, /\s+/, /extends/, /\s+/, n.concat(a, "(", n.concat(/\./, a), ")*")],
  27172. scope: {
  27173. 1: "keyword",
  27174. 3: "title.class",
  27175. 5: "keyword",
  27176. 7: "title.class.inherited"
  27177. }
  27178. }, {
  27179. match: [/class/, /\s+/, a],
  27180. scope: {
  27181. 1: "keyword",
  27182. 3: "title.class"
  27183. }
  27184. }]
  27185. },
  27186. f = {
  27187. relevance: 0,
  27188. match: n.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
  27189. className: "title.class",
  27190. keywords: {
  27191. _: [].concat(C, M)
  27192. }
  27193. },
  27194. S = {
  27195. variants: [{
  27196. match: [/function/, /\s+/, a, /(?=\s*\()/]
  27197. }, {
  27198. match: [/function/, /\s*(?=\()/]
  27199. }],
  27200. className: {
  27201. 1: "keyword",
  27202. 3: "title.function"
  27203. },
  27204. label: "func.def",
  27205. contains: [_],
  27206. illegal: /%/
  27207. },
  27208. v = {
  27209. match: n.concat(/\b/, (v = [].concat(T, ["super", "import"]), n.concat("(?!", v.join("|"), ")")), a, n.lookahead(/\(/)),
  27210. className: "title.function",
  27211. relevance: 0
  27212. },
  27213. p = {
  27214. begin: n.concat(/\./, n.lookahead(n.concat(a, /(?![0-9A-Za-z$_(])/))),
  27215. end: a,
  27216. excludeBegin: !0,
  27217. keywords: "prototype",
  27218. className: "property",
  27219. relevance: 0
  27220. },
  27221. w = {
  27222. match: [/get|set/, /\s+/, a, /(?=\()/],
  27223. className: {
  27224. 1: "keyword",
  27225. 3: "title.function"
  27226. },
  27227. contains: [{
  27228. begin: /\(\)/
  27229. }, _]
  27230. },
  27231. R = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>",
  27232. k = {
  27233. match: [/const|var|let/, /\s+/, a, /\s*/, /=\s*/, /(async\s*)?/, n.lookahead(R)],
  27234. keywords: "async",
  27235. className: {
  27236. 1: "keyword",
  27237. 3: "title.function"
  27238. },
  27239. contains: [_]
  27240. };
  27241. return {
  27242. name: "JavaScript",
  27243. aliases: ["js", "jsx", "mjs", "cjs"],
  27244. keywords: c,
  27245. exports: {
  27246. PARAMS_CONTAINS: N,
  27247. CLASS_REFERENCE: f
  27248. },
  27249. illegal: /#(?![$_A-z])/,
  27250. contains: [e.SHEBANG({
  27251. label: "shebang",
  27252. binary: "node",
  27253. relevance: 5
  27254. }), {
  27255. label: "use_strict",
  27256. className: "meta",
  27257. relevance: 10,
  27258. begin: /^\s*['"]use (strict|asm)['"]/
  27259. }, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, g, u, m, E, A, {
  27260. match: /\$\d+/
  27261. }, b, f, {
  27262. className: "attr",
  27263. begin: a + n.lookahead(":"),
  27264. relevance: 0
  27265. }, k, {
  27266. begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
  27267. keywords: "return throw case",
  27268. relevance: 0,
  27269. contains: [A, e.REGEXP_MODE, {
  27270. className: "function",
  27271. begin: R,
  27272. returnBegin: !0,
  27273. end: "\\s*=>",
  27274. contains: [{
  27275. className: "params",
  27276. variants: [{
  27277. begin: e.UNDERSCORE_IDENT_RE,
  27278. relevance: 0
  27279. }, {
  27280. className: null,
  27281. begin: /\(\s*\)/,
  27282. skip: !0
  27283. }, {
  27284. begin: /\(/,
  27285. end: /\)/,
  27286. excludeBegin: !0,
  27287. excludeEnd: !0,
  27288. keywords: c,
  27289. contains: N
  27290. }]
  27291. }]
  27292. }, {
  27293. begin: /,/,
  27294. relevance: 0
  27295. }, {
  27296. match: /\s+/,
  27297. relevance: 0
  27298. }, {
  27299. variants: [{
  27300. begin: "<>",
  27301. end: "</>"
  27302. }, {
  27303. match: /<[A-Za-z0-9\\._:-]+\s*\/>/
  27304. }, {
  27305. begin: t,
  27306. "on:begin": r,
  27307. end: s
  27308. }],
  27309. subLanguage: "xml",
  27310. contains: [{
  27311. begin: t,
  27312. end: s,
  27313. skip: !0,
  27314. contains: ["self"]
  27315. }]
  27316. }]
  27317. }, S, {
  27318. beginKeywords: "while if switch catch for"
  27319. }, {
  27320. begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
  27321. returnBegin: !0,
  27322. label: "func.def",
  27323. contains: [_, e.inherit(e.TITLE_MODE, {
  27324. begin: a,
  27325. className: "title.function"
  27326. })]
  27327. }, {
  27328. match: /\.\.\./,
  27329. relevance: 0
  27330. }, p, {
  27331. match: "\\$" + a,
  27332. relevance: 0
  27333. }, {
  27334. match: [/\bconstructor(?=\s*\()/],
  27335. className: {
  27336. 1: "title.function"
  27337. },
  27338. contains: [_]
  27339. }, v, {
  27340. relevance: 0,
  27341. match: /\b[A-Z][A-Z_0-9]+\b/,
  27342. className: "variable.constant"
  27343. }, h, w, {
  27344. match: /\$[(.]/
  27345. }]
  27346. };
  27347. };
  27348. }
  27349. };
  27350. exports.default = _default;
  27351. /***/ }),
  27352. /***/ 504:
  27353. /*!********************************************************************************!*\
  27354. !*** E:/盈通/sulibao-mini/components/agent-ui/wd-markdown/utils/hljs_css.min.js ***!
  27355. \********************************************************************************/
  27356. /*! no static exports found */
  27357. /***/ (function(module, exports, __webpack_require__) {
  27358. "use strict";
  27359. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  27360. Object.defineProperty(exports, "__esModule", {
  27361. value: true
  27362. });
  27363. exports.default = void 0;
  27364. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  27365. var _default = function _default() {
  27366. {
  27367. var t = ["a", "abbr", "address", "article", "aside", "audio", "b", "blockquote", "body", "button", "canvas", "caption", "cite", "code", "dd", "del", "details", "dfn", "div", "dl", "dt", "em", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "mark", "menu", "nav", "object", "ol", "p", "q", "quote", "samp", "section", "span", "strong", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "ul", "var", "video"],
  27368. o = ["any-hover", "any-pointer", "aspect-ratio", "color", "color-gamut", "color-index", "device-aspect-ratio", "device-height", "device-width", "display-mode", "forced-colors", "grid", "height", "hover", "inverted-colors", "monochrome", "orientation", "overflow-block", "overflow-inline", "pointer", "prefers-color-scheme", "prefers-contrast", "prefers-reduced-motion", "prefers-reduced-transparency", "resolution", "scan", "scripting", "update", "width", "min-width", "max-width", "min-height", "max-height"],
  27369. n = ["active", "any-link", "blank", "checked", "current", "default", "defined", "dir", "disabled", "drop", "empty", "enabled", "first", "first-child", "first-of-type", "fullscreen", "future", "focus", "focus-visible", "focus-within", "has", "host", "host-context", "hover", "indeterminate", "in-range", "invalid", "is", "lang", "last-child", "last-of-type", "left", "link", "local-link", "not", "nth-child", "nth-col", "nth-last-child", "nth-last-col", "nth-last-of-type", "nth-of-type", "only-child", "only-of-type", "optional", "out-of-range", "past", "placeholder-shown", "read-only", "read-write", "required", "right", "root", "scope", "target", "target-within", "user-invalid", "valid", "visited", "where"],
  27370. a = ["after", "backdrop", "before", "cue", "cue-region", "first-letter", "first-line", "grammar-error", "marker", "part", "placeholder", "selection", "slotted", "spelling-error"],
  27371. l = ["align-content", "align-items", "align-self", "all", "animation", "animation-delay", "animation-direction", "animation-duration", "animation-fill-mode", "animation-iteration-count", "animation-name", "animation-play-state", "animation-timing-function", "backface-visibility", "background", "background-attachment", "background-blend-mode", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-repeat", "background-size", "block-size", "border", "border-block", "border-block-color", "border-block-end", "border-block-end-color", "border-block-end-style", "border-block-end-width", "border-block-start", "border-block-start-color", "border-block-start-style", "border-block-start-width", "border-block-style", "border-block-width", "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-image", "border-image-outset", "border-image-repeat", "border-image-slice", "border-image-source", "border-image-width", "border-inline", "border-inline-color", "border-inline-end", "border-inline-end-color", "border-inline-end-style", "border-inline-end-width", "border-inline-start", "border-inline-start-color", "border-inline-start-style", "border-inline-start-width", "border-inline-style", "border-inline-width", "border-left", "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right", "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style", "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width", "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", "caption-side", "caret-color", "clear", "clip", "clip-path", "clip-rule", "color", "column-count", "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", "column-span", "column-width", "columns", "contain", "content", "content-visibility", "counter-increment", "counter-reset", "cue", "cue-after", "cue-before", "cursor", "direction", "display", "empty-cells", "filter", "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", "flow", "font", "font-display", "font-family", "font-feature-settings", "font-kerning", "font-language-override", "font-size", "font-size-adjust", "font-smoothing", "font-stretch", "font-style", "font-synthesis", "font-variant", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position", "font-variation-settings", "font-weight", "gap", "glyph-orientation-vertical", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows", "grid-column", "grid-column-end", "grid-column-start", "grid-gap", "grid-row", "grid-row-end", "grid-row-start", "grid-template", "grid-template-areas", "grid-template-columns", "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon", "image-orientation", "image-rendering", "image-resolution", "ime-mode", "inline-size", "isolation", "justify-content", "left", "letter-spacing", "line-break", "line-height", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-block", "margin-block-end", "margin-block-start", "margin-bottom", "margin-inline", "margin-inline-end", "margin-inline-start", "margin-left", "margin-right", "margin-top", "marks", "mask", "mask-border", "mask-border-mode", "mask-border-outset", "mask-border-repeat", "mask-border-slice", "mask-border-source", "mask-border-width", "mask-clip", "mask-composite", "mask-image", "mask-mode", "mask-origin", "mask-position", "mask-repeat", "mask-size", "mask-type", "max-block-size", "max-height", "max-inline-size", "max-width", "min-block-size", "min-height", "min-inline-size", "min-width", "mix-blend-mode", "nav-down", "nav-index", "nav-left", "nav-right", "nav-up", "none", "normal", "object-fit", "object-position", "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "overflow", "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-block", "padding-block-end", "padding-block-start", "padding-bottom", "padding-inline", "padding-inline-end", "padding-inline-start", "padding-left", "padding-right", "padding-top", "page-break-after", "page-break-before", "page-break-inside", "pause", "pause-after", "pause-before", "perspective", "perspective-origin", "pointer-events", "position", "quotes", "resize", "rest", "rest-after", "rest-before", "right", "row-gap", "scroll-margin", "scroll-margin-block", "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom", "scroll-margin-inline", "scroll-margin-inline-end", "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right", "scroll-margin-top", "scroll-padding", "scroll-padding-block", "scroll-padding-block-end", "scroll-padding-block-start", "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end", "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right", "scroll-padding-top", "scroll-snap-align", "scroll-snap-stop", "scroll-snap-type", "scrollbar-color", "scrollbar-gutter", "scrollbar-width", "shape-image-threshold", "shape-margin", "shape-outside", "speak", "speak-as", "src", "tab-size", "table-layout", "text-align", "text-align-all", "text-align-last", "text-combine-upright", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-style", "text-emphasis", "text-emphasis-color", "text-emphasis-position", "text-emphasis-style", "text-indent", "text-justify", "text-orientation", "text-overflow", "text-rendering", "text-shadow", "text-transform", "text-underline-position", "top", "transform", "transform-box", "transform-origin", "transform-style", "transition", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", "unicode-bidi", "vertical-align", "visibility", "voice-balance", "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress", "voice-volume", "white-space", "widows", "width", "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index"].reverse();
  27372. return function (e) {
  27373. var i = e.regex,
  27374. r = {
  27375. IMPORTANT: {
  27376. scope: "meta",
  27377. begin: "!important"
  27378. },
  27379. BLOCK_COMMENT: e.C_BLOCK_COMMENT_MODE,
  27380. HEXCOLOR: {
  27381. scope: "number",
  27382. begin: /#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/
  27383. },
  27384. FUNCTION_DISPATCH: {
  27385. className: "built_in",
  27386. begin: /[\w-]+(?=\()/
  27387. },
  27388. ATTRIBUTE_SELECTOR_MODE: {
  27389. scope: "selector-attr",
  27390. begin: /\[/,
  27391. end: /\]/,
  27392. illegal: "$",
  27393. contains: [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE]
  27394. },
  27395. CSS_NUMBER_MODE: {
  27396. scope: "number",
  27397. begin: e.NUMBER_RE + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",
  27398. relevance: 0
  27399. },
  27400. CSS_VARIABLE: {
  27401. className: "attr",
  27402. begin: /--[A-Za-z_][A-Za-z0-9_-]*/
  27403. }
  27404. },
  27405. e = [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE];
  27406. return {
  27407. name: "CSS",
  27408. case_insensitive: !0,
  27409. illegal: /[=|'\$]/,
  27410. keywords: {
  27411. keyframePosition: "from to"
  27412. },
  27413. classNameAliases: {
  27414. keyframePosition: "selector-tag"
  27415. },
  27416. contains: [r.BLOCK_COMMENT, {
  27417. begin: /-(webkit|moz|ms|o)-(?=[a-z])/
  27418. }, r.CSS_NUMBER_MODE, {
  27419. className: "selector-id",
  27420. begin: /#[A-Za-z0-9_-]+/,
  27421. relevance: 0
  27422. }, {
  27423. className: "selector-class",
  27424. begin: "\\.[a-zA-Z-][a-zA-Z0-9_-]*",
  27425. relevance: 0
  27426. }, r.ATTRIBUTE_SELECTOR_MODE, {
  27427. className: "selector-pseudo",
  27428. variants: [{
  27429. begin: ":(" + n.join("|") + ")"
  27430. }, {
  27431. begin: ":(:)?(" + a.join("|") + ")"
  27432. }]
  27433. }, r.CSS_VARIABLE, {
  27434. className: "attribute",
  27435. begin: "\\b(" + l.join("|") + ")\\b"
  27436. }, {
  27437. begin: /:/,
  27438. end: /[;}{]/,
  27439. contains: [r.BLOCK_COMMENT, r.HEXCOLOR, r.IMPORTANT, r.CSS_NUMBER_MODE].concat((0, _toConsumableArray2.default)(e), [{
  27440. begin: /(url|data-uri)\(/,
  27441. end: /\)/,
  27442. relevance: 0,
  27443. keywords: {
  27444. built_in: "url data-uri"
  27445. },
  27446. contains: [].concat((0, _toConsumableArray2.default)(e), [{
  27447. className: "string",
  27448. begin: /[^)]/,
  27449. endsWithParent: !0,
  27450. excludeEnd: !0
  27451. }])
  27452. }, r.FUNCTION_DISPATCH])
  27453. }, {
  27454. begin: i.lookahead(/@/),
  27455. end: "[{;]",
  27456. relevance: 0,
  27457. illegal: /:/,
  27458. contains: [{
  27459. className: "keyword",
  27460. begin: /@-?\w[\w]*(-\w+)*/
  27461. }, {
  27462. begin: /\s/,
  27463. endsWithParent: !0,
  27464. excludeEnd: !0,
  27465. relevance: 0,
  27466. keywords: {
  27467. $pattern: /[a-z-]+/,
  27468. keyword: "and or not only",
  27469. attribute: o.join(" ")
  27470. },
  27471. contains: [{
  27472. begin: /[a-z-]+(?=:)/,
  27473. className: "attribute"
  27474. }].concat((0, _toConsumableArray2.default)(e), [r.CSS_NUMBER_MODE])
  27475. }]
  27476. }, {
  27477. className: "selector-tag",
  27478. begin: "\\b(" + t.join("|") + ")\\b"
  27479. }]
  27480. };
  27481. };
  27482. }
  27483. };
  27484. exports.default = _default;
  27485. /***/ }),
  27486. /***/ 505:
  27487. /*!**************************************************************************!*\
  27488. !*** E:/盈通/sulibao-mini/components/agent-ui/wd-markdown/utils/plugin.js ***!
  27489. \**************************************************************************/
  27490. /*! no static exports found */
  27491. /***/ (function(module, exports, __webpack_require__) {
  27492. "use strict";
  27493. Object.defineProperty(exports, "__esModule", {
  27494. value: true
  27495. });
  27496. exports.addCustomClassPlugin = addCustomClassPlugin;
  27497. var options = {
  27498. paragraph_open: '_p',
  27499. bullet_list_open: '_ul',
  27500. ordered_list_open: '_ol',
  27501. hr: '_hr',
  27502. link_open: '_a',
  27503. blockquote_open: '_blockquote',
  27504. table_open: '_table',
  27505. thead_open: '_thead',
  27506. tr_open: '_tr',
  27507. th_open: '_th',
  27508. td_open: '_td'
  27509. };
  27510. function addCustomClassPlugin(md) {
  27511. md.renderer.rules.heading_open = function (tokens, idx, options, env, self) {
  27512. var token = tokens[idx];
  27513. // console.log(token)
  27514. // 判断当前标签是否为 h1
  27515. if (['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(token.tag)) {
  27516. // 给 h1 标签添加 class 属性
  27517. token.attrJoin('class', "_".concat(token.tag));
  27518. }
  27519. return self.renderToken(tokens, idx, options);
  27520. };
  27521. Object.keys(options).forEach(function (key) {
  27522. var className = options[key];
  27523. md.renderer.rules[key] = function (tokens, idx, options, env, self) {
  27524. tokens[idx].attrPush(['class', className]);
  27525. return self.renderToken(tokens, idx, options);
  27526. };
  27527. });
  27528. }
  27529. /***/ }),
  27530. /***/ 51:
  27531. /*!***********************************************************!*\
  27532. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/function/color.js ***!
  27533. \***********************************************************/
  27534. /*! no static exports found */
  27535. /***/ (function(module, exports, __webpack_require__) {
  27536. "use strict";
  27537. Object.defineProperty(exports, "__esModule", {
  27538. value: true
  27539. });
  27540. exports.default = void 0;
  27541. var color = ['red', 'purplered', 'purple', 'bluepurple', 'aquablue', 'blue', 'indigo', 'cyan', 'teal', 'green', 'yellowgreen', 'lime', 'yellow', 'orangeyellow', 'orange', 'orangered', 'brown', 'grey', 'gray'];
  27542. // 酷炫颜色的数量
  27543. var COOL_BG_COLOR_COUNT = 16;
  27544. /**
  27545. * 获取速立保配色颜色列表
  27546. */
  27547. function getTuniaoColorList() {
  27548. return color;
  27549. }
  27550. /**
  27551. * 获取指定类型的随机颜色对应的类
  27552. * @param {String} type 颜色类型
  27553. */
  27554. function getRandomColorClass() {
  27555. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bg';
  27556. var index = Math.floor(Math.random() * color.length);
  27557. var colorValue = color[index];
  27558. return 'tn-' + type + '-' + colorValue;
  27559. }
  27560. /**
  27561. * 随机获取酷炫背景对应的类
  27562. */
  27563. function getRandomCoolBgClass() {
  27564. var index = Math.random() * COOL_BG_COLOR_COUNT + 1;
  27565. return 'tn-cool-bg-color-' + Math.floor(index);
  27566. }
  27567. /**
  27568. * 根据传入的值获取内部背景颜色类
  27569. *
  27570. * @param {String} backgroundColor 背景颜色信息
  27571. */
  27572. function getBackgroundColorInternalClass() {
  27573. var backgroundColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  27574. if (!backgroundColor) return '';
  27575. if (['tn-bg', 'tn-dynamic-bg', 'tn-main-gradient', 'tn-cool-bg'].some(function (item) {
  27576. return backgroundColor.includes(item);
  27577. })) {
  27578. return backgroundColor;
  27579. }
  27580. return '';
  27581. }
  27582. /**
  27583. * 根据传入的值获取背景颜色样式
  27584. *
  27585. * @param {String} backgroundColor 背景颜色信息
  27586. */
  27587. function getBackgroundColorStyle() {
  27588. var backgroundColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  27589. if (!backgroundColor) return '';
  27590. if (!backgroundColor.startsWith('tn-') || ['#', 'rgb', 'rgba'].some(function (item) {
  27591. return backgroundColor.includes(item);
  27592. })) {
  27593. return backgroundColor;
  27594. }
  27595. return '';
  27596. }
  27597. /**
  27598. * 根据传入的值获取内部字体颜色类
  27599. *
  27600. * @param {String} fontColor 背景颜色信息
  27601. */
  27602. function getFontColorInternalClass() {
  27603. var fontColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  27604. if (!fontColor) return '';
  27605. if (['tn-color'].some(function (item) {
  27606. return fontColor.includes(item);
  27607. })) {
  27608. return fontColor;
  27609. }
  27610. return '';
  27611. }
  27612. /**
  27613. * 根据传入的值获取字体颜色样式
  27614. *
  27615. * @param {String} fontColor 背景颜色信息
  27616. */
  27617. function getFontColorStyle() {
  27618. var fontColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  27619. if (!fontColor) return '';
  27620. if (!fontColor.startsWith('tn-') || ['#', 'rgb', 'rgba'].some(function (item) {
  27621. return fontColor.includes(item);
  27622. })) {
  27623. return fontColor;
  27624. }
  27625. return '';
  27626. }
  27627. /**
  27628. * 求两个颜色之间的渐变值
  27629. *
  27630. * @param {String} startColor 开始颜色
  27631. * @param {String} endColor 结束颜色
  27632. * @param {Number} step 颜色等分的份额
  27633. */
  27634. function colorGradient() {
  27635. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  27636. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  27637. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  27638. var startRGB = hexToRGB(startColor, false);
  27639. var startR = startRGB[0];
  27640. var startG = startRGB[1];
  27641. var startB = startRGB[2];
  27642. var endRGB = hexToRGB(endColor, false);
  27643. var endR = endRGB[0];
  27644. var endG = endRGB[1];
  27645. var endB = endRGB[2];
  27646. // 求差值
  27647. var R = (endR - startR) / step;
  27648. var G = (endG - startG) / step;
  27649. var B = (endB - startB) / step;
  27650. var colorArr = [];
  27651. for (var i = 0; i < step; i++) {
  27652. // 计算每一步的hex值
  27653. var hex = rgbToHex("rgb(".concat(Math.round(R * i + startR), ", ").concat(Math.round(G * i + startG), ", ").concat(Math.round(B * i + startB), ")"));
  27654. colorArr.push(hex);
  27655. }
  27656. return colorArr;
  27657. }
  27658. /**
  27659. * 将hex的颜色表示方式转换为rgb表示方式
  27660. *
  27661. * @param {String} color 颜色
  27662. * @param {Boolean} str 是否返回字符串
  27663. * @return {Array|String} rgb的值
  27664. */
  27665. function hexToRGB(color) {
  27666. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  27667. var reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
  27668. color = color.toLowerCase();
  27669. if (color && reg.test(color)) {
  27670. // #000 => #000000
  27671. if (color.length === 4) {
  27672. var colorNew = '#';
  27673. for (var i = 1; i < 4; i++) {
  27674. colorNew += color.slice(i, i + 1).concat(color.slice(i, i + 1));
  27675. }
  27676. color = colorNew;
  27677. }
  27678. // 处理六位的颜色值
  27679. var colorChange = [];
  27680. for (var _i = 1; _i < 7; _i += 2) {
  27681. colorChange.push(parseInt("0x" + color.slice(_i, _i + 2)));
  27682. }
  27683. if (!str) {
  27684. return colorChange;
  27685. } else {
  27686. return "rgb(".concat(colorChange[0], ", ").concat(colorChange[1], ", ").concat(colorChange[2], ")");
  27687. }
  27688. } else if (/^(rgb|RGB)/.test(color)) {
  27689. var arr = color.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(',');
  27690. return arr.map(function (item) {
  27691. return Number(item);
  27692. });
  27693. } else {
  27694. return color;
  27695. }
  27696. }
  27697. /**
  27698. * 将rgb的颜色表示方式转换成hex表示方式
  27699. *
  27700. * @param {Object} rgb rgb颜色值
  27701. */
  27702. function rgbToHex(rgb) {
  27703. var reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
  27704. if (/^(rgb|RGB)/.test(rgb)) {
  27705. var _color = rgb.replace(/(?:\(|\)|rgb|GRB)*/g, "").split(',');
  27706. var strHex = '#';
  27707. for (var i = 0; i < _color.length; i++) {
  27708. var hex = Number(_color[i]).toString(16);
  27709. // 保证每个值否是两位数
  27710. hex = String(hex).length === 1 ? 0 + '' + hex : hex;
  27711. if (hex === '0') {
  27712. hex += hex;
  27713. }
  27714. strHex += hex;
  27715. }
  27716. if (strHex.length !== 7) {
  27717. strHex = rgb;
  27718. }
  27719. return strHex;
  27720. } else if (reg.test(rgb)) {
  27721. var num = rgb.replace(/#/, '').split('');
  27722. if (num.length === 6) {
  27723. return rgb;
  27724. } else if (num.length === 3) {
  27725. var numHex = '#';
  27726. for (var _i2 = 0; _i2 < num.length; _i2++) {
  27727. numHex += num[_i2] + num[_i2];
  27728. }
  27729. return numHex;
  27730. }
  27731. } else {
  27732. return rgb;
  27733. }
  27734. }
  27735. /**
  27736. * 将传入的颜色值转换为rgba字符串
  27737. *
  27738. * @param {String} color 颜色
  27739. * @param {Number} alpha 透明度
  27740. */
  27741. function colorToRGBA(color) {
  27742. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  27743. color = rgbToHex(color);
  27744. // 十六进制颜色值的正则表达式
  27745. var reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
  27746. color = color.toLowerCase();
  27747. if (color && reg.test(color)) {
  27748. // #000 => #000000
  27749. if (color.length === 4) {
  27750. var colorNew = '#';
  27751. for (var i = 1; i < 4; i++) {
  27752. colorNew += color.slice(i, i + 1).concat(color.slice(i, i + 1));
  27753. }
  27754. color = colorNew;
  27755. }
  27756. // 处理六位的颜色值
  27757. var colorChange = [];
  27758. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  27759. colorChange.push(parseInt("0x" + color.slice(_i3, _i3 + 2)));
  27760. }
  27761. return "rgba(".concat(colorChange[0], ", ").concat(colorChange[1], ", ").concat(colorChange[2], ", ").concat(alpha, ")");
  27762. } else {
  27763. return color;
  27764. }
  27765. }
  27766. var _default = {
  27767. COOL_BG_COLOR_COUNT: COOL_BG_COLOR_COUNT,
  27768. getTuniaoColorList: getTuniaoColorList,
  27769. getRandomColorClass: getRandomColorClass,
  27770. getRandomCoolBgClass: getRandomCoolBgClass,
  27771. getBackgroundColorInternalClass: getBackgroundColorInternalClass,
  27772. getBackgroundColorStyle: getBackgroundColorStyle,
  27773. getFontColorInternalClass: getFontColorInternalClass,
  27774. getFontColorStyle: getFontColorStyle,
  27775. colorGradient: colorGradient,
  27776. hexToRGB: hexToRGB,
  27777. rgbToHex: rgbToHex,
  27778. colorToRGBA: colorToRGBA
  27779. };
  27780. exports.default = _default;
  27781. /***/ }),
  27782. /***/ 52:
  27783. /*!*************************************************************!*\
  27784. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/function/message.js ***!
  27785. \*************************************************************/
  27786. /*! no static exports found */
  27787. /***/ (function(module, exports, __webpack_require__) {
  27788. "use strict";
  27789. /* WEBPACK VAR INJECTION */(function(uni) {
  27790. Object.defineProperty(exports, "__esModule", {
  27791. value: true
  27792. });
  27793. exports.default = void 0;
  27794. /**
  27795. * 弹出系统内置的toast
  27796. */
  27797. function toast(title) {
  27798. var mask = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  27799. var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  27800. var icon = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'none';
  27801. var duration = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1500;
  27802. uni.showToast({
  27803. title: title,
  27804. icon: icon,
  27805. mask: mask,
  27806. duration: duration,
  27807. success: function success() {
  27808. setTimeout(function () {
  27809. cb && cb();
  27810. }, duration);
  27811. }
  27812. });
  27813. }
  27814. /**
  27815. * 弹出内置的加载框
  27816. */
  27817. function loading(title) {
  27818. uni.showLoading({
  27819. title: title,
  27820. mask: true
  27821. });
  27822. }
  27823. /**
  27824. * 弹出系统内置的modal
  27825. */
  27826. function modal(title, content, confirmCb) {
  27827. var showCancel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  27828. var cancelCb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
  27829. var confirmText = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "确定";
  27830. var cancelText = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : "取消";
  27831. uni.showModal({
  27832. title: title,
  27833. content: content,
  27834. showCancel: showCancel,
  27835. cancelText: cancelText,
  27836. confirmText: confirmText,
  27837. success: function success(res) {
  27838. if (res.cancel) {
  27839. cancelCb && cancelCb();
  27840. } else if (res.confirm) {
  27841. confirmCb && confirmCb();
  27842. }
  27843. }
  27844. });
  27845. }
  27846. /**
  27847. * 关闭系统内置toast
  27848. */
  27849. function closeToast() {
  27850. uni.hideToast();
  27851. }
  27852. /**
  27853. * 关闭系统内置的加载框
  27854. */
  27855. function closeLoading() {
  27856. uni.hideLoading();
  27857. }
  27858. var _default = {
  27859. toast: toast,
  27860. loading: loading,
  27861. modal: modal,
  27862. closeToast: closeToast,
  27863. closeLoading: closeLoading
  27864. };
  27865. exports.default = _default;
  27866. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  27867. /***/ }),
  27868. /***/ 53:
  27869. /*!**********************************************************!*\
  27870. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/function/uuid.js ***!
  27871. \**********************************************************/
  27872. /*! no static exports found */
  27873. /***/ (function(module, exports, __webpack_require__) {
  27874. "use strict";
  27875. Object.defineProperty(exports, "__esModule", {
  27876. value: true
  27877. });
  27878. exports.default = void 0;
  27879. /**
  27880. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  27881. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  27882. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  27883. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  27884. * v-for的时候,推荐使用后端返回的id而不是循环的index
  27885. * @param {Number} len uuid的长度
  27886. * @param {Boolean} firstT 将返回的首字母置为"t"
  27887. * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  27888. */
  27889. function uuid() {
  27890. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  27891. var firstT = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  27892. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  27893. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  27894. var uuid = [];
  27895. radix = radix || chars.length;
  27896. if (len) {
  27897. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  27898. for (var i = 0; i < len; i++) {
  27899. uuid[i] = chars[0 | Math.random() * radix];
  27900. }
  27901. } else {
  27902. var r;
  27903. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  27904. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  27905. uuid[14] = '4';
  27906. for (var _i = 0; _i < 36; _i++) {
  27907. if (!uuid[_i]) {
  27908. r = 0 | Math.random() * 16;
  27909. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  27910. }
  27911. }
  27912. }
  27913. // 移除第一个字符,并用t替代,因为第一个字符为数值时,该uuid不能用作id或者class
  27914. if (firstT) {
  27915. uuid.shift();
  27916. return 't' + uuid.join('');
  27917. } else {
  27918. return uuid.join('');
  27919. }
  27920. }
  27921. var _default = uuid;
  27922. exports.default = _default;
  27923. /***/ }),
  27924. /***/ 534:
  27925. /*!*******************************************************************************************!*\
  27926. !*** E:/盈通/sulibao-mini/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js ***!
  27927. \*******************************************************************************************/
  27928. /*! no static exports found */
  27929. /***/ (function(module, exports, __webpack_require__) {
  27930. "use strict";
  27931. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  27932. Object.defineProperty(exports, "__esModule", {
  27933. value: true
  27934. });
  27935. exports.default = void 0;
  27936. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 535));
  27937. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 536));
  27938. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 537));
  27939. var _default = {
  27940. en: _en.default,
  27941. 'zh-Hans': _zhHans.default,
  27942. 'zh-Hant': _zhHant.default
  27943. };
  27944. exports.default = _default;
  27945. /***/ }),
  27946. /***/ 535:
  27947. /*!******************************************************************************************!*\
  27948. !*** E:/盈通/sulibao-mini/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json ***!
  27949. \******************************************************************************************/
  27950. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  27951. /***/ (function(module) {
  27952. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"Pull up to show more\",\"uni-load-more.contentrefresh\":\"loading...\",\"uni-load-more.contentnomore\":\"No more data\"}");
  27953. /***/ }),
  27954. /***/ 536:
  27955. /*!***********************************************************************************************!*\
  27956. !*** E:/盈通/sulibao-mini/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json ***!
  27957. \***********************************************************************************************/
  27958. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  27959. /***/ (function(module) {
  27960. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉显示更多\",\"uni-load-more.contentrefresh\":\"正在加载...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
  27961. /***/ }),
  27962. /***/ 537:
  27963. /*!***********************************************************************************************!*\
  27964. !*** E:/盈通/sulibao-mini/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json ***!
  27965. \***********************************************************************************************/
  27966. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  27967. /***/ (function(module) {
  27968. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉顯示更多\",\"uni-load-more.contentrefresh\":\"正在加載...\",\"uni-load-more.contentnomore\":\"沒有更多數據了\"}");
  27969. /***/ }),
  27970. /***/ 54:
  27971. /*!***********************************************************!*\
  27972. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/function/array.js ***!
  27973. \***********************************************************/
  27974. /*! no static exports found */
  27975. /***/ (function(module, exports, __webpack_require__) {
  27976. "use strict";
  27977. Object.defineProperty(exports, "__esModule", {
  27978. value: true
  27979. });
  27980. exports.default = void 0;
  27981. /**
  27982. * 打乱传入的数组
  27983. *
  27984. * @param {Array} array 待打乱的数组
  27985. */
  27986. function random() {
  27987. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  27988. return array.sort(function () {
  27989. return Math.random() - 0.5;
  27990. });
  27991. }
  27992. /**
  27993. * 判断是否为数组
  27994. *
  27995. * @param {Object} arr
  27996. */
  27997. function isArray(arr) {
  27998. return Object.prototype.toString.call(arr) === '[object Array]';
  27999. }
  28000. var _default = {
  28001. random: random,
  28002. isArray: isArray
  28003. };
  28004. exports.default = _default;
  28005. /***/ }),
  28006. /***/ 55:
  28007. /*!**********************************************************!*\
  28008. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/function/test.js ***!
  28009. \**********************************************************/
  28010. /*! no static exports found */
  28011. /***/ (function(module, exports, __webpack_require__) {
  28012. "use strict";
  28013. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  28014. Object.defineProperty(exports, "__esModule", {
  28015. value: true
  28016. });
  28017. exports.default = void 0;
  28018. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  28019. /**
  28020. * 验证电子邮箱格式
  28021. */
  28022. function email(value) {
  28023. return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
  28024. }
  28025. /**
  28026. * 验证手机格式
  28027. */
  28028. function mobile(value) {
  28029. return /^1[3-9]\d{9}$/.test(value);
  28030. }
  28031. /**
  28032. * 验证URL格式
  28033. */
  28034. function url(value) {
  28035. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  28036. }
  28037. /**
  28038. * 验证日期格式
  28039. */
  28040. function date(value) {
  28041. return !/Invalid|NaN/.test(new Date(value).toString());
  28042. }
  28043. /**
  28044. * 验证ISO类型的日期格式
  28045. */
  28046. function dateISO(value) {
  28047. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  28048. }
  28049. /**
  28050. * 验证十进制数字
  28051. */
  28052. function number(value) {
  28053. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  28054. }
  28055. /**
  28056. * 验证整数
  28057. */
  28058. function digits(value) {
  28059. return /^\d+$/.test(value);
  28060. }
  28061. /**
  28062. * 验证身份证号码
  28063. */
  28064. function idCard(value) {
  28065. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
  28066. }
  28067. /**
  28068. * 是否车牌号
  28069. */
  28070. function carNo(value) {
  28071. // 新能源车牌
  28072. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  28073. // 旧车牌
  28074. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  28075. if (value.length === 7) {
  28076. return creg.test(value);
  28077. } else if (value.length === 8) {
  28078. return xreg.test(value);
  28079. } else {
  28080. return false;
  28081. }
  28082. }
  28083. /**
  28084. * 金额,只允许2位小数
  28085. */
  28086. function amount(value) {
  28087. //金额,只允许保留两位小数
  28088. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  28089. }
  28090. /**
  28091. * 中文
  28092. */
  28093. function chinese(value) {
  28094. var reg = /^[\u4e00-\u9fa5]+$/gi;
  28095. return reg.test(value);
  28096. }
  28097. /**
  28098. * 只能输入字母
  28099. */
  28100. function letter(value) {
  28101. return /^[a-zA-Z]*$/.test(value);
  28102. }
  28103. /**
  28104. * 只能是字母或者数字
  28105. */
  28106. function enOrNum(value) {
  28107. //英文或者数字
  28108. var reg = /^[0-9a-zA-Z]*$/g;
  28109. return reg.test(value);
  28110. }
  28111. /**
  28112. * 验证是否包含某个值
  28113. */
  28114. function contains(value, param) {
  28115. return value.indexOf(param) >= 0;
  28116. }
  28117. /**
  28118. * 验证一个值范围[min, max]
  28119. */
  28120. function range(value, param) {
  28121. return value >= param[0] && value <= param[1];
  28122. }
  28123. /**
  28124. * 验证一个长度范围[min, max]
  28125. */
  28126. function rangeLength(value, param) {
  28127. return value.length >= param[0] && value.length <= param[1];
  28128. }
  28129. /**
  28130. * 是否固定电话
  28131. */
  28132. function landline(value) {
  28133. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  28134. return reg.test(value);
  28135. }
  28136. /**
  28137. * 判断是否为空
  28138. */
  28139. function empty(value) {
  28140. switch ((0, _typeof2.default)(value)) {
  28141. case 'undefined':
  28142. return true;
  28143. case 'string':
  28144. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  28145. break;
  28146. case 'boolean':
  28147. if (!value) return true;
  28148. break;
  28149. case 'number':
  28150. if (0 === value || isNaN(value)) return true;
  28151. break;
  28152. case 'object':
  28153. if (null === value || value.length === 0) return true;
  28154. for (var i in value) {
  28155. return false;
  28156. }
  28157. return true;
  28158. }
  28159. return false;
  28160. }
  28161. /**
  28162. * 是否json字符串
  28163. */
  28164. function jsonString(value) {
  28165. if (typeof value == 'string') {
  28166. try {
  28167. var obj = JSON.parse(value);
  28168. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  28169. return true;
  28170. } else {
  28171. return false;
  28172. }
  28173. } catch (e) {
  28174. return false;
  28175. }
  28176. }
  28177. return false;
  28178. }
  28179. /**
  28180. * 是否数组
  28181. */
  28182. function array(value) {
  28183. if (typeof Array.isArray === "function") {
  28184. return Array.isArray(value);
  28185. } else {
  28186. return Object.prototype.toString.call(value) === "[object Array]";
  28187. }
  28188. }
  28189. /**
  28190. * 是否对象
  28191. */
  28192. function object(value) {
  28193. return Object.prototype.toString.call(value) === '[object Object]';
  28194. }
  28195. /**
  28196. * 是否短信验证码
  28197. */
  28198. function code(value) {
  28199. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  28200. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  28201. }
  28202. var _default = {
  28203. email: email,
  28204. mobile: mobile,
  28205. url: url,
  28206. date: date,
  28207. dateISO: dateISO,
  28208. number: number,
  28209. digits: digits,
  28210. idCard: idCard,
  28211. carNo: carNo,
  28212. amount: amount,
  28213. chinese: chinese,
  28214. letter: letter,
  28215. enOrNum: enOrNum,
  28216. contains: contains,
  28217. range: range,
  28218. rangeLength: rangeLength,
  28219. empty: empty,
  28220. isEmpty: empty,
  28221. jsonString: jsonString,
  28222. landline: landline,
  28223. object: object,
  28224. array: array,
  28225. code: code
  28226. };
  28227. exports.default = _default;
  28228. /***/ }),
  28229. /***/ 552:
  28230. /*!***************************************************************************!*\
  28231. !*** E:/盈通/sulibao-mini/uni_modules/mp-html/components/mp-html/parser.js ***!
  28232. \***************************************************************************/
  28233. /*! no static exports found */
  28234. /***/ (function(module, exports, __webpack_require__) {
  28235. "use strict";
  28236. /* WEBPACK VAR INJECTION */(function(uni, wx) {
  28237. Object.defineProperty(exports, "__esModule", {
  28238. value: true
  28239. });
  28240. exports.default = void 0;
  28241. /**
  28242. * @fileoverview html 解析器
  28243. */
  28244. // 配置
  28245. var config = {
  28246. // 信任的标签(保持标签名不变)
  28247. trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
  28248. // 块级标签(转为 div,其他的非信任标签转为 span)
  28249. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  28250. // 要移除的标签
  28251. ignoreTags: makeMap('area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr'),
  28252. // 自闭合的标签
  28253. voidTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  28254. // html 实体
  28255. entities: {
  28256. lt: '<',
  28257. gt: '>',
  28258. quot: '"',
  28259. apos: "'",
  28260. ensp: "\u2002",
  28261. emsp: "\u2003",
  28262. nbsp: '\xA0',
  28263. semi: ';',
  28264. ndash: '–',
  28265. mdash: '—',
  28266. middot: '·',
  28267. lsquo: '‘',
  28268. rsquo: '’',
  28269. ldquo: '“',
  28270. rdquo: '”',
  28271. bull: '•',
  28272. hellip: '…',
  28273. larr: '←',
  28274. uarr: '↑',
  28275. rarr: '→',
  28276. darr: '↓'
  28277. },
  28278. // 默认的标签样式
  28279. tagStyle: {
  28280. address: 'font-style:italic',
  28281. big: 'display:inline;font-size:1.2em',
  28282. caption: 'display:table-caption;text-align:center',
  28283. center: 'text-align:center',
  28284. cite: 'font-style:italic',
  28285. dd: 'margin-left:40px',
  28286. mark: 'background-color:yellow',
  28287. pre: 'font-family:monospace;white-space:pre',
  28288. s: 'text-decoration:line-through',
  28289. small: 'display:inline;font-size:0.8em',
  28290. strike: 'text-decoration:line-through',
  28291. u: 'text-decoration:underline'
  28292. },
  28293. // svg 大小写对照表
  28294. svgDict: {
  28295. animatetransform: 'animateTransform',
  28296. lineargradient: 'linearGradient',
  28297. viewbox: 'viewBox',
  28298. attributename: 'attributeName',
  28299. repeatcount: 'repeatCount',
  28300. repeatdur: 'repeatDur'
  28301. }
  28302. };
  28303. var tagSelector = {};
  28304. var _uni$getSystemInfoSyn = uni.getSystemInfoSync(),
  28305. windowWidth = _uni$getSystemInfoSyn.windowWidth,
  28306. system = _uni$getSystemInfoSyn.system;
  28307. var blankChar = makeMap(' ,\r,\n,\t,\f');
  28308. var idIndex = 0;
  28309. /**
  28310. * @description 创建 map
  28311. * @param {String} str 逗号分隔
  28312. */
  28313. function makeMap(str) {
  28314. var map = Object.create(null);
  28315. var list = str.split(',');
  28316. for (var i = list.length; i--;) {
  28317. map[list[i]] = true;
  28318. }
  28319. return map;
  28320. }
  28321. /**
  28322. * @description 解码 html 实体
  28323. * @param {String} str 要解码的字符串
  28324. * @param {Boolean} amp 要不要解码 &amp;
  28325. * @returns {String} 解码后的字符串
  28326. */
  28327. function decodeEntity(str, amp) {
  28328. var i = str.indexOf('&');
  28329. while (i !== -1) {
  28330. var j = str.indexOf(';', i + 3);
  28331. var code = void 0;
  28332. if (j === -1) break;
  28333. if (str[i + 1] === '#') {
  28334. // &#123; 形式的实体
  28335. code = parseInt((str[i + 2] === 'x' ? '0' : '') + str.substring(i + 2, j));
  28336. if (!isNaN(code)) {
  28337. str = str.substr(0, i) + String.fromCharCode(code) + str.substr(j + 1);
  28338. }
  28339. } else {
  28340. // &nbsp; 形式的实体
  28341. code = str.substring(i + 1, j);
  28342. if (config.entities[code] || code === 'amp' && amp) {
  28343. str = str.substr(0, i) + (config.entities[code] || '&') + str.substr(j + 1);
  28344. }
  28345. }
  28346. i = str.indexOf('&', i + 1);
  28347. }
  28348. return str;
  28349. }
  28350. /**
  28351. * @description 合并多个块级标签,加快长内容渲染
  28352. * @param {Array} nodes 要合并的标签数组
  28353. */
  28354. function mergeNodes(nodes) {
  28355. var i = nodes.length - 1;
  28356. for (var j = i; j >= -1; j--) {
  28357. if (j === -1 || nodes[j].c || !nodes[j].name || nodes[j].name !== 'div' && nodes[j].name !== 'p' && nodes[j].name[0] !== 'h' || (nodes[j].attrs.style || '').includes('inline')) {
  28358. if (i - j >= 5) {
  28359. nodes.splice(j + 1, i - j, {
  28360. name: 'div',
  28361. attrs: {},
  28362. children: nodes.slice(j + 1, i + 1)
  28363. });
  28364. }
  28365. i = j - 1;
  28366. }
  28367. }
  28368. }
  28369. /**
  28370. * @description html 解析器
  28371. * @param {Object} vm 组件实例
  28372. */
  28373. function Parser(vm) {
  28374. this.options = vm || {};
  28375. this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle);
  28376. this.imgList = vm.imgList || [];
  28377. this.imgList._unloadimgs = 0;
  28378. this.plugins = vm.plugins || [];
  28379. this.attrs = Object.create(null);
  28380. this.stack = [];
  28381. this.nodes = [];
  28382. this.pre = (this.options.containerStyle || '').includes('white-space') && this.options.containerStyle.includes('pre') ? 2 : 0;
  28383. }
  28384. /**
  28385. * @description 执行解析
  28386. * @param {String} content 要解析的文本
  28387. */
  28388. Parser.prototype.parse = function (content) {
  28389. // 插件处理
  28390. for (var i = this.plugins.length; i--;) {
  28391. if (this.plugins[i].onUpdate) {
  28392. content = this.plugins[i].onUpdate(content, config) || content;
  28393. }
  28394. }
  28395. new Lexer(this).parse(content);
  28396. // 出栈未闭合的标签
  28397. while (this.stack.length) {
  28398. this.popNode();
  28399. }
  28400. if (this.nodes.length > 50) {
  28401. mergeNodes(this.nodes);
  28402. }
  28403. return this.nodes;
  28404. };
  28405. /**
  28406. * @description 将标签暴露出来(不被 rich-text 包含)
  28407. */
  28408. Parser.prototype.expose = function () {
  28409. for (var i = this.stack.length; i--;) {
  28410. var item = this.stack[i];
  28411. if (item.c || item.name === 'a' || item.name === 'video' || item.name === 'audio') return;
  28412. item.c = 1;
  28413. }
  28414. };
  28415. /**
  28416. * @description 处理插件
  28417. * @param {Object} node 要处理的标签
  28418. * @returns {Boolean} 是否要移除此标签
  28419. */
  28420. Parser.prototype.hook = function (node) {
  28421. for (var i = this.plugins.length; i--;) {
  28422. if (this.plugins[i].onParse && this.plugins[i].onParse(node, this) === false) {
  28423. return false;
  28424. }
  28425. }
  28426. return true;
  28427. };
  28428. /**
  28429. * @description 将链接拼接上主域名
  28430. * @param {String} url 需要拼接的链接
  28431. * @returns {String} 拼接后的链接
  28432. */
  28433. Parser.prototype.getUrl = function (url) {
  28434. var domain = this.options.domain;
  28435. if (url[0] === '/') {
  28436. if (url[1] === '/') {
  28437. // // 开头的补充协议名
  28438. url = (domain ? domain.split('://')[0] : 'http') + ':' + url;
  28439. } else if (domain) {
  28440. // 否则补充整个域名
  28441. url = domain + url;
  28442. }
  28443. } else if (!url.includes('data:') && !url.includes('://')) {
  28444. if (domain) {
  28445. url = domain + '/' + url;
  28446. }
  28447. }
  28448. return url;
  28449. };
  28450. /**
  28451. * @description 解析样式表
  28452. * @param {Object} node 标签
  28453. * @returns {Object}
  28454. */
  28455. Parser.prototype.parseStyle = function (node) {
  28456. var attrs = node.attrs;
  28457. var list = (this.tagStyle[node.name] || '').split(';').concat((attrs.style || '').split(';'));
  28458. var styleObj = {};
  28459. var tmp = '';
  28460. if (attrs.id && !this.xml) {
  28461. // 暴露锚点
  28462. if (this.options.useAnchor) {
  28463. this.expose();
  28464. } else if (node.name !== 'img' && node.name !== 'a' && node.name !== 'video' && node.name !== 'audio') {
  28465. attrs.id = undefined;
  28466. }
  28467. }
  28468. // 转换 width 和 height 属性
  28469. if (attrs.width) {
  28470. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  28471. attrs.width = undefined;
  28472. }
  28473. if (attrs.height) {
  28474. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  28475. attrs.height = undefined;
  28476. }
  28477. for (var i = 0, len = list.length; i < len; i++) {
  28478. var info = list[i].split(':');
  28479. if (info.length < 2) continue;
  28480. var key = info.shift().trim().toLowerCase();
  28481. var value = info.join(':').trim();
  28482. if (value[0] === '-' && value.lastIndexOf('-') > 0 || value.includes('safe')) {
  28483. // 兼容性的 css 不压缩
  28484. tmp += ";".concat(key, ":").concat(value);
  28485. } else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) {
  28486. // 重复的样式进行覆盖
  28487. if (value.includes('url')) {
  28488. // 填充链接
  28489. var j = value.indexOf('(') + 1;
  28490. if (j) {
  28491. while (value[j] === '"' || value[j] === "'" || blankChar[value[j]]) {
  28492. j++;
  28493. }
  28494. value = value.substr(0, j) + this.getUrl(value.substr(j));
  28495. }
  28496. } else if (value.includes('rpx')) {
  28497. // 转换 rpx(rich-text 内部不支持 rpx)
  28498. value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  28499. return parseFloat($) * windowWidth / 750 + 'px';
  28500. });
  28501. }
  28502. styleObj[key] = value;
  28503. }
  28504. }
  28505. node.attrs.style = tmp;
  28506. return styleObj;
  28507. };
  28508. /**
  28509. * @description 解析到标签名
  28510. * @param {String} name 标签名
  28511. * @private
  28512. */
  28513. Parser.prototype.onTagName = function (name) {
  28514. this.tagName = this.xml ? name : name.toLowerCase();
  28515. if (this.tagName === 'svg') {
  28516. this.xml = (this.xml || 0) + 1; // svg 标签内大小写敏感
  28517. config.ignoreTags.style = undefined; // svg 标签内 style 可用
  28518. }
  28519. };
  28520. /**
  28521. * @description 解析到属性名
  28522. * @param {String} name 属性名
  28523. * @private
  28524. */
  28525. Parser.prototype.onAttrName = function (name) {
  28526. name = this.xml ? name : name.toLowerCase();
  28527. if (name.substr(0, 5) === 'data-') {
  28528. if (name === 'data-src' && !this.attrs.src) {
  28529. // data-src 自动转为 src
  28530. this.attrName = 'src';
  28531. } else if (this.tagName === 'img' || this.tagName === 'a') {
  28532. // a 和 img 标签保留 data- 的属性,可以在 imgtap 和 linktap 事件中使用
  28533. this.attrName = name;
  28534. } else {
  28535. // 剩余的移除以减小大小
  28536. this.attrName = undefined;
  28537. }
  28538. } else {
  28539. this.attrName = name;
  28540. this.attrs[name] = 'T'; // boolean 型属性缺省设置
  28541. }
  28542. };
  28543. /**
  28544. * @description 解析到属性值
  28545. * @param {String} val 属性值
  28546. * @private
  28547. */
  28548. Parser.prototype.onAttrVal = function (val) {
  28549. var name = this.attrName || '';
  28550. if (name === 'style' || name === 'href') {
  28551. // 部分属性进行实体解码
  28552. this.attrs[name] = decodeEntity(val, true);
  28553. } else if (name.includes('src')) {
  28554. // 拼接主域名
  28555. this.attrs[name] = this.getUrl(decodeEntity(val, true));
  28556. } else if (name) {
  28557. this.attrs[name] = val;
  28558. }
  28559. };
  28560. /**
  28561. * @description 解析到标签开始
  28562. * @param {Boolean} selfClose 是否有自闭合标识 />
  28563. * @private
  28564. */
  28565. Parser.prototype.onOpenTag = function (selfClose) {
  28566. // 拼装 node
  28567. var node = Object.create(null);
  28568. node.name = this.tagName;
  28569. node.attrs = this.attrs;
  28570. // 避免因为自动 diff 使得 type 被设置为 null 导致部分内容不显示
  28571. if (this.options.nodes.length) {
  28572. node.type = 'node';
  28573. }
  28574. this.attrs = Object.create(null);
  28575. var attrs = node.attrs;
  28576. var parent = this.stack[this.stack.length - 1];
  28577. var siblings = parent ? parent.children : this.nodes;
  28578. var close = this.xml ? selfClose : config.voidTags[node.name];
  28579. // 替换标签名选择器
  28580. if (tagSelector[node.name]) {
  28581. attrs.class = tagSelector[node.name] + (attrs.class ? ' ' + attrs.class : '');
  28582. }
  28583. // 转换 embed 标签
  28584. if (node.name === 'embed') {
  28585. var src = attrs.src || '';
  28586. // 按照后缀名和 type 将 embed 转为 video 或 audio
  28587. if (src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8') || (attrs.type || '').includes('video')) {
  28588. node.name = 'video';
  28589. } else if (src.includes('.mp3') || src.includes('.wav') || src.includes('.aac') || src.includes('.m4a') || (attrs.type || '').includes('audio')) {
  28590. node.name = 'audio';
  28591. }
  28592. if (attrs.autostart) {
  28593. attrs.autoplay = 'T';
  28594. }
  28595. attrs.controls = 'T';
  28596. }
  28597. // 处理音视频
  28598. if (node.name === 'video' || node.name === 'audio') {
  28599. // 设置 id 以便获取 context
  28600. if (node.name === 'video' && !attrs.id) {
  28601. attrs.id = 'v' + idIndex++;
  28602. }
  28603. // 没有设置 controls 也没有设置 autoplay 的自动设置 controls
  28604. if (!attrs.controls && !attrs.autoplay) {
  28605. attrs.controls = 'T';
  28606. }
  28607. // 用数组存储所有可用的 source
  28608. node.src = [];
  28609. if (attrs.src) {
  28610. node.src.push(attrs.src);
  28611. attrs.src = undefined;
  28612. }
  28613. this.expose();
  28614. }
  28615. // 处理自闭合标签
  28616. if (close) {
  28617. if (!this.hook(node) || config.ignoreTags[node.name]) {
  28618. // 通过 base 标签设置主域名
  28619. if (node.name === 'base' && !this.options.domain) {
  28620. this.options.domain = attrs.href;
  28621. } else if (node.name === 'source' && parent && (parent.name === 'video' || parent.name === 'audio') && attrs.src) {
  28622. // 设置 source 标签(仅父节点为 video 或 audio 时有效)
  28623. parent.src.push(attrs.src);
  28624. }
  28625. return;
  28626. }
  28627. // 解析 style
  28628. var styleObj = this.parseStyle(node);
  28629. // 处理图片
  28630. if (node.name === 'img') {
  28631. if (attrs.src) {
  28632. // 标记 webp
  28633. if (attrs.src.includes('webp')) {
  28634. node.webp = 'T';
  28635. }
  28636. // data url 图片如果没有设置 original-src 默认为不可预览的小图片
  28637. if (attrs.src.includes('data:') && !attrs['original-src']) {
  28638. attrs.ignore = 'T';
  28639. }
  28640. if (!attrs.ignore || node.webp || attrs.src.includes('cloud://')) {
  28641. for (var i = this.stack.length; i--;) {
  28642. var item = this.stack[i];
  28643. if (item.name === 'a') {
  28644. node.a = item.attrs;
  28645. }
  28646. if (item.name === 'table' && !node.webp && !attrs.src.includes('cloud://')) {
  28647. if (!styleObj.display || styleObj.display.includes('inline')) {
  28648. node.t = 'inline-block';
  28649. } else {
  28650. node.t = styleObj.display;
  28651. }
  28652. styleObj.display = undefined;
  28653. }
  28654. var style = item.attrs.style || '';
  28655. if (style.includes('flex:') && !style.includes('flex:0') && !style.includes('flex: 0') && (!styleObj.width || parseInt(styleObj.width) > 100)) {
  28656. styleObj.width = '100% !important';
  28657. styleObj.height = '';
  28658. for (var j = i + 1; j < this.stack.length; j++) {
  28659. this.stack[j].attrs.style = (this.stack[j].attrs.style || '').replace('inline-', '');
  28660. }
  28661. } else if (style.includes('flex') && styleObj.width === '100%') {
  28662. for (var _j = i + 1; _j < this.stack.length; _j++) {
  28663. var _style = this.stack[_j].attrs.style || '';
  28664. if (!_style.includes(';width') && !_style.includes(' width') && _style.indexOf('width') !== 0) {
  28665. styleObj.width = '';
  28666. break;
  28667. }
  28668. }
  28669. } else if (style.includes('inline-block')) {
  28670. if (styleObj.width && styleObj.width[styleObj.width.length - 1] === '%') {
  28671. item.attrs.style += ';max-width:' + styleObj.width;
  28672. styleObj.width = '';
  28673. } else {
  28674. item.attrs.style += ';max-width:100%';
  28675. }
  28676. }
  28677. item.c = 1;
  28678. }
  28679. attrs.i = this.imgList.length.toString();
  28680. var _src = attrs['original-src'] || attrs.src;
  28681. if (this.imgList.includes(_src)) {
  28682. // 如果有重复的链接则对域名进行随机大小写变换避免预览时错位
  28683. var _i = _src.indexOf('://');
  28684. if (_i !== -1) {
  28685. _i += 3;
  28686. var newSrc = _src.substr(0, _i);
  28687. for (; _i < _src.length; _i++) {
  28688. if (_src[_i] === '/') break;
  28689. newSrc += Math.random() > 0.5 ? _src[_i].toUpperCase() : _src[_i];
  28690. }
  28691. newSrc += _src.substr(_i);
  28692. _src = newSrc;
  28693. }
  28694. }
  28695. this.imgList.push(_src);
  28696. if (!node.t) {
  28697. this.imgList._unloadimgs += 1;
  28698. }
  28699. }
  28700. }
  28701. if (styleObj.display === 'inline') {
  28702. styleObj.display = '';
  28703. }
  28704. if (attrs.ignore) {
  28705. styleObj['max-width'] = styleObj['max-width'] || '100%';
  28706. attrs.style += ';-webkit-touch-callout:none';
  28707. }
  28708. // 设置的宽度超出屏幕,为避免变形,高度转为自动
  28709. if (parseInt(styleObj.width) > windowWidth) {
  28710. styleObj.height = undefined;
  28711. }
  28712. // 记录是否设置了宽高
  28713. if (!isNaN(parseInt(styleObj.width))) {
  28714. node.w = 'T';
  28715. }
  28716. if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes('%') || parent && (parent.attrs.style || '').includes('height'))) {
  28717. node.h = 'T';
  28718. }
  28719. } else if (node.name === 'svg') {
  28720. siblings.push(node);
  28721. this.stack.push(node);
  28722. this.popNode();
  28723. return;
  28724. }
  28725. for (var key in styleObj) {
  28726. if (styleObj[key]) {
  28727. attrs.style += ";".concat(key, ":").concat(styleObj[key].replace(' !important', ''));
  28728. }
  28729. }
  28730. attrs.style = attrs.style.substr(1) || undefined;
  28731. } else {
  28732. if ((node.name === 'pre' || (attrs.style || '').includes('white-space') && attrs.style.includes('pre')) && this.pre !== 2) {
  28733. this.pre = node.pre = 1;
  28734. }
  28735. node.children = [];
  28736. this.stack.push(node);
  28737. }
  28738. // 加入节点树
  28739. siblings.push(node);
  28740. };
  28741. /**
  28742. * @description 解析到标签结束
  28743. * @param {String} name 标签名
  28744. * @private
  28745. */
  28746. Parser.prototype.onCloseTag = function (name) {
  28747. // 依次出栈到匹配为止
  28748. name = this.xml ? name : name.toLowerCase();
  28749. var i;
  28750. for (i = this.stack.length; i--;) {
  28751. if (this.stack[i].name === name) break;
  28752. }
  28753. if (i !== -1) {
  28754. while (this.stack.length > i) {
  28755. this.popNode();
  28756. }
  28757. } else if (name === 'p' || name === 'br') {
  28758. var siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  28759. siblings.push({
  28760. name: name,
  28761. attrs: {
  28762. class: tagSelector[name] || '',
  28763. style: this.tagStyle[name] || ''
  28764. }
  28765. });
  28766. }
  28767. };
  28768. /**
  28769. * @description 处理标签出栈
  28770. * @private
  28771. */
  28772. Parser.prototype.popNode = function () {
  28773. var node = this.stack.pop();
  28774. var attrs = node.attrs;
  28775. var children = node.children;
  28776. var parent = this.stack[this.stack.length - 1];
  28777. var siblings = parent ? parent.children : this.nodes;
  28778. if (!this.hook(node) || config.ignoreTags[node.name]) {
  28779. // 获取标题
  28780. if (node.name === 'title' && children.length && children[0].type === 'text' && this.options.setTitle) {
  28781. uni.setNavigationBarTitle({
  28782. title: children[0].text
  28783. });
  28784. }
  28785. siblings.pop();
  28786. return;
  28787. }
  28788. if (node.pre && this.pre !== 2) {
  28789. // 是否合并空白符标识
  28790. this.pre = node.pre = undefined;
  28791. for (var i = this.stack.length; i--;) {
  28792. if (this.stack[i].pre) {
  28793. this.pre = 1;
  28794. }
  28795. }
  28796. }
  28797. var styleObj = {};
  28798. // 转换 svg
  28799. if (node.name === 'svg') {
  28800. if (this.xml > 1) {
  28801. // 多层 svg 嵌套
  28802. this.xml--;
  28803. return;
  28804. }
  28805. var src = '';
  28806. var style = attrs.style;
  28807. attrs.style = '';
  28808. attrs.xmlns = 'http://www.w3.org/2000/svg';
  28809. (function traversal(node) {
  28810. if (node.type === 'text') {
  28811. src += node.text;
  28812. return;
  28813. }
  28814. var name = config.svgDict[node.name] || node.name;
  28815. src += '<' + name;
  28816. for (var item in node.attrs) {
  28817. var val = node.attrs[item];
  28818. if (val) {
  28819. src += " ".concat(config.svgDict[item] || item, "=\"").concat(val, "\"");
  28820. }
  28821. }
  28822. if (!node.children) {
  28823. src += '/>';
  28824. } else {
  28825. src += '>';
  28826. for (var _i2 = 0; _i2 < node.children.length; _i2++) {
  28827. traversal(node.children[_i2]);
  28828. }
  28829. src += '</' + name + '>';
  28830. }
  28831. })(node);
  28832. node.name = 'img';
  28833. node.attrs = {
  28834. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  28835. style: style,
  28836. ignore: 'T'
  28837. };
  28838. node.children = undefined;
  28839. this.xml = false;
  28840. config.ignoreTags.style = true;
  28841. return;
  28842. }
  28843. // 转换 align 属性
  28844. if (attrs.align) {
  28845. if (node.name === 'table') {
  28846. if (attrs.align === 'center') {
  28847. styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';
  28848. } else {
  28849. styleObj.float = attrs.align;
  28850. }
  28851. } else {
  28852. styleObj['text-align'] = attrs.align;
  28853. }
  28854. attrs.align = undefined;
  28855. }
  28856. // 转换 dir 属性
  28857. if (attrs.dir) {
  28858. styleObj.direction = attrs.dir;
  28859. attrs.dir = undefined;
  28860. }
  28861. // 转换 font 标签的属性
  28862. if (node.name === 'font') {
  28863. if (attrs.color) {
  28864. styleObj.color = attrs.color;
  28865. attrs.color = undefined;
  28866. }
  28867. if (attrs.face) {
  28868. styleObj['font-family'] = attrs.face;
  28869. attrs.face = undefined;
  28870. }
  28871. if (attrs.size) {
  28872. var size = parseInt(attrs.size);
  28873. if (!isNaN(size)) {
  28874. if (size < 1) {
  28875. size = 1;
  28876. } else if (size > 7) {
  28877. size = 7;
  28878. }
  28879. styleObj['font-size'] = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large'][size - 1];
  28880. }
  28881. attrs.size = undefined;
  28882. }
  28883. }
  28884. // 一些编辑器的自带 class
  28885. if ((attrs.class || '').includes('align-center')) {
  28886. styleObj['text-align'] = 'center';
  28887. }
  28888. Object.assign(styleObj, this.parseStyle(node));
  28889. if (node.name !== 'table' && parseInt(styleObj.width) > windowWidth) {
  28890. styleObj['max-width'] = '100%';
  28891. styleObj['box-sizing'] = 'border-box';
  28892. }
  28893. if (config.blockTags[node.name]) {
  28894. node.name = 'div';
  28895. } else if (!config.trustTags[node.name] && !this.xml) {
  28896. // 未知标签转为 span,避免无法显示
  28897. node.name = 'span';
  28898. }
  28899. if (node.name === 'a' || node.name === 'ad') {
  28900. this.expose();
  28901. } else if (node.name === 'video') {
  28902. if ((styleObj.height || '').includes('auto')) {
  28903. styleObj.height = undefined;
  28904. }
  28905. } else if ((node.name === 'ul' || node.name === 'ol') && node.c) {
  28906. // 列表处理
  28907. var types = {
  28908. a: 'lower-alpha',
  28909. A: 'upper-alpha',
  28910. i: 'lower-roman',
  28911. I: 'upper-roman'
  28912. };
  28913. if (types[attrs.type]) {
  28914. attrs.style += ';list-style-type:' + types[attrs.type];
  28915. attrs.type = undefined;
  28916. }
  28917. for (var _i3 = children.length; _i3--;) {
  28918. if (children[_i3].name === 'li') {
  28919. children[_i3].c = 1;
  28920. }
  28921. }
  28922. } else if (node.name === 'table') {
  28923. // 表格处理
  28924. // cellpadding、cellspacing、border 这几个常用表格属性需要通过转换实现
  28925. var padding = parseFloat(attrs.cellpadding);
  28926. var spacing = parseFloat(attrs.cellspacing);
  28927. var border = parseFloat(attrs.border);
  28928. var bordercolor = styleObj['border-color'];
  28929. var borderstyle = styleObj['border-style'];
  28930. if (node.c) {
  28931. // padding 和 spacing 默认 2
  28932. if (isNaN(padding)) {
  28933. padding = 2;
  28934. }
  28935. if (isNaN(spacing)) {
  28936. spacing = 2;
  28937. }
  28938. }
  28939. if (border) {
  28940. attrs.style += ";border:".concat(border, "px ").concat(borderstyle || 'solid', " ").concat(bordercolor || 'gray');
  28941. }
  28942. if (node.flag && node.c) {
  28943. // 有 colspan 或 rowspan 且含有链接的表格通过 grid 布局实现
  28944. styleObj.display = 'grid';
  28945. if (spacing) {
  28946. styleObj['grid-gap'] = spacing + 'px';
  28947. styleObj.padding = spacing + 'px';
  28948. } else if (border) {
  28949. // 无间隔的情况下避免边框重叠
  28950. attrs.style += ';border-left:0;border-top:0';
  28951. }
  28952. var width = []; // 表格的列宽
  28953. var trList = []; // tr 列表
  28954. var cells = []; // 保存新的单元格
  28955. var map = {}; // 被合并单元格占用的格子
  28956. (function traversal(nodes) {
  28957. for (var _i4 = 0; _i4 < nodes.length; _i4++) {
  28958. if (nodes[_i4].name === 'tr') {
  28959. trList.push(nodes[_i4]);
  28960. } else {
  28961. traversal(nodes[_i4].children || []);
  28962. }
  28963. }
  28964. })(children);
  28965. for (var row = 1; row <= trList.length; row++) {
  28966. var col = 1;
  28967. for (var j = 0; j < trList[row - 1].children.length; j++) {
  28968. var td = trList[row - 1].children[j];
  28969. if (td.name === 'td' || td.name === 'th') {
  28970. // 这个格子被上面的单元格占用,则列号++
  28971. while (map[row + '.' + col]) {
  28972. col++;
  28973. }
  28974. var _style2 = td.attrs.style || '';
  28975. var start = _style2.indexOf('width') ? _style2.indexOf(';width') : 0;
  28976. // 提取出 td 的宽度
  28977. if (start !== -1) {
  28978. var end = _style2.indexOf(';', start + 6);
  28979. if (end === -1) {
  28980. end = _style2.length;
  28981. }
  28982. if (!td.attrs.colspan) {
  28983. width[col] = _style2.substring(start ? start + 7 : 6, end);
  28984. }
  28985. _style2 = _style2.substr(0, start) + _style2.substr(end);
  28986. }
  28987. // 设置竖直对齐
  28988. _style2 += ';display:flex';
  28989. start = _style2.indexOf('vertical-align');
  28990. if (start !== -1) {
  28991. var val = _style2.substr(start + 15, 10);
  28992. if (val.includes('middle')) {
  28993. _style2 += ';align-items:center';
  28994. } else if (val.includes('bottom')) {
  28995. _style2 += ';align-items:flex-end';
  28996. }
  28997. } else {
  28998. _style2 += ';align-items:center';
  28999. }
  29000. // 设置水平对齐
  29001. start = _style2.indexOf('text-align');
  29002. if (start !== -1) {
  29003. var _val = _style2.substr(start + 11, 10);
  29004. if (_val.includes('center')) {
  29005. _style2 += ';justify-content: center';
  29006. } else if (_val.includes('right')) {
  29007. _style2 += ';justify-content: right';
  29008. }
  29009. }
  29010. _style2 = (border ? ";border:".concat(border, "px ").concat(borderstyle || 'solid', " ").concat(bordercolor || 'gray') + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? ";padding:".concat(padding, "px") : '') + ';' + _style2;
  29011. // 处理列合并
  29012. if (td.attrs.colspan) {
  29013. _style2 += ";grid-column-start:".concat(col, ";grid-column-end:").concat(col + parseInt(td.attrs.colspan));
  29014. if (!td.attrs.rowspan) {
  29015. _style2 += ";grid-row-start:".concat(row, ";grid-row-end:").concat(row + 1);
  29016. }
  29017. col += parseInt(td.attrs.colspan) - 1;
  29018. }
  29019. // 处理行合并
  29020. if (td.attrs.rowspan) {
  29021. _style2 += ";grid-row-start:".concat(row, ";grid-row-end:").concat(row + parseInt(td.attrs.rowspan));
  29022. if (!td.attrs.colspan) {
  29023. _style2 += ";grid-column-start:".concat(col, ";grid-column-end:").concat(col + 1);
  29024. }
  29025. // 记录下方单元格被占用
  29026. for (var rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
  29027. for (var colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
  29028. map[row + rowspan + '.' + (col - colspan)] = 1;
  29029. }
  29030. }
  29031. }
  29032. if (_style2) {
  29033. td.attrs.style = _style2;
  29034. }
  29035. cells.push(td);
  29036. col++;
  29037. }
  29038. }
  29039. if (row === 1) {
  29040. var temp = '';
  29041. for (var _i5 = 1; _i5 < col; _i5++) {
  29042. temp += (width[_i5] ? width[_i5] : 'auto') + ' ';
  29043. }
  29044. styleObj['grid-template-columns'] = temp;
  29045. }
  29046. }
  29047. node.children = cells;
  29048. } else {
  29049. // 没有使用合并单元格的表格通过 table 布局实现
  29050. if (node.c) {
  29051. styleObj.display = 'table';
  29052. }
  29053. if (!isNaN(spacing)) {
  29054. styleObj['border-spacing'] = spacing + 'px';
  29055. }
  29056. if (border || padding) {
  29057. // 遍历
  29058. (function traversal(nodes) {
  29059. for (var _i6 = 0; _i6 < nodes.length; _i6++) {
  29060. var _td = nodes[_i6];
  29061. if (_td.name === 'th' || _td.name === 'td') {
  29062. if (border) {
  29063. _td.attrs.style = "border:".concat(border, "px ").concat(borderstyle || 'solid', " ").concat(bordercolor || 'gray', ";").concat(_td.attrs.style || '');
  29064. }
  29065. if (padding) {
  29066. _td.attrs.style = "padding:".concat(padding, "px;").concat(_td.attrs.style || '');
  29067. }
  29068. } else if (_td.children) {
  29069. traversal(_td.children);
  29070. }
  29071. }
  29072. })(children);
  29073. }
  29074. }
  29075. // 给表格添加一个单独的横向滚动层
  29076. if (this.options.scrollTable && !(attrs.style || '').includes('inline')) {
  29077. var table = Object.assign({}, node);
  29078. node.name = 'div';
  29079. node.attrs = {
  29080. style: 'overflow:auto'
  29081. };
  29082. node.children = [table];
  29083. attrs = table.attrs;
  29084. }
  29085. } else if ((node.name === 'td' || node.name === 'th') && (attrs.colspan || attrs.rowspan)) {
  29086. for (var _i7 = this.stack.length; _i7--;) {
  29087. if (this.stack[_i7].name === 'table') {
  29088. this.stack[_i7].flag = 1; // 指示含有合并单元格
  29089. break;
  29090. }
  29091. }
  29092. } else if (node.name === 'ruby') {
  29093. // 转换 ruby
  29094. node.name = 'span';
  29095. for (var _i8 = 0; _i8 < children.length - 1; _i8++) {
  29096. if (children[_i8].type === 'text' && children[_i8 + 1].name === 'rt') {
  29097. children[_i8] = {
  29098. name: 'div',
  29099. attrs: {
  29100. style: 'display:inline-block;text-align:center'
  29101. },
  29102. children: [{
  29103. name: 'div',
  29104. attrs: {
  29105. style: 'font-size:50%;' + (children[_i8 + 1].attrs.style || '')
  29106. },
  29107. children: children[_i8 + 1].children
  29108. }, children[_i8]]
  29109. };
  29110. children.splice(_i8 + 1, 1);
  29111. }
  29112. }
  29113. } else if (node.c) {
  29114. (function traversal(node) {
  29115. node.c = 2;
  29116. for (var _i9 = node.children.length; _i9--;) {
  29117. var child = node.children[_i9];
  29118. if (!child.c || child.name === 'table') {
  29119. node.c = 1;
  29120. }
  29121. }
  29122. })(node);
  29123. }
  29124. if ((styleObj.display || '').includes('flex') && !node.c) {
  29125. for (var _i10 = children.length; _i10--;) {
  29126. var item = children[_i10];
  29127. if (item.f) {
  29128. item.attrs.style = (item.attrs.style || '') + item.f;
  29129. item.f = undefined;
  29130. }
  29131. }
  29132. }
  29133. // flex 布局时部分样式需要提取到 rich-text 外层
  29134. var flex = parent && ((parent.attrs.style || '').includes('flex') || (parent.attrs.style || '').includes('grid'))
  29135. // 检查基础库版本 virtualHost 是否可用
  29136. && !(node.c && wx.getNFCAdapter); // eslint-disable-line
  29137. if (flex) {
  29138. node.f = ';max-width:100%';
  29139. }
  29140. if (children.length >= 50 && node.c && !(styleObj.display || '').includes('flex')) {
  29141. mergeNodes(children);
  29142. }
  29143. for (var key in styleObj) {
  29144. if (styleObj[key]) {
  29145. var _val2 = ";".concat(key, ":").concat(styleObj[key].replace(' !important', ''));
  29146. if (flex && (key.includes('flex') && key !== 'flex-direction' || key === 'align-self' || key.includes('grid') || styleObj[key][0] === '-' || key.includes('width') && _val2.includes('%'))) {
  29147. node.f += _val2;
  29148. if (key === 'width') {
  29149. attrs.style += ';width:100%';
  29150. }
  29151. } else {
  29152. attrs.style += _val2;
  29153. }
  29154. }
  29155. }
  29156. attrs.style = attrs.style.substr(1) || undefined;
  29157. };
  29158. /**
  29159. * @description 解析到文本
  29160. * @param {String} text 文本内容
  29161. */
  29162. Parser.prototype.onText = function (text) {
  29163. if (!this.pre) {
  29164. // 合并空白符
  29165. var trim = '';
  29166. var flag;
  29167. for (var i = 0, len = text.length; i < len; i++) {
  29168. if (!blankChar[text[i]]) {
  29169. trim += text[i];
  29170. } else {
  29171. if (trim[trim.length - 1] !== ' ') {
  29172. trim += ' ';
  29173. }
  29174. if (text[i] === '\n' && !flag) {
  29175. flag = true;
  29176. }
  29177. }
  29178. }
  29179. // 去除含有换行符的空串
  29180. if (trim === ' ') {
  29181. if (flag) return;
  29182. }
  29183. text = trim;
  29184. }
  29185. var node = Object.create(null);
  29186. node.type = 'text';
  29187. node.text = decodeEntity(text);
  29188. if (this.hook(node)) {
  29189. if (this.options.selectable === 'force' && system.includes('iOS') && !uni.canIUse('rich-text.user-select')) {
  29190. this.expose();
  29191. }
  29192. var siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  29193. siblings.push(node);
  29194. }
  29195. };
  29196. /**
  29197. * @description html 词法分析器
  29198. * @param {Object} handler 高层处理器
  29199. */
  29200. function Lexer(handler) {
  29201. this.handler = handler;
  29202. }
  29203. /**
  29204. * @description 执行解析
  29205. * @param {String} content 要解析的文本
  29206. */
  29207. Lexer.prototype.parse = function (content) {
  29208. this.content = content || '';
  29209. this.i = 0; // 标记解析位置
  29210. this.start = 0; // 标记一个单词的开始位置
  29211. this.state = this.text; // 当前状态
  29212. for (var len = this.content.length; this.i !== -1 && this.i < len;) {
  29213. this.state();
  29214. }
  29215. };
  29216. /**
  29217. * @description 检查标签是否闭合
  29218. * @param {String} method 如果闭合要进行的操作
  29219. * @returns {Boolean} 是否闭合
  29220. * @private
  29221. */
  29222. Lexer.prototype.checkClose = function (method) {
  29223. var selfClose = this.content[this.i] === '/';
  29224. if (this.content[this.i] === '>' || selfClose && this.content[this.i + 1] === '>') {
  29225. if (method) {
  29226. this.handler[method](this.content.substring(this.start, this.i));
  29227. }
  29228. this.i += selfClose ? 2 : 1;
  29229. this.start = this.i;
  29230. this.handler.onOpenTag(selfClose);
  29231. if (this.handler.tagName === 'script') {
  29232. this.i = this.content.indexOf('</', this.i);
  29233. if (this.i !== -1) {
  29234. this.i += 2;
  29235. this.start = this.i;
  29236. }
  29237. this.state = this.endTag;
  29238. } else {
  29239. this.state = this.text;
  29240. }
  29241. return true;
  29242. }
  29243. return false;
  29244. };
  29245. /**
  29246. * @description 文本状态
  29247. * @private
  29248. */
  29249. Lexer.prototype.text = function () {
  29250. this.i = this.content.indexOf('<', this.i); // 查找最近的标签
  29251. if (this.i === -1) {
  29252. // 没有标签了
  29253. if (this.start < this.content.length) {
  29254. this.handler.onText(this.content.substring(this.start, this.content.length));
  29255. }
  29256. return;
  29257. }
  29258. var c = this.content[this.i + 1];
  29259. if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') {
  29260. // 标签开头
  29261. if (this.start !== this.i) {
  29262. this.handler.onText(this.content.substring(this.start, this.i));
  29263. }
  29264. this.start = ++this.i;
  29265. this.state = this.tagName;
  29266. } else if (c === '/' || c === '!' || c === '?') {
  29267. if (this.start !== this.i) {
  29268. this.handler.onText(this.content.substring(this.start, this.i));
  29269. }
  29270. var next = this.content[this.i + 2];
  29271. if (c === '/' && (next >= 'a' && next <= 'z' || next >= 'A' && next <= 'Z')) {
  29272. // 标签结尾
  29273. this.i += 2;
  29274. this.start = this.i;
  29275. this.state = this.endTag;
  29276. return;
  29277. }
  29278. // 处理注释
  29279. var end = '-->';
  29280. if (c !== '!' || this.content[this.i + 2] !== '-' || this.content[this.i + 3] !== '-') {
  29281. end = '>';
  29282. }
  29283. this.i = this.content.indexOf(end, this.i);
  29284. if (this.i !== -1) {
  29285. this.i += end.length;
  29286. this.start = this.i;
  29287. }
  29288. } else {
  29289. this.i++;
  29290. }
  29291. };
  29292. /**
  29293. * @description 标签名状态
  29294. * @private
  29295. */
  29296. Lexer.prototype.tagName = function () {
  29297. if (blankChar[this.content[this.i]]) {
  29298. // 解析到标签名
  29299. this.handler.onTagName(this.content.substring(this.start, this.i));
  29300. while (blankChar[this.content[++this.i]]) {
  29301. ;
  29302. }
  29303. if (this.i < this.content.length && !this.checkClose()) {
  29304. this.start = this.i;
  29305. this.state = this.attrName;
  29306. }
  29307. } else if (!this.checkClose('onTagName')) {
  29308. this.i++;
  29309. }
  29310. };
  29311. /**
  29312. * @description 属性名状态
  29313. * @private
  29314. */
  29315. Lexer.prototype.attrName = function () {
  29316. var c = this.content[this.i];
  29317. if (blankChar[c] || c === '=') {
  29318. // 解析到属性名
  29319. this.handler.onAttrName(this.content.substring(this.start, this.i));
  29320. var needVal = c === '=';
  29321. var len = this.content.length;
  29322. while (++this.i < len) {
  29323. c = this.content[this.i];
  29324. if (!blankChar[c]) {
  29325. if (this.checkClose()) return;
  29326. if (needVal) {
  29327. // 等号后遇到第一个非空字符
  29328. this.start = this.i;
  29329. this.state = this.attrVal;
  29330. return;
  29331. }
  29332. if (this.content[this.i] === '=') {
  29333. needVal = true;
  29334. } else {
  29335. this.start = this.i;
  29336. this.state = this.attrName;
  29337. return;
  29338. }
  29339. }
  29340. }
  29341. } else if (!this.checkClose('onAttrName')) {
  29342. this.i++;
  29343. }
  29344. };
  29345. /**
  29346. * @description 属性值状态
  29347. * @private
  29348. */
  29349. Lexer.prototype.attrVal = function () {
  29350. var c = this.content[this.i];
  29351. var len = this.content.length;
  29352. if (c === '"' || c === "'") {
  29353. // 有冒号的属性
  29354. this.start = ++this.i;
  29355. this.i = this.content.indexOf(c, this.i);
  29356. if (this.i === -1) return;
  29357. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  29358. } else {
  29359. // 没有冒号的属性
  29360. for (; this.i < len; this.i++) {
  29361. if (blankChar[this.content[this.i]]) {
  29362. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  29363. break;
  29364. } else if (this.checkClose('onAttrVal')) return;
  29365. }
  29366. }
  29367. while (blankChar[this.content[++this.i]]) {
  29368. ;
  29369. }
  29370. if (this.i < len && !this.checkClose()) {
  29371. this.start = this.i;
  29372. this.state = this.attrName;
  29373. }
  29374. };
  29375. /**
  29376. * @description 结束标签状态
  29377. * @returns {String} 结束的标签名
  29378. * @private
  29379. */
  29380. Lexer.prototype.endTag = function () {
  29381. var c = this.content[this.i];
  29382. if (blankChar[c] || c === '>' || c === '/') {
  29383. this.handler.onCloseTag(this.content.substring(this.start, this.i));
  29384. if (c !== '>') {
  29385. this.i = this.content.indexOf('>', this.i);
  29386. if (this.i === -1) return;
  29387. }
  29388. this.start = ++this.i;
  29389. this.state = this.text;
  29390. } else {
  29391. this.i++;
  29392. }
  29393. };
  29394. var _default = Parser;
  29395. exports.default = _default;
  29396. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  29397. /***/ }),
  29398. /***/ 56:
  29399. /*!*************************************************************!*\
  29400. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/function/$parent.js ***!
  29401. \*************************************************************/
  29402. /*! no static exports found */
  29403. /***/ (function(module, exports, __webpack_require__) {
  29404. "use strict";
  29405. Object.defineProperty(exports, "__esModule", {
  29406. value: true
  29407. });
  29408. exports.default = $parent;
  29409. // 获取父组件的参数,在支付宝小程序中不支持provide/inject的写法
  29410. // 在非H5中this.$parent可以获取到父组件,但是在H5中需要多次调用this.$parent.$parent.xxx
  29411. // 传递默认值undefined表示查找最顶层的$parent
  29412. function $parent() {
  29413. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  29414. var parent = this.$parent;
  29415. // 通过whle遍历,这里主要是为了H5需要多层解析
  29416. while (parent) {
  29417. // 父组件
  29418. if (parent.$options && parent.$options.name !== name) {
  29419. // 如果组件的name不相等,则继续查找
  29420. parent = parent.$parent;
  29421. } else {
  29422. return parent;
  29423. }
  29424. }
  29425. return false;
  29426. }
  29427. /***/ }),
  29428. /***/ 57:
  29429. /*!************************************************************!*\
  29430. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/function/string.js ***!
  29431. \************************************************************/
  29432. /*! no static exports found */
  29433. /***/ (function(module, exports, __webpack_require__) {
  29434. "use strict";
  29435. Object.defineProperty(exports, "__esModule", {
  29436. value: true
  29437. });
  29438. exports.default = void 0;
  29439. /**
  29440. * 去掉字符串中空格
  29441. *
  29442. * @param {String} str 待处理的字符串
  29443. * @param {String} type 处理类型
  29444. */
  29445. function trim(str) {
  29446. var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  29447. if (type === 'both') {
  29448. return str.replace(/^\s+|\s+$/g, "");
  29449. } else if (type === 'left') {
  29450. return str.replace(/^\s*/g, "");
  29451. } else if (type === 'right') {
  29452. return str.replace(/(\s*$)/g, "");
  29453. } else if (type === 'all') {
  29454. return str.replace(/\s+/g, "");
  29455. } else {
  29456. return str;
  29457. }
  29458. }
  29459. /**
  29460. * 获取带单位的长度值
  29461. *
  29462. * @param {String} value 待处理的值
  29463. * @param {String} unit 单位
  29464. */
  29465. function getLengthUnitValue(value) {
  29466. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  29467. if (!value) {
  29468. return '';
  29469. }
  29470. if (/(%|px|rpx|auto)$/.test(value)) return value;else return value + unit;
  29471. }
  29472. /**
  29473. * 将驼峰命名的字符串转换为指定连接符来进行连接
  29474. *
  29475. * @param {Object} string 待转换的字符串
  29476. * @param {Object} replace 进行连接的字符
  29477. */
  29478. function humpConvertChar(string) {
  29479. var replace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_';
  29480. if (!string || !replace) {
  29481. return '';
  29482. }
  29483. return string.replace(/([A-Z])/g, "".concat(replace, "$1")).toLowerCase();
  29484. }
  29485. /**
  29486. * 将用指定连接符来进行连接的字符串转为驼峰命名的字符串
  29487. *
  29488. * @param {Object} string 待转换的字符串
  29489. * @param {Object} replace 进行连接的字符
  29490. */
  29491. function charConvertHump(string) {
  29492. var replace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_';
  29493. if (!string || !replace) {
  29494. return '';
  29495. }
  29496. var reg = RegExp(replace + "(\\w)", "g");
  29497. return string.replace(reg, function (all, letter) {
  29498. return letter.toUpperCase();
  29499. });
  29500. }
  29501. var _default = {
  29502. trim: trim,
  29503. getLengthUnitValue: getLengthUnitValue,
  29504. humpConvertChar: humpConvertChar,
  29505. charConvertHump: charConvertHump
  29506. };
  29507. exports.default = _default;
  29508. /***/ }),
  29509. /***/ 58:
  29510. /*!************************************************************!*\
  29511. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/function/number.js ***!
  29512. \************************************************************/
  29513. /*! no static exports found */
  29514. /***/ (function(module, exports, __webpack_require__) {
  29515. "use strict";
  29516. Object.defineProperty(exports, "__esModule", {
  29517. value: true
  29518. });
  29519. exports.default = void 0;
  29520. /**
  29521. * 格式化数字字符串
  29522. * @param {String, Number} value 待格式化的字符串
  29523. * @param {Number} digits 保留位数
  29524. */
  29525. function formatNumberString(value) {
  29526. var digits = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
  29527. var number = 0;
  29528. // 判断是什么类型
  29529. if (typeof value === 'string') {
  29530. number = Number(value);
  29531. } else if (typeof value === 'number') {
  29532. number = value;
  29533. }
  29534. if (isNaN(number) || number === 0) {
  29535. return 0;
  29536. }
  29537. var maxNumber = Math.pow(10, digits) - 1;
  29538. if (number > maxNumber) {
  29539. return "".concat(maxNumber, "+");
  29540. }
  29541. return number;
  29542. }
  29543. /**
  29544. * 格式化数字字符串,往数字前添加0
  29545. *
  29546. * @param {Object} num 待格式化的数值
  29547. */
  29548. function formatNumberAddZero(value) {
  29549. var number = 0;
  29550. // 判断是什么类型
  29551. if (typeof value === 'string') {
  29552. number = Number(value);
  29553. } else if (typeof value === 'number') {
  29554. number = value;
  29555. }
  29556. if (isNaN(number) || +number < 10) {
  29557. return '0' + number;
  29558. } else {
  29559. return String(number);
  29560. }
  29561. }
  29562. /**
  29563. * 格式化数字,往数值后添加单位
  29564. *
  29565. * @param {Object} value 待格式化的数值
  29566. * @param {Object} digits 保留位数
  29567. */
  29568. function formatNumberAddPriceUnit(value) {
  29569. var digits = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
  29570. // 数值分割点
  29571. var unitSplit = [{
  29572. value: 1,
  29573. symbol: ''
  29574. }, {
  29575. value: 1E3,
  29576. symbol: 'K'
  29577. }, {
  29578. value: 1E4,
  29579. symbol: 'W'
  29580. }];
  29581. var reg = /\.0+$|(\.[0=9]*[1-9])0+$/;
  29582. var number = 0;
  29583. // 判断是什么类型
  29584. if (typeof value === 'string') {
  29585. number = Number(value);
  29586. } else if (typeof value === 'number') {
  29587. number = value;
  29588. }
  29589. var i;
  29590. for (i = unitSplit.length - 1; i > 0; i--) {
  29591. if (number >= unitSplit[i].value) break;
  29592. }
  29593. return (number / unitSplit[i].value).toFixed(digits).replace(reg, "$1") + unitSplit[i].symbol;
  29594. }
  29595. /**
  29596. * 获取数值的整数位数
  29597. *
  29598. * @param {Object} number 数值
  29599. */
  29600. function getDigit(number) {
  29601. var digit = -1;
  29602. while (number >= 1) {
  29603. digit++;
  29604. number = number / 10;
  29605. }
  29606. return digit;
  29607. }
  29608. /**
  29609. * 获取指定范围的随机数(返回整数)
  29610. * @param {Object} min 最小值
  29611. * @param {Object} max 最大值
  29612. */
  29613. function random(min, max) {
  29614. if (min >= 0 && max > 0 && max >= min) {
  29615. var gab = max - min;
  29616. return Math.random() * gab + min;
  29617. } else {
  29618. return 0;
  29619. }
  29620. }
  29621. /**
  29622. * 获取指定范围的随机数(返回整数)
  29623. * @param {Object} min 最小值
  29624. * @param {Object} max 最大值
  29625. */
  29626. function randomInt(min, max) {
  29627. if (min >= 0 && max > 0 && max >= min) {
  29628. var gab = max - min + 1;
  29629. return Math.floor(Math.random() * gab + min);
  29630. } else {
  29631. return 0;
  29632. }
  29633. }
  29634. var _default = {
  29635. formatNumberString: formatNumberString,
  29636. formatNumberAddZero: formatNumberAddZero,
  29637. formatNumberAddPriceUnit: formatNumberAddPriceUnit,
  29638. random: random,
  29639. randomInt: randomInt
  29640. };
  29641. exports.default = _default;
  29642. /***/ }),
  29643. /***/ 59:
  29644. /*!***************************************************************!*\
  29645. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/function/deepClone.js ***!
  29646. \***************************************************************/
  29647. /*! no static exports found */
  29648. /***/ (function(module, exports, __webpack_require__) {
  29649. "use strict";
  29650. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  29651. Object.defineProperty(exports, "__esModule", {
  29652. value: true
  29653. });
  29654. exports.default = void 0;
  29655. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  29656. /**
  29657. * 判断是否为数组
  29658. *
  29659. * @param {Object} arr
  29660. */
  29661. function isArray(arr) {
  29662. return Object.prototype.toString.call(arr) === '[object Array]';
  29663. }
  29664. /**
  29665. * 深度复制数据
  29666. *
  29667. * @param {Object} obj
  29668. */
  29669. function deepClone(obj) {
  29670. if ([null, undefined, NaN, false].includes(obj)) return obj;
  29671. if ((0, _typeof2.default)(obj) !== 'object' && typeof obj !== 'function') {
  29672. return obj;
  29673. }
  29674. var o = isArray(obj) ? [] : {};
  29675. for (var i in obj) {
  29676. if (obj.hasOwnProperty(i)) {
  29677. o[i] = (0, _typeof2.default)(obj[i]) === 'object' ? deepClone(obj[i]) : obj[i];
  29678. }
  29679. }
  29680. return o;
  29681. }
  29682. var _default = deepClone;
  29683. exports.default = _default;
  29684. /***/ }),
  29685. /***/ 6:
  29686. /*!***************************************************************!*\
  29687. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  29688. \***************************************************************/
  29689. /*! no static exports found */
  29690. /***/ (function(module, exports) {
  29691. function _arrayWithHoles(arr) {
  29692. if (Array.isArray(arr)) return arr;
  29693. }
  29694. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  29695. /***/ }),
  29696. /***/ 60:
  29697. /*!**********************************************************!*\
  29698. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/config/zIndex.js ***!
  29699. \**********************************************************/
  29700. /*! no static exports found */
  29701. /***/ (function(module, exports, __webpack_require__) {
  29702. "use strict";
  29703. Object.defineProperty(exports, "__esModule", {
  29704. value: true
  29705. });
  29706. exports.default = void 0;
  29707. // 各组件的z-index值
  29708. var _default = {
  29709. landsacpe: 29100,
  29710. navbar: 29090,
  29711. toast: 20090,
  29712. goodsNav: 20089,
  29713. alert: 20085,
  29714. modal: 20080,
  29715. popup: 20075,
  29716. tips: 19080,
  29717. sticky: 19075,
  29718. indexListSticky: 19070,
  29719. fab: 19060,
  29720. mask: 9999,
  29721. tableTr: 1001,
  29722. tableTd: 1000
  29723. };
  29724. exports.default = _default;
  29725. /***/ }),
  29726. /***/ 61:
  29727. /*!*********************************************************!*\
  29728. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/config/color.js ***!
  29729. \*********************************************************/
  29730. /*! no static exports found */
  29731. /***/ (function(module, exports, __webpack_require__) {
  29732. "use strict";
  29733. Object.defineProperty(exports, "__esModule", {
  29734. value: true
  29735. });
  29736. exports.default = void 0;
  29737. // TuniaoUI颜色值
  29738. var _default = {
  29739. mainColor: '#01BEFF',
  29740. reverseMainColor: '#FFF00D',
  29741. femaleColor: '#FF71D2',
  29742. maleColor: '#82B2FF',
  29743. mainOrange: '#FBBD12',
  29744. bgColor: '#FFFFFF',
  29745. spaceColor: '#F8F7F8',
  29746. fontColor: '#080808',
  29747. fontSubColor: '#AAAAAA',
  29748. contentColor: '#838383',
  29749. fontHolderColor: '#E6E6E6',
  29750. maskBgColor: 'rgba(0, 0, 0, 0.4)'
  29751. };
  29752. exports.default = _default;
  29753. /***/ }),
  29754. /***/ 62:
  29755. /*!********************************************!*\
  29756. !*** E:/盈通/sulibao-mini/store/$t.mixin.js ***!
  29757. \********************************************/
  29758. /*! no static exports found */
  29759. /***/ (function(module, exports, __webpack_require__) {
  29760. "use strict";
  29761. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  29762. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  29763. var _vuex = __webpack_require__(/*! vuex */ 31);
  29764. var _store = _interopRequireDefault(__webpack_require__(/*! @/store */ 30));
  29765. 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; }
  29766. 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; }
  29767. // 尝试将用户在根目录中的store/index.js的vuex的state变量加载到全局变量中
  29768. var $tStoreKey = [];
  29769. try {
  29770. $tStoreKey = _store.default.state ? Object.keys(_store.default.state) : [];
  29771. } catch (e) {}
  29772. module.exports = {
  29773. beforeCreate: function beforeCreate() {
  29774. var _this = this;
  29775. // 将vuex方法挂在在$t中
  29776. // 使用方法:
  29777. // 修改vuex的state中的user.name变量为速立保小菜 => this.$t.vuex('user.name', '速立保小菜')
  29778. // 修改vuexde state中的version变量为1.0.1 => this.$t.vuex('version', 1.0.1)
  29779. this.$t.vuex = function (name, value) {
  29780. _this.$store.commit('$tStore', {
  29781. name: name,
  29782. value: value
  29783. });
  29784. };
  29785. },
  29786. computed: _objectSpread({}, (0, _vuex.mapState)($tStoreKey))
  29787. };
  29788. /***/ }),
  29789. /***/ 63:
  29790. /*!**********************************************************!*\
  29791. !*** E:/盈通/sulibao-mini/tuniao-ui/libs/mixin/mpShare.js ***!
  29792. \**********************************************************/
  29793. /*! no static exports found */
  29794. /***/ (function(module, exports, __webpack_require__) {
  29795. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  29796. onLoad: function onLoad() {
  29797. // 设置默认的转发参数
  29798. this.$t.mpShare = {
  29799. // 分享的标题,默认为小程序名称
  29800. title: '',
  29801. // 分享的路径,默认为当前页面
  29802. path: '',
  29803. // 分享时显示的图片,默认为当前页面截图
  29804. imageUrl: '',
  29805. // 当前页面是否可以分享
  29806. share: true
  29807. };
  29808. if (!this.$t.mpShare.share) {
  29809. uni.hideShareMenu();
  29810. }
  29811. },
  29812. onShareAppMessage: function onShareAppMessage() {
  29813. return this.$t.mpShare;
  29814. },
  29815. onShareTimeline: function onShareTimeline() {
  29816. return {
  29817. title: this.$t.mpShare.title,
  29818. query: this.$t.mpShare.path.substring(this.$t.mpShare.path.indexOf('?') + 1, this.$t.mpShare.path.length),
  29819. imageUrl: this.$t.mpShare.imageUrl
  29820. };
  29821. }
  29822. };
  29823. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  29824. /***/ }),
  29825. /***/ 7:
  29826. /*!*********************************************************************!*\
  29827. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  29828. \*********************************************************************/
  29829. /*! no static exports found */
  29830. /***/ (function(module, exports) {
  29831. function _iterableToArrayLimit(r, l) {
  29832. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  29833. if (null != t) {
  29834. var e,
  29835. n,
  29836. i,
  29837. u,
  29838. a = [],
  29839. f = !0,
  29840. o = !1;
  29841. try {
  29842. if (i = (t = t.call(r)).next, 0 === l) {
  29843. if (Object(t) !== t) return;
  29844. f = !1;
  29845. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) {
  29846. ;
  29847. }
  29848. } catch (r) {
  29849. o = !0, n = r;
  29850. } finally {
  29851. try {
  29852. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  29853. } finally {
  29854. if (o) throw n;
  29855. }
  29856. }
  29857. return a;
  29858. }
  29859. }
  29860. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  29861. /***/ }),
  29862. /***/ 75:
  29863. /*!************************************************************************************************!*\
  29864. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  29865. \************************************************************************************************/
  29866. /*! no static exports found */
  29867. /***/ (function(module, exports, __webpack_require__) {
  29868. // TODO(Babel 8): Remove this file.
  29869. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 76)();
  29870. module.exports = runtime;
  29871. /***/ }),
  29872. /***/ 76:
  29873. /*!*******************************************************************!*\
  29874. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  29875. \*******************************************************************/
  29876. /*! no static exports found */
  29877. /***/ (function(module, exports, __webpack_require__) {
  29878. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  29879. function _regeneratorRuntime() {
  29880. "use strict";
  29881. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  29882. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  29883. return e;
  29884. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  29885. var t,
  29886. e = {},
  29887. r = Object.prototype,
  29888. n = r.hasOwnProperty,
  29889. o = Object.defineProperty || function (t, e, r) {
  29890. t[e] = r.value;
  29891. },
  29892. i = "function" == typeof Symbol ? Symbol : {},
  29893. a = i.iterator || "@@iterator",
  29894. c = i.asyncIterator || "@@asyncIterator",
  29895. u = i.toStringTag || "@@toStringTag";
  29896. function define(t, e, r) {
  29897. return Object.defineProperty(t, e, {
  29898. value: r,
  29899. enumerable: !0,
  29900. configurable: !0,
  29901. writable: !0
  29902. }), t[e];
  29903. }
  29904. try {
  29905. define({}, "");
  29906. } catch (t) {
  29907. define = function define(t, e, r) {
  29908. return t[e] = r;
  29909. };
  29910. }
  29911. function wrap(t, e, r, n) {
  29912. var i = e && e.prototype instanceof Generator ? e : Generator,
  29913. a = Object.create(i.prototype),
  29914. c = new Context(n || []);
  29915. return o(a, "_invoke", {
  29916. value: makeInvokeMethod(t, r, c)
  29917. }), a;
  29918. }
  29919. function tryCatch(t, e, r) {
  29920. try {
  29921. return {
  29922. type: "normal",
  29923. arg: t.call(e, r)
  29924. };
  29925. } catch (t) {
  29926. return {
  29927. type: "throw",
  29928. arg: t
  29929. };
  29930. }
  29931. }
  29932. e.wrap = wrap;
  29933. var h = "suspendedStart",
  29934. l = "suspendedYield",
  29935. f = "executing",
  29936. s = "completed",
  29937. y = {};
  29938. function Generator() {}
  29939. function GeneratorFunction() {}
  29940. function GeneratorFunctionPrototype() {}
  29941. var p = {};
  29942. define(p, a, function () {
  29943. return this;
  29944. });
  29945. var d = Object.getPrototypeOf,
  29946. v = d && d(d(values([])));
  29947. v && v !== r && n.call(v, a) && (p = v);
  29948. var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
  29949. function defineIteratorMethods(t) {
  29950. ["next", "throw", "return"].forEach(function (e) {
  29951. define(t, e, function (t) {
  29952. return this._invoke(e, t);
  29953. });
  29954. });
  29955. }
  29956. function AsyncIterator(t, e) {
  29957. function invoke(r, o, i, a) {
  29958. var c = tryCatch(t[r], t, o);
  29959. if ("throw" !== c.type) {
  29960. var u = c.arg,
  29961. h = u.value;
  29962. return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
  29963. invoke("next", t, i, a);
  29964. }, function (t) {
  29965. invoke("throw", t, i, a);
  29966. }) : e.resolve(h).then(function (t) {
  29967. u.value = t, i(u);
  29968. }, function (t) {
  29969. return invoke("throw", t, i, a);
  29970. });
  29971. }
  29972. a(c.arg);
  29973. }
  29974. var r;
  29975. o(this, "_invoke", {
  29976. value: function value(t, n) {
  29977. function callInvokeWithMethodAndArg() {
  29978. return new e(function (e, r) {
  29979. invoke(t, n, e, r);
  29980. });
  29981. }
  29982. return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  29983. }
  29984. });
  29985. }
  29986. function makeInvokeMethod(e, r, n) {
  29987. var o = h;
  29988. return function (i, a) {
  29989. if (o === f) throw Error("Generator is already running");
  29990. if (o === s) {
  29991. if ("throw" === i) throw a;
  29992. return {
  29993. value: t,
  29994. done: !0
  29995. };
  29996. }
  29997. for (n.method = i, n.arg = a;;) {
  29998. var c = n.delegate;
  29999. if (c) {
  30000. var u = maybeInvokeDelegate(c, n);
  30001. if (u) {
  30002. if (u === y) continue;
  30003. return u;
  30004. }
  30005. }
  30006. if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
  30007. if (o === h) throw o = s, n.arg;
  30008. n.dispatchException(n.arg);
  30009. } else "return" === n.method && n.abrupt("return", n.arg);
  30010. o = f;
  30011. var p = tryCatch(e, r, n);
  30012. if ("normal" === p.type) {
  30013. if (o = n.done ? s : l, p.arg === y) continue;
  30014. return {
  30015. value: p.arg,
  30016. done: n.done
  30017. };
  30018. }
  30019. "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
  30020. }
  30021. };
  30022. }
  30023. function maybeInvokeDelegate(e, r) {
  30024. var n = r.method,
  30025. o = e.iterator[n];
  30026. if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
  30027. var i = tryCatch(o, e.iterator, r.arg);
  30028. if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
  30029. var a = i.arg;
  30030. return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
  30031. }
  30032. function pushTryEntry(t) {
  30033. var e = {
  30034. tryLoc: t[0]
  30035. };
  30036. 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
  30037. }
  30038. function resetTryEntry(t) {
  30039. var e = t.completion || {};
  30040. e.type = "normal", delete e.arg, t.completion = e;
  30041. }
  30042. function Context(t) {
  30043. this.tryEntries = [{
  30044. tryLoc: "root"
  30045. }], t.forEach(pushTryEntry, this), this.reset(!0);
  30046. }
  30047. function values(e) {
  30048. if (e || "" === e) {
  30049. var r = e[a];
  30050. if (r) return r.call(e);
  30051. if ("function" == typeof e.next) return e;
  30052. if (!isNaN(e.length)) {
  30053. var o = -1,
  30054. i = function next() {
  30055. for (; ++o < e.length;) {
  30056. if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
  30057. }
  30058. return next.value = t, next.done = !0, next;
  30059. };
  30060. return i.next = i;
  30061. }
  30062. }
  30063. throw new TypeError(_typeof(e) + " is not iterable");
  30064. }
  30065. return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
  30066. value: GeneratorFunctionPrototype,
  30067. configurable: !0
  30068. }), o(GeneratorFunctionPrototype, "constructor", {
  30069. value: GeneratorFunction,
  30070. configurable: !0
  30071. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
  30072. var e = "function" == typeof t && t.constructor;
  30073. return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
  30074. }, e.mark = function (t) {
  30075. return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
  30076. }, e.awrap = function (t) {
  30077. return {
  30078. __await: t
  30079. };
  30080. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
  30081. return this;
  30082. }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
  30083. void 0 === i && (i = Promise);
  30084. var a = new AsyncIterator(wrap(t, r, n, o), i);
  30085. return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
  30086. return t.done ? t.value : a.next();
  30087. });
  30088. }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
  30089. return this;
  30090. }), define(g, "toString", function () {
  30091. return "[object Generator]";
  30092. }), e.keys = function (t) {
  30093. var e = Object(t),
  30094. r = [];
  30095. for (var n in e) {
  30096. r.push(n);
  30097. }
  30098. return r.reverse(), function next() {
  30099. for (; r.length;) {
  30100. var t = r.pop();
  30101. if (t in e) return next.value = t, next.done = !1, next;
  30102. }
  30103. return next.done = !0, next;
  30104. };
  30105. }, e.values = values, Context.prototype = {
  30106. constructor: Context,
  30107. reset: function reset(e) {
  30108. if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) {
  30109. "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
  30110. }
  30111. },
  30112. stop: function stop() {
  30113. this.done = !0;
  30114. var t = this.tryEntries[0].completion;
  30115. if ("throw" === t.type) throw t.arg;
  30116. return this.rval;
  30117. },
  30118. dispatchException: function dispatchException(e) {
  30119. if (this.done) throw e;
  30120. var r = this;
  30121. function handle(n, o) {
  30122. return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
  30123. }
  30124. for (var o = this.tryEntries.length - 1; o >= 0; --o) {
  30125. var i = this.tryEntries[o],
  30126. a = i.completion;
  30127. if ("root" === i.tryLoc) return handle("end");
  30128. if (i.tryLoc <= this.prev) {
  30129. var c = n.call(i, "catchLoc"),
  30130. u = n.call(i, "finallyLoc");
  30131. if (c && u) {
  30132. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  30133. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  30134. } else if (c) {
  30135. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  30136. } else {
  30137. if (!u) throw Error("try statement without catch or finally");
  30138. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  30139. }
  30140. }
  30141. }
  30142. },
  30143. abrupt: function abrupt(t, e) {
  30144. for (var r = this.tryEntries.length - 1; r >= 0; --r) {
  30145. var o = this.tryEntries[r];
  30146. if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
  30147. var i = o;
  30148. break;
  30149. }
  30150. }
  30151. i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
  30152. var a = i ? i.completion : {};
  30153. return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
  30154. },
  30155. complete: function complete(t, e) {
  30156. if ("throw" === t.type) throw t.arg;
  30157. return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
  30158. },
  30159. finish: function finish(t) {
  30160. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  30161. var r = this.tryEntries[e];
  30162. if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
  30163. }
  30164. },
  30165. "catch": function _catch(t) {
  30166. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  30167. var r = this.tryEntries[e];
  30168. if (r.tryLoc === t) {
  30169. var n = r.completion;
  30170. if ("throw" === n.type) {
  30171. var o = n.arg;
  30172. resetTryEntry(r);
  30173. }
  30174. return o;
  30175. }
  30176. }
  30177. throw Error("illegal catch attempt");
  30178. },
  30179. delegateYield: function delegateYield(e, r, n) {
  30180. return this.delegate = {
  30181. iterator: values(e),
  30182. resultName: r,
  30183. nextLoc: n
  30184. }, "next" === this.method && (this.arg = t), y;
  30185. }
  30186. }, e;
  30187. }
  30188. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  30189. /***/ }),
  30190. /***/ 77:
  30191. /*!*****************************************************************!*\
  30192. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  30193. \*****************************************************************/
  30194. /*! no static exports found */
  30195. /***/ (function(module, exports) {
  30196. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  30197. try {
  30198. var info = gen[key](arg);
  30199. var value = info.value;
  30200. } catch (error) {
  30201. reject(error);
  30202. return;
  30203. }
  30204. if (info.done) {
  30205. resolve(value);
  30206. } else {
  30207. Promise.resolve(value).then(_next, _throw);
  30208. }
  30209. }
  30210. function _asyncToGenerator(fn) {
  30211. return function () {
  30212. var self = this,
  30213. args = arguments;
  30214. return new Promise(function (resolve, reject) {
  30215. var gen = fn.apply(self, args);
  30216. function _next(value) {
  30217. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  30218. }
  30219. function _throw(err) {
  30220. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  30221. }
  30222. _next(undefined);
  30223. });
  30224. };
  30225. }
  30226. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  30227. /***/ }),
  30228. /***/ 78:
  30229. /*!*******************************************!*\
  30230. !*** E:/盈通/sulibao-mini/utils/request.js ***!
  30231. \*******************************************/
  30232. /*! no static exports found */
  30233. /***/ (function(module, exports, __webpack_require__) {
  30234. "use strict";
  30235. /* WEBPACK VAR INJECTION */(function(uni) {
  30236. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  30237. Object.defineProperty(exports, "__esModule", {
  30238. value: true
  30239. });
  30240. exports.default = void 0;
  30241. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  30242. var _uni_request = _interopRequireDefault(__webpack_require__(/*! ../plugins/uni_request.js */ 79));
  30243. var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 30));
  30244. var _jsMd = _interopRequireDefault(__webpack_require__(/*! js-md5 */ 81));
  30245. var _uni_api = __webpack_require__(/*! ./uni_api */ 86);
  30246. var _config = __webpack_require__(/*! ../config.js */ 87);
  30247. 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; }
  30248. 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; }
  30249. // 初始化自定义参数 login 是否需要登录权限 cancel 是否取消上次请求
  30250. var defaultOptions = {
  30251. login: true,
  30252. auth: false,
  30253. cancel: false,
  30254. loading: true,
  30255. //是否显示 请求加载中
  30256. warn: true //是否异常弹窗提示
  30257. };
  30258. // 初始化请求
  30259. var instance = _uni_request.default.create({
  30260. baseURL: _config.VUE_APP_URL,
  30261. timeout: 100000,
  30262. debug: true
  30263. });
  30264. var setCancel;
  30265. // 请求拦截器
  30266. instance.interceptors.request.use(function (config) {
  30267. var token = _store.default.state.token; //'7221b77a-899b-492b-8263-9507f5c470e9';// store.state.token
  30268. //console.log("frontlixiangsid:"+token);
  30269. config.header['frontlixiangsid'] = token; //登录token 标志id
  30270. config.header['platType'] = 'slb';
  30271. config.header['mpType'] = 'engineer';
  30272. config.header['appType'] = 'ma';
  30273. config.cancelToken = new _uni_request.default.CancelToken(function executor(c) {
  30274. setCancel = c; //记录当前请求
  30275. });
  30276. config.timeStamp = new Date().getTime();
  30277. var jsToken = ""; //防重复提交
  30278. jsToken = (0, _jsMd.default)(JSON.stringify(config));
  30279. console.log('jsToken' + jsToken);
  30280. console.log(config);
  30281. config.data['tokenId'] = jsToken;
  30282. return config;
  30283. });
  30284. // 响应拦截器
  30285. instance.interceptors.response.use(function (response) {
  30286. // console.log('响应成功', response)
  30287. return response;
  30288. });
  30289. // 读取cookie
  30290. function getCookie(cookie, c_name) {
  30291. if (cookie && cookie.length > 0) {
  30292. var c_start = cookie.indexOf(c_name + "=");
  30293. if (c_start != -1) {
  30294. c_start = c_start + c_name.length + 1;
  30295. var c_end = cookie.indexOf(";", c_start);
  30296. if (c_end == -1) c_end = cookie.length;
  30297. return unescape(cookie.substring(c_start, c_end));
  30298. }
  30299. }
  30300. return "";
  30301. }
  30302. // 请求主体
  30303. function baseRequest(config, options) {
  30304. var login = options.login,
  30305. auth = options.auth,
  30306. cancel = options.cancel,
  30307. _options$loading = options.loading,
  30308. loading = _options$loading === void 0 ? true : _options$loading,
  30309. warn = options.warn;
  30310. if (options.cancel) {
  30311. cancelRequest();
  30312. }
  30313. loadingStatus(loading, true);
  30314. if (login && !_store.default.state.token) {
  30315. loadingStatus(loading, false);
  30316. // autoAuth();
  30317. }
  30318. return instance.request(config).then(function (res) {
  30319. if (config.url === '/slbMpAutoLogin' || config.url === '/slbSmLogin') {
  30320. try {
  30321. var cookie = res.header["set-cookie"] || res.header["Set-Cookie"];
  30322. var frontId = res.data.resultMap ? res.data.resultMap.frontlixiangsid || '' : '';
  30323. var frontlixiangsid = getCookie(cookie, "frontlixiangsid") || frontId;
  30324. if (frontlixiangsid == 'deleteMe' && frontId) {
  30325. frontlixiangsid = frontId;
  30326. }
  30327. if (frontlixiangsid && frontlixiangsid != 'deleteMe') {
  30328. // uni.setStorageSync('frontlixiangsid',frontlixiangsid)
  30329. _store.default.state.token = frontlixiangsid;
  30330. }
  30331. } catch (err) {
  30332. console.log(err);
  30333. }
  30334. }
  30335. //console.log(config);
  30336. loadingStatus(loading, false);
  30337. //console.log(res);
  30338. if (res.statusCode) {
  30339. var data = res.data;
  30340. console.log('instance.request', res);
  30341. console.log('instance.request data', data);
  30342. if (res.statusCode === 200) {
  30343. console.log('instance.request data 1', data);
  30344. if (data.state == 1) {
  30345. return Promise.resolve(data);
  30346. } else if (data.msg && (data.msg == '请勿频繁操作' || data.msg.indexOf('不能再次使用') > -1)) {
  30347. (0, _uni_api.uniShowToast)(data.msg);
  30348. return;
  30349. } else if (data._redirect || data.msg == '未登录') {
  30350. uni.removeStorageSync('userNo');
  30351. // if(uni.getStorageSync('userNo')){
  30352. // uniShowModal('', '账号过期,重新登录?', {
  30353. // showCancel: true,
  30354. // success: (res) => {
  30355. // if(res.confirm){
  30356. // //添加跳转 微信绑定公众号页面
  30357. // uni.redirectTo({
  30358. // url: '/pages/login/login'
  30359. // });
  30360. // }else{
  30361. // return Promise.resolve(data);
  30362. // }
  30363. // }
  30364. // })
  30365. // }
  30366. // store.commit("LOGOUT");
  30367. // uni.reLaunch({
  30368. // url: '/pages/index/auth'
  30369. // });
  30370. return Promise.resolve(data);
  30371. } else if (data.state == -1) {
  30372. return Promise.resolve(data);
  30373. } else if (data == '' || data == 'success' || data._redirect) {
  30374. console.log('instance.request data 2', data);
  30375. // store.commit("LOGOUT");
  30376. //未登录
  30377. if (!_store.default.state.isGOAuth) {
  30378. _store.default.commit("SET_GO_AUTH", true);
  30379. //判断是否是第一次加载第一次加载未登录不用弹框提醒
  30380. if (_store.default.state.isFirstLoad) {
  30381. _store.default.state.isFirstLoad = false;
  30382. uni.redirectTo({
  30383. url: '/pages/Login/Login'
  30384. });
  30385. return;
  30386. } else {
  30387. _store.default.state.isFirstLoad = false;
  30388. (0, _uni_api.uniShowModal)('', '账号过期重新登录认证', {
  30389. showCancel: false,
  30390. success: function success(res) {
  30391. //添加跳转 微信绑定公众号页面
  30392. uni.redirectTo({
  30393. url: '/pages/auth/auth'
  30394. });
  30395. }
  30396. });
  30397. return;
  30398. }
  30399. } else {
  30400. console.log('路由已存在,不再重复跳转');
  30401. return;
  30402. }
  30403. data.msg = '未登录';
  30404. return Promise.reject(data);
  30405. } else {
  30406. console.log('instance.request data 3', data);
  30407. //data.state == -301||
  30408. if (data.msg == undefined) {
  30409. if (uni.getStorageSync("loginFlag")) {
  30410. uni.redirectTo({
  30411. url: "/pages/Login/Login"
  30412. });
  30413. }
  30414. return;
  30415. }
  30416. if (warn) {
  30417. uni.redirectTo({
  30418. url: '/pages/error/error?code=' + data.state + '&msg=' + data.msg
  30419. });
  30420. return;
  30421. }
  30422. return Promise.resolve(data);
  30423. }
  30424. return Promise.resolve(res.data);
  30425. } else {
  30426. if (warn) {
  30427. responseError({
  30428. code: res.statusCode
  30429. });
  30430. }
  30431. return Promise.reject(res.data);
  30432. }
  30433. } else {
  30434. return Promise.reject(res.data);
  30435. }
  30436. loadingStatus(loading, false);
  30437. }).catch(function (err) {
  30438. loadingStatus(loading, false);
  30439. // if (warn) {
  30440. (0, _uni_api.uniShowToast)(err);
  30441. // }
  30442. return Promise.reject(err);
  30443. });
  30444. }
  30445. function cancelRequest() {
  30446. if (typeof setCancel === 'function') {
  30447. setCancel('取消请求');
  30448. }
  30449. loadingStatus(loading, false);
  30450. }
  30451. // 定义请求提示
  30452. var loadingStatus = function loadingStatus(loading, type) {
  30453. if (loading) {
  30454. if (type) {
  30455. // loadingToast('正在请求中');
  30456. // setTimeout(function () {
  30457. // uniHideLoading();
  30458. // }, 5000);//防水异常加载不关闭影响操作
  30459. } else {
  30460. // uniHideLoading();
  30461. }
  30462. } else {
  30463. return;
  30464. }
  30465. };
  30466. // 请求返回statusCode
  30467. var responseError = function responseError(_ref) {
  30468. var code = _ref.code;
  30469. var content = '';
  30470. switch (code) {
  30471. case 400:
  30472. content = '请求参数错误';
  30473. break;
  30474. case 401:
  30475. content = '未授权,请重新登录-401';
  30476. break;
  30477. case 403:
  30478. content = '没有访问权限-403';
  30479. break;
  30480. case 404:
  30481. content = '请求错误,未找到该资源-404';
  30482. break;
  30483. case 405:
  30484. content = '请求方式错误-405';
  30485. break;
  30486. case 408:
  30487. content = '请求超时';
  30488. break;
  30489. case 500:
  30490. content = '服务器异常-500';
  30491. break;
  30492. case 501:
  30493. content = '服务未实现';
  30494. break;
  30495. case 502:
  30496. content = '网关错误';
  30497. break;
  30498. case 503:
  30499. content = '服务不可用';
  30500. break;
  30501. case 504:
  30502. content = '网关超时';
  30503. break;
  30504. case 505:
  30505. content = 'HTTP版本不受支持';
  30506. break;
  30507. default:
  30508. content = '请求异常-' + code;
  30509. break;
  30510. }
  30511. (0, _uni_api.uniShowModal)('', content, {
  30512. showCancel: false,
  30513. success: function success(res) {
  30514. console.log(res);
  30515. }
  30516. });
  30517. };
  30518. var request = ['get', 'post', 'put', 'delete', 'connect', 'head', 'options', 'trace'].reduce(function (request, method) {
  30519. request[method] = function (url, data) {
  30520. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  30521. return baseRequest({
  30522. url: url,
  30523. method: method,
  30524. data: data
  30525. }, _objectSpread(_objectSpread({}, defaultOptions), options));
  30526. };
  30527. return request;
  30528. }, {});
  30529. var _default = request;
  30530. exports.default = _default;
  30531. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  30532. /***/ }),
  30533. /***/ 79:
  30534. /*!*************************************************!*\
  30535. !*** E:/盈通/sulibao-mini/plugins/uni_request.js ***!
  30536. \*************************************************/
  30537. /*! no static exports found */
  30538. /***/ (function(module, exports, __webpack_require__) {
  30539. "use strict";
  30540. /* WEBPACK VAR INJECTION */(function(uni) {
  30541. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  30542. Object.defineProperty(exports, "__esModule", {
  30543. value: true
  30544. });
  30545. exports.default = void 0;
  30546. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 75));
  30547. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 77));
  30548. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  30549. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  30550. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  30551. var _cancel = __webpack_require__(/*! ./cancel.js */ 80);
  30552. 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; }
  30553. 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; }
  30554. var Request = /*#__PURE__*/function () {
  30555. function Request(_args) {
  30556. var _this4 = this;
  30557. (0, _classCallCheck2.default)(this, Request);
  30558. (0, _defineProperty2.default)(this, "interceptors", {
  30559. // 拦截器
  30560. request: {
  30561. interceptors: [],
  30562. use: function use(fn) {
  30563. this.interceptors.push(fn);
  30564. },
  30565. intercept: function intercept(config) {
  30566. var _this2 = this;
  30567. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  30568. var i;
  30569. return _regenerator.default.wrap(function _callee$(_context) {
  30570. while (1) {
  30571. switch (_context.prev = _context.next) {
  30572. case 0:
  30573. i = 0;
  30574. case 1:
  30575. if (!(i < _this2.interceptors.length)) {
  30576. _context.next = 8;
  30577. break;
  30578. }
  30579. _context.next = 4;
  30580. return _this2.interceptors[i](config);
  30581. case 4:
  30582. config = _context.sent;
  30583. case 5:
  30584. i++;
  30585. _context.next = 1;
  30586. break;
  30587. case 8:
  30588. return _context.abrupt("return", config);
  30589. case 9:
  30590. case "end":
  30591. return _context.stop();
  30592. }
  30593. }
  30594. }, _callee);
  30595. }))();
  30596. }
  30597. },
  30598. response: {
  30599. interceptors: [],
  30600. use: function use(fn) {
  30601. this.interceptors.push(fn);
  30602. },
  30603. intercept: function intercept(resolve, response) {
  30604. var _this3 = this;
  30605. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
  30606. var i;
  30607. return _regenerator.default.wrap(function _callee2$(_context2) {
  30608. while (1) {
  30609. switch (_context2.prev = _context2.next) {
  30610. case 0:
  30611. i = 0;
  30612. case 1:
  30613. if (!(i < _this3.interceptors.length)) {
  30614. _context2.next = 8;
  30615. break;
  30616. }
  30617. _context2.next = 4;
  30618. return _this3.interceptors[i](response);
  30619. case 4:
  30620. response = _context2.sent;
  30621. case 5:
  30622. i++;
  30623. _context2.next = 1;
  30624. break;
  30625. case 8:
  30626. return _context2.abrupt("return", resolve(response));
  30627. case 9:
  30628. case "end":
  30629. return _context2.stop();
  30630. }
  30631. }
  30632. }, _callee2);
  30633. }))();
  30634. }
  30635. }
  30636. });
  30637. (0, _defineProperty2.default)(this, "abort", function () {
  30638. _this4.aborted = true;
  30639. _this4.requestTask ? _this4.requestTask.abort() : '';
  30640. });
  30641. (0, _defineProperty2.default)(this, "onerror", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  30642. var options,
  30643. obj,
  30644. _args4 = arguments;
  30645. return _regenerator.default.wrap(function _callee3$(_context3) {
  30646. while (1) {
  30647. switch (_context3.prev = _context3.next) {
  30648. case 0:
  30649. options = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : _objectSpread({}, args);
  30650. obj = {
  30651. url: options.url,
  30652. method: options.method,
  30653. mes: options.str
  30654. };
  30655. if (options.cancel) {
  30656. obj.mes = options.cancel.message || '取消请求';
  30657. }
  30658. if (_this4.defaults.debug) {
  30659. console.log(obj.mes, options);
  30660. }
  30661. return _context3.abrupt("return", obj);
  30662. case 5:
  30663. case "end":
  30664. return _context3.stop();
  30665. }
  30666. }
  30667. }, _callee3);
  30668. })));
  30669. this.defaults = _objectSpread({
  30670. headers: {
  30671. 'Accept': 'application/json',
  30672. 'Content-Type': 'application/x-www-form-urlencoded'
  30673. },
  30674. debug: false
  30675. }, _args) || {};
  30676. this.timer = null;
  30677. this.requestTask = null;
  30678. this.aborted = false;
  30679. this.timeoutCancel = false;
  30680. this.Cancel = _cancel.Cancel;
  30681. this.CancelToken = _cancel.CancelToken;
  30682. this.isCancel = _cancel.isCancel;
  30683. }
  30684. (0, _createClass2.default)(Request, [{
  30685. key: "request",
  30686. value: function request(options) {
  30687. var _this = this;
  30688. var method = options.method,
  30689. url = options.url,
  30690. data = options.data,
  30691. cancelToken = options.cancelToken;
  30692. var config = {
  30693. url: this.defaults.baseURL + url,
  30694. method: method.toUpperCase() || 'GET',
  30695. header: this.defaults.headers || {},
  30696. data: data || {}
  30697. };
  30698. return new Proxy(new Promise(function (resolve, reject) {
  30699. _this.interceptors.request.intercept(config).then( /*#__PURE__*/function () {
  30700. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(res) {
  30701. var str;
  30702. return _regenerator.default.wrap(function _callee9$(_context9) {
  30703. while (1) {
  30704. switch (_context9.prev = _context9.next) {
  30705. case 0:
  30706. if (!_this.aborted) {
  30707. _context9.next = 5;
  30708. break;
  30709. }
  30710. // 如果请求已被取消,停止执行,返回 reject
  30711. str = '主动中断请求';
  30712. _context9.next = 4;
  30713. return _this.onerror({
  30714. config: config,
  30715. str: str
  30716. });
  30717. case 4:
  30718. return _context9.abrupt("return", reject(str));
  30719. case 5:
  30720. if (config.cancelToken) {
  30721. // Handle cancellation
  30722. config.cancelToken.promise.then( /*#__PURE__*/function () {
  30723. var _onCanceled = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(cancel) {
  30724. return _regenerator.default.wrap(function _callee4$(_context4) {
  30725. while (1) {
  30726. switch (_context4.prev = _context4.next) {
  30727. case 0:
  30728. clearTimeout(_this.timer);
  30729. _this.requestTask = null;
  30730. _context4.next = 4;
  30731. return _this.onerror({
  30732. config: config,
  30733. cancel: cancel
  30734. });
  30735. case 4:
  30736. return _context4.abrupt("return", reject(cancel));
  30737. case 5:
  30738. case "end":
  30739. return _context4.stop();
  30740. }
  30741. }
  30742. }, _callee4);
  30743. }));
  30744. function onCanceled(_x2) {
  30745. return _onCanceled.apply(this, arguments);
  30746. }
  30747. return onCanceled;
  30748. }());
  30749. }
  30750. _this.requestTask = uni.request(_objectSpread(_objectSpread({}, config), {}, {
  30751. success: function () {
  30752. var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(res) {
  30753. return _regenerator.default.wrap(function _callee5$(_context5) {
  30754. while (1) {
  30755. switch (_context5.prev = _context5.next) {
  30756. case 0:
  30757. clearTimeout(_this.timer); // 清除检测超时定时器
  30758. _this.interceptors.response.intercept(resolve, res); // 执行响应拦截器
  30759. case 2:
  30760. case "end":
  30761. return _context5.stop();
  30762. }
  30763. }
  30764. }, _callee5);
  30765. }));
  30766. function success(_x3) {
  30767. return _success.apply(this, arguments);
  30768. }
  30769. return success;
  30770. }(),
  30771. fail: function () {
  30772. var _fail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(error) {
  30773. var failTimer;
  30774. return _regenerator.default.wrap(function _callee7$(_context7) {
  30775. while (1) {
  30776. switch (_context7.prev = _context7.next) {
  30777. case 0:
  30778. console.log(error);
  30779. clearTimeout(_this.timer); // 清除检测超时定时器
  30780. failTimer = setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
  30781. var str;
  30782. return _regenerator.default.wrap(function _callee6$(_context6) {
  30783. while (1) {
  30784. switch (_context6.prev = _context6.next) {
  30785. case 0:
  30786. // 区分失败原因为超时或其它原因
  30787. str = '网络异常或URL无效';
  30788. if (_this.timeoutCancel) {
  30789. _context6.next = 6;
  30790. break;
  30791. }
  30792. _context6.next = 4;
  30793. return _this.onerror({
  30794. config: config,
  30795. str: str
  30796. });
  30797. case 4:
  30798. clearTimeout(failTimer);
  30799. reject(str);
  30800. case 6:
  30801. case "end":
  30802. return _context6.stop();
  30803. }
  30804. }
  30805. }, _callee6);
  30806. })), 300);
  30807. case 3:
  30808. case "end":
  30809. return _context7.stop();
  30810. }
  30811. }
  30812. }, _callee7);
  30813. }));
  30814. function fail(_x4) {
  30815. return _fail.apply(this, arguments);
  30816. }
  30817. return fail;
  30818. }()
  30819. }));
  30820. _this.timer = setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  30821. var str;
  30822. return _regenerator.default.wrap(function _callee8$(_context8) {
  30823. while (1) {
  30824. switch (_context8.prev = _context8.next) {
  30825. case 0:
  30826. if (!config.cancelToken) {
  30827. _context8.next = 2;
  30828. break;
  30829. }
  30830. return _context8.abrupt("return");
  30831. case 2:
  30832. _this.requestTask.abort(); // 执行取消请求方法
  30833. _this.timeoutCancel = true;
  30834. str = "\u7F51\u7EDC\u8BF7\u6C42\u65F6\u95F4\u8D85\u65F6,\u5F53\u524D\u8BBE\u7F6E\u54CD\u5E94\u65F6\u95F4\u4E3A".concat(_this.defaults.timeout);
  30835. _context8.next = 7;
  30836. return _this.onerror({
  30837. config: config,
  30838. str: str
  30839. });
  30840. case 7:
  30841. reject(str);
  30842. case 8:
  30843. case "end":
  30844. return _context8.stop();
  30845. }
  30846. }
  30847. }, _callee8);
  30848. })), _this.defaults.timeout || 12345); // 设定检测超时定时器
  30849. case 8:
  30850. case "end":
  30851. return _context9.stop();
  30852. }
  30853. }
  30854. }, _callee9);
  30855. }));
  30856. return function (_x) {
  30857. return _ref2.apply(this, arguments);
  30858. };
  30859. }());
  30860. }), {
  30861. get: function get(target, key, receiver) {
  30862. // console.log(`getting ${key}!`);
  30863. return key === 'abort' ? _this.abort : Reflect.get(target, key, receiver).bind(target); //传入target 为异步函数需要 .bind(target)
  30864. },
  30865. set: function set(target, key, value, receiver) {
  30866. // console.log(`setting ${key}!`);
  30867. return Reflect.set(target, key, value, receiver);
  30868. }
  30869. });
  30870. }
  30871. }]);
  30872. return Request;
  30873. }(); // class CreateInstance extends Request {
  30874. // constructor(args) {
  30875. // super();
  30876. // super.defaults = args;
  30877. // }
  30878. // }
  30879. var unirequest = new Request();
  30880. unirequest.create = function (args) {
  30881. return new Request(args);
  30882. };
  30883. var _default = unirequest;
  30884. exports.default = _default;
  30885. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  30886. /***/ }),
  30887. /***/ 8:
  30888. /*!***************************************************************************!*\
  30889. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  30890. \***************************************************************************/
  30891. /*! no static exports found */
  30892. /***/ (function(module, exports, __webpack_require__) {
  30893. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  30894. function _unsupportedIterableToArray(o, minLen) {
  30895. if (!o) return;
  30896. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  30897. var n = Object.prototype.toString.call(o).slice(8, -1);
  30898. if (n === "Object" && o.constructor) n = o.constructor.name;
  30899. if (n === "Map" || n === "Set") return Array.from(o);
  30900. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  30901. }
  30902. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  30903. /***/ }),
  30904. /***/ 80:
  30905. /*!********************************************!*\
  30906. !*** E:/盈通/sulibao-mini/plugins/cancel.js ***!
  30907. \********************************************/
  30908. /*! no static exports found */
  30909. /***/ (function(module, exports, __webpack_require__) {
  30910. "use strict";
  30911. Object.defineProperty(exports, "__esModule", {
  30912. value: true
  30913. });
  30914. exports.Cancel = Cancel;
  30915. exports.CancelToken = CancelToken;
  30916. exports.isCancel = isCancel;
  30917. function Cancel(message) {
  30918. this.message = message;
  30919. console.log('1 cancel');
  30920. }
  30921. Cancel.prototype.toString = function toString() {
  30922. return 'Cancel' + (this.message ? ': ' + this.message : '');
  30923. };
  30924. Cancel.prototype.__CANCEL__ = true;
  30925. function CancelToken(executor) {
  30926. if (typeof executor !== 'function') {
  30927. throw new TypeError('executor must be a function.');
  30928. }
  30929. //console.log('2 CancelToken')
  30930. var resolvePromise;
  30931. this.promise = new Promise(function promiseExecutor(resolve) {
  30932. resolvePromise = resolve;
  30933. //console.log('3 CancelToken')
  30934. });
  30935. var token = this;
  30936. executor(function cancel(message) {
  30937. //console.log('4 CancelToken')
  30938. if (token.reason) {
  30939. // Cancellation has already been requested
  30940. return;
  30941. }
  30942. //console.log('5 CancelToken')
  30943. token.reason = new Cancel(message);
  30944. resolvePromise(token.reason);
  30945. });
  30946. }
  30947. /**
  30948. * Throws a `Cancel` if cancellation has been requested.
  30949. */
  30950. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  30951. //console.log('6 CancelToken')
  30952. if (this.reason) {
  30953. throw this.reason;
  30954. }
  30955. };
  30956. /**
  30957. * Returns an object that contains a new `CancelToken` and a function that, when called,
  30958. * cancels the `CancelToken`.
  30959. */
  30960. CancelToken.source = function source() {
  30961. var cancel;
  30962. console.log('7 CancelToken');
  30963. var token = new CancelToken(function executor(c) {
  30964. cancel = c;
  30965. });
  30966. return {
  30967. token: token,
  30968. cancel: cancel
  30969. };
  30970. };
  30971. function isCancel(value) {
  30972. console.log('8 isCancel');
  30973. return !!(value && value.__CANCEL__);
  30974. }
  30975. ;
  30976. /***/ }),
  30977. /***/ 81:
  30978. /*!*********************************************************!*\
  30979. !*** E:/盈通/sulibao-mini/node_modules/js-md5/src/md5.js ***!
  30980. \*********************************************************/
  30981. /*! no static exports found */
  30982. /***/ (function(module, exports, __webpack_require__) {
  30983. /* WEBPACK VAR INJECTION */(function(process, global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  30984. /**
  30985. * [js-md5]{@link https://github.com/emn178/js-md5}
  30986. *
  30987. * @namespace md5
  30988. * @version 0.7.3
  30989. * @author Chen, Yi-Cyuan [emn178@gmail.com]
  30990. * @copyright Chen, Yi-Cyuan 2014-2017
  30991. * @license MIT
  30992. */
  30993. (function () {
  30994. 'use strict';
  30995. var ERROR = 'input is invalid type';
  30996. var WINDOW = (typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object';
  30997. var root = WINDOW ? window : {};
  30998. if (root.JS_MD5_NO_WINDOW) {
  30999. WINDOW = false;
  31000. }
  31001. var WEB_WORKER = !WINDOW && (typeof self === "undefined" ? "undefined" : _typeof(self)) === 'object';
  31002. var NODE_JS = !root.JS_MD5_NO_NODE_JS && (typeof process === "undefined" ? "undefined" : _typeof(process)) === 'object' && process.versions && process.versions.node;
  31003. if (NODE_JS) {
  31004. root = global;
  31005. } else if (WEB_WORKER) {
  31006. root = self;
  31007. }
  31008. var COMMON_JS = !root.JS_MD5_NO_COMMON_JS && ( false ? undefined : _typeof(module)) === 'object' && module.exports;
  31009. var AMD = true && __webpack_require__(/*! !webpack amd options */ 85);
  31010. var ARRAY_BUFFER = !root.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';
  31011. var HEX_CHARS = '0123456789abcdef'.split('');
  31012. var EXTRA = [128, 32768, 8388608, -2147483648];
  31013. var SHIFT = [0, 8, 16, 24];
  31014. var OUTPUT_TYPES = ['hex', 'array', 'digest', 'buffer', 'arrayBuffer', 'base64'];
  31015. var BASE64_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
  31016. var blocks = [],
  31017. buffer8;
  31018. if (ARRAY_BUFFER) {
  31019. var buffer = new ArrayBuffer(68);
  31020. buffer8 = new Uint8Array(buffer);
  31021. blocks = new Uint32Array(buffer);
  31022. }
  31023. if (root.JS_MD5_NO_NODE_JS || !Array.isArray) {
  31024. Array.isArray = function (obj) {
  31025. return Object.prototype.toString.call(obj) === '[object Array]';
  31026. };
  31027. }
  31028. if (ARRAY_BUFFER && (root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {
  31029. ArrayBuffer.isView = function (obj) {
  31030. return _typeof(obj) === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;
  31031. };
  31032. }
  31033. /**
  31034. * @method hex
  31035. * @memberof md5
  31036. * @description Output hash as hex string
  31037. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  31038. * @returns {String} Hex string
  31039. * @example
  31040. * md5.hex('The quick brown fox jumps over the lazy dog');
  31041. * // equal to
  31042. * md5('The quick brown fox jumps over the lazy dog');
  31043. */
  31044. /**
  31045. * @method digest
  31046. * @memberof md5
  31047. * @description Output hash as bytes array
  31048. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  31049. * @returns {Array} Bytes array
  31050. * @example
  31051. * md5.digest('The quick brown fox jumps over the lazy dog');
  31052. */
  31053. /**
  31054. * @method array
  31055. * @memberof md5
  31056. * @description Output hash as bytes array
  31057. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  31058. * @returns {Array} Bytes array
  31059. * @example
  31060. * md5.array('The quick brown fox jumps over the lazy dog');
  31061. */
  31062. /**
  31063. * @method arrayBuffer
  31064. * @memberof md5
  31065. * @description Output hash as ArrayBuffer
  31066. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  31067. * @returns {ArrayBuffer} ArrayBuffer
  31068. * @example
  31069. * md5.arrayBuffer('The quick brown fox jumps over the lazy dog');
  31070. */
  31071. /**
  31072. * @method buffer
  31073. * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
  31074. * @memberof md5
  31075. * @description Output hash as ArrayBuffer
  31076. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  31077. * @returns {ArrayBuffer} ArrayBuffer
  31078. * @example
  31079. * md5.buffer('The quick brown fox jumps over the lazy dog');
  31080. */
  31081. /**
  31082. * @method base64
  31083. * @memberof md5
  31084. * @description Output hash as base64 string
  31085. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  31086. * @returns {String} base64 string
  31087. * @example
  31088. * md5.base64('The quick brown fox jumps over the lazy dog');
  31089. */
  31090. var createOutputMethod = function createOutputMethod(outputType) {
  31091. return function (message) {
  31092. return new Md5(true).update(message)[outputType]();
  31093. };
  31094. };
  31095. /**
  31096. * @method create
  31097. * @memberof md5
  31098. * @description Create Md5 object
  31099. * @returns {Md5} Md5 object.
  31100. * @example
  31101. * var hash = md5.create();
  31102. */
  31103. /**
  31104. * @method update
  31105. * @memberof md5
  31106. * @description Create and update Md5 object
  31107. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  31108. * @returns {Md5} Md5 object.
  31109. * @example
  31110. * var hash = md5.update('The quick brown fox jumps over the lazy dog');
  31111. * // equal to
  31112. * var hash = md5.create();
  31113. * hash.update('The quick brown fox jumps over the lazy dog');
  31114. */
  31115. var createMethod = function createMethod() {
  31116. var method = createOutputMethod('hex');
  31117. if (NODE_JS) {
  31118. method = nodeWrap(method);
  31119. }
  31120. method.create = function () {
  31121. return new Md5();
  31122. };
  31123. method.update = function (message) {
  31124. return method.create().update(message);
  31125. };
  31126. for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
  31127. var type = OUTPUT_TYPES[i];
  31128. method[type] = createOutputMethod(type);
  31129. }
  31130. return method;
  31131. };
  31132. var nodeWrap = function nodeWrap(method) {
  31133. var crypto = eval("require('crypto')");
  31134. var Buffer = eval("require('buffer').Buffer");
  31135. var nodeMethod = function nodeMethod(message) {
  31136. if (typeof message === 'string') {
  31137. return crypto.createHash('md5').update(message, 'utf8').digest('hex');
  31138. } else {
  31139. if (message === null || message === undefined) {
  31140. throw ERROR;
  31141. } else if (message.constructor === ArrayBuffer) {
  31142. message = new Uint8Array(message);
  31143. }
  31144. }
  31145. if (Array.isArray(message) || ArrayBuffer.isView(message) || message.constructor === Buffer) {
  31146. return crypto.createHash('md5').update(new Buffer(message)).digest('hex');
  31147. } else {
  31148. return method(message);
  31149. }
  31150. };
  31151. return nodeMethod;
  31152. };
  31153. /**
  31154. * Md5 class
  31155. * @class Md5
  31156. * @description This is internal class.
  31157. * @see {@link md5.create}
  31158. */
  31159. function Md5(sharedMemory) {
  31160. if (sharedMemory) {
  31161. blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
  31162. this.blocks = blocks;
  31163. this.buffer8 = buffer8;
  31164. } else {
  31165. if (ARRAY_BUFFER) {
  31166. var buffer = new ArrayBuffer(68);
  31167. this.buffer8 = new Uint8Array(buffer);
  31168. this.blocks = new Uint32Array(buffer);
  31169. } else {
  31170. this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  31171. }
  31172. }
  31173. this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0;
  31174. this.finalized = this.hashed = false;
  31175. this.first = true;
  31176. }
  31177. /**
  31178. * @method update
  31179. * @memberof Md5
  31180. * @instance
  31181. * @description Update hash
  31182. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  31183. * @returns {Md5} Md5 object.
  31184. * @see {@link md5.update}
  31185. */
  31186. Md5.prototype.update = function (message) {
  31187. if (this.finalized) {
  31188. return;
  31189. }
  31190. var notString,
  31191. type = _typeof(message);
  31192. if (type !== 'string') {
  31193. if (type === 'object') {
  31194. if (message === null) {
  31195. throw ERROR;
  31196. } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
  31197. message = new Uint8Array(message);
  31198. } else if (!Array.isArray(message)) {
  31199. if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {
  31200. throw ERROR;
  31201. }
  31202. }
  31203. } else {
  31204. throw ERROR;
  31205. }
  31206. notString = true;
  31207. }
  31208. var code,
  31209. index = 0,
  31210. i,
  31211. length = message.length,
  31212. blocks = this.blocks;
  31213. var buffer8 = this.buffer8;
  31214. while (index < length) {
  31215. if (this.hashed) {
  31216. this.hashed = false;
  31217. blocks[0] = blocks[16];
  31218. blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
  31219. }
  31220. if (notString) {
  31221. if (ARRAY_BUFFER) {
  31222. for (i = this.start; index < length && i < 64; ++index) {
  31223. buffer8[i++] = message[index];
  31224. }
  31225. } else {
  31226. for (i = this.start; index < length && i < 64; ++index) {
  31227. blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];
  31228. }
  31229. }
  31230. } else {
  31231. if (ARRAY_BUFFER) {
  31232. for (i = this.start; index < length && i < 64; ++index) {
  31233. code = message.charCodeAt(index);
  31234. if (code < 0x80) {
  31235. buffer8[i++] = code;
  31236. } else if (code < 0x800) {
  31237. buffer8[i++] = 0xc0 | code >> 6;
  31238. buffer8[i++] = 0x80 | code & 0x3f;
  31239. } else if (code < 0xd800 || code >= 0xe000) {
  31240. buffer8[i++] = 0xe0 | code >> 12;
  31241. buffer8[i++] = 0x80 | code >> 6 & 0x3f;
  31242. buffer8[i++] = 0x80 | code & 0x3f;
  31243. } else {
  31244. code = 0x10000 + ((code & 0x3ff) << 10 | message.charCodeAt(++index) & 0x3ff);
  31245. buffer8[i++] = 0xf0 | code >> 18;
  31246. buffer8[i++] = 0x80 | code >> 12 & 0x3f;
  31247. buffer8[i++] = 0x80 | code >> 6 & 0x3f;
  31248. buffer8[i++] = 0x80 | code & 0x3f;
  31249. }
  31250. }
  31251. } else {
  31252. for (i = this.start; index < length && i < 64; ++index) {
  31253. code = message.charCodeAt(index);
  31254. if (code < 0x80) {
  31255. blocks[i >> 2] |= code << SHIFT[i++ & 3];
  31256. } else if (code < 0x800) {
  31257. blocks[i >> 2] |= (0xc0 | code >> 6) << SHIFT[i++ & 3];
  31258. blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];
  31259. } else if (code < 0xd800 || code >= 0xe000) {
  31260. blocks[i >> 2] |= (0xe0 | code >> 12) << SHIFT[i++ & 3];
  31261. blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3];
  31262. blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];
  31263. } else {
  31264. code = 0x10000 + ((code & 0x3ff) << 10 | message.charCodeAt(++index) & 0x3ff);
  31265. blocks[i >> 2] |= (0xf0 | code >> 18) << SHIFT[i++ & 3];
  31266. blocks[i >> 2] |= (0x80 | code >> 12 & 0x3f) << SHIFT[i++ & 3];
  31267. blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3];
  31268. blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];
  31269. }
  31270. }
  31271. }
  31272. }
  31273. this.lastByteIndex = i;
  31274. this.bytes += i - this.start;
  31275. if (i >= 64) {
  31276. this.start = i - 64;
  31277. this.hash();
  31278. this.hashed = true;
  31279. } else {
  31280. this.start = i;
  31281. }
  31282. }
  31283. if (this.bytes > 4294967295) {
  31284. this.hBytes += this.bytes / 4294967296 << 0;
  31285. this.bytes = this.bytes % 4294967296;
  31286. }
  31287. return this;
  31288. };
  31289. Md5.prototype.finalize = function () {
  31290. if (this.finalized) {
  31291. return;
  31292. }
  31293. this.finalized = true;
  31294. var blocks = this.blocks,
  31295. i = this.lastByteIndex;
  31296. blocks[i >> 2] |= EXTRA[i & 3];
  31297. if (i >= 56) {
  31298. if (!this.hashed) {
  31299. this.hash();
  31300. }
  31301. blocks[0] = blocks[16];
  31302. blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
  31303. }
  31304. blocks[14] = this.bytes << 3;
  31305. blocks[15] = this.hBytes << 3 | this.bytes >>> 29;
  31306. this.hash();
  31307. };
  31308. Md5.prototype.hash = function () {
  31309. var a,
  31310. b,
  31311. c,
  31312. d,
  31313. bc,
  31314. da,
  31315. blocks = this.blocks;
  31316. if (this.first) {
  31317. a = blocks[0] - 680876937;
  31318. a = (a << 7 | a >>> 25) - 271733879 << 0;
  31319. d = (-1732584194 ^ a & 2004318071) + blocks[1] - 117830708;
  31320. d = (d << 12 | d >>> 20) + a << 0;
  31321. c = (-271733879 ^ d & (a ^ -271733879)) + blocks[2] - 1126478375;
  31322. c = (c << 17 | c >>> 15) + d << 0;
  31323. b = (a ^ c & (d ^ a)) + blocks[3] - 1316259209;
  31324. b = (b << 22 | b >>> 10) + c << 0;
  31325. } else {
  31326. a = this.h0;
  31327. b = this.h1;
  31328. c = this.h2;
  31329. d = this.h3;
  31330. a += (d ^ b & (c ^ d)) + blocks[0] - 680876936;
  31331. a = (a << 7 | a >>> 25) + b << 0;
  31332. d += (c ^ a & (b ^ c)) + blocks[1] - 389564586;
  31333. d = (d << 12 | d >>> 20) + a << 0;
  31334. c += (b ^ d & (a ^ b)) + blocks[2] + 606105819;
  31335. c = (c << 17 | c >>> 15) + d << 0;
  31336. b += (a ^ c & (d ^ a)) + blocks[3] - 1044525330;
  31337. b = (b << 22 | b >>> 10) + c << 0;
  31338. }
  31339. a += (d ^ b & (c ^ d)) + blocks[4] - 176418897;
  31340. a = (a << 7 | a >>> 25) + b << 0;
  31341. d += (c ^ a & (b ^ c)) + blocks[5] + 1200080426;
  31342. d = (d << 12 | d >>> 20) + a << 0;
  31343. c += (b ^ d & (a ^ b)) + blocks[6] - 1473231341;
  31344. c = (c << 17 | c >>> 15) + d << 0;
  31345. b += (a ^ c & (d ^ a)) + blocks[7] - 45705983;
  31346. b = (b << 22 | b >>> 10) + c << 0;
  31347. a += (d ^ b & (c ^ d)) + blocks[8] + 1770035416;
  31348. a = (a << 7 | a >>> 25) + b << 0;
  31349. d += (c ^ a & (b ^ c)) + blocks[9] - 1958414417;
  31350. d = (d << 12 | d >>> 20) + a << 0;
  31351. c += (b ^ d & (a ^ b)) + blocks[10] - 42063;
  31352. c = (c << 17 | c >>> 15) + d << 0;
  31353. b += (a ^ c & (d ^ a)) + blocks[11] - 1990404162;
  31354. b = (b << 22 | b >>> 10) + c << 0;
  31355. a += (d ^ b & (c ^ d)) + blocks[12] + 1804603682;
  31356. a = (a << 7 | a >>> 25) + b << 0;
  31357. d += (c ^ a & (b ^ c)) + blocks[13] - 40341101;
  31358. d = (d << 12 | d >>> 20) + a << 0;
  31359. c += (b ^ d & (a ^ b)) + blocks[14] - 1502002290;
  31360. c = (c << 17 | c >>> 15) + d << 0;
  31361. b += (a ^ c & (d ^ a)) + blocks[15] + 1236535329;
  31362. b = (b << 22 | b >>> 10) + c << 0;
  31363. a += (c ^ d & (b ^ c)) + blocks[1] - 165796510;
  31364. a = (a << 5 | a >>> 27) + b << 0;
  31365. d += (b ^ c & (a ^ b)) + blocks[6] - 1069501632;
  31366. d = (d << 9 | d >>> 23) + a << 0;
  31367. c += (a ^ b & (d ^ a)) + blocks[11] + 643717713;
  31368. c = (c << 14 | c >>> 18) + d << 0;
  31369. b += (d ^ a & (c ^ d)) + blocks[0] - 373897302;
  31370. b = (b << 20 | b >>> 12) + c << 0;
  31371. a += (c ^ d & (b ^ c)) + blocks[5] - 701558691;
  31372. a = (a << 5 | a >>> 27) + b << 0;
  31373. d += (b ^ c & (a ^ b)) + blocks[10] + 38016083;
  31374. d = (d << 9 | d >>> 23) + a << 0;
  31375. c += (a ^ b & (d ^ a)) + blocks[15] - 660478335;
  31376. c = (c << 14 | c >>> 18) + d << 0;
  31377. b += (d ^ a & (c ^ d)) + blocks[4] - 405537848;
  31378. b = (b << 20 | b >>> 12) + c << 0;
  31379. a += (c ^ d & (b ^ c)) + blocks[9] + 568446438;
  31380. a = (a << 5 | a >>> 27) + b << 0;
  31381. d += (b ^ c & (a ^ b)) + blocks[14] - 1019803690;
  31382. d = (d << 9 | d >>> 23) + a << 0;
  31383. c += (a ^ b & (d ^ a)) + blocks[3] - 187363961;
  31384. c = (c << 14 | c >>> 18) + d << 0;
  31385. b += (d ^ a & (c ^ d)) + blocks[8] + 1163531501;
  31386. b = (b << 20 | b >>> 12) + c << 0;
  31387. a += (c ^ d & (b ^ c)) + blocks[13] - 1444681467;
  31388. a = (a << 5 | a >>> 27) + b << 0;
  31389. d += (b ^ c & (a ^ b)) + blocks[2] - 51403784;
  31390. d = (d << 9 | d >>> 23) + a << 0;
  31391. c += (a ^ b & (d ^ a)) + blocks[7] + 1735328473;
  31392. c = (c << 14 | c >>> 18) + d << 0;
  31393. b += (d ^ a & (c ^ d)) + blocks[12] - 1926607734;
  31394. b = (b << 20 | b >>> 12) + c << 0;
  31395. bc = b ^ c;
  31396. a += (bc ^ d) + blocks[5] - 378558;
  31397. a = (a << 4 | a >>> 28) + b << 0;
  31398. d += (bc ^ a) + blocks[8] - 2022574463;
  31399. d = (d << 11 | d >>> 21) + a << 0;
  31400. da = d ^ a;
  31401. c += (da ^ b) + blocks[11] + 1839030562;
  31402. c = (c << 16 | c >>> 16) + d << 0;
  31403. b += (da ^ c) + blocks[14] - 35309556;
  31404. b = (b << 23 | b >>> 9) + c << 0;
  31405. bc = b ^ c;
  31406. a += (bc ^ d) + blocks[1] - 1530992060;
  31407. a = (a << 4 | a >>> 28) + b << 0;
  31408. d += (bc ^ a) + blocks[4] + 1272893353;
  31409. d = (d << 11 | d >>> 21) + a << 0;
  31410. da = d ^ a;
  31411. c += (da ^ b) + blocks[7] - 155497632;
  31412. c = (c << 16 | c >>> 16) + d << 0;
  31413. b += (da ^ c) + blocks[10] - 1094730640;
  31414. b = (b << 23 | b >>> 9) + c << 0;
  31415. bc = b ^ c;
  31416. a += (bc ^ d) + blocks[13] + 681279174;
  31417. a = (a << 4 | a >>> 28) + b << 0;
  31418. d += (bc ^ a) + blocks[0] - 358537222;
  31419. d = (d << 11 | d >>> 21) + a << 0;
  31420. da = d ^ a;
  31421. c += (da ^ b) + blocks[3] - 722521979;
  31422. c = (c << 16 | c >>> 16) + d << 0;
  31423. b += (da ^ c) + blocks[6] + 76029189;
  31424. b = (b << 23 | b >>> 9) + c << 0;
  31425. bc = b ^ c;
  31426. a += (bc ^ d) + blocks[9] - 640364487;
  31427. a = (a << 4 | a >>> 28) + b << 0;
  31428. d += (bc ^ a) + blocks[12] - 421815835;
  31429. d = (d << 11 | d >>> 21) + a << 0;
  31430. da = d ^ a;
  31431. c += (da ^ b) + blocks[15] + 530742520;
  31432. c = (c << 16 | c >>> 16) + d << 0;
  31433. b += (da ^ c) + blocks[2] - 995338651;
  31434. b = (b << 23 | b >>> 9) + c << 0;
  31435. a += (c ^ (b | ~d)) + blocks[0] - 198630844;
  31436. a = (a << 6 | a >>> 26) + b << 0;
  31437. d += (b ^ (a | ~c)) + blocks[7] + 1126891415;
  31438. d = (d << 10 | d >>> 22) + a << 0;
  31439. c += (a ^ (d | ~b)) + blocks[14] - 1416354905;
  31440. c = (c << 15 | c >>> 17) + d << 0;
  31441. b += (d ^ (c | ~a)) + blocks[5] - 57434055;
  31442. b = (b << 21 | b >>> 11) + c << 0;
  31443. a += (c ^ (b | ~d)) + blocks[12] + 1700485571;
  31444. a = (a << 6 | a >>> 26) + b << 0;
  31445. d += (b ^ (a | ~c)) + blocks[3] - 1894986606;
  31446. d = (d << 10 | d >>> 22) + a << 0;
  31447. c += (a ^ (d | ~b)) + blocks[10] - 1051523;
  31448. c = (c << 15 | c >>> 17) + d << 0;
  31449. b += (d ^ (c | ~a)) + blocks[1] - 2054922799;
  31450. b = (b << 21 | b >>> 11) + c << 0;
  31451. a += (c ^ (b | ~d)) + blocks[8] + 1873313359;
  31452. a = (a << 6 | a >>> 26) + b << 0;
  31453. d += (b ^ (a | ~c)) + blocks[15] - 30611744;
  31454. d = (d << 10 | d >>> 22) + a << 0;
  31455. c += (a ^ (d | ~b)) + blocks[6] - 1560198380;
  31456. c = (c << 15 | c >>> 17) + d << 0;
  31457. b += (d ^ (c | ~a)) + blocks[13] + 1309151649;
  31458. b = (b << 21 | b >>> 11) + c << 0;
  31459. a += (c ^ (b | ~d)) + blocks[4] - 145523070;
  31460. a = (a << 6 | a >>> 26) + b << 0;
  31461. d += (b ^ (a | ~c)) + blocks[11] - 1120210379;
  31462. d = (d << 10 | d >>> 22) + a << 0;
  31463. c += (a ^ (d | ~b)) + blocks[2] + 718787259;
  31464. c = (c << 15 | c >>> 17) + d << 0;
  31465. b += (d ^ (c | ~a)) + blocks[9] - 343485551;
  31466. b = (b << 21 | b >>> 11) + c << 0;
  31467. if (this.first) {
  31468. this.h0 = a + 1732584193 << 0;
  31469. this.h1 = b - 271733879 << 0;
  31470. this.h2 = c - 1732584194 << 0;
  31471. this.h3 = d + 271733878 << 0;
  31472. this.first = false;
  31473. } else {
  31474. this.h0 = this.h0 + a << 0;
  31475. this.h1 = this.h1 + b << 0;
  31476. this.h2 = this.h2 + c << 0;
  31477. this.h3 = this.h3 + d << 0;
  31478. }
  31479. };
  31480. /**
  31481. * @method hex
  31482. * @memberof Md5
  31483. * @instance
  31484. * @description Output hash as hex string
  31485. * @returns {String} Hex string
  31486. * @see {@link md5.hex}
  31487. * @example
  31488. * hash.hex();
  31489. */
  31490. Md5.prototype.hex = function () {
  31491. this.finalize();
  31492. var h0 = this.h0,
  31493. h1 = this.h1,
  31494. h2 = this.h2,
  31495. h3 = this.h3;
  31496. return HEX_CHARS[h0 >> 4 & 0x0F] + HEX_CHARS[h0 & 0x0F] + HEX_CHARS[h0 >> 12 & 0x0F] + HEX_CHARS[h0 >> 8 & 0x0F] + HEX_CHARS[h0 >> 20 & 0x0F] + HEX_CHARS[h0 >> 16 & 0x0F] + HEX_CHARS[h0 >> 28 & 0x0F] + HEX_CHARS[h0 >> 24 & 0x0F] + HEX_CHARS[h1 >> 4 & 0x0F] + HEX_CHARS[h1 & 0x0F] + HEX_CHARS[h1 >> 12 & 0x0F] + HEX_CHARS[h1 >> 8 & 0x0F] + HEX_CHARS[h1 >> 20 & 0x0F] + HEX_CHARS[h1 >> 16 & 0x0F] + HEX_CHARS[h1 >> 28 & 0x0F] + HEX_CHARS[h1 >> 24 & 0x0F] + HEX_CHARS[h2 >> 4 & 0x0F] + HEX_CHARS[h2 & 0x0F] + HEX_CHARS[h2 >> 12 & 0x0F] + HEX_CHARS[h2 >> 8 & 0x0F] + HEX_CHARS[h2 >> 20 & 0x0F] + HEX_CHARS[h2 >> 16 & 0x0F] + HEX_CHARS[h2 >> 28 & 0x0F] + HEX_CHARS[h2 >> 24 & 0x0F] + HEX_CHARS[h3 >> 4 & 0x0F] + HEX_CHARS[h3 & 0x0F] + HEX_CHARS[h3 >> 12 & 0x0F] + HEX_CHARS[h3 >> 8 & 0x0F] + HEX_CHARS[h3 >> 20 & 0x0F] + HEX_CHARS[h3 >> 16 & 0x0F] + HEX_CHARS[h3 >> 28 & 0x0F] + HEX_CHARS[h3 >> 24 & 0x0F];
  31497. };
  31498. /**
  31499. * @method toString
  31500. * @memberof Md5
  31501. * @instance
  31502. * @description Output hash as hex string
  31503. * @returns {String} Hex string
  31504. * @see {@link md5.hex}
  31505. * @example
  31506. * hash.toString();
  31507. */
  31508. Md5.prototype.toString = Md5.prototype.hex;
  31509. /**
  31510. * @method digest
  31511. * @memberof Md5
  31512. * @instance
  31513. * @description Output hash as bytes array
  31514. * @returns {Array} Bytes array
  31515. * @see {@link md5.digest}
  31516. * @example
  31517. * hash.digest();
  31518. */
  31519. Md5.prototype.digest = function () {
  31520. this.finalize();
  31521. var h0 = this.h0,
  31522. h1 = this.h1,
  31523. h2 = this.h2,
  31524. h3 = this.h3;
  31525. return [h0 & 0xFF, h0 >> 8 & 0xFF, h0 >> 16 & 0xFF, h0 >> 24 & 0xFF, h1 & 0xFF, h1 >> 8 & 0xFF, h1 >> 16 & 0xFF, h1 >> 24 & 0xFF, h2 & 0xFF, h2 >> 8 & 0xFF, h2 >> 16 & 0xFF, h2 >> 24 & 0xFF, h3 & 0xFF, h3 >> 8 & 0xFF, h3 >> 16 & 0xFF, h3 >> 24 & 0xFF];
  31526. };
  31527. /**
  31528. * @method array
  31529. * @memberof Md5
  31530. * @instance
  31531. * @description Output hash as bytes array
  31532. * @returns {Array} Bytes array
  31533. * @see {@link md5.array}
  31534. * @example
  31535. * hash.array();
  31536. */
  31537. Md5.prototype.array = Md5.prototype.digest;
  31538. /**
  31539. * @method arrayBuffer
  31540. * @memberof Md5
  31541. * @instance
  31542. * @description Output hash as ArrayBuffer
  31543. * @returns {ArrayBuffer} ArrayBuffer
  31544. * @see {@link md5.arrayBuffer}
  31545. * @example
  31546. * hash.arrayBuffer();
  31547. */
  31548. Md5.prototype.arrayBuffer = function () {
  31549. this.finalize();
  31550. var buffer = new ArrayBuffer(16);
  31551. var blocks = new Uint32Array(buffer);
  31552. blocks[0] = this.h0;
  31553. blocks[1] = this.h1;
  31554. blocks[2] = this.h2;
  31555. blocks[3] = this.h3;
  31556. return buffer;
  31557. };
  31558. /**
  31559. * @method buffer
  31560. * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
  31561. * @memberof Md5
  31562. * @instance
  31563. * @description Output hash as ArrayBuffer
  31564. * @returns {ArrayBuffer} ArrayBuffer
  31565. * @see {@link md5.buffer}
  31566. * @example
  31567. * hash.buffer();
  31568. */
  31569. Md5.prototype.buffer = Md5.prototype.arrayBuffer;
  31570. /**
  31571. * @method base64
  31572. * @memberof Md5
  31573. * @instance
  31574. * @description Output hash as base64 string
  31575. * @returns {String} base64 string
  31576. * @see {@link md5.base64}
  31577. * @example
  31578. * hash.base64();
  31579. */
  31580. Md5.prototype.base64 = function () {
  31581. var v1,
  31582. v2,
  31583. v3,
  31584. base64Str = '',
  31585. bytes = this.array();
  31586. for (var i = 0; i < 15;) {
  31587. v1 = bytes[i++];
  31588. v2 = bytes[i++];
  31589. v3 = bytes[i++];
  31590. base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] + BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] + BASE64_ENCODE_CHAR[v3 & 63];
  31591. }
  31592. v1 = bytes[i];
  31593. base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[v1 << 4 & 63] + '==';
  31594. return base64Str;
  31595. };
  31596. var exports = createMethod();
  31597. if (COMMON_JS) {
  31598. module.exports = exports;
  31599. } else {
  31600. /**
  31601. * @method md5
  31602. * @description Md5 hash function, export to global in browsers.
  31603. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  31604. * @returns {String} md5 hashes
  31605. * @example
  31606. * md5(''); // d41d8cd98f00b204e9800998ecf8427e
  31607. * md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
  31608. * md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
  31609. *
  31610. * // It also supports UTF-8 encoding
  31611. * md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
  31612. *
  31613. * // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
  31614. * md5([]); // d41d8cd98f00b204e9800998ecf8427e
  31615. * md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
  31616. */
  31617. root.md5 = exports;
  31618. if (AMD) {
  31619. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  31620. return exports;
  31621. }).call(exports, __webpack_require__, exports, module),
  31622. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  31623. }
  31624. }
  31625. })();
  31626. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 82), __webpack_require__(/*! (webpack)/buildin/global.js */ 3), __webpack_require__(/*! (webpack)/buildin/module.js */ 84)(module)))
  31627. /***/ }),
  31628. /***/ 82:
  31629. /*!********************************************************!*\
  31630. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  31631. \********************************************************/
  31632. /*! no static exports found */
  31633. /***/ (function(module, exports, __webpack_require__) {
  31634. exports.nextTick = function nextTick(fn) {
  31635. var args = Array.prototype.slice.call(arguments);
  31636. args.shift();
  31637. setTimeout(function () {
  31638. fn.apply(null, args);
  31639. }, 0);
  31640. };
  31641. exports.platform = exports.arch =
  31642. exports.execPath = exports.title = 'browser';
  31643. exports.pid = 1;
  31644. exports.browser = true;
  31645. exports.env = {};
  31646. exports.argv = [];
  31647. exports.binding = function (name) {
  31648. throw new Error('No such module. (Possibly not yet loaded)')
  31649. };
  31650. (function () {
  31651. var cwd = '/';
  31652. var path;
  31653. exports.cwd = function () { return cwd };
  31654. exports.chdir = function (dir) {
  31655. if (!path) path = __webpack_require__(/*! path */ 83);
  31656. cwd = path.resolve(dir, cwd);
  31657. };
  31658. })();
  31659. exports.exit = exports.kill =
  31660. exports.umask = exports.dlopen =
  31661. exports.uptime = exports.memoryUsage =
  31662. exports.uvCounters = function() {};
  31663. exports.features = {};
  31664. /***/ }),
  31665. /***/ 83:
  31666. /*!***********************************************!*\
  31667. !*** ./node_modules/path-browserify/index.js ***!
  31668. \***********************************************/
  31669. /*! no static exports found */
  31670. /***/ (function(module, exports, __webpack_require__) {
  31671. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  31672. // backported and transplited with Babel, with backwards-compat fixes
  31673. // Copyright Joyent, Inc. and other Node contributors.
  31674. //
  31675. // Permission is hereby granted, free of charge, to any person obtaining a
  31676. // copy of this software and associated documentation files (the
  31677. // "Software"), to deal in the Software without restriction, including
  31678. // without limitation the rights to use, copy, modify, merge, publish,
  31679. // distribute, sublicense, and/or sell copies of the Software, and to permit
  31680. // persons to whom the Software is furnished to do so, subject to the
  31681. // following conditions:
  31682. //
  31683. // The above copyright notice and this permission notice shall be included
  31684. // in all copies or substantial portions of the Software.
  31685. //
  31686. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  31687. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  31688. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  31689. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  31690. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  31691. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  31692. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  31693. // resolves . and .. elements in a path array with directory names there
  31694. // must be no slashes, empty elements, or device names (c:\) in the array
  31695. // (so also no leading and trailing slashes - it does not distinguish
  31696. // relative and absolute paths)
  31697. function normalizeArray(parts, allowAboveRoot) {
  31698. // if the path tries to go above the root, `up` ends up > 0
  31699. var up = 0;
  31700. for (var i = parts.length - 1; i >= 0; i--) {
  31701. var last = parts[i];
  31702. if (last === '.') {
  31703. parts.splice(i, 1);
  31704. } else if (last === '..') {
  31705. parts.splice(i, 1);
  31706. up++;
  31707. } else if (up) {
  31708. parts.splice(i, 1);
  31709. up--;
  31710. }
  31711. }
  31712. // if the path is allowed to go above the root, restore leading ..s
  31713. if (allowAboveRoot) {
  31714. for (; up--; up) {
  31715. parts.unshift('..');
  31716. }
  31717. }
  31718. return parts;
  31719. }
  31720. // path.resolve([from ...], to)
  31721. // posix version
  31722. exports.resolve = function() {
  31723. var resolvedPath = '',
  31724. resolvedAbsolute = false;
  31725. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  31726. var path = (i >= 0) ? arguments[i] : process.cwd();
  31727. // Skip empty and invalid entries
  31728. if (typeof path !== 'string') {
  31729. throw new TypeError('Arguments to path.resolve must be strings');
  31730. } else if (!path) {
  31731. continue;
  31732. }
  31733. resolvedPath = path + '/' + resolvedPath;
  31734. resolvedAbsolute = path.charAt(0) === '/';
  31735. }
  31736. // At this point the path should be resolved to a full absolute path, but
  31737. // handle relative paths to be safe (might happen when process.cwd() fails)
  31738. // Normalize the path
  31739. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  31740. return !!p;
  31741. }), !resolvedAbsolute).join('/');
  31742. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  31743. };
  31744. // path.normalize(path)
  31745. // posix version
  31746. exports.normalize = function(path) {
  31747. var isAbsolute = exports.isAbsolute(path),
  31748. trailingSlash = substr(path, -1) === '/';
  31749. // Normalize the path
  31750. path = normalizeArray(filter(path.split('/'), function(p) {
  31751. return !!p;
  31752. }), !isAbsolute).join('/');
  31753. if (!path && !isAbsolute) {
  31754. path = '.';
  31755. }
  31756. if (path && trailingSlash) {
  31757. path += '/';
  31758. }
  31759. return (isAbsolute ? '/' : '') + path;
  31760. };
  31761. // posix version
  31762. exports.isAbsolute = function(path) {
  31763. return path.charAt(0) === '/';
  31764. };
  31765. // posix version
  31766. exports.join = function() {
  31767. var paths = Array.prototype.slice.call(arguments, 0);
  31768. return exports.normalize(filter(paths, function(p, index) {
  31769. if (typeof p !== 'string') {
  31770. throw new TypeError('Arguments to path.join must be strings');
  31771. }
  31772. return p;
  31773. }).join('/'));
  31774. };
  31775. // path.relative(from, to)
  31776. // posix version
  31777. exports.relative = function(from, to) {
  31778. from = exports.resolve(from).substr(1);
  31779. to = exports.resolve(to).substr(1);
  31780. function trim(arr) {
  31781. var start = 0;
  31782. for (; start < arr.length; start++) {
  31783. if (arr[start] !== '') break;
  31784. }
  31785. var end = arr.length - 1;
  31786. for (; end >= 0; end--) {
  31787. if (arr[end] !== '') break;
  31788. }
  31789. if (start > end) return [];
  31790. return arr.slice(start, end - start + 1);
  31791. }
  31792. var fromParts = trim(from.split('/'));
  31793. var toParts = trim(to.split('/'));
  31794. var length = Math.min(fromParts.length, toParts.length);
  31795. var samePartsLength = length;
  31796. for (var i = 0; i < length; i++) {
  31797. if (fromParts[i] !== toParts[i]) {
  31798. samePartsLength = i;
  31799. break;
  31800. }
  31801. }
  31802. var outputParts = [];
  31803. for (var i = samePartsLength; i < fromParts.length; i++) {
  31804. outputParts.push('..');
  31805. }
  31806. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  31807. return outputParts.join('/');
  31808. };
  31809. exports.sep = '/';
  31810. exports.delimiter = ':';
  31811. exports.dirname = function (path) {
  31812. if (typeof path !== 'string') path = path + '';
  31813. if (path.length === 0) return '.';
  31814. var code = path.charCodeAt(0);
  31815. var hasRoot = code === 47 /*/*/;
  31816. var end = -1;
  31817. var matchedSlash = true;
  31818. for (var i = path.length - 1; i >= 1; --i) {
  31819. code = path.charCodeAt(i);
  31820. if (code === 47 /*/*/) {
  31821. if (!matchedSlash) {
  31822. end = i;
  31823. break;
  31824. }
  31825. } else {
  31826. // We saw the first non-path separator
  31827. matchedSlash = false;
  31828. }
  31829. }
  31830. if (end === -1) return hasRoot ? '/' : '.';
  31831. if (hasRoot && end === 1) {
  31832. // return '//';
  31833. // Backwards-compat fix:
  31834. return '/';
  31835. }
  31836. return path.slice(0, end);
  31837. };
  31838. function basename(path) {
  31839. if (typeof path !== 'string') path = path + '';
  31840. var start = 0;
  31841. var end = -1;
  31842. var matchedSlash = true;
  31843. var i;
  31844. for (i = path.length - 1; i >= 0; --i) {
  31845. if (path.charCodeAt(i) === 47 /*/*/) {
  31846. // If we reached a path separator that was not part of a set of path
  31847. // separators at the end of the string, stop now
  31848. if (!matchedSlash) {
  31849. start = i + 1;
  31850. break;
  31851. }
  31852. } else if (end === -1) {
  31853. // We saw the first non-path separator, mark this as the end of our
  31854. // path component
  31855. matchedSlash = false;
  31856. end = i + 1;
  31857. }
  31858. }
  31859. if (end === -1) return '';
  31860. return path.slice(start, end);
  31861. }
  31862. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  31863. // in new Node.js versions, so only basename() above is backported here
  31864. exports.basename = function (path, ext) {
  31865. var f = basename(path);
  31866. if (ext && f.substr(-1 * ext.length) === ext) {
  31867. f = f.substr(0, f.length - ext.length);
  31868. }
  31869. return f;
  31870. };
  31871. exports.extname = function (path) {
  31872. if (typeof path !== 'string') path = path + '';
  31873. var startDot = -1;
  31874. var startPart = 0;
  31875. var end = -1;
  31876. var matchedSlash = true;
  31877. // Track the state of characters (if any) we see before our first dot and
  31878. // after any path separator we find
  31879. var preDotState = 0;
  31880. for (var i = path.length - 1; i >= 0; --i) {
  31881. var code = path.charCodeAt(i);
  31882. if (code === 47 /*/*/) {
  31883. // If we reached a path separator that was not part of a set of path
  31884. // separators at the end of the string, stop now
  31885. if (!matchedSlash) {
  31886. startPart = i + 1;
  31887. break;
  31888. }
  31889. continue;
  31890. }
  31891. if (end === -1) {
  31892. // We saw the first non-path separator, mark this as the end of our
  31893. // extension
  31894. matchedSlash = false;
  31895. end = i + 1;
  31896. }
  31897. if (code === 46 /*.*/) {
  31898. // If this is our first dot, mark it as the start of our extension
  31899. if (startDot === -1)
  31900. startDot = i;
  31901. else if (preDotState !== 1)
  31902. preDotState = 1;
  31903. } else if (startDot !== -1) {
  31904. // We saw a non-dot and non-path separator before our dot, so we should
  31905. // have a good chance at having a non-empty extension
  31906. preDotState = -1;
  31907. }
  31908. }
  31909. if (startDot === -1 || end === -1 ||
  31910. // We saw a non-dot character immediately before the dot
  31911. preDotState === 0 ||
  31912. // The (right-most) trimmed path component is exactly '..'
  31913. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  31914. return '';
  31915. }
  31916. return path.slice(startDot, end);
  31917. };
  31918. function filter (xs, f) {
  31919. if (xs.filter) return xs.filter(f);
  31920. var res = [];
  31921. for (var i = 0; i < xs.length; i++) {
  31922. if (f(xs[i], i, xs)) res.push(xs[i]);
  31923. }
  31924. return res;
  31925. }
  31926. // String.prototype.substr - negative index don't work in IE8
  31927. var substr = 'ab'.substr(-1) === 'b'
  31928. ? function (str, start, len) { return str.substr(start, len) }
  31929. : function (str, start, len) {
  31930. if (start < 0) start = str.length + start;
  31931. return str.substr(start, len);
  31932. }
  31933. ;
  31934. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 82)))
  31935. /***/ }),
  31936. /***/ 84:
  31937. /*!***********************************!*\
  31938. !*** (webpack)/buildin/module.js ***!
  31939. \***********************************/
  31940. /*! no static exports found */
  31941. /***/ (function(module, exports) {
  31942. module.exports = function(module) {
  31943. if (!module.webpackPolyfill) {
  31944. module.deprecate = function() {};
  31945. module.paths = [];
  31946. // module.parent = undefined by default
  31947. if (!module.children) module.children = [];
  31948. Object.defineProperty(module, "loaded", {
  31949. enumerable: true,
  31950. get: function() {
  31951. return module.l;
  31952. }
  31953. });
  31954. Object.defineProperty(module, "id", {
  31955. enumerable: true,
  31956. get: function() {
  31957. return module.i;
  31958. }
  31959. });
  31960. module.webpackPolyfill = 1;
  31961. }
  31962. return module;
  31963. };
  31964. /***/ }),
  31965. /***/ 85:
  31966. /*!****************************************!*\
  31967. !*** (webpack)/buildin/amd-options.js ***!
  31968. \****************************************/
  31969. /*! no static exports found */
  31970. /***/ (function(module, exports) {
  31971. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  31972. module.exports = __webpack_amd_options__;
  31973. /* WEBPACK VAR INJECTION */}.call(this, {}))
  31974. /***/ }),
  31975. /***/ 86:
  31976. /*!*******************************************!*\
  31977. !*** E:/盈通/sulibao-mini/utils/uni_api.js ***!
  31978. \*******************************************/
  31979. /*! no static exports found */
  31980. /***/ (function(module, exports, __webpack_require__) {
  31981. "use strict";
  31982. /* WEBPACK VAR INJECTION */(function(uni) {
  31983. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  31984. Object.defineProperty(exports, "__esModule", {
  31985. value: true
  31986. });
  31987. exports.loadingToast = loadingToast;
  31988. exports.successToast = successToast;
  31989. exports.uniGetImageInfo = uniGetImageInfo;
  31990. exports.uniHideLoading = uniHideLoading;
  31991. exports.uniHideToast = uniHideToast;
  31992. exports.uniNavigateBackMiniProgram = uniNavigateBackMiniProgram;
  31993. exports.uniNavigateToMiniProgram = uniNavigateToMiniProgram;
  31994. exports.uniNavigator = uniNavigator;
  31995. exports.uniSelectorQueryInfo = uniSelectorQueryInfo;
  31996. exports.uniSetNavigationBarColor = uniSetNavigationBarColor;
  31997. exports.uniShowModal = uniShowModal;
  31998. exports.uniShowToast = uniShowToast;
  31999. exports.uniStartPullDownRefresh = uniStartPullDownRefresh;
  32000. exports.uniStopPullDownRefresh = uniStopPullDownRefresh;
  32001. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  32002. 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; }
  32003. 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; }
  32004. // 对uni中的交互反馈相关api组件进行封装 showToast、showModal
  32005. function uniShowToast() {
  32006. var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '提示语';
  32007. var icon = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "none";
  32008. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  32009. var _args$image = args.image,
  32010. image = _args$image === void 0 ? '' : _args$image,
  32011. _args$mask = args.mask,
  32012. mask = _args$mask === void 0 ? false : _args$mask,
  32013. _args$duration = args.duration,
  32014. duration = _args$duration === void 0 ? 1500 : _args$duration,
  32015. position = args.position,
  32016. success = args.success,
  32017. fail = args.fail,
  32018. complete = args.complete;
  32019. var toast = {
  32020. title: title,
  32021. icon: icon,
  32022. duration: duration
  32023. };
  32024. if (image) {
  32025. toast['image'] = image;
  32026. }
  32027. if (mask) {
  32028. toast['mask'] = mask;
  32029. }
  32030. uni.showToast(_objectSpread(_objectSpread({}, toast), callBack(toast, {
  32031. success: success,
  32032. fail: fail,
  32033. complete: complete
  32034. })));
  32035. }
  32036. function uniHideToast() {
  32037. uni.hideToast();
  32038. }
  32039. function uniHideLoading() {
  32040. uni.hideLoading();
  32041. }
  32042. function successToast() {
  32043. var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '成功';
  32044. var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32045. uniShowToast(title, "success", args);
  32046. }
  32047. function loadingToast() {
  32048. var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '加载中';
  32049. var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32050. var _args$mask2 = args.mask,
  32051. mask = _args$mask2 === void 0 ? true : _args$mask2,
  32052. success = args.success,
  32053. fail = args.fail,
  32054. complete = args.complete;
  32055. var loading = {
  32056. title: title
  32057. };
  32058. if (mask) {
  32059. loading['mask'] = mask;
  32060. }
  32061. uni.showLoading(_objectSpread(_objectSpread({}, loading), {}, {
  32062. mask: true
  32063. }, callBack(loading, {
  32064. success: success,
  32065. fail: fail,
  32066. complete: complete
  32067. })));
  32068. }
  32069. function uniShowModal(title, content) {
  32070. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  32071. var _args$showCancel = args.showCancel,
  32072. showCancel = _args$showCancel === void 0 ? true : _args$showCancel,
  32073. _args$cancelText = args.cancelText,
  32074. cancelText = _args$cancelText === void 0 ? "取消" : _args$cancelText,
  32075. cancelColor = args.cancelColor,
  32076. _args$confirmText = args.confirmText,
  32077. confirmText = _args$confirmText === void 0 ? "确定" : _args$confirmText,
  32078. confirmColor = args.confirmColor,
  32079. success = args.success,
  32080. fail = args.fail,
  32081. complete = args.complete;
  32082. var modal = {
  32083. title: title,
  32084. content: content,
  32085. showCancel: showCancel,
  32086. cancelText: cancelText,
  32087. confirmText: confirmText
  32088. };
  32089. if (cancelColor) {
  32090. modal['cancelColor'] = cancelColor;
  32091. }
  32092. if (confirmColor) {
  32093. modal['confirmColor'] = confirmColor;
  32094. }
  32095. uni.showModal(_objectSpread(_objectSpread({}, modal), callBack(modal, {
  32096. success: success,
  32097. fail: fail,
  32098. complete: complete
  32099. })));
  32100. }
  32101. function uniNavigator(url) {
  32102. var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'navigateTo';
  32103. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  32104. type = Number(url) ? 'navigateBack' : type || 'navigateTo';
  32105. var _args$endtime = args.endtime,
  32106. endtime = _args$endtime === void 0 ? Number(url) ? 600 : 200 : _args$endtime,
  32107. animationType = args.animationType,
  32108. animationDuration = args.animationDuration,
  32109. success = args.success,
  32110. fail = args.fail,
  32111. complete = args.complete;
  32112. var obj = {
  32113. url: url
  32114. };
  32115. obj = callBack(obj, {
  32116. success: success,
  32117. fail: fail,
  32118. complete: complete
  32119. });
  32120. console.log(obj);
  32121. switch (type) {
  32122. case 'navigateTo':
  32123. setTimeout(function () {
  32124. uni.navigateTo(obj);
  32125. }, endtime);
  32126. break;
  32127. case 'redirectTo':
  32128. setTimeout(function () {
  32129. uni.redirectTo(obj);
  32130. }, endtime);
  32131. break;
  32132. case 'reLaunch':
  32133. setTimeout(function () {
  32134. uni.reLaunch(obj);
  32135. }, endtime);
  32136. break;
  32137. case 'switchTab':
  32138. setTimeout(function () {
  32139. uni.switchTab(obj);
  32140. }, endtime);
  32141. break;
  32142. case 'navigateBack':
  32143. setTimeout(function () {
  32144. var history = getCurrentPages();
  32145. if (history.length > 1) {
  32146. uni.navigateBack({
  32147. delta: Number(url)
  32148. });
  32149. } else {
  32150. uni.switchTab({
  32151. url: '/pages/index/index'
  32152. });
  32153. }
  32154. }, endtime);
  32155. break;
  32156. }
  32157. }
  32158. function uniStartPullDownRefresh() {
  32159. var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32160. uni.startPullDownRefresh(args);
  32161. }
  32162. function uniStopPullDownRefresh() {
  32163. var endtime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1000;
  32164. setTimeout(function () {
  32165. uni.stopPullDownRefresh();
  32166. }, endtime);
  32167. }
  32168. // 获取图片信息
  32169. function uniGetImageInfo(path) {
  32170. return new Promise(function (resolve, reject) {
  32171. uni.getImageInfo({
  32172. src: path,
  32173. success: function success(res) {
  32174. console.log(res);
  32175. resolve(res);
  32176. },
  32177. fail: function fail(err) {
  32178. console.log(err);
  32179. reject(err);
  32180. }
  32181. });
  32182. });
  32183. }
  32184. // 获取节点信息
  32185. function uniSelectorQueryInfo(selector, _this) {
  32186. return new Promise(function (resolve, reject) {
  32187. var query = uni.createSelectorQuery().in(_this);
  32188. query.select(selector).boundingClientRect(function (res) {
  32189. // 获取节点坐标
  32190. resolve(res);
  32191. }).exec();
  32192. });
  32193. }
  32194. // 设置导航栏颜色
  32195. function uniSetNavigationBarColor() {
  32196. var backgroundColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "#e93323";
  32197. var frontColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "#ffffff";
  32198. uni.setNavigationBarColor({
  32199. frontColor: frontColor,
  32200. backgroundColor: backgroundColor,
  32201. animation: {
  32202. duration: 400,
  32203. timingFunc: 'easeIn'
  32204. }
  32205. });
  32206. }
  32207. // 跳转小程序
  32208. function uniNavigateToMiniProgram(appId) {
  32209. var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32210. var path = args.path,
  32211. _args$extraData = args.extraData,
  32212. extraData = _args$extraData === void 0 ? {
  32213. from: '跳转小程序要携带的信息'
  32214. } : _args$extraData,
  32215. envVersion = args.envVersion,
  32216. success = args.success,
  32217. fail = args.fail,
  32218. complete = args.complete;
  32219. var obj = {
  32220. path: path,
  32221. extraData: extraData,
  32222. envVersion: envVersion
  32223. };
  32224. obj = callBack(obj, {
  32225. success: success,
  32226. fail: fail,
  32227. complete: complete
  32228. });
  32229. uni.navigateToMiniProgram(_objectSpread({
  32230. appId: ''
  32231. }, obj));
  32232. }
  32233. // 返回上一个小程序
  32234. function uniNavigateBackMiniProgram() {
  32235. var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32236. var _args$extraData2 = args.extraData,
  32237. extraData = _args$extraData2 === void 0 ? {
  32238. from: '返回上一个小程序要携带的信息'
  32239. } : _args$extraData2,
  32240. success = args.success,
  32241. fail = args.fail,
  32242. complete = args.complete;
  32243. var obj = {
  32244. extraData: extraData
  32245. };
  32246. obj = callBack(obj, {
  32247. success: success,
  32248. fail: fail,
  32249. complete: complete
  32250. });
  32251. uni.navigateBackMiniProgram(_objectSpread({}, obj));
  32252. }
  32253. function callBack() {
  32254. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32255. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32256. var success = options.success,
  32257. fail = options.fail,
  32258. complete = options.complete;
  32259. if (success) {
  32260. name['success'] = function (res) {
  32261. success(res);
  32262. };
  32263. }
  32264. if (fail) {
  32265. name['fail'] = function (err) {
  32266. fail(err);
  32267. };
  32268. }
  32269. if (complete) {
  32270. name['complete'] = function (res) {
  32271. complete(res);
  32272. };
  32273. }
  32274. return name;
  32275. }
  32276. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  32277. /***/ }),
  32278. /***/ 87:
  32279. /*!************************************!*\
  32280. !*** E:/盈通/sulibao-mini/config.js ***!
  32281. \************************************/
  32282. /*! no static exports found */
  32283. /***/ (function(module, exports, __webpack_require__) {
  32284. "use strict";
  32285. /* WEBPACK VAR INJECTION */(function(wx) {
  32286. Object.defineProperty(exports, "__esModule", {
  32287. value: true
  32288. });
  32289. exports.WECHAT_LOGIN = exports.WECHAT_AUTH_BACK_URL = exports.VUE_APP_URL = void 0;
  32290. // api请求地址
  32291. var ApiURL = 'https://api.lx-device.com';
  32292. if (wx.getAccountInfoSync() && (wx.getAccountInfoSync().miniProgram.envVersion == 'develop' || wx.getAccountInfoSync().miniProgram.envVersion == 'trial')) {
  32293. ApiURL = 'http://slb-m.dev.ml1993.com/lx-api';
  32294. }
  32295. var VUE_APP_URL = ApiURL; //开发版体验 连接开发前管控制器
  32296. // export const VUE_APP_URL = 'http://192.168.11.67:8032'; //开发版体验 连接开发前管控制器
  32297. // 公众号中是否使用公众号授权登录 true公众号授权->auth界面下一步操作 false直接跳转login登录界面
  32298. exports.VUE_APP_URL = VUE_APP_URL;
  32299. var WECHAT_LOGIN = true;
  32300. // 授权之后返回原有地址
  32301. exports.WECHAT_LOGIN = WECHAT_LOGIN;
  32302. var WECHAT_AUTH_BACK_URL = 'WECHAT_AUTH_BACK_URL';
  32303. exports.WECHAT_AUTH_BACK_URL = WECHAT_AUTH_BACK_URL;
  32304. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  32305. /***/ }),
  32306. /***/ 9:
  32307. /*!*****************************************************************!*\
  32308. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  32309. \*****************************************************************/
  32310. /*! no static exports found */
  32311. /***/ (function(module, exports) {
  32312. function _arrayLikeToArray(arr, len) {
  32313. if (len == null || len > arr.length) len = arr.length;
  32314. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  32315. arr2[i] = arr[i];
  32316. }
  32317. return arr2;
  32318. }
  32319. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  32320. /***/ })
  32321. }]);
  32322. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map