vendor.js 1.3 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 11:
  53. /*!***************************************************************!*\
  54. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  55. \***************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  59. function _defineProperty(obj, key, value) {
  60. key = toPropertyKey(key);
  61. if (key in obj) {
  62. Object.defineProperty(obj, key, {
  63. value: value,
  64. enumerable: true,
  65. configurable: true,
  66. writable: true
  67. });
  68. } else {
  69. obj[key] = value;
  70. }
  71. return obj;
  72. }
  73. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  74. /***/ }),
  75. /***/ 12:
  76. /*!**************************************************************!*\
  77. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  78. \**************************************************************/
  79. /*! no static exports found */
  80. /***/ (function(module, exports, __webpack_require__) {
  81. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  82. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  83. function _toPropertyKey(arg) {
  84. var key = toPrimitive(arg, "string");
  85. return _typeof(key) === "symbol" ? key : String(key);
  86. }
  87. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  88. /***/ }),
  89. /***/ 13:
  90. /*!*******************************************************!*\
  91. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  92. \*******************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports) {
  95. function _typeof(obj) {
  96. "@babel/helpers - typeof";
  97. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  98. return typeof obj;
  99. } : function (obj) {
  100. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  101. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  102. }
  103. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  104. /***/ }),
  105. /***/ 14:
  106. /*!************************************************************!*\
  107. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  108. \************************************************************/
  109. /*! no static exports found */
  110. /***/ (function(module, exports, __webpack_require__) {
  111. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  112. function _toPrimitive(input, hint) {
  113. if (_typeof(input) !== "object" || input === null) return input;
  114. var prim = input[Symbol.toPrimitive];
  115. if (prim !== undefined) {
  116. var res = prim.call(input, hint || "default");
  117. if (_typeof(res) !== "object") return res;
  118. throw new TypeError("@@toPrimitive must return a primitive value.");
  119. }
  120. return (hint === "string" ? String : Number)(input);
  121. }
  122. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  123. /***/ }),
  124. /***/ 15:
  125. /*!**********************************************************!*\
  126. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  127. \**********************************************************/
  128. /*! no static exports found */
  129. /***/ (function(module, exports, __webpack_require__) {
  130. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  131. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  132. function _construct(Parent, args, Class) {
  133. if (isNativeReflectConstruct()) {
  134. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  135. } else {
  136. module.exports = _construct = function _construct(Parent, args, Class) {
  137. var a = [null];
  138. a.push.apply(a, args);
  139. var Constructor = Function.bind.apply(Parent, a);
  140. var instance = new Constructor();
  141. if (Class) setPrototypeOf(instance, Class.prototype);
  142. return instance;
  143. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  144. }
  145. return _construct.apply(null, arguments);
  146. }
  147. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  148. /***/ }),
  149. /***/ 16:
  150. /*!***************************************************************!*\
  151. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  152. \***************************************************************/
  153. /*! no static exports found */
  154. /***/ (function(module, exports) {
  155. function _setPrototypeOf(o, p) {
  156. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  157. o.__proto__ = p;
  158. return o;
  159. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  160. return _setPrototypeOf(o, p);
  161. }
  162. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  163. /***/ }),
  164. /***/ 17:
  165. /*!*************************************************************************!*\
  166. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  167. \*************************************************************************/
  168. /*! no static exports found */
  169. /***/ (function(module, exports) {
  170. function _isNativeReflectConstruct() {
  171. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  172. if (Reflect.construct.sham) return false;
  173. if (typeof Proxy === "function") return true;
  174. try {
  175. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  176. return true;
  177. } catch (e) {
  178. return false;
  179. }
  180. }
  181. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  182. /***/ }),
  183. /***/ 18:
  184. /*!******************************************************************!*\
  185. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  186. \******************************************************************/
  187. /*! no static exports found */
  188. /***/ (function(module, exports, __webpack_require__) {
  189. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  190. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  191. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  192. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  193. function _toConsumableArray(arr) {
  194. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  195. }
  196. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  197. /***/ }),
  198. /***/ 19:
  199. /*!******************************************************************!*\
  200. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  201. \******************************************************************/
  202. /*! no static exports found */
  203. /***/ (function(module, exports, __webpack_require__) {
  204. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  205. function _arrayWithoutHoles(arr) {
  206. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  207. }
  208. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  209. /***/ }),
  210. /***/ 2:
  211. /*!************************************************************!*\
  212. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  213. \************************************************************/
  214. /*! no static exports found */
  215. /***/ (function(module, exports, __webpack_require__) {
  216. "use strict";
  217. /* WEBPACK VAR INJECTION */(function(wx, global) {
  218. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  219. Object.defineProperty(exports, "__esModule", {
  220. value: true
  221. });
  222. exports.createApp = createApp;
  223. exports.createComponent = createComponent;
  224. exports.createPage = createPage;
  225. exports.createPlugin = createPlugin;
  226. exports.createSubpackageApp = createSubpackageApp;
  227. exports.default = void 0;
  228. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  229. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  230. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  231. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  232. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  233. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  234. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  235. 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; }
  236. 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; }
  237. var realAtob;
  238. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  239. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  240. if (typeof atob !== 'function') {
  241. realAtob = function realAtob(str) {
  242. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  243. if (!b64re.test(str)) {
  244. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  245. }
  246. // Adding the padding if missing, for semplicity
  247. str += '=='.slice(2 - (str.length & 3));
  248. var bitmap;
  249. var result = '';
  250. var r1;
  251. var r2;
  252. var i = 0;
  253. for (; i < str.length;) {
  254. 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++)));
  255. 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);
  256. }
  257. return result;
  258. };
  259. } else {
  260. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  261. realAtob = atob;
  262. }
  263. function b64DecodeUnicode(str) {
  264. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  265. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  266. }).join(''));
  267. }
  268. function getCurrentUserInfo() {
  269. var token = wx.getStorageSync('uni_id_token') || '';
  270. var tokenArr = token.split('.');
  271. if (!token || tokenArr.length !== 3) {
  272. return {
  273. uid: null,
  274. role: [],
  275. permission: [],
  276. tokenExpired: 0
  277. };
  278. }
  279. var userInfo;
  280. try {
  281. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  282. } catch (error) {
  283. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  284. }
  285. userInfo.tokenExpired = userInfo.exp * 1000;
  286. delete userInfo.exp;
  287. delete userInfo.iat;
  288. return userInfo;
  289. }
  290. function uniIdMixin(Vue) {
  291. Vue.prototype.uniIDHasRole = function (roleId) {
  292. var _getCurrentUserInfo = getCurrentUserInfo(),
  293. role = _getCurrentUserInfo.role;
  294. return role.indexOf(roleId) > -1;
  295. };
  296. Vue.prototype.uniIDHasPermission = function (permissionId) {
  297. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  298. permission = _getCurrentUserInfo2.permission;
  299. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  300. };
  301. Vue.prototype.uniIDTokenValid = function () {
  302. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  303. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  304. return tokenExpired > Date.now();
  305. };
  306. }
  307. var _toString = Object.prototype.toString;
  308. var hasOwnProperty = Object.prototype.hasOwnProperty;
  309. function isFn(fn) {
  310. return typeof fn === 'function';
  311. }
  312. function isStr(str) {
  313. return typeof str === 'string';
  314. }
  315. function isObject(obj) {
  316. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  317. }
  318. function isPlainObject(obj) {
  319. return _toString.call(obj) === '[object Object]';
  320. }
  321. function hasOwn(obj, key) {
  322. return hasOwnProperty.call(obj, key);
  323. }
  324. function noop() {}
  325. /**
  326. * Create a cached version of a pure function.
  327. */
  328. function cached(fn) {
  329. var cache = Object.create(null);
  330. return function cachedFn(str) {
  331. var hit = cache[str];
  332. return hit || (cache[str] = fn(str));
  333. };
  334. }
  335. /**
  336. * Camelize a hyphen-delimited string.
  337. */
  338. var camelizeRE = /-(\w)/g;
  339. var camelize = cached(function (str) {
  340. return str.replace(camelizeRE, function (_, c) {
  341. return c ? c.toUpperCase() : '';
  342. });
  343. });
  344. function sortObject(obj) {
  345. var sortObj = {};
  346. if (isPlainObject(obj)) {
  347. Object.keys(obj).sort().forEach(function (key) {
  348. sortObj[key] = obj[key];
  349. });
  350. }
  351. return !Object.keys(sortObj) ? obj : sortObj;
  352. }
  353. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  354. var globalInterceptors = {};
  355. var scopedInterceptors = {};
  356. function mergeHook(parentVal, childVal) {
  357. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  358. return res ? dedupeHooks(res) : res;
  359. }
  360. function dedupeHooks(hooks) {
  361. var res = [];
  362. for (var i = 0; i < hooks.length; i++) {
  363. if (res.indexOf(hooks[i]) === -1) {
  364. res.push(hooks[i]);
  365. }
  366. }
  367. return res;
  368. }
  369. function removeHook(hooks, hook) {
  370. var index = hooks.indexOf(hook);
  371. if (index !== -1) {
  372. hooks.splice(index, 1);
  373. }
  374. }
  375. function mergeInterceptorHook(interceptor, option) {
  376. Object.keys(option).forEach(function (hook) {
  377. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  378. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  379. }
  380. });
  381. }
  382. function removeInterceptorHook(interceptor, option) {
  383. if (!interceptor || !option) {
  384. return;
  385. }
  386. Object.keys(option).forEach(function (hook) {
  387. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  388. removeHook(interceptor[hook], option[hook]);
  389. }
  390. });
  391. }
  392. function addInterceptor(method, option) {
  393. if (typeof method === 'string' && isPlainObject(option)) {
  394. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  395. } else if (isPlainObject(method)) {
  396. mergeInterceptorHook(globalInterceptors, method);
  397. }
  398. }
  399. function removeInterceptor(method, option) {
  400. if (typeof method === 'string') {
  401. if (isPlainObject(option)) {
  402. removeInterceptorHook(scopedInterceptors[method], option);
  403. } else {
  404. delete scopedInterceptors[method];
  405. }
  406. } else if (isPlainObject(method)) {
  407. removeInterceptorHook(globalInterceptors, method);
  408. }
  409. }
  410. function wrapperHook(hook, params) {
  411. return function (data) {
  412. return hook(data, params) || data;
  413. };
  414. }
  415. function isPromise(obj) {
  416. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  417. }
  418. function queue(hooks, data, params) {
  419. var promise = false;
  420. for (var i = 0; i < hooks.length; i++) {
  421. var hook = hooks[i];
  422. if (promise) {
  423. promise = Promise.resolve(wrapperHook(hook, params));
  424. } else {
  425. var res = hook(data, params);
  426. if (isPromise(res)) {
  427. promise = Promise.resolve(res);
  428. }
  429. if (res === false) {
  430. return {
  431. then: function then() {}
  432. };
  433. }
  434. }
  435. }
  436. return promise || {
  437. then: function then(callback) {
  438. return callback(data);
  439. }
  440. };
  441. }
  442. function wrapperOptions(interceptor) {
  443. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  444. ['success', 'fail', 'complete'].forEach(function (name) {
  445. if (Array.isArray(interceptor[name])) {
  446. var oldCallback = options[name];
  447. options[name] = function callbackInterceptor(res) {
  448. queue(interceptor[name], res, options).then(function (res) {
  449. /* eslint-disable no-mixed-operators */
  450. return isFn(oldCallback) && oldCallback(res) || res;
  451. });
  452. };
  453. }
  454. });
  455. return options;
  456. }
  457. function wrapperReturnValue(method, returnValue) {
  458. var returnValueHooks = [];
  459. if (Array.isArray(globalInterceptors.returnValue)) {
  460. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  461. }
  462. var interceptor = scopedInterceptors[method];
  463. if (interceptor && Array.isArray(interceptor.returnValue)) {
  464. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  465. }
  466. returnValueHooks.forEach(function (hook) {
  467. returnValue = hook(returnValue) || returnValue;
  468. });
  469. return returnValue;
  470. }
  471. function getApiInterceptorHooks(method) {
  472. var interceptor = Object.create(null);
  473. Object.keys(globalInterceptors).forEach(function (hook) {
  474. if (hook !== 'returnValue') {
  475. interceptor[hook] = globalInterceptors[hook].slice();
  476. }
  477. });
  478. var scopedInterceptor = scopedInterceptors[method];
  479. if (scopedInterceptor) {
  480. Object.keys(scopedInterceptor).forEach(function (hook) {
  481. if (hook !== 'returnValue') {
  482. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  483. }
  484. });
  485. }
  486. return interceptor;
  487. }
  488. function invokeApi(method, api, options) {
  489. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  490. params[_key - 3] = arguments[_key];
  491. }
  492. var interceptor = getApiInterceptorHooks(method);
  493. if (interceptor && Object.keys(interceptor).length) {
  494. if (Array.isArray(interceptor.invoke)) {
  495. var res = queue(interceptor.invoke, options);
  496. return res.then(function (options) {
  497. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  498. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  499. });
  500. } else {
  501. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  502. }
  503. }
  504. return api.apply(void 0, [options].concat(params));
  505. }
  506. var promiseInterceptor = {
  507. returnValue: function returnValue(res) {
  508. if (!isPromise(res)) {
  509. return res;
  510. }
  511. return new Promise(function (resolve, reject) {
  512. res.then(function (res) {
  513. if (res[0]) {
  514. reject(res[0]);
  515. } else {
  516. resolve(res[1]);
  517. }
  518. });
  519. });
  520. }
  521. };
  522. 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/;
  523. var CONTEXT_API_RE = /^create|Manager$/;
  524. // Context例外情况
  525. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  526. // 同步例外情况
  527. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  528. var CALLBACK_API_RE = /^on|^off/;
  529. function isContextApi(name) {
  530. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  531. }
  532. function isSyncApi(name) {
  533. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  534. }
  535. function isCallbackApi(name) {
  536. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  537. }
  538. function handlePromise(promise) {
  539. return promise.then(function (data) {
  540. return [null, data];
  541. }).catch(function (err) {
  542. return [err];
  543. });
  544. }
  545. function shouldPromise(name) {
  546. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  547. return false;
  548. }
  549. return true;
  550. }
  551. /* eslint-disable no-extend-native */
  552. if (!Promise.prototype.finally) {
  553. Promise.prototype.finally = function (callback) {
  554. var promise = this.constructor;
  555. return this.then(function (value) {
  556. return promise.resolve(callback()).then(function () {
  557. return value;
  558. });
  559. }, function (reason) {
  560. return promise.resolve(callback()).then(function () {
  561. throw reason;
  562. });
  563. });
  564. };
  565. }
  566. function promisify(name, api) {
  567. if (!shouldPromise(name) || !isFn(api)) {
  568. return api;
  569. }
  570. return function promiseApi() {
  571. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  572. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  573. params[_key2 - 1] = arguments[_key2];
  574. }
  575. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  576. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  577. }
  578. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  579. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  580. success: resolve,
  581. fail: reject
  582. })].concat(params));
  583. })));
  584. };
  585. }
  586. var EPS = 1e-4;
  587. var BASE_DEVICE_WIDTH = 750;
  588. var isIOS = false;
  589. var deviceWidth = 0;
  590. var deviceDPR = 0;
  591. function checkDeviceWidth() {
  592. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  593. platform = _wx$getSystemInfoSync.platform,
  594. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  595. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  596. deviceWidth = windowWidth;
  597. deviceDPR = pixelRatio;
  598. isIOS = platform === 'ios';
  599. }
  600. function upx2px(number, newDeviceWidth) {
  601. if (deviceWidth === 0) {
  602. checkDeviceWidth();
  603. }
  604. number = Number(number);
  605. if (number === 0) {
  606. return 0;
  607. }
  608. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  609. if (result < 0) {
  610. result = -result;
  611. }
  612. result = Math.floor(result + EPS);
  613. if (result === 0) {
  614. if (deviceDPR === 1 || !isIOS) {
  615. result = 1;
  616. } else {
  617. result = 0.5;
  618. }
  619. }
  620. return number < 0 ? -result : result;
  621. }
  622. var LOCALE_ZH_HANS = 'zh-Hans';
  623. var LOCALE_ZH_HANT = 'zh-Hant';
  624. var LOCALE_EN = 'en';
  625. var LOCALE_FR = 'fr';
  626. var LOCALE_ES = 'es';
  627. var messages = {};
  628. var locale;
  629. {
  630. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  631. }
  632. function initI18nMessages() {
  633. if (!isEnableLocale()) {
  634. return;
  635. }
  636. var localeKeys = Object.keys(__uniConfig.locales);
  637. if (localeKeys.length) {
  638. localeKeys.forEach(function (locale) {
  639. var curMessages = messages[locale];
  640. var userMessages = __uniConfig.locales[locale];
  641. if (curMessages) {
  642. Object.assign(curMessages, userMessages);
  643. } else {
  644. messages[locale] = userMessages;
  645. }
  646. });
  647. }
  648. }
  649. initI18nMessages();
  650. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  651. var t = i18n.t;
  652. var i18nMixin = i18n.mixin = {
  653. beforeCreate: function beforeCreate() {
  654. var _this = this;
  655. var unwatch = i18n.i18n.watchLocale(function () {
  656. _this.$forceUpdate();
  657. });
  658. this.$once('hook:beforeDestroy', function () {
  659. unwatch();
  660. });
  661. },
  662. methods: {
  663. $$t: function $$t(key, values) {
  664. return t(key, values);
  665. }
  666. }
  667. };
  668. var setLocale = i18n.setLocale;
  669. var getLocale = i18n.getLocale;
  670. function initAppLocale(Vue, appVm, locale) {
  671. var state = Vue.observable({
  672. locale: locale || i18n.getLocale()
  673. });
  674. var localeWatchers = [];
  675. appVm.$watchLocale = function (fn) {
  676. localeWatchers.push(fn);
  677. };
  678. Object.defineProperty(appVm, '$locale', {
  679. get: function get() {
  680. return state.locale;
  681. },
  682. set: function set(v) {
  683. state.locale = v;
  684. localeWatchers.forEach(function (watch) {
  685. return watch(v);
  686. });
  687. }
  688. });
  689. }
  690. function isEnableLocale() {
  691. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  692. }
  693. function include(str, parts) {
  694. return !!parts.find(function (part) {
  695. return str.indexOf(part) !== -1;
  696. });
  697. }
  698. function startsWith(str, parts) {
  699. return parts.find(function (part) {
  700. return str.indexOf(part) === 0;
  701. });
  702. }
  703. function normalizeLocale(locale, messages) {
  704. if (!locale) {
  705. return;
  706. }
  707. locale = locale.trim().replace(/_/g, '-');
  708. if (messages && messages[locale]) {
  709. return locale;
  710. }
  711. locale = locale.toLowerCase();
  712. if (locale === 'chinese') {
  713. // 支付宝
  714. return LOCALE_ZH_HANS;
  715. }
  716. if (locale.indexOf('zh') === 0) {
  717. if (locale.indexOf('-hans') > -1) {
  718. return LOCALE_ZH_HANS;
  719. }
  720. if (locale.indexOf('-hant') > -1) {
  721. return LOCALE_ZH_HANT;
  722. }
  723. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  724. return LOCALE_ZH_HANT;
  725. }
  726. return LOCALE_ZH_HANS;
  727. }
  728. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  729. if (lang) {
  730. return lang;
  731. }
  732. }
  733. // export function initI18n() {
  734. // const localeKeys = Object.keys(__uniConfig.locales || {})
  735. // if (localeKeys.length) {
  736. // localeKeys.forEach((locale) =>
  737. // i18n.add(locale, __uniConfig.locales[locale])
  738. // )
  739. // }
  740. // }
  741. function getLocale$1() {
  742. // 优先使用 $locale
  743. if (isFn(getApp)) {
  744. var app = getApp({
  745. allowDefault: true
  746. });
  747. if (app && app.$vm) {
  748. return app.$vm.$locale;
  749. }
  750. }
  751. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  752. }
  753. function setLocale$1(locale) {
  754. var app = isFn(getApp) ? getApp() : false;
  755. if (!app) {
  756. return false;
  757. }
  758. var oldLocale = app.$vm.$locale;
  759. if (oldLocale !== locale) {
  760. app.$vm.$locale = locale;
  761. onLocaleChangeCallbacks.forEach(function (fn) {
  762. return fn({
  763. locale: locale
  764. });
  765. });
  766. return true;
  767. }
  768. return false;
  769. }
  770. var onLocaleChangeCallbacks = [];
  771. function onLocaleChange(fn) {
  772. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  773. onLocaleChangeCallbacks.push(fn);
  774. }
  775. }
  776. if (typeof global !== 'undefined') {
  777. global.getLocale = getLocale$1;
  778. }
  779. var interceptors = {
  780. promiseInterceptor: promiseInterceptor
  781. };
  782. var baseApi = /*#__PURE__*/Object.freeze({
  783. __proto__: null,
  784. upx2px: upx2px,
  785. getLocale: getLocale$1,
  786. setLocale: setLocale$1,
  787. onLocaleChange: onLocaleChange,
  788. addInterceptor: addInterceptor,
  789. removeInterceptor: removeInterceptor,
  790. interceptors: interceptors
  791. });
  792. function findExistsPageIndex(url) {
  793. var pages = getCurrentPages();
  794. var len = pages.length;
  795. while (len--) {
  796. var page = pages[len];
  797. if (page.$page && page.$page.fullPath === url) {
  798. return len;
  799. }
  800. }
  801. return -1;
  802. }
  803. var redirectTo = {
  804. name: function name(fromArgs) {
  805. if (fromArgs.exists === 'back' && fromArgs.delta) {
  806. return 'navigateBack';
  807. }
  808. return 'redirectTo';
  809. },
  810. args: function args(fromArgs) {
  811. if (fromArgs.exists === 'back' && fromArgs.url) {
  812. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  813. if (existsPageIndex !== -1) {
  814. var delta = getCurrentPages().length - 1 - existsPageIndex;
  815. if (delta > 0) {
  816. fromArgs.delta = delta;
  817. }
  818. }
  819. }
  820. }
  821. };
  822. var previewImage = {
  823. args: function args(fromArgs) {
  824. var currentIndex = parseInt(fromArgs.current);
  825. if (isNaN(currentIndex)) {
  826. return;
  827. }
  828. var urls = fromArgs.urls;
  829. if (!Array.isArray(urls)) {
  830. return;
  831. }
  832. var len = urls.length;
  833. if (!len) {
  834. return;
  835. }
  836. if (currentIndex < 0) {
  837. currentIndex = 0;
  838. } else if (currentIndex >= len) {
  839. currentIndex = len - 1;
  840. }
  841. if (currentIndex > 0) {
  842. fromArgs.current = urls[currentIndex];
  843. fromArgs.urls = urls.filter(function (item, index) {
  844. return index < currentIndex ? item !== urls[currentIndex] : true;
  845. });
  846. } else {
  847. fromArgs.current = urls[0];
  848. }
  849. return {
  850. indicator: false,
  851. loop: false
  852. };
  853. }
  854. };
  855. var UUID_KEY = '__DC_STAT_UUID';
  856. var deviceId;
  857. function useDeviceId(result) {
  858. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  859. if (!deviceId) {
  860. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  861. wx.setStorage({
  862. key: UUID_KEY,
  863. data: deviceId
  864. });
  865. }
  866. result.deviceId = deviceId;
  867. }
  868. function addSafeAreaInsets(result) {
  869. if (result.safeArea) {
  870. var safeArea = result.safeArea;
  871. result.safeAreaInsets = {
  872. top: safeArea.top,
  873. left: safeArea.left,
  874. right: result.windowWidth - safeArea.right,
  875. bottom: result.screenHeight - safeArea.bottom
  876. };
  877. }
  878. }
  879. function populateParameters(result) {
  880. var _result$brand = result.brand,
  881. brand = _result$brand === void 0 ? '' : _result$brand,
  882. _result$model = result.model,
  883. model = _result$model === void 0 ? '' : _result$model,
  884. _result$system = result.system,
  885. system = _result$system === void 0 ? '' : _result$system,
  886. _result$language = result.language,
  887. language = _result$language === void 0 ? '' : _result$language,
  888. theme = result.theme,
  889. version = result.version,
  890. platform = result.platform,
  891. fontSizeSetting = result.fontSizeSetting,
  892. SDKVersion = result.SDKVersion,
  893. pixelRatio = result.pixelRatio,
  894. deviceOrientation = result.deviceOrientation;
  895. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  896. var extraParam = {};
  897. // osName osVersion
  898. var osName = '';
  899. var osVersion = '';
  900. {
  901. osName = system.split(' ')[0] || '';
  902. osVersion = system.split(' ')[1] || '';
  903. }
  904. var hostVersion = version;
  905. // deviceType
  906. var deviceType = getGetDeviceType(result, model);
  907. // deviceModel
  908. var deviceBrand = getDeviceBrand(brand);
  909. // hostName
  910. var _hostName = getHostName(result);
  911. // deviceOrientation
  912. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  913. // devicePixelRatio
  914. var _devicePixelRatio = pixelRatio;
  915. // SDKVersion
  916. var _SDKVersion = SDKVersion;
  917. // hostLanguage
  918. var hostLanguage = language.replace(/_/g, '-');
  919. // wx.getAccountInfoSync
  920. var parameters = {
  921. appId: "__UNI__5FB7046",
  922. appName: "贞达市政工程",
  923. appVersion: "1.0.0",
  924. appVersionCode: "100",
  925. appLanguage: getAppLanguage(hostLanguage),
  926. uniCompileVersion: "3.8.12",
  927. uniRuntimeVersion: "3.8.12",
  928. uniPlatform: undefined || "mp-weixin",
  929. deviceBrand: deviceBrand,
  930. deviceModel: model,
  931. deviceType: deviceType,
  932. devicePixelRatio: _devicePixelRatio,
  933. deviceOrientation: _deviceOrientation,
  934. osName: osName.toLocaleLowerCase(),
  935. osVersion: osVersion,
  936. hostTheme: theme,
  937. hostVersion: hostVersion,
  938. hostLanguage: hostLanguage,
  939. hostName: _hostName,
  940. hostSDKVersion: _SDKVersion,
  941. hostFontSizeSetting: fontSizeSetting,
  942. windowTop: 0,
  943. windowBottom: 0,
  944. // TODO
  945. osLanguage: undefined,
  946. osTheme: undefined,
  947. ua: undefined,
  948. hostPackageName: undefined,
  949. browserName: undefined,
  950. browserVersion: undefined
  951. };
  952. Object.assign(result, parameters, extraParam);
  953. }
  954. function getGetDeviceType(result, model) {
  955. var deviceType = result.deviceType || 'phone';
  956. {
  957. var deviceTypeMaps = {
  958. ipad: 'pad',
  959. windows: 'pc',
  960. mac: 'pc'
  961. };
  962. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  963. var _model = model.toLocaleLowerCase();
  964. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  965. var _m = deviceTypeMapsKeys[index];
  966. if (_model.indexOf(_m) !== -1) {
  967. deviceType = deviceTypeMaps[_m];
  968. break;
  969. }
  970. }
  971. }
  972. return deviceType;
  973. }
  974. function getDeviceBrand(brand) {
  975. var deviceBrand = brand;
  976. if (deviceBrand) {
  977. deviceBrand = brand.toLocaleLowerCase();
  978. }
  979. return deviceBrand;
  980. }
  981. function getAppLanguage(defaultLanguage) {
  982. return getLocale$1 ? getLocale$1() : defaultLanguage;
  983. }
  984. function getHostName(result) {
  985. var _platform = 'WeChat';
  986. var _hostName = result.hostName || _platform; // mp-jd
  987. {
  988. if (result.environment) {
  989. _hostName = result.environment;
  990. } else if (result.host && result.host.env) {
  991. _hostName = result.host.env;
  992. }
  993. }
  994. return _hostName;
  995. }
  996. var getSystemInfo = {
  997. returnValue: function returnValue(result) {
  998. useDeviceId(result);
  999. addSafeAreaInsets(result);
  1000. populateParameters(result);
  1001. }
  1002. };
  1003. var showActionSheet = {
  1004. args: function args(fromArgs) {
  1005. if ((0, _typeof2.default)(fromArgs) === 'object') {
  1006. fromArgs.alertText = fromArgs.title;
  1007. }
  1008. }
  1009. };
  1010. var getAppBaseInfo = {
  1011. returnValue: function returnValue(result) {
  1012. var _result = result,
  1013. version = _result.version,
  1014. language = _result.language,
  1015. SDKVersion = _result.SDKVersion,
  1016. theme = _result.theme;
  1017. var _hostName = getHostName(result);
  1018. var hostLanguage = language.replace('_', '-');
  1019. result = sortObject(Object.assign(result, {
  1020. appId: "__UNI__5FB7046",
  1021. appName: "贞达市政工程",
  1022. appVersion: "1.0.0",
  1023. appVersionCode: "100",
  1024. appLanguage: getAppLanguage(hostLanguage),
  1025. hostVersion: version,
  1026. hostLanguage: hostLanguage,
  1027. hostName: _hostName,
  1028. hostSDKVersion: SDKVersion,
  1029. hostTheme: theme
  1030. }));
  1031. }
  1032. };
  1033. var getDeviceInfo = {
  1034. returnValue: function returnValue(result) {
  1035. var _result2 = result,
  1036. brand = _result2.brand,
  1037. model = _result2.model;
  1038. var deviceType = getGetDeviceType(result, model);
  1039. var deviceBrand = getDeviceBrand(brand);
  1040. useDeviceId(result);
  1041. result = sortObject(Object.assign(result, {
  1042. deviceType: deviceType,
  1043. deviceBrand: deviceBrand,
  1044. deviceModel: model
  1045. }));
  1046. }
  1047. };
  1048. var getWindowInfo = {
  1049. returnValue: function returnValue(result) {
  1050. addSafeAreaInsets(result);
  1051. result = sortObject(Object.assign(result, {
  1052. windowTop: 0,
  1053. windowBottom: 0
  1054. }));
  1055. }
  1056. };
  1057. var getAppAuthorizeSetting = {
  1058. returnValue: function returnValue(result) {
  1059. var locationReducedAccuracy = result.locationReducedAccuracy;
  1060. result.locationAccuracy = 'unsupported';
  1061. if (locationReducedAccuracy === true) {
  1062. result.locationAccuracy = 'reduced';
  1063. } else if (locationReducedAccuracy === false) {
  1064. result.locationAccuracy = 'full';
  1065. }
  1066. }
  1067. };
  1068. // import navigateTo from 'uni-helpers/navigate-to'
  1069. var compressImage = {
  1070. args: function args(fromArgs) {
  1071. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  1072. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  1073. fromArgs.compressHeight = fromArgs.compressedHeight;
  1074. }
  1075. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  1076. fromArgs.compressWidth = fromArgs.compressedWidth;
  1077. }
  1078. }
  1079. };
  1080. var protocols = {
  1081. redirectTo: redirectTo,
  1082. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  1083. previewImage: previewImage,
  1084. getSystemInfo: getSystemInfo,
  1085. getSystemInfoSync: getSystemInfo,
  1086. showActionSheet: showActionSheet,
  1087. getAppBaseInfo: getAppBaseInfo,
  1088. getDeviceInfo: getDeviceInfo,
  1089. getWindowInfo: getWindowInfo,
  1090. getAppAuthorizeSetting: getAppAuthorizeSetting,
  1091. compressImage: compressImage
  1092. };
  1093. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  1094. var canIUses = [];
  1095. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  1096. function processCallback(methodName, method, returnValue) {
  1097. return function (res) {
  1098. return method(processReturnValue(methodName, res, returnValue));
  1099. };
  1100. }
  1101. function processArgs(methodName, fromArgs) {
  1102. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1103. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1104. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  1105. if (isPlainObject(fromArgs)) {
  1106. // 一般 api 的参数解析
  1107. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  1108. if (isFn(argsOption)) {
  1109. argsOption = argsOption(fromArgs, toArgs) || {};
  1110. }
  1111. for (var key in fromArgs) {
  1112. if (hasOwn(argsOption, key)) {
  1113. var keyOption = argsOption[key];
  1114. if (isFn(keyOption)) {
  1115. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1116. }
  1117. if (!keyOption) {
  1118. // 不支持的参数
  1119. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  1120. } else if (isStr(keyOption)) {
  1121. // 重写参数 key
  1122. toArgs[keyOption] = fromArgs[key];
  1123. } else if (isPlainObject(keyOption)) {
  1124. // {name:newName,value:value}可重新指定参数 key:value
  1125. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1126. }
  1127. } else if (CALLBACKS.indexOf(key) !== -1) {
  1128. if (isFn(fromArgs[key])) {
  1129. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  1130. }
  1131. } else {
  1132. if (!keepFromArgs) {
  1133. toArgs[key] = fromArgs[key];
  1134. }
  1135. }
  1136. }
  1137. return toArgs;
  1138. } else if (isFn(fromArgs)) {
  1139. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1140. }
  1141. return fromArgs;
  1142. }
  1143. function processReturnValue(methodName, res, returnValue) {
  1144. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  1145. if (isFn(protocols.returnValue)) {
  1146. // 处理通用 returnValue
  1147. res = protocols.returnValue(methodName, res);
  1148. }
  1149. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1150. }
  1151. function wrapper(methodName, method) {
  1152. if (hasOwn(protocols, methodName)) {
  1153. var protocol = protocols[methodName];
  1154. if (!protocol) {
  1155. // 暂不支持的 api
  1156. return function () {
  1157. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1158. };
  1159. }
  1160. return function (arg1, arg2) {
  1161. // 目前 api 最多两个参数
  1162. var options = protocol;
  1163. if (isFn(protocol)) {
  1164. options = protocol(arg1);
  1165. }
  1166. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1167. var args = [arg1];
  1168. if (typeof arg2 !== 'undefined') {
  1169. args.push(arg2);
  1170. }
  1171. if (isFn(options.name)) {
  1172. methodName = options.name(arg1);
  1173. } else if (isStr(options.name)) {
  1174. methodName = options.name;
  1175. }
  1176. var returnValue = wx[methodName].apply(wx, args);
  1177. if (isSyncApi(methodName)) {
  1178. // 同步 api
  1179. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1180. }
  1181. return returnValue;
  1182. };
  1183. }
  1184. return method;
  1185. }
  1186. var todoApis = Object.create(null);
  1187. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1188. function createTodoApi(name) {
  1189. return function todoApi(_ref) {
  1190. var fail = _ref.fail,
  1191. complete = _ref.complete;
  1192. var res = {
  1193. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1194. };
  1195. isFn(fail) && fail(res);
  1196. isFn(complete) && complete(res);
  1197. };
  1198. }
  1199. TODOS.forEach(function (name) {
  1200. todoApis[name] = createTodoApi(name);
  1201. });
  1202. var providers = {
  1203. oauth: ['weixin'],
  1204. share: ['weixin'],
  1205. payment: ['wxpay'],
  1206. push: ['weixin']
  1207. };
  1208. function getProvider(_ref2) {
  1209. var service = _ref2.service,
  1210. success = _ref2.success,
  1211. fail = _ref2.fail,
  1212. complete = _ref2.complete;
  1213. var res = false;
  1214. if (providers[service]) {
  1215. res = {
  1216. errMsg: 'getProvider:ok',
  1217. service: service,
  1218. provider: providers[service]
  1219. };
  1220. isFn(success) && success(res);
  1221. } else {
  1222. res = {
  1223. errMsg: 'getProvider:fail service not found'
  1224. };
  1225. isFn(fail) && fail(res);
  1226. }
  1227. isFn(complete) && complete(res);
  1228. }
  1229. var extraApi = /*#__PURE__*/Object.freeze({
  1230. __proto__: null,
  1231. getProvider: getProvider
  1232. });
  1233. var getEmitter = function () {
  1234. var Emitter;
  1235. return function getUniEmitter() {
  1236. if (!Emitter) {
  1237. Emitter = new _vue.default();
  1238. }
  1239. return Emitter;
  1240. };
  1241. }();
  1242. function apply(ctx, method, args) {
  1243. return ctx[method].apply(ctx, args);
  1244. }
  1245. function $on() {
  1246. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1247. }
  1248. function $off() {
  1249. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1250. }
  1251. function $once() {
  1252. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1253. }
  1254. function $emit() {
  1255. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1256. }
  1257. var eventApi = /*#__PURE__*/Object.freeze({
  1258. __proto__: null,
  1259. $on: $on,
  1260. $off: $off,
  1261. $once: $once,
  1262. $emit: $emit
  1263. });
  1264. /**
  1265. * 框架内 try-catch
  1266. */
  1267. /**
  1268. * 开发者 try-catch
  1269. */
  1270. function tryCatch(fn) {
  1271. return function () {
  1272. try {
  1273. return fn.apply(fn, arguments);
  1274. } catch (e) {
  1275. // TODO
  1276. console.error(e);
  1277. }
  1278. };
  1279. }
  1280. function getApiCallbacks(params) {
  1281. var apiCallbacks = {};
  1282. for (var name in params) {
  1283. var param = params[name];
  1284. if (isFn(param)) {
  1285. apiCallbacks[name] = tryCatch(param);
  1286. delete params[name];
  1287. }
  1288. }
  1289. return apiCallbacks;
  1290. }
  1291. var cid;
  1292. var cidErrMsg;
  1293. var enabled;
  1294. function normalizePushMessage(message) {
  1295. try {
  1296. return JSON.parse(message);
  1297. } catch (e) {}
  1298. return message;
  1299. }
  1300. function invokePushCallback(args) {
  1301. if (args.type === 'enabled') {
  1302. enabled = true;
  1303. } else if (args.type === 'clientId') {
  1304. cid = args.cid;
  1305. cidErrMsg = args.errMsg;
  1306. invokeGetPushCidCallbacks(cid, args.errMsg);
  1307. } else if (args.type === 'pushMsg') {
  1308. var message = {
  1309. type: 'receive',
  1310. data: normalizePushMessage(args.message)
  1311. };
  1312. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1313. var callback = onPushMessageCallbacks[i];
  1314. callback(message);
  1315. // 该消息已被阻止
  1316. if (message.stopped) {
  1317. break;
  1318. }
  1319. }
  1320. } else if (args.type === 'click') {
  1321. onPushMessageCallbacks.forEach(function (callback) {
  1322. callback({
  1323. type: 'click',
  1324. data: normalizePushMessage(args.message)
  1325. });
  1326. });
  1327. }
  1328. }
  1329. var getPushCidCallbacks = [];
  1330. function invokeGetPushCidCallbacks(cid, errMsg) {
  1331. getPushCidCallbacks.forEach(function (callback) {
  1332. callback(cid, errMsg);
  1333. });
  1334. getPushCidCallbacks.length = 0;
  1335. }
  1336. function getPushClientId(args) {
  1337. if (!isPlainObject(args)) {
  1338. args = {};
  1339. }
  1340. var _getApiCallbacks = getApiCallbacks(args),
  1341. success = _getApiCallbacks.success,
  1342. fail = _getApiCallbacks.fail,
  1343. complete = _getApiCallbacks.complete;
  1344. var hasSuccess = isFn(success);
  1345. var hasFail = isFn(fail);
  1346. var hasComplete = isFn(complete);
  1347. Promise.resolve().then(function () {
  1348. if (typeof enabled === 'undefined') {
  1349. enabled = false;
  1350. cid = '';
  1351. cidErrMsg = 'uniPush is not enabled';
  1352. }
  1353. getPushCidCallbacks.push(function (cid, errMsg) {
  1354. var res;
  1355. if (cid) {
  1356. res = {
  1357. errMsg: 'getPushClientId:ok',
  1358. cid: cid
  1359. };
  1360. hasSuccess && success(res);
  1361. } else {
  1362. res = {
  1363. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1364. };
  1365. hasFail && fail(res);
  1366. }
  1367. hasComplete && complete(res);
  1368. });
  1369. if (typeof cid !== 'undefined') {
  1370. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1371. }
  1372. });
  1373. }
  1374. var onPushMessageCallbacks = [];
  1375. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1376. var onPushMessage = function onPushMessage(fn) {
  1377. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1378. onPushMessageCallbacks.push(fn);
  1379. }
  1380. };
  1381. var offPushMessage = function offPushMessage(fn) {
  1382. if (!fn) {
  1383. onPushMessageCallbacks.length = 0;
  1384. } else {
  1385. var index = onPushMessageCallbacks.indexOf(fn);
  1386. if (index > -1) {
  1387. onPushMessageCallbacks.splice(index, 1);
  1388. }
  1389. }
  1390. };
  1391. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1392. if (!baseInfo) {
  1393. baseInfo = wx.getSystemInfoSync();
  1394. }
  1395. var host = baseInfo ? baseInfo.host : null;
  1396. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1397. var api = /*#__PURE__*/Object.freeze({
  1398. __proto__: null,
  1399. shareVideoMessage: shareVideoMessage,
  1400. getPushClientId: getPushClientId,
  1401. onPushMessage: onPushMessage,
  1402. offPushMessage: offPushMessage,
  1403. invokePushCallback: invokePushCallback
  1404. });
  1405. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1406. function findVmByVueId(vm, vuePid) {
  1407. var $children = vm.$children;
  1408. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1409. for (var i = $children.length - 1; i >= 0; i--) {
  1410. var childVm = $children[i];
  1411. if (childVm.$scope._$vueId === vuePid) {
  1412. return childVm;
  1413. }
  1414. }
  1415. // 反向递归查找
  1416. var parentVm;
  1417. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1418. parentVm = findVmByVueId($children[_i], vuePid);
  1419. if (parentVm) {
  1420. return parentVm;
  1421. }
  1422. }
  1423. }
  1424. function initBehavior(options) {
  1425. return Behavior(options);
  1426. }
  1427. function isPage() {
  1428. return !!this.route;
  1429. }
  1430. function initRelation(detail) {
  1431. this.triggerEvent('__l', detail);
  1432. }
  1433. function selectAllComponents(mpInstance, selector, $refs) {
  1434. var components = mpInstance.selectAllComponents(selector) || [];
  1435. components.forEach(function (component) {
  1436. var ref = component.dataset.ref;
  1437. $refs[ref] = component.$vm || toSkip(component);
  1438. {
  1439. if (component.dataset.vueGeneric === 'scoped') {
  1440. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1441. selectAllComponents(scopedComponent, selector, $refs);
  1442. });
  1443. }
  1444. }
  1445. });
  1446. }
  1447. function syncRefs(refs, newRefs) {
  1448. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1449. var newKeys = Object.keys(newRefs);
  1450. newKeys.forEach(function (key) {
  1451. var oldValue = refs[key];
  1452. var newValue = newRefs[key];
  1453. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1454. return oldValue.includes(value);
  1455. })) {
  1456. return;
  1457. }
  1458. refs[key] = newValue;
  1459. oldKeys.delete(key);
  1460. });
  1461. oldKeys.forEach(function (key) {
  1462. delete refs[key];
  1463. });
  1464. return refs;
  1465. }
  1466. function initRefs(vm) {
  1467. var mpInstance = vm.$scope;
  1468. var refs = {};
  1469. Object.defineProperty(vm, '$refs', {
  1470. get: function get() {
  1471. var $refs = {};
  1472. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1473. // TODO 暂不考虑 for 中的 scoped
  1474. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1475. forComponents.forEach(function (component) {
  1476. var ref = component.dataset.ref;
  1477. if (!$refs[ref]) {
  1478. $refs[ref] = [];
  1479. }
  1480. $refs[ref].push(component.$vm || toSkip(component));
  1481. });
  1482. return syncRefs(refs, $refs);
  1483. }
  1484. });
  1485. }
  1486. function handleLink(event) {
  1487. var _ref3 = event.detail || event.value,
  1488. vuePid = _ref3.vuePid,
  1489. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1490. var parentVm;
  1491. if (vuePid) {
  1492. parentVm = findVmByVueId(this.$vm, vuePid);
  1493. }
  1494. if (!parentVm) {
  1495. parentVm = this.$vm;
  1496. }
  1497. vueOptions.parent = parentVm;
  1498. }
  1499. function markMPComponent(component) {
  1500. // 在 Vue 中标记为小程序组件
  1501. var IS_MP = '__v_isMPComponent';
  1502. Object.defineProperty(component, IS_MP, {
  1503. configurable: true,
  1504. enumerable: false,
  1505. value: true
  1506. });
  1507. return component;
  1508. }
  1509. function toSkip(obj) {
  1510. var OB = '__ob__';
  1511. var SKIP = '__v_skip';
  1512. if (isObject(obj) && Object.isExtensible(obj)) {
  1513. // 避免被 @vue/composition-api 观测
  1514. Object.defineProperty(obj, OB, {
  1515. configurable: true,
  1516. enumerable: false,
  1517. value: (0, _defineProperty2.default)({}, SKIP, true)
  1518. });
  1519. }
  1520. return obj;
  1521. }
  1522. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1523. function initWorkletMethods(mpMethods, vueMethods) {
  1524. if (vueMethods) {
  1525. Object.keys(vueMethods).forEach(function (name) {
  1526. var matches = name.match(WORKLET_RE);
  1527. if (matches) {
  1528. var workletName = matches[1];
  1529. mpMethods[name] = vueMethods[name];
  1530. mpMethods[workletName] = vueMethods[workletName];
  1531. }
  1532. });
  1533. }
  1534. }
  1535. var MPPage = Page;
  1536. var MPComponent = Component;
  1537. var customizeRE = /:/g;
  1538. var customize = cached(function (str) {
  1539. return camelize(str.replace(customizeRE, '-'));
  1540. });
  1541. function initTriggerEvent(mpInstance) {
  1542. var oldTriggerEvent = mpInstance.triggerEvent;
  1543. var newTriggerEvent = function newTriggerEvent(event) {
  1544. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1545. args[_key3 - 1] = arguments[_key3];
  1546. }
  1547. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1548. if (this.$vm || this.dataset && this.dataset.comType) {
  1549. event = customize(event);
  1550. } else {
  1551. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1552. var newEvent = customize(event);
  1553. if (newEvent !== event) {
  1554. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1555. }
  1556. }
  1557. return oldTriggerEvent.apply(this, [event].concat(args));
  1558. };
  1559. try {
  1560. // 京东小程序 triggerEvent 为只读
  1561. mpInstance.triggerEvent = newTriggerEvent;
  1562. } catch (error) {
  1563. mpInstance._triggerEvent = newTriggerEvent;
  1564. }
  1565. }
  1566. function initHook(name, options, isComponent) {
  1567. var oldHook = options[name];
  1568. options[name] = function () {
  1569. markMPComponent(this);
  1570. initTriggerEvent(this);
  1571. if (oldHook) {
  1572. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1573. args[_key4] = arguments[_key4];
  1574. }
  1575. return oldHook.apply(this, args);
  1576. }
  1577. };
  1578. }
  1579. if (!MPPage.__$wrappered) {
  1580. MPPage.__$wrappered = true;
  1581. Page = function Page() {
  1582. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1583. initHook('onLoad', options);
  1584. return MPPage(options);
  1585. };
  1586. Page.after = MPPage.after;
  1587. Component = function Component() {
  1588. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1589. initHook('created', options);
  1590. return MPComponent(options);
  1591. };
  1592. }
  1593. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1594. function initMocks(vm, mocks) {
  1595. var mpInstance = vm.$mp[vm.mpType];
  1596. mocks.forEach(function (mock) {
  1597. if (hasOwn(mpInstance, mock)) {
  1598. vm[mock] = mpInstance[mock];
  1599. }
  1600. });
  1601. }
  1602. function hasHook(hook, vueOptions) {
  1603. if (!vueOptions) {
  1604. return true;
  1605. }
  1606. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1607. return true;
  1608. }
  1609. vueOptions = vueOptions.default || vueOptions;
  1610. if (isFn(vueOptions)) {
  1611. if (isFn(vueOptions.extendOptions[hook])) {
  1612. return true;
  1613. }
  1614. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1615. return true;
  1616. }
  1617. return false;
  1618. }
  1619. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1620. return true;
  1621. }
  1622. var mixins = vueOptions.mixins;
  1623. if (Array.isArray(mixins)) {
  1624. return !!mixins.find(function (mixin) {
  1625. return hasHook(hook, mixin);
  1626. });
  1627. }
  1628. }
  1629. function initHooks(mpOptions, hooks, vueOptions) {
  1630. hooks.forEach(function (hook) {
  1631. if (hasHook(hook, vueOptions)) {
  1632. mpOptions[hook] = function (args) {
  1633. return this.$vm && this.$vm.__call_hook(hook, args);
  1634. };
  1635. }
  1636. });
  1637. }
  1638. function initUnknownHooks(mpOptions, vueOptions) {
  1639. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1640. findHooks(vueOptions).forEach(function (hook) {
  1641. return initHook$1(mpOptions, hook, excludes);
  1642. });
  1643. }
  1644. function findHooks(vueOptions) {
  1645. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1646. if (vueOptions) {
  1647. Object.keys(vueOptions).forEach(function (name) {
  1648. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1649. hooks.push(name);
  1650. }
  1651. });
  1652. }
  1653. return hooks;
  1654. }
  1655. function initHook$1(mpOptions, hook, excludes) {
  1656. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1657. mpOptions[hook] = function (args) {
  1658. return this.$vm && this.$vm.__call_hook(hook, args);
  1659. };
  1660. }
  1661. }
  1662. function initVueComponent(Vue, vueOptions) {
  1663. vueOptions = vueOptions.default || vueOptions;
  1664. var VueComponent;
  1665. if (isFn(vueOptions)) {
  1666. VueComponent = vueOptions;
  1667. } else {
  1668. VueComponent = Vue.extend(vueOptions);
  1669. }
  1670. vueOptions = VueComponent.options;
  1671. return [VueComponent, vueOptions];
  1672. }
  1673. function initSlots(vm, vueSlots) {
  1674. if (Array.isArray(vueSlots) && vueSlots.length) {
  1675. var $slots = Object.create(null);
  1676. vueSlots.forEach(function (slotName) {
  1677. $slots[slotName] = true;
  1678. });
  1679. vm.$scopedSlots = vm.$slots = $slots;
  1680. }
  1681. }
  1682. function initVueIds(vueIds, mpInstance) {
  1683. vueIds = (vueIds || '').split(',');
  1684. var len = vueIds.length;
  1685. if (len === 1) {
  1686. mpInstance._$vueId = vueIds[0];
  1687. } else if (len === 2) {
  1688. mpInstance._$vueId = vueIds[0];
  1689. mpInstance._$vuePid = vueIds[1];
  1690. }
  1691. }
  1692. function initData(vueOptions, context) {
  1693. var data = vueOptions.data || {};
  1694. var methods = vueOptions.methods || {};
  1695. if (typeof data === 'function') {
  1696. try {
  1697. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1698. } catch (e) {
  1699. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1700. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1701. }
  1702. }
  1703. } else {
  1704. try {
  1705. // 对 data 格式化
  1706. data = JSON.parse(JSON.stringify(data));
  1707. } catch (e) {}
  1708. }
  1709. if (!isPlainObject(data)) {
  1710. data = {};
  1711. }
  1712. Object.keys(methods).forEach(function (methodName) {
  1713. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1714. data[methodName] = methods[methodName];
  1715. }
  1716. });
  1717. return data;
  1718. }
  1719. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1720. function createObserver(name) {
  1721. return function observer(newVal, oldVal) {
  1722. if (this.$vm) {
  1723. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1724. }
  1725. };
  1726. }
  1727. function initBehaviors(vueOptions, initBehavior) {
  1728. var vueBehaviors = vueOptions.behaviors;
  1729. var vueExtends = vueOptions.extends;
  1730. var vueMixins = vueOptions.mixins;
  1731. var vueProps = vueOptions.props;
  1732. if (!vueProps) {
  1733. vueOptions.props = vueProps = [];
  1734. }
  1735. var behaviors = [];
  1736. if (Array.isArray(vueBehaviors)) {
  1737. vueBehaviors.forEach(function (behavior) {
  1738. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1739. if (behavior === 'uni://form-field') {
  1740. if (Array.isArray(vueProps)) {
  1741. vueProps.push('name');
  1742. vueProps.push('value');
  1743. } else {
  1744. vueProps.name = {
  1745. type: String,
  1746. default: ''
  1747. };
  1748. vueProps.value = {
  1749. type: [String, Number, Boolean, Array, Object, Date],
  1750. default: ''
  1751. };
  1752. }
  1753. }
  1754. });
  1755. }
  1756. if (isPlainObject(vueExtends) && vueExtends.props) {
  1757. behaviors.push(initBehavior({
  1758. properties: initProperties(vueExtends.props, true)
  1759. }));
  1760. }
  1761. if (Array.isArray(vueMixins)) {
  1762. vueMixins.forEach(function (vueMixin) {
  1763. if (isPlainObject(vueMixin) && vueMixin.props) {
  1764. behaviors.push(initBehavior({
  1765. properties: initProperties(vueMixin.props, true)
  1766. }));
  1767. }
  1768. });
  1769. }
  1770. return behaviors;
  1771. }
  1772. function parsePropType(key, type, defaultValue, file) {
  1773. // [String]=>String
  1774. if (Array.isArray(type) && type.length === 1) {
  1775. return type[0];
  1776. }
  1777. return type;
  1778. }
  1779. function initProperties(props) {
  1780. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1781. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1782. var options = arguments.length > 3 ? arguments[3] : undefined;
  1783. var properties = {};
  1784. if (!isBehavior) {
  1785. properties.vueId = {
  1786. type: String,
  1787. value: ''
  1788. };
  1789. {
  1790. if (options.virtualHost) {
  1791. properties.virtualHostStyle = {
  1792. type: null,
  1793. value: ''
  1794. };
  1795. properties.virtualHostClass = {
  1796. type: null,
  1797. value: ''
  1798. };
  1799. }
  1800. }
  1801. // scopedSlotsCompiler auto
  1802. properties.scopedSlotsCompiler = {
  1803. type: String,
  1804. value: ''
  1805. };
  1806. properties.vueSlots = {
  1807. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1808. type: null,
  1809. value: [],
  1810. observer: function observer(newVal, oldVal) {
  1811. var $slots = Object.create(null);
  1812. newVal.forEach(function (slotName) {
  1813. $slots[slotName] = true;
  1814. });
  1815. this.setData({
  1816. $slots: $slots
  1817. });
  1818. }
  1819. };
  1820. }
  1821. if (Array.isArray(props)) {
  1822. // ['title']
  1823. props.forEach(function (key) {
  1824. properties[key] = {
  1825. type: null,
  1826. observer: createObserver(key)
  1827. };
  1828. });
  1829. } else if (isPlainObject(props)) {
  1830. // {title:{type:String,default:''},content:String}
  1831. Object.keys(props).forEach(function (key) {
  1832. var opts = props[key];
  1833. if (isPlainObject(opts)) {
  1834. // title:{type:String,default:''}
  1835. var value = opts.default;
  1836. if (isFn(value)) {
  1837. value = value();
  1838. }
  1839. opts.type = parsePropType(key, opts.type);
  1840. properties[key] = {
  1841. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1842. value: value,
  1843. observer: createObserver(key)
  1844. };
  1845. } else {
  1846. // content:String
  1847. var type = parsePropType(key, opts);
  1848. properties[key] = {
  1849. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1850. observer: createObserver(key)
  1851. };
  1852. }
  1853. });
  1854. }
  1855. return properties;
  1856. }
  1857. function wrapper$1(event) {
  1858. // TODO 又得兼容 mpvue 的 mp 对象
  1859. try {
  1860. event.mp = JSON.parse(JSON.stringify(event));
  1861. } catch (e) {}
  1862. event.stopPropagation = noop;
  1863. event.preventDefault = noop;
  1864. event.target = event.target || {};
  1865. if (!hasOwn(event, 'detail')) {
  1866. event.detail = {};
  1867. }
  1868. if (hasOwn(event, 'markerId')) {
  1869. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1870. event.detail.markerId = event.markerId;
  1871. }
  1872. if (isPlainObject(event.detail)) {
  1873. event.target = Object.assign({}, event.target, event.detail);
  1874. }
  1875. return event;
  1876. }
  1877. function getExtraValue(vm, dataPathsArray) {
  1878. var context = vm;
  1879. dataPathsArray.forEach(function (dataPathArray) {
  1880. var dataPath = dataPathArray[0];
  1881. var value = dataPathArray[2];
  1882. if (dataPath || typeof value !== 'undefined') {
  1883. // ['','',index,'disable']
  1884. var propPath = dataPathArray[1];
  1885. var valuePath = dataPathArray[3];
  1886. var vFor;
  1887. if (Number.isInteger(dataPath)) {
  1888. vFor = dataPath;
  1889. } else if (!dataPath) {
  1890. vFor = context;
  1891. } else if (typeof dataPath === 'string' && dataPath) {
  1892. if (dataPath.indexOf('#s#') === 0) {
  1893. vFor = dataPath.substr(3);
  1894. } else {
  1895. vFor = vm.__get_value(dataPath, context);
  1896. }
  1897. }
  1898. if (Number.isInteger(vFor)) {
  1899. context = value;
  1900. } else if (!propPath) {
  1901. context = vFor[value];
  1902. } else {
  1903. if (Array.isArray(vFor)) {
  1904. context = vFor.find(function (vForItem) {
  1905. return vm.__get_value(propPath, vForItem) === value;
  1906. });
  1907. } else if (isPlainObject(vFor)) {
  1908. context = Object.keys(vFor).find(function (vForKey) {
  1909. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1910. });
  1911. } else {
  1912. console.error('v-for 暂不支持循环数据:', vFor);
  1913. }
  1914. }
  1915. if (valuePath) {
  1916. context = vm.__get_value(valuePath, context);
  1917. }
  1918. }
  1919. });
  1920. return context;
  1921. }
  1922. function processEventExtra(vm, extra, event, __args__) {
  1923. var extraObj = {};
  1924. if (Array.isArray(extra) && extra.length) {
  1925. /**
  1926. *[
  1927. * ['data.items', 'data.id', item.data.id],
  1928. * ['metas', 'id', meta.id]
  1929. *],
  1930. *[
  1931. * ['data.items', 'data.id', item.data.id],
  1932. * ['metas', 'id', meta.id]
  1933. *],
  1934. *'test'
  1935. */
  1936. extra.forEach(function (dataPath, index) {
  1937. if (typeof dataPath === 'string') {
  1938. if (!dataPath) {
  1939. // model,prop.sync
  1940. extraObj['$' + index] = vm;
  1941. } else {
  1942. if (dataPath === '$event') {
  1943. // $event
  1944. extraObj['$' + index] = event;
  1945. } else if (dataPath === 'arguments') {
  1946. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1947. } else if (dataPath.indexOf('$event.') === 0) {
  1948. // $event.target.value
  1949. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1950. } else {
  1951. extraObj['$' + index] = vm.__get_value(dataPath);
  1952. }
  1953. }
  1954. } else {
  1955. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1956. }
  1957. });
  1958. }
  1959. return extraObj;
  1960. }
  1961. function getObjByArray(arr) {
  1962. var obj = {};
  1963. for (var i = 1; i < arr.length; i++) {
  1964. var element = arr[i];
  1965. obj[element[0]] = element[1];
  1966. }
  1967. return obj;
  1968. }
  1969. function processEventArgs(vm, event) {
  1970. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1971. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1972. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1973. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1974. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1975. // fixed 用户直接触发 mpInstance.triggerEvent
  1976. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1977. if (isCustom) {
  1978. // 自定义事件
  1979. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1980. if (!args.length) {
  1981. // 无参数,直接传入 event 或 detail 数组
  1982. if (isCustomMPEvent) {
  1983. return [event];
  1984. }
  1985. return __args__;
  1986. }
  1987. }
  1988. var extraObj = processEventExtra(vm, extra, event, __args__);
  1989. var ret = [];
  1990. args.forEach(function (arg) {
  1991. if (arg === '$event') {
  1992. if (methodName === '__set_model' && !isCustom) {
  1993. // input v-model value
  1994. ret.push(event.target.value);
  1995. } else {
  1996. if (isCustom && !isCustomMPEvent) {
  1997. ret.push(__args__[0]);
  1998. } else {
  1999. // wxcomponent 组件或内置组件
  2000. ret.push(event);
  2001. }
  2002. }
  2003. } else {
  2004. if (Array.isArray(arg) && arg[0] === 'o') {
  2005. ret.push(getObjByArray(arg));
  2006. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  2007. ret.push(extraObj[arg]);
  2008. } else {
  2009. ret.push(arg);
  2010. }
  2011. }
  2012. });
  2013. return ret;
  2014. }
  2015. var ONCE = '~';
  2016. var CUSTOM = '^';
  2017. function isMatchEventType(eventType, optType) {
  2018. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  2019. }
  2020. function getContextVm(vm) {
  2021. var $parent = vm.$parent;
  2022. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  2023. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  2024. $parent = $parent.$parent;
  2025. }
  2026. return $parent && $parent.$parent;
  2027. }
  2028. function handleEvent(event) {
  2029. var _this2 = this;
  2030. event = wrapper$1(event);
  2031. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  2032. var dataset = (event.currentTarget || event.target).dataset;
  2033. if (!dataset) {
  2034. return console.warn('事件信息不存在');
  2035. }
  2036. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  2037. if (!eventOpts) {
  2038. return console.warn('事件信息不存在');
  2039. }
  2040. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  2041. var eventType = event.type;
  2042. var ret = [];
  2043. eventOpts.forEach(function (eventOpt) {
  2044. var type = eventOpt[0];
  2045. var eventsArray = eventOpt[1];
  2046. var isCustom = type.charAt(0) === CUSTOM;
  2047. type = isCustom ? type.slice(1) : type;
  2048. var isOnce = type.charAt(0) === ONCE;
  2049. type = isOnce ? type.slice(1) : type;
  2050. if (eventsArray && isMatchEventType(eventType, type)) {
  2051. eventsArray.forEach(function (eventArray) {
  2052. var methodName = eventArray[0];
  2053. if (methodName) {
  2054. var handlerCtx = _this2.$vm;
  2055. if (handlerCtx.$options.generic) {
  2056. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  2057. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  2058. }
  2059. if (methodName === '$emit') {
  2060. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  2061. return;
  2062. }
  2063. var handler = handlerCtx[methodName];
  2064. if (!isFn(handler)) {
  2065. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  2066. var path = _this2.route || _this2.is;
  2067. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  2068. }
  2069. if (isOnce) {
  2070. if (handler.once) {
  2071. return;
  2072. }
  2073. handler.once = true;
  2074. }
  2075. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  2076. params = Array.isArray(params) ? params : [];
  2077. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  2078. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  2079. // eslint-disable-next-line no-sparse-arrays
  2080. params = params.concat([,,,,,,,,,, event]);
  2081. }
  2082. ret.push(handler.apply(handlerCtx, params));
  2083. }
  2084. });
  2085. }
  2086. });
  2087. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  2088. return ret[0];
  2089. }
  2090. }
  2091. var eventChannels = {};
  2092. function getEventChannel(id) {
  2093. var eventChannel = eventChannels[id];
  2094. delete eventChannels[id];
  2095. return eventChannel;
  2096. }
  2097. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  2098. function initEventChannel() {
  2099. _vue.default.prototype.getOpenerEventChannel = function () {
  2100. // 微信小程序使用自身getOpenerEventChannel
  2101. {
  2102. return this.$scope.getOpenerEventChannel();
  2103. }
  2104. };
  2105. var callHook = _vue.default.prototype.__call_hook;
  2106. _vue.default.prototype.__call_hook = function (hook, args) {
  2107. if (hook === 'onLoad' && args && args.__id__) {
  2108. this.__eventChannel__ = getEventChannel(args.__id__);
  2109. delete args.__id__;
  2110. }
  2111. return callHook.call(this, hook, args);
  2112. };
  2113. }
  2114. function initScopedSlotsParams() {
  2115. var center = {};
  2116. var parents = {};
  2117. function currentId(fn) {
  2118. var vueIds = this.$options.propsData.vueId;
  2119. if (vueIds) {
  2120. var vueId = vueIds.split(',')[0];
  2121. fn(vueId);
  2122. }
  2123. }
  2124. _vue.default.prototype.$hasSSP = function (vueId) {
  2125. var slot = center[vueId];
  2126. if (!slot) {
  2127. parents[vueId] = this;
  2128. this.$on('hook:destroyed', function () {
  2129. delete parents[vueId];
  2130. });
  2131. }
  2132. return slot;
  2133. };
  2134. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  2135. var slot = center[vueId];
  2136. if (slot) {
  2137. var params = slot[name] || [];
  2138. if (needAll) {
  2139. return params;
  2140. }
  2141. return params[0];
  2142. }
  2143. };
  2144. _vue.default.prototype.$setSSP = function (name, value) {
  2145. var index = 0;
  2146. currentId.call(this, function (vueId) {
  2147. var slot = center[vueId];
  2148. var params = slot[name] = slot[name] || [];
  2149. params.push(value);
  2150. index = params.length - 1;
  2151. });
  2152. return index;
  2153. };
  2154. _vue.default.prototype.$initSSP = function () {
  2155. currentId.call(this, function (vueId) {
  2156. center[vueId] = {};
  2157. });
  2158. };
  2159. _vue.default.prototype.$callSSP = function () {
  2160. currentId.call(this, function (vueId) {
  2161. if (parents[vueId]) {
  2162. parents[vueId].$forceUpdate();
  2163. }
  2164. });
  2165. };
  2166. _vue.default.mixin({
  2167. destroyed: function destroyed() {
  2168. var propsData = this.$options.propsData;
  2169. var vueId = propsData && propsData.vueId;
  2170. if (vueId) {
  2171. delete center[vueId];
  2172. delete parents[vueId];
  2173. }
  2174. }
  2175. });
  2176. }
  2177. function parseBaseApp(vm, _ref4) {
  2178. var mocks = _ref4.mocks,
  2179. initRefs = _ref4.initRefs;
  2180. initEventChannel();
  2181. {
  2182. initScopedSlotsParams();
  2183. }
  2184. if (vm.$options.store) {
  2185. _vue.default.prototype.$store = vm.$options.store;
  2186. }
  2187. uniIdMixin(_vue.default);
  2188. _vue.default.prototype.mpHost = "mp-weixin";
  2189. _vue.default.mixin({
  2190. beforeCreate: function beforeCreate() {
  2191. if (!this.$options.mpType) {
  2192. return;
  2193. }
  2194. this.mpType = this.$options.mpType;
  2195. this.$mp = (0, _defineProperty2.default)({
  2196. data: {}
  2197. }, this.mpType, this.$options.mpInstance);
  2198. this.$scope = this.$options.mpInstance;
  2199. delete this.$options.mpType;
  2200. delete this.$options.mpInstance;
  2201. if (this.mpType === 'page' && typeof getApp === 'function') {
  2202. // hack vue-i18n
  2203. var app = getApp();
  2204. if (app.$vm && app.$vm.$i18n) {
  2205. this._i18n = app.$vm.$i18n;
  2206. }
  2207. }
  2208. if (this.mpType !== 'app') {
  2209. initRefs(this);
  2210. initMocks(this, mocks);
  2211. }
  2212. }
  2213. });
  2214. var appOptions = {
  2215. onLaunch: function onLaunch(args) {
  2216. if (this.$vm) {
  2217. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2218. return;
  2219. }
  2220. {
  2221. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2222. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2223. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2224. }
  2225. }
  2226. this.$vm = vm;
  2227. this.$vm.$mp = {
  2228. app: this
  2229. };
  2230. this.$vm.$scope = this;
  2231. // vm 上也挂载 globalData
  2232. this.$vm.globalData = this.globalData;
  2233. this.$vm._isMounted = true;
  2234. this.$vm.__call_hook('mounted', args);
  2235. this.$vm.__call_hook('onLaunch', args);
  2236. }
  2237. };
  2238. // 兼容旧版本 globalData
  2239. appOptions.globalData = vm.$options.globalData || {};
  2240. // 将 methods 中的方法挂在 getApp() 中
  2241. var methods = vm.$options.methods;
  2242. if (methods) {
  2243. Object.keys(methods).forEach(function (name) {
  2244. appOptions[name] = methods[name];
  2245. });
  2246. }
  2247. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2248. initHooks(appOptions, hooks);
  2249. initUnknownHooks(appOptions, vm.$options);
  2250. return appOptions;
  2251. }
  2252. function parseApp(vm) {
  2253. return parseBaseApp(vm, {
  2254. mocks: mocks,
  2255. initRefs: initRefs
  2256. });
  2257. }
  2258. function createApp(vm) {
  2259. App(parseApp(vm));
  2260. return vm;
  2261. }
  2262. var encodeReserveRE = /[!'()*]/g;
  2263. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2264. return '%' + c.charCodeAt(0).toString(16);
  2265. };
  2266. var commaRE = /%2C/g;
  2267. // fixed encodeURIComponent which is more conformant to RFC3986:
  2268. // - escapes [!'()*]
  2269. // - preserve commas
  2270. var encode = function encode(str) {
  2271. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2272. };
  2273. function stringifyQuery(obj) {
  2274. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2275. var res = obj ? Object.keys(obj).map(function (key) {
  2276. var val = obj[key];
  2277. if (val === undefined) {
  2278. return '';
  2279. }
  2280. if (val === null) {
  2281. return encodeStr(key);
  2282. }
  2283. if (Array.isArray(val)) {
  2284. var result = [];
  2285. val.forEach(function (val2) {
  2286. if (val2 === undefined) {
  2287. return;
  2288. }
  2289. if (val2 === null) {
  2290. result.push(encodeStr(key));
  2291. } else {
  2292. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2293. }
  2294. });
  2295. return result.join('&');
  2296. }
  2297. return encodeStr(key) + '=' + encodeStr(val);
  2298. }).filter(function (x) {
  2299. return x.length > 0;
  2300. }).join('&') : null;
  2301. return res ? "?".concat(res) : '';
  2302. }
  2303. function parseBaseComponent(vueComponentOptions) {
  2304. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2305. isPage = _ref5.isPage,
  2306. initRelation = _ref5.initRelation;
  2307. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2308. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2309. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2310. VueComponent = _initVueComponent2[0],
  2311. vueOptions = _initVueComponent2[1];
  2312. var options = _objectSpread({
  2313. multipleSlots: true,
  2314. // styleIsolation: 'apply-shared',
  2315. addGlobalClass: true
  2316. }, vueOptions.options || {});
  2317. {
  2318. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2319. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2320. Object.assign(options, vueOptions['mp-weixin'].options);
  2321. }
  2322. }
  2323. var componentOptions = {
  2324. options: options,
  2325. data: initData(vueOptions, _vue.default.prototype),
  2326. behaviors: initBehaviors(vueOptions, initBehavior),
  2327. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2328. lifetimes: {
  2329. attached: function attached() {
  2330. var properties = this.properties;
  2331. var options = {
  2332. mpType: isPage.call(this) ? 'page' : 'component',
  2333. mpInstance: this,
  2334. propsData: properties
  2335. };
  2336. initVueIds(properties.vueId, this);
  2337. // 处理父子关系
  2338. initRelation.call(this, {
  2339. vuePid: this._$vuePid,
  2340. vueOptions: options
  2341. });
  2342. // 初始化 vue 实例
  2343. this.$vm = new VueComponent(options);
  2344. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2345. initSlots(this.$vm, properties.vueSlots);
  2346. // 触发首次 setData
  2347. this.$vm.$mount();
  2348. },
  2349. ready: function ready() {
  2350. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2351. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2352. if (this.$vm) {
  2353. this.$vm._isMounted = true;
  2354. this.$vm.__call_hook('mounted');
  2355. this.$vm.__call_hook('onReady');
  2356. }
  2357. },
  2358. detached: function detached() {
  2359. this.$vm && this.$vm.$destroy();
  2360. }
  2361. },
  2362. pageLifetimes: {
  2363. show: function show(args) {
  2364. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2365. },
  2366. hide: function hide() {
  2367. this.$vm && this.$vm.__call_hook('onPageHide');
  2368. },
  2369. resize: function resize(size) {
  2370. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2371. }
  2372. },
  2373. methods: {
  2374. __l: handleLink,
  2375. __e: handleEvent
  2376. }
  2377. };
  2378. // externalClasses
  2379. if (vueOptions.externalClasses) {
  2380. componentOptions.externalClasses = vueOptions.externalClasses;
  2381. }
  2382. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2383. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2384. componentOptions.methods[callMethod] = function (args) {
  2385. return this.$vm[callMethod](args);
  2386. };
  2387. });
  2388. }
  2389. if (needVueOptions) {
  2390. return [componentOptions, vueOptions, VueComponent];
  2391. }
  2392. if (isPage) {
  2393. return componentOptions;
  2394. }
  2395. return [componentOptions, VueComponent];
  2396. }
  2397. function parseComponent(vueComponentOptions, needVueOptions) {
  2398. return parseBaseComponent(vueComponentOptions, {
  2399. isPage: isPage,
  2400. initRelation: initRelation
  2401. }, needVueOptions);
  2402. }
  2403. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2404. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2405. function parseBasePage(vuePageOptions) {
  2406. var _parseComponent = parseComponent(vuePageOptions, true),
  2407. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2408. pageOptions = _parseComponent2[0],
  2409. vueOptions = _parseComponent2[1];
  2410. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2411. pageOptions.methods.onLoad = function (query) {
  2412. this.options = query;
  2413. var copyQuery = Object.assign({}, query);
  2414. delete copyQuery.__id__;
  2415. this.$page = {
  2416. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2417. };
  2418. this.$vm.$mp.query = query; // 兼容 mpvue
  2419. this.$vm.__call_hook('onLoad', query);
  2420. };
  2421. {
  2422. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2423. }
  2424. {
  2425. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2426. }
  2427. return pageOptions;
  2428. }
  2429. function parsePage(vuePageOptions) {
  2430. return parseBasePage(vuePageOptions);
  2431. }
  2432. function createPage(vuePageOptions) {
  2433. {
  2434. return Component(parsePage(vuePageOptions));
  2435. }
  2436. }
  2437. function createComponent(vueOptions) {
  2438. {
  2439. return Component(parseComponent(vueOptions));
  2440. }
  2441. }
  2442. function createSubpackageApp(vm) {
  2443. var appOptions = parseApp(vm);
  2444. var app = getApp({
  2445. allowDefault: true
  2446. });
  2447. vm.$scope = app;
  2448. var globalData = app.globalData;
  2449. if (globalData) {
  2450. Object.keys(appOptions.globalData).forEach(function (name) {
  2451. if (!hasOwn(globalData, name)) {
  2452. globalData[name] = appOptions.globalData[name];
  2453. }
  2454. });
  2455. }
  2456. Object.keys(appOptions).forEach(function (name) {
  2457. if (!hasOwn(app, name)) {
  2458. app[name] = appOptions[name];
  2459. }
  2460. });
  2461. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2462. wx.onAppShow(function () {
  2463. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2464. args[_key5] = arguments[_key5];
  2465. }
  2466. vm.__call_hook('onShow', args);
  2467. });
  2468. }
  2469. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2470. wx.onAppHide(function () {
  2471. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2472. args[_key6] = arguments[_key6];
  2473. }
  2474. vm.__call_hook('onHide', args);
  2475. });
  2476. }
  2477. if (isFn(appOptions.onLaunch)) {
  2478. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2479. vm.__call_hook('onLaunch', args);
  2480. }
  2481. return vm;
  2482. }
  2483. function createPlugin(vm) {
  2484. var appOptions = parseApp(vm);
  2485. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2486. wx.onAppShow(function () {
  2487. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2488. args[_key7] = arguments[_key7];
  2489. }
  2490. vm.__call_hook('onShow', args);
  2491. });
  2492. }
  2493. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2494. wx.onAppHide(function () {
  2495. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2496. args[_key8] = arguments[_key8];
  2497. }
  2498. vm.__call_hook('onHide', args);
  2499. });
  2500. }
  2501. if (isFn(appOptions.onLaunch)) {
  2502. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2503. vm.__call_hook('onLaunch', args);
  2504. }
  2505. return vm;
  2506. }
  2507. todos.forEach(function (todoApi) {
  2508. protocols[todoApi] = false;
  2509. });
  2510. canIUses.forEach(function (canIUseApi) {
  2511. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2512. if (!wx.canIUse(apiName)) {
  2513. protocols[canIUseApi] = false;
  2514. }
  2515. });
  2516. var uni = {};
  2517. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2518. uni = new Proxy({}, {
  2519. get: function get(target, name) {
  2520. if (hasOwn(target, name)) {
  2521. return target[name];
  2522. }
  2523. if (baseApi[name]) {
  2524. return baseApi[name];
  2525. }
  2526. if (api[name]) {
  2527. return promisify(name, api[name]);
  2528. }
  2529. {
  2530. if (extraApi[name]) {
  2531. return promisify(name, extraApi[name]);
  2532. }
  2533. if (todoApis[name]) {
  2534. return promisify(name, todoApis[name]);
  2535. }
  2536. }
  2537. if (eventApi[name]) {
  2538. return eventApi[name];
  2539. }
  2540. return promisify(name, wrapper(name, wx[name]));
  2541. },
  2542. set: function set(target, name, value) {
  2543. target[name] = value;
  2544. return true;
  2545. }
  2546. });
  2547. } else {
  2548. Object.keys(baseApi).forEach(function (name) {
  2549. uni[name] = baseApi[name];
  2550. });
  2551. {
  2552. Object.keys(todoApis).forEach(function (name) {
  2553. uni[name] = promisify(name, todoApis[name]);
  2554. });
  2555. Object.keys(extraApi).forEach(function (name) {
  2556. uni[name] = promisify(name, extraApi[name]);
  2557. });
  2558. }
  2559. Object.keys(eventApi).forEach(function (name) {
  2560. uni[name] = eventApi[name];
  2561. });
  2562. Object.keys(api).forEach(function (name) {
  2563. uni[name] = promisify(name, api[name]);
  2564. });
  2565. Object.keys(wx).forEach(function (name) {
  2566. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2567. uni[name] = promisify(name, wrapper(name, wx[name]));
  2568. }
  2569. });
  2570. }
  2571. wx.createApp = createApp;
  2572. wx.createPage = createPage;
  2573. wx.createComponent = createComponent;
  2574. wx.createSubpackageApp = createSubpackageApp;
  2575. wx.createPlugin = createPlugin;
  2576. var uni$1 = uni;
  2577. var _default = uni$1;
  2578. exports.default = _default;
  2579. /* 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)))
  2580. /***/ }),
  2581. /***/ 20:
  2582. /*!****************************************************************!*\
  2583. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2584. \****************************************************************/
  2585. /*! no static exports found */
  2586. /***/ (function(module, exports) {
  2587. function _iterableToArray(iter) {
  2588. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2589. }
  2590. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2591. /***/ }),
  2592. /***/ 21:
  2593. /*!******************************************************************!*\
  2594. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2595. \******************************************************************/
  2596. /*! no static exports found */
  2597. /***/ (function(module, exports) {
  2598. function _nonIterableSpread() {
  2599. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2600. }
  2601. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2602. /***/ }),
  2603. /***/ 22:
  2604. /*!*************************************************************!*\
  2605. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2606. \*************************************************************/
  2607. /*! no static exports found */
  2608. /***/ (function(module, exports, __webpack_require__) {
  2609. "use strict";
  2610. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2611. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2612. Object.defineProperty(exports, "__esModule", {
  2613. value: true
  2614. });
  2615. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2616. exports.compileI18nJsonStr = compileI18nJsonStr;
  2617. exports.hasI18nJson = hasI18nJson;
  2618. exports.initVueI18n = initVueI18n;
  2619. exports.isI18nStr = isI18nStr;
  2620. exports.isString = void 0;
  2621. exports.normalizeLocale = normalizeLocale;
  2622. exports.parseI18nJson = parseI18nJson;
  2623. exports.resolveLocale = resolveLocale;
  2624. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2625. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2626. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2627. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2628. var isObject = function isObject(val) {
  2629. return val !== null && (0, _typeof2.default)(val) === 'object';
  2630. };
  2631. var defaultDelimiters = ['{', '}'];
  2632. var BaseFormatter = /*#__PURE__*/function () {
  2633. function BaseFormatter() {
  2634. (0, _classCallCheck2.default)(this, BaseFormatter);
  2635. this._caches = Object.create(null);
  2636. }
  2637. (0, _createClass2.default)(BaseFormatter, [{
  2638. key: "interpolate",
  2639. value: function interpolate(message, values) {
  2640. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2641. if (!values) {
  2642. return [message];
  2643. }
  2644. var tokens = this._caches[message];
  2645. if (!tokens) {
  2646. tokens = parse(message, delimiters);
  2647. this._caches[message] = tokens;
  2648. }
  2649. return compile(tokens, values);
  2650. }
  2651. }]);
  2652. return BaseFormatter;
  2653. }();
  2654. exports.Formatter = BaseFormatter;
  2655. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2656. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2657. function parse(format, _ref) {
  2658. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2659. startDelimiter = _ref2[0],
  2660. endDelimiter = _ref2[1];
  2661. var tokens = [];
  2662. var position = 0;
  2663. var text = '';
  2664. while (position < format.length) {
  2665. var char = format[position++];
  2666. if (char === startDelimiter) {
  2667. if (text) {
  2668. tokens.push({
  2669. type: 'text',
  2670. value: text
  2671. });
  2672. }
  2673. text = '';
  2674. var sub = '';
  2675. char = format[position++];
  2676. while (char !== undefined && char !== endDelimiter) {
  2677. sub += char;
  2678. char = format[position++];
  2679. }
  2680. var isClosed = char === endDelimiter;
  2681. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2682. tokens.push({
  2683. value: sub,
  2684. type: type
  2685. });
  2686. }
  2687. // else if (char === '%') {
  2688. // // when found rails i18n syntax, skip text capture
  2689. // if (format[position] !== '{') {
  2690. // text += char
  2691. // }
  2692. // }
  2693. else {
  2694. text += char;
  2695. }
  2696. }
  2697. text && tokens.push({
  2698. type: 'text',
  2699. value: text
  2700. });
  2701. return tokens;
  2702. }
  2703. function compile(tokens, values) {
  2704. var compiled = [];
  2705. var index = 0;
  2706. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2707. if (mode === 'unknown') {
  2708. return compiled;
  2709. }
  2710. while (index < tokens.length) {
  2711. var token = tokens[index];
  2712. switch (token.type) {
  2713. case 'text':
  2714. compiled.push(token.value);
  2715. break;
  2716. case 'list':
  2717. compiled.push(values[parseInt(token.value, 10)]);
  2718. break;
  2719. case 'named':
  2720. if (mode === 'named') {
  2721. compiled.push(values[token.value]);
  2722. } else {
  2723. if (true) {
  2724. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2725. }
  2726. }
  2727. break;
  2728. case 'unknown':
  2729. if (true) {
  2730. console.warn("Detect 'unknown' type of token!");
  2731. }
  2732. break;
  2733. }
  2734. index++;
  2735. }
  2736. return compiled;
  2737. }
  2738. var LOCALE_ZH_HANS = 'zh-Hans';
  2739. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2740. var LOCALE_ZH_HANT = 'zh-Hant';
  2741. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2742. var LOCALE_EN = 'en';
  2743. exports.LOCALE_EN = LOCALE_EN;
  2744. var LOCALE_FR = 'fr';
  2745. exports.LOCALE_FR = LOCALE_FR;
  2746. var LOCALE_ES = 'es';
  2747. exports.LOCALE_ES = LOCALE_ES;
  2748. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2749. var hasOwn = function hasOwn(val, key) {
  2750. return hasOwnProperty.call(val, key);
  2751. };
  2752. var defaultFormatter = new BaseFormatter();
  2753. function include(str, parts) {
  2754. return !!parts.find(function (part) {
  2755. return str.indexOf(part) !== -1;
  2756. });
  2757. }
  2758. function startsWith(str, parts) {
  2759. return parts.find(function (part) {
  2760. return str.indexOf(part) === 0;
  2761. });
  2762. }
  2763. function normalizeLocale(locale, messages) {
  2764. if (!locale) {
  2765. return;
  2766. }
  2767. locale = locale.trim().replace(/_/g, '-');
  2768. if (messages && messages[locale]) {
  2769. return locale;
  2770. }
  2771. locale = locale.toLowerCase();
  2772. if (locale === 'chinese') {
  2773. // 支付宝
  2774. return LOCALE_ZH_HANS;
  2775. }
  2776. if (locale.indexOf('zh') === 0) {
  2777. if (locale.indexOf('-hans') > -1) {
  2778. return LOCALE_ZH_HANS;
  2779. }
  2780. if (locale.indexOf('-hant') > -1) {
  2781. return LOCALE_ZH_HANT;
  2782. }
  2783. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2784. return LOCALE_ZH_HANT;
  2785. }
  2786. return LOCALE_ZH_HANS;
  2787. }
  2788. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2789. if (messages && Object.keys(messages).length > 0) {
  2790. locales = Object.keys(messages);
  2791. }
  2792. var lang = startsWith(locale, locales);
  2793. if (lang) {
  2794. return lang;
  2795. }
  2796. }
  2797. var I18n = /*#__PURE__*/function () {
  2798. function I18n(_ref3) {
  2799. var locale = _ref3.locale,
  2800. fallbackLocale = _ref3.fallbackLocale,
  2801. messages = _ref3.messages,
  2802. watcher = _ref3.watcher,
  2803. formater = _ref3.formater;
  2804. (0, _classCallCheck2.default)(this, I18n);
  2805. this.locale = LOCALE_EN;
  2806. this.fallbackLocale = LOCALE_EN;
  2807. this.message = {};
  2808. this.messages = {};
  2809. this.watchers = [];
  2810. if (fallbackLocale) {
  2811. this.fallbackLocale = fallbackLocale;
  2812. }
  2813. this.formater = formater || defaultFormatter;
  2814. this.messages = messages || {};
  2815. this.setLocale(locale || LOCALE_EN);
  2816. if (watcher) {
  2817. this.watchLocale(watcher);
  2818. }
  2819. }
  2820. (0, _createClass2.default)(I18n, [{
  2821. key: "setLocale",
  2822. value: function setLocale(locale) {
  2823. var _this = this;
  2824. var oldLocale = this.locale;
  2825. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2826. if (!this.messages[this.locale]) {
  2827. // 可能初始化时不存在
  2828. this.messages[this.locale] = {};
  2829. }
  2830. this.message = this.messages[this.locale];
  2831. // 仅发生变化时,通知
  2832. if (oldLocale !== this.locale) {
  2833. this.watchers.forEach(function (watcher) {
  2834. watcher(_this.locale, oldLocale);
  2835. });
  2836. }
  2837. }
  2838. }, {
  2839. key: "getLocale",
  2840. value: function getLocale() {
  2841. return this.locale;
  2842. }
  2843. }, {
  2844. key: "watchLocale",
  2845. value: function watchLocale(fn) {
  2846. var _this2 = this;
  2847. var index = this.watchers.push(fn) - 1;
  2848. return function () {
  2849. _this2.watchers.splice(index, 1);
  2850. };
  2851. }
  2852. }, {
  2853. key: "add",
  2854. value: function add(locale, message) {
  2855. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2856. var curMessages = this.messages[locale];
  2857. if (curMessages) {
  2858. if (override) {
  2859. Object.assign(curMessages, message);
  2860. } else {
  2861. Object.keys(message).forEach(function (key) {
  2862. if (!hasOwn(curMessages, key)) {
  2863. curMessages[key] = message[key];
  2864. }
  2865. });
  2866. }
  2867. } else {
  2868. this.messages[locale] = message;
  2869. }
  2870. }
  2871. }, {
  2872. key: "f",
  2873. value: function f(message, values, delimiters) {
  2874. return this.formater.interpolate(message, values, delimiters).join('');
  2875. }
  2876. }, {
  2877. key: "t",
  2878. value: function t(key, locale, values) {
  2879. var message = this.message;
  2880. if (typeof locale === 'string') {
  2881. locale = normalizeLocale(locale, this.messages);
  2882. locale && (message = this.messages[locale]);
  2883. } else {
  2884. values = locale;
  2885. }
  2886. if (!hasOwn(message, key)) {
  2887. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  2888. return key;
  2889. }
  2890. return this.formater.interpolate(message[key], values).join('');
  2891. }
  2892. }]);
  2893. return I18n;
  2894. }();
  2895. exports.I18n = I18n;
  2896. function watchAppLocale(appVm, i18n) {
  2897. // 需要保证 watch 的触发在组件渲染之前
  2898. if (appVm.$watchLocale) {
  2899. // vue2
  2900. appVm.$watchLocale(function (newLocale) {
  2901. i18n.setLocale(newLocale);
  2902. });
  2903. } else {
  2904. appVm.$watch(function () {
  2905. return appVm.$locale;
  2906. }, function (newLocale) {
  2907. i18n.setLocale(newLocale);
  2908. });
  2909. }
  2910. }
  2911. function getDefaultLocale() {
  2912. if (typeof uni !== 'undefined' && uni.getLocale) {
  2913. return uni.getLocale();
  2914. }
  2915. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  2916. if (typeof global !== 'undefined' && global.getLocale) {
  2917. return global.getLocale();
  2918. }
  2919. return LOCALE_EN;
  2920. }
  2921. function initVueI18n(locale) {
  2922. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2923. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  2924. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  2925. // 兼容旧版本入参
  2926. if (typeof locale !== 'string') {
  2927. var _ref4 = [messages, locale];
  2928. locale = _ref4[0];
  2929. messages = _ref4[1];
  2930. }
  2931. if (typeof locale !== 'string') {
  2932. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  2933. locale = getDefaultLocale();
  2934. }
  2935. if (typeof fallbackLocale !== 'string') {
  2936. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  2937. }
  2938. var i18n = new I18n({
  2939. locale: locale,
  2940. fallbackLocale: fallbackLocale,
  2941. messages: messages,
  2942. watcher: watcher
  2943. });
  2944. var _t = function t(key, values) {
  2945. if (typeof getApp !== 'function') {
  2946. // app view
  2947. /* eslint-disable no-func-assign */
  2948. _t = function t(key, values) {
  2949. return i18n.t(key, values);
  2950. };
  2951. } else {
  2952. var isWatchedAppLocale = false;
  2953. _t = function t(key, values) {
  2954. var appVm = getApp().$vm;
  2955. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  2956. // options: {
  2957. // type: Array,
  2958. // default () {
  2959. // return [{
  2960. // icon: 'shop',
  2961. // text: t("uni-goods-nav.options.shop"),
  2962. // }, {
  2963. // icon: 'cart',
  2964. // text: t("uni-goods-nav.options.cart")
  2965. // }]
  2966. // }
  2967. // },
  2968. if (appVm) {
  2969. // 触发响应式
  2970. appVm.$locale;
  2971. if (!isWatchedAppLocale) {
  2972. isWatchedAppLocale = true;
  2973. watchAppLocale(appVm, i18n);
  2974. }
  2975. }
  2976. return i18n.t(key, values);
  2977. };
  2978. }
  2979. return _t(key, values);
  2980. };
  2981. return {
  2982. i18n: i18n,
  2983. f: function f(message, values, delimiters) {
  2984. return i18n.f(message, values, delimiters);
  2985. },
  2986. t: function t(key, values) {
  2987. return _t(key, values);
  2988. },
  2989. add: function add(locale, message) {
  2990. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2991. return i18n.add(locale, message, override);
  2992. },
  2993. watch: function watch(fn) {
  2994. return i18n.watchLocale(fn);
  2995. },
  2996. getLocale: function getLocale() {
  2997. return i18n.getLocale();
  2998. },
  2999. setLocale: function setLocale(newLocale) {
  3000. return i18n.setLocale(newLocale);
  3001. }
  3002. };
  3003. }
  3004. var isString = function isString(val) {
  3005. return typeof val === 'string';
  3006. };
  3007. exports.isString = isString;
  3008. var formater;
  3009. function hasI18nJson(jsonObj, delimiters) {
  3010. if (!formater) {
  3011. formater = new BaseFormatter();
  3012. }
  3013. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3014. var value = jsonObj[key];
  3015. if (isString(value)) {
  3016. if (isI18nStr(value, delimiters)) {
  3017. return true;
  3018. }
  3019. } else {
  3020. return hasI18nJson(value, delimiters);
  3021. }
  3022. });
  3023. }
  3024. function parseI18nJson(jsonObj, values, delimiters) {
  3025. if (!formater) {
  3026. formater = new BaseFormatter();
  3027. }
  3028. walkJsonObj(jsonObj, function (jsonObj, key) {
  3029. var value = jsonObj[key];
  3030. if (isString(value)) {
  3031. if (isI18nStr(value, delimiters)) {
  3032. jsonObj[key] = compileStr(value, values, delimiters);
  3033. }
  3034. } else {
  3035. parseI18nJson(value, values, delimiters);
  3036. }
  3037. });
  3038. return jsonObj;
  3039. }
  3040. function compileI18nJsonStr(jsonStr, _ref5) {
  3041. var locale = _ref5.locale,
  3042. locales = _ref5.locales,
  3043. delimiters = _ref5.delimiters;
  3044. if (!isI18nStr(jsonStr, delimiters)) {
  3045. return jsonStr;
  3046. }
  3047. if (!formater) {
  3048. formater = new BaseFormatter();
  3049. }
  3050. var localeValues = [];
  3051. Object.keys(locales).forEach(function (name) {
  3052. if (name !== locale) {
  3053. localeValues.push({
  3054. locale: name,
  3055. values: locales[name]
  3056. });
  3057. }
  3058. });
  3059. localeValues.unshift({
  3060. locale: locale,
  3061. values: locales[locale]
  3062. });
  3063. try {
  3064. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3065. } catch (e) {}
  3066. return jsonStr;
  3067. }
  3068. function isI18nStr(value, delimiters) {
  3069. return value.indexOf(delimiters[0]) > -1;
  3070. }
  3071. function compileStr(value, values, delimiters) {
  3072. return formater.interpolate(value, values, delimiters).join('');
  3073. }
  3074. function compileValue(jsonObj, key, localeValues, delimiters) {
  3075. var value = jsonObj[key];
  3076. if (isString(value)) {
  3077. // 存在国际化
  3078. if (isI18nStr(value, delimiters)) {
  3079. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3080. if (localeValues.length > 1) {
  3081. // 格式化国际化语言
  3082. var valueLocales = jsonObj[key + 'Locales'] = {};
  3083. localeValues.forEach(function (localValue) {
  3084. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3085. });
  3086. }
  3087. }
  3088. } else {
  3089. compileJsonObj(value, localeValues, delimiters);
  3090. }
  3091. }
  3092. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3093. walkJsonObj(jsonObj, function (jsonObj, key) {
  3094. compileValue(jsonObj, key, localeValues, delimiters);
  3095. });
  3096. return jsonObj;
  3097. }
  3098. function walkJsonObj(jsonObj, walk) {
  3099. if (Array.isArray(jsonObj)) {
  3100. for (var i = 0; i < jsonObj.length; i++) {
  3101. if (walk(jsonObj, i)) {
  3102. return true;
  3103. }
  3104. }
  3105. } else if (isObject(jsonObj)) {
  3106. for (var key in jsonObj) {
  3107. if (walk(jsonObj, key)) {
  3108. return true;
  3109. }
  3110. }
  3111. }
  3112. return false;
  3113. }
  3114. function resolveLocale(locales) {
  3115. return function (locale) {
  3116. if (!locale) {
  3117. return locale;
  3118. }
  3119. locale = normalizeLocale(locale) || locale;
  3120. return resolveLocaleChain(locale).find(function (locale) {
  3121. return locales.indexOf(locale) > -1;
  3122. });
  3123. };
  3124. }
  3125. function resolveLocaleChain(locale) {
  3126. var chain = [];
  3127. var tokens = locale.split('-');
  3128. while (tokens.length) {
  3129. chain.push(tokens.join('-'));
  3130. tokens.pop();
  3131. }
  3132. return chain;
  3133. }
  3134. /* 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)))
  3135. /***/ }),
  3136. /***/ 23:
  3137. /*!***************************************************************!*\
  3138. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3139. \***************************************************************/
  3140. /*! no static exports found */
  3141. /***/ (function(module, exports) {
  3142. function _classCallCheck(instance, Constructor) {
  3143. if (!(instance instanceof Constructor)) {
  3144. throw new TypeError("Cannot call a class as a function");
  3145. }
  3146. }
  3147. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3148. /***/ }),
  3149. /***/ 24:
  3150. /*!************************************************************!*\
  3151. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3152. \************************************************************/
  3153. /*! no static exports found */
  3154. /***/ (function(module, exports, __webpack_require__) {
  3155. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3156. function _defineProperties(target, props) {
  3157. for (var i = 0; i < props.length; i++) {
  3158. var descriptor = props[i];
  3159. descriptor.enumerable = descriptor.enumerable || false;
  3160. descriptor.configurable = true;
  3161. if ("value" in descriptor) descriptor.writable = true;
  3162. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3163. }
  3164. }
  3165. function _createClass(Constructor, protoProps, staticProps) {
  3166. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3167. if (staticProps) _defineProperties(Constructor, staticProps);
  3168. Object.defineProperty(Constructor, "prototype", {
  3169. writable: false
  3170. });
  3171. return Constructor;
  3172. }
  3173. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3174. /***/ }),
  3175. /***/ 25:
  3176. /*!******************************************************************************************!*\
  3177. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3178. \******************************************************************************************/
  3179. /*! exports provided: default */
  3180. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3181. "use strict";
  3182. __webpack_require__.r(__webpack_exports__);
  3183. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3184. * Vue.js v2.6.11
  3185. * (c) 2014-2023 Evan You
  3186. * Released under the MIT License.
  3187. */
  3188. /* */
  3189. var emptyObject = Object.freeze({});
  3190. // These helpers produce better VM code in JS engines due to their
  3191. // explicitness and function inlining.
  3192. function isUndef (v) {
  3193. return v === undefined || v === null
  3194. }
  3195. function isDef (v) {
  3196. return v !== undefined && v !== null
  3197. }
  3198. function isTrue (v) {
  3199. return v === true
  3200. }
  3201. function isFalse (v) {
  3202. return v === false
  3203. }
  3204. /**
  3205. * Check if value is primitive.
  3206. */
  3207. function isPrimitive (value) {
  3208. return (
  3209. typeof value === 'string' ||
  3210. typeof value === 'number' ||
  3211. // $flow-disable-line
  3212. typeof value === 'symbol' ||
  3213. typeof value === 'boolean'
  3214. )
  3215. }
  3216. /**
  3217. * Quick object check - this is primarily used to tell
  3218. * Objects from primitive values when we know the value
  3219. * is a JSON-compliant type.
  3220. */
  3221. function isObject (obj) {
  3222. return obj !== null && typeof obj === 'object'
  3223. }
  3224. /**
  3225. * Get the raw type string of a value, e.g., [object Object].
  3226. */
  3227. var _toString = Object.prototype.toString;
  3228. function toRawType (value) {
  3229. return _toString.call(value).slice(8, -1)
  3230. }
  3231. /**
  3232. * Strict object type check. Only returns true
  3233. * for plain JavaScript objects.
  3234. */
  3235. function isPlainObject (obj) {
  3236. return _toString.call(obj) === '[object Object]'
  3237. }
  3238. function isRegExp (v) {
  3239. return _toString.call(v) === '[object RegExp]'
  3240. }
  3241. /**
  3242. * Check if val is a valid array index.
  3243. */
  3244. function isValidArrayIndex (val) {
  3245. var n = parseFloat(String(val));
  3246. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3247. }
  3248. function isPromise (val) {
  3249. return (
  3250. isDef(val) &&
  3251. typeof val.then === 'function' &&
  3252. typeof val.catch === 'function'
  3253. )
  3254. }
  3255. /**
  3256. * Convert a value to a string that is actually rendered.
  3257. */
  3258. function toString (val) {
  3259. return val == null
  3260. ? ''
  3261. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3262. ? JSON.stringify(val, null, 2)
  3263. : String(val)
  3264. }
  3265. /**
  3266. * Convert an input value to a number for persistence.
  3267. * If the conversion fails, return original string.
  3268. */
  3269. function toNumber (val) {
  3270. var n = parseFloat(val);
  3271. return isNaN(n) ? val : n
  3272. }
  3273. /**
  3274. * Make a map and return a function for checking if a key
  3275. * is in that map.
  3276. */
  3277. function makeMap (
  3278. str,
  3279. expectsLowerCase
  3280. ) {
  3281. var map = Object.create(null);
  3282. var list = str.split(',');
  3283. for (var i = 0; i < list.length; i++) {
  3284. map[list[i]] = true;
  3285. }
  3286. return expectsLowerCase
  3287. ? function (val) { return map[val.toLowerCase()]; }
  3288. : function (val) { return map[val]; }
  3289. }
  3290. /**
  3291. * Check if a tag is a built-in tag.
  3292. */
  3293. var isBuiltInTag = makeMap('slot,component', true);
  3294. /**
  3295. * Check if an attribute is a reserved attribute.
  3296. */
  3297. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3298. /**
  3299. * Remove an item from an array.
  3300. */
  3301. function remove (arr, item) {
  3302. if (arr.length) {
  3303. var index = arr.indexOf(item);
  3304. if (index > -1) {
  3305. return arr.splice(index, 1)
  3306. }
  3307. }
  3308. }
  3309. /**
  3310. * Check whether an object has the property.
  3311. */
  3312. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3313. function hasOwn (obj, key) {
  3314. return hasOwnProperty.call(obj, key)
  3315. }
  3316. /**
  3317. * Create a cached version of a pure function.
  3318. */
  3319. function cached (fn) {
  3320. var cache = Object.create(null);
  3321. return (function cachedFn (str) {
  3322. var hit = cache[str];
  3323. return hit || (cache[str] = fn(str))
  3324. })
  3325. }
  3326. /**
  3327. * Camelize a hyphen-delimited string.
  3328. */
  3329. var camelizeRE = /-(\w)/g;
  3330. var camelize = cached(function (str) {
  3331. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3332. });
  3333. /**
  3334. * Capitalize a string.
  3335. */
  3336. var capitalize = cached(function (str) {
  3337. return str.charAt(0).toUpperCase() + str.slice(1)
  3338. });
  3339. /**
  3340. * Hyphenate a camelCase string.
  3341. */
  3342. var hyphenateRE = /\B([A-Z])/g;
  3343. var hyphenate = cached(function (str) {
  3344. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3345. });
  3346. /**
  3347. * Simple bind polyfill for environments that do not support it,
  3348. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3349. * since native bind is now performant enough in most browsers.
  3350. * But removing it would mean breaking code that was able to run in
  3351. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3352. */
  3353. /* istanbul ignore next */
  3354. function polyfillBind (fn, ctx) {
  3355. function boundFn (a) {
  3356. var l = arguments.length;
  3357. return l
  3358. ? l > 1
  3359. ? fn.apply(ctx, arguments)
  3360. : fn.call(ctx, a)
  3361. : fn.call(ctx)
  3362. }
  3363. boundFn._length = fn.length;
  3364. return boundFn
  3365. }
  3366. function nativeBind (fn, ctx) {
  3367. return fn.bind(ctx)
  3368. }
  3369. var bind = Function.prototype.bind
  3370. ? nativeBind
  3371. : polyfillBind;
  3372. /**
  3373. * Convert an Array-like object to a real Array.
  3374. */
  3375. function toArray (list, start) {
  3376. start = start || 0;
  3377. var i = list.length - start;
  3378. var ret = new Array(i);
  3379. while (i--) {
  3380. ret[i] = list[i + start];
  3381. }
  3382. return ret
  3383. }
  3384. /**
  3385. * Mix properties into target object.
  3386. */
  3387. function extend (to, _from) {
  3388. for (var key in _from) {
  3389. to[key] = _from[key];
  3390. }
  3391. return to
  3392. }
  3393. /**
  3394. * Merge an Array of Objects into a single Object.
  3395. */
  3396. function toObject (arr) {
  3397. var res = {};
  3398. for (var i = 0; i < arr.length; i++) {
  3399. if (arr[i]) {
  3400. extend(res, arr[i]);
  3401. }
  3402. }
  3403. return res
  3404. }
  3405. /* eslint-disable no-unused-vars */
  3406. /**
  3407. * Perform no operation.
  3408. * Stubbing args to make Flow happy without leaving useless transpiled code
  3409. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3410. */
  3411. function noop (a, b, c) {}
  3412. /**
  3413. * Always return false.
  3414. */
  3415. var no = function (a, b, c) { return false; };
  3416. /* eslint-enable no-unused-vars */
  3417. /**
  3418. * Return the same value.
  3419. */
  3420. var identity = function (_) { return _; };
  3421. /**
  3422. * Check if two values are loosely equal - that is,
  3423. * if they are plain objects, do they have the same shape?
  3424. */
  3425. function looseEqual (a, b) {
  3426. if (a === b) { return true }
  3427. var isObjectA = isObject(a);
  3428. var isObjectB = isObject(b);
  3429. if (isObjectA && isObjectB) {
  3430. try {
  3431. var isArrayA = Array.isArray(a);
  3432. var isArrayB = Array.isArray(b);
  3433. if (isArrayA && isArrayB) {
  3434. return a.length === b.length && a.every(function (e, i) {
  3435. return looseEqual(e, b[i])
  3436. })
  3437. } else if (a instanceof Date && b instanceof Date) {
  3438. return a.getTime() === b.getTime()
  3439. } else if (!isArrayA && !isArrayB) {
  3440. var keysA = Object.keys(a);
  3441. var keysB = Object.keys(b);
  3442. return keysA.length === keysB.length && keysA.every(function (key) {
  3443. return looseEqual(a[key], b[key])
  3444. })
  3445. } else {
  3446. /* istanbul ignore next */
  3447. return false
  3448. }
  3449. } catch (e) {
  3450. /* istanbul ignore next */
  3451. return false
  3452. }
  3453. } else if (!isObjectA && !isObjectB) {
  3454. return String(a) === String(b)
  3455. } else {
  3456. return false
  3457. }
  3458. }
  3459. /**
  3460. * Return the first index at which a loosely equal value can be
  3461. * found in the array (if value is a plain object, the array must
  3462. * contain an object of the same shape), or -1 if it is not present.
  3463. */
  3464. function looseIndexOf (arr, val) {
  3465. for (var i = 0; i < arr.length; i++) {
  3466. if (looseEqual(arr[i], val)) { return i }
  3467. }
  3468. return -1
  3469. }
  3470. /**
  3471. * Ensure a function is called only once.
  3472. */
  3473. function once (fn) {
  3474. var called = false;
  3475. return function () {
  3476. if (!called) {
  3477. called = true;
  3478. fn.apply(this, arguments);
  3479. }
  3480. }
  3481. }
  3482. var ASSET_TYPES = [
  3483. 'component',
  3484. 'directive',
  3485. 'filter'
  3486. ];
  3487. var LIFECYCLE_HOOKS = [
  3488. 'beforeCreate',
  3489. 'created',
  3490. 'beforeMount',
  3491. 'mounted',
  3492. 'beforeUpdate',
  3493. 'updated',
  3494. 'beforeDestroy',
  3495. 'destroyed',
  3496. 'activated',
  3497. 'deactivated',
  3498. 'errorCaptured',
  3499. 'serverPrefetch'
  3500. ];
  3501. /* */
  3502. var config = ({
  3503. /**
  3504. * Option merge strategies (used in core/util/options)
  3505. */
  3506. // $flow-disable-line
  3507. optionMergeStrategies: Object.create(null),
  3508. /**
  3509. * Whether to suppress warnings.
  3510. */
  3511. silent: false,
  3512. /**
  3513. * Show production mode tip message on boot?
  3514. */
  3515. productionTip: "development" !== 'production',
  3516. /**
  3517. * Whether to enable devtools
  3518. */
  3519. devtools: "development" !== 'production',
  3520. /**
  3521. * Whether to record perf
  3522. */
  3523. performance: false,
  3524. /**
  3525. * Error handler for watcher errors
  3526. */
  3527. errorHandler: null,
  3528. /**
  3529. * Warn handler for watcher warns
  3530. */
  3531. warnHandler: null,
  3532. /**
  3533. * Ignore certain custom elements
  3534. */
  3535. ignoredElements: [],
  3536. /**
  3537. * Custom user key aliases for v-on
  3538. */
  3539. // $flow-disable-line
  3540. keyCodes: Object.create(null),
  3541. /**
  3542. * Check if a tag is reserved so that it cannot be registered as a
  3543. * component. This is platform-dependent and may be overwritten.
  3544. */
  3545. isReservedTag: no,
  3546. /**
  3547. * Check if an attribute is reserved so that it cannot be used as a component
  3548. * prop. This is platform-dependent and may be overwritten.
  3549. */
  3550. isReservedAttr: no,
  3551. /**
  3552. * Check if a tag is an unknown element.
  3553. * Platform-dependent.
  3554. */
  3555. isUnknownElement: no,
  3556. /**
  3557. * Get the namespace of an element
  3558. */
  3559. getTagNamespace: noop,
  3560. /**
  3561. * Parse the real tag name for the specific platform.
  3562. */
  3563. parsePlatformTagName: identity,
  3564. /**
  3565. * Check if an attribute must be bound using property, e.g. value
  3566. * Platform-dependent.
  3567. */
  3568. mustUseProp: no,
  3569. /**
  3570. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3571. * This will significantly reduce performance if set to false.
  3572. */
  3573. async: true,
  3574. /**
  3575. * Exposed for legacy reasons
  3576. */
  3577. _lifecycleHooks: LIFECYCLE_HOOKS
  3578. });
  3579. /* */
  3580. /**
  3581. * unicode letters used for parsing html tags, component names and property paths.
  3582. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3583. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3584. */
  3585. 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/;
  3586. /**
  3587. * Check if a string starts with $ or _
  3588. */
  3589. function isReserved (str) {
  3590. var c = (str + '').charCodeAt(0);
  3591. return c === 0x24 || c === 0x5F
  3592. }
  3593. /**
  3594. * Define a property.
  3595. */
  3596. function def (obj, key, val, enumerable) {
  3597. Object.defineProperty(obj, key, {
  3598. value: val,
  3599. enumerable: !!enumerable,
  3600. writable: true,
  3601. configurable: true
  3602. });
  3603. }
  3604. /**
  3605. * Parse simple path.
  3606. */
  3607. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3608. function parsePath (path) {
  3609. if (bailRE.test(path)) {
  3610. return
  3611. }
  3612. var segments = path.split('.');
  3613. return function (obj) {
  3614. for (var i = 0; i < segments.length; i++) {
  3615. if (!obj) { return }
  3616. obj = obj[segments[i]];
  3617. }
  3618. return obj
  3619. }
  3620. }
  3621. /* */
  3622. // can we use __proto__?
  3623. var hasProto = '__proto__' in {};
  3624. // Browser environment sniffing
  3625. var inBrowser = typeof window !== 'undefined';
  3626. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3627. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3628. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  3629. var isIE = UA && /msie|trident/.test(UA);
  3630. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3631. var isEdge = UA && UA.indexOf('edge/') > 0;
  3632. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3633. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3634. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3635. var isPhantomJS = UA && /phantomjs/.test(UA);
  3636. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3637. // Firefox has a "watch" function on Object.prototype...
  3638. var nativeWatch = ({}).watch;
  3639. if (inBrowser) {
  3640. try {
  3641. var opts = {};
  3642. Object.defineProperty(opts, 'passive', ({
  3643. get: function get () {
  3644. }
  3645. })); // https://github.com/facebook/flow/issues/285
  3646. window.addEventListener('test-passive', null, opts);
  3647. } catch (e) {}
  3648. }
  3649. // this needs to be lazy-evaled because vue may be required before
  3650. // vue-server-renderer can set VUE_ENV
  3651. var _isServer;
  3652. var isServerRendering = function () {
  3653. if (_isServer === undefined) {
  3654. /* istanbul ignore if */
  3655. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3656. // detect presence of vue-server-renderer and avoid
  3657. // Webpack shimming the process
  3658. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3659. } else {
  3660. _isServer = false;
  3661. }
  3662. }
  3663. return _isServer
  3664. };
  3665. // detect devtools
  3666. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3667. /* istanbul ignore next */
  3668. function isNative (Ctor) {
  3669. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3670. }
  3671. var hasSymbol =
  3672. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3673. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3674. var _Set;
  3675. /* istanbul ignore if */ // $flow-disable-line
  3676. if (typeof Set !== 'undefined' && isNative(Set)) {
  3677. // use native Set when available.
  3678. _Set = Set;
  3679. } else {
  3680. // a non-standard Set polyfill that only works with primitive keys.
  3681. _Set = /*@__PURE__*/(function () {
  3682. function Set () {
  3683. this.set = Object.create(null);
  3684. }
  3685. Set.prototype.has = function has (key) {
  3686. return this.set[key] === true
  3687. };
  3688. Set.prototype.add = function add (key) {
  3689. this.set[key] = true;
  3690. };
  3691. Set.prototype.clear = function clear () {
  3692. this.set = Object.create(null);
  3693. };
  3694. return Set;
  3695. }());
  3696. }
  3697. /* */
  3698. var warn = noop;
  3699. var tip = noop;
  3700. var generateComponentTrace = (noop); // work around flow check
  3701. var formatComponentName = (noop);
  3702. if (true) {
  3703. var hasConsole = typeof console !== 'undefined';
  3704. var classifyRE = /(?:^|[-_])(\w)/g;
  3705. var classify = function (str) { return str
  3706. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3707. .replace(/[-_]/g, ''); };
  3708. warn = function (msg, vm) {
  3709. var trace = vm ? generateComponentTrace(vm) : '';
  3710. if (config.warnHandler) {
  3711. config.warnHandler.call(null, msg, vm, trace);
  3712. } else if (hasConsole && (!config.silent)) {
  3713. console.error(("[Vue warn]: " + msg + trace));
  3714. }
  3715. };
  3716. tip = function (msg, vm) {
  3717. if (hasConsole && (!config.silent)) {
  3718. console.warn("[Vue tip]: " + msg + (
  3719. vm ? generateComponentTrace(vm) : ''
  3720. ));
  3721. }
  3722. };
  3723. formatComponentName = function (vm, includeFile) {
  3724. if (vm.$root === vm) {
  3725. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3726. return ('') + vm.$options.__file
  3727. }
  3728. return '<Root>'
  3729. }
  3730. var options = typeof vm === 'function' && vm.cid != null
  3731. ? vm.options
  3732. : vm._isVue
  3733. ? vm.$options || vm.constructor.options
  3734. : vm;
  3735. var name = options.name || options._componentTag;
  3736. var file = options.__file;
  3737. if (!name && file) {
  3738. var match = file.match(/([^/\\]+)\.vue$/);
  3739. name = match && match[1];
  3740. }
  3741. return (
  3742. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3743. (file && includeFile !== false ? (" at " + file) : '')
  3744. )
  3745. };
  3746. var repeat = function (str, n) {
  3747. var res = '';
  3748. while (n) {
  3749. if (n % 2 === 1) { res += str; }
  3750. if (n > 1) { str += str; }
  3751. n >>= 1;
  3752. }
  3753. return res
  3754. };
  3755. generateComponentTrace = function (vm) {
  3756. if (vm._isVue && vm.$parent) {
  3757. var tree = [];
  3758. var currentRecursiveSequence = 0;
  3759. while (vm && vm.$options.name !== 'PageBody') {
  3760. if (tree.length > 0) {
  3761. var last = tree[tree.length - 1];
  3762. if (last.constructor === vm.constructor) {
  3763. currentRecursiveSequence++;
  3764. vm = vm.$parent;
  3765. continue
  3766. } else if (currentRecursiveSequence > 0) {
  3767. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3768. currentRecursiveSequence = 0;
  3769. }
  3770. }
  3771. !vm.$options.isReserved && tree.push(vm);
  3772. vm = vm.$parent;
  3773. }
  3774. return '\n\nfound in\n\n' + tree
  3775. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3776. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3777. : formatComponentName(vm))); })
  3778. .join('\n')
  3779. } else {
  3780. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3781. }
  3782. };
  3783. }
  3784. /* */
  3785. var uid = 0;
  3786. /**
  3787. * A dep is an observable that can have multiple
  3788. * directives subscribing to it.
  3789. */
  3790. var Dep = function Dep () {
  3791. this.id = uid++;
  3792. this.subs = [];
  3793. };
  3794. Dep.prototype.addSub = function addSub (sub) {
  3795. this.subs.push(sub);
  3796. };
  3797. Dep.prototype.removeSub = function removeSub (sub) {
  3798. remove(this.subs, sub);
  3799. };
  3800. Dep.prototype.depend = function depend () {
  3801. if (Dep.SharedObject.target) {
  3802. Dep.SharedObject.target.addDep(this);
  3803. }
  3804. };
  3805. Dep.prototype.notify = function notify () {
  3806. // stabilize the subscriber list first
  3807. var subs = this.subs.slice();
  3808. if ( true && !config.async) {
  3809. // subs aren't sorted in scheduler if not running async
  3810. // we need to sort them now to make sure they fire in correct
  3811. // order
  3812. subs.sort(function (a, b) { return a.id - b.id; });
  3813. }
  3814. for (var i = 0, l = subs.length; i < l; i++) {
  3815. subs[i].update();
  3816. }
  3817. };
  3818. // The current target watcher being evaluated.
  3819. // This is globally unique because only one watcher
  3820. // can be evaluated at a time.
  3821. // fixed by xxxxxx (nvue shared vuex)
  3822. /* eslint-disable no-undef */
  3823. Dep.SharedObject = {};
  3824. Dep.SharedObject.target = null;
  3825. Dep.SharedObject.targetStack = [];
  3826. function pushTarget (target) {
  3827. Dep.SharedObject.targetStack.push(target);
  3828. Dep.SharedObject.target = target;
  3829. Dep.target = target;
  3830. }
  3831. function popTarget () {
  3832. Dep.SharedObject.targetStack.pop();
  3833. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3834. Dep.target = Dep.SharedObject.target;
  3835. }
  3836. /* */
  3837. var VNode = function VNode (
  3838. tag,
  3839. data,
  3840. children,
  3841. text,
  3842. elm,
  3843. context,
  3844. componentOptions,
  3845. asyncFactory
  3846. ) {
  3847. this.tag = tag;
  3848. this.data = data;
  3849. this.children = children;
  3850. this.text = text;
  3851. this.elm = elm;
  3852. this.ns = undefined;
  3853. this.context = context;
  3854. this.fnContext = undefined;
  3855. this.fnOptions = undefined;
  3856. this.fnScopeId = undefined;
  3857. this.key = data && data.key;
  3858. this.componentOptions = componentOptions;
  3859. this.componentInstance = undefined;
  3860. this.parent = undefined;
  3861. this.raw = false;
  3862. this.isStatic = false;
  3863. this.isRootInsert = true;
  3864. this.isComment = false;
  3865. this.isCloned = false;
  3866. this.isOnce = false;
  3867. this.asyncFactory = asyncFactory;
  3868. this.asyncMeta = undefined;
  3869. this.isAsyncPlaceholder = false;
  3870. };
  3871. var prototypeAccessors = { child: { configurable: true } };
  3872. // DEPRECATED: alias for componentInstance for backwards compat.
  3873. /* istanbul ignore next */
  3874. prototypeAccessors.child.get = function () {
  3875. return this.componentInstance
  3876. };
  3877. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3878. var createEmptyVNode = function (text) {
  3879. if ( text === void 0 ) text = '';
  3880. var node = new VNode();
  3881. node.text = text;
  3882. node.isComment = true;
  3883. return node
  3884. };
  3885. function createTextVNode (val) {
  3886. return new VNode(undefined, undefined, undefined, String(val))
  3887. }
  3888. // optimized shallow clone
  3889. // used for static nodes and slot nodes because they may be reused across
  3890. // multiple renders, cloning them avoids errors when DOM manipulations rely
  3891. // on their elm reference.
  3892. function cloneVNode (vnode) {
  3893. var cloned = new VNode(
  3894. vnode.tag,
  3895. vnode.data,
  3896. // #7975
  3897. // clone children array to avoid mutating original in case of cloning
  3898. // a child.
  3899. vnode.children && vnode.children.slice(),
  3900. vnode.text,
  3901. vnode.elm,
  3902. vnode.context,
  3903. vnode.componentOptions,
  3904. vnode.asyncFactory
  3905. );
  3906. cloned.ns = vnode.ns;
  3907. cloned.isStatic = vnode.isStatic;
  3908. cloned.key = vnode.key;
  3909. cloned.isComment = vnode.isComment;
  3910. cloned.fnContext = vnode.fnContext;
  3911. cloned.fnOptions = vnode.fnOptions;
  3912. cloned.fnScopeId = vnode.fnScopeId;
  3913. cloned.asyncMeta = vnode.asyncMeta;
  3914. cloned.isCloned = true;
  3915. return cloned
  3916. }
  3917. /*
  3918. * not type checking this file because flow doesn't play well with
  3919. * dynamically accessing methods on Array prototype
  3920. */
  3921. var arrayProto = Array.prototype;
  3922. var arrayMethods = Object.create(arrayProto);
  3923. var methodsToPatch = [
  3924. 'push',
  3925. 'pop',
  3926. 'shift',
  3927. 'unshift',
  3928. 'splice',
  3929. 'sort',
  3930. 'reverse'
  3931. ];
  3932. /**
  3933. * Intercept mutating methods and emit events
  3934. */
  3935. methodsToPatch.forEach(function (method) {
  3936. // cache original method
  3937. var original = arrayProto[method];
  3938. def(arrayMethods, method, function mutator () {
  3939. var args = [], len = arguments.length;
  3940. while ( len-- ) args[ len ] = arguments[ len ];
  3941. var result = original.apply(this, args);
  3942. var ob = this.__ob__;
  3943. var inserted;
  3944. switch (method) {
  3945. case 'push':
  3946. case 'unshift':
  3947. inserted = args;
  3948. break
  3949. case 'splice':
  3950. inserted = args.slice(2);
  3951. break
  3952. }
  3953. if (inserted) { ob.observeArray(inserted); }
  3954. // notify change
  3955. ob.dep.notify();
  3956. return result
  3957. });
  3958. });
  3959. /* */
  3960. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  3961. /**
  3962. * In some cases we may want to disable observation inside a component's
  3963. * update computation.
  3964. */
  3965. var shouldObserve = true;
  3966. function toggleObserving (value) {
  3967. shouldObserve = value;
  3968. }
  3969. /**
  3970. * Observer class that is attached to each observed
  3971. * object. Once attached, the observer converts the target
  3972. * object's property keys into getter/setters that
  3973. * collect dependencies and dispatch updates.
  3974. */
  3975. var Observer = function Observer (value) {
  3976. this.value = value;
  3977. this.dep = new Dep();
  3978. this.vmCount = 0;
  3979. def(value, '__ob__', this);
  3980. if (Array.isArray(value)) {
  3981. if (hasProto) {
  3982. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  3983. if(value.push !== value.__proto__.push){
  3984. copyAugment(value, arrayMethods, arrayKeys);
  3985. } else {
  3986. protoAugment(value, arrayMethods);
  3987. }
  3988. }
  3989. } else {
  3990. copyAugment(value, arrayMethods, arrayKeys);
  3991. }
  3992. this.observeArray(value);
  3993. } else {
  3994. this.walk(value);
  3995. }
  3996. };
  3997. /**
  3998. * Walk through all properties and convert them into
  3999. * getter/setters. This method should only be called when
  4000. * value type is Object.
  4001. */
  4002. Observer.prototype.walk = function walk (obj) {
  4003. var keys = Object.keys(obj);
  4004. for (var i = 0; i < keys.length; i++) {
  4005. defineReactive$$1(obj, keys[i]);
  4006. }
  4007. };
  4008. /**
  4009. * Observe a list of Array items.
  4010. */
  4011. Observer.prototype.observeArray = function observeArray (items) {
  4012. for (var i = 0, l = items.length; i < l; i++) {
  4013. observe(items[i]);
  4014. }
  4015. };
  4016. // helpers
  4017. /**
  4018. * Augment a target Object or Array by intercepting
  4019. * the prototype chain using __proto__
  4020. */
  4021. function protoAugment (target, src) {
  4022. /* eslint-disable no-proto */
  4023. target.__proto__ = src;
  4024. /* eslint-enable no-proto */
  4025. }
  4026. /**
  4027. * Augment a target Object or Array by defining
  4028. * hidden properties.
  4029. */
  4030. /* istanbul ignore next */
  4031. function copyAugment (target, src, keys) {
  4032. for (var i = 0, l = keys.length; i < l; i++) {
  4033. var key = keys[i];
  4034. def(target, key, src[key]);
  4035. }
  4036. }
  4037. /**
  4038. * Attempt to create an observer instance for a value,
  4039. * returns the new observer if successfully observed,
  4040. * or the existing observer if the value already has one.
  4041. */
  4042. function observe (value, asRootData) {
  4043. if (!isObject(value) || value instanceof VNode) {
  4044. return
  4045. }
  4046. var ob;
  4047. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4048. ob = value.__ob__;
  4049. } else if (
  4050. shouldObserve &&
  4051. !isServerRendering() &&
  4052. (Array.isArray(value) || isPlainObject(value)) &&
  4053. Object.isExtensible(value) &&
  4054. !value._isVue &&
  4055. !value.__v_isMPComponent
  4056. ) {
  4057. ob = new Observer(value);
  4058. }
  4059. if (asRootData && ob) {
  4060. ob.vmCount++;
  4061. }
  4062. return ob
  4063. }
  4064. /**
  4065. * Define a reactive property on an Object.
  4066. */
  4067. function defineReactive$$1 (
  4068. obj,
  4069. key,
  4070. val,
  4071. customSetter,
  4072. shallow
  4073. ) {
  4074. var dep = new Dep();
  4075. var property = Object.getOwnPropertyDescriptor(obj, key);
  4076. if (property && property.configurable === false) {
  4077. return
  4078. }
  4079. // cater for pre-defined getter/setters
  4080. var getter = property && property.get;
  4081. var setter = property && property.set;
  4082. if ((!getter || setter) && arguments.length === 2) {
  4083. val = obj[key];
  4084. }
  4085. var childOb = !shallow && observe(val);
  4086. Object.defineProperty(obj, key, {
  4087. enumerable: true,
  4088. configurable: true,
  4089. get: function reactiveGetter () {
  4090. var value = getter ? getter.call(obj) : val;
  4091. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4092. dep.depend();
  4093. if (childOb) {
  4094. childOb.dep.depend();
  4095. if (Array.isArray(value)) {
  4096. dependArray(value);
  4097. }
  4098. }
  4099. }
  4100. return value
  4101. },
  4102. set: function reactiveSetter (newVal) {
  4103. var value = getter ? getter.call(obj) : val;
  4104. /* eslint-disable no-self-compare */
  4105. if (newVal === value || (newVal !== newVal && value !== value)) {
  4106. return
  4107. }
  4108. /* eslint-enable no-self-compare */
  4109. if ( true && customSetter) {
  4110. customSetter();
  4111. }
  4112. // #7981: for accessor properties without setter
  4113. if (getter && !setter) { return }
  4114. if (setter) {
  4115. setter.call(obj, newVal);
  4116. } else {
  4117. val = newVal;
  4118. }
  4119. childOb = !shallow && observe(newVal);
  4120. dep.notify();
  4121. }
  4122. });
  4123. }
  4124. /**
  4125. * Set a property on an object. Adds the new property and
  4126. * triggers change notification if the property doesn't
  4127. * already exist.
  4128. */
  4129. function set (target, key, val) {
  4130. if ( true &&
  4131. (isUndef(target) || isPrimitive(target))
  4132. ) {
  4133. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4134. }
  4135. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4136. target.length = Math.max(target.length, key);
  4137. target.splice(key, 1, val);
  4138. return val
  4139. }
  4140. if (key in target && !(key in Object.prototype)) {
  4141. target[key] = val;
  4142. return val
  4143. }
  4144. var ob = (target).__ob__;
  4145. if (target._isVue || (ob && ob.vmCount)) {
  4146. true && warn(
  4147. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4148. 'at runtime - declare it upfront in the data option.'
  4149. );
  4150. return val
  4151. }
  4152. if (!ob) {
  4153. target[key] = val;
  4154. return val
  4155. }
  4156. defineReactive$$1(ob.value, key, val);
  4157. ob.dep.notify();
  4158. return val
  4159. }
  4160. /**
  4161. * Delete a property and trigger change if necessary.
  4162. */
  4163. function del (target, key) {
  4164. if ( true &&
  4165. (isUndef(target) || isPrimitive(target))
  4166. ) {
  4167. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4168. }
  4169. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4170. target.splice(key, 1);
  4171. return
  4172. }
  4173. var ob = (target).__ob__;
  4174. if (target._isVue || (ob && ob.vmCount)) {
  4175. true && warn(
  4176. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4177. '- just set it to null.'
  4178. );
  4179. return
  4180. }
  4181. if (!hasOwn(target, key)) {
  4182. return
  4183. }
  4184. delete target[key];
  4185. if (!ob) {
  4186. return
  4187. }
  4188. ob.dep.notify();
  4189. }
  4190. /**
  4191. * Collect dependencies on array elements when the array is touched, since
  4192. * we cannot intercept array element access like property getters.
  4193. */
  4194. function dependArray (value) {
  4195. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4196. e = value[i];
  4197. e && e.__ob__ && e.__ob__.dep.depend();
  4198. if (Array.isArray(e)) {
  4199. dependArray(e);
  4200. }
  4201. }
  4202. }
  4203. /* */
  4204. /**
  4205. * Option overwriting strategies are functions that handle
  4206. * how to merge a parent option value and a child option
  4207. * value into the final value.
  4208. */
  4209. var strats = config.optionMergeStrategies;
  4210. /**
  4211. * Options with restrictions
  4212. */
  4213. if (true) {
  4214. strats.el = strats.propsData = function (parent, child, vm, key) {
  4215. if (!vm) {
  4216. warn(
  4217. "option \"" + key + "\" can only be used during instance " +
  4218. 'creation with the `new` keyword.'
  4219. );
  4220. }
  4221. return defaultStrat(parent, child)
  4222. };
  4223. }
  4224. /**
  4225. * Helper that recursively merges two data objects together.
  4226. */
  4227. function mergeData (to, from) {
  4228. if (!from) { return to }
  4229. var key, toVal, fromVal;
  4230. var keys = hasSymbol
  4231. ? Reflect.ownKeys(from)
  4232. : Object.keys(from);
  4233. for (var i = 0; i < keys.length; i++) {
  4234. key = keys[i];
  4235. // in case the object is already observed...
  4236. if (key === '__ob__') { continue }
  4237. toVal = to[key];
  4238. fromVal = from[key];
  4239. if (!hasOwn(to, key)) {
  4240. set(to, key, fromVal);
  4241. } else if (
  4242. toVal !== fromVal &&
  4243. isPlainObject(toVal) &&
  4244. isPlainObject(fromVal)
  4245. ) {
  4246. mergeData(toVal, fromVal);
  4247. }
  4248. }
  4249. return to
  4250. }
  4251. /**
  4252. * Data
  4253. */
  4254. function mergeDataOrFn (
  4255. parentVal,
  4256. childVal,
  4257. vm
  4258. ) {
  4259. if (!vm) {
  4260. // in a Vue.extend merge, both should be functions
  4261. if (!childVal) {
  4262. return parentVal
  4263. }
  4264. if (!parentVal) {
  4265. return childVal
  4266. }
  4267. // when parentVal & childVal are both present,
  4268. // we need to return a function that returns the
  4269. // merged result of both functions... no need to
  4270. // check if parentVal is a function here because
  4271. // it has to be a function to pass previous merges.
  4272. return function mergedDataFn () {
  4273. return mergeData(
  4274. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4275. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4276. )
  4277. }
  4278. } else {
  4279. return function mergedInstanceDataFn () {
  4280. // instance merge
  4281. var instanceData = typeof childVal === 'function'
  4282. ? childVal.call(vm, vm)
  4283. : childVal;
  4284. var defaultData = typeof parentVal === 'function'
  4285. ? parentVal.call(vm, vm)
  4286. : parentVal;
  4287. if (instanceData) {
  4288. return mergeData(instanceData, defaultData)
  4289. } else {
  4290. return defaultData
  4291. }
  4292. }
  4293. }
  4294. }
  4295. strats.data = function (
  4296. parentVal,
  4297. childVal,
  4298. vm
  4299. ) {
  4300. if (!vm) {
  4301. if (childVal && typeof childVal !== 'function') {
  4302. true && warn(
  4303. 'The "data" option should be a function ' +
  4304. 'that returns a per-instance value in component ' +
  4305. 'definitions.',
  4306. vm
  4307. );
  4308. return parentVal
  4309. }
  4310. return mergeDataOrFn(parentVal, childVal)
  4311. }
  4312. return mergeDataOrFn(parentVal, childVal, vm)
  4313. };
  4314. /**
  4315. * Hooks and props are merged as arrays.
  4316. */
  4317. function mergeHook (
  4318. parentVal,
  4319. childVal
  4320. ) {
  4321. var res = childVal
  4322. ? parentVal
  4323. ? parentVal.concat(childVal)
  4324. : Array.isArray(childVal)
  4325. ? childVal
  4326. : [childVal]
  4327. : parentVal;
  4328. return res
  4329. ? dedupeHooks(res)
  4330. : res
  4331. }
  4332. function dedupeHooks (hooks) {
  4333. var res = [];
  4334. for (var i = 0; i < hooks.length; i++) {
  4335. if (res.indexOf(hooks[i]) === -1) {
  4336. res.push(hooks[i]);
  4337. }
  4338. }
  4339. return res
  4340. }
  4341. LIFECYCLE_HOOKS.forEach(function (hook) {
  4342. strats[hook] = mergeHook;
  4343. });
  4344. /**
  4345. * Assets
  4346. *
  4347. * When a vm is present (instance creation), we need to do
  4348. * a three-way merge between constructor options, instance
  4349. * options and parent options.
  4350. */
  4351. function mergeAssets (
  4352. parentVal,
  4353. childVal,
  4354. vm,
  4355. key
  4356. ) {
  4357. var res = Object.create(parentVal || null);
  4358. if (childVal) {
  4359. true && assertObjectType(key, childVal, vm);
  4360. return extend(res, childVal)
  4361. } else {
  4362. return res
  4363. }
  4364. }
  4365. ASSET_TYPES.forEach(function (type) {
  4366. strats[type + 's'] = mergeAssets;
  4367. });
  4368. /**
  4369. * Watchers.
  4370. *
  4371. * Watchers hashes should not overwrite one
  4372. * another, so we merge them as arrays.
  4373. */
  4374. strats.watch = function (
  4375. parentVal,
  4376. childVal,
  4377. vm,
  4378. key
  4379. ) {
  4380. // work around Firefox's Object.prototype.watch...
  4381. if (parentVal === nativeWatch) { parentVal = undefined; }
  4382. if (childVal === nativeWatch) { childVal = undefined; }
  4383. /* istanbul ignore if */
  4384. if (!childVal) { return Object.create(parentVal || null) }
  4385. if (true) {
  4386. assertObjectType(key, childVal, vm);
  4387. }
  4388. if (!parentVal) { return childVal }
  4389. var ret = {};
  4390. extend(ret, parentVal);
  4391. for (var key$1 in childVal) {
  4392. var parent = ret[key$1];
  4393. var child = childVal[key$1];
  4394. if (parent && !Array.isArray(parent)) {
  4395. parent = [parent];
  4396. }
  4397. ret[key$1] = parent
  4398. ? parent.concat(child)
  4399. : Array.isArray(child) ? child : [child];
  4400. }
  4401. return ret
  4402. };
  4403. /**
  4404. * Other object hashes.
  4405. */
  4406. strats.props =
  4407. strats.methods =
  4408. strats.inject =
  4409. strats.computed = function (
  4410. parentVal,
  4411. childVal,
  4412. vm,
  4413. key
  4414. ) {
  4415. if (childVal && "development" !== 'production') {
  4416. assertObjectType(key, childVal, vm);
  4417. }
  4418. if (!parentVal) { return childVal }
  4419. var ret = Object.create(null);
  4420. extend(ret, parentVal);
  4421. if (childVal) { extend(ret, childVal); }
  4422. return ret
  4423. };
  4424. strats.provide = mergeDataOrFn;
  4425. /**
  4426. * Default strategy.
  4427. */
  4428. var defaultStrat = function (parentVal, childVal) {
  4429. return childVal === undefined
  4430. ? parentVal
  4431. : childVal
  4432. };
  4433. /**
  4434. * Validate component names
  4435. */
  4436. function checkComponents (options) {
  4437. for (var key in options.components) {
  4438. validateComponentName(key);
  4439. }
  4440. }
  4441. function validateComponentName (name) {
  4442. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4443. warn(
  4444. 'Invalid component name: "' + name + '". Component names ' +
  4445. 'should conform to valid custom element name in html5 specification.'
  4446. );
  4447. }
  4448. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4449. warn(
  4450. 'Do not use built-in or reserved HTML elements as component ' +
  4451. 'id: ' + name
  4452. );
  4453. }
  4454. }
  4455. /**
  4456. * Ensure all props option syntax are normalized into the
  4457. * Object-based format.
  4458. */
  4459. function normalizeProps (options, vm) {
  4460. var props = options.props;
  4461. if (!props) { return }
  4462. var res = {};
  4463. var i, val, name;
  4464. if (Array.isArray(props)) {
  4465. i = props.length;
  4466. while (i--) {
  4467. val = props[i];
  4468. if (typeof val === 'string') {
  4469. name = camelize(val);
  4470. res[name] = { type: null };
  4471. } else if (true) {
  4472. warn('props must be strings when using array syntax.');
  4473. }
  4474. }
  4475. } else if (isPlainObject(props)) {
  4476. for (var key in props) {
  4477. val = props[key];
  4478. name = camelize(key);
  4479. res[name] = isPlainObject(val)
  4480. ? val
  4481. : { type: val };
  4482. }
  4483. } else if (true) {
  4484. warn(
  4485. "Invalid value for option \"props\": expected an Array or an Object, " +
  4486. "but got " + (toRawType(props)) + ".",
  4487. vm
  4488. );
  4489. }
  4490. options.props = res;
  4491. }
  4492. /**
  4493. * Normalize all injections into Object-based format
  4494. */
  4495. function normalizeInject (options, vm) {
  4496. var inject = options.inject;
  4497. if (!inject) { return }
  4498. var normalized = options.inject = {};
  4499. if (Array.isArray(inject)) {
  4500. for (var i = 0; i < inject.length; i++) {
  4501. normalized[inject[i]] = { from: inject[i] };
  4502. }
  4503. } else if (isPlainObject(inject)) {
  4504. for (var key in inject) {
  4505. var val = inject[key];
  4506. normalized[key] = isPlainObject(val)
  4507. ? extend({ from: key }, val)
  4508. : { from: val };
  4509. }
  4510. } else if (true) {
  4511. warn(
  4512. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4513. "but got " + (toRawType(inject)) + ".",
  4514. vm
  4515. );
  4516. }
  4517. }
  4518. /**
  4519. * Normalize raw function directives into object format.
  4520. */
  4521. function normalizeDirectives (options) {
  4522. var dirs = options.directives;
  4523. if (dirs) {
  4524. for (var key in dirs) {
  4525. var def$$1 = dirs[key];
  4526. if (typeof def$$1 === 'function') {
  4527. dirs[key] = { bind: def$$1, update: def$$1 };
  4528. }
  4529. }
  4530. }
  4531. }
  4532. function assertObjectType (name, value, vm) {
  4533. if (!isPlainObject(value)) {
  4534. warn(
  4535. "Invalid value for option \"" + name + "\": expected an Object, " +
  4536. "but got " + (toRawType(value)) + ".",
  4537. vm
  4538. );
  4539. }
  4540. }
  4541. /**
  4542. * Merge two option objects into a new one.
  4543. * Core utility used in both instantiation and inheritance.
  4544. */
  4545. function mergeOptions (
  4546. parent,
  4547. child,
  4548. vm
  4549. ) {
  4550. if (true) {
  4551. checkComponents(child);
  4552. }
  4553. if (typeof child === 'function') {
  4554. child = child.options;
  4555. }
  4556. normalizeProps(child, vm);
  4557. normalizeInject(child, vm);
  4558. normalizeDirectives(child);
  4559. // Apply extends and mixins on the child options,
  4560. // but only if it is a raw options object that isn't
  4561. // the result of another mergeOptions call.
  4562. // Only merged options has the _base property.
  4563. if (!child._base) {
  4564. if (child.extends) {
  4565. parent = mergeOptions(parent, child.extends, vm);
  4566. }
  4567. if (child.mixins) {
  4568. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4569. parent = mergeOptions(parent, child.mixins[i], vm);
  4570. }
  4571. }
  4572. }
  4573. var options = {};
  4574. var key;
  4575. for (key in parent) {
  4576. mergeField(key);
  4577. }
  4578. for (key in child) {
  4579. if (!hasOwn(parent, key)) {
  4580. mergeField(key);
  4581. }
  4582. }
  4583. function mergeField (key) {
  4584. var strat = strats[key] || defaultStrat;
  4585. options[key] = strat(parent[key], child[key], vm, key);
  4586. }
  4587. return options
  4588. }
  4589. /**
  4590. * Resolve an asset.
  4591. * This function is used because child instances need access
  4592. * to assets defined in its ancestor chain.
  4593. */
  4594. function resolveAsset (
  4595. options,
  4596. type,
  4597. id,
  4598. warnMissing
  4599. ) {
  4600. /* istanbul ignore if */
  4601. if (typeof id !== 'string') {
  4602. return
  4603. }
  4604. var assets = options[type];
  4605. // check local registration variations first
  4606. if (hasOwn(assets, id)) { return assets[id] }
  4607. var camelizedId = camelize(id);
  4608. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4609. var PascalCaseId = capitalize(camelizedId);
  4610. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4611. // fallback to prototype chain
  4612. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4613. if ( true && warnMissing && !res) {
  4614. warn(
  4615. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4616. options
  4617. );
  4618. }
  4619. return res
  4620. }
  4621. /* */
  4622. function validateProp (
  4623. key,
  4624. propOptions,
  4625. propsData,
  4626. vm
  4627. ) {
  4628. var prop = propOptions[key];
  4629. var absent = !hasOwn(propsData, key);
  4630. var value = propsData[key];
  4631. // boolean casting
  4632. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4633. if (booleanIndex > -1) {
  4634. if (absent && !hasOwn(prop, 'default')) {
  4635. value = false;
  4636. } else if (value === '' || value === hyphenate(key)) {
  4637. // only cast empty string / same name to boolean if
  4638. // boolean has higher priority
  4639. var stringIndex = getTypeIndex(String, prop.type);
  4640. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4641. value = true;
  4642. }
  4643. }
  4644. }
  4645. // check default value
  4646. if (value === undefined) {
  4647. value = getPropDefaultValue(vm, prop, key);
  4648. // since the default value is a fresh copy,
  4649. // make sure to observe it.
  4650. var prevShouldObserve = shouldObserve;
  4651. toggleObserving(true);
  4652. observe(value);
  4653. toggleObserving(prevShouldObserve);
  4654. }
  4655. if (
  4656. true
  4657. ) {
  4658. assertProp(prop, key, value, vm, absent);
  4659. }
  4660. return value
  4661. }
  4662. /**
  4663. * Get the default value of a prop.
  4664. */
  4665. function getPropDefaultValue (vm, prop, key) {
  4666. // no default, return undefined
  4667. if (!hasOwn(prop, 'default')) {
  4668. return undefined
  4669. }
  4670. var def = prop.default;
  4671. // warn against non-factory defaults for Object & Array
  4672. if ( true && isObject(def)) {
  4673. warn(
  4674. 'Invalid default value for prop "' + key + '": ' +
  4675. 'Props with type Object/Array must use a factory function ' +
  4676. 'to return the default value.',
  4677. vm
  4678. );
  4679. }
  4680. // the raw prop value was also undefined from previous render,
  4681. // return previous default value to avoid unnecessary watcher trigger
  4682. if (vm && vm.$options.propsData &&
  4683. vm.$options.propsData[key] === undefined &&
  4684. vm._props[key] !== undefined
  4685. ) {
  4686. return vm._props[key]
  4687. }
  4688. // call factory function for non-Function types
  4689. // a value is Function if its prototype is function even across different execution context
  4690. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4691. ? def.call(vm)
  4692. : def
  4693. }
  4694. /**
  4695. * Assert whether a prop is valid.
  4696. */
  4697. function assertProp (
  4698. prop,
  4699. name,
  4700. value,
  4701. vm,
  4702. absent
  4703. ) {
  4704. if (prop.required && absent) {
  4705. warn(
  4706. 'Missing required prop: "' + name + '"',
  4707. vm
  4708. );
  4709. return
  4710. }
  4711. if (value == null && !prop.required) {
  4712. return
  4713. }
  4714. var type = prop.type;
  4715. var valid = !type || type === true;
  4716. var expectedTypes = [];
  4717. if (type) {
  4718. if (!Array.isArray(type)) {
  4719. type = [type];
  4720. }
  4721. for (var i = 0; i < type.length && !valid; i++) {
  4722. var assertedType = assertType(value, type[i]);
  4723. expectedTypes.push(assertedType.expectedType || '');
  4724. valid = assertedType.valid;
  4725. }
  4726. }
  4727. if (!valid) {
  4728. warn(
  4729. getInvalidTypeMessage(name, value, expectedTypes),
  4730. vm
  4731. );
  4732. return
  4733. }
  4734. var validator = prop.validator;
  4735. if (validator) {
  4736. if (!validator(value)) {
  4737. warn(
  4738. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4739. vm
  4740. );
  4741. }
  4742. }
  4743. }
  4744. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4745. function assertType (value, type) {
  4746. var valid;
  4747. var expectedType = getType(type);
  4748. if (simpleCheckRE.test(expectedType)) {
  4749. var t = typeof value;
  4750. valid = t === expectedType.toLowerCase();
  4751. // for primitive wrapper objects
  4752. if (!valid && t === 'object') {
  4753. valid = value instanceof type;
  4754. }
  4755. } else if (expectedType === 'Object') {
  4756. valid = isPlainObject(value);
  4757. } else if (expectedType === 'Array') {
  4758. valid = Array.isArray(value);
  4759. } else {
  4760. valid = value instanceof type;
  4761. }
  4762. return {
  4763. valid: valid,
  4764. expectedType: expectedType
  4765. }
  4766. }
  4767. /**
  4768. * Use function string name to check built-in types,
  4769. * because a simple equality check will fail when running
  4770. * across different vms / iframes.
  4771. */
  4772. function getType (fn) {
  4773. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4774. return match ? match[1] : ''
  4775. }
  4776. function isSameType (a, b) {
  4777. return getType(a) === getType(b)
  4778. }
  4779. function getTypeIndex (type, expectedTypes) {
  4780. if (!Array.isArray(expectedTypes)) {
  4781. return isSameType(expectedTypes, type) ? 0 : -1
  4782. }
  4783. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4784. if (isSameType(expectedTypes[i], type)) {
  4785. return i
  4786. }
  4787. }
  4788. return -1
  4789. }
  4790. function getInvalidTypeMessage (name, value, expectedTypes) {
  4791. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4792. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4793. var expectedType = expectedTypes[0];
  4794. var receivedType = toRawType(value);
  4795. var expectedValue = styleValue(value, expectedType);
  4796. var receivedValue = styleValue(value, receivedType);
  4797. // check if we need to specify expected value
  4798. if (expectedTypes.length === 1 &&
  4799. isExplicable(expectedType) &&
  4800. !isBoolean(expectedType, receivedType)) {
  4801. message += " with value " + expectedValue;
  4802. }
  4803. message += ", got " + receivedType + " ";
  4804. // check if we need to specify received value
  4805. if (isExplicable(receivedType)) {
  4806. message += "with value " + receivedValue + ".";
  4807. }
  4808. return message
  4809. }
  4810. function styleValue (value, type) {
  4811. if (type === 'String') {
  4812. return ("\"" + value + "\"")
  4813. } else if (type === 'Number') {
  4814. return ("" + (Number(value)))
  4815. } else {
  4816. return ("" + value)
  4817. }
  4818. }
  4819. function isExplicable (value) {
  4820. var explicitTypes = ['string', 'number', 'boolean'];
  4821. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4822. }
  4823. function isBoolean () {
  4824. var args = [], len = arguments.length;
  4825. while ( len-- ) args[ len ] = arguments[ len ];
  4826. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4827. }
  4828. /* */
  4829. function handleError (err, vm, info) {
  4830. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4831. // See: https://github.com/vuejs/vuex/issues/1505
  4832. pushTarget();
  4833. try {
  4834. if (vm) {
  4835. var cur = vm;
  4836. while ((cur = cur.$parent)) {
  4837. var hooks = cur.$options.errorCaptured;
  4838. if (hooks) {
  4839. for (var i = 0; i < hooks.length; i++) {
  4840. try {
  4841. var capture = hooks[i].call(cur, err, vm, info) === false;
  4842. if (capture) { return }
  4843. } catch (e) {
  4844. globalHandleError(e, cur, 'errorCaptured hook');
  4845. }
  4846. }
  4847. }
  4848. }
  4849. }
  4850. globalHandleError(err, vm, info);
  4851. } finally {
  4852. popTarget();
  4853. }
  4854. }
  4855. function invokeWithErrorHandling (
  4856. handler,
  4857. context,
  4858. args,
  4859. vm,
  4860. info
  4861. ) {
  4862. var res;
  4863. try {
  4864. res = args ? handler.apply(context, args) : handler.call(context);
  4865. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4866. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4867. // issue #9511
  4868. // avoid catch triggering multiple times when nested calls
  4869. res._handled = true;
  4870. }
  4871. } catch (e) {
  4872. handleError(e, vm, info);
  4873. }
  4874. return res
  4875. }
  4876. function globalHandleError (err, vm, info) {
  4877. if (config.errorHandler) {
  4878. try {
  4879. return config.errorHandler.call(null, err, vm, info)
  4880. } catch (e) {
  4881. // if the user intentionally throws the original error in the handler,
  4882. // do not log it twice
  4883. if (e !== err) {
  4884. logError(e, null, 'config.errorHandler');
  4885. }
  4886. }
  4887. }
  4888. logError(err, vm, info);
  4889. }
  4890. function logError (err, vm, info) {
  4891. if (true) {
  4892. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  4893. }
  4894. /* istanbul ignore else */
  4895. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  4896. console.error(err);
  4897. } else {
  4898. throw err
  4899. }
  4900. }
  4901. /* */
  4902. var callbacks = [];
  4903. var pending = false;
  4904. function flushCallbacks () {
  4905. pending = false;
  4906. var copies = callbacks.slice(0);
  4907. callbacks.length = 0;
  4908. for (var i = 0; i < copies.length; i++) {
  4909. copies[i]();
  4910. }
  4911. }
  4912. // Here we have async deferring wrappers using microtasks.
  4913. // In 2.5 we used (macro) tasks (in combination with microtasks).
  4914. // However, it has subtle problems when state is changed right before repaint
  4915. // (e.g. #6813, out-in transitions).
  4916. // Also, using (macro) tasks in event handler would cause some weird behaviors
  4917. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  4918. // So we now use microtasks everywhere, again.
  4919. // A major drawback of this tradeoff is that there are some scenarios
  4920. // where microtasks have too high a priority and fire in between supposedly
  4921. // sequential events (e.g. #4521, #6690, which have workarounds)
  4922. // or even between bubbling of the same event (#6566).
  4923. var timerFunc;
  4924. // The nextTick behavior leverages the microtask queue, which can be accessed
  4925. // via either native Promise.then or MutationObserver.
  4926. // MutationObserver has wider support, however it is seriously bugged in
  4927. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  4928. // completely stops working after triggering a few times... so, if native
  4929. // Promise is available, we will use it:
  4930. /* istanbul ignore next, $flow-disable-line */
  4931. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  4932. var p = Promise.resolve();
  4933. timerFunc = function () {
  4934. p.then(flushCallbacks);
  4935. // In problematic UIWebViews, Promise.then doesn't completely break, but
  4936. // it can get stuck in a weird state where callbacks are pushed into the
  4937. // microtask queue but the queue isn't being flushed, until the browser
  4938. // needs to do some other work, e.g. handle a timer. Therefore we can
  4939. // "force" the microtask queue to be flushed by adding an empty timer.
  4940. if (isIOS) { setTimeout(noop); }
  4941. };
  4942. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  4943. isNative(MutationObserver) ||
  4944. // PhantomJS and iOS 7.x
  4945. MutationObserver.toString() === '[object MutationObserverConstructor]'
  4946. )) {
  4947. // Use MutationObserver where native Promise is not available,
  4948. // e.g. PhantomJS, iOS7, Android 4.4
  4949. // (#6466 MutationObserver is unreliable in IE11)
  4950. var counter = 1;
  4951. var observer = new MutationObserver(flushCallbacks);
  4952. var textNode = document.createTextNode(String(counter));
  4953. observer.observe(textNode, {
  4954. characterData: true
  4955. });
  4956. timerFunc = function () {
  4957. counter = (counter + 1) % 2;
  4958. textNode.data = String(counter);
  4959. };
  4960. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  4961. // Fallback to setImmediate.
  4962. // Technically it leverages the (macro) task queue,
  4963. // but it is still a better choice than setTimeout.
  4964. timerFunc = function () {
  4965. setImmediate(flushCallbacks);
  4966. };
  4967. } else {
  4968. // Fallback to setTimeout.
  4969. timerFunc = function () {
  4970. setTimeout(flushCallbacks, 0);
  4971. };
  4972. }
  4973. function nextTick (cb, ctx) {
  4974. var _resolve;
  4975. callbacks.push(function () {
  4976. if (cb) {
  4977. try {
  4978. cb.call(ctx);
  4979. } catch (e) {
  4980. handleError(e, ctx, 'nextTick');
  4981. }
  4982. } else if (_resolve) {
  4983. _resolve(ctx);
  4984. }
  4985. });
  4986. if (!pending) {
  4987. pending = true;
  4988. timerFunc();
  4989. }
  4990. // $flow-disable-line
  4991. if (!cb && typeof Promise !== 'undefined') {
  4992. return new Promise(function (resolve) {
  4993. _resolve = resolve;
  4994. })
  4995. }
  4996. }
  4997. /* */
  4998. /* not type checking this file because flow doesn't play well with Proxy */
  4999. var initProxy;
  5000. if (true) {
  5001. var allowedGlobals = makeMap(
  5002. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5003. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5004. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5005. 'require' // for Webpack/Browserify
  5006. );
  5007. var warnNonPresent = function (target, key) {
  5008. warn(
  5009. "Property or method \"" + key + "\" is not defined on the instance but " +
  5010. 'referenced during render. Make sure that this property is reactive, ' +
  5011. 'either in the data option, or for class-based components, by ' +
  5012. 'initializing the property. ' +
  5013. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5014. target
  5015. );
  5016. };
  5017. var warnReservedPrefix = function (target, key) {
  5018. warn(
  5019. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5020. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5021. 'prevent conflicts with Vue internals. ' +
  5022. 'See: https://vuejs.org/v2/api/#data',
  5023. target
  5024. );
  5025. };
  5026. var hasProxy =
  5027. typeof Proxy !== 'undefined' && isNative(Proxy);
  5028. if (hasProxy) {
  5029. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5030. config.keyCodes = new Proxy(config.keyCodes, {
  5031. set: function set (target, key, value) {
  5032. if (isBuiltInModifier(key)) {
  5033. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5034. return false
  5035. } else {
  5036. target[key] = value;
  5037. return true
  5038. }
  5039. }
  5040. });
  5041. }
  5042. var hasHandler = {
  5043. has: function has (target, key) {
  5044. var has = key in target;
  5045. var isAllowed = allowedGlobals(key) ||
  5046. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5047. if (!has && !isAllowed) {
  5048. if (key in target.$data) { warnReservedPrefix(target, key); }
  5049. else { warnNonPresent(target, key); }
  5050. }
  5051. return has || !isAllowed
  5052. }
  5053. };
  5054. var getHandler = {
  5055. get: function get (target, key) {
  5056. if (typeof key === 'string' && !(key in target)) {
  5057. if (key in target.$data) { warnReservedPrefix(target, key); }
  5058. else { warnNonPresent(target, key); }
  5059. }
  5060. return target[key]
  5061. }
  5062. };
  5063. initProxy = function initProxy (vm) {
  5064. if (hasProxy) {
  5065. // determine which proxy handler to use
  5066. var options = vm.$options;
  5067. var handlers = options.render && options.render._withStripped
  5068. ? getHandler
  5069. : hasHandler;
  5070. vm._renderProxy = new Proxy(vm, handlers);
  5071. } else {
  5072. vm._renderProxy = vm;
  5073. }
  5074. };
  5075. }
  5076. /* */
  5077. var seenObjects = new _Set();
  5078. /**
  5079. * Recursively traverse an object to evoke all converted
  5080. * getters, so that every nested property inside the object
  5081. * is collected as a "deep" dependency.
  5082. */
  5083. function traverse (val) {
  5084. _traverse(val, seenObjects);
  5085. seenObjects.clear();
  5086. }
  5087. function _traverse (val, seen) {
  5088. var i, keys;
  5089. var isA = Array.isArray(val);
  5090. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5091. return
  5092. }
  5093. if (val.__ob__) {
  5094. var depId = val.__ob__.dep.id;
  5095. if (seen.has(depId)) {
  5096. return
  5097. }
  5098. seen.add(depId);
  5099. }
  5100. if (isA) {
  5101. i = val.length;
  5102. while (i--) { _traverse(val[i], seen); }
  5103. } else {
  5104. keys = Object.keys(val);
  5105. i = keys.length;
  5106. while (i--) { _traverse(val[keys[i]], seen); }
  5107. }
  5108. }
  5109. var mark;
  5110. var measure;
  5111. if (true) {
  5112. var perf = inBrowser && window.performance;
  5113. /* istanbul ignore if */
  5114. if (
  5115. perf &&
  5116. perf.mark &&
  5117. perf.measure &&
  5118. perf.clearMarks &&
  5119. perf.clearMeasures
  5120. ) {
  5121. mark = function (tag) { return perf.mark(tag); };
  5122. measure = function (name, startTag, endTag) {
  5123. perf.measure(name, startTag, endTag);
  5124. perf.clearMarks(startTag);
  5125. perf.clearMarks(endTag);
  5126. // perf.clearMeasures(name)
  5127. };
  5128. }
  5129. }
  5130. /* */
  5131. var normalizeEvent = cached(function (name) {
  5132. var passive = name.charAt(0) === '&';
  5133. name = passive ? name.slice(1) : name;
  5134. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5135. name = once$$1 ? name.slice(1) : name;
  5136. var capture = name.charAt(0) === '!';
  5137. name = capture ? name.slice(1) : name;
  5138. return {
  5139. name: name,
  5140. once: once$$1,
  5141. capture: capture,
  5142. passive: passive
  5143. }
  5144. });
  5145. function createFnInvoker (fns, vm) {
  5146. function invoker () {
  5147. var arguments$1 = arguments;
  5148. var fns = invoker.fns;
  5149. if (Array.isArray(fns)) {
  5150. var cloned = fns.slice();
  5151. for (var i = 0; i < cloned.length; i++) {
  5152. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5153. }
  5154. } else {
  5155. // return handler return value for single handlers
  5156. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5157. }
  5158. }
  5159. invoker.fns = fns;
  5160. return invoker
  5161. }
  5162. function updateListeners (
  5163. on,
  5164. oldOn,
  5165. add,
  5166. remove$$1,
  5167. createOnceHandler,
  5168. vm
  5169. ) {
  5170. var name, def$$1, cur, old, event;
  5171. for (name in on) {
  5172. def$$1 = cur = on[name];
  5173. old = oldOn[name];
  5174. event = normalizeEvent(name);
  5175. if (isUndef(cur)) {
  5176. true && warn(
  5177. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5178. vm
  5179. );
  5180. } else if (isUndef(old)) {
  5181. if (isUndef(cur.fns)) {
  5182. cur = on[name] = createFnInvoker(cur, vm);
  5183. }
  5184. if (isTrue(event.once)) {
  5185. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5186. }
  5187. add(event.name, cur, event.capture, event.passive, event.params);
  5188. } else if (cur !== old) {
  5189. old.fns = cur;
  5190. on[name] = old;
  5191. }
  5192. }
  5193. for (name in oldOn) {
  5194. if (isUndef(on[name])) {
  5195. event = normalizeEvent(name);
  5196. remove$$1(event.name, oldOn[name], event.capture);
  5197. }
  5198. }
  5199. }
  5200. /* */
  5201. /* */
  5202. // fixed by xxxxxx (mp properties)
  5203. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5204. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5205. if (isUndef(propOptions)) {
  5206. return res
  5207. }
  5208. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5209. var attrs = data.attrs;
  5210. var props = data.props;
  5211. if (isDef(attrs) || isDef(props)) {
  5212. for (var key in propOptions) {
  5213. var altKey = hyphenate(key);
  5214. var result = checkProp(res, props, key, altKey, true) ||
  5215. checkProp(res, attrs, key, altKey, false);
  5216. // externalClass
  5217. if (
  5218. result &&
  5219. res[key] &&
  5220. externalClasses.indexOf(altKey) !== -1 &&
  5221. context[camelize(res[key])]
  5222. ) {
  5223. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5224. res[key] = context[camelize(res[key])];
  5225. }
  5226. }
  5227. }
  5228. return res
  5229. }
  5230. function extractPropsFromVNodeData (
  5231. data,
  5232. Ctor,
  5233. tag,
  5234. context// fixed by xxxxxx
  5235. ) {
  5236. // we are only extracting raw values here.
  5237. // validation and default values are handled in the child
  5238. // component itself.
  5239. var propOptions = Ctor.options.props;
  5240. if (isUndef(propOptions)) {
  5241. // fixed by xxxxxx
  5242. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5243. }
  5244. var res = {};
  5245. var attrs = data.attrs;
  5246. var props = data.props;
  5247. if (isDef(attrs) || isDef(props)) {
  5248. for (var key in propOptions) {
  5249. var altKey = hyphenate(key);
  5250. if (true) {
  5251. var keyInLowerCase = key.toLowerCase();
  5252. if (
  5253. key !== keyInLowerCase &&
  5254. attrs && hasOwn(attrs, keyInLowerCase)
  5255. ) {
  5256. tip(
  5257. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5258. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5259. " \"" + key + "\". " +
  5260. "Note that HTML attributes are case-insensitive and camelCased " +
  5261. "props need to use their kebab-case equivalents when using in-DOM " +
  5262. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5263. );
  5264. }
  5265. }
  5266. checkProp(res, props, key, altKey, true) ||
  5267. checkProp(res, attrs, key, altKey, false);
  5268. }
  5269. }
  5270. // fixed by xxxxxx
  5271. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5272. }
  5273. function checkProp (
  5274. res,
  5275. hash,
  5276. key,
  5277. altKey,
  5278. preserve
  5279. ) {
  5280. if (isDef(hash)) {
  5281. if (hasOwn(hash, key)) {
  5282. res[key] = hash[key];
  5283. if (!preserve) {
  5284. delete hash[key];
  5285. }
  5286. return true
  5287. } else if (hasOwn(hash, altKey)) {
  5288. res[key] = hash[altKey];
  5289. if (!preserve) {
  5290. delete hash[altKey];
  5291. }
  5292. return true
  5293. }
  5294. }
  5295. return false
  5296. }
  5297. /* */
  5298. // The template compiler attempts to minimize the need for normalization by
  5299. // statically analyzing the template at compile time.
  5300. //
  5301. // For plain HTML markup, normalization can be completely skipped because the
  5302. // generated render function is guaranteed to return Array<VNode>. There are
  5303. // two cases where extra normalization is needed:
  5304. // 1. When the children contains components - because a functional component
  5305. // may return an Array instead of a single root. In this case, just a simple
  5306. // normalization is needed - if any child is an Array, we flatten the whole
  5307. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5308. // because functional components already normalize their own children.
  5309. function simpleNormalizeChildren (children) {
  5310. for (var i = 0; i < children.length; i++) {
  5311. if (Array.isArray(children[i])) {
  5312. return Array.prototype.concat.apply([], children)
  5313. }
  5314. }
  5315. return children
  5316. }
  5317. // 2. When the children contains constructs that always generated nested Arrays,
  5318. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5319. // with hand-written render functions / JSX. In such cases a full normalization
  5320. // is needed to cater to all possible types of children values.
  5321. function normalizeChildren (children) {
  5322. return isPrimitive(children)
  5323. ? [createTextVNode(children)]
  5324. : Array.isArray(children)
  5325. ? normalizeArrayChildren(children)
  5326. : undefined
  5327. }
  5328. function isTextNode (node) {
  5329. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5330. }
  5331. function normalizeArrayChildren (children, nestedIndex) {
  5332. var res = [];
  5333. var i, c, lastIndex, last;
  5334. for (i = 0; i < children.length; i++) {
  5335. c = children[i];
  5336. if (isUndef(c) || typeof c === 'boolean') { continue }
  5337. lastIndex = res.length - 1;
  5338. last = res[lastIndex];
  5339. // nested
  5340. if (Array.isArray(c)) {
  5341. if (c.length > 0) {
  5342. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5343. // merge adjacent text nodes
  5344. if (isTextNode(c[0]) && isTextNode(last)) {
  5345. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5346. c.shift();
  5347. }
  5348. res.push.apply(res, c);
  5349. }
  5350. } else if (isPrimitive(c)) {
  5351. if (isTextNode(last)) {
  5352. // merge adjacent text nodes
  5353. // this is necessary for SSR hydration because text nodes are
  5354. // essentially merged when rendered to HTML strings
  5355. res[lastIndex] = createTextVNode(last.text + c);
  5356. } else if (c !== '') {
  5357. // convert primitive to vnode
  5358. res.push(createTextVNode(c));
  5359. }
  5360. } else {
  5361. if (isTextNode(c) && isTextNode(last)) {
  5362. // merge adjacent text nodes
  5363. res[lastIndex] = createTextVNode(last.text + c.text);
  5364. } else {
  5365. // default key for nested array children (likely generated by v-for)
  5366. if (isTrue(children._isVList) &&
  5367. isDef(c.tag) &&
  5368. isUndef(c.key) &&
  5369. isDef(nestedIndex)) {
  5370. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5371. }
  5372. res.push(c);
  5373. }
  5374. }
  5375. }
  5376. return res
  5377. }
  5378. /* */
  5379. function initProvide (vm) {
  5380. var provide = vm.$options.provide;
  5381. if (provide) {
  5382. vm._provided = typeof provide === 'function'
  5383. ? provide.call(vm)
  5384. : provide;
  5385. }
  5386. }
  5387. function initInjections (vm) {
  5388. var result = resolveInject(vm.$options.inject, vm);
  5389. if (result) {
  5390. toggleObserving(false);
  5391. Object.keys(result).forEach(function (key) {
  5392. /* istanbul ignore else */
  5393. if (true) {
  5394. defineReactive$$1(vm, key, result[key], function () {
  5395. warn(
  5396. "Avoid mutating an injected value directly since the changes will be " +
  5397. "overwritten whenever the provided component re-renders. " +
  5398. "injection being mutated: \"" + key + "\"",
  5399. vm
  5400. );
  5401. });
  5402. } else {}
  5403. });
  5404. toggleObserving(true);
  5405. }
  5406. }
  5407. function resolveInject (inject, vm) {
  5408. if (inject) {
  5409. // inject is :any because flow is not smart enough to figure out cached
  5410. var result = Object.create(null);
  5411. var keys = hasSymbol
  5412. ? Reflect.ownKeys(inject)
  5413. : Object.keys(inject);
  5414. for (var i = 0; i < keys.length; i++) {
  5415. var key = keys[i];
  5416. // #6574 in case the inject object is observed...
  5417. if (key === '__ob__') { continue }
  5418. var provideKey = inject[key].from;
  5419. var source = vm;
  5420. while (source) {
  5421. if (source._provided && hasOwn(source._provided, provideKey)) {
  5422. result[key] = source._provided[provideKey];
  5423. break
  5424. }
  5425. source = source.$parent;
  5426. }
  5427. if (!source) {
  5428. if ('default' in inject[key]) {
  5429. var provideDefault = inject[key].default;
  5430. result[key] = typeof provideDefault === 'function'
  5431. ? provideDefault.call(vm)
  5432. : provideDefault;
  5433. } else if (true) {
  5434. warn(("Injection \"" + key + "\" not found"), vm);
  5435. }
  5436. }
  5437. }
  5438. return result
  5439. }
  5440. }
  5441. /* */
  5442. /**
  5443. * Runtime helper for resolving raw children VNodes into a slot object.
  5444. */
  5445. function resolveSlots (
  5446. children,
  5447. context
  5448. ) {
  5449. if (!children || !children.length) {
  5450. return {}
  5451. }
  5452. var slots = {};
  5453. for (var i = 0, l = children.length; i < l; i++) {
  5454. var child = children[i];
  5455. var data = child.data;
  5456. // remove slot attribute if the node is resolved as a Vue slot node
  5457. if (data && data.attrs && data.attrs.slot) {
  5458. delete data.attrs.slot;
  5459. }
  5460. // named slots should only be respected if the vnode was rendered in the
  5461. // same context.
  5462. if ((child.context === context || child.fnContext === context) &&
  5463. data && data.slot != null
  5464. ) {
  5465. var name = data.slot;
  5466. var slot = (slots[name] || (slots[name] = []));
  5467. if (child.tag === 'template') {
  5468. slot.push.apply(slot, child.children || []);
  5469. } else {
  5470. slot.push(child);
  5471. }
  5472. } else {
  5473. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5474. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5475. (slots['page'] || (slots['page'] = [])).push(child);
  5476. }else{
  5477. (slots.default || (slots.default = [])).push(child);
  5478. }
  5479. }
  5480. }
  5481. // ignore slots that contains only whitespace
  5482. for (var name$1 in slots) {
  5483. if (slots[name$1].every(isWhitespace)) {
  5484. delete slots[name$1];
  5485. }
  5486. }
  5487. return slots
  5488. }
  5489. function isWhitespace (node) {
  5490. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5491. }
  5492. /* */
  5493. function normalizeScopedSlots (
  5494. slots,
  5495. normalSlots,
  5496. prevSlots
  5497. ) {
  5498. var res;
  5499. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5500. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5501. var key = slots && slots.$key;
  5502. if (!slots) {
  5503. res = {};
  5504. } else if (slots._normalized) {
  5505. // fast path 1: child component re-render only, parent did not change
  5506. return slots._normalized
  5507. } else if (
  5508. isStable &&
  5509. prevSlots &&
  5510. prevSlots !== emptyObject &&
  5511. key === prevSlots.$key &&
  5512. !hasNormalSlots &&
  5513. !prevSlots.$hasNormal
  5514. ) {
  5515. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5516. // only need to normalize once
  5517. return prevSlots
  5518. } else {
  5519. res = {};
  5520. for (var key$1 in slots) {
  5521. if (slots[key$1] && key$1[0] !== '$') {
  5522. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5523. }
  5524. }
  5525. }
  5526. // expose normal slots on scopedSlots
  5527. for (var key$2 in normalSlots) {
  5528. if (!(key$2 in res)) {
  5529. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5530. }
  5531. }
  5532. // avoriaz seems to mock a non-extensible $scopedSlots object
  5533. // and when that is passed down this would cause an error
  5534. if (slots && Object.isExtensible(slots)) {
  5535. (slots)._normalized = res;
  5536. }
  5537. def(res, '$stable', isStable);
  5538. def(res, '$key', key);
  5539. def(res, '$hasNormal', hasNormalSlots);
  5540. return res
  5541. }
  5542. function normalizeScopedSlot(normalSlots, key, fn) {
  5543. var normalized = function () {
  5544. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5545. res = res && typeof res === 'object' && !Array.isArray(res)
  5546. ? [res] // single vnode
  5547. : normalizeChildren(res);
  5548. return res && (
  5549. res.length === 0 ||
  5550. (res.length === 1 && res[0].isComment) // #9658
  5551. ) ? undefined
  5552. : res
  5553. };
  5554. // this is a slot using the new v-slot syntax without scope. although it is
  5555. // compiled as a scoped slot, render fn users would expect it to be present
  5556. // on this.$slots because the usage is semantically a normal slot.
  5557. if (fn.proxy) {
  5558. Object.defineProperty(normalSlots, key, {
  5559. get: normalized,
  5560. enumerable: true,
  5561. configurable: true
  5562. });
  5563. }
  5564. return normalized
  5565. }
  5566. function proxyNormalSlot(slots, key) {
  5567. return function () { return slots[key]; }
  5568. }
  5569. /* */
  5570. /**
  5571. * Runtime helper for rendering v-for lists.
  5572. */
  5573. function renderList (
  5574. val,
  5575. render
  5576. ) {
  5577. var ret, i, l, keys, key;
  5578. if (Array.isArray(val) || typeof val === 'string') {
  5579. ret = new Array(val.length);
  5580. for (i = 0, l = val.length; i < l; i++) {
  5581. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5582. }
  5583. } else if (typeof val === 'number') {
  5584. ret = new Array(val);
  5585. for (i = 0; i < val; i++) {
  5586. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5587. }
  5588. } else if (isObject(val)) {
  5589. if (hasSymbol && val[Symbol.iterator]) {
  5590. ret = [];
  5591. var iterator = val[Symbol.iterator]();
  5592. var result = iterator.next();
  5593. while (!result.done) {
  5594. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5595. result = iterator.next();
  5596. }
  5597. } else {
  5598. keys = Object.keys(val);
  5599. ret = new Array(keys.length);
  5600. for (i = 0, l = keys.length; i < l; i++) {
  5601. key = keys[i];
  5602. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5603. }
  5604. }
  5605. }
  5606. if (!isDef(ret)) {
  5607. ret = [];
  5608. }
  5609. (ret)._isVList = true;
  5610. return ret
  5611. }
  5612. /* */
  5613. /**
  5614. * Runtime helper for rendering <slot>
  5615. */
  5616. function renderSlot (
  5617. name,
  5618. fallback,
  5619. props,
  5620. bindObject
  5621. ) {
  5622. var scopedSlotFn = this.$scopedSlots[name];
  5623. var nodes;
  5624. if (scopedSlotFn) { // scoped slot
  5625. props = props || {};
  5626. if (bindObject) {
  5627. if ( true && !isObject(bindObject)) {
  5628. warn(
  5629. 'slot v-bind without argument expects an Object',
  5630. this
  5631. );
  5632. }
  5633. props = extend(extend({}, bindObject), props);
  5634. }
  5635. // fixed by xxxxxx app-plus scopedSlot
  5636. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5637. } else {
  5638. nodes = this.$slots[name] || fallback;
  5639. }
  5640. var target = props && props.slot;
  5641. if (target) {
  5642. return this.$createElement('template', { slot: target }, nodes)
  5643. } else {
  5644. return nodes
  5645. }
  5646. }
  5647. /* */
  5648. /**
  5649. * Runtime helper for resolving filters
  5650. */
  5651. function resolveFilter (id) {
  5652. return resolveAsset(this.$options, 'filters', id, true) || identity
  5653. }
  5654. /* */
  5655. function isKeyNotMatch (expect, actual) {
  5656. if (Array.isArray(expect)) {
  5657. return expect.indexOf(actual) === -1
  5658. } else {
  5659. return expect !== actual
  5660. }
  5661. }
  5662. /**
  5663. * Runtime helper for checking keyCodes from config.
  5664. * exposed as Vue.prototype._k
  5665. * passing in eventKeyName as last argument separately for backwards compat
  5666. */
  5667. function checkKeyCodes (
  5668. eventKeyCode,
  5669. key,
  5670. builtInKeyCode,
  5671. eventKeyName,
  5672. builtInKeyName
  5673. ) {
  5674. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5675. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5676. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5677. } else if (mappedKeyCode) {
  5678. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5679. } else if (eventKeyName) {
  5680. return hyphenate(eventKeyName) !== key
  5681. }
  5682. }
  5683. /* */
  5684. /**
  5685. * Runtime helper for merging v-bind="object" into a VNode's data.
  5686. */
  5687. function bindObjectProps (
  5688. data,
  5689. tag,
  5690. value,
  5691. asProp,
  5692. isSync
  5693. ) {
  5694. if (value) {
  5695. if (!isObject(value)) {
  5696. true && warn(
  5697. 'v-bind without argument expects an Object or Array value',
  5698. this
  5699. );
  5700. } else {
  5701. if (Array.isArray(value)) {
  5702. value = toObject(value);
  5703. }
  5704. var hash;
  5705. var loop = function ( key ) {
  5706. if (
  5707. key === 'class' ||
  5708. key === 'style' ||
  5709. isReservedAttribute(key)
  5710. ) {
  5711. hash = data;
  5712. } else {
  5713. var type = data.attrs && data.attrs.type;
  5714. hash = asProp || config.mustUseProp(tag, type, key)
  5715. ? data.domProps || (data.domProps = {})
  5716. : data.attrs || (data.attrs = {});
  5717. }
  5718. var camelizedKey = camelize(key);
  5719. var hyphenatedKey = hyphenate(key);
  5720. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5721. hash[key] = value[key];
  5722. if (isSync) {
  5723. var on = data.on || (data.on = {});
  5724. on[("update:" + key)] = function ($event) {
  5725. value[key] = $event;
  5726. };
  5727. }
  5728. }
  5729. };
  5730. for (var key in value) loop( key );
  5731. }
  5732. }
  5733. return data
  5734. }
  5735. /* */
  5736. /**
  5737. * Runtime helper for rendering static trees.
  5738. */
  5739. function renderStatic (
  5740. index,
  5741. isInFor
  5742. ) {
  5743. var cached = this._staticTrees || (this._staticTrees = []);
  5744. var tree = cached[index];
  5745. // if has already-rendered static tree and not inside v-for,
  5746. // we can reuse the same tree.
  5747. if (tree && !isInFor) {
  5748. return tree
  5749. }
  5750. // otherwise, render a fresh tree.
  5751. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5752. this._renderProxy,
  5753. null,
  5754. this // for render fns generated for functional component templates
  5755. );
  5756. markStatic(tree, ("__static__" + index), false);
  5757. return tree
  5758. }
  5759. /**
  5760. * Runtime helper for v-once.
  5761. * Effectively it means marking the node as static with a unique key.
  5762. */
  5763. function markOnce (
  5764. tree,
  5765. index,
  5766. key
  5767. ) {
  5768. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5769. return tree
  5770. }
  5771. function markStatic (
  5772. tree,
  5773. key,
  5774. isOnce
  5775. ) {
  5776. if (Array.isArray(tree)) {
  5777. for (var i = 0; i < tree.length; i++) {
  5778. if (tree[i] && typeof tree[i] !== 'string') {
  5779. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5780. }
  5781. }
  5782. } else {
  5783. markStaticNode(tree, key, isOnce);
  5784. }
  5785. }
  5786. function markStaticNode (node, key, isOnce) {
  5787. node.isStatic = true;
  5788. node.key = key;
  5789. node.isOnce = isOnce;
  5790. }
  5791. /* */
  5792. function bindObjectListeners (data, value) {
  5793. if (value) {
  5794. if (!isPlainObject(value)) {
  5795. true && warn(
  5796. 'v-on without argument expects an Object value',
  5797. this
  5798. );
  5799. } else {
  5800. var on = data.on = data.on ? extend({}, data.on) : {};
  5801. for (var key in value) {
  5802. var existing = on[key];
  5803. var ours = value[key];
  5804. on[key] = existing ? [].concat(existing, ours) : ours;
  5805. }
  5806. }
  5807. }
  5808. return data
  5809. }
  5810. /* */
  5811. function resolveScopedSlots (
  5812. fns, // see flow/vnode
  5813. res,
  5814. // the following are added in 2.6
  5815. hasDynamicKeys,
  5816. contentHashKey
  5817. ) {
  5818. res = res || { $stable: !hasDynamicKeys };
  5819. for (var i = 0; i < fns.length; i++) {
  5820. var slot = fns[i];
  5821. if (Array.isArray(slot)) {
  5822. resolveScopedSlots(slot, res, hasDynamicKeys);
  5823. } else if (slot) {
  5824. // marker for reverse proxying v-slot without scope on this.$slots
  5825. if (slot.proxy) {
  5826. slot.fn.proxy = true;
  5827. }
  5828. res[slot.key] = slot.fn;
  5829. }
  5830. }
  5831. if (contentHashKey) {
  5832. (res).$key = contentHashKey;
  5833. }
  5834. return res
  5835. }
  5836. /* */
  5837. function bindDynamicKeys (baseObj, values) {
  5838. for (var i = 0; i < values.length; i += 2) {
  5839. var key = values[i];
  5840. if (typeof key === 'string' && key) {
  5841. baseObj[values[i]] = values[i + 1];
  5842. } else if ( true && key !== '' && key !== null) {
  5843. // null is a special value for explicitly removing a binding
  5844. warn(
  5845. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5846. this
  5847. );
  5848. }
  5849. }
  5850. return baseObj
  5851. }
  5852. // helper to dynamically append modifier runtime markers to event names.
  5853. // ensure only append when value is already string, otherwise it will be cast
  5854. // to string and cause the type check to miss.
  5855. function prependModifier (value, symbol) {
  5856. return typeof value === 'string' ? symbol + value : value
  5857. }
  5858. /* */
  5859. function installRenderHelpers (target) {
  5860. target._o = markOnce;
  5861. target._n = toNumber;
  5862. target._s = toString;
  5863. target._l = renderList;
  5864. target._t = renderSlot;
  5865. target._q = looseEqual;
  5866. target._i = looseIndexOf;
  5867. target._m = renderStatic;
  5868. target._f = resolveFilter;
  5869. target._k = checkKeyCodes;
  5870. target._b = bindObjectProps;
  5871. target._v = createTextVNode;
  5872. target._e = createEmptyVNode;
  5873. target._u = resolveScopedSlots;
  5874. target._g = bindObjectListeners;
  5875. target._d = bindDynamicKeys;
  5876. target._p = prependModifier;
  5877. }
  5878. /* */
  5879. function FunctionalRenderContext (
  5880. data,
  5881. props,
  5882. children,
  5883. parent,
  5884. Ctor
  5885. ) {
  5886. var this$1 = this;
  5887. var options = Ctor.options;
  5888. // ensure the createElement function in functional components
  5889. // gets a unique context - this is necessary for correct named slot check
  5890. var contextVm;
  5891. if (hasOwn(parent, '_uid')) {
  5892. contextVm = Object.create(parent);
  5893. // $flow-disable-line
  5894. contextVm._original = parent;
  5895. } else {
  5896. // the context vm passed in is a functional context as well.
  5897. // in this case we want to make sure we are able to get a hold to the
  5898. // real context instance.
  5899. contextVm = parent;
  5900. // $flow-disable-line
  5901. parent = parent._original;
  5902. }
  5903. var isCompiled = isTrue(options._compiled);
  5904. var needNormalization = !isCompiled;
  5905. this.data = data;
  5906. this.props = props;
  5907. this.children = children;
  5908. this.parent = parent;
  5909. this.listeners = data.on || emptyObject;
  5910. this.injections = resolveInject(options.inject, parent);
  5911. this.slots = function () {
  5912. if (!this$1.$slots) {
  5913. normalizeScopedSlots(
  5914. data.scopedSlots,
  5915. this$1.$slots = resolveSlots(children, parent)
  5916. );
  5917. }
  5918. return this$1.$slots
  5919. };
  5920. Object.defineProperty(this, 'scopedSlots', ({
  5921. enumerable: true,
  5922. get: function get () {
  5923. return normalizeScopedSlots(data.scopedSlots, this.slots())
  5924. }
  5925. }));
  5926. // support for compiled functional template
  5927. if (isCompiled) {
  5928. // exposing $options for renderStatic()
  5929. this.$options = options;
  5930. // pre-resolve slots for renderSlot()
  5931. this.$slots = this.slots();
  5932. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  5933. }
  5934. if (options._scopeId) {
  5935. this._c = function (a, b, c, d) {
  5936. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  5937. if (vnode && !Array.isArray(vnode)) {
  5938. vnode.fnScopeId = options._scopeId;
  5939. vnode.fnContext = parent;
  5940. }
  5941. return vnode
  5942. };
  5943. } else {
  5944. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  5945. }
  5946. }
  5947. installRenderHelpers(FunctionalRenderContext.prototype);
  5948. function createFunctionalComponent (
  5949. Ctor,
  5950. propsData,
  5951. data,
  5952. contextVm,
  5953. children
  5954. ) {
  5955. var options = Ctor.options;
  5956. var props = {};
  5957. var propOptions = options.props;
  5958. if (isDef(propOptions)) {
  5959. for (var key in propOptions) {
  5960. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  5961. }
  5962. } else {
  5963. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  5964. if (isDef(data.props)) { mergeProps(props, data.props); }
  5965. }
  5966. var renderContext = new FunctionalRenderContext(
  5967. data,
  5968. props,
  5969. children,
  5970. contextVm,
  5971. Ctor
  5972. );
  5973. var vnode = options.render.call(null, renderContext._c, renderContext);
  5974. if (vnode instanceof VNode) {
  5975. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  5976. } else if (Array.isArray(vnode)) {
  5977. var vnodes = normalizeChildren(vnode) || [];
  5978. var res = new Array(vnodes.length);
  5979. for (var i = 0; i < vnodes.length; i++) {
  5980. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  5981. }
  5982. return res
  5983. }
  5984. }
  5985. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  5986. // #7817 clone node before setting fnContext, otherwise if the node is reused
  5987. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  5988. // that should not be matched to match.
  5989. var clone = cloneVNode(vnode);
  5990. clone.fnContext = contextVm;
  5991. clone.fnOptions = options;
  5992. if (true) {
  5993. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  5994. }
  5995. if (data.slot) {
  5996. (clone.data || (clone.data = {})).slot = data.slot;
  5997. }
  5998. return clone
  5999. }
  6000. function mergeProps (to, from) {
  6001. for (var key in from) {
  6002. to[camelize(key)] = from[key];
  6003. }
  6004. }
  6005. /* */
  6006. /* */
  6007. /* */
  6008. /* */
  6009. // inline hooks to be invoked on component VNodes during patch
  6010. var componentVNodeHooks = {
  6011. init: function init (vnode, hydrating) {
  6012. if (
  6013. vnode.componentInstance &&
  6014. !vnode.componentInstance._isDestroyed &&
  6015. vnode.data.keepAlive
  6016. ) {
  6017. // kept-alive components, treat as a patch
  6018. var mountedNode = vnode; // work around flow
  6019. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6020. } else {
  6021. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6022. vnode,
  6023. activeInstance
  6024. );
  6025. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6026. }
  6027. },
  6028. prepatch: function prepatch (oldVnode, vnode) {
  6029. var options = vnode.componentOptions;
  6030. var child = vnode.componentInstance = oldVnode.componentInstance;
  6031. updateChildComponent(
  6032. child,
  6033. options.propsData, // updated props
  6034. options.listeners, // updated listeners
  6035. vnode, // new parent vnode
  6036. options.children // new children
  6037. );
  6038. },
  6039. insert: function insert (vnode) {
  6040. var context = vnode.context;
  6041. var componentInstance = vnode.componentInstance;
  6042. if (!componentInstance._isMounted) {
  6043. callHook(componentInstance, 'onServiceCreated');
  6044. callHook(componentInstance, 'onServiceAttached');
  6045. componentInstance._isMounted = true;
  6046. callHook(componentInstance, 'mounted');
  6047. }
  6048. if (vnode.data.keepAlive) {
  6049. if (context._isMounted) {
  6050. // vue-router#1212
  6051. // During updates, a kept-alive component's child components may
  6052. // change, so directly walking the tree here may call activated hooks
  6053. // on incorrect children. Instead we push them into a queue which will
  6054. // be processed after the whole patch process ended.
  6055. queueActivatedComponent(componentInstance);
  6056. } else {
  6057. activateChildComponent(componentInstance, true /* direct */);
  6058. }
  6059. }
  6060. },
  6061. destroy: function destroy (vnode) {
  6062. var componentInstance = vnode.componentInstance;
  6063. if (!componentInstance._isDestroyed) {
  6064. if (!vnode.data.keepAlive) {
  6065. componentInstance.$destroy();
  6066. } else {
  6067. deactivateChildComponent(componentInstance, true /* direct */);
  6068. }
  6069. }
  6070. }
  6071. };
  6072. var hooksToMerge = Object.keys(componentVNodeHooks);
  6073. function createComponent (
  6074. Ctor,
  6075. data,
  6076. context,
  6077. children,
  6078. tag
  6079. ) {
  6080. if (isUndef(Ctor)) {
  6081. return
  6082. }
  6083. var baseCtor = context.$options._base;
  6084. // plain options object: turn it into a constructor
  6085. if (isObject(Ctor)) {
  6086. Ctor = baseCtor.extend(Ctor);
  6087. }
  6088. // if at this stage it's not a constructor or an async component factory,
  6089. // reject.
  6090. if (typeof Ctor !== 'function') {
  6091. if (true) {
  6092. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6093. }
  6094. return
  6095. }
  6096. // async component
  6097. var asyncFactory;
  6098. if (isUndef(Ctor.cid)) {
  6099. asyncFactory = Ctor;
  6100. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6101. if (Ctor === undefined) {
  6102. // return a placeholder node for async component, which is rendered
  6103. // as a comment node but preserves all the raw information for the node.
  6104. // the information will be used for async server-rendering and hydration.
  6105. return createAsyncPlaceholder(
  6106. asyncFactory,
  6107. data,
  6108. context,
  6109. children,
  6110. tag
  6111. )
  6112. }
  6113. }
  6114. data = data || {};
  6115. // resolve constructor options in case global mixins are applied after
  6116. // component constructor creation
  6117. resolveConstructorOptions(Ctor);
  6118. // transform component v-model data into props & events
  6119. if (isDef(data.model)) {
  6120. transformModel(Ctor.options, data);
  6121. }
  6122. // extract props
  6123. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6124. // functional component
  6125. if (isTrue(Ctor.options.functional)) {
  6126. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6127. }
  6128. // extract listeners, since these needs to be treated as
  6129. // child component listeners instead of DOM listeners
  6130. var listeners = data.on;
  6131. // replace with listeners with .native modifier
  6132. // so it gets processed during parent component patch.
  6133. data.on = data.nativeOn;
  6134. if (isTrue(Ctor.options.abstract)) {
  6135. // abstract components do not keep anything
  6136. // other than props & listeners & slot
  6137. // work around flow
  6138. var slot = data.slot;
  6139. data = {};
  6140. if (slot) {
  6141. data.slot = slot;
  6142. }
  6143. }
  6144. // install component management hooks onto the placeholder node
  6145. installComponentHooks(data);
  6146. // return a placeholder vnode
  6147. var name = Ctor.options.name || tag;
  6148. var vnode = new VNode(
  6149. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6150. data, undefined, undefined, undefined, context,
  6151. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6152. asyncFactory
  6153. );
  6154. return vnode
  6155. }
  6156. function createComponentInstanceForVnode (
  6157. vnode, // we know it's MountedComponentVNode but flow doesn't
  6158. parent // activeInstance in lifecycle state
  6159. ) {
  6160. var options = {
  6161. _isComponent: true,
  6162. _parentVnode: vnode,
  6163. parent: parent
  6164. };
  6165. // check inline-template render functions
  6166. var inlineTemplate = vnode.data.inlineTemplate;
  6167. if (isDef(inlineTemplate)) {
  6168. options.render = inlineTemplate.render;
  6169. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6170. }
  6171. return new vnode.componentOptions.Ctor(options)
  6172. }
  6173. function installComponentHooks (data) {
  6174. var hooks = data.hook || (data.hook = {});
  6175. for (var i = 0; i < hooksToMerge.length; i++) {
  6176. var key = hooksToMerge[i];
  6177. var existing = hooks[key];
  6178. var toMerge = componentVNodeHooks[key];
  6179. if (existing !== toMerge && !(existing && existing._merged)) {
  6180. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6181. }
  6182. }
  6183. }
  6184. function mergeHook$1 (f1, f2) {
  6185. var merged = function (a, b) {
  6186. // flow complains about extra args which is why we use any
  6187. f1(a, b);
  6188. f2(a, b);
  6189. };
  6190. merged._merged = true;
  6191. return merged
  6192. }
  6193. // transform component v-model info (value and callback) into
  6194. // prop and event handler respectively.
  6195. function transformModel (options, data) {
  6196. var prop = (options.model && options.model.prop) || 'value';
  6197. var event = (options.model && options.model.event) || 'input'
  6198. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6199. var on = data.on || (data.on = {});
  6200. var existing = on[event];
  6201. var callback = data.model.callback;
  6202. if (isDef(existing)) {
  6203. if (
  6204. Array.isArray(existing)
  6205. ? existing.indexOf(callback) === -1
  6206. : existing !== callback
  6207. ) {
  6208. on[event] = [callback].concat(existing);
  6209. }
  6210. } else {
  6211. on[event] = callback;
  6212. }
  6213. }
  6214. /* */
  6215. var SIMPLE_NORMALIZE = 1;
  6216. var ALWAYS_NORMALIZE = 2;
  6217. // wrapper function for providing a more flexible interface
  6218. // without getting yelled at by flow
  6219. function createElement (
  6220. context,
  6221. tag,
  6222. data,
  6223. children,
  6224. normalizationType,
  6225. alwaysNormalize
  6226. ) {
  6227. if (Array.isArray(data) || isPrimitive(data)) {
  6228. normalizationType = children;
  6229. children = data;
  6230. data = undefined;
  6231. }
  6232. if (isTrue(alwaysNormalize)) {
  6233. normalizationType = ALWAYS_NORMALIZE;
  6234. }
  6235. return _createElement(context, tag, data, children, normalizationType)
  6236. }
  6237. function _createElement (
  6238. context,
  6239. tag,
  6240. data,
  6241. children,
  6242. normalizationType
  6243. ) {
  6244. if (isDef(data) && isDef((data).__ob__)) {
  6245. true && warn(
  6246. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6247. 'Always create fresh vnode data objects in each render!',
  6248. context
  6249. );
  6250. return createEmptyVNode()
  6251. }
  6252. // object syntax in v-bind
  6253. if (isDef(data) && isDef(data.is)) {
  6254. tag = data.is;
  6255. }
  6256. if (!tag) {
  6257. // in case of component :is set to falsy value
  6258. return createEmptyVNode()
  6259. }
  6260. // warn against non-primitive key
  6261. if ( true &&
  6262. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6263. ) {
  6264. {
  6265. warn(
  6266. 'Avoid using non-primitive value as key, ' +
  6267. 'use string/number value instead.',
  6268. context
  6269. );
  6270. }
  6271. }
  6272. // support single function children as default scoped slot
  6273. if (Array.isArray(children) &&
  6274. typeof children[0] === 'function'
  6275. ) {
  6276. data = data || {};
  6277. data.scopedSlots = { default: children[0] };
  6278. children.length = 0;
  6279. }
  6280. if (normalizationType === ALWAYS_NORMALIZE) {
  6281. children = normalizeChildren(children);
  6282. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6283. children = simpleNormalizeChildren(children);
  6284. }
  6285. var vnode, ns;
  6286. if (typeof tag === 'string') {
  6287. var Ctor;
  6288. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6289. if (config.isReservedTag(tag)) {
  6290. // platform built-in elements
  6291. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6292. warn(
  6293. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6294. context
  6295. );
  6296. }
  6297. vnode = new VNode(
  6298. config.parsePlatformTagName(tag), data, children,
  6299. undefined, undefined, context
  6300. );
  6301. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6302. // component
  6303. vnode = createComponent(Ctor, data, context, children, tag);
  6304. } else {
  6305. // unknown or unlisted namespaced elements
  6306. // check at runtime because it may get assigned a namespace when its
  6307. // parent normalizes children
  6308. vnode = new VNode(
  6309. tag, data, children,
  6310. undefined, undefined, context
  6311. );
  6312. }
  6313. } else {
  6314. // direct component options / constructor
  6315. vnode = createComponent(tag, data, context, children);
  6316. }
  6317. if (Array.isArray(vnode)) {
  6318. return vnode
  6319. } else if (isDef(vnode)) {
  6320. if (isDef(ns)) { applyNS(vnode, ns); }
  6321. if (isDef(data)) { registerDeepBindings(data); }
  6322. return vnode
  6323. } else {
  6324. return createEmptyVNode()
  6325. }
  6326. }
  6327. function applyNS (vnode, ns, force) {
  6328. vnode.ns = ns;
  6329. if (vnode.tag === 'foreignObject') {
  6330. // use default namespace inside foreignObject
  6331. ns = undefined;
  6332. force = true;
  6333. }
  6334. if (isDef(vnode.children)) {
  6335. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6336. var child = vnode.children[i];
  6337. if (isDef(child.tag) && (
  6338. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6339. applyNS(child, ns, force);
  6340. }
  6341. }
  6342. }
  6343. }
  6344. // ref #5318
  6345. // necessary to ensure parent re-render when deep bindings like :style and
  6346. // :class are used on slot nodes
  6347. function registerDeepBindings (data) {
  6348. if (isObject(data.style)) {
  6349. traverse(data.style);
  6350. }
  6351. if (isObject(data.class)) {
  6352. traverse(data.class);
  6353. }
  6354. }
  6355. /* */
  6356. function initRender (vm) {
  6357. vm._vnode = null; // the root of the child tree
  6358. vm._staticTrees = null; // v-once cached trees
  6359. var options = vm.$options;
  6360. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6361. var renderContext = parentVnode && parentVnode.context;
  6362. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6363. vm.$scopedSlots = emptyObject;
  6364. // bind the createElement fn to this instance
  6365. // so that we get proper render context inside it.
  6366. // args order: tag, data, children, normalizationType, alwaysNormalize
  6367. // internal version is used by render functions compiled from templates
  6368. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6369. // normalization is always applied for the public version, used in
  6370. // user-written render functions.
  6371. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6372. // $attrs & $listeners are exposed for easier HOC creation.
  6373. // they need to be reactive so that HOCs using them are always updated
  6374. var parentData = parentVnode && parentVnode.data;
  6375. /* istanbul ignore else */
  6376. if (true) {
  6377. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6378. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6379. }, true);
  6380. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6381. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6382. }, true);
  6383. } else {}
  6384. }
  6385. var currentRenderingInstance = null;
  6386. function renderMixin (Vue) {
  6387. // install runtime convenience helpers
  6388. installRenderHelpers(Vue.prototype);
  6389. Vue.prototype.$nextTick = function (fn) {
  6390. return nextTick(fn, this)
  6391. };
  6392. Vue.prototype._render = function () {
  6393. var vm = this;
  6394. var ref = vm.$options;
  6395. var render = ref.render;
  6396. var _parentVnode = ref._parentVnode;
  6397. if (_parentVnode) {
  6398. vm.$scopedSlots = normalizeScopedSlots(
  6399. _parentVnode.data.scopedSlots,
  6400. vm.$slots,
  6401. vm.$scopedSlots
  6402. );
  6403. }
  6404. // set parent vnode. this allows render functions to have access
  6405. // to the data on the placeholder node.
  6406. vm.$vnode = _parentVnode;
  6407. // render self
  6408. var vnode;
  6409. try {
  6410. // There's no need to maintain a stack because all render fns are called
  6411. // separately from one another. Nested component's render fns are called
  6412. // when parent component is patched.
  6413. currentRenderingInstance = vm;
  6414. vnode = render.call(vm._renderProxy, vm.$createElement);
  6415. } catch (e) {
  6416. handleError(e, vm, "render");
  6417. // return error render result,
  6418. // or previous vnode to prevent render error causing blank component
  6419. /* istanbul ignore else */
  6420. if ( true && vm.$options.renderError) {
  6421. try {
  6422. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6423. } catch (e) {
  6424. handleError(e, vm, "renderError");
  6425. vnode = vm._vnode;
  6426. }
  6427. } else {
  6428. vnode = vm._vnode;
  6429. }
  6430. } finally {
  6431. currentRenderingInstance = null;
  6432. }
  6433. // if the returned array contains only a single node, allow it
  6434. if (Array.isArray(vnode) && vnode.length === 1) {
  6435. vnode = vnode[0];
  6436. }
  6437. // return empty vnode in case the render function errored out
  6438. if (!(vnode instanceof VNode)) {
  6439. if ( true && Array.isArray(vnode)) {
  6440. warn(
  6441. 'Multiple root nodes returned from render function. Render function ' +
  6442. 'should return a single root node.',
  6443. vm
  6444. );
  6445. }
  6446. vnode = createEmptyVNode();
  6447. }
  6448. // set parent
  6449. vnode.parent = _parentVnode;
  6450. return vnode
  6451. };
  6452. }
  6453. /* */
  6454. function ensureCtor (comp, base) {
  6455. if (
  6456. comp.__esModule ||
  6457. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6458. ) {
  6459. comp = comp.default;
  6460. }
  6461. return isObject(comp)
  6462. ? base.extend(comp)
  6463. : comp
  6464. }
  6465. function createAsyncPlaceholder (
  6466. factory,
  6467. data,
  6468. context,
  6469. children,
  6470. tag
  6471. ) {
  6472. var node = createEmptyVNode();
  6473. node.asyncFactory = factory;
  6474. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6475. return node
  6476. }
  6477. function resolveAsyncComponent (
  6478. factory,
  6479. baseCtor
  6480. ) {
  6481. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6482. return factory.errorComp
  6483. }
  6484. if (isDef(factory.resolved)) {
  6485. return factory.resolved
  6486. }
  6487. var owner = currentRenderingInstance;
  6488. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6489. // already pending
  6490. factory.owners.push(owner);
  6491. }
  6492. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6493. return factory.loadingComp
  6494. }
  6495. if (owner && !isDef(factory.owners)) {
  6496. var owners = factory.owners = [owner];
  6497. var sync = true;
  6498. var timerLoading = null;
  6499. var timerTimeout = null
  6500. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6501. var forceRender = function (renderCompleted) {
  6502. for (var i = 0, l = owners.length; i < l; i++) {
  6503. (owners[i]).$forceUpdate();
  6504. }
  6505. if (renderCompleted) {
  6506. owners.length = 0;
  6507. if (timerLoading !== null) {
  6508. clearTimeout(timerLoading);
  6509. timerLoading = null;
  6510. }
  6511. if (timerTimeout !== null) {
  6512. clearTimeout(timerTimeout);
  6513. timerTimeout = null;
  6514. }
  6515. }
  6516. };
  6517. var resolve = once(function (res) {
  6518. // cache resolved
  6519. factory.resolved = ensureCtor(res, baseCtor);
  6520. // invoke callbacks only if this is not a synchronous resolve
  6521. // (async resolves are shimmed as synchronous during SSR)
  6522. if (!sync) {
  6523. forceRender(true);
  6524. } else {
  6525. owners.length = 0;
  6526. }
  6527. });
  6528. var reject = once(function (reason) {
  6529. true && warn(
  6530. "Failed to resolve async component: " + (String(factory)) +
  6531. (reason ? ("\nReason: " + reason) : '')
  6532. );
  6533. if (isDef(factory.errorComp)) {
  6534. factory.error = true;
  6535. forceRender(true);
  6536. }
  6537. });
  6538. var res = factory(resolve, reject);
  6539. if (isObject(res)) {
  6540. if (isPromise(res)) {
  6541. // () => Promise
  6542. if (isUndef(factory.resolved)) {
  6543. res.then(resolve, reject);
  6544. }
  6545. } else if (isPromise(res.component)) {
  6546. res.component.then(resolve, reject);
  6547. if (isDef(res.error)) {
  6548. factory.errorComp = ensureCtor(res.error, baseCtor);
  6549. }
  6550. if (isDef(res.loading)) {
  6551. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6552. if (res.delay === 0) {
  6553. factory.loading = true;
  6554. } else {
  6555. timerLoading = setTimeout(function () {
  6556. timerLoading = null;
  6557. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6558. factory.loading = true;
  6559. forceRender(false);
  6560. }
  6561. }, res.delay || 200);
  6562. }
  6563. }
  6564. if (isDef(res.timeout)) {
  6565. timerTimeout = setTimeout(function () {
  6566. timerTimeout = null;
  6567. if (isUndef(factory.resolved)) {
  6568. reject(
  6569. true
  6570. ? ("timeout (" + (res.timeout) + "ms)")
  6571. : undefined
  6572. );
  6573. }
  6574. }, res.timeout);
  6575. }
  6576. }
  6577. }
  6578. sync = false;
  6579. // return in case resolved synchronously
  6580. return factory.loading
  6581. ? factory.loadingComp
  6582. : factory.resolved
  6583. }
  6584. }
  6585. /* */
  6586. function isAsyncPlaceholder (node) {
  6587. return node.isComment && node.asyncFactory
  6588. }
  6589. /* */
  6590. function getFirstComponentChild (children) {
  6591. if (Array.isArray(children)) {
  6592. for (var i = 0; i < children.length; i++) {
  6593. var c = children[i];
  6594. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6595. return c
  6596. }
  6597. }
  6598. }
  6599. }
  6600. /* */
  6601. /* */
  6602. function initEvents (vm) {
  6603. vm._events = Object.create(null);
  6604. vm._hasHookEvent = false;
  6605. // init parent attached events
  6606. var listeners = vm.$options._parentListeners;
  6607. if (listeners) {
  6608. updateComponentListeners(vm, listeners);
  6609. }
  6610. }
  6611. var target;
  6612. function add (event, fn) {
  6613. target.$on(event, fn);
  6614. }
  6615. function remove$1 (event, fn) {
  6616. target.$off(event, fn);
  6617. }
  6618. function createOnceHandler (event, fn) {
  6619. var _target = target;
  6620. return function onceHandler () {
  6621. var res = fn.apply(null, arguments);
  6622. if (res !== null) {
  6623. _target.$off(event, onceHandler);
  6624. }
  6625. }
  6626. }
  6627. function updateComponentListeners (
  6628. vm,
  6629. listeners,
  6630. oldListeners
  6631. ) {
  6632. target = vm;
  6633. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6634. target = undefined;
  6635. }
  6636. function eventsMixin (Vue) {
  6637. var hookRE = /^hook:/;
  6638. Vue.prototype.$on = function (event, fn) {
  6639. var vm = this;
  6640. if (Array.isArray(event)) {
  6641. for (var i = 0, l = event.length; i < l; i++) {
  6642. vm.$on(event[i], fn);
  6643. }
  6644. } else {
  6645. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6646. // optimize hook:event cost by using a boolean flag marked at registration
  6647. // instead of a hash lookup
  6648. if (hookRE.test(event)) {
  6649. vm._hasHookEvent = true;
  6650. }
  6651. }
  6652. return vm
  6653. };
  6654. Vue.prototype.$once = function (event, fn) {
  6655. var vm = this;
  6656. function on () {
  6657. vm.$off(event, on);
  6658. fn.apply(vm, arguments);
  6659. }
  6660. on.fn = fn;
  6661. vm.$on(event, on);
  6662. return vm
  6663. };
  6664. Vue.prototype.$off = function (event, fn) {
  6665. var vm = this;
  6666. // all
  6667. if (!arguments.length) {
  6668. vm._events = Object.create(null);
  6669. return vm
  6670. }
  6671. // array of events
  6672. if (Array.isArray(event)) {
  6673. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6674. vm.$off(event[i$1], fn);
  6675. }
  6676. return vm
  6677. }
  6678. // specific event
  6679. var cbs = vm._events[event];
  6680. if (!cbs) {
  6681. return vm
  6682. }
  6683. if (!fn) {
  6684. vm._events[event] = null;
  6685. return vm
  6686. }
  6687. // specific handler
  6688. var cb;
  6689. var i = cbs.length;
  6690. while (i--) {
  6691. cb = cbs[i];
  6692. if (cb === fn || cb.fn === fn) {
  6693. cbs.splice(i, 1);
  6694. break
  6695. }
  6696. }
  6697. return vm
  6698. };
  6699. Vue.prototype.$emit = function (event) {
  6700. var vm = this;
  6701. if (true) {
  6702. var lowerCaseEvent = event.toLowerCase();
  6703. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6704. tip(
  6705. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6706. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6707. "Note that HTML attributes are case-insensitive and you cannot use " +
  6708. "v-on to listen to camelCase events when using in-DOM templates. " +
  6709. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6710. );
  6711. }
  6712. }
  6713. var cbs = vm._events[event];
  6714. if (cbs) {
  6715. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6716. var args = toArray(arguments, 1);
  6717. var info = "event handler for \"" + event + "\"";
  6718. for (var i = 0, l = cbs.length; i < l; i++) {
  6719. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6720. }
  6721. }
  6722. return vm
  6723. };
  6724. }
  6725. /* */
  6726. var activeInstance = null;
  6727. var isUpdatingChildComponent = false;
  6728. function setActiveInstance(vm) {
  6729. var prevActiveInstance = activeInstance;
  6730. activeInstance = vm;
  6731. return function () {
  6732. activeInstance = prevActiveInstance;
  6733. }
  6734. }
  6735. function initLifecycle (vm) {
  6736. var options = vm.$options;
  6737. // locate first non-abstract parent
  6738. var parent = options.parent;
  6739. if (parent && !options.abstract) {
  6740. while (parent.$options.abstract && parent.$parent) {
  6741. parent = parent.$parent;
  6742. }
  6743. parent.$children.push(vm);
  6744. }
  6745. vm.$parent = parent;
  6746. vm.$root = parent ? parent.$root : vm;
  6747. vm.$children = [];
  6748. vm.$refs = {};
  6749. vm._watcher = null;
  6750. vm._inactive = null;
  6751. vm._directInactive = false;
  6752. vm._isMounted = false;
  6753. vm._isDestroyed = false;
  6754. vm._isBeingDestroyed = false;
  6755. }
  6756. function lifecycleMixin (Vue) {
  6757. Vue.prototype._update = function (vnode, hydrating) {
  6758. var vm = this;
  6759. var prevEl = vm.$el;
  6760. var prevVnode = vm._vnode;
  6761. var restoreActiveInstance = setActiveInstance(vm);
  6762. vm._vnode = vnode;
  6763. // Vue.prototype.__patch__ is injected in entry points
  6764. // based on the rendering backend used.
  6765. if (!prevVnode) {
  6766. // initial render
  6767. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6768. } else {
  6769. // updates
  6770. vm.$el = vm.__patch__(prevVnode, vnode);
  6771. }
  6772. restoreActiveInstance();
  6773. // update __vue__ reference
  6774. if (prevEl) {
  6775. prevEl.__vue__ = null;
  6776. }
  6777. if (vm.$el) {
  6778. vm.$el.__vue__ = vm;
  6779. }
  6780. // if parent is an HOC, update its $el as well
  6781. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6782. vm.$parent.$el = vm.$el;
  6783. }
  6784. // updated hook is called by the scheduler to ensure that children are
  6785. // updated in a parent's updated hook.
  6786. };
  6787. Vue.prototype.$forceUpdate = function () {
  6788. var vm = this;
  6789. if (vm._watcher) {
  6790. vm._watcher.update();
  6791. }
  6792. };
  6793. Vue.prototype.$destroy = function () {
  6794. var vm = this;
  6795. if (vm._isBeingDestroyed) {
  6796. return
  6797. }
  6798. callHook(vm, 'beforeDestroy');
  6799. vm._isBeingDestroyed = true;
  6800. // remove self from parent
  6801. var parent = vm.$parent;
  6802. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6803. remove(parent.$children, vm);
  6804. }
  6805. // teardown watchers
  6806. if (vm._watcher) {
  6807. vm._watcher.teardown();
  6808. }
  6809. var i = vm._watchers.length;
  6810. while (i--) {
  6811. vm._watchers[i].teardown();
  6812. }
  6813. // remove reference from data ob
  6814. // frozen object may not have observer.
  6815. if (vm._data.__ob__) {
  6816. vm._data.__ob__.vmCount--;
  6817. }
  6818. // call the last hook...
  6819. vm._isDestroyed = true;
  6820. // invoke destroy hooks on current rendered tree
  6821. vm.__patch__(vm._vnode, null);
  6822. // fire destroyed hook
  6823. callHook(vm, 'destroyed');
  6824. // turn off all instance listeners.
  6825. vm.$off();
  6826. // remove __vue__ reference
  6827. if (vm.$el) {
  6828. vm.$el.__vue__ = null;
  6829. }
  6830. // release circular reference (#6759)
  6831. if (vm.$vnode) {
  6832. vm.$vnode.parent = null;
  6833. }
  6834. };
  6835. }
  6836. function updateChildComponent (
  6837. vm,
  6838. propsData,
  6839. listeners,
  6840. parentVnode,
  6841. renderChildren
  6842. ) {
  6843. if (true) {
  6844. isUpdatingChildComponent = true;
  6845. }
  6846. // determine whether component has slot children
  6847. // we need to do this before overwriting $options._renderChildren.
  6848. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6849. // dynamic slot names). Static scoped slots compiled from template has the
  6850. // "$stable" marker.
  6851. var newScopedSlots = parentVnode.data.scopedSlots;
  6852. var oldScopedSlots = vm.$scopedSlots;
  6853. var hasDynamicScopedSlot = !!(
  6854. (newScopedSlots && !newScopedSlots.$stable) ||
  6855. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6856. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6857. );
  6858. // Any static slot children from the parent may have changed during parent's
  6859. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6860. // update is necessary to ensure correctness.
  6861. var needsForceUpdate = !!(
  6862. renderChildren || // has new static slots
  6863. vm.$options._renderChildren || // has old static slots
  6864. hasDynamicScopedSlot
  6865. );
  6866. vm.$options._parentVnode = parentVnode;
  6867. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6868. if (vm._vnode) { // update child tree's parent
  6869. vm._vnode.parent = parentVnode;
  6870. }
  6871. vm.$options._renderChildren = renderChildren;
  6872. // update $attrs and $listeners hash
  6873. // these are also reactive so they may trigger child update if the child
  6874. // used them during render
  6875. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6876. vm.$listeners = listeners || emptyObject;
  6877. // update props
  6878. if (propsData && vm.$options.props) {
  6879. toggleObserving(false);
  6880. var props = vm._props;
  6881. var propKeys = vm.$options._propKeys || [];
  6882. for (var i = 0; i < propKeys.length; i++) {
  6883. var key = propKeys[i];
  6884. var propOptions = vm.$options.props; // wtf flow?
  6885. props[key] = validateProp(key, propOptions, propsData, vm);
  6886. }
  6887. toggleObserving(true);
  6888. // keep a copy of raw propsData
  6889. vm.$options.propsData = propsData;
  6890. }
  6891. // fixed by xxxxxx update properties(mp runtime)
  6892. vm._$updateProperties && vm._$updateProperties(vm);
  6893. // update listeners
  6894. listeners = listeners || emptyObject;
  6895. var oldListeners = vm.$options._parentListeners;
  6896. vm.$options._parentListeners = listeners;
  6897. updateComponentListeners(vm, listeners, oldListeners);
  6898. // resolve slots + force update if has children
  6899. if (needsForceUpdate) {
  6900. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  6901. vm.$forceUpdate();
  6902. }
  6903. if (true) {
  6904. isUpdatingChildComponent = false;
  6905. }
  6906. }
  6907. function isInInactiveTree (vm) {
  6908. while (vm && (vm = vm.$parent)) {
  6909. if (vm._inactive) { return true }
  6910. }
  6911. return false
  6912. }
  6913. function activateChildComponent (vm, direct) {
  6914. if (direct) {
  6915. vm._directInactive = false;
  6916. if (isInInactiveTree(vm)) {
  6917. return
  6918. }
  6919. } else if (vm._directInactive) {
  6920. return
  6921. }
  6922. if (vm._inactive || vm._inactive === null) {
  6923. vm._inactive = false;
  6924. for (var i = 0; i < vm.$children.length; i++) {
  6925. activateChildComponent(vm.$children[i]);
  6926. }
  6927. callHook(vm, 'activated');
  6928. }
  6929. }
  6930. function deactivateChildComponent (vm, direct) {
  6931. if (direct) {
  6932. vm._directInactive = true;
  6933. if (isInInactiveTree(vm)) {
  6934. return
  6935. }
  6936. }
  6937. if (!vm._inactive) {
  6938. vm._inactive = true;
  6939. for (var i = 0; i < vm.$children.length; i++) {
  6940. deactivateChildComponent(vm.$children[i]);
  6941. }
  6942. callHook(vm, 'deactivated');
  6943. }
  6944. }
  6945. function callHook (vm, hook) {
  6946. // #7573 disable dep collection when invoking lifecycle hooks
  6947. pushTarget();
  6948. var handlers = vm.$options[hook];
  6949. var info = hook + " hook";
  6950. if (handlers) {
  6951. for (var i = 0, j = handlers.length; i < j; i++) {
  6952. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  6953. }
  6954. }
  6955. if (vm._hasHookEvent) {
  6956. vm.$emit('hook:' + hook);
  6957. }
  6958. popTarget();
  6959. }
  6960. /* */
  6961. var MAX_UPDATE_COUNT = 100;
  6962. var queue = [];
  6963. var activatedChildren = [];
  6964. var has = {};
  6965. var circular = {};
  6966. var waiting = false;
  6967. var flushing = false;
  6968. var index = 0;
  6969. /**
  6970. * Reset the scheduler's state.
  6971. */
  6972. function resetSchedulerState () {
  6973. index = queue.length = activatedChildren.length = 0;
  6974. has = {};
  6975. if (true) {
  6976. circular = {};
  6977. }
  6978. waiting = flushing = false;
  6979. }
  6980. // Async edge case #6566 requires saving the timestamp when event listeners are
  6981. // attached. However, calling performance.now() has a perf overhead especially
  6982. // if the page has thousands of event listeners. Instead, we take a timestamp
  6983. // every time the scheduler flushes and use that for all event listeners
  6984. // attached during that flush.
  6985. var currentFlushTimestamp = 0;
  6986. // Async edge case fix requires storing an event listener's attach timestamp.
  6987. var getNow = Date.now;
  6988. // Determine what event timestamp the browser is using. Annoyingly, the
  6989. // timestamp can either be hi-res (relative to page load) or low-res
  6990. // (relative to UNIX epoch), so in order to compare time we have to use the
  6991. // same timestamp type when saving the flush timestamp.
  6992. // All IE versions use low-res event timestamps, and have problematic clock
  6993. // implementations (#9632)
  6994. if (inBrowser && !isIE) {
  6995. var performance = window.performance;
  6996. if (
  6997. performance &&
  6998. typeof performance.now === 'function' &&
  6999. getNow() > document.createEvent('Event').timeStamp
  7000. ) {
  7001. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7002. // smaller than it, it means the event is using a hi-res timestamp,
  7003. // and we need to use the hi-res version for event listener timestamps as
  7004. // well.
  7005. getNow = function () { return performance.now(); };
  7006. }
  7007. }
  7008. /**
  7009. * Flush both queues and run the watchers.
  7010. */
  7011. function flushSchedulerQueue () {
  7012. currentFlushTimestamp = getNow();
  7013. flushing = true;
  7014. var watcher, id;
  7015. // Sort queue before flush.
  7016. // This ensures that:
  7017. // 1. Components are updated from parent to child. (because parent is always
  7018. // created before the child)
  7019. // 2. A component's user watchers are run before its render watcher (because
  7020. // user watchers are created before the render watcher)
  7021. // 3. If a component is destroyed during a parent component's watcher run,
  7022. // its watchers can be skipped.
  7023. queue.sort(function (a, b) { return a.id - b.id; });
  7024. // do not cache length because more watchers might be pushed
  7025. // as we run existing watchers
  7026. for (index = 0; index < queue.length; index++) {
  7027. watcher = queue[index];
  7028. if (watcher.before) {
  7029. watcher.before();
  7030. }
  7031. id = watcher.id;
  7032. has[id] = null;
  7033. watcher.run();
  7034. // in dev build, check and stop circular updates.
  7035. if ( true && has[id] != null) {
  7036. circular[id] = (circular[id] || 0) + 1;
  7037. if (circular[id] > MAX_UPDATE_COUNT) {
  7038. warn(
  7039. 'You may have an infinite update loop ' + (
  7040. watcher.user
  7041. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7042. : "in a component render function."
  7043. ),
  7044. watcher.vm
  7045. );
  7046. break
  7047. }
  7048. }
  7049. }
  7050. // keep copies of post queues before resetting state
  7051. var activatedQueue = activatedChildren.slice();
  7052. var updatedQueue = queue.slice();
  7053. resetSchedulerState();
  7054. // call component updated and activated hooks
  7055. callActivatedHooks(activatedQueue);
  7056. callUpdatedHooks(updatedQueue);
  7057. // devtool hook
  7058. /* istanbul ignore if */
  7059. if (devtools && config.devtools) {
  7060. devtools.emit('flush');
  7061. }
  7062. }
  7063. function callUpdatedHooks (queue) {
  7064. var i = queue.length;
  7065. while (i--) {
  7066. var watcher = queue[i];
  7067. var vm = watcher.vm;
  7068. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7069. callHook(vm, 'updated');
  7070. }
  7071. }
  7072. }
  7073. /**
  7074. * Queue a kept-alive component that was activated during patch.
  7075. * The queue will be processed after the entire tree has been patched.
  7076. */
  7077. function queueActivatedComponent (vm) {
  7078. // setting _inactive to false here so that a render function can
  7079. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7080. vm._inactive = false;
  7081. activatedChildren.push(vm);
  7082. }
  7083. function callActivatedHooks (queue) {
  7084. for (var i = 0; i < queue.length; i++) {
  7085. queue[i]._inactive = true;
  7086. activateChildComponent(queue[i], true /* true */);
  7087. }
  7088. }
  7089. /**
  7090. * Push a watcher into the watcher queue.
  7091. * Jobs with duplicate IDs will be skipped unless it's
  7092. * pushed when the queue is being flushed.
  7093. */
  7094. function queueWatcher (watcher) {
  7095. var id = watcher.id;
  7096. if (has[id] == null) {
  7097. has[id] = true;
  7098. if (!flushing) {
  7099. queue.push(watcher);
  7100. } else {
  7101. // if already flushing, splice the watcher based on its id
  7102. // if already past its id, it will be run next immediately.
  7103. var i = queue.length - 1;
  7104. while (i > index && queue[i].id > watcher.id) {
  7105. i--;
  7106. }
  7107. queue.splice(i + 1, 0, watcher);
  7108. }
  7109. // queue the flush
  7110. if (!waiting) {
  7111. waiting = true;
  7112. if ( true && !config.async) {
  7113. flushSchedulerQueue();
  7114. return
  7115. }
  7116. nextTick(flushSchedulerQueue);
  7117. }
  7118. }
  7119. }
  7120. /* */
  7121. var uid$2 = 0;
  7122. /**
  7123. * A watcher parses an expression, collects dependencies,
  7124. * and fires callback when the expression value changes.
  7125. * This is used for both the $watch() api and directives.
  7126. */
  7127. var Watcher = function Watcher (
  7128. vm,
  7129. expOrFn,
  7130. cb,
  7131. options,
  7132. isRenderWatcher
  7133. ) {
  7134. this.vm = vm;
  7135. if (isRenderWatcher) {
  7136. vm._watcher = this;
  7137. }
  7138. vm._watchers.push(this);
  7139. // options
  7140. if (options) {
  7141. this.deep = !!options.deep;
  7142. this.user = !!options.user;
  7143. this.lazy = !!options.lazy;
  7144. this.sync = !!options.sync;
  7145. this.before = options.before;
  7146. } else {
  7147. this.deep = this.user = this.lazy = this.sync = false;
  7148. }
  7149. this.cb = cb;
  7150. this.id = ++uid$2; // uid for batching
  7151. this.active = true;
  7152. this.dirty = this.lazy; // for lazy watchers
  7153. this.deps = [];
  7154. this.newDeps = [];
  7155. this.depIds = new _Set();
  7156. this.newDepIds = new _Set();
  7157. this.expression = true
  7158. ? expOrFn.toString()
  7159. : undefined;
  7160. // parse expression for getter
  7161. if (typeof expOrFn === 'function') {
  7162. this.getter = expOrFn;
  7163. } else {
  7164. this.getter = parsePath(expOrFn);
  7165. if (!this.getter) {
  7166. this.getter = noop;
  7167. true && warn(
  7168. "Failed watching path: \"" + expOrFn + "\" " +
  7169. 'Watcher only accepts simple dot-delimited paths. ' +
  7170. 'For full control, use a function instead.',
  7171. vm
  7172. );
  7173. }
  7174. }
  7175. this.value = this.lazy
  7176. ? undefined
  7177. : this.get();
  7178. };
  7179. /**
  7180. * Evaluate the getter, and re-collect dependencies.
  7181. */
  7182. Watcher.prototype.get = function get () {
  7183. pushTarget(this);
  7184. var value;
  7185. var vm = this.vm;
  7186. try {
  7187. value = this.getter.call(vm, vm);
  7188. } catch (e) {
  7189. if (this.user) {
  7190. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7191. } else {
  7192. throw e
  7193. }
  7194. } finally {
  7195. // "touch" every property so they are all tracked as
  7196. // dependencies for deep watching
  7197. if (this.deep) {
  7198. traverse(value);
  7199. }
  7200. popTarget();
  7201. this.cleanupDeps();
  7202. }
  7203. return value
  7204. };
  7205. /**
  7206. * Add a dependency to this directive.
  7207. */
  7208. Watcher.prototype.addDep = function addDep (dep) {
  7209. var id = dep.id;
  7210. if (!this.newDepIds.has(id)) {
  7211. this.newDepIds.add(id);
  7212. this.newDeps.push(dep);
  7213. if (!this.depIds.has(id)) {
  7214. dep.addSub(this);
  7215. }
  7216. }
  7217. };
  7218. /**
  7219. * Clean up for dependency collection.
  7220. */
  7221. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7222. var i = this.deps.length;
  7223. while (i--) {
  7224. var dep = this.deps[i];
  7225. if (!this.newDepIds.has(dep.id)) {
  7226. dep.removeSub(this);
  7227. }
  7228. }
  7229. var tmp = this.depIds;
  7230. this.depIds = this.newDepIds;
  7231. this.newDepIds = tmp;
  7232. this.newDepIds.clear();
  7233. tmp = this.deps;
  7234. this.deps = this.newDeps;
  7235. this.newDeps = tmp;
  7236. this.newDeps.length = 0;
  7237. };
  7238. /**
  7239. * Subscriber interface.
  7240. * Will be called when a dependency changes.
  7241. */
  7242. Watcher.prototype.update = function update () {
  7243. /* istanbul ignore else */
  7244. if (this.lazy) {
  7245. this.dirty = true;
  7246. } else if (this.sync) {
  7247. this.run();
  7248. } else {
  7249. queueWatcher(this);
  7250. }
  7251. };
  7252. /**
  7253. * Scheduler job interface.
  7254. * Will be called by the scheduler.
  7255. */
  7256. Watcher.prototype.run = function run () {
  7257. if (this.active) {
  7258. var value = this.get();
  7259. if (
  7260. value !== this.value ||
  7261. // Deep watchers and watchers on Object/Arrays should fire even
  7262. // when the value is the same, because the value may
  7263. // have mutated.
  7264. isObject(value) ||
  7265. this.deep
  7266. ) {
  7267. // set new value
  7268. var oldValue = this.value;
  7269. this.value = value;
  7270. if (this.user) {
  7271. try {
  7272. this.cb.call(this.vm, value, oldValue);
  7273. } catch (e) {
  7274. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7275. }
  7276. } else {
  7277. this.cb.call(this.vm, value, oldValue);
  7278. }
  7279. }
  7280. }
  7281. };
  7282. /**
  7283. * Evaluate the value of the watcher.
  7284. * This only gets called for lazy watchers.
  7285. */
  7286. Watcher.prototype.evaluate = function evaluate () {
  7287. this.value = this.get();
  7288. this.dirty = false;
  7289. };
  7290. /**
  7291. * Depend on all deps collected by this watcher.
  7292. */
  7293. Watcher.prototype.depend = function depend () {
  7294. var i = this.deps.length;
  7295. while (i--) {
  7296. this.deps[i].depend();
  7297. }
  7298. };
  7299. /**
  7300. * Remove self from all dependencies' subscriber list.
  7301. */
  7302. Watcher.prototype.teardown = function teardown () {
  7303. if (this.active) {
  7304. // remove self from vm's watcher list
  7305. // this is a somewhat expensive operation so we skip it
  7306. // if the vm is being destroyed.
  7307. if (!this.vm._isBeingDestroyed) {
  7308. remove(this.vm._watchers, this);
  7309. }
  7310. var i = this.deps.length;
  7311. while (i--) {
  7312. this.deps[i].removeSub(this);
  7313. }
  7314. this.active = false;
  7315. }
  7316. };
  7317. /* */
  7318. var sharedPropertyDefinition = {
  7319. enumerable: true,
  7320. configurable: true,
  7321. get: noop,
  7322. set: noop
  7323. };
  7324. function proxy (target, sourceKey, key) {
  7325. sharedPropertyDefinition.get = function proxyGetter () {
  7326. return this[sourceKey][key]
  7327. };
  7328. sharedPropertyDefinition.set = function proxySetter (val) {
  7329. this[sourceKey][key] = val;
  7330. };
  7331. Object.defineProperty(target, key, sharedPropertyDefinition);
  7332. }
  7333. function initState (vm) {
  7334. vm._watchers = [];
  7335. var opts = vm.$options;
  7336. if (opts.props) { initProps(vm, opts.props); }
  7337. if (opts.methods) { initMethods(vm, opts.methods); }
  7338. if (opts.data) {
  7339. initData(vm);
  7340. } else {
  7341. observe(vm._data = {}, true /* asRootData */);
  7342. }
  7343. if (opts.computed) { initComputed(vm, opts.computed); }
  7344. if (opts.watch && opts.watch !== nativeWatch) {
  7345. initWatch(vm, opts.watch);
  7346. }
  7347. }
  7348. function initProps (vm, propsOptions) {
  7349. var propsData = vm.$options.propsData || {};
  7350. var props = vm._props = {};
  7351. // cache prop keys so that future props updates can iterate using Array
  7352. // instead of dynamic object key enumeration.
  7353. var keys = vm.$options._propKeys = [];
  7354. var isRoot = !vm.$parent;
  7355. // root instance props should be converted
  7356. if (!isRoot) {
  7357. toggleObserving(false);
  7358. }
  7359. var loop = function ( key ) {
  7360. keys.push(key);
  7361. var value = validateProp(key, propsOptions, propsData, vm);
  7362. /* istanbul ignore else */
  7363. if (true) {
  7364. var hyphenatedKey = hyphenate(key);
  7365. if (isReservedAttribute(hyphenatedKey) ||
  7366. config.isReservedAttr(hyphenatedKey)) {
  7367. warn(
  7368. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7369. vm
  7370. );
  7371. }
  7372. defineReactive$$1(props, key, value, function () {
  7373. if (!isRoot && !isUpdatingChildComponent) {
  7374. {
  7375. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7376. return
  7377. }
  7378. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7379. if(
  7380. key === 'value' &&
  7381. Array.isArray(vm.$options.behaviors) &&
  7382. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7383. ){
  7384. return
  7385. }
  7386. if(vm._getFormData){
  7387. return
  7388. }
  7389. var $parent = vm.$parent;
  7390. while($parent){
  7391. if($parent.__next_tick_pending){
  7392. return
  7393. }
  7394. $parent = $parent.$parent;
  7395. }
  7396. }
  7397. warn(
  7398. "Avoid mutating a prop directly since the value will be " +
  7399. "overwritten whenever the parent component re-renders. " +
  7400. "Instead, use a data or computed property based on the prop's " +
  7401. "value. Prop being mutated: \"" + key + "\"",
  7402. vm
  7403. );
  7404. }
  7405. });
  7406. } else {}
  7407. // static props are already proxied on the component's prototype
  7408. // during Vue.extend(). We only need to proxy props defined at
  7409. // instantiation here.
  7410. if (!(key in vm)) {
  7411. proxy(vm, "_props", key);
  7412. }
  7413. };
  7414. for (var key in propsOptions) loop( key );
  7415. toggleObserving(true);
  7416. }
  7417. function initData (vm) {
  7418. var data = vm.$options.data;
  7419. data = vm._data = typeof data === 'function'
  7420. ? getData(data, vm)
  7421. : data || {};
  7422. if (!isPlainObject(data)) {
  7423. data = {};
  7424. true && warn(
  7425. 'data functions should return an object:\n' +
  7426. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7427. vm
  7428. );
  7429. }
  7430. // proxy data on instance
  7431. var keys = Object.keys(data);
  7432. var props = vm.$options.props;
  7433. var methods = vm.$options.methods;
  7434. var i = keys.length;
  7435. while (i--) {
  7436. var key = keys[i];
  7437. if (true) {
  7438. if (methods && hasOwn(methods, key)) {
  7439. warn(
  7440. ("Method \"" + key + "\" has already been defined as a data property."),
  7441. vm
  7442. );
  7443. }
  7444. }
  7445. if (props && hasOwn(props, key)) {
  7446. true && warn(
  7447. "The data property \"" + key + "\" is already declared as a prop. " +
  7448. "Use prop default value instead.",
  7449. vm
  7450. );
  7451. } else if (!isReserved(key)) {
  7452. proxy(vm, "_data", key);
  7453. }
  7454. }
  7455. // observe data
  7456. observe(data, true /* asRootData */);
  7457. }
  7458. function getData (data, vm) {
  7459. // #7573 disable dep collection when invoking data getters
  7460. pushTarget();
  7461. try {
  7462. return data.call(vm, vm)
  7463. } catch (e) {
  7464. handleError(e, vm, "data()");
  7465. return {}
  7466. } finally {
  7467. popTarget();
  7468. }
  7469. }
  7470. var computedWatcherOptions = { lazy: true };
  7471. function initComputed (vm, computed) {
  7472. // $flow-disable-line
  7473. var watchers = vm._computedWatchers = Object.create(null);
  7474. // computed properties are just getters during SSR
  7475. var isSSR = isServerRendering();
  7476. for (var key in computed) {
  7477. var userDef = computed[key];
  7478. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7479. if ( true && getter == null) {
  7480. warn(
  7481. ("Getter is missing for computed property \"" + key + "\"."),
  7482. vm
  7483. );
  7484. }
  7485. if (!isSSR) {
  7486. // create internal watcher for the computed property.
  7487. watchers[key] = new Watcher(
  7488. vm,
  7489. getter || noop,
  7490. noop,
  7491. computedWatcherOptions
  7492. );
  7493. }
  7494. // component-defined computed properties are already defined on the
  7495. // component prototype. We only need to define computed properties defined
  7496. // at instantiation here.
  7497. if (!(key in vm)) {
  7498. defineComputed(vm, key, userDef);
  7499. } else if (true) {
  7500. if (key in vm.$data) {
  7501. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7502. } else if (vm.$options.props && key in vm.$options.props) {
  7503. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7504. }
  7505. }
  7506. }
  7507. }
  7508. function defineComputed (
  7509. target,
  7510. key,
  7511. userDef
  7512. ) {
  7513. var shouldCache = !isServerRendering();
  7514. if (typeof userDef === 'function') {
  7515. sharedPropertyDefinition.get = shouldCache
  7516. ? createComputedGetter(key)
  7517. : createGetterInvoker(userDef);
  7518. sharedPropertyDefinition.set = noop;
  7519. } else {
  7520. sharedPropertyDefinition.get = userDef.get
  7521. ? shouldCache && userDef.cache !== false
  7522. ? createComputedGetter(key)
  7523. : createGetterInvoker(userDef.get)
  7524. : noop;
  7525. sharedPropertyDefinition.set = userDef.set || noop;
  7526. }
  7527. if ( true &&
  7528. sharedPropertyDefinition.set === noop) {
  7529. sharedPropertyDefinition.set = function () {
  7530. warn(
  7531. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7532. this
  7533. );
  7534. };
  7535. }
  7536. Object.defineProperty(target, key, sharedPropertyDefinition);
  7537. }
  7538. function createComputedGetter (key) {
  7539. return function computedGetter () {
  7540. var watcher = this._computedWatchers && this._computedWatchers[key];
  7541. if (watcher) {
  7542. if (watcher.dirty) {
  7543. watcher.evaluate();
  7544. }
  7545. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7546. watcher.depend();
  7547. }
  7548. return watcher.value
  7549. }
  7550. }
  7551. }
  7552. function createGetterInvoker(fn) {
  7553. return function computedGetter () {
  7554. return fn.call(this, this)
  7555. }
  7556. }
  7557. function initMethods (vm, methods) {
  7558. var props = vm.$options.props;
  7559. for (var key in methods) {
  7560. if (true) {
  7561. if (typeof methods[key] !== 'function') {
  7562. warn(
  7563. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7564. "Did you reference the function correctly?",
  7565. vm
  7566. );
  7567. }
  7568. if (props && hasOwn(props, key)) {
  7569. warn(
  7570. ("Method \"" + key + "\" has already been defined as a prop."),
  7571. vm
  7572. );
  7573. }
  7574. if ((key in vm) && isReserved(key)) {
  7575. warn(
  7576. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7577. "Avoid defining component methods that start with _ or $."
  7578. );
  7579. }
  7580. }
  7581. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7582. }
  7583. }
  7584. function initWatch (vm, watch) {
  7585. for (var key in watch) {
  7586. var handler = watch[key];
  7587. if (Array.isArray(handler)) {
  7588. for (var i = 0; i < handler.length; i++) {
  7589. createWatcher(vm, key, handler[i]);
  7590. }
  7591. } else {
  7592. createWatcher(vm, key, handler);
  7593. }
  7594. }
  7595. }
  7596. function createWatcher (
  7597. vm,
  7598. expOrFn,
  7599. handler,
  7600. options
  7601. ) {
  7602. if (isPlainObject(handler)) {
  7603. options = handler;
  7604. handler = handler.handler;
  7605. }
  7606. if (typeof handler === 'string') {
  7607. handler = vm[handler];
  7608. }
  7609. return vm.$watch(expOrFn, handler, options)
  7610. }
  7611. function stateMixin (Vue) {
  7612. // flow somehow has problems with directly declared definition object
  7613. // when using Object.defineProperty, so we have to procedurally build up
  7614. // the object here.
  7615. var dataDef = {};
  7616. dataDef.get = function () { return this._data };
  7617. var propsDef = {};
  7618. propsDef.get = function () { return this._props };
  7619. if (true) {
  7620. dataDef.set = function () {
  7621. warn(
  7622. 'Avoid replacing instance root $data. ' +
  7623. 'Use nested data properties instead.',
  7624. this
  7625. );
  7626. };
  7627. propsDef.set = function () {
  7628. warn("$props is readonly.", this);
  7629. };
  7630. }
  7631. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7632. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7633. Vue.prototype.$set = set;
  7634. Vue.prototype.$delete = del;
  7635. Vue.prototype.$watch = function (
  7636. expOrFn,
  7637. cb,
  7638. options
  7639. ) {
  7640. var vm = this;
  7641. if (isPlainObject(cb)) {
  7642. return createWatcher(vm, expOrFn, cb, options)
  7643. }
  7644. options = options || {};
  7645. options.user = true;
  7646. var watcher = new Watcher(vm, expOrFn, cb, options);
  7647. if (options.immediate) {
  7648. try {
  7649. cb.call(vm, watcher.value);
  7650. } catch (error) {
  7651. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7652. }
  7653. }
  7654. return function unwatchFn () {
  7655. watcher.teardown();
  7656. }
  7657. };
  7658. }
  7659. /* */
  7660. var uid$3 = 0;
  7661. function initMixin (Vue) {
  7662. Vue.prototype._init = function (options) {
  7663. var vm = this;
  7664. // a uid
  7665. vm._uid = uid$3++;
  7666. var startTag, endTag;
  7667. /* istanbul ignore if */
  7668. if ( true && config.performance && mark) {
  7669. startTag = "vue-perf-start:" + (vm._uid);
  7670. endTag = "vue-perf-end:" + (vm._uid);
  7671. mark(startTag);
  7672. }
  7673. // a flag to avoid this being observed
  7674. vm._isVue = true;
  7675. // merge options
  7676. if (options && options._isComponent) {
  7677. // optimize internal component instantiation
  7678. // since dynamic options merging is pretty slow, and none of the
  7679. // internal component options needs special treatment.
  7680. initInternalComponent(vm, options);
  7681. } else {
  7682. vm.$options = mergeOptions(
  7683. resolveConstructorOptions(vm.constructor),
  7684. options || {},
  7685. vm
  7686. );
  7687. }
  7688. /* istanbul ignore else */
  7689. if (true) {
  7690. initProxy(vm);
  7691. } else {}
  7692. // expose real self
  7693. vm._self = vm;
  7694. initLifecycle(vm);
  7695. initEvents(vm);
  7696. initRender(vm);
  7697. callHook(vm, 'beforeCreate');
  7698. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7699. initState(vm);
  7700. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7701. !vm._$fallback && callHook(vm, 'created');
  7702. /* istanbul ignore if */
  7703. if ( true && config.performance && mark) {
  7704. vm._name = formatComponentName(vm, false);
  7705. mark(endTag);
  7706. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7707. }
  7708. if (vm.$options.el) {
  7709. vm.$mount(vm.$options.el);
  7710. }
  7711. };
  7712. }
  7713. function initInternalComponent (vm, options) {
  7714. var opts = vm.$options = Object.create(vm.constructor.options);
  7715. // doing this because it's faster than dynamic enumeration.
  7716. var parentVnode = options._parentVnode;
  7717. opts.parent = options.parent;
  7718. opts._parentVnode = parentVnode;
  7719. var vnodeComponentOptions = parentVnode.componentOptions;
  7720. opts.propsData = vnodeComponentOptions.propsData;
  7721. opts._parentListeners = vnodeComponentOptions.listeners;
  7722. opts._renderChildren = vnodeComponentOptions.children;
  7723. opts._componentTag = vnodeComponentOptions.tag;
  7724. if (options.render) {
  7725. opts.render = options.render;
  7726. opts.staticRenderFns = options.staticRenderFns;
  7727. }
  7728. }
  7729. function resolveConstructorOptions (Ctor) {
  7730. var options = Ctor.options;
  7731. if (Ctor.super) {
  7732. var superOptions = resolveConstructorOptions(Ctor.super);
  7733. var cachedSuperOptions = Ctor.superOptions;
  7734. if (superOptions !== cachedSuperOptions) {
  7735. // super option changed,
  7736. // need to resolve new options.
  7737. Ctor.superOptions = superOptions;
  7738. // check if there are any late-modified/attached options (#4976)
  7739. var modifiedOptions = resolveModifiedOptions(Ctor);
  7740. // update base extend options
  7741. if (modifiedOptions) {
  7742. extend(Ctor.extendOptions, modifiedOptions);
  7743. }
  7744. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7745. if (options.name) {
  7746. options.components[options.name] = Ctor;
  7747. }
  7748. }
  7749. }
  7750. return options
  7751. }
  7752. function resolveModifiedOptions (Ctor) {
  7753. var modified;
  7754. var latest = Ctor.options;
  7755. var sealed = Ctor.sealedOptions;
  7756. for (var key in latest) {
  7757. if (latest[key] !== sealed[key]) {
  7758. if (!modified) { modified = {}; }
  7759. modified[key] = latest[key];
  7760. }
  7761. }
  7762. return modified
  7763. }
  7764. function Vue (options) {
  7765. if ( true &&
  7766. !(this instanceof Vue)
  7767. ) {
  7768. warn('Vue is a constructor and should be called with the `new` keyword');
  7769. }
  7770. this._init(options);
  7771. }
  7772. initMixin(Vue);
  7773. stateMixin(Vue);
  7774. eventsMixin(Vue);
  7775. lifecycleMixin(Vue);
  7776. renderMixin(Vue);
  7777. /* */
  7778. function initUse (Vue) {
  7779. Vue.use = function (plugin) {
  7780. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7781. if (installedPlugins.indexOf(plugin) > -1) {
  7782. return this
  7783. }
  7784. // additional parameters
  7785. var args = toArray(arguments, 1);
  7786. args.unshift(this);
  7787. if (typeof plugin.install === 'function') {
  7788. plugin.install.apply(plugin, args);
  7789. } else if (typeof plugin === 'function') {
  7790. plugin.apply(null, args);
  7791. }
  7792. installedPlugins.push(plugin);
  7793. return this
  7794. };
  7795. }
  7796. /* */
  7797. function initMixin$1 (Vue) {
  7798. Vue.mixin = function (mixin) {
  7799. this.options = mergeOptions(this.options, mixin);
  7800. return this
  7801. };
  7802. }
  7803. /* */
  7804. function initExtend (Vue) {
  7805. /**
  7806. * Each instance constructor, including Vue, has a unique
  7807. * cid. This enables us to create wrapped "child
  7808. * constructors" for prototypal inheritance and cache them.
  7809. */
  7810. Vue.cid = 0;
  7811. var cid = 1;
  7812. /**
  7813. * Class inheritance
  7814. */
  7815. Vue.extend = function (extendOptions) {
  7816. extendOptions = extendOptions || {};
  7817. var Super = this;
  7818. var SuperId = Super.cid;
  7819. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7820. if (cachedCtors[SuperId]) {
  7821. return cachedCtors[SuperId]
  7822. }
  7823. var name = extendOptions.name || Super.options.name;
  7824. if ( true && name) {
  7825. validateComponentName(name);
  7826. }
  7827. var Sub = function VueComponent (options) {
  7828. this._init(options);
  7829. };
  7830. Sub.prototype = Object.create(Super.prototype);
  7831. Sub.prototype.constructor = Sub;
  7832. Sub.cid = cid++;
  7833. Sub.options = mergeOptions(
  7834. Super.options,
  7835. extendOptions
  7836. );
  7837. Sub['super'] = Super;
  7838. // For props and computed properties, we define the proxy getters on
  7839. // the Vue instances at extension time, on the extended prototype. This
  7840. // avoids Object.defineProperty calls for each instance created.
  7841. if (Sub.options.props) {
  7842. initProps$1(Sub);
  7843. }
  7844. if (Sub.options.computed) {
  7845. initComputed$1(Sub);
  7846. }
  7847. // allow further extension/mixin/plugin usage
  7848. Sub.extend = Super.extend;
  7849. Sub.mixin = Super.mixin;
  7850. Sub.use = Super.use;
  7851. // create asset registers, so extended classes
  7852. // can have their private assets too.
  7853. ASSET_TYPES.forEach(function (type) {
  7854. Sub[type] = Super[type];
  7855. });
  7856. // enable recursive self-lookup
  7857. if (name) {
  7858. Sub.options.components[name] = Sub;
  7859. }
  7860. // keep a reference to the super options at extension time.
  7861. // later at instantiation we can check if Super's options have
  7862. // been updated.
  7863. Sub.superOptions = Super.options;
  7864. Sub.extendOptions = extendOptions;
  7865. Sub.sealedOptions = extend({}, Sub.options);
  7866. // cache constructor
  7867. cachedCtors[SuperId] = Sub;
  7868. return Sub
  7869. };
  7870. }
  7871. function initProps$1 (Comp) {
  7872. var props = Comp.options.props;
  7873. for (var key in props) {
  7874. proxy(Comp.prototype, "_props", key);
  7875. }
  7876. }
  7877. function initComputed$1 (Comp) {
  7878. var computed = Comp.options.computed;
  7879. for (var key in computed) {
  7880. defineComputed(Comp.prototype, key, computed[key]);
  7881. }
  7882. }
  7883. /* */
  7884. function initAssetRegisters (Vue) {
  7885. /**
  7886. * Create asset registration methods.
  7887. */
  7888. ASSET_TYPES.forEach(function (type) {
  7889. Vue[type] = function (
  7890. id,
  7891. definition
  7892. ) {
  7893. if (!definition) {
  7894. return this.options[type + 's'][id]
  7895. } else {
  7896. /* istanbul ignore if */
  7897. if ( true && type === 'component') {
  7898. validateComponentName(id);
  7899. }
  7900. if (type === 'component' && isPlainObject(definition)) {
  7901. definition.name = definition.name || id;
  7902. definition = this.options._base.extend(definition);
  7903. }
  7904. if (type === 'directive' && typeof definition === 'function') {
  7905. definition = { bind: definition, update: definition };
  7906. }
  7907. this.options[type + 's'][id] = definition;
  7908. return definition
  7909. }
  7910. };
  7911. });
  7912. }
  7913. /* */
  7914. function getComponentName (opts) {
  7915. return opts && (opts.Ctor.options.name || opts.tag)
  7916. }
  7917. function matches (pattern, name) {
  7918. if (Array.isArray(pattern)) {
  7919. return pattern.indexOf(name) > -1
  7920. } else if (typeof pattern === 'string') {
  7921. return pattern.split(',').indexOf(name) > -1
  7922. } else if (isRegExp(pattern)) {
  7923. return pattern.test(name)
  7924. }
  7925. /* istanbul ignore next */
  7926. return false
  7927. }
  7928. function pruneCache (keepAliveInstance, filter) {
  7929. var cache = keepAliveInstance.cache;
  7930. var keys = keepAliveInstance.keys;
  7931. var _vnode = keepAliveInstance._vnode;
  7932. for (var key in cache) {
  7933. var cachedNode = cache[key];
  7934. if (cachedNode) {
  7935. var name = getComponentName(cachedNode.componentOptions);
  7936. if (name && !filter(name)) {
  7937. pruneCacheEntry(cache, key, keys, _vnode);
  7938. }
  7939. }
  7940. }
  7941. }
  7942. function pruneCacheEntry (
  7943. cache,
  7944. key,
  7945. keys,
  7946. current
  7947. ) {
  7948. var cached$$1 = cache[key];
  7949. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  7950. cached$$1.componentInstance.$destroy();
  7951. }
  7952. cache[key] = null;
  7953. remove(keys, key);
  7954. }
  7955. var patternTypes = [String, RegExp, Array];
  7956. var KeepAlive = {
  7957. name: 'keep-alive',
  7958. abstract: true,
  7959. props: {
  7960. include: patternTypes,
  7961. exclude: patternTypes,
  7962. max: [String, Number]
  7963. },
  7964. created: function created () {
  7965. this.cache = Object.create(null);
  7966. this.keys = [];
  7967. },
  7968. destroyed: function destroyed () {
  7969. for (var key in this.cache) {
  7970. pruneCacheEntry(this.cache, key, this.keys);
  7971. }
  7972. },
  7973. mounted: function mounted () {
  7974. var this$1 = this;
  7975. this.$watch('include', function (val) {
  7976. pruneCache(this$1, function (name) { return matches(val, name); });
  7977. });
  7978. this.$watch('exclude', function (val) {
  7979. pruneCache(this$1, function (name) { return !matches(val, name); });
  7980. });
  7981. },
  7982. render: function render () {
  7983. var slot = this.$slots.default;
  7984. var vnode = getFirstComponentChild(slot);
  7985. var componentOptions = vnode && vnode.componentOptions;
  7986. if (componentOptions) {
  7987. // check pattern
  7988. var name = getComponentName(componentOptions);
  7989. var ref = this;
  7990. var include = ref.include;
  7991. var exclude = ref.exclude;
  7992. if (
  7993. // not included
  7994. (include && (!name || !matches(include, name))) ||
  7995. // excluded
  7996. (exclude && name && matches(exclude, name))
  7997. ) {
  7998. return vnode
  7999. }
  8000. var ref$1 = this;
  8001. var cache = ref$1.cache;
  8002. var keys = ref$1.keys;
  8003. var key = vnode.key == null
  8004. // same constructor may get registered as different local components
  8005. // so cid alone is not enough (#3269)
  8006. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8007. : vnode.key;
  8008. if (cache[key]) {
  8009. vnode.componentInstance = cache[key].componentInstance;
  8010. // make current key freshest
  8011. remove(keys, key);
  8012. keys.push(key);
  8013. } else {
  8014. cache[key] = vnode;
  8015. keys.push(key);
  8016. // prune oldest entry
  8017. if (this.max && keys.length > parseInt(this.max)) {
  8018. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8019. }
  8020. }
  8021. vnode.data.keepAlive = true;
  8022. }
  8023. return vnode || (slot && slot[0])
  8024. }
  8025. };
  8026. var builtInComponents = {
  8027. KeepAlive: KeepAlive
  8028. };
  8029. /* */
  8030. function initGlobalAPI (Vue) {
  8031. // config
  8032. var configDef = {};
  8033. configDef.get = function () { return config; };
  8034. if (true) {
  8035. configDef.set = function () {
  8036. warn(
  8037. 'Do not replace the Vue.config object, set individual fields instead.'
  8038. );
  8039. };
  8040. }
  8041. Object.defineProperty(Vue, 'config', configDef);
  8042. // exposed util methods.
  8043. // NOTE: these are not considered part of the public API - avoid relying on
  8044. // them unless you are aware of the risk.
  8045. Vue.util = {
  8046. warn: warn,
  8047. extend: extend,
  8048. mergeOptions: mergeOptions,
  8049. defineReactive: defineReactive$$1
  8050. };
  8051. Vue.set = set;
  8052. Vue.delete = del;
  8053. Vue.nextTick = nextTick;
  8054. // 2.6 explicit observable API
  8055. Vue.observable = function (obj) {
  8056. observe(obj);
  8057. return obj
  8058. };
  8059. Vue.options = Object.create(null);
  8060. ASSET_TYPES.forEach(function (type) {
  8061. Vue.options[type + 's'] = Object.create(null);
  8062. });
  8063. // this is used to identify the "base" constructor to extend all plain-object
  8064. // components with in Weex's multi-instance scenarios.
  8065. Vue.options._base = Vue;
  8066. extend(Vue.options.components, builtInComponents);
  8067. initUse(Vue);
  8068. initMixin$1(Vue);
  8069. initExtend(Vue);
  8070. initAssetRegisters(Vue);
  8071. }
  8072. initGlobalAPI(Vue);
  8073. Object.defineProperty(Vue.prototype, '$isServer', {
  8074. get: isServerRendering
  8075. });
  8076. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8077. get: function get () {
  8078. /* istanbul ignore next */
  8079. return this.$vnode && this.$vnode.ssrContext
  8080. }
  8081. });
  8082. // expose FunctionalRenderContext for ssr runtime helper installation
  8083. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8084. value: FunctionalRenderContext
  8085. });
  8086. Vue.version = '2.6.11';
  8087. /**
  8088. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8089. */
  8090. var ARRAYTYPE = '[object Array]';
  8091. var OBJECTTYPE = '[object Object]';
  8092. var NULLTYPE = '[object Null]';
  8093. var UNDEFINEDTYPE = '[object Undefined]';
  8094. // const FUNCTIONTYPE = '[object Function]'
  8095. function diff(current, pre) {
  8096. var result = {};
  8097. syncKeys(current, pre);
  8098. _diff(current, pre, '', result);
  8099. return result
  8100. }
  8101. function syncKeys(current, pre) {
  8102. if (current === pre) { return }
  8103. var rootCurrentType = type(current);
  8104. var rootPreType = type(pre);
  8105. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8106. if(Object.keys(current).length >= Object.keys(pre).length){
  8107. for (var key in pre) {
  8108. var currentValue = current[key];
  8109. if (currentValue === undefined) {
  8110. current[key] = null;
  8111. } else {
  8112. syncKeys(currentValue, pre[key]);
  8113. }
  8114. }
  8115. }
  8116. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8117. if (current.length >= pre.length) {
  8118. pre.forEach(function (item, index) {
  8119. syncKeys(current[index], item);
  8120. });
  8121. }
  8122. }
  8123. }
  8124. function nullOrUndefined(currentType, preType) {
  8125. if(
  8126. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8127. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8128. ) {
  8129. return false
  8130. }
  8131. return true
  8132. }
  8133. function _diff(current, pre, path, result) {
  8134. if (current === pre) { return }
  8135. var rootCurrentType = type(current);
  8136. var rootPreType = type(pre);
  8137. if (rootCurrentType == OBJECTTYPE) {
  8138. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8139. setResult(result, path, current);
  8140. } else {
  8141. var loop = function ( key ) {
  8142. var currentValue = current[key];
  8143. var preValue = pre[key];
  8144. var currentType = type(currentValue);
  8145. var preType = type(preValue);
  8146. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8147. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8148. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8149. }
  8150. } else if (currentType == ARRAYTYPE) {
  8151. if (preType != ARRAYTYPE) {
  8152. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8153. } else {
  8154. if (currentValue.length < preValue.length) {
  8155. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8156. } else {
  8157. currentValue.forEach(function (item, index) {
  8158. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8159. });
  8160. }
  8161. }
  8162. } else if (currentType == OBJECTTYPE) {
  8163. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8164. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8165. } else {
  8166. for (var subKey in currentValue) {
  8167. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8168. }
  8169. }
  8170. }
  8171. };
  8172. for (var key in current) loop( key );
  8173. }
  8174. } else if (rootCurrentType == ARRAYTYPE) {
  8175. if (rootPreType != ARRAYTYPE) {
  8176. setResult(result, path, current);
  8177. } else {
  8178. if (current.length < pre.length) {
  8179. setResult(result, path, current);
  8180. } else {
  8181. current.forEach(function (item, index) {
  8182. _diff(item, pre[index], path + '[' + index + ']', result);
  8183. });
  8184. }
  8185. }
  8186. } else {
  8187. setResult(result, path, current);
  8188. }
  8189. }
  8190. function setResult(result, k, v) {
  8191. // if (type(v) != FUNCTIONTYPE) {
  8192. result[k] = v;
  8193. // }
  8194. }
  8195. function type(obj) {
  8196. return Object.prototype.toString.call(obj)
  8197. }
  8198. /* */
  8199. function flushCallbacks$1(vm) {
  8200. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8201. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8202. var mpInstance = vm.$scope;
  8203. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8204. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8205. }
  8206. var copies = vm.__next_tick_callbacks.slice(0);
  8207. vm.__next_tick_callbacks.length = 0;
  8208. for (var i = 0; i < copies.length; i++) {
  8209. copies[i]();
  8210. }
  8211. }
  8212. }
  8213. function hasRenderWatcher(vm) {
  8214. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8215. }
  8216. function nextTick$1(vm, cb) {
  8217. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8218. //2.nextTick 之前存在 render watcher
  8219. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8220. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8221. var mpInstance = vm.$scope;
  8222. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8223. ']:nextVueTick');
  8224. }
  8225. return nextTick(cb, vm)
  8226. }else{
  8227. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8228. var mpInstance$1 = vm.$scope;
  8229. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8230. ']:nextMPTick');
  8231. }
  8232. }
  8233. var _resolve;
  8234. if (!vm.__next_tick_callbacks) {
  8235. vm.__next_tick_callbacks = [];
  8236. }
  8237. vm.__next_tick_callbacks.push(function () {
  8238. if (cb) {
  8239. try {
  8240. cb.call(vm);
  8241. } catch (e) {
  8242. handleError(e, vm, 'nextTick');
  8243. }
  8244. } else if (_resolve) {
  8245. _resolve(vm);
  8246. }
  8247. });
  8248. // $flow-disable-line
  8249. if (!cb && typeof Promise !== 'undefined') {
  8250. return new Promise(function (resolve) {
  8251. _resolve = resolve;
  8252. })
  8253. }
  8254. }
  8255. /* */
  8256. function clearInstance(key, value) {
  8257. // 简易去除 Vue 和小程序组件实例
  8258. if (value) {
  8259. if (value._isVue || value.__v_isMPComponent) {
  8260. return {}
  8261. }
  8262. }
  8263. return value
  8264. }
  8265. function cloneWithData(vm) {
  8266. // 确保当前 vm 所有数据被同步
  8267. var ret = Object.create(null);
  8268. var dataKeys = [].concat(
  8269. Object.keys(vm._data || {}),
  8270. Object.keys(vm._computedWatchers || {}));
  8271. dataKeys.reduce(function(ret, key) {
  8272. ret[key] = vm[key];
  8273. return ret
  8274. }, ret);
  8275. // vue-composition-api
  8276. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8277. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8278. if (rawBindings) {
  8279. Object.keys(rawBindings).forEach(function (key) {
  8280. ret[key] = vm[key];
  8281. });
  8282. }
  8283. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8284. Object.assign(ret, vm.$mp.data || {});
  8285. if (
  8286. Array.isArray(vm.$options.behaviors) &&
  8287. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8288. ) { //form-field
  8289. ret['name'] = vm.name;
  8290. ret['value'] = vm.value;
  8291. }
  8292. return JSON.parse(JSON.stringify(ret, clearInstance))
  8293. }
  8294. var patch = function(oldVnode, vnode) {
  8295. var this$1 = this;
  8296. if (vnode === null) { //destroy
  8297. return
  8298. }
  8299. if (this.mpType === 'page' || this.mpType === 'component') {
  8300. var mpInstance = this.$scope;
  8301. var data = Object.create(null);
  8302. try {
  8303. data = cloneWithData(this);
  8304. } catch (err) {
  8305. console.error(err);
  8306. }
  8307. data.__webviewId__ = mpInstance.data.__webviewId__;
  8308. var mpData = Object.create(null);
  8309. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8310. mpData[key] = mpInstance.data[key];
  8311. });
  8312. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8313. if (Object.keys(diffData).length) {
  8314. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8315. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8316. ']差量更新',
  8317. JSON.stringify(diffData));
  8318. }
  8319. this.__next_tick_pending = true;
  8320. mpInstance.setData(diffData, function () {
  8321. this$1.__next_tick_pending = false;
  8322. flushCallbacks$1(this$1);
  8323. });
  8324. } else {
  8325. flushCallbacks$1(this);
  8326. }
  8327. }
  8328. };
  8329. /* */
  8330. function createEmptyRender() {
  8331. }
  8332. function mountComponent$1(
  8333. vm,
  8334. el,
  8335. hydrating
  8336. ) {
  8337. if (!vm.mpType) {//main.js 中的 new Vue
  8338. return vm
  8339. }
  8340. if (vm.mpType === 'app') {
  8341. vm.$options.render = createEmptyRender;
  8342. }
  8343. if (!vm.$options.render) {
  8344. vm.$options.render = createEmptyRender;
  8345. if (true) {
  8346. /* istanbul ignore if */
  8347. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8348. vm.$options.el || el) {
  8349. warn(
  8350. 'You are using the runtime-only build of Vue where the template ' +
  8351. 'compiler is not available. Either pre-compile the templates into ' +
  8352. 'render functions, or use the compiler-included build.',
  8353. vm
  8354. );
  8355. } else {
  8356. warn(
  8357. 'Failed to mount component: template or render function not defined.',
  8358. vm
  8359. );
  8360. }
  8361. }
  8362. }
  8363. !vm._$fallback && callHook(vm, 'beforeMount');
  8364. var updateComponent = function () {
  8365. vm._update(vm._render(), hydrating);
  8366. };
  8367. // we set this to vm._watcher inside the watcher's constructor
  8368. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8369. // component's mounted hook), which relies on vm._watcher being already defined
  8370. new Watcher(vm, updateComponent, noop, {
  8371. before: function before() {
  8372. if (vm._isMounted && !vm._isDestroyed) {
  8373. callHook(vm, 'beforeUpdate');
  8374. }
  8375. }
  8376. }, true /* isRenderWatcher */);
  8377. hydrating = false;
  8378. return vm
  8379. }
  8380. /* */
  8381. function renderClass (
  8382. staticClass,
  8383. dynamicClass
  8384. ) {
  8385. if (isDef(staticClass) || isDef(dynamicClass)) {
  8386. return concat(staticClass, stringifyClass(dynamicClass))
  8387. }
  8388. /* istanbul ignore next */
  8389. return ''
  8390. }
  8391. function concat (a, b) {
  8392. return a ? b ? (a + ' ' + b) : a : (b || '')
  8393. }
  8394. function stringifyClass (value) {
  8395. if (Array.isArray(value)) {
  8396. return stringifyArray(value)
  8397. }
  8398. if (isObject(value)) {
  8399. return stringifyObject(value)
  8400. }
  8401. if (typeof value === 'string') {
  8402. return value
  8403. }
  8404. /* istanbul ignore next */
  8405. return ''
  8406. }
  8407. function stringifyArray (value) {
  8408. var res = '';
  8409. var stringified;
  8410. for (var i = 0, l = value.length; i < l; i++) {
  8411. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8412. if (res) { res += ' '; }
  8413. res += stringified;
  8414. }
  8415. }
  8416. return res
  8417. }
  8418. function stringifyObject (value) {
  8419. var res = '';
  8420. for (var key in value) {
  8421. if (value[key]) {
  8422. if (res) { res += ' '; }
  8423. res += key;
  8424. }
  8425. }
  8426. return res
  8427. }
  8428. /* */
  8429. var parseStyleText = cached(function (cssText) {
  8430. var res = {};
  8431. var listDelimiter = /;(?![^(]*\))/g;
  8432. var propertyDelimiter = /:(.+)/;
  8433. cssText.split(listDelimiter).forEach(function (item) {
  8434. if (item) {
  8435. var tmp = item.split(propertyDelimiter);
  8436. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8437. }
  8438. });
  8439. return res
  8440. });
  8441. // normalize possible array / string values into Object
  8442. function normalizeStyleBinding (bindingStyle) {
  8443. if (Array.isArray(bindingStyle)) {
  8444. return toObject(bindingStyle)
  8445. }
  8446. if (typeof bindingStyle === 'string') {
  8447. return parseStyleText(bindingStyle)
  8448. }
  8449. return bindingStyle
  8450. }
  8451. /* */
  8452. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8453. function getTarget(obj, path) {
  8454. var parts = path.split('.');
  8455. var key = parts[0];
  8456. if (key.indexOf('__$n') === 0) { //number index
  8457. key = parseInt(key.replace('__$n', ''));
  8458. }
  8459. if (parts.length === 1) {
  8460. return obj[key]
  8461. }
  8462. return getTarget(obj[key], parts.slice(1).join('.'))
  8463. }
  8464. function internalMixin(Vue) {
  8465. Vue.config.errorHandler = function(err, vm, info) {
  8466. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8467. console.error(err);
  8468. /* eslint-disable no-undef */
  8469. var app = typeof getApp === 'function' && getApp();
  8470. if (app && app.onError) {
  8471. app.onError(err);
  8472. }
  8473. };
  8474. var oldEmit = Vue.prototype.$emit;
  8475. Vue.prototype.$emit = function(event) {
  8476. if (this.$scope && event) {
  8477. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8478. if (triggerEvent) {
  8479. try {
  8480. triggerEvent.call(this.$scope, event, {
  8481. __args__: toArray(arguments, 1)
  8482. });
  8483. } catch (error) {
  8484. }
  8485. }
  8486. }
  8487. return oldEmit.apply(this, arguments)
  8488. };
  8489. Vue.prototype.$nextTick = function(fn) {
  8490. return nextTick$1(this, fn)
  8491. };
  8492. MP_METHODS.forEach(function (method) {
  8493. Vue.prototype[method] = function(args) {
  8494. if (this.$scope && this.$scope[method]) {
  8495. return this.$scope[method](args)
  8496. }
  8497. // mp-alipay
  8498. if (typeof my === 'undefined') {
  8499. return
  8500. }
  8501. if (method === 'createSelectorQuery') {
  8502. /* eslint-disable no-undef */
  8503. return my.createSelectorQuery(args)
  8504. } else if (method === 'createIntersectionObserver') {
  8505. /* eslint-disable no-undef */
  8506. return my.createIntersectionObserver(args)
  8507. }
  8508. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8509. };
  8510. });
  8511. Vue.prototype.__init_provide = initProvide;
  8512. Vue.prototype.__init_injections = initInjections;
  8513. Vue.prototype.__call_hook = function(hook, args) {
  8514. var vm = this;
  8515. // #7573 disable dep collection when invoking lifecycle hooks
  8516. pushTarget();
  8517. var handlers = vm.$options[hook];
  8518. var info = hook + " hook";
  8519. var ret;
  8520. if (handlers) {
  8521. for (var i = 0, j = handlers.length; i < j; i++) {
  8522. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8523. }
  8524. }
  8525. if (vm._hasHookEvent) {
  8526. vm.$emit('hook:' + hook, args);
  8527. }
  8528. popTarget();
  8529. return ret
  8530. };
  8531. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8532. if (Array.isArray(modifiers)) {
  8533. if (modifiers.indexOf('trim') !== -1) {
  8534. value = value.trim();
  8535. }
  8536. if (modifiers.indexOf('number') !== -1) {
  8537. value = this._n(value);
  8538. }
  8539. }
  8540. if (!target) {
  8541. target = this;
  8542. }
  8543. // 解决动态属性添加
  8544. Vue.set(target, key, value);
  8545. };
  8546. Vue.prototype.__set_sync = function(target, key, value) {
  8547. if (!target) {
  8548. target = this;
  8549. }
  8550. // 解决动态属性添加
  8551. Vue.set(target, key, value);
  8552. };
  8553. Vue.prototype.__get_orig = function(item) {
  8554. if (isPlainObject(item)) {
  8555. return item['$orig'] || item
  8556. }
  8557. return item
  8558. };
  8559. Vue.prototype.__get_value = function(dataPath, target) {
  8560. return getTarget(target || this, dataPath)
  8561. };
  8562. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8563. return renderClass(staticClass, dynamicClass)
  8564. };
  8565. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8566. if (!dynamicStyle && !staticStyle) {
  8567. return ''
  8568. }
  8569. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8570. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8571. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8572. };
  8573. Vue.prototype.__map = function(val, iteratee) {
  8574. //TODO 暂不考虑 string
  8575. var ret, i, l, keys, key;
  8576. if (Array.isArray(val)) {
  8577. ret = new Array(val.length);
  8578. for (i = 0, l = val.length; i < l; i++) {
  8579. ret[i] = iteratee(val[i], i);
  8580. }
  8581. return ret
  8582. } else if (isObject(val)) {
  8583. keys = Object.keys(val);
  8584. ret = Object.create(null);
  8585. for (i = 0, l = keys.length; i < l; i++) {
  8586. key = keys[i];
  8587. ret[key] = iteratee(val[key], key, i);
  8588. }
  8589. return ret
  8590. } else if (typeof val === 'number') {
  8591. ret = new Array(val);
  8592. for (i = 0, l = val; i < l; i++) {
  8593. // 第一个参数暂时仍和小程序一致
  8594. ret[i] = iteratee(i, i);
  8595. }
  8596. return ret
  8597. }
  8598. return []
  8599. };
  8600. }
  8601. /* */
  8602. var LIFECYCLE_HOOKS$1 = [
  8603. //App
  8604. 'onLaunch',
  8605. 'onShow',
  8606. 'onHide',
  8607. 'onUniNViewMessage',
  8608. 'onPageNotFound',
  8609. 'onThemeChange',
  8610. 'onError',
  8611. 'onUnhandledRejection',
  8612. //Page
  8613. 'onInit',
  8614. 'onLoad',
  8615. // 'onShow',
  8616. 'onReady',
  8617. // 'onHide',
  8618. 'onUnload',
  8619. 'onPullDownRefresh',
  8620. 'onReachBottom',
  8621. 'onTabItemTap',
  8622. 'onAddToFavorites',
  8623. 'onShareTimeline',
  8624. 'onShareAppMessage',
  8625. 'onResize',
  8626. 'onPageScroll',
  8627. 'onNavigationBarButtonTap',
  8628. 'onBackPress',
  8629. 'onNavigationBarSearchInputChanged',
  8630. 'onNavigationBarSearchInputConfirmed',
  8631. 'onNavigationBarSearchInputClicked',
  8632. 'onUploadDouyinVideo',
  8633. 'onNFCReadMessage',
  8634. //Component
  8635. // 'onReady', // 兼容旧版本,应该移除该事件
  8636. 'onPageShow',
  8637. 'onPageHide',
  8638. 'onPageResize'
  8639. ];
  8640. function lifecycleMixin$1(Vue) {
  8641. //fixed vue-class-component
  8642. var oldExtend = Vue.extend;
  8643. Vue.extend = function(extendOptions) {
  8644. extendOptions = extendOptions || {};
  8645. var methods = extendOptions.methods;
  8646. if (methods) {
  8647. Object.keys(methods).forEach(function (methodName) {
  8648. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8649. extendOptions[methodName] = methods[methodName];
  8650. delete methods[methodName];
  8651. }
  8652. });
  8653. }
  8654. return oldExtend.call(this, extendOptions)
  8655. };
  8656. var strategies = Vue.config.optionMergeStrategies;
  8657. var mergeHook = strategies.created;
  8658. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8659. strategies[hook] = mergeHook;
  8660. });
  8661. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8662. }
  8663. /* */
  8664. // install platform patch function
  8665. Vue.prototype.__patch__ = patch;
  8666. // public mount method
  8667. Vue.prototype.$mount = function(
  8668. el ,
  8669. hydrating
  8670. ) {
  8671. return mountComponent$1(this, el, hydrating)
  8672. };
  8673. lifecycleMixin$1(Vue);
  8674. internalMixin(Vue);
  8675. /* */
  8676. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8677. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8678. /***/ }),
  8679. /***/ 26:
  8680. /*!*********************************************!*\
  8681. !*** E:/Desktop/zd_wechatApp(1)/pages.json ***!
  8682. \*********************************************/
  8683. /*! no static exports found */
  8684. /***/ (function(module, exports) {
  8685. /***/ }),
  8686. /***/ 3:
  8687. /*!***********************************!*\
  8688. !*** (webpack)/buildin/global.js ***!
  8689. \***********************************/
  8690. /*! no static exports found */
  8691. /***/ (function(module, exports) {
  8692. var g;
  8693. // This works in non-strict mode
  8694. g = (function() {
  8695. return this;
  8696. })();
  8697. try {
  8698. // This works if eval is allowed (see CSP)
  8699. g = g || new Function("return this")();
  8700. } catch (e) {
  8701. // This works if the window reference is available
  8702. if (typeof window === "object") g = window;
  8703. }
  8704. // g can still be undefined, but nothing to do about it...
  8705. // We return undefined, instead of nothing here, so it's
  8706. // easier to handle this case. if(!global) { ...}
  8707. module.exports = g;
  8708. /***/ }),
  8709. /***/ 32:
  8710. /*!**********************************************************************************************************!*\
  8711. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  8712. \**********************************************************************************************************/
  8713. /*! exports provided: default */
  8714. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8715. "use strict";
  8716. __webpack_require__.r(__webpack_exports__);
  8717. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  8718. /* globals __VUE_SSR_CONTEXT__ */
  8719. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  8720. // This module is a runtime utility for cleaner component module output and will
  8721. // be included in the final webpack user bundle.
  8722. function normalizeComponent (
  8723. scriptExports,
  8724. render,
  8725. staticRenderFns,
  8726. functionalTemplate,
  8727. injectStyles,
  8728. scopeId,
  8729. moduleIdentifier, /* server only */
  8730. shadowMode, /* vue-cli only */
  8731. components, // fixed by xxxxxx auto components
  8732. renderjs // fixed by xxxxxx renderjs
  8733. ) {
  8734. // Vue.extend constructor export interop
  8735. var options = typeof scriptExports === 'function'
  8736. ? scriptExports.options
  8737. : scriptExports
  8738. // fixed by xxxxxx auto components
  8739. if (components) {
  8740. if (!options.components) {
  8741. options.components = {}
  8742. }
  8743. var hasOwn = Object.prototype.hasOwnProperty
  8744. for (var name in components) {
  8745. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  8746. options.components[name] = components[name]
  8747. }
  8748. }
  8749. }
  8750. // fixed by xxxxxx renderjs
  8751. if (renderjs) {
  8752. if(typeof renderjs.beforeCreate === 'function'){
  8753. renderjs.beforeCreate = [renderjs.beforeCreate]
  8754. }
  8755. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  8756. this[renderjs.__module] = this
  8757. });
  8758. (options.mixins || (options.mixins = [])).push(renderjs)
  8759. }
  8760. // render functions
  8761. if (render) {
  8762. options.render = render
  8763. options.staticRenderFns = staticRenderFns
  8764. options._compiled = true
  8765. }
  8766. // functional template
  8767. if (functionalTemplate) {
  8768. options.functional = true
  8769. }
  8770. // scopedId
  8771. if (scopeId) {
  8772. options._scopeId = 'data-v-' + scopeId
  8773. }
  8774. var hook
  8775. if (moduleIdentifier) { // server build
  8776. hook = function (context) {
  8777. // 2.3 injection
  8778. context =
  8779. context || // cached call
  8780. (this.$vnode && this.$vnode.ssrContext) || // stateful
  8781. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  8782. // 2.2 with runInNewContext: true
  8783. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  8784. context = __VUE_SSR_CONTEXT__
  8785. }
  8786. // inject component styles
  8787. if (injectStyles) {
  8788. injectStyles.call(this, context)
  8789. }
  8790. // register component module identifier for async chunk inferrence
  8791. if (context && context._registeredComponents) {
  8792. context._registeredComponents.add(moduleIdentifier)
  8793. }
  8794. }
  8795. // used by ssr in case component is cached and beforeCreate
  8796. // never gets called
  8797. options._ssrRegister = hook
  8798. } else if (injectStyles) {
  8799. hook = shadowMode
  8800. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  8801. : injectStyles
  8802. }
  8803. if (hook) {
  8804. if (options.functional) {
  8805. // for template-only hot-reload because in that case the render fn doesn't
  8806. // go through the normalizer
  8807. options._injectStyles = hook
  8808. // register for functioal component in vue file
  8809. var originalRender = options.render
  8810. options.render = function renderWithStyleInjection (h, context) {
  8811. hook.call(context)
  8812. return originalRender(h, context)
  8813. }
  8814. } else {
  8815. // inject component registration as beforeCreate hook
  8816. var existing = options.beforeCreate
  8817. options.beforeCreate = existing
  8818. ? [].concat(existing, hook)
  8819. : [hook]
  8820. }
  8821. }
  8822. return {
  8823. exports: scriptExports,
  8824. options: options
  8825. }
  8826. }
  8827. /***/ }),
  8828. /***/ 33:
  8829. /*!***********************************************!*\
  8830. !*** E:/Desktop/zd_wechatApp(1)/api/index.js ***!
  8831. \***********************************************/
  8832. /*! no static exports found */
  8833. /***/ (function(module, exports, __webpack_require__) {
  8834. "use strict";
  8835. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  8836. Object.defineProperty(exports, "__esModule", {
  8837. value: true
  8838. });
  8839. exports.default = void 0;
  8840. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  8841. var _common = _interopRequireDefault(__webpack_require__(/*! ./common.js */ 34));
  8842. var _login = _interopRequireDefault(__webpack_require__(/*! ./login.js */ 37));
  8843. 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; }
  8844. 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; }
  8845. var service = _objectSpread(_objectSpread({}, _common.default), _login.default);
  8846. var _default = service;
  8847. exports.default = _default;
  8848. /***/ }),
  8849. /***/ 34:
  8850. /*!************************************************!*\
  8851. !*** E:/Desktop/zd_wechatApp(1)/api/common.js ***!
  8852. \************************************************/
  8853. /*! no static exports found */
  8854. /***/ (function(module, exports, __webpack_require__) {
  8855. "use strict";
  8856. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  8857. Object.defineProperty(exports, "__esModule", {
  8858. value: true
  8859. });
  8860. exports.default = void 0;
  8861. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  8862. var _request = _interopRequireDefault(__webpack_require__(/*! ../common/request.js */ 35));
  8863. var _getDistrict$getUnit$;
  8864. var _default = (_getDistrict$getUnit$ = {
  8865. //选择行政区
  8866. getDistrict: function getDistrict(data) {
  8867. return _request.default.requestFn("/system/dict/data/type/district", data);
  8868. },
  8869. // //选择小区
  8870. // getArea(data) {
  8871. // return utils.requestEn(`/mobile/area/getArea`, data)
  8872. // },
  8873. //选择单元
  8874. getUnit: function getUnit(data) {
  8875. return _request.default.requestEn("/mobile/unit/getUnit", data);
  8876. },
  8877. //选择楼宇
  8878. getBuilding: function getBuilding(data) {
  8879. return _request.default.requestEn("/mobile/building/getBuilding", data);
  8880. },
  8881. //选择房屋(门牌)
  8882. getHouse: function getHouse(data) {
  8883. return _request.default.requestEn("/mobile/house/getHouse", data);
  8884. },
  8885. //公告列表
  8886. getNoticeList: function getNoticeList(data) {
  8887. return _request.default.requestEn("/mobile/notice/getNotice", data);
  8888. },
  8889. //关于我们
  8890. getAboutUs: function getAboutUs(data) {
  8891. return _request.default.requestEn("/mobile/aboutUs/getOne", data);
  8892. },
  8893. //服务说明
  8894. getExplain: function getExplain(data) {
  8895. return _request.default.requestEn("/mobile/explain/getOne", data);
  8896. },
  8897. //上门类型
  8898. getDic: function getDic(data) {
  8899. return _request.default.requestEn("/mobile/order/getDic", data);
  8900. },
  8901. //管子类别
  8902. getPipeType: function getPipeType(data) {
  8903. return _request.default.requestEn("/mobile/pipeType/getPipeType", data);
  8904. },
  8905. //管子长度
  8906. getPipeLength: function getPipeLength(data) {
  8907. return _request.default.requestEn("/mobile/pipeLength/getPipeLength", data);
  8908. },
  8909. //历史施工
  8910. getListAll: function getListAll(data) {
  8911. return _request.default.requestFn("/mobile/order/getListAll", data);
  8912. },
  8913. //历史施工(查看详情页)
  8914. getOrderPhoto: function getOrderPhoto(data) {
  8915. return _request.default.requestEn("/mobile/orderPhoto/getPhoto", data);
  8916. },
  8917. //提交数据
  8918. submitOrder: function submitOrder(data) {
  8919. return _request.default.requestFn("/mobile/order", data, 'POST');
  8920. },
  8921. //工程列表
  8922. getEngineList: function getEngineList(data) {
  8923. return _request.default.requestEn("/mobile/otherEngine/getList", data);
  8924. },
  8925. //查看非市政项目
  8926. getEngineDetail: function getEngineDetail(data) {
  8927. return _request.default.requestEn("/mobile/otherEngine/getById", data);
  8928. },
  8929. //查看非市政项目页 确认上传照片
  8930. updateEnginePhoto: function updateEnginePhoto(data) {
  8931. return _request.default.requestFn("/mobile/otherEngine", data, 'PUT');
  8932. },
  8933. //门牌验证
  8934. // getOrderForStatus(data){
  8935. // return utils.requestEn(`/mobile/order/getOrderForStatus`, data)
  8936. // },
  8937. //首页轮播图
  8938. getLunBo: function getLunBo(data) {
  8939. return _request.default.requestEn("/mobile/rotation/list", data);
  8940. },
  8941. //获取项目类型
  8942. getProjectType: function getProjectType(data) {
  8943. return _request.default.requestEn("/mobile/order/getDic", data);
  8944. },
  8945. //获取项目列表
  8946. getProjectList: function getProjectList(data) {
  8947. return _request.default.requestEn("/mobile/otherEngine/getList", data);
  8948. },
  8949. //自闭阀类型
  8950. getProject: function getProject(data) {
  8951. return _request.default.requestEn("/mobile/valve/getValveType", data);
  8952. },
  8953. //上传照片
  8954. getImage: function getImage(data) {
  8955. return _request.default.requestFn("/obs", data, 'POST');
  8956. },
  8957. //获取用户名
  8958. getUserName: function getUserName(data) {
  8959. return _request.default.requestFn("/mobile/user/getName", data);
  8960. },
  8961. //工程列表
  8962. getList: function getList(data) {
  8963. return _request.default.requestEn("/mobile/order/getList", data);
  8964. },
  8965. //小区合格率
  8966. getExamineArea: function getExamineArea(data) {
  8967. return _request.default.requestEn("/mobile/area/getExamineArea", data);
  8968. },
  8969. //列表
  8970. getOtherList: function getOtherList(data) {
  8971. return _request.default.requestEn("/mobile/order/getOtherList", data);
  8972. },
  8973. //职工合格率
  8974. getExamineWorker: function getExamineWorker(data) {
  8975. return _request.default.requestEn("/mobile/area/getExamineWorker", data);
  8976. },
  8977. //小区服务统计
  8978. getExamineServe: function getExamineServe(data) {
  8979. return _request.default.requestEn("/mobile/area/getExamineServe", data);
  8980. },
  8981. //管材类别统计
  8982. getExaminePipeType: function getExaminePipeType(data) {
  8983. return _request.default.requestEn("/mobile/area/getExaminePipeType", data);
  8984. },
  8985. //管材长度统计
  8986. getExaminePipeLength: function getExaminePipeLength(data) {
  8987. return _request.default.requestEn("/mobile/area/getExaminePipeLength", data);
  8988. },
  8989. //自闭阀类别统计
  8990. getExamineValveType: function getExamineValveType(data) {
  8991. return _request.default.requestEn("/mobile/area/getExamineValveType", data);
  8992. },
  8993. //小区汇总统计
  8994. getAreaSum: function getAreaSum(data) {
  8995. return _request.default.requestEn("/mobile/area/getAreaSum", data);
  8996. },
  8997. //获取职工
  8998. getWorker: function getWorker(data) {
  8999. return _request.default.requestEn("/mobile/area/getWorker", data);
  9000. },
  9001. getById: function getById(data) {
  9002. return _request.default.requestEn("/mobile/order/getById", data);
  9003. },
  9004. getOrderList: function getOrderList(data) {
  9005. return _request.default.requestEn("/mobile/order/getList", data);
  9006. },
  9007. //修改
  9008. getUpdateOrder: function getUpdateOrder(data) {
  9009. return _request.default.requestFn("/mobile/order", data, 'PUT');
  9010. },
  9011. //选择门牌(安检,工程管理页)
  9012. getAllHouse: function getAllHouse(data) {
  9013. return _request.default.requestEn("/mobile/house/getAllHouse", data);
  9014. },
  9015. //选择门牌(安检,工程管理页)
  9016. getDictInfo: function getDictInfo(data) {
  9017. return _request.default.requestEn("/mobile/sysInfo/dict", data);
  9018. },
  9019. //选择门牌(安检,工程管理页)
  9020. getUnitList: function getUnitList(data) {
  9021. return _request.default.requestEn("/mobile/unit/getUnit", data);
  9022. },
  9023. getBuildingList: function getBuildingList(data) {
  9024. return _request.default.requestEn("/mobile/building/getBuilding", data);
  9025. },
  9026. getArea: function getArea(data) {
  9027. return _request.default.requestEn("/mobile/area/getArea", data);
  9028. },
  9029. getDictInfoList: function getDictInfoList(data) {
  9030. return _request.default.requestEn("/mobile/sysInfo/dictlist", data, 'POST');
  9031. },
  9032. setregulatorBox: function setregulatorBox(data) {
  9033. return _request.default.requestEn("/mobile/regulatorBox", data, 'POST');
  9034. },
  9035. setwarningPile: function setwarningPile(data) {
  9036. return _request.default.requestEn("/mobile/warningPile", data, 'Put');
  9037. },
  9038. getwarningPileList: function getwarningPileList(data) {
  9039. return _request.default.requestEn("/mobile/warningPile/getList", data);
  9040. },
  9041. getwarningPileInfo: function getwarningPileInfo(data) {
  9042. return _request.default.requestEn("/mobile/warningPile/".concat(data));
  9043. },
  9044. setcourtyardNetworkManagement: function setcourtyardNetworkManagement(data) {
  9045. return _request.default.requestEn("/mobile/courtyardNetworkManagement", data, 'POST');
  9046. },
  9047. setemergencyRepair: function setemergencyRepair(data) {
  9048. return _request.default.requestEn("/mobile/emergencyRepair", data, 'POST');
  9049. },
  9050. getOne: function getOne() {
  9051. return _request.default.requestEn("/mobile/explain/getOne");
  9052. }
  9053. }, (0, _defineProperty2.default)(_getDistrict$getUnit$, "getWorker", function getWorker() {
  9054. return _request.default.requestEn("/mobile/user/getWorker");
  9055. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getSearch", function getSearch(data) {
  9056. return _request.default.requestEn("/mobile/sysInfo/search", data, 'POST');
  9057. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getcourtyardNetworkManagement", function getcourtyardNetworkManagement(data) {
  9058. return _request.default.requestEn("/mobile/courtyardNetworkManagement/".concat(data));
  9059. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getemergencyRepair", function getemergencyRepair(data) {
  9060. return _request.default.requestEn("/mobile/emergencyRepair/".concat(data));
  9061. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getregulatorBox", function getregulatorBox(data) {
  9062. return _request.default.requestEn("/mobile/regulatorBox/".concat(data));
  9063. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getwarningPile", function getwarningPile(data) {
  9064. return _request.default.requestEn("/mobile/warningPile/".concat(data));
  9065. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "patrolRecord", function patrolRecord(data) {
  9066. return _request.default.requestEn("/mobile/patrolRecord", data, 'POST');
  9067. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getpatrolRecord", function getpatrolRecord(data) {
  9068. return _request.default.requestEn("/mobile/patrolRecord/".concat(data));
  9069. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getAdministrativeOffice", function getAdministrativeOffice(data) {
  9070. return _request.default.requestEn("/mobile/regulatorBox/getAdministrativeOffice", data);
  9071. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getregulatorBoxList", function getregulatorBoxList(data) {
  9072. return _request.default.requestEn("/mobile/regulatorBoxList/list", data);
  9073. }), _getDistrict$getUnit$);
  9074. exports.default = _default;
  9075. /***/ }),
  9076. /***/ 35:
  9077. /*!****************************************************!*\
  9078. !*** E:/Desktop/zd_wechatApp(1)/common/request.js ***!
  9079. \****************************************************/
  9080. /*! no static exports found */
  9081. /***/ (function(module, exports, __webpack_require__) {
  9082. "use strict";
  9083. /* WEBPACK VAR INJECTION */(function(uni) {
  9084. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9085. Object.defineProperty(exports, "__esModule", {
  9086. value: true
  9087. });
  9088. exports.default = void 0;
  9089. var _http = _interopRequireDefault(__webpack_require__(/*! ./http.js */ 36));
  9090. var _default = {
  9091. // 请求方法
  9092. requestEn: function requestEn(url) {
  9093. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9094. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9095. return new Promise(function (resolve, reject) {
  9096. // console.log(http.webUrl + url +'---'+ uni.getStorageSync('token'))
  9097. uni.request({
  9098. url: _http.default.webUrl + url,
  9099. method: methods ? methods : 'GET',
  9100. data: data,
  9101. success: function success(res) {
  9102. if (res.data.code === 200) {
  9103. resolve(res.data.data === undefined ? null : res.data.data);
  9104. } else if (res.data.code === 403 || res.data.code === 401) {
  9105. uni.showToast({
  9106. title: 'Token超时,请重新登录',
  9107. icon: 'none'
  9108. });
  9109. if (uni.getStorageSync('token')) {
  9110. uni.removeStorage({
  9111. key: 'token',
  9112. success: function success() {
  9113. uni.navigateTo({
  9114. url: '/pages/login/login'
  9115. });
  9116. }
  9117. });
  9118. } else {
  9119. uni.navigateTo({
  9120. url: '/pages/login/login'
  9121. });
  9122. }
  9123. } else {
  9124. uni.showToast({
  9125. title: res.data.msg ? res.data.msg : '系统异常',
  9126. icon: 'none'
  9127. });
  9128. }
  9129. },
  9130. fail: function fail() {
  9131. uni.showToast({
  9132. title: '网络异常',
  9133. icon: 'none'
  9134. });
  9135. }
  9136. });
  9137. });
  9138. },
  9139. // 请求方法
  9140. requestFn: function requestFn(url) {
  9141. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9142. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9143. return new Promise(function (resolve, reject) {
  9144. console.log(_http.default.webUrl + url + '---' + uni.getStorageSync('token'));
  9145. uni.request({
  9146. url: _http.default.webUrl + url,
  9147. method: methods ? methods : 'GET',
  9148. data: data,
  9149. header: {
  9150. "MAuthorization": "wxBearer ".concat(uni.getStorageSync('token') ? uni.getStorageSync('token') : ''),
  9151. "userType": 'MOdBILE'
  9152. },
  9153. success: function success(res) {
  9154. console.log(res);
  9155. if (res.data.code === 200) {
  9156. resolve(res.data.data === undefined ? null : res.data.data);
  9157. } else if (res.data.code === 403 || res.data.code === 401) {
  9158. uni.showToast({
  9159. title: 'Token超时,请重新登录',
  9160. icon: 'none'
  9161. });
  9162. if (uni.getStorageSync('token')) {
  9163. uni.removeStorage({
  9164. key: 'token',
  9165. success: function success() {
  9166. uni.navigateTo({
  9167. url: '/pages/login/login'
  9168. });
  9169. }
  9170. });
  9171. } else {
  9172. uni.navigateTo({
  9173. url: '/pages/login/login'
  9174. });
  9175. }
  9176. } else {
  9177. uni.showToast({
  9178. title: res.data.msg ? res.data.msg : '系统异常',
  9179. icon: 'none'
  9180. });
  9181. }
  9182. },
  9183. fail: function fail() {
  9184. uni.showToast({
  9185. title: '网络异常',
  9186. icon: 'none'
  9187. });
  9188. }
  9189. });
  9190. });
  9191. },
  9192. requestLo: function requestLo(url) {
  9193. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9194. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9195. return new Promise(function (resolve, reject) {
  9196. console.log(_http.default.webUrl + url);
  9197. uni.request({
  9198. url: _http.default.webUrl + url,
  9199. method: methods ? methods : 'GET',
  9200. data: data,
  9201. header: {
  9202. "userType": 'MOBILE'
  9203. },
  9204. success: function success(res) {
  9205. console.log(res);
  9206. if (res.data.code === 200) {
  9207. resolve(res.data === undefined ? null : res.data);
  9208. } else if (res.data.code === 403) {
  9209. uni.showToast({
  9210. title: res.data.msg ? res.data.msg : 'Token超时,请重新登录',
  9211. icon: 'none'
  9212. });
  9213. if (uni.getStorageSync('token')) {
  9214. uni.removeStorage({
  9215. key: 'token',
  9216. success: function success() {
  9217. uni.navigateTo({
  9218. url: '/pages/login/login'
  9219. });
  9220. }
  9221. });
  9222. } else {
  9223. uni.navigateTo({
  9224. url: '/pages/login/login'
  9225. });
  9226. }
  9227. } else {
  9228. uni.showToast({
  9229. title: res.data.msg ? res.data.msg : '系统异常',
  9230. icon: 'none'
  9231. });
  9232. }
  9233. },
  9234. fail: function fail() {
  9235. uni.showToast({
  9236. title: '网络异常',
  9237. icon: 'none'
  9238. });
  9239. }
  9240. });
  9241. });
  9242. }
  9243. };
  9244. exports.default = _default;
  9245. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9246. /***/ }),
  9247. /***/ 36:
  9248. /*!*************************************************!*\
  9249. !*** E:/Desktop/zd_wechatApp(1)/common/http.js ***!
  9250. \*************************************************/
  9251. /*! no static exports found */
  9252. /***/ (function(module, exports, __webpack_require__) {
  9253. "use strict";
  9254. Object.defineProperty(exports, "__esModule", {
  9255. value: true
  9256. });
  9257. exports.default = void 0;
  9258. // 配置信息
  9259. var _default = {
  9260. // webUrl: 'http://127.0.0.1:8080',
  9261. // webUrl: 'https://www.cczdsz.cn/prod-api/',
  9262. // webUrl: 'http://124.221.101.24:8082',
  9263. webUrl: 'http://192.168.4.20:8081'
  9264. };
  9265. exports.default = _default;
  9266. /***/ }),
  9267. /***/ 366:
  9268. /*!****************************************************************!*\
  9269. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/emitter.js ***!
  9270. \****************************************************************/
  9271. /*! no static exports found */
  9272. /***/ (function(module, exports, __webpack_require__) {
  9273. "use strict";
  9274. Object.defineProperty(exports, "__esModule", {
  9275. value: true
  9276. });
  9277. exports.default = void 0;
  9278. /**
  9279. * 递归使用 call 方式this指向
  9280. * @param componentName // 需要找的组件的名称
  9281. * @param eventName // 事件名称
  9282. * @param params // 需要传递的参数
  9283. */
  9284. function _broadcast(componentName, eventName, params) {
  9285. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  9286. this.$children.map(function (child) {
  9287. if (componentName === child.$options.name) {
  9288. child.$emit.apply(child, [eventName].concat(params));
  9289. } else {
  9290. _broadcast.apply(child, [componentName, eventName].concat(params));
  9291. }
  9292. });
  9293. }
  9294. var _default = {
  9295. methods: {
  9296. /**
  9297. * 派发 (向上查找) (一个)
  9298. * @param componentName // 需要找的组件的名称
  9299. * @param eventName // 事件名称
  9300. * @param params // 需要传递的参数
  9301. */
  9302. dispatch: function dispatch(componentName, eventName, params) {
  9303. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  9304. var name = parent.$options.name; // 获取当前组件实例的name
  9305. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  9306. // 循环出当前名称的一样的组件实例
  9307. while (parent && (!name || name !== componentName)) {
  9308. parent = parent.$parent;
  9309. if (parent) {
  9310. name = parent.$options.name;
  9311. }
  9312. }
  9313. // 有节点表示当前找到了name一样的实例
  9314. if (parent) {
  9315. parent.$emit.apply(parent, [eventName].concat(params));
  9316. }
  9317. },
  9318. /**
  9319. * 广播 (向下查找) (广播多个)
  9320. * @param componentName // 需要找的组件的名称
  9321. * @param eventName // 事件名称
  9322. * @param params // 需要传递的参数
  9323. */
  9324. broadcast: function broadcast(componentName, eventName, params) {
  9325. _broadcast.call(this, componentName, eventName, params);
  9326. }
  9327. }
  9328. };
  9329. exports.default = _default;
  9330. /***/ }),
  9331. /***/ 37:
  9332. /*!***********************************************!*\
  9333. !*** E:/Desktop/zd_wechatApp(1)/api/login.js ***!
  9334. \***********************************************/
  9335. /*! no static exports found */
  9336. /***/ (function(module, exports, __webpack_require__) {
  9337. "use strict";
  9338. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9339. Object.defineProperty(exports, "__esModule", {
  9340. value: true
  9341. });
  9342. exports.default = void 0;
  9343. var _request = _interopRequireDefault(__webpack_require__(/*! ../common/request.js */ 35));
  9344. var _default = {
  9345. // 登录
  9346. login: function login(data) {
  9347. return _request.default.requestEn('/mobile/user', data, 'POST');
  9348. }
  9349. };
  9350. exports.default = _default;
  9351. /***/ }),
  9352. /***/ 38:
  9353. /*!**************************************************!*\
  9354. !*** E:/Desktop/zd_wechatApp(1)/common/utils.js ***!
  9355. \**************************************************/
  9356. /*! no static exports found */
  9357. /***/ (function(module, exports, __webpack_require__) {
  9358. "use strict";
  9359. /* WEBPACK VAR INJECTION */(function(uni) {
  9360. Object.defineProperty(exports, "__esModule", {
  9361. value: true
  9362. });
  9363. exports.default = void 0;
  9364. var _default = {
  9365. // 页面提示信息函数
  9366. showPrompt: function showPrompt(msg) {
  9367. uni.showToast({
  9368. title: msg,
  9369. icon: 'none',
  9370. mask: true
  9371. });
  9372. },
  9373. // APP名称
  9374. appName: function appName() {
  9375. return "贞达市政工程";
  9376. },
  9377. formatRichText: function formatRichText(html) {
  9378. var newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
  9379. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  9380. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  9381. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  9382. return match;
  9383. });
  9384. newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {
  9385. match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
  9386. return match;
  9387. });
  9388. newContent = newContent.replace(/<br[^>]*\/>/gi, '');
  9389. newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"');
  9390. return newContent;
  9391. },
  9392. getHeight: function getHeight(e) {
  9393. console.log(e);
  9394. },
  9395. changeTwoDecimal_f: function changeTwoDecimal_f(x) {
  9396. var f_x = parseFloat(x);
  9397. if (isNaN(f_x)) {
  9398. return 0;
  9399. }
  9400. var f_x = Math.round(x * 100) / 100;
  9401. var s_x = f_x.toString();
  9402. var pos_decimal = s_x.indexOf('.');
  9403. if (pos_decimal < 0) {
  9404. pos_decimal = s_x.length;
  9405. s_x += '.';
  9406. }
  9407. while (s_x.length <= pos_decimal + 2) {
  9408. s_x += '0';
  9409. }
  9410. return s_x;
  9411. },
  9412. // token过期
  9413. tokenOverdue: function tokenOverdue() {
  9414. uni.setStorage({
  9415. key: "jumpUrl",
  9416. data: ''
  9417. });
  9418. uni.setStorage({
  9419. key: "jumpType",
  9420. data: ''
  9421. });
  9422. uni.navigateTo({
  9423. url: "/pages/login/login"
  9424. });
  9425. },
  9426. checkLoginTo: function checkLoginTo(url, type) {
  9427. console.log(type);
  9428. var status = uni.getStorageSync('token');
  9429. console.log(status);
  9430. if (status) {
  9431. uni.navigateTo({
  9432. url: url
  9433. });
  9434. } else {
  9435. uni.showModal({
  9436. title: '',
  9437. content: '您未登录,是否登录?',
  9438. success: function success(res) {
  9439. if (res.confirm) {
  9440. uni.setStorage({
  9441. key: "jumpUrl",
  9442. data: url
  9443. });
  9444. uni.setStorage({
  9445. key: "jumpType",
  9446. data: type
  9447. });
  9448. uni.navigateTo({
  9449. url: "/pages/login/login"
  9450. });
  9451. }
  9452. }
  9453. });
  9454. }
  9455. },
  9456. // 拨打电话
  9457. toCall: function toCall(tel) {
  9458. if (!tel) {
  9459. this.showPrompt('暂无商家电话');
  9460. return;
  9461. }
  9462. uni.makePhoneCall({
  9463. phoneNumber: tel
  9464. });
  9465. },
  9466. toBack: function toBack() {
  9467. uni.navigateBack({
  9468. delta: 1
  9469. });
  9470. },
  9471. // 图片预览
  9472. previewImage: function previewImage(url) {
  9473. var urlList = [];
  9474. if (typeof url == 'string') {
  9475. urlList.push(url);
  9476. } else {
  9477. urlList = url;
  9478. }
  9479. uni.previewImage({
  9480. urls: urlList
  9481. });
  9482. },
  9483. // 登录成功后的跳转
  9484. loginSuccess: function loginSuccess() {
  9485. var type = uni.getStorageSync('jumpType');
  9486. // console.log(type)
  9487. if (type) {
  9488. var url = uni.getStorageSync('jumpUrl');
  9489. // console.log(url)
  9490. if (!url) {
  9491. uni.navigateBack({
  9492. delta: 1
  9493. });
  9494. return;
  9495. }
  9496. if (type == 'page') {
  9497. uni.redirectTo({
  9498. url: url
  9499. });
  9500. } else {
  9501. uni.switchTab({
  9502. url: url,
  9503. fail: function fail(error) {
  9504. console.log(error);
  9505. }
  9506. });
  9507. }
  9508. } else {
  9509. // uni.switchTab({
  9510. // url: "/pages/index/index"
  9511. // })
  9512. uni.navigateBack({
  9513. delta: 1
  9514. });
  9515. }
  9516. },
  9517. parseNumber: function parseNumber(num) {
  9518. return num < 10 ? "0" + num : num;
  9519. },
  9520. // 时间格式化基类
  9521. dateFormat: function dateFormat(date, formatStr) {
  9522. var dateObj = {},
  9523. rStr = /\{([^}]+)\}/,
  9524. mons = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
  9525. dateObj["Y"] = date.getFullYear();
  9526. dateObj["M"] = date.getMonth() + 1;
  9527. dateObj["MM"] = this.parseNumber(dateObj["M"]);
  9528. dateObj["Mon"] = mons[dateObj['M'] - 1];
  9529. dateObj["D"] = date.getDate();
  9530. dateObj["DD"] = this.parseNumber(dateObj["D"]);
  9531. dateObj["h"] = date.getHours();
  9532. dateObj["hh"] = this.parseNumber(dateObj["h"]);
  9533. // dateObj["t"] = dateObj["h"] > 12 ? dateObj["h"] - 12 : dateObj["h"];
  9534. dateObj["t"] = dateObj["h"];
  9535. dateObj["tt"] = this.parseNumber(dateObj["t"]);
  9536. // dateObj["A"] = dateObj["h"] > 12 ? '下午' : '上午';
  9537. dateObj["i"] = date.getMinutes();
  9538. dateObj["ii"] = this.parseNumber(dateObj["i"]);
  9539. dateObj["s"] = date.getSeconds();
  9540. dateObj["ss"] = this.parseNumber(dateObj["s"]);
  9541. while (rStr.test(formatStr)) {
  9542. formatStr = formatStr.replace(rStr, dateObj[RegExp.$1]);
  9543. }
  9544. return formatStr;
  9545. },
  9546. // 时间格式 年月日时分秒
  9547. gettime: function gettime(shorttime, type) {
  9548. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9549. var now = new Date().getTime();
  9550. var cha = (now - parseInt(shorttime)) / 1000;
  9551. // type: 格式化类型 1为年月日时分秒 2为年月日时分 3为年月日
  9552. if (type == 1) {
  9553. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}:{ss}");
  9554. } else if (type == 2) {
  9555. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}");
  9556. } else if (type == 3) {
  9557. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9558. }
  9559. },
  9560. // 时间格式 年月日
  9561. getDate: function getDate(shorttime) {
  9562. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9563. var now = new Date().getTime();
  9564. var cha = (now - parseInt(shorttime)) / 1000;
  9565. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9566. },
  9567. // 时间格式 月日
  9568. getDateMd: function getDateMd(shorttime) {
  9569. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9570. var now = new Date().getTime();
  9571. var cha = (now - parseInt(shorttime)) / 1000;
  9572. return this.dateFormat(new Date(shorttime), "{MM}-{DD}");
  9573. },
  9574. getSevenDate: function getSevenDate(num) {
  9575. var date1 = new Date();
  9576. //今天时间
  9577. var time1 = (date1.getMonth() + 1 < 10 ? '0' + (date1.getMonth() + 1).toString() : date1.getMonth() + 1) + "-" + (date1.getDate() < 10 ? '0' + date1.getDate().toString() : date1.getDate());
  9578. var date2 = new Date(date1);
  9579. date2.setDate(date1.getDate() + num);
  9580. //num是正数表示之后的时间,num负数表示之前的时间,0表示今天
  9581. var time2 = date2.getMonth() + 1 + "-" + date2.getDate();
  9582. return this.getdiffdate(time1, time2, num);
  9583. },
  9584. //获取两日期之间日期列表函数
  9585. getdiffdate: function getdiffdate(stime, etime, num) {
  9586. //初始化日期列表,数组
  9587. var diffdate = new Array();
  9588. var i = 0;
  9589. //开始日期小于等于结束日期,并循环
  9590. while (i <= num - 1) {
  9591. diffdate.push({
  9592. dateStr: stime,
  9593. weekStr: this.getWeek(new Date().getFullYear().toString() + "-" + stime)
  9594. });
  9595. //获取开始日期时间戳
  9596. var stime_ts = new Date(stime).getTime();
  9597. // console.log('当前日期:'+stime +'当前时间戳:'+stime_ts)
  9598. //增加一天时间戳后的日期
  9599. var next_date = stime_ts + 24 * 60 * 60 * 1000;
  9600. //拼接年月日,这里的月份会返回(0-11),所以要+1
  9601. var next_dates_y = new Date(next_date).getFullYear() + '-';
  9602. var next_dates_m = new Date(next_date).getMonth() + 1 < 10 ? '0' + (new Date(next_date).getMonth() + 1) + '-' : new Date(next_date).getMonth() + 1 + '-';
  9603. var next_dates_d = new Date(next_date).getDate() < 10 ? '0' + new Date(next_date).getDate() : new Date(next_date).getDate();
  9604. stime = next_dates_m + next_dates_d;
  9605. // 增加数组key
  9606. i++;
  9607. }
  9608. return diffdate;
  9609. },
  9610. // 根据日期转换星期
  9611. getWeek: function getWeek(dateString) {
  9612. var dateArray = dateString.split("-");
  9613. var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
  9614. return "周" + "日一二三四五六".charAt(date.getDay());
  9615. },
  9616. // 获取当前位置
  9617. getNowAddress: function getNowAddress() {
  9618. console.log(222);
  9619. return new Promise(function (resolve, reject) {
  9620. var mapkey = '';
  9621. mapkey = 'c827c04d1d74d8589ec826fce02a135a';
  9622. console.log(mapkey);
  9623. var amapPlugin = new amap.AMapWX({
  9624. key: mapkey
  9625. });
  9626. amapPlugin.getRegeo({
  9627. success: function success(res) {
  9628. resolve(res[0]);
  9629. },
  9630. fail: function fail(error) {
  9631. console.log(error);
  9632. uni.showToast({
  9633. mask: true,
  9634. icon: "none",
  9635. title: error
  9636. });
  9637. }
  9638. });
  9639. });
  9640. }
  9641. };
  9642. exports.default = _default;
  9643. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9644. /***/ }),
  9645. /***/ 39:
  9646. /*!*******************************************************!*\
  9647. !*** E:/Desktop/zd_wechatApp(1)/common/lodash.min.js ***!
  9648. \*******************************************************/
  9649. /*! no static exports found */
  9650. /***/ (function(module, exports, __webpack_require__) {
  9651. /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  9652. /**
  9653. * @license
  9654. * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
  9655. */
  9656. ;
  9657. (function () {
  9658. function n(n, t, r) {
  9659. switch (r.length) {
  9660. case 0:
  9661. return n.call(t);
  9662. case 1:
  9663. return n.call(t, r[0]);
  9664. case 2:
  9665. return n.call(t, r[0], r[1]);
  9666. case 3:
  9667. return n.call(t, r[0], r[1], r[2]);
  9668. }
  9669. return n.apply(t, r);
  9670. }
  9671. function t(n, t, r, e) {
  9672. for (var u = -1, i = null == n ? 0 : n.length; ++u < i;) {
  9673. var o = n[u];
  9674. t(e, o, r(o), n);
  9675. }
  9676. return e;
  9677. }
  9678. function r(n, t) {
  9679. for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n);) {
  9680. ;
  9681. }
  9682. return n;
  9683. }
  9684. function e(n, t) {
  9685. for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n);) {
  9686. ;
  9687. }
  9688. return n;
  9689. }
  9690. function u(n, t) {
  9691. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  9692. if (!t(n[r], r, n)) return false;
  9693. }
  9694. return true;
  9695. }
  9696. function i(n, t) {
  9697. for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e;) {
  9698. var o = n[r];
  9699. t(o, r, n) && (i[u++] = o);
  9700. }
  9701. return i;
  9702. }
  9703. function o(n, t) {
  9704. return !(null == n || !n.length) && -1 < v(n, t, 0);
  9705. }
  9706. function f(n, t, r) {
  9707. for (var e = -1, u = null == n ? 0 : n.length; ++e < u;) {
  9708. if (r(t, n[e])) return true;
  9709. }
  9710. return false;
  9711. }
  9712. function c(n, t) {
  9713. for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e;) {
  9714. u[r] = t(n[r], r, n);
  9715. }
  9716. return u;
  9717. }
  9718. function a(n, t) {
  9719. for (var r = -1, e = t.length, u = n.length; ++r < e;) {
  9720. n[u + r] = t[r];
  9721. }
  9722. return n;
  9723. }
  9724. function l(n, t, r, e) {
  9725. var u = -1,
  9726. i = null == n ? 0 : n.length;
  9727. for (e && i && (r = n[++u]); ++u < i;) {
  9728. r = t(r, n[u], u, n);
  9729. }
  9730. return r;
  9731. }
  9732. function s(n, t, r, e) {
  9733. var u = null == n ? 0 : n.length;
  9734. for (e && u && (r = n[--u]); u--;) {
  9735. r = t(r, n[u], u, n);
  9736. }
  9737. return r;
  9738. }
  9739. function h(n, t) {
  9740. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  9741. if (t(n[r], r, n)) return true;
  9742. }
  9743. return false;
  9744. }
  9745. function p(n, t, r) {
  9746. var e;
  9747. return r(n, function (n, r, u) {
  9748. if (t(n, r, u)) return e = r, false;
  9749. }), e;
  9750. }
  9751. function _(n, t, r, e) {
  9752. var u = n.length;
  9753. for (r += e ? 1 : -1; e ? r-- : ++r < u;) {
  9754. if (t(n[r], r, n)) return r;
  9755. }
  9756. return -1;
  9757. }
  9758. function v(n, t, r) {
  9759. if (t === t) n: {
  9760. --r;
  9761. for (var e = n.length; ++r < e;) {
  9762. if (n[r] === t) {
  9763. n = r;
  9764. break n;
  9765. }
  9766. }
  9767. n = -1;
  9768. } else n = _(n, d, r);
  9769. return n;
  9770. }
  9771. function g(n, t, r, e) {
  9772. --r;
  9773. for (var u = n.length; ++r < u;) {
  9774. if (e(n[r], t)) return r;
  9775. }
  9776. return -1;
  9777. }
  9778. function d(n) {
  9779. return n !== n;
  9780. }
  9781. function y(n, t) {
  9782. var r = null == n ? 0 : n.length;
  9783. return r ? m(n, t) / r : F;
  9784. }
  9785. function b(n) {
  9786. return function (t) {
  9787. return null == t ? T : t[n];
  9788. };
  9789. }
  9790. function x(n) {
  9791. return function (t) {
  9792. return null == n ? T : n[t];
  9793. };
  9794. }
  9795. function j(n, t, r, e, u) {
  9796. return u(n, function (n, u, i) {
  9797. r = e ? (e = false, n) : t(r, n, u, i);
  9798. }), r;
  9799. }
  9800. function w(n, t) {
  9801. var r = n.length;
  9802. for (n.sort(t); r--;) {
  9803. n[r] = n[r].c;
  9804. }
  9805. return n;
  9806. }
  9807. function m(n, t) {
  9808. for (var r, e = -1, u = n.length; ++e < u;) {
  9809. var i = t(n[e]);
  9810. i !== T && (r = r === T ? i : r + i);
  9811. }
  9812. return r;
  9813. }
  9814. function A(n, t) {
  9815. for (var r = -1, e = Array(n); ++r < n;) {
  9816. e[r] = t(r);
  9817. }
  9818. return e;
  9819. }
  9820. function E(n, t) {
  9821. return c(t, function (t) {
  9822. return [t, n[t]];
  9823. });
  9824. }
  9825. function k(n) {
  9826. return function (t) {
  9827. return n(t);
  9828. };
  9829. }
  9830. function S(n, t) {
  9831. return c(t, function (t) {
  9832. return n[t];
  9833. });
  9834. }
  9835. function O(n, t) {
  9836. return n.has(t);
  9837. }
  9838. function I(n, t) {
  9839. for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0);) {
  9840. ;
  9841. }
  9842. return r;
  9843. }
  9844. function R(n, t) {
  9845. for (var r = n.length; r-- && -1 < v(t, n[r], 0);) {
  9846. ;
  9847. }
  9848. return r;
  9849. }
  9850. function z(n) {
  9851. return "\\" + Un[n];
  9852. }
  9853. function W(n) {
  9854. var t = -1,
  9855. r = Array(n.size);
  9856. return n.forEach(function (n, e) {
  9857. r[++t] = [e, n];
  9858. }), r;
  9859. }
  9860. function B(n, t) {
  9861. return function (r) {
  9862. return n(t(r));
  9863. };
  9864. }
  9865. function L(n, t) {
  9866. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  9867. var o = n[r];
  9868. o !== t && "__lodash_placeholder__" !== o || (n[r] = "__lodash_placeholder__", i[u++] = r);
  9869. }
  9870. return i;
  9871. }
  9872. function U(n) {
  9873. var t = -1,
  9874. r = Array(n.size);
  9875. return n.forEach(function (n) {
  9876. r[++t] = n;
  9877. }), r;
  9878. }
  9879. function C(n) {
  9880. var t = -1,
  9881. r = Array(n.size);
  9882. return n.forEach(function (n) {
  9883. r[++t] = [n, n];
  9884. }), r;
  9885. }
  9886. function D(n) {
  9887. if (Rn.test(n)) {
  9888. for (var t = On.lastIndex = 0; On.test(n);) {
  9889. ++t;
  9890. }
  9891. n = t;
  9892. } else n = Qn(n);
  9893. return n;
  9894. }
  9895. function M(n) {
  9896. return Rn.test(n) ? n.match(On) || [] : n.split("");
  9897. }
  9898. var T,
  9899. $ = 1 / 0,
  9900. F = NaN,
  9901. N = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", 32], ["partialRight", 64], ["rearg", 256]],
  9902. P = /\b__p\+='';/g,
  9903. Z = /\b(__p\+=)''\+/g,
  9904. q = /(__e\(.*?\)|\b__t\))\+'';/g,
  9905. V = /&(?:amp|lt|gt|quot|#39);/g,
  9906. K = /[&<>"']/g,
  9907. G = RegExp(V.source),
  9908. H = RegExp(K.source),
  9909. J = /<%-([\s\S]+?)%>/g,
  9910. Y = /<%([\s\S]+?)%>/g,
  9911. Q = /<%=([\s\S]+?)%>/g,
  9912. X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  9913. nn = /^\w*$/,
  9914. tn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
  9915. rn = /[\\^$.*+?()[\]{}|]/g,
  9916. en = RegExp(rn.source),
  9917. un = /^\s+|\s+$/g,
  9918. on = /^\s+/,
  9919. fn = /\s+$/,
  9920. cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  9921. an = /\{\n\/\* \[wrapped with (.+)\] \*/,
  9922. ln = /,? & /,
  9923. sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,
  9924. hn = /\\(\\)?/g,
  9925. pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,
  9926. _n = /\w*$/,
  9927. vn = /^[-+]0x[0-9a-f]+$/i,
  9928. gn = /^0b[01]+$/i,
  9929. dn = /^\[object .+?Constructor\]$/,
  9930. yn = /^0o[0-7]+$/i,
  9931. bn = /^(?:0|[1-9]\d*)$/,
  9932. xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,
  9933. jn = /($^)/,
  9934. wn = /['\n\r\u2028\u2029\\]/g,
  9935. mn = "[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",
  9936. An = "(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])" + mn,
  9937. En = "(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",
  9938. kn = RegExp("['\u2019]", "g"),
  9939. Sn = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g"),
  9940. On = RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|" + En + mn, "g"),
  9941. In = RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+", An].join("|"), "g"),
  9942. Rn = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),
  9943. zn = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,
  9944. Wn = "Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),
  9945. Bn = {};
  9946. Bn["[object Float32Array]"] = Bn["[object Float64Array]"] = Bn["[object Int8Array]"] = Bn["[object Int16Array]"] = Bn["[object Int32Array]"] = Bn["[object Uint8Array]"] = Bn["[object Uint8ClampedArray]"] = Bn["[object Uint16Array]"] = Bn["[object Uint32Array]"] = true, Bn["[object Arguments]"] = Bn["[object Array]"] = Bn["[object ArrayBuffer]"] = Bn["[object Boolean]"] = Bn["[object DataView]"] = Bn["[object Date]"] = Bn["[object Error]"] = Bn["[object Function]"] = Bn["[object Map]"] = Bn["[object Number]"] = Bn["[object Object]"] = Bn["[object RegExp]"] = Bn["[object Set]"] = Bn["[object String]"] = Bn["[object WeakMap]"] = false;
  9947. var Ln = {};
  9948. Ln["[object Arguments]"] = Ln["[object Array]"] = Ln["[object ArrayBuffer]"] = Ln["[object DataView]"] = Ln["[object Boolean]"] = Ln["[object Date]"] = Ln["[object Float32Array]"] = Ln["[object Float64Array]"] = Ln["[object Int8Array]"] = Ln["[object Int16Array]"] = Ln["[object Int32Array]"] = Ln["[object Map]"] = Ln["[object Number]"] = Ln["[object Object]"] = Ln["[object RegExp]"] = Ln["[object Set]"] = Ln["[object String]"] = Ln["[object Symbol]"] = Ln["[object Uint8Array]"] = Ln["[object Uint8ClampedArray]"] = Ln["[object Uint16Array]"] = Ln["[object Uint32Array]"] = true, Ln["[object Error]"] = Ln["[object Function]"] = Ln["[object WeakMap]"] = false;
  9949. var Un = {
  9950. "\\": "\\",
  9951. "'": "'",
  9952. "\n": "n",
  9953. "\r": "r",
  9954. "\u2028": "u2028",
  9955. "\u2029": "u2029"
  9956. },
  9957. Cn = parseFloat,
  9958. Dn = parseInt,
  9959. Mn = (typeof global === "undefined" ? "undefined" : _typeof(global)) == "object" && global && global.Object === Object && global,
  9960. Tn = (typeof self === "undefined" ? "undefined" : _typeof(self)) == "object" && self && self.Object === Object && self,
  9961. $n = Mn || Tn || Function("return this")(),
  9962. Fn = ( false ? undefined : _typeof(exports)) == "object" && exports && !exports.nodeType && exports,
  9963. Nn = Fn && ( false ? undefined : _typeof(module)) == "object" && module && !module.nodeType && module,
  9964. Pn = Nn && Nn.exports === Fn,
  9965. Zn = Pn && Mn.process,
  9966. qn = function () {
  9967. try {
  9968. var n = Nn && Nn.f && Nn.f("util").types;
  9969. return n ? n : Zn && Zn.binding && Zn.binding("util");
  9970. } catch (n) {}
  9971. }(),
  9972. Vn = qn && qn.isArrayBuffer,
  9973. Kn = qn && qn.isDate,
  9974. Gn = qn && qn.isMap,
  9975. Hn = qn && qn.isRegExp,
  9976. Jn = qn && qn.isSet,
  9977. Yn = qn && qn.isTypedArray,
  9978. Qn = b("length"),
  9979. Xn = x({
  9980. "\xc0": "A",
  9981. "\xc1": "A",
  9982. "\xc2": "A",
  9983. "\xc3": "A",
  9984. "\xc4": "A",
  9985. "\xc5": "A",
  9986. "\xe0": "a",
  9987. "\xe1": "a",
  9988. "\xe2": "a",
  9989. "\xe3": "a",
  9990. "\xe4": "a",
  9991. "\xe5": "a",
  9992. "\xc7": "C",
  9993. "\xe7": "c",
  9994. "\xd0": "D",
  9995. "\xf0": "d",
  9996. "\xc8": "E",
  9997. "\xc9": "E",
  9998. "\xca": "E",
  9999. "\xcb": "E",
  10000. "\xe8": "e",
  10001. "\xe9": "e",
  10002. "\xea": "e",
  10003. "\xeb": "e",
  10004. "\xcc": "I",
  10005. "\xcd": "I",
  10006. "\xce": "I",
  10007. "\xcf": "I",
  10008. "\xec": "i",
  10009. "\xed": "i",
  10010. "\xee": "i",
  10011. "\xef": "i",
  10012. "\xd1": "N",
  10013. "\xf1": "n",
  10014. "\xd2": "O",
  10015. "\xd3": "O",
  10016. "\xd4": "O",
  10017. "\xd5": "O",
  10018. "\xd6": "O",
  10019. "\xd8": "O",
  10020. "\xf2": "o",
  10021. "\xf3": "o",
  10022. "\xf4": "o",
  10023. "\xf5": "o",
  10024. "\xf6": "o",
  10025. "\xf8": "o",
  10026. "\xd9": "U",
  10027. "\xda": "U",
  10028. "\xdb": "U",
  10029. "\xdc": "U",
  10030. "\xf9": "u",
  10031. "\xfa": "u",
  10032. "\xfb": "u",
  10033. "\xfc": "u",
  10034. "\xdd": "Y",
  10035. "\xfd": "y",
  10036. "\xff": "y",
  10037. "\xc6": "Ae",
  10038. "\xe6": "ae",
  10039. "\xde": "Th",
  10040. "\xfe": "th",
  10041. "\xdf": "ss",
  10042. "\u0100": "A",
  10043. "\u0102": "A",
  10044. "\u0104": "A",
  10045. "\u0101": "a",
  10046. "\u0103": "a",
  10047. "\u0105": "a",
  10048. "\u0106": "C",
  10049. "\u0108": "C",
  10050. "\u010A": "C",
  10051. "\u010C": "C",
  10052. "\u0107": "c",
  10053. "\u0109": "c",
  10054. "\u010B": "c",
  10055. "\u010D": "c",
  10056. "\u010E": "D",
  10057. "\u0110": "D",
  10058. "\u010F": "d",
  10059. "\u0111": "d",
  10060. "\u0112": "E",
  10061. "\u0114": "E",
  10062. "\u0116": "E",
  10063. "\u0118": "E",
  10064. "\u011A": "E",
  10065. "\u0113": "e",
  10066. "\u0115": "e",
  10067. "\u0117": "e",
  10068. "\u0119": "e",
  10069. "\u011B": "e",
  10070. "\u011C": "G",
  10071. "\u011E": "G",
  10072. "\u0120": "G",
  10073. "\u0122": "G",
  10074. "\u011D": "g",
  10075. "\u011F": "g",
  10076. "\u0121": "g",
  10077. "\u0123": "g",
  10078. "\u0124": "H",
  10079. "\u0126": "H",
  10080. "\u0125": "h",
  10081. "\u0127": "h",
  10082. "\u0128": "I",
  10083. "\u012A": "I",
  10084. "\u012C": "I",
  10085. "\u012E": "I",
  10086. "\u0130": "I",
  10087. "\u0129": "i",
  10088. "\u012B": "i",
  10089. "\u012D": "i",
  10090. "\u012F": "i",
  10091. "\u0131": "i",
  10092. "\u0134": "J",
  10093. "\u0135": "j",
  10094. "\u0136": "K",
  10095. "\u0137": "k",
  10096. "\u0138": "k",
  10097. "\u0139": "L",
  10098. "\u013B": "L",
  10099. "\u013D": "L",
  10100. "\u013F": "L",
  10101. "\u0141": "L",
  10102. "\u013A": "l",
  10103. "\u013C": "l",
  10104. "\u013E": "l",
  10105. "\u0140": "l",
  10106. "\u0142": "l",
  10107. "\u0143": "N",
  10108. "\u0145": "N",
  10109. "\u0147": "N",
  10110. "\u014A": "N",
  10111. "\u0144": "n",
  10112. "\u0146": "n",
  10113. "\u0148": "n",
  10114. "\u014B": "n",
  10115. "\u014C": "O",
  10116. "\u014E": "O",
  10117. "\u0150": "O",
  10118. "\u014D": "o",
  10119. "\u014F": "o",
  10120. "\u0151": "o",
  10121. "\u0154": "R",
  10122. "\u0156": "R",
  10123. "\u0158": "R",
  10124. "\u0155": "r",
  10125. "\u0157": "r",
  10126. "\u0159": "r",
  10127. "\u015A": "S",
  10128. "\u015C": "S",
  10129. "\u015E": "S",
  10130. "\u0160": "S",
  10131. "\u015B": "s",
  10132. "\u015D": "s",
  10133. "\u015F": "s",
  10134. "\u0161": "s",
  10135. "\u0162": "T",
  10136. "\u0164": "T",
  10137. "\u0166": "T",
  10138. "\u0163": "t",
  10139. "\u0165": "t",
  10140. "\u0167": "t",
  10141. "\u0168": "U",
  10142. "\u016A": "U",
  10143. "\u016C": "U",
  10144. "\u016E": "U",
  10145. "\u0170": "U",
  10146. "\u0172": "U",
  10147. "\u0169": "u",
  10148. "\u016B": "u",
  10149. "\u016D": "u",
  10150. "\u016F": "u",
  10151. "\u0171": "u",
  10152. "\u0173": "u",
  10153. "\u0174": "W",
  10154. "\u0175": "w",
  10155. "\u0176": "Y",
  10156. "\u0177": "y",
  10157. "\u0178": "Y",
  10158. "\u0179": "Z",
  10159. "\u017B": "Z",
  10160. "\u017D": "Z",
  10161. "\u017A": "z",
  10162. "\u017C": "z",
  10163. "\u017E": "z",
  10164. "\u0132": "IJ",
  10165. "\u0133": "ij",
  10166. "\u0152": "Oe",
  10167. "\u0153": "oe",
  10168. "\u0149": "'n",
  10169. "\u017F": "s"
  10170. }),
  10171. nt = x({
  10172. "&": "&amp;",
  10173. "<": "&lt;",
  10174. ">": "&gt;",
  10175. '"': "&quot;",
  10176. "'": "&#39;"
  10177. }),
  10178. tt = x({
  10179. "&amp;": "&",
  10180. "&lt;": "<",
  10181. "&gt;": ">",
  10182. "&quot;": '"',
  10183. "&#39;": "'"
  10184. }),
  10185. rt = function x(mn) {
  10186. function An(n) {
  10187. if (du(n) && !of(n) && !(n instanceof Un)) {
  10188. if (n instanceof On) return n;
  10189. if (ii.call(n, "__wrapped__")) return $e(n);
  10190. }
  10191. return new On(n);
  10192. }
  10193. function En() {}
  10194. function On(n, t) {
  10195. this.__wrapped__ = n, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = T;
  10196. }
  10197. function Un(n) {
  10198. this.__wrapped__ = n, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = 4294967295, this.__views__ = [];
  10199. }
  10200. function Mn(n) {
  10201. var t = -1,
  10202. r = null == n ? 0 : n.length;
  10203. for (this.clear(); ++t < r;) {
  10204. var e = n[t];
  10205. this.set(e[0], e[1]);
  10206. }
  10207. }
  10208. function Tn(n) {
  10209. var t = -1,
  10210. r = null == n ? 0 : n.length;
  10211. for (this.clear(); ++t < r;) {
  10212. var e = n[t];
  10213. this.set(e[0], e[1]);
  10214. }
  10215. }
  10216. function Fn(n) {
  10217. var t = -1,
  10218. r = null == n ? 0 : n.length;
  10219. for (this.clear(); ++t < r;) {
  10220. var e = n[t];
  10221. this.set(e[0], e[1]);
  10222. }
  10223. }
  10224. function Nn(n) {
  10225. var t = -1,
  10226. r = null == n ? 0 : n.length;
  10227. for (this.__data__ = new Fn(); ++t < r;) {
  10228. this.add(n[t]);
  10229. }
  10230. }
  10231. function Zn(n) {
  10232. this.size = (this.__data__ = new Tn(n)).size;
  10233. }
  10234. function qn(n, t) {
  10235. var r,
  10236. e = of(n),
  10237. u = !e && uf(n),
  10238. i = !e && !u && cf(n),
  10239. o = !e && !u && !i && pf(n),
  10240. u = (e = e || u || i || o) ? A(n.length, Xu) : [],
  10241. f = u.length;
  10242. for (r in n) {
  10243. !t && !ii.call(n, r) || e && ("length" == r || i && ("offset" == r || "parent" == r) || o && ("buffer" == r || "byteLength" == r || "byteOffset" == r) || Se(r, f)) || u.push(r);
  10244. }
  10245. return u;
  10246. }
  10247. function Qn(n) {
  10248. var t = n.length;
  10249. return t ? n[ir(0, t - 1)] : T;
  10250. }
  10251. function et(n, t) {
  10252. return Ce(Ur(n), pt(t, 0, n.length));
  10253. }
  10254. function ut(n) {
  10255. return Ce(Ur(n));
  10256. }
  10257. function it(n, t, r) {
  10258. (r === T || au(n[t], r)) && (r !== T || t in n) || st(n, t, r);
  10259. }
  10260. function ot(n, t, r) {
  10261. var e = n[t];
  10262. ii.call(n, t) && au(e, r) && (r !== T || t in n) || st(n, t, r);
  10263. }
  10264. function ft(n, t) {
  10265. for (var r = n.length; r--;) {
  10266. if (au(n[r][0], t)) return r;
  10267. }
  10268. return -1;
  10269. }
  10270. function ct(n, t, r, e) {
  10271. return eo(n, function (n, u, i) {
  10272. t(e, n, r(n), i);
  10273. }), e;
  10274. }
  10275. function at(n, t) {
  10276. return n && Cr(t, zu(t), n);
  10277. }
  10278. function lt(n, t) {
  10279. return n && Cr(t, Wu(t), n);
  10280. }
  10281. function st(n, t, r) {
  10282. "__proto__" == t && mi ? mi(n, t, {
  10283. configurable: true,
  10284. enumerable: true,
  10285. value: r,
  10286. writable: true
  10287. }) : n[t] = r;
  10288. }
  10289. function ht(n, t) {
  10290. for (var r = -1, e = t.length, u = Vu(e), i = null == n; ++r < e;) {
  10291. u[r] = i ? T : Iu(n, t[r]);
  10292. }
  10293. return u;
  10294. }
  10295. function pt(n, t, r) {
  10296. return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n;
  10297. }
  10298. function _t(n, t, e, u, i, o) {
  10299. var f,
  10300. c = 1 & t,
  10301. a = 2 & t,
  10302. l = 4 & t;
  10303. if (e && (f = i ? e(n, u, i, o) : e(n)), f !== T) return f;
  10304. if (!gu(n)) return n;
  10305. if (u = of(n)) {
  10306. if (f = me(n), !c) return Ur(n, f);
  10307. } else {
  10308. var s = _o(n),
  10309. h = "[object Function]" == s || "[object GeneratorFunction]" == s;
  10310. if (cf(n)) return Ir(n, c);
  10311. if ("[object Object]" == s || "[object Arguments]" == s || h && !i) {
  10312. if (f = a || h ? {} : Ae(n), !c) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n));
  10313. } else {
  10314. if (!Ln[s]) return i ? n : {};
  10315. f = Ee(n, s, c);
  10316. }
  10317. }
  10318. if (o || (o = new Zn()), i = o.get(n)) return i;
  10319. if (o.set(n, f), hf(n)) return n.forEach(function (r) {
  10320. f.add(_t(r, t, e, r, n, o));
  10321. }), f;
  10322. if (lf(n)) return n.forEach(function (r, u) {
  10323. f.set(u, _t(r, t, e, u, n, o));
  10324. }), f;
  10325. var a = l ? a ? ve : _e : a ? Wu : zu,
  10326. p = u ? T : a(n);
  10327. return r(p || n, function (r, u) {
  10328. p && (u = r, r = n[u]), ot(f, u, _t(r, t, e, u, n, o));
  10329. }), f;
  10330. }
  10331. function vt(n) {
  10332. var t = zu(n);
  10333. return function (r) {
  10334. return gt(r, n, t);
  10335. };
  10336. }
  10337. function gt(n, t, r) {
  10338. var e = r.length;
  10339. if (null == n) return !e;
  10340. for (n = Yu(n); e--;) {
  10341. var u = r[e],
  10342. i = t[u],
  10343. o = n[u];
  10344. if (o === T && !(u in n) || !i(o)) return false;
  10345. }
  10346. return true;
  10347. }
  10348. function dt(n, t, r) {
  10349. if (typeof n != "function") throw new ni("Expected a function");
  10350. return yo(function () {
  10351. n.apply(T, r);
  10352. }, t);
  10353. }
  10354. function yt(n, t, r, e) {
  10355. var u = -1,
  10356. i = o,
  10357. a = true,
  10358. l = n.length,
  10359. s = [],
  10360. h = t.length;
  10361. if (!l) return s;
  10362. r && (t = c(t, k(r))), e ? (i = f, a = false) : 200 <= t.length && (i = O, a = false, t = new Nn(t));
  10363. n: for (; ++u < l;) {
  10364. var p = n[u],
  10365. _ = null == r ? p : r(p),
  10366. p = e || 0 !== p ? p : 0;
  10367. if (a && _ === _) {
  10368. for (var v = h; v--;) {
  10369. if (t[v] === _) continue n;
  10370. }
  10371. s.push(p);
  10372. } else i(t, _, e) || s.push(p);
  10373. }
  10374. return s;
  10375. }
  10376. function bt(n, t) {
  10377. var r = true;
  10378. return eo(n, function (n, e, u) {
  10379. return r = !!t(n, e, u);
  10380. }), r;
  10381. }
  10382. function xt(n, t, r) {
  10383. for (var e = -1, u = n.length; ++e < u;) {
  10384. var i = n[e],
  10385. o = t(i);
  10386. if (null != o && (f === T ? o === o && !ju(o) : r(o, f))) var f = o,
  10387. c = i;
  10388. }
  10389. return c;
  10390. }
  10391. function jt(n, t) {
  10392. var r = [];
  10393. return eo(n, function (n, e, u) {
  10394. t(n, e, u) && r.push(n);
  10395. }), r;
  10396. }
  10397. function wt(n, t, r, e, u) {
  10398. var i = -1,
  10399. o = n.length;
  10400. for (r || (r = ke), u || (u = []); ++i < o;) {
  10401. var f = n[i];
  10402. 0 < t && r(f) ? 1 < t ? wt(f, t - 1, r, e, u) : a(u, f) : e || (u[u.length] = f);
  10403. }
  10404. return u;
  10405. }
  10406. function mt(n, t) {
  10407. return n && io(n, t, zu);
  10408. }
  10409. function At(n, t) {
  10410. return n && oo(n, t, zu);
  10411. }
  10412. function Et(n, t) {
  10413. return i(t, function (t) {
  10414. return pu(n[t]);
  10415. });
  10416. }
  10417. function kt(n, t) {
  10418. t = Sr(t, n);
  10419. for (var r = 0, e = t.length; null != n && r < e;) {
  10420. n = n[De(t[r++])];
  10421. }
  10422. return r && r == e ? n : T;
  10423. }
  10424. function St(n, t, r) {
  10425. return t = t(n), of(n) ? t : a(t, r(n));
  10426. }
  10427. function Ot(n) {
  10428. if (null == n) n = n === T ? "[object Undefined]" : "[object Null]";else if (wi && wi in Yu(n)) {
  10429. var t = ii.call(n, wi),
  10430. r = n[wi];
  10431. try {
  10432. n[wi] = T;
  10433. var e = true;
  10434. } catch (n) {}
  10435. var u = ci.call(n);
  10436. e && (t ? n[wi] = r : delete n[wi]), n = u;
  10437. } else n = ci.call(n);
  10438. return n;
  10439. }
  10440. function It(n, t) {
  10441. return n > t;
  10442. }
  10443. function Rt(n, t) {
  10444. return null != n && ii.call(n, t);
  10445. }
  10446. function zt(n, t) {
  10447. return null != n && t in Yu(n);
  10448. }
  10449. function Wt(n, t, r) {
  10450. for (var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Vu(i), s = 1 / 0, h = []; a--;) {
  10451. var p = n[a];
  10452. a && t && (p = c(p, k(t))), s = Ui(p.length, s), l[a] = !r && (t || 120 <= u && 120 <= p.length) ? new Nn(a && p) : T;
  10453. }
  10454. var p = n[0],
  10455. _ = -1,
  10456. v = l[0];
  10457. n: for (; ++_ < u && h.length < s;) {
  10458. var g = p[_],
  10459. d = t ? t(g) : g,
  10460. g = r || 0 !== g ? g : 0;
  10461. if (v ? !O(v, d) : !e(h, d, r)) {
  10462. for (a = i; --a;) {
  10463. var y = l[a];
  10464. if (y ? !O(y, d) : !e(n[a], d, r)) continue n;
  10465. }
  10466. v && v.push(d), h.push(g);
  10467. }
  10468. }
  10469. return h;
  10470. }
  10471. function Bt(n, t, r) {
  10472. var e = {};
  10473. return mt(n, function (n, u, i) {
  10474. t(e, r(n), u, i);
  10475. }), e;
  10476. }
  10477. function Lt(t, r, e) {
  10478. return r = Sr(r, t), t = 2 > r.length ? t : kt(t, hr(r, 0, -1)), r = null == t ? t : t[De(qe(r))], null == r ? T : n(r, t, e);
  10479. }
  10480. function Ut(n) {
  10481. return du(n) && "[object Arguments]" == Ot(n);
  10482. }
  10483. function Ct(n) {
  10484. return du(n) && "[object ArrayBuffer]" == Ot(n);
  10485. }
  10486. function Dt(n) {
  10487. return du(n) && "[object Date]" == Ot(n);
  10488. }
  10489. function Mt(n, t, r, e, u) {
  10490. if (n === t) t = true;else if (null == n || null == t || !du(n) && !du(t)) t = n !== n && t !== t;else n: {
  10491. var i = of(n),
  10492. o = of(t),
  10493. f = i ? "[object Array]" : _o(n),
  10494. c = o ? "[object Array]" : _o(t),
  10495. f = "[object Arguments]" == f ? "[object Object]" : f,
  10496. c = "[object Arguments]" == c ? "[object Object]" : c,
  10497. a = "[object Object]" == f,
  10498. o = "[object Object]" == c;
  10499. if ((c = f == c) && cf(n)) {
  10500. if (!cf(t)) {
  10501. t = false;
  10502. break n;
  10503. }
  10504. i = true, a = false;
  10505. }
  10506. if (c && !a) u || (u = new Zn()), t = i || pf(n) ? se(n, t, r, e, Mt, u) : he(n, t, f, r, e, Mt, u);else {
  10507. if (!(1 & r) && (i = a && ii.call(n, "__wrapped__"), f = o && ii.call(t, "__wrapped__"), i || f)) {
  10508. n = i ? n.value() : n, t = f ? t.value() : t, u || (u = new Zn()), t = Mt(n, t, r, e, u);
  10509. break n;
  10510. }
  10511. if (c) {
  10512. t: if (u || (u = new Zn()), i = 1 & r, f = _e(n), o = f.length, c = _e(t).length, o == c || i) {
  10513. for (a = o; a--;) {
  10514. var l = f[a];
  10515. if (!(i ? l in t : ii.call(t, l))) {
  10516. t = false;
  10517. break t;
  10518. }
  10519. }
  10520. if ((c = u.get(n)) && u.get(t)) t = c == t;else {
  10521. c = true, u.set(n, t), u.set(t, n);
  10522. for (var s = i; ++a < o;) {
  10523. var l = f[a],
  10524. h = n[l],
  10525. p = t[l];
  10526. if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u);
  10527. if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) {
  10528. c = false;
  10529. break;
  10530. }
  10531. s || (s = "constructor" == l);
  10532. }
  10533. c && !s && (r = n.constructor, e = t.constructor, r != e && "constructor" in n && "constructor" in t && !(typeof r == "function" && r instanceof r && typeof e == "function" && e instanceof e) && (c = false)), u.delete(n), u.delete(t), t = c;
  10534. }
  10535. } else t = false;
  10536. } else t = false;
  10537. }
  10538. }
  10539. return t;
  10540. }
  10541. function Tt(n) {
  10542. return du(n) && "[object Map]" == _o(n);
  10543. }
  10544. function $t(n, t, r, e) {
  10545. var u = r.length,
  10546. i = u,
  10547. o = !e;
  10548. if (null == n) return !i;
  10549. for (n = Yu(n); u--;) {
  10550. var f = r[u];
  10551. if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false;
  10552. }
  10553. for (; ++u < i;) {
  10554. var f = r[u],
  10555. c = f[0],
  10556. a = n[c],
  10557. l = f[1];
  10558. if (o && f[2]) {
  10559. if (a === T && !(c in n)) return false;
  10560. } else {
  10561. if (f = new Zn(), e) var s = e(a, l, c, n, t, f);
  10562. if (s === T ? !Mt(l, a, 3, e, f) : !s) return false;
  10563. }
  10564. }
  10565. return true;
  10566. }
  10567. function Ft(n) {
  10568. return !(!gu(n) || fi && fi in n) && (pu(n) ? si : dn).test(Me(n));
  10569. }
  10570. function Nt(n) {
  10571. return du(n) && "[object RegExp]" == Ot(n);
  10572. }
  10573. function Pt(n) {
  10574. return du(n) && "[object Set]" == _o(n);
  10575. }
  10576. function Zt(n) {
  10577. return du(n) && vu(n.length) && !!Bn[Ot(n)];
  10578. }
  10579. function qt(n) {
  10580. return typeof n == "function" ? n : null == n ? Tu : _typeof(n) == "object" ? of(n) ? Jt(n[0], n[1]) : Ht(n) : Pu(n);
  10581. }
  10582. function Vt(n) {
  10583. if (!ze(n)) return Bi(n);
  10584. var t,
  10585. r = [];
  10586. for (t in Yu(n)) {
  10587. ii.call(n, t) && "constructor" != t && r.push(t);
  10588. }
  10589. return r;
  10590. }
  10591. function Kt(n, t) {
  10592. return n < t;
  10593. }
  10594. function Gt(n, t) {
  10595. var r = -1,
  10596. e = lu(n) ? Vu(n.length) : [];
  10597. return eo(n, function (n, u, i) {
  10598. e[++r] = t(n, u, i);
  10599. }), e;
  10600. }
  10601. function Ht(n) {
  10602. var t = xe(n);
  10603. return 1 == t.length && t[0][2] ? We(t[0][0], t[0][1]) : function (r) {
  10604. return r === n || $t(r, n, t);
  10605. };
  10606. }
  10607. function Jt(n, t) {
  10608. return Ie(n) && t === t && !gu(t) ? We(De(n), t) : function (r) {
  10609. var e = Iu(r, n);
  10610. return e === T && e === t ? Ru(r, n) : Mt(t, e, 3);
  10611. };
  10612. }
  10613. function Yt(n, t, r, e, u) {
  10614. n !== t && io(t, function (i, o) {
  10615. if (gu(i)) {
  10616. u || (u = new Zn());
  10617. var f = u,
  10618. c = "__proto__" == o ? T : n[o],
  10619. a = "__proto__" == o ? T : t[o],
  10620. l = f.get(a);
  10621. if (l) it(n, o, l);else {
  10622. var l = e ? e(c, a, o + "", n, t, f) : T,
  10623. s = l === T;
  10624. if (s) {
  10625. var h = of(a),
  10626. p = !h && cf(a),
  10627. _ = !h && !p && pf(a),
  10628. l = a;
  10629. h || p || _ ? of(c) ? l = c : su(c) ? l = Ur(c) : p ? (s = false, l = Ir(a, true)) : _ ? (s = false, l = zr(a, true)) : l = [] : bu(a) || uf(a) ? (l = c, uf(c) ? l = Su(c) : (!gu(c) || r && pu(c)) && (l = Ae(a))) : s = false;
  10630. }
  10631. s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l);
  10632. }
  10633. } else f = e ? e("__proto__" == o ? T : n[o], i, o + "", n, t, u) : T, f === T && (f = i), it(n, o, f);
  10634. }, Wu);
  10635. }
  10636. function Qt(n, t) {
  10637. var r = n.length;
  10638. if (r) return t += 0 > t ? r : 0, Se(t, r) ? n[t] : T;
  10639. }
  10640. function Xt(n, t, r) {
  10641. var e = -1;
  10642. return t = c(t.length ? t : [Tu], k(ye())), n = Gt(n, function (n) {
  10643. return {
  10644. a: c(t, function (t) {
  10645. return t(n);
  10646. }),
  10647. b: ++e,
  10648. c: n
  10649. };
  10650. }), w(n, function (n, t) {
  10651. var e;
  10652. n: {
  10653. e = -1;
  10654. for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o;) {
  10655. var c = Wr(u[e], i[e]);
  10656. if (c) {
  10657. e = e >= f ? c : c * ("desc" == r[e] ? -1 : 1);
  10658. break n;
  10659. }
  10660. }
  10661. e = n.b - t.b;
  10662. }
  10663. return e;
  10664. });
  10665. }
  10666. function nr(n, t) {
  10667. return tr(n, t, function (t, r) {
  10668. return Ru(n, r);
  10669. });
  10670. }
  10671. function tr(n, t, r) {
  10672. for (var e = -1, u = t.length, i = {}; ++e < u;) {
  10673. var o = t[e],
  10674. f = kt(n, o);
  10675. r(f, o) && lr(i, Sr(o, n), f);
  10676. }
  10677. return i;
  10678. }
  10679. function rr(n) {
  10680. return function (t) {
  10681. return kt(t, n);
  10682. };
  10683. }
  10684. function er(n, t, r, e) {
  10685. var u = e ? g : v,
  10686. i = -1,
  10687. o = t.length,
  10688. f = n;
  10689. for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o;) {
  10690. for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e));) {
  10691. f !== n && bi.call(f, a, 1), bi.call(n, a, 1);
  10692. }
  10693. }
  10694. return n;
  10695. }
  10696. function ur(n, t) {
  10697. for (var r = n ? t.length : 0, e = r - 1; r--;) {
  10698. var u = t[r];
  10699. if (r == e || u !== i) {
  10700. var i = u;
  10701. Se(u) ? bi.call(n, u, 1) : xr(n, u);
  10702. }
  10703. }
  10704. }
  10705. function ir(n, t) {
  10706. return n + Oi(Mi() * (t - n + 1));
  10707. }
  10708. function or(n, t) {
  10709. var r = "";
  10710. if (!n || 1 > t || 9007199254740991 < t) return r;
  10711. do {
  10712. t % 2 && (r += n), (t = Oi(t / 2)) && (n += n);
  10713. } while (t);
  10714. return r;
  10715. }
  10716. function fr(n, t) {
  10717. return bo(Be(n, t, Tu), n + "");
  10718. }
  10719. function cr(n) {
  10720. return Qn(Lu(n));
  10721. }
  10722. function ar(n, t) {
  10723. var r = Lu(n);
  10724. return Ce(r, pt(t, 0, r.length));
  10725. }
  10726. function lr(n, t, r, e) {
  10727. if (!gu(n)) return n;
  10728. t = Sr(t, n);
  10729. for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i;) {
  10730. var c = De(t[u]),
  10731. a = r;
  10732. if (u != o) {
  10733. var l = f[c],
  10734. a = e ? e(l, c, f) : T;
  10735. a === T && (a = gu(l) ? l : Se(t[u + 1]) ? [] : {});
  10736. }
  10737. ot(f, c, a), f = f[c];
  10738. }
  10739. return n;
  10740. }
  10741. function sr(n) {
  10742. return Ce(Lu(n));
  10743. }
  10744. function hr(n, t, r) {
  10745. var e = -1,
  10746. u = n.length;
  10747. for (0 > t && (t = -t > u ? 0 : u + t), r = r > u ? u : r, 0 > r && (r += u), u = t > r ? 0 : r - t >>> 0, t >>>= 0, r = Vu(u); ++e < u;) {
  10748. r[e] = n[e + t];
  10749. }
  10750. return r;
  10751. }
  10752. function pr(n, t) {
  10753. var r;
  10754. return eo(n, function (n, e, u) {
  10755. return r = t(n, e, u), !r;
  10756. }), !!r;
  10757. }
  10758. function _r(n, t, r) {
  10759. var e = 0,
  10760. u = null == n ? e : n.length;
  10761. if (typeof t == "number" && t === t && 2147483647 >= u) {
  10762. for (; e < u;) {
  10763. var i = e + u >>> 1,
  10764. o = n[i];
  10765. null !== o && !ju(o) && (r ? o <= t : o < t) ? e = i + 1 : u = i;
  10766. }
  10767. return u;
  10768. }
  10769. return vr(n, t, Tu, r);
  10770. }
  10771. function vr(n, t, r, e) {
  10772. t = r(t);
  10773. for (var u = 0, i = null == n ? 0 : n.length, o = t !== t, f = null === t, c = ju(t), a = t === T; u < i;) {
  10774. var l = Oi((u + i) / 2),
  10775. s = r(n[l]),
  10776. h = s !== T,
  10777. p = null === s,
  10778. _ = s === s,
  10779. v = ju(s);
  10780. (o ? e || _ : a ? _ && (e || h) : f ? _ && h && (e || !p) : c ? _ && h && !p && (e || !v) : p || v ? 0 : e ? s <= t : s < t) ? u = l + 1 : i = l;
  10781. }
  10782. return Ui(i, 4294967294);
  10783. }
  10784. function gr(n, t) {
  10785. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  10786. var o = n[r],
  10787. f = t ? t(o) : o;
  10788. if (!r || !au(f, c)) {
  10789. var c = f;
  10790. i[u++] = 0 === o ? 0 : o;
  10791. }
  10792. }
  10793. return i;
  10794. }
  10795. function dr(n) {
  10796. return typeof n == "number" ? n : ju(n) ? F : +n;
  10797. }
  10798. function yr(n) {
  10799. if (typeof n == "string") return n;
  10800. if (of(n)) return c(n, yr) + "";
  10801. if (ju(n)) return to ? to.call(n) : "";
  10802. var t = n + "";
  10803. return "0" == t && 1 / n == -$ ? "-0" : t;
  10804. }
  10805. function br(n, t, r) {
  10806. var e = -1,
  10807. u = o,
  10808. i = n.length,
  10809. c = true,
  10810. a = [],
  10811. l = a;
  10812. if (r) c = false, u = f;else if (200 <= i) {
  10813. if (u = t ? null : lo(n)) return U(u);
  10814. c = false, u = O, l = new Nn();
  10815. } else l = t ? [] : a;
  10816. n: for (; ++e < i;) {
  10817. var s = n[e],
  10818. h = t ? t(s) : s,
  10819. s = r || 0 !== s ? s : 0;
  10820. if (c && h === h) {
  10821. for (var p = l.length; p--;) {
  10822. if (l[p] === h) continue n;
  10823. }
  10824. t && l.push(h), a.push(s);
  10825. } else u(l, h, r) || (l !== a && l.push(h), a.push(s));
  10826. }
  10827. return a;
  10828. }
  10829. function xr(n, t) {
  10830. return t = Sr(t, n), n = 2 > t.length ? n : kt(n, hr(t, 0, -1)), null == n || delete n[De(qe(t))];
  10831. }
  10832. function jr(n, t, r, e) {
  10833. for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n);) {
  10834. ;
  10835. }
  10836. return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i);
  10837. }
  10838. function wr(n, t) {
  10839. var r = n;
  10840. return r instanceof Un && (r = r.value()), l(t, function (n, t) {
  10841. return t.func.apply(t.thisArg, a([n], t.args));
  10842. }, r);
  10843. }
  10844. function mr(n, t, r) {
  10845. var e = n.length;
  10846. if (2 > e) return e ? br(n[0]) : [];
  10847. for (var u = -1, i = Vu(e); ++u < e;) {
  10848. for (var o = n[u], f = -1; ++f < e;) {
  10849. f != u && (i[u] = yt(i[u] || o, n[f], t, r));
  10850. }
  10851. }
  10852. return br(wt(i, 1), t, r);
  10853. }
  10854. function Ar(n, t, r) {
  10855. for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u;) {
  10856. r(o, n[e], e < i ? t[e] : T);
  10857. }
  10858. return o;
  10859. }
  10860. function Er(n) {
  10861. return su(n) ? n : [];
  10862. }
  10863. function kr(n) {
  10864. return typeof n == "function" ? n : Tu;
  10865. }
  10866. function Sr(n, t) {
  10867. return of(n) ? n : Ie(n, t) ? [n] : xo(Ou(n));
  10868. }
  10869. function Or(n, t, r) {
  10870. var e = n.length;
  10871. return r = r === T ? e : r, !t && r >= e ? n : hr(n, t, r);
  10872. }
  10873. function Ir(n, t) {
  10874. if (t) return n.slice();
  10875. var r = n.length,
  10876. r = vi ? vi(r) : new n.constructor(r);
  10877. return n.copy(r), r;
  10878. }
  10879. function Rr(n) {
  10880. var t = new n.constructor(n.byteLength);
  10881. return new _i(t).set(new _i(n)), t;
  10882. }
  10883. function zr(n, t) {
  10884. return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length);
  10885. }
  10886. function Wr(n, t) {
  10887. if (n !== t) {
  10888. var r = n !== T,
  10889. e = null === n,
  10890. u = n === n,
  10891. i = ju(n),
  10892. o = t !== T,
  10893. f = null === t,
  10894. c = t === t,
  10895. a = ju(t);
  10896. if (!f && !a && !i && n > t || i && o && c && !f && !a || e && o && c || !r && c || !u) return 1;
  10897. if (!e && !i && !a && n < t || a && r && u && !e && !i || f && r && u || !o && u || !c) return -1;
  10898. }
  10899. return 0;
  10900. }
  10901. function Br(n, t, r, e) {
  10902. var u = -1,
  10903. i = n.length,
  10904. o = r.length,
  10905. f = -1,
  10906. c = t.length,
  10907. a = Li(i - o, 0),
  10908. l = Vu(c + a);
  10909. for (e = !e; ++f < c;) {
  10910. l[f] = t[f];
  10911. }
  10912. for (; ++u < o;) {
  10913. (e || u < i) && (l[r[u]] = n[u]);
  10914. }
  10915. for (; a--;) {
  10916. l[f++] = n[u++];
  10917. }
  10918. return l;
  10919. }
  10920. function Lr(n, t, r, e) {
  10921. var u = -1,
  10922. i = n.length,
  10923. o = -1,
  10924. f = r.length,
  10925. c = -1,
  10926. a = t.length,
  10927. l = Li(i - f, 0),
  10928. s = Vu(l + a);
  10929. for (e = !e; ++u < l;) {
  10930. s[u] = n[u];
  10931. }
  10932. for (l = u; ++c < a;) {
  10933. s[l + c] = t[c];
  10934. }
  10935. for (; ++o < f;) {
  10936. (e || u < i) && (s[l + r[o]] = n[u++]);
  10937. }
  10938. return s;
  10939. }
  10940. function Ur(n, t) {
  10941. var r = -1,
  10942. e = n.length;
  10943. for (t || (t = Vu(e)); ++r < e;) {
  10944. t[r] = n[r];
  10945. }
  10946. return t;
  10947. }
  10948. function Cr(n, t, r, e) {
  10949. var u = !r;
  10950. r || (r = {});
  10951. for (var i = -1, o = t.length; ++i < o;) {
  10952. var f = t[i],
  10953. c = e ? e(r[f], n[f], f, r, n) : T;
  10954. c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c);
  10955. }
  10956. return r;
  10957. }
  10958. function Dr(n, t) {
  10959. return Cr(n, ho(n), t);
  10960. }
  10961. function Mr(n, t) {
  10962. return Cr(n, po(n), t);
  10963. }
  10964. function Tr(n, r) {
  10965. return function (e, u) {
  10966. var i = of(e) ? t : ct,
  10967. o = r ? r() : {};
  10968. return i(e, n, ye(u, 2), o);
  10969. };
  10970. }
  10971. function $r(n) {
  10972. return fr(function (t, r) {
  10973. var e = -1,
  10974. u = r.length,
  10975. i = 1 < u ? r[u - 1] : T,
  10976. o = 2 < u ? r[2] : T,
  10977. i = 3 < n.length && typeof i == "function" ? (u--, i) : T;
  10978. for (o && Oe(r[0], r[1], o) && (i = 3 > u ? T : i, u = 1), t = Yu(t); ++e < u;) {
  10979. (o = r[e]) && n(t, o, e, i);
  10980. }
  10981. return t;
  10982. });
  10983. }
  10984. function Fr(n, t) {
  10985. return function (r, e) {
  10986. if (null == r) return r;
  10987. if (!lu(r)) return n(r, e);
  10988. for (var u = r.length, i = t ? u : -1, o = Yu(r); (t ? i-- : ++i < u) && false !== e(o[i], i, o);) {
  10989. ;
  10990. }
  10991. return r;
  10992. };
  10993. }
  10994. function Nr(n) {
  10995. return function (t, r, e) {
  10996. var u = -1,
  10997. i = Yu(t);
  10998. e = e(t);
  10999. for (var o = e.length; o--;) {
  11000. var f = e[n ? o : ++u];
  11001. if (false === r(i[f], f, i)) break;
  11002. }
  11003. return t;
  11004. };
  11005. }
  11006. function Pr(n, t, r) {
  11007. function e() {
  11008. return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments);
  11009. }
  11010. var u = 1 & t,
  11011. i = Vr(n);
  11012. return e;
  11013. }
  11014. function Zr(n) {
  11015. return function (t) {
  11016. t = Ou(t);
  11017. var r = Rn.test(t) ? M(t) : T,
  11018. e = r ? r[0] : t.charAt(0);
  11019. return t = r ? Or(r, 1).join("") : t.slice(1), e[n]() + t;
  11020. };
  11021. }
  11022. function qr(n) {
  11023. return function (t) {
  11024. return l(Du(Cu(t).replace(kn, "")), n, "");
  11025. };
  11026. }
  11027. function Vr(n) {
  11028. return function () {
  11029. var t = arguments;
  11030. switch (t.length) {
  11031. case 0:
  11032. return new n();
  11033. case 1:
  11034. return new n(t[0]);
  11035. case 2:
  11036. return new n(t[0], t[1]);
  11037. case 3:
  11038. return new n(t[0], t[1], t[2]);
  11039. case 4:
  11040. return new n(t[0], t[1], t[2], t[3]);
  11041. case 5:
  11042. return new n(t[0], t[1], t[2], t[3], t[4]);
  11043. case 6:
  11044. return new n(t[0], t[1], t[2], t[3], t[4], t[5]);
  11045. case 7:
  11046. return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]);
  11047. }
  11048. var r = ro(n.prototype),
  11049. t = n.apply(r, t);
  11050. return gu(t) ? t : r;
  11051. };
  11052. }
  11053. function Kr(t, r, e) {
  11054. function u() {
  11055. for (var o = arguments.length, f = Vu(o), c = o, a = de(u); c--;) {
  11056. f[c] = arguments[c];
  11057. }
  11058. return c = 3 > o && f[0] !== a && f[o - 1] !== a ? [] : L(f, a), o -= c.length, o < e ? ue(t, r, Jr, u.placeholder, T, f, c, T, T, e - o) : n(this && this !== $n && this instanceof u ? i : t, this, f);
  11059. }
  11060. var i = Vr(t);
  11061. return u;
  11062. }
  11063. function Gr(n) {
  11064. return function (t, r, e) {
  11065. var u = Yu(t);
  11066. if (!lu(t)) {
  11067. var i = ye(r, 3);
  11068. t = zu(t), r = function r(n) {
  11069. return i(u[n], n, u);
  11070. };
  11071. }
  11072. return r = n(t, r, e), -1 < r ? u[i ? t[r] : r] : T;
  11073. };
  11074. }
  11075. function Hr(n) {
  11076. return pe(function (t) {
  11077. var r = t.length,
  11078. e = r,
  11079. u = On.prototype.thru;
  11080. for (n && t.reverse(); e--;) {
  11081. var i = t[e];
  11082. if (typeof i != "function") throw new ni("Expected a function");
  11083. if (u && !o && "wrapper" == ge(i)) var o = new On([], true);
  11084. }
  11085. for (e = o ? e : r; ++e < r;) {
  11086. var i = t[e],
  11087. u = ge(i),
  11088. f = "wrapper" == u ? so(i) : T,
  11089. o = f && Re(f[0]) && 424 == f[1] && !f[4].length && 1 == f[9] ? o[ge(f[0])].apply(o, f[3]) : 1 == i.length && Re(i) ? o[u]() : o.thru(i);
  11090. }
  11091. return function () {
  11092. var n = arguments,
  11093. e = n[0];
  11094. if (o && 1 == n.length && of(e)) return o.plant(e).value();
  11095. for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r;) {
  11096. n = t[u].call(this, n);
  11097. }
  11098. return n;
  11099. };
  11100. });
  11101. }
  11102. function Jr(n, t, r, e, u, i, o, f, c, a) {
  11103. function l() {
  11104. for (var d = arguments.length, y = Vu(d), b = d; b--;) {
  11105. y[b] = arguments[b];
  11106. }
  11107. if (_) {
  11108. var x,
  11109. j = de(l),
  11110. b = y.length;
  11111. for (x = 0; b--;) {
  11112. y[b] === j && ++x;
  11113. }
  11114. }
  11115. if (e && (y = Br(y, e, u, _)), i && (y = Lr(y, i, o, _)), d -= x, _ && d < a) return j = L(y, j), ue(n, t, Jr, l.placeholder, r, y, j, f, c, a - d);
  11116. if (j = h ? r : this, b = p ? j[n] : n, d = y.length, f) {
  11117. x = y.length;
  11118. for (var w = Ui(f.length, x), m = Ur(y); w--;) {
  11119. var A = f[w];
  11120. y[w] = Se(A, x) ? m[A] : T;
  11121. }
  11122. } else v && 1 < d && y.reverse();
  11123. return s && c < d && (y.length = c), this && this !== $n && this instanceof l && (b = g || Vr(b)), b.apply(j, y);
  11124. }
  11125. var s = 128 & t,
  11126. h = 1 & t,
  11127. p = 2 & t,
  11128. _ = 24 & t,
  11129. v = 512 & t,
  11130. g = p ? T : Vr(n);
  11131. return l;
  11132. }
  11133. function Yr(n, t) {
  11134. return function (r, e) {
  11135. return Bt(r, n, t(e));
  11136. };
  11137. }
  11138. function Qr(n, t) {
  11139. return function (r, e) {
  11140. var u;
  11141. if (r === T && e === T) return t;
  11142. if (r !== T && (u = r), e !== T) {
  11143. if (u === T) return e;
  11144. typeof r == "string" || typeof e == "string" ? (r = yr(r), e = yr(e)) : (r = dr(r), e = dr(e)), u = n(r, e);
  11145. }
  11146. return u;
  11147. };
  11148. }
  11149. function Xr(t) {
  11150. return pe(function (r) {
  11151. return r = c(r, k(ye())), fr(function (e) {
  11152. var u = this;
  11153. return t(r, function (t) {
  11154. return n(t, u, e);
  11155. });
  11156. });
  11157. });
  11158. }
  11159. function ne(n, t) {
  11160. t = t === T ? " " : yr(t);
  11161. var r = t.length;
  11162. return 2 > r ? r ? or(t, n) : t : (r = or(t, Si(n / D(t))), Rn.test(t) ? Or(M(r), 0, n).join("") : r.slice(0, n));
  11163. }
  11164. function te(t, r, e, u) {
  11165. function i() {
  11166. for (var r = -1, c = arguments.length, a = -1, l = u.length, s = Vu(l + c), h = this && this !== $n && this instanceof i ? f : t; ++a < l;) {
  11167. s[a] = u[a];
  11168. }
  11169. for (; c--;) {
  11170. s[a++] = arguments[++r];
  11171. }
  11172. return n(h, o ? e : this, s);
  11173. }
  11174. var o = 1 & r,
  11175. f = Vr(t);
  11176. return i;
  11177. }
  11178. function re(n) {
  11179. return function (t, r, e) {
  11180. e && typeof e != "number" && Oe(t, r, e) && (r = e = T), t = mu(t), r === T ? (r = t, t = 0) : r = mu(r), e = e === T ? t < r ? 1 : -1 : mu(e);
  11181. var u = -1;
  11182. r = Li(Si((r - t) / (e || 1)), 0);
  11183. for (var i = Vu(r); r--;) {
  11184. i[n ? r : ++u] = t, t += e;
  11185. }
  11186. return i;
  11187. };
  11188. }
  11189. function ee(n) {
  11190. return function (t, r) {
  11191. return typeof t == "string" && typeof r == "string" || (t = ku(t), r = ku(r)), n(t, r);
  11192. };
  11193. }
  11194. function ue(n, t, r, e, u, i, o, f, c, a) {
  11195. var l = 8 & t,
  11196. s = l ? o : T;
  11197. o = l ? T : o;
  11198. var h = l ? i : T;
  11199. return i = l ? T : i, t = (t | (l ? 32 : 64)) & ~(l ? 64 : 32), 4 & t || (t &= -4), u = [n, t, u, h, s, i, o, f, c, a], r = r.apply(T, u), Re(n) && go(r, u), r.placeholder = e, Le(r, n, t);
  11200. }
  11201. function ie(n) {
  11202. var t = Ju[n];
  11203. return function (n, r) {
  11204. if (n = ku(n), r = null == r ? 0 : Ui(Au(r), 292)) {
  11205. var e = (Ou(n) + "e").split("e"),
  11206. e = t(e[0] + "e" + (+e[1] + r)),
  11207. e = (Ou(e) + "e").split("e");
  11208. return +(e[0] + "e" + (+e[1] - r));
  11209. }
  11210. return t(n);
  11211. };
  11212. }
  11213. function oe(n) {
  11214. return function (t) {
  11215. var r = _o(t);
  11216. return "[object Map]" == r ? W(t) : "[object Set]" == r ? C(t) : E(t, n(t));
  11217. };
  11218. }
  11219. function fe(n, t, r, e, u, i, o, f) {
  11220. var c = 2 & t;
  11221. if (!c && typeof n != "function") throw new ni("Expected a function");
  11222. var a = e ? e.length : 0;
  11223. if (a || (t &= -97, e = u = T), o = o === T ? o : Li(Au(o), 0), f = f === T ? f : Au(f), a -= u ? u.length : 0, 64 & t) {
  11224. var l = e,
  11225. s = u;
  11226. e = u = T;
  11227. }
  11228. var h = c ? T : so(n);
  11229. return i = [n, t, r, e, u, l, s, i, o, f], h && (r = i[1], n = h[1], t = r | n, e = 128 == n && 8 == r || 128 == n && 256 == r && i[7].length <= h[8] || 384 == n && h[7].length <= h[8] && 8 == r, 131 > t || e) && (1 & n && (i[2] = h[2], t |= 1 & r ? 0 : 4), (r = h[3]) && (e = i[3], i[3] = e ? Br(e, r, h[4]) : r, i[4] = e ? L(i[3], "__lodash_placeholder__") : h[4]), (r = h[5]) && (e = i[5], i[5] = e ? Lr(e, r, h[6]) : r, i[6] = e ? L(i[5], "__lodash_placeholder__") : h[6]), (r = h[7]) && (i[7] = r), 128 & n && (i[8] = null == i[8] ? h[8] : Ui(i[8], h[8])), null == i[9] && (i[9] = h[9]), i[0] = h[0], i[1] = t), n = i[0], t = i[1], r = i[2], e = i[3], u = i[4], f = i[9] = i[9] === T ? c ? 0 : n.length : Li(i[9] - a, 0), !f && 24 & t && (t &= -25), Le((h ? fo : go)(t && 1 != t ? 8 == t || 16 == t ? Kr(n, t, f) : 32 != t && 33 != t || u.length ? Jr.apply(T, i) : te(n, t, r, e) : Pr(n, t, r), i), n, t);
  11230. }
  11231. function ce(n, t, r, e) {
  11232. return n === T || au(n, ri[r]) && !ii.call(e, r) ? t : n;
  11233. }
  11234. function ae(n, t, r, e, u, i) {
  11235. return gu(n) && gu(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n;
  11236. }
  11237. function le(n) {
  11238. return bu(n) ? T : n;
  11239. }
  11240. function se(n, t, r, e, u, i) {
  11241. var o = 1 & r,
  11242. f = n.length,
  11243. c = t.length;
  11244. if (f != c && !(o && c > f)) return false;
  11245. if ((c = i.get(n)) && i.get(t)) return c == t;
  11246. var c = -1,
  11247. a = true,
  11248. l = 2 & r ? new Nn() : T;
  11249. for (i.set(n, t), i.set(t, n); ++c < f;) {
  11250. var s = n[c],
  11251. p = t[c];
  11252. if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i);
  11253. if (_ !== T) {
  11254. if (_) continue;
  11255. a = false;
  11256. break;
  11257. }
  11258. if (l) {
  11259. if (!h(t, function (n, t) {
  11260. if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t);
  11261. })) {
  11262. a = false;
  11263. break;
  11264. }
  11265. } else if (s !== p && !u(s, p, r, e, i)) {
  11266. a = false;
  11267. break;
  11268. }
  11269. }
  11270. return i.delete(n), i.delete(t), a;
  11271. }
  11272. function he(n, t, r, e, u, i, o) {
  11273. switch (r) {
  11274. case "[object DataView]":
  11275. if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break;
  11276. n = n.buffer, t = t.buffer;
  11277. case "[object ArrayBuffer]":
  11278. if (n.byteLength != t.byteLength || !i(new _i(n), new _i(t))) break;
  11279. return true;
  11280. case "[object Boolean]":
  11281. case "[object Date]":
  11282. case "[object Number]":
  11283. return au(+n, +t);
  11284. case "[object Error]":
  11285. return n.name == t.name && n.message == t.message;
  11286. case "[object RegExp]":
  11287. case "[object String]":
  11288. return n == t + "";
  11289. case "[object Map]":
  11290. var f = W;
  11291. case "[object Set]":
  11292. if (f || (f = U), n.size != t.size && !(1 & e)) break;
  11293. return (r = o.get(n)) ? r == t : (e |= 2, o.set(n, t), t = se(f(n), f(t), e, u, i, o), o.delete(n), t);
  11294. case "[object Symbol]":
  11295. if (no) return no.call(n) == no.call(t);
  11296. }
  11297. return false;
  11298. }
  11299. function pe(n) {
  11300. return bo(Be(n, T, Pe), n + "");
  11301. }
  11302. function _e(n) {
  11303. return St(n, zu, ho);
  11304. }
  11305. function ve(n) {
  11306. return St(n, Wu, po);
  11307. }
  11308. function ge(n) {
  11309. for (var t = n.name + "", r = Ki[t], e = ii.call(Ki, t) ? r.length : 0; e--;) {
  11310. var u = r[e],
  11311. i = u.func;
  11312. if (null == i || i == n) return u.name;
  11313. }
  11314. return t;
  11315. }
  11316. function de(n) {
  11317. return (ii.call(An, "placeholder") ? An : n).placeholder;
  11318. }
  11319. function ye() {
  11320. var n = An.iteratee || $u,
  11321. n = n === $u ? qt : n;
  11322. return arguments.length ? n(arguments[0], arguments[1]) : n;
  11323. }
  11324. function be(n, t) {
  11325. var r = n.__data__,
  11326. e = _typeof(t);
  11327. return ("string" == e || "number" == e || "symbol" == e || "boolean" == e ? "__proto__" !== t : null === t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
  11328. }
  11329. function xe(n) {
  11330. for (var t = zu(n), r = t.length; r--;) {
  11331. var e = t[r],
  11332. u = n[e];
  11333. t[r] = [e, u, u === u && !gu(u)];
  11334. }
  11335. return t;
  11336. }
  11337. function je(n, t) {
  11338. var r = null == n ? T : n[t];
  11339. return Ft(r) ? r : T;
  11340. }
  11341. function we(n, t, r) {
  11342. t = Sr(t, n);
  11343. for (var e = -1, u = t.length, i = false; ++e < u;) {
  11344. var o = De(t[e]);
  11345. if (!(i = null != n && r(n, o))) break;
  11346. n = n[o];
  11347. }
  11348. return i || ++e != u ? i : (u = null == n ? 0 : n.length, !!u && vu(u) && Se(o, u) && (of(n) || uf(n)));
  11349. }
  11350. function me(n) {
  11351. var t = n.length,
  11352. r = new n.constructor(t);
  11353. return t && "string" == typeof n[0] && ii.call(n, "index") && (r.index = n.index, r.input = n.input), r;
  11354. }
  11355. function Ae(n) {
  11356. return typeof n.constructor != "function" || ze(n) ? {} : ro(gi(n));
  11357. }
  11358. function Ee(n, t, r) {
  11359. var e = n.constructor;
  11360. switch (t) {
  11361. case "[object ArrayBuffer]":
  11362. return Rr(n);
  11363. case "[object Boolean]":
  11364. case "[object Date]":
  11365. return new e(+n);
  11366. case "[object DataView]":
  11367. return t = r ? Rr(n.buffer) : n.buffer, new n.constructor(t, n.byteOffset, n.byteLength);
  11368. case "[object Float32Array]":
  11369. case "[object Float64Array]":
  11370. case "[object Int8Array]":
  11371. case "[object Int16Array]":
  11372. case "[object Int32Array]":
  11373. case "[object Uint8Array]":
  11374. case "[object Uint8ClampedArray]":
  11375. case "[object Uint16Array]":
  11376. case "[object Uint32Array]":
  11377. return zr(n, r);
  11378. case "[object Map]":
  11379. return new e();
  11380. case "[object Number]":
  11381. case "[object String]":
  11382. return new e(n);
  11383. case "[object RegExp]":
  11384. return t = new n.constructor(n.source, _n.exec(n)), t.lastIndex = n.lastIndex, t;
  11385. case "[object Set]":
  11386. return new e();
  11387. case "[object Symbol]":
  11388. return no ? Yu(no.call(n)) : {};
  11389. }
  11390. }
  11391. function ke(n) {
  11392. return of(n) || uf(n) || !!(xi && n && n[xi]);
  11393. }
  11394. function Se(n, t) {
  11395. var r = _typeof(n);
  11396. return t = null == t ? 9007199254740991 : t, !!t && ("number" == r || "symbol" != r && bn.test(n)) && -1 < n && 0 == n % 1 && n < t;
  11397. }
  11398. function Oe(n, t, r) {
  11399. if (!gu(r)) return false;
  11400. var e = _typeof(t);
  11401. return !!("number" == e ? lu(r) && Se(t, r.length) : "string" == e && t in r) && au(r[t], n);
  11402. }
  11403. function Ie(n, t) {
  11404. if (of(n)) return false;
  11405. var r = _typeof(n);
  11406. return !("number" != r && "symbol" != r && "boolean" != r && null != n && !ju(n)) || nn.test(n) || !X.test(n) || null != t && n in Yu(t);
  11407. }
  11408. function Re(n) {
  11409. var t = ge(n),
  11410. r = An[t];
  11411. return typeof r == "function" && t in Un.prototype && (n === r || (t = so(r), !!t && n === t[0]));
  11412. }
  11413. function ze(n) {
  11414. var t = n && n.constructor;
  11415. return n === (typeof t == "function" && t.prototype || ri);
  11416. }
  11417. function We(n, t) {
  11418. return function (r) {
  11419. return null != r && r[n] === t && (t !== T || n in Yu(r));
  11420. };
  11421. }
  11422. function Be(t, r, e) {
  11423. return r = Li(r === T ? t.length - 1 : r, 0), function () {
  11424. for (var u = arguments, i = -1, o = Li(u.length - r, 0), f = Vu(o); ++i < o;) {
  11425. f[i] = u[r + i];
  11426. }
  11427. for (i = -1, o = Vu(r + 1); ++i < r;) {
  11428. o[i] = u[i];
  11429. }
  11430. return o[r] = e(f), n(t, this, o);
  11431. };
  11432. }
  11433. function Le(n, t, r) {
  11434. var e = t + "";
  11435. t = bo;
  11436. var u,
  11437. i = Te;
  11438. return u = (u = e.match(an)) ? u[1].split(ln) : [], r = i(u, r), (i = r.length) && (u = i - 1, r[u] = (1 < i ? "& " : "") + r[u], r = r.join(2 < i ? ", " : " "), e = e.replace(cn, "{\n/* [wrapped with " + r + "] */\n")), t(n, e);
  11439. }
  11440. function Ue(n) {
  11441. var t = 0,
  11442. r = 0;
  11443. return function () {
  11444. var e = Ci(),
  11445. u = 16 - (e - r);
  11446. if (r = e, 0 < u) {
  11447. if (800 <= ++t) return arguments[0];
  11448. } else t = 0;
  11449. return n.apply(T, arguments);
  11450. };
  11451. }
  11452. function Ce(n, t) {
  11453. var r = -1,
  11454. e = n.length,
  11455. u = e - 1;
  11456. for (t = t === T ? e : t; ++r < t;) {
  11457. var e = ir(r, u),
  11458. i = n[e];
  11459. n[e] = n[r], n[r] = i;
  11460. }
  11461. return n.length = t, n;
  11462. }
  11463. function De(n) {
  11464. if (typeof n == "string" || ju(n)) return n;
  11465. var t = n + "";
  11466. return "0" == t && 1 / n == -$ ? "-0" : t;
  11467. }
  11468. function Me(n) {
  11469. if (null != n) {
  11470. try {
  11471. return ui.call(n);
  11472. } catch (n) {}
  11473. return n + "";
  11474. }
  11475. return "";
  11476. }
  11477. function Te(n, t) {
  11478. return r(N, function (r) {
  11479. var e = "_." + r[0];
  11480. t & r[1] && !o(n, e) && n.push(e);
  11481. }), n.sort();
  11482. }
  11483. function $e(n) {
  11484. if (n instanceof Un) return n.clone();
  11485. var t = new On(n.__wrapped__, n.__chain__);
  11486. return t.__actions__ = Ur(n.__actions__), t.__index__ = n.__index__, t.__values__ = n.__values__, t;
  11487. }
  11488. function Fe(n, t, r) {
  11489. var e = null == n ? 0 : n.length;
  11490. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), _(n, ye(t, 3), r)) : -1;
  11491. }
  11492. function Ne(n, t, r) {
  11493. var e = null == n ? 0 : n.length;
  11494. if (!e) return -1;
  11495. var u = e - 1;
  11496. return r !== T && (u = Au(r), u = 0 > r ? Li(e + u, 0) : Ui(u, e - 1)), _(n, ye(t, 3), u, true);
  11497. }
  11498. function Pe(n) {
  11499. return (null == n ? 0 : n.length) ? wt(n, 1) : [];
  11500. }
  11501. function Ze(n) {
  11502. return n && n.length ? n[0] : T;
  11503. }
  11504. function qe(n) {
  11505. var t = null == n ? 0 : n.length;
  11506. return t ? n[t - 1] : T;
  11507. }
  11508. function Ve(n, t) {
  11509. return n && n.length && t && t.length ? er(n, t) : n;
  11510. }
  11511. function Ke(n) {
  11512. return null == n ? n : Ti.call(n);
  11513. }
  11514. function Ge(n) {
  11515. if (!n || !n.length) return [];
  11516. var t = 0;
  11517. return n = i(n, function (n) {
  11518. if (su(n)) return t = Li(n.length, t), true;
  11519. }), A(t, function (t) {
  11520. return c(n, b(t));
  11521. });
  11522. }
  11523. function He(t, r) {
  11524. if (!t || !t.length) return [];
  11525. var e = Ge(t);
  11526. return null == r ? e : c(e, function (t) {
  11527. return n(r, T, t);
  11528. });
  11529. }
  11530. function Je(n) {
  11531. return n = An(n), n.__chain__ = true, n;
  11532. }
  11533. function Ye(n, t) {
  11534. return t(n);
  11535. }
  11536. function Qe() {
  11537. return this;
  11538. }
  11539. function Xe(n, t) {
  11540. return (of(n) ? r : eo)(n, ye(t, 3));
  11541. }
  11542. function nu(n, t) {
  11543. return (of(n) ? e : uo)(n, ye(t, 3));
  11544. }
  11545. function tu(n, t) {
  11546. return (of(n) ? c : Gt)(n, ye(t, 3));
  11547. }
  11548. function ru(n, t, r) {
  11549. return t = r ? T : t, t = n && null == t ? n.length : t, fe(n, 128, T, T, T, T, t);
  11550. }
  11551. function eu(n, t) {
  11552. var r;
  11553. if (typeof t != "function") throw new ni("Expected a function");
  11554. return n = Au(n), function () {
  11555. return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r;
  11556. };
  11557. }
  11558. function uu(n, t, r) {
  11559. return t = r ? T : t, n = fe(n, 8, T, T, T, T, T, t), n.placeholder = uu.placeholder, n;
  11560. }
  11561. function iu(n, t, r) {
  11562. return t = r ? T : t, n = fe(n, 16, T, T, T, T, T, t), n.placeholder = iu.placeholder, n;
  11563. }
  11564. function ou(n, t, r) {
  11565. function e(t) {
  11566. var r = c,
  11567. e = a;
  11568. return c = a = T, _ = t, s = n.apply(e, r);
  11569. }
  11570. function u(n) {
  11571. var r = n - p;
  11572. return n -= _, p === T || r >= t || 0 > r || g && n >= l;
  11573. }
  11574. function i() {
  11575. var n = Ko();
  11576. if (u(n)) return o(n);
  11577. var r,
  11578. e = yo;
  11579. r = n - _, n = t - (n - p), r = g ? Ui(n, l - r) : n, h = e(i, r);
  11580. }
  11581. function o(n) {
  11582. return h = T, d && c ? e(n) : (c = a = T, s);
  11583. }
  11584. function f() {
  11585. var n = Ko(),
  11586. r = u(n);
  11587. if (c = arguments, a = this, p = n, r) {
  11588. if (h === T) return _ = n = p, h = yo(i, t), v ? e(n) : s;
  11589. if (g) return h = yo(i, t), e(p);
  11590. }
  11591. return h === T && (h = yo(i, t)), s;
  11592. }
  11593. var c,
  11594. a,
  11595. l,
  11596. s,
  11597. h,
  11598. p,
  11599. _ = 0,
  11600. v = false,
  11601. g = false,
  11602. d = true;
  11603. if (typeof n != "function") throw new ni("Expected a function");
  11604. return t = ku(t) || 0, gu(r) && (v = !!r.leading, l = (g = "maxWait" in r) ? Li(ku(r.maxWait) || 0, t) : l, d = "trailing" in r ? !!r.trailing : d), f.cancel = function () {
  11605. h !== T && ao(h), _ = 0, c = p = a = h = T;
  11606. }, f.flush = function () {
  11607. return h === T ? s : o(Ko());
  11608. }, f;
  11609. }
  11610. function fu(n, t) {
  11611. function r() {
  11612. var e = arguments,
  11613. u = t ? t.apply(this, e) : e[0],
  11614. i = r.cache;
  11615. return i.has(u) ? i.get(u) : (e = n.apply(this, e), r.cache = i.set(u, e) || i, e);
  11616. }
  11617. if (typeof n != "function" || null != t && typeof t != "function") throw new ni("Expected a function");
  11618. return r.cache = new (fu.Cache || Fn)(), r;
  11619. }
  11620. function cu(n) {
  11621. if (typeof n != "function") throw new ni("Expected a function");
  11622. return function () {
  11623. var t = arguments;
  11624. switch (t.length) {
  11625. case 0:
  11626. return !n.call(this);
  11627. case 1:
  11628. return !n.call(this, t[0]);
  11629. case 2:
  11630. return !n.call(this, t[0], t[1]);
  11631. case 3:
  11632. return !n.call(this, t[0], t[1], t[2]);
  11633. }
  11634. return !n.apply(this, t);
  11635. };
  11636. }
  11637. function au(n, t) {
  11638. return n === t || n !== n && t !== t;
  11639. }
  11640. function lu(n) {
  11641. return null != n && vu(n.length) && !pu(n);
  11642. }
  11643. function su(n) {
  11644. return du(n) && lu(n);
  11645. }
  11646. function hu(n) {
  11647. if (!du(n)) return false;
  11648. var t = Ot(n);
  11649. return "[object Error]" == t || "[object DOMException]" == t || typeof n.message == "string" && typeof n.name == "string" && !bu(n);
  11650. }
  11651. function pu(n) {
  11652. return !!gu(n) && (n = Ot(n), "[object Function]" == n || "[object GeneratorFunction]" == n || "[object AsyncFunction]" == n || "[object Proxy]" == n);
  11653. }
  11654. function _u(n) {
  11655. return typeof n == "number" && n == Au(n);
  11656. }
  11657. function vu(n) {
  11658. return typeof n == "number" && -1 < n && 0 == n % 1 && 9007199254740991 >= n;
  11659. }
  11660. function gu(n) {
  11661. var t = _typeof(n);
  11662. return null != n && ("object" == t || "function" == t);
  11663. }
  11664. function du(n) {
  11665. return null != n && _typeof(n) == "object";
  11666. }
  11667. function yu(n) {
  11668. return typeof n == "number" || du(n) && "[object Number]" == Ot(n);
  11669. }
  11670. function bu(n) {
  11671. return !(!du(n) || "[object Object]" != Ot(n)) && (n = gi(n), null === n || (n = ii.call(n, "constructor") && n.constructor, typeof n == "function" && n instanceof n && ui.call(n) == ai));
  11672. }
  11673. function xu(n) {
  11674. return typeof n == "string" || !of(n) && du(n) && "[object String]" == Ot(n);
  11675. }
  11676. function ju(n) {
  11677. return _typeof(n) == "symbol" || du(n) && "[object Symbol]" == Ot(n);
  11678. }
  11679. function wu(n) {
  11680. if (!n) return [];
  11681. if (lu(n)) return xu(n) ? M(n) : Ur(n);
  11682. if (ji && n[ji]) {
  11683. n = n[ji]();
  11684. for (var t, r = []; !(t = n.next()).done;) {
  11685. r.push(t.value);
  11686. }
  11687. return r;
  11688. }
  11689. return t = _o(n), ("[object Map]" == t ? W : "[object Set]" == t ? U : Lu)(n);
  11690. }
  11691. function mu(n) {
  11692. return n ? (n = ku(n), n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) : 0 === n ? n : 0;
  11693. }
  11694. function Au(n) {
  11695. n = mu(n);
  11696. var t = n % 1;
  11697. return n === n ? t ? n - t : n : 0;
  11698. }
  11699. function Eu(n) {
  11700. return n ? pt(Au(n), 0, 4294967295) : 0;
  11701. }
  11702. function ku(n) {
  11703. if (typeof n == "number") return n;
  11704. if (ju(n)) return F;
  11705. if (gu(n) && (n = typeof n.valueOf == "function" ? n.valueOf() : n, n = gu(n) ? n + "" : n), typeof n != "string") return 0 === n ? n : +n;
  11706. n = n.replace(un, "");
  11707. var t = gn.test(n);
  11708. return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n;
  11709. }
  11710. function Su(n) {
  11711. return Cr(n, Wu(n));
  11712. }
  11713. function Ou(n) {
  11714. return null == n ? "" : yr(n);
  11715. }
  11716. function Iu(n, t, r) {
  11717. return n = null == n ? T : kt(n, t), n === T ? r : n;
  11718. }
  11719. function Ru(n, t) {
  11720. return null != n && we(n, t, zt);
  11721. }
  11722. function zu(n) {
  11723. return lu(n) ? qn(n) : Vt(n);
  11724. }
  11725. function Wu(n) {
  11726. if (lu(n)) n = qn(n, true);else if (gu(n)) {
  11727. var t,
  11728. r = ze(n),
  11729. e = [];
  11730. for (t in n) {
  11731. ("constructor" != t || !r && ii.call(n, t)) && e.push(t);
  11732. }
  11733. n = e;
  11734. } else {
  11735. if (t = [], null != n) for (r in Yu(n)) {
  11736. t.push(r);
  11737. }
  11738. n = t;
  11739. }
  11740. return n;
  11741. }
  11742. function Bu(n, t) {
  11743. if (null == n) return {};
  11744. var r = c(ve(n), function (n) {
  11745. return [n];
  11746. });
  11747. return t = ye(t), tr(n, r, function (n, r) {
  11748. return t(n, r[0]);
  11749. });
  11750. }
  11751. function Lu(n) {
  11752. return null == n ? [] : S(n, zu(n));
  11753. }
  11754. function Uu(n) {
  11755. return Tf(Ou(n).toLowerCase());
  11756. }
  11757. function Cu(n) {
  11758. return (n = Ou(n)) && n.replace(xn, Xn).replace(Sn, "");
  11759. }
  11760. function Du(n, t, r) {
  11761. return n = Ou(n), t = r ? T : t, t === T ? zn.test(n) ? n.match(In) || [] : n.match(sn) || [] : n.match(t) || [];
  11762. }
  11763. function Mu(n) {
  11764. return function () {
  11765. return n;
  11766. };
  11767. }
  11768. function Tu(n) {
  11769. return n;
  11770. }
  11771. function $u(n) {
  11772. return qt(typeof n == "function" ? n : _t(n, 1));
  11773. }
  11774. function Fu(n, t, e) {
  11775. var u = zu(t),
  11776. i = Et(t, u);
  11777. null != e || gu(t) && (i.length || !u.length) || (e = t, t = n, n = this, i = Et(t, zu(t)));
  11778. var o = !(gu(e) && "chain" in e && !e.chain),
  11779. f = pu(n);
  11780. return r(i, function (r) {
  11781. var e = t[r];
  11782. n[r] = e, f && (n.prototype[r] = function () {
  11783. var t = this.__chain__;
  11784. if (o || t) {
  11785. var r = n(this.__wrapped__);
  11786. return (r.__actions__ = Ur(this.__actions__)).push({
  11787. func: e,
  11788. args: arguments,
  11789. thisArg: n
  11790. }), r.__chain__ = t, r;
  11791. }
  11792. return e.apply(n, a([this.value()], arguments));
  11793. });
  11794. }), n;
  11795. }
  11796. function Nu() {}
  11797. function Pu(n) {
  11798. return Ie(n) ? b(De(n)) : rr(n);
  11799. }
  11800. function Zu() {
  11801. return [];
  11802. }
  11803. function qu() {
  11804. return false;
  11805. }
  11806. mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn));
  11807. var Vu = mn.Array,
  11808. Ku = mn.Date,
  11809. Gu = mn.Error,
  11810. Hu = mn.Function,
  11811. Ju = mn.Math,
  11812. Yu = mn.Object,
  11813. Qu = mn.RegExp,
  11814. Xu = mn.String,
  11815. ni = mn.TypeError,
  11816. ti = Vu.prototype,
  11817. ri = Yu.prototype,
  11818. ei = mn["__core-js_shared__"],
  11819. ui = Hu.prototype.toString,
  11820. ii = ri.hasOwnProperty,
  11821. oi = 0,
  11822. fi = function () {
  11823. var n = /[^.]+$/.exec(ei && ei.keys && ei.keys.IE_PROTO || "");
  11824. return n ? "Symbol(src)_1." + n : "";
  11825. }(),
  11826. ci = ri.toString,
  11827. ai = ui.call(Yu),
  11828. li = $n._,
  11829. si = Qu("^" + ui.call(ii).replace(rn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"),
  11830. hi = Pn ? mn.Buffer : T,
  11831. pi = mn.Symbol,
  11832. _i = mn.Uint8Array,
  11833. vi = hi ? hi.g : T,
  11834. gi = B(Yu.getPrototypeOf, Yu),
  11835. di = Yu.create,
  11836. yi = ri.propertyIsEnumerable,
  11837. bi = ti.splice,
  11838. xi = pi ? pi.isConcatSpreadable : T,
  11839. ji = pi ? pi.iterator : T,
  11840. wi = pi ? pi.toStringTag : T,
  11841. mi = function () {
  11842. try {
  11843. var n = je(Yu, "defineProperty");
  11844. return n({}, "", {}), n;
  11845. } catch (n) {}
  11846. }(),
  11847. Ai = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout,
  11848. Ei = Ku && Ku.now !== $n.Date.now && Ku.now,
  11849. ki = mn.setTimeout !== $n.setTimeout && mn.setTimeout,
  11850. Si = Ju.ceil,
  11851. Oi = Ju.floor,
  11852. Ii = Yu.getOwnPropertySymbols,
  11853. Ri = hi ? hi.isBuffer : T,
  11854. zi = mn.isFinite,
  11855. Wi = ti.join,
  11856. Bi = B(Yu.keys, Yu),
  11857. Li = Ju.max,
  11858. Ui = Ju.min,
  11859. Ci = Ku.now,
  11860. Di = mn.parseInt,
  11861. Mi = Ju.random,
  11862. Ti = ti.reverse,
  11863. $i = je(mn, "DataView"),
  11864. Fi = je(mn, "Map"),
  11865. Ni = je(mn, "Promise"),
  11866. Pi = je(mn, "Set"),
  11867. Zi = je(mn, "WeakMap"),
  11868. qi = je(Yu, "create"),
  11869. Vi = Zi && new Zi(),
  11870. Ki = {},
  11871. Gi = Me($i),
  11872. Hi = Me(Fi),
  11873. Ji = Me(Ni),
  11874. Yi = Me(Pi),
  11875. Qi = Me(Zi),
  11876. Xi = pi ? pi.prototype : T,
  11877. no = Xi ? Xi.valueOf : T,
  11878. to = Xi ? Xi.toString : T,
  11879. ro = function () {
  11880. function n() {}
  11881. return function (t) {
  11882. return gu(t) ? di ? di(t) : (n.prototype = t, t = new n(), n.prototype = T, t) : {};
  11883. };
  11884. }();
  11885. An.templateSettings = {
  11886. escape: J,
  11887. evaluate: Y,
  11888. interpolate: Q,
  11889. variable: "",
  11890. imports: {
  11891. _: An
  11892. }
  11893. }, An.prototype = En.prototype, An.prototype.constructor = An, On.prototype = ro(En.prototype), On.prototype.constructor = On, Un.prototype = ro(En.prototype), Un.prototype.constructor = Un, Mn.prototype.clear = function () {
  11894. this.__data__ = qi ? qi(null) : {}, this.size = 0;
  11895. }, Mn.prototype.delete = function (n) {
  11896. return n = this.has(n) && delete this.__data__[n], this.size -= n ? 1 : 0, n;
  11897. }, Mn.prototype.get = function (n) {
  11898. var t = this.__data__;
  11899. return qi ? (n = t[n], "__lodash_hash_undefined__" === n ? T : n) : ii.call(t, n) ? t[n] : T;
  11900. }, Mn.prototype.has = function (n) {
  11901. var t = this.__data__;
  11902. return qi ? t[n] !== T : ii.call(t, n);
  11903. }, Mn.prototype.set = function (n, t) {
  11904. var r = this.__data__;
  11905. return this.size += this.has(n) ? 0 : 1, r[n] = qi && t === T ? "__lodash_hash_undefined__" : t, this;
  11906. }, Tn.prototype.clear = function () {
  11907. this.__data__ = [], this.size = 0;
  11908. }, Tn.prototype.delete = function (n) {
  11909. var t = this.__data__;
  11910. return n = ft(t, n), !(0 > n) && (n == t.length - 1 ? t.pop() : bi.call(t, n, 1), --this.size, true);
  11911. }, Tn.prototype.get = function (n) {
  11912. var t = this.__data__;
  11913. return n = ft(t, n), 0 > n ? T : t[n][1];
  11914. }, Tn.prototype.has = function (n) {
  11915. return -1 < ft(this.__data__, n);
  11916. }, Tn.prototype.set = function (n, t) {
  11917. var r = this.__data__,
  11918. e = ft(r, n);
  11919. return 0 > e ? (++this.size, r.push([n, t])) : r[e][1] = t, this;
  11920. }, Fn.prototype.clear = function () {
  11921. this.size = 0, this.__data__ = {
  11922. hash: new Mn(),
  11923. map: new (Fi || Tn)(),
  11924. string: new Mn()
  11925. };
  11926. }, Fn.prototype.delete = function (n) {
  11927. return n = be(this, n).delete(n), this.size -= n ? 1 : 0, n;
  11928. }, Fn.prototype.get = function (n) {
  11929. return be(this, n).get(n);
  11930. }, Fn.prototype.has = function (n) {
  11931. return be(this, n).has(n);
  11932. }, Fn.prototype.set = function (n, t) {
  11933. var r = be(this, n),
  11934. e = r.size;
  11935. return r.set(n, t), this.size += r.size == e ? 0 : 1, this;
  11936. }, Nn.prototype.add = Nn.prototype.push = function (n) {
  11937. return this.__data__.set(n, "__lodash_hash_undefined__"), this;
  11938. }, Nn.prototype.has = function (n) {
  11939. return this.__data__.has(n);
  11940. }, Zn.prototype.clear = function () {
  11941. this.__data__ = new Tn(), this.size = 0;
  11942. }, Zn.prototype.delete = function (n) {
  11943. var t = this.__data__;
  11944. return n = t.delete(n), this.size = t.size, n;
  11945. }, Zn.prototype.get = function (n) {
  11946. return this.__data__.get(n);
  11947. }, Zn.prototype.has = function (n) {
  11948. return this.__data__.has(n);
  11949. }, Zn.prototype.set = function (n, t) {
  11950. var r = this.__data__;
  11951. if (r instanceof Tn) {
  11952. var e = r.__data__;
  11953. if (!Fi || 199 > e.length) return e.push([n, t]), this.size = ++r.size, this;
  11954. r = this.__data__ = new Fn(e);
  11955. }
  11956. return r.set(n, t), this.size = r.size, this;
  11957. };
  11958. var eo = Fr(mt),
  11959. uo = Fr(At, true),
  11960. io = Nr(),
  11961. oo = Nr(true),
  11962. fo = Vi ? function (n, t) {
  11963. return Vi.set(n, t), n;
  11964. } : Tu,
  11965. co = mi ? function (n, t) {
  11966. return mi(n, "toString", {
  11967. configurable: true,
  11968. enumerable: false,
  11969. value: Mu(t),
  11970. writable: true
  11971. });
  11972. } : Tu,
  11973. ao = Ai || function (n) {
  11974. return $n.clearTimeout(n);
  11975. },
  11976. lo = Pi && 1 / U(new Pi([, -0]))[1] == $ ? function (n) {
  11977. return new Pi(n);
  11978. } : Nu,
  11979. so = Vi ? function (n) {
  11980. return Vi.get(n);
  11981. } : Nu,
  11982. ho = Ii ? function (n) {
  11983. return null == n ? [] : (n = Yu(n), i(Ii(n), function (t) {
  11984. return yi.call(n, t);
  11985. }));
  11986. } : Zu,
  11987. po = Ii ? function (n) {
  11988. for (var t = []; n;) {
  11989. a(t, ho(n)), n = gi(n);
  11990. }
  11991. return t;
  11992. } : Zu,
  11993. _o = Ot;
  11994. ($i && "[object DataView]" != _o(new $i(new ArrayBuffer(1))) || Fi && "[object Map]" != _o(new Fi()) || Ni && "[object Promise]" != _o(Ni.resolve()) || Pi && "[object Set]" != _o(new Pi()) || Zi && "[object WeakMap]" != _o(new Zi())) && (_o = function _o(n) {
  11995. var t = Ot(n);
  11996. if (n = (n = "[object Object]" == t ? n.constructor : T) ? Me(n) : "") switch (n) {
  11997. case Gi:
  11998. return "[object DataView]";
  11999. case Hi:
  12000. return "[object Map]";
  12001. case Ji:
  12002. return "[object Promise]";
  12003. case Yi:
  12004. return "[object Set]";
  12005. case Qi:
  12006. return "[object WeakMap]";
  12007. }
  12008. return t;
  12009. });
  12010. var vo = ei ? pu : qu,
  12011. go = Ue(fo),
  12012. yo = ki || function (n, t) {
  12013. return $n.setTimeout(n, t);
  12014. },
  12015. bo = Ue(co),
  12016. xo = function (n) {
  12017. n = fu(n, function (n) {
  12018. return 500 === t.size && t.clear(), n;
  12019. });
  12020. var t = n.cache;
  12021. return n;
  12022. }(function (n) {
  12023. var t = [];
  12024. return 46 === n.charCodeAt(0) && t.push(""), n.replace(tn, function (n, r, e, u) {
  12025. t.push(e ? u.replace(hn, "$1") : r || n);
  12026. }), t;
  12027. }),
  12028. jo = fr(function (n, t) {
  12029. return su(n) ? yt(n, wt(t, 1, su, true)) : [];
  12030. }),
  12031. wo = fr(function (n, t) {
  12032. var r = qe(t);
  12033. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), ye(r, 2)) : [];
  12034. }),
  12035. mo = fr(function (n, t) {
  12036. var r = qe(t);
  12037. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), T, r) : [];
  12038. }),
  12039. Ao = fr(function (n) {
  12040. var t = c(n, Er);
  12041. return t.length && t[0] === n[0] ? Wt(t) : [];
  12042. }),
  12043. Eo = fr(function (n) {
  12044. var t = qe(n),
  12045. r = c(n, Er);
  12046. return t === qe(r) ? t = T : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : [];
  12047. }),
  12048. ko = fr(function (n) {
  12049. var t = qe(n),
  12050. r = c(n, Er);
  12051. return (t = typeof t == "function" ? t : T) && r.pop(), r.length && r[0] === n[0] ? Wt(r, T, t) : [];
  12052. }),
  12053. So = fr(Ve),
  12054. Oo = pe(function (n, t) {
  12055. var r = null == n ? 0 : n.length,
  12056. e = ht(n, t);
  12057. return ur(n, c(t, function (n) {
  12058. return Se(n, r) ? +n : n;
  12059. }).sort(Wr)), e;
  12060. }),
  12061. Io = fr(function (n) {
  12062. return br(wt(n, 1, su, true));
  12063. }),
  12064. Ro = fr(function (n) {
  12065. var t = qe(n);
  12066. return su(t) && (t = T), br(wt(n, 1, su, true), ye(t, 2));
  12067. }),
  12068. zo = fr(function (n) {
  12069. var t = qe(n),
  12070. t = typeof t == "function" ? t : T;
  12071. return br(wt(n, 1, su, true), T, t);
  12072. }),
  12073. Wo = fr(function (n, t) {
  12074. return su(n) ? yt(n, t) : [];
  12075. }),
  12076. Bo = fr(function (n) {
  12077. return mr(i(n, su));
  12078. }),
  12079. Lo = fr(function (n) {
  12080. var t = qe(n);
  12081. return su(t) && (t = T), mr(i(n, su), ye(t, 2));
  12082. }),
  12083. Uo = fr(function (n) {
  12084. var t = qe(n),
  12085. t = typeof t == "function" ? t : T;
  12086. return mr(i(n, su), T, t);
  12087. }),
  12088. Co = fr(Ge),
  12089. Do = fr(function (n) {
  12090. var t = n.length,
  12091. t = 1 < t ? n[t - 1] : T,
  12092. t = typeof t == "function" ? (n.pop(), t) : T;
  12093. return He(n, t);
  12094. }),
  12095. Mo = pe(function (n) {
  12096. function t(t) {
  12097. return ht(t, n);
  12098. }
  12099. var r = n.length,
  12100. e = r ? n[0] : 0,
  12101. u = this.__wrapped__;
  12102. return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) ? (u = u.slice(e, +e + (r ? 1 : 0)), u.__actions__.push({
  12103. func: Ye,
  12104. args: [t],
  12105. thisArg: T
  12106. }), new On(u, this.__chain__).thru(function (n) {
  12107. return r && !n.length && n.push(T), n;
  12108. })) : this.thru(t);
  12109. }),
  12110. To = Tr(function (n, t, r) {
  12111. ii.call(n, r) ? ++n[r] : st(n, r, 1);
  12112. }),
  12113. $o = Gr(Fe),
  12114. Fo = Gr(Ne),
  12115. No = Tr(function (n, t, r) {
  12116. ii.call(n, r) ? n[r].push(t) : st(n, r, [t]);
  12117. }),
  12118. Po = fr(function (t, r, e) {
  12119. var u = -1,
  12120. i = typeof r == "function",
  12121. o = lu(t) ? Vu(t.length) : [];
  12122. return eo(t, function (t) {
  12123. o[++u] = i ? n(r, t, e) : Lt(t, r, e);
  12124. }), o;
  12125. }),
  12126. Zo = Tr(function (n, t, r) {
  12127. st(n, r, t);
  12128. }),
  12129. qo = Tr(function (n, t, r) {
  12130. n[r ? 0 : 1].push(t);
  12131. }, function () {
  12132. return [[], []];
  12133. }),
  12134. Vo = fr(function (n, t) {
  12135. if (null == n) return [];
  12136. var r = t.length;
  12137. return 1 < r && Oe(n, t[0], t[1]) ? t = [] : 2 < r && Oe(t[0], t[1], t[2]) && (t = [t[0]]), Xt(n, wt(t, 1), []);
  12138. }),
  12139. Ko = Ei || function () {
  12140. return $n.Date.now();
  12141. },
  12142. Go = fr(function (n, t, r) {
  12143. var e = 1;
  12144. if (r.length) var u = L(r, de(Go)),
  12145. e = 32 | e;
  12146. return fe(n, e, t, r, u);
  12147. }),
  12148. Ho = fr(function (n, t, r) {
  12149. var e = 3;
  12150. if (r.length) var u = L(r, de(Ho)),
  12151. e = 32 | e;
  12152. return fe(t, e, n, r, u);
  12153. }),
  12154. Jo = fr(function (n, t) {
  12155. return dt(n, 1, t);
  12156. }),
  12157. Yo = fr(function (n, t, r) {
  12158. return dt(n, ku(t) || 0, r);
  12159. });
  12160. fu.Cache = Fn;
  12161. var Qo = fr(function (t, r) {
  12162. r = 1 == r.length && of(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye()));
  12163. var e = r.length;
  12164. return fr(function (u) {
  12165. for (var i = -1, o = Ui(u.length, e); ++i < o;) {
  12166. u[i] = r[i].call(this, u[i]);
  12167. }
  12168. return n(t, this, u);
  12169. });
  12170. }),
  12171. Xo = fr(function (n, t) {
  12172. return fe(n, 32, T, t, L(t, de(Xo)));
  12173. }),
  12174. nf = fr(function (n, t) {
  12175. return fe(n, 64, T, t, L(t, de(nf)));
  12176. }),
  12177. tf = pe(function (n, t) {
  12178. return fe(n, 256, T, T, T, t);
  12179. }),
  12180. rf = ee(It),
  12181. ef = ee(function (n, t) {
  12182. return n >= t;
  12183. }),
  12184. uf = Ut(function () {
  12185. return arguments;
  12186. }()) ? Ut : function (n) {
  12187. return du(n) && ii.call(n, "callee") && !yi.call(n, "callee");
  12188. },
  12189. of = Vu.isArray,
  12190. ff = Vn ? k(Vn) : Ct,
  12191. cf = Ri || qu,
  12192. af = Kn ? k(Kn) : Dt,
  12193. lf = Gn ? k(Gn) : Tt,
  12194. sf = Hn ? k(Hn) : Nt,
  12195. hf = Jn ? k(Jn) : Pt,
  12196. pf = Yn ? k(Yn) : Zt,
  12197. _f = ee(Kt),
  12198. vf = ee(function (n, t) {
  12199. return n <= t;
  12200. }),
  12201. gf = $r(function (n, t) {
  12202. if (ze(t) || lu(t)) Cr(t, zu(t), n);else for (var r in t) {
  12203. ii.call(t, r) && ot(n, r, t[r]);
  12204. }
  12205. }),
  12206. df = $r(function (n, t) {
  12207. Cr(t, Wu(t), n);
  12208. }),
  12209. yf = $r(function (n, t, r, e) {
  12210. Cr(t, Wu(t), n, e);
  12211. }),
  12212. bf = $r(function (n, t, r, e) {
  12213. Cr(t, zu(t), n, e);
  12214. }),
  12215. xf = pe(ht),
  12216. jf = fr(function (n, t) {
  12217. n = Yu(n);
  12218. var r = -1,
  12219. e = t.length,
  12220. u = 2 < e ? t[2] : T;
  12221. for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e;) {
  12222. for (var u = t[r], i = Wu(u), o = -1, f = i.length; ++o < f;) {
  12223. var c = i[o],
  12224. a = n[c];
  12225. (a === T || au(a, ri[c]) && !ii.call(n, c)) && (n[c] = u[c]);
  12226. }
  12227. }
  12228. return n;
  12229. }),
  12230. wf = fr(function (t) {
  12231. return t.push(T, ae), n(Sf, T, t);
  12232. }),
  12233. mf = Yr(function (n, t, r) {
  12234. null != t && typeof t.toString != "function" && (t = ci.call(t)), n[t] = r;
  12235. }, Mu(Tu)),
  12236. Af = Yr(function (n, t, r) {
  12237. null != t && typeof t.toString != "function" && (t = ci.call(t)), ii.call(n, t) ? n[t].push(r) : n[t] = [r];
  12238. }, ye),
  12239. Ef = fr(Lt),
  12240. kf = $r(function (n, t, r) {
  12241. Yt(n, t, r);
  12242. }),
  12243. Sf = $r(function (n, t, r, e) {
  12244. Yt(n, t, r, e);
  12245. }),
  12246. Of = pe(function (n, t) {
  12247. var r = {};
  12248. if (null == n) return r;
  12249. var e = false;
  12250. t = c(t, function (t) {
  12251. return t = Sr(t, n), e || (e = 1 < t.length), t;
  12252. }), Cr(n, ve(n), r), e && (r = _t(r, 7, le));
  12253. for (var u = t.length; u--;) {
  12254. xr(r, t[u]);
  12255. }
  12256. return r;
  12257. }),
  12258. If = pe(function (n, t) {
  12259. return null == n ? {} : nr(n, t);
  12260. }),
  12261. Rf = oe(zu),
  12262. zf = oe(Wu),
  12263. Wf = qr(function (n, t, r) {
  12264. return t = t.toLowerCase(), n + (r ? Uu(t) : t);
  12265. }),
  12266. Bf = qr(function (n, t, r) {
  12267. return n + (r ? "-" : "") + t.toLowerCase();
  12268. }),
  12269. Lf = qr(function (n, t, r) {
  12270. return n + (r ? " " : "") + t.toLowerCase();
  12271. }),
  12272. Uf = Zr("toLowerCase"),
  12273. Cf = qr(function (n, t, r) {
  12274. return n + (r ? "_" : "") + t.toLowerCase();
  12275. }),
  12276. Df = qr(function (n, t, r) {
  12277. return n + (r ? " " : "") + Tf(t);
  12278. }),
  12279. Mf = qr(function (n, t, r) {
  12280. return n + (r ? " " : "") + t.toUpperCase();
  12281. }),
  12282. Tf = Zr("toUpperCase"),
  12283. $f = fr(function (t, r) {
  12284. try {
  12285. return n(t, T, r);
  12286. } catch (n) {
  12287. return hu(n) ? n : new Gu(n);
  12288. }
  12289. }),
  12290. Ff = pe(function (n, t) {
  12291. return r(t, function (t) {
  12292. t = De(t), st(n, t, Go(n[t], n));
  12293. }), n;
  12294. }),
  12295. Nf = Hr(),
  12296. Pf = Hr(true),
  12297. Zf = fr(function (n, t) {
  12298. return function (r) {
  12299. return Lt(r, n, t);
  12300. };
  12301. }),
  12302. qf = fr(function (n, t) {
  12303. return function (r) {
  12304. return Lt(n, r, t);
  12305. };
  12306. }),
  12307. Vf = Xr(c),
  12308. Kf = Xr(u),
  12309. Gf = Xr(h),
  12310. Hf = re(),
  12311. Jf = re(true),
  12312. Yf = Qr(function (n, t) {
  12313. return n + t;
  12314. }, 0),
  12315. Qf = ie("ceil"),
  12316. Xf = Qr(function (n, t) {
  12317. return n / t;
  12318. }, 1),
  12319. nc = ie("floor"),
  12320. tc = Qr(function (n, t) {
  12321. return n * t;
  12322. }, 1),
  12323. rc = ie("round"),
  12324. ec = Qr(function (n, t) {
  12325. return n - t;
  12326. }, 0);
  12327. return An.after = function (n, t) {
  12328. if (typeof t != "function") throw new ni("Expected a function");
  12329. return n = Au(n), function () {
  12330. if (1 > --n) return t.apply(this, arguments);
  12331. };
  12332. }, An.ary = ru, An.assign = gf, An.assignIn = df, An.assignInWith = yf, An.assignWith = bf, An.at = xf, An.before = eu, An.bind = Go, An.bindAll = Ff, An.bindKey = Ho, An.castArray = function () {
  12333. if (!arguments.length) return [];
  12334. var n = arguments[0];
  12335. return of(n) ? n : [n];
  12336. }, An.chain = Je, An.chunk = function (n, t, r) {
  12337. if (t = (r ? Oe(n, t, r) : t === T) ? 1 : Li(Au(t), 0), r = null == n ? 0 : n.length, !r || 1 > t) return [];
  12338. for (var e = 0, u = 0, i = Vu(Si(r / t)); e < r;) {
  12339. i[u++] = hr(n, e, e += t);
  12340. }
  12341. return i;
  12342. }, An.compact = function (n) {
  12343. for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r;) {
  12344. var i = n[t];
  12345. i && (u[e++] = i);
  12346. }
  12347. return u;
  12348. }, An.concat = function () {
  12349. var n = arguments.length;
  12350. if (!n) return [];
  12351. for (var t = Vu(n - 1), r = arguments[0]; n--;) {
  12352. t[n - 1] = arguments[n];
  12353. }
  12354. return a(of(r) ? Ur(r) : [r], wt(t, 1));
  12355. }, An.cond = function (t) {
  12356. var r = null == t ? 0 : t.length,
  12357. e = ye();
  12358. return t = r ? c(t, function (n) {
  12359. if ("function" != typeof n[1]) throw new ni("Expected a function");
  12360. return [e(n[0]), n[1]];
  12361. }) : [], fr(function (e) {
  12362. for (var u = -1; ++u < r;) {
  12363. var i = t[u];
  12364. if (n(i[0], this, e)) return n(i[1], this, e);
  12365. }
  12366. });
  12367. }, An.conforms = function (n) {
  12368. return vt(_t(n, 1));
  12369. }, An.constant = Mu, An.countBy = To, An.create = function (n, t) {
  12370. var r = ro(n);
  12371. return null == t ? r : at(r, t);
  12372. }, An.curry = uu, An.curryRight = iu, An.debounce = ou, An.defaults = jf, An.defaultsDeep = wf, An.defer = Jo, An.delay = Yo, An.difference = jo, An.differenceBy = wo, An.differenceWith = mo, An.drop = function (n, t, r) {
  12373. var e = null == n ? 0 : n.length;
  12374. return e ? (t = r || t === T ? 1 : Au(t), hr(n, 0 > t ? 0 : t, e)) : [];
  12375. }, An.dropRight = function (n, t, r) {
  12376. var e = null == n ? 0 : n.length;
  12377. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0, 0 > t ? 0 : t)) : [];
  12378. }, An.dropRightWhile = function (n, t) {
  12379. return n && n.length ? jr(n, ye(t, 3), true, true) : [];
  12380. }, An.dropWhile = function (n, t) {
  12381. return n && n.length ? jr(n, ye(t, 3), true) : [];
  12382. }, An.fill = function (n, t, r, e) {
  12383. var u = null == n ? 0 : n.length;
  12384. if (!u) return [];
  12385. for (r && typeof r != "number" && Oe(n, t, r) && (r = 0, e = u), u = n.length, r = Au(r), 0 > r && (r = -r > u ? 0 : u + r), e = e === T || e > u ? u : Au(e), 0 > e && (e += u), e = r > e ? 0 : Eu(e); r < e;) {
  12386. n[r++] = t;
  12387. }
  12388. return n;
  12389. }, An.filter = function (n, t) {
  12390. return (of(n) ? i : jt)(n, ye(t, 3));
  12391. }, An.flatMap = function (n, t) {
  12392. return wt(tu(n, t), 1);
  12393. }, An.flatMapDeep = function (n, t) {
  12394. return wt(tu(n, t), $);
  12395. }, An.flatMapDepth = function (n, t, r) {
  12396. return r = r === T ? 1 : Au(r), wt(tu(n, t), r);
  12397. }, An.flatten = Pe, An.flattenDeep = function (n) {
  12398. return (null == n ? 0 : n.length) ? wt(n, $) : [];
  12399. }, An.flattenDepth = function (n, t) {
  12400. return null != n && n.length ? (t = t === T ? 1 : Au(t), wt(n, t)) : [];
  12401. }, An.flip = function (n) {
  12402. return fe(n, 512);
  12403. }, An.flow = Nf, An.flowRight = Pf, An.fromPairs = function (n) {
  12404. for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r;) {
  12405. var u = n[t];
  12406. e[u[0]] = u[1];
  12407. }
  12408. return e;
  12409. }, An.functions = function (n) {
  12410. return null == n ? [] : Et(n, zu(n));
  12411. }, An.functionsIn = function (n) {
  12412. return null == n ? [] : Et(n, Wu(n));
  12413. }, An.groupBy = No, An.initial = function (n) {
  12414. return (null == n ? 0 : n.length) ? hr(n, 0, -1) : [];
  12415. }, An.intersection = Ao, An.intersectionBy = Eo, An.intersectionWith = ko, An.invert = mf, An.invertBy = Af, An.invokeMap = Po, An.iteratee = $u, An.keyBy = Zo, An.keys = zu, An.keysIn = Wu, An.map = tu, An.mapKeys = function (n, t) {
  12416. var r = {};
  12417. return t = ye(t, 3), mt(n, function (n, e, u) {
  12418. st(r, t(n, e, u), n);
  12419. }), r;
  12420. }, An.mapValues = function (n, t) {
  12421. var r = {};
  12422. return t = ye(t, 3), mt(n, function (n, e, u) {
  12423. st(r, e, t(n, e, u));
  12424. }), r;
  12425. }, An.matches = function (n) {
  12426. return Ht(_t(n, 1));
  12427. }, An.matchesProperty = function (n, t) {
  12428. return Jt(n, _t(t, 1));
  12429. }, An.memoize = fu, An.merge = kf, An.mergeWith = Sf, An.method = Zf, An.methodOf = qf, An.mixin = Fu, An.negate = cu, An.nthArg = function (n) {
  12430. return n = Au(n), fr(function (t) {
  12431. return Qt(t, n);
  12432. });
  12433. }, An.omit = Of, An.omitBy = function (n, t) {
  12434. return Bu(n, cu(ye(t)));
  12435. }, An.once = function (n) {
  12436. return eu(2, n);
  12437. }, An.orderBy = function (n, t, r, e) {
  12438. return null == n ? [] : (of(t) || (t = null == t ? [] : [t]), r = e ? T : r, of(r) || (r = null == r ? [] : [r]), Xt(n, t, r));
  12439. }, An.over = Vf, An.overArgs = Qo, An.overEvery = Kf, An.overSome = Gf, An.partial = Xo, An.partialRight = nf, An.partition = qo, An.pick = If, An.pickBy = Bu, An.property = Pu, An.propertyOf = function (n) {
  12440. return function (t) {
  12441. return null == n ? T : kt(n, t);
  12442. };
  12443. }, An.pull = So, An.pullAll = Ve, An.pullAllBy = function (n, t, r) {
  12444. return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n;
  12445. }, An.pullAllWith = function (n, t, r) {
  12446. return n && n.length && t && t.length ? er(n, t, T, r) : n;
  12447. }, An.pullAt = Oo, An.range = Hf, An.rangeRight = Jf, An.rearg = tf, An.reject = function (n, t) {
  12448. return (of(n) ? i : jt)(n, cu(ye(t, 3)));
  12449. }, An.remove = function (n, t) {
  12450. var r = [];
  12451. if (!n || !n.length) return r;
  12452. var e = -1,
  12453. u = [],
  12454. i = n.length;
  12455. for (t = ye(t, 3); ++e < i;) {
  12456. var o = n[e];
  12457. t(o, e, n) && (r.push(o), u.push(e));
  12458. }
  12459. return ur(n, u), r;
  12460. }, An.rest = function (n, t) {
  12461. if (typeof n != "function") throw new ni("Expected a function");
  12462. return t = t === T ? t : Au(t), fr(n, t);
  12463. }, An.reverse = Ke, An.sampleSize = function (n, t, r) {
  12464. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), (of(n) ? et : ar)(n, t);
  12465. }, An.set = function (n, t, r) {
  12466. return null == n ? n : lr(n, t, r);
  12467. }, An.setWith = function (n, t, r, e) {
  12468. return e = typeof e == "function" ? e : T, null == n ? n : lr(n, t, r, e);
  12469. }, An.shuffle = function (n) {
  12470. return (of(n) ? ut : sr)(n);
  12471. }, An.slice = function (n, t, r) {
  12472. var e = null == n ? 0 : n.length;
  12473. return e ? (r && typeof r != "number" && Oe(n, t, r) ? (t = 0, r = e) : (t = null == t ? 0 : Au(t), r = r === T ? e : Au(r)), hr(n, t, r)) : [];
  12474. }, An.sortBy = Vo, An.sortedUniq = function (n) {
  12475. return n && n.length ? gr(n) : [];
  12476. }, An.sortedUniqBy = function (n, t) {
  12477. return n && n.length ? gr(n, ye(t, 2)) : [];
  12478. }, An.split = function (n, t, r) {
  12479. return r && typeof r != "number" && Oe(n, t, r) && (t = r = T), r = r === T ? 4294967295 : r >>> 0, r ? (n = Ou(n)) && (typeof t == "string" || null != t && !sf(t)) && (t = yr(t), !t && Rn.test(n)) ? Or(M(n), 0, r) : n.split(t, r) : [];
  12480. }, An.spread = function (t, r) {
  12481. if (typeof t != "function") throw new ni("Expected a function");
  12482. return r = null == r ? 0 : Li(Au(r), 0), fr(function (e) {
  12483. var u = e[r];
  12484. return e = Or(e, 0, r), u && a(e, u), n(t, this, e);
  12485. });
  12486. }, An.tail = function (n) {
  12487. var t = null == n ? 0 : n.length;
  12488. return t ? hr(n, 1, t) : [];
  12489. }, An.take = function (n, t, r) {
  12490. return n && n.length ? (t = r || t === T ? 1 : Au(t), hr(n, 0, 0 > t ? 0 : t)) : [];
  12491. }, An.takeRight = function (n, t, r) {
  12492. var e = null == n ? 0 : n.length;
  12493. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0 > t ? 0 : t, e)) : [];
  12494. }, An.takeRightWhile = function (n, t) {
  12495. return n && n.length ? jr(n, ye(t, 3), false, true) : [];
  12496. }, An.takeWhile = function (n, t) {
  12497. return n && n.length ? jr(n, ye(t, 3)) : [];
  12498. }, An.tap = function (n, t) {
  12499. return t(n), n;
  12500. }, An.throttle = function (n, t, r) {
  12501. var e = true,
  12502. u = true;
  12503. if (typeof n != "function") throw new ni("Expected a function");
  12504. return gu(r) && (e = "leading" in r ? !!r.leading : e, u = "trailing" in r ? !!r.trailing : u), ou(n, t, {
  12505. leading: e,
  12506. maxWait: t,
  12507. trailing: u
  12508. });
  12509. }, An.thru = Ye, An.toArray = wu, An.toPairs = Rf, An.toPairsIn = zf, An.toPath = function (n) {
  12510. return of(n) ? c(n, De) : ju(n) ? [n] : Ur(xo(Ou(n)));
  12511. }, An.toPlainObject = Su, An.transform = function (n, t, e) {
  12512. var u = of(n),
  12513. i = u || cf(n) || pf(n);
  12514. if (t = ye(t, 4), null == e) {
  12515. var o = n && n.constructor;
  12516. e = i ? u ? new o() : [] : gu(n) && pu(o) ? ro(gi(n)) : {};
  12517. }
  12518. return (i ? r : mt)(n, function (n, r, u) {
  12519. return t(e, n, r, u);
  12520. }), e;
  12521. }, An.unary = function (n) {
  12522. return ru(n, 1);
  12523. }, An.union = Io, An.unionBy = Ro, An.unionWith = zo, An.uniq = function (n) {
  12524. return n && n.length ? br(n) : [];
  12525. }, An.uniqBy = function (n, t) {
  12526. return n && n.length ? br(n, ye(t, 2)) : [];
  12527. }, An.uniqWith = function (n, t) {
  12528. return t = typeof t == "function" ? t : T, n && n.length ? br(n, T, t) : [];
  12529. }, An.unset = function (n, t) {
  12530. return null == n || xr(n, t);
  12531. }, An.unzip = Ge, An.unzipWith = He, An.update = function (n, t, r) {
  12532. return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0);
  12533. }, An.updateWith = function (n, t, r, e) {
  12534. return e = typeof e == "function" ? e : T, null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n;
  12535. }, An.values = Lu, An.valuesIn = function (n) {
  12536. return null == n ? [] : S(n, Wu(n));
  12537. }, An.without = Wo, An.words = Du, An.wrap = function (n, t) {
  12538. return Xo(kr(t), n);
  12539. }, An.xor = Bo, An.xorBy = Lo, An.xorWith = Uo, An.zip = Co, An.zipObject = function (n, t) {
  12540. return Ar(n || [], t || [], ot);
  12541. }, An.zipObjectDeep = function (n, t) {
  12542. return Ar(n || [], t || [], lr);
  12543. }, An.zipWith = Do, An.entries = Rf, An.entriesIn = zf, An.extend = df, An.extendWith = yf, Fu(An, An), An.add = Yf, An.attempt = $f, An.camelCase = Wf, An.capitalize = Uu, An.ceil = Qf, An.clamp = function (n, t, r) {
  12544. return r === T && (r = t, t = T), r !== T && (r = ku(r), r = r === r ? r : 0), t !== T && (t = ku(t), t = t === t ? t : 0), pt(ku(n), t, r);
  12545. }, An.clone = function (n) {
  12546. return _t(n, 4);
  12547. }, An.cloneDeep = function (n) {
  12548. return _t(n, 5);
  12549. }, An.cloneDeepWith = function (n, t) {
  12550. return t = typeof t == "function" ? t : T, _t(n, 5, t);
  12551. }, An.cloneWith = function (n, t) {
  12552. return t = typeof t == "function" ? t : T, _t(n, 4, t);
  12553. }, An.conformsTo = function (n, t) {
  12554. return null == t || gt(n, t, zu(t));
  12555. }, An.deburr = Cu, An.defaultTo = function (n, t) {
  12556. return null == n || n !== n ? t : n;
  12557. }, An.divide = Xf, An.endsWith = function (n, t, r) {
  12558. n = Ou(n), t = yr(t);
  12559. var e = n.length,
  12560. e = r = r === T ? e : pt(Au(r), 0, e);
  12561. return r -= t.length, 0 <= r && n.slice(r, e) == t;
  12562. }, An.eq = au, An.escape = function (n) {
  12563. return (n = Ou(n)) && H.test(n) ? n.replace(K, nt) : n;
  12564. }, An.escapeRegExp = function (n) {
  12565. return (n = Ou(n)) && en.test(n) ? n.replace(rn, "\\$&") : n;
  12566. }, An.every = function (n, t, r) {
  12567. var e = of(n) ? u : bt;
  12568. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  12569. }, An.find = $o, An.findIndex = Fe, An.findKey = function (n, t) {
  12570. return p(n, ye(t, 3), mt);
  12571. }, An.findLast = Fo, An.findLastIndex = Ne, An.findLastKey = function (n, t) {
  12572. return p(n, ye(t, 3), At);
  12573. }, An.floor = nc, An.forEach = Xe, An.forEachRight = nu, An.forIn = function (n, t) {
  12574. return null == n ? n : io(n, ye(t, 3), Wu);
  12575. }, An.forInRight = function (n, t) {
  12576. return null == n ? n : oo(n, ye(t, 3), Wu);
  12577. }, An.forOwn = function (n, t) {
  12578. return n && mt(n, ye(t, 3));
  12579. }, An.forOwnRight = function (n, t) {
  12580. return n && At(n, ye(t, 3));
  12581. }, An.get = Iu, An.gt = rf, An.gte = ef, An.has = function (n, t) {
  12582. return null != n && we(n, t, Rt);
  12583. }, An.hasIn = Ru, An.head = Ze, An.identity = Tu, An.includes = function (n, t, r, e) {
  12584. return n = lu(n) ? n : Lu(n), r = r && !e ? Au(r) : 0, e = n.length, 0 > r && (r = Li(e + r, 0)), xu(n) ? r <= e && -1 < n.indexOf(t, r) : !!e && -1 < v(n, t, r);
  12585. }, An.indexOf = function (n, t, r) {
  12586. var e = null == n ? 0 : n.length;
  12587. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), v(n, t, r)) : -1;
  12588. }, An.inRange = function (n, t, r) {
  12589. return t = mu(t), r === T ? (r = t, t = 0) : r = mu(r), n = ku(n), n >= Ui(t, r) && n < Li(t, r);
  12590. }, An.invoke = Ef, An.isArguments = uf, An.isArray = of, An.isArrayBuffer = ff, An.isArrayLike = lu, An.isArrayLikeObject = su, An.isBoolean = function (n) {
  12591. return true === n || false === n || du(n) && "[object Boolean]" == Ot(n);
  12592. }, An.isBuffer = cf, An.isDate = af, An.isElement = function (n) {
  12593. return du(n) && 1 === n.nodeType && !bu(n);
  12594. }, An.isEmpty = function (n) {
  12595. if (null == n) return true;
  12596. if (lu(n) && (of(n) || typeof n == "string" || typeof n.splice == "function" || cf(n) || pf(n) || uf(n))) return !n.length;
  12597. var t = _o(n);
  12598. if ("[object Map]" == t || "[object Set]" == t) return !n.size;
  12599. if (ze(n)) return !Vt(n).length;
  12600. for (var r in n) {
  12601. if (ii.call(n, r)) return false;
  12602. }
  12603. return true;
  12604. }, An.isEqual = function (n, t) {
  12605. return Mt(n, t);
  12606. }, An.isEqualWith = function (n, t, r) {
  12607. var e = (r = typeof r == "function" ? r : T) ? r(n, t) : T;
  12608. return e === T ? Mt(n, t, T, r) : !!e;
  12609. }, An.isError = hu, An.isFinite = function (n) {
  12610. return typeof n == "number" && zi(n);
  12611. }, An.isFunction = pu, An.isInteger = _u, An.isLength = vu, An.isMap = lf, An.isMatch = function (n, t) {
  12612. return n === t || $t(n, t, xe(t));
  12613. }, An.isMatchWith = function (n, t, r) {
  12614. return r = typeof r == "function" ? r : T, $t(n, t, xe(t), r);
  12615. }, An.isNaN = function (n) {
  12616. return yu(n) && n != +n;
  12617. }, An.isNative = function (n) {
  12618. if (vo(n)) throw new Gu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
  12619. return Ft(n);
  12620. }, An.isNil = function (n) {
  12621. return null == n;
  12622. }, An.isNull = function (n) {
  12623. return null === n;
  12624. }, An.isNumber = yu, An.isObject = gu, An.isObjectLike = du, An.isPlainObject = bu, An.isRegExp = sf, An.isSafeInteger = function (n) {
  12625. return _u(n) && -9007199254740991 <= n && 9007199254740991 >= n;
  12626. }, An.isSet = hf, An.isString = xu, An.isSymbol = ju, An.isTypedArray = pf, An.isUndefined = function (n) {
  12627. return n === T;
  12628. }, An.isWeakMap = function (n) {
  12629. return du(n) && "[object WeakMap]" == _o(n);
  12630. }, An.isWeakSet = function (n) {
  12631. return du(n) && "[object WeakSet]" == Ot(n);
  12632. }, An.join = function (n, t) {
  12633. return null == n ? "" : Wi.call(n, t);
  12634. }, An.kebabCase = Bf, An.last = qe, An.lastIndexOf = function (n, t, r) {
  12635. var e = null == n ? 0 : n.length;
  12636. if (!e) return -1;
  12637. var u = e;
  12638. if (r !== T && (u = Au(r), u = 0 > u ? Li(e + u, 0) : Ui(u, e - 1)), t === t) {
  12639. for (r = u + 1; r-- && n[r] !== t;) {
  12640. ;
  12641. }
  12642. n = r;
  12643. } else n = _(n, d, u, true);
  12644. return n;
  12645. }, An.lowerCase = Lf, An.lowerFirst = Uf, An.lt = _f, An.lte = vf, An.max = function (n) {
  12646. return n && n.length ? xt(n, Tu, It) : T;
  12647. }, An.maxBy = function (n, t) {
  12648. return n && n.length ? xt(n, ye(t, 2), It) : T;
  12649. }, An.mean = function (n) {
  12650. return y(n, Tu);
  12651. }, An.meanBy = function (n, t) {
  12652. return y(n, ye(t, 2));
  12653. }, An.min = function (n) {
  12654. return n && n.length ? xt(n, Tu, Kt) : T;
  12655. }, An.minBy = function (n, t) {
  12656. return n && n.length ? xt(n, ye(t, 2), Kt) : T;
  12657. }, An.stubArray = Zu, An.stubFalse = qu, An.stubObject = function () {
  12658. return {};
  12659. }, An.stubString = function () {
  12660. return "";
  12661. }, An.stubTrue = function () {
  12662. return true;
  12663. }, An.multiply = tc, An.nth = function (n, t) {
  12664. return n && n.length ? Qt(n, Au(t)) : T;
  12665. }, An.noConflict = function () {
  12666. return $n._ === this && ($n._ = li), this;
  12667. }, An.noop = Nu, An.now = Ko, An.pad = function (n, t, r) {
  12668. n = Ou(n);
  12669. var e = (t = Au(t)) ? D(n) : 0;
  12670. return !t || e >= t ? n : (t = (t - e) / 2, ne(Oi(t), r) + n + ne(Si(t), r));
  12671. }, An.padEnd = function (n, t, r) {
  12672. n = Ou(n);
  12673. var e = (t = Au(t)) ? D(n) : 0;
  12674. return t && e < t ? n + ne(t - e, r) : n;
  12675. }, An.padStart = function (n, t, r) {
  12676. n = Ou(n);
  12677. var e = (t = Au(t)) ? D(n) : 0;
  12678. return t && e < t ? ne(t - e, r) + n : n;
  12679. }, An.parseInt = function (n, t, r) {
  12680. return r || null == t ? t = 0 : t && (t = +t), Di(Ou(n).replace(on, ""), t || 0);
  12681. }, An.random = function (n, t, r) {
  12682. if (r && typeof r != "boolean" && Oe(n, t, r) && (t = r = T), r === T && (typeof t == "boolean" ? (r = t, t = T) : typeof n == "boolean" && (r = n, n = T)), n === T && t === T ? (n = 0, t = 1) : (n = mu(n), t === T ? (t = n, n = 0) : t = mu(t)), n > t) {
  12683. var e = n;
  12684. n = t, t = e;
  12685. }
  12686. return r || n % 1 || t % 1 ? (r = Mi(), Ui(n + r * (t - n + Cn("1e-" + ((r + "").length - 1))), t)) : ir(n, t);
  12687. }, An.reduce = function (n, t, r) {
  12688. var e = of(n) ? l : j,
  12689. u = 3 > arguments.length;
  12690. return e(n, ye(t, 4), r, u, eo);
  12691. }, An.reduceRight = function (n, t, r) {
  12692. var e = of(n) ? s : j,
  12693. u = 3 > arguments.length;
  12694. return e(n, ye(t, 4), r, u, uo);
  12695. }, An.repeat = function (n, t, r) {
  12696. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), or(Ou(n), t);
  12697. }, An.replace = function () {
  12698. var n = arguments,
  12699. t = Ou(n[0]);
  12700. return 3 > n.length ? t : t.replace(n[1], n[2]);
  12701. }, An.result = function (n, t, r) {
  12702. t = Sr(t, n);
  12703. var e = -1,
  12704. u = t.length;
  12705. for (u || (u = 1, n = T); ++e < u;) {
  12706. var i = null == n ? T : n[De(t[e])];
  12707. i === T && (e = u, i = r), n = pu(i) ? i.call(n) : i;
  12708. }
  12709. return n;
  12710. }, An.round = rc, An.runInContext = x, An.sample = function (n) {
  12711. return (of(n) ? Qn : cr)(n);
  12712. }, An.size = function (n) {
  12713. if (null == n) return 0;
  12714. if (lu(n)) return xu(n) ? D(n) : n.length;
  12715. var t = _o(n);
  12716. return "[object Map]" == t || "[object Set]" == t ? n.size : Vt(n).length;
  12717. }, An.snakeCase = Cf, An.some = function (n, t, r) {
  12718. var e = of(n) ? h : pr;
  12719. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  12720. }, An.sortedIndex = function (n, t) {
  12721. return _r(n, t);
  12722. }, An.sortedIndexBy = function (n, t, r) {
  12723. return vr(n, t, ye(r, 2));
  12724. }, An.sortedIndexOf = function (n, t) {
  12725. var r = null == n ? 0 : n.length;
  12726. if (r) {
  12727. var e = _r(n, t);
  12728. if (e < r && au(n[e], t)) return e;
  12729. }
  12730. return -1;
  12731. }, An.sortedLastIndex = function (n, t) {
  12732. return _r(n, t, true);
  12733. }, An.sortedLastIndexBy = function (n, t, r) {
  12734. return vr(n, t, ye(r, 2), true);
  12735. }, An.sortedLastIndexOf = function (n, t) {
  12736. if (null == n ? 0 : n.length) {
  12737. var r = _r(n, t, true) - 1;
  12738. if (au(n[r], t)) return r;
  12739. }
  12740. return -1;
  12741. }, An.startCase = Df, An.startsWith = function (n, t, r) {
  12742. return n = Ou(n), r = null == r ? 0 : pt(Au(r), 0, n.length), t = yr(t), n.slice(r, r + t.length) == t;
  12743. }, An.subtract = ec, An.sum = function (n) {
  12744. return n && n.length ? m(n, Tu) : 0;
  12745. }, An.sumBy = function (n, t) {
  12746. return n && n.length ? m(n, ye(t, 2)) : 0;
  12747. }, An.template = function (n, t, r) {
  12748. var e = An.templateSettings;
  12749. r && Oe(n, t, r) && (t = T), n = Ou(n), t = yf({}, t, e, ce), r = yf({}, t.imports, e.imports, ce);
  12750. var u,
  12751. i,
  12752. o = zu(r),
  12753. f = S(r, o),
  12754. c = 0;
  12755. r = t.interpolate || jn;
  12756. var a = "__p+='";
  12757. r = Qu((t.escape || jn).source + "|" + r.source + "|" + (r === Q ? pn : jn).source + "|" + (t.evaluate || jn).source + "|$", "g");
  12758. var l = "sourceURL" in t ? "//# sourceURL=" + t.sourceURL + "\n" : "";
  12759. if (n.replace(r, function (t, r, e, o, f, l) {
  12760. return e || (e = o), a += n.slice(c, l).replace(wn, z), r && (u = true, a += "'+__e(" + r + ")+'"), f && (i = true, a += "';" + f + ";\n__p+='"), e && (a += "'+((__t=(" + e + "))==null?'':__t)+'"), c = l + t.length, t;
  12761. }), a += "';", (t = t.variable) || (a = "with(obj){" + a + "}"), a = (i ? a.replace(P, "") : a).replace(Z, "$1").replace(q, "$1;"), a = "function(" + (t || "obj") + "){" + (t ? "" : "obj||(obj={});") + "var __t,__p=''" + (u ? ",__e=_.escape" : "") + (i ? ",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}" : ";") + a + "return __p}", t = $f(function () {
  12762. return Hu(o, l + "return " + a).apply(T, f);
  12763. }), t.source = a, hu(t)) throw t;
  12764. return t;
  12765. }, An.times = function (n, t) {
  12766. if (n = Au(n), 1 > n || 9007199254740991 < n) return [];
  12767. var r = 4294967295,
  12768. e = Ui(n, 4294967295);
  12769. for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n;) {
  12770. t(r);
  12771. }
  12772. return e;
  12773. }, An.toFinite = mu, An.toInteger = Au, An.toLength = Eu, An.toLower = function (n) {
  12774. return Ou(n).toLowerCase();
  12775. }, An.toNumber = ku, An.toSafeInteger = function (n) {
  12776. return n ? pt(Au(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0;
  12777. }, An.toString = Ou, An.toUpper = function (n) {
  12778. return Ou(n).toUpperCase();
  12779. }, An.trim = function (n, t, r) {
  12780. return (n = Ou(n)) && (r || t === T) ? n.replace(un, "") : n && (t = yr(t)) ? (n = M(n), r = M(t), t = I(n, r), r = R(n, r) + 1, Or(n, t, r).join("")) : n;
  12781. }, An.trimEnd = function (n, t, r) {
  12782. return (n = Ou(n)) && (r || t === T) ? n.replace(fn, "") : n && (t = yr(t)) ? (n = M(n), t = R(n, M(t)) + 1, Or(n, 0, t).join("")) : n;
  12783. }, An.trimStart = function (n, t, r) {
  12784. return (n = Ou(n)) && (r || t === T) ? n.replace(on, "") : n && (t = yr(t)) ? (n = M(n), t = I(n, M(t)), Or(n, t).join("")) : n;
  12785. }, An.truncate = function (n, t) {
  12786. var r = 30,
  12787. e = "...";
  12788. if (gu(t)) var u = "separator" in t ? t.separator : u,
  12789. r = "length" in t ? Au(t.length) : r,
  12790. e = "omission" in t ? yr(t.omission) : e;
  12791. n = Ou(n);
  12792. var i = n.length;
  12793. if (Rn.test(n)) var o = M(n),
  12794. i = o.length;
  12795. if (r >= i) return n;
  12796. if (i = r - D(e), 1 > i) return e;
  12797. if (r = o ? Or(o, 0, i).join("") : n.slice(0, i), u === T) return r + e;
  12798. if (o && (i += r.length - i), sf(u)) {
  12799. if (n.slice(i).search(u)) {
  12800. var f = r;
  12801. for (u.global || (u = Qu(u.source, Ou(_n.exec(u)) + "g")), u.lastIndex = 0; o = u.exec(f);) {
  12802. var c = o.index;
  12803. }
  12804. r = r.slice(0, c === T ? i : c);
  12805. }
  12806. } else n.indexOf(yr(u), i) != i && (u = r.lastIndexOf(u), -1 < u && (r = r.slice(0, u)));
  12807. return r + e;
  12808. }, An.unescape = function (n) {
  12809. return (n = Ou(n)) && G.test(n) ? n.replace(V, tt) : n;
  12810. }, An.uniqueId = function (n) {
  12811. var t = ++oi;
  12812. return Ou(n) + t;
  12813. }, An.upperCase = Mf, An.upperFirst = Tf, An.each = Xe, An.eachRight = nu, An.first = Ze, Fu(An, function () {
  12814. var n = {};
  12815. return mt(An, function (t, r) {
  12816. ii.call(An.prototype, r) || (n[r] = t);
  12817. }), n;
  12818. }(), {
  12819. chain: false
  12820. }), An.VERSION = "4.17.10", r("bind bindKey curry curryRight partial partialRight".split(" "), function (n) {
  12821. An[n].placeholder = An;
  12822. }), r(["drop", "take"], function (n, t) {
  12823. Un.prototype[n] = function (r) {
  12824. r = r === T ? 1 : Li(Au(r), 0);
  12825. var e = this.__filtered__ && !t ? new Un(this) : this.clone();
  12826. return e.__filtered__ ? e.__takeCount__ = Ui(r, e.__takeCount__) : e.__views__.push({
  12827. size: Ui(r, 4294967295),
  12828. type: n + (0 > e.__dir__ ? "Right" : "")
  12829. }), e;
  12830. }, Un.prototype[n + "Right"] = function (t) {
  12831. return this.reverse()[n](t).reverse();
  12832. };
  12833. }), r(["filter", "map", "takeWhile"], function (n, t) {
  12834. var r = t + 1,
  12835. e = 1 == r || 3 == r;
  12836. Un.prototype[n] = function (n) {
  12837. var t = this.clone();
  12838. return t.__iteratees__.push({
  12839. iteratee: ye(n, 3),
  12840. type: r
  12841. }), t.__filtered__ = t.__filtered__ || e, t;
  12842. };
  12843. }), r(["head", "last"], function (n, t) {
  12844. var r = "take" + (t ? "Right" : "");
  12845. Un.prototype[n] = function () {
  12846. return this[r](1).value()[0];
  12847. };
  12848. }), r(["initial", "tail"], function (n, t) {
  12849. var r = "drop" + (t ? "" : "Right");
  12850. Un.prototype[n] = function () {
  12851. return this.__filtered__ ? new Un(this) : this[r](1);
  12852. };
  12853. }), Un.prototype.compact = function () {
  12854. return this.filter(Tu);
  12855. }, Un.prototype.find = function (n) {
  12856. return this.filter(n).head();
  12857. }, Un.prototype.findLast = function (n) {
  12858. return this.reverse().find(n);
  12859. }, Un.prototype.invokeMap = fr(function (n, t) {
  12860. return typeof n == "function" ? new Un(this) : this.map(function (r) {
  12861. return Lt(r, n, t);
  12862. });
  12863. }), Un.prototype.reject = function (n) {
  12864. return this.filter(cu(ye(n)));
  12865. }, Un.prototype.slice = function (n, t) {
  12866. n = Au(n);
  12867. var r = this;
  12868. return r.__filtered__ && (0 < n || 0 > t) ? new Un(r) : (0 > n ? r = r.takeRight(-n) : n && (r = r.drop(n)), t !== T && (t = Au(t), r = 0 > t ? r.dropRight(-t) : r.take(t - n)), r);
  12869. }, Un.prototype.takeRightWhile = function (n) {
  12870. return this.reverse().takeWhile(n).reverse();
  12871. }, Un.prototype.toArray = function () {
  12872. return this.take(4294967295);
  12873. }, mt(Un.prototype, function (n, t) {
  12874. var r = /^(?:filter|find|map|reject)|While$/.test(t),
  12875. e = /^(?:head|last)$/.test(t),
  12876. u = An[e ? "take" + ("last" == t ? "Right" : "") : t],
  12877. i = e || /^find/.test(t);
  12878. u && (An.prototype[t] = function () {
  12879. function t(n) {
  12880. return n = u.apply(An, a([n], f)), e && h ? n[0] : n;
  12881. }
  12882. var o = this.__wrapped__,
  12883. f = e ? [1] : arguments,
  12884. c = o instanceof Un,
  12885. l = f[0],
  12886. s = c || of(o);
  12887. s && r && typeof l == "function" && 1 != l.length && (c = s = false);
  12888. var h = this.__chain__,
  12889. p = !!this.__actions__.length,
  12890. l = i && !h,
  12891. c = c && !p;
  12892. return !i && s ? (o = c ? o : new Un(this), o = n.apply(o, f), o.__actions__.push({
  12893. func: Ye,
  12894. args: [t],
  12895. thisArg: T
  12896. }), new On(o, h)) : l && c ? n.apply(this, f) : (o = this.thru(t), l ? e ? o.value()[0] : o.value() : o);
  12897. });
  12898. }), r("pop push shift sort splice unshift".split(" "), function (n) {
  12899. var t = ti[n],
  12900. r = /^(?:push|sort|unshift)$/.test(n) ? "tap" : "thru",
  12901. e = /^(?:pop|shift)$/.test(n);
  12902. An.prototype[n] = function () {
  12903. var n = arguments;
  12904. if (e && !this.__chain__) {
  12905. var u = this.value();
  12906. return t.apply(of(u) ? u : [], n);
  12907. }
  12908. return this[r](function (r) {
  12909. return t.apply(of(r) ? r : [], n);
  12910. });
  12911. };
  12912. }), mt(Un.prototype, function (n, t) {
  12913. var r = An[t];
  12914. if (r) {
  12915. var e = r.name + "";
  12916. (Ki[e] || (Ki[e] = [])).push({
  12917. name: t,
  12918. func: r
  12919. });
  12920. }
  12921. }), Ki[Jr(T, 2).name] = [{
  12922. name: "wrapper",
  12923. func: T
  12924. }], Un.prototype.clone = function () {
  12925. var n = new Un(this.__wrapped__);
  12926. return n.__actions__ = Ur(this.__actions__), n.__dir__ = this.__dir__, n.__filtered__ = this.__filtered__, n.__iteratees__ = Ur(this.__iteratees__), n.__takeCount__ = this.__takeCount__, n.__views__ = Ur(this.__views__), n;
  12927. }, Un.prototype.reverse = function () {
  12928. if (this.__filtered__) {
  12929. var n = new Un(this);
  12930. n.__dir__ = -1, n.__filtered__ = true;
  12931. } else n = this.clone(), n.__dir__ *= -1;
  12932. return n;
  12933. }, Un.prototype.value = function () {
  12934. var n,
  12935. t = this.__wrapped__.value(),
  12936. r = this.__dir__,
  12937. e = of(t),
  12938. u = 0 > r,
  12939. i = e ? t.length : 0;
  12940. n = i;
  12941. for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a;) {
  12942. var l = o[c],
  12943. s = l.size;
  12944. switch (l.type) {
  12945. case "drop":
  12946. f += s;
  12947. break;
  12948. case "dropRight":
  12949. n -= s;
  12950. break;
  12951. case "take":
  12952. n = Ui(n, f + s);
  12953. break;
  12954. case "takeRight":
  12955. f = Li(f, n - s);
  12956. }
  12957. }
  12958. if (n = {
  12959. start: f,
  12960. end: n
  12961. }, o = n.start, f = n.end, n = f - o, o = u ? f : o - 1, f = this.__iteratees__, c = f.length, a = 0, l = Ui(n, this.__takeCount__), !e || !u && i == n && l == n) return wr(t, this.__actions__);
  12962. e = [];
  12963. n: for (; n-- && a < l;) {
  12964. for (o += r, u = -1, i = t[o]; ++u < c;) {
  12965. var h = f[u],
  12966. s = h.type,
  12967. h = (0, h.iteratee)(i);
  12968. if (2 == s) i = h;else if (!h) {
  12969. if (1 == s) continue n;
  12970. break n;
  12971. }
  12972. }
  12973. e[a++] = i;
  12974. }
  12975. return e;
  12976. }, An.prototype.at = Mo, An.prototype.chain = function () {
  12977. return Je(this);
  12978. }, An.prototype.commit = function () {
  12979. return new On(this.value(), this.__chain__);
  12980. }, An.prototype.next = function () {
  12981. this.__values__ === T && (this.__values__ = wu(this.value()));
  12982. var n = this.__index__ >= this.__values__.length;
  12983. return {
  12984. done: n,
  12985. value: n ? T : this.__values__[this.__index__++]
  12986. };
  12987. }, An.prototype.plant = function (n) {
  12988. for (var t, r = this; r instanceof En;) {
  12989. var e = $e(r);
  12990. e.__index__ = 0, e.__values__ = T, t ? u.__wrapped__ = e : t = e;
  12991. var u = e,
  12992. r = r.__wrapped__;
  12993. }
  12994. return u.__wrapped__ = n, t;
  12995. }, An.prototype.reverse = function () {
  12996. var n = this.__wrapped__;
  12997. return n instanceof Un ? (this.__actions__.length && (n = new Un(this)), n = n.reverse(), n.__actions__.push({
  12998. func: Ye,
  12999. args: [Ke],
  13000. thisArg: T
  13001. }), new On(n, this.__chain__)) : this.thru(Ke);
  13002. }, An.prototype.toJSON = An.prototype.valueOf = An.prototype.value = function () {
  13003. return wr(this.__wrapped__, this.__actions__);
  13004. }, An.prototype.first = An.prototype.head, ji && (An.prototype[ji] = Qe), An;
  13005. }();
  13006. true && _typeof(__webpack_require__(/*! !webpack amd options */ 41)) == "object" && __webpack_require__(/*! !webpack amd options */ 41) ? ($n._ = rt, !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  13007. return rt;
  13008. }).call(exports, __webpack_require__, exports, module),
  13009. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) : Nn ? ((Nn.exports = rt)._ = rt, Fn._ = rt) : $n._ = rt;
  13010. }).call(this);
  13011. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/global.js */ 3), __webpack_require__(/*! (webpack)/buildin/module.js */ 40)(module)))
  13012. /***/ }),
  13013. /***/ 395:
  13014. /*!************************************************************************!*\
  13015. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/async-validator.js ***!
  13016. \************************************************************************/
  13017. /*! no static exports found */
  13018. /***/ (function(module, exports, __webpack_require__) {
  13019. "use strict";
  13020. /* WEBPACK VAR INJECTION */(function(process) {
  13021. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13022. Object.defineProperty(exports, "__esModule", {
  13023. value: true
  13024. });
  13025. exports.default = void 0;
  13026. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  13027. function _extends() {
  13028. _extends = Object.assign || function (target) {
  13029. for (var i = 1; i < arguments.length; i++) {
  13030. var source = arguments[i];
  13031. for (var key in source) {
  13032. if (Object.prototype.hasOwnProperty.call(source, key)) {
  13033. target[key] = source[key];
  13034. }
  13035. }
  13036. }
  13037. return target;
  13038. };
  13039. return _extends.apply(this, arguments);
  13040. }
  13041. /* eslint no-console:0 */
  13042. var formatRegExp = /%[sdj%]/g;
  13043. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  13044. if (typeof process !== 'undefined' && Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
  13045. warning = function warning(type, errors) {
  13046. if (typeof console !== 'undefined' && console.warn) {
  13047. if (errors.every(function (e) {
  13048. return typeof e === 'string';
  13049. })) {
  13050. console.warn(type, errors);
  13051. }
  13052. }
  13053. };
  13054. }
  13055. function convertFieldsError(errors) {
  13056. if (!errors || !errors.length) return null;
  13057. var fields = {};
  13058. errors.forEach(function (error) {
  13059. var field = error.field;
  13060. fields[field] = fields[field] || [];
  13061. fields[field].push(error);
  13062. });
  13063. return fields;
  13064. }
  13065. function format() {
  13066. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  13067. args[_key] = arguments[_key];
  13068. }
  13069. var i = 1;
  13070. var f = args[0];
  13071. var len = args.length;
  13072. if (typeof f === 'function') {
  13073. return f.apply(null, args.slice(1));
  13074. }
  13075. if (typeof f === 'string') {
  13076. var str = String(f).replace(formatRegExp, function (x) {
  13077. if (x === '%%') {
  13078. return '%';
  13079. }
  13080. if (i >= len) {
  13081. return x;
  13082. }
  13083. switch (x) {
  13084. case '%s':
  13085. return String(args[i++]);
  13086. case '%d':
  13087. return Number(args[i++]);
  13088. case '%j':
  13089. try {
  13090. return JSON.stringify(args[i++]);
  13091. } catch (_) {
  13092. return '[Circular]';
  13093. }
  13094. break;
  13095. default:
  13096. return x;
  13097. }
  13098. });
  13099. for (var arg = args[i]; i < len; arg = args[++i]) {
  13100. str += " " + arg;
  13101. }
  13102. return str;
  13103. }
  13104. return f;
  13105. }
  13106. function isNativeStringType(type) {
  13107. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  13108. }
  13109. function isEmptyValue(value, type) {
  13110. if (value === undefined || value === null) {
  13111. return true;
  13112. }
  13113. if (type === 'array' && Array.isArray(value) && !value.length) {
  13114. return true;
  13115. }
  13116. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  13117. return true;
  13118. }
  13119. return false;
  13120. }
  13121. function asyncParallelArray(arr, func, callback) {
  13122. var results = [];
  13123. var total = 0;
  13124. var arrLength = arr.length;
  13125. function count(errors) {
  13126. results.push.apply(results, errors);
  13127. total++;
  13128. if (total === arrLength) {
  13129. callback(results);
  13130. }
  13131. }
  13132. arr.forEach(function (a) {
  13133. func(a, count);
  13134. });
  13135. }
  13136. function asyncSerialArray(arr, func, callback) {
  13137. var index = 0;
  13138. var arrLength = arr.length;
  13139. function next(errors) {
  13140. if (errors && errors.length) {
  13141. callback(errors);
  13142. return;
  13143. }
  13144. var original = index;
  13145. index = index + 1;
  13146. if (original < arrLength) {
  13147. func(arr[original], next);
  13148. } else {
  13149. callback([]);
  13150. }
  13151. }
  13152. next([]);
  13153. }
  13154. function flattenObjArr(objArr) {
  13155. var ret = [];
  13156. Object.keys(objArr).forEach(function (k) {
  13157. ret.push.apply(ret, objArr[k]);
  13158. });
  13159. return ret;
  13160. }
  13161. function asyncMap(objArr, option, func, callback) {
  13162. if (option.first) {
  13163. var _pending = new Promise(function (resolve, reject) {
  13164. var next = function next(errors) {
  13165. callback(errors);
  13166. return errors.length ? reject({
  13167. errors: errors,
  13168. fields: convertFieldsError(errors)
  13169. }) : resolve();
  13170. };
  13171. var flattenArr = flattenObjArr(objArr);
  13172. asyncSerialArray(flattenArr, func, next);
  13173. });
  13174. _pending["catch"](function (e) {
  13175. return e;
  13176. });
  13177. return _pending;
  13178. }
  13179. var firstFields = option.firstFields || [];
  13180. if (firstFields === true) {
  13181. firstFields = Object.keys(objArr);
  13182. }
  13183. var objArrKeys = Object.keys(objArr);
  13184. var objArrLength = objArrKeys.length;
  13185. var total = 0;
  13186. var results = [];
  13187. var pending = new Promise(function (resolve, reject) {
  13188. var next = function next(errors) {
  13189. results.push.apply(results, errors);
  13190. total++;
  13191. if (total === objArrLength) {
  13192. callback(results);
  13193. return results.length ? reject({
  13194. errors: results,
  13195. fields: convertFieldsError(results)
  13196. }) : resolve();
  13197. }
  13198. };
  13199. if (!objArrKeys.length) {
  13200. callback(results);
  13201. resolve();
  13202. }
  13203. objArrKeys.forEach(function (key) {
  13204. var arr = objArr[key];
  13205. if (firstFields.indexOf(key) !== -1) {
  13206. asyncSerialArray(arr, func, next);
  13207. } else {
  13208. asyncParallelArray(arr, func, next);
  13209. }
  13210. });
  13211. });
  13212. pending["catch"](function (e) {
  13213. return e;
  13214. });
  13215. return pending;
  13216. }
  13217. function complementError(rule) {
  13218. return function (oe) {
  13219. if (oe && oe.message) {
  13220. oe.field = oe.field || rule.fullField;
  13221. return oe;
  13222. }
  13223. return {
  13224. message: typeof oe === 'function' ? oe() : oe,
  13225. field: oe.field || rule.fullField
  13226. };
  13227. };
  13228. }
  13229. function deepMerge(target, source) {
  13230. if (source) {
  13231. for (var s in source) {
  13232. if (source.hasOwnProperty(s)) {
  13233. var value = source[s];
  13234. if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
  13235. target[s] = _extends({}, target[s], {}, value);
  13236. } else {
  13237. target[s] = value;
  13238. }
  13239. }
  13240. }
  13241. }
  13242. return target;
  13243. }
  13244. /**
  13245. * Rule for validating required fields.
  13246. *
  13247. * @param rule The validation rule.
  13248. * @param value The value of the field on the source object.
  13249. * @param source The source object being validated.
  13250. * @param errors An array of errors that this rule may add
  13251. * validation errors to.
  13252. * @param options The validation options.
  13253. * @param options.messages The validation messages.
  13254. */
  13255. function required(rule, value, source, errors, options, type) {
  13256. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  13257. errors.push(format(options.messages.required, rule.fullField));
  13258. }
  13259. }
  13260. /**
  13261. * Rule for validating whitespace.
  13262. *
  13263. * @param rule The validation rule.
  13264. * @param value The value of the field on the source object.
  13265. * @param source The source object being validated.
  13266. * @param errors An array of errors that this rule may add
  13267. * validation errors to.
  13268. * @param options The validation options.
  13269. * @param options.messages The validation messages.
  13270. */
  13271. function whitespace(rule, value, source, errors, options) {
  13272. if (/^\s+$/.test(value) || value === '') {
  13273. errors.push(format(options.messages.whitespace, rule.fullField));
  13274. }
  13275. }
  13276. /* eslint max-len:0 */
  13277. var pattern = {
  13278. // http://emailregex.com/
  13279. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  13280. 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'),
  13281. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  13282. };
  13283. var types = {
  13284. integer: function integer(value) {
  13285. return types.number(value) && parseInt(value, 10) === value;
  13286. },
  13287. "float": function float(value) {
  13288. return types.number(value) && !types.integer(value);
  13289. },
  13290. array: function array(value) {
  13291. return Array.isArray(value);
  13292. },
  13293. regexp: function regexp(value) {
  13294. if (value instanceof RegExp) {
  13295. return true;
  13296. }
  13297. try {
  13298. return !!new RegExp(value);
  13299. } catch (e) {
  13300. return false;
  13301. }
  13302. },
  13303. date: function date(value) {
  13304. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  13305. },
  13306. number: function number(value) {
  13307. if (isNaN(value)) {
  13308. return false;
  13309. }
  13310. // 修改源码,将字符串数值先转为数值
  13311. return typeof +value === 'number';
  13312. },
  13313. object: function object(value) {
  13314. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  13315. },
  13316. method: function method(value) {
  13317. return typeof value === 'function';
  13318. },
  13319. email: function email(value) {
  13320. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  13321. },
  13322. url: function url(value) {
  13323. return typeof value === 'string' && !!value.match(pattern.url);
  13324. },
  13325. hex: function hex(value) {
  13326. return typeof value === 'string' && !!value.match(pattern.hex);
  13327. }
  13328. };
  13329. /**
  13330. * Rule for validating the type of a value.
  13331. *
  13332. * @param rule The validation rule.
  13333. * @param value The value of the field on the source object.
  13334. * @param source The source object being validated.
  13335. * @param errors An array of errors that this rule may add
  13336. * validation errors to.
  13337. * @param options The validation options.
  13338. * @param options.messages The validation messages.
  13339. */
  13340. function type(rule, value, source, errors, options) {
  13341. if (rule.required && value === undefined) {
  13342. required(rule, value, source, errors, options);
  13343. return;
  13344. }
  13345. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  13346. var ruleType = rule.type;
  13347. if (custom.indexOf(ruleType) > -1) {
  13348. if (!types[ruleType](value)) {
  13349. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  13350. } // straight typeof check
  13351. } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
  13352. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  13353. }
  13354. }
  13355. /**
  13356. * Rule for validating minimum and maximum allowed values.
  13357. *
  13358. * @param rule The validation rule.
  13359. * @param value The value of the field on the source object.
  13360. * @param source The source object being validated.
  13361. * @param errors An array of errors that this rule may add
  13362. * validation errors to.
  13363. * @param options The validation options.
  13364. * @param options.messages The validation messages.
  13365. */
  13366. function range(rule, value, source, errors, options) {
  13367. var len = typeof rule.len === 'number';
  13368. var min = typeof rule.min === 'number';
  13369. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  13370. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  13371. var val = value;
  13372. var key = null;
  13373. var num = typeof value === 'number';
  13374. var str = typeof value === 'string';
  13375. var arr = Array.isArray(value);
  13376. if (num) {
  13377. key = 'number';
  13378. } else if (str) {
  13379. key = 'string';
  13380. } else if (arr) {
  13381. key = 'array';
  13382. } // if the value is not of a supported type for range validation
  13383. // the validation rule rule should use the
  13384. // type property to also test for a particular type
  13385. if (!key) {
  13386. return false;
  13387. }
  13388. if (arr) {
  13389. val = value.length;
  13390. }
  13391. if (str) {
  13392. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".length !== 3
  13393. val = value.replace(spRegexp, '_').length;
  13394. }
  13395. if (len) {
  13396. if (val !== rule.len) {
  13397. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  13398. }
  13399. } else if (min && !max && val < rule.min) {
  13400. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  13401. } else if (max && !min && val > rule.max) {
  13402. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  13403. } else if (min && max && (val < rule.min || val > rule.max)) {
  13404. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  13405. }
  13406. }
  13407. var ENUM = 'enum';
  13408. /**
  13409. * Rule for validating a value exists in an enumerable list.
  13410. *
  13411. * @param rule The validation rule.
  13412. * @param value The value of the field on the source object.
  13413. * @param source The source object being validated.
  13414. * @param errors An array of errors that this rule may add
  13415. * validation errors to.
  13416. * @param options The validation options.
  13417. * @param options.messages The validation messages.
  13418. */
  13419. function enumerable(rule, value, source, errors, options) {
  13420. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  13421. if (rule[ENUM].indexOf(value) === -1) {
  13422. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  13423. }
  13424. }
  13425. /**
  13426. * Rule for validating a regular expression pattern.
  13427. *
  13428. * @param rule The validation rule.
  13429. * @param value The value of the field on the source object.
  13430. * @param source The source object being validated.
  13431. * @param errors An array of errors that this rule may add
  13432. * validation errors to.
  13433. * @param options The validation options.
  13434. * @param options.messages The validation messages.
  13435. */
  13436. function pattern$1(rule, value, source, errors, options) {
  13437. if (rule.pattern) {
  13438. if (rule.pattern instanceof RegExp) {
  13439. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  13440. // flag is accidentally set to `true`, which in a validation scenario
  13441. // is not necessary and the result might be misleading
  13442. rule.pattern.lastIndex = 0;
  13443. if (!rule.pattern.test(value)) {
  13444. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  13445. }
  13446. } else if (typeof rule.pattern === 'string') {
  13447. var _pattern = new RegExp(rule.pattern);
  13448. if (!_pattern.test(value)) {
  13449. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  13450. }
  13451. }
  13452. }
  13453. }
  13454. var rules = {
  13455. required: required,
  13456. whitespace: whitespace,
  13457. type: type,
  13458. range: range,
  13459. "enum": enumerable,
  13460. pattern: pattern$1
  13461. };
  13462. /**
  13463. * Performs validation for string types.
  13464. *
  13465. * @param rule The validation rule.
  13466. * @param value The value of the field on the source object.
  13467. * @param callback The callback function.
  13468. * @param source The source object being validated.
  13469. * @param options The validation options.
  13470. * @param options.messages The validation messages.
  13471. */
  13472. function string(rule, value, callback, source, options) {
  13473. var errors = [];
  13474. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13475. if (validate) {
  13476. if (isEmptyValue(value, 'string') && !rule.required) {
  13477. return callback();
  13478. }
  13479. rules.required(rule, value, source, errors, options, 'string');
  13480. if (!isEmptyValue(value, 'string')) {
  13481. rules.type(rule, value, source, errors, options);
  13482. rules.range(rule, value, source, errors, options);
  13483. rules.pattern(rule, value, source, errors, options);
  13484. if (rule.whitespace === true) {
  13485. rules.whitespace(rule, value, source, errors, options);
  13486. }
  13487. }
  13488. }
  13489. callback(errors);
  13490. }
  13491. /**
  13492. * Validates a function.
  13493. *
  13494. * @param rule The validation rule.
  13495. * @param value The value of the field on the source object.
  13496. * @param callback The callback function.
  13497. * @param source The source object being validated.
  13498. * @param options The validation options.
  13499. * @param options.messages The validation messages.
  13500. */
  13501. function method(rule, value, callback, source, options) {
  13502. var errors = [];
  13503. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13504. if (validate) {
  13505. if (isEmptyValue(value) && !rule.required) {
  13506. return callback();
  13507. }
  13508. rules.required(rule, value, source, errors, options);
  13509. if (value !== undefined) {
  13510. rules.type(rule, value, source, errors, options);
  13511. }
  13512. }
  13513. callback(errors);
  13514. }
  13515. /**
  13516. * Validates a number.
  13517. *
  13518. * @param rule The validation rule.
  13519. * @param value The value of the field on the source object.
  13520. * @param callback The callback function.
  13521. * @param source The source object being validated.
  13522. * @param options The validation options.
  13523. * @param options.messages The validation messages.
  13524. */
  13525. function number(rule, value, callback, source, options) {
  13526. var errors = [];
  13527. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13528. if (validate) {
  13529. if (value === '') {
  13530. value = undefined;
  13531. }
  13532. if (isEmptyValue(value) && !rule.required) {
  13533. return callback();
  13534. }
  13535. rules.required(rule, value, source, errors, options);
  13536. if (value !== undefined) {
  13537. rules.type(rule, value, source, errors, options);
  13538. rules.range(rule, value, source, errors, options);
  13539. }
  13540. }
  13541. callback(errors);
  13542. }
  13543. /**
  13544. * Validates a boolean.
  13545. *
  13546. * @param rule The validation rule.
  13547. * @param value The value of the field on the source object.
  13548. * @param callback The callback function.
  13549. * @param source The source object being validated.
  13550. * @param options The validation options.
  13551. * @param options.messages The validation messages.
  13552. */
  13553. function _boolean(rule, value, callback, source, options) {
  13554. var errors = [];
  13555. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13556. if (validate) {
  13557. if (isEmptyValue(value) && !rule.required) {
  13558. return callback();
  13559. }
  13560. rules.required(rule, value, source, errors, options);
  13561. if (value !== undefined) {
  13562. rules.type(rule, value, source, errors, options);
  13563. }
  13564. }
  13565. callback(errors);
  13566. }
  13567. /**
  13568. * Validates the regular expression type.
  13569. *
  13570. * @param rule The validation rule.
  13571. * @param value The value of the field on the source object.
  13572. * @param callback The callback function.
  13573. * @param source The source object being validated.
  13574. * @param options The validation options.
  13575. * @param options.messages The validation messages.
  13576. */
  13577. function regexp(rule, value, callback, source, options) {
  13578. var errors = [];
  13579. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13580. if (validate) {
  13581. if (isEmptyValue(value) && !rule.required) {
  13582. return callback();
  13583. }
  13584. rules.required(rule, value, source, errors, options);
  13585. if (!isEmptyValue(value)) {
  13586. rules.type(rule, value, source, errors, options);
  13587. }
  13588. }
  13589. callback(errors);
  13590. }
  13591. /**
  13592. * Validates a number is an integer.
  13593. *
  13594. * @param rule The validation rule.
  13595. * @param value The value of the field on the source object.
  13596. * @param callback The callback function.
  13597. * @param source The source object being validated.
  13598. * @param options The validation options.
  13599. * @param options.messages The validation messages.
  13600. */
  13601. function integer(rule, value, callback, source, options) {
  13602. var errors = [];
  13603. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13604. if (validate) {
  13605. if (isEmptyValue(value) && !rule.required) {
  13606. return callback();
  13607. }
  13608. rules.required(rule, value, source, errors, options);
  13609. if (value !== undefined) {
  13610. rules.type(rule, value, source, errors, options);
  13611. rules.range(rule, value, source, errors, options);
  13612. }
  13613. }
  13614. callback(errors);
  13615. }
  13616. /**
  13617. * Validates a number is a floating point number.
  13618. *
  13619. * @param rule The validation rule.
  13620. * @param value The value of the field on the source object.
  13621. * @param callback The callback function.
  13622. * @param source The source object being validated.
  13623. * @param options The validation options.
  13624. * @param options.messages The validation messages.
  13625. */
  13626. function floatFn(rule, value, callback, source, options) {
  13627. var errors = [];
  13628. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13629. if (validate) {
  13630. if (isEmptyValue(value) && !rule.required) {
  13631. return callback();
  13632. }
  13633. rules.required(rule, value, source, errors, options);
  13634. if (value !== undefined) {
  13635. rules.type(rule, value, source, errors, options);
  13636. rules.range(rule, value, source, errors, options);
  13637. }
  13638. }
  13639. callback(errors);
  13640. }
  13641. /**
  13642. * Validates an array.
  13643. *
  13644. * @param rule The validation rule.
  13645. * @param value The value of the field on the source object.
  13646. * @param callback The callback function.
  13647. * @param source The source object being validated.
  13648. * @param options The validation options.
  13649. * @param options.messages The validation messages.
  13650. */
  13651. function array(rule, value, callback, source, options) {
  13652. var errors = [];
  13653. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13654. if (validate) {
  13655. if (isEmptyValue(value, 'array') && !rule.required) {
  13656. return callback();
  13657. }
  13658. rules.required(rule, value, source, errors, options, 'array');
  13659. if (!isEmptyValue(value, 'array')) {
  13660. rules.type(rule, value, source, errors, options);
  13661. rules.range(rule, value, source, errors, options);
  13662. }
  13663. }
  13664. callback(errors);
  13665. }
  13666. /**
  13667. * Validates an object.
  13668. *
  13669. * @param rule The validation rule.
  13670. * @param value The value of the field on the source object.
  13671. * @param callback The callback function.
  13672. * @param source The source object being validated.
  13673. * @param options The validation options.
  13674. * @param options.messages The validation messages.
  13675. */
  13676. function object(rule, value, callback, source, options) {
  13677. var errors = [];
  13678. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13679. if (validate) {
  13680. if (isEmptyValue(value) && !rule.required) {
  13681. return callback();
  13682. }
  13683. rules.required(rule, value, source, errors, options);
  13684. if (value !== undefined) {
  13685. rules.type(rule, value, source, errors, options);
  13686. }
  13687. }
  13688. callback(errors);
  13689. }
  13690. var ENUM$1 = 'enum';
  13691. /**
  13692. * Validates an enumerable list.
  13693. *
  13694. * @param rule The validation rule.
  13695. * @param value The value of the field on the source object.
  13696. * @param callback The callback function.
  13697. * @param source The source object being validated.
  13698. * @param options The validation options.
  13699. * @param options.messages The validation messages.
  13700. */
  13701. function enumerable$1(rule, value, callback, source, options) {
  13702. var errors = [];
  13703. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13704. if (validate) {
  13705. if (isEmptyValue(value) && !rule.required) {
  13706. return callback();
  13707. }
  13708. rules.required(rule, value, source, errors, options);
  13709. if (value !== undefined) {
  13710. rules[ENUM$1](rule, value, source, errors, options);
  13711. }
  13712. }
  13713. callback(errors);
  13714. }
  13715. /**
  13716. * Validates a regular expression pattern.
  13717. *
  13718. * Performs validation when a rule only contains
  13719. * a pattern property but is not declared as a string type.
  13720. *
  13721. * @param rule The validation rule.
  13722. * @param value The value of the field on the source object.
  13723. * @param callback The callback function.
  13724. * @param source The source object being validated.
  13725. * @param options The validation options.
  13726. * @param options.messages The validation messages.
  13727. */
  13728. function pattern$2(rule, value, callback, source, options) {
  13729. var errors = [];
  13730. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13731. if (validate) {
  13732. if (isEmptyValue(value, 'string') && !rule.required) {
  13733. return callback();
  13734. }
  13735. rules.required(rule, value, source, errors, options);
  13736. if (!isEmptyValue(value, 'string')) {
  13737. rules.pattern(rule, value, source, errors, options);
  13738. }
  13739. }
  13740. callback(errors);
  13741. }
  13742. function date(rule, value, callback, source, options) {
  13743. var errors = [];
  13744. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13745. if (validate) {
  13746. if (isEmptyValue(value) && !rule.required) {
  13747. return callback();
  13748. }
  13749. rules.required(rule, value, source, errors, options);
  13750. if (!isEmptyValue(value)) {
  13751. var dateObject;
  13752. if (typeof value === 'number') {
  13753. dateObject = new Date(value);
  13754. } else {
  13755. dateObject = value;
  13756. }
  13757. rules.type(rule, dateObject, source, errors, options);
  13758. if (dateObject) {
  13759. rules.range(rule, dateObject.getTime(), source, errors, options);
  13760. }
  13761. }
  13762. }
  13763. callback(errors);
  13764. }
  13765. function required$1(rule, value, callback, source, options) {
  13766. var errors = [];
  13767. var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
  13768. rules.required(rule, value, source, errors, options, type);
  13769. callback(errors);
  13770. }
  13771. function type$1(rule, value, callback, source, options) {
  13772. var ruleType = rule.type;
  13773. var errors = [];
  13774. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13775. if (validate) {
  13776. if (isEmptyValue(value, ruleType) && !rule.required) {
  13777. return callback();
  13778. }
  13779. rules.required(rule, value, source, errors, options, ruleType);
  13780. if (!isEmptyValue(value, ruleType)) {
  13781. rules.type(rule, value, source, errors, options);
  13782. }
  13783. }
  13784. callback(errors);
  13785. }
  13786. /**
  13787. * Performs validation for any type.
  13788. *
  13789. * @param rule The validation rule.
  13790. * @param value The value of the field on the source object.
  13791. * @param callback The callback function.
  13792. * @param source The source object being validated.
  13793. * @param options The validation options.
  13794. * @param options.messages The validation messages.
  13795. */
  13796. function any(rule, value, callback, source, options) {
  13797. var errors = [];
  13798. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13799. if (validate) {
  13800. if (isEmptyValue(value) && !rule.required) {
  13801. return callback();
  13802. }
  13803. rules.required(rule, value, source, errors, options);
  13804. }
  13805. callback(errors);
  13806. }
  13807. var validators = {
  13808. string: string,
  13809. method: method,
  13810. number: number,
  13811. "boolean": _boolean,
  13812. regexp: regexp,
  13813. integer: integer,
  13814. "float": floatFn,
  13815. array: array,
  13816. object: object,
  13817. "enum": enumerable$1,
  13818. pattern: pattern$2,
  13819. date: date,
  13820. url: type$1,
  13821. hex: type$1,
  13822. email: type$1,
  13823. required: required$1,
  13824. any: any
  13825. };
  13826. function newMessages() {
  13827. return {
  13828. "default": 'Validation error on field %s',
  13829. required: '%s is required',
  13830. "enum": '%s must be one of %s',
  13831. whitespace: '%s cannot be empty',
  13832. date: {
  13833. format: '%s date %s is invalid for format %s',
  13834. parse: '%s date could not be parsed, %s is invalid ',
  13835. invalid: '%s date %s is invalid'
  13836. },
  13837. types: {
  13838. string: '%s is not a %s',
  13839. method: '%s is not a %s (function)',
  13840. array: '%s is not an %s',
  13841. object: '%s is not an %s',
  13842. number: '%s is not a %s',
  13843. date: '%s is not a %s',
  13844. "boolean": '%s is not a %s',
  13845. integer: '%s is not an %s',
  13846. "float": '%s is not a %s',
  13847. regexp: '%s is not a valid %s',
  13848. email: '%s is not a valid %s',
  13849. url: '%s is not a valid %s',
  13850. hex: '%s is not a valid %s'
  13851. },
  13852. string: {
  13853. len: '%s must be exactly %s characters',
  13854. min: '%s must be at least %s characters',
  13855. max: '%s cannot be longer than %s characters',
  13856. range: '%s must be between %s and %s characters'
  13857. },
  13858. number: {
  13859. len: '%s must equal %s',
  13860. min: '%s cannot be less than %s',
  13861. max: '%s cannot be greater than %s',
  13862. range: '%s must be between %s and %s'
  13863. },
  13864. array: {
  13865. len: '%s must be exactly %s in length',
  13866. min: '%s cannot be less than %s in length',
  13867. max: '%s cannot be greater than %s in length',
  13868. range: '%s must be between %s and %s in length'
  13869. },
  13870. pattern: {
  13871. mismatch: '%s value %s does not match pattern %s'
  13872. },
  13873. clone: function clone() {
  13874. var cloned = JSON.parse(JSON.stringify(this));
  13875. cloned.clone = this.clone;
  13876. return cloned;
  13877. }
  13878. };
  13879. }
  13880. var messages = newMessages();
  13881. /**
  13882. * Encapsulates a validation schema.
  13883. *
  13884. * @param descriptor An object declaring validation rules
  13885. * for this schema.
  13886. */
  13887. function Schema(descriptor) {
  13888. this.rules = null;
  13889. this._messages = messages;
  13890. this.define(descriptor);
  13891. }
  13892. Schema.prototype = {
  13893. messages: function messages(_messages) {
  13894. if (_messages) {
  13895. this._messages = deepMerge(newMessages(), _messages);
  13896. }
  13897. return this._messages;
  13898. },
  13899. define: function define(rules) {
  13900. if (!rules) {
  13901. throw new Error('Cannot configure a schema with no rules');
  13902. }
  13903. if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
  13904. throw new Error('Rules must be an object');
  13905. }
  13906. this.rules = {};
  13907. var z;
  13908. var item;
  13909. for (z in rules) {
  13910. if (rules.hasOwnProperty(z)) {
  13911. item = rules[z];
  13912. this.rules[z] = Array.isArray(item) ? item : [item];
  13913. }
  13914. }
  13915. },
  13916. validate: function validate(source_, o, oc) {
  13917. var _this = this;
  13918. if (o === void 0) {
  13919. o = {};
  13920. }
  13921. if (oc === void 0) {
  13922. oc = function oc() {};
  13923. }
  13924. var source = source_;
  13925. var options = o;
  13926. var callback = oc;
  13927. if (typeof options === 'function') {
  13928. callback = options;
  13929. options = {};
  13930. }
  13931. if (!this.rules || Object.keys(this.rules).length === 0) {
  13932. if (callback) {
  13933. callback();
  13934. }
  13935. return Promise.resolve();
  13936. }
  13937. function complete(results) {
  13938. var i;
  13939. var errors = [];
  13940. var fields = {};
  13941. function add(e) {
  13942. if (Array.isArray(e)) {
  13943. var _errors;
  13944. errors = (_errors = errors).concat.apply(_errors, e);
  13945. } else {
  13946. errors.push(e);
  13947. }
  13948. }
  13949. for (i = 0; i < results.length; i++) {
  13950. add(results[i]);
  13951. }
  13952. if (!errors.length) {
  13953. errors = null;
  13954. fields = null;
  13955. } else {
  13956. fields = convertFieldsError(errors);
  13957. }
  13958. callback(errors, fields);
  13959. }
  13960. if (options.messages) {
  13961. var messages$1 = this.messages();
  13962. if (messages$1 === messages) {
  13963. messages$1 = newMessages();
  13964. }
  13965. deepMerge(messages$1, options.messages);
  13966. options.messages = messages$1;
  13967. } else {
  13968. options.messages = this.messages();
  13969. }
  13970. var arr;
  13971. var value;
  13972. var series = {};
  13973. var keys = options.keys || Object.keys(this.rules);
  13974. keys.forEach(function (z) {
  13975. arr = _this.rules[z];
  13976. value = source[z];
  13977. arr.forEach(function (r) {
  13978. var rule = r;
  13979. if (typeof rule.transform === 'function') {
  13980. if (source === source_) {
  13981. source = _extends({}, source);
  13982. }
  13983. value = source[z] = rule.transform(value);
  13984. }
  13985. if (typeof rule === 'function') {
  13986. rule = {
  13987. validator: rule
  13988. };
  13989. } else {
  13990. rule = _extends({}, rule);
  13991. }
  13992. rule.validator = _this.getValidationMethod(rule);
  13993. rule.field = z;
  13994. rule.fullField = rule.fullField || z;
  13995. rule.type = _this.getType(rule);
  13996. if (!rule.validator) {
  13997. return;
  13998. }
  13999. series[z] = series[z] || [];
  14000. series[z].push({
  14001. rule: rule,
  14002. value: value,
  14003. source: source,
  14004. field: z
  14005. });
  14006. });
  14007. });
  14008. var errorFields = {};
  14009. return asyncMap(series, options, function (data, doIt) {
  14010. var rule = data.rule;
  14011. var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
  14012. deep = deep && (rule.required || !rule.required && data.value);
  14013. rule.field = data.field;
  14014. function addFullfield(key, schema) {
  14015. return _extends({}, schema, {
  14016. fullField: rule.fullField + "." + key
  14017. });
  14018. }
  14019. function cb(e) {
  14020. if (e === void 0) {
  14021. e = [];
  14022. }
  14023. var errors = e;
  14024. if (!Array.isArray(errors)) {
  14025. errors = [errors];
  14026. }
  14027. if (!options.suppressWarning && errors.length) {
  14028. Schema.warning('async-validator:', errors);
  14029. }
  14030. if (errors.length && rule.message) {
  14031. errors = [].concat(rule.message);
  14032. }
  14033. errors = errors.map(complementError(rule));
  14034. if (options.first && errors.length) {
  14035. errorFields[rule.field] = 1;
  14036. return doIt(errors);
  14037. }
  14038. if (!deep) {
  14039. doIt(errors);
  14040. } else {
  14041. // if rule is required but the target object
  14042. // does not exist fail at the rule level and don't
  14043. // go deeper
  14044. if (rule.required && !data.value) {
  14045. if (rule.message) {
  14046. errors = [].concat(rule.message).map(complementError(rule));
  14047. } else if (options.error) {
  14048. errors = [options.error(rule, format(options.messages.required, rule.field))];
  14049. } else {
  14050. errors = [];
  14051. }
  14052. return doIt(errors);
  14053. }
  14054. var fieldsSchema = {};
  14055. if (rule.defaultField) {
  14056. for (var k in data.value) {
  14057. if (data.value.hasOwnProperty(k)) {
  14058. fieldsSchema[k] = rule.defaultField;
  14059. }
  14060. }
  14061. }
  14062. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  14063. for (var f in fieldsSchema) {
  14064. if (fieldsSchema.hasOwnProperty(f)) {
  14065. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  14066. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  14067. }
  14068. }
  14069. var schema = new Schema(fieldsSchema);
  14070. schema.messages(options.messages);
  14071. if (data.rule.options) {
  14072. data.rule.options.messages = options.messages;
  14073. data.rule.options.error = options.error;
  14074. }
  14075. schema.validate(data.value, data.rule.options || options, function (errs) {
  14076. var finalErrors = [];
  14077. if (errors && errors.length) {
  14078. finalErrors.push.apply(finalErrors, errors);
  14079. }
  14080. if (errs && errs.length) {
  14081. finalErrors.push.apply(finalErrors, errs);
  14082. }
  14083. doIt(finalErrors.length ? finalErrors : null);
  14084. });
  14085. }
  14086. }
  14087. var res;
  14088. if (rule.asyncValidator) {
  14089. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  14090. } else if (rule.validator) {
  14091. res = rule.validator(rule, data.value, cb, data.source, options);
  14092. if (res === true) {
  14093. cb();
  14094. } else if (res === false) {
  14095. cb(rule.message || rule.field + " fails");
  14096. } else if (res instanceof Array) {
  14097. cb(res);
  14098. } else if (res instanceof Error) {
  14099. cb(res.message);
  14100. }
  14101. }
  14102. if (res && res.then) {
  14103. res.then(function () {
  14104. return cb();
  14105. }, function (e) {
  14106. return cb(e);
  14107. });
  14108. }
  14109. }, function (results) {
  14110. complete(results);
  14111. });
  14112. },
  14113. getType: function getType(rule) {
  14114. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  14115. rule.type = 'pattern';
  14116. }
  14117. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  14118. throw new Error(format('Unknown rule type %s', rule.type));
  14119. }
  14120. return rule.type || 'string';
  14121. },
  14122. getValidationMethod: function getValidationMethod(rule) {
  14123. if (typeof rule.validator === 'function') {
  14124. return rule.validator;
  14125. }
  14126. var keys = Object.keys(rule);
  14127. var messageIndex = keys.indexOf('message');
  14128. if (messageIndex !== -1) {
  14129. keys.splice(messageIndex, 1);
  14130. }
  14131. if (keys.length === 1 && keys[0] === 'required') {
  14132. return validators.required;
  14133. }
  14134. return validators[this.getType(rule)] || false;
  14135. }
  14136. };
  14137. Schema.register = function register(type, validator) {
  14138. if (typeof validator !== 'function') {
  14139. throw new Error('Cannot register a validator by type, validator is not a function');
  14140. }
  14141. validators[type] = validator;
  14142. };
  14143. Schema.warning = warning;
  14144. Schema.messages = messages;
  14145. var _default = Schema;
  14146. exports.default = _default;
  14147. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 396)))
  14148. /***/ }),
  14149. /***/ 396:
  14150. /*!********************************************************!*\
  14151. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  14152. \********************************************************/
  14153. /*! no static exports found */
  14154. /***/ (function(module, exports, __webpack_require__) {
  14155. exports.nextTick = function nextTick(fn) {
  14156. var args = Array.prototype.slice.call(arguments);
  14157. args.shift();
  14158. setTimeout(function () {
  14159. fn.apply(null, args);
  14160. }, 0);
  14161. };
  14162. exports.platform = exports.arch =
  14163. exports.execPath = exports.title = 'browser';
  14164. exports.pid = 1;
  14165. exports.browser = true;
  14166. exports.env = {};
  14167. exports.argv = [];
  14168. exports.binding = function (name) {
  14169. throw new Error('No such module. (Possibly not yet loaded)')
  14170. };
  14171. (function () {
  14172. var cwd = '/';
  14173. var path;
  14174. exports.cwd = function () { return cwd };
  14175. exports.chdir = function (dir) {
  14176. if (!path) path = __webpack_require__(/*! path */ 397);
  14177. cwd = path.resolve(dir, cwd);
  14178. };
  14179. })();
  14180. exports.exit = exports.kill =
  14181. exports.umask = exports.dlopen =
  14182. exports.uptime = exports.memoryUsage =
  14183. exports.uvCounters = function() {};
  14184. exports.features = {};
  14185. /***/ }),
  14186. /***/ 397:
  14187. /*!***********************************************!*\
  14188. !*** ./node_modules/path-browserify/index.js ***!
  14189. \***********************************************/
  14190. /*! no static exports found */
  14191. /***/ (function(module, exports, __webpack_require__) {
  14192. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  14193. // backported and transplited with Babel, with backwards-compat fixes
  14194. // Copyright Joyent, Inc. and other Node contributors.
  14195. //
  14196. // Permission is hereby granted, free of charge, to any person obtaining a
  14197. // copy of this software and associated documentation files (the
  14198. // "Software"), to deal in the Software without restriction, including
  14199. // without limitation the rights to use, copy, modify, merge, publish,
  14200. // distribute, sublicense, and/or sell copies of the Software, and to permit
  14201. // persons to whom the Software is furnished to do so, subject to the
  14202. // following conditions:
  14203. //
  14204. // The above copyright notice and this permission notice shall be included
  14205. // in all copies or substantial portions of the Software.
  14206. //
  14207. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  14208. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14209. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  14210. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  14211. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  14212. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  14213. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  14214. // resolves . and .. elements in a path array with directory names there
  14215. // must be no slashes, empty elements, or device names (c:\) in the array
  14216. // (so also no leading and trailing slashes - it does not distinguish
  14217. // relative and absolute paths)
  14218. function normalizeArray(parts, allowAboveRoot) {
  14219. // if the path tries to go above the root, `up` ends up > 0
  14220. var up = 0;
  14221. for (var i = parts.length - 1; i >= 0; i--) {
  14222. var last = parts[i];
  14223. if (last === '.') {
  14224. parts.splice(i, 1);
  14225. } else if (last === '..') {
  14226. parts.splice(i, 1);
  14227. up++;
  14228. } else if (up) {
  14229. parts.splice(i, 1);
  14230. up--;
  14231. }
  14232. }
  14233. // if the path is allowed to go above the root, restore leading ..s
  14234. if (allowAboveRoot) {
  14235. for (; up--; up) {
  14236. parts.unshift('..');
  14237. }
  14238. }
  14239. return parts;
  14240. }
  14241. // path.resolve([from ...], to)
  14242. // posix version
  14243. exports.resolve = function() {
  14244. var resolvedPath = '',
  14245. resolvedAbsolute = false;
  14246. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  14247. var path = (i >= 0) ? arguments[i] : process.cwd();
  14248. // Skip empty and invalid entries
  14249. if (typeof path !== 'string') {
  14250. throw new TypeError('Arguments to path.resolve must be strings');
  14251. } else if (!path) {
  14252. continue;
  14253. }
  14254. resolvedPath = path + '/' + resolvedPath;
  14255. resolvedAbsolute = path.charAt(0) === '/';
  14256. }
  14257. // At this point the path should be resolved to a full absolute path, but
  14258. // handle relative paths to be safe (might happen when process.cwd() fails)
  14259. // Normalize the path
  14260. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  14261. return !!p;
  14262. }), !resolvedAbsolute).join('/');
  14263. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  14264. };
  14265. // path.normalize(path)
  14266. // posix version
  14267. exports.normalize = function(path) {
  14268. var isAbsolute = exports.isAbsolute(path),
  14269. trailingSlash = substr(path, -1) === '/';
  14270. // Normalize the path
  14271. path = normalizeArray(filter(path.split('/'), function(p) {
  14272. return !!p;
  14273. }), !isAbsolute).join('/');
  14274. if (!path && !isAbsolute) {
  14275. path = '.';
  14276. }
  14277. if (path && trailingSlash) {
  14278. path += '/';
  14279. }
  14280. return (isAbsolute ? '/' : '') + path;
  14281. };
  14282. // posix version
  14283. exports.isAbsolute = function(path) {
  14284. return path.charAt(0) === '/';
  14285. };
  14286. // posix version
  14287. exports.join = function() {
  14288. var paths = Array.prototype.slice.call(arguments, 0);
  14289. return exports.normalize(filter(paths, function(p, index) {
  14290. if (typeof p !== 'string') {
  14291. throw new TypeError('Arguments to path.join must be strings');
  14292. }
  14293. return p;
  14294. }).join('/'));
  14295. };
  14296. // path.relative(from, to)
  14297. // posix version
  14298. exports.relative = function(from, to) {
  14299. from = exports.resolve(from).substr(1);
  14300. to = exports.resolve(to).substr(1);
  14301. function trim(arr) {
  14302. var start = 0;
  14303. for (; start < arr.length; start++) {
  14304. if (arr[start] !== '') break;
  14305. }
  14306. var end = arr.length - 1;
  14307. for (; end >= 0; end--) {
  14308. if (arr[end] !== '') break;
  14309. }
  14310. if (start > end) return [];
  14311. return arr.slice(start, end - start + 1);
  14312. }
  14313. var fromParts = trim(from.split('/'));
  14314. var toParts = trim(to.split('/'));
  14315. var length = Math.min(fromParts.length, toParts.length);
  14316. var samePartsLength = length;
  14317. for (var i = 0; i < length; i++) {
  14318. if (fromParts[i] !== toParts[i]) {
  14319. samePartsLength = i;
  14320. break;
  14321. }
  14322. }
  14323. var outputParts = [];
  14324. for (var i = samePartsLength; i < fromParts.length; i++) {
  14325. outputParts.push('..');
  14326. }
  14327. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  14328. return outputParts.join('/');
  14329. };
  14330. exports.sep = '/';
  14331. exports.delimiter = ':';
  14332. exports.dirname = function (path) {
  14333. if (typeof path !== 'string') path = path + '';
  14334. if (path.length === 0) return '.';
  14335. var code = path.charCodeAt(0);
  14336. var hasRoot = code === 47 /*/*/;
  14337. var end = -1;
  14338. var matchedSlash = true;
  14339. for (var i = path.length - 1; i >= 1; --i) {
  14340. code = path.charCodeAt(i);
  14341. if (code === 47 /*/*/) {
  14342. if (!matchedSlash) {
  14343. end = i;
  14344. break;
  14345. }
  14346. } else {
  14347. // We saw the first non-path separator
  14348. matchedSlash = false;
  14349. }
  14350. }
  14351. if (end === -1) return hasRoot ? '/' : '.';
  14352. if (hasRoot && end === 1) {
  14353. // return '//';
  14354. // Backwards-compat fix:
  14355. return '/';
  14356. }
  14357. return path.slice(0, end);
  14358. };
  14359. function basename(path) {
  14360. if (typeof path !== 'string') path = path + '';
  14361. var start = 0;
  14362. var end = -1;
  14363. var matchedSlash = true;
  14364. var i;
  14365. for (i = path.length - 1; i >= 0; --i) {
  14366. if (path.charCodeAt(i) === 47 /*/*/) {
  14367. // If we reached a path separator that was not part of a set of path
  14368. // separators at the end of the string, stop now
  14369. if (!matchedSlash) {
  14370. start = i + 1;
  14371. break;
  14372. }
  14373. } else if (end === -1) {
  14374. // We saw the first non-path separator, mark this as the end of our
  14375. // path component
  14376. matchedSlash = false;
  14377. end = i + 1;
  14378. }
  14379. }
  14380. if (end === -1) return '';
  14381. return path.slice(start, end);
  14382. }
  14383. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  14384. // in new Node.js versions, so only basename() above is backported here
  14385. exports.basename = function (path, ext) {
  14386. var f = basename(path);
  14387. if (ext && f.substr(-1 * ext.length) === ext) {
  14388. f = f.substr(0, f.length - ext.length);
  14389. }
  14390. return f;
  14391. };
  14392. exports.extname = function (path) {
  14393. if (typeof path !== 'string') path = path + '';
  14394. var startDot = -1;
  14395. var startPart = 0;
  14396. var end = -1;
  14397. var matchedSlash = true;
  14398. // Track the state of characters (if any) we see before our first dot and
  14399. // after any path separator we find
  14400. var preDotState = 0;
  14401. for (var i = path.length - 1; i >= 0; --i) {
  14402. var code = path.charCodeAt(i);
  14403. if (code === 47 /*/*/) {
  14404. // If we reached a path separator that was not part of a set of path
  14405. // separators at the end of the string, stop now
  14406. if (!matchedSlash) {
  14407. startPart = i + 1;
  14408. break;
  14409. }
  14410. continue;
  14411. }
  14412. if (end === -1) {
  14413. // We saw the first non-path separator, mark this as the end of our
  14414. // extension
  14415. matchedSlash = false;
  14416. end = i + 1;
  14417. }
  14418. if (code === 46 /*.*/) {
  14419. // If this is our first dot, mark it as the start of our extension
  14420. if (startDot === -1)
  14421. startDot = i;
  14422. else if (preDotState !== 1)
  14423. preDotState = 1;
  14424. } else if (startDot !== -1) {
  14425. // We saw a non-dot and non-path separator before our dot, so we should
  14426. // have a good chance at having a non-empty extension
  14427. preDotState = -1;
  14428. }
  14429. }
  14430. if (startDot === -1 || end === -1 ||
  14431. // We saw a non-dot character immediately before the dot
  14432. preDotState === 0 ||
  14433. // The (right-most) trimmed path component is exactly '..'
  14434. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  14435. return '';
  14436. }
  14437. return path.slice(startDot, end);
  14438. };
  14439. function filter (xs, f) {
  14440. if (xs.filter) return xs.filter(f);
  14441. var res = [];
  14442. for (var i = 0; i < xs.length; i++) {
  14443. if (f(xs[i], i, xs)) res.push(xs[i]);
  14444. }
  14445. return res;
  14446. }
  14447. // String.prototype.substr - negative index don't work in IE8
  14448. var substr = 'ab'.substr(-1) === 'b'
  14449. ? function (str, start, len) { return str.substr(start, len) }
  14450. : function (str, start, len) {
  14451. if (start < 0) start = str.length + start;
  14452. return str.substr(start, len);
  14453. }
  14454. ;
  14455. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 396)))
  14456. /***/ }),
  14457. /***/ 4:
  14458. /*!**********************************************************************!*\
  14459. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  14460. \**********************************************************************/
  14461. /*! no static exports found */
  14462. /***/ (function(module, exports) {
  14463. function _interopRequireDefault(obj) {
  14464. return obj && obj.__esModule ? obj : {
  14465. "default": obj
  14466. };
  14467. }
  14468. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14469. /***/ }),
  14470. /***/ 40:
  14471. /*!***********************************!*\
  14472. !*** (webpack)/buildin/module.js ***!
  14473. \***********************************/
  14474. /*! no static exports found */
  14475. /***/ (function(module, exports) {
  14476. module.exports = function(module) {
  14477. if (!module.webpackPolyfill) {
  14478. module.deprecate = function() {};
  14479. module.paths = [];
  14480. // module.parent = undefined by default
  14481. if (!module.children) module.children = [];
  14482. Object.defineProperty(module, "loaded", {
  14483. enumerable: true,
  14484. get: function() {
  14485. return module.l;
  14486. }
  14487. });
  14488. Object.defineProperty(module, "id", {
  14489. enumerable: true,
  14490. get: function() {
  14491. return module.i;
  14492. }
  14493. });
  14494. module.webpackPolyfill = 1;
  14495. }
  14496. return module;
  14497. };
  14498. /***/ }),
  14499. /***/ 41:
  14500. /*!****************************************!*\
  14501. !*** (webpack)/buildin/amd-options.js ***!
  14502. \****************************************/
  14503. /*! no static exports found */
  14504. /***/ (function(module, exports) {
  14505. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  14506. module.exports = __webpack_amd_options__;
  14507. /* WEBPACK VAR INJECTION */}.call(this, {}))
  14508. /***/ }),
  14509. /***/ 42:
  14510. /*!****************************************************!*\
  14511. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/index.js ***!
  14512. \****************************************************/
  14513. /*! no static exports found */
  14514. /***/ (function(module, exports, __webpack_require__) {
  14515. "use strict";
  14516. /* WEBPACK VAR INJECTION */(function(uni) {
  14517. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14518. Object.defineProperty(exports, "__esModule", {
  14519. value: true
  14520. });
  14521. exports.default = void 0;
  14522. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 43));
  14523. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 44));
  14524. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 48));
  14525. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 49));
  14526. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 53));
  14527. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 54));
  14528. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 55));
  14529. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 56));
  14530. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 57));
  14531. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 58));
  14532. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 59));
  14533. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 46));
  14534. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 45));
  14535. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 60));
  14536. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 47));
  14537. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 61));
  14538. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 62));
  14539. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 63));
  14540. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 64));
  14541. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 65));
  14542. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 66);
  14543. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 67));
  14544. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 68));
  14545. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 69));
  14546. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 70));
  14547. // 引入全局mixin
  14548. // 引入关于是否mixin集成小程序分享的配置
  14549. // import wxshare from './libs/mixin/mpShare.js'
  14550. // 全局挂载引入http相关请求拦截插件
  14551. function wranning(str) {
  14552. // 开发环境进行信息输出,主要是一些报错信息
  14553. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  14554. // 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
  14555. if (true) {
  14556. console.warn(str);
  14557. }
  14558. }
  14559. // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  14560. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  14561. // let vuexStore = {};
  14562. // try {
  14563. // vuexStore = require("@/store/$u.mixin.js");
  14564. // } catch (e) {
  14565. // //TODO handle the exception
  14566. // }
  14567. // post类型对象参数转为get类型url参数
  14568. var $u = {
  14569. queryParams: _queryParams.default,
  14570. route: _route.default,
  14571. timeFormat: _timeFormat.default,
  14572. date: _timeFormat.default,
  14573. // 另名date
  14574. timeFrom: _timeFrom.default,
  14575. colorGradient: _colorGradient.default.colorGradient,
  14576. colorToRgba: _colorGradient.default.colorToRgba,
  14577. guid: _guid.default,
  14578. color: _color.default,
  14579. sys: _sys.sys,
  14580. os: _sys.os,
  14581. type2icon: _type2icon.default,
  14582. randomArray: _randomArray.default,
  14583. wranning: wranning,
  14584. get: _request.default.get,
  14585. post: _request.default.post,
  14586. put: _request.default.put,
  14587. 'delete': _request.default.delete,
  14588. hexToRgb: _colorGradient.default.hexToRgb,
  14589. rgbToHex: _colorGradient.default.rgbToHex,
  14590. test: _test.default,
  14591. random: _random.default,
  14592. deepClone: _deepClone.default,
  14593. deepMerge: _deepMerge.default,
  14594. getParent: _getParent.default,
  14595. $parent: _$parent.default,
  14596. addUnit: _addUnit.default,
  14597. trim: _trim.default,
  14598. type: ['primary', 'success', 'error', 'warning', 'info'],
  14599. http: _request.default,
  14600. toast: _toast.default,
  14601. config: _config.default,
  14602. // uView配置信息相关,比如版本号
  14603. zIndex: _zIndex.default,
  14604. debounce: _debounce.default,
  14605. throttle: _throttle.default
  14606. };
  14607. // $u挂载到uni对象上
  14608. uni.$u = $u;
  14609. var install = function install(Vue) {
  14610. Vue.mixin(_mixin.default);
  14611. if (Vue.prototype.openShare) {
  14612. Vue.mixin(mpShare);
  14613. }
  14614. // Vue.mixin(vuexStore);
  14615. // 时间格式化,同时两个名称,date和timeFormat
  14616. Vue.filter('timeFormat', function (timestamp, format) {
  14617. return (0, _timeFormat.default)(timestamp, format);
  14618. });
  14619. Vue.filter('date', function (timestamp, format) {
  14620. return (0, _timeFormat.default)(timestamp, format);
  14621. });
  14622. // 将多久以前的方法,注入到全局过滤器
  14623. Vue.filter('timeFrom', function (timestamp, format) {
  14624. return (0, _timeFrom.default)(timestamp, format);
  14625. });
  14626. Vue.prototype.$u = $u;
  14627. };
  14628. var _default = {
  14629. install: install
  14630. };
  14631. exports.default = _default;
  14632. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14633. /***/ }),
  14634. /***/ 43:
  14635. /*!***************************************************************!*\
  14636. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/mixin/mixin.js ***!
  14637. \***************************************************************/
  14638. /*! no static exports found */
  14639. /***/ (function(module, exports, __webpack_require__) {
  14640. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  14641. data: function data() {
  14642. return {};
  14643. },
  14644. onLoad: function onLoad() {
  14645. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  14646. this.$u.getRect = this.$uGetRect;
  14647. },
  14648. methods: {
  14649. // 查询节点信息
  14650. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  14651. // 解决办法为在组件根部再套一个没有任何作用的view元素
  14652. $uGetRect: function $uGetRect(selector, all) {
  14653. var _this = this;
  14654. return new Promise(function (resolve) {
  14655. uni.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  14656. if (all && Array.isArray(rect) && rect.length) {
  14657. resolve(rect);
  14658. }
  14659. if (!all && rect) {
  14660. resolve(rect);
  14661. }
  14662. }).exec();
  14663. });
  14664. },
  14665. getParentData: function getParentData() {
  14666. var _this2 = this;
  14667. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  14668. // 避免在created中去定义parent变量
  14669. if (!this.parent) this.parent = false;
  14670. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  14671. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  14672. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  14673. this.parent = this.$u.$parent.call(this, parentName);
  14674. if (this.parent) {
  14675. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  14676. Object.keys(this.parentData).map(function (key) {
  14677. _this2.parentData[key] = _this2.parent[key];
  14678. });
  14679. }
  14680. },
  14681. // 阻止事件冒泡
  14682. preventEvent: function preventEvent(e) {
  14683. e && e.stopPropagation && e.stopPropagation();
  14684. }
  14685. },
  14686. onReachBottom: function onReachBottom() {
  14687. uni.$emit('uOnReachBottom');
  14688. },
  14689. beforeDestroy: function beforeDestroy() {
  14690. var _this3 = this;
  14691. // 判断当前页面是否存在parent和children,一般在checkbox和checkbox-group父子联动的场景会有此情况
  14692. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  14693. if (this.parent && uni.$u.test.array(this.parent.children)) {
  14694. // 组件销毁时,移除父组件中的children数组中对应的实例
  14695. var childrenList = this.parent.children;
  14696. childrenList.map(function (child, index) {
  14697. // 如果相等,则移除
  14698. if (child === _this3) {
  14699. childrenList.splice(index, 1);
  14700. }
  14701. });
  14702. }
  14703. }
  14704. };
  14705. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14706. /***/ }),
  14707. /***/ 44:
  14708. /*!*****************************************************************!*\
  14709. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/request/index.js ***!
  14710. \*****************************************************************/
  14711. /*! no static exports found */
  14712. /***/ (function(module, exports, __webpack_require__) {
  14713. "use strict";
  14714. /* WEBPACK VAR INJECTION */(function(uni) {
  14715. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14716. Object.defineProperty(exports, "__esModule", {
  14717. value: true
  14718. });
  14719. exports.default = void 0;
  14720. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14721. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14722. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 45));
  14723. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 47));
  14724. var Request = /*#__PURE__*/function () {
  14725. function Request() {
  14726. var _this = this;
  14727. (0, _classCallCheck2.default)(this, Request);
  14728. this.config = {
  14729. baseUrl: '',
  14730. // 请求的根域名
  14731. // 默认的请求头
  14732. header: {},
  14733. method: 'POST',
  14734. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  14735. dataType: 'json',
  14736. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  14737. responseType: 'text',
  14738. showLoading: true,
  14739. // 是否显示请求中的loading
  14740. loadingText: '请求中...',
  14741. loadingTime: 800,
  14742. // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  14743. timer: null,
  14744. // 定时器
  14745. originalData: false,
  14746. // 是否在拦截器中返回服务端的原始数据,见文档说明
  14747. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  14748. };
  14749. // 拦截器
  14750. this.interceptor = {
  14751. // 请求前的拦截
  14752. request: null,
  14753. // 请求后的拦截
  14754. response: null
  14755. };
  14756. // get请求
  14757. this.get = function (url) {
  14758. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14759. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14760. return _this.request({
  14761. method: 'GET',
  14762. url: url,
  14763. header: header,
  14764. data: data
  14765. });
  14766. };
  14767. // post请求
  14768. this.post = function (url) {
  14769. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14770. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14771. return _this.request({
  14772. url: url,
  14773. method: 'POST',
  14774. header: header,
  14775. data: data
  14776. });
  14777. };
  14778. // put请求,不支持支付宝小程序(HX2.6.15)
  14779. this.put = function (url) {
  14780. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14781. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14782. return _this.request({
  14783. url: url,
  14784. method: 'PUT',
  14785. header: header,
  14786. data: data
  14787. });
  14788. };
  14789. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  14790. this.delete = function (url) {
  14791. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14792. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14793. return _this.request({
  14794. url: url,
  14795. method: 'DELETE',
  14796. header: header,
  14797. data: data
  14798. });
  14799. };
  14800. }
  14801. (0, _createClass2.default)(Request, [{
  14802. key: "setConfig",
  14803. value:
  14804. // 设置全局默认配置
  14805. function setConfig(customConfig) {
  14806. // 深度合并对象,否则会造成对象深层属性丢失
  14807. this.config = (0, _deepMerge.default)(this.config, customConfig);
  14808. }
  14809. // 主要请求部分
  14810. }, {
  14811. key: "request",
  14812. value: function request() {
  14813. var _this2 = this;
  14814. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14815. // 检查请求拦截
  14816. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  14817. var tmpConfig = {};
  14818. var interceptorRequest = this.interceptor.request(options);
  14819. if (interceptorRequest === false) {
  14820. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  14821. return new Promise(function () {});
  14822. }
  14823. this.options = interceptorRequest;
  14824. }
  14825. options.dataType = options.dataType || this.config.dataType;
  14826. options.responseType = options.responseType || this.config.responseType;
  14827. options.url = options.url || '';
  14828. options.params = options.params || {};
  14829. options.header = Object.assign({}, this.config.header, options.header);
  14830. options.method = options.method || this.config.method;
  14831. return new Promise(function (resolve, reject) {
  14832. options.complete = function (response) {
  14833. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  14834. uni.hideLoading();
  14835. // 清除定时器,如果请求回来了,就无需loading
  14836. clearTimeout(_this2.config.timer);
  14837. _this2.config.timer = null;
  14838. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  14839. if (_this2.config.originalData) {
  14840. // 判断是否存在拦截器
  14841. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14842. var resInterceptors = _this2.interceptor.response(response);
  14843. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  14844. if (resInterceptors !== false) {
  14845. resolve(resInterceptors);
  14846. } else {
  14847. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  14848. reject(response);
  14849. }
  14850. } else {
  14851. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  14852. resolve(response);
  14853. }
  14854. } else {
  14855. if (response.statusCode == 200) {
  14856. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14857. var _resInterceptors = _this2.interceptor.response(response.data);
  14858. if (_resInterceptors !== false) {
  14859. resolve(_resInterceptors);
  14860. } else {
  14861. reject(response.data);
  14862. }
  14863. } else {
  14864. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  14865. resolve(response.data);
  14866. }
  14867. } else {
  14868. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  14869. // if(response.errMsg) {
  14870. // uni.showModal({
  14871. // title: response.errMsg
  14872. // });
  14873. // }
  14874. reject(response);
  14875. }
  14876. }
  14877. };
  14878. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  14879. options.url = _test.default.url(options.url) ? options.url : _this2.config.baseUrl + (options.url.indexOf('/') == 0 ? options.url : '/' + options.url);
  14880. // 是否显示loading
  14881. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  14882. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  14883. if (_this2.config.showLoading && !_this2.config.timer) {
  14884. _this2.config.timer = setTimeout(function () {
  14885. uni.showLoading({
  14886. title: _this2.config.loadingText,
  14887. mask: _this2.config.loadingMask
  14888. });
  14889. _this2.config.timer = null;
  14890. }, _this2.config.loadingTime);
  14891. }
  14892. uni.request(options);
  14893. });
  14894. // .catch(res => {
  14895. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  14896. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  14897. // return new Promise(()=>{});
  14898. // })
  14899. }
  14900. }]);
  14901. return Request;
  14902. }();
  14903. var _default = new Request();
  14904. exports.default = _default;
  14905. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14906. /***/ }),
  14907. /***/ 45:
  14908. /*!**********************************************************************!*\
  14909. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/deepMerge.js ***!
  14910. \**********************************************************************/
  14911. /*! no static exports found */
  14912. /***/ (function(module, exports, __webpack_require__) {
  14913. "use strict";
  14914. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14915. Object.defineProperty(exports, "__esModule", {
  14916. value: true
  14917. });
  14918. exports.default = void 0;
  14919. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  14920. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 46));
  14921. // JS对象深度合并
  14922. function deepMerge() {
  14923. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14924. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14925. target = (0, _deepClone.default)(target);
  14926. if ((0, _typeof2.default)(target) !== 'object' || (0, _typeof2.default)(source) !== 'object') return false;
  14927. for (var prop in source) {
  14928. if (!source.hasOwnProperty(prop)) continue;
  14929. if (prop in target) {
  14930. if ((0, _typeof2.default)(target[prop]) !== 'object') {
  14931. target[prop] = source[prop];
  14932. } else {
  14933. if ((0, _typeof2.default)(source[prop]) !== 'object') {
  14934. target[prop] = source[prop];
  14935. } else {
  14936. if (target[prop].concat && source[prop].concat) {
  14937. target[prop] = target[prop].concat(source[prop]);
  14938. } else {
  14939. target[prop] = deepMerge(target[prop], source[prop]);
  14940. }
  14941. }
  14942. }
  14943. } else {
  14944. target[prop] = source[prop];
  14945. }
  14946. }
  14947. return target;
  14948. }
  14949. var _default = deepMerge;
  14950. exports.default = _default;
  14951. /***/ }),
  14952. /***/ 46:
  14953. /*!**********************************************************************!*\
  14954. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/deepClone.js ***!
  14955. \**********************************************************************/
  14956. /*! no static exports found */
  14957. /***/ (function(module, exports, __webpack_require__) {
  14958. "use strict";
  14959. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14960. Object.defineProperty(exports, "__esModule", {
  14961. value: true
  14962. });
  14963. exports.default = void 0;
  14964. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  14965. // 判断arr是否为一个数组,返回一个bool值
  14966. function isArray(arr) {
  14967. return Object.prototype.toString.call(arr) === '[object Array]';
  14968. }
  14969. // 深度克隆
  14970. function deepClone(obj) {
  14971. // 对常见的“非”值,直接返回原来值
  14972. if ([null, undefined, NaN, false].includes(obj)) return obj;
  14973. if ((0, _typeof2.default)(obj) !== "object" && typeof obj !== 'function') {
  14974. //原始类型直接返回
  14975. return obj;
  14976. }
  14977. var o = isArray(obj) ? [] : {};
  14978. for (var i in obj) {
  14979. if (obj.hasOwnProperty(i)) {
  14980. o[i] = (0, _typeof2.default)(obj[i]) === "object" ? deepClone(obj[i]) : obj[i];
  14981. }
  14982. }
  14983. return o;
  14984. }
  14985. var _default = deepClone;
  14986. exports.default = _default;
  14987. /***/ }),
  14988. /***/ 468:
  14989. /*!***********************************************************************************!*\
  14990. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/MpHtmlParser.js ***!
  14991. \***********************************************************************************/
  14992. /*! no static exports found */
  14993. /***/ (function(module, exports, __webpack_require__) {
  14994. /* WEBPACK VAR INJECTION */(function(uni) {/**
  14995. * html 解析器
  14996. * @tutorial https://github.com/jin-yufeng/Parser
  14997. * @version 20201029
  14998. * @author JinYufeng
  14999. * @listens MIT
  15000. */
  15001. var cfg = __webpack_require__(/*! ./config.js */ 469),
  15002. blankChar = cfg.blankChar,
  15003. CssHandler = __webpack_require__(/*! ./CssHandler.js */ 470),
  15004. windowWidth = uni.getSystemInfoSync().windowWidth;
  15005. var emoji;
  15006. function MpHtmlParser(data) {
  15007. var _this = this;
  15008. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15009. this.attrs = {};
  15010. this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
  15011. this.data = data;
  15012. this.domain = options.domain;
  15013. this.DOM = [];
  15014. this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
  15015. options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
  15016. this.options = options;
  15017. this.state = this.Text;
  15018. this.STACK = [];
  15019. // 工具函数
  15020. this.bubble = function () {
  15021. for (var i = _this.STACK.length, item; item = _this.STACK[--i];) {
  15022. if (cfg.richOnlyTags[item.name]) return false;
  15023. item.c = 1;
  15024. }
  15025. return true;
  15026. };
  15027. this.decode = function (val, amp) {
  15028. var i = -1,
  15029. j,
  15030. en;
  15031. while (1) {
  15032. if ((i = val.indexOf('&', i + 1)) == -1) break;
  15033. if ((j = val.indexOf(';', i + 2)) == -1) break;
  15034. if (val[i + 1] == '#') {
  15035. en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
  15036. if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
  15037. } else {
  15038. en = val.substring(i + 1, j);
  15039. if (cfg.entities[en] || en == amp) val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
  15040. }
  15041. }
  15042. return val;
  15043. };
  15044. this.getUrl = function (url) {
  15045. if (url[0] == '/') {
  15046. if (url[1] == '/') url = _this.options.prot + ':' + url;else if (_this.domain) url = _this.domain + url;
  15047. } else if (_this.domain && url.indexOf('data:') != 0 && !url.includes('://')) url = _this.domain + '/' + url;
  15048. return url;
  15049. };
  15050. this.isClose = function () {
  15051. return _this.data[_this.i] == '>' || _this.data[_this.i] == '/' && _this.data[_this.i + 1] == '>';
  15052. };
  15053. this.section = function () {
  15054. return _this.data.substring(_this.start, _this.i);
  15055. };
  15056. this.parent = function () {
  15057. return _this.STACK[_this.STACK.length - 1];
  15058. };
  15059. this.siblings = function () {
  15060. return _this.STACK.length ? _this.parent().children : _this.DOM;
  15061. };
  15062. }
  15063. MpHtmlParser.prototype.parse = function () {
  15064. if (emoji) this.data = emoji.parseEmoji(this.data);
  15065. for (var c; c = this.data[this.i]; this.i++) {
  15066. this.state(c);
  15067. }
  15068. if (this.state == this.Text) this.setText();
  15069. while (this.STACK.length) {
  15070. this.popNode(this.STACK.pop());
  15071. }
  15072. return this.DOM;
  15073. };
  15074. // 设置属性
  15075. MpHtmlParser.prototype.setAttr = function () {
  15076. var name = this.attrName.toLowerCase(),
  15077. val = this.attrVal;
  15078. if (cfg.boolAttrs[name]) this.attrs[name] = 'T';else if (val) {
  15079. if (name == 'src' || name == 'data-src' && !this.attrs.src) this.attrs.src = this.getUrl(this.decode(val, 'amp'));else if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp');else if (name.substr(0, 5) != 'data-') this.attrs[name] = val;
  15080. }
  15081. this.attrVal = '';
  15082. while (blankChar[this.data[this.i]]) {
  15083. this.i++;
  15084. }
  15085. if (this.isClose()) this.setNode();else {
  15086. this.start = this.i;
  15087. this.state = this.AttrName;
  15088. }
  15089. };
  15090. // 设置文本节点
  15091. MpHtmlParser.prototype.setText = function () {
  15092. var back,
  15093. text = this.section();
  15094. if (!text) return;
  15095. text = cfg.onText && cfg.onText(text, function () {
  15096. return back = true;
  15097. }) || text;
  15098. if (back) {
  15099. this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
  15100. var j = this.start + text.length;
  15101. for (this.i = this.start; this.i < j; this.i++) {
  15102. this.state(this.data[this.i]);
  15103. }
  15104. return;
  15105. }
  15106. if (!this.pre) {
  15107. // 合并空白符
  15108. var flag,
  15109. tmp = [];
  15110. for (var i = text.length, c; c = text[--i];) {
  15111. if (!blankChar[c]) {
  15112. tmp.unshift(c);
  15113. if (!flag) flag = 1;
  15114. } else {
  15115. if (tmp[0] != ' ') tmp.unshift(' ');
  15116. if (c == '\n' && flag == void 0) flag = 0;
  15117. }
  15118. }
  15119. if (flag == 0) return;
  15120. text = tmp.join('');
  15121. }
  15122. this.siblings().push({
  15123. type: 'text',
  15124. text: this.decode(text)
  15125. });
  15126. };
  15127. // 设置元素节点
  15128. MpHtmlParser.prototype.setNode = function () {
  15129. var node = {
  15130. name: this.tagName.toLowerCase(),
  15131. attrs: this.attrs
  15132. },
  15133. close = cfg.selfClosingTags[node.name];
  15134. if (this.options.nodes.length) node.type = 'node';
  15135. this.attrs = {};
  15136. if (!cfg.ignoreTags[node.name]) {
  15137. // 处理属性
  15138. var attrs = node.attrs,
  15139. style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
  15140. styleObj = {};
  15141. if (attrs.id) {
  15142. if (this.options.compress & 1) attrs.id = void 0;else if (this.options.useAnchor) this.bubble();
  15143. }
  15144. if (this.options.compress & 2 && attrs.class) attrs.class = void 0;
  15145. switch (node.name) {
  15146. case 'a':
  15147. case 'ad':
  15148. this.bubble();
  15149. break;
  15150. case 'font':
  15151. if (attrs.color) {
  15152. styleObj['color'] = attrs.color;
  15153. attrs.color = void 0;
  15154. }
  15155. if (attrs.face) {
  15156. styleObj['font-family'] = attrs.face;
  15157. attrs.face = void 0;
  15158. }
  15159. if (attrs.size) {
  15160. var size = parseInt(attrs.size);
  15161. if (size < 1) size = 1;else if (size > 7) size = 7;
  15162. var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  15163. styleObj['font-size'] = map[size - 1];
  15164. attrs.size = void 0;
  15165. }
  15166. break;
  15167. case 'embed':
  15168. var src = node.attrs.src || '',
  15169. type = node.attrs.type || '';
  15170. if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8')) node.name = 'video';else if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes('.aac')) node.name = 'audio';else break;
  15171. if (node.attrs.autostart) node.attrs.autoplay = 'T';
  15172. node.attrs.controls = 'T';
  15173. case 'video':
  15174. case 'audio':
  15175. if (!attrs.id) attrs.id = node.name + ++this["".concat(node.name, "Num")];else this["".concat(node.name, "Num")]++;
  15176. if (node.name == 'video') {
  15177. if (this.videoNum > 3) node.lazyLoad = 1;
  15178. if (attrs.width) {
  15179. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  15180. attrs.width = void 0;
  15181. }
  15182. if (attrs.height) {
  15183. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  15184. attrs.height = void 0;
  15185. }
  15186. }
  15187. if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
  15188. attrs.source = [];
  15189. if (attrs.src) {
  15190. attrs.source.push(attrs.src);
  15191. attrs.src = void 0;
  15192. }
  15193. this.bubble();
  15194. break;
  15195. case 'td':
  15196. case 'th':
  15197. if (attrs.colspan || attrs.rowspan) for (var k = this.STACK.length, item; item = this.STACK[--k];) {
  15198. if (item.name == 'table') {
  15199. item.flag = 1;
  15200. break;
  15201. }
  15202. }
  15203. }
  15204. if (attrs.align) {
  15205. if (node.name == 'table') {
  15206. if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';else styleObj['float'] = attrs.align;
  15207. } else styleObj['text-align'] = attrs.align;
  15208. attrs.align = void 0;
  15209. }
  15210. // 压缩 style
  15211. var styles = style.split(';');
  15212. style = '';
  15213. for (var i = 0, len = styles.length; i < len; i++) {
  15214. var info = styles[i].split(':');
  15215. if (info.length < 2) continue;
  15216. var _key = info[0].trim().toLowerCase(),
  15217. _value = info.slice(1).join(':').trim();
  15218. if (_value[0] == '-' || _value.includes('safe')) style += ";".concat(_key, ":").concat(_value);else if (!styleObj[_key] || _value.includes('import') || !styleObj[_key].includes('import')) styleObj[_key] = _value;
  15219. }
  15220. if (node.name == 'img') {
  15221. if (attrs.src && !attrs.ignore) {
  15222. if (this.bubble()) attrs.i = (this.imgNum++).toString();else attrs.ignore = 'T';
  15223. }
  15224. if (attrs.ignore) {
  15225. style += ';-webkit-touch-callout:none';
  15226. styleObj['max-width'] = '100%';
  15227. }
  15228. var width;
  15229. if (styleObj.width) width = styleObj.width;else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px';
  15230. if (width) {
  15231. styleObj.width = width;
  15232. attrs.width = '100%';
  15233. if (parseInt(width) > windowWidth) {
  15234. styleObj.height = '';
  15235. if (attrs.height) attrs.height = void 0;
  15236. }
  15237. }
  15238. if (styleObj.height) {
  15239. attrs.height = styleObj.height;
  15240. styleObj.height = '';
  15241. } else if (attrs.height && !attrs.height.includes('%')) attrs.height = parseFloat(attrs.height) + 'px';
  15242. }
  15243. for (var key in styleObj) {
  15244. var value = styleObj[key];
  15245. if (!value) continue;
  15246. if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
  15247. // 填充链接
  15248. if (value.includes('url')) {
  15249. var j = value.indexOf('(');
  15250. if (j++ != -1) {
  15251. while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {
  15252. j++;
  15253. }
  15254. value = value.substr(0, j) + this.getUrl(value.substr(j));
  15255. }
  15256. }
  15257. // 转换 rpx
  15258. else if (value.includes('rpx')) value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  15259. return parseFloat($) * windowWidth / 750 + 'px';
  15260. });else if (key == 'white-space' && value.includes('pre') && !close) this.pre = node.pre = true;
  15261. style += ";".concat(key, ":").concat(value);
  15262. }
  15263. style = style.substr(1);
  15264. if (style) attrs.style = style;
  15265. if (!close) {
  15266. node.children = [];
  15267. if (node.name == 'pre' && cfg.highlight) {
  15268. this.remove(node);
  15269. this.pre = node.pre = true;
  15270. }
  15271. this.siblings().push(node);
  15272. this.STACK.push(node);
  15273. } else if (!cfg.filter || cfg.filter(node, this) != false) this.siblings().push(node);
  15274. } else {
  15275. if (!close) this.remove(node);else if (node.name == 'source') {
  15276. var parent = this.parent();
  15277. if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) parent.attrs.source.push(node.attrs.src);
  15278. } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
  15279. }
  15280. if (this.data[this.i] == '/') this.i++;
  15281. this.start = this.i + 1;
  15282. this.state = this.Text;
  15283. };
  15284. // 移除标签
  15285. MpHtmlParser.prototype.remove = function (node) {
  15286. var _this2 = this;
  15287. var name = node.name,
  15288. j = this.i;
  15289. // 处理 svg
  15290. var handleSvg = function handleSvg() {
  15291. var src = _this2.data.substring(j, _this2.i + 1);
  15292. node.attrs.xmlns = 'http://www.w3.org/2000/svg';
  15293. for (var key in node.attrs) {
  15294. if (key == 'viewbox') src = " viewBox=\"".concat(node.attrs.viewbox, "\"") + src;else if (key != 'style') src = " ".concat(key, "=\"").concat(node.attrs[key], "\"") + src;
  15295. }
  15296. src = '<svg' + src;
  15297. var parent = _this2.parent();
  15298. if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
  15299. _this2.siblings().push({
  15300. name: 'img',
  15301. attrs: {
  15302. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  15303. style: node.attrs.style,
  15304. ignore: 'T'
  15305. }
  15306. });
  15307. };
  15308. if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
  15309. while (1) {
  15310. if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
  15311. if (name == 'pre' || name == 'svg') this.i = j;else this.i = this.data.length;
  15312. return;
  15313. }
  15314. this.start = this.i += 2;
  15315. while (!blankChar[this.data[this.i]] && !this.isClose()) {
  15316. this.i++;
  15317. }
  15318. if (this.section().toLowerCase() == name) {
  15319. // 代码块高亮
  15320. if (name == 'pre') {
  15321. this.data = this.data.substr(0, j + 1) + cfg.highlight(this.data.substring(j + 1, this.i - 5), node.attrs) + this.data.substr(this.i - 5);
  15322. return this.i = j;
  15323. } else if (name == 'style') this.CssHandler.getStyle(this.data.substring(j + 1, this.i - 7));else if (name == 'title') this.DOM.title = this.data.substring(j + 1, this.i - 7);
  15324. if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
  15325. if (name == 'svg') handleSvg();
  15326. return;
  15327. }
  15328. }
  15329. };
  15330. // 节点出栈处理
  15331. MpHtmlParser.prototype.popNode = function (node) {
  15332. // 空白符处理
  15333. if (node.pre) {
  15334. node.pre = this.pre = void 0;
  15335. for (var i = this.STACK.length; i--;) {
  15336. if (this.STACK[i].pre) this.pre = true;
  15337. }
  15338. }
  15339. var siblings = this.siblings(),
  15340. len = siblings.length,
  15341. childs = node.children;
  15342. if (node.name == 'head' || cfg.filter && cfg.filter(node, this) == false) return siblings.pop();
  15343. var attrs = node.attrs;
  15344. // 替换一些标签名
  15345. if (cfg.blockTags[node.name]) node.name = 'div';else if (!cfg.trustTags[node.name]) node.name = 'span';
  15346. // 处理列表
  15347. if (node.c && (node.name == 'ul' || node.name == 'ol')) {
  15348. if ((node.attrs.style || '').includes('list-style:none')) {
  15349. for (var _i = 0, child; child = childs[_i++];) {
  15350. if (child.name == 'li') child.name = 'div';
  15351. }
  15352. } else if (node.name == 'ul') {
  15353. var floor = 1;
  15354. for (var _i2 = this.STACK.length; _i2--;) {
  15355. if (this.STACK[_i2].name == 'ul') floor++;
  15356. }
  15357. if (floor != 1) for (var _i3 = childs.length; _i3--;) {
  15358. childs[_i3].floor = floor;
  15359. }
  15360. } else {
  15361. for (var _i4 = 0, num = 1, _child; _child = childs[_i4++];) {
  15362. if (_child.name == 'li') {
  15363. _child.type = 'ol';
  15364. _child.num = function (num, type) {
  15365. if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
  15366. if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
  15367. if (type == 'i' || type == 'I') {
  15368. num = (num - 1) % 99 + 1;
  15369. var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
  15370. ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
  15371. res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
  15372. if (type == 'i') return res.toLowerCase();
  15373. return res;
  15374. }
  15375. return num;
  15376. }(num++, attrs.type) + '.';
  15377. }
  15378. }
  15379. }
  15380. }
  15381. // 处理表格
  15382. if (node.name == 'table') {
  15383. var padding = parseFloat(attrs.cellpadding),
  15384. spacing = parseFloat(attrs.cellspacing),
  15385. border = parseFloat(attrs.border);
  15386. if (node.c) {
  15387. if (isNaN(padding)) padding = 2;
  15388. if (isNaN(spacing)) spacing = 2;
  15389. }
  15390. if (border) attrs.style = "border:".concat(border, "px solid gray;").concat(attrs.style || '');
  15391. if (node.flag && node.c) {
  15392. // 有 colspan 或 rowspan 且含有链接的表格转为 grid 布局实现
  15393. attrs.style = "".concat(attrs.style || '', ";").concat(spacing ? ";grid-gap:".concat(spacing, "px") : ';border-left:0;border-top:0');
  15394. var row = 1,
  15395. col = 1,
  15396. colNum,
  15397. trs = [],
  15398. children = [],
  15399. map = {};
  15400. (function f(ns) {
  15401. for (var i = 0; i < ns.length; i++) {
  15402. if (ns[i].name == 'tr') trs.push(ns[i]);else f(ns[i].children || []);
  15403. }
  15404. })(node.children);
  15405. for (var _i5 = 0; _i5 < trs.length; _i5++) {
  15406. for (var j = 0, td; td = trs[_i5].children[j]; j++) {
  15407. if (td.name == 'td' || td.name == 'th') {
  15408. while (map[row + '.' + col]) {
  15409. col++;
  15410. }
  15411. var cell = {
  15412. name: 'div',
  15413. c: 1,
  15414. attrs: {
  15415. style: (td.attrs.style || '') + (border ? ";border:".concat(border, "px solid gray") + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? ";padding:".concat(padding, "px") : '')
  15416. },
  15417. children: td.children
  15418. };
  15419. if (td.attrs.colspan) {
  15420. cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan));
  15421. if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1);
  15422. col += parseInt(td.attrs.colspan) - 1;
  15423. }
  15424. if (td.attrs.rowspan) {
  15425. cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan));
  15426. if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1);
  15427. for (var k = 1; k < td.attrs.rowspan; k++) {
  15428. map[row + k + '.' + col] = 1;
  15429. }
  15430. }
  15431. children.push(cell);
  15432. col++;
  15433. }
  15434. }
  15435. if (!colNum) {
  15436. colNum = col - 1;
  15437. attrs.style += ";grid-template-columns:repeat(".concat(colNum, ",auto)");
  15438. }
  15439. col = 1;
  15440. row++;
  15441. }
  15442. node.children = children;
  15443. } else {
  15444. attrs.style = "border-spacing:".concat(spacing, "px;").concat(attrs.style || '');
  15445. if (border || padding) (function f(ns) {
  15446. for (var i = 0, n; n = ns[i]; i++) {
  15447. if (n.name == 'th' || n.name == 'td') {
  15448. if (border) n.attrs.style = "border:".concat(border, "px solid gray;").concat(n.attrs.style || '');
  15449. if (padding) n.attrs.style = "padding:".concat(padding, "px;").concat(n.attrs.style || '');
  15450. } else f(n.children || []);
  15451. }
  15452. })(childs);
  15453. }
  15454. if (this.options.autoscroll) {
  15455. var table = Object.assign({}, node);
  15456. node.name = 'div';
  15457. node.attrs = {
  15458. style: 'overflow:scroll'
  15459. };
  15460. node.children = [table];
  15461. }
  15462. }
  15463. this.CssHandler.pop && this.CssHandler.pop(node);
  15464. // 自动压缩
  15465. if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') siblings[len - 1] = childs[0];
  15466. };
  15467. // 状态机
  15468. MpHtmlParser.prototype.Text = function (c) {
  15469. if (c == '<') {
  15470. var next = this.data[this.i + 1],
  15471. isLetter = function isLetter(c) {
  15472. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15473. };
  15474. if (isLetter(next)) {
  15475. this.setText();
  15476. this.start = this.i + 1;
  15477. this.state = this.TagName;
  15478. } else if (next == '/') {
  15479. this.setText();
  15480. if (isLetter(this.data[++this.i + 1])) {
  15481. this.start = this.i + 1;
  15482. this.state = this.EndTag;
  15483. } else this.Comment();
  15484. } else if (next == '!' || next == '?') {
  15485. this.setText();
  15486. this.Comment();
  15487. }
  15488. }
  15489. };
  15490. MpHtmlParser.prototype.Comment = function () {
  15491. var key;
  15492. if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->';else if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>';else key = '>';
  15493. if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;else this.i += key.length - 1;
  15494. this.start = this.i + 1;
  15495. this.state = this.Text;
  15496. };
  15497. MpHtmlParser.prototype.TagName = function (c) {
  15498. if (blankChar[c]) {
  15499. this.tagName = this.section();
  15500. while (blankChar[this.data[this.i]]) {
  15501. this.i++;
  15502. }
  15503. if (this.isClose()) this.setNode();else {
  15504. this.start = this.i;
  15505. this.state = this.AttrName;
  15506. }
  15507. } else if (this.isClose()) {
  15508. this.tagName = this.section();
  15509. this.setNode();
  15510. }
  15511. };
  15512. MpHtmlParser.prototype.AttrName = function (c) {
  15513. if (c == '=' || blankChar[c] || this.isClose()) {
  15514. this.attrName = this.section();
  15515. if (blankChar[c]) while (blankChar[this.data[++this.i]]) {
  15516. ;
  15517. }
  15518. if (this.data[this.i] == '=') {
  15519. while (blankChar[this.data[++this.i]]) {
  15520. ;
  15521. }
  15522. this.start = this.i--;
  15523. this.state = this.AttrValue;
  15524. } else this.setAttr();
  15525. }
  15526. };
  15527. MpHtmlParser.prototype.AttrValue = function (c) {
  15528. if (c == '"' || c == "'") {
  15529. this.start++;
  15530. if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
  15531. this.attrVal = this.section();
  15532. this.i++;
  15533. } else {
  15534. for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++) {
  15535. ;
  15536. }
  15537. this.attrVal = this.section();
  15538. }
  15539. this.setAttr();
  15540. };
  15541. MpHtmlParser.prototype.EndTag = function (c) {
  15542. if (blankChar[c] || c == '>' || c == '/') {
  15543. var name = this.section().toLowerCase();
  15544. for (var i = this.STACK.length; i--;) {
  15545. if (this.STACK[i].name == name) break;
  15546. }
  15547. if (i != -1) {
  15548. var node;
  15549. while ((node = this.STACK.pop()).name != name) {
  15550. this.popNode(node);
  15551. }
  15552. this.popNode(node);
  15553. } else if (name == 'p' || name == 'br') this.siblings().push({
  15554. name: name,
  15555. attrs: {}
  15556. });
  15557. this.i = this.data.indexOf('>', this.i);
  15558. this.start = this.i + 1;
  15559. if (this.i == -1) this.i = this.data.length;else this.state = this.Text;
  15560. }
  15561. };
  15562. module.exports = MpHtmlParser;
  15563. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  15564. /***/ }),
  15565. /***/ 469:
  15566. /*!*****************************************************************************!*\
  15567. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/config.js ***!
  15568. \*****************************************************************************/
  15569. /*! no static exports found */
  15570. /***/ (function(module, exports, __webpack_require__) {
  15571. /* WEBPACK VAR INJECTION */(function(wx) {/* 配置文件 */
  15572. var cfg = {
  15573. // 出错占位图
  15574. errorImg: null,
  15575. // 过滤器函数
  15576. filter: null,
  15577. // 代码高亮函数
  15578. highlight: null,
  15579. // 文本处理函数
  15580. onText: null,
  15581. // 实体编码列表
  15582. entities: {
  15583. quot: '"',
  15584. apos: "'",
  15585. semi: ';',
  15586. nbsp: '\xA0',
  15587. ensp: "\u2002",
  15588. emsp: "\u2003",
  15589. ndash: '–',
  15590. mdash: '—',
  15591. middot: '·',
  15592. lsquo: '‘',
  15593. rsquo: '’',
  15594. ldquo: '“',
  15595. rdquo: '”',
  15596. bull: '•',
  15597. hellip: '…'
  15598. },
  15599. blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
  15600. boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
  15601. // 块级标签,将被转为 div
  15602. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  15603. // 将被移除的标签
  15604. ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
  15605. // 只能被 rich-text 显示的标签
  15606. richOnlyTags: makeMap('a,colgroup,fieldset,legend'),
  15607. // 自闭合的标签
  15608. selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  15609. // 信任的标签
  15610. 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,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
  15611. // 默认的标签样式
  15612. userAgentStyles: {
  15613. address: 'font-style:italic',
  15614. big: 'display:inline;font-size:1.2em',
  15615. blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
  15616. caption: 'display:table-caption;text-align:center',
  15617. center: 'text-align:center',
  15618. cite: 'font-style:italic',
  15619. dd: 'margin-left:40px',
  15620. mark: 'background-color:yellow',
  15621. pre: 'font-family:monospace;white-space:pre;overflow:scroll',
  15622. s: 'text-decoration:line-through',
  15623. small: 'display:inline;font-size:0.8em',
  15624. u: 'text-decoration:underline'
  15625. }
  15626. };
  15627. function makeMap(str) {
  15628. var map = Object.create(null),
  15629. list = str.split(',');
  15630. for (var i = list.length; i--;) {
  15631. map[list[i]] = true;
  15632. }
  15633. return map;
  15634. }
  15635. if (wx.canIUse('editor')) {
  15636. cfg.blockTags.pre = void 0;
  15637. cfg.ignoreTags.rp = true;
  15638. Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
  15639. Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
  15640. }
  15641. module.exports = cfg;
  15642. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  15643. /***/ }),
  15644. /***/ 47:
  15645. /*!*****************************************************************!*\
  15646. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/test.js ***!
  15647. \*****************************************************************/
  15648. /*! no static exports found */
  15649. /***/ (function(module, exports, __webpack_require__) {
  15650. "use strict";
  15651. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15652. Object.defineProperty(exports, "__esModule", {
  15653. value: true
  15654. });
  15655. exports.default = void 0;
  15656. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  15657. /**
  15658. * 验证电子邮箱格式
  15659. */
  15660. function email(value) {
  15661. return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
  15662. }
  15663. /**
  15664. * 验证手机格式
  15665. */
  15666. function mobile(value) {
  15667. return /^1[3-9]\d{9}$/.test(value);
  15668. }
  15669. /**
  15670. * 验证URL格式
  15671. */
  15672. function url(value) {
  15673. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  15674. }
  15675. /**
  15676. * 验证日期格式
  15677. */
  15678. function date(value) {
  15679. return !/Invalid|NaN/.test(new Date(value).toString());
  15680. }
  15681. /**
  15682. * 验证ISO类型的日期格式
  15683. */
  15684. function dateISO(value) {
  15685. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  15686. }
  15687. /**
  15688. * 验证十进制数字
  15689. */
  15690. function number(value) {
  15691. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  15692. }
  15693. /**
  15694. * 验证整数
  15695. */
  15696. function digits(value) {
  15697. return /^\d+$/.test(value);
  15698. }
  15699. /**
  15700. * 验证身份证号码
  15701. */
  15702. function idCard(value) {
  15703. 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);
  15704. }
  15705. /**
  15706. * 是否车牌号
  15707. */
  15708. function carNo(value) {
  15709. // 新能源车牌
  15710. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  15711. // 旧车牌
  15712. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  15713. if (value.length === 7) {
  15714. return creg.test(value);
  15715. } else if (value.length === 8) {
  15716. return xreg.test(value);
  15717. } else {
  15718. return false;
  15719. }
  15720. }
  15721. /**
  15722. * 金额,只允许2位小数
  15723. */
  15724. function amount(value) {
  15725. //金额,只允许保留两位小数
  15726. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  15727. }
  15728. /**
  15729. * 中文
  15730. */
  15731. function chinese(value) {
  15732. var reg = /^[\u4e00-\u9fa5]+$/gi;
  15733. return reg.test(value);
  15734. }
  15735. /**
  15736. * 只能输入字母
  15737. */
  15738. function letter(value) {
  15739. return /^[a-zA-Z]*$/.test(value);
  15740. }
  15741. /**
  15742. * 只能是字母或者数字
  15743. */
  15744. function enOrNum(value) {
  15745. //英文或者数字
  15746. var reg = /^[0-9a-zA-Z]*$/g;
  15747. return reg.test(value);
  15748. }
  15749. /**
  15750. * 验证是否包含某个值
  15751. */
  15752. function contains(value, param) {
  15753. return value.indexOf(param) >= 0;
  15754. }
  15755. /**
  15756. * 验证一个值范围[min, max]
  15757. */
  15758. function range(value, param) {
  15759. return value >= param[0] && value <= param[1];
  15760. }
  15761. /**
  15762. * 验证一个长度范围[min, max]
  15763. */
  15764. function rangeLength(value, param) {
  15765. return value.length >= param[0] && value.length <= param[1];
  15766. }
  15767. /**
  15768. * 是否固定电话
  15769. */
  15770. function landline(value) {
  15771. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  15772. return reg.test(value);
  15773. }
  15774. /**
  15775. * 判断是否为空
  15776. */
  15777. function empty(value) {
  15778. switch ((0, _typeof2.default)(value)) {
  15779. case 'undefined':
  15780. return true;
  15781. case 'string':
  15782. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  15783. break;
  15784. case 'boolean':
  15785. if (!value) return true;
  15786. break;
  15787. case 'number':
  15788. if (0 === value || isNaN(value)) return true;
  15789. break;
  15790. case 'object':
  15791. if (null === value || value.length === 0) return true;
  15792. for (var i in value) {
  15793. return false;
  15794. }
  15795. return true;
  15796. }
  15797. return false;
  15798. }
  15799. /**
  15800. * 是否json字符串
  15801. */
  15802. function jsonString(value) {
  15803. if (typeof value == 'string') {
  15804. try {
  15805. var obj = JSON.parse(value);
  15806. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  15807. return true;
  15808. } else {
  15809. return false;
  15810. }
  15811. } catch (e) {
  15812. return false;
  15813. }
  15814. }
  15815. return false;
  15816. }
  15817. /**
  15818. * 是否数组
  15819. */
  15820. function array(value) {
  15821. if (typeof Array.isArray === "function") {
  15822. return Array.isArray(value);
  15823. } else {
  15824. return Object.prototype.toString.call(value) === "[object Array]";
  15825. }
  15826. }
  15827. /**
  15828. * 是否对象
  15829. */
  15830. function object(value) {
  15831. return Object.prototype.toString.call(value) === '[object Object]';
  15832. }
  15833. /**
  15834. * 是否短信验证码
  15835. */
  15836. function code(value) {
  15837. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  15838. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  15839. }
  15840. var _default = {
  15841. email: email,
  15842. mobile: mobile,
  15843. url: url,
  15844. date: date,
  15845. dateISO: dateISO,
  15846. number: number,
  15847. digits: digits,
  15848. idCard: idCard,
  15849. carNo: carNo,
  15850. amount: amount,
  15851. chinese: chinese,
  15852. letter: letter,
  15853. enOrNum: enOrNum,
  15854. contains: contains,
  15855. range: range,
  15856. rangeLength: rangeLength,
  15857. empty: empty,
  15858. isEmpty: empty,
  15859. jsonString: jsonString,
  15860. landline: landline,
  15861. object: object,
  15862. array: array,
  15863. code: code
  15864. };
  15865. exports.default = _default;
  15866. /***/ }),
  15867. /***/ 470:
  15868. /*!*********************************************************************************!*\
  15869. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/CssHandler.js ***!
  15870. \*********************************************************************************/
  15871. /*! no static exports found */
  15872. /***/ (function(module, exports, __webpack_require__) {
  15873. var cfg = __webpack_require__(/*! ./config.js */ 469),
  15874. isLetter = function isLetter(c) {
  15875. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15876. };
  15877. function CssHandler(tagStyle) {
  15878. var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
  15879. for (var item in tagStyle) {
  15880. styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];
  15881. }
  15882. this.styles = styles;
  15883. }
  15884. CssHandler.prototype.getStyle = function (data) {
  15885. this.styles = new parser(data, this.styles).parse();
  15886. };
  15887. CssHandler.prototype.match = function (name, attrs) {
  15888. var tmp,
  15889. matched = (tmp = this.styles[name]) ? tmp + ';' : '';
  15890. if (attrs.class) {
  15891. var items = attrs.class.split(' ');
  15892. for (var i = 0, item; item = items[i]; i++) {
  15893. if (tmp = this.styles['.' + item]) matched += tmp + ';';
  15894. }
  15895. }
  15896. if (tmp = this.styles['#' + attrs.id]) matched += tmp + ';';
  15897. return matched;
  15898. };
  15899. module.exports = CssHandler;
  15900. function parser(data, init) {
  15901. this.data = data;
  15902. this.floor = 0;
  15903. this.i = 0;
  15904. this.list = [];
  15905. this.res = init;
  15906. this.state = this.Space;
  15907. }
  15908. parser.prototype.parse = function () {
  15909. for (var c; c = this.data[this.i]; this.i++) {
  15910. this.state(c);
  15911. }
  15912. return this.res;
  15913. };
  15914. parser.prototype.section = function () {
  15915. return this.data.substring(this.start, this.i);
  15916. };
  15917. // 状态机
  15918. parser.prototype.Space = function (c) {
  15919. if (c == '.' || c == '#' || isLetter(c)) {
  15920. this.start = this.i;
  15921. this.state = this.Name;
  15922. } else if (c == '/' && this.data[this.i + 1] == '*') this.Comment();else if (!cfg.blankChar[c] && c != ';') this.state = this.Ignore;
  15923. };
  15924. parser.prototype.Comment = function () {
  15925. this.i = this.data.indexOf('*/', this.i) + 1;
  15926. if (!this.i) this.i = this.data.length;
  15927. this.state = this.Space;
  15928. };
  15929. parser.prototype.Ignore = function (c) {
  15930. if (c == '{') this.floor++;else if (c == '}' && ! --this.floor) {
  15931. this.list = [];
  15932. this.state = this.Space;
  15933. }
  15934. };
  15935. parser.prototype.Name = function (c) {
  15936. if (cfg.blankChar[c]) {
  15937. this.list.push(this.section());
  15938. this.state = this.NameSpace;
  15939. } else if (c == '{') {
  15940. this.list.push(this.section());
  15941. this.Content();
  15942. } else if (c == ',') {
  15943. this.list.push(this.section());
  15944. this.Comma();
  15945. } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') this.state = this.Ignore;
  15946. };
  15947. parser.prototype.NameSpace = function (c) {
  15948. if (c == '{') this.Content();else if (c == ',') this.Comma();else if (!cfg.blankChar[c]) this.state = this.Ignore;
  15949. };
  15950. parser.prototype.Comma = function () {
  15951. while (cfg.blankChar[this.data[++this.i]]) {
  15952. ;
  15953. }
  15954. if (this.data[this.i] == '{') this.Content();else {
  15955. this.start = this.i--;
  15956. this.state = this.Name;
  15957. }
  15958. };
  15959. parser.prototype.Content = function () {
  15960. this.start = ++this.i;
  15961. if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
  15962. var content = this.section();
  15963. for (var i = 0, item; item = this.list[i++];) {
  15964. if (this.res[item]) this.res[item] += ';' + content;else this.res[item] = content;
  15965. }
  15966. this.list = [];
  15967. this.state = this.Space;
  15968. };
  15969. /***/ }),
  15970. /***/ 478:
  15971. /*!***************************************************************!*\
  15972. !*** E:/Desktop/zd_wechatApp(1)/components/mp-html/parser.js ***!
  15973. \***************************************************************/
  15974. /*! no static exports found */
  15975. /***/ (function(module, exports, __webpack_require__) {
  15976. "use strict";
  15977. /* WEBPACK VAR INJECTION */(function(uni, wx) {
  15978. Object.defineProperty(exports, "__esModule", {
  15979. value: true
  15980. });
  15981. exports.default = void 0;
  15982. /**
  15983. * @fileoverview html 解析器
  15984. */
  15985. // 配置
  15986. var config = {
  15987. // 信任的标签(保持标签名不变)
  15988. 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'),
  15989. // 块级标签(转为 div,其他的非信任标签转为 span)
  15990. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  15991. // 要移除的标签
  15992. ignoreTags: makeMap('area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr'),
  15993. // 自闭合的标签
  15994. voidTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  15995. // html 实体
  15996. entities: {
  15997. lt: '<',
  15998. gt: '>',
  15999. quot: '"',
  16000. apos: "'",
  16001. ensp: "\u2002",
  16002. emsp: "\u2003",
  16003. nbsp: '\xA0',
  16004. semi: ';',
  16005. ndash: '–',
  16006. mdash: '—',
  16007. middot: '·',
  16008. lsquo: '‘',
  16009. rsquo: '’',
  16010. ldquo: '“',
  16011. rdquo: '”',
  16012. bull: '•',
  16013. hellip: '…',
  16014. larr: '←',
  16015. uarr: '↑',
  16016. rarr: '→',
  16017. darr: '↓'
  16018. },
  16019. // 默认的标签样式
  16020. tagStyle: {
  16021. address: 'font-style:italic',
  16022. big: 'display:inline;font-size:1.2em',
  16023. caption: 'display:table-caption;text-align:center',
  16024. center: 'text-align:center',
  16025. cite: 'font-style:italic',
  16026. dd: 'margin-left:40px',
  16027. mark: 'background-color:yellow',
  16028. pre: 'font-family:monospace;white-space:pre',
  16029. s: 'text-decoration:line-through',
  16030. small: 'display:inline;font-size:0.8em',
  16031. strike: 'text-decoration:line-through',
  16032. u: 'text-decoration:underline'
  16033. },
  16034. // svg 大小写对照表
  16035. svgDict: {
  16036. animatetransform: 'animateTransform',
  16037. lineargradient: 'linearGradient',
  16038. viewbox: 'viewBox',
  16039. attributename: 'attributeName',
  16040. repeatcount: 'repeatCount',
  16041. repeatdur: 'repeatDur'
  16042. }
  16043. };
  16044. var tagSelector = {};
  16045. var _uni$getSystemInfoSyn = uni.getSystemInfoSync(),
  16046. windowWidth = _uni$getSystemInfoSyn.windowWidth,
  16047. system = _uni$getSystemInfoSyn.system;
  16048. var blankChar = makeMap(' ,\r,\n,\t,\f');
  16049. var idIndex = 0;
  16050. /**
  16051. * @description 创建 map
  16052. * @param {String} str 逗号分隔
  16053. */
  16054. function makeMap(str) {
  16055. var map = Object.create(null);
  16056. var list = str.split(',');
  16057. for (var i = list.length; i--;) {
  16058. map[list[i]] = true;
  16059. }
  16060. return map;
  16061. }
  16062. /**
  16063. * @description 解码 html 实体
  16064. * @param {String} str 要解码的字符串
  16065. * @param {Boolean} amp 要不要解码 &amp;
  16066. * @returns {String} 解码后的字符串
  16067. */
  16068. function decodeEntity(str, amp) {
  16069. var i = str.indexOf('&');
  16070. while (i !== -1) {
  16071. var j = str.indexOf(';', i + 3);
  16072. var code = void 0;
  16073. if (j === -1) break;
  16074. if (str[i + 1] === '#') {
  16075. // &#123; 形式的实体
  16076. code = parseInt((str[i + 2] === 'x' ? '0' : '') + str.substring(i + 2, j));
  16077. if (!isNaN(code)) {
  16078. str = str.substr(0, i) + String.fromCharCode(code) + str.substr(j + 1);
  16079. }
  16080. } else {
  16081. // &nbsp; 形式的实体
  16082. code = str.substring(i + 1, j);
  16083. if (config.entities[code] || code === 'amp' && amp) {
  16084. str = str.substr(0, i) + (config.entities[code] || '&') + str.substr(j + 1);
  16085. }
  16086. }
  16087. i = str.indexOf('&', i + 1);
  16088. }
  16089. return str;
  16090. }
  16091. /**
  16092. * @description 合并多个块级标签,加快长内容渲染
  16093. * @param {Array} nodes 要合并的标签数组
  16094. */
  16095. function mergeNodes(nodes) {
  16096. var i = nodes.length - 1;
  16097. for (var j = i; j >= -1; j--) {
  16098. 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')) {
  16099. if (i - j >= 5) {
  16100. nodes.splice(j + 1, i - j, {
  16101. name: 'div',
  16102. attrs: {},
  16103. children: nodes.slice(j + 1, i + 1)
  16104. });
  16105. }
  16106. i = j - 1;
  16107. }
  16108. }
  16109. }
  16110. /**
  16111. * @description html 解析器
  16112. * @param {Object} vm 组件实例
  16113. */
  16114. function Parser(vm) {
  16115. this.options = vm || {};
  16116. this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle);
  16117. this.imgList = vm.imgList || [];
  16118. this.imgList._unloadimgs = 0;
  16119. this.plugins = vm.plugins || [];
  16120. this.attrs = Object.create(null);
  16121. this.stack = [];
  16122. this.nodes = [];
  16123. this.pre = (this.options.containerStyle || '').includes('white-space') && this.options.containerStyle.includes('pre') ? 2 : 0;
  16124. }
  16125. /**
  16126. * @description 执行解析
  16127. * @param {String} content 要解析的文本
  16128. */
  16129. Parser.prototype.parse = function (content) {
  16130. // 插件处理
  16131. for (var i = this.plugins.length; i--;) {
  16132. if (this.plugins[i].onUpdate) {
  16133. content = this.plugins[i].onUpdate(content, config) || content;
  16134. }
  16135. }
  16136. new Lexer(this).parse(content);
  16137. // 出栈未闭合的标签
  16138. while (this.stack.length) {
  16139. this.popNode();
  16140. }
  16141. if (this.nodes.length > 50) {
  16142. mergeNodes(this.nodes);
  16143. }
  16144. return this.nodes;
  16145. };
  16146. /**
  16147. * @description 将标签暴露出来(不被 rich-text 包含)
  16148. */
  16149. Parser.prototype.expose = function () {
  16150. for (var i = this.stack.length; i--;) {
  16151. var item = this.stack[i];
  16152. if (item.c || item.name === 'a' || item.name === 'video' || item.name === 'audio') return;
  16153. item.c = 1;
  16154. }
  16155. };
  16156. /**
  16157. * @description 处理插件
  16158. * @param {Object} node 要处理的标签
  16159. * @returns {Boolean} 是否要移除此标签
  16160. */
  16161. Parser.prototype.hook = function (node) {
  16162. for (var i = this.plugins.length; i--;) {
  16163. if (this.plugins[i].onParse && this.plugins[i].onParse(node, this) === false) {
  16164. return false;
  16165. }
  16166. }
  16167. return true;
  16168. };
  16169. /**
  16170. * @description 将链接拼接上主域名
  16171. * @param {String} url 需要拼接的链接
  16172. * @returns {String} 拼接后的链接
  16173. */
  16174. Parser.prototype.getUrl = function (url) {
  16175. var domain = this.options.domain;
  16176. if (url[0] === '/') {
  16177. if (url[1] === '/') {
  16178. // // 开头的补充协议名
  16179. url = (domain ? domain.split('://')[0] : 'http') + ':' + url;
  16180. } else if (domain) {
  16181. // 否则补充整个域名
  16182. url = domain + url;
  16183. }
  16184. } else if (!url.includes('data:') && !url.includes('://')) {
  16185. if (domain) {
  16186. url = domain + '/' + url;
  16187. }
  16188. }
  16189. return url;
  16190. };
  16191. /**
  16192. * @description 解析样式表
  16193. * @param {Object} node 标签
  16194. * @returns {Object}
  16195. */
  16196. Parser.prototype.parseStyle = function (node) {
  16197. var attrs = node.attrs;
  16198. var list = (this.tagStyle[node.name] || '').split(';').concat((attrs.style || '').split(';'));
  16199. var styleObj = {};
  16200. var tmp = '';
  16201. if (attrs.id && !this.xml) {
  16202. // 暴露锚点
  16203. if (this.options.useAnchor) {
  16204. this.expose();
  16205. } else if (node.name !== 'img' && node.name !== 'a' && node.name !== 'video' && node.name !== 'audio') {
  16206. attrs.id = undefined;
  16207. }
  16208. }
  16209. // 转换 width 和 height 属性
  16210. if (attrs.width) {
  16211. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  16212. attrs.width = undefined;
  16213. }
  16214. if (attrs.height) {
  16215. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  16216. attrs.height = undefined;
  16217. }
  16218. for (var i = 0, len = list.length; i < len; i++) {
  16219. var info = list[i].split(':');
  16220. if (info.length < 2) continue;
  16221. var key = info.shift().trim().toLowerCase();
  16222. var value = info.join(':').trim();
  16223. if (value[0] === '-' && value.lastIndexOf('-') > 0 || value.includes('safe')) {
  16224. // 兼容性的 css 不压缩
  16225. tmp += ";".concat(key, ":").concat(value);
  16226. } else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) {
  16227. // 重复的样式进行覆盖
  16228. if (value.includes('url')) {
  16229. // 填充链接
  16230. var j = value.indexOf('(') + 1;
  16231. if (j) {
  16232. while (value[j] === '"' || value[j] === "'" || blankChar[value[j]]) {
  16233. j++;
  16234. }
  16235. value = value.substr(0, j) + this.getUrl(value.substr(j));
  16236. }
  16237. } else if (value.includes('rpx')) {
  16238. // 转换 rpx(rich-text 内部不支持 rpx)
  16239. value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  16240. return parseFloat($) * windowWidth / 750 + 'px';
  16241. });
  16242. }
  16243. styleObj[key] = value;
  16244. }
  16245. }
  16246. node.attrs.style = tmp;
  16247. return styleObj;
  16248. };
  16249. /**
  16250. * @description 解析到标签名
  16251. * @param {String} name 标签名
  16252. * @private
  16253. */
  16254. Parser.prototype.onTagName = function (name) {
  16255. this.tagName = this.xml ? name : name.toLowerCase();
  16256. if (this.tagName === 'svg') {
  16257. this.xml = (this.xml || 0) + 1; // svg 标签内大小写敏感
  16258. config.ignoreTags.style = undefined; // svg 标签内 style 可用
  16259. }
  16260. };
  16261. /**
  16262. * @description 解析到属性名
  16263. * @param {String} name 属性名
  16264. * @private
  16265. */
  16266. Parser.prototype.onAttrName = function (name) {
  16267. name = this.xml ? name : name.toLowerCase();
  16268. if (name.substr(0, 5) === 'data-') {
  16269. if (name === 'data-src' && !this.attrs.src) {
  16270. // data-src 自动转为 src
  16271. this.attrName = 'src';
  16272. } else if (this.tagName === 'img' || this.tagName === 'a') {
  16273. // a 和 img 标签保留 data- 的属性,可以在 imgtap 和 linktap 事件中使用
  16274. this.attrName = name;
  16275. } else {
  16276. // 剩余的移除以减小大小
  16277. this.attrName = undefined;
  16278. }
  16279. } else {
  16280. this.attrName = name;
  16281. this.attrs[name] = 'T'; // boolean 型属性缺省设置
  16282. }
  16283. };
  16284. /**
  16285. * @description 解析到属性值
  16286. * @param {String} val 属性值
  16287. * @private
  16288. */
  16289. Parser.prototype.onAttrVal = function (val) {
  16290. var name = this.attrName || '';
  16291. if (name === 'style' || name === 'href') {
  16292. // 部分属性进行实体解码
  16293. this.attrs[name] = decodeEntity(val, true);
  16294. } else if (name.includes('src')) {
  16295. // 拼接主域名
  16296. this.attrs[name] = this.getUrl(decodeEntity(val, true));
  16297. } else if (name) {
  16298. this.attrs[name] = val;
  16299. }
  16300. };
  16301. /**
  16302. * @description 解析到标签开始
  16303. * @param {Boolean} selfClose 是否有自闭合标识 />
  16304. * @private
  16305. */
  16306. Parser.prototype.onOpenTag = function (selfClose) {
  16307. // 拼装 node
  16308. var node = Object.create(null);
  16309. node.name = this.tagName;
  16310. node.attrs = this.attrs;
  16311. // 避免因为自动 diff 使得 type 被设置为 null 导致部分内容不显示
  16312. if (this.options.nodes.length) {
  16313. node.type = 'node';
  16314. }
  16315. this.attrs = Object.create(null);
  16316. var attrs = node.attrs;
  16317. var parent = this.stack[this.stack.length - 1];
  16318. var siblings = parent ? parent.children : this.nodes;
  16319. var close = this.xml ? selfClose : config.voidTags[node.name];
  16320. // 替换标签名选择器
  16321. if (tagSelector[node.name]) {
  16322. attrs.class = tagSelector[node.name] + (attrs.class ? ' ' + attrs.class : '');
  16323. }
  16324. // 转换 embed 标签
  16325. if (node.name === 'embed') {
  16326. var src = attrs.src || '';
  16327. // 按照后缀名和 type 将 embed 转为 video 或 audio
  16328. if (src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8') || (attrs.type || '').includes('video')) {
  16329. node.name = 'video';
  16330. } else if (src.includes('.mp3') || src.includes('.wav') || src.includes('.aac') || src.includes('.m4a') || (attrs.type || '').includes('audio')) {
  16331. node.name = 'audio';
  16332. }
  16333. if (attrs.autostart) {
  16334. attrs.autoplay = 'T';
  16335. }
  16336. attrs.controls = 'T';
  16337. }
  16338. // 处理音视频
  16339. if (node.name === 'video' || node.name === 'audio') {
  16340. // 设置 id 以便获取 context
  16341. if (node.name === 'video' && !attrs.id) {
  16342. attrs.id = 'v' + idIndex++;
  16343. }
  16344. // 没有设置 controls 也没有设置 autoplay 的自动设置 controls
  16345. if (!attrs.controls && !attrs.autoplay) {
  16346. attrs.controls = 'T';
  16347. }
  16348. // 用数组存储所有可用的 source
  16349. node.src = [];
  16350. if (attrs.src) {
  16351. node.src.push(attrs.src);
  16352. attrs.src = undefined;
  16353. }
  16354. this.expose();
  16355. }
  16356. // 处理自闭合标签
  16357. if (close) {
  16358. if (!this.hook(node) || config.ignoreTags[node.name]) {
  16359. // 通过 base 标签设置主域名
  16360. if (node.name === 'base' && !this.options.domain) {
  16361. this.options.domain = attrs.href;
  16362. } else if (node.name === 'source' && parent && (parent.name === 'video' || parent.name === 'audio') && attrs.src) {
  16363. // 设置 source 标签(仅父节点为 video 或 audio 时有效)
  16364. parent.src.push(attrs.src);
  16365. }
  16366. return;
  16367. }
  16368. // 解析 style
  16369. var styleObj = this.parseStyle(node);
  16370. // 处理图片
  16371. if (node.name === 'img') {
  16372. if (attrs.src) {
  16373. // 标记 webp
  16374. if (attrs.src.includes('webp')) {
  16375. node.webp = 'T';
  16376. }
  16377. // data url 图片如果没有设置 original-src 默认为不可预览的小图片
  16378. if (attrs.src.includes('data:') && !attrs['original-src']) {
  16379. attrs.ignore = 'T';
  16380. }
  16381. if (!attrs.ignore || node.webp || attrs.src.includes('cloud://')) {
  16382. for (var i = this.stack.length; i--;) {
  16383. var item = this.stack[i];
  16384. if (item.name === 'a') {
  16385. node.a = item.attrs;
  16386. }
  16387. if (item.name === 'table' && !node.webp && !attrs.src.includes('cloud://')) {
  16388. if (!styleObj.display || styleObj.display.includes('inline')) {
  16389. node.t = 'inline-block';
  16390. } else {
  16391. node.t = styleObj.display;
  16392. }
  16393. styleObj.display = undefined;
  16394. }
  16395. var style = item.attrs.style || '';
  16396. if (style.includes('flex:') && !style.includes('flex:0') && !style.includes('flex: 0') && (!styleObj.width || parseInt(styleObj.width) > 100)) {
  16397. styleObj.width = '100% !important';
  16398. styleObj.height = '';
  16399. for (var j = i + 1; j < this.stack.length; j++) {
  16400. this.stack[j].attrs.style = (this.stack[j].attrs.style || '').replace('inline-', '');
  16401. }
  16402. } else if (style.includes('flex') && styleObj.width === '100%') {
  16403. for (var _j = i + 1; _j < this.stack.length; _j++) {
  16404. var _style = this.stack[_j].attrs.style || '';
  16405. if (!_style.includes(';width') && !_style.includes(' width') && _style.indexOf('width') !== 0) {
  16406. styleObj.width = '';
  16407. break;
  16408. }
  16409. }
  16410. } else if (style.includes('inline-block')) {
  16411. if (styleObj.width && styleObj.width[styleObj.width.length - 1] === '%') {
  16412. item.attrs.style += ';max-width:' + styleObj.width;
  16413. styleObj.width = '';
  16414. } else {
  16415. item.attrs.style += ';max-width:100%';
  16416. }
  16417. }
  16418. item.c = 1;
  16419. }
  16420. attrs.i = this.imgList.length.toString();
  16421. var _src = attrs['original-src'] || attrs.src;
  16422. if (this.imgList.includes(_src)) {
  16423. // 如果有重复的链接则对域名进行随机大小写变换避免预览时错位
  16424. var _i = _src.indexOf('://');
  16425. if (_i !== -1) {
  16426. _i += 3;
  16427. var newSrc = _src.substr(0, _i);
  16428. for (; _i < _src.length; _i++) {
  16429. if (_src[_i] === '/') break;
  16430. newSrc += Math.random() > 0.5 ? _src[_i].toUpperCase() : _src[_i];
  16431. }
  16432. newSrc += _src.substr(_i);
  16433. _src = newSrc;
  16434. }
  16435. }
  16436. this.imgList.push(_src);
  16437. if (!node.t) {
  16438. this.imgList._unloadimgs += 1;
  16439. }
  16440. }
  16441. }
  16442. if (styleObj.display === 'inline') {
  16443. styleObj.display = '';
  16444. }
  16445. if (attrs.ignore) {
  16446. styleObj['max-width'] = styleObj['max-width'] || '100%';
  16447. attrs.style += ';-webkit-touch-callout:none';
  16448. }
  16449. // 设置的宽度超出屏幕,为避免变形,高度转为自动
  16450. if (parseInt(styleObj.width) > windowWidth) {
  16451. styleObj.height = undefined;
  16452. }
  16453. // 记录是否设置了宽高
  16454. if (!isNaN(parseInt(styleObj.width))) {
  16455. node.w = 'T';
  16456. }
  16457. if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes('%') || parent && (parent.attrs.style || '').includes('height'))) {
  16458. node.h = 'T';
  16459. }
  16460. } else if (node.name === 'svg') {
  16461. siblings.push(node);
  16462. this.stack.push(node);
  16463. this.popNode();
  16464. return;
  16465. }
  16466. for (var key in styleObj) {
  16467. if (styleObj[key]) {
  16468. attrs.style += ";".concat(key, ":").concat(styleObj[key].replace(' !important', ''));
  16469. }
  16470. }
  16471. attrs.style = attrs.style.substr(1) || undefined;
  16472. } else {
  16473. if ((node.name === 'pre' || (attrs.style || '').includes('white-space') && attrs.style.includes('pre')) && this.pre !== 2) {
  16474. this.pre = node.pre = 1;
  16475. }
  16476. node.children = [];
  16477. this.stack.push(node);
  16478. }
  16479. // 加入节点树
  16480. siblings.push(node);
  16481. };
  16482. /**
  16483. * @description 解析到标签结束
  16484. * @param {String} name 标签名
  16485. * @private
  16486. */
  16487. Parser.prototype.onCloseTag = function (name) {
  16488. // 依次出栈到匹配为止
  16489. name = this.xml ? name : name.toLowerCase();
  16490. var i;
  16491. for (i = this.stack.length; i--;) {
  16492. if (this.stack[i].name === name) break;
  16493. }
  16494. if (i !== -1) {
  16495. while (this.stack.length > i) {
  16496. this.popNode();
  16497. }
  16498. } else if (name === 'p' || name === 'br') {
  16499. var siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  16500. siblings.push({
  16501. name: name,
  16502. attrs: {
  16503. class: tagSelector[name] || '',
  16504. style: this.tagStyle[name] || ''
  16505. }
  16506. });
  16507. }
  16508. };
  16509. /**
  16510. * @description 处理标签出栈
  16511. * @private
  16512. */
  16513. Parser.prototype.popNode = function () {
  16514. var node = this.stack.pop();
  16515. var attrs = node.attrs;
  16516. var children = node.children;
  16517. var parent = this.stack[this.stack.length - 1];
  16518. var siblings = parent ? parent.children : this.nodes;
  16519. if (!this.hook(node) || config.ignoreTags[node.name]) {
  16520. // 获取标题
  16521. if (node.name === 'title' && children.length && children[0].type === 'text' && this.options.setTitle) {
  16522. uni.setNavigationBarTitle({
  16523. title: children[0].text
  16524. });
  16525. }
  16526. siblings.pop();
  16527. return;
  16528. }
  16529. if (node.pre && this.pre !== 2) {
  16530. // 是否合并空白符标识
  16531. this.pre = node.pre = undefined;
  16532. for (var i = this.stack.length; i--;) {
  16533. if (this.stack[i].pre) {
  16534. this.pre = 1;
  16535. }
  16536. }
  16537. }
  16538. var styleObj = {};
  16539. // 转换 svg
  16540. if (node.name === 'svg') {
  16541. if (this.xml > 1) {
  16542. // 多层 svg 嵌套
  16543. this.xml--;
  16544. return;
  16545. }
  16546. var src = '';
  16547. var style = attrs.style;
  16548. attrs.style = '';
  16549. attrs.xmlns = 'http://www.w3.org/2000/svg';
  16550. (function traversal(node) {
  16551. if (node.type === 'text') {
  16552. src += node.text;
  16553. return;
  16554. }
  16555. var name = config.svgDict[node.name] || node.name;
  16556. src += '<' + name;
  16557. for (var item in node.attrs) {
  16558. var val = node.attrs[item];
  16559. if (val) {
  16560. src += " ".concat(config.svgDict[item] || item, "=\"").concat(val, "\"");
  16561. }
  16562. }
  16563. if (!node.children) {
  16564. src += '/>';
  16565. } else {
  16566. src += '>';
  16567. for (var _i2 = 0; _i2 < node.children.length; _i2++) {
  16568. traversal(node.children[_i2]);
  16569. }
  16570. src += '</' + name + '>';
  16571. }
  16572. })(node);
  16573. node.name = 'img';
  16574. node.attrs = {
  16575. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  16576. style: style,
  16577. ignore: 'T'
  16578. };
  16579. node.children = undefined;
  16580. this.xml = false;
  16581. config.ignoreTags.style = true;
  16582. return;
  16583. }
  16584. // 转换 align 属性
  16585. if (attrs.align) {
  16586. if (node.name === 'table') {
  16587. if (attrs.align === 'center') {
  16588. styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';
  16589. } else {
  16590. styleObj.float = attrs.align;
  16591. }
  16592. } else {
  16593. styleObj['text-align'] = attrs.align;
  16594. }
  16595. attrs.align = undefined;
  16596. }
  16597. // 转换 dir 属性
  16598. if (attrs.dir) {
  16599. styleObj.direction = attrs.dir;
  16600. attrs.dir = undefined;
  16601. }
  16602. // 转换 font 标签的属性
  16603. if (node.name === 'font') {
  16604. if (attrs.color) {
  16605. styleObj.color = attrs.color;
  16606. attrs.color = undefined;
  16607. }
  16608. if (attrs.face) {
  16609. styleObj['font-family'] = attrs.face;
  16610. attrs.face = undefined;
  16611. }
  16612. if (attrs.size) {
  16613. var size = parseInt(attrs.size);
  16614. if (!isNaN(size)) {
  16615. if (size < 1) {
  16616. size = 1;
  16617. } else if (size > 7) {
  16618. size = 7;
  16619. }
  16620. styleObj['font-size'] = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large'][size - 1];
  16621. }
  16622. attrs.size = undefined;
  16623. }
  16624. }
  16625. // 一些编辑器的自带 class
  16626. if ((attrs.class || '').includes('align-center')) {
  16627. styleObj['text-align'] = 'center';
  16628. }
  16629. Object.assign(styleObj, this.parseStyle(node));
  16630. if (node.name !== 'table' && parseInt(styleObj.width) > windowWidth) {
  16631. styleObj['max-width'] = '100%';
  16632. styleObj['box-sizing'] = 'border-box';
  16633. }
  16634. if (config.blockTags[node.name]) {
  16635. node.name = 'div';
  16636. } else if (!config.trustTags[node.name] && !this.xml) {
  16637. // 未知标签转为 span,避免无法显示
  16638. node.name = 'span';
  16639. }
  16640. if (node.name === 'a' || node.name === 'ad') {
  16641. this.expose();
  16642. } else if (node.name === 'video') {
  16643. if ((styleObj.height || '').includes('auto')) {
  16644. styleObj.height = undefined;
  16645. }
  16646. } else if ((node.name === 'ul' || node.name === 'ol') && node.c) {
  16647. // 列表处理
  16648. var types = {
  16649. a: 'lower-alpha',
  16650. A: 'upper-alpha',
  16651. i: 'lower-roman',
  16652. I: 'upper-roman'
  16653. };
  16654. if (types[attrs.type]) {
  16655. attrs.style += ';list-style-type:' + types[attrs.type];
  16656. attrs.type = undefined;
  16657. }
  16658. for (var _i3 = children.length; _i3--;) {
  16659. if (children[_i3].name === 'li') {
  16660. children[_i3].c = 1;
  16661. }
  16662. }
  16663. } else if (node.name === 'table') {
  16664. // 表格处理
  16665. // cellpadding、cellspacing、border 这几个常用表格属性需要通过转换实现
  16666. var padding = parseFloat(attrs.cellpadding);
  16667. var spacing = parseFloat(attrs.cellspacing);
  16668. var border = parseFloat(attrs.border);
  16669. var bordercolor = styleObj['border-color'];
  16670. var borderstyle = styleObj['border-style'];
  16671. if (node.c) {
  16672. // padding 和 spacing 默认 2
  16673. if (isNaN(padding)) {
  16674. padding = 2;
  16675. }
  16676. if (isNaN(spacing)) {
  16677. spacing = 2;
  16678. }
  16679. }
  16680. if (border) {
  16681. attrs.style += ";border:".concat(border, "px ").concat(borderstyle || 'solid', " ").concat(bordercolor || 'gray');
  16682. }
  16683. if (node.flag && node.c) {
  16684. // 有 colspan 或 rowspan 且含有链接的表格通过 grid 布局实现
  16685. styleObj.display = 'grid';
  16686. if (spacing) {
  16687. styleObj['grid-gap'] = spacing + 'px';
  16688. styleObj.padding = spacing + 'px';
  16689. } else if (border) {
  16690. // 无间隔的情况下避免边框重叠
  16691. attrs.style += ';border-left:0;border-top:0';
  16692. }
  16693. var width = []; // 表格的列宽
  16694. var trList = []; // tr 列表
  16695. var cells = []; // 保存新的单元格
  16696. var map = {}; // 被合并单元格占用的格子
  16697. (function traversal(nodes) {
  16698. for (var _i4 = 0; _i4 < nodes.length; _i4++) {
  16699. if (nodes[_i4].name === 'tr') {
  16700. trList.push(nodes[_i4]);
  16701. } else {
  16702. traversal(nodes[_i4].children || []);
  16703. }
  16704. }
  16705. })(children);
  16706. for (var row = 1; row <= trList.length; row++) {
  16707. var col = 1;
  16708. for (var j = 0; j < trList[row - 1].children.length; j++) {
  16709. var td = trList[row - 1].children[j];
  16710. if (td.name === 'td' || td.name === 'th') {
  16711. // 这个格子被上面的单元格占用,则列号++
  16712. while (map[row + '.' + col]) {
  16713. col++;
  16714. }
  16715. var _style2 = td.attrs.style || '';
  16716. var start = _style2.indexOf('width') ? _style2.indexOf(';width') : 0;
  16717. // 提取出 td 的宽度
  16718. if (start !== -1) {
  16719. var end = _style2.indexOf(';', start + 6);
  16720. if (end === -1) {
  16721. end = _style2.length;
  16722. }
  16723. if (!td.attrs.colspan) {
  16724. width[col] = _style2.substring(start ? start + 7 : 6, end);
  16725. }
  16726. _style2 = _style2.substr(0, start) + _style2.substr(end);
  16727. }
  16728. // 设置竖直对齐
  16729. _style2 += ';display:flex';
  16730. start = _style2.indexOf('vertical-align');
  16731. if (start !== -1) {
  16732. var val = _style2.substr(start + 15, 10);
  16733. if (val.includes('middle')) {
  16734. _style2 += ';align-items:center';
  16735. } else if (val.includes('bottom')) {
  16736. _style2 += ';align-items:flex-end';
  16737. }
  16738. } else {
  16739. _style2 += ';align-items:center';
  16740. }
  16741. // 设置水平对齐
  16742. start = _style2.indexOf('text-align');
  16743. if (start !== -1) {
  16744. var _val = _style2.substr(start + 11, 10);
  16745. if (_val.includes('center')) {
  16746. _style2 += ';justify-content: center';
  16747. } else if (_val.includes('right')) {
  16748. _style2 += ';justify-content: right';
  16749. }
  16750. }
  16751. _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;
  16752. // 处理列合并
  16753. if (td.attrs.colspan) {
  16754. _style2 += ";grid-column-start:".concat(col, ";grid-column-end:").concat(col + parseInt(td.attrs.colspan));
  16755. if (!td.attrs.rowspan) {
  16756. _style2 += ";grid-row-start:".concat(row, ";grid-row-end:").concat(row + 1);
  16757. }
  16758. col += parseInt(td.attrs.colspan) - 1;
  16759. }
  16760. // 处理行合并
  16761. if (td.attrs.rowspan) {
  16762. _style2 += ";grid-row-start:".concat(row, ";grid-row-end:").concat(row + parseInt(td.attrs.rowspan));
  16763. if (!td.attrs.colspan) {
  16764. _style2 += ";grid-column-start:".concat(col, ";grid-column-end:").concat(col + 1);
  16765. }
  16766. // 记录下方单元格被占用
  16767. for (var rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
  16768. for (var colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
  16769. map[row + rowspan + '.' + (col - colspan)] = 1;
  16770. }
  16771. }
  16772. }
  16773. if (_style2) {
  16774. td.attrs.style = _style2;
  16775. }
  16776. cells.push(td);
  16777. col++;
  16778. }
  16779. }
  16780. if (row === 1) {
  16781. var temp = '';
  16782. for (var _i5 = 1; _i5 < col; _i5++) {
  16783. temp += (width[_i5] ? width[_i5] : 'auto') + ' ';
  16784. }
  16785. styleObj['grid-template-columns'] = temp;
  16786. }
  16787. }
  16788. node.children = cells;
  16789. } else {
  16790. // 没有使用合并单元格的表格通过 table 布局实现
  16791. if (node.c) {
  16792. styleObj.display = 'table';
  16793. }
  16794. if (!isNaN(spacing)) {
  16795. styleObj['border-spacing'] = spacing + 'px';
  16796. }
  16797. if (border || padding) {
  16798. // 遍历
  16799. (function traversal(nodes) {
  16800. for (var _i6 = 0; _i6 < nodes.length; _i6++) {
  16801. var _td = nodes[_i6];
  16802. if (_td.name === 'th' || _td.name === 'td') {
  16803. if (border) {
  16804. _td.attrs.style = "border:".concat(border, "px ").concat(borderstyle || 'solid', " ").concat(bordercolor || 'gray', ";").concat(_td.attrs.style || '');
  16805. }
  16806. if (padding) {
  16807. _td.attrs.style = "padding:".concat(padding, "px;").concat(_td.attrs.style || '');
  16808. }
  16809. } else if (_td.children) {
  16810. traversal(_td.children);
  16811. }
  16812. }
  16813. })(children);
  16814. }
  16815. }
  16816. // 给表格添加一个单独的横向滚动层
  16817. if (this.options.scrollTable && !(attrs.style || '').includes('inline')) {
  16818. var table = Object.assign({}, node);
  16819. node.name = 'div';
  16820. node.attrs = {
  16821. style: 'overflow:auto'
  16822. };
  16823. node.children = [table];
  16824. attrs = table.attrs;
  16825. }
  16826. } else if ((node.name === 'td' || node.name === 'th') && (attrs.colspan || attrs.rowspan)) {
  16827. for (var _i7 = this.stack.length; _i7--;) {
  16828. if (this.stack[_i7].name === 'table') {
  16829. this.stack[_i7].flag = 1; // 指示含有合并单元格
  16830. break;
  16831. }
  16832. }
  16833. } else if (node.name === 'ruby') {
  16834. // 转换 ruby
  16835. node.name = 'span';
  16836. for (var _i8 = 0; _i8 < children.length - 1; _i8++) {
  16837. if (children[_i8].type === 'text' && children[_i8 + 1].name === 'rt') {
  16838. children[_i8] = {
  16839. name: 'div',
  16840. attrs: {
  16841. style: 'display:inline-block;text-align:center'
  16842. },
  16843. children: [{
  16844. name: 'div',
  16845. attrs: {
  16846. style: 'font-size:50%;' + (children[_i8 + 1].attrs.style || '')
  16847. },
  16848. children: children[_i8 + 1].children
  16849. }, children[_i8]]
  16850. };
  16851. children.splice(_i8 + 1, 1);
  16852. }
  16853. }
  16854. } else if (node.c) {
  16855. (function traversal(node) {
  16856. node.c = 2;
  16857. for (var _i9 = node.children.length; _i9--;) {
  16858. var child = node.children[_i9];
  16859. if (!child.c || child.name === 'table') {
  16860. node.c = 1;
  16861. }
  16862. }
  16863. })(node);
  16864. }
  16865. if ((styleObj.display || '').includes('flex') && !node.c) {
  16866. for (var _i10 = children.length; _i10--;) {
  16867. var item = children[_i10];
  16868. if (item.f) {
  16869. item.attrs.style = (item.attrs.style || '') + item.f;
  16870. item.f = undefined;
  16871. }
  16872. }
  16873. }
  16874. // flex 布局时部分样式需要提取到 rich-text 外层
  16875. var flex = parent && ((parent.attrs.style || '').includes('flex') || (parent.attrs.style || '').includes('grid'))
  16876. // 检查基础库版本 virtualHost 是否可用
  16877. && !(node.c && wx.getNFCAdapter); // eslint-disable-line
  16878. if (flex) {
  16879. node.f = ';max-width:100%';
  16880. }
  16881. if (children.length >= 50 && node.c && !(styleObj.display || '').includes('flex')) {
  16882. mergeNodes(children);
  16883. }
  16884. for (var key in styleObj) {
  16885. if (styleObj[key]) {
  16886. var _val2 = ";".concat(key, ":").concat(styleObj[key].replace(' !important', ''));
  16887. if (flex && (key.includes('flex') && key !== 'flex-direction' || key === 'align-self' || key.includes('grid') || styleObj[key][0] === '-' || key.includes('width') && _val2.includes('%'))) {
  16888. node.f += _val2;
  16889. if (key === 'width') {
  16890. attrs.style += ';width:100%';
  16891. }
  16892. } else {
  16893. attrs.style += _val2;
  16894. }
  16895. }
  16896. }
  16897. attrs.style = attrs.style.substr(1) || undefined;
  16898. };
  16899. /**
  16900. * @description 解析到文本
  16901. * @param {String} text 文本内容
  16902. */
  16903. Parser.prototype.onText = function (text) {
  16904. if (!this.pre) {
  16905. // 合并空白符
  16906. var trim = '';
  16907. var flag;
  16908. for (var i = 0, len = text.length; i < len; i++) {
  16909. if (!blankChar[text[i]]) {
  16910. trim += text[i];
  16911. } else {
  16912. if (trim[trim.length - 1] !== ' ') {
  16913. trim += ' ';
  16914. }
  16915. if (text[i] === '\n' && !flag) {
  16916. flag = true;
  16917. }
  16918. }
  16919. }
  16920. // 去除含有换行符的空串
  16921. if (trim === ' ') {
  16922. if (flag) return;
  16923. }
  16924. text = trim;
  16925. }
  16926. var node = Object.create(null);
  16927. node.type = 'text';
  16928. node.text = decodeEntity(text);
  16929. if (this.hook(node)) {
  16930. if (this.options.selectable === 'force' && system.includes('iOS') && !uni.canIUse('rich-text.user-select')) {
  16931. this.expose();
  16932. }
  16933. var siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  16934. siblings.push(node);
  16935. }
  16936. };
  16937. /**
  16938. * @description html 词法分析器
  16939. * @param {Object} handler 高层处理器
  16940. */
  16941. function Lexer(handler) {
  16942. this.handler = handler;
  16943. }
  16944. /**
  16945. * @description 执行解析
  16946. * @param {String} content 要解析的文本
  16947. */
  16948. Lexer.prototype.parse = function (content) {
  16949. this.content = content || '';
  16950. this.i = 0; // 标记解析位置
  16951. this.start = 0; // 标记一个单词的开始位置
  16952. this.state = this.text; // 当前状态
  16953. for (var len = this.content.length; this.i !== -1 && this.i < len;) {
  16954. this.state();
  16955. }
  16956. };
  16957. /**
  16958. * @description 检查标签是否闭合
  16959. * @param {String} method 如果闭合要进行的操作
  16960. * @returns {Boolean} 是否闭合
  16961. * @private
  16962. */
  16963. Lexer.prototype.checkClose = function (method) {
  16964. var selfClose = this.content[this.i] === '/';
  16965. if (this.content[this.i] === '>' || selfClose && this.content[this.i + 1] === '>') {
  16966. if (method) {
  16967. this.handler[method](this.content.substring(this.start, this.i));
  16968. }
  16969. this.i += selfClose ? 2 : 1;
  16970. this.start = this.i;
  16971. this.handler.onOpenTag(selfClose);
  16972. if (this.handler.tagName === 'script') {
  16973. this.i = this.content.indexOf('</', this.i);
  16974. if (this.i !== -1) {
  16975. this.i += 2;
  16976. this.start = this.i;
  16977. }
  16978. this.state = this.endTag;
  16979. } else {
  16980. this.state = this.text;
  16981. }
  16982. return true;
  16983. }
  16984. return false;
  16985. };
  16986. /**
  16987. * @description 文本状态
  16988. * @private
  16989. */
  16990. Lexer.prototype.text = function () {
  16991. this.i = this.content.indexOf('<', this.i); // 查找最近的标签
  16992. if (this.i === -1) {
  16993. // 没有标签了
  16994. if (this.start < this.content.length) {
  16995. this.handler.onText(this.content.substring(this.start, this.content.length));
  16996. }
  16997. return;
  16998. }
  16999. var c = this.content[this.i + 1];
  17000. if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') {
  17001. // 标签开头
  17002. if (this.start !== this.i) {
  17003. this.handler.onText(this.content.substring(this.start, this.i));
  17004. }
  17005. this.start = ++this.i;
  17006. this.state = this.tagName;
  17007. } else if (c === '/' || c === '!' || c === '?') {
  17008. if (this.start !== this.i) {
  17009. this.handler.onText(this.content.substring(this.start, this.i));
  17010. }
  17011. var next = this.content[this.i + 2];
  17012. if (c === '/' && (next >= 'a' && next <= 'z' || next >= 'A' && next <= 'Z')) {
  17013. // 标签结尾
  17014. this.i += 2;
  17015. this.start = this.i;
  17016. this.state = this.endTag;
  17017. return;
  17018. }
  17019. // 处理注释
  17020. var end = '-->';
  17021. if (c !== '!' || this.content[this.i + 2] !== '-' || this.content[this.i + 3] !== '-') {
  17022. end = '>';
  17023. }
  17024. this.i = this.content.indexOf(end, this.i);
  17025. if (this.i !== -1) {
  17026. this.i += end.length;
  17027. this.start = this.i;
  17028. }
  17029. } else {
  17030. this.i++;
  17031. }
  17032. };
  17033. /**
  17034. * @description 标签名状态
  17035. * @private
  17036. */
  17037. Lexer.prototype.tagName = function () {
  17038. if (blankChar[this.content[this.i]]) {
  17039. // 解析到标签名
  17040. this.handler.onTagName(this.content.substring(this.start, this.i));
  17041. while (blankChar[this.content[++this.i]]) {
  17042. ;
  17043. }
  17044. if (this.i < this.content.length && !this.checkClose()) {
  17045. this.start = this.i;
  17046. this.state = this.attrName;
  17047. }
  17048. } else if (!this.checkClose('onTagName')) {
  17049. this.i++;
  17050. }
  17051. };
  17052. /**
  17053. * @description 属性名状态
  17054. * @private
  17055. */
  17056. Lexer.prototype.attrName = function () {
  17057. var c = this.content[this.i];
  17058. if (blankChar[c] || c === '=') {
  17059. // 解析到属性名
  17060. this.handler.onAttrName(this.content.substring(this.start, this.i));
  17061. var needVal = c === '=';
  17062. var len = this.content.length;
  17063. while (++this.i < len) {
  17064. c = this.content[this.i];
  17065. if (!blankChar[c]) {
  17066. if (this.checkClose()) return;
  17067. if (needVal) {
  17068. // 等号后遇到第一个非空字符
  17069. this.start = this.i;
  17070. this.state = this.attrVal;
  17071. return;
  17072. }
  17073. if (this.content[this.i] === '=') {
  17074. needVal = true;
  17075. } else {
  17076. this.start = this.i;
  17077. this.state = this.attrName;
  17078. return;
  17079. }
  17080. }
  17081. }
  17082. } else if (!this.checkClose('onAttrName')) {
  17083. this.i++;
  17084. }
  17085. };
  17086. /**
  17087. * @description 属性值状态
  17088. * @private
  17089. */
  17090. Lexer.prototype.attrVal = function () {
  17091. var c = this.content[this.i];
  17092. var len = this.content.length;
  17093. if (c === '"' || c === "'") {
  17094. // 有冒号的属性
  17095. this.start = ++this.i;
  17096. this.i = this.content.indexOf(c, this.i);
  17097. if (this.i === -1) return;
  17098. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  17099. } else {
  17100. // 没有冒号的属性
  17101. for (; this.i < len; this.i++) {
  17102. if (blankChar[this.content[this.i]]) {
  17103. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  17104. break;
  17105. } else if (this.checkClose('onAttrVal')) return;
  17106. }
  17107. }
  17108. while (blankChar[this.content[++this.i]]) {
  17109. ;
  17110. }
  17111. if (this.i < len && !this.checkClose()) {
  17112. this.start = this.i;
  17113. this.state = this.attrName;
  17114. }
  17115. };
  17116. /**
  17117. * @description 结束标签状态
  17118. * @returns {String} 结束的标签名
  17119. * @private
  17120. */
  17121. Lexer.prototype.endTag = function () {
  17122. var c = this.content[this.i];
  17123. if (blankChar[c] || c === '>' || c === '/') {
  17124. this.handler.onCloseTag(this.content.substring(this.start, this.i));
  17125. if (c !== '>') {
  17126. this.i = this.content.indexOf('>', this.i);
  17127. if (this.i === -1) return;
  17128. }
  17129. this.start = ++this.i;
  17130. this.state = this.text;
  17131. } else {
  17132. this.i++;
  17133. }
  17134. };
  17135. var _default = Parser;
  17136. exports.default = _default;
  17137. /* 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"]))
  17138. /***/ }),
  17139. /***/ 48:
  17140. /*!************************************************************************!*\
  17141. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/queryParams.js ***!
  17142. \************************************************************************/
  17143. /*! no static exports found */
  17144. /***/ (function(module, exports, __webpack_require__) {
  17145. "use strict";
  17146. Object.defineProperty(exports, "__esModule", {
  17147. value: true
  17148. });
  17149. exports.default = void 0;
  17150. /**
  17151. * 对象转url参数
  17152. * @param {*} data,对象
  17153. * @param {*} isPrefix,是否自动加上"?"
  17154. */
  17155. function queryParams() {
  17156. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17157. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  17158. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  17159. var prefix = isPrefix ? '?' : '';
  17160. var _result = [];
  17161. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  17162. var _loop = function _loop(key) {
  17163. var value = data[key];
  17164. // 去掉为空的参数
  17165. if (['', undefined, null].indexOf(value) >= 0) {
  17166. return "continue";
  17167. }
  17168. // 如果值为数组,另行处理
  17169. if (value.constructor === Array) {
  17170. // e.g. {ids: [1, 2, 3]}
  17171. switch (arrayFormat) {
  17172. case 'indices':
  17173. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  17174. for (var i = 0; i < value.length; i++) {
  17175. _result.push(key + '[' + i + ']=' + value[i]);
  17176. }
  17177. break;
  17178. case 'brackets':
  17179. // 结果: ids[]=1&ids[]=2&ids[]=3
  17180. value.forEach(function (_value) {
  17181. _result.push(key + '[]=' + _value);
  17182. });
  17183. break;
  17184. case 'repeat':
  17185. // 结果: ids=1&ids=2&ids=3
  17186. value.forEach(function (_value) {
  17187. _result.push(key + '=' + _value);
  17188. });
  17189. break;
  17190. case 'comma':
  17191. // 结果: ids=1,2,3
  17192. var commaStr = "";
  17193. value.forEach(function (_value) {
  17194. commaStr += (commaStr ? "," : "") + _value;
  17195. });
  17196. _result.push(key + '=' + commaStr);
  17197. break;
  17198. default:
  17199. value.forEach(function (_value) {
  17200. _result.push(key + '[]=' + _value);
  17201. });
  17202. }
  17203. } else {
  17204. _result.push(key + '=' + value);
  17205. }
  17206. };
  17207. for (var key in data) {
  17208. var _ret = _loop(key);
  17209. if (_ret === "continue") continue;
  17210. }
  17211. return _result.length ? prefix + _result.join('&') : '';
  17212. }
  17213. var _default = queryParams;
  17214. exports.default = _default;
  17215. /***/ }),
  17216. /***/ 49:
  17217. /*!******************************************************************!*\
  17218. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/route.js ***!
  17219. \******************************************************************/
  17220. /*! no static exports found */
  17221. /***/ (function(module, exports, __webpack_require__) {
  17222. "use strict";
  17223. /* WEBPACK VAR INJECTION */(function(uni) {
  17224. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  17225. Object.defineProperty(exports, "__esModule", {
  17226. value: true
  17227. });
  17228. exports.default = void 0;
  17229. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  17230. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  17231. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  17232. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  17233. /**
  17234. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  17235. * 并且带有路由拦截功能
  17236. */
  17237. var Router = /*#__PURE__*/function () {
  17238. function Router() {
  17239. (0, _classCallCheck2.default)(this, Router);
  17240. // 原始属性定义
  17241. this.config = {
  17242. type: 'navigateTo',
  17243. url: '',
  17244. delta: 1,
  17245. // navigateBack页面后退时,回退的层数
  17246. params: {},
  17247. // 传递的参数
  17248. animationType: 'pop-in',
  17249. // 窗口动画,只在APP有效
  17250. animationDuration: 300,
  17251. // 窗口动画持续时间,单位毫秒,只在APP有效
  17252. intercept: false // 是否需要拦截
  17253. };
  17254. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  17255. // 这里在构造函数中进行this绑定
  17256. this.route = this.route.bind(this);
  17257. }
  17258. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  17259. (0, _createClass2.default)(Router, [{
  17260. key: "addRootPath",
  17261. value: function addRootPath(url) {
  17262. return url[0] === '/' ? url : "/".concat(url);
  17263. }
  17264. // 整合路由参数
  17265. }, {
  17266. key: "mixinParam",
  17267. value: function mixinParam(url, params) {
  17268. url = url && this.addRootPath(url);
  17269. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  17270. // 如果有url中有get参数,转换后无需带上"?"
  17271. var query = '';
  17272. if (/.*\/.*\?.*=.*/.test(url)) {
  17273. // object对象转为get类型的参数
  17274. query = uni.$u.queryParams(params, false);
  17275. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  17276. return url += "&" + query;
  17277. } else {
  17278. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  17279. query = uni.$u.queryParams(params);
  17280. return url += query;
  17281. }
  17282. }
  17283. // 对外的方法名称
  17284. }, {
  17285. key: "route",
  17286. value: function () {
  17287. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  17288. var options,
  17289. params,
  17290. mergeConfig,
  17291. isNext,
  17292. _args = arguments;
  17293. return _regenerator.default.wrap(function _callee$(_context) {
  17294. while (1) {
  17295. switch (_context.prev = _context.next) {
  17296. case 0:
  17297. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  17298. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  17299. // 合并用户的配置和内部的默认配置
  17300. mergeConfig = {};
  17301. if (typeof options === 'string') {
  17302. // 如果options为字符串,则为route(url, params)的形式
  17303. mergeConfig.url = this.mixinParam(options, params);
  17304. mergeConfig.type = 'navigateTo';
  17305. } else {
  17306. mergeConfig = uni.$u.deepClone(options, this.config);
  17307. // 否则正常使用mergeConfig中的url和params进行拼接
  17308. mergeConfig.url = this.mixinParam(options.url, options.params);
  17309. }
  17310. if (params.intercept) {
  17311. this.config.intercept = params.intercept;
  17312. }
  17313. // params参数也带给拦截器
  17314. mergeConfig.params = params;
  17315. // 合并内外部参数
  17316. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  17317. // 判断用户是否定义了拦截器
  17318. if (!(typeof uni.$u.routeIntercept === 'function')) {
  17319. _context.next = 14;
  17320. break;
  17321. }
  17322. _context.next = 10;
  17323. return new Promise(function (resolve, reject) {
  17324. uni.$u.routeIntercept(mergeConfig, resolve);
  17325. });
  17326. case 10:
  17327. isNext = _context.sent;
  17328. // 如果isNext为true,则执行路由跳转
  17329. isNext && this.openPage(mergeConfig);
  17330. _context.next = 15;
  17331. break;
  17332. case 14:
  17333. this.openPage(mergeConfig);
  17334. case 15:
  17335. case "end":
  17336. return _context.stop();
  17337. }
  17338. }
  17339. }, _callee, this);
  17340. }));
  17341. function route() {
  17342. return _route.apply(this, arguments);
  17343. }
  17344. return route;
  17345. }() // 执行路由跳转
  17346. }, {
  17347. key: "openPage",
  17348. value: function openPage(config) {
  17349. // 解构参数
  17350. var url = config.url,
  17351. type = config.type,
  17352. delta = config.delta,
  17353. animationType = config.animationType,
  17354. animationDuration = config.animationDuration;
  17355. if (config.type == 'navigateTo' || config.type == 'to') {
  17356. uni.navigateTo({
  17357. url: url,
  17358. animationType: animationType,
  17359. animationDuration: animationDuration
  17360. });
  17361. }
  17362. if (config.type == 'redirectTo' || config.type == 'redirect') {
  17363. uni.redirectTo({
  17364. url: url
  17365. });
  17366. }
  17367. if (config.type == 'switchTab' || config.type == 'tab') {
  17368. uni.switchTab({
  17369. url: url
  17370. });
  17371. }
  17372. if (config.type == 'reLaunch' || config.type == 'launch') {
  17373. uni.reLaunch({
  17374. url: url
  17375. });
  17376. }
  17377. if (config.type == 'navigateBack' || config.type == 'back') {
  17378. uni.navigateBack({
  17379. delta: delta
  17380. });
  17381. }
  17382. }
  17383. }]);
  17384. return Router;
  17385. }();
  17386. var _default = new Router().route;
  17387. exports.default = _default;
  17388. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  17389. /***/ }),
  17390. /***/ 493:
  17391. /*!*****************************************************************!*\
  17392. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/province.js ***!
  17393. \*****************************************************************/
  17394. /*! no static exports found */
  17395. /***/ (function(module, exports, __webpack_require__) {
  17396. "use strict";
  17397. Object.defineProperty(exports, "__esModule", {
  17398. value: true
  17399. });
  17400. exports.default = void 0;
  17401. var provinceData = [{
  17402. "label": "北京市",
  17403. "value": "11"
  17404. }, {
  17405. "label": "天津市",
  17406. "value": "12"
  17407. }, {
  17408. "label": "河北省",
  17409. "value": "13"
  17410. }, {
  17411. "label": "山西省",
  17412. "value": "14"
  17413. }, {
  17414. "label": "内蒙古自治区",
  17415. "value": "15"
  17416. }, {
  17417. "label": "辽宁省",
  17418. "value": "21"
  17419. }, {
  17420. "label": "吉林省",
  17421. "value": "22"
  17422. }, {
  17423. "label": "黑龙江省",
  17424. "value": "23"
  17425. }, {
  17426. "label": "上海市",
  17427. "value": "31"
  17428. }, {
  17429. "label": "江苏省",
  17430. "value": "32"
  17431. }, {
  17432. "label": "浙江省",
  17433. "value": "33"
  17434. }, {
  17435. "label": "安徽省",
  17436. "value": "34"
  17437. }, {
  17438. "label": "福建省",
  17439. "value": "35"
  17440. }, {
  17441. "label": "江西省",
  17442. "value": "36"
  17443. }, {
  17444. "label": "山东省",
  17445. "value": "37"
  17446. }, {
  17447. "label": "河南省",
  17448. "value": "41"
  17449. }, {
  17450. "label": "湖北省",
  17451. "value": "42"
  17452. }, {
  17453. "label": "湖南省",
  17454. "value": "43"
  17455. }, {
  17456. "label": "广东省",
  17457. "value": "44"
  17458. }, {
  17459. "label": "广西壮族自治区",
  17460. "value": "45"
  17461. }, {
  17462. "label": "海南省",
  17463. "value": "46"
  17464. }, {
  17465. "label": "重庆市",
  17466. "value": "50"
  17467. }, {
  17468. "label": "四川省",
  17469. "value": "51"
  17470. }, {
  17471. "label": "贵州省",
  17472. "value": "52"
  17473. }, {
  17474. "label": "云南省",
  17475. "value": "53"
  17476. }, {
  17477. "label": "西藏自治区",
  17478. "value": "54"
  17479. }, {
  17480. "label": "陕西省",
  17481. "value": "61"
  17482. }, {
  17483. "label": "甘肃省",
  17484. "value": "62"
  17485. }, {
  17486. "label": "青海省",
  17487. "value": "63"
  17488. }, {
  17489. "label": "宁夏回族自治区",
  17490. "value": "64"
  17491. }, {
  17492. "label": "新疆维吾尔自治区",
  17493. "value": "65"
  17494. }, {
  17495. "label": "台湾",
  17496. "value": "66"
  17497. }, {
  17498. "label": "香港",
  17499. "value": "67"
  17500. }, {
  17501. "label": "澳门",
  17502. "value": "68"
  17503. }];
  17504. var _default = provinceData;
  17505. exports.default = _default;
  17506. /***/ }),
  17507. /***/ 494:
  17508. /*!*************************************************************!*\
  17509. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/city.js ***!
  17510. \*************************************************************/
  17511. /*! no static exports found */
  17512. /***/ (function(module, exports, __webpack_require__) {
  17513. "use strict";
  17514. Object.defineProperty(exports, "__esModule", {
  17515. value: true
  17516. });
  17517. exports.default = void 0;
  17518. var cityData = [[{
  17519. "label": "市辖区",
  17520. "value": "1101"
  17521. }], [{
  17522. "label": "市辖区",
  17523. "value": "1201"
  17524. }], [{
  17525. "label": "石家庄市",
  17526. "value": "1301"
  17527. }, {
  17528. "label": "唐山市",
  17529. "value": "1302"
  17530. }, {
  17531. "label": "秦皇岛市",
  17532. "value": "1303"
  17533. }, {
  17534. "label": "邯郸市",
  17535. "value": "1304"
  17536. }, {
  17537. "label": "邢台市",
  17538. "value": "1305"
  17539. }, {
  17540. "label": "保定市",
  17541. "value": "1306"
  17542. }, {
  17543. "label": "张家口市",
  17544. "value": "1307"
  17545. }, {
  17546. "label": "承德市",
  17547. "value": "1308"
  17548. }, {
  17549. "label": "沧州市",
  17550. "value": "1309"
  17551. }, {
  17552. "label": "廊坊市",
  17553. "value": "1310"
  17554. }, {
  17555. "label": "衡水市",
  17556. "value": "1311"
  17557. }], [{
  17558. "label": "太原市",
  17559. "value": "1401"
  17560. }, {
  17561. "label": "大同市",
  17562. "value": "1402"
  17563. }, {
  17564. "label": "阳泉市",
  17565. "value": "1403"
  17566. }, {
  17567. "label": "长治市",
  17568. "value": "1404"
  17569. }, {
  17570. "label": "晋城市",
  17571. "value": "1405"
  17572. }, {
  17573. "label": "朔州市",
  17574. "value": "1406"
  17575. }, {
  17576. "label": "晋中市",
  17577. "value": "1407"
  17578. }, {
  17579. "label": "运城市",
  17580. "value": "1408"
  17581. }, {
  17582. "label": "忻州市",
  17583. "value": "1409"
  17584. }, {
  17585. "label": "临汾市",
  17586. "value": "1410"
  17587. }, {
  17588. "label": "吕梁市",
  17589. "value": "1411"
  17590. }], [{
  17591. "label": "呼和浩特市",
  17592. "value": "1501"
  17593. }, {
  17594. "label": "包头市",
  17595. "value": "1502"
  17596. }, {
  17597. "label": "乌海市",
  17598. "value": "1503"
  17599. }, {
  17600. "label": "赤峰市",
  17601. "value": "1504"
  17602. }, {
  17603. "label": "通辽市",
  17604. "value": "1505"
  17605. }, {
  17606. "label": "鄂尔多斯市",
  17607. "value": "1506"
  17608. }, {
  17609. "label": "呼伦贝尔市",
  17610. "value": "1507"
  17611. }, {
  17612. "label": "巴彦淖尔市",
  17613. "value": "1508"
  17614. }, {
  17615. "label": "乌兰察布市",
  17616. "value": "1509"
  17617. }, {
  17618. "label": "兴安盟",
  17619. "value": "1522"
  17620. }, {
  17621. "label": "锡林郭勒盟",
  17622. "value": "1525"
  17623. }, {
  17624. "label": "阿拉善盟",
  17625. "value": "1529"
  17626. }], [{
  17627. "label": "沈阳市",
  17628. "value": "2101"
  17629. }, {
  17630. "label": "大连市",
  17631. "value": "2102"
  17632. }, {
  17633. "label": "鞍山市",
  17634. "value": "2103"
  17635. }, {
  17636. "label": "抚顺市",
  17637. "value": "2104"
  17638. }, {
  17639. "label": "本溪市",
  17640. "value": "2105"
  17641. }, {
  17642. "label": "丹东市",
  17643. "value": "2106"
  17644. }, {
  17645. "label": "锦州市",
  17646. "value": "2107"
  17647. }, {
  17648. "label": "营口市",
  17649. "value": "2108"
  17650. }, {
  17651. "label": "阜新市",
  17652. "value": "2109"
  17653. }, {
  17654. "label": "辽阳市",
  17655. "value": "2110"
  17656. }, {
  17657. "label": "盘锦市",
  17658. "value": "2111"
  17659. }, {
  17660. "label": "铁岭市",
  17661. "value": "2112"
  17662. }, {
  17663. "label": "朝阳市",
  17664. "value": "2113"
  17665. }, {
  17666. "label": "葫芦岛市",
  17667. "value": "2114"
  17668. }], [{
  17669. "label": "长春市",
  17670. "value": "2201"
  17671. }, {
  17672. "label": "吉林市",
  17673. "value": "2202"
  17674. }, {
  17675. "label": "四平市",
  17676. "value": "2203"
  17677. }, {
  17678. "label": "辽源市",
  17679. "value": "2204"
  17680. }, {
  17681. "label": "通化市",
  17682. "value": "2205"
  17683. }, {
  17684. "label": "白山市",
  17685. "value": "2206"
  17686. }, {
  17687. "label": "松原市",
  17688. "value": "2207"
  17689. }, {
  17690. "label": "白城市",
  17691. "value": "2208"
  17692. }, {
  17693. "label": "延边朝鲜族自治州",
  17694. "value": "2224"
  17695. }], [{
  17696. "label": "哈尔滨市",
  17697. "value": "2301"
  17698. }, {
  17699. "label": "齐齐哈尔市",
  17700. "value": "2302"
  17701. }, {
  17702. "label": "鸡西市",
  17703. "value": "2303"
  17704. }, {
  17705. "label": "鹤岗市",
  17706. "value": "2304"
  17707. }, {
  17708. "label": "双鸭山市",
  17709. "value": "2305"
  17710. }, {
  17711. "label": "大庆市",
  17712. "value": "2306"
  17713. }, {
  17714. "label": "伊春市",
  17715. "value": "2307"
  17716. }, {
  17717. "label": "佳木斯市",
  17718. "value": "2308"
  17719. }, {
  17720. "label": "七台河市",
  17721. "value": "2309"
  17722. }, {
  17723. "label": "牡丹江市",
  17724. "value": "2310"
  17725. }, {
  17726. "label": "黑河市",
  17727. "value": "2311"
  17728. }, {
  17729. "label": "绥化市",
  17730. "value": "2312"
  17731. }, {
  17732. "label": "大兴安岭地区",
  17733. "value": "2327"
  17734. }], [{
  17735. "label": "市辖区",
  17736. "value": "3101"
  17737. }], [{
  17738. "label": "南京市",
  17739. "value": "3201"
  17740. }, {
  17741. "label": "无锡市",
  17742. "value": "3202"
  17743. }, {
  17744. "label": "徐州市",
  17745. "value": "3203"
  17746. }, {
  17747. "label": "常州市",
  17748. "value": "3204"
  17749. }, {
  17750. "label": "苏州市",
  17751. "value": "3205"
  17752. }, {
  17753. "label": "南通市",
  17754. "value": "3206"
  17755. }, {
  17756. "label": "连云港市",
  17757. "value": "3207"
  17758. }, {
  17759. "label": "淮安市",
  17760. "value": "3208"
  17761. }, {
  17762. "label": "盐城市",
  17763. "value": "3209"
  17764. }, {
  17765. "label": "扬州市",
  17766. "value": "3210"
  17767. }, {
  17768. "label": "镇江市",
  17769. "value": "3211"
  17770. }, {
  17771. "label": "泰州市",
  17772. "value": "3212"
  17773. }, {
  17774. "label": "宿迁市",
  17775. "value": "3213"
  17776. }], [{
  17777. "label": "杭州市",
  17778. "value": "3301"
  17779. }, {
  17780. "label": "宁波市",
  17781. "value": "3302"
  17782. }, {
  17783. "label": "温州市",
  17784. "value": "3303"
  17785. }, {
  17786. "label": "嘉兴市",
  17787. "value": "3304"
  17788. }, {
  17789. "label": "湖州市",
  17790. "value": "3305"
  17791. }, {
  17792. "label": "绍兴市",
  17793. "value": "3306"
  17794. }, {
  17795. "label": "金华市",
  17796. "value": "3307"
  17797. }, {
  17798. "label": "衢州市",
  17799. "value": "3308"
  17800. }, {
  17801. "label": "舟山市",
  17802. "value": "3309"
  17803. }, {
  17804. "label": "台州市",
  17805. "value": "3310"
  17806. }, {
  17807. "label": "丽水市",
  17808. "value": "3311"
  17809. }], [{
  17810. "label": "合肥市",
  17811. "value": "3401"
  17812. }, {
  17813. "label": "芜湖市",
  17814. "value": "3402"
  17815. }, {
  17816. "label": "蚌埠市",
  17817. "value": "3403"
  17818. }, {
  17819. "label": "淮南市",
  17820. "value": "3404"
  17821. }, {
  17822. "label": "马鞍山市",
  17823. "value": "3405"
  17824. }, {
  17825. "label": "淮北市",
  17826. "value": "3406"
  17827. }, {
  17828. "label": "铜陵市",
  17829. "value": "3407"
  17830. }, {
  17831. "label": "安庆市",
  17832. "value": "3408"
  17833. }, {
  17834. "label": "黄山市",
  17835. "value": "3410"
  17836. }, {
  17837. "label": "滁州市",
  17838. "value": "3411"
  17839. }, {
  17840. "label": "阜阳市",
  17841. "value": "3412"
  17842. }, {
  17843. "label": "宿州市",
  17844. "value": "3413"
  17845. }, {
  17846. "label": "六安市",
  17847. "value": "3415"
  17848. }, {
  17849. "label": "亳州市",
  17850. "value": "3416"
  17851. }, {
  17852. "label": "池州市",
  17853. "value": "3417"
  17854. }, {
  17855. "label": "宣城市",
  17856. "value": "3418"
  17857. }], [{
  17858. "label": "福州市",
  17859. "value": "3501"
  17860. }, {
  17861. "label": "厦门市",
  17862. "value": "3502"
  17863. }, {
  17864. "label": "莆田市",
  17865. "value": "3503"
  17866. }, {
  17867. "label": "三明市",
  17868. "value": "3504"
  17869. }, {
  17870. "label": "泉州市",
  17871. "value": "3505"
  17872. }, {
  17873. "label": "漳州市",
  17874. "value": "3506"
  17875. }, {
  17876. "label": "南平市",
  17877. "value": "3507"
  17878. }, {
  17879. "label": "龙岩市",
  17880. "value": "3508"
  17881. }, {
  17882. "label": "宁德市",
  17883. "value": "3509"
  17884. }], [{
  17885. "label": "南昌市",
  17886. "value": "3601"
  17887. }, {
  17888. "label": "景德镇市",
  17889. "value": "3602"
  17890. }, {
  17891. "label": "萍乡市",
  17892. "value": "3603"
  17893. }, {
  17894. "label": "九江市",
  17895. "value": "3604"
  17896. }, {
  17897. "label": "新余市",
  17898. "value": "3605"
  17899. }, {
  17900. "label": "鹰潭市",
  17901. "value": "3606"
  17902. }, {
  17903. "label": "赣州市",
  17904. "value": "3607"
  17905. }, {
  17906. "label": "吉安市",
  17907. "value": "3608"
  17908. }, {
  17909. "label": "宜春市",
  17910. "value": "3609"
  17911. }, {
  17912. "label": "抚州市",
  17913. "value": "3610"
  17914. }, {
  17915. "label": "上饶市",
  17916. "value": "3611"
  17917. }], [{
  17918. "label": "济南市",
  17919. "value": "3701"
  17920. }, {
  17921. "label": "青岛市",
  17922. "value": "3702"
  17923. }, {
  17924. "label": "淄博市",
  17925. "value": "3703"
  17926. }, {
  17927. "label": "枣庄市",
  17928. "value": "3704"
  17929. }, {
  17930. "label": "东营市",
  17931. "value": "3705"
  17932. }, {
  17933. "label": "烟台市",
  17934. "value": "3706"
  17935. }, {
  17936. "label": "潍坊市",
  17937. "value": "3707"
  17938. }, {
  17939. "label": "济宁市",
  17940. "value": "3708"
  17941. }, {
  17942. "label": "泰安市",
  17943. "value": "3709"
  17944. }, {
  17945. "label": "威海市",
  17946. "value": "3710"
  17947. }, {
  17948. "label": "日照市",
  17949. "value": "3711"
  17950. }, {
  17951. "label": "莱芜市",
  17952. "value": "3712"
  17953. }, {
  17954. "label": "临沂市",
  17955. "value": "3713"
  17956. }, {
  17957. "label": "德州市",
  17958. "value": "3714"
  17959. }, {
  17960. "label": "聊城市",
  17961. "value": "3715"
  17962. }, {
  17963. "label": "滨州市",
  17964. "value": "3716"
  17965. }, {
  17966. "label": "菏泽市",
  17967. "value": "3717"
  17968. }], [{
  17969. "label": "郑州市",
  17970. "value": "4101"
  17971. }, {
  17972. "label": "开封市",
  17973. "value": "4102"
  17974. }, {
  17975. "label": "洛阳市",
  17976. "value": "4103"
  17977. }, {
  17978. "label": "平顶山市",
  17979. "value": "4104"
  17980. }, {
  17981. "label": "安阳市",
  17982. "value": "4105"
  17983. }, {
  17984. "label": "鹤壁市",
  17985. "value": "4106"
  17986. }, {
  17987. "label": "新乡市",
  17988. "value": "4107"
  17989. }, {
  17990. "label": "焦作市",
  17991. "value": "4108"
  17992. }, {
  17993. "label": "濮阳市",
  17994. "value": "4109"
  17995. }, {
  17996. "label": "许昌市",
  17997. "value": "4110"
  17998. }, {
  17999. "label": "漯河市",
  18000. "value": "4111"
  18001. }, {
  18002. "label": "三门峡市",
  18003. "value": "4112"
  18004. }, {
  18005. "label": "南阳市",
  18006. "value": "4113"
  18007. }, {
  18008. "label": "商丘市",
  18009. "value": "4114"
  18010. }, {
  18011. "label": "信阳市",
  18012. "value": "4115"
  18013. }, {
  18014. "label": "周口市",
  18015. "value": "4116"
  18016. }, {
  18017. "label": "驻马店市",
  18018. "value": "4117"
  18019. }, {
  18020. "label": "省直辖县级行政区划",
  18021. "value": "4190"
  18022. }], [{
  18023. "label": "武汉市",
  18024. "value": "4201"
  18025. }, {
  18026. "label": "黄石市",
  18027. "value": "4202"
  18028. }, {
  18029. "label": "十堰市",
  18030. "value": "4203"
  18031. }, {
  18032. "label": "宜昌市",
  18033. "value": "4205"
  18034. }, {
  18035. "label": "襄阳市",
  18036. "value": "4206"
  18037. }, {
  18038. "label": "鄂州市",
  18039. "value": "4207"
  18040. }, {
  18041. "label": "荆门市",
  18042. "value": "4208"
  18043. }, {
  18044. "label": "孝感市",
  18045. "value": "4209"
  18046. }, {
  18047. "label": "荆州市",
  18048. "value": "4210"
  18049. }, {
  18050. "label": "黄冈市",
  18051. "value": "4211"
  18052. }, {
  18053. "label": "咸宁市",
  18054. "value": "4212"
  18055. }, {
  18056. "label": "随州市",
  18057. "value": "4213"
  18058. }, {
  18059. "label": "恩施土家族苗族自治州",
  18060. "value": "4228"
  18061. }, {
  18062. "label": "省直辖县级行政区划",
  18063. "value": "4290"
  18064. }], [{
  18065. "label": "长沙市",
  18066. "value": "4301"
  18067. }, {
  18068. "label": "株洲市",
  18069. "value": "4302"
  18070. }, {
  18071. "label": "湘潭市",
  18072. "value": "4303"
  18073. }, {
  18074. "label": "衡阳市",
  18075. "value": "4304"
  18076. }, {
  18077. "label": "邵阳市",
  18078. "value": "4305"
  18079. }, {
  18080. "label": "岳阳市",
  18081. "value": "4306"
  18082. }, {
  18083. "label": "常德市",
  18084. "value": "4307"
  18085. }, {
  18086. "label": "张家界市",
  18087. "value": "4308"
  18088. }, {
  18089. "label": "益阳市",
  18090. "value": "4309"
  18091. }, {
  18092. "label": "郴州市",
  18093. "value": "4310"
  18094. }, {
  18095. "label": "永州市",
  18096. "value": "4311"
  18097. }, {
  18098. "label": "怀化市",
  18099. "value": "4312"
  18100. }, {
  18101. "label": "娄底市",
  18102. "value": "4313"
  18103. }, {
  18104. "label": "湘西土家族苗族自治州",
  18105. "value": "4331"
  18106. }], [{
  18107. "label": "广州市",
  18108. "value": "4401"
  18109. }, {
  18110. "label": "韶关市",
  18111. "value": "4402"
  18112. }, {
  18113. "label": "深圳市",
  18114. "value": "4403"
  18115. }, {
  18116. "label": "珠海市",
  18117. "value": "4404"
  18118. }, {
  18119. "label": "汕头市",
  18120. "value": "4405"
  18121. }, {
  18122. "label": "佛山市",
  18123. "value": "4406"
  18124. }, {
  18125. "label": "江门市",
  18126. "value": "4407"
  18127. }, {
  18128. "label": "湛江市",
  18129. "value": "4408"
  18130. }, {
  18131. "label": "茂名市",
  18132. "value": "4409"
  18133. }, {
  18134. "label": "肇庆市",
  18135. "value": "4412"
  18136. }, {
  18137. "label": "惠州市",
  18138. "value": "4413"
  18139. }, {
  18140. "label": "梅州市",
  18141. "value": "4414"
  18142. }, {
  18143. "label": "汕尾市",
  18144. "value": "4415"
  18145. }, {
  18146. "label": "河源市",
  18147. "value": "4416"
  18148. }, {
  18149. "label": "阳江市",
  18150. "value": "4417"
  18151. }, {
  18152. "label": "清远市",
  18153. "value": "4418"
  18154. }, {
  18155. "label": "东莞市",
  18156. "value": "4419"
  18157. }, {
  18158. "label": "中山市",
  18159. "value": "4420"
  18160. }, {
  18161. "label": "潮州市",
  18162. "value": "4451"
  18163. }, {
  18164. "label": "揭阳市",
  18165. "value": "4452"
  18166. }, {
  18167. "label": "云浮市",
  18168. "value": "4453"
  18169. }], [{
  18170. "label": "南宁市",
  18171. "value": "4501"
  18172. }, {
  18173. "label": "柳州市",
  18174. "value": "4502"
  18175. }, {
  18176. "label": "桂林市",
  18177. "value": "4503"
  18178. }, {
  18179. "label": "梧州市",
  18180. "value": "4504"
  18181. }, {
  18182. "label": "北海市",
  18183. "value": "4505"
  18184. }, {
  18185. "label": "防城港市",
  18186. "value": "4506"
  18187. }, {
  18188. "label": "钦州市",
  18189. "value": "4507"
  18190. }, {
  18191. "label": "贵港市",
  18192. "value": "4508"
  18193. }, {
  18194. "label": "玉林市",
  18195. "value": "4509"
  18196. }, {
  18197. "label": "百色市",
  18198. "value": "4510"
  18199. }, {
  18200. "label": "贺州市",
  18201. "value": "4511"
  18202. }, {
  18203. "label": "河池市",
  18204. "value": "4512"
  18205. }, {
  18206. "label": "来宾市",
  18207. "value": "4513"
  18208. }, {
  18209. "label": "崇左市",
  18210. "value": "4514"
  18211. }], [{
  18212. "label": "海口市",
  18213. "value": "4601"
  18214. }, {
  18215. "label": "三亚市",
  18216. "value": "4602"
  18217. }, {
  18218. "label": "三沙市",
  18219. "value": "4603"
  18220. }, {
  18221. "label": "儋州市",
  18222. "value": "4604"
  18223. }, {
  18224. "label": "省直辖县级行政区划",
  18225. "value": "4690"
  18226. }], [{
  18227. "label": "市辖区",
  18228. "value": "5001"
  18229. }, {
  18230. "label": "县",
  18231. "value": "5002"
  18232. }], [{
  18233. "label": "成都市",
  18234. "value": "5101"
  18235. }, {
  18236. "label": "自贡市",
  18237. "value": "5103"
  18238. }, {
  18239. "label": "攀枝花市",
  18240. "value": "5104"
  18241. }, {
  18242. "label": "泸州市",
  18243. "value": "5105"
  18244. }, {
  18245. "label": "德阳市",
  18246. "value": "5106"
  18247. }, {
  18248. "label": "绵阳市",
  18249. "value": "5107"
  18250. }, {
  18251. "label": "广元市",
  18252. "value": "5108"
  18253. }, {
  18254. "label": "遂宁市",
  18255. "value": "5109"
  18256. }, {
  18257. "label": "内江市",
  18258. "value": "5110"
  18259. }, {
  18260. "label": "乐山市",
  18261. "value": "5111"
  18262. }, {
  18263. "label": "南充市",
  18264. "value": "5113"
  18265. }, {
  18266. "label": "眉山市",
  18267. "value": "5114"
  18268. }, {
  18269. "label": "宜宾市",
  18270. "value": "5115"
  18271. }, {
  18272. "label": "广安市",
  18273. "value": "5116"
  18274. }, {
  18275. "label": "达州市",
  18276. "value": "5117"
  18277. }, {
  18278. "label": "雅安市",
  18279. "value": "5118"
  18280. }, {
  18281. "label": "巴中市",
  18282. "value": "5119"
  18283. }, {
  18284. "label": "资阳市",
  18285. "value": "5120"
  18286. }, {
  18287. "label": "阿坝藏族羌族自治州",
  18288. "value": "5132"
  18289. }, {
  18290. "label": "甘孜藏族自治州",
  18291. "value": "5133"
  18292. }, {
  18293. "label": "凉山彝族自治州",
  18294. "value": "5134"
  18295. }], [{
  18296. "label": "贵阳市",
  18297. "value": "5201"
  18298. }, {
  18299. "label": "六盘水市",
  18300. "value": "5202"
  18301. }, {
  18302. "label": "遵义市",
  18303. "value": "5203"
  18304. }, {
  18305. "label": "安顺市",
  18306. "value": "5204"
  18307. }, {
  18308. "label": "毕节市",
  18309. "value": "5205"
  18310. }, {
  18311. "label": "铜仁市",
  18312. "value": "5206"
  18313. }, {
  18314. "label": "黔西南布依族苗族自治州",
  18315. "value": "5223"
  18316. }, {
  18317. "label": "黔东南苗族侗族自治州",
  18318. "value": "5226"
  18319. }, {
  18320. "label": "黔南布依族苗族自治州",
  18321. "value": "5227"
  18322. }], [{
  18323. "label": "昆明市",
  18324. "value": "5301"
  18325. }, {
  18326. "label": "曲靖市",
  18327. "value": "5303"
  18328. }, {
  18329. "label": "玉溪市",
  18330. "value": "5304"
  18331. }, {
  18332. "label": "保山市",
  18333. "value": "5305"
  18334. }, {
  18335. "label": "昭通市",
  18336. "value": "5306"
  18337. }, {
  18338. "label": "丽江市",
  18339. "value": "5307"
  18340. }, {
  18341. "label": "普洱市",
  18342. "value": "5308"
  18343. }, {
  18344. "label": "临沧市",
  18345. "value": "5309"
  18346. }, {
  18347. "label": "楚雄彝族自治州",
  18348. "value": "5323"
  18349. }, {
  18350. "label": "红河哈尼族彝族自治州",
  18351. "value": "5325"
  18352. }, {
  18353. "label": "文山壮族苗族自治州",
  18354. "value": "5326"
  18355. }, {
  18356. "label": "西双版纳傣族自治州",
  18357. "value": "5328"
  18358. }, {
  18359. "label": "大理白族自治州",
  18360. "value": "5329"
  18361. }, {
  18362. "label": "德宏傣族景颇族自治州",
  18363. "value": "5331"
  18364. }, {
  18365. "label": "怒江傈僳族自治州",
  18366. "value": "5333"
  18367. }, {
  18368. "label": "迪庆藏族自治州",
  18369. "value": "5334"
  18370. }], [{
  18371. "label": "拉萨市",
  18372. "value": "5401"
  18373. }, {
  18374. "label": "日喀则市",
  18375. "value": "5402"
  18376. }, {
  18377. "label": "昌都市",
  18378. "value": "5403"
  18379. }, {
  18380. "label": "林芝市",
  18381. "value": "5404"
  18382. }, {
  18383. "label": "山南市",
  18384. "value": "5405"
  18385. }, {
  18386. "label": "那曲地区",
  18387. "value": "5424"
  18388. }, {
  18389. "label": "阿里地区",
  18390. "value": "5425"
  18391. }], [{
  18392. "label": "西安市",
  18393. "value": "6101"
  18394. }, {
  18395. "label": "铜川市",
  18396. "value": "6102"
  18397. }, {
  18398. "label": "宝鸡市",
  18399. "value": "6103"
  18400. }, {
  18401. "label": "咸阳市",
  18402. "value": "6104"
  18403. }, {
  18404. "label": "渭南市",
  18405. "value": "6105"
  18406. }, {
  18407. "label": "延安市",
  18408. "value": "6106"
  18409. }, {
  18410. "label": "汉中市",
  18411. "value": "6107"
  18412. }, {
  18413. "label": "榆林市",
  18414. "value": "6108"
  18415. }, {
  18416. "label": "安康市",
  18417. "value": "6109"
  18418. }, {
  18419. "label": "商洛市",
  18420. "value": "6110"
  18421. }], [{
  18422. "label": "兰州市",
  18423. "value": "6201"
  18424. }, {
  18425. "label": "嘉峪关市",
  18426. "value": "6202"
  18427. }, {
  18428. "label": "金昌市",
  18429. "value": "6203"
  18430. }, {
  18431. "label": "白银市",
  18432. "value": "6204"
  18433. }, {
  18434. "label": "天水市",
  18435. "value": "6205"
  18436. }, {
  18437. "label": "武威市",
  18438. "value": "6206"
  18439. }, {
  18440. "label": "张掖市",
  18441. "value": "6207"
  18442. }, {
  18443. "label": "平凉市",
  18444. "value": "6208"
  18445. }, {
  18446. "label": "酒泉市",
  18447. "value": "6209"
  18448. }, {
  18449. "label": "庆阳市",
  18450. "value": "6210"
  18451. }, {
  18452. "label": "定西市",
  18453. "value": "6211"
  18454. }, {
  18455. "label": "陇南市",
  18456. "value": "6212"
  18457. }, {
  18458. "label": "临夏回族自治州",
  18459. "value": "6229"
  18460. }, {
  18461. "label": "甘南藏族自治州",
  18462. "value": "6230"
  18463. }], [{
  18464. "label": "西宁市",
  18465. "value": "6301"
  18466. }, {
  18467. "label": "海东市",
  18468. "value": "6302"
  18469. }, {
  18470. "label": "海北藏族自治州",
  18471. "value": "6322"
  18472. }, {
  18473. "label": "黄南藏族自治州",
  18474. "value": "6323"
  18475. }, {
  18476. "label": "海南藏族自治州",
  18477. "value": "6325"
  18478. }, {
  18479. "label": "果洛藏族自治州",
  18480. "value": "6326"
  18481. }, {
  18482. "label": "玉树藏族自治州",
  18483. "value": "6327"
  18484. }, {
  18485. "label": "海西蒙古族藏族自治州",
  18486. "value": "6328"
  18487. }], [{
  18488. "label": "银川市",
  18489. "value": "6401"
  18490. }, {
  18491. "label": "石嘴山市",
  18492. "value": "6402"
  18493. }, {
  18494. "label": "吴忠市",
  18495. "value": "6403"
  18496. }, {
  18497. "label": "固原市",
  18498. "value": "6404"
  18499. }, {
  18500. "label": "中卫市",
  18501. "value": "6405"
  18502. }], [{
  18503. "label": "乌鲁木齐市",
  18504. "value": "6501"
  18505. }, {
  18506. "label": "克拉玛依市",
  18507. "value": "6502"
  18508. }, {
  18509. "label": "吐鲁番市",
  18510. "value": "6504"
  18511. }, {
  18512. "label": "哈密市",
  18513. "value": "6505"
  18514. }, {
  18515. "label": "昌吉回族自治州",
  18516. "value": "6523"
  18517. }, {
  18518. "label": "博尔塔拉蒙古自治州",
  18519. "value": "6527"
  18520. }, {
  18521. "label": "巴音郭楞蒙古自治州",
  18522. "value": "6528"
  18523. }, {
  18524. "label": "阿克苏地区",
  18525. "value": "6529"
  18526. }, {
  18527. "label": "克孜勒苏柯尔克孜自治州",
  18528. "value": "6530"
  18529. }, {
  18530. "label": "喀什地区",
  18531. "value": "6531"
  18532. }, {
  18533. "label": "和田地区",
  18534. "value": "6532"
  18535. }, {
  18536. "label": "伊犁哈萨克自治州",
  18537. "value": "6540"
  18538. }, {
  18539. "label": "塔城地区",
  18540. "value": "6542"
  18541. }, {
  18542. "label": "阿勒泰地区",
  18543. "value": "6543"
  18544. }, {
  18545. "label": "自治区直辖县级行政区划",
  18546. "value": "6590"
  18547. }], [{
  18548. "label": "台北",
  18549. "value": "6601"
  18550. }, {
  18551. "label": "高雄",
  18552. "value": "6602"
  18553. }, {
  18554. "label": "基隆",
  18555. "value": "6603"
  18556. }, {
  18557. "label": "台中",
  18558. "value": "6604"
  18559. }, {
  18560. "label": "台南",
  18561. "value": "6605"
  18562. }, {
  18563. "label": "新竹",
  18564. "value": "6606"
  18565. }, {
  18566. "label": "嘉义",
  18567. "value": "6607"
  18568. }, {
  18569. "label": "宜兰",
  18570. "value": "6608"
  18571. }, {
  18572. "label": "桃园",
  18573. "value": "6609"
  18574. }, {
  18575. "label": "苗栗",
  18576. "value": "6610"
  18577. }, {
  18578. "label": "彰化",
  18579. "value": "6611"
  18580. }, {
  18581. "label": "南投",
  18582. "value": "6612"
  18583. }, {
  18584. "label": "云林",
  18585. "value": "6613"
  18586. }, {
  18587. "label": "屏东",
  18588. "value": "6614"
  18589. }, {
  18590. "label": "台东",
  18591. "value": "6615"
  18592. }, {
  18593. "label": "花莲",
  18594. "value": "6616"
  18595. }, {
  18596. "label": "澎湖",
  18597. "value": "6617"
  18598. }], [{
  18599. "label": "香港岛",
  18600. "value": "6701"
  18601. }, {
  18602. "label": "九龙",
  18603. "value": "6702"
  18604. }, {
  18605. "label": "新界",
  18606. "value": "6703"
  18607. }], [{
  18608. "label": "澳门半岛",
  18609. "value": "6801"
  18610. }, {
  18611. "label": "氹仔岛",
  18612. "value": "6802"
  18613. }, {
  18614. "label": "路环岛",
  18615. "value": "6803"
  18616. }, {
  18617. "label": "路氹城",
  18618. "value": "6804"
  18619. }]];
  18620. var _default = cityData;
  18621. exports.default = _default;
  18622. /***/ }),
  18623. /***/ 495:
  18624. /*!*************************************************************!*\
  18625. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/area.js ***!
  18626. \*************************************************************/
  18627. /*! no static exports found */
  18628. /***/ (function(module, exports, __webpack_require__) {
  18629. "use strict";
  18630. Object.defineProperty(exports, "__esModule", {
  18631. value: true
  18632. });
  18633. exports.default = void 0;
  18634. var areaData = [[[{
  18635. "label": "东城区",
  18636. "value": "110101"
  18637. }, {
  18638. "label": "西城区",
  18639. "value": "110102"
  18640. }, {
  18641. "label": "朝阳区",
  18642. "value": "110105"
  18643. }, {
  18644. "label": "丰台区",
  18645. "value": "110106"
  18646. }, {
  18647. "label": "石景山区",
  18648. "value": "110107"
  18649. }, {
  18650. "label": "海淀区",
  18651. "value": "110108"
  18652. }, {
  18653. "label": "门头沟区",
  18654. "value": "110109"
  18655. }, {
  18656. "label": "房山区",
  18657. "value": "110111"
  18658. }, {
  18659. "label": "通州区",
  18660. "value": "110112"
  18661. }, {
  18662. "label": "顺义区",
  18663. "value": "110113"
  18664. }, {
  18665. "label": "昌平区",
  18666. "value": "110114"
  18667. }, {
  18668. "label": "大兴区",
  18669. "value": "110115"
  18670. }, {
  18671. "label": "怀柔区",
  18672. "value": "110116"
  18673. }, {
  18674. "label": "平谷区",
  18675. "value": "110117"
  18676. }, {
  18677. "label": "密云区",
  18678. "value": "110118"
  18679. }, {
  18680. "label": "延庆区",
  18681. "value": "110119"
  18682. }]], [[{
  18683. "label": "和平区",
  18684. "value": "120101"
  18685. }, {
  18686. "label": "河东区",
  18687. "value": "120102"
  18688. }, {
  18689. "label": "河西区",
  18690. "value": "120103"
  18691. }, {
  18692. "label": "南开区",
  18693. "value": "120104"
  18694. }, {
  18695. "label": "河北区",
  18696. "value": "120105"
  18697. }, {
  18698. "label": "红桥区",
  18699. "value": "120106"
  18700. }, {
  18701. "label": "东丽区",
  18702. "value": "120110"
  18703. }, {
  18704. "label": "西青区",
  18705. "value": "120111"
  18706. }, {
  18707. "label": "津南区",
  18708. "value": "120112"
  18709. }, {
  18710. "label": "北辰区",
  18711. "value": "120113"
  18712. }, {
  18713. "label": "武清区",
  18714. "value": "120114"
  18715. }, {
  18716. "label": "宝坻区",
  18717. "value": "120115"
  18718. }, {
  18719. "label": "滨海新区",
  18720. "value": "120116"
  18721. }, {
  18722. "label": "宁河区",
  18723. "value": "120117"
  18724. }, {
  18725. "label": "静海区",
  18726. "value": "120118"
  18727. }, {
  18728. "label": "蓟州区",
  18729. "value": "120119"
  18730. }]], [[{
  18731. "label": "长安区",
  18732. "value": "130102"
  18733. }, {
  18734. "label": "桥西区",
  18735. "value": "130104"
  18736. }, {
  18737. "label": "新华区",
  18738. "value": "130105"
  18739. }, {
  18740. "label": "井陉矿区",
  18741. "value": "130107"
  18742. }, {
  18743. "label": "裕华区",
  18744. "value": "130108"
  18745. }, {
  18746. "label": "藁城区",
  18747. "value": "130109"
  18748. }, {
  18749. "label": "鹿泉区",
  18750. "value": "130110"
  18751. }, {
  18752. "label": "栾城区",
  18753. "value": "130111"
  18754. }, {
  18755. "label": "井陉县",
  18756. "value": "130121"
  18757. }, {
  18758. "label": "正定县",
  18759. "value": "130123"
  18760. }, {
  18761. "label": "行唐县",
  18762. "value": "130125"
  18763. }, {
  18764. "label": "灵寿县",
  18765. "value": "130126"
  18766. }, {
  18767. "label": "高邑县",
  18768. "value": "130127"
  18769. }, {
  18770. "label": "深泽县",
  18771. "value": "130128"
  18772. }, {
  18773. "label": "赞皇县",
  18774. "value": "130129"
  18775. }, {
  18776. "label": "无极县",
  18777. "value": "130130"
  18778. }, {
  18779. "label": "平山县",
  18780. "value": "130131"
  18781. }, {
  18782. "label": "元氏县",
  18783. "value": "130132"
  18784. }, {
  18785. "label": "赵县",
  18786. "value": "130133"
  18787. }, {
  18788. "label": "石家庄高新技术产业开发区",
  18789. "value": "130171"
  18790. }, {
  18791. "label": "石家庄循环化工园区",
  18792. "value": "130172"
  18793. }, {
  18794. "label": "辛集市",
  18795. "value": "130181"
  18796. }, {
  18797. "label": "晋州市",
  18798. "value": "130183"
  18799. }, {
  18800. "label": "新乐市",
  18801. "value": "130184"
  18802. }], [{
  18803. "label": "路南区",
  18804. "value": "130202"
  18805. }, {
  18806. "label": "路北区",
  18807. "value": "130203"
  18808. }, {
  18809. "label": "古冶区",
  18810. "value": "130204"
  18811. }, {
  18812. "label": "开平区",
  18813. "value": "130205"
  18814. }, {
  18815. "label": "丰南区",
  18816. "value": "130207"
  18817. }, {
  18818. "label": "丰润区",
  18819. "value": "130208"
  18820. }, {
  18821. "label": "曹妃甸区",
  18822. "value": "130209"
  18823. }, {
  18824. "label": "滦县",
  18825. "value": "130223"
  18826. }, {
  18827. "label": "滦南县",
  18828. "value": "130224"
  18829. }, {
  18830. "label": "乐亭县",
  18831. "value": "130225"
  18832. }, {
  18833. "label": "迁西县",
  18834. "value": "130227"
  18835. }, {
  18836. "label": "玉田县",
  18837. "value": "130229"
  18838. }, {
  18839. "label": "唐山市芦台经济技术开发区",
  18840. "value": "130271"
  18841. }, {
  18842. "label": "唐山市汉沽管理区",
  18843. "value": "130272"
  18844. }, {
  18845. "label": "唐山高新技术产业开发区",
  18846. "value": "130273"
  18847. }, {
  18848. "label": "河北唐山海港经济开发区",
  18849. "value": "130274"
  18850. }, {
  18851. "label": "遵化市",
  18852. "value": "130281"
  18853. }, {
  18854. "label": "迁安市",
  18855. "value": "130283"
  18856. }], [{
  18857. "label": "海港区",
  18858. "value": "130302"
  18859. }, {
  18860. "label": "山海关区",
  18861. "value": "130303"
  18862. }, {
  18863. "label": "北戴河区",
  18864. "value": "130304"
  18865. }, {
  18866. "label": "抚宁区",
  18867. "value": "130306"
  18868. }, {
  18869. "label": "青龙满族自治县",
  18870. "value": "130321"
  18871. }, {
  18872. "label": "昌黎县",
  18873. "value": "130322"
  18874. }, {
  18875. "label": "卢龙县",
  18876. "value": "130324"
  18877. }, {
  18878. "label": "秦皇岛市经济技术开发区",
  18879. "value": "130371"
  18880. }, {
  18881. "label": "北戴河新区",
  18882. "value": "130372"
  18883. }], [{
  18884. "label": "邯山区",
  18885. "value": "130402"
  18886. }, {
  18887. "label": "丛台区",
  18888. "value": "130403"
  18889. }, {
  18890. "label": "复兴区",
  18891. "value": "130404"
  18892. }, {
  18893. "label": "峰峰矿区",
  18894. "value": "130406"
  18895. }, {
  18896. "label": "肥乡区",
  18897. "value": "130407"
  18898. }, {
  18899. "label": "永年区",
  18900. "value": "130408"
  18901. }, {
  18902. "label": "临漳县",
  18903. "value": "130423"
  18904. }, {
  18905. "label": "成安县",
  18906. "value": "130424"
  18907. }, {
  18908. "label": "大名县",
  18909. "value": "130425"
  18910. }, {
  18911. "label": "涉县",
  18912. "value": "130426"
  18913. }, {
  18914. "label": "磁县",
  18915. "value": "130427"
  18916. }, {
  18917. "label": "邱县",
  18918. "value": "130430"
  18919. }, {
  18920. "label": "鸡泽县",
  18921. "value": "130431"
  18922. }, {
  18923. "label": "广平县",
  18924. "value": "130432"
  18925. }, {
  18926. "label": "馆陶县",
  18927. "value": "130433"
  18928. }, {
  18929. "label": "魏县",
  18930. "value": "130434"
  18931. }, {
  18932. "label": "曲周县",
  18933. "value": "130435"
  18934. }, {
  18935. "label": "邯郸经济技术开发区",
  18936. "value": "130471"
  18937. }, {
  18938. "label": "邯郸冀南新区",
  18939. "value": "130473"
  18940. }, {
  18941. "label": "武安市",
  18942. "value": "130481"
  18943. }], [{
  18944. "label": "桥东区",
  18945. "value": "130502"
  18946. }, {
  18947. "label": "桥西区",
  18948. "value": "130503"
  18949. }, {
  18950. "label": "邢台县",
  18951. "value": "130521"
  18952. }, {
  18953. "label": "临城县",
  18954. "value": "130522"
  18955. }, {
  18956. "label": "内丘县",
  18957. "value": "130523"
  18958. }, {
  18959. "label": "柏乡县",
  18960. "value": "130524"
  18961. }, {
  18962. "label": "隆尧县",
  18963. "value": "130525"
  18964. }, {
  18965. "label": "任县",
  18966. "value": "130526"
  18967. }, {
  18968. "label": "南和县",
  18969. "value": "130527"
  18970. }, {
  18971. "label": "宁晋县",
  18972. "value": "130528"
  18973. }, {
  18974. "label": "巨鹿县",
  18975. "value": "130529"
  18976. }, {
  18977. "label": "新河县",
  18978. "value": "130530"
  18979. }, {
  18980. "label": "广宗县",
  18981. "value": "130531"
  18982. }, {
  18983. "label": "平乡县",
  18984. "value": "130532"
  18985. }, {
  18986. "label": "威县",
  18987. "value": "130533"
  18988. }, {
  18989. "label": "清河县",
  18990. "value": "130534"
  18991. }, {
  18992. "label": "临西县",
  18993. "value": "130535"
  18994. }, {
  18995. "label": "河北邢台经济开发区",
  18996. "value": "130571"
  18997. }, {
  18998. "label": "南宫市",
  18999. "value": "130581"
  19000. }, {
  19001. "label": "沙河市",
  19002. "value": "130582"
  19003. }], [{
  19004. "label": "竞秀区",
  19005. "value": "130602"
  19006. }, {
  19007. "label": "莲池区",
  19008. "value": "130606"
  19009. }, {
  19010. "label": "满城区",
  19011. "value": "130607"
  19012. }, {
  19013. "label": "清苑区",
  19014. "value": "130608"
  19015. }, {
  19016. "label": "徐水区",
  19017. "value": "130609"
  19018. }, {
  19019. "label": "涞水县",
  19020. "value": "130623"
  19021. }, {
  19022. "label": "阜平县",
  19023. "value": "130624"
  19024. }, {
  19025. "label": "定兴县",
  19026. "value": "130626"
  19027. }, {
  19028. "label": "唐县",
  19029. "value": "130627"
  19030. }, {
  19031. "label": "高阳县",
  19032. "value": "130628"
  19033. }, {
  19034. "label": "容城县",
  19035. "value": "130629"
  19036. }, {
  19037. "label": "涞源县",
  19038. "value": "130630"
  19039. }, {
  19040. "label": "望都县",
  19041. "value": "130631"
  19042. }, {
  19043. "label": "安新县",
  19044. "value": "130632"
  19045. }, {
  19046. "label": "易县",
  19047. "value": "130633"
  19048. }, {
  19049. "label": "曲阳县",
  19050. "value": "130634"
  19051. }, {
  19052. "label": "蠡县",
  19053. "value": "130635"
  19054. }, {
  19055. "label": "顺平县",
  19056. "value": "130636"
  19057. }, {
  19058. "label": "博野县",
  19059. "value": "130637"
  19060. }, {
  19061. "label": "雄县",
  19062. "value": "130638"
  19063. }, {
  19064. "label": "保定高新技术产业开发区",
  19065. "value": "130671"
  19066. }, {
  19067. "label": "保定白沟新城",
  19068. "value": "130672"
  19069. }, {
  19070. "label": "涿州市",
  19071. "value": "130681"
  19072. }, {
  19073. "label": "定州市",
  19074. "value": "130682"
  19075. }, {
  19076. "label": "安国市",
  19077. "value": "130683"
  19078. }, {
  19079. "label": "高碑店市",
  19080. "value": "130684"
  19081. }], [{
  19082. "label": "桥东区",
  19083. "value": "130702"
  19084. }, {
  19085. "label": "桥西区",
  19086. "value": "130703"
  19087. }, {
  19088. "label": "宣化区",
  19089. "value": "130705"
  19090. }, {
  19091. "label": "下花园区",
  19092. "value": "130706"
  19093. }, {
  19094. "label": "万全区",
  19095. "value": "130708"
  19096. }, {
  19097. "label": "崇礼区",
  19098. "value": "130709"
  19099. }, {
  19100. "label": "张北县",
  19101. "value": "130722"
  19102. }, {
  19103. "label": "康保县",
  19104. "value": "130723"
  19105. }, {
  19106. "label": "沽源县",
  19107. "value": "130724"
  19108. }, {
  19109. "label": "尚义县",
  19110. "value": "130725"
  19111. }, {
  19112. "label": "蔚县",
  19113. "value": "130726"
  19114. }, {
  19115. "label": "阳原县",
  19116. "value": "130727"
  19117. }, {
  19118. "label": "怀安县",
  19119. "value": "130728"
  19120. }, {
  19121. "label": "怀来县",
  19122. "value": "130730"
  19123. }, {
  19124. "label": "涿鹿县",
  19125. "value": "130731"
  19126. }, {
  19127. "label": "赤城县",
  19128. "value": "130732"
  19129. }, {
  19130. "label": "张家口市高新技术产业开发区",
  19131. "value": "130771"
  19132. }, {
  19133. "label": "张家口市察北管理区",
  19134. "value": "130772"
  19135. }, {
  19136. "label": "张家口市塞北管理区",
  19137. "value": "130773"
  19138. }], [{
  19139. "label": "双桥区",
  19140. "value": "130802"
  19141. }, {
  19142. "label": "双滦区",
  19143. "value": "130803"
  19144. }, {
  19145. "label": "鹰手营子矿区",
  19146. "value": "130804"
  19147. }, {
  19148. "label": "承德县",
  19149. "value": "130821"
  19150. }, {
  19151. "label": "兴隆县",
  19152. "value": "130822"
  19153. }, {
  19154. "label": "滦平县",
  19155. "value": "130824"
  19156. }, {
  19157. "label": "隆化县",
  19158. "value": "130825"
  19159. }, {
  19160. "label": "丰宁满族自治县",
  19161. "value": "130826"
  19162. }, {
  19163. "label": "宽城满族自治县",
  19164. "value": "130827"
  19165. }, {
  19166. "label": "围场满族蒙古族自治县",
  19167. "value": "130828"
  19168. }, {
  19169. "label": "承德高新技术产业开发区",
  19170. "value": "130871"
  19171. }, {
  19172. "label": "平泉市",
  19173. "value": "130881"
  19174. }], [{
  19175. "label": "新华区",
  19176. "value": "130902"
  19177. }, {
  19178. "label": "运河区",
  19179. "value": "130903"
  19180. }, {
  19181. "label": "沧县",
  19182. "value": "130921"
  19183. }, {
  19184. "label": "青县",
  19185. "value": "130922"
  19186. }, {
  19187. "label": "东光县",
  19188. "value": "130923"
  19189. }, {
  19190. "label": "海兴县",
  19191. "value": "130924"
  19192. }, {
  19193. "label": "盐山县",
  19194. "value": "130925"
  19195. }, {
  19196. "label": "肃宁县",
  19197. "value": "130926"
  19198. }, {
  19199. "label": "南皮县",
  19200. "value": "130927"
  19201. }, {
  19202. "label": "吴桥县",
  19203. "value": "130928"
  19204. }, {
  19205. "label": "献县",
  19206. "value": "130929"
  19207. }, {
  19208. "label": "孟村回族自治县",
  19209. "value": "130930"
  19210. }, {
  19211. "label": "河北沧州经济开发区",
  19212. "value": "130971"
  19213. }, {
  19214. "label": "沧州高新技术产业开发区",
  19215. "value": "130972"
  19216. }, {
  19217. "label": "沧州渤海新区",
  19218. "value": "130973"
  19219. }, {
  19220. "label": "泊头市",
  19221. "value": "130981"
  19222. }, {
  19223. "label": "任丘市",
  19224. "value": "130982"
  19225. }, {
  19226. "label": "黄骅市",
  19227. "value": "130983"
  19228. }, {
  19229. "label": "河间市",
  19230. "value": "130984"
  19231. }], [{
  19232. "label": "安次区",
  19233. "value": "131002"
  19234. }, {
  19235. "label": "广阳区",
  19236. "value": "131003"
  19237. }, {
  19238. "label": "固安县",
  19239. "value": "131022"
  19240. }, {
  19241. "label": "永清县",
  19242. "value": "131023"
  19243. }, {
  19244. "label": "香河县",
  19245. "value": "131024"
  19246. }, {
  19247. "label": "大城县",
  19248. "value": "131025"
  19249. }, {
  19250. "label": "文安县",
  19251. "value": "131026"
  19252. }, {
  19253. "label": "大厂回族自治县",
  19254. "value": "131028"
  19255. }, {
  19256. "label": "廊坊经济技术开发区",
  19257. "value": "131071"
  19258. }, {
  19259. "label": "霸州市",
  19260. "value": "131081"
  19261. }, {
  19262. "label": "三河市",
  19263. "value": "131082"
  19264. }], [{
  19265. "label": "桃城区",
  19266. "value": "131102"
  19267. }, {
  19268. "label": "冀州区",
  19269. "value": "131103"
  19270. }, {
  19271. "label": "枣强县",
  19272. "value": "131121"
  19273. }, {
  19274. "label": "武邑县",
  19275. "value": "131122"
  19276. }, {
  19277. "label": "武强县",
  19278. "value": "131123"
  19279. }, {
  19280. "label": "饶阳县",
  19281. "value": "131124"
  19282. }, {
  19283. "label": "安平县",
  19284. "value": "131125"
  19285. }, {
  19286. "label": "故城县",
  19287. "value": "131126"
  19288. }, {
  19289. "label": "景县",
  19290. "value": "131127"
  19291. }, {
  19292. "label": "阜城县",
  19293. "value": "131128"
  19294. }, {
  19295. "label": "河北衡水经济开发区",
  19296. "value": "131171"
  19297. }, {
  19298. "label": "衡水滨湖新区",
  19299. "value": "131172"
  19300. }, {
  19301. "label": "深州市",
  19302. "value": "131182"
  19303. }]], [[{
  19304. "label": "小店区",
  19305. "value": "140105"
  19306. }, {
  19307. "label": "迎泽区",
  19308. "value": "140106"
  19309. }, {
  19310. "label": "杏花岭区",
  19311. "value": "140107"
  19312. }, {
  19313. "label": "尖草坪区",
  19314. "value": "140108"
  19315. }, {
  19316. "label": "万柏林区",
  19317. "value": "140109"
  19318. }, {
  19319. "label": "晋源区",
  19320. "value": "140110"
  19321. }, {
  19322. "label": "清徐县",
  19323. "value": "140121"
  19324. }, {
  19325. "label": "阳曲县",
  19326. "value": "140122"
  19327. }, {
  19328. "label": "娄烦县",
  19329. "value": "140123"
  19330. }, {
  19331. "label": "山西转型综合改革示范区",
  19332. "value": "140171"
  19333. }, {
  19334. "label": "古交市",
  19335. "value": "140181"
  19336. }], [{
  19337. "label": "城区",
  19338. "value": "140202"
  19339. }, {
  19340. "label": "矿区",
  19341. "value": "140203"
  19342. }, {
  19343. "label": "南郊区",
  19344. "value": "140211"
  19345. }, {
  19346. "label": "新荣区",
  19347. "value": "140212"
  19348. }, {
  19349. "label": "阳高县",
  19350. "value": "140221"
  19351. }, {
  19352. "label": "天镇县",
  19353. "value": "140222"
  19354. }, {
  19355. "label": "广灵县",
  19356. "value": "140223"
  19357. }, {
  19358. "label": "灵丘县",
  19359. "value": "140224"
  19360. }, {
  19361. "label": "浑源县",
  19362. "value": "140225"
  19363. }, {
  19364. "label": "左云县",
  19365. "value": "140226"
  19366. }, {
  19367. "label": "大同县",
  19368. "value": "140227"
  19369. }, {
  19370. "label": "山西大同经济开发区",
  19371. "value": "140271"
  19372. }], [{
  19373. "label": "城区",
  19374. "value": "140302"
  19375. }, {
  19376. "label": "矿区",
  19377. "value": "140303"
  19378. }, {
  19379. "label": "郊区",
  19380. "value": "140311"
  19381. }, {
  19382. "label": "平定县",
  19383. "value": "140321"
  19384. }, {
  19385. "label": "盂县",
  19386. "value": "140322"
  19387. }, {
  19388. "label": "山西阳泉经济开发区",
  19389. "value": "140371"
  19390. }], [{
  19391. "label": "城区",
  19392. "value": "140402"
  19393. }, {
  19394. "label": "郊区",
  19395. "value": "140411"
  19396. }, {
  19397. "label": "长治县",
  19398. "value": "140421"
  19399. }, {
  19400. "label": "襄垣县",
  19401. "value": "140423"
  19402. }, {
  19403. "label": "屯留县",
  19404. "value": "140424"
  19405. }, {
  19406. "label": "平顺县",
  19407. "value": "140425"
  19408. }, {
  19409. "label": "黎城县",
  19410. "value": "140426"
  19411. }, {
  19412. "label": "壶关县",
  19413. "value": "140427"
  19414. }, {
  19415. "label": "长子县",
  19416. "value": "140428"
  19417. }, {
  19418. "label": "武乡县",
  19419. "value": "140429"
  19420. }, {
  19421. "label": "沁县",
  19422. "value": "140430"
  19423. }, {
  19424. "label": "沁源县",
  19425. "value": "140431"
  19426. }, {
  19427. "label": "山西长治高新技术产业园区",
  19428. "value": "140471"
  19429. }, {
  19430. "label": "潞城市",
  19431. "value": "140481"
  19432. }], [{
  19433. "label": "城区",
  19434. "value": "140502"
  19435. }, {
  19436. "label": "沁水县",
  19437. "value": "140521"
  19438. }, {
  19439. "label": "阳城县",
  19440. "value": "140522"
  19441. }, {
  19442. "label": "陵川县",
  19443. "value": "140524"
  19444. }, {
  19445. "label": "泽州县",
  19446. "value": "140525"
  19447. }, {
  19448. "label": "高平市",
  19449. "value": "140581"
  19450. }], [{
  19451. "label": "朔城区",
  19452. "value": "140602"
  19453. }, {
  19454. "label": "平鲁区",
  19455. "value": "140603"
  19456. }, {
  19457. "label": "山阴县",
  19458. "value": "140621"
  19459. }, {
  19460. "label": "应县",
  19461. "value": "140622"
  19462. }, {
  19463. "label": "右玉县",
  19464. "value": "140623"
  19465. }, {
  19466. "label": "怀仁县",
  19467. "value": "140624"
  19468. }, {
  19469. "label": "山西朔州经济开发区",
  19470. "value": "140671"
  19471. }], [{
  19472. "label": "榆次区",
  19473. "value": "140702"
  19474. }, {
  19475. "label": "榆社县",
  19476. "value": "140721"
  19477. }, {
  19478. "label": "左权县",
  19479. "value": "140722"
  19480. }, {
  19481. "label": "和顺县",
  19482. "value": "140723"
  19483. }, {
  19484. "label": "昔阳县",
  19485. "value": "140724"
  19486. }, {
  19487. "label": "寿阳县",
  19488. "value": "140725"
  19489. }, {
  19490. "label": "太谷县",
  19491. "value": "140726"
  19492. }, {
  19493. "label": "祁县",
  19494. "value": "140727"
  19495. }, {
  19496. "label": "平遥县",
  19497. "value": "140728"
  19498. }, {
  19499. "label": "灵石县",
  19500. "value": "140729"
  19501. }, {
  19502. "label": "介休市",
  19503. "value": "140781"
  19504. }], [{
  19505. "label": "盐湖区",
  19506. "value": "140802"
  19507. }, {
  19508. "label": "临猗县",
  19509. "value": "140821"
  19510. }, {
  19511. "label": "万荣县",
  19512. "value": "140822"
  19513. }, {
  19514. "label": "闻喜县",
  19515. "value": "140823"
  19516. }, {
  19517. "label": "稷山县",
  19518. "value": "140824"
  19519. }, {
  19520. "label": "新绛县",
  19521. "value": "140825"
  19522. }, {
  19523. "label": "绛县",
  19524. "value": "140826"
  19525. }, {
  19526. "label": "垣曲县",
  19527. "value": "140827"
  19528. }, {
  19529. "label": "夏县",
  19530. "value": "140828"
  19531. }, {
  19532. "label": "平陆县",
  19533. "value": "140829"
  19534. }, {
  19535. "label": "芮城县",
  19536. "value": "140830"
  19537. }, {
  19538. "label": "永济市",
  19539. "value": "140881"
  19540. }, {
  19541. "label": "河津市",
  19542. "value": "140882"
  19543. }], [{
  19544. "label": "忻府区",
  19545. "value": "140902"
  19546. }, {
  19547. "label": "定襄县",
  19548. "value": "140921"
  19549. }, {
  19550. "label": "五台县",
  19551. "value": "140922"
  19552. }, {
  19553. "label": "代县",
  19554. "value": "140923"
  19555. }, {
  19556. "label": "繁峙县",
  19557. "value": "140924"
  19558. }, {
  19559. "label": "宁武县",
  19560. "value": "140925"
  19561. }, {
  19562. "label": "静乐县",
  19563. "value": "140926"
  19564. }, {
  19565. "label": "神池县",
  19566. "value": "140927"
  19567. }, {
  19568. "label": "五寨县",
  19569. "value": "140928"
  19570. }, {
  19571. "label": "岢岚县",
  19572. "value": "140929"
  19573. }, {
  19574. "label": "河曲县",
  19575. "value": "140930"
  19576. }, {
  19577. "label": "保德县",
  19578. "value": "140931"
  19579. }, {
  19580. "label": "偏关县",
  19581. "value": "140932"
  19582. }, {
  19583. "label": "五台山风景名胜区",
  19584. "value": "140971"
  19585. }, {
  19586. "label": "原平市",
  19587. "value": "140981"
  19588. }], [{
  19589. "label": "尧都区",
  19590. "value": "141002"
  19591. }, {
  19592. "label": "曲沃县",
  19593. "value": "141021"
  19594. }, {
  19595. "label": "翼城县",
  19596. "value": "141022"
  19597. }, {
  19598. "label": "襄汾县",
  19599. "value": "141023"
  19600. }, {
  19601. "label": "洪洞县",
  19602. "value": "141024"
  19603. }, {
  19604. "label": "古县",
  19605. "value": "141025"
  19606. }, {
  19607. "label": "安泽县",
  19608. "value": "141026"
  19609. }, {
  19610. "label": "浮山县",
  19611. "value": "141027"
  19612. }, {
  19613. "label": "吉县",
  19614. "value": "141028"
  19615. }, {
  19616. "label": "乡宁县",
  19617. "value": "141029"
  19618. }, {
  19619. "label": "大宁县",
  19620. "value": "141030"
  19621. }, {
  19622. "label": "隰县",
  19623. "value": "141031"
  19624. }, {
  19625. "label": "永和县",
  19626. "value": "141032"
  19627. }, {
  19628. "label": "蒲县",
  19629. "value": "141033"
  19630. }, {
  19631. "label": "汾西县",
  19632. "value": "141034"
  19633. }, {
  19634. "label": "侯马市",
  19635. "value": "141081"
  19636. }, {
  19637. "label": "霍州市",
  19638. "value": "141082"
  19639. }], [{
  19640. "label": "离石区",
  19641. "value": "141102"
  19642. }, {
  19643. "label": "文水县",
  19644. "value": "141121"
  19645. }, {
  19646. "label": "交城县",
  19647. "value": "141122"
  19648. }, {
  19649. "label": "兴县",
  19650. "value": "141123"
  19651. }, {
  19652. "label": "临县",
  19653. "value": "141124"
  19654. }, {
  19655. "label": "柳林县",
  19656. "value": "141125"
  19657. }, {
  19658. "label": "石楼县",
  19659. "value": "141126"
  19660. }, {
  19661. "label": "岚县",
  19662. "value": "141127"
  19663. }, {
  19664. "label": "方山县",
  19665. "value": "141128"
  19666. }, {
  19667. "label": "中阳县",
  19668. "value": "141129"
  19669. }, {
  19670. "label": "交口县",
  19671. "value": "141130"
  19672. }, {
  19673. "label": "孝义市",
  19674. "value": "141181"
  19675. }, {
  19676. "label": "汾阳市",
  19677. "value": "141182"
  19678. }]], [[{
  19679. "label": "新城区",
  19680. "value": "150102"
  19681. }, {
  19682. "label": "回民区",
  19683. "value": "150103"
  19684. }, {
  19685. "label": "玉泉区",
  19686. "value": "150104"
  19687. }, {
  19688. "label": "赛罕区",
  19689. "value": "150105"
  19690. }, {
  19691. "label": "土默特左旗",
  19692. "value": "150121"
  19693. }, {
  19694. "label": "托克托县",
  19695. "value": "150122"
  19696. }, {
  19697. "label": "和林格尔县",
  19698. "value": "150123"
  19699. }, {
  19700. "label": "清水河县",
  19701. "value": "150124"
  19702. }, {
  19703. "label": "武川县",
  19704. "value": "150125"
  19705. }, {
  19706. "label": "呼和浩特金海工业园区",
  19707. "value": "150171"
  19708. }, {
  19709. "label": "呼和浩特经济技术开发区",
  19710. "value": "150172"
  19711. }], [{
  19712. "label": "东河区",
  19713. "value": "150202"
  19714. }, {
  19715. "label": "昆都仑区",
  19716. "value": "150203"
  19717. }, {
  19718. "label": "青山区",
  19719. "value": "150204"
  19720. }, {
  19721. "label": "石拐区",
  19722. "value": "150205"
  19723. }, {
  19724. "label": "白云鄂博矿区",
  19725. "value": "150206"
  19726. }, {
  19727. "label": "九原区",
  19728. "value": "150207"
  19729. }, {
  19730. "label": "土默特右旗",
  19731. "value": "150221"
  19732. }, {
  19733. "label": "固阳县",
  19734. "value": "150222"
  19735. }, {
  19736. "label": "达尔罕茂明安联合旗",
  19737. "value": "150223"
  19738. }, {
  19739. "label": "包头稀土高新技术产业开发区",
  19740. "value": "150271"
  19741. }], [{
  19742. "label": "海勃湾区",
  19743. "value": "150302"
  19744. }, {
  19745. "label": "海南区",
  19746. "value": "150303"
  19747. }, {
  19748. "label": "乌达区",
  19749. "value": "150304"
  19750. }], [{
  19751. "label": "红山区",
  19752. "value": "150402"
  19753. }, {
  19754. "label": "元宝山区",
  19755. "value": "150403"
  19756. }, {
  19757. "label": "松山区",
  19758. "value": "150404"
  19759. }, {
  19760. "label": "阿鲁科尔沁旗",
  19761. "value": "150421"
  19762. }, {
  19763. "label": "巴林左旗",
  19764. "value": "150422"
  19765. }, {
  19766. "label": "巴林右旗",
  19767. "value": "150423"
  19768. }, {
  19769. "label": "林西县",
  19770. "value": "150424"
  19771. }, {
  19772. "label": "克什克腾旗",
  19773. "value": "150425"
  19774. }, {
  19775. "label": "翁牛特旗",
  19776. "value": "150426"
  19777. }, {
  19778. "label": "喀喇沁旗",
  19779. "value": "150428"
  19780. }, {
  19781. "label": "宁城县",
  19782. "value": "150429"
  19783. }, {
  19784. "label": "敖汉旗",
  19785. "value": "150430"
  19786. }], [{
  19787. "label": "科尔沁区",
  19788. "value": "150502"
  19789. }, {
  19790. "label": "科尔沁左翼中旗",
  19791. "value": "150521"
  19792. }, {
  19793. "label": "科尔沁左翼后旗",
  19794. "value": "150522"
  19795. }, {
  19796. "label": "开鲁县",
  19797. "value": "150523"
  19798. }, {
  19799. "label": "库伦旗",
  19800. "value": "150524"
  19801. }, {
  19802. "label": "奈曼旗",
  19803. "value": "150525"
  19804. }, {
  19805. "label": "扎鲁特旗",
  19806. "value": "150526"
  19807. }, {
  19808. "label": "通辽经济技术开发区",
  19809. "value": "150571"
  19810. }, {
  19811. "label": "霍林郭勒市",
  19812. "value": "150581"
  19813. }], [{
  19814. "label": "东胜区",
  19815. "value": "150602"
  19816. }, {
  19817. "label": "康巴什区",
  19818. "value": "150603"
  19819. }, {
  19820. "label": "达拉特旗",
  19821. "value": "150621"
  19822. }, {
  19823. "label": "准格尔旗",
  19824. "value": "150622"
  19825. }, {
  19826. "label": "鄂托克前旗",
  19827. "value": "150623"
  19828. }, {
  19829. "label": "鄂托克旗",
  19830. "value": "150624"
  19831. }, {
  19832. "label": "杭锦旗",
  19833. "value": "150625"
  19834. }, {
  19835. "label": "乌审旗",
  19836. "value": "150626"
  19837. }, {
  19838. "label": "伊金霍洛旗",
  19839. "value": "150627"
  19840. }], [{
  19841. "label": "海拉尔区",
  19842. "value": "150702"
  19843. }, {
  19844. "label": "扎赉诺尔区",
  19845. "value": "150703"
  19846. }, {
  19847. "label": "阿荣旗",
  19848. "value": "150721"
  19849. }, {
  19850. "label": "莫力达瓦达斡尔族自治旗",
  19851. "value": "150722"
  19852. }, {
  19853. "label": "鄂伦春自治旗",
  19854. "value": "150723"
  19855. }, {
  19856. "label": "鄂温克族自治旗",
  19857. "value": "150724"
  19858. }, {
  19859. "label": "陈巴尔虎旗",
  19860. "value": "150725"
  19861. }, {
  19862. "label": "新巴尔虎左旗",
  19863. "value": "150726"
  19864. }, {
  19865. "label": "新巴尔虎右旗",
  19866. "value": "150727"
  19867. }, {
  19868. "label": "满洲里市",
  19869. "value": "150781"
  19870. }, {
  19871. "label": "牙克石市",
  19872. "value": "150782"
  19873. }, {
  19874. "label": "扎兰屯市",
  19875. "value": "150783"
  19876. }, {
  19877. "label": "额尔古纳市",
  19878. "value": "150784"
  19879. }, {
  19880. "label": "根河市",
  19881. "value": "150785"
  19882. }], [{
  19883. "label": "临河区",
  19884. "value": "150802"
  19885. }, {
  19886. "label": "五原县",
  19887. "value": "150821"
  19888. }, {
  19889. "label": "磴口县",
  19890. "value": "150822"
  19891. }, {
  19892. "label": "乌拉特前旗",
  19893. "value": "150823"
  19894. }, {
  19895. "label": "乌拉特中旗",
  19896. "value": "150824"
  19897. }, {
  19898. "label": "乌拉特后旗",
  19899. "value": "150825"
  19900. }, {
  19901. "label": "杭锦后旗",
  19902. "value": "150826"
  19903. }], [{
  19904. "label": "集宁区",
  19905. "value": "150902"
  19906. }, {
  19907. "label": "卓资县",
  19908. "value": "150921"
  19909. }, {
  19910. "label": "化德县",
  19911. "value": "150922"
  19912. }, {
  19913. "label": "商都县",
  19914. "value": "150923"
  19915. }, {
  19916. "label": "兴和县",
  19917. "value": "150924"
  19918. }, {
  19919. "label": "凉城县",
  19920. "value": "150925"
  19921. }, {
  19922. "label": "察哈尔右翼前旗",
  19923. "value": "150926"
  19924. }, {
  19925. "label": "察哈尔右翼中旗",
  19926. "value": "150927"
  19927. }, {
  19928. "label": "察哈尔右翼后旗",
  19929. "value": "150928"
  19930. }, {
  19931. "label": "四子王旗",
  19932. "value": "150929"
  19933. }, {
  19934. "label": "丰镇市",
  19935. "value": "150981"
  19936. }], [{
  19937. "label": "乌兰浩特市",
  19938. "value": "152201"
  19939. }, {
  19940. "label": "阿尔山市",
  19941. "value": "152202"
  19942. }, {
  19943. "label": "科尔沁右翼前旗",
  19944. "value": "152221"
  19945. }, {
  19946. "label": "科尔沁右翼中旗",
  19947. "value": "152222"
  19948. }, {
  19949. "label": "扎赉特旗",
  19950. "value": "152223"
  19951. }, {
  19952. "label": "突泉县",
  19953. "value": "152224"
  19954. }], [{
  19955. "label": "二连浩特市",
  19956. "value": "152501"
  19957. }, {
  19958. "label": "锡林浩特市",
  19959. "value": "152502"
  19960. }, {
  19961. "label": "阿巴嘎旗",
  19962. "value": "152522"
  19963. }, {
  19964. "label": "苏尼特左旗",
  19965. "value": "152523"
  19966. }, {
  19967. "label": "苏尼特右旗",
  19968. "value": "152524"
  19969. }, {
  19970. "label": "东乌珠穆沁旗",
  19971. "value": "152525"
  19972. }, {
  19973. "label": "西乌珠穆沁旗",
  19974. "value": "152526"
  19975. }, {
  19976. "label": "太仆寺旗",
  19977. "value": "152527"
  19978. }, {
  19979. "label": "镶黄旗",
  19980. "value": "152528"
  19981. }, {
  19982. "label": "正镶白旗",
  19983. "value": "152529"
  19984. }, {
  19985. "label": "正蓝旗",
  19986. "value": "152530"
  19987. }, {
  19988. "label": "多伦县",
  19989. "value": "152531"
  19990. }, {
  19991. "label": "乌拉盖管委会",
  19992. "value": "152571"
  19993. }], [{
  19994. "label": "阿拉善左旗",
  19995. "value": "152921"
  19996. }, {
  19997. "label": "阿拉善右旗",
  19998. "value": "152922"
  19999. }, {
  20000. "label": "额济纳旗",
  20001. "value": "152923"
  20002. }, {
  20003. "label": "内蒙古阿拉善经济开发区",
  20004. "value": "152971"
  20005. }]], [[{
  20006. "label": "和平区",
  20007. "value": "210102"
  20008. }, {
  20009. "label": "沈河区",
  20010. "value": "210103"
  20011. }, {
  20012. "label": "大东区",
  20013. "value": "210104"
  20014. }, {
  20015. "label": "皇姑区",
  20016. "value": "210105"
  20017. }, {
  20018. "label": "铁西区",
  20019. "value": "210106"
  20020. }, {
  20021. "label": "苏家屯区",
  20022. "value": "210111"
  20023. }, {
  20024. "label": "浑南区",
  20025. "value": "210112"
  20026. }, {
  20027. "label": "沈北新区",
  20028. "value": "210113"
  20029. }, {
  20030. "label": "于洪区",
  20031. "value": "210114"
  20032. }, {
  20033. "label": "辽中区",
  20034. "value": "210115"
  20035. }, {
  20036. "label": "康平县",
  20037. "value": "210123"
  20038. }, {
  20039. "label": "法库县",
  20040. "value": "210124"
  20041. }, {
  20042. "label": "新民市",
  20043. "value": "210181"
  20044. }], [{
  20045. "label": "中山区",
  20046. "value": "210202"
  20047. }, {
  20048. "label": "西岗区",
  20049. "value": "210203"
  20050. }, {
  20051. "label": "沙河口区",
  20052. "value": "210204"
  20053. }, {
  20054. "label": "甘井子区",
  20055. "value": "210211"
  20056. }, {
  20057. "label": "旅顺口区",
  20058. "value": "210212"
  20059. }, {
  20060. "label": "金州区",
  20061. "value": "210213"
  20062. }, {
  20063. "label": "普兰店区",
  20064. "value": "210214"
  20065. }, {
  20066. "label": "长海县",
  20067. "value": "210224"
  20068. }, {
  20069. "label": "瓦房店市",
  20070. "value": "210281"
  20071. }, {
  20072. "label": "庄河市",
  20073. "value": "210283"
  20074. }], [{
  20075. "label": "铁东区",
  20076. "value": "210302"
  20077. }, {
  20078. "label": "铁西区",
  20079. "value": "210303"
  20080. }, {
  20081. "label": "立山区",
  20082. "value": "210304"
  20083. }, {
  20084. "label": "千山区",
  20085. "value": "210311"
  20086. }, {
  20087. "label": "台安县",
  20088. "value": "210321"
  20089. }, {
  20090. "label": "岫岩满族自治县",
  20091. "value": "210323"
  20092. }, {
  20093. "label": "海城市",
  20094. "value": "210381"
  20095. }], [{
  20096. "label": "新抚区",
  20097. "value": "210402"
  20098. }, {
  20099. "label": "东洲区",
  20100. "value": "210403"
  20101. }, {
  20102. "label": "望花区",
  20103. "value": "210404"
  20104. }, {
  20105. "label": "顺城区",
  20106. "value": "210411"
  20107. }, {
  20108. "label": "抚顺县",
  20109. "value": "210421"
  20110. }, {
  20111. "label": "新宾满族自治县",
  20112. "value": "210422"
  20113. }, {
  20114. "label": "清原满族自治县",
  20115. "value": "210423"
  20116. }], [{
  20117. "label": "平山区",
  20118. "value": "210502"
  20119. }, {
  20120. "label": "溪湖区",
  20121. "value": "210503"
  20122. }, {
  20123. "label": "明山区",
  20124. "value": "210504"
  20125. }, {
  20126. "label": "南芬区",
  20127. "value": "210505"
  20128. }, {
  20129. "label": "本溪满族自治县",
  20130. "value": "210521"
  20131. }, {
  20132. "label": "桓仁满族自治县",
  20133. "value": "210522"
  20134. }], [{
  20135. "label": "元宝区",
  20136. "value": "210602"
  20137. }, {
  20138. "label": "振兴区",
  20139. "value": "210603"
  20140. }, {
  20141. "label": "振安区",
  20142. "value": "210604"
  20143. }, {
  20144. "label": "宽甸满族自治县",
  20145. "value": "210624"
  20146. }, {
  20147. "label": "东港市",
  20148. "value": "210681"
  20149. }, {
  20150. "label": "凤城市",
  20151. "value": "210682"
  20152. }], [{
  20153. "label": "古塔区",
  20154. "value": "210702"
  20155. }, {
  20156. "label": "凌河区",
  20157. "value": "210703"
  20158. }, {
  20159. "label": "太和区",
  20160. "value": "210711"
  20161. }, {
  20162. "label": "黑山县",
  20163. "value": "210726"
  20164. }, {
  20165. "label": "义县",
  20166. "value": "210727"
  20167. }, {
  20168. "label": "凌海市",
  20169. "value": "210781"
  20170. }, {
  20171. "label": "北镇市",
  20172. "value": "210782"
  20173. }], [{
  20174. "label": "站前区",
  20175. "value": "210802"
  20176. }, {
  20177. "label": "西市区",
  20178. "value": "210803"
  20179. }, {
  20180. "label": "鲅鱼圈区",
  20181. "value": "210804"
  20182. }, {
  20183. "label": "老边区",
  20184. "value": "210811"
  20185. }, {
  20186. "label": "盖州市",
  20187. "value": "210881"
  20188. }, {
  20189. "label": "大石桥市",
  20190. "value": "210882"
  20191. }], [{
  20192. "label": "海州区",
  20193. "value": "210902"
  20194. }, {
  20195. "label": "新邱区",
  20196. "value": "210903"
  20197. }, {
  20198. "label": "太平区",
  20199. "value": "210904"
  20200. }, {
  20201. "label": "清河门区",
  20202. "value": "210905"
  20203. }, {
  20204. "label": "细河区",
  20205. "value": "210911"
  20206. }, {
  20207. "label": "阜新蒙古族自治县",
  20208. "value": "210921"
  20209. }, {
  20210. "label": "彰武县",
  20211. "value": "210922"
  20212. }], [{
  20213. "label": "白塔区",
  20214. "value": "211002"
  20215. }, {
  20216. "label": "文圣区",
  20217. "value": "211003"
  20218. }, {
  20219. "label": "宏伟区",
  20220. "value": "211004"
  20221. }, {
  20222. "label": "弓长岭区",
  20223. "value": "211005"
  20224. }, {
  20225. "label": "太子河区",
  20226. "value": "211011"
  20227. }, {
  20228. "label": "辽阳县",
  20229. "value": "211021"
  20230. }, {
  20231. "label": "灯塔市",
  20232. "value": "211081"
  20233. }], [{
  20234. "label": "双台子区",
  20235. "value": "211102"
  20236. }, {
  20237. "label": "兴隆台区",
  20238. "value": "211103"
  20239. }, {
  20240. "label": "大洼区",
  20241. "value": "211104"
  20242. }, {
  20243. "label": "盘山县",
  20244. "value": "211122"
  20245. }], [{
  20246. "label": "银州区",
  20247. "value": "211202"
  20248. }, {
  20249. "label": "清河区",
  20250. "value": "211204"
  20251. }, {
  20252. "label": "铁岭县",
  20253. "value": "211221"
  20254. }, {
  20255. "label": "西丰县",
  20256. "value": "211223"
  20257. }, {
  20258. "label": "昌图县",
  20259. "value": "211224"
  20260. }, {
  20261. "label": "调兵山市",
  20262. "value": "211281"
  20263. }, {
  20264. "label": "开原市",
  20265. "value": "211282"
  20266. }], [{
  20267. "label": "双塔区",
  20268. "value": "211302"
  20269. }, {
  20270. "label": "龙城区",
  20271. "value": "211303"
  20272. }, {
  20273. "label": "朝阳县",
  20274. "value": "211321"
  20275. }, {
  20276. "label": "建平县",
  20277. "value": "211322"
  20278. }, {
  20279. "label": "喀喇沁左翼蒙古族自治县",
  20280. "value": "211324"
  20281. }, {
  20282. "label": "北票市",
  20283. "value": "211381"
  20284. }, {
  20285. "label": "凌源市",
  20286. "value": "211382"
  20287. }], [{
  20288. "label": "连山区",
  20289. "value": "211402"
  20290. }, {
  20291. "label": "龙港区",
  20292. "value": "211403"
  20293. }, {
  20294. "label": "南票区",
  20295. "value": "211404"
  20296. }, {
  20297. "label": "绥中县",
  20298. "value": "211421"
  20299. }, {
  20300. "label": "建昌县",
  20301. "value": "211422"
  20302. }, {
  20303. "label": "兴城市",
  20304. "value": "211481"
  20305. }]], [[{
  20306. "label": "南关区",
  20307. "value": "220102"
  20308. }, {
  20309. "label": "宽城区",
  20310. "value": "220103"
  20311. }, {
  20312. "label": "朝阳区",
  20313. "value": "220104"
  20314. }, {
  20315. "label": "二道区",
  20316. "value": "220105"
  20317. }, {
  20318. "label": "绿园区",
  20319. "value": "220106"
  20320. }, {
  20321. "label": "双阳区",
  20322. "value": "220112"
  20323. }, {
  20324. "label": "九台区",
  20325. "value": "220113"
  20326. }, {
  20327. "label": "农安县",
  20328. "value": "220122"
  20329. }, {
  20330. "label": "长春经济技术开发区",
  20331. "value": "220171"
  20332. }, {
  20333. "label": "长春净月高新技术产业开发区",
  20334. "value": "220172"
  20335. }, {
  20336. "label": "长春高新技术产业开发区",
  20337. "value": "220173"
  20338. }, {
  20339. "label": "长春汽车经济技术开发区",
  20340. "value": "220174"
  20341. }, {
  20342. "label": "榆树市",
  20343. "value": "220182"
  20344. }, {
  20345. "label": "德惠市",
  20346. "value": "220183"
  20347. }], [{
  20348. "label": "昌邑区",
  20349. "value": "220202"
  20350. }, {
  20351. "label": "龙潭区",
  20352. "value": "220203"
  20353. }, {
  20354. "label": "船营区",
  20355. "value": "220204"
  20356. }, {
  20357. "label": "丰满区",
  20358. "value": "220211"
  20359. }, {
  20360. "label": "永吉县",
  20361. "value": "220221"
  20362. }, {
  20363. "label": "吉林经济开发区",
  20364. "value": "220271"
  20365. }, {
  20366. "label": "吉林高新技术产业开发区",
  20367. "value": "220272"
  20368. }, {
  20369. "label": "吉林中国新加坡食品区",
  20370. "value": "220273"
  20371. }, {
  20372. "label": "蛟河市",
  20373. "value": "220281"
  20374. }, {
  20375. "label": "桦甸市",
  20376. "value": "220282"
  20377. }, {
  20378. "label": "舒兰市",
  20379. "value": "220283"
  20380. }, {
  20381. "label": "磐石市",
  20382. "value": "220284"
  20383. }], [{
  20384. "label": "铁西区",
  20385. "value": "220302"
  20386. }, {
  20387. "label": "铁东区",
  20388. "value": "220303"
  20389. }, {
  20390. "label": "梨树县",
  20391. "value": "220322"
  20392. }, {
  20393. "label": "伊通满族自治县",
  20394. "value": "220323"
  20395. }, {
  20396. "label": "公主岭市",
  20397. "value": "220381"
  20398. }, {
  20399. "label": "双辽市",
  20400. "value": "220382"
  20401. }], [{
  20402. "label": "龙山区",
  20403. "value": "220402"
  20404. }, {
  20405. "label": "西安区",
  20406. "value": "220403"
  20407. }, {
  20408. "label": "东丰县",
  20409. "value": "220421"
  20410. }, {
  20411. "label": "东辽县",
  20412. "value": "220422"
  20413. }], [{
  20414. "label": "东昌区",
  20415. "value": "220502"
  20416. }, {
  20417. "label": "二道江区",
  20418. "value": "220503"
  20419. }, {
  20420. "label": "通化县",
  20421. "value": "220521"
  20422. }, {
  20423. "label": "辉南县",
  20424. "value": "220523"
  20425. }, {
  20426. "label": "柳河县",
  20427. "value": "220524"
  20428. }, {
  20429. "label": "梅河口市",
  20430. "value": "220581"
  20431. }, {
  20432. "label": "集安市",
  20433. "value": "220582"
  20434. }], [{
  20435. "label": "浑江区",
  20436. "value": "220602"
  20437. }, {
  20438. "label": "江源区",
  20439. "value": "220605"
  20440. }, {
  20441. "label": "抚松县",
  20442. "value": "220621"
  20443. }, {
  20444. "label": "靖宇县",
  20445. "value": "220622"
  20446. }, {
  20447. "label": "长白朝鲜族自治县",
  20448. "value": "220623"
  20449. }, {
  20450. "label": "临江市",
  20451. "value": "220681"
  20452. }], [{
  20453. "label": "宁江区",
  20454. "value": "220702"
  20455. }, {
  20456. "label": "前郭尔罗斯蒙古族自治县",
  20457. "value": "220721"
  20458. }, {
  20459. "label": "长岭县",
  20460. "value": "220722"
  20461. }, {
  20462. "label": "乾安县",
  20463. "value": "220723"
  20464. }, {
  20465. "label": "吉林松原经济开发区",
  20466. "value": "220771"
  20467. }, {
  20468. "label": "扶余市",
  20469. "value": "220781"
  20470. }], [{
  20471. "label": "洮北区",
  20472. "value": "220802"
  20473. }, {
  20474. "label": "镇赉县",
  20475. "value": "220821"
  20476. }, {
  20477. "label": "通榆县",
  20478. "value": "220822"
  20479. }, {
  20480. "label": "吉林白城经济开发区",
  20481. "value": "220871"
  20482. }, {
  20483. "label": "洮南市",
  20484. "value": "220881"
  20485. }, {
  20486. "label": "大安市",
  20487. "value": "220882"
  20488. }], [{
  20489. "label": "延吉市",
  20490. "value": "222401"
  20491. }, {
  20492. "label": "图们市",
  20493. "value": "222402"
  20494. }, {
  20495. "label": "敦化市",
  20496. "value": "222403"
  20497. }, {
  20498. "label": "珲春市",
  20499. "value": "222404"
  20500. }, {
  20501. "label": "龙井市",
  20502. "value": "222405"
  20503. }, {
  20504. "label": "和龙市",
  20505. "value": "222406"
  20506. }, {
  20507. "label": "汪清县",
  20508. "value": "222424"
  20509. }, {
  20510. "label": "安图县",
  20511. "value": "222426"
  20512. }]], [[{
  20513. "label": "道里区",
  20514. "value": "230102"
  20515. }, {
  20516. "label": "南岗区",
  20517. "value": "230103"
  20518. }, {
  20519. "label": "道外区",
  20520. "value": "230104"
  20521. }, {
  20522. "label": "平房区",
  20523. "value": "230108"
  20524. }, {
  20525. "label": "松北区",
  20526. "value": "230109"
  20527. }, {
  20528. "label": "香坊区",
  20529. "value": "230110"
  20530. }, {
  20531. "label": "呼兰区",
  20532. "value": "230111"
  20533. }, {
  20534. "label": "阿城区",
  20535. "value": "230112"
  20536. }, {
  20537. "label": "双城区",
  20538. "value": "230113"
  20539. }, {
  20540. "label": "依兰县",
  20541. "value": "230123"
  20542. }, {
  20543. "label": "方正县",
  20544. "value": "230124"
  20545. }, {
  20546. "label": "宾县",
  20547. "value": "230125"
  20548. }, {
  20549. "label": "巴彦县",
  20550. "value": "230126"
  20551. }, {
  20552. "label": "木兰县",
  20553. "value": "230127"
  20554. }, {
  20555. "label": "通河县",
  20556. "value": "230128"
  20557. }, {
  20558. "label": "延寿县",
  20559. "value": "230129"
  20560. }, {
  20561. "label": "尚志市",
  20562. "value": "230183"
  20563. }, {
  20564. "label": "五常市",
  20565. "value": "230184"
  20566. }], [{
  20567. "label": "龙沙区",
  20568. "value": "230202"
  20569. }, {
  20570. "label": "建华区",
  20571. "value": "230203"
  20572. }, {
  20573. "label": "铁锋区",
  20574. "value": "230204"
  20575. }, {
  20576. "label": "昂昂溪区",
  20577. "value": "230205"
  20578. }, {
  20579. "label": "富拉尔基区",
  20580. "value": "230206"
  20581. }, {
  20582. "label": "碾子山区",
  20583. "value": "230207"
  20584. }, {
  20585. "label": "梅里斯达斡尔族区",
  20586. "value": "230208"
  20587. }, {
  20588. "label": "龙江县",
  20589. "value": "230221"
  20590. }, {
  20591. "label": "依安县",
  20592. "value": "230223"
  20593. }, {
  20594. "label": "泰来县",
  20595. "value": "230224"
  20596. }, {
  20597. "label": "甘南县",
  20598. "value": "230225"
  20599. }, {
  20600. "label": "富裕县",
  20601. "value": "230227"
  20602. }, {
  20603. "label": "克山县",
  20604. "value": "230229"
  20605. }, {
  20606. "label": "克东县",
  20607. "value": "230230"
  20608. }, {
  20609. "label": "拜泉县",
  20610. "value": "230231"
  20611. }, {
  20612. "label": "讷河市",
  20613. "value": "230281"
  20614. }], [{
  20615. "label": "鸡冠区",
  20616. "value": "230302"
  20617. }, {
  20618. "label": "恒山区",
  20619. "value": "230303"
  20620. }, {
  20621. "label": "滴道区",
  20622. "value": "230304"
  20623. }, {
  20624. "label": "梨树区",
  20625. "value": "230305"
  20626. }, {
  20627. "label": "城子河区",
  20628. "value": "230306"
  20629. }, {
  20630. "label": "麻山区",
  20631. "value": "230307"
  20632. }, {
  20633. "label": "鸡东县",
  20634. "value": "230321"
  20635. }, {
  20636. "label": "虎林市",
  20637. "value": "230381"
  20638. }, {
  20639. "label": "密山市",
  20640. "value": "230382"
  20641. }], [{
  20642. "label": "向阳区",
  20643. "value": "230402"
  20644. }, {
  20645. "label": "工农区",
  20646. "value": "230403"
  20647. }, {
  20648. "label": "南山区",
  20649. "value": "230404"
  20650. }, {
  20651. "label": "兴安区",
  20652. "value": "230405"
  20653. }, {
  20654. "label": "东山区",
  20655. "value": "230406"
  20656. }, {
  20657. "label": "兴山区",
  20658. "value": "230407"
  20659. }, {
  20660. "label": "萝北县",
  20661. "value": "230421"
  20662. }, {
  20663. "label": "绥滨县",
  20664. "value": "230422"
  20665. }], [{
  20666. "label": "尖山区",
  20667. "value": "230502"
  20668. }, {
  20669. "label": "岭东区",
  20670. "value": "230503"
  20671. }, {
  20672. "label": "四方台区",
  20673. "value": "230505"
  20674. }, {
  20675. "label": "宝山区",
  20676. "value": "230506"
  20677. }, {
  20678. "label": "集贤县",
  20679. "value": "230521"
  20680. }, {
  20681. "label": "友谊县",
  20682. "value": "230522"
  20683. }, {
  20684. "label": "宝清县",
  20685. "value": "230523"
  20686. }, {
  20687. "label": "饶河县",
  20688. "value": "230524"
  20689. }], [{
  20690. "label": "萨尔图区",
  20691. "value": "230602"
  20692. }, {
  20693. "label": "龙凤区",
  20694. "value": "230603"
  20695. }, {
  20696. "label": "让胡路区",
  20697. "value": "230604"
  20698. }, {
  20699. "label": "红岗区",
  20700. "value": "230605"
  20701. }, {
  20702. "label": "大同区",
  20703. "value": "230606"
  20704. }, {
  20705. "label": "肇州县",
  20706. "value": "230621"
  20707. }, {
  20708. "label": "肇源县",
  20709. "value": "230622"
  20710. }, {
  20711. "label": "林甸县",
  20712. "value": "230623"
  20713. }, {
  20714. "label": "杜尔伯特蒙古族自治县",
  20715. "value": "230624"
  20716. }, {
  20717. "label": "大庆高新技术产业开发区",
  20718. "value": "230671"
  20719. }], [{
  20720. "label": "伊春区",
  20721. "value": "230702"
  20722. }, {
  20723. "label": "南岔区",
  20724. "value": "230703"
  20725. }, {
  20726. "label": "友好区",
  20727. "value": "230704"
  20728. }, {
  20729. "label": "西林区",
  20730. "value": "230705"
  20731. }, {
  20732. "label": "翠峦区",
  20733. "value": "230706"
  20734. }, {
  20735. "label": "新青区",
  20736. "value": "230707"
  20737. }, {
  20738. "label": "美溪区",
  20739. "value": "230708"
  20740. }, {
  20741. "label": "金山屯区",
  20742. "value": "230709"
  20743. }, {
  20744. "label": "五营区",
  20745. "value": "230710"
  20746. }, {
  20747. "label": "乌马河区",
  20748. "value": "230711"
  20749. }, {
  20750. "label": "汤旺河区",
  20751. "value": "230712"
  20752. }, {
  20753. "label": "带岭区",
  20754. "value": "230713"
  20755. }, {
  20756. "label": "乌伊岭区",
  20757. "value": "230714"
  20758. }, {
  20759. "label": "红星区",
  20760. "value": "230715"
  20761. }, {
  20762. "label": "上甘岭区",
  20763. "value": "230716"
  20764. }, {
  20765. "label": "嘉荫县",
  20766. "value": "230722"
  20767. }, {
  20768. "label": "铁力市",
  20769. "value": "230781"
  20770. }], [{
  20771. "label": "向阳区",
  20772. "value": "230803"
  20773. }, {
  20774. "label": "前进区",
  20775. "value": "230804"
  20776. }, {
  20777. "label": "东风区",
  20778. "value": "230805"
  20779. }, {
  20780. "label": "郊区",
  20781. "value": "230811"
  20782. }, {
  20783. "label": "桦南县",
  20784. "value": "230822"
  20785. }, {
  20786. "label": "桦川县",
  20787. "value": "230826"
  20788. }, {
  20789. "label": "汤原县",
  20790. "value": "230828"
  20791. }, {
  20792. "label": "同江市",
  20793. "value": "230881"
  20794. }, {
  20795. "label": "富锦市",
  20796. "value": "230882"
  20797. }, {
  20798. "label": "抚远市",
  20799. "value": "230883"
  20800. }], [{
  20801. "label": "新兴区",
  20802. "value": "230902"
  20803. }, {
  20804. "label": "桃山区",
  20805. "value": "230903"
  20806. }, {
  20807. "label": "茄子河区",
  20808. "value": "230904"
  20809. }, {
  20810. "label": "勃利县",
  20811. "value": "230921"
  20812. }], [{
  20813. "label": "东安区",
  20814. "value": "231002"
  20815. }, {
  20816. "label": "阳明区",
  20817. "value": "231003"
  20818. }, {
  20819. "label": "爱民区",
  20820. "value": "231004"
  20821. }, {
  20822. "label": "西安区",
  20823. "value": "231005"
  20824. }, {
  20825. "label": "林口县",
  20826. "value": "231025"
  20827. }, {
  20828. "label": "牡丹江经济技术开发区",
  20829. "value": "231071"
  20830. }, {
  20831. "label": "绥芬河市",
  20832. "value": "231081"
  20833. }, {
  20834. "label": "海林市",
  20835. "value": "231083"
  20836. }, {
  20837. "label": "宁安市",
  20838. "value": "231084"
  20839. }, {
  20840. "label": "穆棱市",
  20841. "value": "231085"
  20842. }, {
  20843. "label": "东宁市",
  20844. "value": "231086"
  20845. }], [{
  20846. "label": "爱辉区",
  20847. "value": "231102"
  20848. }, {
  20849. "label": "嫩江县",
  20850. "value": "231121"
  20851. }, {
  20852. "label": "逊克县",
  20853. "value": "231123"
  20854. }, {
  20855. "label": "孙吴县",
  20856. "value": "231124"
  20857. }, {
  20858. "label": "北安市",
  20859. "value": "231181"
  20860. }, {
  20861. "label": "五大连池市",
  20862. "value": "231182"
  20863. }], [{
  20864. "label": "北林区",
  20865. "value": "231202"
  20866. }, {
  20867. "label": "望奎县",
  20868. "value": "231221"
  20869. }, {
  20870. "label": "兰西县",
  20871. "value": "231222"
  20872. }, {
  20873. "label": "青冈县",
  20874. "value": "231223"
  20875. }, {
  20876. "label": "庆安县",
  20877. "value": "231224"
  20878. }, {
  20879. "label": "明水县",
  20880. "value": "231225"
  20881. }, {
  20882. "label": "绥棱县",
  20883. "value": "231226"
  20884. }, {
  20885. "label": "安达市",
  20886. "value": "231281"
  20887. }, {
  20888. "label": "肇东市",
  20889. "value": "231282"
  20890. }, {
  20891. "label": "海伦市",
  20892. "value": "231283"
  20893. }], [{
  20894. "label": "加格达奇区",
  20895. "value": "232701"
  20896. }, {
  20897. "label": "松岭区",
  20898. "value": "232702"
  20899. }, {
  20900. "label": "新林区",
  20901. "value": "232703"
  20902. }, {
  20903. "label": "呼中区",
  20904. "value": "232704"
  20905. }, {
  20906. "label": "呼玛县",
  20907. "value": "232721"
  20908. }, {
  20909. "label": "塔河县",
  20910. "value": "232722"
  20911. }, {
  20912. "label": "漠河县",
  20913. "value": "232723"
  20914. }]], [[{
  20915. "label": "黄浦区",
  20916. "value": "310101"
  20917. }, {
  20918. "label": "徐汇区",
  20919. "value": "310104"
  20920. }, {
  20921. "label": "长宁区",
  20922. "value": "310105"
  20923. }, {
  20924. "label": "静安区",
  20925. "value": "310106"
  20926. }, {
  20927. "label": "普陀区",
  20928. "value": "310107"
  20929. }, {
  20930. "label": "虹口区",
  20931. "value": "310109"
  20932. }, {
  20933. "label": "杨浦区",
  20934. "value": "310110"
  20935. }, {
  20936. "label": "闵行区",
  20937. "value": "310112"
  20938. }, {
  20939. "label": "宝山区",
  20940. "value": "310113"
  20941. }, {
  20942. "label": "嘉定区",
  20943. "value": "310114"
  20944. }, {
  20945. "label": "浦东新区",
  20946. "value": "310115"
  20947. }, {
  20948. "label": "金山区",
  20949. "value": "310116"
  20950. }, {
  20951. "label": "松江区",
  20952. "value": "310117"
  20953. }, {
  20954. "label": "青浦区",
  20955. "value": "310118"
  20956. }, {
  20957. "label": "奉贤区",
  20958. "value": "310120"
  20959. }, {
  20960. "label": "崇明区",
  20961. "value": "310151"
  20962. }]], [[{
  20963. "label": "玄武区",
  20964. "value": "320102"
  20965. }, {
  20966. "label": "秦淮区",
  20967. "value": "320104"
  20968. }, {
  20969. "label": "建邺区",
  20970. "value": "320105"
  20971. }, {
  20972. "label": "鼓楼区",
  20973. "value": "320106"
  20974. }, {
  20975. "label": "浦口区",
  20976. "value": "320111"
  20977. }, {
  20978. "label": "栖霞区",
  20979. "value": "320113"
  20980. }, {
  20981. "label": "雨花台区",
  20982. "value": "320114"
  20983. }, {
  20984. "label": "江宁区",
  20985. "value": "320115"
  20986. }, {
  20987. "label": "六合区",
  20988. "value": "320116"
  20989. }, {
  20990. "label": "溧水区",
  20991. "value": "320117"
  20992. }, {
  20993. "label": "高淳区",
  20994. "value": "320118"
  20995. }], [{
  20996. "label": "锡山区",
  20997. "value": "320205"
  20998. }, {
  20999. "label": "惠山区",
  21000. "value": "320206"
  21001. }, {
  21002. "label": "滨湖区",
  21003. "value": "320211"
  21004. }, {
  21005. "label": "梁溪区",
  21006. "value": "320213"
  21007. }, {
  21008. "label": "新吴区",
  21009. "value": "320214"
  21010. }, {
  21011. "label": "江阴市",
  21012. "value": "320281"
  21013. }, {
  21014. "label": "宜兴市",
  21015. "value": "320282"
  21016. }], [{
  21017. "label": "鼓楼区",
  21018. "value": "320302"
  21019. }, {
  21020. "label": "云龙区",
  21021. "value": "320303"
  21022. }, {
  21023. "label": "贾汪区",
  21024. "value": "320305"
  21025. }, {
  21026. "label": "泉山区",
  21027. "value": "320311"
  21028. }, {
  21029. "label": "铜山区",
  21030. "value": "320312"
  21031. }, {
  21032. "label": "丰县",
  21033. "value": "320321"
  21034. }, {
  21035. "label": "沛县",
  21036. "value": "320322"
  21037. }, {
  21038. "label": "睢宁县",
  21039. "value": "320324"
  21040. }, {
  21041. "label": "徐州经济技术开发区",
  21042. "value": "320371"
  21043. }, {
  21044. "label": "新沂市",
  21045. "value": "320381"
  21046. }, {
  21047. "label": "邳州市",
  21048. "value": "320382"
  21049. }], [{
  21050. "label": "天宁区",
  21051. "value": "320402"
  21052. }, {
  21053. "label": "钟楼区",
  21054. "value": "320404"
  21055. }, {
  21056. "label": "新北区",
  21057. "value": "320411"
  21058. }, {
  21059. "label": "武进区",
  21060. "value": "320412"
  21061. }, {
  21062. "label": "金坛区",
  21063. "value": "320413"
  21064. }, {
  21065. "label": "溧阳市",
  21066. "value": "320481"
  21067. }], [{
  21068. "label": "虎丘区",
  21069. "value": "320505"
  21070. }, {
  21071. "label": "吴中区",
  21072. "value": "320506"
  21073. }, {
  21074. "label": "相城区",
  21075. "value": "320507"
  21076. }, {
  21077. "label": "姑苏区",
  21078. "value": "320508"
  21079. }, {
  21080. "label": "吴江区",
  21081. "value": "320509"
  21082. }, {
  21083. "label": "苏州工业园区",
  21084. "value": "320571"
  21085. }, {
  21086. "label": "常熟市",
  21087. "value": "320581"
  21088. }, {
  21089. "label": "张家港市",
  21090. "value": "320582"
  21091. }, {
  21092. "label": "昆山市",
  21093. "value": "320583"
  21094. }, {
  21095. "label": "太仓市",
  21096. "value": "320585"
  21097. }], [{
  21098. "label": "崇川区",
  21099. "value": "320602"
  21100. }, {
  21101. "label": "港闸区",
  21102. "value": "320611"
  21103. }, {
  21104. "label": "通州区",
  21105. "value": "320612"
  21106. }, {
  21107. "label": "海安县",
  21108. "value": "320621"
  21109. }, {
  21110. "label": "如东县",
  21111. "value": "320623"
  21112. }, {
  21113. "label": "南通经济技术开发区",
  21114. "value": "320671"
  21115. }, {
  21116. "label": "启东市",
  21117. "value": "320681"
  21118. }, {
  21119. "label": "如皋市",
  21120. "value": "320682"
  21121. }, {
  21122. "label": "海门市",
  21123. "value": "320684"
  21124. }], [{
  21125. "label": "连云区",
  21126. "value": "320703"
  21127. }, {
  21128. "label": "海州区",
  21129. "value": "320706"
  21130. }, {
  21131. "label": "赣榆区",
  21132. "value": "320707"
  21133. }, {
  21134. "label": "东海县",
  21135. "value": "320722"
  21136. }, {
  21137. "label": "灌云县",
  21138. "value": "320723"
  21139. }, {
  21140. "label": "灌南县",
  21141. "value": "320724"
  21142. }, {
  21143. "label": "连云港经济技术开发区",
  21144. "value": "320771"
  21145. }, {
  21146. "label": "连云港高新技术产业开发区",
  21147. "value": "320772"
  21148. }], [{
  21149. "label": "淮安区",
  21150. "value": "320803"
  21151. }, {
  21152. "label": "淮阴区",
  21153. "value": "320804"
  21154. }, {
  21155. "label": "清江浦区",
  21156. "value": "320812"
  21157. }, {
  21158. "label": "洪泽区",
  21159. "value": "320813"
  21160. }, {
  21161. "label": "涟水县",
  21162. "value": "320826"
  21163. }, {
  21164. "label": "盱眙县",
  21165. "value": "320830"
  21166. }, {
  21167. "label": "金湖县",
  21168. "value": "320831"
  21169. }, {
  21170. "label": "淮安经济技术开发区",
  21171. "value": "320871"
  21172. }], [{
  21173. "label": "亭湖区",
  21174. "value": "320902"
  21175. }, {
  21176. "label": "盐都区",
  21177. "value": "320903"
  21178. }, {
  21179. "label": "大丰区",
  21180. "value": "320904"
  21181. }, {
  21182. "label": "响水县",
  21183. "value": "320921"
  21184. }, {
  21185. "label": "滨海县",
  21186. "value": "320922"
  21187. }, {
  21188. "label": "阜宁县",
  21189. "value": "320923"
  21190. }, {
  21191. "label": "射阳县",
  21192. "value": "320924"
  21193. }, {
  21194. "label": "建湖县",
  21195. "value": "320925"
  21196. }, {
  21197. "label": "盐城经济技术开发区",
  21198. "value": "320971"
  21199. }, {
  21200. "label": "东台市",
  21201. "value": "320981"
  21202. }], [{
  21203. "label": "广陵区",
  21204. "value": "321002"
  21205. }, {
  21206. "label": "邗江区",
  21207. "value": "321003"
  21208. }, {
  21209. "label": "江都区",
  21210. "value": "321012"
  21211. }, {
  21212. "label": "宝应县",
  21213. "value": "321023"
  21214. }, {
  21215. "label": "扬州经济技术开发区",
  21216. "value": "321071"
  21217. }, {
  21218. "label": "仪征市",
  21219. "value": "321081"
  21220. }, {
  21221. "label": "高邮市",
  21222. "value": "321084"
  21223. }], [{
  21224. "label": "京口区",
  21225. "value": "321102"
  21226. }, {
  21227. "label": "润州区",
  21228. "value": "321111"
  21229. }, {
  21230. "label": "丹徒区",
  21231. "value": "321112"
  21232. }, {
  21233. "label": "镇江新区",
  21234. "value": "321171"
  21235. }, {
  21236. "label": "丹阳市",
  21237. "value": "321181"
  21238. }, {
  21239. "label": "扬中市",
  21240. "value": "321182"
  21241. }, {
  21242. "label": "句容市",
  21243. "value": "321183"
  21244. }], [{
  21245. "label": "海陵区",
  21246. "value": "321202"
  21247. }, {
  21248. "label": "高港区",
  21249. "value": "321203"
  21250. }, {
  21251. "label": "姜堰区",
  21252. "value": "321204"
  21253. }, {
  21254. "label": "泰州医药高新技术产业开发区",
  21255. "value": "321271"
  21256. }, {
  21257. "label": "兴化市",
  21258. "value": "321281"
  21259. }, {
  21260. "label": "靖江市",
  21261. "value": "321282"
  21262. }, {
  21263. "label": "泰兴市",
  21264. "value": "321283"
  21265. }], [{
  21266. "label": "宿城区",
  21267. "value": "321302"
  21268. }, {
  21269. "label": "宿豫区",
  21270. "value": "321311"
  21271. }, {
  21272. "label": "沭阳县",
  21273. "value": "321322"
  21274. }, {
  21275. "label": "泗阳县",
  21276. "value": "321323"
  21277. }, {
  21278. "label": "泗洪县",
  21279. "value": "321324"
  21280. }, {
  21281. "label": "宿迁经济技术开发区",
  21282. "value": "321371"
  21283. }]], [[{
  21284. "label": "上城区",
  21285. "value": "330102"
  21286. }, {
  21287. "label": "下城区",
  21288. "value": "330103"
  21289. }, {
  21290. "label": "江干区",
  21291. "value": "330104"
  21292. }, {
  21293. "label": "拱墅区",
  21294. "value": "330105"
  21295. }, {
  21296. "label": "西湖区",
  21297. "value": "330106"
  21298. }, {
  21299. "label": "滨江区",
  21300. "value": "330108"
  21301. }, {
  21302. "label": "萧山区",
  21303. "value": "330109"
  21304. }, {
  21305. "label": "余杭区",
  21306. "value": "330110"
  21307. }, {
  21308. "label": "富阳区",
  21309. "value": "330111"
  21310. }, {
  21311. "label": "临安区",
  21312. "value": "330112"
  21313. }, {
  21314. "label": "桐庐县",
  21315. "value": "330122"
  21316. }, {
  21317. "label": "淳安县",
  21318. "value": "330127"
  21319. }, {
  21320. "label": "建德市",
  21321. "value": "330182"
  21322. }], [{
  21323. "label": "海曙区",
  21324. "value": "330203"
  21325. }, {
  21326. "label": "江北区",
  21327. "value": "330205"
  21328. }, {
  21329. "label": "北仑区",
  21330. "value": "330206"
  21331. }, {
  21332. "label": "镇海区",
  21333. "value": "330211"
  21334. }, {
  21335. "label": "鄞州区",
  21336. "value": "330212"
  21337. }, {
  21338. "label": "奉化区",
  21339. "value": "330213"
  21340. }, {
  21341. "label": "象山县",
  21342. "value": "330225"
  21343. }, {
  21344. "label": "宁海县",
  21345. "value": "330226"
  21346. }, {
  21347. "label": "余姚市",
  21348. "value": "330281"
  21349. }, {
  21350. "label": "慈溪市",
  21351. "value": "330282"
  21352. }], [{
  21353. "label": "鹿城区",
  21354. "value": "330302"
  21355. }, {
  21356. "label": "龙湾区",
  21357. "value": "330303"
  21358. }, {
  21359. "label": "瓯海区",
  21360. "value": "330304"
  21361. }, {
  21362. "label": "洞头区",
  21363. "value": "330305"
  21364. }, {
  21365. "label": "永嘉县",
  21366. "value": "330324"
  21367. }, {
  21368. "label": "平阳县",
  21369. "value": "330326"
  21370. }, {
  21371. "label": "苍南县",
  21372. "value": "330327"
  21373. }, {
  21374. "label": "文成县",
  21375. "value": "330328"
  21376. }, {
  21377. "label": "泰顺县",
  21378. "value": "330329"
  21379. }, {
  21380. "label": "温州经济技术开发区",
  21381. "value": "330371"
  21382. }, {
  21383. "label": "瑞安市",
  21384. "value": "330381"
  21385. }, {
  21386. "label": "乐清市",
  21387. "value": "330382"
  21388. }], [{
  21389. "label": "南湖区",
  21390. "value": "330402"
  21391. }, {
  21392. "label": "秀洲区",
  21393. "value": "330411"
  21394. }, {
  21395. "label": "嘉善县",
  21396. "value": "330421"
  21397. }, {
  21398. "label": "海盐县",
  21399. "value": "330424"
  21400. }, {
  21401. "label": "海宁市",
  21402. "value": "330481"
  21403. }, {
  21404. "label": "平湖市",
  21405. "value": "330482"
  21406. }, {
  21407. "label": "桐乡市",
  21408. "value": "330483"
  21409. }], [{
  21410. "label": "吴兴区",
  21411. "value": "330502"
  21412. }, {
  21413. "label": "南浔区",
  21414. "value": "330503"
  21415. }, {
  21416. "label": "德清县",
  21417. "value": "330521"
  21418. }, {
  21419. "label": "长兴县",
  21420. "value": "330522"
  21421. }, {
  21422. "label": "安吉县",
  21423. "value": "330523"
  21424. }], [{
  21425. "label": "越城区",
  21426. "value": "330602"
  21427. }, {
  21428. "label": "柯桥区",
  21429. "value": "330603"
  21430. }, {
  21431. "label": "上虞区",
  21432. "value": "330604"
  21433. }, {
  21434. "label": "新昌县",
  21435. "value": "330624"
  21436. }, {
  21437. "label": "诸暨市",
  21438. "value": "330681"
  21439. }, {
  21440. "label": "嵊州市",
  21441. "value": "330683"
  21442. }], [{
  21443. "label": "婺城区",
  21444. "value": "330702"
  21445. }, {
  21446. "label": "金东区",
  21447. "value": "330703"
  21448. }, {
  21449. "label": "武义县",
  21450. "value": "330723"
  21451. }, {
  21452. "label": "浦江县",
  21453. "value": "330726"
  21454. }, {
  21455. "label": "磐安县",
  21456. "value": "330727"
  21457. }, {
  21458. "label": "兰溪市",
  21459. "value": "330781"
  21460. }, {
  21461. "label": "义乌市",
  21462. "value": "330782"
  21463. }, {
  21464. "label": "东阳市",
  21465. "value": "330783"
  21466. }, {
  21467. "label": "永康市",
  21468. "value": "330784"
  21469. }], [{
  21470. "label": "柯城区",
  21471. "value": "330802"
  21472. }, {
  21473. "label": "衢江区",
  21474. "value": "330803"
  21475. }, {
  21476. "label": "常山县",
  21477. "value": "330822"
  21478. }, {
  21479. "label": "开化县",
  21480. "value": "330824"
  21481. }, {
  21482. "label": "龙游县",
  21483. "value": "330825"
  21484. }, {
  21485. "label": "江山市",
  21486. "value": "330881"
  21487. }], [{
  21488. "label": "定海区",
  21489. "value": "330902"
  21490. }, {
  21491. "label": "普陀区",
  21492. "value": "330903"
  21493. }, {
  21494. "label": "岱山县",
  21495. "value": "330921"
  21496. }, {
  21497. "label": "嵊泗县",
  21498. "value": "330922"
  21499. }], [{
  21500. "label": "椒江区",
  21501. "value": "331002"
  21502. }, {
  21503. "label": "黄岩区",
  21504. "value": "331003"
  21505. }, {
  21506. "label": "路桥区",
  21507. "value": "331004"
  21508. }, {
  21509. "label": "三门县",
  21510. "value": "331022"
  21511. }, {
  21512. "label": "天台县",
  21513. "value": "331023"
  21514. }, {
  21515. "label": "仙居县",
  21516. "value": "331024"
  21517. }, {
  21518. "label": "温岭市",
  21519. "value": "331081"
  21520. }, {
  21521. "label": "临海市",
  21522. "value": "331082"
  21523. }, {
  21524. "label": "玉环市",
  21525. "value": "331083"
  21526. }], [{
  21527. "label": "莲都区",
  21528. "value": "331102"
  21529. }, {
  21530. "label": "青田县",
  21531. "value": "331121"
  21532. }, {
  21533. "label": "缙云县",
  21534. "value": "331122"
  21535. }, {
  21536. "label": "遂昌县",
  21537. "value": "331123"
  21538. }, {
  21539. "label": "松阳县",
  21540. "value": "331124"
  21541. }, {
  21542. "label": "云和县",
  21543. "value": "331125"
  21544. }, {
  21545. "label": "庆元县",
  21546. "value": "331126"
  21547. }, {
  21548. "label": "景宁畲族自治县",
  21549. "value": "331127"
  21550. }, {
  21551. "label": "龙泉市",
  21552. "value": "331181"
  21553. }]], [[{
  21554. "label": "瑶海区",
  21555. "value": "340102"
  21556. }, {
  21557. "label": "庐阳区",
  21558. "value": "340103"
  21559. }, {
  21560. "label": "蜀山区",
  21561. "value": "340104"
  21562. }, {
  21563. "label": "包河区",
  21564. "value": "340111"
  21565. }, {
  21566. "label": "长丰县",
  21567. "value": "340121"
  21568. }, {
  21569. "label": "肥东县",
  21570. "value": "340122"
  21571. }, {
  21572. "label": "肥西县",
  21573. "value": "340123"
  21574. }, {
  21575. "label": "庐江县",
  21576. "value": "340124"
  21577. }, {
  21578. "label": "合肥高新技术产业开发区",
  21579. "value": "340171"
  21580. }, {
  21581. "label": "合肥经济技术开发区",
  21582. "value": "340172"
  21583. }, {
  21584. "label": "合肥新站高新技术产业开发区",
  21585. "value": "340173"
  21586. }, {
  21587. "label": "巢湖市",
  21588. "value": "340181"
  21589. }], [{
  21590. "label": "镜湖区",
  21591. "value": "340202"
  21592. }, {
  21593. "label": "弋江区",
  21594. "value": "340203"
  21595. }, {
  21596. "label": "鸠江区",
  21597. "value": "340207"
  21598. }, {
  21599. "label": "三山区",
  21600. "value": "340208"
  21601. }, {
  21602. "label": "芜湖县",
  21603. "value": "340221"
  21604. }, {
  21605. "label": "繁昌县",
  21606. "value": "340222"
  21607. }, {
  21608. "label": "南陵县",
  21609. "value": "340223"
  21610. }, {
  21611. "label": "无为县",
  21612. "value": "340225"
  21613. }, {
  21614. "label": "芜湖经济技术开发区",
  21615. "value": "340271"
  21616. }, {
  21617. "label": "安徽芜湖长江大桥经济开发区",
  21618. "value": "340272"
  21619. }], [{
  21620. "label": "龙子湖区",
  21621. "value": "340302"
  21622. }, {
  21623. "label": "蚌山区",
  21624. "value": "340303"
  21625. }, {
  21626. "label": "禹会区",
  21627. "value": "340304"
  21628. }, {
  21629. "label": "淮上区",
  21630. "value": "340311"
  21631. }, {
  21632. "label": "怀远县",
  21633. "value": "340321"
  21634. }, {
  21635. "label": "五河县",
  21636. "value": "340322"
  21637. }, {
  21638. "label": "固镇县",
  21639. "value": "340323"
  21640. }, {
  21641. "label": "蚌埠市高新技术开发区",
  21642. "value": "340371"
  21643. }, {
  21644. "label": "蚌埠市经济开发区",
  21645. "value": "340372"
  21646. }], [{
  21647. "label": "大通区",
  21648. "value": "340402"
  21649. }, {
  21650. "label": "田家庵区",
  21651. "value": "340403"
  21652. }, {
  21653. "label": "谢家集区",
  21654. "value": "340404"
  21655. }, {
  21656. "label": "八公山区",
  21657. "value": "340405"
  21658. }, {
  21659. "label": "潘集区",
  21660. "value": "340406"
  21661. }, {
  21662. "label": "凤台县",
  21663. "value": "340421"
  21664. }, {
  21665. "label": "寿县",
  21666. "value": "340422"
  21667. }], [{
  21668. "label": "花山区",
  21669. "value": "340503"
  21670. }, {
  21671. "label": "雨山区",
  21672. "value": "340504"
  21673. }, {
  21674. "label": "博望区",
  21675. "value": "340506"
  21676. }, {
  21677. "label": "当涂县",
  21678. "value": "340521"
  21679. }, {
  21680. "label": "含山县",
  21681. "value": "340522"
  21682. }, {
  21683. "label": "和县",
  21684. "value": "340523"
  21685. }], [{
  21686. "label": "杜集区",
  21687. "value": "340602"
  21688. }, {
  21689. "label": "相山区",
  21690. "value": "340603"
  21691. }, {
  21692. "label": "烈山区",
  21693. "value": "340604"
  21694. }, {
  21695. "label": "濉溪县",
  21696. "value": "340621"
  21697. }], [{
  21698. "label": "铜官区",
  21699. "value": "340705"
  21700. }, {
  21701. "label": "义安区",
  21702. "value": "340706"
  21703. }, {
  21704. "label": "郊区",
  21705. "value": "340711"
  21706. }, {
  21707. "label": "枞阳县",
  21708. "value": "340722"
  21709. }], [{
  21710. "label": "迎江区",
  21711. "value": "340802"
  21712. }, {
  21713. "label": "大观区",
  21714. "value": "340803"
  21715. }, {
  21716. "label": "宜秀区",
  21717. "value": "340811"
  21718. }, {
  21719. "label": "怀宁县",
  21720. "value": "340822"
  21721. }, {
  21722. "label": "潜山县",
  21723. "value": "340824"
  21724. }, {
  21725. "label": "太湖县",
  21726. "value": "340825"
  21727. }, {
  21728. "label": "宿松县",
  21729. "value": "340826"
  21730. }, {
  21731. "label": "望江县",
  21732. "value": "340827"
  21733. }, {
  21734. "label": "岳西县",
  21735. "value": "340828"
  21736. }, {
  21737. "label": "安徽安庆经济开发区",
  21738. "value": "340871"
  21739. }, {
  21740. "label": "桐城市",
  21741. "value": "340881"
  21742. }], [{
  21743. "label": "屯溪区",
  21744. "value": "341002"
  21745. }, {
  21746. "label": "黄山区",
  21747. "value": "341003"
  21748. }, {
  21749. "label": "徽州区",
  21750. "value": "341004"
  21751. }, {
  21752. "label": "歙县",
  21753. "value": "341021"
  21754. }, {
  21755. "label": "休宁县",
  21756. "value": "341022"
  21757. }, {
  21758. "label": "黟县",
  21759. "value": "341023"
  21760. }, {
  21761. "label": "祁门县",
  21762. "value": "341024"
  21763. }], [{
  21764. "label": "琅琊区",
  21765. "value": "341102"
  21766. }, {
  21767. "label": "南谯区",
  21768. "value": "341103"
  21769. }, {
  21770. "label": "来安县",
  21771. "value": "341122"
  21772. }, {
  21773. "label": "全椒县",
  21774. "value": "341124"
  21775. }, {
  21776. "label": "定远县",
  21777. "value": "341125"
  21778. }, {
  21779. "label": "凤阳县",
  21780. "value": "341126"
  21781. }, {
  21782. "label": "苏滁现代产业园",
  21783. "value": "341171"
  21784. }, {
  21785. "label": "滁州经济技术开发区",
  21786. "value": "341172"
  21787. }, {
  21788. "label": "天长市",
  21789. "value": "341181"
  21790. }, {
  21791. "label": "明光市",
  21792. "value": "341182"
  21793. }], [{
  21794. "label": "颍州区",
  21795. "value": "341202"
  21796. }, {
  21797. "label": "颍东区",
  21798. "value": "341203"
  21799. }, {
  21800. "label": "颍泉区",
  21801. "value": "341204"
  21802. }, {
  21803. "label": "临泉县",
  21804. "value": "341221"
  21805. }, {
  21806. "label": "太和县",
  21807. "value": "341222"
  21808. }, {
  21809. "label": "阜南县",
  21810. "value": "341225"
  21811. }, {
  21812. "label": "颍上县",
  21813. "value": "341226"
  21814. }, {
  21815. "label": "阜阳合肥现代产业园区",
  21816. "value": "341271"
  21817. }, {
  21818. "label": "阜阳经济技术开发区",
  21819. "value": "341272"
  21820. }, {
  21821. "label": "界首市",
  21822. "value": "341282"
  21823. }], [{
  21824. "label": "埇桥区",
  21825. "value": "341302"
  21826. }, {
  21827. "label": "砀山县",
  21828. "value": "341321"
  21829. }, {
  21830. "label": "萧县",
  21831. "value": "341322"
  21832. }, {
  21833. "label": "灵璧县",
  21834. "value": "341323"
  21835. }, {
  21836. "label": "泗县",
  21837. "value": "341324"
  21838. }, {
  21839. "label": "宿州马鞍山现代产业园区",
  21840. "value": "341371"
  21841. }, {
  21842. "label": "宿州经济技术开发区",
  21843. "value": "341372"
  21844. }], [{
  21845. "label": "金安区",
  21846. "value": "341502"
  21847. }, {
  21848. "label": "裕安区",
  21849. "value": "341503"
  21850. }, {
  21851. "label": "叶集区",
  21852. "value": "341504"
  21853. }, {
  21854. "label": "霍邱县",
  21855. "value": "341522"
  21856. }, {
  21857. "label": "舒城县",
  21858. "value": "341523"
  21859. }, {
  21860. "label": "金寨县",
  21861. "value": "341524"
  21862. }, {
  21863. "label": "霍山县",
  21864. "value": "341525"
  21865. }], [{
  21866. "label": "谯城区",
  21867. "value": "341602"
  21868. }, {
  21869. "label": "涡阳县",
  21870. "value": "341621"
  21871. }, {
  21872. "label": "蒙城县",
  21873. "value": "341622"
  21874. }, {
  21875. "label": "利辛县",
  21876. "value": "341623"
  21877. }], [{
  21878. "label": "贵池区",
  21879. "value": "341702"
  21880. }, {
  21881. "label": "东至县",
  21882. "value": "341721"
  21883. }, {
  21884. "label": "石台县",
  21885. "value": "341722"
  21886. }, {
  21887. "label": "青阳县",
  21888. "value": "341723"
  21889. }], [{
  21890. "label": "宣州区",
  21891. "value": "341802"
  21892. }, {
  21893. "label": "郎溪县",
  21894. "value": "341821"
  21895. }, {
  21896. "label": "广德县",
  21897. "value": "341822"
  21898. }, {
  21899. "label": "泾县",
  21900. "value": "341823"
  21901. }, {
  21902. "label": "绩溪县",
  21903. "value": "341824"
  21904. }, {
  21905. "label": "旌德县",
  21906. "value": "341825"
  21907. }, {
  21908. "label": "宣城市经济开发区",
  21909. "value": "341871"
  21910. }, {
  21911. "label": "宁国市",
  21912. "value": "341881"
  21913. }]], [[{
  21914. "label": "鼓楼区",
  21915. "value": "350102"
  21916. }, {
  21917. "label": "台江区",
  21918. "value": "350103"
  21919. }, {
  21920. "label": "仓山区",
  21921. "value": "350104"
  21922. }, {
  21923. "label": "马尾区",
  21924. "value": "350105"
  21925. }, {
  21926. "label": "晋安区",
  21927. "value": "350111"
  21928. }, {
  21929. "label": "闽侯县",
  21930. "value": "350121"
  21931. }, {
  21932. "label": "连江县",
  21933. "value": "350122"
  21934. }, {
  21935. "label": "罗源县",
  21936. "value": "350123"
  21937. }, {
  21938. "label": "闽清县",
  21939. "value": "350124"
  21940. }, {
  21941. "label": "永泰县",
  21942. "value": "350125"
  21943. }, {
  21944. "label": "平潭县",
  21945. "value": "350128"
  21946. }, {
  21947. "label": "福清市",
  21948. "value": "350181"
  21949. }, {
  21950. "label": "长乐市",
  21951. "value": "350182"
  21952. }], [{
  21953. "label": "思明区",
  21954. "value": "350203"
  21955. }, {
  21956. "label": "海沧区",
  21957. "value": "350205"
  21958. }, {
  21959. "label": "湖里区",
  21960. "value": "350206"
  21961. }, {
  21962. "label": "集美区",
  21963. "value": "350211"
  21964. }, {
  21965. "label": "同安区",
  21966. "value": "350212"
  21967. }, {
  21968. "label": "翔安区",
  21969. "value": "350213"
  21970. }], [{
  21971. "label": "城厢区",
  21972. "value": "350302"
  21973. }, {
  21974. "label": "涵江区",
  21975. "value": "350303"
  21976. }, {
  21977. "label": "荔城区",
  21978. "value": "350304"
  21979. }, {
  21980. "label": "秀屿区",
  21981. "value": "350305"
  21982. }, {
  21983. "label": "仙游县",
  21984. "value": "350322"
  21985. }], [{
  21986. "label": "梅列区",
  21987. "value": "350402"
  21988. }, {
  21989. "label": "三元区",
  21990. "value": "350403"
  21991. }, {
  21992. "label": "明溪县",
  21993. "value": "350421"
  21994. }, {
  21995. "label": "清流县",
  21996. "value": "350423"
  21997. }, {
  21998. "label": "宁化县",
  21999. "value": "350424"
  22000. }, {
  22001. "label": "大田县",
  22002. "value": "350425"
  22003. }, {
  22004. "label": "尤溪县",
  22005. "value": "350426"
  22006. }, {
  22007. "label": "沙县",
  22008. "value": "350427"
  22009. }, {
  22010. "label": "将乐县",
  22011. "value": "350428"
  22012. }, {
  22013. "label": "泰宁县",
  22014. "value": "350429"
  22015. }, {
  22016. "label": "建宁县",
  22017. "value": "350430"
  22018. }, {
  22019. "label": "永安市",
  22020. "value": "350481"
  22021. }], [{
  22022. "label": "鲤城区",
  22023. "value": "350502"
  22024. }, {
  22025. "label": "丰泽区",
  22026. "value": "350503"
  22027. }, {
  22028. "label": "洛江区",
  22029. "value": "350504"
  22030. }, {
  22031. "label": "泉港区",
  22032. "value": "350505"
  22033. }, {
  22034. "label": "惠安县",
  22035. "value": "350521"
  22036. }, {
  22037. "label": "安溪县",
  22038. "value": "350524"
  22039. }, {
  22040. "label": "永春县",
  22041. "value": "350525"
  22042. }, {
  22043. "label": "德化县",
  22044. "value": "350526"
  22045. }, {
  22046. "label": "金门县",
  22047. "value": "350527"
  22048. }, {
  22049. "label": "石狮市",
  22050. "value": "350581"
  22051. }, {
  22052. "label": "晋江市",
  22053. "value": "350582"
  22054. }, {
  22055. "label": "南安市",
  22056. "value": "350583"
  22057. }], [{
  22058. "label": "芗城区",
  22059. "value": "350602"
  22060. }, {
  22061. "label": "龙文区",
  22062. "value": "350603"
  22063. }, {
  22064. "label": "云霄县",
  22065. "value": "350622"
  22066. }, {
  22067. "label": "漳浦县",
  22068. "value": "350623"
  22069. }, {
  22070. "label": "诏安县",
  22071. "value": "350624"
  22072. }, {
  22073. "label": "长泰县",
  22074. "value": "350625"
  22075. }, {
  22076. "label": "东山县",
  22077. "value": "350626"
  22078. }, {
  22079. "label": "南靖县",
  22080. "value": "350627"
  22081. }, {
  22082. "label": "平和县",
  22083. "value": "350628"
  22084. }, {
  22085. "label": "华安县",
  22086. "value": "350629"
  22087. }, {
  22088. "label": "龙海市",
  22089. "value": "350681"
  22090. }], [{
  22091. "label": "延平区",
  22092. "value": "350702"
  22093. }, {
  22094. "label": "建阳区",
  22095. "value": "350703"
  22096. }, {
  22097. "label": "顺昌县",
  22098. "value": "350721"
  22099. }, {
  22100. "label": "浦城县",
  22101. "value": "350722"
  22102. }, {
  22103. "label": "光泽县",
  22104. "value": "350723"
  22105. }, {
  22106. "label": "松溪县",
  22107. "value": "350724"
  22108. }, {
  22109. "label": "政和县",
  22110. "value": "350725"
  22111. }, {
  22112. "label": "邵武市",
  22113. "value": "350781"
  22114. }, {
  22115. "label": "武夷山市",
  22116. "value": "350782"
  22117. }, {
  22118. "label": "建瓯市",
  22119. "value": "350783"
  22120. }], [{
  22121. "label": "新罗区",
  22122. "value": "350802"
  22123. }, {
  22124. "label": "永定区",
  22125. "value": "350803"
  22126. }, {
  22127. "label": "长汀县",
  22128. "value": "350821"
  22129. }, {
  22130. "label": "上杭县",
  22131. "value": "350823"
  22132. }, {
  22133. "label": "武平县",
  22134. "value": "350824"
  22135. }, {
  22136. "label": "连城县",
  22137. "value": "350825"
  22138. }, {
  22139. "label": "漳平市",
  22140. "value": "350881"
  22141. }], [{
  22142. "label": "蕉城区",
  22143. "value": "350902"
  22144. }, {
  22145. "label": "霞浦县",
  22146. "value": "350921"
  22147. }, {
  22148. "label": "古田县",
  22149. "value": "350922"
  22150. }, {
  22151. "label": "屏南县",
  22152. "value": "350923"
  22153. }, {
  22154. "label": "寿宁县",
  22155. "value": "350924"
  22156. }, {
  22157. "label": "周宁县",
  22158. "value": "350925"
  22159. }, {
  22160. "label": "柘荣县",
  22161. "value": "350926"
  22162. }, {
  22163. "label": "福安市",
  22164. "value": "350981"
  22165. }, {
  22166. "label": "福鼎市",
  22167. "value": "350982"
  22168. }]], [[{
  22169. "label": "东湖区",
  22170. "value": "360102"
  22171. }, {
  22172. "label": "西湖区",
  22173. "value": "360103"
  22174. }, {
  22175. "label": "青云谱区",
  22176. "value": "360104"
  22177. }, {
  22178. "label": "湾里区",
  22179. "value": "360105"
  22180. }, {
  22181. "label": "青山湖区",
  22182. "value": "360111"
  22183. }, {
  22184. "label": "新建区",
  22185. "value": "360112"
  22186. }, {
  22187. "label": "南昌县",
  22188. "value": "360121"
  22189. }, {
  22190. "label": "安义县",
  22191. "value": "360123"
  22192. }, {
  22193. "label": "进贤县",
  22194. "value": "360124"
  22195. }], [{
  22196. "label": "昌江区",
  22197. "value": "360202"
  22198. }, {
  22199. "label": "珠山区",
  22200. "value": "360203"
  22201. }, {
  22202. "label": "浮梁县",
  22203. "value": "360222"
  22204. }, {
  22205. "label": "乐平市",
  22206. "value": "360281"
  22207. }], [{
  22208. "label": "安源区",
  22209. "value": "360302"
  22210. }, {
  22211. "label": "湘东区",
  22212. "value": "360313"
  22213. }, {
  22214. "label": "莲花县",
  22215. "value": "360321"
  22216. }, {
  22217. "label": "上栗县",
  22218. "value": "360322"
  22219. }, {
  22220. "label": "芦溪县",
  22221. "value": "360323"
  22222. }], [{
  22223. "label": "濂溪区",
  22224. "value": "360402"
  22225. }, {
  22226. "label": "浔阳区",
  22227. "value": "360403"
  22228. }, {
  22229. "label": "柴桑区",
  22230. "value": "360404"
  22231. }, {
  22232. "label": "武宁县",
  22233. "value": "360423"
  22234. }, {
  22235. "label": "修水县",
  22236. "value": "360424"
  22237. }, {
  22238. "label": "永修县",
  22239. "value": "360425"
  22240. }, {
  22241. "label": "德安县",
  22242. "value": "360426"
  22243. }, {
  22244. "label": "都昌县",
  22245. "value": "360428"
  22246. }, {
  22247. "label": "湖口县",
  22248. "value": "360429"
  22249. }, {
  22250. "label": "彭泽县",
  22251. "value": "360430"
  22252. }, {
  22253. "label": "瑞昌市",
  22254. "value": "360481"
  22255. }, {
  22256. "label": "共青城市",
  22257. "value": "360482"
  22258. }, {
  22259. "label": "庐山市",
  22260. "value": "360483"
  22261. }], [{
  22262. "label": "渝水区",
  22263. "value": "360502"
  22264. }, {
  22265. "label": "分宜县",
  22266. "value": "360521"
  22267. }], [{
  22268. "label": "月湖区",
  22269. "value": "360602"
  22270. }, {
  22271. "label": "余江县",
  22272. "value": "360622"
  22273. }, {
  22274. "label": "贵溪市",
  22275. "value": "360681"
  22276. }], [{
  22277. "label": "章贡区",
  22278. "value": "360702"
  22279. }, {
  22280. "label": "南康区",
  22281. "value": "360703"
  22282. }, {
  22283. "label": "赣县区",
  22284. "value": "360704"
  22285. }, {
  22286. "label": "信丰县",
  22287. "value": "360722"
  22288. }, {
  22289. "label": "大余县",
  22290. "value": "360723"
  22291. }, {
  22292. "label": "上犹县",
  22293. "value": "360724"
  22294. }, {
  22295. "label": "崇义县",
  22296. "value": "360725"
  22297. }, {
  22298. "label": "安远县",
  22299. "value": "360726"
  22300. }, {
  22301. "label": "龙南县",
  22302. "value": "360727"
  22303. }, {
  22304. "label": "定南县",
  22305. "value": "360728"
  22306. }, {
  22307. "label": "全南县",
  22308. "value": "360729"
  22309. }, {
  22310. "label": "宁都县",
  22311. "value": "360730"
  22312. }, {
  22313. "label": "于都县",
  22314. "value": "360731"
  22315. }, {
  22316. "label": "兴国县",
  22317. "value": "360732"
  22318. }, {
  22319. "label": "会昌县",
  22320. "value": "360733"
  22321. }, {
  22322. "label": "寻乌县",
  22323. "value": "360734"
  22324. }, {
  22325. "label": "石城县",
  22326. "value": "360735"
  22327. }, {
  22328. "label": "瑞金市",
  22329. "value": "360781"
  22330. }], [{
  22331. "label": "吉州区",
  22332. "value": "360802"
  22333. }, {
  22334. "label": "青原区",
  22335. "value": "360803"
  22336. }, {
  22337. "label": "吉安县",
  22338. "value": "360821"
  22339. }, {
  22340. "label": "吉水县",
  22341. "value": "360822"
  22342. }, {
  22343. "label": "峡江县",
  22344. "value": "360823"
  22345. }, {
  22346. "label": "新干县",
  22347. "value": "360824"
  22348. }, {
  22349. "label": "永丰县",
  22350. "value": "360825"
  22351. }, {
  22352. "label": "泰和县",
  22353. "value": "360826"
  22354. }, {
  22355. "label": "遂川县",
  22356. "value": "360827"
  22357. }, {
  22358. "label": "万安县",
  22359. "value": "360828"
  22360. }, {
  22361. "label": "安福县",
  22362. "value": "360829"
  22363. }, {
  22364. "label": "永新县",
  22365. "value": "360830"
  22366. }, {
  22367. "label": "井冈山市",
  22368. "value": "360881"
  22369. }], [{
  22370. "label": "袁州区",
  22371. "value": "360902"
  22372. }, {
  22373. "label": "奉新县",
  22374. "value": "360921"
  22375. }, {
  22376. "label": "万载县",
  22377. "value": "360922"
  22378. }, {
  22379. "label": "上高县",
  22380. "value": "360923"
  22381. }, {
  22382. "label": "宜丰县",
  22383. "value": "360924"
  22384. }, {
  22385. "label": "靖安县",
  22386. "value": "360925"
  22387. }, {
  22388. "label": "铜鼓县",
  22389. "value": "360926"
  22390. }, {
  22391. "label": "丰城市",
  22392. "value": "360981"
  22393. }, {
  22394. "label": "樟树市",
  22395. "value": "360982"
  22396. }, {
  22397. "label": "高安市",
  22398. "value": "360983"
  22399. }], [{
  22400. "label": "临川区",
  22401. "value": "361002"
  22402. }, {
  22403. "label": "东乡区",
  22404. "value": "361003"
  22405. }, {
  22406. "label": "南城县",
  22407. "value": "361021"
  22408. }, {
  22409. "label": "黎川县",
  22410. "value": "361022"
  22411. }, {
  22412. "label": "南丰县",
  22413. "value": "361023"
  22414. }, {
  22415. "label": "崇仁县",
  22416. "value": "361024"
  22417. }, {
  22418. "label": "乐安县",
  22419. "value": "361025"
  22420. }, {
  22421. "label": "宜黄县",
  22422. "value": "361026"
  22423. }, {
  22424. "label": "金溪县",
  22425. "value": "361027"
  22426. }, {
  22427. "label": "资溪县",
  22428. "value": "361028"
  22429. }, {
  22430. "label": "广昌县",
  22431. "value": "361030"
  22432. }], [{
  22433. "label": "信州区",
  22434. "value": "361102"
  22435. }, {
  22436. "label": "广丰区",
  22437. "value": "361103"
  22438. }, {
  22439. "label": "上饶县",
  22440. "value": "361121"
  22441. }, {
  22442. "label": "玉山县",
  22443. "value": "361123"
  22444. }, {
  22445. "label": "铅山县",
  22446. "value": "361124"
  22447. }, {
  22448. "label": "横峰县",
  22449. "value": "361125"
  22450. }, {
  22451. "label": "弋阳县",
  22452. "value": "361126"
  22453. }, {
  22454. "label": "余干县",
  22455. "value": "361127"
  22456. }, {
  22457. "label": "鄱阳县",
  22458. "value": "361128"
  22459. }, {
  22460. "label": "万年县",
  22461. "value": "361129"
  22462. }, {
  22463. "label": "婺源县",
  22464. "value": "361130"
  22465. }, {
  22466. "label": "德兴市",
  22467. "value": "361181"
  22468. }]], [[{
  22469. "label": "历下区",
  22470. "value": "370102"
  22471. }, {
  22472. "label": "市中区",
  22473. "value": "370103"
  22474. }, {
  22475. "label": "槐荫区",
  22476. "value": "370104"
  22477. }, {
  22478. "label": "天桥区",
  22479. "value": "370105"
  22480. }, {
  22481. "label": "历城区",
  22482. "value": "370112"
  22483. }, {
  22484. "label": "长清区",
  22485. "value": "370113"
  22486. }, {
  22487. "label": "章丘区",
  22488. "value": "370114"
  22489. }, {
  22490. "label": "平阴县",
  22491. "value": "370124"
  22492. }, {
  22493. "label": "济阳县",
  22494. "value": "370125"
  22495. }, {
  22496. "label": "商河县",
  22497. "value": "370126"
  22498. }, {
  22499. "label": "济南高新技术产业开发区",
  22500. "value": "370171"
  22501. }], [{
  22502. "label": "市南区",
  22503. "value": "370202"
  22504. }, {
  22505. "label": "市北区",
  22506. "value": "370203"
  22507. }, {
  22508. "label": "黄岛区",
  22509. "value": "370211"
  22510. }, {
  22511. "label": "崂山区",
  22512. "value": "370212"
  22513. }, {
  22514. "label": "李沧区",
  22515. "value": "370213"
  22516. }, {
  22517. "label": "城阳区",
  22518. "value": "370214"
  22519. }, {
  22520. "label": "即墨区",
  22521. "value": "370215"
  22522. }, {
  22523. "label": "青岛高新技术产业开发区",
  22524. "value": "370271"
  22525. }, {
  22526. "label": "胶州市",
  22527. "value": "370281"
  22528. }, {
  22529. "label": "平度市",
  22530. "value": "370283"
  22531. }, {
  22532. "label": "莱西市",
  22533. "value": "370285"
  22534. }], [{
  22535. "label": "淄川区",
  22536. "value": "370302"
  22537. }, {
  22538. "label": "张店区",
  22539. "value": "370303"
  22540. }, {
  22541. "label": "博山区",
  22542. "value": "370304"
  22543. }, {
  22544. "label": "临淄区",
  22545. "value": "370305"
  22546. }, {
  22547. "label": "周村区",
  22548. "value": "370306"
  22549. }, {
  22550. "label": "桓台县",
  22551. "value": "370321"
  22552. }, {
  22553. "label": "高青县",
  22554. "value": "370322"
  22555. }, {
  22556. "label": "沂源县",
  22557. "value": "370323"
  22558. }], [{
  22559. "label": "市中区",
  22560. "value": "370402"
  22561. }, {
  22562. "label": "薛城区",
  22563. "value": "370403"
  22564. }, {
  22565. "label": "峄城区",
  22566. "value": "370404"
  22567. }, {
  22568. "label": "台儿庄区",
  22569. "value": "370405"
  22570. }, {
  22571. "label": "山亭区",
  22572. "value": "370406"
  22573. }, {
  22574. "label": "滕州市",
  22575. "value": "370481"
  22576. }], [{
  22577. "label": "东营区",
  22578. "value": "370502"
  22579. }, {
  22580. "label": "河口区",
  22581. "value": "370503"
  22582. }, {
  22583. "label": "垦利区",
  22584. "value": "370505"
  22585. }, {
  22586. "label": "利津县",
  22587. "value": "370522"
  22588. }, {
  22589. "label": "广饶县",
  22590. "value": "370523"
  22591. }, {
  22592. "label": "东营经济技术开发区",
  22593. "value": "370571"
  22594. }, {
  22595. "label": "东营港经济开发区",
  22596. "value": "370572"
  22597. }], [{
  22598. "label": "芝罘区",
  22599. "value": "370602"
  22600. }, {
  22601. "label": "福山区",
  22602. "value": "370611"
  22603. }, {
  22604. "label": "牟平区",
  22605. "value": "370612"
  22606. }, {
  22607. "label": "莱山区",
  22608. "value": "370613"
  22609. }, {
  22610. "label": "长岛县",
  22611. "value": "370634"
  22612. }, {
  22613. "label": "烟台高新技术产业开发区",
  22614. "value": "370671"
  22615. }, {
  22616. "label": "烟台经济技术开发区",
  22617. "value": "370672"
  22618. }, {
  22619. "label": "龙口市",
  22620. "value": "370681"
  22621. }, {
  22622. "label": "莱阳市",
  22623. "value": "370682"
  22624. }, {
  22625. "label": "莱州市",
  22626. "value": "370683"
  22627. }, {
  22628. "label": "蓬莱市",
  22629. "value": "370684"
  22630. }, {
  22631. "label": "招远市",
  22632. "value": "370685"
  22633. }, {
  22634. "label": "栖霞市",
  22635. "value": "370686"
  22636. }, {
  22637. "label": "海阳市",
  22638. "value": "370687"
  22639. }], [{
  22640. "label": "潍城区",
  22641. "value": "370702"
  22642. }, {
  22643. "label": "寒亭区",
  22644. "value": "370703"
  22645. }, {
  22646. "label": "坊子区",
  22647. "value": "370704"
  22648. }, {
  22649. "label": "奎文区",
  22650. "value": "370705"
  22651. }, {
  22652. "label": "临朐县",
  22653. "value": "370724"
  22654. }, {
  22655. "label": "昌乐县",
  22656. "value": "370725"
  22657. }, {
  22658. "label": "潍坊滨海经济技术开发区",
  22659. "value": "370772"
  22660. }, {
  22661. "label": "青州市",
  22662. "value": "370781"
  22663. }, {
  22664. "label": "诸城市",
  22665. "value": "370782"
  22666. }, {
  22667. "label": "寿光市",
  22668. "value": "370783"
  22669. }, {
  22670. "label": "安丘市",
  22671. "value": "370784"
  22672. }, {
  22673. "label": "高密市",
  22674. "value": "370785"
  22675. }, {
  22676. "label": "昌邑市",
  22677. "value": "370786"
  22678. }], [{
  22679. "label": "任城区",
  22680. "value": "370811"
  22681. }, {
  22682. "label": "兖州区",
  22683. "value": "370812"
  22684. }, {
  22685. "label": "微山县",
  22686. "value": "370826"
  22687. }, {
  22688. "label": "鱼台县",
  22689. "value": "370827"
  22690. }, {
  22691. "label": "金乡县",
  22692. "value": "370828"
  22693. }, {
  22694. "label": "嘉祥县",
  22695. "value": "370829"
  22696. }, {
  22697. "label": "汶上县",
  22698. "value": "370830"
  22699. }, {
  22700. "label": "泗水县",
  22701. "value": "370831"
  22702. }, {
  22703. "label": "梁山县",
  22704. "value": "370832"
  22705. }, {
  22706. "label": "济宁高新技术产业开发区",
  22707. "value": "370871"
  22708. }, {
  22709. "label": "曲阜市",
  22710. "value": "370881"
  22711. }, {
  22712. "label": "邹城市",
  22713. "value": "370883"
  22714. }], [{
  22715. "label": "泰山区",
  22716. "value": "370902"
  22717. }, {
  22718. "label": "岱岳区",
  22719. "value": "370911"
  22720. }, {
  22721. "label": "宁阳县",
  22722. "value": "370921"
  22723. }, {
  22724. "label": "东平县",
  22725. "value": "370923"
  22726. }, {
  22727. "label": "新泰市",
  22728. "value": "370982"
  22729. }, {
  22730. "label": "肥城市",
  22731. "value": "370983"
  22732. }], [{
  22733. "label": "环翠区",
  22734. "value": "371002"
  22735. }, {
  22736. "label": "文登区",
  22737. "value": "371003"
  22738. }, {
  22739. "label": "威海火炬高技术产业开发区",
  22740. "value": "371071"
  22741. }, {
  22742. "label": "威海经济技术开发区",
  22743. "value": "371072"
  22744. }, {
  22745. "label": "威海临港经济技术开发区",
  22746. "value": "371073"
  22747. }, {
  22748. "label": "荣成市",
  22749. "value": "371082"
  22750. }, {
  22751. "label": "乳山市",
  22752. "value": "371083"
  22753. }], [{
  22754. "label": "东港区",
  22755. "value": "371102"
  22756. }, {
  22757. "label": "岚山区",
  22758. "value": "371103"
  22759. }, {
  22760. "label": "五莲县",
  22761. "value": "371121"
  22762. }, {
  22763. "label": "莒县",
  22764. "value": "371122"
  22765. }, {
  22766. "label": "日照经济技术开发区",
  22767. "value": "371171"
  22768. }, {
  22769. "label": "日照国际海洋城",
  22770. "value": "371172"
  22771. }], [{
  22772. "label": "莱城区",
  22773. "value": "371202"
  22774. }, {
  22775. "label": "钢城区",
  22776. "value": "371203"
  22777. }], [{
  22778. "label": "兰山区",
  22779. "value": "371302"
  22780. }, {
  22781. "label": "罗庄区",
  22782. "value": "371311"
  22783. }, {
  22784. "label": "河东区",
  22785. "value": "371312"
  22786. }, {
  22787. "label": "沂南县",
  22788. "value": "371321"
  22789. }, {
  22790. "label": "郯城县",
  22791. "value": "371322"
  22792. }, {
  22793. "label": "沂水县",
  22794. "value": "371323"
  22795. }, {
  22796. "label": "兰陵县",
  22797. "value": "371324"
  22798. }, {
  22799. "label": "费县",
  22800. "value": "371325"
  22801. }, {
  22802. "label": "平邑县",
  22803. "value": "371326"
  22804. }, {
  22805. "label": "莒南县",
  22806. "value": "371327"
  22807. }, {
  22808. "label": "蒙阴县",
  22809. "value": "371328"
  22810. }, {
  22811. "label": "临沭县",
  22812. "value": "371329"
  22813. }, {
  22814. "label": "临沂高新技术产业开发区",
  22815. "value": "371371"
  22816. }, {
  22817. "label": "临沂经济技术开发区",
  22818. "value": "371372"
  22819. }, {
  22820. "label": "临沂临港经济开发区",
  22821. "value": "371373"
  22822. }], [{
  22823. "label": "德城区",
  22824. "value": "371402"
  22825. }, {
  22826. "label": "陵城区",
  22827. "value": "371403"
  22828. }, {
  22829. "label": "宁津县",
  22830. "value": "371422"
  22831. }, {
  22832. "label": "庆云县",
  22833. "value": "371423"
  22834. }, {
  22835. "label": "临邑县",
  22836. "value": "371424"
  22837. }, {
  22838. "label": "齐河县",
  22839. "value": "371425"
  22840. }, {
  22841. "label": "平原县",
  22842. "value": "371426"
  22843. }, {
  22844. "label": "夏津县",
  22845. "value": "371427"
  22846. }, {
  22847. "label": "武城县",
  22848. "value": "371428"
  22849. }, {
  22850. "label": "德州经济技术开发区",
  22851. "value": "371471"
  22852. }, {
  22853. "label": "德州运河经济开发区",
  22854. "value": "371472"
  22855. }, {
  22856. "label": "乐陵市",
  22857. "value": "371481"
  22858. }, {
  22859. "label": "禹城市",
  22860. "value": "371482"
  22861. }], [{
  22862. "label": "东昌府区",
  22863. "value": "371502"
  22864. }, {
  22865. "label": "阳谷县",
  22866. "value": "371521"
  22867. }, {
  22868. "label": "莘县",
  22869. "value": "371522"
  22870. }, {
  22871. "label": "茌平县",
  22872. "value": "371523"
  22873. }, {
  22874. "label": "东阿县",
  22875. "value": "371524"
  22876. }, {
  22877. "label": "冠县",
  22878. "value": "371525"
  22879. }, {
  22880. "label": "高唐县",
  22881. "value": "371526"
  22882. }, {
  22883. "label": "临清市",
  22884. "value": "371581"
  22885. }], [{
  22886. "label": "滨城区",
  22887. "value": "371602"
  22888. }, {
  22889. "label": "沾化区",
  22890. "value": "371603"
  22891. }, {
  22892. "label": "惠民县",
  22893. "value": "371621"
  22894. }, {
  22895. "label": "阳信县",
  22896. "value": "371622"
  22897. }, {
  22898. "label": "无棣县",
  22899. "value": "371623"
  22900. }, {
  22901. "label": "博兴县",
  22902. "value": "371625"
  22903. }, {
  22904. "label": "邹平县",
  22905. "value": "371626"
  22906. }], [{
  22907. "label": "牡丹区",
  22908. "value": "371702"
  22909. }, {
  22910. "label": "定陶区",
  22911. "value": "371703"
  22912. }, {
  22913. "label": "曹县",
  22914. "value": "371721"
  22915. }, {
  22916. "label": "单县",
  22917. "value": "371722"
  22918. }, {
  22919. "label": "成武县",
  22920. "value": "371723"
  22921. }, {
  22922. "label": "巨野县",
  22923. "value": "371724"
  22924. }, {
  22925. "label": "郓城县",
  22926. "value": "371725"
  22927. }, {
  22928. "label": "鄄城县",
  22929. "value": "371726"
  22930. }, {
  22931. "label": "东明县",
  22932. "value": "371728"
  22933. }, {
  22934. "label": "菏泽经济技术开发区",
  22935. "value": "371771"
  22936. }, {
  22937. "label": "菏泽高新技术开发区",
  22938. "value": "371772"
  22939. }]], [[{
  22940. "label": "中原区",
  22941. "value": "410102"
  22942. }, {
  22943. "label": "二七区",
  22944. "value": "410103"
  22945. }, {
  22946. "label": "管城回族区",
  22947. "value": "410104"
  22948. }, {
  22949. "label": "金水区",
  22950. "value": "410105"
  22951. }, {
  22952. "label": "上街区",
  22953. "value": "410106"
  22954. }, {
  22955. "label": "惠济区",
  22956. "value": "410108"
  22957. }, {
  22958. "label": "中牟县",
  22959. "value": "410122"
  22960. }, {
  22961. "label": "郑州经济技术开发区",
  22962. "value": "410171"
  22963. }, {
  22964. "label": "郑州高新技术产业开发区",
  22965. "value": "410172"
  22966. }, {
  22967. "label": "郑州航空港经济综合实验区",
  22968. "value": "410173"
  22969. }, {
  22970. "label": "巩义市",
  22971. "value": "410181"
  22972. }, {
  22973. "label": "荥阳市",
  22974. "value": "410182"
  22975. }, {
  22976. "label": "新密市",
  22977. "value": "410183"
  22978. }, {
  22979. "label": "新郑市",
  22980. "value": "410184"
  22981. }, {
  22982. "label": "登封市",
  22983. "value": "410185"
  22984. }], [{
  22985. "label": "龙亭区",
  22986. "value": "410202"
  22987. }, {
  22988. "label": "顺河回族区",
  22989. "value": "410203"
  22990. }, {
  22991. "label": "鼓楼区",
  22992. "value": "410204"
  22993. }, {
  22994. "label": "禹王台区",
  22995. "value": "410205"
  22996. }, {
  22997. "label": "祥符区",
  22998. "value": "410212"
  22999. }, {
  23000. "label": "杞县",
  23001. "value": "410221"
  23002. }, {
  23003. "label": "通许县",
  23004. "value": "410222"
  23005. }, {
  23006. "label": "尉氏县",
  23007. "value": "410223"
  23008. }, {
  23009. "label": "兰考县",
  23010. "value": "410225"
  23011. }], [{
  23012. "label": "老城区",
  23013. "value": "410302"
  23014. }, {
  23015. "label": "西工区",
  23016. "value": "410303"
  23017. }, {
  23018. "label": "瀍河回族区",
  23019. "value": "410304"
  23020. }, {
  23021. "label": "涧西区",
  23022. "value": "410305"
  23023. }, {
  23024. "label": "吉利区",
  23025. "value": "410306"
  23026. }, {
  23027. "label": "洛龙区",
  23028. "value": "410311"
  23029. }, {
  23030. "label": "孟津县",
  23031. "value": "410322"
  23032. }, {
  23033. "label": "新安县",
  23034. "value": "410323"
  23035. }, {
  23036. "label": "栾川县",
  23037. "value": "410324"
  23038. }, {
  23039. "label": "嵩县",
  23040. "value": "410325"
  23041. }, {
  23042. "label": "汝阳县",
  23043. "value": "410326"
  23044. }, {
  23045. "label": "宜阳县",
  23046. "value": "410327"
  23047. }, {
  23048. "label": "洛宁县",
  23049. "value": "410328"
  23050. }, {
  23051. "label": "伊川县",
  23052. "value": "410329"
  23053. }, {
  23054. "label": "洛阳高新技术产业开发区",
  23055. "value": "410371"
  23056. }, {
  23057. "label": "偃师市",
  23058. "value": "410381"
  23059. }], [{
  23060. "label": "新华区",
  23061. "value": "410402"
  23062. }, {
  23063. "label": "卫东区",
  23064. "value": "410403"
  23065. }, {
  23066. "label": "石龙区",
  23067. "value": "410404"
  23068. }, {
  23069. "label": "湛河区",
  23070. "value": "410411"
  23071. }, {
  23072. "label": "宝丰县",
  23073. "value": "410421"
  23074. }, {
  23075. "label": "叶县",
  23076. "value": "410422"
  23077. }, {
  23078. "label": "鲁山县",
  23079. "value": "410423"
  23080. }, {
  23081. "label": "郏县",
  23082. "value": "410425"
  23083. }, {
  23084. "label": "平顶山高新技术产业开发区",
  23085. "value": "410471"
  23086. }, {
  23087. "label": "平顶山市新城区",
  23088. "value": "410472"
  23089. }, {
  23090. "label": "舞钢市",
  23091. "value": "410481"
  23092. }, {
  23093. "label": "汝州市",
  23094. "value": "410482"
  23095. }], [{
  23096. "label": "文峰区",
  23097. "value": "410502"
  23098. }, {
  23099. "label": "北关区",
  23100. "value": "410503"
  23101. }, {
  23102. "label": "殷都区",
  23103. "value": "410505"
  23104. }, {
  23105. "label": "龙安区",
  23106. "value": "410506"
  23107. }, {
  23108. "label": "安阳县",
  23109. "value": "410522"
  23110. }, {
  23111. "label": "汤阴县",
  23112. "value": "410523"
  23113. }, {
  23114. "label": "滑县",
  23115. "value": "410526"
  23116. }, {
  23117. "label": "内黄县",
  23118. "value": "410527"
  23119. }, {
  23120. "label": "安阳高新技术产业开发区",
  23121. "value": "410571"
  23122. }, {
  23123. "label": "林州市",
  23124. "value": "410581"
  23125. }], [{
  23126. "label": "鹤山区",
  23127. "value": "410602"
  23128. }, {
  23129. "label": "山城区",
  23130. "value": "410603"
  23131. }, {
  23132. "label": "淇滨区",
  23133. "value": "410611"
  23134. }, {
  23135. "label": "浚县",
  23136. "value": "410621"
  23137. }, {
  23138. "label": "淇县",
  23139. "value": "410622"
  23140. }, {
  23141. "label": "鹤壁经济技术开发区",
  23142. "value": "410671"
  23143. }], [{
  23144. "label": "红旗区",
  23145. "value": "410702"
  23146. }, {
  23147. "label": "卫滨区",
  23148. "value": "410703"
  23149. }, {
  23150. "label": "凤泉区",
  23151. "value": "410704"
  23152. }, {
  23153. "label": "牧野区",
  23154. "value": "410711"
  23155. }, {
  23156. "label": "新乡县",
  23157. "value": "410721"
  23158. }, {
  23159. "label": "获嘉县",
  23160. "value": "410724"
  23161. }, {
  23162. "label": "原阳县",
  23163. "value": "410725"
  23164. }, {
  23165. "label": "延津县",
  23166. "value": "410726"
  23167. }, {
  23168. "label": "封丘县",
  23169. "value": "410727"
  23170. }, {
  23171. "label": "长垣县",
  23172. "value": "410728"
  23173. }, {
  23174. "label": "新乡高新技术产业开发区",
  23175. "value": "410771"
  23176. }, {
  23177. "label": "新乡经济技术开发区",
  23178. "value": "410772"
  23179. }, {
  23180. "label": "新乡市平原城乡一体化示范区",
  23181. "value": "410773"
  23182. }, {
  23183. "label": "卫辉市",
  23184. "value": "410781"
  23185. }, {
  23186. "label": "辉县市",
  23187. "value": "410782"
  23188. }], [{
  23189. "label": "解放区",
  23190. "value": "410802"
  23191. }, {
  23192. "label": "中站区",
  23193. "value": "410803"
  23194. }, {
  23195. "label": "马村区",
  23196. "value": "410804"
  23197. }, {
  23198. "label": "山阳区",
  23199. "value": "410811"
  23200. }, {
  23201. "label": "修武县",
  23202. "value": "410821"
  23203. }, {
  23204. "label": "博爱县",
  23205. "value": "410822"
  23206. }, {
  23207. "label": "武陟县",
  23208. "value": "410823"
  23209. }, {
  23210. "label": "温县",
  23211. "value": "410825"
  23212. }, {
  23213. "label": "焦作城乡一体化示范区",
  23214. "value": "410871"
  23215. }, {
  23216. "label": "沁阳市",
  23217. "value": "410882"
  23218. }, {
  23219. "label": "孟州市",
  23220. "value": "410883"
  23221. }], [{
  23222. "label": "华龙区",
  23223. "value": "410902"
  23224. }, {
  23225. "label": "清丰县",
  23226. "value": "410922"
  23227. }, {
  23228. "label": "南乐县",
  23229. "value": "410923"
  23230. }, {
  23231. "label": "范县",
  23232. "value": "410926"
  23233. }, {
  23234. "label": "台前县",
  23235. "value": "410927"
  23236. }, {
  23237. "label": "濮阳县",
  23238. "value": "410928"
  23239. }, {
  23240. "label": "河南濮阳工业园区",
  23241. "value": "410971"
  23242. }, {
  23243. "label": "濮阳经济技术开发区",
  23244. "value": "410972"
  23245. }], [{
  23246. "label": "魏都区",
  23247. "value": "411002"
  23248. }, {
  23249. "label": "建安区",
  23250. "value": "411003"
  23251. }, {
  23252. "label": "鄢陵县",
  23253. "value": "411024"
  23254. }, {
  23255. "label": "襄城县",
  23256. "value": "411025"
  23257. }, {
  23258. "label": "许昌经济技术开发区",
  23259. "value": "411071"
  23260. }, {
  23261. "label": "禹州市",
  23262. "value": "411081"
  23263. }, {
  23264. "label": "长葛市",
  23265. "value": "411082"
  23266. }], [{
  23267. "label": "源汇区",
  23268. "value": "411102"
  23269. }, {
  23270. "label": "郾城区",
  23271. "value": "411103"
  23272. }, {
  23273. "label": "召陵区",
  23274. "value": "411104"
  23275. }, {
  23276. "label": "舞阳县",
  23277. "value": "411121"
  23278. }, {
  23279. "label": "临颍县",
  23280. "value": "411122"
  23281. }, {
  23282. "label": "漯河经济技术开发区",
  23283. "value": "411171"
  23284. }], [{
  23285. "label": "湖滨区",
  23286. "value": "411202"
  23287. }, {
  23288. "label": "陕州区",
  23289. "value": "411203"
  23290. }, {
  23291. "label": "渑池县",
  23292. "value": "411221"
  23293. }, {
  23294. "label": "卢氏县",
  23295. "value": "411224"
  23296. }, {
  23297. "label": "河南三门峡经济开发区",
  23298. "value": "411271"
  23299. }, {
  23300. "label": "义马市",
  23301. "value": "411281"
  23302. }, {
  23303. "label": "灵宝市",
  23304. "value": "411282"
  23305. }], [{
  23306. "label": "宛城区",
  23307. "value": "411302"
  23308. }, {
  23309. "label": "卧龙区",
  23310. "value": "411303"
  23311. }, {
  23312. "label": "南召县",
  23313. "value": "411321"
  23314. }, {
  23315. "label": "方城县",
  23316. "value": "411322"
  23317. }, {
  23318. "label": "西峡县",
  23319. "value": "411323"
  23320. }, {
  23321. "label": "镇平县",
  23322. "value": "411324"
  23323. }, {
  23324. "label": "内乡县",
  23325. "value": "411325"
  23326. }, {
  23327. "label": "淅川县",
  23328. "value": "411326"
  23329. }, {
  23330. "label": "社旗县",
  23331. "value": "411327"
  23332. }, {
  23333. "label": "唐河县",
  23334. "value": "411328"
  23335. }, {
  23336. "label": "新野县",
  23337. "value": "411329"
  23338. }, {
  23339. "label": "桐柏县",
  23340. "value": "411330"
  23341. }, {
  23342. "label": "南阳高新技术产业开发区",
  23343. "value": "411371"
  23344. }, {
  23345. "label": "南阳市城乡一体化示范区",
  23346. "value": "411372"
  23347. }, {
  23348. "label": "邓州市",
  23349. "value": "411381"
  23350. }], [{
  23351. "label": "梁园区",
  23352. "value": "411402"
  23353. }, {
  23354. "label": "睢阳区",
  23355. "value": "411403"
  23356. }, {
  23357. "label": "民权县",
  23358. "value": "411421"
  23359. }, {
  23360. "label": "睢县",
  23361. "value": "411422"
  23362. }, {
  23363. "label": "宁陵县",
  23364. "value": "411423"
  23365. }, {
  23366. "label": "柘城县",
  23367. "value": "411424"
  23368. }, {
  23369. "label": "虞城县",
  23370. "value": "411425"
  23371. }, {
  23372. "label": "夏邑县",
  23373. "value": "411426"
  23374. }, {
  23375. "label": "豫东综合物流产业聚集区",
  23376. "value": "411471"
  23377. }, {
  23378. "label": "河南商丘经济开发区",
  23379. "value": "411472"
  23380. }, {
  23381. "label": "永城市",
  23382. "value": "411481"
  23383. }], [{
  23384. "label": "浉河区",
  23385. "value": "411502"
  23386. }, {
  23387. "label": "平桥区",
  23388. "value": "411503"
  23389. }, {
  23390. "label": "罗山县",
  23391. "value": "411521"
  23392. }, {
  23393. "label": "光山县",
  23394. "value": "411522"
  23395. }, {
  23396. "label": "新县",
  23397. "value": "411523"
  23398. }, {
  23399. "label": "商城县",
  23400. "value": "411524"
  23401. }, {
  23402. "label": "固始县",
  23403. "value": "411525"
  23404. }, {
  23405. "label": "潢川县",
  23406. "value": "411526"
  23407. }, {
  23408. "label": "淮滨县",
  23409. "value": "411527"
  23410. }, {
  23411. "label": "息县",
  23412. "value": "411528"
  23413. }, {
  23414. "label": "信阳高新技术产业开发区",
  23415. "value": "411571"
  23416. }], [{
  23417. "label": "川汇区",
  23418. "value": "411602"
  23419. }, {
  23420. "label": "扶沟县",
  23421. "value": "411621"
  23422. }, {
  23423. "label": "西华县",
  23424. "value": "411622"
  23425. }, {
  23426. "label": "商水县",
  23427. "value": "411623"
  23428. }, {
  23429. "label": "沈丘县",
  23430. "value": "411624"
  23431. }, {
  23432. "label": "郸城县",
  23433. "value": "411625"
  23434. }, {
  23435. "label": "淮阳县",
  23436. "value": "411626"
  23437. }, {
  23438. "label": "太康县",
  23439. "value": "411627"
  23440. }, {
  23441. "label": "鹿邑县",
  23442. "value": "411628"
  23443. }, {
  23444. "label": "河南周口经济开发区",
  23445. "value": "411671"
  23446. }, {
  23447. "label": "项城市",
  23448. "value": "411681"
  23449. }], [{
  23450. "label": "驿城区",
  23451. "value": "411702"
  23452. }, {
  23453. "label": "西平县",
  23454. "value": "411721"
  23455. }, {
  23456. "label": "上蔡县",
  23457. "value": "411722"
  23458. }, {
  23459. "label": "平舆县",
  23460. "value": "411723"
  23461. }, {
  23462. "label": "正阳县",
  23463. "value": "411724"
  23464. }, {
  23465. "label": "确山县",
  23466. "value": "411725"
  23467. }, {
  23468. "label": "泌阳县",
  23469. "value": "411726"
  23470. }, {
  23471. "label": "汝南县",
  23472. "value": "411727"
  23473. }, {
  23474. "label": "遂平县",
  23475. "value": "411728"
  23476. }, {
  23477. "label": "新蔡县",
  23478. "value": "411729"
  23479. }, {
  23480. "label": "河南驻马店经济开发区",
  23481. "value": "411771"
  23482. }], [{
  23483. "label": "济源市",
  23484. "value": "419001"
  23485. }]], [[{
  23486. "label": "江岸区",
  23487. "value": "420102"
  23488. }, {
  23489. "label": "江汉区",
  23490. "value": "420103"
  23491. }, {
  23492. "label": "硚口区",
  23493. "value": "420104"
  23494. }, {
  23495. "label": "汉阳区",
  23496. "value": "420105"
  23497. }, {
  23498. "label": "武昌区",
  23499. "value": "420106"
  23500. }, {
  23501. "label": "青山区",
  23502. "value": "420107"
  23503. }, {
  23504. "label": "洪山区",
  23505. "value": "420111"
  23506. }, {
  23507. "label": "东西湖区",
  23508. "value": "420112"
  23509. }, {
  23510. "label": "汉南区",
  23511. "value": "420113"
  23512. }, {
  23513. "label": "蔡甸区",
  23514. "value": "420114"
  23515. }, {
  23516. "label": "江夏区",
  23517. "value": "420115"
  23518. }, {
  23519. "label": "黄陂区",
  23520. "value": "420116"
  23521. }, {
  23522. "label": "新洲区",
  23523. "value": "420117"
  23524. }], [{
  23525. "label": "黄石港区",
  23526. "value": "420202"
  23527. }, {
  23528. "label": "西塞山区",
  23529. "value": "420203"
  23530. }, {
  23531. "label": "下陆区",
  23532. "value": "420204"
  23533. }, {
  23534. "label": "铁山区",
  23535. "value": "420205"
  23536. }, {
  23537. "label": "阳新县",
  23538. "value": "420222"
  23539. }, {
  23540. "label": "大冶市",
  23541. "value": "420281"
  23542. }], [{
  23543. "label": "茅箭区",
  23544. "value": "420302"
  23545. }, {
  23546. "label": "张湾区",
  23547. "value": "420303"
  23548. }, {
  23549. "label": "郧阳区",
  23550. "value": "420304"
  23551. }, {
  23552. "label": "郧西县",
  23553. "value": "420322"
  23554. }, {
  23555. "label": "竹山县",
  23556. "value": "420323"
  23557. }, {
  23558. "label": "竹溪县",
  23559. "value": "420324"
  23560. }, {
  23561. "label": "房县",
  23562. "value": "420325"
  23563. }, {
  23564. "label": "丹江口市",
  23565. "value": "420381"
  23566. }], [{
  23567. "label": "西陵区",
  23568. "value": "420502"
  23569. }, {
  23570. "label": "伍家岗区",
  23571. "value": "420503"
  23572. }, {
  23573. "label": "点军区",
  23574. "value": "420504"
  23575. }, {
  23576. "label": "猇亭区",
  23577. "value": "420505"
  23578. }, {
  23579. "label": "夷陵区",
  23580. "value": "420506"
  23581. }, {
  23582. "label": "远安县",
  23583. "value": "420525"
  23584. }, {
  23585. "label": "兴山县",
  23586. "value": "420526"
  23587. }, {
  23588. "label": "秭归县",
  23589. "value": "420527"
  23590. }, {
  23591. "label": "长阳土家族自治县",
  23592. "value": "420528"
  23593. }, {
  23594. "label": "五峰土家族自治县",
  23595. "value": "420529"
  23596. }, {
  23597. "label": "宜都市",
  23598. "value": "420581"
  23599. }, {
  23600. "label": "当阳市",
  23601. "value": "420582"
  23602. }, {
  23603. "label": "枝江市",
  23604. "value": "420583"
  23605. }], [{
  23606. "label": "襄城区",
  23607. "value": "420602"
  23608. }, {
  23609. "label": "樊城区",
  23610. "value": "420606"
  23611. }, {
  23612. "label": "襄州区",
  23613. "value": "420607"
  23614. }, {
  23615. "label": "南漳县",
  23616. "value": "420624"
  23617. }, {
  23618. "label": "谷城县",
  23619. "value": "420625"
  23620. }, {
  23621. "label": "保康县",
  23622. "value": "420626"
  23623. }, {
  23624. "label": "老河口市",
  23625. "value": "420682"
  23626. }, {
  23627. "label": "枣阳市",
  23628. "value": "420683"
  23629. }, {
  23630. "label": "宜城市",
  23631. "value": "420684"
  23632. }], [{
  23633. "label": "梁子湖区",
  23634. "value": "420702"
  23635. }, {
  23636. "label": "华容区",
  23637. "value": "420703"
  23638. }, {
  23639. "label": "鄂城区",
  23640. "value": "420704"
  23641. }], [{
  23642. "label": "东宝区",
  23643. "value": "420802"
  23644. }, {
  23645. "label": "掇刀区",
  23646. "value": "420804"
  23647. }, {
  23648. "label": "京山县",
  23649. "value": "420821"
  23650. }, {
  23651. "label": "沙洋县",
  23652. "value": "420822"
  23653. }, {
  23654. "label": "钟祥市",
  23655. "value": "420881"
  23656. }], [{
  23657. "label": "孝南区",
  23658. "value": "420902"
  23659. }, {
  23660. "label": "孝昌县",
  23661. "value": "420921"
  23662. }, {
  23663. "label": "大悟县",
  23664. "value": "420922"
  23665. }, {
  23666. "label": "云梦县",
  23667. "value": "420923"
  23668. }, {
  23669. "label": "应城市",
  23670. "value": "420981"
  23671. }, {
  23672. "label": "安陆市",
  23673. "value": "420982"
  23674. }, {
  23675. "label": "汉川市",
  23676. "value": "420984"
  23677. }], [{
  23678. "label": "沙市区",
  23679. "value": "421002"
  23680. }, {
  23681. "label": "荆州区",
  23682. "value": "421003"
  23683. }, {
  23684. "label": "公安县",
  23685. "value": "421022"
  23686. }, {
  23687. "label": "监利县",
  23688. "value": "421023"
  23689. }, {
  23690. "label": "江陵县",
  23691. "value": "421024"
  23692. }, {
  23693. "label": "荆州经济技术开发区",
  23694. "value": "421071"
  23695. }, {
  23696. "label": "石首市",
  23697. "value": "421081"
  23698. }, {
  23699. "label": "洪湖市",
  23700. "value": "421083"
  23701. }, {
  23702. "label": "松滋市",
  23703. "value": "421087"
  23704. }], [{
  23705. "label": "黄州区",
  23706. "value": "421102"
  23707. }, {
  23708. "label": "团风县",
  23709. "value": "421121"
  23710. }, {
  23711. "label": "红安县",
  23712. "value": "421122"
  23713. }, {
  23714. "label": "罗田县",
  23715. "value": "421123"
  23716. }, {
  23717. "label": "英山县",
  23718. "value": "421124"
  23719. }, {
  23720. "label": "浠水县",
  23721. "value": "421125"
  23722. }, {
  23723. "label": "蕲春县",
  23724. "value": "421126"
  23725. }, {
  23726. "label": "黄梅县",
  23727. "value": "421127"
  23728. }, {
  23729. "label": "龙感湖管理区",
  23730. "value": "421171"
  23731. }, {
  23732. "label": "麻城市",
  23733. "value": "421181"
  23734. }, {
  23735. "label": "武穴市",
  23736. "value": "421182"
  23737. }], [{
  23738. "label": "咸安区",
  23739. "value": "421202"
  23740. }, {
  23741. "label": "嘉鱼县",
  23742. "value": "421221"
  23743. }, {
  23744. "label": "通城县",
  23745. "value": "421222"
  23746. }, {
  23747. "label": "崇阳县",
  23748. "value": "421223"
  23749. }, {
  23750. "label": "通山县",
  23751. "value": "421224"
  23752. }, {
  23753. "label": "赤壁市",
  23754. "value": "421281"
  23755. }], [{
  23756. "label": "曾都区",
  23757. "value": "421303"
  23758. }, {
  23759. "label": "随县",
  23760. "value": "421321"
  23761. }, {
  23762. "label": "广水市",
  23763. "value": "421381"
  23764. }], [{
  23765. "label": "恩施市",
  23766. "value": "422801"
  23767. }, {
  23768. "label": "利川市",
  23769. "value": "422802"
  23770. }, {
  23771. "label": "建始县",
  23772. "value": "422822"
  23773. }, {
  23774. "label": "巴东县",
  23775. "value": "422823"
  23776. }, {
  23777. "label": "宣恩县",
  23778. "value": "422825"
  23779. }, {
  23780. "label": "咸丰县",
  23781. "value": "422826"
  23782. }, {
  23783. "label": "来凤县",
  23784. "value": "422827"
  23785. }, {
  23786. "label": "鹤峰县",
  23787. "value": "422828"
  23788. }], [{
  23789. "label": "仙桃市",
  23790. "value": "429004"
  23791. }, {
  23792. "label": "潜江市",
  23793. "value": "429005"
  23794. }, {
  23795. "label": "天门市",
  23796. "value": "429006"
  23797. }, {
  23798. "label": "神农架林区",
  23799. "value": "429021"
  23800. }]], [[{
  23801. "label": "芙蓉区",
  23802. "value": "430102"
  23803. }, {
  23804. "label": "天心区",
  23805. "value": "430103"
  23806. }, {
  23807. "label": "岳麓区",
  23808. "value": "430104"
  23809. }, {
  23810. "label": "开福区",
  23811. "value": "430105"
  23812. }, {
  23813. "label": "雨花区",
  23814. "value": "430111"
  23815. }, {
  23816. "label": "望城区",
  23817. "value": "430112"
  23818. }, {
  23819. "label": "长沙县",
  23820. "value": "430121"
  23821. }, {
  23822. "label": "浏阳市",
  23823. "value": "430181"
  23824. }, {
  23825. "label": "宁乡市",
  23826. "value": "430182"
  23827. }], [{
  23828. "label": "荷塘区",
  23829. "value": "430202"
  23830. }, {
  23831. "label": "芦淞区",
  23832. "value": "430203"
  23833. }, {
  23834. "label": "石峰区",
  23835. "value": "430204"
  23836. }, {
  23837. "label": "天元区",
  23838. "value": "430211"
  23839. }, {
  23840. "label": "株洲县",
  23841. "value": "430221"
  23842. }, {
  23843. "label": "攸县",
  23844. "value": "430223"
  23845. }, {
  23846. "label": "茶陵县",
  23847. "value": "430224"
  23848. }, {
  23849. "label": "炎陵县",
  23850. "value": "430225"
  23851. }, {
  23852. "label": "云龙示范区",
  23853. "value": "430271"
  23854. }, {
  23855. "label": "醴陵市",
  23856. "value": "430281"
  23857. }], [{
  23858. "label": "雨湖区",
  23859. "value": "430302"
  23860. }, {
  23861. "label": "岳塘区",
  23862. "value": "430304"
  23863. }, {
  23864. "label": "湘潭县",
  23865. "value": "430321"
  23866. }, {
  23867. "label": "湖南湘潭高新技术产业园区",
  23868. "value": "430371"
  23869. }, {
  23870. "label": "湘潭昭山示范区",
  23871. "value": "430372"
  23872. }, {
  23873. "label": "湘潭九华示范区",
  23874. "value": "430373"
  23875. }, {
  23876. "label": "湘乡市",
  23877. "value": "430381"
  23878. }, {
  23879. "label": "韶山市",
  23880. "value": "430382"
  23881. }], [{
  23882. "label": "珠晖区",
  23883. "value": "430405"
  23884. }, {
  23885. "label": "雁峰区",
  23886. "value": "430406"
  23887. }, {
  23888. "label": "石鼓区",
  23889. "value": "430407"
  23890. }, {
  23891. "label": "蒸湘区",
  23892. "value": "430408"
  23893. }, {
  23894. "label": "南岳区",
  23895. "value": "430412"
  23896. }, {
  23897. "label": "衡阳县",
  23898. "value": "430421"
  23899. }, {
  23900. "label": "衡南县",
  23901. "value": "430422"
  23902. }, {
  23903. "label": "衡山县",
  23904. "value": "430423"
  23905. }, {
  23906. "label": "衡东县",
  23907. "value": "430424"
  23908. }, {
  23909. "label": "祁东县",
  23910. "value": "430426"
  23911. }, {
  23912. "label": "衡阳综合保税区",
  23913. "value": "430471"
  23914. }, {
  23915. "label": "湖南衡阳高新技术产业园区",
  23916. "value": "430472"
  23917. }, {
  23918. "label": "湖南衡阳松木经济开发区",
  23919. "value": "430473"
  23920. }, {
  23921. "label": "耒阳市",
  23922. "value": "430481"
  23923. }, {
  23924. "label": "常宁市",
  23925. "value": "430482"
  23926. }], [{
  23927. "label": "双清区",
  23928. "value": "430502"
  23929. }, {
  23930. "label": "大祥区",
  23931. "value": "430503"
  23932. }, {
  23933. "label": "北塔区",
  23934. "value": "430511"
  23935. }, {
  23936. "label": "邵东县",
  23937. "value": "430521"
  23938. }, {
  23939. "label": "新邵县",
  23940. "value": "430522"
  23941. }, {
  23942. "label": "邵阳县",
  23943. "value": "430523"
  23944. }, {
  23945. "label": "隆回县",
  23946. "value": "430524"
  23947. }, {
  23948. "label": "洞口县",
  23949. "value": "430525"
  23950. }, {
  23951. "label": "绥宁县",
  23952. "value": "430527"
  23953. }, {
  23954. "label": "新宁县",
  23955. "value": "430528"
  23956. }, {
  23957. "label": "城步苗族自治县",
  23958. "value": "430529"
  23959. }, {
  23960. "label": "武冈市",
  23961. "value": "430581"
  23962. }], [{
  23963. "label": "岳阳楼区",
  23964. "value": "430602"
  23965. }, {
  23966. "label": "云溪区",
  23967. "value": "430603"
  23968. }, {
  23969. "label": "君山区",
  23970. "value": "430611"
  23971. }, {
  23972. "label": "岳阳县",
  23973. "value": "430621"
  23974. }, {
  23975. "label": "华容县",
  23976. "value": "430623"
  23977. }, {
  23978. "label": "湘阴县",
  23979. "value": "430624"
  23980. }, {
  23981. "label": "平江县",
  23982. "value": "430626"
  23983. }, {
  23984. "label": "岳阳市屈原管理区",
  23985. "value": "430671"
  23986. }, {
  23987. "label": "汨罗市",
  23988. "value": "430681"
  23989. }, {
  23990. "label": "临湘市",
  23991. "value": "430682"
  23992. }], [{
  23993. "label": "武陵区",
  23994. "value": "430702"
  23995. }, {
  23996. "label": "鼎城区",
  23997. "value": "430703"
  23998. }, {
  23999. "label": "安乡县",
  24000. "value": "430721"
  24001. }, {
  24002. "label": "汉寿县",
  24003. "value": "430722"
  24004. }, {
  24005. "label": "澧县",
  24006. "value": "430723"
  24007. }, {
  24008. "label": "临澧县",
  24009. "value": "430724"
  24010. }, {
  24011. "label": "桃源县",
  24012. "value": "430725"
  24013. }, {
  24014. "label": "石门县",
  24015. "value": "430726"
  24016. }, {
  24017. "label": "常德市西洞庭管理区",
  24018. "value": "430771"
  24019. }, {
  24020. "label": "津市市",
  24021. "value": "430781"
  24022. }], [{
  24023. "label": "永定区",
  24024. "value": "430802"
  24025. }, {
  24026. "label": "武陵源区",
  24027. "value": "430811"
  24028. }, {
  24029. "label": "慈利县",
  24030. "value": "430821"
  24031. }, {
  24032. "label": "桑植县",
  24033. "value": "430822"
  24034. }], [{
  24035. "label": "资阳区",
  24036. "value": "430902"
  24037. }, {
  24038. "label": "赫山区",
  24039. "value": "430903"
  24040. }, {
  24041. "label": "南县",
  24042. "value": "430921"
  24043. }, {
  24044. "label": "桃江县",
  24045. "value": "430922"
  24046. }, {
  24047. "label": "安化县",
  24048. "value": "430923"
  24049. }, {
  24050. "label": "益阳市大通湖管理区",
  24051. "value": "430971"
  24052. }, {
  24053. "label": "湖南益阳高新技术产业园区",
  24054. "value": "430972"
  24055. }, {
  24056. "label": "沅江市",
  24057. "value": "430981"
  24058. }], [{
  24059. "label": "北湖区",
  24060. "value": "431002"
  24061. }, {
  24062. "label": "苏仙区",
  24063. "value": "431003"
  24064. }, {
  24065. "label": "桂阳县",
  24066. "value": "431021"
  24067. }, {
  24068. "label": "宜章县",
  24069. "value": "431022"
  24070. }, {
  24071. "label": "永兴县",
  24072. "value": "431023"
  24073. }, {
  24074. "label": "嘉禾县",
  24075. "value": "431024"
  24076. }, {
  24077. "label": "临武县",
  24078. "value": "431025"
  24079. }, {
  24080. "label": "汝城县",
  24081. "value": "431026"
  24082. }, {
  24083. "label": "桂东县",
  24084. "value": "431027"
  24085. }, {
  24086. "label": "安仁县",
  24087. "value": "431028"
  24088. }, {
  24089. "label": "资兴市",
  24090. "value": "431081"
  24091. }], [{
  24092. "label": "零陵区",
  24093. "value": "431102"
  24094. }, {
  24095. "label": "冷水滩区",
  24096. "value": "431103"
  24097. }, {
  24098. "label": "祁阳县",
  24099. "value": "431121"
  24100. }, {
  24101. "label": "东安县",
  24102. "value": "431122"
  24103. }, {
  24104. "label": "双牌县",
  24105. "value": "431123"
  24106. }, {
  24107. "label": "道县",
  24108. "value": "431124"
  24109. }, {
  24110. "label": "江永县",
  24111. "value": "431125"
  24112. }, {
  24113. "label": "宁远县",
  24114. "value": "431126"
  24115. }, {
  24116. "label": "蓝山县",
  24117. "value": "431127"
  24118. }, {
  24119. "label": "新田县",
  24120. "value": "431128"
  24121. }, {
  24122. "label": "江华瑶族自治县",
  24123. "value": "431129"
  24124. }, {
  24125. "label": "永州经济技术开发区",
  24126. "value": "431171"
  24127. }, {
  24128. "label": "永州市金洞管理区",
  24129. "value": "431172"
  24130. }, {
  24131. "label": "永州市回龙圩管理区",
  24132. "value": "431173"
  24133. }], [{
  24134. "label": "鹤城区",
  24135. "value": "431202"
  24136. }, {
  24137. "label": "中方县",
  24138. "value": "431221"
  24139. }, {
  24140. "label": "沅陵县",
  24141. "value": "431222"
  24142. }, {
  24143. "label": "辰溪县",
  24144. "value": "431223"
  24145. }, {
  24146. "label": "溆浦县",
  24147. "value": "431224"
  24148. }, {
  24149. "label": "会同县",
  24150. "value": "431225"
  24151. }, {
  24152. "label": "麻阳苗族自治县",
  24153. "value": "431226"
  24154. }, {
  24155. "label": "新晃侗族自治县",
  24156. "value": "431227"
  24157. }, {
  24158. "label": "芷江侗族自治县",
  24159. "value": "431228"
  24160. }, {
  24161. "label": "靖州苗族侗族自治县",
  24162. "value": "431229"
  24163. }, {
  24164. "label": "通道侗族自治县",
  24165. "value": "431230"
  24166. }, {
  24167. "label": "怀化市洪江管理区",
  24168. "value": "431271"
  24169. }, {
  24170. "label": "洪江市",
  24171. "value": "431281"
  24172. }], [{
  24173. "label": "娄星区",
  24174. "value": "431302"
  24175. }, {
  24176. "label": "双峰县",
  24177. "value": "431321"
  24178. }, {
  24179. "label": "新化县",
  24180. "value": "431322"
  24181. }, {
  24182. "label": "冷水江市",
  24183. "value": "431381"
  24184. }, {
  24185. "label": "涟源市",
  24186. "value": "431382"
  24187. }], [{
  24188. "label": "吉首市",
  24189. "value": "433101"
  24190. }, {
  24191. "label": "泸溪县",
  24192. "value": "433122"
  24193. }, {
  24194. "label": "凤凰县",
  24195. "value": "433123"
  24196. }, {
  24197. "label": "花垣县",
  24198. "value": "433124"
  24199. }, {
  24200. "label": "保靖县",
  24201. "value": "433125"
  24202. }, {
  24203. "label": "古丈县",
  24204. "value": "433126"
  24205. }, {
  24206. "label": "永顺县",
  24207. "value": "433127"
  24208. }, {
  24209. "label": "龙山县",
  24210. "value": "433130"
  24211. }, {
  24212. "label": "湖南吉首经济开发区",
  24213. "value": "433172"
  24214. }, {
  24215. "label": "湖南永顺经济开发区",
  24216. "value": "433173"
  24217. }]], [[{
  24218. "label": "荔湾区",
  24219. "value": "440103"
  24220. }, {
  24221. "label": "越秀区",
  24222. "value": "440104"
  24223. }, {
  24224. "label": "海珠区",
  24225. "value": "440105"
  24226. }, {
  24227. "label": "天河区",
  24228. "value": "440106"
  24229. }, {
  24230. "label": "白云区",
  24231. "value": "440111"
  24232. }, {
  24233. "label": "黄埔区",
  24234. "value": "440112"
  24235. }, {
  24236. "label": "番禺区",
  24237. "value": "440113"
  24238. }, {
  24239. "label": "花都区",
  24240. "value": "440114"
  24241. }, {
  24242. "label": "南沙区",
  24243. "value": "440115"
  24244. }, {
  24245. "label": "从化区",
  24246. "value": "440117"
  24247. }, {
  24248. "label": "增城区",
  24249. "value": "440118"
  24250. }], [{
  24251. "label": "武江区",
  24252. "value": "440203"
  24253. }, {
  24254. "label": "浈江区",
  24255. "value": "440204"
  24256. }, {
  24257. "label": "曲江区",
  24258. "value": "440205"
  24259. }, {
  24260. "label": "始兴县",
  24261. "value": "440222"
  24262. }, {
  24263. "label": "仁化县",
  24264. "value": "440224"
  24265. }, {
  24266. "label": "翁源县",
  24267. "value": "440229"
  24268. }, {
  24269. "label": "乳源瑶族自治县",
  24270. "value": "440232"
  24271. }, {
  24272. "label": "新丰县",
  24273. "value": "440233"
  24274. }, {
  24275. "label": "乐昌市",
  24276. "value": "440281"
  24277. }, {
  24278. "label": "南雄市",
  24279. "value": "440282"
  24280. }], [{
  24281. "label": "罗湖区",
  24282. "value": "440303"
  24283. }, {
  24284. "label": "福田区",
  24285. "value": "440304"
  24286. }, {
  24287. "label": "南山区",
  24288. "value": "440305"
  24289. }, {
  24290. "label": "宝安区",
  24291. "value": "440306"
  24292. }, {
  24293. "label": "龙岗区",
  24294. "value": "440307"
  24295. }, {
  24296. "label": "盐田区",
  24297. "value": "440308"
  24298. }, {
  24299. "label": "龙华区",
  24300. "value": "440309"
  24301. }, {
  24302. "label": "坪山区",
  24303. "value": "440310"
  24304. }], [{
  24305. "label": "香洲区",
  24306. "value": "440402"
  24307. }, {
  24308. "label": "斗门区",
  24309. "value": "440403"
  24310. }, {
  24311. "label": "金湾区",
  24312. "value": "440404"
  24313. }], [{
  24314. "label": "龙湖区",
  24315. "value": "440507"
  24316. }, {
  24317. "label": "金平区",
  24318. "value": "440511"
  24319. }, {
  24320. "label": "濠江区",
  24321. "value": "440512"
  24322. }, {
  24323. "label": "潮阳区",
  24324. "value": "440513"
  24325. }, {
  24326. "label": "潮南区",
  24327. "value": "440514"
  24328. }, {
  24329. "label": "澄海区",
  24330. "value": "440515"
  24331. }, {
  24332. "label": "南澳县",
  24333. "value": "440523"
  24334. }], [{
  24335. "label": "禅城区",
  24336. "value": "440604"
  24337. }, {
  24338. "label": "南海区",
  24339. "value": "440605"
  24340. }, {
  24341. "label": "顺德区",
  24342. "value": "440606"
  24343. }, {
  24344. "label": "三水区",
  24345. "value": "440607"
  24346. }, {
  24347. "label": "高明区",
  24348. "value": "440608"
  24349. }], [{
  24350. "label": "蓬江区",
  24351. "value": "440703"
  24352. }, {
  24353. "label": "江海区",
  24354. "value": "440704"
  24355. }, {
  24356. "label": "新会区",
  24357. "value": "440705"
  24358. }, {
  24359. "label": "台山市",
  24360. "value": "440781"
  24361. }, {
  24362. "label": "开平市",
  24363. "value": "440783"
  24364. }, {
  24365. "label": "鹤山市",
  24366. "value": "440784"
  24367. }, {
  24368. "label": "恩平市",
  24369. "value": "440785"
  24370. }], [{
  24371. "label": "赤坎区",
  24372. "value": "440802"
  24373. }, {
  24374. "label": "霞山区",
  24375. "value": "440803"
  24376. }, {
  24377. "label": "坡头区",
  24378. "value": "440804"
  24379. }, {
  24380. "label": "麻章区",
  24381. "value": "440811"
  24382. }, {
  24383. "label": "遂溪县",
  24384. "value": "440823"
  24385. }, {
  24386. "label": "徐闻县",
  24387. "value": "440825"
  24388. }, {
  24389. "label": "廉江市",
  24390. "value": "440881"
  24391. }, {
  24392. "label": "雷州市",
  24393. "value": "440882"
  24394. }, {
  24395. "label": "吴川市",
  24396. "value": "440883"
  24397. }], [{
  24398. "label": "茂南区",
  24399. "value": "440902"
  24400. }, {
  24401. "label": "电白区",
  24402. "value": "440904"
  24403. }, {
  24404. "label": "高州市",
  24405. "value": "440981"
  24406. }, {
  24407. "label": "化州市",
  24408. "value": "440982"
  24409. }, {
  24410. "label": "信宜市",
  24411. "value": "440983"
  24412. }], [{
  24413. "label": "端州区",
  24414. "value": "441202"
  24415. }, {
  24416. "label": "鼎湖区",
  24417. "value": "441203"
  24418. }, {
  24419. "label": "高要区",
  24420. "value": "441204"
  24421. }, {
  24422. "label": "广宁县",
  24423. "value": "441223"
  24424. }, {
  24425. "label": "怀集县",
  24426. "value": "441224"
  24427. }, {
  24428. "label": "封开县",
  24429. "value": "441225"
  24430. }, {
  24431. "label": "德庆县",
  24432. "value": "441226"
  24433. }, {
  24434. "label": "四会市",
  24435. "value": "441284"
  24436. }], [{
  24437. "label": "惠城区",
  24438. "value": "441302"
  24439. }, {
  24440. "label": "惠阳区",
  24441. "value": "441303"
  24442. }, {
  24443. "label": "博罗县",
  24444. "value": "441322"
  24445. }, {
  24446. "label": "惠东县",
  24447. "value": "441323"
  24448. }, {
  24449. "label": "龙门县",
  24450. "value": "441324"
  24451. }], [{
  24452. "label": "梅江区",
  24453. "value": "441402"
  24454. }, {
  24455. "label": "梅县区",
  24456. "value": "441403"
  24457. }, {
  24458. "label": "大埔县",
  24459. "value": "441422"
  24460. }, {
  24461. "label": "丰顺县",
  24462. "value": "441423"
  24463. }, {
  24464. "label": "五华县",
  24465. "value": "441424"
  24466. }, {
  24467. "label": "平远县",
  24468. "value": "441426"
  24469. }, {
  24470. "label": "蕉岭县",
  24471. "value": "441427"
  24472. }, {
  24473. "label": "兴宁市",
  24474. "value": "441481"
  24475. }], [{
  24476. "label": "城区",
  24477. "value": "441502"
  24478. }, {
  24479. "label": "海丰县",
  24480. "value": "441521"
  24481. }, {
  24482. "label": "陆河县",
  24483. "value": "441523"
  24484. }, {
  24485. "label": "陆丰市",
  24486. "value": "441581"
  24487. }], [{
  24488. "label": "源城区",
  24489. "value": "441602"
  24490. }, {
  24491. "label": "紫金县",
  24492. "value": "441621"
  24493. }, {
  24494. "label": "龙川县",
  24495. "value": "441622"
  24496. }, {
  24497. "label": "连平县",
  24498. "value": "441623"
  24499. }, {
  24500. "label": "和平县",
  24501. "value": "441624"
  24502. }, {
  24503. "label": "东源县",
  24504. "value": "441625"
  24505. }], [{
  24506. "label": "江城区",
  24507. "value": "441702"
  24508. }, {
  24509. "label": "阳东区",
  24510. "value": "441704"
  24511. }, {
  24512. "label": "阳西县",
  24513. "value": "441721"
  24514. }, {
  24515. "label": "阳春市",
  24516. "value": "441781"
  24517. }], [{
  24518. "label": "清城区",
  24519. "value": "441802"
  24520. }, {
  24521. "label": "清新区",
  24522. "value": "441803"
  24523. }, {
  24524. "label": "佛冈县",
  24525. "value": "441821"
  24526. }, {
  24527. "label": "阳山县",
  24528. "value": "441823"
  24529. }, {
  24530. "label": "连山壮族瑶族自治县",
  24531. "value": "441825"
  24532. }, {
  24533. "label": "连南瑶族自治县",
  24534. "value": "441826"
  24535. }, {
  24536. "label": "英德市",
  24537. "value": "441881"
  24538. }, {
  24539. "label": "连州市",
  24540. "value": "441882"
  24541. }], [{
  24542. "label": "东莞市",
  24543. "value": "441900"
  24544. }], [{
  24545. "label": "中山市",
  24546. "value": "442000"
  24547. }], [{
  24548. "label": "湘桥区",
  24549. "value": "445102"
  24550. }, {
  24551. "label": "潮安区",
  24552. "value": "445103"
  24553. }, {
  24554. "label": "饶平县",
  24555. "value": "445122"
  24556. }], [{
  24557. "label": "榕城区",
  24558. "value": "445202"
  24559. }, {
  24560. "label": "揭东区",
  24561. "value": "445203"
  24562. }, {
  24563. "label": "揭西县",
  24564. "value": "445222"
  24565. }, {
  24566. "label": "惠来县",
  24567. "value": "445224"
  24568. }, {
  24569. "label": "普宁市",
  24570. "value": "445281"
  24571. }], [{
  24572. "label": "云城区",
  24573. "value": "445302"
  24574. }, {
  24575. "label": "云安区",
  24576. "value": "445303"
  24577. }, {
  24578. "label": "新兴县",
  24579. "value": "445321"
  24580. }, {
  24581. "label": "郁南县",
  24582. "value": "445322"
  24583. }, {
  24584. "label": "罗定市",
  24585. "value": "445381"
  24586. }]], [[{
  24587. "label": "兴宁区",
  24588. "value": "450102"
  24589. }, {
  24590. "label": "青秀区",
  24591. "value": "450103"
  24592. }, {
  24593. "label": "江南区",
  24594. "value": "450105"
  24595. }, {
  24596. "label": "西乡塘区",
  24597. "value": "450107"
  24598. }, {
  24599. "label": "良庆区",
  24600. "value": "450108"
  24601. }, {
  24602. "label": "邕宁区",
  24603. "value": "450109"
  24604. }, {
  24605. "label": "武鸣区",
  24606. "value": "450110"
  24607. }, {
  24608. "label": "隆安县",
  24609. "value": "450123"
  24610. }, {
  24611. "label": "马山县",
  24612. "value": "450124"
  24613. }, {
  24614. "label": "上林县",
  24615. "value": "450125"
  24616. }, {
  24617. "label": "宾阳县",
  24618. "value": "450126"
  24619. }, {
  24620. "label": "横县",
  24621. "value": "450127"
  24622. }], [{
  24623. "label": "城中区",
  24624. "value": "450202"
  24625. }, {
  24626. "label": "鱼峰区",
  24627. "value": "450203"
  24628. }, {
  24629. "label": "柳南区",
  24630. "value": "450204"
  24631. }, {
  24632. "label": "柳北区",
  24633. "value": "450205"
  24634. }, {
  24635. "label": "柳江区",
  24636. "value": "450206"
  24637. }, {
  24638. "label": "柳城县",
  24639. "value": "450222"
  24640. }, {
  24641. "label": "鹿寨县",
  24642. "value": "450223"
  24643. }, {
  24644. "label": "融安县",
  24645. "value": "450224"
  24646. }, {
  24647. "label": "融水苗族自治县",
  24648. "value": "450225"
  24649. }, {
  24650. "label": "三江侗族自治县",
  24651. "value": "450226"
  24652. }], [{
  24653. "label": "秀峰区",
  24654. "value": "450302"
  24655. }, {
  24656. "label": "叠彩区",
  24657. "value": "450303"
  24658. }, {
  24659. "label": "象山区",
  24660. "value": "450304"
  24661. }, {
  24662. "label": "七星区",
  24663. "value": "450305"
  24664. }, {
  24665. "label": "雁山区",
  24666. "value": "450311"
  24667. }, {
  24668. "label": "临桂区",
  24669. "value": "450312"
  24670. }, {
  24671. "label": "阳朔县",
  24672. "value": "450321"
  24673. }, {
  24674. "label": "灵川县",
  24675. "value": "450323"
  24676. }, {
  24677. "label": "全州县",
  24678. "value": "450324"
  24679. }, {
  24680. "label": "兴安县",
  24681. "value": "450325"
  24682. }, {
  24683. "label": "永福县",
  24684. "value": "450326"
  24685. }, {
  24686. "label": "灌阳县",
  24687. "value": "450327"
  24688. }, {
  24689. "label": "龙胜各族自治县",
  24690. "value": "450328"
  24691. }, {
  24692. "label": "资源县",
  24693. "value": "450329"
  24694. }, {
  24695. "label": "平乐县",
  24696. "value": "450330"
  24697. }, {
  24698. "label": "荔浦县",
  24699. "value": "450331"
  24700. }, {
  24701. "label": "恭城瑶族自治县",
  24702. "value": "450332"
  24703. }], [{
  24704. "label": "万秀区",
  24705. "value": "450403"
  24706. }, {
  24707. "label": "长洲区",
  24708. "value": "450405"
  24709. }, {
  24710. "label": "龙圩区",
  24711. "value": "450406"
  24712. }, {
  24713. "label": "苍梧县",
  24714. "value": "450421"
  24715. }, {
  24716. "label": "藤县",
  24717. "value": "450422"
  24718. }, {
  24719. "label": "蒙山县",
  24720. "value": "450423"
  24721. }, {
  24722. "label": "岑溪市",
  24723. "value": "450481"
  24724. }], [{
  24725. "label": "海城区",
  24726. "value": "450502"
  24727. }, {
  24728. "label": "银海区",
  24729. "value": "450503"
  24730. }, {
  24731. "label": "铁山港区",
  24732. "value": "450512"
  24733. }, {
  24734. "label": "合浦县",
  24735. "value": "450521"
  24736. }], [{
  24737. "label": "港口区",
  24738. "value": "450602"
  24739. }, {
  24740. "label": "防城区",
  24741. "value": "450603"
  24742. }, {
  24743. "label": "上思县",
  24744. "value": "450621"
  24745. }, {
  24746. "label": "东兴市",
  24747. "value": "450681"
  24748. }], [{
  24749. "label": "钦南区",
  24750. "value": "450702"
  24751. }, {
  24752. "label": "钦北区",
  24753. "value": "450703"
  24754. }, {
  24755. "label": "灵山县",
  24756. "value": "450721"
  24757. }, {
  24758. "label": "浦北县",
  24759. "value": "450722"
  24760. }], [{
  24761. "label": "港北区",
  24762. "value": "450802"
  24763. }, {
  24764. "label": "港南区",
  24765. "value": "450803"
  24766. }, {
  24767. "label": "覃塘区",
  24768. "value": "450804"
  24769. }, {
  24770. "label": "平南县",
  24771. "value": "450821"
  24772. }, {
  24773. "label": "桂平市",
  24774. "value": "450881"
  24775. }], [{
  24776. "label": "玉州区",
  24777. "value": "450902"
  24778. }, {
  24779. "label": "福绵区",
  24780. "value": "450903"
  24781. }, {
  24782. "label": "容县",
  24783. "value": "450921"
  24784. }, {
  24785. "label": "陆川县",
  24786. "value": "450922"
  24787. }, {
  24788. "label": "博白县",
  24789. "value": "450923"
  24790. }, {
  24791. "label": "兴业县",
  24792. "value": "450924"
  24793. }, {
  24794. "label": "北流市",
  24795. "value": "450981"
  24796. }], [{
  24797. "label": "右江区",
  24798. "value": "451002"
  24799. }, {
  24800. "label": "田阳县",
  24801. "value": "451021"
  24802. }, {
  24803. "label": "田东县",
  24804. "value": "451022"
  24805. }, {
  24806. "label": "平果县",
  24807. "value": "451023"
  24808. }, {
  24809. "label": "德保县",
  24810. "value": "451024"
  24811. }, {
  24812. "label": "那坡县",
  24813. "value": "451026"
  24814. }, {
  24815. "label": "凌云县",
  24816. "value": "451027"
  24817. }, {
  24818. "label": "乐业县",
  24819. "value": "451028"
  24820. }, {
  24821. "label": "田林县",
  24822. "value": "451029"
  24823. }, {
  24824. "label": "西林县",
  24825. "value": "451030"
  24826. }, {
  24827. "label": "隆林各族自治县",
  24828. "value": "451031"
  24829. }, {
  24830. "label": "靖西市",
  24831. "value": "451081"
  24832. }], [{
  24833. "label": "八步区",
  24834. "value": "451102"
  24835. }, {
  24836. "label": "平桂区",
  24837. "value": "451103"
  24838. }, {
  24839. "label": "昭平县",
  24840. "value": "451121"
  24841. }, {
  24842. "label": "钟山县",
  24843. "value": "451122"
  24844. }, {
  24845. "label": "富川瑶族自治县",
  24846. "value": "451123"
  24847. }], [{
  24848. "label": "金城江区",
  24849. "value": "451202"
  24850. }, {
  24851. "label": "宜州区",
  24852. "value": "451203"
  24853. }, {
  24854. "label": "南丹县",
  24855. "value": "451221"
  24856. }, {
  24857. "label": "天峨县",
  24858. "value": "451222"
  24859. }, {
  24860. "label": "凤山县",
  24861. "value": "451223"
  24862. }, {
  24863. "label": "东兰县",
  24864. "value": "451224"
  24865. }, {
  24866. "label": "罗城仫佬族自治县",
  24867. "value": "451225"
  24868. }, {
  24869. "label": "环江毛南族自治县",
  24870. "value": "451226"
  24871. }, {
  24872. "label": "巴马瑶族自治县",
  24873. "value": "451227"
  24874. }, {
  24875. "label": "都安瑶族自治县",
  24876. "value": "451228"
  24877. }, {
  24878. "label": "大化瑶族自治县",
  24879. "value": "451229"
  24880. }], [{
  24881. "label": "兴宾区",
  24882. "value": "451302"
  24883. }, {
  24884. "label": "忻城县",
  24885. "value": "451321"
  24886. }, {
  24887. "label": "象州县",
  24888. "value": "451322"
  24889. }, {
  24890. "label": "武宣县",
  24891. "value": "451323"
  24892. }, {
  24893. "label": "金秀瑶族自治县",
  24894. "value": "451324"
  24895. }, {
  24896. "label": "合山市",
  24897. "value": "451381"
  24898. }], [{
  24899. "label": "江州区",
  24900. "value": "451402"
  24901. }, {
  24902. "label": "扶绥县",
  24903. "value": "451421"
  24904. }, {
  24905. "label": "宁明县",
  24906. "value": "451422"
  24907. }, {
  24908. "label": "龙州县",
  24909. "value": "451423"
  24910. }, {
  24911. "label": "大新县",
  24912. "value": "451424"
  24913. }, {
  24914. "label": "天等县",
  24915. "value": "451425"
  24916. }, {
  24917. "label": "凭祥市",
  24918. "value": "451481"
  24919. }]], [[{
  24920. "label": "秀英区",
  24921. "value": "460105"
  24922. }, {
  24923. "label": "龙华区",
  24924. "value": "460106"
  24925. }, {
  24926. "label": "琼山区",
  24927. "value": "460107"
  24928. }, {
  24929. "label": "美兰区",
  24930. "value": "460108"
  24931. }], [{
  24932. "label": "海棠区",
  24933. "value": "460202"
  24934. }, {
  24935. "label": "吉阳区",
  24936. "value": "460203"
  24937. }, {
  24938. "label": "天涯区",
  24939. "value": "460204"
  24940. }, {
  24941. "label": "崖州区",
  24942. "value": "460205"
  24943. }], [{
  24944. "label": "西沙群岛",
  24945. "value": "460321"
  24946. }, {
  24947. "label": "南沙群岛",
  24948. "value": "460322"
  24949. }, {
  24950. "label": "中沙群岛的岛礁及其海域",
  24951. "value": "460323"
  24952. }], [{
  24953. "label": "儋州市",
  24954. "value": "460400"
  24955. }], [{
  24956. "label": "五指山市",
  24957. "value": "469001"
  24958. }, {
  24959. "label": "琼海市",
  24960. "value": "469002"
  24961. }, {
  24962. "label": "文昌市",
  24963. "value": "469005"
  24964. }, {
  24965. "label": "万宁市",
  24966. "value": "469006"
  24967. }, {
  24968. "label": "东方市",
  24969. "value": "469007"
  24970. }, {
  24971. "label": "定安县",
  24972. "value": "469021"
  24973. }, {
  24974. "label": "屯昌县",
  24975. "value": "469022"
  24976. }, {
  24977. "label": "澄迈县",
  24978. "value": "469023"
  24979. }, {
  24980. "label": "临高县",
  24981. "value": "469024"
  24982. }, {
  24983. "label": "白沙黎族自治县",
  24984. "value": "469025"
  24985. }, {
  24986. "label": "昌江黎族自治县",
  24987. "value": "469026"
  24988. }, {
  24989. "label": "乐东黎族自治县",
  24990. "value": "469027"
  24991. }, {
  24992. "label": "陵水黎族自治县",
  24993. "value": "469028"
  24994. }, {
  24995. "label": "保亭黎族苗族自治县",
  24996. "value": "469029"
  24997. }, {
  24998. "label": "琼中黎族苗族自治县",
  24999. "value": "469030"
  25000. }]], [[{
  25001. "label": "万州区",
  25002. "value": "500101"
  25003. }, {
  25004. "label": "涪陵区",
  25005. "value": "500102"
  25006. }, {
  25007. "label": "渝中区",
  25008. "value": "500103"
  25009. }, {
  25010. "label": "大渡口区",
  25011. "value": "500104"
  25012. }, {
  25013. "label": "江北区",
  25014. "value": "500105"
  25015. }, {
  25016. "label": "沙坪坝区",
  25017. "value": "500106"
  25018. }, {
  25019. "label": "九龙坡区",
  25020. "value": "500107"
  25021. }, {
  25022. "label": "南岸区",
  25023. "value": "500108"
  25024. }, {
  25025. "label": "北碚区",
  25026. "value": "500109"
  25027. }, {
  25028. "label": "綦江区",
  25029. "value": "500110"
  25030. }, {
  25031. "label": "大足区",
  25032. "value": "500111"
  25033. }, {
  25034. "label": "渝北区",
  25035. "value": "500112"
  25036. }, {
  25037. "label": "巴南区",
  25038. "value": "500113"
  25039. }, {
  25040. "label": "黔江区",
  25041. "value": "500114"
  25042. }, {
  25043. "label": "长寿区",
  25044. "value": "500115"
  25045. }, {
  25046. "label": "江津区",
  25047. "value": "500116"
  25048. }, {
  25049. "label": "合川区",
  25050. "value": "500117"
  25051. }, {
  25052. "label": "永川区",
  25053. "value": "500118"
  25054. }, {
  25055. "label": "南川区",
  25056. "value": "500119"
  25057. }, {
  25058. "label": "璧山区",
  25059. "value": "500120"
  25060. }, {
  25061. "label": "铜梁区",
  25062. "value": "500151"
  25063. }, {
  25064. "label": "潼南区",
  25065. "value": "500152"
  25066. }, {
  25067. "label": "荣昌区",
  25068. "value": "500153"
  25069. }, {
  25070. "label": "开州区",
  25071. "value": "500154"
  25072. }, {
  25073. "label": "梁平区",
  25074. "value": "500155"
  25075. }, {
  25076. "label": "武隆区",
  25077. "value": "500156"
  25078. }], [{
  25079. "label": "城口县",
  25080. "value": "500229"
  25081. }, {
  25082. "label": "丰都县",
  25083. "value": "500230"
  25084. }, {
  25085. "label": "垫江县",
  25086. "value": "500231"
  25087. }, {
  25088. "label": "忠县",
  25089. "value": "500233"
  25090. }, {
  25091. "label": "云阳县",
  25092. "value": "500235"
  25093. }, {
  25094. "label": "奉节县",
  25095. "value": "500236"
  25096. }, {
  25097. "label": "巫山县",
  25098. "value": "500237"
  25099. }, {
  25100. "label": "巫溪县",
  25101. "value": "500238"
  25102. }, {
  25103. "label": "石柱土家族自治县",
  25104. "value": "500240"
  25105. }, {
  25106. "label": "秀山土家族苗族自治县",
  25107. "value": "500241"
  25108. }, {
  25109. "label": "酉阳土家族苗族自治县",
  25110. "value": "500242"
  25111. }, {
  25112. "label": "彭水苗族土家族自治县",
  25113. "value": "500243"
  25114. }]], [[{
  25115. "label": "锦江区",
  25116. "value": "510104"
  25117. }, {
  25118. "label": "青羊区",
  25119. "value": "510105"
  25120. }, {
  25121. "label": "金牛区",
  25122. "value": "510106"
  25123. }, {
  25124. "label": "武侯区",
  25125. "value": "510107"
  25126. }, {
  25127. "label": "成华区",
  25128. "value": "510108"
  25129. }, {
  25130. "label": "龙泉驿区",
  25131. "value": "510112"
  25132. }, {
  25133. "label": "青白江区",
  25134. "value": "510113"
  25135. }, {
  25136. "label": "新都区",
  25137. "value": "510114"
  25138. }, {
  25139. "label": "温江区",
  25140. "value": "510115"
  25141. }, {
  25142. "label": "双流区",
  25143. "value": "510116"
  25144. }, {
  25145. "label": "郫都区",
  25146. "value": "510117"
  25147. }, {
  25148. "label": "金堂县",
  25149. "value": "510121"
  25150. }, {
  25151. "label": "大邑县",
  25152. "value": "510129"
  25153. }, {
  25154. "label": "蒲江县",
  25155. "value": "510131"
  25156. }, {
  25157. "label": "新津县",
  25158. "value": "510132"
  25159. }, {
  25160. "label": "都江堰市",
  25161. "value": "510181"
  25162. }, {
  25163. "label": "彭州市",
  25164. "value": "510182"
  25165. }, {
  25166. "label": "邛崃市",
  25167. "value": "510183"
  25168. }, {
  25169. "label": "崇州市",
  25170. "value": "510184"
  25171. }, {
  25172. "label": "简阳市",
  25173. "value": "510185"
  25174. }], [{
  25175. "label": "自流井区",
  25176. "value": "510302"
  25177. }, {
  25178. "label": "贡井区",
  25179. "value": "510303"
  25180. }, {
  25181. "label": "大安区",
  25182. "value": "510304"
  25183. }, {
  25184. "label": "沿滩区",
  25185. "value": "510311"
  25186. }, {
  25187. "label": "荣县",
  25188. "value": "510321"
  25189. }, {
  25190. "label": "富顺县",
  25191. "value": "510322"
  25192. }], [{
  25193. "label": "东区",
  25194. "value": "510402"
  25195. }, {
  25196. "label": "西区",
  25197. "value": "510403"
  25198. }, {
  25199. "label": "仁和区",
  25200. "value": "510411"
  25201. }, {
  25202. "label": "米易县",
  25203. "value": "510421"
  25204. }, {
  25205. "label": "盐边县",
  25206. "value": "510422"
  25207. }], [{
  25208. "label": "江阳区",
  25209. "value": "510502"
  25210. }, {
  25211. "label": "纳溪区",
  25212. "value": "510503"
  25213. }, {
  25214. "label": "龙马潭区",
  25215. "value": "510504"
  25216. }, {
  25217. "label": "泸县",
  25218. "value": "510521"
  25219. }, {
  25220. "label": "合江县",
  25221. "value": "510522"
  25222. }, {
  25223. "label": "叙永县",
  25224. "value": "510524"
  25225. }, {
  25226. "label": "古蔺县",
  25227. "value": "510525"
  25228. }], [{
  25229. "label": "旌阳区",
  25230. "value": "510603"
  25231. }, {
  25232. "label": "罗江区",
  25233. "value": "510604"
  25234. }, {
  25235. "label": "中江县",
  25236. "value": "510623"
  25237. }, {
  25238. "label": "广汉市",
  25239. "value": "510681"
  25240. }, {
  25241. "label": "什邡市",
  25242. "value": "510682"
  25243. }, {
  25244. "label": "绵竹市",
  25245. "value": "510683"
  25246. }], [{
  25247. "label": "涪城区",
  25248. "value": "510703"
  25249. }, {
  25250. "label": "游仙区",
  25251. "value": "510704"
  25252. }, {
  25253. "label": "安州区",
  25254. "value": "510705"
  25255. }, {
  25256. "label": "三台县",
  25257. "value": "510722"
  25258. }, {
  25259. "label": "盐亭县",
  25260. "value": "510723"
  25261. }, {
  25262. "label": "梓潼县",
  25263. "value": "510725"
  25264. }, {
  25265. "label": "北川羌族自治县",
  25266. "value": "510726"
  25267. }, {
  25268. "label": "平武县",
  25269. "value": "510727"
  25270. }, {
  25271. "label": "江油市",
  25272. "value": "510781"
  25273. }], [{
  25274. "label": "利州区",
  25275. "value": "510802"
  25276. }, {
  25277. "label": "昭化区",
  25278. "value": "510811"
  25279. }, {
  25280. "label": "朝天区",
  25281. "value": "510812"
  25282. }, {
  25283. "label": "旺苍县",
  25284. "value": "510821"
  25285. }, {
  25286. "label": "青川县",
  25287. "value": "510822"
  25288. }, {
  25289. "label": "剑阁县",
  25290. "value": "510823"
  25291. }, {
  25292. "label": "苍溪县",
  25293. "value": "510824"
  25294. }], [{
  25295. "label": "船山区",
  25296. "value": "510903"
  25297. }, {
  25298. "label": "安居区",
  25299. "value": "510904"
  25300. }, {
  25301. "label": "蓬溪县",
  25302. "value": "510921"
  25303. }, {
  25304. "label": "射洪县",
  25305. "value": "510922"
  25306. }, {
  25307. "label": "大英县",
  25308. "value": "510923"
  25309. }], [{
  25310. "label": "市中区",
  25311. "value": "511002"
  25312. }, {
  25313. "label": "东兴区",
  25314. "value": "511011"
  25315. }, {
  25316. "label": "威远县",
  25317. "value": "511024"
  25318. }, {
  25319. "label": "资中县",
  25320. "value": "511025"
  25321. }, {
  25322. "label": "内江经济开发区",
  25323. "value": "511071"
  25324. }, {
  25325. "label": "隆昌市",
  25326. "value": "511083"
  25327. }], [{
  25328. "label": "市中区",
  25329. "value": "511102"
  25330. }, {
  25331. "label": "沙湾区",
  25332. "value": "511111"
  25333. }, {
  25334. "label": "五通桥区",
  25335. "value": "511112"
  25336. }, {
  25337. "label": "金口河区",
  25338. "value": "511113"
  25339. }, {
  25340. "label": "犍为县",
  25341. "value": "511123"
  25342. }, {
  25343. "label": "井研县",
  25344. "value": "511124"
  25345. }, {
  25346. "label": "夹江县",
  25347. "value": "511126"
  25348. }, {
  25349. "label": "沐川县",
  25350. "value": "511129"
  25351. }, {
  25352. "label": "峨边彝族自治县",
  25353. "value": "511132"
  25354. }, {
  25355. "label": "马边彝族自治县",
  25356. "value": "511133"
  25357. }, {
  25358. "label": "峨眉山市",
  25359. "value": "511181"
  25360. }], [{
  25361. "label": "顺庆区",
  25362. "value": "511302"
  25363. }, {
  25364. "label": "高坪区",
  25365. "value": "511303"
  25366. }, {
  25367. "label": "嘉陵区",
  25368. "value": "511304"
  25369. }, {
  25370. "label": "南部县",
  25371. "value": "511321"
  25372. }, {
  25373. "label": "营山县",
  25374. "value": "511322"
  25375. }, {
  25376. "label": "蓬安县",
  25377. "value": "511323"
  25378. }, {
  25379. "label": "仪陇县",
  25380. "value": "511324"
  25381. }, {
  25382. "label": "西充县",
  25383. "value": "511325"
  25384. }, {
  25385. "label": "阆中市",
  25386. "value": "511381"
  25387. }], [{
  25388. "label": "东坡区",
  25389. "value": "511402"
  25390. }, {
  25391. "label": "彭山区",
  25392. "value": "511403"
  25393. }, {
  25394. "label": "仁寿县",
  25395. "value": "511421"
  25396. }, {
  25397. "label": "洪雅县",
  25398. "value": "511423"
  25399. }, {
  25400. "label": "丹棱县",
  25401. "value": "511424"
  25402. }, {
  25403. "label": "青神县",
  25404. "value": "511425"
  25405. }], [{
  25406. "label": "翠屏区",
  25407. "value": "511502"
  25408. }, {
  25409. "label": "南溪区",
  25410. "value": "511503"
  25411. }, {
  25412. "label": "宜宾县",
  25413. "value": "511521"
  25414. }, {
  25415. "label": "江安县",
  25416. "value": "511523"
  25417. }, {
  25418. "label": "长宁县",
  25419. "value": "511524"
  25420. }, {
  25421. "label": "高县",
  25422. "value": "511525"
  25423. }, {
  25424. "label": "珙县",
  25425. "value": "511526"
  25426. }, {
  25427. "label": "筠连县",
  25428. "value": "511527"
  25429. }, {
  25430. "label": "兴文县",
  25431. "value": "511528"
  25432. }, {
  25433. "label": "屏山县",
  25434. "value": "511529"
  25435. }], [{
  25436. "label": "广安区",
  25437. "value": "511602"
  25438. }, {
  25439. "label": "前锋区",
  25440. "value": "511603"
  25441. }, {
  25442. "label": "岳池县",
  25443. "value": "511621"
  25444. }, {
  25445. "label": "武胜县",
  25446. "value": "511622"
  25447. }, {
  25448. "label": "邻水县",
  25449. "value": "511623"
  25450. }, {
  25451. "label": "华蓥市",
  25452. "value": "511681"
  25453. }], [{
  25454. "label": "通川区",
  25455. "value": "511702"
  25456. }, {
  25457. "label": "达川区",
  25458. "value": "511703"
  25459. }, {
  25460. "label": "宣汉县",
  25461. "value": "511722"
  25462. }, {
  25463. "label": "开江县",
  25464. "value": "511723"
  25465. }, {
  25466. "label": "大竹县",
  25467. "value": "511724"
  25468. }, {
  25469. "label": "渠县",
  25470. "value": "511725"
  25471. }, {
  25472. "label": "达州经济开发区",
  25473. "value": "511771"
  25474. }, {
  25475. "label": "万源市",
  25476. "value": "511781"
  25477. }], [{
  25478. "label": "雨城区",
  25479. "value": "511802"
  25480. }, {
  25481. "label": "名山区",
  25482. "value": "511803"
  25483. }, {
  25484. "label": "荥经县",
  25485. "value": "511822"
  25486. }, {
  25487. "label": "汉源县",
  25488. "value": "511823"
  25489. }, {
  25490. "label": "石棉县",
  25491. "value": "511824"
  25492. }, {
  25493. "label": "天全县",
  25494. "value": "511825"
  25495. }, {
  25496. "label": "芦山县",
  25497. "value": "511826"
  25498. }, {
  25499. "label": "宝兴县",
  25500. "value": "511827"
  25501. }], [{
  25502. "label": "巴州区",
  25503. "value": "511902"
  25504. }, {
  25505. "label": "恩阳区",
  25506. "value": "511903"
  25507. }, {
  25508. "label": "通江县",
  25509. "value": "511921"
  25510. }, {
  25511. "label": "南江县",
  25512. "value": "511922"
  25513. }, {
  25514. "label": "平昌县",
  25515. "value": "511923"
  25516. }, {
  25517. "label": "巴中经济开发区",
  25518. "value": "511971"
  25519. }], [{
  25520. "label": "雁江区",
  25521. "value": "512002"
  25522. }, {
  25523. "label": "安岳县",
  25524. "value": "512021"
  25525. }, {
  25526. "label": "乐至县",
  25527. "value": "512022"
  25528. }], [{
  25529. "label": "马尔康市",
  25530. "value": "513201"
  25531. }, {
  25532. "label": "汶川县",
  25533. "value": "513221"
  25534. }, {
  25535. "label": "理县",
  25536. "value": "513222"
  25537. }, {
  25538. "label": "茂县",
  25539. "value": "513223"
  25540. }, {
  25541. "label": "松潘县",
  25542. "value": "513224"
  25543. }, {
  25544. "label": "九寨沟县",
  25545. "value": "513225"
  25546. }, {
  25547. "label": "金川县",
  25548. "value": "513226"
  25549. }, {
  25550. "label": "小金县",
  25551. "value": "513227"
  25552. }, {
  25553. "label": "黑水县",
  25554. "value": "513228"
  25555. }, {
  25556. "label": "壤塘县",
  25557. "value": "513230"
  25558. }, {
  25559. "label": "阿坝县",
  25560. "value": "513231"
  25561. }, {
  25562. "label": "若尔盖县",
  25563. "value": "513232"
  25564. }, {
  25565. "label": "红原县",
  25566. "value": "513233"
  25567. }], [{
  25568. "label": "康定市",
  25569. "value": "513301"
  25570. }, {
  25571. "label": "泸定县",
  25572. "value": "513322"
  25573. }, {
  25574. "label": "丹巴县",
  25575. "value": "513323"
  25576. }, {
  25577. "label": "九龙县",
  25578. "value": "513324"
  25579. }, {
  25580. "label": "雅江县",
  25581. "value": "513325"
  25582. }, {
  25583. "label": "道孚县",
  25584. "value": "513326"
  25585. }, {
  25586. "label": "炉霍县",
  25587. "value": "513327"
  25588. }, {
  25589. "label": "甘孜县",
  25590. "value": "513328"
  25591. }, {
  25592. "label": "新龙县",
  25593. "value": "513329"
  25594. }, {
  25595. "label": "德格县",
  25596. "value": "513330"
  25597. }, {
  25598. "label": "白玉县",
  25599. "value": "513331"
  25600. }, {
  25601. "label": "石渠县",
  25602. "value": "513332"
  25603. }, {
  25604. "label": "色达县",
  25605. "value": "513333"
  25606. }, {
  25607. "label": "理塘县",
  25608. "value": "513334"
  25609. }, {
  25610. "label": "巴塘县",
  25611. "value": "513335"
  25612. }, {
  25613. "label": "乡城县",
  25614. "value": "513336"
  25615. }, {
  25616. "label": "稻城县",
  25617. "value": "513337"
  25618. }, {
  25619. "label": "得荣县",
  25620. "value": "513338"
  25621. }], [{
  25622. "label": "西昌市",
  25623. "value": "513401"
  25624. }, {
  25625. "label": "木里藏族自治县",
  25626. "value": "513422"
  25627. }, {
  25628. "label": "盐源县",
  25629. "value": "513423"
  25630. }, {
  25631. "label": "德昌县",
  25632. "value": "513424"
  25633. }, {
  25634. "label": "会理县",
  25635. "value": "513425"
  25636. }, {
  25637. "label": "会东县",
  25638. "value": "513426"
  25639. }, {
  25640. "label": "宁南县",
  25641. "value": "513427"
  25642. }, {
  25643. "label": "普格县",
  25644. "value": "513428"
  25645. }, {
  25646. "label": "布拖县",
  25647. "value": "513429"
  25648. }, {
  25649. "label": "金阳县",
  25650. "value": "513430"
  25651. }, {
  25652. "label": "昭觉县",
  25653. "value": "513431"
  25654. }, {
  25655. "label": "喜德县",
  25656. "value": "513432"
  25657. }, {
  25658. "label": "冕宁县",
  25659. "value": "513433"
  25660. }, {
  25661. "label": "越西县",
  25662. "value": "513434"
  25663. }, {
  25664. "label": "甘洛县",
  25665. "value": "513435"
  25666. }, {
  25667. "label": "美姑县",
  25668. "value": "513436"
  25669. }, {
  25670. "label": "雷波县",
  25671. "value": "513437"
  25672. }]], [[{
  25673. "label": "南明区",
  25674. "value": "520102"
  25675. }, {
  25676. "label": "云岩区",
  25677. "value": "520103"
  25678. }, {
  25679. "label": "花溪区",
  25680. "value": "520111"
  25681. }, {
  25682. "label": "乌当区",
  25683. "value": "520112"
  25684. }, {
  25685. "label": "白云区",
  25686. "value": "520113"
  25687. }, {
  25688. "label": "观山湖区",
  25689. "value": "520115"
  25690. }, {
  25691. "label": "开阳县",
  25692. "value": "520121"
  25693. }, {
  25694. "label": "息烽县",
  25695. "value": "520122"
  25696. }, {
  25697. "label": "修文县",
  25698. "value": "520123"
  25699. }, {
  25700. "label": "清镇市",
  25701. "value": "520181"
  25702. }], [{
  25703. "label": "钟山区",
  25704. "value": "520201"
  25705. }, {
  25706. "label": "六枝特区",
  25707. "value": "520203"
  25708. }, {
  25709. "label": "水城县",
  25710. "value": "520221"
  25711. }, {
  25712. "label": "盘州市",
  25713. "value": "520281"
  25714. }], [{
  25715. "label": "红花岗区",
  25716. "value": "520302"
  25717. }, {
  25718. "label": "汇川区",
  25719. "value": "520303"
  25720. }, {
  25721. "label": "播州区",
  25722. "value": "520304"
  25723. }, {
  25724. "label": "桐梓县",
  25725. "value": "520322"
  25726. }, {
  25727. "label": "绥阳县",
  25728. "value": "520323"
  25729. }, {
  25730. "label": "正安县",
  25731. "value": "520324"
  25732. }, {
  25733. "label": "道真仡佬族苗族自治县",
  25734. "value": "520325"
  25735. }, {
  25736. "label": "务川仡佬族苗族自治县",
  25737. "value": "520326"
  25738. }, {
  25739. "label": "凤冈县",
  25740. "value": "520327"
  25741. }, {
  25742. "label": "湄潭县",
  25743. "value": "520328"
  25744. }, {
  25745. "label": "余庆县",
  25746. "value": "520329"
  25747. }, {
  25748. "label": "习水县",
  25749. "value": "520330"
  25750. }, {
  25751. "label": "赤水市",
  25752. "value": "520381"
  25753. }, {
  25754. "label": "仁怀市",
  25755. "value": "520382"
  25756. }], [{
  25757. "label": "西秀区",
  25758. "value": "520402"
  25759. }, {
  25760. "label": "平坝区",
  25761. "value": "520403"
  25762. }, {
  25763. "label": "普定县",
  25764. "value": "520422"
  25765. }, {
  25766. "label": "镇宁布依族苗族自治县",
  25767. "value": "520423"
  25768. }, {
  25769. "label": "关岭布依族苗族自治县",
  25770. "value": "520424"
  25771. }, {
  25772. "label": "紫云苗族布依族自治县",
  25773. "value": "520425"
  25774. }], [{
  25775. "label": "七星关区",
  25776. "value": "520502"
  25777. }, {
  25778. "label": "大方县",
  25779. "value": "520521"
  25780. }, {
  25781. "label": "黔西县",
  25782. "value": "520522"
  25783. }, {
  25784. "label": "金沙县",
  25785. "value": "520523"
  25786. }, {
  25787. "label": "织金县",
  25788. "value": "520524"
  25789. }, {
  25790. "label": "纳雍县",
  25791. "value": "520525"
  25792. }, {
  25793. "label": "威宁彝族回族苗族自治县",
  25794. "value": "520526"
  25795. }, {
  25796. "label": "赫章县",
  25797. "value": "520527"
  25798. }], [{
  25799. "label": "碧江区",
  25800. "value": "520602"
  25801. }, {
  25802. "label": "万山区",
  25803. "value": "520603"
  25804. }, {
  25805. "label": "江口县",
  25806. "value": "520621"
  25807. }, {
  25808. "label": "玉屏侗族自治县",
  25809. "value": "520622"
  25810. }, {
  25811. "label": "石阡县",
  25812. "value": "520623"
  25813. }, {
  25814. "label": "思南县",
  25815. "value": "520624"
  25816. }, {
  25817. "label": "印江土家族苗族自治县",
  25818. "value": "520625"
  25819. }, {
  25820. "label": "德江县",
  25821. "value": "520626"
  25822. }, {
  25823. "label": "沿河土家族自治县",
  25824. "value": "520627"
  25825. }, {
  25826. "label": "松桃苗族自治县",
  25827. "value": "520628"
  25828. }], [{
  25829. "label": "兴义市",
  25830. "value": "522301"
  25831. }, {
  25832. "label": "兴仁县",
  25833. "value": "522322"
  25834. }, {
  25835. "label": "普安县",
  25836. "value": "522323"
  25837. }, {
  25838. "label": "晴隆县",
  25839. "value": "522324"
  25840. }, {
  25841. "label": "贞丰县",
  25842. "value": "522325"
  25843. }, {
  25844. "label": "望谟县",
  25845. "value": "522326"
  25846. }, {
  25847. "label": "册亨县",
  25848. "value": "522327"
  25849. }, {
  25850. "label": "安龙县",
  25851. "value": "522328"
  25852. }], [{
  25853. "label": "凯里市",
  25854. "value": "522601"
  25855. }, {
  25856. "label": "黄平县",
  25857. "value": "522622"
  25858. }, {
  25859. "label": "施秉县",
  25860. "value": "522623"
  25861. }, {
  25862. "label": "三穗县",
  25863. "value": "522624"
  25864. }, {
  25865. "label": "镇远县",
  25866. "value": "522625"
  25867. }, {
  25868. "label": "岑巩县",
  25869. "value": "522626"
  25870. }, {
  25871. "label": "天柱县",
  25872. "value": "522627"
  25873. }, {
  25874. "label": "锦屏县",
  25875. "value": "522628"
  25876. }, {
  25877. "label": "剑河县",
  25878. "value": "522629"
  25879. }, {
  25880. "label": "台江县",
  25881. "value": "522630"
  25882. }, {
  25883. "label": "黎平县",
  25884. "value": "522631"
  25885. }, {
  25886. "label": "榕江县",
  25887. "value": "522632"
  25888. }, {
  25889. "label": "从江县",
  25890. "value": "522633"
  25891. }, {
  25892. "label": "雷山县",
  25893. "value": "522634"
  25894. }, {
  25895. "label": "麻江县",
  25896. "value": "522635"
  25897. }, {
  25898. "label": "丹寨县",
  25899. "value": "522636"
  25900. }], [{
  25901. "label": "都匀市",
  25902. "value": "522701"
  25903. }, {
  25904. "label": "福泉市",
  25905. "value": "522702"
  25906. }, {
  25907. "label": "荔波县",
  25908. "value": "522722"
  25909. }, {
  25910. "label": "贵定县",
  25911. "value": "522723"
  25912. }, {
  25913. "label": "瓮安县",
  25914. "value": "522725"
  25915. }, {
  25916. "label": "独山县",
  25917. "value": "522726"
  25918. }, {
  25919. "label": "平塘县",
  25920. "value": "522727"
  25921. }, {
  25922. "label": "罗甸县",
  25923. "value": "522728"
  25924. }, {
  25925. "label": "长顺县",
  25926. "value": "522729"
  25927. }, {
  25928. "label": "龙里县",
  25929. "value": "522730"
  25930. }, {
  25931. "label": "惠水县",
  25932. "value": "522731"
  25933. }, {
  25934. "label": "三都水族自治县",
  25935. "value": "522732"
  25936. }]], [[{
  25937. "label": "五华区",
  25938. "value": "530102"
  25939. }, {
  25940. "label": "盘龙区",
  25941. "value": "530103"
  25942. }, {
  25943. "label": "官渡区",
  25944. "value": "530111"
  25945. }, {
  25946. "label": "西山区",
  25947. "value": "530112"
  25948. }, {
  25949. "label": "东川区",
  25950. "value": "530113"
  25951. }, {
  25952. "label": "呈贡区",
  25953. "value": "530114"
  25954. }, {
  25955. "label": "晋宁区",
  25956. "value": "530115"
  25957. }, {
  25958. "label": "富民县",
  25959. "value": "530124"
  25960. }, {
  25961. "label": "宜良县",
  25962. "value": "530125"
  25963. }, {
  25964. "label": "石林彝族自治县",
  25965. "value": "530126"
  25966. }, {
  25967. "label": "嵩明县",
  25968. "value": "530127"
  25969. }, {
  25970. "label": "禄劝彝族苗族自治县",
  25971. "value": "530128"
  25972. }, {
  25973. "label": "寻甸回族彝族自治县",
  25974. "value": "530129"
  25975. }, {
  25976. "label": "安宁市",
  25977. "value": "530181"
  25978. }], [{
  25979. "label": "麒麟区",
  25980. "value": "530302"
  25981. }, {
  25982. "label": "沾益区",
  25983. "value": "530303"
  25984. }, {
  25985. "label": "马龙县",
  25986. "value": "530321"
  25987. }, {
  25988. "label": "陆良县",
  25989. "value": "530322"
  25990. }, {
  25991. "label": "师宗县",
  25992. "value": "530323"
  25993. }, {
  25994. "label": "罗平县",
  25995. "value": "530324"
  25996. }, {
  25997. "label": "富源县",
  25998. "value": "530325"
  25999. }, {
  26000. "label": "会泽县",
  26001. "value": "530326"
  26002. }, {
  26003. "label": "宣威市",
  26004. "value": "530381"
  26005. }], [{
  26006. "label": "红塔区",
  26007. "value": "530402"
  26008. }, {
  26009. "label": "江川区",
  26010. "value": "530403"
  26011. }, {
  26012. "label": "澄江县",
  26013. "value": "530422"
  26014. }, {
  26015. "label": "通海县",
  26016. "value": "530423"
  26017. }, {
  26018. "label": "华宁县",
  26019. "value": "530424"
  26020. }, {
  26021. "label": "易门县",
  26022. "value": "530425"
  26023. }, {
  26024. "label": "峨山彝族自治县",
  26025. "value": "530426"
  26026. }, {
  26027. "label": "新平彝族傣族自治县",
  26028. "value": "530427"
  26029. }, {
  26030. "label": "元江哈尼族彝族傣族自治县",
  26031. "value": "530428"
  26032. }], [{
  26033. "label": "隆阳区",
  26034. "value": "530502"
  26035. }, {
  26036. "label": "施甸县",
  26037. "value": "530521"
  26038. }, {
  26039. "label": "龙陵县",
  26040. "value": "530523"
  26041. }, {
  26042. "label": "昌宁县",
  26043. "value": "530524"
  26044. }, {
  26045. "label": "腾冲市",
  26046. "value": "530581"
  26047. }], [{
  26048. "label": "昭阳区",
  26049. "value": "530602"
  26050. }, {
  26051. "label": "鲁甸县",
  26052. "value": "530621"
  26053. }, {
  26054. "label": "巧家县",
  26055. "value": "530622"
  26056. }, {
  26057. "label": "盐津县",
  26058. "value": "530623"
  26059. }, {
  26060. "label": "大关县",
  26061. "value": "530624"
  26062. }, {
  26063. "label": "永善县",
  26064. "value": "530625"
  26065. }, {
  26066. "label": "绥江县",
  26067. "value": "530626"
  26068. }, {
  26069. "label": "镇雄县",
  26070. "value": "530627"
  26071. }, {
  26072. "label": "彝良县",
  26073. "value": "530628"
  26074. }, {
  26075. "label": "威信县",
  26076. "value": "530629"
  26077. }, {
  26078. "label": "水富县",
  26079. "value": "530630"
  26080. }], [{
  26081. "label": "古城区",
  26082. "value": "530702"
  26083. }, {
  26084. "label": "玉龙纳西族自治县",
  26085. "value": "530721"
  26086. }, {
  26087. "label": "永胜县",
  26088. "value": "530722"
  26089. }, {
  26090. "label": "华坪县",
  26091. "value": "530723"
  26092. }, {
  26093. "label": "宁蒗彝族自治县",
  26094. "value": "530724"
  26095. }], [{
  26096. "label": "思茅区",
  26097. "value": "530802"
  26098. }, {
  26099. "label": "宁洱哈尼族彝族自治县",
  26100. "value": "530821"
  26101. }, {
  26102. "label": "墨江哈尼族自治县",
  26103. "value": "530822"
  26104. }, {
  26105. "label": "景东彝族自治县",
  26106. "value": "530823"
  26107. }, {
  26108. "label": "景谷傣族彝族自治县",
  26109. "value": "530824"
  26110. }, {
  26111. "label": "镇沅彝族哈尼族拉祜族自治县",
  26112. "value": "530825"
  26113. }, {
  26114. "label": "江城哈尼族彝族自治县",
  26115. "value": "530826"
  26116. }, {
  26117. "label": "孟连傣族拉祜族佤族自治县",
  26118. "value": "530827"
  26119. }, {
  26120. "label": "澜沧拉祜族自治县",
  26121. "value": "530828"
  26122. }, {
  26123. "label": "西盟佤族自治县",
  26124. "value": "530829"
  26125. }], [{
  26126. "label": "临翔区",
  26127. "value": "530902"
  26128. }, {
  26129. "label": "凤庆县",
  26130. "value": "530921"
  26131. }, {
  26132. "label": "云县",
  26133. "value": "530922"
  26134. }, {
  26135. "label": "永德县",
  26136. "value": "530923"
  26137. }, {
  26138. "label": "镇康县",
  26139. "value": "530924"
  26140. }, {
  26141. "label": "双江拉祜族佤族布朗族傣族自治县",
  26142. "value": "530925"
  26143. }, {
  26144. "label": "耿马傣族佤族自治县",
  26145. "value": "530926"
  26146. }, {
  26147. "label": "沧源佤族自治县",
  26148. "value": "530927"
  26149. }], [{
  26150. "label": "楚雄市",
  26151. "value": "532301"
  26152. }, {
  26153. "label": "双柏县",
  26154. "value": "532322"
  26155. }, {
  26156. "label": "牟定县",
  26157. "value": "532323"
  26158. }, {
  26159. "label": "南华县",
  26160. "value": "532324"
  26161. }, {
  26162. "label": "姚安县",
  26163. "value": "532325"
  26164. }, {
  26165. "label": "大姚县",
  26166. "value": "532326"
  26167. }, {
  26168. "label": "永仁县",
  26169. "value": "532327"
  26170. }, {
  26171. "label": "元谋县",
  26172. "value": "532328"
  26173. }, {
  26174. "label": "武定县",
  26175. "value": "532329"
  26176. }, {
  26177. "label": "禄丰县",
  26178. "value": "532331"
  26179. }], [{
  26180. "label": "个旧市",
  26181. "value": "532501"
  26182. }, {
  26183. "label": "开远市",
  26184. "value": "532502"
  26185. }, {
  26186. "label": "蒙自市",
  26187. "value": "532503"
  26188. }, {
  26189. "label": "弥勒市",
  26190. "value": "532504"
  26191. }, {
  26192. "label": "屏边苗族自治县",
  26193. "value": "532523"
  26194. }, {
  26195. "label": "建水县",
  26196. "value": "532524"
  26197. }, {
  26198. "label": "石屏县",
  26199. "value": "532525"
  26200. }, {
  26201. "label": "泸西县",
  26202. "value": "532527"
  26203. }, {
  26204. "label": "元阳县",
  26205. "value": "532528"
  26206. }, {
  26207. "label": "红河县",
  26208. "value": "532529"
  26209. }, {
  26210. "label": "金平苗族瑶族傣族自治县",
  26211. "value": "532530"
  26212. }, {
  26213. "label": "绿春县",
  26214. "value": "532531"
  26215. }, {
  26216. "label": "河口瑶族自治县",
  26217. "value": "532532"
  26218. }], [{
  26219. "label": "文山市",
  26220. "value": "532601"
  26221. }, {
  26222. "label": "砚山县",
  26223. "value": "532622"
  26224. }, {
  26225. "label": "西畴县",
  26226. "value": "532623"
  26227. }, {
  26228. "label": "麻栗坡县",
  26229. "value": "532624"
  26230. }, {
  26231. "label": "马关县",
  26232. "value": "532625"
  26233. }, {
  26234. "label": "丘北县",
  26235. "value": "532626"
  26236. }, {
  26237. "label": "广南县",
  26238. "value": "532627"
  26239. }, {
  26240. "label": "富宁县",
  26241. "value": "532628"
  26242. }], [{
  26243. "label": "景洪市",
  26244. "value": "532801"
  26245. }, {
  26246. "label": "勐海县",
  26247. "value": "532822"
  26248. }, {
  26249. "label": "勐腊县",
  26250. "value": "532823"
  26251. }], [{
  26252. "label": "大理市",
  26253. "value": "532901"
  26254. }, {
  26255. "label": "漾濞彝族自治县",
  26256. "value": "532922"
  26257. }, {
  26258. "label": "祥云县",
  26259. "value": "532923"
  26260. }, {
  26261. "label": "宾川县",
  26262. "value": "532924"
  26263. }, {
  26264. "label": "弥渡县",
  26265. "value": "532925"
  26266. }, {
  26267. "label": "南涧彝族自治县",
  26268. "value": "532926"
  26269. }, {
  26270. "label": "巍山彝族回族自治县",
  26271. "value": "532927"
  26272. }, {
  26273. "label": "永平县",
  26274. "value": "532928"
  26275. }, {
  26276. "label": "云龙县",
  26277. "value": "532929"
  26278. }, {
  26279. "label": "洱源县",
  26280. "value": "532930"
  26281. }, {
  26282. "label": "剑川县",
  26283. "value": "532931"
  26284. }, {
  26285. "label": "鹤庆县",
  26286. "value": "532932"
  26287. }], [{
  26288. "label": "瑞丽市",
  26289. "value": "533102"
  26290. }, {
  26291. "label": "芒市",
  26292. "value": "533103"
  26293. }, {
  26294. "label": "梁河县",
  26295. "value": "533122"
  26296. }, {
  26297. "label": "盈江县",
  26298. "value": "533123"
  26299. }, {
  26300. "label": "陇川县",
  26301. "value": "533124"
  26302. }], [{
  26303. "label": "泸水市",
  26304. "value": "533301"
  26305. }, {
  26306. "label": "福贡县",
  26307. "value": "533323"
  26308. }, {
  26309. "label": "贡山独龙族怒族自治县",
  26310. "value": "533324"
  26311. }, {
  26312. "label": "兰坪白族普米族自治县",
  26313. "value": "533325"
  26314. }], [{
  26315. "label": "香格里拉市",
  26316. "value": "533401"
  26317. }, {
  26318. "label": "德钦县",
  26319. "value": "533422"
  26320. }, {
  26321. "label": "维西傈僳族自治县",
  26322. "value": "533423"
  26323. }]], [[{
  26324. "label": "城关区",
  26325. "value": "540102"
  26326. }, {
  26327. "label": "堆龙德庆区",
  26328. "value": "540103"
  26329. }, {
  26330. "label": "林周县",
  26331. "value": "540121"
  26332. }, {
  26333. "label": "当雄县",
  26334. "value": "540122"
  26335. }, {
  26336. "label": "尼木县",
  26337. "value": "540123"
  26338. }, {
  26339. "label": "曲水县",
  26340. "value": "540124"
  26341. }, {
  26342. "label": "达孜县",
  26343. "value": "540126"
  26344. }, {
  26345. "label": "墨竹工卡县",
  26346. "value": "540127"
  26347. }, {
  26348. "label": "格尔木藏青工业园区",
  26349. "value": "540171"
  26350. }, {
  26351. "label": "拉萨经济技术开发区",
  26352. "value": "540172"
  26353. }, {
  26354. "label": "西藏文化旅游创意园区",
  26355. "value": "540173"
  26356. }, {
  26357. "label": "达孜工业园区",
  26358. "value": "540174"
  26359. }], [{
  26360. "label": "桑珠孜区",
  26361. "value": "540202"
  26362. }, {
  26363. "label": "南木林县",
  26364. "value": "540221"
  26365. }, {
  26366. "label": "江孜县",
  26367. "value": "540222"
  26368. }, {
  26369. "label": "定日县",
  26370. "value": "540223"
  26371. }, {
  26372. "label": "萨迦县",
  26373. "value": "540224"
  26374. }, {
  26375. "label": "拉孜县",
  26376. "value": "540225"
  26377. }, {
  26378. "label": "昂仁县",
  26379. "value": "540226"
  26380. }, {
  26381. "label": "谢通门县",
  26382. "value": "540227"
  26383. }, {
  26384. "label": "白朗县",
  26385. "value": "540228"
  26386. }, {
  26387. "label": "仁布县",
  26388. "value": "540229"
  26389. }, {
  26390. "label": "康马县",
  26391. "value": "540230"
  26392. }, {
  26393. "label": "定结县",
  26394. "value": "540231"
  26395. }, {
  26396. "label": "仲巴县",
  26397. "value": "540232"
  26398. }, {
  26399. "label": "亚东县",
  26400. "value": "540233"
  26401. }, {
  26402. "label": "吉隆县",
  26403. "value": "540234"
  26404. }, {
  26405. "label": "聂拉木县",
  26406. "value": "540235"
  26407. }, {
  26408. "label": "萨嘎县",
  26409. "value": "540236"
  26410. }, {
  26411. "label": "岗巴县",
  26412. "value": "540237"
  26413. }], [{
  26414. "label": "卡若区",
  26415. "value": "540302"
  26416. }, {
  26417. "label": "江达县",
  26418. "value": "540321"
  26419. }, {
  26420. "label": "贡觉县",
  26421. "value": "540322"
  26422. }, {
  26423. "label": "类乌齐县",
  26424. "value": "540323"
  26425. }, {
  26426. "label": "丁青县",
  26427. "value": "540324"
  26428. }, {
  26429. "label": "察雅县",
  26430. "value": "540325"
  26431. }, {
  26432. "label": "八宿县",
  26433. "value": "540326"
  26434. }, {
  26435. "label": "左贡县",
  26436. "value": "540327"
  26437. }, {
  26438. "label": "芒康县",
  26439. "value": "540328"
  26440. }, {
  26441. "label": "洛隆县",
  26442. "value": "540329"
  26443. }, {
  26444. "label": "边坝县",
  26445. "value": "540330"
  26446. }], [{
  26447. "label": "巴宜区",
  26448. "value": "540402"
  26449. }, {
  26450. "label": "工布江达县",
  26451. "value": "540421"
  26452. }, {
  26453. "label": "米林县",
  26454. "value": "540422"
  26455. }, {
  26456. "label": "墨脱县",
  26457. "value": "540423"
  26458. }, {
  26459. "label": "波密县",
  26460. "value": "540424"
  26461. }, {
  26462. "label": "察隅县",
  26463. "value": "540425"
  26464. }, {
  26465. "label": "朗县",
  26466. "value": "540426"
  26467. }], [{
  26468. "label": "乃东区",
  26469. "value": "540502"
  26470. }, {
  26471. "label": "扎囊县",
  26472. "value": "540521"
  26473. }, {
  26474. "label": "贡嘎县",
  26475. "value": "540522"
  26476. }, {
  26477. "label": "桑日县",
  26478. "value": "540523"
  26479. }, {
  26480. "label": "琼结县",
  26481. "value": "540524"
  26482. }, {
  26483. "label": "曲松县",
  26484. "value": "540525"
  26485. }, {
  26486. "label": "措美县",
  26487. "value": "540526"
  26488. }, {
  26489. "label": "洛扎县",
  26490. "value": "540527"
  26491. }, {
  26492. "label": "加查县",
  26493. "value": "540528"
  26494. }, {
  26495. "label": "隆子县",
  26496. "value": "540529"
  26497. }, {
  26498. "label": "错那县",
  26499. "value": "540530"
  26500. }, {
  26501. "label": "浪卡子县",
  26502. "value": "540531"
  26503. }], [{
  26504. "label": "那曲县",
  26505. "value": "542421"
  26506. }, {
  26507. "label": "嘉黎县",
  26508. "value": "542422"
  26509. }, {
  26510. "label": "比如县",
  26511. "value": "542423"
  26512. }, {
  26513. "label": "聂荣县",
  26514. "value": "542424"
  26515. }, {
  26516. "label": "安多县",
  26517. "value": "542425"
  26518. }, {
  26519. "label": "申扎县",
  26520. "value": "542426"
  26521. }, {
  26522. "label": "索县",
  26523. "value": "542427"
  26524. }, {
  26525. "label": "班戈县",
  26526. "value": "542428"
  26527. }, {
  26528. "label": "巴青县",
  26529. "value": "542429"
  26530. }, {
  26531. "label": "尼玛县",
  26532. "value": "542430"
  26533. }, {
  26534. "label": "双湖县",
  26535. "value": "542431"
  26536. }], [{
  26537. "label": "普兰县",
  26538. "value": "542521"
  26539. }, {
  26540. "label": "札达县",
  26541. "value": "542522"
  26542. }, {
  26543. "label": "噶尔县",
  26544. "value": "542523"
  26545. }, {
  26546. "label": "日土县",
  26547. "value": "542524"
  26548. }, {
  26549. "label": "革吉县",
  26550. "value": "542525"
  26551. }, {
  26552. "label": "改则县",
  26553. "value": "542526"
  26554. }, {
  26555. "label": "措勤县",
  26556. "value": "542527"
  26557. }]], [[{
  26558. "label": "新城区",
  26559. "value": "610102"
  26560. }, {
  26561. "label": "碑林区",
  26562. "value": "610103"
  26563. }, {
  26564. "label": "莲湖区",
  26565. "value": "610104"
  26566. }, {
  26567. "label": "灞桥区",
  26568. "value": "610111"
  26569. }, {
  26570. "label": "未央区",
  26571. "value": "610112"
  26572. }, {
  26573. "label": "雁塔区",
  26574. "value": "610113"
  26575. }, {
  26576. "label": "阎良区",
  26577. "value": "610114"
  26578. }, {
  26579. "label": "临潼区",
  26580. "value": "610115"
  26581. }, {
  26582. "label": "长安区",
  26583. "value": "610116"
  26584. }, {
  26585. "label": "高陵区",
  26586. "value": "610117"
  26587. }, {
  26588. "label": "鄠邑区",
  26589. "value": "610118"
  26590. }, {
  26591. "label": "蓝田县",
  26592. "value": "610122"
  26593. }, {
  26594. "label": "周至县",
  26595. "value": "610124"
  26596. }], [{
  26597. "label": "王益区",
  26598. "value": "610202"
  26599. }, {
  26600. "label": "印台区",
  26601. "value": "610203"
  26602. }, {
  26603. "label": "耀州区",
  26604. "value": "610204"
  26605. }, {
  26606. "label": "宜君县",
  26607. "value": "610222"
  26608. }], [{
  26609. "label": "渭滨区",
  26610. "value": "610302"
  26611. }, {
  26612. "label": "金台区",
  26613. "value": "610303"
  26614. }, {
  26615. "label": "陈仓区",
  26616. "value": "610304"
  26617. }, {
  26618. "label": "凤翔县",
  26619. "value": "610322"
  26620. }, {
  26621. "label": "岐山县",
  26622. "value": "610323"
  26623. }, {
  26624. "label": "扶风县",
  26625. "value": "610324"
  26626. }, {
  26627. "label": "眉县",
  26628. "value": "610326"
  26629. }, {
  26630. "label": "陇县",
  26631. "value": "610327"
  26632. }, {
  26633. "label": "千阳县",
  26634. "value": "610328"
  26635. }, {
  26636. "label": "麟游县",
  26637. "value": "610329"
  26638. }, {
  26639. "label": "凤县",
  26640. "value": "610330"
  26641. }, {
  26642. "label": "太白县",
  26643. "value": "610331"
  26644. }], [{
  26645. "label": "秦都区",
  26646. "value": "610402"
  26647. }, {
  26648. "label": "杨陵区",
  26649. "value": "610403"
  26650. }, {
  26651. "label": "渭城区",
  26652. "value": "610404"
  26653. }, {
  26654. "label": "三原县",
  26655. "value": "610422"
  26656. }, {
  26657. "label": "泾阳县",
  26658. "value": "610423"
  26659. }, {
  26660. "label": "乾县",
  26661. "value": "610424"
  26662. }, {
  26663. "label": "礼泉县",
  26664. "value": "610425"
  26665. }, {
  26666. "label": "永寿县",
  26667. "value": "610426"
  26668. }, {
  26669. "label": "彬县",
  26670. "value": "610427"
  26671. }, {
  26672. "label": "长武县",
  26673. "value": "610428"
  26674. }, {
  26675. "label": "旬邑县",
  26676. "value": "610429"
  26677. }, {
  26678. "label": "淳化县",
  26679. "value": "610430"
  26680. }, {
  26681. "label": "武功县",
  26682. "value": "610431"
  26683. }, {
  26684. "label": "兴平市",
  26685. "value": "610481"
  26686. }], [{
  26687. "label": "临渭区",
  26688. "value": "610502"
  26689. }, {
  26690. "label": "华州区",
  26691. "value": "610503"
  26692. }, {
  26693. "label": "潼关县",
  26694. "value": "610522"
  26695. }, {
  26696. "label": "大荔县",
  26697. "value": "610523"
  26698. }, {
  26699. "label": "合阳县",
  26700. "value": "610524"
  26701. }, {
  26702. "label": "澄城县",
  26703. "value": "610525"
  26704. }, {
  26705. "label": "蒲城县",
  26706. "value": "610526"
  26707. }, {
  26708. "label": "白水县",
  26709. "value": "610527"
  26710. }, {
  26711. "label": "富平县",
  26712. "value": "610528"
  26713. }, {
  26714. "label": "韩城市",
  26715. "value": "610581"
  26716. }, {
  26717. "label": "华阴市",
  26718. "value": "610582"
  26719. }], [{
  26720. "label": "宝塔区",
  26721. "value": "610602"
  26722. }, {
  26723. "label": "安塞区",
  26724. "value": "610603"
  26725. }, {
  26726. "label": "延长县",
  26727. "value": "610621"
  26728. }, {
  26729. "label": "延川县",
  26730. "value": "610622"
  26731. }, {
  26732. "label": "子长县",
  26733. "value": "610623"
  26734. }, {
  26735. "label": "志丹县",
  26736. "value": "610625"
  26737. }, {
  26738. "label": "吴起县",
  26739. "value": "610626"
  26740. }, {
  26741. "label": "甘泉县",
  26742. "value": "610627"
  26743. }, {
  26744. "label": "富县",
  26745. "value": "610628"
  26746. }, {
  26747. "label": "洛川县",
  26748. "value": "610629"
  26749. }, {
  26750. "label": "宜川县",
  26751. "value": "610630"
  26752. }, {
  26753. "label": "黄龙县",
  26754. "value": "610631"
  26755. }, {
  26756. "label": "黄陵县",
  26757. "value": "610632"
  26758. }], [{
  26759. "label": "汉台区",
  26760. "value": "610702"
  26761. }, {
  26762. "label": "南郑区",
  26763. "value": "610703"
  26764. }, {
  26765. "label": "城固县",
  26766. "value": "610722"
  26767. }, {
  26768. "label": "洋县",
  26769. "value": "610723"
  26770. }, {
  26771. "label": "西乡县",
  26772. "value": "610724"
  26773. }, {
  26774. "label": "勉县",
  26775. "value": "610725"
  26776. }, {
  26777. "label": "宁强县",
  26778. "value": "610726"
  26779. }, {
  26780. "label": "略阳县",
  26781. "value": "610727"
  26782. }, {
  26783. "label": "镇巴县",
  26784. "value": "610728"
  26785. }, {
  26786. "label": "留坝县",
  26787. "value": "610729"
  26788. }, {
  26789. "label": "佛坪县",
  26790. "value": "610730"
  26791. }], [{
  26792. "label": "榆阳区",
  26793. "value": "610802"
  26794. }, {
  26795. "label": "横山区",
  26796. "value": "610803"
  26797. }, {
  26798. "label": "府谷县",
  26799. "value": "610822"
  26800. }, {
  26801. "label": "靖边县",
  26802. "value": "610824"
  26803. }, {
  26804. "label": "定边县",
  26805. "value": "610825"
  26806. }, {
  26807. "label": "绥德县",
  26808. "value": "610826"
  26809. }, {
  26810. "label": "米脂县",
  26811. "value": "610827"
  26812. }, {
  26813. "label": "佳县",
  26814. "value": "610828"
  26815. }, {
  26816. "label": "吴堡县",
  26817. "value": "610829"
  26818. }, {
  26819. "label": "清涧县",
  26820. "value": "610830"
  26821. }, {
  26822. "label": "子洲县",
  26823. "value": "610831"
  26824. }, {
  26825. "label": "神木市",
  26826. "value": "610881"
  26827. }], [{
  26828. "label": "汉滨区",
  26829. "value": "610902"
  26830. }, {
  26831. "label": "汉阴县",
  26832. "value": "610921"
  26833. }, {
  26834. "label": "石泉县",
  26835. "value": "610922"
  26836. }, {
  26837. "label": "宁陕县",
  26838. "value": "610923"
  26839. }, {
  26840. "label": "紫阳县",
  26841. "value": "610924"
  26842. }, {
  26843. "label": "岚皋县",
  26844. "value": "610925"
  26845. }, {
  26846. "label": "平利县",
  26847. "value": "610926"
  26848. }, {
  26849. "label": "镇坪县",
  26850. "value": "610927"
  26851. }, {
  26852. "label": "旬阳县",
  26853. "value": "610928"
  26854. }, {
  26855. "label": "白河县",
  26856. "value": "610929"
  26857. }], [{
  26858. "label": "商州区",
  26859. "value": "611002"
  26860. }, {
  26861. "label": "洛南县",
  26862. "value": "611021"
  26863. }, {
  26864. "label": "丹凤县",
  26865. "value": "611022"
  26866. }, {
  26867. "label": "商南县",
  26868. "value": "611023"
  26869. }, {
  26870. "label": "山阳县",
  26871. "value": "611024"
  26872. }, {
  26873. "label": "镇安县",
  26874. "value": "611025"
  26875. }, {
  26876. "label": "柞水县",
  26877. "value": "611026"
  26878. }]], [[{
  26879. "label": "城关区",
  26880. "value": "620102"
  26881. }, {
  26882. "label": "七里河区",
  26883. "value": "620103"
  26884. }, {
  26885. "label": "西固区",
  26886. "value": "620104"
  26887. }, {
  26888. "label": "安宁区",
  26889. "value": "620105"
  26890. }, {
  26891. "label": "红古区",
  26892. "value": "620111"
  26893. }, {
  26894. "label": "永登县",
  26895. "value": "620121"
  26896. }, {
  26897. "label": "皋兰县",
  26898. "value": "620122"
  26899. }, {
  26900. "label": "榆中县",
  26901. "value": "620123"
  26902. }, {
  26903. "label": "兰州新区",
  26904. "value": "620171"
  26905. }], [{
  26906. "label": "嘉峪关市",
  26907. "value": "620201"
  26908. }], [{
  26909. "label": "金川区",
  26910. "value": "620302"
  26911. }, {
  26912. "label": "永昌县",
  26913. "value": "620321"
  26914. }], [{
  26915. "label": "白银区",
  26916. "value": "620402"
  26917. }, {
  26918. "label": "平川区",
  26919. "value": "620403"
  26920. }, {
  26921. "label": "靖远县",
  26922. "value": "620421"
  26923. }, {
  26924. "label": "会宁县",
  26925. "value": "620422"
  26926. }, {
  26927. "label": "景泰县",
  26928. "value": "620423"
  26929. }], [{
  26930. "label": "秦州区",
  26931. "value": "620502"
  26932. }, {
  26933. "label": "麦积区",
  26934. "value": "620503"
  26935. }, {
  26936. "label": "清水县",
  26937. "value": "620521"
  26938. }, {
  26939. "label": "秦安县",
  26940. "value": "620522"
  26941. }, {
  26942. "label": "甘谷县",
  26943. "value": "620523"
  26944. }, {
  26945. "label": "武山县",
  26946. "value": "620524"
  26947. }, {
  26948. "label": "张家川回族自治县",
  26949. "value": "620525"
  26950. }], [{
  26951. "label": "凉州区",
  26952. "value": "620602"
  26953. }, {
  26954. "label": "民勤县",
  26955. "value": "620621"
  26956. }, {
  26957. "label": "古浪县",
  26958. "value": "620622"
  26959. }, {
  26960. "label": "天祝藏族自治县",
  26961. "value": "620623"
  26962. }], [{
  26963. "label": "甘州区",
  26964. "value": "620702"
  26965. }, {
  26966. "label": "肃南裕固族自治县",
  26967. "value": "620721"
  26968. }, {
  26969. "label": "民乐县",
  26970. "value": "620722"
  26971. }, {
  26972. "label": "临泽县",
  26973. "value": "620723"
  26974. }, {
  26975. "label": "高台县",
  26976. "value": "620724"
  26977. }, {
  26978. "label": "山丹县",
  26979. "value": "620725"
  26980. }], [{
  26981. "label": "崆峒区",
  26982. "value": "620802"
  26983. }, {
  26984. "label": "泾川县",
  26985. "value": "620821"
  26986. }, {
  26987. "label": "灵台县",
  26988. "value": "620822"
  26989. }, {
  26990. "label": "崇信县",
  26991. "value": "620823"
  26992. }, {
  26993. "label": "华亭县",
  26994. "value": "620824"
  26995. }, {
  26996. "label": "庄浪县",
  26997. "value": "620825"
  26998. }, {
  26999. "label": "静宁县",
  27000. "value": "620826"
  27001. }, {
  27002. "label": "平凉工业园区",
  27003. "value": "620871"
  27004. }], [{
  27005. "label": "肃州区",
  27006. "value": "620902"
  27007. }, {
  27008. "label": "金塔县",
  27009. "value": "620921"
  27010. }, {
  27011. "label": "瓜州县",
  27012. "value": "620922"
  27013. }, {
  27014. "label": "肃北蒙古族自治县",
  27015. "value": "620923"
  27016. }, {
  27017. "label": "阿克塞哈萨克族自治县",
  27018. "value": "620924"
  27019. }, {
  27020. "label": "玉门市",
  27021. "value": "620981"
  27022. }, {
  27023. "label": "敦煌市",
  27024. "value": "620982"
  27025. }], [{
  27026. "label": "西峰区",
  27027. "value": "621002"
  27028. }, {
  27029. "label": "庆城县",
  27030. "value": "621021"
  27031. }, {
  27032. "label": "环县",
  27033. "value": "621022"
  27034. }, {
  27035. "label": "华池县",
  27036. "value": "621023"
  27037. }, {
  27038. "label": "合水县",
  27039. "value": "621024"
  27040. }, {
  27041. "label": "正宁县",
  27042. "value": "621025"
  27043. }, {
  27044. "label": "宁县",
  27045. "value": "621026"
  27046. }, {
  27047. "label": "镇原县",
  27048. "value": "621027"
  27049. }], [{
  27050. "label": "安定区",
  27051. "value": "621102"
  27052. }, {
  27053. "label": "通渭县",
  27054. "value": "621121"
  27055. }, {
  27056. "label": "陇西县",
  27057. "value": "621122"
  27058. }, {
  27059. "label": "渭源县",
  27060. "value": "621123"
  27061. }, {
  27062. "label": "临洮县",
  27063. "value": "621124"
  27064. }, {
  27065. "label": "漳县",
  27066. "value": "621125"
  27067. }, {
  27068. "label": "岷县",
  27069. "value": "621126"
  27070. }], [{
  27071. "label": "武都区",
  27072. "value": "621202"
  27073. }, {
  27074. "label": "成县",
  27075. "value": "621221"
  27076. }, {
  27077. "label": "文县",
  27078. "value": "621222"
  27079. }, {
  27080. "label": "宕昌县",
  27081. "value": "621223"
  27082. }, {
  27083. "label": "康县",
  27084. "value": "621224"
  27085. }, {
  27086. "label": "西和县",
  27087. "value": "621225"
  27088. }, {
  27089. "label": "礼县",
  27090. "value": "621226"
  27091. }, {
  27092. "label": "徽县",
  27093. "value": "621227"
  27094. }, {
  27095. "label": "两当县",
  27096. "value": "621228"
  27097. }], [{
  27098. "label": "临夏市",
  27099. "value": "622901"
  27100. }, {
  27101. "label": "临夏县",
  27102. "value": "622921"
  27103. }, {
  27104. "label": "康乐县",
  27105. "value": "622922"
  27106. }, {
  27107. "label": "永靖县",
  27108. "value": "622923"
  27109. }, {
  27110. "label": "广河县",
  27111. "value": "622924"
  27112. }, {
  27113. "label": "和政县",
  27114. "value": "622925"
  27115. }, {
  27116. "label": "东乡族自治县",
  27117. "value": "622926"
  27118. }, {
  27119. "label": "积石山保安族东乡族撒拉族自治县",
  27120. "value": "622927"
  27121. }], [{
  27122. "label": "合作市",
  27123. "value": "623001"
  27124. }, {
  27125. "label": "临潭县",
  27126. "value": "623021"
  27127. }, {
  27128. "label": "卓尼县",
  27129. "value": "623022"
  27130. }, {
  27131. "label": "舟曲县",
  27132. "value": "623023"
  27133. }, {
  27134. "label": "迭部县",
  27135. "value": "623024"
  27136. }, {
  27137. "label": "玛曲县",
  27138. "value": "623025"
  27139. }, {
  27140. "label": "碌曲县",
  27141. "value": "623026"
  27142. }, {
  27143. "label": "夏河县",
  27144. "value": "623027"
  27145. }]], [[{
  27146. "label": "城东区",
  27147. "value": "630102"
  27148. }, {
  27149. "label": "城中区",
  27150. "value": "630103"
  27151. }, {
  27152. "label": "城西区",
  27153. "value": "630104"
  27154. }, {
  27155. "label": "城北区",
  27156. "value": "630105"
  27157. }, {
  27158. "label": "大通回族土族自治县",
  27159. "value": "630121"
  27160. }, {
  27161. "label": "湟中县",
  27162. "value": "630122"
  27163. }, {
  27164. "label": "湟源县",
  27165. "value": "630123"
  27166. }], [{
  27167. "label": "乐都区",
  27168. "value": "630202"
  27169. }, {
  27170. "label": "平安区",
  27171. "value": "630203"
  27172. }, {
  27173. "label": "民和回族土族自治县",
  27174. "value": "630222"
  27175. }, {
  27176. "label": "互助土族自治县",
  27177. "value": "630223"
  27178. }, {
  27179. "label": "化隆回族自治县",
  27180. "value": "630224"
  27181. }, {
  27182. "label": "循化撒拉族自治县",
  27183. "value": "630225"
  27184. }], [{
  27185. "label": "门源回族自治县",
  27186. "value": "632221"
  27187. }, {
  27188. "label": "祁连县",
  27189. "value": "632222"
  27190. }, {
  27191. "label": "海晏县",
  27192. "value": "632223"
  27193. }, {
  27194. "label": "刚察县",
  27195. "value": "632224"
  27196. }], [{
  27197. "label": "同仁县",
  27198. "value": "632321"
  27199. }, {
  27200. "label": "尖扎县",
  27201. "value": "632322"
  27202. }, {
  27203. "label": "泽库县",
  27204. "value": "632323"
  27205. }, {
  27206. "label": "河南蒙古族自治县",
  27207. "value": "632324"
  27208. }], [{
  27209. "label": "共和县",
  27210. "value": "632521"
  27211. }, {
  27212. "label": "同德县",
  27213. "value": "632522"
  27214. }, {
  27215. "label": "贵德县",
  27216. "value": "632523"
  27217. }, {
  27218. "label": "兴海县",
  27219. "value": "632524"
  27220. }, {
  27221. "label": "贵南县",
  27222. "value": "632525"
  27223. }], [{
  27224. "label": "玛沁县",
  27225. "value": "632621"
  27226. }, {
  27227. "label": "班玛县",
  27228. "value": "632622"
  27229. }, {
  27230. "label": "甘德县",
  27231. "value": "632623"
  27232. }, {
  27233. "label": "达日县",
  27234. "value": "632624"
  27235. }, {
  27236. "label": "久治县",
  27237. "value": "632625"
  27238. }, {
  27239. "label": "玛多县",
  27240. "value": "632626"
  27241. }], [{
  27242. "label": "玉树市",
  27243. "value": "632701"
  27244. }, {
  27245. "label": "杂多县",
  27246. "value": "632722"
  27247. }, {
  27248. "label": "称多县",
  27249. "value": "632723"
  27250. }, {
  27251. "label": "治多县",
  27252. "value": "632724"
  27253. }, {
  27254. "label": "囊谦县",
  27255. "value": "632725"
  27256. }, {
  27257. "label": "曲麻莱县",
  27258. "value": "632726"
  27259. }], [{
  27260. "label": "格尔木市",
  27261. "value": "632801"
  27262. }, {
  27263. "label": "德令哈市",
  27264. "value": "632802"
  27265. }, {
  27266. "label": "乌兰县",
  27267. "value": "632821"
  27268. }, {
  27269. "label": "都兰县",
  27270. "value": "632822"
  27271. }, {
  27272. "label": "天峻县",
  27273. "value": "632823"
  27274. }, {
  27275. "label": "大柴旦行政委员会",
  27276. "value": "632857"
  27277. }, {
  27278. "label": "冷湖行政委员会",
  27279. "value": "632858"
  27280. }, {
  27281. "label": "茫崖行政委员会",
  27282. "value": "632859"
  27283. }]], [[{
  27284. "label": "兴庆区",
  27285. "value": "640104"
  27286. }, {
  27287. "label": "西夏区",
  27288. "value": "640105"
  27289. }, {
  27290. "label": "金凤区",
  27291. "value": "640106"
  27292. }, {
  27293. "label": "永宁县",
  27294. "value": "640121"
  27295. }, {
  27296. "label": "贺兰县",
  27297. "value": "640122"
  27298. }, {
  27299. "label": "灵武市",
  27300. "value": "640181"
  27301. }], [{
  27302. "label": "大武口区",
  27303. "value": "640202"
  27304. }, {
  27305. "label": "惠农区",
  27306. "value": "640205"
  27307. }, {
  27308. "label": "平罗县",
  27309. "value": "640221"
  27310. }], [{
  27311. "label": "利通区",
  27312. "value": "640302"
  27313. }, {
  27314. "label": "红寺堡区",
  27315. "value": "640303"
  27316. }, {
  27317. "label": "盐池县",
  27318. "value": "640323"
  27319. }, {
  27320. "label": "同心县",
  27321. "value": "640324"
  27322. }, {
  27323. "label": "青铜峡市",
  27324. "value": "640381"
  27325. }], [{
  27326. "label": "原州区",
  27327. "value": "640402"
  27328. }, {
  27329. "label": "西吉县",
  27330. "value": "640422"
  27331. }, {
  27332. "label": "隆德县",
  27333. "value": "640423"
  27334. }, {
  27335. "label": "泾源县",
  27336. "value": "640424"
  27337. }, {
  27338. "label": "彭阳县",
  27339. "value": "640425"
  27340. }], [{
  27341. "label": "沙坡头区",
  27342. "value": "640502"
  27343. }, {
  27344. "label": "中宁县",
  27345. "value": "640521"
  27346. }, {
  27347. "label": "海原县",
  27348. "value": "640522"
  27349. }]], [[{
  27350. "label": "天山区",
  27351. "value": "650102"
  27352. }, {
  27353. "label": "沙依巴克区",
  27354. "value": "650103"
  27355. }, {
  27356. "label": "新市区",
  27357. "value": "650104"
  27358. }, {
  27359. "label": "水磨沟区",
  27360. "value": "650105"
  27361. }, {
  27362. "label": "头屯河区",
  27363. "value": "650106"
  27364. }, {
  27365. "label": "达坂城区",
  27366. "value": "650107"
  27367. }, {
  27368. "label": "米东区",
  27369. "value": "650109"
  27370. }, {
  27371. "label": "乌鲁木齐县",
  27372. "value": "650121"
  27373. }, {
  27374. "label": "乌鲁木齐经济技术开发区",
  27375. "value": "650171"
  27376. }, {
  27377. "label": "乌鲁木齐高新技术产业开发区",
  27378. "value": "650172"
  27379. }], [{
  27380. "label": "独山子区",
  27381. "value": "650202"
  27382. }, {
  27383. "label": "克拉玛依区",
  27384. "value": "650203"
  27385. }, {
  27386. "label": "白碱滩区",
  27387. "value": "650204"
  27388. }, {
  27389. "label": "乌尔禾区",
  27390. "value": "650205"
  27391. }], [{
  27392. "label": "高昌区",
  27393. "value": "650402"
  27394. }, {
  27395. "label": "鄯善县",
  27396. "value": "650421"
  27397. }, {
  27398. "label": "托克逊县",
  27399. "value": "650422"
  27400. }], [{
  27401. "label": "伊州区",
  27402. "value": "650502"
  27403. }, {
  27404. "label": "巴里坤哈萨克自治县",
  27405. "value": "650521"
  27406. }, {
  27407. "label": "伊吾县",
  27408. "value": "650522"
  27409. }], [{
  27410. "label": "昌吉市",
  27411. "value": "652301"
  27412. }, {
  27413. "label": "阜康市",
  27414. "value": "652302"
  27415. }, {
  27416. "label": "呼图壁县",
  27417. "value": "652323"
  27418. }, {
  27419. "label": "玛纳斯县",
  27420. "value": "652324"
  27421. }, {
  27422. "label": "奇台县",
  27423. "value": "652325"
  27424. }, {
  27425. "label": "吉木萨尔县",
  27426. "value": "652327"
  27427. }, {
  27428. "label": "木垒哈萨克自治县",
  27429. "value": "652328"
  27430. }], [{
  27431. "label": "博乐市",
  27432. "value": "652701"
  27433. }, {
  27434. "label": "阿拉山口市",
  27435. "value": "652702"
  27436. }, {
  27437. "label": "精河县",
  27438. "value": "652722"
  27439. }, {
  27440. "label": "温泉县",
  27441. "value": "652723"
  27442. }], [{
  27443. "label": "库尔勒市",
  27444. "value": "652801"
  27445. }, {
  27446. "label": "轮台县",
  27447. "value": "652822"
  27448. }, {
  27449. "label": "尉犁县",
  27450. "value": "652823"
  27451. }, {
  27452. "label": "若羌县",
  27453. "value": "652824"
  27454. }, {
  27455. "label": "且末县",
  27456. "value": "652825"
  27457. }, {
  27458. "label": "焉耆回族自治县",
  27459. "value": "652826"
  27460. }, {
  27461. "label": "和静县",
  27462. "value": "652827"
  27463. }, {
  27464. "label": "和硕县",
  27465. "value": "652828"
  27466. }, {
  27467. "label": "博湖县",
  27468. "value": "652829"
  27469. }, {
  27470. "label": "库尔勒经济技术开发区",
  27471. "value": "652871"
  27472. }], [{
  27473. "label": "阿克苏市",
  27474. "value": "652901"
  27475. }, {
  27476. "label": "温宿县",
  27477. "value": "652922"
  27478. }, {
  27479. "label": "库车县",
  27480. "value": "652923"
  27481. }, {
  27482. "label": "沙雅县",
  27483. "value": "652924"
  27484. }, {
  27485. "label": "新和县",
  27486. "value": "652925"
  27487. }, {
  27488. "label": "拜城县",
  27489. "value": "652926"
  27490. }, {
  27491. "label": "乌什县",
  27492. "value": "652927"
  27493. }, {
  27494. "label": "阿瓦提县",
  27495. "value": "652928"
  27496. }, {
  27497. "label": "柯坪县",
  27498. "value": "652929"
  27499. }], [{
  27500. "label": "阿图什市",
  27501. "value": "653001"
  27502. }, {
  27503. "label": "阿克陶县",
  27504. "value": "653022"
  27505. }, {
  27506. "label": "阿合奇县",
  27507. "value": "653023"
  27508. }, {
  27509. "label": "乌恰县",
  27510. "value": "653024"
  27511. }], [{
  27512. "label": "喀什市",
  27513. "value": "653101"
  27514. }, {
  27515. "label": "疏附县",
  27516. "value": "653121"
  27517. }, {
  27518. "label": "疏勒县",
  27519. "value": "653122"
  27520. }, {
  27521. "label": "英吉沙县",
  27522. "value": "653123"
  27523. }, {
  27524. "label": "泽普县",
  27525. "value": "653124"
  27526. }, {
  27527. "label": "莎车县",
  27528. "value": "653125"
  27529. }, {
  27530. "label": "叶城县",
  27531. "value": "653126"
  27532. }, {
  27533. "label": "麦盖提县",
  27534. "value": "653127"
  27535. }, {
  27536. "label": "岳普湖县",
  27537. "value": "653128"
  27538. }, {
  27539. "label": "伽师县",
  27540. "value": "653129"
  27541. }, {
  27542. "label": "巴楚县",
  27543. "value": "653130"
  27544. }, {
  27545. "label": "塔什库尔干塔吉克自治县",
  27546. "value": "653131"
  27547. }], [{
  27548. "label": "和田市",
  27549. "value": "653201"
  27550. }, {
  27551. "label": "和田县",
  27552. "value": "653221"
  27553. }, {
  27554. "label": "墨玉县",
  27555. "value": "653222"
  27556. }, {
  27557. "label": "皮山县",
  27558. "value": "653223"
  27559. }, {
  27560. "label": "洛浦县",
  27561. "value": "653224"
  27562. }, {
  27563. "label": "策勒县",
  27564. "value": "653225"
  27565. }, {
  27566. "label": "于田县",
  27567. "value": "653226"
  27568. }, {
  27569. "label": "民丰县",
  27570. "value": "653227"
  27571. }], [{
  27572. "label": "伊宁市",
  27573. "value": "654002"
  27574. }, {
  27575. "label": "奎屯市",
  27576. "value": "654003"
  27577. }, {
  27578. "label": "霍尔果斯市",
  27579. "value": "654004"
  27580. }, {
  27581. "label": "伊宁县",
  27582. "value": "654021"
  27583. }, {
  27584. "label": "察布查尔锡伯自治县",
  27585. "value": "654022"
  27586. }, {
  27587. "label": "霍城县",
  27588. "value": "654023"
  27589. }, {
  27590. "label": "巩留县",
  27591. "value": "654024"
  27592. }, {
  27593. "label": "新源县",
  27594. "value": "654025"
  27595. }, {
  27596. "label": "昭苏县",
  27597. "value": "654026"
  27598. }, {
  27599. "label": "特克斯县",
  27600. "value": "654027"
  27601. }, {
  27602. "label": "尼勒克县",
  27603. "value": "654028"
  27604. }], [{
  27605. "label": "塔城市",
  27606. "value": "654201"
  27607. }, {
  27608. "label": "乌苏市",
  27609. "value": "654202"
  27610. }, {
  27611. "label": "额敏县",
  27612. "value": "654221"
  27613. }, {
  27614. "label": "沙湾县",
  27615. "value": "654223"
  27616. }, {
  27617. "label": "托里县",
  27618. "value": "654224"
  27619. }, {
  27620. "label": "裕民县",
  27621. "value": "654225"
  27622. }, {
  27623. "label": "和布克赛尔蒙古自治县",
  27624. "value": "654226"
  27625. }], [{
  27626. "label": "阿勒泰市",
  27627. "value": "654301"
  27628. }, {
  27629. "label": "布尔津县",
  27630. "value": "654321"
  27631. }, {
  27632. "label": "富蕴县",
  27633. "value": "654322"
  27634. }, {
  27635. "label": "福海县",
  27636. "value": "654323"
  27637. }, {
  27638. "label": "哈巴河县",
  27639. "value": "654324"
  27640. }, {
  27641. "label": "青河县",
  27642. "value": "654325"
  27643. }, {
  27644. "label": "吉木乃县",
  27645. "value": "654326"
  27646. }], [{
  27647. "label": "石河子市",
  27648. "value": "659001"
  27649. }, {
  27650. "label": "阿拉尔市",
  27651. "value": "659002"
  27652. }, {
  27653. "label": "图木舒克市",
  27654. "value": "659003"
  27655. }, {
  27656. "label": "五家渠市",
  27657. "value": "659004"
  27658. }, {
  27659. "label": "铁门关市",
  27660. "value": "659006"
  27661. }]], [[{
  27662. "label": "台北",
  27663. "value": "660101"
  27664. }], [{
  27665. "label": "高雄",
  27666. "value": "660201"
  27667. }], [{
  27668. "label": "基隆",
  27669. "value": "660301"
  27670. }], [{
  27671. "label": "台中",
  27672. "value": "660401"
  27673. }], [{
  27674. "label": "台南",
  27675. "value": "660501"
  27676. }], [{
  27677. "label": "新竹",
  27678. "value": "660601"
  27679. }], [{
  27680. "label": "嘉义",
  27681. "value": "660701"
  27682. }], [{
  27683. "label": "宜兰",
  27684. "value": "660801"
  27685. }], [{
  27686. "label": "桃园",
  27687. "value": "660901"
  27688. }], [{
  27689. "label": "苗栗",
  27690. "value": "661001"
  27691. }], [{
  27692. "label": "彰化",
  27693. "value": "661101"
  27694. }], [{
  27695. "label": "南投",
  27696. "value": "661201"
  27697. }], [{
  27698. "label": "云林",
  27699. "value": "661301"
  27700. }], [{
  27701. "label": "屏东",
  27702. "value": "661401"
  27703. }], [{
  27704. "label": "台东",
  27705. "value": "661501"
  27706. }], [{
  27707. "label": "花莲",
  27708. "value": "661601"
  27709. }], [{
  27710. "label": "澎湖",
  27711. "value": "661701"
  27712. }]], [[{
  27713. "label": "香港岛",
  27714. "value": "670101"
  27715. }], [{
  27716. "label": "九龙",
  27717. "value": "670201"
  27718. }], [{
  27719. "label": "新界",
  27720. "value": "670301"
  27721. }]], [[{
  27722. "label": "澳门半岛",
  27723. "value": "680101"
  27724. }], [{
  27725. "label": "氹仔岛",
  27726. "value": "680201"
  27727. }], [{
  27728. "label": "路环岛",
  27729. "value": "680301"
  27730. }], [{
  27731. "label": "路氹城",
  27732. "value": "680401"
  27733. }]]];
  27734. var _default = areaData;
  27735. exports.default = _default;
  27736. /***/ }),
  27737. /***/ 5:
  27738. /*!**************************************************************!*\
  27739. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  27740. \**************************************************************/
  27741. /*! no static exports found */
  27742. /***/ (function(module, exports, __webpack_require__) {
  27743. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  27744. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  27745. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  27746. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  27747. function _slicedToArray(arr, i) {
  27748. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  27749. }
  27750. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  27751. /***/ }),
  27752. /***/ 50:
  27753. /*!************************************************************************************************!*\
  27754. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  27755. \************************************************************************************************/
  27756. /*! no static exports found */
  27757. /***/ (function(module, exports, __webpack_require__) {
  27758. // TODO(Babel 8): Remove this file.
  27759. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 51)();
  27760. module.exports = runtime;
  27761. /***/ }),
  27762. /***/ 51:
  27763. /*!*******************************************************************!*\
  27764. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  27765. \*******************************************************************/
  27766. /*! no static exports found */
  27767. /***/ (function(module, exports, __webpack_require__) {
  27768. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  27769. function _regeneratorRuntime() {
  27770. "use strict";
  27771. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  27772. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  27773. return exports;
  27774. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  27775. var exports = {},
  27776. Op = Object.prototype,
  27777. hasOwn = Op.hasOwnProperty,
  27778. defineProperty = Object.defineProperty || function (obj, key, desc) {
  27779. obj[key] = desc.value;
  27780. },
  27781. $Symbol = "function" == typeof Symbol ? Symbol : {},
  27782. iteratorSymbol = $Symbol.iterator || "@@iterator",
  27783. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  27784. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  27785. function define(obj, key, value) {
  27786. return Object.defineProperty(obj, key, {
  27787. value: value,
  27788. enumerable: !0,
  27789. configurable: !0,
  27790. writable: !0
  27791. }), obj[key];
  27792. }
  27793. try {
  27794. define({}, "");
  27795. } catch (err) {
  27796. define = function define(obj, key, value) {
  27797. return obj[key] = value;
  27798. };
  27799. }
  27800. function wrap(innerFn, outerFn, self, tryLocsList) {
  27801. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  27802. generator = Object.create(protoGenerator.prototype),
  27803. context = new Context(tryLocsList || []);
  27804. return defineProperty(generator, "_invoke", {
  27805. value: makeInvokeMethod(innerFn, self, context)
  27806. }), generator;
  27807. }
  27808. function tryCatch(fn, obj, arg) {
  27809. try {
  27810. return {
  27811. type: "normal",
  27812. arg: fn.call(obj, arg)
  27813. };
  27814. } catch (err) {
  27815. return {
  27816. type: "throw",
  27817. arg: err
  27818. };
  27819. }
  27820. }
  27821. exports.wrap = wrap;
  27822. var ContinueSentinel = {};
  27823. function Generator() {}
  27824. function GeneratorFunction() {}
  27825. function GeneratorFunctionPrototype() {}
  27826. var IteratorPrototype = {};
  27827. define(IteratorPrototype, iteratorSymbol, function () {
  27828. return this;
  27829. });
  27830. var getProto = Object.getPrototypeOf,
  27831. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  27832. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  27833. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  27834. function defineIteratorMethods(prototype) {
  27835. ["next", "throw", "return"].forEach(function (method) {
  27836. define(prototype, method, function (arg) {
  27837. return this._invoke(method, arg);
  27838. });
  27839. });
  27840. }
  27841. function AsyncIterator(generator, PromiseImpl) {
  27842. function invoke(method, arg, resolve, reject) {
  27843. var record = tryCatch(generator[method], generator, arg);
  27844. if ("throw" !== record.type) {
  27845. var result = record.arg,
  27846. value = result.value;
  27847. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  27848. invoke("next", value, resolve, reject);
  27849. }, function (err) {
  27850. invoke("throw", err, resolve, reject);
  27851. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  27852. result.value = unwrapped, resolve(result);
  27853. }, function (error) {
  27854. return invoke("throw", error, resolve, reject);
  27855. });
  27856. }
  27857. reject(record.arg);
  27858. }
  27859. var previousPromise;
  27860. defineProperty(this, "_invoke", {
  27861. value: function value(method, arg) {
  27862. function callInvokeWithMethodAndArg() {
  27863. return new PromiseImpl(function (resolve, reject) {
  27864. invoke(method, arg, resolve, reject);
  27865. });
  27866. }
  27867. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  27868. }
  27869. });
  27870. }
  27871. function makeInvokeMethod(innerFn, self, context) {
  27872. var state = "suspendedStart";
  27873. return function (method, arg) {
  27874. if ("executing" === state) throw new Error("Generator is already running");
  27875. if ("completed" === state) {
  27876. if ("throw" === method) throw arg;
  27877. return doneResult();
  27878. }
  27879. for (context.method = method, context.arg = arg;;) {
  27880. var delegate = context.delegate;
  27881. if (delegate) {
  27882. var delegateResult = maybeInvokeDelegate(delegate, context);
  27883. if (delegateResult) {
  27884. if (delegateResult === ContinueSentinel) continue;
  27885. return delegateResult;
  27886. }
  27887. }
  27888. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  27889. if ("suspendedStart" === state) throw state = "completed", context.arg;
  27890. context.dispatchException(context.arg);
  27891. } else "return" === context.method && context.abrupt("return", context.arg);
  27892. state = "executing";
  27893. var record = tryCatch(innerFn, self, context);
  27894. if ("normal" === record.type) {
  27895. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  27896. return {
  27897. value: record.arg,
  27898. done: context.done
  27899. };
  27900. }
  27901. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  27902. }
  27903. };
  27904. }
  27905. function maybeInvokeDelegate(delegate, context) {
  27906. var methodName = context.method,
  27907. method = delegate.iterator[methodName];
  27908. if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
  27909. var record = tryCatch(method, delegate.iterator, context.arg);
  27910. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  27911. var info = record.arg;
  27912. return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
  27913. }
  27914. function pushTryEntry(locs) {
  27915. var entry = {
  27916. tryLoc: locs[0]
  27917. };
  27918. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  27919. }
  27920. function resetTryEntry(entry) {
  27921. var record = entry.completion || {};
  27922. record.type = "normal", delete record.arg, entry.completion = record;
  27923. }
  27924. function Context(tryLocsList) {
  27925. this.tryEntries = [{
  27926. tryLoc: "root"
  27927. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  27928. }
  27929. function values(iterable) {
  27930. if (iterable) {
  27931. var iteratorMethod = iterable[iteratorSymbol];
  27932. if (iteratorMethod) return iteratorMethod.call(iterable);
  27933. if ("function" == typeof iterable.next) return iterable;
  27934. if (!isNaN(iterable.length)) {
  27935. var i = -1,
  27936. next = function next() {
  27937. for (; ++i < iterable.length;) {
  27938. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  27939. }
  27940. return next.value = undefined, next.done = !0, next;
  27941. };
  27942. return next.next = next;
  27943. }
  27944. }
  27945. return {
  27946. next: doneResult
  27947. };
  27948. }
  27949. function doneResult() {
  27950. return {
  27951. value: undefined,
  27952. done: !0
  27953. };
  27954. }
  27955. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  27956. value: GeneratorFunctionPrototype,
  27957. configurable: !0
  27958. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  27959. value: GeneratorFunction,
  27960. configurable: !0
  27961. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  27962. var ctor = "function" == typeof genFun && genFun.constructor;
  27963. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  27964. }, exports.mark = function (genFun) {
  27965. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  27966. }, exports.awrap = function (arg) {
  27967. return {
  27968. __await: arg
  27969. };
  27970. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  27971. return this;
  27972. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  27973. void 0 === PromiseImpl && (PromiseImpl = Promise);
  27974. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  27975. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  27976. return result.done ? result.value : iter.next();
  27977. });
  27978. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  27979. return this;
  27980. }), define(Gp, "toString", function () {
  27981. return "[object Generator]";
  27982. }), exports.keys = function (val) {
  27983. var object = Object(val),
  27984. keys = [];
  27985. for (var key in object) {
  27986. keys.push(key);
  27987. }
  27988. return keys.reverse(), function next() {
  27989. for (; keys.length;) {
  27990. var key = keys.pop();
  27991. if (key in object) return next.value = key, next.done = !1, next;
  27992. }
  27993. return next.done = !0, next;
  27994. };
  27995. }, exports.values = values, Context.prototype = {
  27996. constructor: Context,
  27997. reset: function reset(skipTempReset) {
  27998. if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
  27999. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  28000. }
  28001. },
  28002. stop: function stop() {
  28003. this.done = !0;
  28004. var rootRecord = this.tryEntries[0].completion;
  28005. if ("throw" === rootRecord.type) throw rootRecord.arg;
  28006. return this.rval;
  28007. },
  28008. dispatchException: function dispatchException(exception) {
  28009. if (this.done) throw exception;
  28010. var context = this;
  28011. function handle(loc, caught) {
  28012. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  28013. }
  28014. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  28015. var entry = this.tryEntries[i],
  28016. record = entry.completion;
  28017. if ("root" === entry.tryLoc) return handle("end");
  28018. if (entry.tryLoc <= this.prev) {
  28019. var hasCatch = hasOwn.call(entry, "catchLoc"),
  28020. hasFinally = hasOwn.call(entry, "finallyLoc");
  28021. if (hasCatch && hasFinally) {
  28022. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  28023. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  28024. } else if (hasCatch) {
  28025. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  28026. } else {
  28027. if (!hasFinally) throw new Error("try statement without catch or finally");
  28028. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  28029. }
  28030. }
  28031. }
  28032. },
  28033. abrupt: function abrupt(type, arg) {
  28034. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  28035. var entry = this.tryEntries[i];
  28036. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  28037. var finallyEntry = entry;
  28038. break;
  28039. }
  28040. }
  28041. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  28042. var record = finallyEntry ? finallyEntry.completion : {};
  28043. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  28044. },
  28045. complete: function complete(record, afterLoc) {
  28046. if ("throw" === record.type) throw record.arg;
  28047. return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
  28048. },
  28049. finish: function finish(finallyLoc) {
  28050. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  28051. var entry = this.tryEntries[i];
  28052. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  28053. }
  28054. },
  28055. "catch": function _catch(tryLoc) {
  28056. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  28057. var entry = this.tryEntries[i];
  28058. if (entry.tryLoc === tryLoc) {
  28059. var record = entry.completion;
  28060. if ("throw" === record.type) {
  28061. var thrown = record.arg;
  28062. resetTryEntry(entry);
  28063. }
  28064. return thrown;
  28065. }
  28066. }
  28067. throw new Error("illegal catch attempt");
  28068. },
  28069. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  28070. return this.delegate = {
  28071. iterator: values(iterable),
  28072. resultName: resultName,
  28073. nextLoc: nextLoc
  28074. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  28075. }
  28076. }, exports;
  28077. }
  28078. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  28079. /***/ }),
  28080. /***/ 510:
  28081. /*!************************************************************************************!*\
  28082. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  28083. \************************************************************************************/
  28084. /*! no static exports found */
  28085. /***/ (function(module, exports, __webpack_require__) {
  28086. "use strict";
  28087. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  28088. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  28089. Object.defineProperty(exports, "__esModule", {
  28090. value: true
  28091. });
  28092. exports.default = void 0;
  28093. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  28094. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 511));
  28095. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  28096. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  28097. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  28098. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  28099. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  28100. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 512));
  28101. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 513));
  28102. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 514));
  28103. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 515));
  28104. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  28105. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  28106. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  28107. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 517));
  28108. 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(_e35) { throw _e35; }, 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(_e36) { didErr = true; err = _e36; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  28109. 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); }
  28110. 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; }
  28111. 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; }
  28112. 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; }
  28113. 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); }; }
  28114. 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; } }
  28115. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  28116. function n(e) {
  28117. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  28118. }
  28119. function s(e, t, n) {
  28120. return e(n = {
  28121. path: t,
  28122. exports: {},
  28123. require: function require(e, t) {
  28124. return function () {
  28125. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  28126. }(null == t && n.path);
  28127. }
  28128. }, n.exports), n.exports;
  28129. }
  28130. var r = s(function (e, t) {
  28131. var n;
  28132. e.exports = (n = n || function (e, t) {
  28133. var n = Object.create || function () {
  28134. function e() {}
  28135. return function (t) {
  28136. var n;
  28137. return e.prototype = t, n = new e(), e.prototype = null, n;
  28138. };
  28139. }(),
  28140. s = {},
  28141. r = s.lib = {},
  28142. i = r.Base = {
  28143. extend: function extend(e) {
  28144. var t = n(this);
  28145. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  28146. t.$super.init.apply(this, arguments);
  28147. }), t.init.prototype = t, t.$super = this, t;
  28148. },
  28149. create: function create() {
  28150. var e = this.extend();
  28151. return e.init.apply(e, arguments), e;
  28152. },
  28153. init: function init() {},
  28154. mixIn: function mixIn(e) {
  28155. for (var t in e) {
  28156. e.hasOwnProperty(t) && (this[t] = e[t]);
  28157. }
  28158. e.hasOwnProperty("toString") && (this.toString = e.toString);
  28159. },
  28160. clone: function clone() {
  28161. return this.init.prototype.extend(this);
  28162. }
  28163. },
  28164. o = r.WordArray = i.extend({
  28165. init: function init(e, n) {
  28166. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  28167. },
  28168. toString: function toString(e) {
  28169. return (e || c).stringify(this);
  28170. },
  28171. concat: function concat(e) {
  28172. var t = this.words,
  28173. n = e.words,
  28174. s = this.sigBytes,
  28175. r = e.sigBytes;
  28176. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  28177. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  28178. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  28179. } else for (i = 0; i < r; i += 4) {
  28180. t[s + i >>> 2] = n[i >>> 2];
  28181. }
  28182. return this.sigBytes += r, this;
  28183. },
  28184. clamp: function clamp() {
  28185. var t = this.words,
  28186. n = this.sigBytes;
  28187. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  28188. },
  28189. clone: function clone() {
  28190. var e = i.clone.call(this);
  28191. return e.words = this.words.slice(0), e;
  28192. },
  28193. random: function random(t) {
  28194. for (var n, s = [], r = function r(t) {
  28195. t = t;
  28196. var n = 987654321,
  28197. s = 4294967295;
  28198. return function () {
  28199. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  28200. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  28201. };
  28202. }, i = 0; i < t; i += 4) {
  28203. var a = r(4294967296 * (n || e.random()));
  28204. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  28205. }
  28206. return new o.init(s, t);
  28207. }
  28208. }),
  28209. a = s.enc = {},
  28210. c = a.Hex = {
  28211. stringify: function stringify(e) {
  28212. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  28213. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  28214. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  28215. }
  28216. return s.join("");
  28217. },
  28218. parse: function parse(e) {
  28219. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  28220. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  28221. }
  28222. return new o.init(n, t / 2);
  28223. }
  28224. },
  28225. u = a.Latin1 = {
  28226. stringify: function stringify(e) {
  28227. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  28228. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  28229. s.push(String.fromCharCode(i));
  28230. }
  28231. return s.join("");
  28232. },
  28233. parse: function parse(e) {
  28234. for (var t = e.length, n = [], s = 0; s < t; s++) {
  28235. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  28236. }
  28237. return new o.init(n, t);
  28238. }
  28239. },
  28240. h = a.Utf8 = {
  28241. stringify: function stringify(e) {
  28242. try {
  28243. return decodeURIComponent(escape(u.stringify(e)));
  28244. } catch (e) {
  28245. throw new Error("Malformed UTF-8 data");
  28246. }
  28247. },
  28248. parse: function parse(e) {
  28249. return u.parse(unescape(encodeURIComponent(e)));
  28250. }
  28251. },
  28252. l = r.BufferedBlockAlgorithm = i.extend({
  28253. reset: function reset() {
  28254. this._data = new o.init(), this._nDataBytes = 0;
  28255. },
  28256. _append: function _append(e) {
  28257. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  28258. },
  28259. _process: function _process(t) {
  28260. var n = this._data,
  28261. s = n.words,
  28262. r = n.sigBytes,
  28263. i = this.blockSize,
  28264. a = r / (4 * i),
  28265. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  28266. u = e.min(4 * c, r);
  28267. if (c) {
  28268. for (var h = 0; h < c; h += i) {
  28269. this._doProcessBlock(s, h);
  28270. }
  28271. var l = s.splice(0, c);
  28272. n.sigBytes -= u;
  28273. }
  28274. return new o.init(l, u);
  28275. },
  28276. clone: function clone() {
  28277. var e = i.clone.call(this);
  28278. return e._data = this._data.clone(), e;
  28279. },
  28280. _minBufferSize: 0
  28281. });
  28282. r.Hasher = l.extend({
  28283. cfg: i.extend(),
  28284. init: function init(e) {
  28285. this.cfg = this.cfg.extend(e), this.reset();
  28286. },
  28287. reset: function reset() {
  28288. l.reset.call(this), this._doReset();
  28289. },
  28290. update: function update(e) {
  28291. return this._append(e), this._process(), this;
  28292. },
  28293. finalize: function finalize(e) {
  28294. return e && this._append(e), this._doFinalize();
  28295. },
  28296. blockSize: 16,
  28297. _createHelper: function _createHelper(e) {
  28298. return function (t, n) {
  28299. return new e.init(n).finalize(t);
  28300. };
  28301. },
  28302. _createHmacHelper: function _createHmacHelper(e) {
  28303. return function (t, n) {
  28304. return new d.HMAC.init(e, n).finalize(t);
  28305. };
  28306. }
  28307. });
  28308. var d = s.algo = {};
  28309. return s;
  28310. }(Math), n);
  28311. }),
  28312. i = r,
  28313. o = (s(function (e, t) {
  28314. var n;
  28315. e.exports = (n = i, function (e) {
  28316. var t = n,
  28317. s = t.lib,
  28318. r = s.WordArray,
  28319. i = s.Hasher,
  28320. o = t.algo,
  28321. a = [];
  28322. !function () {
  28323. for (var t = 0; t < 64; t++) {
  28324. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  28325. }
  28326. }();
  28327. var c = o.MD5 = i.extend({
  28328. _doReset: function _doReset() {
  28329. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  28330. },
  28331. _doProcessBlock: function _doProcessBlock(e, t) {
  28332. for (var n = 0; n < 16; n++) {
  28333. var s = t + n,
  28334. r = e[s];
  28335. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  28336. }
  28337. var i = this._hash.words,
  28338. o = e[t + 0],
  28339. c = e[t + 1],
  28340. p = e[t + 2],
  28341. f = e[t + 3],
  28342. g = e[t + 4],
  28343. m = e[t + 5],
  28344. y = e[t + 6],
  28345. _ = e[t + 7],
  28346. w = e[t + 8],
  28347. v = e[t + 9],
  28348. I = e[t + 10],
  28349. S = e[t + 11],
  28350. b = e[t + 12],
  28351. k = e[t + 13],
  28352. C = e[t + 14],
  28353. T = e[t + 15],
  28354. P = i[0],
  28355. A = i[1],
  28356. E = i[2],
  28357. O = i[3];
  28358. P = u(P, A, E, O, o, 7, a[0]), O = u(O, P, A, E, c, 12, a[1]), E = u(E, O, P, A, p, 17, a[2]), A = u(A, E, O, P, f, 22, a[3]), P = u(P, A, E, O, g, 7, a[4]), O = u(O, P, A, E, m, 12, a[5]), E = u(E, O, P, A, y, 17, a[6]), A = u(A, E, O, P, _, 22, a[7]), P = u(P, A, E, O, w, 7, a[8]), O = u(O, P, A, E, v, 12, a[9]), E = u(E, O, P, A, I, 17, a[10]), A = u(A, E, O, P, S, 22, a[11]), P = u(P, A, E, O, b, 7, a[12]), O = u(O, P, A, E, k, 12, a[13]), E = u(E, O, P, A, C, 17, a[14]), P = h(P, A = u(A, E, O, P, T, 22, a[15]), E, O, c, 5, a[16]), O = h(O, P, A, E, y, 9, a[17]), E = h(E, O, P, A, S, 14, a[18]), A = h(A, E, O, P, o, 20, a[19]), P = h(P, A, E, O, m, 5, a[20]), O = h(O, P, A, E, I, 9, a[21]), E = h(E, O, P, A, T, 14, a[22]), A = h(A, E, O, P, g, 20, a[23]), P = h(P, A, E, O, v, 5, a[24]), O = h(O, P, A, E, C, 9, a[25]), E = h(E, O, P, A, f, 14, a[26]), A = h(A, E, O, P, w, 20, a[27]), P = h(P, A, E, O, k, 5, a[28]), O = h(O, P, A, E, p, 9, a[29]), E = h(E, O, P, A, _, 14, a[30]), P = l(P, A = h(A, E, O, P, b, 20, a[31]), E, O, m, 4, a[32]), O = l(O, P, A, E, w, 11, a[33]), E = l(E, O, P, A, S, 16, a[34]), A = l(A, E, O, P, C, 23, a[35]), P = l(P, A, E, O, c, 4, a[36]), O = l(O, P, A, E, g, 11, a[37]), E = l(E, O, P, A, _, 16, a[38]), A = l(A, E, O, P, I, 23, a[39]), P = l(P, A, E, O, k, 4, a[40]), O = l(O, P, A, E, o, 11, a[41]), E = l(E, O, P, A, f, 16, a[42]), A = l(A, E, O, P, y, 23, a[43]), P = l(P, A, E, O, v, 4, a[44]), O = l(O, P, A, E, b, 11, a[45]), E = l(E, O, P, A, T, 16, a[46]), P = d(P, A = l(A, E, O, P, p, 23, a[47]), E, O, o, 6, a[48]), O = d(O, P, A, E, _, 10, a[49]), E = d(E, O, P, A, C, 15, a[50]), A = d(A, E, O, P, m, 21, a[51]), P = d(P, A, E, O, b, 6, a[52]), O = d(O, P, A, E, f, 10, a[53]), E = d(E, O, P, A, I, 15, a[54]), A = d(A, E, O, P, c, 21, a[55]), P = d(P, A, E, O, w, 6, a[56]), O = d(O, P, A, E, T, 10, a[57]), E = d(E, O, P, A, y, 15, a[58]), A = d(A, E, O, P, k, 21, a[59]), P = d(P, A, E, O, g, 6, a[60]), O = d(O, P, A, E, S, 10, a[61]), E = d(E, O, P, A, p, 15, a[62]), A = d(A, E, O, P, v, 21, a[63]), i[0] = i[0] + P | 0, i[1] = i[1] + A | 0, i[2] = i[2] + E | 0, i[3] = i[3] + O | 0;
  28359. },
  28360. _doFinalize: function _doFinalize() {
  28361. var t = this._data,
  28362. n = t.words,
  28363. s = 8 * this._nDataBytes,
  28364. r = 8 * t.sigBytes;
  28365. n[r >>> 5] |= 128 << 24 - r % 32;
  28366. var i = e.floor(s / 4294967296),
  28367. o = s;
  28368. 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();
  28369. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  28370. var h = c[u];
  28371. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  28372. }
  28373. return a;
  28374. },
  28375. clone: function clone() {
  28376. var e = i.clone.call(this);
  28377. return e._hash = this._hash.clone(), e;
  28378. }
  28379. });
  28380. function u(e, t, n, s, r, i, o) {
  28381. var a = e + (t & n | ~t & s) + r + o;
  28382. return (a << i | a >>> 32 - i) + t;
  28383. }
  28384. function h(e, t, n, s, r, i, o) {
  28385. var a = e + (t & s | n & ~s) + r + o;
  28386. return (a << i | a >>> 32 - i) + t;
  28387. }
  28388. function l(e, t, n, s, r, i, o) {
  28389. var a = e + (t ^ n ^ s) + r + o;
  28390. return (a << i | a >>> 32 - i) + t;
  28391. }
  28392. function d(e, t, n, s, r, i, o) {
  28393. var a = e + (n ^ (t | ~s)) + r + o;
  28394. return (a << i | a >>> 32 - i) + t;
  28395. }
  28396. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  28397. }(Math), n.MD5);
  28398. }), s(function (e, t) {
  28399. var n;
  28400. e.exports = (n = i, void function () {
  28401. var e = n,
  28402. t = e.lib.Base,
  28403. s = e.enc.Utf8;
  28404. e.algo.HMAC = t.extend({
  28405. init: function init(e, t) {
  28406. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  28407. var n = e.blockSize,
  28408. r = 4 * n;
  28409. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  28410. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  28411. a[u] ^= 1549556828, c[u] ^= 909522486;
  28412. }
  28413. i.sigBytes = o.sigBytes = r, this.reset();
  28414. },
  28415. reset: function reset() {
  28416. var e = this._hasher;
  28417. e.reset(), e.update(this._iKey);
  28418. },
  28419. update: function update(e) {
  28420. return this._hasher.update(e), this;
  28421. },
  28422. finalize: function finalize(e) {
  28423. var t = this._hasher,
  28424. n = t.finalize(e);
  28425. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  28426. }
  28427. });
  28428. }());
  28429. }), s(function (e, t) {
  28430. e.exports = i.HmacMD5;
  28431. })),
  28432. a = s(function (e, t) {
  28433. e.exports = i.enc.Utf8;
  28434. }),
  28435. c = s(function (e, t) {
  28436. var n;
  28437. e.exports = (n = i, function () {
  28438. var e = n,
  28439. t = e.lib.WordArray;
  28440. function s(e, n, s) {
  28441. for (var r = [], i = 0, o = 0; o < n; o++) {
  28442. if (o % 4) {
  28443. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  28444. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  28445. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  28446. }
  28447. }
  28448. return t.create(r, i);
  28449. }
  28450. e.enc.Base64 = {
  28451. stringify: function stringify(e) {
  28452. var t = e.words,
  28453. n = e.sigBytes,
  28454. s = this._map;
  28455. e.clamp();
  28456. for (var r = [], i = 0; i < n; i += 3) {
  28457. 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++) {
  28458. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  28459. }
  28460. }
  28461. var c = s.charAt(64);
  28462. if (c) for (; r.length % 4;) {
  28463. r.push(c);
  28464. }
  28465. return r.join("");
  28466. },
  28467. parse: function parse(e) {
  28468. var t = e.length,
  28469. n = this._map,
  28470. r = this._reverseMap;
  28471. if (!r) {
  28472. r = this._reverseMap = [];
  28473. for (var i = 0; i < n.length; i++) {
  28474. r[n.charCodeAt(i)] = i;
  28475. }
  28476. }
  28477. var o = n.charAt(64);
  28478. if (o) {
  28479. var a = e.indexOf(o);
  28480. -1 !== a && (t = a);
  28481. }
  28482. return s(e, t, r);
  28483. },
  28484. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  28485. };
  28486. }(), n.enc.Base64);
  28487. });
  28488. var u = "FUNCTION",
  28489. h = "OBJECT",
  28490. l = "CLIENT_DB",
  28491. d = "pending",
  28492. p = "fullfilled",
  28493. f = "rejected";
  28494. function g(e) {
  28495. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  28496. }
  28497. function m(e) {
  28498. return "object" === g(e);
  28499. }
  28500. function y(e) {
  28501. return "function" == typeof e;
  28502. }
  28503. function _(e) {
  28504. return function () {
  28505. try {
  28506. return e.apply(e, arguments);
  28507. } catch (e) {
  28508. console.error(e);
  28509. }
  28510. };
  28511. }
  28512. var w = "REJECTED",
  28513. v = "NOT_PENDING";
  28514. var I = /*#__PURE__*/function () {
  28515. function I() {
  28516. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  28517. e = _ref.createPromise,
  28518. _ref$retryRule = _ref.retryRule,
  28519. t = _ref$retryRule === void 0 ? w : _ref$retryRule;
  28520. (0, _classCallCheck2.default)(this, I);
  28521. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  28522. }
  28523. (0, _createClass2.default)(I, [{
  28524. key: "needRetry",
  28525. get: function get() {
  28526. if (!this.status) return !0;
  28527. switch (this.retryRule) {
  28528. case w:
  28529. return this.status === f;
  28530. case v:
  28531. return this.status !== d;
  28532. }
  28533. }
  28534. }, {
  28535. key: "exec",
  28536. value: function exec() {
  28537. var _this = this;
  28538. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then(function (e) {
  28539. return _this.status = p, Promise.resolve(e);
  28540. }, function (e) {
  28541. return _this.status = f, Promise.reject(e);
  28542. }), this.promise) : this.promise;
  28543. }
  28544. }]);
  28545. return I;
  28546. }();
  28547. function S(e) {
  28548. return e && "string" == typeof e ? JSON.parse(e) : e;
  28549. }
  28550. var b = "development" === "development",
  28551. k = "mp-weixin",
  28552. C = "true" === undefined || !0 === undefined,
  28553. T = S([]),
  28554. P = "h5" === k ? "web" : "app-plus" === k ? "app" : k,
  28555. A = S(undefined),
  28556. E = S(undefined) || [],
  28557. O = true;
  28558. var x = "";
  28559. try {
  28560. x = (__webpack_require__(/*! uni-stat-config */ 518).default || __webpack_require__(/*! uni-stat-config */ 518)).appid;
  28561. } catch (e) {}
  28562. var R = {};
  28563. function U(e) {
  28564. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  28565. var n, s;
  28566. return n = R, s = e, Object.prototype.hasOwnProperty.call(n, s) || (R[e] = t), R[e];
  28567. }
  28568. "app" === P && (R = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  28569. var L = ["invoke", "success", "fail", "complete"],
  28570. N = U("_globalUniCloudInterceptor");
  28571. function D(e, t) {
  28572. N[e] || (N[e] = {}), m(t) && Object.keys(t).forEach(function (n) {
  28573. L.indexOf(n) > -1 && function (e, t, n) {
  28574. var s = N[e][t];
  28575. s || (s = N[e][t] = []), -1 === s.indexOf(n) && y(n) && s.push(n);
  28576. }(e, n, t[n]);
  28577. });
  28578. }
  28579. function F(e, t) {
  28580. N[e] || (N[e] = {}), m(t) ? Object.keys(t).forEach(function (n) {
  28581. L.indexOf(n) > -1 && function (e, t, n) {
  28582. var s = N[e][t];
  28583. if (!s) return;
  28584. var r = s.indexOf(n);
  28585. r > -1 && s.splice(r, 1);
  28586. }(e, n, t[n]);
  28587. }) : delete N[e];
  28588. }
  28589. function q(e, t) {
  28590. return e && 0 !== e.length ? e.reduce(function (e, n) {
  28591. return e.then(function () {
  28592. return n(t);
  28593. });
  28594. }, Promise.resolve()) : Promise.resolve();
  28595. }
  28596. function M(e, t) {
  28597. return N[e] && N[e][t] || [];
  28598. }
  28599. function K(e) {
  28600. D("callObject", e);
  28601. }
  28602. var j = U("_globalUniCloudListener"),
  28603. B = "response",
  28604. $ = "needLogin",
  28605. W = "refreshToken",
  28606. z = "clientdb",
  28607. J = "cloudfunction",
  28608. H = "cloudobject";
  28609. function G(e) {
  28610. return j[e] || (j[e] = []), j[e];
  28611. }
  28612. function V(e, t) {
  28613. var n = G(e);
  28614. n.includes(t) || n.push(t);
  28615. }
  28616. function Y(e, t) {
  28617. var n = G(e),
  28618. s = n.indexOf(t);
  28619. -1 !== s && n.splice(s, 1);
  28620. }
  28621. function Q(e, t) {
  28622. var n = G(e);
  28623. for (var _e2 = 0; _e2 < n.length; _e2++) {
  28624. (0, n[_e2])(t);
  28625. }
  28626. }
  28627. var X,
  28628. Z = !1;
  28629. function ee() {
  28630. return X || (X = new Promise(function (e) {
  28631. Z && e(), function t() {
  28632. if ("function" == typeof getCurrentPages) {
  28633. var _t2 = getCurrentPages();
  28634. _t2 && _t2[0] && (Z = !0, e());
  28635. }
  28636. Z || setTimeout(function () {
  28637. t();
  28638. }, 30);
  28639. }();
  28640. }), X);
  28641. }
  28642. function te(e) {
  28643. var t = {};
  28644. for (var _n2 in e) {
  28645. var _s2 = e[_n2];
  28646. y(_s2) && (t[_n2] = _(_s2));
  28647. }
  28648. return t;
  28649. }
  28650. var ne = /*#__PURE__*/function (_Error) {
  28651. (0, _inherits2.default)(ne, _Error);
  28652. var _super = _createSuper(ne);
  28653. function ne(e) {
  28654. var _this2;
  28655. (0, _classCallCheck2.default)(this, ne);
  28656. _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;
  28657. return _this2;
  28658. }
  28659. (0, _createClass2.default)(ne, [{
  28660. key: "toJson",
  28661. value: function toJson() {
  28662. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  28663. if (!(e >= 10)) return e++, {
  28664. errCode: this.errCode,
  28665. errMsg: this.errMsg,
  28666. errSubject: this.errSubject,
  28667. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  28668. };
  28669. }
  28670. }]);
  28671. return ne;
  28672. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  28673. var se = {
  28674. request: function request(e) {
  28675. return uni.request(e);
  28676. },
  28677. uploadFile: function uploadFile(e) {
  28678. return uni.uploadFile(e);
  28679. },
  28680. setStorageSync: function setStorageSync(e, t) {
  28681. return uni.setStorageSync(e, t);
  28682. },
  28683. getStorageSync: function getStorageSync(e) {
  28684. return uni.getStorageSync(e);
  28685. },
  28686. removeStorageSync: function removeStorageSync(e) {
  28687. return uni.removeStorageSync(e);
  28688. },
  28689. clearStorageSync: function clearStorageSync() {
  28690. return uni.clearStorageSync();
  28691. }
  28692. };
  28693. function re() {
  28694. return {
  28695. token: se.getStorageSync("uni_id_token") || se.getStorageSync("uniIdToken"),
  28696. tokenExpired: se.getStorageSync("uni_id_token_expired")
  28697. };
  28698. }
  28699. function ie() {
  28700. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  28701. e = _ref2.token,
  28702. t = _ref2.tokenExpired;
  28703. e && se.setStorageSync("uni_id_token", e), t && se.setStorageSync("uni_id_token_expired", t);
  28704. }
  28705. var oe, ae;
  28706. function ce() {
  28707. return oe || (oe = uni.getSystemInfoSync()), oe;
  28708. }
  28709. function ue() {
  28710. var e, t;
  28711. try {
  28712. if (uni.getLaunchOptionsSync) {
  28713. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  28714. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  28715. _n3 = _uni$getLaunchOptions.scene,
  28716. _s3 = _uni$getLaunchOptions.channel;
  28717. e = _s3, t = _n3;
  28718. }
  28719. } catch (e) {}
  28720. return {
  28721. channel: e,
  28722. scene: t
  28723. };
  28724. }
  28725. function he() {
  28726. var e = uni.getLocale && uni.getLocale() || "en";
  28727. if (ae) return _objectSpread(_objectSpread({}, ae), {}, {
  28728. locale: e,
  28729. LOCALE: e
  28730. });
  28731. var t = ce(),
  28732. n = t.deviceId,
  28733. s = t.osName,
  28734. r = t.uniPlatform,
  28735. i = t.appId,
  28736. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  28737. for (var _e3 = 0; _e3 < o.length; _e3++) {
  28738. delete t[o[_e3]];
  28739. }
  28740. return ae = _objectSpread(_objectSpread({
  28741. PLATFORM: r,
  28742. OS: s,
  28743. APPID: i,
  28744. DEVICEID: n
  28745. }, ue()), t), _objectSpread(_objectSpread({}, ae), {}, {
  28746. locale: e,
  28747. LOCALE: e
  28748. });
  28749. }
  28750. var le = {
  28751. sign: function sign(e, t) {
  28752. var n = "";
  28753. return Object.keys(e).sort().forEach(function (t) {
  28754. e[t] && (n = n + "&" + t + "=" + e[t]);
  28755. }), n = n.slice(1), o(n, t).toString();
  28756. },
  28757. wrappedRequest: function wrappedRequest(e, t) {
  28758. return new Promise(function (n, s) {
  28759. t(Object.assign(e, {
  28760. complete: function complete(e) {
  28761. e || (e = {}), b && "web" === P && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");
  28762. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  28763. if (!e.statusCode || e.statusCode >= 400) return s(new ne({
  28764. code: "SYS_ERR",
  28765. message: e.errMsg || "request:fail",
  28766. requestId: t
  28767. }));
  28768. var r = e.data;
  28769. if (r.error) return s(new ne({
  28770. code: r.error.code,
  28771. message: r.error.message,
  28772. requestId: t
  28773. }));
  28774. r.result = r.data, r.requestId = t, delete r.data, n(r);
  28775. }
  28776. }));
  28777. });
  28778. },
  28779. toBase64: function toBase64(e) {
  28780. return c.stringify(a.parse(e));
  28781. }
  28782. },
  28783. de = {
  28784. "uniCloud.init.paramRequired": "{param} required",
  28785. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  28786. };
  28787. var _e4 = (0, _uniI18n.initVueI18n)({
  28788. "zh-Hans": {
  28789. "uniCloud.init.paramRequired": "缺少参数:{param}",
  28790. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  28791. },
  28792. "zh-Hant": {
  28793. "uniCloud.init.paramRequired": "缺少参数:{param}",
  28794. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  28795. },
  28796. en: de,
  28797. fr: {
  28798. "uniCloud.init.paramRequired": "{param} required",
  28799. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  28800. },
  28801. es: {
  28802. "uniCloud.init.paramRequired": "{param} required",
  28803. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  28804. },
  28805. ja: de
  28806. }, "zh-Hans"),
  28807. pe = _e4.t;
  28808. var fe = /*#__PURE__*/function () {
  28809. function fe(e) {
  28810. var _this3 = this;
  28811. (0, _classCallCheck2.default)(this, fe);
  28812. ["spaceId", "clientSecret"].forEach(function (t) {
  28813. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(pe("uniCloud.init.paramRequired", {
  28814. param: t
  28815. }));
  28816. }), this.config = Object.assign({}, {
  28817. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  28818. }, 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 = se, this._getAccessTokenPromiseHub = new I({
  28819. createPromise: function createPromise() {
  28820. return _this3.requestAuth(_this3.setupRequest({
  28821. method: "serverless.auth.user.anonymousAuthorize",
  28822. params: "{}"
  28823. }, "auth")).then(function (e) {
  28824. if (!e.result || !e.result.accessToken) throw new ne({
  28825. code: "AUTH_FAILED",
  28826. message: "获取accessToken失败"
  28827. });
  28828. _this3.setAccessToken(e.result.accessToken);
  28829. });
  28830. },
  28831. retryRule: v
  28832. });
  28833. }
  28834. (0, _createClass2.default)(fe, [{
  28835. key: "hasAccessToken",
  28836. get: function get() {
  28837. return !!this.accessToken;
  28838. }
  28839. }, {
  28840. key: "setAccessToken",
  28841. value: function setAccessToken(e) {
  28842. this.accessToken = e;
  28843. }
  28844. }, {
  28845. key: "requestWrapped",
  28846. value: function requestWrapped(e) {
  28847. return le.wrappedRequest(e, this.adapter.request);
  28848. }
  28849. }, {
  28850. key: "requestAuth",
  28851. value: function requestAuth(e) {
  28852. return this.requestWrapped(e);
  28853. }
  28854. }, {
  28855. key: "request",
  28856. value: function request(e, t) {
  28857. var _this4 = this;
  28858. return Promise.resolve().then(function () {
  28859. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  28860. return new Promise(function (e, n) {
  28861. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  28862. }).then(function () {
  28863. return _this4.getAccessToken();
  28864. }).then(function () {
  28865. var t = _this4.rebuildRequest(e);
  28866. return _this4.request(t, !0);
  28867. });
  28868. }) : _this4.getAccessToken().then(function () {
  28869. var t = _this4.rebuildRequest(e);
  28870. return _this4.request(t, !0);
  28871. });
  28872. });
  28873. }
  28874. }, {
  28875. key: "rebuildRequest",
  28876. value: function rebuildRequest(e) {
  28877. var t = Object.assign({}, e);
  28878. return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = le.sign(t.data, this.config.clientSecret), t;
  28879. }
  28880. }, {
  28881. key: "setupRequest",
  28882. value: function setupRequest(e, t) {
  28883. var n = Object.assign({}, e, {
  28884. spaceId: this.config.spaceId,
  28885. timestamp: Date.now()
  28886. }),
  28887. s = {
  28888. "Content-Type": "application/json"
  28889. };
  28890. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret), {
  28891. url: this.config.requestUrl,
  28892. method: "POST",
  28893. data: n,
  28894. dataType: "json",
  28895. header: s
  28896. };
  28897. }
  28898. }, {
  28899. key: "getAccessToken",
  28900. value: function getAccessToken() {
  28901. return this._getAccessTokenPromiseHub.exec();
  28902. }
  28903. }, {
  28904. key: "authorize",
  28905. value: function () {
  28906. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  28907. return _regenerator.default.wrap(function _callee$(_context) {
  28908. while (1) {
  28909. switch (_context.prev = _context.next) {
  28910. case 0:
  28911. _context.next = 2;
  28912. return this.getAccessToken();
  28913. case 2:
  28914. case "end":
  28915. return _context.stop();
  28916. }
  28917. }
  28918. }, _callee, this);
  28919. }));
  28920. function authorize() {
  28921. return _authorize.apply(this, arguments);
  28922. }
  28923. return authorize;
  28924. }()
  28925. }, {
  28926. key: "callFunction",
  28927. value: function callFunction(e) {
  28928. var t = {
  28929. method: "serverless.function.runtime.invoke",
  28930. params: JSON.stringify({
  28931. functionTarget: e.name,
  28932. functionArgs: e.data || {}
  28933. })
  28934. };
  28935. return this.request(this.setupRequest(t));
  28936. }
  28937. }, {
  28938. key: "getOSSUploadOptionsFromPath",
  28939. value: function getOSSUploadOptionsFromPath(e) {
  28940. var t = {
  28941. method: "serverless.file.resource.generateProximalSign",
  28942. params: JSON.stringify(e)
  28943. };
  28944. return this.request(this.setupRequest(t));
  28945. }
  28946. }, {
  28947. key: "uploadFileToOSS",
  28948. value: function uploadFileToOSS(_ref3) {
  28949. var _this5 = this;
  28950. var e = _ref3.url,
  28951. t = _ref3.formData,
  28952. n = _ref3.name,
  28953. s = _ref3.filePath,
  28954. r = _ref3.fileType,
  28955. i = _ref3.onUploadProgress;
  28956. return new Promise(function (o, a) {
  28957. var c = _this5.adapter.uploadFile({
  28958. url: e,
  28959. formData: t,
  28960. name: n,
  28961. filePath: s,
  28962. fileType: r,
  28963. header: {
  28964. "X-OSS-server-side-encrpytion": "AES256"
  28965. },
  28966. success: function success(e) {
  28967. e && e.statusCode < 400 ? o(e) : a(new ne({
  28968. code: "UPLOAD_FAILED",
  28969. message: "文件上传失败"
  28970. }));
  28971. },
  28972. fail: function fail(e) {
  28973. a(new ne({
  28974. code: e.code || "UPLOAD_FAILED",
  28975. message: e.message || e.errMsg || "文件上传失败"
  28976. }));
  28977. }
  28978. });
  28979. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  28980. i({
  28981. loaded: e.totalBytesSent,
  28982. total: e.totalBytesExpectedToSend
  28983. });
  28984. });
  28985. });
  28986. }
  28987. }, {
  28988. key: "reportOSSUpload",
  28989. value: function reportOSSUpload(e) {
  28990. var t = {
  28991. method: "serverless.file.resource.report",
  28992. params: JSON.stringify(e)
  28993. };
  28994. return this.request(this.setupRequest(t));
  28995. }
  28996. }, {
  28997. key: "uploadFile",
  28998. value: function () {
  28999. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  29000. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, h, l, d, p, f, m, y, _, _e5, w;
  29001. return _regenerator.default.wrap(function _callee2$(_context2) {
  29002. while (1) {
  29003. switch (_context2.prev = _context2.next) {
  29004. case 0:
  29005. 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;
  29006. if (!("string" !== g(t))) {
  29007. _context2.next = 3;
  29008. break;
  29009. }
  29010. throw new ne({
  29011. code: "INVALID_PARAM",
  29012. message: "cloudPath必须为字符串类型"
  29013. });
  29014. case 3:
  29015. if (t = t.trim()) {
  29016. _context2.next = 5;
  29017. break;
  29018. }
  29019. throw new ne({
  29020. code: "INVALID_PARAM",
  29021. message: "cloudPath不可为空"
  29022. });
  29023. case 5:
  29024. if (!/:\/\//.test(t)) {
  29025. _context2.next = 7;
  29026. break;
  29027. }
  29028. throw new ne({
  29029. code: "INVALID_PARAM",
  29030. message: "cloudPath不合法"
  29031. });
  29032. case 7:
  29033. o = i && i.envType || this.config.envType;
  29034. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  29035. _context2.next = 10;
  29036. break;
  29037. }
  29038. throw new ne({
  29039. code: "INVALID_PARAM",
  29040. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  29041. });
  29042. case 10:
  29043. _context2.next = 12;
  29044. return this.getOSSUploadOptionsFromPath({
  29045. env: o,
  29046. filename: s ? t.split("/").pop() : t,
  29047. fileId: s ? t : void 0
  29048. });
  29049. case 12:
  29050. a = _context2.sent.result;
  29051. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  29052. u = a.securityToken;
  29053. h = a.accessKeyId;
  29054. l = a.signature;
  29055. d = a.host;
  29056. p = a.ossPath;
  29057. f = a.id;
  29058. m = a.policy;
  29059. y = a.ossCallbackUrl;
  29060. _ = {
  29061. "Cache-Control": "max-age=2592000",
  29062. "Content-Disposition": "attachment",
  29063. OSSAccessKeyId: h,
  29064. Signature: l,
  29065. host: d,
  29066. id: f,
  29067. key: p,
  29068. policy: m,
  29069. success_action_status: 200
  29070. };
  29071. if (u && (_["x-oss-security-token"] = u), y) {
  29072. _e5 = JSON.stringify({
  29073. callbackUrl: y,
  29074. callbackBody: JSON.stringify({
  29075. fileId: f,
  29076. spaceId: this.config.spaceId
  29077. }),
  29078. callbackBodyType: "application/json"
  29079. });
  29080. _.callback = le.toBase64(_e5);
  29081. }
  29082. w = {
  29083. url: "https://" + a.host,
  29084. formData: _,
  29085. fileName: "file",
  29086. name: "file",
  29087. filePath: e,
  29088. fileType: n
  29089. };
  29090. _context2.next = 27;
  29091. return this.uploadFileToOSS(Object.assign({}, w, {
  29092. onUploadProgress: r
  29093. }));
  29094. case 27:
  29095. if (!y) {
  29096. _context2.next = 29;
  29097. break;
  29098. }
  29099. return _context2.abrupt("return", {
  29100. success: !0,
  29101. filePath: e,
  29102. fileID: c
  29103. });
  29104. case 29:
  29105. _context2.next = 31;
  29106. return this.reportOSSUpload({
  29107. id: f
  29108. });
  29109. case 31:
  29110. if (!_context2.sent.success) {
  29111. _context2.next = 33;
  29112. break;
  29113. }
  29114. return _context2.abrupt("return", {
  29115. success: !0,
  29116. filePath: e,
  29117. fileID: c
  29118. });
  29119. case 33:
  29120. throw new ne({
  29121. code: "UPLOAD_FAILED",
  29122. message: "文件上传失败"
  29123. });
  29124. case 34:
  29125. case "end":
  29126. return _context2.stop();
  29127. }
  29128. }
  29129. }, _callee2, this);
  29130. }));
  29131. function uploadFile(_x) {
  29132. return _uploadFile.apply(this, arguments);
  29133. }
  29134. return uploadFile;
  29135. }()
  29136. }, {
  29137. key: "getTempFileURL",
  29138. value: function getTempFileURL() {
  29139. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  29140. e = _ref5.fileList;
  29141. return new Promise(function (t, n) {
  29142. Array.isArray(e) && 0 !== e.length || n(new ne({
  29143. code: "INVALID_PARAM",
  29144. message: "fileList的元素必须是非空的字符串"
  29145. })), t({
  29146. fileList: e.map(function (e) {
  29147. return {
  29148. fileID: e,
  29149. tempFileURL: e
  29150. };
  29151. })
  29152. });
  29153. });
  29154. }
  29155. }, {
  29156. key: "getFileInfo",
  29157. value: function () {
  29158. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  29159. var _ref6,
  29160. e,
  29161. t,
  29162. _args3 = arguments;
  29163. return _regenerator.default.wrap(function _callee3$(_context3) {
  29164. while (1) {
  29165. switch (_context3.prev = _context3.next) {
  29166. case 0:
  29167. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  29168. if (!(!Array.isArray(e) || 0 === e.length)) {
  29169. _context3.next = 3;
  29170. break;
  29171. }
  29172. throw new ne({
  29173. code: "INVALID_PARAM",
  29174. message: "fileList的元素必须是非空的字符串"
  29175. });
  29176. case 3:
  29177. t = {
  29178. method: "serverless.file.resource.info",
  29179. params: JSON.stringify({
  29180. id: e.map(function (e) {
  29181. return e.split("?")[0];
  29182. }).join(",")
  29183. })
  29184. };
  29185. _context3.next = 6;
  29186. return this.request(this.setupRequest(t));
  29187. case 6:
  29188. _context3.t0 = _context3.sent.result;
  29189. return _context3.abrupt("return", {
  29190. fileList: _context3.t0
  29191. });
  29192. case 8:
  29193. case "end":
  29194. return _context3.stop();
  29195. }
  29196. }
  29197. }, _callee3, this);
  29198. }));
  29199. function getFileInfo() {
  29200. return _getFileInfo.apply(this, arguments);
  29201. }
  29202. return getFileInfo;
  29203. }()
  29204. }]);
  29205. return fe;
  29206. }();
  29207. var ge = {
  29208. init: function init(e) {
  29209. var t = new fe(e),
  29210. n = {
  29211. signInAnonymously: function signInAnonymously() {
  29212. return t.authorize();
  29213. },
  29214. getLoginState: function getLoginState() {
  29215. return Promise.resolve(!1);
  29216. }
  29217. };
  29218. return t.auth = function () {
  29219. return n;
  29220. }, t.customAuth = t.auth, t;
  29221. }
  29222. };
  29223. var me = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  29224. var ye;
  29225. !function (e) {
  29226. e.local = "local", e.none = "none", e.session = "session";
  29227. }(ye || (ye = {}));
  29228. var _e = function _e() {};
  29229. var we = function we() {
  29230. var e;
  29231. if (!Promise) {
  29232. e = function e() {}, e.promise = {};
  29233. var _t3 = function _t3() {
  29234. throw new ne({
  29235. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  29236. });
  29237. };
  29238. return Object.defineProperty(e.promise, "then", {
  29239. get: _t3
  29240. }), Object.defineProperty(e.promise, "catch", {
  29241. get: _t3
  29242. }), e;
  29243. }
  29244. var t = new Promise(function (t, n) {
  29245. e = function e(_e6, s) {
  29246. return _e6 ? n(_e6) : t(s);
  29247. };
  29248. });
  29249. return e.promise = t, e;
  29250. };
  29251. function ve(e) {
  29252. return void 0 === e;
  29253. }
  29254. function Ie(e) {
  29255. return "[object Null]" === Object.prototype.toString.call(e);
  29256. }
  29257. var Se;
  29258. function be(e) {
  29259. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  29260. var n;
  29261. var _iterator = _createForOfIteratorHelper(t),
  29262. _step;
  29263. try {
  29264. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  29265. var _e7 = _step.value;
  29266. var _t4 = _e7.isMatch,
  29267. _n4 = _e7.genAdapter,
  29268. _s4 = _e7.runtime;
  29269. if (_t4()) return {
  29270. adapter: _n4(),
  29271. runtime: _s4
  29272. };
  29273. }
  29274. } catch (err) {
  29275. _iterator.e(err);
  29276. } finally {
  29277. _iterator.f();
  29278. }
  29279. }
  29280. !function (e) {
  29281. e.WEB = "web", e.WX_MP = "wx_mp";
  29282. }(Se || (Se = {}));
  29283. var ke = {
  29284. adapter: null,
  29285. runtime: void 0
  29286. },
  29287. Ce = ["anonymousUuidKey"];
  29288. var Te = /*#__PURE__*/function (_e8) {
  29289. (0, _inherits2.default)(Te, _e8);
  29290. var _super2 = _createSuper(Te);
  29291. function Te() {
  29292. var _this6;
  29293. (0, _classCallCheck2.default)(this, Te);
  29294. _this6 = _super2.call(this), ke.adapter.root.tcbObject || (ke.adapter.root.tcbObject = {});
  29295. return _this6;
  29296. }
  29297. (0, _createClass2.default)(Te, [{
  29298. key: "setItem",
  29299. value: function setItem(e, t) {
  29300. ke.adapter.root.tcbObject[e] = t;
  29301. }
  29302. }, {
  29303. key: "getItem",
  29304. value: function getItem(e) {
  29305. return ke.adapter.root.tcbObject[e];
  29306. }
  29307. }, {
  29308. key: "removeItem",
  29309. value: function removeItem(e) {
  29310. delete ke.adapter.root.tcbObject[e];
  29311. }
  29312. }, {
  29313. key: "clear",
  29314. value: function clear() {
  29315. delete ke.adapter.root.tcbObject;
  29316. }
  29317. }]);
  29318. return Te;
  29319. }(_e);
  29320. function Pe(e, t) {
  29321. switch (e) {
  29322. case "local":
  29323. return t.localStorage || new Te();
  29324. case "none":
  29325. return new Te();
  29326. default:
  29327. return t.sessionStorage || new Te();
  29328. }
  29329. }
  29330. var Ae = /*#__PURE__*/function () {
  29331. function Ae(e) {
  29332. (0, _classCallCheck2.default)(this, Ae);
  29333. if (!this._storage) {
  29334. this._persistence = ke.adapter.primaryStorage || e.persistence, this._storage = Pe(this._persistence, ke.adapter);
  29335. var _t5 = "access_token_".concat(e.env),
  29336. _n5 = "access_token_expire_".concat(e.env),
  29337. _s5 = "refresh_token_".concat(e.env),
  29338. _r = "anonymous_uuid_".concat(e.env),
  29339. _i = "login_type_".concat(e.env),
  29340. _o = "user_info_".concat(e.env);
  29341. this.keys = {
  29342. accessTokenKey: _t5,
  29343. accessTokenExpireKey: _n5,
  29344. refreshTokenKey: _s5,
  29345. anonymousUuidKey: _r,
  29346. loginTypeKey: _i,
  29347. userInfoKey: _o
  29348. };
  29349. }
  29350. }
  29351. (0, _createClass2.default)(Ae, [{
  29352. key: "updatePersistence",
  29353. value: function updatePersistence(e) {
  29354. if (e === this._persistence) return;
  29355. var t = "local" === this._persistence;
  29356. this._persistence = e;
  29357. var n = Pe(e, ke.adapter);
  29358. for (var _e9 in this.keys) {
  29359. var _s6 = this.keys[_e9];
  29360. if (t && Ce.includes(_e9)) continue;
  29361. var _r2 = this._storage.getItem(_s6);
  29362. ve(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  29363. }
  29364. this._storage = n;
  29365. }
  29366. }, {
  29367. key: "setStore",
  29368. value: function setStore(e, t, n) {
  29369. if (!this._storage) return;
  29370. var s = {
  29371. version: n || "localCachev1",
  29372. content: t
  29373. },
  29374. r = JSON.stringify(s);
  29375. try {
  29376. this._storage.setItem(e, r);
  29377. } catch (e) {
  29378. throw e;
  29379. }
  29380. }
  29381. }, {
  29382. key: "getStore",
  29383. value: function getStore(e, t) {
  29384. try {
  29385. if (!this._storage) return;
  29386. } catch (e) {
  29387. return "";
  29388. }
  29389. t = t || "localCachev1";
  29390. var n = this._storage.getItem(e);
  29391. if (!n) return "";
  29392. if (n.indexOf(t) >= 0) {
  29393. return JSON.parse(n).content;
  29394. }
  29395. return "";
  29396. }
  29397. }, {
  29398. key: "removeStore",
  29399. value: function removeStore(e) {
  29400. this._storage.removeItem(e);
  29401. }
  29402. }]);
  29403. return Ae;
  29404. }();
  29405. var Ee = {},
  29406. Oe = {};
  29407. function xe(e) {
  29408. return Ee[e];
  29409. }
  29410. var Re = /*#__PURE__*/(0, _createClass2.default)(function Re(e, t) {
  29411. (0, _classCallCheck2.default)(this, Re);
  29412. this.data = t || null, this.name = e;
  29413. });
  29414. var Ue = /*#__PURE__*/function (_Re) {
  29415. (0, _inherits2.default)(Ue, _Re);
  29416. var _super3 = _createSuper(Ue);
  29417. function Ue(e, t) {
  29418. var _this7;
  29419. (0, _classCallCheck2.default)(this, Ue);
  29420. _this7 = _super3.call(this, "error", {
  29421. error: e,
  29422. data: t
  29423. }), _this7.error = e;
  29424. return _this7;
  29425. }
  29426. return (0, _createClass2.default)(Ue);
  29427. }(Re);
  29428. var Le = new ( /*#__PURE__*/function () {
  29429. function _class() {
  29430. (0, _classCallCheck2.default)(this, _class);
  29431. this._listeners = {};
  29432. }
  29433. (0, _createClass2.default)(_class, [{
  29434. key: "on",
  29435. value: function on(e, t) {
  29436. return function (e, t, n) {
  29437. n[e] = n[e] || [], n[e].push(t);
  29438. }(e, t, this._listeners), this;
  29439. }
  29440. }, {
  29441. key: "off",
  29442. value: function off(e, t) {
  29443. return function (e, t, n) {
  29444. if (n && n[e]) {
  29445. var _s7 = n[e].indexOf(t);
  29446. -1 !== _s7 && n[e].splice(_s7, 1);
  29447. }
  29448. }(e, t, this._listeners), this;
  29449. }
  29450. }, {
  29451. key: "fire",
  29452. value: function fire(e, t) {
  29453. if (e instanceof Ue) return console.error(e.error), this;
  29454. var n = "string" == typeof e ? new Re(e, t || {}) : e;
  29455. var s = n.name;
  29456. if (this._listens(s)) {
  29457. n.target = this;
  29458. var _e10 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  29459. var _iterator2 = _createForOfIteratorHelper(_e10),
  29460. _step2;
  29461. try {
  29462. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  29463. var _t6 = _step2.value;
  29464. _t6.call(this, n);
  29465. }
  29466. } catch (err) {
  29467. _iterator2.e(err);
  29468. } finally {
  29469. _iterator2.f();
  29470. }
  29471. }
  29472. return this;
  29473. }
  29474. }, {
  29475. key: "_listens",
  29476. value: function _listens(e) {
  29477. return this._listeners[e] && this._listeners[e].length > 0;
  29478. }
  29479. }]);
  29480. return _class;
  29481. }())();
  29482. function Ne(e, t) {
  29483. Le.on(e, t);
  29484. }
  29485. function De(e) {
  29486. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  29487. Le.fire(e, t);
  29488. }
  29489. function Fe(e, t) {
  29490. Le.off(e, t);
  29491. }
  29492. var qe = "loginStateChanged",
  29493. Me = "loginStateExpire",
  29494. Ke = "loginTypeChanged",
  29495. je = "anonymousConverted",
  29496. Be = "refreshAccessToken";
  29497. var $e;
  29498. !function (e) {
  29499. 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";
  29500. }($e || ($e = {}));
  29501. var We = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  29502. ze = {
  29503. "X-SDK-Version": "1.3.5"
  29504. };
  29505. function Je(e, t, n) {
  29506. var s = e[t];
  29507. e[t] = function (t) {
  29508. var r = {},
  29509. i = {};
  29510. n.forEach(function (n) {
  29511. var _n$call = n.call(e, t),
  29512. s = _n$call.data,
  29513. o = _n$call.headers;
  29514. Object.assign(r, s), Object.assign(i, o);
  29515. });
  29516. var o = t.data;
  29517. return o && function () {
  29518. var e;
  29519. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e11 in r) {
  29520. o.append(_e11, r[_e11]);
  29521. }
  29522. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  29523. };
  29524. }
  29525. function He() {
  29526. var e = Math.random().toString(16).slice(2);
  29527. return {
  29528. data: {
  29529. seqId: e
  29530. },
  29531. headers: _objectSpread(_objectSpread({}, ze), {}, {
  29532. "x-seqid": e
  29533. })
  29534. };
  29535. }
  29536. var Ge = /*#__PURE__*/function () {
  29537. function Ge() {
  29538. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  29539. (0, _classCallCheck2.default)(this, Ge);
  29540. var t;
  29541. this.config = e, this._reqClass = new ke.adapter.reqClass({
  29542. timeout: this.config.timeout,
  29543. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  29544. restrictedMethods: ["post"]
  29545. }), this._cache = xe(this.config.env), this._localCache = (t = this.config.env, Oe[t]), Je(this._reqClass, "post", [He]), Je(this._reqClass, "upload", [He]), Je(this._reqClass, "download", [He]);
  29546. }
  29547. (0, _createClass2.default)(Ge, [{
  29548. key: "post",
  29549. value: function () {
  29550. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  29551. return _regenerator.default.wrap(function _callee4$(_context4) {
  29552. while (1) {
  29553. switch (_context4.prev = _context4.next) {
  29554. case 0:
  29555. _context4.next = 2;
  29556. return this._reqClass.post(e);
  29557. case 2:
  29558. return _context4.abrupt("return", _context4.sent);
  29559. case 3:
  29560. case "end":
  29561. return _context4.stop();
  29562. }
  29563. }
  29564. }, _callee4, this);
  29565. }));
  29566. function post(_x2) {
  29567. return _post.apply(this, arguments);
  29568. }
  29569. return post;
  29570. }()
  29571. }, {
  29572. key: "upload",
  29573. value: function () {
  29574. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  29575. return _regenerator.default.wrap(function _callee5$(_context5) {
  29576. while (1) {
  29577. switch (_context5.prev = _context5.next) {
  29578. case 0:
  29579. _context5.next = 2;
  29580. return this._reqClass.upload(e);
  29581. case 2:
  29582. return _context5.abrupt("return", _context5.sent);
  29583. case 3:
  29584. case "end":
  29585. return _context5.stop();
  29586. }
  29587. }
  29588. }, _callee5, this);
  29589. }));
  29590. function upload(_x3) {
  29591. return _upload.apply(this, arguments);
  29592. }
  29593. return upload;
  29594. }()
  29595. }, {
  29596. key: "download",
  29597. value: function () {
  29598. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  29599. return _regenerator.default.wrap(function _callee6$(_context6) {
  29600. while (1) {
  29601. switch (_context6.prev = _context6.next) {
  29602. case 0:
  29603. _context6.next = 2;
  29604. return this._reqClass.download(e);
  29605. case 2:
  29606. return _context6.abrupt("return", _context6.sent);
  29607. case 3:
  29608. case "end":
  29609. return _context6.stop();
  29610. }
  29611. }
  29612. }, _callee6, this);
  29613. }));
  29614. function download(_x4) {
  29615. return _download.apply(this, arguments);
  29616. }
  29617. return download;
  29618. }()
  29619. }, {
  29620. key: "refreshAccessToken",
  29621. value: function () {
  29622. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  29623. var e, t;
  29624. return _regenerator.default.wrap(function _callee7$(_context7) {
  29625. while (1) {
  29626. switch (_context7.prev = _context7.next) {
  29627. case 0:
  29628. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  29629. _context7.prev = 1;
  29630. _context7.next = 4;
  29631. return this._refreshAccessTokenPromise;
  29632. case 4:
  29633. e = _context7.sent;
  29634. _context7.next = 10;
  29635. break;
  29636. case 7:
  29637. _context7.prev = 7;
  29638. _context7.t0 = _context7["catch"](1);
  29639. t = _context7.t0;
  29640. case 10:
  29641. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  29642. _context7.next = 12;
  29643. break;
  29644. }
  29645. throw t;
  29646. case 12:
  29647. return _context7.abrupt("return", e);
  29648. case 13:
  29649. case "end":
  29650. return _context7.stop();
  29651. }
  29652. }
  29653. }, _callee7, this, [[1, 7]]);
  29654. }));
  29655. function refreshAccessToken() {
  29656. return _refreshAccessToken2.apply(this, arguments);
  29657. }
  29658. return refreshAccessToken;
  29659. }()
  29660. }, {
  29661. key: "_refreshAccessToken",
  29662. value: function () {
  29663. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  29664. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e12, _e13, _t7, _s8;
  29665. return _regenerator.default.wrap(function _callee8$(_context8) {
  29666. while (1) {
  29667. switch (_context8.prev = _context8.next) {
  29668. case 0:
  29669. _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;
  29670. this._cache.removeStore(e), this._cache.removeStore(t);
  29671. i = this._cache.getStore(n);
  29672. if (i) {
  29673. _context8.next = 5;
  29674. break;
  29675. }
  29676. throw new ne({
  29677. message: "未登录CloudBase"
  29678. });
  29679. case 5:
  29680. o = {
  29681. refresh_token: i
  29682. };
  29683. _context8.next = 8;
  29684. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  29685. case 8:
  29686. a = _context8.sent;
  29687. if (!a.data.code) {
  29688. _context8.next = 21;
  29689. break;
  29690. }
  29691. _e12 = a.data.code;
  29692. if (!("SIGN_PARAM_INVALID" === _e12 || "REFRESH_TOKEN_EXPIRED" === _e12 || "INVALID_REFRESH_TOKEN" === _e12)) {
  29693. _context8.next = 20;
  29694. break;
  29695. }
  29696. if (!(this._cache.getStore(s) === $e.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e12)) {
  29697. _context8.next = 19;
  29698. break;
  29699. }
  29700. _e13 = this._cache.getStore(r);
  29701. _t7 = this._cache.getStore(n);
  29702. _context8.next = 17;
  29703. return this.send("auth.signInAnonymously", {
  29704. anonymous_uuid: _e13,
  29705. refresh_token: _t7
  29706. });
  29707. case 17:
  29708. _s8 = _context8.sent;
  29709. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  29710. case 19:
  29711. De(Me), this._cache.removeStore(n);
  29712. case 20:
  29713. throw new ne({
  29714. code: a.data.code,
  29715. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  29716. });
  29717. case 21:
  29718. if (!a.data.access_token) {
  29719. _context8.next = 23;
  29720. break;
  29721. }
  29722. return _context8.abrupt("return", (De(Be), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  29723. accessToken: a.data.access_token,
  29724. accessTokenExpire: a.data.access_token_expire
  29725. }));
  29726. case 23:
  29727. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  29728. case 24:
  29729. case "end":
  29730. return _context8.stop();
  29731. }
  29732. }
  29733. }, _callee8, this);
  29734. }));
  29735. function _refreshAccessToken() {
  29736. return _refreshAccessToken3.apply(this, arguments);
  29737. }
  29738. return _refreshAccessToken;
  29739. }()
  29740. }, {
  29741. key: "getAccessToken",
  29742. value: function () {
  29743. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  29744. var _this$_cache$keys2, e, t, n, s, r, i;
  29745. return _regenerator.default.wrap(function _callee9$(_context9) {
  29746. while (1) {
  29747. switch (_context9.prev = _context9.next) {
  29748. case 0:
  29749. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  29750. if (this._cache.getStore(n)) {
  29751. _context9.next = 3;
  29752. break;
  29753. }
  29754. throw new ne({
  29755. message: "refresh token不存在,登录状态异常"
  29756. });
  29757. case 3:
  29758. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  29759. _context9.t0 = this._shouldRefreshAccessTokenHook;
  29760. if (!_context9.t0) {
  29761. _context9.next = 9;
  29762. break;
  29763. }
  29764. _context9.next = 8;
  29765. return this._shouldRefreshAccessTokenHook(s, r);
  29766. case 8:
  29767. _context9.t0 = !_context9.sent;
  29768. case 9:
  29769. _context9.t1 = _context9.t0;
  29770. if (!_context9.t1) {
  29771. _context9.next = 12;
  29772. break;
  29773. }
  29774. i = !1;
  29775. case 12:
  29776. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  29777. accessToken: s,
  29778. accessTokenExpire: r
  29779. });
  29780. case 13:
  29781. case "end":
  29782. return _context9.stop();
  29783. }
  29784. }
  29785. }, _callee9, this);
  29786. }));
  29787. function getAccessToken() {
  29788. return _getAccessToken.apply(this, arguments);
  29789. }
  29790. return getAccessToken;
  29791. }()
  29792. }, {
  29793. key: "request",
  29794. value: function () {
  29795. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  29796. var s, r, i, _e14, o, _e15, _e16, a, c, u, h, l, d, p, f, g;
  29797. return _regenerator.default.wrap(function _callee10$(_context10) {
  29798. while (1) {
  29799. switch (_context10.prev = _context10.next) {
  29800. case 0:
  29801. s = "x-tcb-trace_".concat(this.config.env);
  29802. r = "application/x-www-form-urlencoded";
  29803. i = _objectSpread({
  29804. action: e,
  29805. env: this.config.env,
  29806. dataVersion: "2019-08-16"
  29807. }, t);
  29808. if (!(-1 === We.indexOf(e))) {
  29809. _context10.next = 10;
  29810. break;
  29811. }
  29812. _e14 = this._cache.keys.refreshTokenKey;
  29813. _context10.t0 = this._cache.getStore(_e14);
  29814. if (!_context10.t0) {
  29815. _context10.next = 10;
  29816. break;
  29817. }
  29818. _context10.next = 9;
  29819. return this.getAccessToken();
  29820. case 9:
  29821. i.access_token = _context10.sent.accessToken;
  29822. case 10:
  29823. if ("storage.uploadFile" === e) {
  29824. o = new FormData();
  29825. for (_e15 in o) {
  29826. o.hasOwnProperty(_e15) && void 0 !== o[_e15] && o.append(_e15, i[_e15]);
  29827. }
  29828. r = "multipart/form-data";
  29829. } else {
  29830. r = "application/json", o = {};
  29831. for (_e16 in i) {
  29832. void 0 !== i[_e16] && (o[_e16] = i[_e16]);
  29833. }
  29834. }
  29835. a = {
  29836. headers: {
  29837. "content-type": r
  29838. }
  29839. };
  29840. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  29841. c = this._localCache.getStore(s);
  29842. c && (a.headers["X-TCB-Trace"] = c);
  29843. u = t.parse, h = t.inQuery, l = t.search;
  29844. d = {
  29845. env: this.config.env
  29846. };
  29847. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  29848. p = function (e, t) {
  29849. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  29850. var s = /\?/.test(t);
  29851. var r = "";
  29852. for (var _e17 in n) {
  29853. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e17, "=").concat(encodeURIComponent(n[_e17]));
  29854. }
  29855. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  29856. }(me, "//tcb-api.tencentcloudapi.com/web", d);
  29857. l && (p += l);
  29858. _context10.next = 22;
  29859. return this.post(_objectSpread({
  29860. url: p,
  29861. data: o
  29862. }, a));
  29863. case 22:
  29864. f = _context10.sent;
  29865. g = f.header && f.header["x-tcb-trace"];
  29866. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  29867. _context10.next = 26;
  29868. break;
  29869. }
  29870. throw new ne({
  29871. code: "NETWORK_ERROR",
  29872. message: "network request error"
  29873. });
  29874. case 26:
  29875. return _context10.abrupt("return", f);
  29876. case 27:
  29877. case "end":
  29878. return _context10.stop();
  29879. }
  29880. }
  29881. }, _callee10, this);
  29882. }));
  29883. function request(_x5, _x6, _x7) {
  29884. return _request.apply(this, arguments);
  29885. }
  29886. return request;
  29887. }()
  29888. }, {
  29889. key: "send",
  29890. value: function () {
  29891. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  29892. var t,
  29893. n,
  29894. _n6,
  29895. _args11 = arguments;
  29896. return _regenerator.default.wrap(function _callee11$(_context11) {
  29897. while (1) {
  29898. switch (_context11.prev = _context11.next) {
  29899. case 0:
  29900. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  29901. _context11.next = 3;
  29902. return this.request(e, t, {
  29903. onUploadProgress: t.onUploadProgress
  29904. });
  29905. case 3:
  29906. n = _context11.sent;
  29907. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === We.indexOf(e))) {
  29908. _context11.next = 13;
  29909. break;
  29910. }
  29911. _context11.next = 7;
  29912. return this.refreshAccessToken();
  29913. case 7:
  29914. _context11.next = 9;
  29915. return this.request(e, t, {
  29916. onUploadProgress: t.onUploadProgress
  29917. });
  29918. case 9:
  29919. _n6 = _context11.sent;
  29920. if (!_n6.data.code) {
  29921. _context11.next = 12;
  29922. break;
  29923. }
  29924. throw new ne({
  29925. code: _n6.data.code,
  29926. message: _n6.data.message
  29927. });
  29928. case 12:
  29929. return _context11.abrupt("return", _n6.data);
  29930. case 13:
  29931. if (!n.data.code) {
  29932. _context11.next = 15;
  29933. break;
  29934. }
  29935. throw new ne({
  29936. code: n.data.code,
  29937. message: n.data.message
  29938. });
  29939. case 15:
  29940. return _context11.abrupt("return", n.data);
  29941. case 16:
  29942. case "end":
  29943. return _context11.stop();
  29944. }
  29945. }
  29946. }, _callee11, this);
  29947. }));
  29948. function send(_x8) {
  29949. return _send.apply(this, arguments);
  29950. }
  29951. return send;
  29952. }()
  29953. }, {
  29954. key: "setRefreshToken",
  29955. value: function setRefreshToken(e) {
  29956. var _this$_cache$keys3 = this._cache.keys,
  29957. t = _this$_cache$keys3.accessTokenKey,
  29958. n = _this$_cache$keys3.accessTokenExpireKey,
  29959. s = _this$_cache$keys3.refreshTokenKey;
  29960. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  29961. }
  29962. }]);
  29963. return Ge;
  29964. }();
  29965. var Ve = {};
  29966. function Ye(e) {
  29967. return Ve[e];
  29968. }
  29969. var Qe = /*#__PURE__*/function () {
  29970. function Qe(e) {
  29971. (0, _classCallCheck2.default)(this, Qe);
  29972. this.config = e, this._cache = xe(e.env), this._request = Ye(e.env);
  29973. }
  29974. (0, _createClass2.default)(Qe, [{
  29975. key: "setRefreshToken",
  29976. value: function setRefreshToken(e) {
  29977. var _this$_cache$keys4 = this._cache.keys,
  29978. t = _this$_cache$keys4.accessTokenKey,
  29979. n = _this$_cache$keys4.accessTokenExpireKey,
  29980. s = _this$_cache$keys4.refreshTokenKey;
  29981. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  29982. }
  29983. }, {
  29984. key: "setAccessToken",
  29985. value: function setAccessToken(e, t) {
  29986. var _this$_cache$keys5 = this._cache.keys,
  29987. n = _this$_cache$keys5.accessTokenKey,
  29988. s = _this$_cache$keys5.accessTokenExpireKey;
  29989. this._cache.setStore(n, e), this._cache.setStore(s, t);
  29990. }
  29991. }, {
  29992. key: "refreshUserInfo",
  29993. value: function () {
  29994. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  29995. var _yield$this$_request$, e;
  29996. return _regenerator.default.wrap(function _callee12$(_context12) {
  29997. while (1) {
  29998. switch (_context12.prev = _context12.next) {
  29999. case 0:
  30000. _context12.next = 2;
  30001. return this._request.send("auth.getUserInfo", {});
  30002. case 2:
  30003. _yield$this$_request$ = _context12.sent;
  30004. e = _yield$this$_request$.data;
  30005. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  30006. case 5:
  30007. case "end":
  30008. return _context12.stop();
  30009. }
  30010. }
  30011. }, _callee12, this);
  30012. }));
  30013. function refreshUserInfo() {
  30014. return _refreshUserInfo.apply(this, arguments);
  30015. }
  30016. return refreshUserInfo;
  30017. }()
  30018. }, {
  30019. key: "setLocalUserInfo",
  30020. value: function setLocalUserInfo(e) {
  30021. var t = this._cache.keys.userInfoKey;
  30022. this._cache.setStore(t, e);
  30023. }
  30024. }]);
  30025. return Qe;
  30026. }();
  30027. var Xe = /*#__PURE__*/function () {
  30028. function Xe(e) {
  30029. (0, _classCallCheck2.default)(this, Xe);
  30030. if (!e) throw new ne({
  30031. code: "PARAM_ERROR",
  30032. message: "envId is not defined"
  30033. });
  30034. this._envId = e, this._cache = xe(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  30035. }
  30036. (0, _createClass2.default)(Xe, [{
  30037. key: "linkWithTicket",
  30038. value: function linkWithTicket(e) {
  30039. if ("string" != typeof e) throw new ne({
  30040. code: "PARAM_ERROR",
  30041. message: "ticket must be string"
  30042. });
  30043. return this._request.send("auth.linkWithTicket", {
  30044. ticket: e
  30045. });
  30046. }
  30047. }, {
  30048. key: "linkWithRedirect",
  30049. value: function linkWithRedirect(e) {
  30050. e.signInWithRedirect();
  30051. }
  30052. }, {
  30053. key: "updatePassword",
  30054. value: function updatePassword(e, t) {
  30055. return this._request.send("auth.updatePassword", {
  30056. oldPassword: t,
  30057. newPassword: e
  30058. });
  30059. }
  30060. }, {
  30061. key: "updateEmail",
  30062. value: function updateEmail(e) {
  30063. return this._request.send("auth.updateEmail", {
  30064. newEmail: e
  30065. });
  30066. }
  30067. }, {
  30068. key: "updateUsername",
  30069. value: function updateUsername(e) {
  30070. if ("string" != typeof e) throw new ne({
  30071. code: "PARAM_ERROR",
  30072. message: "username must be a string"
  30073. });
  30074. return this._request.send("auth.updateUsername", {
  30075. username: e
  30076. });
  30077. }
  30078. }, {
  30079. key: "getLinkedUidList",
  30080. value: function () {
  30081. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  30082. var _yield$this$_request$2, e, t, n;
  30083. return _regenerator.default.wrap(function _callee13$(_context13) {
  30084. while (1) {
  30085. switch (_context13.prev = _context13.next) {
  30086. case 0:
  30087. _context13.next = 2;
  30088. return this._request.send("auth.getLinkedUidList", {});
  30089. case 2:
  30090. _yield$this$_request$2 = _context13.sent;
  30091. e = _yield$this$_request$2.data;
  30092. t = !1;
  30093. n = e.users;
  30094. return _context13.abrupt("return", (n.forEach(function (e) {
  30095. e.wxOpenId && e.wxPublicId && (t = !0);
  30096. }), {
  30097. users: n,
  30098. hasPrimaryUid: t
  30099. }));
  30100. case 7:
  30101. case "end":
  30102. return _context13.stop();
  30103. }
  30104. }
  30105. }, _callee13, this);
  30106. }));
  30107. function getLinkedUidList() {
  30108. return _getLinkedUidList.apply(this, arguments);
  30109. }
  30110. return getLinkedUidList;
  30111. }()
  30112. }, {
  30113. key: "setPrimaryUid",
  30114. value: function setPrimaryUid(e) {
  30115. return this._request.send("auth.setPrimaryUid", {
  30116. uid: e
  30117. });
  30118. }
  30119. }, {
  30120. key: "unlink",
  30121. value: function unlink(e) {
  30122. return this._request.send("auth.unlink", {
  30123. platform: e
  30124. });
  30125. }
  30126. }, {
  30127. key: "update",
  30128. value: function () {
  30129. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  30130. var t, n, s, r, i, o, _yield$this$_request$3, a;
  30131. return _regenerator.default.wrap(function _callee14$(_context14) {
  30132. while (1) {
  30133. switch (_context14.prev = _context14.next) {
  30134. case 0:
  30135. t = e.nickName;
  30136. n = e.gender;
  30137. s = e.avatarUrl;
  30138. r = e.province;
  30139. i = e.country;
  30140. o = e.city;
  30141. _context14.next = 8;
  30142. return this._request.send("auth.updateUserInfo", {
  30143. nickName: t,
  30144. gender: n,
  30145. avatarUrl: s,
  30146. province: r,
  30147. country: i,
  30148. city: o
  30149. });
  30150. case 8:
  30151. _yield$this$_request$3 = _context14.sent;
  30152. a = _yield$this$_request$3.data;
  30153. this.setLocalUserInfo(a);
  30154. case 11:
  30155. case "end":
  30156. return _context14.stop();
  30157. }
  30158. }
  30159. }, _callee14, this);
  30160. }));
  30161. function update(_x9) {
  30162. return _update.apply(this, arguments);
  30163. }
  30164. return update;
  30165. }()
  30166. }, {
  30167. key: "refresh",
  30168. value: function () {
  30169. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  30170. var _yield$this$_request$4, e;
  30171. return _regenerator.default.wrap(function _callee15$(_context15) {
  30172. while (1) {
  30173. switch (_context15.prev = _context15.next) {
  30174. case 0:
  30175. _context15.next = 2;
  30176. return this._request.send("auth.getUserInfo", {});
  30177. case 2:
  30178. _yield$this$_request$4 = _context15.sent;
  30179. e = _yield$this$_request$4.data;
  30180. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  30181. case 5:
  30182. case "end":
  30183. return _context15.stop();
  30184. }
  30185. }
  30186. }, _callee15, this);
  30187. }));
  30188. function refresh() {
  30189. return _refresh.apply(this, arguments);
  30190. }
  30191. return refresh;
  30192. }()
  30193. }, {
  30194. key: "setUserInfo",
  30195. value: function setUserInfo() {
  30196. var _this8 = this;
  30197. var e = this._cache.keys.userInfoKey,
  30198. t = this._cache.getStore(e);
  30199. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  30200. _this8[e] = t[e];
  30201. }), this.location = {
  30202. country: t.country,
  30203. province: t.province,
  30204. city: t.city
  30205. };
  30206. }
  30207. }, {
  30208. key: "setLocalUserInfo",
  30209. value: function setLocalUserInfo(e) {
  30210. var t = this._cache.keys.userInfoKey;
  30211. this._cache.setStore(t, e), this.setUserInfo();
  30212. }
  30213. }]);
  30214. return Xe;
  30215. }();
  30216. var Ze = /*#__PURE__*/function () {
  30217. function Ze(e) {
  30218. (0, _classCallCheck2.default)(this, Ze);
  30219. if (!e) throw new ne({
  30220. code: "PARAM_ERROR",
  30221. message: "envId is not defined"
  30222. });
  30223. this._cache = xe(e);
  30224. var _this$_cache$keys6 = this._cache.keys,
  30225. t = _this$_cache$keys6.refreshTokenKey,
  30226. n = _this$_cache$keys6.accessTokenKey,
  30227. s = _this$_cache$keys6.accessTokenExpireKey,
  30228. r = this._cache.getStore(t),
  30229. i = this._cache.getStore(n),
  30230. o = this._cache.getStore(s);
  30231. this.credential = {
  30232. refreshToken: r,
  30233. accessToken: i,
  30234. accessTokenExpire: o
  30235. }, this.user = new Xe(e);
  30236. }
  30237. (0, _createClass2.default)(Ze, [{
  30238. key: "isAnonymousAuth",
  30239. get: function get() {
  30240. return this.loginType === $e.ANONYMOUS;
  30241. }
  30242. }, {
  30243. key: "isCustomAuth",
  30244. get: function get() {
  30245. return this.loginType === $e.CUSTOM;
  30246. }
  30247. }, {
  30248. key: "isWeixinAuth",
  30249. get: function get() {
  30250. return this.loginType === $e.WECHAT || this.loginType === $e.WECHAT_OPEN || this.loginType === $e.WECHAT_PUBLIC;
  30251. }
  30252. }, {
  30253. key: "loginType",
  30254. get: function get() {
  30255. return this._cache.getStore(this._cache.keys.loginTypeKey);
  30256. }
  30257. }]);
  30258. return Ze;
  30259. }();
  30260. var et = /*#__PURE__*/function (_Qe) {
  30261. (0, _inherits2.default)(et, _Qe);
  30262. var _super4 = _createSuper(et);
  30263. function et() {
  30264. (0, _classCallCheck2.default)(this, et);
  30265. return _super4.apply(this, arguments);
  30266. }
  30267. (0, _createClass2.default)(et, [{
  30268. key: "signIn",
  30269. value: function () {
  30270. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  30271. var _this$_cache$keys7, e, t, n, s, r, _e18;
  30272. return _regenerator.default.wrap(function _callee16$(_context16) {
  30273. while (1) {
  30274. switch (_context16.prev = _context16.next) {
  30275. case 0:
  30276. this._cache.updatePersistence("local");
  30277. _this$_cache$keys7 = this._cache.keys;
  30278. e = _this$_cache$keys7.anonymousUuidKey;
  30279. t = _this$_cache$keys7.refreshTokenKey;
  30280. n = this._cache.getStore(e) || void 0;
  30281. s = this._cache.getStore(t) || void 0;
  30282. _context16.next = 8;
  30283. return this._request.send("auth.signInAnonymously", {
  30284. anonymous_uuid: n,
  30285. refresh_token: s
  30286. });
  30287. case 8:
  30288. r = _context16.sent;
  30289. if (!(r.uuid && r.refresh_token)) {
  30290. _context16.next = 20;
  30291. break;
  30292. }
  30293. this._setAnonymousUUID(r.uuid);
  30294. this.setRefreshToken(r.refresh_token);
  30295. _context16.next = 14;
  30296. return this._request.refreshAccessToken();
  30297. case 14:
  30298. De(qe);
  30299. De(Ke, {
  30300. env: this.config.env,
  30301. loginType: $e.ANONYMOUS,
  30302. persistence: "local"
  30303. });
  30304. _e18 = new Ze(this.config.env);
  30305. _context16.next = 19;
  30306. return _e18.user.refresh();
  30307. case 19:
  30308. return _context16.abrupt("return", _e18);
  30309. case 20:
  30310. throw new ne({
  30311. message: "匿名登录失败"
  30312. });
  30313. case 21:
  30314. case "end":
  30315. return _context16.stop();
  30316. }
  30317. }
  30318. }, _callee16, this);
  30319. }));
  30320. function signIn() {
  30321. return _signIn.apply(this, arguments);
  30322. }
  30323. return signIn;
  30324. }()
  30325. }, {
  30326. key: "linkAndRetrieveDataWithTicket",
  30327. value: function () {
  30328. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  30329. var _this$_cache$keys8, t, n, s, r, i;
  30330. return _regenerator.default.wrap(function _callee17$(_context17) {
  30331. while (1) {
  30332. switch (_context17.prev = _context17.next) {
  30333. case 0:
  30334. _this$_cache$keys8 = this._cache.keys;
  30335. t = _this$_cache$keys8.anonymousUuidKey;
  30336. n = _this$_cache$keys8.refreshTokenKey;
  30337. s = this._cache.getStore(t);
  30338. r = this._cache.getStore(n);
  30339. _context17.next = 7;
  30340. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  30341. anonymous_uuid: s,
  30342. refresh_token: r,
  30343. ticket: e
  30344. });
  30345. case 7:
  30346. i = _context17.sent;
  30347. if (!i.refresh_token) {
  30348. _context17.next = 16;
  30349. break;
  30350. }
  30351. this._clearAnonymousUUID();
  30352. this.setRefreshToken(i.refresh_token);
  30353. _context17.next = 13;
  30354. return this._request.refreshAccessToken();
  30355. case 13:
  30356. De(je, {
  30357. env: this.config.env
  30358. });
  30359. De(Ke, {
  30360. loginType: $e.CUSTOM,
  30361. persistence: "local"
  30362. });
  30363. return _context17.abrupt("return", {
  30364. credential: {
  30365. refreshToken: i.refresh_token
  30366. }
  30367. });
  30368. case 16:
  30369. throw new ne({
  30370. message: "匿名转化失败"
  30371. });
  30372. case 17:
  30373. case "end":
  30374. return _context17.stop();
  30375. }
  30376. }
  30377. }, _callee17, this);
  30378. }));
  30379. function linkAndRetrieveDataWithTicket(_x10) {
  30380. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  30381. }
  30382. return linkAndRetrieveDataWithTicket;
  30383. }()
  30384. }, {
  30385. key: "_setAnonymousUUID",
  30386. value: function _setAnonymousUUID(e) {
  30387. var _this$_cache$keys9 = this._cache.keys,
  30388. t = _this$_cache$keys9.anonymousUuidKey,
  30389. n = _this$_cache$keys9.loginTypeKey;
  30390. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, $e.ANONYMOUS);
  30391. }
  30392. }, {
  30393. key: "_clearAnonymousUUID",
  30394. value: function _clearAnonymousUUID() {
  30395. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  30396. }
  30397. }]);
  30398. return et;
  30399. }(Qe);
  30400. var tt = /*#__PURE__*/function (_Qe2) {
  30401. (0, _inherits2.default)(tt, _Qe2);
  30402. var _super5 = _createSuper(tt);
  30403. function tt() {
  30404. (0, _classCallCheck2.default)(this, tt);
  30405. return _super5.apply(this, arguments);
  30406. }
  30407. (0, _createClass2.default)(tt, [{
  30408. key: "signIn",
  30409. value: function () {
  30410. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  30411. var t, n;
  30412. return _regenerator.default.wrap(function _callee18$(_context18) {
  30413. while (1) {
  30414. switch (_context18.prev = _context18.next) {
  30415. case 0:
  30416. if (!("string" != typeof e)) {
  30417. _context18.next = 2;
  30418. break;
  30419. }
  30420. throw new ne({
  30421. code: "PARAM_ERROR",
  30422. message: "ticket must be a string"
  30423. });
  30424. case 2:
  30425. t = this._cache.keys.refreshTokenKey;
  30426. _context18.next = 5;
  30427. return this._request.send("auth.signInWithTicket", {
  30428. ticket: e,
  30429. refresh_token: this._cache.getStore(t) || ""
  30430. });
  30431. case 5:
  30432. n = _context18.sent;
  30433. if (!n.refresh_token) {
  30434. _context18.next = 15;
  30435. break;
  30436. }
  30437. this.setRefreshToken(n.refresh_token);
  30438. _context18.next = 10;
  30439. return this._request.refreshAccessToken();
  30440. case 10:
  30441. De(qe);
  30442. De(Ke, {
  30443. env: this.config.env,
  30444. loginType: $e.CUSTOM,
  30445. persistence: this.config.persistence
  30446. });
  30447. _context18.next = 14;
  30448. return this.refreshUserInfo();
  30449. case 14:
  30450. return _context18.abrupt("return", new Ze(this.config.env));
  30451. case 15:
  30452. throw new ne({
  30453. message: "自定义登录失败"
  30454. });
  30455. case 16:
  30456. case "end":
  30457. return _context18.stop();
  30458. }
  30459. }
  30460. }, _callee18, this);
  30461. }));
  30462. function signIn(_x11) {
  30463. return _signIn2.apply(this, arguments);
  30464. }
  30465. return signIn;
  30466. }()
  30467. }]);
  30468. return tt;
  30469. }(Qe);
  30470. var nt = /*#__PURE__*/function (_Qe3) {
  30471. (0, _inherits2.default)(nt, _Qe3);
  30472. var _super6 = _createSuper(nt);
  30473. function nt() {
  30474. (0, _classCallCheck2.default)(this, nt);
  30475. return _super6.apply(this, arguments);
  30476. }
  30477. (0, _createClass2.default)(nt, [{
  30478. key: "signIn",
  30479. value: function () {
  30480. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  30481. var n, s, r, i, o;
  30482. return _regenerator.default.wrap(function _callee19$(_context19) {
  30483. while (1) {
  30484. switch (_context19.prev = _context19.next) {
  30485. case 0:
  30486. if (!("string" != typeof e)) {
  30487. _context19.next = 2;
  30488. break;
  30489. }
  30490. throw new ne({
  30491. code: "PARAM_ERROR",
  30492. message: "email must be a string"
  30493. });
  30494. case 2:
  30495. n = this._cache.keys.refreshTokenKey;
  30496. _context19.next = 5;
  30497. return this._request.send("auth.signIn", {
  30498. loginType: "EMAIL",
  30499. email: e,
  30500. password: t,
  30501. refresh_token: this._cache.getStore(n) || ""
  30502. });
  30503. case 5:
  30504. s = _context19.sent;
  30505. r = s.refresh_token;
  30506. i = s.access_token;
  30507. o = s.access_token_expire;
  30508. if (!r) {
  30509. _context19.next = 22;
  30510. break;
  30511. }
  30512. this.setRefreshToken(r);
  30513. if (!(i && o)) {
  30514. _context19.next = 15;
  30515. break;
  30516. }
  30517. this.setAccessToken(i, o);
  30518. _context19.next = 17;
  30519. break;
  30520. case 15:
  30521. _context19.next = 17;
  30522. return this._request.refreshAccessToken();
  30523. case 17:
  30524. _context19.next = 19;
  30525. return this.refreshUserInfo();
  30526. case 19:
  30527. De(qe);
  30528. De(Ke, {
  30529. env: this.config.env,
  30530. loginType: $e.EMAIL,
  30531. persistence: this.config.persistence
  30532. });
  30533. return _context19.abrupt("return", new Ze(this.config.env));
  30534. case 22:
  30535. throw s.code ? new ne({
  30536. code: s.code,
  30537. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  30538. }) : new ne({
  30539. message: "邮箱登录失败"
  30540. });
  30541. case 23:
  30542. case "end":
  30543. return _context19.stop();
  30544. }
  30545. }
  30546. }, _callee19, this);
  30547. }));
  30548. function signIn(_x12, _x13) {
  30549. return _signIn3.apply(this, arguments);
  30550. }
  30551. return signIn;
  30552. }()
  30553. }, {
  30554. key: "activate",
  30555. value: function () {
  30556. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  30557. return _regenerator.default.wrap(function _callee20$(_context20) {
  30558. while (1) {
  30559. switch (_context20.prev = _context20.next) {
  30560. case 0:
  30561. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  30562. token: e
  30563. }));
  30564. case 1:
  30565. case "end":
  30566. return _context20.stop();
  30567. }
  30568. }
  30569. }, _callee20, this);
  30570. }));
  30571. function activate(_x14) {
  30572. return _activate.apply(this, arguments);
  30573. }
  30574. return activate;
  30575. }()
  30576. }, {
  30577. key: "resetPasswordWithToken",
  30578. value: function () {
  30579. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  30580. return _regenerator.default.wrap(function _callee21$(_context21) {
  30581. while (1) {
  30582. switch (_context21.prev = _context21.next) {
  30583. case 0:
  30584. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  30585. token: e,
  30586. newPassword: t
  30587. }));
  30588. case 1:
  30589. case "end":
  30590. return _context21.stop();
  30591. }
  30592. }
  30593. }, _callee21, this);
  30594. }));
  30595. function resetPasswordWithToken(_x15, _x16) {
  30596. return _resetPasswordWithToken.apply(this, arguments);
  30597. }
  30598. return resetPasswordWithToken;
  30599. }()
  30600. }]);
  30601. return nt;
  30602. }(Qe);
  30603. var st = /*#__PURE__*/function (_Qe4) {
  30604. (0, _inherits2.default)(st, _Qe4);
  30605. var _super7 = _createSuper(st);
  30606. function st() {
  30607. (0, _classCallCheck2.default)(this, st);
  30608. return _super7.apply(this, arguments);
  30609. }
  30610. (0, _createClass2.default)(st, [{
  30611. key: "signIn",
  30612. value: function () {
  30613. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  30614. var n, s, r, i, o;
  30615. return _regenerator.default.wrap(function _callee22$(_context22) {
  30616. while (1) {
  30617. switch (_context22.prev = _context22.next) {
  30618. case 0:
  30619. if (!("string" != typeof e)) {
  30620. _context22.next = 2;
  30621. break;
  30622. }
  30623. throw new ne({
  30624. code: "PARAM_ERROR",
  30625. message: "username must be a string"
  30626. });
  30627. case 2:
  30628. "string" != typeof t && (t = "", console.warn("password is empty"));
  30629. n = this._cache.keys.refreshTokenKey;
  30630. _context22.next = 6;
  30631. return this._request.send("auth.signIn", {
  30632. loginType: $e.USERNAME,
  30633. username: e,
  30634. password: t,
  30635. refresh_token: this._cache.getStore(n) || ""
  30636. });
  30637. case 6:
  30638. s = _context22.sent;
  30639. r = s.refresh_token;
  30640. i = s.access_token_expire;
  30641. o = s.access_token;
  30642. if (!r) {
  30643. _context22.next = 23;
  30644. break;
  30645. }
  30646. this.setRefreshToken(r);
  30647. if (!(o && i)) {
  30648. _context22.next = 16;
  30649. break;
  30650. }
  30651. this.setAccessToken(o, i);
  30652. _context22.next = 18;
  30653. break;
  30654. case 16:
  30655. _context22.next = 18;
  30656. return this._request.refreshAccessToken();
  30657. case 18:
  30658. _context22.next = 20;
  30659. return this.refreshUserInfo();
  30660. case 20:
  30661. De(qe);
  30662. De(Ke, {
  30663. env: this.config.env,
  30664. loginType: $e.USERNAME,
  30665. persistence: this.config.persistence
  30666. });
  30667. return _context22.abrupt("return", new Ze(this.config.env));
  30668. case 23:
  30669. throw s.code ? new ne({
  30670. code: s.code,
  30671. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  30672. }) : new ne({
  30673. message: "用户名密码登录失败"
  30674. });
  30675. case 24:
  30676. case "end":
  30677. return _context22.stop();
  30678. }
  30679. }
  30680. }, _callee22, this);
  30681. }));
  30682. function signIn(_x17, _x18) {
  30683. return _signIn4.apply(this, arguments);
  30684. }
  30685. return signIn;
  30686. }()
  30687. }]);
  30688. return st;
  30689. }(Qe);
  30690. var rt = /*#__PURE__*/function () {
  30691. function rt(e) {
  30692. (0, _classCallCheck2.default)(this, rt);
  30693. this.config = e, this._cache = xe(e.env), this._request = Ye(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Ne(Ke, this._onLoginTypeChanged);
  30694. }
  30695. (0, _createClass2.default)(rt, [{
  30696. key: "currentUser",
  30697. get: function get() {
  30698. var e = this.hasLoginState();
  30699. return e && e.user || null;
  30700. }
  30701. }, {
  30702. key: "loginType",
  30703. get: function get() {
  30704. return this._cache.getStore(this._cache.keys.loginTypeKey);
  30705. }
  30706. }, {
  30707. key: "anonymousAuthProvider",
  30708. value: function anonymousAuthProvider() {
  30709. return new et(this.config);
  30710. }
  30711. }, {
  30712. key: "customAuthProvider",
  30713. value: function customAuthProvider() {
  30714. return new tt(this.config);
  30715. }
  30716. }, {
  30717. key: "emailAuthProvider",
  30718. value: function emailAuthProvider() {
  30719. return new nt(this.config);
  30720. }
  30721. }, {
  30722. key: "usernameAuthProvider",
  30723. value: function usernameAuthProvider() {
  30724. return new st(this.config);
  30725. }
  30726. }, {
  30727. key: "signInAnonymously",
  30728. value: function () {
  30729. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  30730. return _regenerator.default.wrap(function _callee23$(_context23) {
  30731. while (1) {
  30732. switch (_context23.prev = _context23.next) {
  30733. case 0:
  30734. return _context23.abrupt("return", new et(this.config).signIn());
  30735. case 1:
  30736. case "end":
  30737. return _context23.stop();
  30738. }
  30739. }
  30740. }, _callee23, this);
  30741. }));
  30742. function signInAnonymously() {
  30743. return _signInAnonymously.apply(this, arguments);
  30744. }
  30745. return signInAnonymously;
  30746. }()
  30747. }, {
  30748. key: "signInWithEmailAndPassword",
  30749. value: function () {
  30750. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  30751. return _regenerator.default.wrap(function _callee24$(_context24) {
  30752. while (1) {
  30753. switch (_context24.prev = _context24.next) {
  30754. case 0:
  30755. return _context24.abrupt("return", new nt(this.config).signIn(e, t));
  30756. case 1:
  30757. case "end":
  30758. return _context24.stop();
  30759. }
  30760. }
  30761. }, _callee24, this);
  30762. }));
  30763. function signInWithEmailAndPassword(_x19, _x20) {
  30764. return _signInWithEmailAndPassword.apply(this, arguments);
  30765. }
  30766. return signInWithEmailAndPassword;
  30767. }()
  30768. }, {
  30769. key: "signInWithUsernameAndPassword",
  30770. value: function signInWithUsernameAndPassword(e, t) {
  30771. return new st(this.config).signIn(e, t);
  30772. }
  30773. }, {
  30774. key: "linkAndRetrieveDataWithTicket",
  30775. value: function () {
  30776. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  30777. return _regenerator.default.wrap(function _callee25$(_context25) {
  30778. while (1) {
  30779. switch (_context25.prev = _context25.next) {
  30780. case 0:
  30781. this._anonymousAuthProvider || (this._anonymousAuthProvider = new et(this.config)), Ne(je, this._onAnonymousConverted);
  30782. _context25.next = 3;
  30783. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  30784. case 3:
  30785. return _context25.abrupt("return", _context25.sent);
  30786. case 4:
  30787. case "end":
  30788. return _context25.stop();
  30789. }
  30790. }
  30791. }, _callee25, this);
  30792. }));
  30793. function linkAndRetrieveDataWithTicket(_x21) {
  30794. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  30795. }
  30796. return linkAndRetrieveDataWithTicket;
  30797. }()
  30798. }, {
  30799. key: "signOut",
  30800. value: function () {
  30801. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  30802. var _this$_cache$keys10, e, t, n, s, r;
  30803. return _regenerator.default.wrap(function _callee26$(_context26) {
  30804. while (1) {
  30805. switch (_context26.prev = _context26.next) {
  30806. case 0:
  30807. if (!(this.loginType === $e.ANONYMOUS)) {
  30808. _context26.next = 2;
  30809. break;
  30810. }
  30811. throw new ne({
  30812. message: "匿名用户不支持登出操作"
  30813. });
  30814. case 2:
  30815. _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);
  30816. if (s) {
  30817. _context26.next = 5;
  30818. break;
  30819. }
  30820. return _context26.abrupt("return");
  30821. case 5:
  30822. _context26.next = 7;
  30823. return this._request.send("auth.logout", {
  30824. refresh_token: s
  30825. });
  30826. case 7:
  30827. r = _context26.sent;
  30828. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), De(qe), De(Ke, {
  30829. env: this.config.env,
  30830. loginType: $e.NULL,
  30831. persistence: this.config.persistence
  30832. }), r));
  30833. case 9:
  30834. case "end":
  30835. return _context26.stop();
  30836. }
  30837. }
  30838. }, _callee26, this);
  30839. }));
  30840. function signOut() {
  30841. return _signOut.apply(this, arguments);
  30842. }
  30843. return signOut;
  30844. }()
  30845. }, {
  30846. key: "signUpWithEmailAndPassword",
  30847. value: function () {
  30848. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  30849. return _regenerator.default.wrap(function _callee27$(_context27) {
  30850. while (1) {
  30851. switch (_context27.prev = _context27.next) {
  30852. case 0:
  30853. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  30854. email: e,
  30855. password: t
  30856. }));
  30857. case 1:
  30858. case "end":
  30859. return _context27.stop();
  30860. }
  30861. }
  30862. }, _callee27, this);
  30863. }));
  30864. function signUpWithEmailAndPassword(_x22, _x23) {
  30865. return _signUpWithEmailAndPassword.apply(this, arguments);
  30866. }
  30867. return signUpWithEmailAndPassword;
  30868. }()
  30869. }, {
  30870. key: "sendPasswordResetEmail",
  30871. value: function () {
  30872. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  30873. return _regenerator.default.wrap(function _callee28$(_context28) {
  30874. while (1) {
  30875. switch (_context28.prev = _context28.next) {
  30876. case 0:
  30877. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  30878. email: e
  30879. }));
  30880. case 1:
  30881. case "end":
  30882. return _context28.stop();
  30883. }
  30884. }
  30885. }, _callee28, this);
  30886. }));
  30887. function sendPasswordResetEmail(_x24) {
  30888. return _sendPasswordResetEmail.apply(this, arguments);
  30889. }
  30890. return sendPasswordResetEmail;
  30891. }()
  30892. }, {
  30893. key: "onLoginStateChanged",
  30894. value: function onLoginStateChanged(e) {
  30895. var _this9 = this;
  30896. Ne(qe, function () {
  30897. var t = _this9.hasLoginState();
  30898. e.call(_this9, t);
  30899. });
  30900. var t = this.hasLoginState();
  30901. e.call(this, t);
  30902. }
  30903. }, {
  30904. key: "onLoginStateExpired",
  30905. value: function onLoginStateExpired(e) {
  30906. Ne(Me, e.bind(this));
  30907. }
  30908. }, {
  30909. key: "onAccessTokenRefreshed",
  30910. value: function onAccessTokenRefreshed(e) {
  30911. Ne(Be, e.bind(this));
  30912. }
  30913. }, {
  30914. key: "onAnonymousConverted",
  30915. value: function onAnonymousConverted(e) {
  30916. Ne(je, e.bind(this));
  30917. }
  30918. }, {
  30919. key: "onLoginTypeChanged",
  30920. value: function onLoginTypeChanged(e) {
  30921. var _this10 = this;
  30922. Ne(Ke, function () {
  30923. var t = _this10.hasLoginState();
  30924. e.call(_this10, t);
  30925. });
  30926. }
  30927. }, {
  30928. key: "getAccessToken",
  30929. value: function () {
  30930. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  30931. return _regenerator.default.wrap(function _callee29$(_context29) {
  30932. while (1) {
  30933. switch (_context29.prev = _context29.next) {
  30934. case 0:
  30935. _context29.next = 2;
  30936. return this._request.getAccessToken();
  30937. case 2:
  30938. _context29.t0 = _context29.sent.accessToken;
  30939. _context29.t1 = this.config.env;
  30940. return _context29.abrupt("return", {
  30941. accessToken: _context29.t0,
  30942. env: _context29.t1
  30943. });
  30944. case 5:
  30945. case "end":
  30946. return _context29.stop();
  30947. }
  30948. }
  30949. }, _callee29, this);
  30950. }));
  30951. function getAccessToken() {
  30952. return _getAccessToken2.apply(this, arguments);
  30953. }
  30954. return getAccessToken;
  30955. }()
  30956. }, {
  30957. key: "hasLoginState",
  30958. value: function hasLoginState() {
  30959. var e = this._cache.keys.refreshTokenKey;
  30960. return this._cache.getStore(e) ? new Ze(this.config.env) : null;
  30961. }
  30962. }, {
  30963. key: "isUsernameRegistered",
  30964. value: function () {
  30965. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  30966. var _yield$this$_request$5, t;
  30967. return _regenerator.default.wrap(function _callee30$(_context30) {
  30968. while (1) {
  30969. switch (_context30.prev = _context30.next) {
  30970. case 0:
  30971. if (!("string" != typeof e)) {
  30972. _context30.next = 2;
  30973. break;
  30974. }
  30975. throw new ne({
  30976. code: "PARAM_ERROR",
  30977. message: "username must be a string"
  30978. });
  30979. case 2:
  30980. _context30.next = 4;
  30981. return this._request.send("auth.isUsernameRegistered", {
  30982. username: e
  30983. });
  30984. case 4:
  30985. _yield$this$_request$5 = _context30.sent;
  30986. t = _yield$this$_request$5.data;
  30987. return _context30.abrupt("return", t && t.isRegistered);
  30988. case 7:
  30989. case "end":
  30990. return _context30.stop();
  30991. }
  30992. }
  30993. }, _callee30, this);
  30994. }));
  30995. function isUsernameRegistered(_x25) {
  30996. return _isUsernameRegistered.apply(this, arguments);
  30997. }
  30998. return isUsernameRegistered;
  30999. }()
  31000. }, {
  31001. key: "getLoginState",
  31002. value: function getLoginState() {
  31003. return Promise.resolve(this.hasLoginState());
  31004. }
  31005. }, {
  31006. key: "signInWithTicket",
  31007. value: function () {
  31008. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  31009. return _regenerator.default.wrap(function _callee31$(_context31) {
  31010. while (1) {
  31011. switch (_context31.prev = _context31.next) {
  31012. case 0:
  31013. return _context31.abrupt("return", new tt(this.config).signIn(e));
  31014. case 1:
  31015. case "end":
  31016. return _context31.stop();
  31017. }
  31018. }
  31019. }, _callee31, this);
  31020. }));
  31021. function signInWithTicket(_x26) {
  31022. return _signInWithTicket.apply(this, arguments);
  31023. }
  31024. return signInWithTicket;
  31025. }()
  31026. }, {
  31027. key: "shouldRefreshAccessToken",
  31028. value: function shouldRefreshAccessToken(e) {
  31029. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  31030. }
  31031. }, {
  31032. key: "getUserInfo",
  31033. value: function getUserInfo() {
  31034. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  31035. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  31036. requestId: e.seqId
  31037. });
  31038. });
  31039. }
  31040. }, {
  31041. key: "getAuthHeader",
  31042. value: function getAuthHeader() {
  31043. var _this$_cache$keys11 = this._cache.keys,
  31044. e = _this$_cache$keys11.refreshTokenKey,
  31045. t = _this$_cache$keys11.accessTokenKey,
  31046. n = this._cache.getStore(e);
  31047. return {
  31048. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  31049. };
  31050. }
  31051. }, {
  31052. key: "_onAnonymousConverted",
  31053. value: function _onAnonymousConverted(e) {
  31054. var t = e.data.env;
  31055. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  31056. }
  31057. }, {
  31058. key: "_onLoginTypeChanged",
  31059. value: function _onLoginTypeChanged(e) {
  31060. var _e$data = e.data,
  31061. t = _e$data.loginType,
  31062. n = _e$data.persistence,
  31063. s = _e$data.env;
  31064. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  31065. }
  31066. }]);
  31067. return rt;
  31068. }();
  31069. var it = function it(e, t) {
  31070. t = t || we();
  31071. var n = Ye(this.config.env),
  31072. s = e.cloudPath,
  31073. r = e.filePath,
  31074. i = e.onUploadProgress,
  31075. _e$fileType = e.fileType,
  31076. o = _e$fileType === void 0 ? "image" : _e$fileType;
  31077. return n.send("storage.getUploadMetadata", {
  31078. path: s
  31079. }).then(function (e) {
  31080. var _e$data2 = e.data,
  31081. a = _e$data2.url,
  31082. c = _e$data2.authorization,
  31083. u = _e$data2.token,
  31084. h = _e$data2.fileId,
  31085. l = _e$data2.cosFileId,
  31086. d = e.requestId,
  31087. p = {
  31088. key: s,
  31089. signature: c,
  31090. "x-cos-meta-fileid": l,
  31091. success_action_status: "201",
  31092. "x-cos-security-token": u
  31093. };
  31094. n.upload({
  31095. url: a,
  31096. data: p,
  31097. file: r,
  31098. name: s,
  31099. fileType: o,
  31100. onUploadProgress: i
  31101. }).then(function (e) {
  31102. 201 === e.statusCode ? t(null, {
  31103. fileID: h,
  31104. requestId: d
  31105. }) : t(new ne({
  31106. code: "STORAGE_REQUEST_FAIL",
  31107. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  31108. }));
  31109. }).catch(function (e) {
  31110. t(e);
  31111. });
  31112. }).catch(function (e) {
  31113. t(e);
  31114. }), t.promise;
  31115. },
  31116. ot = function ot(e, t) {
  31117. t = t || we();
  31118. var n = Ye(this.config.env),
  31119. s = e.cloudPath;
  31120. return n.send("storage.getUploadMetadata", {
  31121. path: s
  31122. }).then(function (e) {
  31123. t(null, e);
  31124. }).catch(function (e) {
  31125. t(e);
  31126. }), t.promise;
  31127. },
  31128. at = function at(_ref7, t) {
  31129. var e = _ref7.fileList;
  31130. if (t = t || we(), !e || !Array.isArray(e)) return {
  31131. code: "INVALID_PARAM",
  31132. message: "fileList必须是非空的数组"
  31133. };
  31134. var _iterator3 = _createForOfIteratorHelper(e),
  31135. _step3;
  31136. try {
  31137. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  31138. var _t8 = _step3.value;
  31139. if (!_t8 || "string" != typeof _t8) return {
  31140. code: "INVALID_PARAM",
  31141. message: "fileList的元素必须是非空的字符串"
  31142. };
  31143. }
  31144. } catch (err) {
  31145. _iterator3.e(err);
  31146. } finally {
  31147. _iterator3.f();
  31148. }
  31149. var n = {
  31150. fileid_list: e
  31151. };
  31152. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  31153. e.code ? t(null, e) : t(null, {
  31154. fileList: e.data.delete_list,
  31155. requestId: e.requestId
  31156. });
  31157. }).catch(function (e) {
  31158. t(e);
  31159. }), t.promise;
  31160. },
  31161. ct = function ct(_ref8, t) {
  31162. var e = _ref8.fileList;
  31163. t = t || we(), e && Array.isArray(e) || t(null, {
  31164. code: "INVALID_PARAM",
  31165. message: "fileList必须是非空的数组"
  31166. });
  31167. var n = [];
  31168. var _iterator4 = _createForOfIteratorHelper(e),
  31169. _step4;
  31170. try {
  31171. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  31172. var _s9 = _step4.value;
  31173. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  31174. code: "INVALID_PARAM",
  31175. message: "fileList的元素必须是包含fileID和maxAge的对象"
  31176. }), n.push({
  31177. fileid: _s9.fileID,
  31178. max_age: _s9.maxAge
  31179. })) : "string" == typeof _s9 ? n.push({
  31180. fileid: _s9
  31181. }) : t(null, {
  31182. code: "INVALID_PARAM",
  31183. message: "fileList的元素必须是字符串"
  31184. });
  31185. }
  31186. } catch (err) {
  31187. _iterator4.e(err);
  31188. } finally {
  31189. _iterator4.f();
  31190. }
  31191. var s = {
  31192. file_list: n
  31193. };
  31194. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  31195. e.code ? t(null, e) : t(null, {
  31196. fileList: e.data.download_list,
  31197. requestId: e.requestId
  31198. });
  31199. }).catch(function (e) {
  31200. t(e);
  31201. }), t.promise;
  31202. },
  31203. ut = /*#__PURE__*/function () {
  31204. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  31205. var e, n, s, r;
  31206. return _regenerator.default.wrap(function _callee32$(_context32) {
  31207. while (1) {
  31208. switch (_context32.prev = _context32.next) {
  31209. case 0:
  31210. e = _ref9.fileID;
  31211. _context32.next = 3;
  31212. return ct.call(this, {
  31213. fileList: [{
  31214. fileID: e,
  31215. maxAge: 600
  31216. }]
  31217. });
  31218. case 3:
  31219. n = _context32.sent.fileList[0];
  31220. if (!("SUCCESS" !== n.code)) {
  31221. _context32.next = 6;
  31222. break;
  31223. }
  31224. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  31225. e(n);
  31226. }));
  31227. case 6:
  31228. s = Ye(this.config.env);
  31229. r = n.download_url;
  31230. if (!(r = encodeURI(r), !t)) {
  31231. _context32.next = 10;
  31232. break;
  31233. }
  31234. return _context32.abrupt("return", s.download({
  31235. url: r
  31236. }));
  31237. case 10:
  31238. _context32.t0 = t;
  31239. _context32.next = 13;
  31240. return s.download({
  31241. url: r
  31242. });
  31243. case 13:
  31244. _context32.t1 = _context32.sent;
  31245. (0, _context32.t0)(_context32.t1);
  31246. case 15:
  31247. case "end":
  31248. return _context32.stop();
  31249. }
  31250. }
  31251. }, _callee32, this);
  31252. }));
  31253. return function ut(_x27, _x28) {
  31254. return _ref10.apply(this, arguments);
  31255. };
  31256. }(),
  31257. ht = function ht(_ref11, i) {
  31258. var e = _ref11.name,
  31259. t = _ref11.data,
  31260. n = _ref11.query,
  31261. s = _ref11.parse,
  31262. r = _ref11.search;
  31263. var o = i || we();
  31264. var a;
  31265. try {
  31266. a = t ? JSON.stringify(t) : "";
  31267. } catch (e) {
  31268. return Promise.reject(e);
  31269. }
  31270. if (!e) return Promise.reject(new ne({
  31271. code: "PARAM_ERROR",
  31272. message: "函数名不能为空"
  31273. }));
  31274. var c = {
  31275. inQuery: n,
  31276. parse: s,
  31277. search: r,
  31278. function_name: e,
  31279. request_data: a
  31280. };
  31281. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  31282. if (e.code) o(null, e);else {
  31283. var _t9 = e.data.response_data;
  31284. if (s) o(null, {
  31285. result: _t9,
  31286. requestId: e.requestId
  31287. });else try {
  31288. _t9 = JSON.parse(e.data.response_data), o(null, {
  31289. result: _t9,
  31290. requestId: e.requestId
  31291. });
  31292. } catch (e) {
  31293. o(new ne({
  31294. message: "response data must be json"
  31295. }));
  31296. }
  31297. }
  31298. return o.promise;
  31299. }).catch(function (e) {
  31300. o(e);
  31301. }), o.promise;
  31302. },
  31303. lt = {
  31304. timeout: 15e3,
  31305. persistence: "session"
  31306. },
  31307. dt = {};
  31308. var pt = /*#__PURE__*/function () {
  31309. function pt(e) {
  31310. (0, _classCallCheck2.default)(this, pt);
  31311. this.config = e || this.config, this.authObj = void 0;
  31312. }
  31313. (0, _createClass2.default)(pt, [{
  31314. key: "init",
  31315. value: function init(e) {
  31316. switch (ke.adapter || (this.requestClient = new ke.adapter.reqClass({
  31317. timeout: e.timeout || 5e3,
  31318. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  31319. })), this.config = _objectSpread(_objectSpread({}, lt), e), !0) {
  31320. case this.config.timeout > 6e5:
  31321. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  31322. break;
  31323. case this.config.timeout < 100:
  31324. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  31325. }
  31326. return new pt(this.config);
  31327. }
  31328. }, {
  31329. key: "auth",
  31330. value: function auth() {
  31331. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31332. e = _ref12.persistence;
  31333. if (this.authObj) return this.authObj;
  31334. var t = e || ke.adapter.primaryStorage || lt.persistence;
  31335. var n;
  31336. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  31337. var t = e.env;
  31338. Ee[t] = new Ae(e), Oe[t] = new Ae(_objectSpread(_objectSpread({}, e), {}, {
  31339. persistence: "local"
  31340. }));
  31341. }(this.config), n = this.config, Ve[n.env] = new Ge(n), this.authObj = new rt(this.config), this.authObj;
  31342. }
  31343. }, {
  31344. key: "on",
  31345. value: function on(e, t) {
  31346. return Ne.apply(this, [e, t]);
  31347. }
  31348. }, {
  31349. key: "off",
  31350. value: function off(e, t) {
  31351. return Fe.apply(this, [e, t]);
  31352. }
  31353. }, {
  31354. key: "callFunction",
  31355. value: function callFunction(e, t) {
  31356. return ht.apply(this, [e, t]);
  31357. }
  31358. }, {
  31359. key: "deleteFile",
  31360. value: function deleteFile(e, t) {
  31361. return at.apply(this, [e, t]);
  31362. }
  31363. }, {
  31364. key: "getTempFileURL",
  31365. value: function getTempFileURL(e, t) {
  31366. return ct.apply(this, [e, t]);
  31367. }
  31368. }, {
  31369. key: "downloadFile",
  31370. value: function downloadFile(e, t) {
  31371. return ut.apply(this, [e, t]);
  31372. }
  31373. }, {
  31374. key: "uploadFile",
  31375. value: function uploadFile(e, t) {
  31376. return it.apply(this, [e, t]);
  31377. }
  31378. }, {
  31379. key: "getUploadMetadata",
  31380. value: function getUploadMetadata(e, t) {
  31381. return ot.apply(this, [e, t]);
  31382. }
  31383. }, {
  31384. key: "registerExtension",
  31385. value: function registerExtension(e) {
  31386. dt[e.name] = e;
  31387. }
  31388. }, {
  31389. key: "invokeExtension",
  31390. value: function () {
  31391. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  31392. var n;
  31393. return _regenerator.default.wrap(function _callee33$(_context33) {
  31394. while (1) {
  31395. switch (_context33.prev = _context33.next) {
  31396. case 0:
  31397. n = dt[e];
  31398. if (n) {
  31399. _context33.next = 3;
  31400. break;
  31401. }
  31402. throw new ne({
  31403. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  31404. });
  31405. case 3:
  31406. _context33.next = 5;
  31407. return n.invoke(t, this);
  31408. case 5:
  31409. return _context33.abrupt("return", _context33.sent);
  31410. case 6:
  31411. case "end":
  31412. return _context33.stop();
  31413. }
  31414. }
  31415. }, _callee33, this);
  31416. }));
  31417. function invokeExtension(_x29, _x30) {
  31418. return _invokeExtension.apply(this, arguments);
  31419. }
  31420. return invokeExtension;
  31421. }()
  31422. }, {
  31423. key: "useAdapters",
  31424. value: function useAdapters(e) {
  31425. var _ref13 = be(e) || {},
  31426. t = _ref13.adapter,
  31427. n = _ref13.runtime;
  31428. t && (ke.adapter = t), n && (ke.runtime = n);
  31429. }
  31430. }]);
  31431. return pt;
  31432. }();
  31433. var ft = new pt();
  31434. function gt(e, t, n) {
  31435. void 0 === n && (n = {});
  31436. var s = /\?/.test(t),
  31437. r = "";
  31438. for (var i in n) {
  31439. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  31440. }
  31441. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  31442. }
  31443. var mt = /*#__PURE__*/function () {
  31444. function mt() {
  31445. (0, _classCallCheck2.default)(this, mt);
  31446. }
  31447. (0, _createClass2.default)(mt, [{
  31448. key: "post",
  31449. value: function post(e) {
  31450. var t = e.url,
  31451. n = e.data,
  31452. s = e.headers;
  31453. return new Promise(function (e, r) {
  31454. se.request({
  31455. url: gt("https:", t),
  31456. data: n,
  31457. method: "POST",
  31458. header: s,
  31459. success: function success(t) {
  31460. e(t);
  31461. },
  31462. fail: function fail(e) {
  31463. r(e);
  31464. }
  31465. });
  31466. });
  31467. }
  31468. }, {
  31469. key: "upload",
  31470. value: function upload(e) {
  31471. return new Promise(function (t, n) {
  31472. var s = e.url,
  31473. r = e.file,
  31474. i = e.data,
  31475. o = e.headers,
  31476. a = e.fileType,
  31477. c = se.uploadFile({
  31478. url: gt("https:", s),
  31479. name: "file",
  31480. formData: Object.assign({}, i),
  31481. filePath: r,
  31482. fileType: a,
  31483. header: o,
  31484. success: function success(e) {
  31485. var n = {
  31486. statusCode: e.statusCode,
  31487. data: e.data || {}
  31488. };
  31489. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  31490. },
  31491. fail: function fail(e) {
  31492. n(new Error(e.errMsg || "uploadFile:fail"));
  31493. }
  31494. });
  31495. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  31496. e.onUploadProgress({
  31497. loaded: t.totalBytesSent,
  31498. total: t.totalBytesExpectedToSend
  31499. });
  31500. });
  31501. });
  31502. }
  31503. }]);
  31504. return mt;
  31505. }();
  31506. var yt = {
  31507. setItem: function setItem(e, t) {
  31508. se.setStorageSync(e, t);
  31509. },
  31510. getItem: function getItem(e) {
  31511. return se.getStorageSync(e);
  31512. },
  31513. removeItem: function removeItem(e) {
  31514. se.removeStorageSync(e);
  31515. },
  31516. clear: function clear() {
  31517. se.clearStorageSync();
  31518. }
  31519. };
  31520. var _t = {
  31521. genAdapter: function genAdapter() {
  31522. return {
  31523. root: {},
  31524. reqClass: mt,
  31525. localStorage: yt,
  31526. primaryStorage: "local"
  31527. };
  31528. },
  31529. isMatch: function isMatch() {
  31530. return !0;
  31531. },
  31532. runtime: "uni_app"
  31533. };
  31534. ft.useAdapters(_t);
  31535. var wt = ft,
  31536. vt = wt.init;
  31537. wt.init = function (e) {
  31538. e.env = e.spaceId;
  31539. var t = vt.call(this, e);
  31540. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  31541. var n = t.auth;
  31542. return t.auth = function (e) {
  31543. var t = n.call(this, e);
  31544. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  31545. var n;
  31546. t[e] = (n = t[e], function (e) {
  31547. e = e || {};
  31548. var _te = te(e),
  31549. t = _te.success,
  31550. s = _te.fail,
  31551. r = _te.complete;
  31552. if (!(t || s || r)) return n.call(this, e);
  31553. n.call(this, e).then(function (e) {
  31554. t && t(e), r && r(e);
  31555. }, function (e) {
  31556. s && s(e), r && r(e);
  31557. });
  31558. }).bind(t);
  31559. }), t;
  31560. }, t.customAuth = t.auth, t;
  31561. };
  31562. var It = wt;
  31563. var St = /*#__PURE__*/function (_fe) {
  31564. (0, _inherits2.default)(St, _fe);
  31565. var _super8 = _createSuper(St);
  31566. function St() {
  31567. (0, _classCallCheck2.default)(this, St);
  31568. return _super8.apply(this, arguments);
  31569. }
  31570. (0, _createClass2.default)(St, [{
  31571. key: "getAccessToken",
  31572. value: function getAccessToken() {
  31573. var _this11 = this;
  31574. return new Promise(function (e, t) {
  31575. var n = "Anonymous_Access_token";
  31576. _this11.setAccessToken(n), e(n);
  31577. });
  31578. }
  31579. }, {
  31580. key: "setupRequest",
  31581. value: function setupRequest(e, t) {
  31582. var n = Object.assign({}, e, {
  31583. spaceId: this.config.spaceId,
  31584. timestamp: Date.now()
  31585. }),
  31586. s = {
  31587. "Content-Type": "application/json"
  31588. };
  31589. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret);
  31590. var r = he();
  31591. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  31592. var _re = re(),
  31593. i = _re.token;
  31594. return s["x-client-token"] = i, {
  31595. url: this.config.requestUrl,
  31596. method: "POST",
  31597. data: n,
  31598. dataType: "json",
  31599. header: JSON.parse(JSON.stringify(s))
  31600. };
  31601. }
  31602. }, {
  31603. key: "uploadFileToOSS",
  31604. value: function uploadFileToOSS(_ref14) {
  31605. var _this12 = this;
  31606. var e = _ref14.url,
  31607. t = _ref14.formData,
  31608. n = _ref14.name,
  31609. s = _ref14.filePath,
  31610. r = _ref14.fileType,
  31611. i = _ref14.onUploadProgress;
  31612. return new Promise(function (o, a) {
  31613. var c = _this12.adapter.uploadFile({
  31614. url: e,
  31615. formData: t,
  31616. name: n,
  31617. filePath: s,
  31618. fileType: r,
  31619. success: function success(e) {
  31620. e && e.statusCode < 400 ? o(e) : a(new ne({
  31621. code: "UPLOAD_FAILED",
  31622. message: "文件上传失败"
  31623. }));
  31624. },
  31625. fail: function fail(e) {
  31626. a(new ne({
  31627. code: e.code || "UPLOAD_FAILED",
  31628. message: e.message || e.errMsg || "文件上传失败"
  31629. }));
  31630. }
  31631. });
  31632. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  31633. i({
  31634. loaded: e.totalBytesSent,
  31635. total: e.totalBytesExpectedToSend
  31636. });
  31637. });
  31638. });
  31639. }
  31640. }, {
  31641. key: "uploadFile",
  31642. value: function uploadFile(_ref15) {
  31643. var _this13 = this;
  31644. var e = _ref15.filePath,
  31645. t = _ref15.cloudPath,
  31646. _ref15$fileType = _ref15.fileType,
  31647. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  31648. s = _ref15.onUploadProgress;
  31649. if (!t) throw new ne({
  31650. code: "CLOUDPATH_REQUIRED",
  31651. message: "cloudPath不可为空"
  31652. });
  31653. var r;
  31654. return this.getOSSUploadOptionsFromPath({
  31655. cloudPath: t
  31656. }).then(function (t) {
  31657. var _t$result = t.result,
  31658. i = _t$result.url,
  31659. o = _t$result.formData,
  31660. a = _t$result.name;
  31661. r = t.result.fileUrl;
  31662. var c = {
  31663. url: i,
  31664. formData: o,
  31665. name: a,
  31666. filePath: e,
  31667. fileType: n
  31668. };
  31669. return _this13.uploadFileToOSS(Object.assign({}, c, {
  31670. onUploadProgress: s
  31671. }));
  31672. }).then(function () {
  31673. return _this13.reportOSSUpload({
  31674. cloudPath: t
  31675. });
  31676. }).then(function (t) {
  31677. return new Promise(function (n, s) {
  31678. t.success ? n({
  31679. success: !0,
  31680. filePath: e,
  31681. fileID: r
  31682. }) : s(new ne({
  31683. code: "UPLOAD_FAILED",
  31684. message: "文件上传失败"
  31685. }));
  31686. });
  31687. });
  31688. }
  31689. }, {
  31690. key: "deleteFile",
  31691. value: function deleteFile(_ref16) {
  31692. var e = _ref16.fileList;
  31693. var t = {
  31694. method: "serverless.file.resource.delete",
  31695. params: JSON.stringify({
  31696. fileList: e
  31697. })
  31698. };
  31699. return this.request(this.setupRequest(t)).then(function (e) {
  31700. if (e.success) return e.result;
  31701. throw new ne({
  31702. code: "DELETE_FILE_FAILED",
  31703. message: "删除文件失败"
  31704. });
  31705. });
  31706. }
  31707. }, {
  31708. key: "getTempFileURL",
  31709. value: function getTempFileURL() {
  31710. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31711. e = _ref17.fileList;
  31712. if (!Array.isArray(e) || 0 === e.length) throw new ne({
  31713. code: "INVALID_PARAM",
  31714. message: "fileList的元素必须是非空的字符串"
  31715. });
  31716. var t = {
  31717. method: "serverless.file.resource.getTempFileURL",
  31718. params: JSON.stringify({
  31719. fileList: e
  31720. })
  31721. };
  31722. return this.request(this.setupRequest(t)).then(function (e) {
  31723. if (e.success) return {
  31724. fileList: e.result.fileList.map(function (e) {
  31725. return {
  31726. fileID: e.fileID,
  31727. tempFileURL: e.tempFileURL
  31728. };
  31729. })
  31730. };
  31731. throw new ne({
  31732. code: "GET_TEMP_FILE_URL_FAILED",
  31733. message: "获取临时文件链接失败"
  31734. });
  31735. });
  31736. }
  31737. }]);
  31738. return St;
  31739. }(fe);
  31740. var bt = {
  31741. init: function init(e) {
  31742. var t = new St(e),
  31743. n = {
  31744. signInAnonymously: function signInAnonymously() {
  31745. return t.authorize();
  31746. },
  31747. getLoginState: function getLoginState() {
  31748. return Promise.resolve(!1);
  31749. }
  31750. };
  31751. return t.auth = function () {
  31752. return n;
  31753. }, t.customAuth = t.auth, t;
  31754. }
  31755. };
  31756. function kt(_ref18) {
  31757. var e = _ref18.data;
  31758. var t;
  31759. t = he();
  31760. var n = JSON.parse(JSON.stringify(e || {}));
  31761. if (Object.assign(n, {
  31762. clientInfo: t
  31763. }), !n.uniIdToken) {
  31764. var _re2 = re(),
  31765. _e19 = _re2.token;
  31766. _e19 && (n.uniIdToken = _e19);
  31767. }
  31768. return n;
  31769. }
  31770. function Ct() {
  31771. return _Ct.apply(this, arguments);
  31772. }
  31773. function _Ct() {
  31774. _Ct = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  31775. var _this26 = this;
  31776. var _ref60,
  31777. e,
  31778. t,
  31779. _this$__dev__,
  31780. n,
  31781. s,
  31782. r,
  31783. i,
  31784. o,
  31785. a,
  31786. _args6 = arguments;
  31787. return _regenerator.default.wrap(function _callee54$(_context54) {
  31788. while (1) {
  31789. switch (_context54.prev = _context54.next) {
  31790. case 0:
  31791. _ref60 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref60.name, t = _ref60.data;
  31792. _context54.next = 3;
  31793. return this.__dev__.initLocalNetwork();
  31794. case 3:
  31795. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  31796. aliyun: "aliyun",
  31797. tencent: "tcb"
  31798. }[this.config.provider], i = this.config.spaceId, o = "http://".concat(n, ":").concat(s, "/system/check-function"), a = "http://".concat(n, ":").concat(s, "/cloudfunctions/").concat(e);
  31799. return _context54.abrupt("return", new Promise(function (t, n) {
  31800. se.request({
  31801. method: "POST",
  31802. url: o,
  31803. data: {
  31804. name: e,
  31805. platform: P,
  31806. provider: r,
  31807. spaceId: i
  31808. },
  31809. timeout: 3e3,
  31810. success: function success(e) {
  31811. t(e);
  31812. },
  31813. fail: function fail() {
  31814. t({
  31815. data: {
  31816. code: "NETWORK_ERROR",
  31817. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  31818. }
  31819. });
  31820. }
  31821. });
  31822. }).then(function () {
  31823. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31824. e = _ref61.data;
  31825. var _ref62 = e || {},
  31826. t = _ref62.code,
  31827. n = _ref62.message;
  31828. return {
  31829. code: 0 === t ? 0 : t || "SYS_ERR",
  31830. message: n || "SYS_ERR"
  31831. };
  31832. }).then(function (_ref63) {
  31833. var n = _ref63.code,
  31834. s = _ref63.message;
  31835. if (0 !== n) {
  31836. switch (n) {
  31837. case "MODULE_ENCRYPTED":
  31838. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\uFF09\u4F9D\u8D56\u52A0\u5BC6\u516C\u5171\u6A21\u5757\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));
  31839. break;
  31840. case "FUNCTION_ENCRYPTED":
  31841. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\uFF09\u5DF2\u52A0\u5BC6\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));
  31842. break;
  31843. case "ACTION_ENCRYPTED":
  31844. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  31845. break;
  31846. case "NETWORK_ERROR":
  31847. {
  31848. var _e31 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  31849. throw console.error(_e31), new Error(_e31);
  31850. }
  31851. case "SWITCH_TO_CLOUD":
  31852. break;
  31853. default:
  31854. {
  31855. var _e32 = "\u68C0\u6D4B\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u51FA\u73B0\u9519\u8BEF\uFF1A".concat(s, "\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u73AF\u5883\u6216\u91CD\u542F\u5BA2\u6237\u7AEF\u518D\u8BD5");
  31856. throw console.error(_e32), new Error(_e32);
  31857. }
  31858. }
  31859. return _this26._callCloudFunction({
  31860. name: e,
  31861. data: t
  31862. });
  31863. }
  31864. return new Promise(function (e, n) {
  31865. var s = kt.call(_this26, {
  31866. data: t
  31867. });
  31868. se.request({
  31869. method: "POST",
  31870. url: a,
  31871. data: {
  31872. provider: r,
  31873. platform: P,
  31874. param: s
  31875. },
  31876. success: function success() {
  31877. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31878. t = _ref64.statusCode,
  31879. s = _ref64.data;
  31880. return !t || t >= 400 ? n(new ne({
  31881. code: s.code || "SYS_ERR",
  31882. message: s.message || "request:fail"
  31883. })) : e({
  31884. result: s
  31885. });
  31886. },
  31887. fail: function fail(e) {
  31888. n(new ne({
  31889. code: e.code || e.errCode || "SYS_ERR",
  31890. message: e.message || e.errMsg || "request:fail"
  31891. }));
  31892. }
  31893. });
  31894. });
  31895. }));
  31896. case 5:
  31897. case "end":
  31898. return _context54.stop();
  31899. }
  31900. }
  31901. }, _callee54, this);
  31902. }));
  31903. return _Ct.apply(this, arguments);
  31904. }
  31905. var Tt = [{
  31906. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  31907. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  31908. mode: "append"
  31909. }];
  31910. var Pt = /[\\^$.*+?()[\]{}|]/g,
  31911. At = RegExp(Pt.source);
  31912. function Et(e, t, n) {
  31913. return e.replace(new RegExp((s = t) && At.test(s) ? s.replace(Pt, "\\$&") : s, "g"), n);
  31914. var s;
  31915. }
  31916. var Ot = "none",
  31917. xt = "request",
  31918. Rt = "response",
  31919. Ut = "both";
  31920. var Lt = /*#__PURE__*/function () {
  31921. function Lt() {
  31922. var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31923. e = _ref19.secretType,
  31924. t = _ref19.uniCloudIns;
  31925. (0, _classCallCheck2.default)(this, Lt);
  31926. this.clientType = "", this.secretType = e || Ot, this.uniCloudIns = t;
  31927. var _this$uniCloudIns$con = this.uniCloudIns.config,
  31928. n = _this$uniCloudIns$con.provider,
  31929. s = _this$uniCloudIns$con.spaceId;
  31930. var r;
  31931. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  31932. }
  31933. (0, _createClass2.default)(Lt, [{
  31934. key: "getSystemInfo",
  31935. value: function getSystemInfo() {
  31936. return this._systemInfo || (this._systemInfo = ce()), this._systemInfo;
  31937. }
  31938. }, {
  31939. key: "appId",
  31940. get: function get() {
  31941. return this.getSystemInfo().appId;
  31942. }
  31943. }, {
  31944. key: "deviceId",
  31945. get: function get() {
  31946. return this.getSystemInfo().deviceId;
  31947. }
  31948. }, {
  31949. key: "encryptData",
  31950. value: function () {
  31951. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  31952. return _regenerator.default.wrap(function _callee34$(_context34) {
  31953. while (1) {
  31954. switch (_context34.prev = _context34.next) {
  31955. case 0:
  31956. return _context34.abrupt("return", this.secretType === Ot ? e : this.platformEncryptData(e));
  31957. case 1:
  31958. case "end":
  31959. return _context34.stop();
  31960. }
  31961. }
  31962. }, _callee34, this);
  31963. }));
  31964. function encryptData(_x31) {
  31965. return _encryptData.apply(this, arguments);
  31966. }
  31967. return encryptData;
  31968. }()
  31969. }, {
  31970. key: "decryptResult",
  31971. value: function () {
  31972. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  31973. var _ref20, t, n;
  31974. return _regenerator.default.wrap(function _callee35$(_context35) {
  31975. while (1) {
  31976. switch (_context35.prev = _context35.next) {
  31977. case 0:
  31978. if (!(this.secretType === Ot)) {
  31979. _context35.next = 2;
  31980. break;
  31981. }
  31982. return _context35.abrupt("return", e);
  31983. case 2:
  31984. _ref20 = e || {}, t = _ref20.errCode, n = _ref20.content;
  31985. return _context35.abrupt("return", t || !n ? e : this.secretType === xt ? n : this.platformDecryptResult(e));
  31986. case 4:
  31987. case "end":
  31988. return _context35.stop();
  31989. }
  31990. }
  31991. }, _callee35, this);
  31992. }));
  31993. function decryptResult(_x32) {
  31994. return _decryptResult.apply(this, arguments);
  31995. }
  31996. return decryptResult;
  31997. }()
  31998. }, {
  31999. key: "wrapVerifyClientCallFunction",
  32000. value: function wrapVerifyClientCallFunction(e) {
  32001. var t = this;
  32002. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  32003. var _ref22,
  32004. n,
  32005. _ref22$data,
  32006. s,
  32007. r,
  32008. _args36 = arguments;
  32009. return _regenerator.default.wrap(function _callee36$(_context36) {
  32010. while (1) {
  32011. switch (_context36.prev = _context36.next) {
  32012. case 0:
  32013. _ref22 = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {}, n = _ref22.name, _ref22$data = _ref22.data, s = _ref22$data === void 0 ? {} : _ref22$data;
  32014. _context36.next = 3;
  32015. return t.prepare();
  32016. case 3:
  32017. _context36.next = 5;
  32018. return t.platformGetSignOption();
  32019. case 5:
  32020. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context36.sent;
  32021. _context36.next = 8;
  32022. return e({
  32023. name: n,
  32024. data: s
  32025. });
  32026. case 8:
  32027. r = _context36.sent;
  32028. _context36.t0 = t.isClientKeyNotFound(r);
  32029. if (!_context36.t0) {
  32030. _context36.next = 19;
  32031. break;
  32032. }
  32033. _context36.next = 13;
  32034. return t.prepare({
  32035. forceUpdate: !0
  32036. });
  32037. case 13:
  32038. _context36.next = 15;
  32039. return t.platformGetSignOption();
  32040. case 15:
  32041. s._uniCloudOptions = _context36.sent;
  32042. _context36.next = 18;
  32043. return e({
  32044. name: n,
  32045. data: s
  32046. });
  32047. case 18:
  32048. r = _context36.sent;
  32049. case 19:
  32050. return _context36.abrupt("return", r);
  32051. case 20:
  32052. case "end":
  32053. return _context36.stop();
  32054. }
  32055. }
  32056. }, _callee36);
  32057. }));
  32058. }
  32059. }, {
  32060. key: "wrapEncryptDataCallFunction",
  32061. value: function wrapEncryptDataCallFunction(e) {
  32062. var t = this;
  32063. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  32064. var _ref24,
  32065. n,
  32066. _ref24$data,
  32067. s,
  32068. r,
  32069. i,
  32070. _r3,
  32071. _args37 = arguments;
  32072. return _regenerator.default.wrap(function _callee37$(_context37) {
  32073. while (1) {
  32074. switch (_context37.prev = _context37.next) {
  32075. case 0:
  32076. _ref24 = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {}, n = _ref24.name, _ref24$data = _ref24.data, s = _ref24$data === void 0 ? {} : _ref24$data;
  32077. _context37.next = 3;
  32078. return t.prepare();
  32079. case 3:
  32080. _context37.next = 5;
  32081. return t.encryptData(s);
  32082. case 5:
  32083. r = _context37.sent;
  32084. _context37.next = 8;
  32085. return e({
  32086. name: n,
  32087. data: r
  32088. });
  32089. case 8:
  32090. i = _context37.sent;
  32091. if (!t.isClientKeyNotFound(i)) {
  32092. _context37.next = 21;
  32093. break;
  32094. }
  32095. _context37.next = 12;
  32096. return t.prepare({
  32097. forceUpdate: !0
  32098. });
  32099. case 12:
  32100. _context37.next = 14;
  32101. return t.encryptData(s);
  32102. case 14:
  32103. _r3 = _context37.sent;
  32104. _context37.next = 17;
  32105. return t.platformGetSignOption();
  32106. case 17:
  32107. s._uniCloudOptions = _context37.sent;
  32108. _context37.next = 20;
  32109. return e({
  32110. name: n,
  32111. data: _r3
  32112. });
  32113. case 20:
  32114. i = _context37.sent;
  32115. case 21:
  32116. _context37.next = 23;
  32117. return t.decryptResult(i.result);
  32118. case 23:
  32119. i.result = _context37.sent;
  32120. return _context37.abrupt("return", i);
  32121. case 25:
  32122. case "end":
  32123. return _context37.stop();
  32124. }
  32125. }
  32126. }, _callee37);
  32127. }));
  32128. }
  32129. }]);
  32130. return Lt;
  32131. }();
  32132. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  32133. function Nt(e) {
  32134. return parseInt(e) === e;
  32135. }
  32136. function Dt(e) {
  32137. if (!Nt(e.length)) return !1;
  32138. for (var t = 0; t < e.length; t++) {
  32139. if (!Nt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  32140. }
  32141. return !0;
  32142. }
  32143. function Ft(e, t) {
  32144. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  32145. if (Array.isArray(e)) {
  32146. if (!Dt(e)) throw new Error("Array contains invalid value: " + e);
  32147. return new Uint8Array(e);
  32148. }
  32149. if (Nt(e.length) && Dt(e)) return new Uint8Array(e);
  32150. throw new Error("unsupported array-like object");
  32151. }
  32152. function qt(e) {
  32153. return new Uint8Array(e);
  32154. }
  32155. function Mt(e, t, n, s, r) {
  32156. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  32157. }
  32158. var Kt,
  32159. jt = {
  32160. toBytes: function toBytes(e) {
  32161. var t = [],
  32162. n = 0;
  32163. for (e = encodeURI(e); n < e.length;) {
  32164. var s = e.charCodeAt(n++);
  32165. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  32166. }
  32167. return Ft(t);
  32168. },
  32169. fromBytes: function fromBytes(e) {
  32170. for (var t = [], n = 0; n < e.length;) {
  32171. var s = e[n];
  32172. 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);
  32173. }
  32174. return t.join("");
  32175. }
  32176. },
  32177. Bt = (Kt = "0123456789abcdef", {
  32178. toBytes: function toBytes(e) {
  32179. for (var t = [], n = 0; n < e.length; n += 2) {
  32180. t.push(parseInt(e.substr(n, 2), 16));
  32181. }
  32182. return t;
  32183. },
  32184. fromBytes: function fromBytes(e) {
  32185. for (var t = [], n = 0; n < e.length; n++) {
  32186. var s = e[n];
  32187. t.push(Kt[(240 & s) >> 4] + Kt[15 & s]);
  32188. }
  32189. return t.join("");
  32190. }
  32191. }),
  32192. $t = {
  32193. 16: 10,
  32194. 24: 12,
  32195. 32: 14
  32196. },
  32197. Wt = [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],
  32198. zt = [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],
  32199. Jt = [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],
  32200. Ht = [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],
  32201. Gt = [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],
  32202. Vt = [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],
  32203. Yt = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436],
  32204. Qt = [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],
  32205. Xt = [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],
  32206. Zt = [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],
  32207. en = [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],
  32208. tn = [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],
  32209. nn = [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],
  32210. sn = [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],
  32211. rn = [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];
  32212. function on(e) {
  32213. for (var t = [], n = 0; n < e.length; n += 4) {
  32214. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  32215. }
  32216. return t;
  32217. }
  32218. var an = /*#__PURE__*/function () {
  32219. function an(e) {
  32220. (0, _classCallCheck2.default)(this, an);
  32221. if (!(this instanceof an)) throw Error("AES must be instanitated with `new`");
  32222. Object.defineProperty(this, "key", {
  32223. value: Ft(e, !0)
  32224. }), this._prepare();
  32225. }
  32226. (0, _createClass2.default)(an, [{
  32227. key: "_prepare",
  32228. value: function _prepare() {
  32229. var e = $t[this.key.length];
  32230. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  32231. this._Ke = [], this._Kd = [];
  32232. for (var t = 0; t <= e; t++) {
  32233. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  32234. }
  32235. var n,
  32236. s = 4 * (e + 1),
  32237. r = this.key.length / 4,
  32238. i = on(this.key);
  32239. for (t = 0; t < r; t++) {
  32240. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  32241. }
  32242. for (var o, a = 0, c = r; c < s;) {
  32243. if (o = i[r - 1], i[0] ^= zt[o >> 16 & 255] << 24 ^ zt[o >> 8 & 255] << 16 ^ zt[255 & o] << 8 ^ zt[o >> 24 & 255] ^ Wt[a] << 24, a += 1, 8 != r) for (t = 1; t < r; t++) {
  32244. i[t] ^= i[t - 1];
  32245. } else {
  32246. for (t = 1; t < r / 2; t++) {
  32247. i[t] ^= i[t - 1];
  32248. }
  32249. o = i[r / 2 - 1], i[r / 2] ^= zt[255 & o] ^ zt[o >> 8 & 255] << 8 ^ zt[o >> 16 & 255] << 16 ^ zt[o >> 24 & 255] << 24;
  32250. for (t = r / 2 + 1; t < r; t++) {
  32251. i[t] ^= i[t - 1];
  32252. }
  32253. }
  32254. for (t = 0; t < r && c < s;) {
  32255. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  32256. }
  32257. }
  32258. for (var u = 1; u < e; u++) {
  32259. for (var h = 0; h < 4; h++) {
  32260. o = this._Kd[u][h], this._Kd[u][h] = tn[o >> 24 & 255] ^ nn[o >> 16 & 255] ^ sn[o >> 8 & 255] ^ rn[255 & o];
  32261. }
  32262. }
  32263. }
  32264. }, {
  32265. key: "encrypt",
  32266. value: function encrypt(e) {
  32267. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  32268. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  32269. s[r] ^= this._Ke[0][r];
  32270. }
  32271. for (var i = 1; i < t; i++) {
  32272. for (r = 0; r < 4; r++) {
  32273. n[r] = Ht[s[r] >> 24 & 255] ^ Gt[s[(r + 1) % 4] >> 16 & 255] ^ Vt[s[(r + 2) % 4] >> 8 & 255] ^ Yt[255 & s[(r + 3) % 4]] ^ this._Ke[i][r];
  32274. }
  32275. s = n.slice();
  32276. }
  32277. var o,
  32278. a = qt(16);
  32279. for (r = 0; r < 4; r++) {
  32280. o = this._Ke[t][r], a[4 * r] = 255 & (zt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (zt[s[(r + 1) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (zt[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (zt[255 & s[(r + 3) % 4]] ^ o);
  32281. }
  32282. return a;
  32283. }
  32284. }, {
  32285. key: "decrypt",
  32286. value: function decrypt(e) {
  32287. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  32288. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  32289. s[r] ^= this._Kd[0][r];
  32290. }
  32291. for (var i = 1; i < t; i++) {
  32292. for (r = 0; r < 4; r++) {
  32293. n[r] = Qt[s[r] >> 24 & 255] ^ Xt[s[(r + 3) % 4] >> 16 & 255] ^ Zt[s[(r + 2) % 4] >> 8 & 255] ^ en[255 & s[(r + 1) % 4]] ^ this._Kd[i][r];
  32294. }
  32295. s = n.slice();
  32296. }
  32297. var o,
  32298. a = qt(16);
  32299. for (r = 0; r < 4; r++) {
  32300. o = this._Kd[t][r], a[4 * r] = 255 & (Jt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Jt[s[(r + 3) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (Jt[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (Jt[255 & s[(r + 1) % 4]] ^ o);
  32301. }
  32302. return a;
  32303. }
  32304. }]);
  32305. return an;
  32306. }();
  32307. var cn = /*#__PURE__*/function () {
  32308. function cn(e) {
  32309. (0, _classCallCheck2.default)(this, cn);
  32310. if (!(this instanceof cn)) throw Error("AES must be instanitated with `new`");
  32311. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new an(e);
  32312. }
  32313. (0, _createClass2.default)(cn, [{
  32314. key: "encrypt",
  32315. value: function encrypt(e) {
  32316. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  32317. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  32318. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.encrypt(n), t, s);
  32319. }
  32320. return t;
  32321. }
  32322. }, {
  32323. key: "decrypt",
  32324. value: function decrypt(e) {
  32325. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  32326. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  32327. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.decrypt(n), t, s);
  32328. }
  32329. return t;
  32330. }
  32331. }]);
  32332. return cn;
  32333. }();
  32334. var un = /*#__PURE__*/function () {
  32335. function un(e, t) {
  32336. (0, _classCallCheck2.default)(this, un);
  32337. if (!(this instanceof un)) throw Error("AES must be instanitated with `new`");
  32338. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  32339. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  32340. } else t = qt(16);
  32341. this._lastCipherblock = Ft(t, !0), this._aes = new an(e);
  32342. }
  32343. (0, _createClass2.default)(un, [{
  32344. key: "encrypt",
  32345. value: function encrypt(e) {
  32346. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  32347. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  32348. Mt(e, n, 0, s, s + 16);
  32349. for (var r = 0; r < 16; r++) {
  32350. n[r] ^= this._lastCipherblock[r];
  32351. }
  32352. this._lastCipherblock = this._aes.encrypt(n), Mt(this._lastCipherblock, t, s);
  32353. }
  32354. return t;
  32355. }
  32356. }, {
  32357. key: "decrypt",
  32358. value: function decrypt(e) {
  32359. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  32360. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  32361. Mt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  32362. for (var r = 0; r < 16; r++) {
  32363. t[s + r] = n[r] ^ this._lastCipherblock[r];
  32364. }
  32365. Mt(e, this._lastCipherblock, 0, s, s + 16);
  32366. }
  32367. return t;
  32368. }
  32369. }]);
  32370. return un;
  32371. }();
  32372. var hn = /*#__PURE__*/function () {
  32373. function hn(e, t, n) {
  32374. (0, _classCallCheck2.default)(this, hn);
  32375. if (!(this instanceof hn)) throw Error("AES must be instanitated with `new`");
  32376. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  32377. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  32378. } else t = qt(16);
  32379. n || (n = 1), this.segmentSize = n, this._shiftRegister = Ft(t, !0), this._aes = new an(e);
  32380. }
  32381. (0, _createClass2.default)(hn, [{
  32382. key: "encrypt",
  32383. value: function encrypt(e) {
  32384. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  32385. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  32386. t = this._aes.encrypt(this._shiftRegister);
  32387. for (var r = 0; r < this.segmentSize; r++) {
  32388. n[s + r] ^= t[r];
  32389. }
  32390. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  32391. }
  32392. return n;
  32393. }
  32394. }, {
  32395. key: "decrypt",
  32396. value: function decrypt(e) {
  32397. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  32398. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  32399. t = this._aes.encrypt(this._shiftRegister);
  32400. for (var r = 0; r < this.segmentSize; r++) {
  32401. n[s + r] ^= t[r];
  32402. }
  32403. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  32404. }
  32405. return n;
  32406. }
  32407. }]);
  32408. return hn;
  32409. }();
  32410. var ln = /*#__PURE__*/function () {
  32411. function ln(e, t) {
  32412. (0, _classCallCheck2.default)(this, ln);
  32413. if (!(this instanceof ln)) throw Error("AES must be instanitated with `new`");
  32414. if (this.description = "Output Feedback", this.name = "ofb", t) {
  32415. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  32416. } else t = qt(16);
  32417. this._lastPrecipher = Ft(t, !0), this._lastPrecipherIndex = 16, this._aes = new an(e);
  32418. }
  32419. (0, _createClass2.default)(ln, [{
  32420. key: "encrypt",
  32421. value: function encrypt(e) {
  32422. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  32423. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  32424. }
  32425. return t;
  32426. }
  32427. }, {
  32428. key: "decrypt",
  32429. value: function decrypt(e) {
  32430. return this.encrypt(e);
  32431. }
  32432. }]);
  32433. return ln;
  32434. }();
  32435. var dn = /*#__PURE__*/function () {
  32436. function dn(e) {
  32437. (0, _classCallCheck2.default)(this, dn);
  32438. if (!(this instanceof dn)) throw Error("Counter must be instanitated with `new`");
  32439. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = qt(16), this.setValue(e)) : this.setBytes(e);
  32440. }
  32441. (0, _createClass2.default)(dn, [{
  32442. key: "setValue",
  32443. value: function setValue(e) {
  32444. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  32445. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  32446. for (var t = 15; t >= 0; --t) {
  32447. this._counter[t] = e % 256, e = parseInt(e / 256);
  32448. }
  32449. }
  32450. }, {
  32451. key: "setBytes",
  32452. value: function setBytes(e) {
  32453. if (16 != (e = Ft(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  32454. this._counter = e;
  32455. }
  32456. }, {
  32457. key: "increment",
  32458. value: function increment() {
  32459. for (var e = 15; e >= 0; e--) {
  32460. if (255 !== this._counter[e]) {
  32461. this._counter[e]++;
  32462. break;
  32463. }
  32464. this._counter[e] = 0;
  32465. }
  32466. }
  32467. }]);
  32468. return dn;
  32469. }();
  32470. var pn = /*#__PURE__*/function () {
  32471. function pn(e, t) {
  32472. (0, _classCallCheck2.default)(this, pn);
  32473. if (!(this instanceof pn)) throw Error("AES must be instanitated with `new`");
  32474. this.description = "Counter", this.name = "ctr", t instanceof dn || (t = new dn(t)), this._counter = t, this._remainingCounter = null, this._remainingCounterIndex = 16, this._aes = new an(e);
  32475. }
  32476. (0, _createClass2.default)(pn, [{
  32477. key: "encrypt",
  32478. value: function encrypt(e) {
  32479. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  32480. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  32481. }
  32482. return t;
  32483. }
  32484. }, {
  32485. key: "decrypt",
  32486. value: function decrypt(e) {
  32487. return this.encrypt(e);
  32488. }
  32489. }]);
  32490. return pn;
  32491. }();
  32492. var fn = {
  32493. AES: an,
  32494. Counter: dn,
  32495. ModeOfOperation: {
  32496. ecb: cn,
  32497. cbc: un,
  32498. cfb: hn,
  32499. ofb: ln,
  32500. ctr: pn
  32501. },
  32502. utils: {
  32503. hex: Bt,
  32504. utf8: jt
  32505. },
  32506. padding: {
  32507. pkcs7: {
  32508. pad: function pad(e) {
  32509. var t = 16 - (e = Ft(e, !0)).length % 16,
  32510. n = qt(e.length + t);
  32511. Mt(e, n);
  32512. for (var s = e.length; s < n.length; s++) {
  32513. n[s] = t;
  32514. }
  32515. return n;
  32516. },
  32517. strip: function strip(e) {
  32518. if ((e = Ft(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  32519. var t = e[e.length - 1];
  32520. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  32521. for (var n = e.length - t, s = 0; s < t; s++) {
  32522. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  32523. }
  32524. var r = qt(n);
  32525. return Mt(e, r, 0, 0, n), r;
  32526. }
  32527. }
  32528. },
  32529. _arrayTest: {
  32530. coerceArray: Ft,
  32531. createArray: qt,
  32532. copyArray: Mt
  32533. }
  32534. };
  32535. function gn(e, t, n) {
  32536. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  32537. r = fn.utils.utf8.toBytes(n),
  32538. i = fn.utils.utf8.toBytes(e),
  32539. o = new fn.ModeOfOperation.cbc(s, r),
  32540. a = fn.padding.pkcs7.pad(i),
  32541. c = o.encrypt(a);
  32542. return uni.arrayBufferToBase64(c);
  32543. }
  32544. var mn = {
  32545. code: 2e4,
  32546. message: "System error"
  32547. },
  32548. yn = {
  32549. code: 20101,
  32550. message: "Invalid client"
  32551. },
  32552. _n = {
  32553. code: 20102,
  32554. message: "Get encrypt key failed"
  32555. },
  32556. wn = {
  32557. 10001: "Secure network is not supported on current playground or unimpsdk",
  32558. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  32559. 10009: "Encrypt payload failed",
  32560. 10010: "Decrypt response failed"
  32561. };
  32562. function vn(e) {
  32563. var _ref25 = e || {},
  32564. t = _ref25.errSubject,
  32565. n = _ref25.subject,
  32566. s = _ref25.errCode,
  32567. r = _ref25.errMsg,
  32568. i = _ref25.code,
  32569. o = _ref25.message,
  32570. a = _ref25.cause;
  32571. return new ne({
  32572. subject: t || n || "uni-secure-network",
  32573. code: s || i || mn.code,
  32574. message: r || o,
  32575. cause: a
  32576. });
  32577. }
  32578. var In,
  32579. Sn,
  32580. bn = null;
  32581. var kn = /*#__PURE__*/function (_Lt) {
  32582. (0, _inherits2.default)(kn, _Lt);
  32583. var _super9 = _createSuper(kn);
  32584. function kn(e) {
  32585. var _this14;
  32586. (0, _classCallCheck2.default)(this, kn);
  32587. _this14 = _super9.call(this, e), _this14.clientType = "mp-weixin", _this14.userEncryptKey = null;
  32588. return _this14;
  32589. }
  32590. (0, _createClass2.default)(kn, [{
  32591. key: "isLogin",
  32592. value: function isLogin() {
  32593. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  32594. }
  32595. }, {
  32596. key: "prepare",
  32597. value: function () {
  32598. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  32599. return _regenerator.default.wrap(function _callee38$(_context38) {
  32600. while (1) {
  32601. switch (_context38.prev = _context38.next) {
  32602. case 0:
  32603. if (this.isLogin()) {
  32604. _context38.next = 7;
  32605. break;
  32606. }
  32607. if (this.scopedGlobalCache.initPromise) {
  32608. _context38.next = 3;
  32609. break;
  32610. }
  32611. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  32612. case 3:
  32613. _context38.next = 5;
  32614. return this.scopedGlobalCache.initPromise;
  32615. case 5:
  32616. if (this.isLogin()) {
  32617. _context38.next = 7;
  32618. break;
  32619. }
  32620. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  32621. case 7:
  32622. case "end":
  32623. return _context38.stop();
  32624. }
  32625. }
  32626. }, _callee38, this);
  32627. }));
  32628. function prepare() {
  32629. return _prepare2.apply(this, arguments);
  32630. }
  32631. return prepare;
  32632. }()
  32633. }, {
  32634. key: "getUserEncryptKey",
  32635. value: function () {
  32636. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  32637. var _this15 = this;
  32638. var e;
  32639. return _regenerator.default.wrap(function _callee39$(_context39) {
  32640. while (1) {
  32641. switch (_context39.prev = _context39.next) {
  32642. case 0:
  32643. if (!this.userEncryptKey) {
  32644. _context39.next = 2;
  32645. break;
  32646. }
  32647. return _context39.abrupt("return", this.userEncryptKey);
  32648. case 2:
  32649. if (!(bn && bn.expireTime)) {
  32650. _context39.next = 6;
  32651. break;
  32652. }
  32653. e = Date.now();
  32654. if (!(bn.expireTime - e > 0)) {
  32655. _context39.next = 6;
  32656. break;
  32657. }
  32658. return _context39.abrupt("return", (this.userEncryptKey = bn, this.userEncryptKey));
  32659. case 6:
  32660. return _context39.abrupt("return", new Promise(function (e, t) {
  32661. uni.getUserCryptoManager().getLatestUserKey({
  32662. success: function success(t) {
  32663. bn = t, _this15.userEncryptKey = t, e(_this15.userEncryptKey);
  32664. },
  32665. fail: function fail(e) {
  32666. t(vn(_objectSpread(_objectSpread({}, _n), {}, {
  32667. cause: e
  32668. })));
  32669. }
  32670. });
  32671. }));
  32672. case 7:
  32673. case "end":
  32674. return _context39.stop();
  32675. }
  32676. }
  32677. }, _callee39, this);
  32678. }));
  32679. function getUserEncryptKey() {
  32680. return _getUserEncryptKey.apply(this, arguments);
  32681. }
  32682. return getUserEncryptKey;
  32683. }()
  32684. }, {
  32685. key: "getWxAppId",
  32686. value: function getWxAppId() {
  32687. return wx.getAccountInfoSync().miniProgram.appId;
  32688. }
  32689. }, {
  32690. key: "platformGetSignOption",
  32691. value: function () {
  32692. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  32693. var _yield$this$getUserEn, e, t, n;
  32694. return _regenerator.default.wrap(function _callee40$(_context40) {
  32695. while (1) {
  32696. switch (_context40.prev = _context40.next) {
  32697. case 0:
  32698. _context40.next = 2;
  32699. return this.getUserEncryptKey();
  32700. case 2:
  32701. _yield$this$getUserEn = _context40.sent;
  32702. e = _yield$this$getUserEn.encryptKey;
  32703. t = _yield$this$getUserEn.iv;
  32704. n = _yield$this$getUserEn.version;
  32705. return _context40.abrupt("return", {
  32706. verifyClientSign: gn(JSON.stringify({
  32707. data: JSON.stringify({}),
  32708. appId: this.appId,
  32709. deviceId: this.deviceId,
  32710. wxAppId: this.getWxAppId(),
  32711. simulator: "devtools" === ce().platform,
  32712. timestamp: Date.now()
  32713. }), e, t),
  32714. encryptKeyId: n,
  32715. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  32716. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  32717. });
  32718. case 7:
  32719. case "end":
  32720. return _context40.stop();
  32721. }
  32722. }
  32723. }, _callee40, this);
  32724. }));
  32725. function platformGetSignOption() {
  32726. return _platformGetSignOption.apply(this, arguments);
  32727. }
  32728. return platformGetSignOption;
  32729. }()
  32730. }, {
  32731. key: "platformEncryptData",
  32732. value: function () {
  32733. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(e) {
  32734. var _yield$this$getUserEn2, t, n, s, r;
  32735. return _regenerator.default.wrap(function _callee41$(_context41) {
  32736. while (1) {
  32737. switch (_context41.prev = _context41.next) {
  32738. case 0:
  32739. _context41.next = 2;
  32740. return this.getUserEncryptKey();
  32741. case 2:
  32742. _yield$this$getUserEn2 = _context41.sent;
  32743. t = _yield$this$getUserEn2.encryptKey;
  32744. n = _yield$this$getUserEn2.iv;
  32745. s = _yield$this$getUserEn2.version;
  32746. r = {
  32747. secretType: this.secretType,
  32748. encryptKeyId: s,
  32749. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  32750. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  32751. };
  32752. return _context41.abrupt("return", this.secretType === Rt ? {
  32753. content: e,
  32754. _uniCloudOptions: r
  32755. } : {
  32756. content: gn(JSON.stringify({
  32757. data: JSON.stringify(e),
  32758. appId: this.appId,
  32759. deviceId: this.deviceId,
  32760. wxAppId: this.getWxAppId(),
  32761. simulator: "devtools" === ce().platform,
  32762. timestamp: Date.now()
  32763. }), t, n),
  32764. _uniCloudOptions: r
  32765. });
  32766. case 8:
  32767. case "end":
  32768. return _context41.stop();
  32769. }
  32770. }
  32771. }, _callee41, this);
  32772. }));
  32773. function platformEncryptData(_x33) {
  32774. return _platformEncryptData.apply(this, arguments);
  32775. }
  32776. return platformEncryptData;
  32777. }()
  32778. }, {
  32779. key: "platformDecryptResult",
  32780. value: function () {
  32781. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(e) {
  32782. var t, _yield$this$getUserEn3, n, s;
  32783. return _regenerator.default.wrap(function _callee42$(_context42) {
  32784. while (1) {
  32785. switch (_context42.prev = _context42.next) {
  32786. case 0:
  32787. t = e.content;
  32788. _context42.next = 3;
  32789. return this.getUserEncryptKey();
  32790. case 3:
  32791. _yield$this$getUserEn3 = _context42.sent;
  32792. n = _yield$this$getUserEn3.encryptKey;
  32793. s = _yield$this$getUserEn3.iv;
  32794. return _context42.abrupt("return", JSON.parse(function (e, t, n) {
  32795. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  32796. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  32797. i = fn.utils.utf8.toBytes(n),
  32798. o = new fn.ModeOfOperation.cbc(r, i),
  32799. a = fn.padding.pkcs7.strip(o.decrypt(s));
  32800. return fn.utils.utf8.fromBytes(a);
  32801. }(t, n, s)));
  32802. case 7:
  32803. case "end":
  32804. return _context42.stop();
  32805. }
  32806. }
  32807. }, _callee42, this);
  32808. }));
  32809. function platformDecryptResult(_x34) {
  32810. return _platformDecryptResult.apply(this, arguments);
  32811. }
  32812. return platformDecryptResult;
  32813. }()
  32814. }, {
  32815. key: "isClientKeyNotFound",
  32816. value: function isClientKeyNotFound() {
  32817. return !1;
  32818. }
  32819. }]);
  32820. return kn;
  32821. }(Lt);
  32822. function Cn(e) {
  32823. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  32824. n = {};
  32825. var _loop = function _loop(_s10) {
  32826. var r = t[_s10];
  32827. n[r] = function () {
  32828. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  32829. t[_key] = arguments[_key];
  32830. }
  32831. return new Promise(function (n, s) {
  32832. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  32833. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32834. e = _ref26.type,
  32835. t = _ref26.data,
  32836. r = _ref26.errCode,
  32837. i = _ref26.errMsg,
  32838. o = _ref26.errSubject,
  32839. a = _ref26.message;
  32840. "success" === e ? n(t) : s(vn({
  32841. errCode: r,
  32842. errMsg: wn[r] || i || a,
  32843. errSubject: o
  32844. }));
  32845. }])) : s(vn({
  32846. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  32847. }));
  32848. });
  32849. };
  32850. };
  32851. for (var _s10 = 0; _s10 < t.length; _s10++) {
  32852. _loop(_s10);
  32853. }
  32854. return n;
  32855. }
  32856. var Tn = /*#__PURE__*/function (_Lt2) {
  32857. (0, _inherits2.default)(Tn, _Lt2);
  32858. var _super10 = _createSuper(Tn);
  32859. function Tn(e) {
  32860. var _this16;
  32861. (0, _classCallCheck2.default)(this, Tn);
  32862. _this16 = _super10.call(this, e), _this16.clientType = "app", _this16.appUtils = _objectSpread({}, Cn(uni.requireNativePlugin("plus"))), _this16.systemInfo = In || (In = ce());
  32863. return _this16;
  32864. }
  32865. (0, _createClass2.default)(Tn, [{
  32866. key: "hasClientKey",
  32867. value: function () {
  32868. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  32869. return _regenerator.default.wrap(function _callee43$(_context43) {
  32870. while (1) {
  32871. switch (_context43.prev = _context43.next) {
  32872. case 0:
  32873. _context43.next = 2;
  32874. return this.appUtils.hasClientKey({
  32875. provider: this.provider,
  32876. spaceId: this.spaceId
  32877. });
  32878. case 2:
  32879. this._hasClientKey = _context43.sent;
  32880. return _context43.abrupt("return", this._hasClientKey);
  32881. case 4:
  32882. case "end":
  32883. return _context43.stop();
  32884. }
  32885. }
  32886. }, _callee43, this);
  32887. }));
  32888. function hasClientKey() {
  32889. return _hasClientKey.apply(this, arguments);
  32890. }
  32891. return hasClientKey;
  32892. }()
  32893. }, {
  32894. key: "getAppClientKey",
  32895. value: function () {
  32896. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  32897. var _yield$this$appUtils$, e, t, n, s, r;
  32898. return _regenerator.default.wrap(function _callee44$(_context44) {
  32899. while (1) {
  32900. switch (_context44.prev = _context44.next) {
  32901. case 0:
  32902. _context44.next = 2;
  32903. return this.appUtils.encryptGetClientKeyPayload({
  32904. data: JSON.stringify({})
  32905. });
  32906. case 2:
  32907. _yield$this$appUtils$ = _context44.sent;
  32908. e = _yield$this$appUtils$.data;
  32909. t = _yield$this$appUtils$.key;
  32910. _context44.next = 7;
  32911. return this.uniCloudIns.callFunction({
  32912. name: "DCloud-clientDB",
  32913. data: {
  32914. redirectTo: "encryption",
  32915. action: "getAppClientKey",
  32916. data: e,
  32917. key: t
  32918. }
  32919. });
  32920. case 7:
  32921. _context44.t0 = _context44.sent.result;
  32922. if (_context44.t0) {
  32923. _context44.next = 10;
  32924. break;
  32925. }
  32926. _context44.t0 = {};
  32927. case 10:
  32928. n = _context44.t0;
  32929. if (!(0 !== n.errCode)) {
  32930. _context44.next = 13;
  32931. break;
  32932. }
  32933. throw function (e) {
  32934. return new ne({
  32935. subject: e.errSubject || "uni-secure-network",
  32936. code: e.errCode || e.code || mn.code,
  32937. message: e.errMsg || e.message
  32938. });
  32939. }(n);
  32940. case 13:
  32941. s = n.clientKey, r = n.key;
  32942. _context44.next = 16;
  32943. return this.appUtils.setClientKey({
  32944. provider: this.provider,
  32945. spaceId: this.spaceId,
  32946. clientKey: s,
  32947. key: r
  32948. });
  32949. case 16:
  32950. case "end":
  32951. return _context44.stop();
  32952. }
  32953. }
  32954. }, _callee44, this);
  32955. }));
  32956. function getAppClientKey() {
  32957. return _getAppClientKey.apply(this, arguments);
  32958. }
  32959. return getAppClientKey;
  32960. }()
  32961. }, {
  32962. key: "ensureClientKey",
  32963. value: function () {
  32964. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  32965. var _this17 = this;
  32966. var _ref27,
  32967. _ref27$forceUpdate,
  32968. e,
  32969. _args45 = arguments;
  32970. return _regenerator.default.wrap(function _callee45$(_context45) {
  32971. while (1) {
  32972. switch (_context45.prev = _context45.next) {
  32973. case 0:
  32974. _ref27 = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {}, _ref27$forceUpdate = _ref27.forceUpdate, e = _ref27$forceUpdate === void 0 ? !1 : _ref27$forceUpdate;
  32975. _context45.t1 = !0;
  32976. _context45.next = 4;
  32977. return this.hasClientKey();
  32978. case 4:
  32979. _context45.t2 = _context45.sent;
  32980. _context45.t0 = _context45.t1 !== _context45.t2;
  32981. if (_context45.t0) {
  32982. _context45.next = 8;
  32983. break;
  32984. }
  32985. _context45.t0 = e;
  32986. case 8:
  32987. if (!_context45.t0) {
  32988. _context45.next = 10;
  32989. break;
  32990. }
  32991. return _context45.abrupt("return", (e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus === d || !e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus !== f || (this.scopedGlobalCache.initPromise = this.getAppClientKey(), this.scopedGlobalCache.initPromise.then(function (e) {
  32992. _this17.scopedGlobalCache.initStatus = p;
  32993. }).catch(function (e) {
  32994. throw _this17.scopedGlobalCache.initStatus = f, e;
  32995. }), this.scopedGlobalCache.initStatus = d), this.scopedGlobalCache.initPromise));
  32996. case 10:
  32997. case "end":
  32998. return _context45.stop();
  32999. }
  33000. }
  33001. }, _callee45, this);
  33002. }));
  33003. function ensureClientKey() {
  33004. return _ensureClientKey.apply(this, arguments);
  33005. }
  33006. return ensureClientKey;
  33007. }()
  33008. }, {
  33009. key: "prepare",
  33010. value: function () {
  33011. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  33012. var _ref28,
  33013. _ref28$forceUpdate,
  33014. e,
  33015. _args46 = arguments;
  33016. return _regenerator.default.wrap(function _callee46$(_context46) {
  33017. while (1) {
  33018. switch (_context46.prev = _context46.next) {
  33019. case 0:
  33020. _ref28 = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {}, _ref28$forceUpdate = _ref28.forceUpdate, e = _ref28$forceUpdate === void 0 ? !1 : _ref28$forceUpdate;
  33021. _context46.next = 3;
  33022. return this.ensureClientKey({
  33023. forceUpdate: e
  33024. });
  33025. case 3:
  33026. case "end":
  33027. return _context46.stop();
  33028. }
  33029. }
  33030. }, _callee46, this);
  33031. }));
  33032. function prepare() {
  33033. return _prepare3.apply(this, arguments);
  33034. }
  33035. return prepare;
  33036. }()
  33037. }, {
  33038. key: "platformGetSignOption",
  33039. value: function () {
  33040. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  33041. var _yield$this$appUtils$2, e, t;
  33042. return _regenerator.default.wrap(function _callee47$(_context47) {
  33043. while (1) {
  33044. switch (_context47.prev = _context47.next) {
  33045. case 0:
  33046. _context47.next = 2;
  33047. return this.appUtils.encrypt({
  33048. provider: this.provider,
  33049. spaceId: this.spaceId,
  33050. data: JSON.stringify({})
  33051. });
  33052. case 2:
  33053. _yield$this$appUtils$2 = _context47.sent;
  33054. e = _yield$this$appUtils$2.data;
  33055. t = _yield$this$appUtils$2.key;
  33056. return _context47.abrupt("return", {
  33057. verifyClientSign: e,
  33058. encryptKeyId: t
  33059. });
  33060. case 6:
  33061. case "end":
  33062. return _context47.stop();
  33063. }
  33064. }
  33065. }, _callee47, this);
  33066. }));
  33067. function platformGetSignOption() {
  33068. return _platformGetSignOption2.apply(this, arguments);
  33069. }
  33070. return platformGetSignOption;
  33071. }()
  33072. }, {
  33073. key: "platformEncryptData",
  33074. value: function () {
  33075. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48(e) {
  33076. var _yield$this$appUtils$3, t, n, s;
  33077. return _regenerator.default.wrap(function _callee48$(_context48) {
  33078. while (1) {
  33079. switch (_context48.prev = _context48.next) {
  33080. case 0:
  33081. _context48.next = 2;
  33082. return this.appUtils.encrypt({
  33083. provider: this.provider,
  33084. spaceId: this.spaceId,
  33085. data: JSON.stringify(e)
  33086. });
  33087. case 2:
  33088. _yield$this$appUtils$3 = _context48.sent;
  33089. t = _yield$this$appUtils$3.data;
  33090. n = _yield$this$appUtils$3.key;
  33091. s = {
  33092. secretType: this.secretType,
  33093. encryptKeyId: n
  33094. };
  33095. return _context48.abrupt("return", this.secretType === Rt ? {
  33096. content: e,
  33097. _uniCloudOptions: s
  33098. } : {
  33099. content: t,
  33100. _uniCloudOptions: s
  33101. });
  33102. case 7:
  33103. case "end":
  33104. return _context48.stop();
  33105. }
  33106. }
  33107. }, _callee48, this);
  33108. }));
  33109. function platformEncryptData(_x35) {
  33110. return _platformEncryptData2.apply(this, arguments);
  33111. }
  33112. return platformEncryptData;
  33113. }()
  33114. }, {
  33115. key: "platformDecryptResult",
  33116. value: function () {
  33117. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(e) {
  33118. var t, _e$_uniCloudOptions, n, s, r;
  33119. return _regenerator.default.wrap(function _callee49$(_context49) {
  33120. while (1) {
  33121. switch (_context49.prev = _context49.next) {
  33122. case 0:
  33123. t = e.content;
  33124. _e$_uniCloudOptions = e._uniCloudOptions;
  33125. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  33126. s = n.encryptKeyId;
  33127. _context49.next = 6;
  33128. return this.appUtils.decrypt({
  33129. provider: this.provider,
  33130. spaceId: this.spaceId,
  33131. data: t,
  33132. key: s
  33133. });
  33134. case 6:
  33135. r = _context49.sent;
  33136. return _context49.abrupt("return", JSON.parse(r.data));
  33137. case 8:
  33138. case "end":
  33139. return _context49.stop();
  33140. }
  33141. }
  33142. }, _callee49, this);
  33143. }));
  33144. function platformDecryptResult(_x36) {
  33145. return _platformDecryptResult2.apply(this, arguments);
  33146. }
  33147. return platformDecryptResult;
  33148. }()
  33149. }, {
  33150. key: "isClientKeyNotFound",
  33151. value: function isClientKeyNotFound() {
  33152. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  33153. var t = e.result || {};
  33154. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  33155. }
  33156. }]);
  33157. return Tn;
  33158. }(Lt);
  33159. function Pn() {
  33160. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33161. e = _ref29.secretType;
  33162. return e === xt || e === Rt || e === Ut;
  33163. }
  33164. function An() {
  33165. var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33166. e = _ref30.name,
  33167. _ref30$data = _ref30.data,
  33168. t = _ref30$data === void 0 ? {} : _ref30$data;
  33169. return "app" === P && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  33170. }
  33171. function En() {
  33172. var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33173. e = _ref31.provider,
  33174. t = _ref31.spaceId,
  33175. n = _ref31.functionName;
  33176. var _ce = ce(),
  33177. s = _ce.appId,
  33178. r = _ce.uniPlatform,
  33179. i = _ce.osName;
  33180. var o = r;
  33181. "app" === r && (o = i);
  33182. var a = function () {
  33183. var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33184. e = _ref32.provider,
  33185. t = _ref32.spaceId;
  33186. var n = T;
  33187. if (!n) return {};
  33188. e = function (e) {
  33189. return "tencent" === e ? "tcb" : e;
  33190. }(e);
  33191. var s = n.find(function (n) {
  33192. return n.provider === e && n.spaceId === t;
  33193. });
  33194. return s && s.config;
  33195. }({
  33196. provider: e,
  33197. spaceId: t
  33198. });
  33199. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  33200. var c = a.accessControl.function || {},
  33201. u = Object.keys(c);
  33202. if (0 === u.length) return !0;
  33203. var h = function (e, t) {
  33204. var n, s, r;
  33205. for (var _i2 = 0; _i2 < e.length; _i2++) {
  33206. var _o2 = e[_i2];
  33207. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  33208. return e.trim();
  33209. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  33210. }
  33211. return n || s || r;
  33212. }(u, n);
  33213. if (!h) return !1;
  33214. if ((c[h] || []).find(function () {
  33215. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  33216. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  33217. })) return !0;
  33218. 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")), vn(yn);
  33219. }
  33220. function On(_ref33) {
  33221. var e = _ref33.functionName,
  33222. t = _ref33.result,
  33223. n = _ref33.logPvd;
  33224. if (b && this.__dev__.debugLog && t && t.requestId) {
  33225. var _s11 = JSON.stringify({
  33226. spaceId: this.config.spaceId,
  33227. functionName: e,
  33228. requestId: t.requestId
  33229. });
  33230. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  33231. }
  33232. }
  33233. function xn(e) {
  33234. var t = e.callFunction,
  33235. n = function n(_n7) {
  33236. var _this18 = this;
  33237. var s = _n7.name;
  33238. _n7.data = kt.call(e, {
  33239. data: _n7.data
  33240. });
  33241. var r = {
  33242. aliyun: "aliyun",
  33243. tencent: "tcb",
  33244. tcb: "tcb"
  33245. }[this.config.provider],
  33246. i = Pn(_n7),
  33247. o = An(_n7),
  33248. a = i || o;
  33249. return t.call(this, _n7).then(function (e) {
  33250. return e.errCode = 0, !a && On.call(_this18, {
  33251. functionName: s,
  33252. result: e,
  33253. logPvd: r
  33254. }), Promise.resolve(e);
  33255. }, function (e) {
  33256. return !a && On.call(_this18, {
  33257. functionName: s,
  33258. result: e,
  33259. logPvd: r
  33260. }), e && e.message && (e.message = function () {
  33261. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33262. _ref34$message = _ref34.message,
  33263. e = _ref34$message === void 0 ? "" : _ref34$message,
  33264. _ref34$extraInfo = _ref34.extraInfo,
  33265. t = _ref34$extraInfo === void 0 ? {} : _ref34$extraInfo,
  33266. _ref34$formatter = _ref34.formatter,
  33267. n = _ref34$formatter === void 0 ? [] : _ref34$formatter;
  33268. for (var _s12 = 0; _s12 < n.length; _s12++) {
  33269. var _n$_s = n[_s12],
  33270. _r4 = _n$_s.rule,
  33271. _i3 = _n$_s.content,
  33272. _o3 = _n$_s.mode,
  33273. _a = e.match(_r4);
  33274. if (!_a) continue;
  33275. var _c = _i3;
  33276. for (var _e20 = 1; _e20 < _a.length; _e20++) {
  33277. _c = Et(_c, "{$".concat(_e20, "}"), _a[_e20]);
  33278. }
  33279. for (var _e21 in t) {
  33280. _c = Et(_c, "{".concat(_e21, "}"), t[_e21]);
  33281. }
  33282. return "replace" === _o3 ? _c : e + _c;
  33283. }
  33284. return e;
  33285. }({
  33286. message: "[".concat(_n7.name, "]: ").concat(e.message),
  33287. formatter: Tt,
  33288. extraInfo: {
  33289. functionName: s
  33290. }
  33291. })), Promise.reject(e);
  33292. });
  33293. };
  33294. e.callFunction = function (t) {
  33295. var _e$config = e.config,
  33296. s = _e$config.provider,
  33297. r = _e$config.spaceId,
  33298. i = t.name;
  33299. var o, a;
  33300. if (t.data = t.data || {}, b && e.__dev__.debugInfo && !e.__dev__.debugInfo.forceRemote && E ? (e._callCloudFunction || (e._callCloudFunction = n, e._callLocalFunction = Ct), o = Ct) : o = n, o = o.bind(e), An(t)) a = n.call(e, t);else if (function (_ref35) {
  33301. var e = _ref35.name,
  33302. _ref35$data = _ref35.data,
  33303. t = _ref35$data === void 0 ? {} : _ref35$data;
  33304. return "mp-weixin" === P && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  33305. }(t)) a = o.call(e, t);else if (Pn(t)) {
  33306. a = new Sn({
  33307. secretType: t.secretType,
  33308. uniCloudIns: e
  33309. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  33310. } else if (En({
  33311. provider: s,
  33312. spaceId: r,
  33313. functionName: i
  33314. })) {
  33315. a = new Sn({
  33316. secretType: t.secretType,
  33317. uniCloudIns: e
  33318. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  33319. } else a = o(t);
  33320. return Object.defineProperty(a, "result", {
  33321. get: function get() {
  33322. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  33323. }
  33324. }), a;
  33325. };
  33326. }
  33327. Sn = "mp-weixin" !== P && "app" !== P ? /*#__PURE__*/function () {
  33328. function _class2() {
  33329. (0, _classCallCheck2.default)(this, _class2);
  33330. throw vn({
  33331. message: "Platform ".concat(P, " is not supported by secure network")
  33332. });
  33333. }
  33334. return (0, _createClass2.default)(_class2);
  33335. }() : C ? "mp-weixin" === P ? kn : Tn : /*#__PURE__*/function () {
  33336. function _class3() {
  33337. (0, _classCallCheck2.default)(this, _class3);
  33338. throw vn({
  33339. message: "Platform ".concat(P, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  33340. });
  33341. }
  33342. return (0, _createClass2.default)(_class3);
  33343. }();
  33344. var Rn = Symbol("CLIENT_DB_INTERNAL");
  33345. function Un(e, t) {
  33346. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Rn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  33347. get: function get(e, n, s) {
  33348. if ("_uniClient" === n) return null;
  33349. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  33350. if (n in e || "string" != typeof n) {
  33351. var _t10 = e[n];
  33352. return "function" == typeof _t10 ? _t10.bind(e) : _t10;
  33353. }
  33354. return t.get(e, n, s);
  33355. }
  33356. });
  33357. }
  33358. function Ln(e) {
  33359. return {
  33360. on: function on(t, n) {
  33361. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  33362. },
  33363. off: function off(t, n) {
  33364. e[t] = e[t] || [];
  33365. var s = e[t].indexOf(n);
  33366. -1 !== s && e[t].splice(s, 1);
  33367. }
  33368. };
  33369. }
  33370. var Nn = ["db.Geo", "db.command", "command.aggregate"];
  33371. function Dn(e, t) {
  33372. return Nn.indexOf("".concat(e, ".").concat(t)) > -1;
  33373. }
  33374. function Fn(e) {
  33375. switch (g(e)) {
  33376. case "array":
  33377. return e.map(function (e) {
  33378. return Fn(e);
  33379. });
  33380. case "object":
  33381. return e._internalType === Rn || Object.keys(e).forEach(function (t) {
  33382. e[t] = Fn(e[t]);
  33383. }), e;
  33384. case "regexp":
  33385. return {
  33386. $regexp: {
  33387. source: e.source,
  33388. flags: e.flags
  33389. }
  33390. };
  33391. case "date":
  33392. return {
  33393. $date: e.toISOString()
  33394. };
  33395. default:
  33396. return e;
  33397. }
  33398. }
  33399. function qn(e) {
  33400. return e && e.content && e.content.$method;
  33401. }
  33402. var Mn = /*#__PURE__*/function () {
  33403. function Mn(e, t, n) {
  33404. (0, _classCallCheck2.default)(this, Mn);
  33405. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  33406. }
  33407. (0, _createClass2.default)(Mn, [{
  33408. key: "toJSON",
  33409. value: function toJSON() {
  33410. var e = this;
  33411. var t = [e.content];
  33412. for (; e.prevStage;) {
  33413. e = e.prevStage, t.push(e.content);
  33414. }
  33415. return {
  33416. $db: t.reverse().map(function (e) {
  33417. return {
  33418. $method: e.$method,
  33419. $param: Fn(e.$param)
  33420. };
  33421. })
  33422. };
  33423. }
  33424. }, {
  33425. key: "toString",
  33426. value: function toString() {
  33427. return JSON.stringify(this.toJSON());
  33428. }
  33429. }, {
  33430. key: "getAction",
  33431. value: function getAction() {
  33432. var e = this.toJSON().$db.find(function (e) {
  33433. return "action" === e.$method;
  33434. });
  33435. return e && e.$param && e.$param[0];
  33436. }
  33437. }, {
  33438. key: "getCommand",
  33439. value: function getCommand() {
  33440. return {
  33441. $db: this.toJSON().$db.filter(function (e) {
  33442. return "action" !== e.$method;
  33443. })
  33444. };
  33445. }
  33446. }, {
  33447. key: "isAggregate",
  33448. get: function get() {
  33449. var e = this;
  33450. for (; e;) {
  33451. var t = qn(e),
  33452. _n8 = qn(e.prevStage);
  33453. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  33454. e = e.prevStage;
  33455. }
  33456. return !1;
  33457. }
  33458. }, {
  33459. key: "isCommand",
  33460. get: function get() {
  33461. var e = this;
  33462. for (; e;) {
  33463. if ("command" === qn(e)) return !0;
  33464. e = e.prevStage;
  33465. }
  33466. return !1;
  33467. }
  33468. }, {
  33469. key: "isAggregateCommand",
  33470. get: function get() {
  33471. var e = this;
  33472. for (; e;) {
  33473. var t = qn(e),
  33474. _n9 = qn(e.prevStage);
  33475. if ("aggregate" === t && "command" === _n9) return !0;
  33476. e = e.prevStage;
  33477. }
  33478. return !1;
  33479. }
  33480. }, {
  33481. key: "getNextStageFn",
  33482. value: function getNextStageFn(e) {
  33483. var t = this;
  33484. return function () {
  33485. return Kn({
  33486. $method: e,
  33487. $param: Fn(Array.from(arguments))
  33488. }, t, t._database);
  33489. };
  33490. }
  33491. }, {
  33492. key: "count",
  33493. get: function get() {
  33494. return this.isAggregate ? this.getNextStageFn("count") : function () {
  33495. return this._send("count", Array.from(arguments));
  33496. };
  33497. }
  33498. }, {
  33499. key: "remove",
  33500. get: function get() {
  33501. return this.isCommand ? this.getNextStageFn("remove") : function () {
  33502. return this._send("remove", Array.from(arguments));
  33503. };
  33504. }
  33505. }, {
  33506. key: "get",
  33507. value: function get() {
  33508. return this._send("get", Array.from(arguments));
  33509. }
  33510. }, {
  33511. key: "add",
  33512. get: function get() {
  33513. return this.isCommand ? this.getNextStageFn("add") : function () {
  33514. return this._send("add", Array.from(arguments));
  33515. };
  33516. }
  33517. }, {
  33518. key: "update",
  33519. value: function update() {
  33520. return this._send("update", Array.from(arguments));
  33521. }
  33522. }, {
  33523. key: "end",
  33524. value: function end() {
  33525. return this._send("end", Array.from(arguments));
  33526. }
  33527. }, {
  33528. key: "set",
  33529. get: function get() {
  33530. return this.isCommand ? this.getNextStageFn("set") : function () {
  33531. throw new Error("JQL禁止使用set方法");
  33532. };
  33533. }
  33534. }, {
  33535. key: "_send",
  33536. value: function _send(e, t) {
  33537. var n = this.getAction(),
  33538. s = this.getCommand();
  33539. if (s.$db.push({
  33540. $method: e,
  33541. $param: Fn(t)
  33542. }), b) {
  33543. var _e22 = s.$db.find(function (e) {
  33544. return "collection" === e.$method;
  33545. }),
  33546. _t11 = _e22 && _e22.$param;
  33547. _t11 && 1 === _t11.length && "string" == typeof _e22.$param[0] && _e22.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  33548. }
  33549. return this._database._callCloudFunction({
  33550. action: n,
  33551. command: s
  33552. });
  33553. }
  33554. }]);
  33555. return Mn;
  33556. }();
  33557. function Kn(e, t, n) {
  33558. return Un(new Mn(e, t, n), {
  33559. get: function get(e, t) {
  33560. var s = "db";
  33561. return e && e.content && (s = e.content.$method), Dn(s, t) ? Kn({
  33562. $method: t
  33563. }, e, n) : function () {
  33564. return Kn({
  33565. $method: t,
  33566. $param: Fn(Array.from(arguments))
  33567. }, e, n);
  33568. };
  33569. }
  33570. });
  33571. }
  33572. function jn(_ref36) {
  33573. var e = _ref36.path,
  33574. t = _ref36.method;
  33575. return /*#__PURE__*/function () {
  33576. function _class4() {
  33577. (0, _classCallCheck2.default)(this, _class4);
  33578. this.param = Array.from(arguments);
  33579. }
  33580. (0, _createClass2.default)(_class4, [{
  33581. key: "toJSON",
  33582. value: function toJSON() {
  33583. return {
  33584. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  33585. return {
  33586. $method: e
  33587. };
  33588. })), [{
  33589. $method: t,
  33590. $param: this.param
  33591. }])
  33592. };
  33593. }
  33594. }, {
  33595. key: "toString",
  33596. value: function toString() {
  33597. return JSON.stringify(this.toJSON());
  33598. }
  33599. }]);
  33600. return _class4;
  33601. }();
  33602. }
  33603. function Bn(e) {
  33604. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  33605. return Un(new e(t), {
  33606. get: function get(e, t) {
  33607. return Dn("db", t) ? Kn({
  33608. $method: t
  33609. }, null, e) : function () {
  33610. return Kn({
  33611. $method: t,
  33612. $param: Fn(Array.from(arguments))
  33613. }, null, e);
  33614. };
  33615. }
  33616. });
  33617. }
  33618. var $n = /*#__PURE__*/function (_ref37) {
  33619. (0, _inherits2.default)($n, _ref37);
  33620. var _super11 = _createSuper($n);
  33621. function $n() {
  33622. (0, _classCallCheck2.default)(this, $n);
  33623. return _super11.apply(this, arguments);
  33624. }
  33625. (0, _createClass2.default)($n, [{
  33626. key: "_parseResult",
  33627. value: function _parseResult(e) {
  33628. return this._isJQL ? e.result : e;
  33629. }
  33630. }, {
  33631. key: "_callCloudFunction",
  33632. value: function _callCloudFunction(_ref38) {
  33633. var _this19 = this;
  33634. var e = _ref38.action,
  33635. t = _ref38.command,
  33636. n = _ref38.multiCommand,
  33637. s = _ref38.queryList;
  33638. function r(e, t) {
  33639. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  33640. var _r5 = s[_n10];
  33641. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  33642. }
  33643. }
  33644. var i = this,
  33645. o = this._isJQL ? "databaseForJQL" : "database";
  33646. function a(e) {
  33647. return i._callback("error", [e]), q(M(o, "fail"), e).then(function () {
  33648. return q(M(o, "complete"), e);
  33649. }).then(function () {
  33650. return r(null, e), Q(B, {
  33651. type: z,
  33652. content: e
  33653. }), Promise.reject(e);
  33654. });
  33655. }
  33656. var c = q(M(o, "invoke")),
  33657. u = this._uniClient;
  33658. return c.then(function () {
  33659. return u.callFunction({
  33660. name: "DCloud-clientDB",
  33661. type: l,
  33662. data: {
  33663. action: e,
  33664. command: t,
  33665. multiCommand: n
  33666. }
  33667. });
  33668. }).then(function (e) {
  33669. var _e$result = e.result,
  33670. t = _e$result.code,
  33671. n = _e$result.message,
  33672. s = _e$result.token,
  33673. c = _e$result.tokenExpired,
  33674. _e$result$systemInfo = _e$result.systemInfo,
  33675. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  33676. if (u) for (var _e23 = 0; _e23 < u.length; _e23++) {
  33677. var _u$_e = u[_e23],
  33678. _t12 = _u$_e.level,
  33679. _n11 = _u$_e.message,
  33680. _s13 = _u$_e.detail,
  33681. _r6 = console["app" === P && "warn" === _t12 ? "error" : _t12] || console.log;
  33682. var _i4 = "[System Info]" + _n11;
  33683. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  33684. }
  33685. if (t) {
  33686. return a(new ne({
  33687. code: t,
  33688. message: n,
  33689. requestId: e.requestId
  33690. }));
  33691. }
  33692. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (ie({
  33693. token: s,
  33694. tokenExpired: c
  33695. }), _this19._callbackAuth("refreshToken", [{
  33696. token: s,
  33697. tokenExpired: c
  33698. }]), _this19._callback("refreshToken", [{
  33699. token: s,
  33700. tokenExpired: c
  33701. }]), Q(W, {
  33702. token: s,
  33703. tokenExpired: c
  33704. }));
  33705. var h = [{
  33706. prop: "affectedDocs",
  33707. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  33708. }, {
  33709. prop: "code",
  33710. tips: "code不再推荐使用,请使用errCode替代"
  33711. }, {
  33712. prop: "message",
  33713. tips: "message不再推荐使用,请使用errMsg替代"
  33714. }];
  33715. var _loop2 = function _loop2(_t13) {
  33716. var _h$_t = h[_t13],
  33717. n = _h$_t.prop,
  33718. s = _h$_t.tips;
  33719. if (n in e.result) {
  33720. var _t14 = e.result[n];
  33721. Object.defineProperty(e.result, n, {
  33722. get: function get() {
  33723. return console.warn(s), _t14;
  33724. }
  33725. });
  33726. }
  33727. };
  33728. for (var _t13 = 0; _t13 < h.length; _t13++) {
  33729. _loop2(_t13);
  33730. }
  33731. return function (e) {
  33732. return q(M(o, "success"), e).then(function () {
  33733. return q(M(o, "complete"), e);
  33734. }).then(function () {
  33735. r(e, null);
  33736. var t = i._parseResult(e);
  33737. return Q(B, {
  33738. type: z,
  33739. content: t
  33740. }), Promise.resolve(t);
  33741. });
  33742. }(e);
  33743. }, function (e) {
  33744. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  33745. return a(new ne({
  33746. code: e.code || "SYSTEM_ERROR",
  33747. message: e.message,
  33748. requestId: e.requestId
  33749. }));
  33750. });
  33751. }
  33752. }]);
  33753. return $n;
  33754. }( /*#__PURE__*/function () {
  33755. function _class5() {
  33756. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33757. _ref39$uniClient = _ref39.uniClient,
  33758. e = _ref39$uniClient === void 0 ? {} : _ref39$uniClient,
  33759. _ref39$isJQL = _ref39.isJQL,
  33760. t = _ref39$isJQL === void 0 ? !1 : _ref39$isJQL;
  33761. (0, _classCallCheck2.default)(this, _class5);
  33762. this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e._isDefault && (this._dbCallBacks = U("_globalUniCloudDatabaseCallback")), t || (this.auth = Ln(this._authCallBacks)), this._isJQL = t, Object.assign(this, Ln(this._dbCallBacks)), this.env = Un({}, {
  33763. get: function get(e, t) {
  33764. return {
  33765. $env: t
  33766. };
  33767. }
  33768. }), this.Geo = Un({}, {
  33769. get: function get(e, t) {
  33770. return jn({
  33771. path: ["Geo"],
  33772. method: t
  33773. });
  33774. }
  33775. }), this.serverDate = jn({
  33776. path: [],
  33777. method: "serverDate"
  33778. }), this.RegExp = jn({
  33779. path: [],
  33780. method: "RegExp"
  33781. });
  33782. }
  33783. (0, _createClass2.default)(_class5, [{
  33784. key: "getCloudEnv",
  33785. value: function getCloudEnv(e) {
  33786. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  33787. return {
  33788. $env: e.replace("$cloudEnv_", "")
  33789. };
  33790. }
  33791. }, {
  33792. key: "_callback",
  33793. value: function _callback(e, t) {
  33794. var n = this._dbCallBacks;
  33795. n[e] && n[e].forEach(function (e) {
  33796. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  33797. });
  33798. }
  33799. }, {
  33800. key: "_callbackAuth",
  33801. value: function _callbackAuth(e, t) {
  33802. var n = this._authCallBacks;
  33803. n[e] && n[e].forEach(function (e) {
  33804. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  33805. });
  33806. }
  33807. }, {
  33808. key: "multiSend",
  33809. value: function multiSend() {
  33810. var e = Array.from(arguments),
  33811. t = e.map(function (e) {
  33812. var t = e.getAction(),
  33813. n = e.getCommand();
  33814. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  33815. return {
  33816. action: t,
  33817. command: n
  33818. };
  33819. });
  33820. return this._callCloudFunction({
  33821. multiCommand: t,
  33822. queryList: e
  33823. });
  33824. }
  33825. }]);
  33826. return _class5;
  33827. }());
  33828. var Wn = "token无效,跳转登录页面",
  33829. zn = "token过期,跳转登录页面",
  33830. Jn = {
  33831. TOKEN_INVALID_TOKEN_EXPIRED: zn,
  33832. TOKEN_INVALID_INVALID_CLIENTID: Wn,
  33833. TOKEN_INVALID: Wn,
  33834. TOKEN_INVALID_WRONG_TOKEN: Wn,
  33835. TOKEN_INVALID_ANONYMOUS_USER: Wn
  33836. },
  33837. Hn = {
  33838. "uni-id-token-expired": zn,
  33839. "uni-id-check-token-failed": Wn,
  33840. "uni-id-token-not-exist": Wn,
  33841. "uni-id-check-device-feature-failed": Wn
  33842. };
  33843. function Gn(e, t) {
  33844. var n = "";
  33845. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  33846. }
  33847. function Vn() {
  33848. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  33849. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  33850. var n = [],
  33851. s = [];
  33852. return e.forEach(function (e) {
  33853. !0 === e.needLogin ? n.push(Gn(t, e.path)) : !1 === e.needLogin && s.push(Gn(t, e.path));
  33854. }), {
  33855. needLoginPage: n,
  33856. notNeedLoginPage: s
  33857. };
  33858. }
  33859. function Yn(e) {
  33860. return e.split("?")[0].replace(/^\//, "");
  33861. }
  33862. function Qn() {
  33863. return function (e) {
  33864. var t = e && e.$page && e.$page.fullPath || "";
  33865. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  33866. }(function () {
  33867. var e = getCurrentPages();
  33868. return e[e.length - 1];
  33869. }());
  33870. }
  33871. function Xn() {
  33872. return Yn(Qn());
  33873. }
  33874. function Zn() {
  33875. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  33876. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  33877. if (!e) return !1;
  33878. if (!(t && t.list && t.list.length)) return !1;
  33879. var n = t.list,
  33880. s = Yn(e);
  33881. return n.some(function (e) {
  33882. return e.pagePath === s;
  33883. });
  33884. }
  33885. var es = !!_pages.default.uniIdRouter;
  33886. var _ref40 = function () {
  33887. var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  33888. _ref21$pages = _ref21.pages,
  33889. e = _ref21$pages === void 0 ? [] : _ref21$pages,
  33890. _ref21$subPackages = _ref21.subPackages,
  33891. n = _ref21$subPackages === void 0 ? [] : _ref21$subPackages,
  33892. _ref21$uniIdRouter = _ref21.uniIdRouter,
  33893. s = _ref21$uniIdRouter === void 0 ? {} : _ref21$uniIdRouter,
  33894. _ref21$tabBar = _ref21.tabBar,
  33895. r = _ref21$tabBar === void 0 ? {} : _ref21$tabBar;
  33896. var i = s.loginPage,
  33897. _s$needLogin = s.needLogin,
  33898. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  33899. _s$resToLogin = s.resToLogin,
  33900. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  33901. _Vn = Vn(e),
  33902. c = _Vn.needLoginPage,
  33903. u = _Vn.notNeedLoginPage,
  33904. _ref23 = function () {
  33905. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  33906. var t = [],
  33907. n = [];
  33908. return e.forEach(function (e) {
  33909. var s = e.root,
  33910. _e$pages = e.pages,
  33911. r = _e$pages === void 0 ? [] : _e$pages,
  33912. _Vn2 = Vn(r, s),
  33913. i = _Vn2.needLoginPage,
  33914. o = _Vn2.notNeedLoginPage;
  33915. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  33916. }), {
  33917. needLoginPage: t,
  33918. notNeedLoginPage: n
  33919. };
  33920. }(n),
  33921. h = _ref23.needLoginPage,
  33922. l = _ref23.notNeedLoginPage;
  33923. return {
  33924. loginPage: i,
  33925. routerNeedLogin: o,
  33926. resToLogin: a,
  33927. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  33928. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  33929. loginPageInTabBar: Zn(i, r)
  33930. };
  33931. }(),
  33932. ts = _ref40.loginPage,
  33933. ns = _ref40.routerNeedLogin,
  33934. ss = _ref40.resToLogin,
  33935. rs = _ref40.needLoginPage,
  33936. is = _ref40.notNeedLoginPage,
  33937. os = _ref40.loginPageInTabBar;
  33938. if (rs.indexOf(ts) > -1) throw new Error("Login page [".concat(ts, "] should not be \"needLogin\", please check your pages.json"));
  33939. function as(e) {
  33940. var t = Xn();
  33941. if ("/" === e.charAt(0)) return e;
  33942. var _e$split = e.split("?"),
  33943. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  33944. n = _e$split2[0],
  33945. s = _e$split2[1],
  33946. r = n.replace(/^\//, "").split("/"),
  33947. i = t.split("/");
  33948. i.pop();
  33949. for (var _e24 = 0; _e24 < r.length; _e24++) {
  33950. var _t15 = r[_e24];
  33951. ".." === _t15 ? i.pop() : "." !== _t15 && i.push(_t15);
  33952. }
  33953. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  33954. }
  33955. function cs(e) {
  33956. var t = Yn(as(e));
  33957. return !(is.indexOf(t) > -1) && (rs.indexOf(t) > -1 || ns.some(function (t) {
  33958. return function (e, t) {
  33959. return new RegExp(t).test(e);
  33960. }(e, t);
  33961. }));
  33962. }
  33963. function us(_ref41) {
  33964. var e = _ref41.redirect;
  33965. var t = Yn(e),
  33966. n = Yn(ts);
  33967. return Xn() !== n && t !== n;
  33968. }
  33969. function hs() {
  33970. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33971. e = _ref42.api,
  33972. t = _ref42.redirect;
  33973. if (!t || !us({
  33974. redirect: t
  33975. })) return;
  33976. var n = function (e, t) {
  33977. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  33978. }(ts, t);
  33979. os ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  33980. var s = {
  33981. navigateTo: uni.navigateTo,
  33982. redirectTo: uni.redirectTo,
  33983. switchTab: uni.switchTab,
  33984. reLaunch: uni.reLaunch
  33985. };
  33986. setTimeout(function () {
  33987. s[e]({
  33988. url: n
  33989. });
  33990. });
  33991. }
  33992. function ls() {
  33993. var _ref43 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33994. e = _ref43.url;
  33995. var t = {
  33996. abortLoginPageJump: !1,
  33997. autoToLoginPage: !1
  33998. },
  33999. n = function () {
  34000. var _re3 = re(),
  34001. e = _re3.token,
  34002. t = _re3.tokenExpired;
  34003. var n;
  34004. if (e) {
  34005. if (t < Date.now()) {
  34006. var _e25 = "uni-id-token-expired";
  34007. n = {
  34008. errCode: _e25,
  34009. errMsg: Hn[_e25]
  34010. };
  34011. }
  34012. } else {
  34013. var _e26 = "uni-id-check-token-failed";
  34014. n = {
  34015. errCode: _e26,
  34016. errMsg: Hn[_e26]
  34017. };
  34018. }
  34019. return n;
  34020. }();
  34021. if (cs(e) && n) {
  34022. n.uniIdRedirectUrl = e;
  34023. if (G($).length > 0) return setTimeout(function () {
  34024. Q($, n);
  34025. }, 0), t.abortLoginPageJump = !0, t;
  34026. t.autoToLoginPage = !0;
  34027. }
  34028. return t;
  34029. }
  34030. function ds() {
  34031. !function () {
  34032. var e = Qn(),
  34033. _ls = ls({
  34034. url: e
  34035. }),
  34036. t = _ls.abortLoginPageJump,
  34037. n = _ls.autoToLoginPage;
  34038. t || n && hs({
  34039. api: "redirectTo",
  34040. redirect: e
  34041. });
  34042. }();
  34043. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  34044. var _loop3 = function _loop3(_t16) {
  34045. var n = e[_t16];
  34046. uni.addInterceptor(n, {
  34047. invoke: function invoke(e) {
  34048. var _ls2 = ls({
  34049. url: e.url
  34050. }),
  34051. t = _ls2.abortLoginPageJump,
  34052. s = _ls2.autoToLoginPage;
  34053. return t ? e : s ? (hs({
  34054. api: n,
  34055. redirect: as(e.url)
  34056. }), !1) : e;
  34057. }
  34058. });
  34059. };
  34060. for (var _t16 = 0; _t16 < e.length; _t16++) {
  34061. _loop3(_t16);
  34062. }
  34063. }
  34064. function ps() {
  34065. this.onResponse(function (e) {
  34066. var t = e.type,
  34067. n = e.content;
  34068. var s = !1;
  34069. switch (t) {
  34070. case "cloudobject":
  34071. s = function (e) {
  34072. if ("object" != (0, _typeof2.default)(e)) return !1;
  34073. var _ref44 = e || {},
  34074. t = _ref44.errCode;
  34075. return t in Hn;
  34076. }(n);
  34077. break;
  34078. case "clientdb":
  34079. s = function (e) {
  34080. if ("object" != (0, _typeof2.default)(e)) return !1;
  34081. var _ref45 = e || {},
  34082. t = _ref45.errCode;
  34083. return t in Jn;
  34084. }(n);
  34085. }
  34086. s && function () {
  34087. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  34088. var t = G($);
  34089. ee().then(function () {
  34090. var n = Qn();
  34091. if (n && us({
  34092. redirect: n
  34093. })) return t.length > 0 ? Q($, Object.assign({
  34094. uniIdRedirectUrl: n
  34095. }, e)) : void (ts && hs({
  34096. api: "navigateTo",
  34097. redirect: n
  34098. }));
  34099. });
  34100. }(n);
  34101. });
  34102. }
  34103. function fs(e) {
  34104. !function (e) {
  34105. e.onResponse = function (e) {
  34106. V(B, e);
  34107. }, e.offResponse = function (e) {
  34108. Y(B, e);
  34109. };
  34110. }(e), function (e) {
  34111. e.onNeedLogin = function (e) {
  34112. V($, e);
  34113. }, e.offNeedLogin = function (e) {
  34114. Y($, e);
  34115. }, es && (U("_globalUniCloudStatus").needLoginInit || (U("_globalUniCloudStatus").needLoginInit = !0, ee().then(function () {
  34116. ds.call(e);
  34117. }), ss && ps.call(e)));
  34118. }(e), function (e) {
  34119. e.onRefreshToken = function (e) {
  34120. V(W, e);
  34121. }, e.offRefreshToken = function (e) {
  34122. Y(W, e);
  34123. };
  34124. }(e);
  34125. }
  34126. var gs;
  34127. var ms = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  34128. ys = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  34129. function _s() {
  34130. var e = re().token || "",
  34131. t = e.split(".");
  34132. if (!e || 3 !== t.length) return {
  34133. uid: null,
  34134. role: [],
  34135. permission: [],
  34136. tokenExpired: 0
  34137. };
  34138. var n;
  34139. try {
  34140. n = JSON.parse((s = t[1], decodeURIComponent(gs(s).split("").map(function (e) {
  34141. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  34142. }).join(""))));
  34143. } catch (e) {
  34144. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  34145. }
  34146. var s;
  34147. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  34148. }
  34149. gs = "function" != typeof atob ? function (e) {
  34150. if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !ys.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  34151. var t;
  34152. e += "==".slice(2 - (3 & e.length));
  34153. for (var n, s, r = "", i = 0; i < e.length;) {
  34154. t = ms.indexOf(e.charAt(i++)) << 18 | ms.indexOf(e.charAt(i++)) << 12 | (n = ms.indexOf(e.charAt(i++))) << 6 | (s = ms.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);
  34155. }
  34156. return r;
  34157. } : atob;
  34158. var ws = s(function (e, t) {
  34159. Object.defineProperty(t, "__esModule", {
  34160. value: !0
  34161. });
  34162. var n = "chooseAndUploadFile:ok",
  34163. s = "chooseAndUploadFile:fail";
  34164. function r(e, t) {
  34165. return e.tempFiles.forEach(function (e, n) {
  34166. 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("."));
  34167. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  34168. return e.path;
  34169. })), e;
  34170. }
  34171. function i(e, t, _ref46) {
  34172. var s = _ref46.onChooseFile,
  34173. r = _ref46.onUploadProgress;
  34174. return t.then(function (e) {
  34175. if (s) {
  34176. var _t17 = s(e);
  34177. if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {
  34178. return void 0 === t ? e : t;
  34179. });
  34180. }
  34181. return e;
  34182. }).then(function (t) {
  34183. return !1 === t ? {
  34184. errMsg: n,
  34185. tempFilePaths: [],
  34186. tempFiles: []
  34187. } : function (e, t) {
  34188. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  34189. var r = arguments.length > 3 ? arguments[3] : undefined;
  34190. (t = Object.assign({}, t)).errMsg = n;
  34191. var i = t.tempFiles,
  34192. o = i.length;
  34193. var a = 0;
  34194. return new Promise(function (n) {
  34195. for (; a < s;) {
  34196. c();
  34197. }
  34198. function c() {
  34199. var s = a++;
  34200. if (s >= o) return void (!i.find(function (e) {
  34201. return !e.url && !e.errMsg;
  34202. }) && n(t));
  34203. var u = i[s];
  34204. e.uploadFile({
  34205. filePath: u.path,
  34206. cloudPath: u.cloudPath,
  34207. fileType: u.fileType,
  34208. onUploadProgress: function onUploadProgress(e) {
  34209. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  34210. }
  34211. }).then(function (e) {
  34212. u.url = e.fileID, s < o && c();
  34213. }).catch(function (e) {
  34214. u.errMsg = e.errMsg || e.message, s < o && c();
  34215. });
  34216. }
  34217. });
  34218. }(e, t, 5, r);
  34219. });
  34220. }
  34221. t.initChooseAndUploadFile = function (e) {
  34222. return function () {
  34223. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  34224. type: "all"
  34225. };
  34226. return "image" === t.type ? i(e, function (e) {
  34227. var t = e.count,
  34228. n = e.sizeType,
  34229. _e$sourceType = e.sourceType,
  34230. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  34231. o = e.extension;
  34232. return new Promise(function (e, a) {
  34233. uni.chooseImage({
  34234. count: t,
  34235. sizeType: n,
  34236. sourceType: i,
  34237. extension: o,
  34238. success: function success(t) {
  34239. e(r(t, "image"));
  34240. },
  34241. fail: function fail(e) {
  34242. a({
  34243. errMsg: e.errMsg.replace("chooseImage:fail", s)
  34244. });
  34245. }
  34246. });
  34247. });
  34248. }(t), t) : "video" === t.type ? i(e, function (e) {
  34249. var t = e.camera,
  34250. n = e.compressed,
  34251. i = e.maxDuration,
  34252. _e$sourceType2 = e.sourceType,
  34253. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  34254. a = e.extension;
  34255. return new Promise(function (e, c) {
  34256. uni.chooseVideo({
  34257. camera: t,
  34258. compressed: n,
  34259. maxDuration: i,
  34260. sourceType: o,
  34261. extension: a,
  34262. success: function success(t) {
  34263. var n = t.tempFilePath,
  34264. s = t.duration,
  34265. i = t.size,
  34266. o = t.height,
  34267. a = t.width;
  34268. e(r({
  34269. errMsg: "chooseVideo:ok",
  34270. tempFilePaths: [n],
  34271. tempFiles: [{
  34272. name: t.tempFile && t.tempFile.name || "",
  34273. path: n,
  34274. size: i,
  34275. type: t.tempFile && t.tempFile.type || "",
  34276. width: a,
  34277. height: o,
  34278. duration: s,
  34279. fileType: "video",
  34280. cloudPath: ""
  34281. }]
  34282. }, "video"));
  34283. },
  34284. fail: function fail(e) {
  34285. c({
  34286. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  34287. });
  34288. }
  34289. });
  34290. });
  34291. }(t), t) : i(e, function (e) {
  34292. var t = e.count,
  34293. n = e.extension;
  34294. return new Promise(function (e, i) {
  34295. var o = uni.chooseFile;
  34296. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  34297. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  34298. });
  34299. o({
  34300. type: "all",
  34301. count: t,
  34302. extension: n,
  34303. success: function success(t) {
  34304. e(r(t));
  34305. },
  34306. fail: function fail(e) {
  34307. i({
  34308. errMsg: e.errMsg.replace("chooseFile:fail", s)
  34309. });
  34310. }
  34311. });
  34312. });
  34313. }(t), t);
  34314. };
  34315. };
  34316. }),
  34317. vs = n(ws);
  34318. var Is = "manual";
  34319. function Ss(e) {
  34320. return {
  34321. props: {
  34322. localdata: {
  34323. type: Array,
  34324. default: function _default() {
  34325. return [];
  34326. }
  34327. },
  34328. options: {
  34329. type: [Object, Array],
  34330. default: function _default() {
  34331. return {};
  34332. }
  34333. },
  34334. spaceInfo: {
  34335. type: Object,
  34336. default: function _default() {
  34337. return {};
  34338. }
  34339. },
  34340. collection: {
  34341. type: [String, Array],
  34342. default: ""
  34343. },
  34344. action: {
  34345. type: String,
  34346. default: ""
  34347. },
  34348. field: {
  34349. type: String,
  34350. default: ""
  34351. },
  34352. orderby: {
  34353. type: String,
  34354. default: ""
  34355. },
  34356. where: {
  34357. type: [String, Object],
  34358. default: ""
  34359. },
  34360. pageData: {
  34361. type: String,
  34362. default: "add"
  34363. },
  34364. pageCurrent: {
  34365. type: Number,
  34366. default: 1
  34367. },
  34368. pageSize: {
  34369. type: Number,
  34370. default: 20
  34371. },
  34372. getcount: {
  34373. type: [Boolean, String],
  34374. default: !1
  34375. },
  34376. gettree: {
  34377. type: [Boolean, String],
  34378. default: !1
  34379. },
  34380. gettreepath: {
  34381. type: [Boolean, String],
  34382. default: !1
  34383. },
  34384. startwith: {
  34385. type: String,
  34386. default: ""
  34387. },
  34388. limitlevel: {
  34389. type: Number,
  34390. default: 10
  34391. },
  34392. groupby: {
  34393. type: String,
  34394. default: ""
  34395. },
  34396. groupField: {
  34397. type: String,
  34398. default: ""
  34399. },
  34400. distinct: {
  34401. type: [Boolean, String],
  34402. default: !1
  34403. },
  34404. foreignKey: {
  34405. type: String,
  34406. default: ""
  34407. },
  34408. loadtime: {
  34409. type: String,
  34410. default: "auto"
  34411. },
  34412. manual: {
  34413. type: Boolean,
  34414. default: !1
  34415. }
  34416. },
  34417. data: function data() {
  34418. return {
  34419. mixinDatacomLoading: !1,
  34420. mixinDatacomHasMore: !1,
  34421. mixinDatacomResData: [],
  34422. mixinDatacomErrorMessage: "",
  34423. mixinDatacomPage: {}
  34424. };
  34425. },
  34426. created: function created() {
  34427. var _this20 = this;
  34428. this.mixinDatacomPage = {
  34429. current: this.pageCurrent,
  34430. size: this.pageSize,
  34431. count: 0
  34432. }, this.$watch(function () {
  34433. var e = [];
  34434. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  34435. e.push(_this20[t]);
  34436. }), e;
  34437. }, function (e, t) {
  34438. if (_this20.loadtime === Is) return;
  34439. var n = !1;
  34440. var s = [];
  34441. for (var _r7 = 2; _r7 < e.length; _r7++) {
  34442. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  34443. }
  34444. e[0] !== t[0] && (_this20.mixinDatacomPage.current = _this20.pageCurrent), _this20.mixinDatacomPage.size = _this20.pageSize, _this20.onMixinDatacomPropsChange(n, s);
  34445. });
  34446. },
  34447. methods: {
  34448. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  34449. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  34450. var _this21 = this;
  34451. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  34452. _ref47$getone = _ref47.getone,
  34453. e = _ref47$getone === void 0 ? !1 : _ref47$getone,
  34454. t = _ref47.success,
  34455. n = _ref47.fail;
  34456. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  34457. _this21.mixinDatacomLoading = !1;
  34458. var _n$result = n.result,
  34459. s = _n$result.data,
  34460. r = _n$result.count;
  34461. _this21.getcount && (_this21.mixinDatacomPage.count = r), _this21.mixinDatacomHasMore = s.length < _this21.pageSize;
  34462. var i = e ? s.length ? s[0] : void 0 : s;
  34463. _this21.mixinDatacomResData = i, t && t(i);
  34464. }).catch(function (e) {
  34465. _this21.mixinDatacomLoading = !1, _this21.mixinDatacomErrorMessage = e, n && n(e);
  34466. }));
  34467. },
  34468. mixinDatacomGet: function mixinDatacomGet() {
  34469. var _n12;
  34470. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  34471. var n = e.database(this.spaceInfo);
  34472. var s = t.action || this.action;
  34473. s && (n = n.action(s));
  34474. var r = t.collection || this.collection;
  34475. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  34476. var i = t.where || this.where;
  34477. i && Object.keys(i).length && (n = n.where(i));
  34478. var o = t.field || this.field;
  34479. o && (n = n.field(o));
  34480. var a = t.foreignKey || this.foreignKey;
  34481. a && (n = n.foreignKey(a));
  34482. var c = t.groupby || this.groupby;
  34483. c && (n = n.groupBy(c));
  34484. var u = t.groupField || this.groupField;
  34485. u && (n = n.groupField(u));
  34486. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  34487. var h = t.orderby || this.orderby;
  34488. h && (n = n.orderBy(h));
  34489. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  34490. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  34491. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  34492. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  34493. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  34494. m = {
  34495. getCount: p
  34496. },
  34497. y = {
  34498. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  34499. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  34500. };
  34501. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  34502. }
  34503. }
  34504. };
  34505. }
  34506. function bs(e) {
  34507. return function (t) {
  34508. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  34509. n = function (e) {
  34510. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  34511. 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;
  34512. }({
  34513. customUI: !1,
  34514. loadingOptions: {
  34515. title: "加载中...",
  34516. mask: !0
  34517. },
  34518. errorOptions: {
  34519. type: "modal",
  34520. retry: !1
  34521. }
  34522. }, n);
  34523. var _n13 = n,
  34524. s = _n13.customUI,
  34525. r = _n13.loadingOptions,
  34526. i = _n13.errorOptions,
  34527. o = _n13.parseSystemError,
  34528. a = !s;
  34529. return new Proxy({}, {
  34530. get: function get(s, c) {
  34531. return function () {
  34532. var _ref48 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  34533. e = _ref48.fn,
  34534. t = _ref48.interceptorName,
  34535. n = _ref48.getCallbackArgs;
  34536. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  34537. var _len2,
  34538. s,
  34539. _key2,
  34540. r,
  34541. i,
  34542. o,
  34543. _args = arguments;
  34544. return _regenerator.default.wrap(function _callee50$(_context50) {
  34545. while (1) {
  34546. switch (_context50.prev = _context50.next) {
  34547. case 0:
  34548. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  34549. s[_key2] = _args[_key2];
  34550. }
  34551. r = n ? n({
  34552. params: s
  34553. }) : {};
  34554. _context50.prev = 2;
  34555. _context50.next = 5;
  34556. return q(M(t, "invoke"), _objectSpread({}, r));
  34557. case 5:
  34558. _context50.next = 7;
  34559. return e.apply(void 0, s);
  34560. case 7:
  34561. i = _context50.sent;
  34562. _context50.next = 10;
  34563. return q(M(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  34564. result: i
  34565. }));
  34566. case 10:
  34567. return _context50.abrupt("return", i);
  34568. case 13:
  34569. _context50.prev = 13;
  34570. _context50.t0 = _context50["catch"](2);
  34571. o = _context50.t0;
  34572. _context50.next = 18;
  34573. return q(M(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  34574. error: o
  34575. }));
  34576. case 18:
  34577. throw o;
  34578. case 19:
  34579. _context50.prev = 19;
  34580. _context50.next = 22;
  34581. return q(M(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  34582. error: o
  34583. }) : _objectSpread(_objectSpread({}, r), {}, {
  34584. result: i
  34585. }));
  34586. case 22:
  34587. return _context50.finish(19);
  34588. case 23:
  34589. case "end":
  34590. return _context50.stop();
  34591. }
  34592. }
  34593. }, _callee50, null, [[2, 13, 19, 23]]);
  34594. }));
  34595. }({
  34596. fn: function () {
  34597. var _s14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  34598. var l,
  34599. _len3,
  34600. u,
  34601. _key3,
  34602. d,
  34603. p,
  34604. _ref50,
  34605. f,
  34606. g,
  34607. m,
  34608. y,
  34609. _e27,
  34610. _yield,
  34611. _t18,
  34612. _n14,
  34613. _args4 = arguments;
  34614. return _regenerator.default.wrap(function _callee52$(_context52) {
  34615. while (1) {
  34616. switch (_context52.prev = _context52.next) {
  34617. case 0:
  34618. a && uni.showLoading({
  34619. title: r.title,
  34620. mask: r.mask
  34621. });
  34622. for (_len3 = _args4.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  34623. u[_key3] = _args4[_key3];
  34624. }
  34625. d = {
  34626. name: t,
  34627. type: h,
  34628. data: {
  34629. method: c,
  34630. params: u
  34631. }
  34632. };
  34633. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  34634. var n = t.data.method,
  34635. s = e.secretMethods || {},
  34636. r = s[n] || s["*"];
  34637. r && (t.secretType = r);
  34638. }(n, d);
  34639. p = !1;
  34640. _context52.prev = 5;
  34641. _context52.next = 8;
  34642. return e.callFunction(d);
  34643. case 8:
  34644. l = _context52.sent;
  34645. _context52.next = 14;
  34646. break;
  34647. case 11:
  34648. _context52.prev = 11;
  34649. _context52.t0 = _context52["catch"](5);
  34650. p = !0, l = {
  34651. result: new ne(_context52.t0)
  34652. };
  34653. case 14:
  34654. _ref50 = l.result || {}, f = _ref50.errSubject, g = _ref50.errCode, m = _ref50.errMsg, y = _ref50.newToken;
  34655. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (ie(y), Q(W, _objectSpread({}, y))), g)) {
  34656. _context52.next = 39;
  34657. break;
  34658. }
  34659. _e27 = m;
  34660. if (!(p && o)) {
  34661. _context52.next = 24;
  34662. break;
  34663. }
  34664. _context52.next = 20;
  34665. return o({
  34666. objectName: t,
  34667. methodName: c,
  34668. params: u,
  34669. errSubject: f,
  34670. errCode: g,
  34671. errMsg: m
  34672. });
  34673. case 20:
  34674. _context52.t1 = _context52.sent.errMsg;
  34675. if (_context52.t1) {
  34676. _context52.next = 23;
  34677. break;
  34678. }
  34679. _context52.t1 = m;
  34680. case 23:
  34681. _e27 = _context52.t1;
  34682. case 24:
  34683. if (!a) {
  34684. _context52.next = 37;
  34685. break;
  34686. }
  34687. if (!("toast" === i.type)) {
  34688. _context52.next = 29;
  34689. break;
  34690. }
  34691. uni.showToast({
  34692. title: _e27,
  34693. icon: "none"
  34694. });
  34695. _context52.next = 37;
  34696. break;
  34697. case 29:
  34698. if (!("modal" !== i.type)) {
  34699. _context52.next = 31;
  34700. break;
  34701. }
  34702. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  34703. case 31:
  34704. _context52.next = 33;
  34705. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  34706. var _ref52,
  34707. e,
  34708. t,
  34709. n,
  34710. s,
  34711. r,
  34712. _args2 = arguments;
  34713. return _regenerator.default.wrap(function _callee51$(_context51) {
  34714. while (1) {
  34715. switch (_context51.prev = _context51.next) {
  34716. case 0:
  34717. _ref52 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref52.title, t = _ref52.content, n = _ref52.showCancel, s = _ref52.cancelText, r = _ref52.confirmText;
  34718. return _context51.abrupt("return", new Promise(function (i, o) {
  34719. uni.showModal({
  34720. title: e,
  34721. content: t,
  34722. showCancel: n,
  34723. cancelText: s,
  34724. confirmText: r,
  34725. success: function success(e) {
  34726. i(e);
  34727. },
  34728. fail: function fail() {
  34729. i({
  34730. confirm: !1,
  34731. cancel: !0
  34732. });
  34733. }
  34734. });
  34735. }));
  34736. case 2:
  34737. case "end":
  34738. return _context51.stop();
  34739. }
  34740. }
  34741. }, _callee51);
  34742. }))({
  34743. title: "提示",
  34744. content: _e27,
  34745. showCancel: i.retry,
  34746. cancelText: "取消",
  34747. confirmText: i.retry ? "重试" : "确定"
  34748. });
  34749. case 33:
  34750. _yield = _context52.sent;
  34751. _t18 = _yield.confirm;
  34752. if (!(i.retry && _t18)) {
  34753. _context52.next = 37;
  34754. break;
  34755. }
  34756. return _context52.abrupt("return", s.apply(void 0, u));
  34757. case 37:
  34758. _n14 = new ne({
  34759. subject: f,
  34760. code: g,
  34761. message: m,
  34762. requestId: l.requestId
  34763. });
  34764. throw _n14.detail = l.result, Q(B, {
  34765. type: H,
  34766. content: _n14
  34767. }), _n14;
  34768. case 39:
  34769. return _context52.abrupt("return", (Q(B, {
  34770. type: H,
  34771. content: l.result
  34772. }), l.result));
  34773. case 40:
  34774. case "end":
  34775. return _context52.stop();
  34776. }
  34777. }
  34778. }, _callee52, null, [[5, 11]]);
  34779. }));
  34780. function s() {
  34781. return _s14.apply(this, arguments);
  34782. }
  34783. return s;
  34784. }(),
  34785. interceptorName: "callObject",
  34786. getCallbackArgs: function getCallbackArgs() {
  34787. var _ref53 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  34788. e = _ref53.params;
  34789. return {
  34790. objectName: t,
  34791. methodName: c,
  34792. params: e
  34793. };
  34794. }
  34795. });
  34796. }
  34797. });
  34798. };
  34799. }
  34800. function ks(e) {
  34801. return U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  34802. }
  34803. function Cs() {
  34804. return _Cs.apply(this, arguments);
  34805. }
  34806. function _Cs() {
  34807. _Cs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  34808. var _ref65,
  34809. e,
  34810. _ref65$callLoginByWei,
  34811. t,
  34812. n,
  34813. s,
  34814. r,
  34815. _args7 = arguments;
  34816. return _regenerator.default.wrap(function _callee55$(_context55) {
  34817. while (1) {
  34818. switch (_context55.prev = _context55.next) {
  34819. case 0:
  34820. _ref65 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref65.openid, _ref65$callLoginByWei = _ref65.callLoginByWeixin, t = _ref65$callLoginByWei === void 0 ? !1 : _ref65$callLoginByWei;
  34821. n = ks(this);
  34822. if (!("mp-weixin" !== P)) {
  34823. _context55.next = 4;
  34824. break;
  34825. }
  34826. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(P, "`"));
  34827. case 4:
  34828. if (!(e && t)) {
  34829. _context55.next = 6;
  34830. break;
  34831. }
  34832. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  34833. case 6:
  34834. if (!e) {
  34835. _context55.next = 8;
  34836. break;
  34837. }
  34838. return _context55.abrupt("return", (n.mpWeixinOpenid = e, {}));
  34839. case 8:
  34840. _context55.next = 10;
  34841. return new Promise(function (e, t) {
  34842. uni.login({
  34843. success: function success(t) {
  34844. e(t.code);
  34845. },
  34846. fail: function fail(e) {
  34847. t(new Error(e.errMsg));
  34848. }
  34849. });
  34850. });
  34851. case 10:
  34852. s = _context55.sent;
  34853. r = this.importObject("uni-id-co", {
  34854. customUI: !0
  34855. });
  34856. _context55.next = 14;
  34857. return r.secureNetworkHandshakeByWeixin({
  34858. code: s,
  34859. callLoginByWeixin: t
  34860. });
  34861. case 14:
  34862. n.mpWeixinCode = s;
  34863. return _context55.abrupt("return", {
  34864. code: s
  34865. });
  34866. case 16:
  34867. case "end":
  34868. return _context55.stop();
  34869. }
  34870. }
  34871. }, _callee55, this);
  34872. }));
  34873. return _Cs.apply(this, arguments);
  34874. }
  34875. function Ts(_x37) {
  34876. return _Ts.apply(this, arguments);
  34877. }
  34878. function _Ts() {
  34879. _Ts = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56(e) {
  34880. var t;
  34881. return _regenerator.default.wrap(function _callee56$(_context56) {
  34882. while (1) {
  34883. switch (_context56.prev = _context56.next) {
  34884. case 0:
  34885. t = ks(this);
  34886. return _context56.abrupt("return", (t.initPromise || (t.initPromise = Cs.call(this, e)), t.initPromise));
  34887. case 2:
  34888. case "end":
  34889. return _context56.stop();
  34890. }
  34891. }
  34892. }, _callee56, this);
  34893. }));
  34894. return _Ts.apply(this, arguments);
  34895. }
  34896. function Ps(e) {
  34897. return function () {
  34898. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  34899. t = _ref54.openid,
  34900. _ref54$callLoginByWei = _ref54.callLoginByWeixin,
  34901. n = _ref54$callLoginByWei === void 0 ? !1 : _ref54$callLoginByWei;
  34902. return Ts.call(e, {
  34903. openid: t,
  34904. callLoginByWeixin: n
  34905. });
  34906. };
  34907. }
  34908. function As(e) {
  34909. var t = {
  34910. getSystemInfo: uni.getSystemInfo,
  34911. getPushClientId: uni.getPushClientId
  34912. };
  34913. return function (n) {
  34914. return new Promise(function (s, r) {
  34915. t[e](_objectSpread(_objectSpread({}, n), {}, {
  34916. success: function success(e) {
  34917. s(e);
  34918. },
  34919. fail: function fail(e) {
  34920. r(e);
  34921. }
  34922. }));
  34923. });
  34924. };
  34925. }
  34926. var Es = /*#__PURE__*/function (_ref55) {
  34927. (0, _inherits2.default)(Es, _ref55);
  34928. var _super12 = _createSuper(Es);
  34929. function Es() {
  34930. var _this22;
  34931. (0, _classCallCheck2.default)(this, Es);
  34932. _this22 = _super12.call(this), _this22._uniPushMessageCallback = _this22._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this22)), _this22._currentMessageId = -1, _this22._payloadQueue = [];
  34933. return _this22;
  34934. }
  34935. (0, _createClass2.default)(Es, [{
  34936. key: "init",
  34937. value: function init() {
  34938. var _this23 = this;
  34939. return Promise.all([As("getSystemInfo")(), As("getPushClientId")()]).then(function () {
  34940. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  34941. _ref57 = (0, _slicedToArray2.default)(_ref56, 2),
  34942. _ref57$ = _ref57[0];
  34943. _ref57$ = _ref57$ === void 0 ? {} : _ref57$;
  34944. var e = _ref57$.appId,
  34945. _ref57$2 = _ref57[1];
  34946. _ref57$2 = _ref57$2 === void 0 ? {} : _ref57$2;
  34947. var t = _ref57$2.cid;
  34948. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  34949. if (!t) throw new Error("Invalid push client id");
  34950. _this23._appId = e, _this23._pushClientId = t, _this23._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this23.emit("open"), _this23._initMessageListener();
  34951. }, function (e) {
  34952. throw _this23.emit("error", e), _this23.close(), e;
  34953. });
  34954. }
  34955. }, {
  34956. key: "open",
  34957. value: function () {
  34958. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  34959. return _regenerator.default.wrap(function _callee53$(_context53) {
  34960. while (1) {
  34961. switch (_context53.prev = _context53.next) {
  34962. case 0:
  34963. return _context53.abrupt("return", this.init());
  34964. case 1:
  34965. case "end":
  34966. return _context53.stop();
  34967. }
  34968. }
  34969. }, _callee53, this);
  34970. }));
  34971. function open() {
  34972. return _open.apply(this, arguments);
  34973. }
  34974. return open;
  34975. }()
  34976. }, {
  34977. key: "_isUniCloudSSE",
  34978. value: function _isUniCloudSSE(e) {
  34979. if ("receive" !== e.type) return !1;
  34980. var t = e && e.data && e.data.payload;
  34981. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  34982. }
  34983. }, {
  34984. key: "_receivePushMessage",
  34985. value: function _receivePushMessage(e) {
  34986. if (!this._isUniCloudSSE(e)) return;
  34987. var t = e && e.data && e.data.payload,
  34988. n = t.action,
  34989. s = t.messageId,
  34990. r = t.message;
  34991. this._payloadQueue.push({
  34992. action: n,
  34993. messageId: s,
  34994. message: r
  34995. }), this._consumMessage();
  34996. }
  34997. }, {
  34998. key: "_consumMessage",
  34999. value: function _consumMessage() {
  35000. var _this24 = this;
  35001. for (;;) {
  35002. var _e28 = this._payloadQueue.find(function (e) {
  35003. return e.messageId === _this24._currentMessageId + 1;
  35004. });
  35005. if (!_e28) break;
  35006. this._currentMessageId++, this._parseMessagePayload(_e28);
  35007. }
  35008. }
  35009. }, {
  35010. key: "_parseMessagePayload",
  35011. value: function _parseMessagePayload(e) {
  35012. var t = e.action,
  35013. n = e.messageId,
  35014. s = e.message;
  35015. "end" === t ? this._end({
  35016. messageId: n,
  35017. message: s
  35018. }) : "message" === t && this._appendMessage({
  35019. messageId: n,
  35020. message: s
  35021. });
  35022. }
  35023. }, {
  35024. key: "_appendMessage",
  35025. value: function _appendMessage() {
  35026. var _ref58 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  35027. e = _ref58.messageId,
  35028. t = _ref58.message;
  35029. this.emit("message", t);
  35030. }
  35031. }, {
  35032. key: "_end",
  35033. value: function _end() {
  35034. var _ref59 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  35035. e = _ref59.messageId,
  35036. t = _ref59.message;
  35037. this.emit("end", t), this.close();
  35038. }
  35039. }, {
  35040. key: "_initMessageListener",
  35041. value: function _initMessageListener() {
  35042. uni.onPushMessage(this._uniPushMessageCallback);
  35043. }
  35044. }, {
  35045. key: "_destroy",
  35046. value: function _destroy() {
  35047. uni.offPushMessage(this._uniPushMessageCallback);
  35048. }
  35049. }, {
  35050. key: "toJSON",
  35051. value: function toJSON() {
  35052. return {
  35053. appId: this._appId,
  35054. pushClientId: this._pushClientId,
  35055. seqId: this._seqId
  35056. };
  35057. }
  35058. }, {
  35059. key: "close",
  35060. value: function close() {
  35061. this._destroy(), this.emit("close");
  35062. }
  35063. }]);
  35064. return Es;
  35065. }( /*#__PURE__*/function () {
  35066. function _class6() {
  35067. (0, _classCallCheck2.default)(this, _class6);
  35068. this._callback = {};
  35069. }
  35070. (0, _createClass2.default)(_class6, [{
  35071. key: "addListener",
  35072. value: function addListener(e, t) {
  35073. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  35074. }
  35075. }, {
  35076. key: "on",
  35077. value: function on(e, t) {
  35078. return this.addListener(e, t);
  35079. }
  35080. }, {
  35081. key: "removeListener",
  35082. value: function removeListener(e, t) {
  35083. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  35084. var n = this._callback[e];
  35085. if (!n) return;
  35086. var s = function (e, t) {
  35087. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  35088. if (e[_n15] === t) return _n15;
  35089. }
  35090. return -1;
  35091. }(n, t);
  35092. n.splice(s, 1);
  35093. }
  35094. }, {
  35095. key: "off",
  35096. value: function off(e, t) {
  35097. return this.removeListener(e, t);
  35098. }
  35099. }, {
  35100. key: "removeAllListener",
  35101. value: function removeAllListener(e) {
  35102. delete this._callback[e];
  35103. }
  35104. }, {
  35105. key: "emit",
  35106. value: function emit(e) {
  35107. var n = this._callback[e];
  35108. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  35109. t[_key4 - 1] = arguments[_key4];
  35110. }
  35111. if (n) for (var _e29 = 0; _e29 < n.length; _e29++) {
  35112. n[_e29].apply(n, t);
  35113. }
  35114. }
  35115. }]);
  35116. return _class6;
  35117. }());
  35118. function Os(_x38, _x39) {
  35119. return _Os.apply(this, arguments);
  35120. }
  35121. function _Os() {
  35122. _Os = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(e, t) {
  35123. var n, _e33, s;
  35124. return _regenerator.default.wrap(function _callee57$(_context57) {
  35125. while (1) {
  35126. switch (_context57.prev = _context57.next) {
  35127. case 0:
  35128. n = "http://".concat(e, ":").concat(t, "/system/ping");
  35129. _context57.prev = 1;
  35130. _context57.next = 4;
  35131. return s = {
  35132. url: n,
  35133. timeout: 500
  35134. }, new Promise(function (e, t) {
  35135. se.request(_objectSpread(_objectSpread({}, s), {}, {
  35136. success: function success(t) {
  35137. e(t);
  35138. },
  35139. fail: function fail(e) {
  35140. t(e);
  35141. }
  35142. }));
  35143. });
  35144. case 4:
  35145. _e33 = _context57.sent;
  35146. return _context57.abrupt("return", !(!_e33.data || 0 !== _e33.data.code));
  35147. case 8:
  35148. _context57.prev = 8;
  35149. _context57.t0 = _context57["catch"](1);
  35150. return _context57.abrupt("return", !1);
  35151. case 11:
  35152. case "end":
  35153. return _context57.stop();
  35154. }
  35155. }
  35156. }, _callee57, null, [[1, 8]]);
  35157. }));
  35158. return _Os.apply(this, arguments);
  35159. }
  35160. function xs(_x40) {
  35161. return _xs.apply(this, arguments);
  35162. }
  35163. function _xs() {
  35164. _xs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  35165. var _ce2, _e34, _t20, t, _t$debugInfo, n, s, _yield2, r, i, o;
  35166. return _regenerator.default.wrap(function _callee59$(_context59) {
  35167. while (1) {
  35168. switch (_context59.prev = _context59.next) {
  35169. case 0:
  35170. if (b) {
  35171. _context59.next = 2;
  35172. break;
  35173. }
  35174. return _context59.abrupt("return", Promise.resolve());
  35175. case 2:
  35176. if ("app" === P) {
  35177. _ce2 = ce(), _e34 = _ce2.osName, _t20 = _ce2.osVersion;
  35178. "ios" === _e34 && function (e) {
  35179. if (!e || "string" != typeof e) return 0;
  35180. var t = e.match(/^(\d+)./);
  35181. return t && t[1] ? parseInt(t[1]) : 0;
  35182. }(_t20) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  35183. }
  35184. t = e.__dev__;
  35185. if (t.debugInfo) {
  35186. _context59.next = 6;
  35187. break;
  35188. }
  35189. return _context59.abrupt("return");
  35190. case 6:
  35191. _t$debugInfo = t.debugInfo;
  35192. n = _t$debugInfo.address;
  35193. s = _t$debugInfo.servePort;
  35194. _context59.next = 11;
  35195. return function () {
  35196. var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e, t) {
  35197. var n, _s15, _r8;
  35198. return _regenerator.default.wrap(function _callee58$(_context58) {
  35199. while (1) {
  35200. switch (_context58.prev = _context58.next) {
  35201. case 0:
  35202. _s15 = 0;
  35203. case 1:
  35204. if (!(_s15 < e.length)) {
  35205. _context58.next = 11;
  35206. break;
  35207. }
  35208. _r8 = e[_s15];
  35209. _context58.next = 5;
  35210. return Os(_r8, t);
  35211. case 5:
  35212. if (!_context58.sent) {
  35213. _context58.next = 8;
  35214. break;
  35215. }
  35216. n = _r8;
  35217. return _context58.abrupt("break", 11);
  35218. case 8:
  35219. _s15++;
  35220. _context58.next = 1;
  35221. break;
  35222. case 11:
  35223. return _context58.abrupt("return", {
  35224. address: n,
  35225. port: t
  35226. });
  35227. case 12:
  35228. case "end":
  35229. return _context58.stop();
  35230. }
  35231. }
  35232. }, _callee58);
  35233. }));
  35234. return function (_x41, _x42) {
  35235. return _ref66.apply(this, arguments);
  35236. };
  35237. }()(n, s);
  35238. case 11:
  35239. _yield2 = _context59.sent;
  35240. r = _yield2.address;
  35241. if (!r) {
  35242. _context59.next = 15;
  35243. break;
  35244. }
  35245. return _context59.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  35246. case 15:
  35247. i = console["app" === P ? "error" : "warn"];
  35248. o = "";
  35249. if (!("remote" === t.debugInfo.initialLaunchType ? (t.debugInfo.forceRemote = !0, o = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", "web" === P && (o += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === P.indexOf("mp-") && (o += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t.debugInfo.forceRemote)) {
  35250. _context59.next = 19;
  35251. break;
  35252. }
  35253. throw new Error(o);
  35254. case 19:
  35255. i(o);
  35256. case 20:
  35257. case "end":
  35258. return _context59.stop();
  35259. }
  35260. }
  35261. }, _callee59);
  35262. }));
  35263. return _xs.apply(this, arguments);
  35264. }
  35265. function Rs(e) {
  35266. e._initPromiseHub || (e._initPromiseHub = new I({
  35267. createPromise: function createPromise() {
  35268. var t = Promise.resolve();
  35269. var n;
  35270. n = 1, t = new Promise(function (e) {
  35271. setTimeout(function () {
  35272. e();
  35273. }, n);
  35274. });
  35275. var s = e.auth();
  35276. return t.then(function () {
  35277. return s.getLoginState();
  35278. }).then(function (e) {
  35279. return e ? Promise.resolve() : s.signInAnonymously();
  35280. });
  35281. }
  35282. }));
  35283. }
  35284. var Us = {
  35285. tcb: It,
  35286. tencent: It,
  35287. aliyun: ge,
  35288. private: bt
  35289. };
  35290. var Ls = new ( /*#__PURE__*/function () {
  35291. function _class7() {
  35292. (0, _classCallCheck2.default)(this, _class7);
  35293. }
  35294. (0, _createClass2.default)(_class7, [{
  35295. key: "init",
  35296. value: function init(e) {
  35297. var t = {};
  35298. var n = Us[e.provider];
  35299. if (!n) throw new Error("未提供正确的provider参数");
  35300. t = n.init(e), b && function (e) {
  35301. if (!b) return;
  35302. var t = {};
  35303. e.__dev__ = t, t.debugLog = b && ("web" === P && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === P);
  35304. var n = A;
  35305. n && !n.code && (t.debugInfo = n);
  35306. var s = new I({
  35307. createPromise: function createPromise() {
  35308. return xs(e);
  35309. }
  35310. });
  35311. t.initLocalNetwork = function () {
  35312. return s.exec();
  35313. };
  35314. }(t), Rs(t), xn(t), function (e) {
  35315. var t = e.uploadFile;
  35316. e.uploadFile = function (e) {
  35317. return t.call(this, e);
  35318. };
  35319. }(t), function (e) {
  35320. e.database = function (t) {
  35321. if (t && Object.keys(t).length > 0) return e.init(t).database();
  35322. if (this._database) return this._database;
  35323. var n = Bn($n, {
  35324. uniClient: e
  35325. });
  35326. return this._database = n, n;
  35327. }, e.databaseForJQL = function (t) {
  35328. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  35329. if (this._databaseForJQL) return this._databaseForJQL;
  35330. var n = Bn($n, {
  35331. uniClient: e,
  35332. isJQL: !0
  35333. });
  35334. return this._databaseForJQL = n, n;
  35335. };
  35336. }(t), function (e) {
  35337. e.getCurrentUserInfo = _s, e.chooseAndUploadFile = vs.initChooseAndUploadFile(e), Object.assign(e, {
  35338. get mixinDatacom() {
  35339. return Ss(e);
  35340. }
  35341. }), e.SSEChannel = Es, e.initSecureNetworkByWeixin = Ps(e), e.importObject = bs(e);
  35342. }(t);
  35343. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  35344. if (!t[e]) return;
  35345. var n = t[e];
  35346. t[e] = function () {
  35347. return n.apply(t, Array.from(arguments));
  35348. }, t[e] = function (e, t) {
  35349. return function (n) {
  35350. var _this25 = this;
  35351. var s = !1;
  35352. if ("callFunction" === t) {
  35353. var _e30 = n && n.type || u;
  35354. s = _e30 !== u;
  35355. }
  35356. var r = "callFunction" === t && !s,
  35357. i = this._initPromiseHub.exec();
  35358. n = n || {};
  35359. var _te2 = te(n),
  35360. o = _te2.success,
  35361. a = _te2.fail,
  35362. c = _te2.complete,
  35363. h = i.then(function () {
  35364. return s ? Promise.resolve() : q(M(t, "invoke"), n);
  35365. }).then(function () {
  35366. return e.call(_this25, n);
  35367. }).then(function (e) {
  35368. return s ? Promise.resolve(e) : q(M(t, "success"), e).then(function () {
  35369. return q(M(t, "complete"), e);
  35370. }).then(function () {
  35371. return r && Q(B, {
  35372. type: J,
  35373. content: e
  35374. }), Promise.resolve(e);
  35375. });
  35376. }, function (e) {
  35377. return s ? Promise.reject(e) : q(M(t, "fail"), e).then(function () {
  35378. return q(M(t, "complete"), e);
  35379. }).then(function () {
  35380. return Q(B, {
  35381. type: J,
  35382. content: e
  35383. }), Promise.reject(e);
  35384. });
  35385. });
  35386. if (!(o || a || c)) return h;
  35387. h.then(function (e) {
  35388. o && o(e), c && c(e), r && Q(B, {
  35389. type: J,
  35390. content: e
  35391. });
  35392. }, function (e) {
  35393. a && a(e), c && c(e), r && Q(B, {
  35394. type: J,
  35395. content: e
  35396. });
  35397. });
  35398. };
  35399. }(t[e], e).bind(t);
  35400. }), t.init = this.init, t;
  35401. }
  35402. }]);
  35403. return _class7;
  35404. }())();
  35405. (function () {
  35406. var e = E;
  35407. var t = {};
  35408. if (e && 1 === e.length) t = e[0], Ls = Ls.init(t), Ls._isDefault = !0;else {
  35409. var _t19 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  35410. var _n16;
  35411. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : O ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t19.forEach(function (e) {
  35412. Ls[e] = function () {
  35413. return console.error(_n16), Promise.reject(new ne({
  35414. code: "SYS_ERR",
  35415. message: _n16
  35416. }));
  35417. };
  35418. });
  35419. }
  35420. Object.assign(Ls, {
  35421. get mixinDatacom() {
  35422. return Ss(Ls);
  35423. }
  35424. }), fs(Ls), Ls.addInterceptor = D, Ls.removeInterceptor = F, Ls.interceptObject = K, b && "web" === P && (window.uniCloud = Ls);
  35425. })();
  35426. var Ns = Ls;
  35427. exports.default = Ns;
  35428. /* 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"]))
  35429. /***/ }),
  35430. /***/ 511:
  35431. /*!**********************************************************************!*\
  35432. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  35433. \**********************************************************************/
  35434. /*! no static exports found */
  35435. /***/ (function(module, exports) {
  35436. function _assertThisInitialized(self) {
  35437. if (self === void 0) {
  35438. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  35439. }
  35440. return self;
  35441. }
  35442. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35443. /***/ }),
  35444. /***/ 512:
  35445. /*!*********************************************************!*\
  35446. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  35447. \*********************************************************/
  35448. /*! no static exports found */
  35449. /***/ (function(module, exports, __webpack_require__) {
  35450. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  35451. function _inherits(subClass, superClass) {
  35452. if (typeof superClass !== "function" && superClass !== null) {
  35453. throw new TypeError("Super expression must either be null or a function");
  35454. }
  35455. subClass.prototype = Object.create(superClass && superClass.prototype, {
  35456. constructor: {
  35457. value: subClass,
  35458. writable: true,
  35459. configurable: true
  35460. }
  35461. });
  35462. Object.defineProperty(subClass, "prototype", {
  35463. writable: false
  35464. });
  35465. if (superClass) setPrototypeOf(subClass, superClass);
  35466. }
  35467. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35468. /***/ }),
  35469. /***/ 513:
  35470. /*!**************************************************************************!*\
  35471. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  35472. \**************************************************************************/
  35473. /*! no static exports found */
  35474. /***/ (function(module, exports, __webpack_require__) {
  35475. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  35476. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 511);
  35477. function _possibleConstructorReturn(self, call) {
  35478. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  35479. return call;
  35480. } else if (call !== void 0) {
  35481. throw new TypeError("Derived constructors may only return object or undefined");
  35482. }
  35483. return assertThisInitialized(self);
  35484. }
  35485. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35486. /***/ }),
  35487. /***/ 514:
  35488. /*!***************************************************************!*\
  35489. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  35490. \***************************************************************/
  35491. /*! no static exports found */
  35492. /***/ (function(module, exports) {
  35493. function _getPrototypeOf(o) {
  35494. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  35495. return o.__proto__ || Object.getPrototypeOf(o);
  35496. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35497. return _getPrototypeOf(o);
  35498. }
  35499. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35500. /***/ }),
  35501. /***/ 515:
  35502. /*!****************************************************************!*\
  35503. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  35504. \****************************************************************/
  35505. /*! no static exports found */
  35506. /***/ (function(module, exports, __webpack_require__) {
  35507. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 514);
  35508. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  35509. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 516);
  35510. var construct = __webpack_require__(/*! ./construct.js */ 15);
  35511. function _wrapNativeSuper(Class) {
  35512. var _cache = typeof Map === "function" ? new Map() : undefined;
  35513. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  35514. if (Class === null || !isNativeFunction(Class)) return Class;
  35515. if (typeof Class !== "function") {
  35516. throw new TypeError("Super expression must either be null or a function");
  35517. }
  35518. if (typeof _cache !== "undefined") {
  35519. if (_cache.has(Class)) return _cache.get(Class);
  35520. _cache.set(Class, Wrapper);
  35521. }
  35522. function Wrapper() {
  35523. return construct(Class, arguments, getPrototypeOf(this).constructor);
  35524. }
  35525. Wrapper.prototype = Object.create(Class.prototype, {
  35526. constructor: {
  35527. value: Wrapper,
  35528. enumerable: false,
  35529. writable: true,
  35530. configurable: true
  35531. }
  35532. });
  35533. return setPrototypeOf(Wrapper, Class);
  35534. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35535. return _wrapNativeSuper(Class);
  35536. }
  35537. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35538. /***/ }),
  35539. /***/ 516:
  35540. /*!*****************************************************************!*\
  35541. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  35542. \*****************************************************************/
  35543. /*! no static exports found */
  35544. /***/ (function(module, exports) {
  35545. function _isNativeFunction(fn) {
  35546. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  35547. }
  35548. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35549. /***/ }),
  35550. /***/ 517:
  35551. /*!**************************************************************************!*\
  35552. !*** E:/Desktop/zd_wechatApp(1)/pages.json?{"type":"origin-pages-json"} ***!
  35553. \**************************************************************************/
  35554. /*! no static exports found */
  35555. /***/ (function(module, exports, __webpack_require__) {
  35556. "use strict";
  35557. Object.defineProperty(exports, "__esModule", {
  35558. value: true
  35559. });
  35560. exports.default = void 0;
  35561. var _default = {
  35562. "easycom": {
  35563. "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
  35564. },
  35565. "pages": [{
  35566. "path": "pages/login/login",
  35567. "style": {
  35568. "navigationStyle": "custom"
  35569. }
  35570. }, {
  35571. "path": "pages/noLogin/PressureRegulatingBox/PressureRegulatingBox",
  35572. "style": {
  35573. "navigationBarTitleText": "",
  35574. "enablePullDownRefresh": false
  35575. }
  35576. }, {
  35577. "path": "pages/noLogin/regulatorBoxList",
  35578. "style": {
  35579. "navigationBarTitleText": "",
  35580. "enablePullDownRefresh": false
  35581. }
  35582. }, {
  35583. "path": "pages/index/index",
  35584. "style": {
  35585. "navigationStyle": "custom"
  35586. }
  35587. }, {
  35588. "path": "pages/noLogin/uploadProject",
  35589. "style": {
  35590. "navigationStyle": "custom"
  35591. }
  35592. }, {
  35593. "path": "pages/noLogin/typeList",
  35594. "style": {
  35595. "navigationStyle": "custom"
  35596. }
  35597. }, {
  35598. "path": "pages/noLogin/communitylist",
  35599. "style": {
  35600. "navigationBarTitleText": "",
  35601. "enablePullDownRefresh": false
  35602. }
  35603. }, {
  35604. "path": "pages/noLogin/buildinglist",
  35605. "style": {
  35606. "navigationStyle": "custom"
  35607. }
  35608. }, {
  35609. "path": "pages/noLogin/unitlist",
  35610. "style": {
  35611. "navigationStyle": "custom"
  35612. }
  35613. }, {
  35614. "path": "pages/historyConstruction/historyDetail",
  35615. "style": {
  35616. "navigationStyle": "custom"
  35617. }
  35618. }, {
  35619. "path": "pages/noLogin/listProject",
  35620. "style": {
  35621. "navigationBarTitleText": "历史记录",
  35622. "enablePullDownRefresh": true,
  35623. "onReachBottomDistance": 126
  35624. }
  35625. }, {
  35626. "path": "pages/historyConstruction/updateInfo",
  35627. "style": {
  35628. "navigationBarTitleText": "修改"
  35629. }
  35630. }, {
  35631. "path": "pages/noLogin/cityProject",
  35632. "style": {
  35633. "navigationStyle": "custom"
  35634. }
  35635. }, {
  35636. "path": "pages/noLogin/data",
  35637. "style": {
  35638. "navigationStyle": "custom"
  35639. }
  35640. }, {
  35641. "path": "pages/noLogin/list",
  35642. "style": {
  35643. "navigationBarTitleText": "列表",
  35644. "enablePullDownRefresh": true
  35645. }
  35646. }, {
  35647. "path": "pages/notice/noticeDetail",
  35648. "style": {
  35649. "navigationStyle": "custom"
  35650. }
  35651. }, {
  35652. "path": "pages/notice/noticeList",
  35653. "style": {
  35654. "navigationBarTitleText": "公告列表",
  35655. "enablePullDownRefresh": true
  35656. }
  35657. }, {
  35658. "path": "pages/cityConstrution/cityConstrution",
  35659. "style": {
  35660. "navigationStyle": "custom"
  35661. }
  35662. }, {
  35663. "path": "pages/historyConstruction/historyConstruction",
  35664. "style": {
  35665. "navigationStyle": "custom"
  35666. }
  35667. }, {
  35668. "path": "pages/service/service",
  35669. "style": {
  35670. "navigationStyle": "custom"
  35671. }
  35672. }, {
  35673. "path": "pages/aboutme/aboutme",
  35674. "style": {
  35675. "navigationStyle": "custom"
  35676. }
  35677. }, {
  35678. "path": "pages/chart/chart",
  35679. "style": {
  35680. "navigationStyle": "custom"
  35681. }
  35682. }, {
  35683. "path": "pages/chart/chartAll",
  35684. "style": {
  35685. "navigationStyle": "custom"
  35686. }
  35687. }, {
  35688. "path": "pages/chart/chartDetail",
  35689. "style": {
  35690. "navigationStyle": "custom"
  35691. }
  35692. }, {
  35693. "path": "pages/chart/newchartDetail",
  35694. "style": {
  35695. "navigationStyle": "custom"
  35696. }
  35697. }, {
  35698. "path": "pages/chart/chartList",
  35699. "style": {
  35700. "navigationBarTitleText": "工程管理"
  35701. }
  35702. }, {
  35703. "path": "pages/chart/details",
  35704. "style": {
  35705. "navigationBarTitleText": "详情"
  35706. }
  35707. }, {
  35708. "path": "pages/noLogin/repair",
  35709. "style": {
  35710. "navigationStyle": "custom"
  35711. }
  35712. }, {
  35713. "path": "pages/noLogin/My",
  35714. "style": {
  35715. "navigationStyle": "custom"
  35716. }
  35717. }, {
  35718. "path": "pages/noLogin/Myphoto",
  35719. "style": {
  35720. "navigationStyle": "custom"
  35721. }
  35722. }, {
  35723. "path": "pages/noLogin/home/home",
  35724. "style": {
  35725. "navigationBarTitleText": "",
  35726. "enablePullDownRefresh": false
  35727. }
  35728. }, {
  35729. "path": "pages/noLogin/emergencyRepairOrder/emergencyRepairOrder",
  35730. "style": {
  35731. "navigationBarTitleText": "",
  35732. "enablePullDownRefresh": false
  35733. }
  35734. }, {
  35735. "path": "pages/noLogin/WarningPileForm/WarningPileForm",
  35736. "style": {
  35737. "navigationBarTitleText": "",
  35738. "enablePullDownRefresh": false
  35739. }
  35740. }, {
  35741. "path": "pages/noLogin/WarningPileList",
  35742. "style": {
  35743. "navigationBarTitleText": "",
  35744. "enablePullDownRefresh": false
  35745. }
  35746. }, {
  35747. "path": "pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement",
  35748. "style": {
  35749. "navigationBarTitleText": "",
  35750. "enablePullDownRefresh": false
  35751. }
  35752. }],
  35753. "globalStyle": {
  35754. "navigationBarTextStyle": "black",
  35755. "navigationBarTitleText": "长春贞达市政施工管理平台",
  35756. "navigationBarBackgroundColor": "#F8F8F8",
  35757. "backgroundColor": "#F8F8F8"
  35758. },
  35759. "tabBar": {
  35760. "list": [{
  35761. "pagePath": "pages/index/index",
  35762. "text": "首页",
  35763. "iconPath": "static/icon/home.png",
  35764. "selectedIconPath": "static/icon/home-on.png"
  35765. }, {
  35766. "pagePath": "pages/noLogin/typeList",
  35767. "text": "工作",
  35768. "iconPath": "static/icon/work.png",
  35769. "selectedIconPath": "static/icon/work-on.png"
  35770. }]
  35771. },
  35772. "condition": {
  35773. "current": 0,
  35774. "list": [{
  35775. "name": "",
  35776. "path": "",
  35777. "query": ""
  35778. }]
  35779. }
  35780. };
  35781. exports.default = _default;
  35782. /***/ }),
  35783. /***/ 518:
  35784. /*!*************************************************************!*\
  35785. !*** E:/Desktop/zd_wechatApp(1)/pages.json?{"type":"stat"} ***!
  35786. \*************************************************************/
  35787. /*! no static exports found */
  35788. /***/ (function(module, exports, __webpack_require__) {
  35789. "use strict";
  35790. Object.defineProperty(exports, "__esModule", {
  35791. value: true
  35792. });
  35793. exports.default = void 0;
  35794. var _default = {
  35795. "appid": "__UNI__5FB7046"
  35796. };
  35797. exports.default = _default;
  35798. /***/ }),
  35799. /***/ 519:
  35800. /*!*******************************************************************************************!*\
  35801. !*** E:/Desktop/zd_wechatApp(1)/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js ***!
  35802. \*******************************************************************************************/
  35803. /*! no static exports found */
  35804. /***/ (function(module, exports, __webpack_require__) {
  35805. "use strict";
  35806. /* WEBPACK VAR INJECTION */(function(module) {/*
  35807. * uCharts®
  35808. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  35809. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  35810. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  35811. * 复制使用请保留本段注释,感谢支持开源!
  35812. *
  35813. * uCharts®官方网站
  35814. * https://www.uCharts.cn
  35815. *
  35816. * 开源地址:
  35817. * https://gitee.com/uCharts/uCharts
  35818. *
  35819. * uni-app插件市场地址:
  35820. * http://ext.dcloud.net.cn/plugin?id=271
  35821. *
  35822. */
  35823. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  35824. Object.defineProperty(exports, "__esModule", {
  35825. value: true
  35826. });
  35827. exports.default = void 0;
  35828. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  35829. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  35830. var config = {
  35831. version: 'v2.3.6-20211201',
  35832. yAxisWidth: 15,
  35833. yAxisSplit: 5,
  35834. xAxisHeight: 22,
  35835. xAxisLineHeight: 22,
  35836. legendHeight: 15,
  35837. yAxisTitleWidth: 15,
  35838. padding: [10, 10, 10, 10],
  35839. pixelRatio: 1,
  35840. rotate: false,
  35841. columePadding: 3,
  35842. fontSize: 13,
  35843. fontColor: '#666666',
  35844. dataPointShape: ['circle', 'circle', 'circle', 'circle'],
  35845. color: ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
  35846. linearColor: ['#0EE2F8', '#2BDCA8', '#FA7D8D', '#EB88E2', '#2AE3A0', '#0EE2F8', '#EB88E2', '#6773E3', '#F78A85'],
  35847. pieChartLinePadding: 15,
  35848. pieChartTextPadding: 5,
  35849. xAxisTextPadding: 3,
  35850. titleColor: '#333333',
  35851. titleFontSize: 20,
  35852. subtitleColor: '#999999',
  35853. subtitleFontSize: 15,
  35854. toolTipPadding: 3,
  35855. toolTipBackground: '#000000',
  35856. toolTipOpacity: 0.7,
  35857. toolTipLineHeight: 20,
  35858. radarLabelTextMargin: 13,
  35859. gaugeLabelTextMargin: 13
  35860. };
  35861. var assign = function assign(target) {
  35862. for (var _len2 = arguments.length, varArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  35863. varArgs[_key2 - 1] = arguments[_key2];
  35864. }
  35865. if (target == null) {
  35866. throw new TypeError('[uCharts] Cannot convert undefined or null to object');
  35867. }
  35868. if (!varArgs || varArgs.length <= 0) {
  35869. return target;
  35870. }
  35871. // 深度合并对象
  35872. function deepAssign(obj1, obj2) {
  35873. for (var key in obj2) {
  35874. obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ? deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
  35875. }
  35876. return obj1;
  35877. }
  35878. varArgs.forEach(function (val) {
  35879. target = deepAssign(target, val);
  35880. });
  35881. return target;
  35882. };
  35883. var util = {
  35884. toFixed: function toFixed(num, limit) {
  35885. limit = limit || 2;
  35886. if (this.isFloat(num)) {
  35887. num = num.toFixed(limit);
  35888. }
  35889. return num;
  35890. },
  35891. isFloat: function isFloat(num) {
  35892. return num % 1 !== 0;
  35893. },
  35894. approximatelyEqual: function approximatelyEqual(num1, num2) {
  35895. return Math.abs(num1 - num2) < 1e-10;
  35896. },
  35897. isSameSign: function isSameSign(num1, num2) {
  35898. return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
  35899. },
  35900. isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
  35901. return this.isSameSign(p1.x, p2.x);
  35902. },
  35903. isCollision: function isCollision(obj1, obj2) {
  35904. obj1.end = {};
  35905. obj1.end.x = obj1.start.x + obj1.width;
  35906. obj1.end.y = obj1.start.y - obj1.height;
  35907. obj2.end = {};
  35908. obj2.end.x = obj2.start.x + obj2.width;
  35909. obj2.end.y = obj2.start.y - obj2.height;
  35910. var flag = obj2.start.x > obj1.end.x || obj2.end.x < obj1.start.x || obj2.end.y > obj1.start.y || obj2.start.y < obj1.end.y;
  35911. return !flag;
  35912. }
  35913. };
  35914. //兼容H5点击事件
  35915. function getH5Offset(e) {
  35916. e.mp = {
  35917. changedTouches: []
  35918. };
  35919. e.mp.changedTouches.push({
  35920. x: e.offsetX,
  35921. y: e.offsetY
  35922. });
  35923. return e;
  35924. }
  35925. // 经纬度转墨卡托
  35926. function lonlat2mercator(longitude, latitude) {
  35927. var mercator = Array(2);
  35928. var x = longitude * 20037508.34 / 180;
  35929. var y = Math.log(Math.tan((90 + latitude) * Math.PI / 360)) / (Math.PI / 180);
  35930. y = y * 20037508.34 / 180;
  35931. mercator[0] = x;
  35932. mercator[1] = y;
  35933. return mercator;
  35934. }
  35935. // 墨卡托转经纬度
  35936. function mercator2lonlat(longitude, latitude) {
  35937. var lonlat = Array(2);
  35938. var x = longitude / 20037508.34 * 180;
  35939. var y = latitude / 20037508.34 * 180;
  35940. y = 180 / Math.PI * (2 * Math.atan(Math.exp(y * Math.PI / 180)) - Math.PI / 2);
  35941. lonlat[0] = x;
  35942. lonlat[1] = y;
  35943. return lonlat;
  35944. }
  35945. // hex 转 rgba
  35946. function hexToRgb(hexValue, opc) {
  35947. var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  35948. var hex = hexValue.replace(rgx, function (m, r, g, b) {
  35949. return r + r + g + g + b + b;
  35950. });
  35951. var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  35952. var r = parseInt(rgb[1], 16);
  35953. var g = parseInt(rgb[2], 16);
  35954. var b = parseInt(rgb[3], 16);
  35955. return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
  35956. }
  35957. function findRange(num, type, limit) {
  35958. if (isNaN(num)) {
  35959. throw new Error('[uCharts] series数据需为Number格式');
  35960. }
  35961. limit = limit || 10;
  35962. type = type ? type : 'upper';
  35963. var multiple = 1;
  35964. while (limit < 1) {
  35965. limit *= 10;
  35966. multiple *= 10;
  35967. }
  35968. if (type === 'upper') {
  35969. num = Math.ceil(num * multiple);
  35970. } else {
  35971. num = Math.floor(num * multiple);
  35972. }
  35973. while (num % limit !== 0) {
  35974. if (type === 'upper') {
  35975. num++;
  35976. } else {
  35977. num--;
  35978. }
  35979. }
  35980. return num / multiple;
  35981. }
  35982. function calCandleMA(dayArr, nameArr, colorArr, kdata) {
  35983. var seriesTemp = [];
  35984. for (var k = 0; k < dayArr.length; k++) {
  35985. var seriesItem = {
  35986. data: [],
  35987. name: nameArr[k],
  35988. color: colorArr[k]
  35989. };
  35990. for (var i = 0, len = kdata.length; i < len; i++) {
  35991. if (i < dayArr[k]) {
  35992. seriesItem.data.push(null);
  35993. continue;
  35994. }
  35995. var sum = 0;
  35996. for (var j = 0; j < dayArr[k]; j++) {
  35997. sum += kdata[i - j][1];
  35998. }
  35999. seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
  36000. }
  36001. seriesTemp.push(seriesItem);
  36002. }
  36003. return seriesTemp;
  36004. }
  36005. function calValidDistance(self, distance, chartData, config, opts) {
  36006. var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
  36007. var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length - 1);
  36008. var validDistance = distance;
  36009. if (distance >= 0) {
  36010. validDistance = 0;
  36011. self.uevent.trigger('scrollLeft');
  36012. self.scrollOption.position = 'left';
  36013. opts.xAxis.scrollPosition = 'left';
  36014. } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
  36015. validDistance = dataChartAreaWidth - dataChartWidth;
  36016. self.uevent.trigger('scrollRight');
  36017. self.scrollOption.position = 'right';
  36018. opts.xAxis.scrollPosition = 'right';
  36019. } else {
  36020. self.scrollOption.position = distance;
  36021. opts.xAxis.scrollPosition = distance;
  36022. }
  36023. return validDistance;
  36024. }
  36025. function isInAngleRange(angle, startAngle, endAngle) {
  36026. function adjust(angle) {
  36027. while (angle < 0) {
  36028. angle += 2 * Math.PI;
  36029. }
  36030. while (angle > 2 * Math.PI) {
  36031. angle -= 2 * Math.PI;
  36032. }
  36033. return angle;
  36034. }
  36035. angle = adjust(angle);
  36036. startAngle = adjust(startAngle);
  36037. endAngle = adjust(endAngle);
  36038. if (startAngle > endAngle) {
  36039. endAngle += 2 * Math.PI;
  36040. if (angle < startAngle) {
  36041. angle += 2 * Math.PI;
  36042. }
  36043. }
  36044. return angle >= startAngle && angle <= endAngle;
  36045. }
  36046. function calRotateTranslate(x, y, h) {
  36047. var xv = x;
  36048. var yv = h - y;
  36049. var transX = xv + (h - yv - xv) / Math.sqrt(2);
  36050. transX *= -1;
  36051. var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);
  36052. return {
  36053. transX: transX,
  36054. transY: transY
  36055. };
  36056. }
  36057. function createCurveControlPoints(points, i) {
  36058. function isNotMiddlePoint(points, i) {
  36059. if (points[i - 1] && points[i + 1]) {
  36060. return points[i].y >= Math.max(points[i - 1].y, points[i + 1].y) || points[i].y <= Math.min(points[i - 1].y, points[i + 1].y);
  36061. } else {
  36062. return false;
  36063. }
  36064. }
  36065. function isNotMiddlePointX(points, i) {
  36066. if (points[i - 1] && points[i + 1]) {
  36067. return points[i].x >= Math.max(points[i - 1].x, points[i + 1].x) || points[i].x <= Math.min(points[i - 1].x, points[i + 1].x);
  36068. } else {
  36069. return false;
  36070. }
  36071. }
  36072. var a = 0.2;
  36073. var b = 0.2;
  36074. var pAx = null;
  36075. var pAy = null;
  36076. var pBx = null;
  36077. var pBy = null;
  36078. if (i < 1) {
  36079. pAx = points[0].x + (points[1].x - points[0].x) * a;
  36080. pAy = points[0].y + (points[1].y - points[0].y) * a;
  36081. } else {
  36082. pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
  36083. pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
  36084. }
  36085. if (i > points.length - 3) {
  36086. var last = points.length - 1;
  36087. pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
  36088. pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
  36089. } else {
  36090. pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
  36091. pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
  36092. }
  36093. if (isNotMiddlePoint(points, i + 1)) {
  36094. pBy = points[i + 1].y;
  36095. }
  36096. if (isNotMiddlePoint(points, i)) {
  36097. pAy = points[i].y;
  36098. }
  36099. if (isNotMiddlePointX(points, i + 1)) {
  36100. pBx = points[i + 1].x;
  36101. }
  36102. if (isNotMiddlePointX(points, i)) {
  36103. pAx = points[i].x;
  36104. }
  36105. if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
  36106. pAy = points[i].y;
  36107. }
  36108. if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
  36109. pBy = points[i + 1].y;
  36110. }
  36111. if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
  36112. pAx = points[i].x;
  36113. }
  36114. if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
  36115. pBx = points[i + 1].x;
  36116. }
  36117. return {
  36118. ctrA: {
  36119. x: pAx,
  36120. y: pAy
  36121. },
  36122. ctrB: {
  36123. x: pBx,
  36124. y: pBy
  36125. }
  36126. };
  36127. }
  36128. function convertCoordinateOrigin(x, y, center) {
  36129. return {
  36130. x: center.x + x,
  36131. y: center.y - y
  36132. };
  36133. }
  36134. function avoidCollision(obj, target) {
  36135. if (target) {
  36136. // is collision test
  36137. while (util.isCollision(obj, target)) {
  36138. if (obj.start.x > 0) {
  36139. obj.start.y--;
  36140. } else if (obj.start.x < 0) {
  36141. obj.start.y++;
  36142. } else {
  36143. if (obj.start.y > 0) {
  36144. obj.start.y++;
  36145. } else {
  36146. obj.start.y--;
  36147. }
  36148. }
  36149. }
  36150. }
  36151. return obj;
  36152. }
  36153. function fixPieSeries(series, opts, config) {
  36154. var pieSeriesArr = [];
  36155. if (series.length > 0 && series[0].data.constructor.toString().indexOf('Array') > -1) {
  36156. opts._pieSeries_ = series;
  36157. var oldseries = series[0].data;
  36158. for (var i = 0; i < oldseries.length; i++) {
  36159. oldseries[i].formatter = series[0].formatter;
  36160. oldseries[i].data = oldseries[i].value;
  36161. pieSeriesArr.push(oldseries[i]);
  36162. }
  36163. opts.series = pieSeriesArr;
  36164. } else {
  36165. pieSeriesArr = series;
  36166. }
  36167. return pieSeriesArr;
  36168. }
  36169. function fillSeries(series, opts, config) {
  36170. var index = 0;
  36171. for (var i = 0; i < series.length; i++) {
  36172. var item = series[i];
  36173. if (!item.color) {
  36174. item.color = config.color[index];
  36175. index = (index + 1) % config.color.length;
  36176. }
  36177. if (!item.linearIndex) {
  36178. item.linearIndex = i;
  36179. }
  36180. if (!item.index) {
  36181. item.index = 0;
  36182. }
  36183. if (!item.type) {
  36184. item.type = opts.type;
  36185. }
  36186. if (typeof item.show == "undefined") {
  36187. item.show = true;
  36188. }
  36189. if (!item.type) {
  36190. item.type = opts.type;
  36191. }
  36192. if (!item.pointShape) {
  36193. item.pointShape = "circle";
  36194. }
  36195. if (!item.legendShape) {
  36196. switch (item.type) {
  36197. case 'line':
  36198. item.legendShape = "line";
  36199. break;
  36200. case 'column':
  36201. item.legendShape = "rect";
  36202. break;
  36203. case 'area':
  36204. item.legendShape = "triangle";
  36205. break;
  36206. case 'bar':
  36207. item.legendShape = "rect";
  36208. break;
  36209. default:
  36210. item.legendShape = "circle";
  36211. }
  36212. }
  36213. }
  36214. return series;
  36215. }
  36216. function fillCustomColor(linearType, customColor, series, config) {
  36217. var newcolor = customColor || [];
  36218. if (linearType == 'custom' && newcolor.length == 0) {
  36219. newcolor = config.linearColor;
  36220. }
  36221. if (linearType == 'custom' && newcolor.length < series.length) {
  36222. var chazhi = series.length - newcolor.length;
  36223. for (var i = 0; i < chazhi; i++) {
  36224. newcolor.push(config.linearColor[(i + 1) % config.linearColor.length]);
  36225. }
  36226. }
  36227. return newcolor;
  36228. }
  36229. function getDataRange(minData, maxData) {
  36230. var limit = 0;
  36231. var range = maxData - minData;
  36232. if (range >= 10000) {
  36233. limit = 1000;
  36234. } else if (range >= 1000) {
  36235. limit = 100;
  36236. } else if (range >= 100) {
  36237. limit = 10;
  36238. } else if (range >= 10) {
  36239. limit = 5;
  36240. } else if (range >= 1) {
  36241. limit = 1;
  36242. } else if (range >= 0.1) {
  36243. limit = 0.1;
  36244. } else if (range >= 0.01) {
  36245. limit = 0.01;
  36246. } else if (range >= 0.001) {
  36247. limit = 0.001;
  36248. } else if (range >= 0.0001) {
  36249. limit = 0.0001;
  36250. } else if (range >= 0.00001) {
  36251. limit = 0.00001;
  36252. } else {
  36253. limit = 0.000001;
  36254. }
  36255. return {
  36256. minRange: findRange(minData, 'lower', limit),
  36257. maxRange: findRange(maxData, 'upper', limit)
  36258. };
  36259. }
  36260. function measureText(text, fontSize, context) {
  36261. var width = 0;
  36262. text = String(text);
  36263. if (context !== false && context !== undefined && context.setFontSize && context.measureText) {
  36264. context.setFontSize(fontSize);
  36265. return context.measureText(text).width;
  36266. } else {
  36267. var text = text.split('');
  36268. for (var i = 0; i < text.length; i++) {
  36269. var item = text[i];
  36270. if (/[a-zA-Z]/.test(item)) {
  36271. width += 7;
  36272. } else if (/[0-9]/.test(item)) {
  36273. width += 5.5;
  36274. } else if (/\./.test(item)) {
  36275. width += 2.7;
  36276. } else if (/-/.test(item)) {
  36277. width += 3.25;
  36278. } else if (/:/.test(item)) {
  36279. width += 2.5;
  36280. } else if (/[\u4e00-\u9fa5]/.test(item)) {
  36281. width += 10;
  36282. } else if (/\(|\)/.test(item)) {
  36283. width += 3.73;
  36284. } else if (/\s/.test(item)) {
  36285. width += 2.5;
  36286. } else if (/%/.test(item)) {
  36287. width += 8;
  36288. } else {
  36289. width += 10;
  36290. }
  36291. }
  36292. return width * fontSize / 10;
  36293. }
  36294. }
  36295. function dataCombine(series) {
  36296. return series.reduce(function (a, b) {
  36297. return (a.data ? a.data : a).concat(b.data);
  36298. }, []);
  36299. }
  36300. function dataCombineStack(series, len) {
  36301. var sum = new Array(len);
  36302. for (var j = 0; j < sum.length; j++) {
  36303. sum[j] = 0;
  36304. }
  36305. for (var i = 0; i < series.length; i++) {
  36306. for (var j = 0; j < sum.length; j++) {
  36307. sum[j] += series[i].data[j];
  36308. }
  36309. }
  36310. return series.reduce(function (a, b) {
  36311. return (a.data ? a.data : a).concat(b.data).concat(sum);
  36312. }, []);
  36313. }
  36314. function getTouches(touches, opts, e) {
  36315. var x, y;
  36316. if (touches.clientX) {
  36317. if (opts.rotate) {
  36318. y = opts.height - touches.clientX * opts.pix;
  36319. x = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  36320. } else {
  36321. x = touches.clientX * opts.pix;
  36322. y = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  36323. }
  36324. } else {
  36325. if (opts.rotate) {
  36326. y = opts.height - touches.x * opts.pix;
  36327. x = touches.y * opts.pix;
  36328. } else {
  36329. x = touches.x * opts.pix;
  36330. y = touches.y * opts.pix;
  36331. }
  36332. }
  36333. return {
  36334. x: x,
  36335. y: y
  36336. };
  36337. }
  36338. function getSeriesDataItem(series, index, group) {
  36339. var data = [];
  36340. var newSeries = [];
  36341. var indexIsArr = index.constructor.toString().indexOf('Array') > -1;
  36342. if (indexIsArr) {
  36343. var tempSeries = filterSeries(series);
  36344. for (var i = 0; i < group.length; i++) {
  36345. newSeries.push(tempSeries[group[i]]);
  36346. }
  36347. } else {
  36348. newSeries = series;
  36349. }
  36350. ;
  36351. for (var _i = 0; _i < newSeries.length; _i++) {
  36352. var item = newSeries[_i];
  36353. var tmpindex = -1;
  36354. if (indexIsArr) {
  36355. tmpindex = index[_i];
  36356. } else {
  36357. tmpindex = index;
  36358. }
  36359. if (item.data[tmpindex] !== null && typeof item.data[tmpindex] !== 'undefined' && item.show) {
  36360. var seriesItem = {};
  36361. seriesItem.color = item.color;
  36362. seriesItem.type = item.type;
  36363. seriesItem.style = item.style;
  36364. seriesItem.pointShape = item.pointShape;
  36365. seriesItem.disableLegend = item.disableLegend;
  36366. seriesItem.name = item.name;
  36367. seriesItem.show = item.show;
  36368. seriesItem.data = item.formatter ? item.formatter(item.data[tmpindex]) : item.data[tmpindex];
  36369. data.push(seriesItem);
  36370. }
  36371. }
  36372. return data;
  36373. }
  36374. function getMaxTextListLength(list, fontSize, context) {
  36375. var lengthList = list.map(function (item) {
  36376. return measureText(item, fontSize, context);
  36377. });
  36378. return Math.max.apply(null, lengthList);
  36379. }
  36380. function getRadarCoordinateSeries(length) {
  36381. var eachAngle = 2 * Math.PI / length;
  36382. var CoordinateSeries = [];
  36383. for (var i = 0; i < length; i++) {
  36384. CoordinateSeries.push(eachAngle * i);
  36385. }
  36386. return CoordinateSeries.map(function (item) {
  36387. return -1 * item + Math.PI / 2;
  36388. });
  36389. }
  36390. function getToolTipData(seriesData, opts, index, group, categories) {
  36391. var option = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  36392. var calPoints = opts.chartData.calPoints ? opts.chartData.calPoints : [];
  36393. var points = {};
  36394. if (group.length > 0) {
  36395. var filterPoints = [];
  36396. for (var i = 0; i < group.length; i++) {
  36397. filterPoints.push(calPoints[group[i]]);
  36398. }
  36399. points = filterPoints[0][index[0]];
  36400. } else {
  36401. points = calPoints[0][index];
  36402. }
  36403. ;
  36404. var textList = seriesData.map(function (item) {
  36405. var titleText = null;
  36406. if (opts.categories && opts.categories.length > 0) {
  36407. titleText = categories[index];
  36408. }
  36409. ;
  36410. return {
  36411. text: option.formatter ? option.formatter(item, titleText, index, opts) : item.name + ': ' + item.data,
  36412. color: item.color
  36413. };
  36414. });
  36415. var offset = {
  36416. x: Math.round(points.x),
  36417. y: Math.round(points.y)
  36418. };
  36419. return {
  36420. textList: textList,
  36421. offset: offset
  36422. };
  36423. }
  36424. function getMixToolTipData(seriesData, opts, index, categories) {
  36425. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  36426. var points = opts.chartData.xAxisPoints[index] + opts.chartData.eachSpacing / 2;
  36427. var textList = seriesData.map(function (item) {
  36428. return {
  36429. text: option.formatter ? option.formatter(item, categories[index], index, opts) : item.name + ': ' + item.data,
  36430. color: item.color,
  36431. disableLegend: item.disableLegend ? true : false
  36432. };
  36433. });
  36434. textList = textList.filter(function (item) {
  36435. if (item.disableLegend !== true) {
  36436. return item;
  36437. }
  36438. });
  36439. var offset = {
  36440. x: Math.round(points),
  36441. y: 0
  36442. };
  36443. return {
  36444. textList: textList,
  36445. offset: offset
  36446. };
  36447. }
  36448. function getCandleToolTipData(series, seriesData, opts, index, categories, extra) {
  36449. var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
  36450. var calPoints = opts.chartData.calPoints;
  36451. var upColor = extra.color.upFill;
  36452. var downColor = extra.color.downFill;
  36453. //颜色顺序为开盘,收盘,最低,最高
  36454. var color = [upColor, upColor, downColor, upColor];
  36455. var textList = [];
  36456. seriesData.map(function (item) {
  36457. if (index == 0) {
  36458. if (item.data[1] - item.data[0] < 0) {
  36459. color[1] = downColor;
  36460. } else {
  36461. color[1] = upColor;
  36462. }
  36463. } else {
  36464. if (item.data[0] < series[index - 1][1]) {
  36465. color[0] = downColor;
  36466. }
  36467. if (item.data[1] < item.data[0]) {
  36468. color[1] = downColor;
  36469. }
  36470. if (item.data[2] > series[index - 1][1]) {
  36471. color[2] = upColor;
  36472. }
  36473. if (item.data[3] < series[index - 1][1]) {
  36474. color[3] = downColor;
  36475. }
  36476. }
  36477. var text1 = {
  36478. text: '开盘:' + item.data[0],
  36479. color: color[0]
  36480. };
  36481. var text2 = {
  36482. text: '收盘:' + item.data[1],
  36483. color: color[1]
  36484. };
  36485. var text3 = {
  36486. text: '最低:' + item.data[2],
  36487. color: color[2]
  36488. };
  36489. var text4 = {
  36490. text: '最高:' + item.data[3],
  36491. color: color[3]
  36492. };
  36493. textList.push(text1, text2, text3, text4);
  36494. });
  36495. var validCalPoints = [];
  36496. var offset = {
  36497. x: 0,
  36498. y: 0
  36499. };
  36500. for (var i = 0; i < calPoints.length; i++) {
  36501. var points = calPoints[i];
  36502. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  36503. validCalPoints.push(points[index]);
  36504. }
  36505. }
  36506. offset.x = Math.round(validCalPoints[0][0].x);
  36507. return {
  36508. textList: textList,
  36509. offset: offset
  36510. };
  36511. }
  36512. function filterSeries(series) {
  36513. var tempSeries = [];
  36514. for (var i = 0; i < series.length; i++) {
  36515. if (series[i].show == true) {
  36516. tempSeries.push(series[i]);
  36517. }
  36518. }
  36519. return tempSeries;
  36520. }
  36521. function findCurrentIndex(currentPoints, calPoints, opts, config) {
  36522. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  36523. var current = {
  36524. index: -1,
  36525. group: []
  36526. };
  36527. var spacing = opts.chartData.eachSpacing / 2;
  36528. var xAxisPoints = [];
  36529. if (calPoints && calPoints.length > 0) {
  36530. if (!opts.categories) {
  36531. spacing = 0;
  36532. } else {
  36533. for (var i = 1; i < opts.chartData.xAxisPoints.length; i++) {
  36534. xAxisPoints.push(opts.chartData.xAxisPoints[i] - spacing);
  36535. }
  36536. if ((opts.type == 'line' || opts.type == 'area') && opts.xAxis.boundaryGap == 'justify') {
  36537. xAxisPoints = opts.chartData.xAxisPoints;
  36538. }
  36539. }
  36540. if (isInExactChartArea(currentPoints, opts, config)) {
  36541. if (!opts.categories) {
  36542. var timePoints = Array(calPoints.length);
  36543. for (var _i2 = 0; _i2 < calPoints.length; _i2++) {
  36544. timePoints[_i2] = Array(calPoints[_i2].length);
  36545. for (var j = 0; j < calPoints[_i2].length; j++) {
  36546. timePoints[_i2][j] = Math.abs(calPoints[_i2][j].x - currentPoints.x);
  36547. }
  36548. }
  36549. ;
  36550. var pointValue = Array(timePoints.length);
  36551. var pointIndex = Array(timePoints.length);
  36552. for (var _i3 = 0; _i3 < timePoints.length; _i3++) {
  36553. pointValue[_i3] = Math.min.apply(null, timePoints[_i3]);
  36554. pointIndex[_i3] = timePoints[_i3].indexOf(pointValue[_i3]);
  36555. }
  36556. var minValue = Math.min.apply(null, pointValue);
  36557. current.index = [];
  36558. for (var _i4 = 0; _i4 < pointValue.length; _i4++) {
  36559. if (pointValue[_i4] == minValue) {
  36560. current.group.push(_i4);
  36561. current.index.push(pointIndex[_i4]);
  36562. }
  36563. }
  36564. ;
  36565. } else {
  36566. xAxisPoints.forEach(function (item, index) {
  36567. if (currentPoints.x + offset + spacing > item) {
  36568. current.index = index;
  36569. }
  36570. });
  36571. }
  36572. }
  36573. }
  36574. return current;
  36575. }
  36576. function findBarChartCurrentIndex(currentPoints, calPoints, opts, config) {
  36577. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  36578. var current = {
  36579. index: -1,
  36580. group: []
  36581. };
  36582. var spacing = opts.chartData.eachSpacing / 2;
  36583. var yAxisPoints = opts.chartData.yAxisPoints;
  36584. if (calPoints && calPoints.length > 0) {
  36585. if (isInExactChartArea(currentPoints, opts, config)) {
  36586. yAxisPoints.forEach(function (item, index) {
  36587. if (currentPoints.y + offset + spacing > item) {
  36588. current.index = index;
  36589. }
  36590. });
  36591. }
  36592. }
  36593. return current;
  36594. }
  36595. function findLegendIndex(currentPoints, legendData, opts) {
  36596. var currentIndex = -1;
  36597. var gap = 0;
  36598. if (isInExactLegendArea(currentPoints, legendData.area)) {
  36599. var points = legendData.points;
  36600. var index = -1;
  36601. for (var i = 0, len = points.length; i < len; i++) {
  36602. var item = points[i];
  36603. for (var j = 0; j < item.length; j++) {
  36604. index += 1;
  36605. var area = item[j]['area'];
  36606. if (area && currentPoints.x > area[0] - gap && currentPoints.x < area[2] + gap && currentPoints.y > area[1] - gap && currentPoints.y < area[3] + gap) {
  36607. currentIndex = index;
  36608. break;
  36609. }
  36610. }
  36611. }
  36612. return currentIndex;
  36613. }
  36614. return currentIndex;
  36615. }
  36616. function isInExactLegendArea(currentPoints, area) {
  36617. return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && currentPoints.y < area.end.y;
  36618. }
  36619. function isInExactChartArea(currentPoints, opts, config) {
  36620. return currentPoints.x <= opts.width - opts.area[1] + 10 && currentPoints.x >= opts.area[3] - 10 && currentPoints.y >= opts.area[0] && currentPoints.y <= opts.height - opts.area[2];
  36621. }
  36622. function findRadarChartCurrentIndex(currentPoints, radarData, count) {
  36623. var eachAngleArea = 2 * Math.PI / count;
  36624. var currentIndex = -1;
  36625. if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
  36626. var fixAngle = function fixAngle(angle) {
  36627. if (angle < 0) {
  36628. angle += 2 * Math.PI;
  36629. }
  36630. if (angle > 2 * Math.PI) {
  36631. angle -= 2 * Math.PI;
  36632. }
  36633. return angle;
  36634. };
  36635. var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
  36636. angle = -1 * angle;
  36637. if (angle < 0) {
  36638. angle += 2 * Math.PI;
  36639. }
  36640. var angleList = radarData.angleList.map(function (item) {
  36641. item = fixAngle(-1 * item);
  36642. return item;
  36643. });
  36644. angleList.forEach(function (item, index) {
  36645. var rangeStart = fixAngle(item - eachAngleArea / 2);
  36646. var rangeEnd = fixAngle(item + eachAngleArea / 2);
  36647. if (rangeEnd < rangeStart) {
  36648. rangeEnd += 2 * Math.PI;
  36649. }
  36650. if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) {
  36651. currentIndex = index;
  36652. }
  36653. });
  36654. }
  36655. return currentIndex;
  36656. }
  36657. function findFunnelChartCurrentIndex(currentPoints, funnelData) {
  36658. var currentIndex = -1;
  36659. for (var i = 0, len = funnelData.series.length; i < len; i++) {
  36660. var item = funnelData.series[i];
  36661. if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
  36662. currentIndex = i;
  36663. break;
  36664. }
  36665. }
  36666. return currentIndex;
  36667. }
  36668. function findWordChartCurrentIndex(currentPoints, wordData) {
  36669. var currentIndex = -1;
  36670. for (var i = 0, len = wordData.length; i < len; i++) {
  36671. var item = wordData[i];
  36672. if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
  36673. currentIndex = i;
  36674. break;
  36675. }
  36676. }
  36677. return currentIndex;
  36678. }
  36679. function findMapChartCurrentIndex(currentPoints, opts) {
  36680. var currentIndex = -1;
  36681. var cData = opts.chartData.mapData;
  36682. var data = opts.series;
  36683. var tmp = pointToCoordinate(currentPoints.y, currentPoints.x, cData.bounds, cData.scale, cData.xoffset, cData.yoffset);
  36684. var poi = [tmp.x, tmp.y];
  36685. for (var i = 0, len = data.length; i < len; i++) {
  36686. var item = data[i].geometry.coordinates;
  36687. if (isPoiWithinPoly(poi, item, opts.chartData.mapData.mercator)) {
  36688. currentIndex = i;
  36689. break;
  36690. }
  36691. }
  36692. return currentIndex;
  36693. }
  36694. function findRoseChartCurrentIndex(currentPoints, pieData, opts) {
  36695. var currentIndex = -1;
  36696. var series = getRoseDataPoints(opts._series_, opts.extra.rose.type, pieData.radius, pieData.radius);
  36697. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  36698. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  36699. angle = -angle;
  36700. if (opts.extra.rose && opts.extra.rose.offsetAngle) {
  36701. angle = angle - opts.extra.rose.offsetAngle * Math.PI / 180;
  36702. }
  36703. for (var i = 0, len = series.length; i < len; i++) {
  36704. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._rose_proportion_ * 2 * Math.PI)) {
  36705. currentIndex = i;
  36706. break;
  36707. }
  36708. }
  36709. }
  36710. return currentIndex;
  36711. }
  36712. function findPieChartCurrentIndex(currentPoints, pieData, opts) {
  36713. var currentIndex = -1;
  36714. var series = getPieDataPoints(pieData.series);
  36715. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  36716. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  36717. angle = -angle;
  36718. if (opts.extra.pie && opts.extra.pie.offsetAngle) {
  36719. angle = angle - opts.extra.pie.offsetAngle * Math.PI / 180;
  36720. }
  36721. if (opts.extra.ring && opts.extra.ring.offsetAngle) {
  36722. angle = angle - opts.extra.ring.offsetAngle * Math.PI / 180;
  36723. }
  36724. for (var i = 0, len = series.length; i < len; i++) {
  36725. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._proportion_ * 2 * Math.PI)) {
  36726. currentIndex = i;
  36727. break;
  36728. }
  36729. }
  36730. }
  36731. return currentIndex;
  36732. }
  36733. function isInExactPieChartArea(currentPoints, center, radius) {
  36734. return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
  36735. }
  36736. function splitPoints(points, eachSeries) {
  36737. var newPoints = [];
  36738. var items = [];
  36739. points.forEach(function (item, index) {
  36740. if (eachSeries.connectNulls) {
  36741. if (item !== null) {
  36742. items.push(item);
  36743. }
  36744. } else {
  36745. if (item !== null) {
  36746. items.push(item);
  36747. } else {
  36748. if (items.length) {
  36749. newPoints.push(items);
  36750. }
  36751. items = [];
  36752. }
  36753. }
  36754. });
  36755. if (items.length) {
  36756. newPoints.push(items);
  36757. }
  36758. return newPoints;
  36759. }
  36760. function calLegendData(series, opts, config, chartData, context) {
  36761. var legendData = {
  36762. area: {
  36763. start: {
  36764. x: 0,
  36765. y: 0
  36766. },
  36767. end: {
  36768. x: 0,
  36769. y: 0
  36770. },
  36771. width: 0,
  36772. height: 0,
  36773. wholeWidth: 0,
  36774. wholeHeight: 0
  36775. },
  36776. points: [],
  36777. widthArr: [],
  36778. heightArr: []
  36779. };
  36780. if (opts.legend.show === false) {
  36781. chartData.legendData = legendData;
  36782. return legendData;
  36783. }
  36784. var padding = opts.legend.padding * opts.pix;
  36785. var margin = opts.legend.margin * opts.pix;
  36786. var fontSize = opts.legend.fontSize ? opts.legend.fontSize * opts.pix : config.fontSize;
  36787. var shapeWidth = 15 * opts.pix;
  36788. var shapeRight = 5 * opts.pix;
  36789. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  36790. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  36791. var legendList = [];
  36792. var widthCount = 0;
  36793. var widthCountArr = [];
  36794. var currentRow = [];
  36795. for (var i = 0; i < series.length; i++) {
  36796. var item = series[i];
  36797. var itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  36798. if (widthCount + itemWidth > opts.width - opts.area[1] - opts.area[3]) {
  36799. legendList.push(currentRow);
  36800. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  36801. widthCount = itemWidth;
  36802. currentRow = [item];
  36803. } else {
  36804. widthCount += itemWidth;
  36805. currentRow.push(item);
  36806. }
  36807. }
  36808. if (currentRow.length) {
  36809. legendList.push(currentRow);
  36810. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  36811. legendData.widthArr = widthCountArr;
  36812. var legendWidth = Math.max.apply(null, widthCountArr);
  36813. switch (opts.legend.float) {
  36814. case 'left':
  36815. legendData.area.start.x = opts.area[3];
  36816. legendData.area.end.x = opts.area[3] + legendWidth + 2 * padding;
  36817. break;
  36818. case 'right':
  36819. legendData.area.start.x = opts.width - opts.area[1] - legendWidth - 2 * padding;
  36820. legendData.area.end.x = opts.width - opts.area[1];
  36821. break;
  36822. default:
  36823. legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
  36824. legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
  36825. }
  36826. legendData.area.width = legendWidth + 2 * padding;
  36827. legendData.area.wholeWidth = legendWidth + 2 * padding;
  36828. legendData.area.height = legendList.length * lineHeight + 2 * padding;
  36829. legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
  36830. legendData.points = legendList;
  36831. }
  36832. } else {
  36833. var len = series.length;
  36834. var maxHeight = opts.height - opts.area[0] - opts.area[2] - 2 * margin - 2 * padding;
  36835. var maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
  36836. legendData.area.height = maxLength * lineHeight + padding * 2;
  36837. legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
  36838. switch (opts.legend.float) {
  36839. case 'top':
  36840. legendData.area.start.y = opts.area[0] + margin;
  36841. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  36842. break;
  36843. case 'bottom':
  36844. legendData.area.start.y = opts.height - opts.area[2] - margin - legendData.area.height;
  36845. legendData.area.end.y = opts.height - opts.area[2] - margin;
  36846. break;
  36847. default:
  36848. legendData.area.start.y = (opts.height - legendData.area.height) / 2;
  36849. legendData.area.end.y = (opts.height + legendData.area.height) / 2;
  36850. }
  36851. var lineNum = len % maxLength === 0 ? len / maxLength : Math.floor(len / maxLength + 1);
  36852. var _currentRow = [];
  36853. for (var _i5 = 0; _i5 < lineNum; _i5++) {
  36854. var temp = series.slice(_i5 * maxLength, _i5 * maxLength + maxLength);
  36855. _currentRow.push(temp);
  36856. }
  36857. legendData.points = _currentRow;
  36858. if (_currentRow.length) {
  36859. for (var _i6 = 0; _i6 < _currentRow.length; _i6++) {
  36860. var _item = _currentRow[_i6];
  36861. var maxWidth = 0;
  36862. for (var j = 0; j < _item.length; j++) {
  36863. var _itemWidth = shapeWidth + shapeRight + measureText(_item[j].name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  36864. if (_itemWidth > maxWidth) {
  36865. maxWidth = _itemWidth;
  36866. }
  36867. }
  36868. legendData.widthArr.push(maxWidth);
  36869. legendData.heightArr.push(_item.length * lineHeight + padding * 2);
  36870. }
  36871. var _legendWidth = 0;
  36872. for (var _i7 = 0; _i7 < legendData.widthArr.length; _i7++) {
  36873. _legendWidth += legendData.widthArr[_i7];
  36874. }
  36875. legendData.area.width = _legendWidth - opts.legend.itemGap * opts.pix + 2 * padding;
  36876. legendData.area.wholeWidth = legendData.area.width + padding;
  36877. }
  36878. }
  36879. switch (opts.legend.position) {
  36880. case 'top':
  36881. legendData.area.start.y = opts.area[0] + margin;
  36882. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  36883. break;
  36884. case 'bottom':
  36885. legendData.area.start.y = opts.height - opts.area[2] - legendData.area.height - margin;
  36886. legendData.area.end.y = opts.height - opts.area[2] - margin;
  36887. break;
  36888. case 'left':
  36889. legendData.area.start.x = opts.area[3];
  36890. legendData.area.end.x = opts.area[3] + legendData.area.width;
  36891. break;
  36892. case 'right':
  36893. legendData.area.start.x = opts.width - opts.area[1] - legendData.area.width;
  36894. legendData.area.end.x = opts.width - opts.area[1];
  36895. break;
  36896. }
  36897. chartData.legendData = legendData;
  36898. return legendData;
  36899. }
  36900. function calCategoriesData(categories, opts, config, eachSpacing, context) {
  36901. var result = {
  36902. angle: 0,
  36903. xAxisHeight: config.xAxisHeight
  36904. };
  36905. var categoriesTextLenth = categories.map(function (item) {
  36906. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  36907. });
  36908. var maxTextLength = Math.max.apply(this, categoriesTextLenth);
  36909. if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  36910. result.angle = 45 * Math.PI / 180;
  36911. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  36912. }
  36913. return result;
  36914. }
  36915. function getXAxisTextList(series, opts, config, stack) {
  36916. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  36917. var data;
  36918. if (stack == 'stack') {
  36919. data = dataCombineStack(series, opts.categories.length);
  36920. } else {
  36921. data = dataCombine(series);
  36922. }
  36923. var sorted = [];
  36924. // remove null from data
  36925. data = data.filter(function (item) {
  36926. //return item !== null;
  36927. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  36928. if (item.constructor.toString().indexOf('Array') > -1) {
  36929. return item !== null;
  36930. } else {
  36931. return item.value !== null;
  36932. }
  36933. } else {
  36934. return item !== null;
  36935. }
  36936. });
  36937. data.map(function (item) {
  36938. if ((0, _typeof2.default)(item) === 'object') {
  36939. if (item.constructor.toString().indexOf('Array') > -1) {
  36940. if (opts.type == 'candle') {
  36941. item.map(function (subitem) {
  36942. sorted.push(subitem);
  36943. });
  36944. } else {
  36945. sorted.push(item[0]);
  36946. }
  36947. } else {
  36948. sorted.push(item.value);
  36949. }
  36950. } else {
  36951. sorted.push(item);
  36952. }
  36953. });
  36954. var minData = 0;
  36955. var maxData = 0;
  36956. if (sorted.length > 0) {
  36957. minData = Math.min.apply(this, sorted);
  36958. maxData = Math.max.apply(this, sorted);
  36959. }
  36960. //为了兼容v1.9.0之前的项目
  36961. if (index > -1) {
  36962. if (typeof opts.xAxis.data[index].min === 'number') {
  36963. minData = Math.min(opts.xAxis.data[index].min, minData);
  36964. }
  36965. if (typeof opts.xAxis.data[index].max === 'number') {
  36966. maxData = Math.max(opts.xAxis.data[index].max, maxData);
  36967. }
  36968. } else {
  36969. if (typeof opts.xAxis.min === 'number') {
  36970. minData = Math.min(opts.xAxis.min, minData);
  36971. }
  36972. if (typeof opts.xAxis.max === 'number') {
  36973. maxData = Math.max(opts.xAxis.max, maxData);
  36974. }
  36975. }
  36976. if (minData === maxData) {
  36977. var rangeSpan = maxData || 10;
  36978. maxData += rangeSpan;
  36979. }
  36980. //var dataRange = getDataRange(minData, maxData);
  36981. var minRange = minData;
  36982. var maxRange = maxData;
  36983. var range = [];
  36984. var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
  36985. for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
  36986. range.push(minRange + eachRange * i);
  36987. }
  36988. return range;
  36989. }
  36990. function calXAxisData(series, opts, config, context) {
  36991. //堆叠图重算Y轴
  36992. var columnstyle = assign({}, {
  36993. type: ""
  36994. }, opts.extra.bar);
  36995. var result = {
  36996. angle: 0,
  36997. xAxisHeight: config.xAxisHeight
  36998. };
  36999. result.ranges = getXAxisTextList(series, opts, config, columnstyle.type);
  37000. result.rangesFormat = result.ranges.map(function (item) {
  37001. //item = opts.xAxis.formatter ? opts.xAxis.formatter(item) : util.toFixed(item, 2);
  37002. item = util.toFixed(item, 2);
  37003. return item;
  37004. });
  37005. var xAxisScaleValues = result.ranges.map(function (item) {
  37006. // 如果刻度值是浮点数,则保留两位小数
  37007. item = util.toFixed(item, 2);
  37008. // 若有自定义格式则调用自定义的格式化函数
  37009. //item = opts.xAxis.formatter ? opts.xAxis.formatter(Number(item)) : item;
  37010. return item;
  37011. });
  37012. result = Object.assign(result, getXAxisPoints(xAxisScaleValues, opts, config));
  37013. // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
  37014. var eachSpacing = result.eachSpacing;
  37015. var textLength = xAxisScaleValues.map(function (item) {
  37016. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  37017. });
  37018. // get max length of categories text
  37019. var maxTextLength = Math.max.apply(this, textLength);
  37020. // 如果刻度值文本内容过长,则将其逆时针旋转45°
  37021. if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  37022. result.angle = 45 * Math.PI / 180;
  37023. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  37024. }
  37025. if (opts.xAxis.disabled === true) {
  37026. result.xAxisHeight = 0;
  37027. }
  37028. return result;
  37029. }
  37030. function getRadarDataPoints(angleList, center, radius, series, opts) {
  37031. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  37032. var radarOption = opts.extra.radar || {};
  37033. radarOption.max = radarOption.max || 0;
  37034. var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
  37035. var data = [];
  37036. var _loop2 = function _loop2(i) {
  37037. var each = series[i];
  37038. var listItem = {};
  37039. listItem.color = each.color;
  37040. listItem.legendShape = each.legendShape;
  37041. listItem.pointShape = each.pointShape;
  37042. listItem.data = [];
  37043. each.data.forEach(function (item, index) {
  37044. var tmp = {};
  37045. tmp.angle = angleList[index];
  37046. tmp.proportion = item / maxData;
  37047. tmp.value = item;
  37048. tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center);
  37049. listItem.data.push(tmp);
  37050. });
  37051. data.push(listItem);
  37052. };
  37053. for (var i = 0; i < series.length; i++) {
  37054. _loop2(i);
  37055. }
  37056. return data;
  37057. }
  37058. function getPieDataPoints(series, radius) {
  37059. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  37060. var count = 0;
  37061. var _start_ = 0;
  37062. for (var i = 0; i < series.length; i++) {
  37063. var item = series[i];
  37064. item.data = item.data === null ? 0 : item.data;
  37065. count += item.data;
  37066. }
  37067. for (var _i8 = 0; _i8 < series.length; _i8++) {
  37068. var _item2 = series[_i8];
  37069. _item2.data = _item2.data === null ? 0 : _item2.data;
  37070. if (count === 0) {
  37071. _item2._proportion_ = 1 / series.length * process;
  37072. } else {
  37073. _item2._proportion_ = _item2.data / count * process;
  37074. }
  37075. _item2._radius_ = radius;
  37076. }
  37077. for (var _i9 = 0; _i9 < series.length; _i9++) {
  37078. var _item3 = series[_i9];
  37079. _item3._start_ = _start_;
  37080. _start_ += 2 * _item3._proportion_ * Math.PI;
  37081. }
  37082. return series;
  37083. }
  37084. function getFunnelDataPoints(series, radius, type, eachSpacing) {
  37085. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37086. series = series.sort(function (a, b) {
  37087. return parseInt(b.data) - parseInt(a.data);
  37088. });
  37089. for (var i = 0; i < series.length; i++) {
  37090. if (type == 'funnel') {
  37091. series[i].radius = series[i].data / series[0].data * radius * process;
  37092. } else {
  37093. series[i].radius = eachSpacing * (series.length - i) / (eachSpacing * series.length) * radius * process;
  37094. }
  37095. series[i]._proportion_ = series[i].data / series[0].data;
  37096. }
  37097. if (type !== 'pyramid') {
  37098. series.reverse();
  37099. }
  37100. return series;
  37101. }
  37102. function getRoseDataPoints(series, type, minRadius, radius) {
  37103. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37104. var count = 0;
  37105. var _start_ = 0;
  37106. var dataArr = [];
  37107. for (var i = 0; i < series.length; i++) {
  37108. var item = series[i];
  37109. item.data = item.data === null ? 0 : item.data;
  37110. count += item.data;
  37111. dataArr.push(item.data);
  37112. }
  37113. var minData = Math.min.apply(null, dataArr);
  37114. var maxData = Math.max.apply(null, dataArr);
  37115. var radiusLength = radius - minRadius;
  37116. for (var _i10 = 0; _i10 < series.length; _i10++) {
  37117. var _item4 = series[_i10];
  37118. _item4.data = _item4.data === null ? 0 : _item4.data;
  37119. if (count === 0) {
  37120. _item4._proportion_ = 1 / series.length * process;
  37121. _item4._rose_proportion_ = 1 / series.length * process;
  37122. } else {
  37123. _item4._proportion_ = _item4.data / count * process;
  37124. if (type == 'area') {
  37125. _item4._rose_proportion_ = 1 / series.length * process;
  37126. } else {
  37127. _item4._rose_proportion_ = _item4.data / count * process;
  37128. }
  37129. }
  37130. _item4._radius_ = minRadius + radiusLength * ((_item4.data - minData) / (maxData - minData)) || radius;
  37131. }
  37132. for (var _i11 = 0; _i11 < series.length; _i11++) {
  37133. var _item5 = series[_i11];
  37134. _item5._start_ = _start_;
  37135. _start_ += 2 * _item5._rose_proportion_ * Math.PI;
  37136. }
  37137. return series;
  37138. }
  37139. function getArcbarDataPoints(series, arcbarOption) {
  37140. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  37141. if (process == 1) {
  37142. process = 0.999999;
  37143. }
  37144. for (var i = 0; i < series.length; i++) {
  37145. var item = series[i];
  37146. item.data = item.data === null ? 0 : item.data;
  37147. var totalAngle = void 0;
  37148. if (arcbarOption.type == 'circle') {
  37149. totalAngle = 2;
  37150. } else {
  37151. if (arcbarOption.endAngle < arcbarOption.startAngle) {
  37152. totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
  37153. } else {
  37154. totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
  37155. }
  37156. }
  37157. item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
  37158. if (item._proportion_ >= 2) {
  37159. item._proportion_ = item._proportion_ % 2;
  37160. }
  37161. }
  37162. return series;
  37163. }
  37164. function getGaugeAxisPoints(categories, startAngle, endAngle) {
  37165. var totalAngle = startAngle - endAngle + 1;
  37166. var tempStartAngle = startAngle;
  37167. for (var i = 0; i < categories.length; i++) {
  37168. categories[i].value = categories[i].value === null ? 0 : categories[i].value;
  37169. categories[i]._startAngle_ = tempStartAngle;
  37170. categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
  37171. if (categories[i]._endAngle_ >= 2) {
  37172. categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
  37173. }
  37174. tempStartAngle = categories[i]._endAngle_;
  37175. }
  37176. return categories;
  37177. }
  37178. function getGaugeDataPoints(series, categories, gaugeOption) {
  37179. var process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
  37180. for (var i = 0; i < series.length; i++) {
  37181. var item = series[i];
  37182. item.data = item.data === null ? 0 : item.data;
  37183. if (gaugeOption.pointer.color == 'auto') {
  37184. for (var _i12 = 0; _i12 < categories.length; _i12++) {
  37185. if (item.data <= categories[_i12].value) {
  37186. item.color = categories[_i12].color;
  37187. break;
  37188. }
  37189. }
  37190. } else {
  37191. item.color = gaugeOption.pointer.color;
  37192. }
  37193. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  37194. item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
  37195. item._oldAngle_ = gaugeOption.oldAngle;
  37196. if (gaugeOption.oldAngle < gaugeOption.endAngle) {
  37197. item._oldAngle_ += 2;
  37198. }
  37199. if (item.data >= gaugeOption.oldData) {
  37200. item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
  37201. } else {
  37202. item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
  37203. }
  37204. if (item._proportion_ >= 2) {
  37205. item._proportion_ = item._proportion_ % 2;
  37206. }
  37207. }
  37208. return series;
  37209. }
  37210. function getPieTextMaxLength(series, config, context, opts) {
  37211. series = getPieDataPoints(series);
  37212. var maxLength = 0;
  37213. for (var i = 0; i < series.length; i++) {
  37214. var item = series[i];
  37215. var text = item.formatter ? item.formatter(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  37216. maxLength = Math.max(maxLength, measureText(text, item.textSize * opts.pix || config.fontSize, context));
  37217. }
  37218. return maxLength;
  37219. }
  37220. function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
  37221. return points.map(function (item) {
  37222. if (item === null) {
  37223. return null;
  37224. }
  37225. var seriesGap = 0;
  37226. var categoryGap = 0;
  37227. if (opts.type == 'mix') {
  37228. seriesGap = opts.extra.mix.column.seriesGap * opts.pix || 0;
  37229. categoryGap = opts.extra.mix.column.categoryGap * opts.pix || 0;
  37230. } else {
  37231. seriesGap = opts.extra.column.seriesGap * opts.pix || 0;
  37232. categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  37233. }
  37234. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  37235. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  37236. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  37237. if (opts.extra.mix && opts.extra.mix.column.width && +opts.extra.mix.column.width > 0) {
  37238. item.width = Math.min(item.width, +opts.extra.mix.column.width * opts.pix);
  37239. }
  37240. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  37241. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  37242. }
  37243. if (item.width <= 0) {
  37244. item.width = 1;
  37245. }
  37246. item.x += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  37247. return item;
  37248. });
  37249. }
  37250. function fixBarData(points, eachSpacing, columnLen, index, config, opts) {
  37251. return points.map(function (item) {
  37252. if (item === null) {
  37253. return null;
  37254. }
  37255. var seriesGap = 0;
  37256. var categoryGap = 0;
  37257. seriesGap = opts.extra.bar.seriesGap * opts.pix || 0;
  37258. categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  37259. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  37260. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  37261. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  37262. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  37263. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  37264. }
  37265. if (item.width <= 0) {
  37266. item.width = 1;
  37267. }
  37268. item.y += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  37269. return item;
  37270. });
  37271. }
  37272. function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
  37273. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  37274. return points.map(function (item) {
  37275. if (item === null) {
  37276. return null;
  37277. }
  37278. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  37279. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  37280. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  37281. }
  37282. if (index > 0) {
  37283. item.width -= 2 * border;
  37284. }
  37285. return item;
  37286. });
  37287. }
  37288. function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  37289. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  37290. return points.map(function (item, indexn) {
  37291. if (item === null) {
  37292. return null;
  37293. }
  37294. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  37295. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  37296. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  37297. }
  37298. if (item.width <= 0) {
  37299. item.width = 1;
  37300. }
  37301. return item;
  37302. });
  37303. }
  37304. function fixBarStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  37305. var categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  37306. return points.map(function (item, indexn) {
  37307. if (item === null) {
  37308. return null;
  37309. }
  37310. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  37311. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  37312. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  37313. }
  37314. if (item.width <= 0) {
  37315. item.width = 1;
  37316. }
  37317. return item;
  37318. });
  37319. }
  37320. function getXAxisPoints(categories, opts, config) {
  37321. var spacingValid = opts.width - opts.area[1] - opts.area[3];
  37322. var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
  37323. if ((opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble' || opts.type == 'bar') && dataCount > 1 && opts.xAxis.boundaryGap == 'justify') {
  37324. dataCount -= 1;
  37325. }
  37326. var eachSpacing = spacingValid / dataCount;
  37327. var xAxisPoints = [];
  37328. var startX = opts.area[3];
  37329. var endX = opts.width - opts.area[1];
  37330. categories.forEach(function (item, index) {
  37331. xAxisPoints.push(startX + index * eachSpacing);
  37332. });
  37333. if (opts.xAxis.boundaryGap !== 'justify') {
  37334. if (opts.enableScroll === true) {
  37335. xAxisPoints.push(startX + categories.length * eachSpacing);
  37336. } else {
  37337. xAxisPoints.push(endX);
  37338. }
  37339. }
  37340. return {
  37341. xAxisPoints: xAxisPoints,
  37342. startX: startX,
  37343. endX: endX,
  37344. eachSpacing: eachSpacing
  37345. };
  37346. }
  37347. function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  37348. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  37349. var points = [];
  37350. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37351. data.forEach(function (item, index) {
  37352. if (item === null) {
  37353. points.push(null);
  37354. } else {
  37355. var cPoints = [];
  37356. item.forEach(function (items, indexs) {
  37357. var point = {};
  37358. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  37359. var value = items.value || items;
  37360. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37361. height *= process;
  37362. point.y = opts.height - Math.round(height) - opts.area[2];
  37363. cPoints.push(point);
  37364. });
  37365. points.push(cPoints);
  37366. }
  37367. });
  37368. return points;
  37369. }
  37370. function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  37371. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  37372. var boundaryGap = 'center';
  37373. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  37374. boundaryGap = opts.xAxis.boundaryGap;
  37375. }
  37376. var points = [];
  37377. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37378. var validWidth = opts.width - opts.area[1] - opts.area[3];
  37379. data.forEach(function (item, index) {
  37380. if (item === null) {
  37381. points.push(null);
  37382. } else {
  37383. var point = {};
  37384. point.color = item.color;
  37385. point.x = xAxisPoints[index];
  37386. var value = item;
  37387. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  37388. if (item.constructor.toString().indexOf('Array') > -1) {
  37389. var xranges, xminRange, xmaxRange;
  37390. xranges = [].concat(opts.chartData.xAxisData.ranges);
  37391. xminRange = xranges.shift();
  37392. xmaxRange = xranges.pop();
  37393. value = item[1];
  37394. point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
  37395. if (opts.type == 'bubble') {
  37396. point.r = item[2];
  37397. point.t = item[3];
  37398. }
  37399. } else {
  37400. value = item.value;
  37401. }
  37402. }
  37403. if (boundaryGap == 'center') {
  37404. point.x += eachSpacing / 2;
  37405. }
  37406. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37407. height *= process;
  37408. point.y = opts.height - height - opts.area[2];
  37409. points.push(point);
  37410. }
  37411. });
  37412. return points;
  37413. }
  37414. function getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config) {
  37415. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  37416. var points = [];
  37417. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37418. var validWidth = opts.width - opts.area[1] - opts.area[3];
  37419. data.forEach(function (item, index) {
  37420. if (item === null) {
  37421. points.push(null);
  37422. } else {
  37423. var point = {};
  37424. point.color = item.color;
  37425. point.y = yAxisPoints[index];
  37426. var value = item;
  37427. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  37428. value = item.value;
  37429. }
  37430. var height = validWidth * (value - minRange) / (maxRange - minRange);
  37431. height *= process;
  37432. point.height = height;
  37433. point.value = value;
  37434. point.x = height + opts.area[3];
  37435. points.push(point);
  37436. }
  37437. });
  37438. return points;
  37439. }
  37440. function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  37441. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  37442. var points = [];
  37443. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37444. data.forEach(function (item, index) {
  37445. if (item === null) {
  37446. points.push(null);
  37447. } else {
  37448. var point = {};
  37449. point.color = item.color;
  37450. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  37451. if (seriesIndex > 0) {
  37452. var value = 0;
  37453. for (var i = 0; i <= seriesIndex; i++) {
  37454. value += stackSeries[i].data[index];
  37455. }
  37456. var value0 = value - item;
  37457. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37458. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  37459. } else {
  37460. var value = item;
  37461. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37462. var height0 = 0;
  37463. }
  37464. var heightc = height0;
  37465. height *= process;
  37466. heightc *= process;
  37467. point.y = opts.height - Math.round(height) - opts.area[2];
  37468. point.y0 = opts.height - Math.round(heightc) - opts.area[2];
  37469. points.push(point);
  37470. }
  37471. });
  37472. return points;
  37473. }
  37474. function getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  37475. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  37476. var points = [];
  37477. var validHeight = opts.width - opts.area[1] - opts.area[3];
  37478. data.forEach(function (item, index) {
  37479. if (item === null) {
  37480. points.push(null);
  37481. } else {
  37482. var point = {};
  37483. point.color = item.color;
  37484. point.y = yAxisPoints[index];
  37485. if (seriesIndex > 0) {
  37486. var value = 0;
  37487. for (var i = 0; i <= seriesIndex; i++) {
  37488. value += stackSeries[i].data[index];
  37489. }
  37490. var value0 = value - item;
  37491. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37492. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  37493. } else {
  37494. var value = item;
  37495. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37496. var height0 = 0;
  37497. }
  37498. var heightc = height0;
  37499. height *= process;
  37500. heightc *= process;
  37501. point.height = height - heightc;
  37502. point.x = opts.area[3] + height;
  37503. point.x0 = opts.area[3] + heightc;
  37504. points.push(point);
  37505. }
  37506. });
  37507. return points;
  37508. }
  37509. function getYAxisTextList(series, opts, config, stack, yData) {
  37510. var index = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : -1;
  37511. var data;
  37512. if (stack == 'stack') {
  37513. data = dataCombineStack(series, opts.categories.length);
  37514. } else {
  37515. data = dataCombine(series);
  37516. }
  37517. var sorted = [];
  37518. // remove null from data
  37519. data = data.filter(function (item) {
  37520. //return item !== null;
  37521. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  37522. if (item.constructor.toString().indexOf('Array') > -1) {
  37523. return item !== null;
  37524. } else {
  37525. return item.value !== null;
  37526. }
  37527. } else {
  37528. return item !== null;
  37529. }
  37530. });
  37531. data.map(function (item) {
  37532. if ((0, _typeof2.default)(item) === 'object') {
  37533. if (item.constructor.toString().indexOf('Array') > -1) {
  37534. if (opts.type == 'candle') {
  37535. item.map(function (subitem) {
  37536. sorted.push(subitem);
  37537. });
  37538. } else {
  37539. sorted.push(item[1]);
  37540. }
  37541. } else {
  37542. sorted.push(item.value);
  37543. }
  37544. } else {
  37545. sorted.push(item);
  37546. }
  37547. });
  37548. var minData = yData.min || 0;
  37549. var maxData = yData.max || 0;
  37550. if (sorted.length > 0) {
  37551. minData = Math.min.apply(this, sorted);
  37552. maxData = Math.max.apply(this, sorted);
  37553. }
  37554. //为了兼容v1.9.0之前的项目
  37555. // if (index > -1) {
  37556. // if (typeof opts.yAxis.data[index].min === 'number') {
  37557. // minData = Math.min(opts.yAxis.data[index].min, minData);
  37558. // }
  37559. // if (typeof opts.yAxis.data[index].max === 'number') {
  37560. // maxData = Math.max(opts.yAxis.data[index].max, maxData);
  37561. // }
  37562. // } else {
  37563. // if (typeof opts.yAxis.min === 'number') {
  37564. // minData = Math.min(opts.yAxis.min, minData);
  37565. // }
  37566. // if (typeof opts.yAxis.max === 'number') {
  37567. // maxData = Math.max(opts.yAxis.max, maxData);
  37568. // }
  37569. // }
  37570. if (minData === maxData) {
  37571. var rangeSpan = maxData || 10;
  37572. maxData += rangeSpan;
  37573. }
  37574. var dataRange = getDataRange(minData, maxData);
  37575. var minRange = yData.min === undefined || yData.min === null ? dataRange.minRange : yData.min;
  37576. var maxRange = yData.max === undefined || yData.min === null ? dataRange.maxRange : yData.max;
  37577. var range = [];
  37578. var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
  37579. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  37580. range.push(minRange + eachRange * i);
  37581. }
  37582. return range.reverse();
  37583. }
  37584. function calYAxisData(series, opts, config, context) {
  37585. //堆叠图重算Y轴
  37586. var columnstyle = assign({}, {
  37587. type: ""
  37588. }, opts.extra.column);
  37589. //如果是多Y轴,重新计算
  37590. var YLength = opts.yAxis.data.length;
  37591. var newSeries = new Array(YLength);
  37592. if (YLength > 0) {
  37593. for (var i = 0; i < YLength; i++) {
  37594. newSeries[i] = [];
  37595. for (var j = 0; j < series.length; j++) {
  37596. if (series[j].index == i) {
  37597. newSeries[i].push(series[j]);
  37598. }
  37599. }
  37600. }
  37601. var rangesArr = new Array(YLength);
  37602. var rangesFormatArr = new Array(YLength);
  37603. var yAxisWidthArr = new Array(YLength);
  37604. var _loop3 = function _loop3(_i13) {
  37605. var yData = opts.yAxis.data[_i13];
  37606. //如果总开关不显示,强制每个Y轴为不显示
  37607. if (opts.yAxis.disabled == true) {
  37608. yData.disabled = true;
  37609. }
  37610. if (yData.type === 'categories') {
  37611. if (!yData.formatter) {
  37612. yData.formatter = function (val) {
  37613. return val + (yData.unit || '');
  37614. };
  37615. }
  37616. yData.categories = yData.categories || opts.categories;
  37617. rangesArr[_i13] = yData.categories;
  37618. } else {
  37619. if (!yData.formatter) {
  37620. yData.formatter = function (val) {
  37621. return val.toFixed(yData.tofix) + (yData.unit || '');
  37622. };
  37623. }
  37624. rangesArr[_i13] = getYAxisTextList(newSeries[_i13], opts, config, columnstyle.type, yData, _i13);
  37625. }
  37626. var yAxisFontSizes = yData.fontSize * opts.pix || config.fontSize;
  37627. yAxisWidthArr[_i13] = {
  37628. position: yData.position ? yData.position : 'left',
  37629. width: 0
  37630. };
  37631. rangesFormatArr[_i13] = rangesArr[_i13].map(function (items) {
  37632. items = yData.formatter(items);
  37633. yAxisWidthArr[_i13].width = Math.max(yAxisWidthArr[_i13].width, measureText(items, yAxisFontSizes, context) + 5);
  37634. return items;
  37635. });
  37636. var calibration = yData.calibration ? 4 * opts.pix : 0;
  37637. yAxisWidthArr[_i13].width += calibration + 3 * opts.pix;
  37638. if (yData.disabled === true) {
  37639. yAxisWidthArr[_i13].width = 0;
  37640. }
  37641. };
  37642. for (var _i13 = 0; _i13 < YLength; _i13++) {
  37643. _loop3(_i13);
  37644. }
  37645. } else {
  37646. var rangesArr = new Array(1);
  37647. var rangesFormatArr = new Array(1);
  37648. var yAxisWidthArr = new Array(1);
  37649. if (opts.type === 'bar') {
  37650. rangesArr[0] = opts.categories;
  37651. if (!opts.yAxis.formatter) {
  37652. opts.yAxis.formatter = function (val) {
  37653. return val + (opts.yAxis.unit || '');
  37654. };
  37655. }
  37656. } else {
  37657. if (!opts.yAxis.formatter) {
  37658. opts.yAxis.formatter = function (val) {
  37659. return val.toFixed(opts.yAxis.tofix) + (opts.yAxis.unit || '');
  37660. };
  37661. }
  37662. rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type, {});
  37663. }
  37664. yAxisWidthArr[0] = {
  37665. position: 'left',
  37666. width: 0
  37667. };
  37668. var yAxisFontSize = opts.yAxis.fontSize * opts.pix || config.fontSize;
  37669. rangesFormatArr[0] = rangesArr[0].map(function (item) {
  37670. item = opts.yAxis.formatter(item);
  37671. yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize, context) + 5);
  37672. return item;
  37673. });
  37674. yAxisWidthArr[0].width += 3 * opts.pix;
  37675. if (opts.yAxis.disabled === true) {
  37676. yAxisWidthArr[0] = {
  37677. position: 'left',
  37678. width: 0
  37679. };
  37680. opts.yAxis.data[0] = {
  37681. disabled: true
  37682. };
  37683. } else {
  37684. opts.yAxis.data[0] = {
  37685. disabled: false,
  37686. position: 'left',
  37687. max: opts.yAxis.max,
  37688. min: opts.yAxis.min,
  37689. formatter: opts.yAxis.formatter
  37690. };
  37691. if (opts.type === 'bar') {
  37692. opts.yAxis.data[0].categories = opts.categories;
  37693. opts.yAxis.data[0].type = 'categories';
  37694. }
  37695. }
  37696. }
  37697. return {
  37698. rangesFormat: rangesFormatArr,
  37699. ranges: rangesArr,
  37700. yAxisWidth: yAxisWidthArr
  37701. };
  37702. }
  37703. function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
  37704. var ranges = [].concat(opts.chartData.yAxisData.ranges);
  37705. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  37706. var minAxis = opts.area[0];
  37707. var items = [];
  37708. for (var i = 0; i < ranges.length; i++) {
  37709. var maxVal = ranges[i].shift();
  37710. var minVal = ranges[i].pop();
  37711. var item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
  37712. item = opts.yAxis.data[i].formatter ? opts.yAxis.data[i].formatter(item) : item.toFixed(0);
  37713. items.push(String(item));
  37714. }
  37715. return items;
  37716. }
  37717. function calMarkLineData(points, opts) {
  37718. var minRange, maxRange;
  37719. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  37720. for (var i = 0; i < points.length; i++) {
  37721. points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex : 0;
  37722. var range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
  37723. minRange = range.pop();
  37724. maxRange = range.shift();
  37725. var height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
  37726. points[i].y = opts.height - Math.round(height) - opts.area[2];
  37727. }
  37728. return points;
  37729. }
  37730. function contextRotate(context, opts) {
  37731. if (opts.rotateLock !== true) {
  37732. context.translate(opts.height, 0);
  37733. context.rotate(90 * Math.PI / 180);
  37734. } else if (opts._rotate_ !== true) {
  37735. context.translate(opts.height, 0);
  37736. context.rotate(90 * Math.PI / 180);
  37737. opts._rotate_ = true;
  37738. }
  37739. }
  37740. function drawPointShape(points, color, shape, context, opts) {
  37741. context.beginPath();
  37742. if (opts.dataPointShapeType == 'hollow') {
  37743. context.setStrokeStyle(color);
  37744. context.setFillStyle(opts.background);
  37745. context.setLineWidth(2 * opts.pix);
  37746. } else {
  37747. context.setStrokeStyle("#ffffff");
  37748. context.setFillStyle(color);
  37749. context.setLineWidth(1 * opts.pix);
  37750. }
  37751. if (shape === 'diamond') {
  37752. points.forEach(function (item, index) {
  37753. if (item !== null) {
  37754. context.moveTo(item.x, item.y - 4.5);
  37755. context.lineTo(item.x - 4.5, item.y);
  37756. context.lineTo(item.x, item.y + 4.5);
  37757. context.lineTo(item.x + 4.5, item.y);
  37758. context.lineTo(item.x, item.y - 4.5);
  37759. }
  37760. });
  37761. } else if (shape === 'circle') {
  37762. points.forEach(function (item, index) {
  37763. if (item !== null) {
  37764. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  37765. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  37766. }
  37767. });
  37768. } else if (shape === 'square') {
  37769. points.forEach(function (item, index) {
  37770. if (item !== null) {
  37771. context.moveTo(item.x - 3.5, item.y - 3.5);
  37772. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  37773. }
  37774. });
  37775. } else if (shape === 'triangle') {
  37776. points.forEach(function (item, index) {
  37777. if (item !== null) {
  37778. context.moveTo(item.x, item.y - 4.5);
  37779. context.lineTo(item.x - 4.5, item.y + 4.5);
  37780. context.lineTo(item.x + 4.5, item.y + 4.5);
  37781. context.lineTo(item.x, item.y - 4.5);
  37782. }
  37783. });
  37784. } else if (shape === 'triangle') {
  37785. return;
  37786. }
  37787. context.closePath();
  37788. context.fill();
  37789. context.stroke();
  37790. }
  37791. function drawRingTitle(opts, config, context, center) {
  37792. var titlefontSize = opts.title.fontSize || config.titleFontSize;
  37793. var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
  37794. var title = opts.title.name || '';
  37795. var subtitle = opts.subtitle.name || '';
  37796. var titleFontColor = opts.title.color || opts.fontColor;
  37797. var subtitleFontColor = opts.subtitle.color || opts.fontColor;
  37798. var titleHeight = title ? titlefontSize : 0;
  37799. var subtitleHeight = subtitle ? subtitlefontSize : 0;
  37800. var margin = 5;
  37801. if (subtitle) {
  37802. var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context);
  37803. var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0) * opts.pix;
  37804. var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix;
  37805. if (title) {
  37806. startY += (titleHeight * opts.pix + margin) / 2;
  37807. }
  37808. context.beginPath();
  37809. context.setFontSize(subtitlefontSize * opts.pix);
  37810. context.setFillStyle(subtitleFontColor);
  37811. context.fillText(subtitle, startX, startY);
  37812. context.closePath();
  37813. context.stroke();
  37814. }
  37815. if (title) {
  37816. var _textWidth = measureText(title, titlefontSize * opts.pix, context);
  37817. var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
  37818. var _startY = center.y + titlefontSize * opts.pix / 2 + (opts.title.offsetY || 0) * opts.pix;
  37819. if (subtitle) {
  37820. _startY -= (subtitleHeight * opts.pix + margin) / 2;
  37821. }
  37822. context.beginPath();
  37823. context.setFontSize(titlefontSize * opts.pix);
  37824. context.setFillStyle(titleFontColor);
  37825. context.fillText(title, _startX, _startY);
  37826. context.closePath();
  37827. context.stroke();
  37828. }
  37829. }
  37830. function drawPointText(points, series, config, context, opts) {
  37831. // 绘制数据文案
  37832. var data = series.data;
  37833. var textOffset = series.textOffset ? series.textOffset : 0;
  37834. points.forEach(function (item, index) {
  37835. if (item !== null) {
  37836. context.beginPath();
  37837. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  37838. context.setFontSize(fontSize);
  37839. context.setFillStyle(series.textColor || opts.fontColor);
  37840. var value = data[index];
  37841. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  37842. if (data[index].constructor.toString().indexOf('Array') > -1) {
  37843. value = data[index][1];
  37844. } else {
  37845. value = data[index].value;
  37846. }
  37847. }
  37848. var formatVal = series.formatter ? series.formatter(value, index) : value;
  37849. context.setTextAlign('center');
  37850. context.fillText(String(formatVal), item.x, item.y - 4 + textOffset * opts.pix);
  37851. context.closePath();
  37852. context.stroke();
  37853. context.setTextAlign('left');
  37854. }
  37855. });
  37856. }
  37857. function drawBarPointText(points, series, config, context, opts) {
  37858. // 绘制数据文案
  37859. var data = series.data;
  37860. var textOffset = series.textOffset ? series.textOffset : 0;
  37861. points.forEach(function (item, index) {
  37862. if (item !== null) {
  37863. context.beginPath();
  37864. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  37865. context.setFontSize(fontSize);
  37866. context.setFillStyle(series.textColor || opts.fontColor);
  37867. var value = data[index];
  37868. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  37869. value = data[index].value;
  37870. }
  37871. var formatVal = series.formatter ? series.formatter(value, index) : value;
  37872. context.setTextAlign('left');
  37873. context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
  37874. context.closePath();
  37875. context.stroke();
  37876. }
  37877. });
  37878. }
  37879. function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
  37880. radius -= gaugeOption.width / 2 + gaugeOption.labelOffset * opts.pix;
  37881. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  37882. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  37883. var totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
  37884. var splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
  37885. var nowAngle = gaugeOption.startAngle;
  37886. var nowNumber = gaugeOption.startNumber;
  37887. for (var i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
  37888. var pos = {
  37889. x: radius * Math.cos(nowAngle * Math.PI),
  37890. y: radius * Math.sin(nowAngle * Math.PI)
  37891. };
  37892. var labelText = gaugeOption.formatter ? gaugeOption.formatter(nowNumber) : nowNumber;
  37893. pos.x += centerPosition.x - measureText(labelText, config.fontSize, context) / 2;
  37894. pos.y += centerPosition.y;
  37895. var startX = pos.x;
  37896. var startY = pos.y;
  37897. context.beginPath();
  37898. context.setFontSize(config.fontSize);
  37899. context.setFillStyle(gaugeOption.labelColor || opts.fontColor);
  37900. context.fillText(labelText, startX, startY + config.fontSize / 2);
  37901. context.closePath();
  37902. context.stroke();
  37903. nowAngle += splitAngle;
  37904. if (nowAngle >= 2) {
  37905. nowAngle = nowAngle % 2;
  37906. }
  37907. nowNumber += splitNumber;
  37908. }
  37909. }
  37910. function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
  37911. var radarOption = opts.extra.radar || {};
  37912. radius += config.radarLabelTextMargin * opts.pix;
  37913. angleList.forEach(function (angle, index) {
  37914. var pos = {
  37915. x: radius * Math.cos(angle),
  37916. y: radius * Math.sin(angle)
  37917. };
  37918. var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
  37919. var startX = posRelativeCanvas.x;
  37920. var startY = posRelativeCanvas.y;
  37921. if (util.approximatelyEqual(pos.x, 0)) {
  37922. startX -= measureText(opts.categories[index] || '', config.fontSize, context) / 2;
  37923. } else if (pos.x < 0) {
  37924. startX -= measureText(opts.categories[index] || '', config.fontSize, context);
  37925. }
  37926. context.beginPath();
  37927. context.setFontSize(config.fontSize);
  37928. context.setFillStyle(radarOption.labelColor || opts.fontColor);
  37929. context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
  37930. context.closePath();
  37931. context.stroke();
  37932. });
  37933. }
  37934. function drawPieText(series, opts, config, context, radius, center) {
  37935. var lineRadius = config.pieChartLinePadding;
  37936. var textObjectCollection = [];
  37937. var lastTextObject = null;
  37938. var seriesConvert = series.map(function (item, index, series) {
  37939. var text = item.formatter ? item.formatter(item, index, series) : util.toFixed(item._proportion_.toFixed(4) * 100) + '%';
  37940. var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
  37941. if (item._rose_proportion_) {
  37942. arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._rose_proportion_ / 2);
  37943. }
  37944. var color = item.color;
  37945. var radius = item._radius_;
  37946. return {
  37947. arc: arc,
  37948. text: text,
  37949. color: color,
  37950. radius: radius,
  37951. textColor: item.textColor,
  37952. textSize: item.textSize
  37953. };
  37954. });
  37955. for (var i = 0; i < seriesConvert.length; i++) {
  37956. var item = seriesConvert[i];
  37957. // line end
  37958. var orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
  37959. var orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
  37960. // line start
  37961. var orginX2 = Math.cos(item.arc) * item.radius;
  37962. var orginY2 = Math.sin(item.arc) * item.radius;
  37963. // text start
  37964. var orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
  37965. var orginY3 = orginY1;
  37966. var textWidth = measureText(item.text, item.textSize * opts.pix || config.fontSize, context);
  37967. var startY = orginY3;
  37968. if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
  37969. x: orginX3
  37970. })) {
  37971. if (orginX3 > 0) {
  37972. startY = Math.min(orginY3, lastTextObject.start.y);
  37973. } else if (orginX1 < 0) {
  37974. startY = Math.max(orginY3, lastTextObject.start.y);
  37975. } else {
  37976. if (orginY3 > 0) {
  37977. startY = Math.max(orginY3, lastTextObject.start.y);
  37978. } else {
  37979. startY = Math.min(orginY3, lastTextObject.start.y);
  37980. }
  37981. }
  37982. }
  37983. if (orginX3 < 0) {
  37984. orginX3 -= textWidth;
  37985. }
  37986. var textObject = {
  37987. lineStart: {
  37988. x: orginX2,
  37989. y: orginY2
  37990. },
  37991. lineEnd: {
  37992. x: orginX1,
  37993. y: orginY1
  37994. },
  37995. start: {
  37996. x: orginX3,
  37997. y: startY
  37998. },
  37999. width: textWidth,
  38000. height: config.fontSize,
  38001. text: item.text,
  38002. color: item.color,
  38003. textColor: item.textColor,
  38004. textSize: item.textSize
  38005. };
  38006. lastTextObject = avoidCollision(textObject, lastTextObject);
  38007. textObjectCollection.push(lastTextObject);
  38008. }
  38009. for (var _i14 = 0; _i14 < textObjectCollection.length; _i14++) {
  38010. var _item6 = textObjectCollection[_i14];
  38011. var lineStartPoistion = convertCoordinateOrigin(_item6.lineStart.x, _item6.lineStart.y, center);
  38012. var lineEndPoistion = convertCoordinateOrigin(_item6.lineEnd.x, _item6.lineEnd.y, center);
  38013. var textPosition = convertCoordinateOrigin(_item6.start.x, _item6.start.y, center);
  38014. context.setLineWidth(1 * opts.pix);
  38015. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  38016. context.beginPath();
  38017. context.setStrokeStyle(_item6.color);
  38018. context.setFillStyle(_item6.color);
  38019. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  38020. var curveStartX = _item6.start.x < 0 ? textPosition.x + _item6.width : textPosition.x;
  38021. var textStartX = _item6.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
  38022. context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
  38023. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  38024. context.stroke();
  38025. context.closePath();
  38026. context.beginPath();
  38027. context.moveTo(textPosition.x + _item6.width, textPosition.y);
  38028. context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);
  38029. context.closePath();
  38030. context.fill();
  38031. context.beginPath();
  38032. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  38033. context.setFillStyle(_item6.textColor || opts.fontColor);
  38034. context.fillText(_item6.text, textStartX, textPosition.y + 3);
  38035. context.closePath();
  38036. context.stroke();
  38037. context.closePath();
  38038. }
  38039. }
  38040. function drawToolTipSplitLine(offsetX, opts, config, context) {
  38041. var toolTipOption = opts.extra.tooltip || {};
  38042. toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
  38043. toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
  38044. var startY = opts.area[0];
  38045. var endY = opts.height - opts.area[2];
  38046. if (toolTipOption.gridType == 'dash') {
  38047. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  38048. }
  38049. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  38050. context.setLineWidth(1 * opts.pix);
  38051. context.beginPath();
  38052. context.moveTo(offsetX, startY);
  38053. context.lineTo(offsetX, endY);
  38054. context.stroke();
  38055. context.setLineDash([]);
  38056. if (toolTipOption.xAxisLabel) {
  38057. var labelText = opts.categories[opts.tooltip.index];
  38058. context.setFontSize(config.fontSize);
  38059. var textWidth = measureText(labelText, config.fontSize, context);
  38060. var textX = offsetX - 0.5 * textWidth;
  38061. var textY = endY;
  38062. context.beginPath();
  38063. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  38064. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  38065. context.setLineWidth(1 * opts.pix);
  38066. context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);
  38067. context.closePath();
  38068. context.stroke();
  38069. context.fill();
  38070. context.beginPath();
  38071. context.setFontSize(config.fontSize);
  38072. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  38073. context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);
  38074. context.closePath();
  38075. context.stroke();
  38076. }
  38077. }
  38078. function drawMarkLine(opts, config, context) {
  38079. var markLineOption = assign({}, {
  38080. type: 'solid',
  38081. dashLength: 4,
  38082. data: []
  38083. }, opts.extra.markLine);
  38084. var startX = opts.area[3];
  38085. var endX = opts.width - opts.area[1];
  38086. var points = calMarkLineData(markLineOption.data, opts);
  38087. for (var i = 0; i < points.length; i++) {
  38088. var item = assign({}, {
  38089. lineColor: '#DE4A42',
  38090. showLabel: false,
  38091. labelFontColor: '#666666',
  38092. labelBgColor: '#DFE8FF',
  38093. labelBgOpacity: 0.8,
  38094. yAxisIndex: 0
  38095. }, points[i]);
  38096. if (markLineOption.type == 'dash') {
  38097. context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
  38098. }
  38099. context.setStrokeStyle(item.lineColor);
  38100. context.setLineWidth(1 * opts.pix);
  38101. context.beginPath();
  38102. context.moveTo(startX, item.y);
  38103. context.lineTo(endX, item.y);
  38104. context.stroke();
  38105. context.setLineDash([]);
  38106. if (item.showLabel) {
  38107. var labelText = opts.yAxis.formatter ? opts.yAxis.formatter(item.value) : item.value;
  38108. context.setFontSize(config.fontSize);
  38109. var textWidth = measureText(labelText, config.fontSize, context);
  38110. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[0].width;
  38111. var bgStartX = opts.area[3] - textWidth - config.toolTipPadding * 2;
  38112. var bgEndX = opts.area[3];
  38113. var bgWidth = bgEndX - bgStartX;
  38114. var textX = bgEndX - config.toolTipPadding;
  38115. var textY = item.y;
  38116. context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
  38117. context.setStrokeStyle(item.labelBgColor);
  38118. context.setLineWidth(1 * opts.pix);
  38119. context.beginPath();
  38120. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  38121. context.closePath();
  38122. context.stroke();
  38123. context.fill();
  38124. context.setFontSize(config.fontSize);
  38125. context.setTextAlign('right');
  38126. context.setFillStyle(item.labelFontColor);
  38127. context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);
  38128. context.stroke();
  38129. context.setTextAlign('left');
  38130. }
  38131. }
  38132. }
  38133. function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
  38134. var toolTipOption = assign({}, {
  38135. gridType: 'solid',
  38136. dashLength: 4
  38137. }, opts.extra.tooltip);
  38138. var startX = opts.area[3];
  38139. var endX = opts.width - opts.area[1];
  38140. if (toolTipOption.gridType == 'dash') {
  38141. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  38142. }
  38143. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  38144. context.setLineWidth(1 * opts.pix);
  38145. context.beginPath();
  38146. context.moveTo(startX, opts.tooltip.offset.y);
  38147. context.lineTo(endX, opts.tooltip.offset.y);
  38148. context.stroke();
  38149. context.setLineDash([]);
  38150. if (toolTipOption.yAxisLabel) {
  38151. var labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
  38152. var widthArr = opts.chartData.yAxisData.yAxisWidth;
  38153. var tStartLeft = opts.area[3];
  38154. var tStartRight = opts.width - opts.area[1];
  38155. for (var i = 0; i < labelText.length; i++) {
  38156. context.setFontSize(config.fontSize);
  38157. var textWidth = measureText(labelText[i], config.fontSize, context);
  38158. var bgStartX = void 0,
  38159. bgEndX = void 0,
  38160. bgWidth = void 0;
  38161. if (widthArr[i].position == 'left') {
  38162. bgStartX = tStartLeft - widthArr[i].width;
  38163. bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);
  38164. } else {
  38165. bgStartX = tStartRight;
  38166. bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);
  38167. }
  38168. bgWidth = bgEndX - bgStartX;
  38169. var textX = bgStartX + (bgWidth - textWidth) / 2;
  38170. var textY = opts.tooltip.offset.y;
  38171. context.beginPath();
  38172. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  38173. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  38174. context.setLineWidth(1 * opts.pix);
  38175. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  38176. context.closePath();
  38177. context.stroke();
  38178. context.fill();
  38179. context.beginPath();
  38180. context.setFontSize(config.fontSize);
  38181. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  38182. context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
  38183. context.closePath();
  38184. context.stroke();
  38185. if (widthArr[i].position == 'left') {
  38186. tStartLeft -= widthArr[i].width + opts.yAxis.padding * opts.pix;
  38187. } else {
  38188. tStartRight += widthArr[i].width + opts.yAxis.padding * opts.pix;
  38189. }
  38190. }
  38191. }
  38192. }
  38193. function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  38194. var toolTipOption = assign({}, {
  38195. activeBgColor: '#000000',
  38196. activeBgOpacity: 0.08
  38197. }, opts.extra.column);
  38198. var startY = opts.area[0];
  38199. var endY = opts.height - opts.area[2];
  38200. context.beginPath();
  38201. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  38202. context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);
  38203. context.closePath();
  38204. context.fill();
  38205. context.setFillStyle("#FFFFFF");
  38206. }
  38207. function drawBarToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  38208. var toolTipOption = assign({}, {
  38209. activeBgColor: '#000000',
  38210. activeBgOpacity: 0.08
  38211. }, opts.extra.bar);
  38212. var startX = opts.area[3];
  38213. var endX = opts.width - opts.area[1];
  38214. context.beginPath();
  38215. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  38216. context.rect(startX, offsetX - eachSpacing / 2, endX - startX, eachSpacing);
  38217. context.closePath();
  38218. context.fill();
  38219. context.setFillStyle("#FFFFFF");
  38220. }
  38221. function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
  38222. var toolTipOption = assign({}, {
  38223. showBox: true,
  38224. showArrow: true,
  38225. showCategory: false,
  38226. bgColor: '#000000',
  38227. bgOpacity: 0.7,
  38228. borderColor: '#000000',
  38229. borderWidth: 0,
  38230. borderRadius: 0,
  38231. borderOpacity: 0.7,
  38232. fontColor: '#FFFFFF',
  38233. splitLine: true
  38234. }, opts.extra.tooltip);
  38235. if (toolTipOption.showCategory == true && opts.categories) {
  38236. textList.unshift({
  38237. text: opts.categories[opts.tooltip.index],
  38238. color: null
  38239. });
  38240. }
  38241. var legendWidth = 4 * opts.pix;
  38242. var legendMarginRight = 5 * opts.pix;
  38243. var arrowWidth = toolTipOption.showArrow ? 8 * opts.pix : 0;
  38244. var isOverRightBorder = false;
  38245. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
  38246. if (toolTipOption.splitLine == true) {
  38247. drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
  38248. }
  38249. }
  38250. offset = assign({
  38251. x: 0,
  38252. y: 0
  38253. }, offset);
  38254. offset.y -= 8 * opts.pix;
  38255. var textWidth = textList.map(function (item) {
  38256. return measureText(item.text, config.fontSize, context);
  38257. });
  38258. var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);
  38259. var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;
  38260. if (toolTipOption.showBox == false) {
  38261. return;
  38262. }
  38263. // if beyond the right border
  38264. if (offset.x - Math.abs(opts._scrollDistance_ || 0) + arrowWidth + toolTipWidth > opts.width) {
  38265. isOverRightBorder = true;
  38266. }
  38267. if (toolTipHeight + offset.y > opts.height) {
  38268. offset.y = opts.height - toolTipHeight;
  38269. }
  38270. // draw background rect
  38271. context.beginPath();
  38272. context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));
  38273. context.setLineWidth(toolTipOption.borderWidth * opts.pix);
  38274. context.setStrokeStyle(hexToRgb(toolTipOption.borderColor, toolTipOption.borderOpacity));
  38275. var radius = toolTipOption.borderRadius;
  38276. if (isOverRightBorder) {
  38277. if (toolTipOption.showArrow) {
  38278. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  38279. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  38280. }
  38281. context.arc(offset.x - arrowWidth - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  38282. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  38283. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  38284. context.arc(offset.x - arrowWidth - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  38285. if (toolTipOption.showArrow) {
  38286. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  38287. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  38288. }
  38289. } else {
  38290. if (toolTipOption.showArrow) {
  38291. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  38292. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  38293. }
  38294. context.arc(offset.x + arrowWidth + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  38295. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  38296. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  38297. context.arc(offset.x + arrowWidth + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  38298. if (toolTipOption.showArrow) {
  38299. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  38300. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  38301. }
  38302. }
  38303. context.closePath();
  38304. context.fill();
  38305. if (toolTipOption.borderWidth > 0) {
  38306. context.stroke();
  38307. }
  38308. // draw legend
  38309. textList.forEach(function (item, index) {
  38310. if (item.color !== null) {
  38311. context.beginPath();
  38312. context.setFillStyle(item.color);
  38313. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;
  38314. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding + 1;
  38315. if (isOverRightBorder) {
  38316. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;
  38317. }
  38318. context.fillRect(startX, startY, legendWidth, config.fontSize);
  38319. context.closePath();
  38320. }
  38321. });
  38322. // draw text list
  38323. textList.forEach(function (item, index) {
  38324. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;
  38325. if (isOverRightBorder) {
  38326. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;
  38327. }
  38328. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding;
  38329. context.beginPath();
  38330. context.setFontSize(config.fontSize);
  38331. context.setFillStyle(toolTipOption.fontColor);
  38332. context.fillText(item.text, startX, startY + config.fontSize);
  38333. context.closePath();
  38334. context.stroke();
  38335. });
  38336. }
  38337. function drawColumnDataPoints(series, opts, config, context) {
  38338. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38339. var xAxisData = opts.chartData.xAxisData,
  38340. xAxisPoints = xAxisData.xAxisPoints,
  38341. eachSpacing = xAxisData.eachSpacing;
  38342. var columnOption = assign({}, {
  38343. type: 'group',
  38344. width: eachSpacing / 2,
  38345. meterBorder: 4,
  38346. meterFillColor: '#FFFFFF',
  38347. barBorderCircle: false,
  38348. barBorderRadius: [],
  38349. seriesGap: 2,
  38350. linearType: 'none',
  38351. linearOpacity: 1,
  38352. customColor: [],
  38353. colorStop: 0
  38354. }, opts.extra.column);
  38355. var calPoints = [];
  38356. context.save();
  38357. var leftNum = -2;
  38358. var rightNum = xAxisPoints.length + 2;
  38359. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38360. context.translate(opts._scrollDistance_, 0);
  38361. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  38362. rightNum = leftNum + opts.xAxis.itemCount + 4;
  38363. }
  38364. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  38365. drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
  38366. }
  38367. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  38368. series.forEach(function (eachSeries, seriesIndex) {
  38369. var ranges, minRange, maxRange;
  38370. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38371. minRange = ranges.pop();
  38372. maxRange = ranges.shift();
  38373. var data = eachSeries.data;
  38374. switch (columnOption.type) {
  38375. case 'group':
  38376. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38377. var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38378. calPoints.push(tooltipPoints);
  38379. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  38380. for (var i = 0; i < points.length; i++) {
  38381. var item = points[i];
  38382. //fix issues/I27B1N yyoinge & Joeshu
  38383. if (item !== null && i > leftNum && i < rightNum) {
  38384. var startX = item.x - item.width / 2;
  38385. var height = opts.height - item.y - opts.area[2];
  38386. context.beginPath();
  38387. var fillColor = item.color || eachSeries.color;
  38388. var strokeColor = item.color || eachSeries.color;
  38389. if (columnOption.linearType !== 'none') {
  38390. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  38391. //透明渐变
  38392. if (columnOption.linearType == 'opacity') {
  38393. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  38394. grd.addColorStop(1, hexToRgb(fillColor, 1));
  38395. } else {
  38396. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  38397. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  38398. grd.addColorStop(1, hexToRgb(fillColor, 1));
  38399. }
  38400. fillColor = grd;
  38401. }
  38402. // 圆角边框
  38403. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  38404. var left = startX;
  38405. var top = item.y;
  38406. var width = item.width;
  38407. var _height = opts.height - opts.area[2] - item.y;
  38408. if (columnOption.barBorderCircle) {
  38409. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  38410. }
  38411. var _columnOption$barBord = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  38412. r0 = _columnOption$barBord[0],
  38413. r1 = _columnOption$barBord[1],
  38414. r2 = _columnOption$barBord[2],
  38415. r3 = _columnOption$barBord[3];
  38416. var minRadius = Math.min(width / 2, _height / 2);
  38417. r0 = r0 > minRadius ? minRadius : r0;
  38418. r1 = r1 > minRadius ? minRadius : r1;
  38419. r2 = r2 > minRadius ? minRadius : r2;
  38420. r3 = r3 > minRadius ? minRadius : r3;
  38421. r0 = r0 < 0 ? 0 : r0;
  38422. r1 = r1 < 0 ? 0 : r1;
  38423. r2 = r2 < 0 ? 0 : r2;
  38424. r3 = r3 < 0 ? 0 : r3;
  38425. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  38426. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  38427. context.arc(left + width - r2, top + _height - r2, r2, 0, Math.PI / 2);
  38428. context.arc(left + r3, top + _height - r3, r3, Math.PI / 2, Math.PI);
  38429. } else {
  38430. context.moveTo(startX, item.y);
  38431. context.lineTo(startX + item.width - 2, item.y);
  38432. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  38433. context.lineTo(startX, opts.height - opts.area[2]);
  38434. context.lineTo(startX, item.y);
  38435. context.setLineWidth(1);
  38436. context.setStrokeStyle(strokeColor);
  38437. }
  38438. context.setFillStyle(fillColor);
  38439. context.closePath();
  38440. //context.stroke();
  38441. context.fill();
  38442. }
  38443. }
  38444. ;
  38445. break;
  38446. case 'stack':
  38447. // 绘制堆叠数据图
  38448. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38449. calPoints.push(points);
  38450. points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  38451. for (var _i15 = 0; _i15 < points.length; _i15++) {
  38452. var _item7 = points[_i15];
  38453. if (_item7 !== null && _i15 > leftNum && _i15 < rightNum) {
  38454. context.beginPath();
  38455. var fillColor = _item7.color || eachSeries.color;
  38456. var startX = _item7.x - _item7.width / 2 + 1;
  38457. var height = opts.height - _item7.y - opts.area[2];
  38458. var height0 = opts.height - _item7.y0 - opts.area[2];
  38459. if (seriesIndex > 0) {
  38460. height -= height0;
  38461. }
  38462. context.setFillStyle(fillColor);
  38463. context.moveTo(startX, _item7.y);
  38464. context.fillRect(startX, _item7.y, _item7.width - 2, height);
  38465. context.closePath();
  38466. context.fill();
  38467. }
  38468. }
  38469. ;
  38470. break;
  38471. case 'meter':
  38472. // 绘制温度计数据图
  38473. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38474. calPoints.push(points);
  38475. points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meterBorder);
  38476. if (seriesIndex == 0) {
  38477. for (var _i16 = 0; _i16 < points.length; _i16++) {
  38478. var _item8 = points[_i16];
  38479. if (_item8 !== null && _i16 > leftNum && _i16 < rightNum) {
  38480. //画背景颜色
  38481. context.beginPath();
  38482. context.setFillStyle(columnOption.meterFillColor);
  38483. var startX = _item8.x - _item8.width / 2;
  38484. var height = opts.height - _item8.y - opts.area[2];
  38485. if (columnOption.barBorderCircle) {
  38486. var barBorderRadius = (_item8.width - columnOption.meterBorder * 2) / 2;
  38487. if (barBorderRadius > height) {
  38488. barBorderRadius = height;
  38489. }
  38490. context.moveTo(startX + columnOption.meterBorder, opts.height - opts.area[2]);
  38491. context.lineTo(startX + columnOption.meterBorder, _item8.y + barBorderRadius);
  38492. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius, barBorderRadius, -Math.PI, 0);
  38493. context.lineTo(startX + _item8.width - columnOption.meterBorder, opts.height - opts.area[2]);
  38494. context.lineTo(startX, opts.height - opts.area[2]);
  38495. context.fill();
  38496. } else {
  38497. context.moveTo(startX, _item8.y);
  38498. context.fillRect(startX, _item8.y, _item8.width, height);
  38499. context.closePath();
  38500. context.fill();
  38501. }
  38502. //画边框线
  38503. if (columnOption.meterBorder > 0) {
  38504. context.beginPath();
  38505. context.setStrokeStyle(eachSeries.color);
  38506. context.setLineWidth(columnOption.meterBorder * opts.pix);
  38507. if (columnOption.barBorderCircle) {
  38508. var barBorderRadius = (_item8.width - columnOption.meterBorder) / 2;
  38509. if (barBorderRadius > height) {
  38510. barBorderRadius = height;
  38511. }
  38512. context.moveTo(startX + columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  38513. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + barBorderRadius);
  38514. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius - columnOption.meterBorder * 0.5, barBorderRadius, -Math.PI, 0);
  38515. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  38516. } else {
  38517. context.moveTo(startX + columnOption.meterBorder * 0.5, _item8.y + height);
  38518. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  38519. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  38520. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + height);
  38521. }
  38522. context.stroke();
  38523. }
  38524. }
  38525. }
  38526. ;
  38527. } else {
  38528. for (var _i17 = 0; _i17 < points.length; _i17++) {
  38529. var _item9 = points[_i17];
  38530. if (_item9 !== null && _i17 > leftNum && _i17 < rightNum) {
  38531. context.beginPath();
  38532. context.setFillStyle(_item9.color || eachSeries.color);
  38533. var startX = _item9.x - _item9.width / 2;
  38534. var height = opts.height - _item9.y - opts.area[2];
  38535. if (columnOption.barBorderCircle) {
  38536. var barBorderRadius = _item9.width / 2;
  38537. if (barBorderRadius > height) {
  38538. barBorderRadius = height;
  38539. }
  38540. context.moveTo(startX, opts.height - opts.area[2]);
  38541. context.arc(startX + barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI, -Math.PI / 2);
  38542. context.arc(startX + _item9.width - barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI / 2, 0);
  38543. context.lineTo(startX + _item9.width, opts.height - opts.area[2]);
  38544. context.lineTo(startX, opts.height - opts.area[2]);
  38545. context.fill();
  38546. } else {
  38547. context.moveTo(startX, _item9.y);
  38548. context.fillRect(startX, _item9.y, _item9.width, height);
  38549. context.closePath();
  38550. context.fill();
  38551. }
  38552. }
  38553. }
  38554. ;
  38555. }
  38556. break;
  38557. }
  38558. });
  38559. if (opts.dataLabel !== false && process === 1) {
  38560. series.forEach(function (eachSeries, seriesIndex) {
  38561. var ranges, minRange, maxRange;
  38562. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38563. minRange = ranges.pop();
  38564. maxRange = ranges.shift();
  38565. var data = eachSeries.data;
  38566. switch (columnOption.type) {
  38567. case 'group':
  38568. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38569. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  38570. drawPointText(points, eachSeries, config, context, opts);
  38571. break;
  38572. case 'stack':
  38573. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38574. drawPointText(points, eachSeries, config, context, opts);
  38575. break;
  38576. case 'meter':
  38577. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38578. drawPointText(points, eachSeries, config, context, opts);
  38579. break;
  38580. }
  38581. });
  38582. }
  38583. context.restore();
  38584. return {
  38585. xAxisPoints: xAxisPoints,
  38586. calPoints: calPoints,
  38587. eachSpacing: eachSpacing
  38588. };
  38589. }
  38590. function drawBarDataPoints(series, opts, config, context) {
  38591. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38592. var yAxisPoints = [];
  38593. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / opts.categories.length;
  38594. for (var i = 0; i < opts.categories.length; i++) {
  38595. yAxisPoints.push(opts.area[0] + eachSpacing / 2 + eachSpacing * i);
  38596. }
  38597. var columnOption = assign({}, {
  38598. type: 'group',
  38599. width: eachSpacing / 2,
  38600. meterBorder: 4,
  38601. meterFillColor: '#FFFFFF',
  38602. barBorderCircle: false,
  38603. barBorderRadius: [],
  38604. seriesGap: 2,
  38605. linearType: 'none',
  38606. linearOpacity: 1,
  38607. customColor: [],
  38608. colorStop: 0
  38609. }, opts.extra.bar);
  38610. var calPoints = [];
  38611. context.save();
  38612. var leftNum = -2;
  38613. var rightNum = yAxisPoints.length + 2;
  38614. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  38615. drawBarToolTipSplitArea(opts.tooltip.offset.y, opts, config, context, eachSpacing);
  38616. }
  38617. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  38618. series.forEach(function (eachSeries, seriesIndex) {
  38619. var ranges, minRange, maxRange;
  38620. ranges = [].concat(opts.chartData.xAxisData.ranges);
  38621. maxRange = ranges.pop();
  38622. minRange = ranges.shift();
  38623. var data = eachSeries.data;
  38624. switch (columnOption.type) {
  38625. case 'group':
  38626. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  38627. var tooltipPoints = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38628. calPoints.push(tooltipPoints);
  38629. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  38630. for (var _i18 = 0; _i18 < points.length; _i18++) {
  38631. var item = points[_i18];
  38632. //fix issues/I27B1N yyoinge & Joeshu
  38633. if (item !== null && _i18 > leftNum && _i18 < rightNum) {
  38634. //var startX = item.x - item.width / 2;
  38635. var startX = opts.area[3];
  38636. var startY = item.y - item.width / 2;
  38637. var height = item.height;
  38638. context.beginPath();
  38639. var fillColor = item.color || eachSeries.color;
  38640. var strokeColor = item.color || eachSeries.color;
  38641. if (columnOption.linearType !== 'none') {
  38642. var grd = context.createLinearGradient(startX, item.y, item.x, item.y);
  38643. //透明渐变
  38644. if (columnOption.linearType == 'opacity') {
  38645. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  38646. grd.addColorStop(1, hexToRgb(fillColor, 1));
  38647. } else {
  38648. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  38649. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  38650. grd.addColorStop(1, hexToRgb(fillColor, 1));
  38651. }
  38652. fillColor = grd;
  38653. }
  38654. // 圆角边框
  38655. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  38656. var left = startX;
  38657. var width = item.width;
  38658. var top = item.y - item.width / 2;
  38659. var _height2 = item.heigh;
  38660. if (columnOption.barBorderCircle) {
  38661. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  38662. }
  38663. var _columnOption$barBord2 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  38664. r0 = _columnOption$barBord2[0],
  38665. r1 = _columnOption$barBord2[1],
  38666. r2 = _columnOption$barBord2[2],
  38667. r3 = _columnOption$barBord2[3];
  38668. var minRadius = Math.min(width / 2, _height2 / 2);
  38669. r0 = r0 > minRadius ? minRadius : r0;
  38670. r1 = r1 > minRadius ? minRadius : r1;
  38671. r2 = r2 > minRadius ? minRadius : r2;
  38672. r3 = r3 > minRadius ? minRadius : r3;
  38673. r0 = r0 < 0 ? 0 : r0;
  38674. r1 = r1 < 0 ? 0 : r1;
  38675. r2 = r2 < 0 ? 0 : r2;
  38676. r3 = r3 < 0 ? 0 : r3;
  38677. context.arc(left + r3, top + r3, r3, -Math.PI, -Math.PI / 2);
  38678. context.arc(item.x - r0, top + r0, r0, -Math.PI / 2, 0);
  38679. context.arc(item.x - r1, top + width - r1, r1, 0, Math.PI / 2);
  38680. context.arc(left + r2, top + width - r2, r2, Math.PI / 2, Math.PI);
  38681. } else {
  38682. context.moveTo(startX, startY);
  38683. context.lineTo(item.x, startY);
  38684. context.lineTo(item.x, startY + item.width - 2);
  38685. context.lineTo(startX, startY + item.width - 2);
  38686. context.lineTo(startX, startY);
  38687. context.setLineWidth(1);
  38688. context.setStrokeStyle(strokeColor);
  38689. }
  38690. context.setFillStyle(fillColor);
  38691. context.closePath();
  38692. //context.stroke();
  38693. context.fill();
  38694. }
  38695. }
  38696. ;
  38697. break;
  38698. case 'stack':
  38699. // 绘制堆叠数据图
  38700. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38701. calPoints.push(points);
  38702. points = fixBarStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  38703. for (var _i19 = 0; _i19 < points.length; _i19++) {
  38704. var _item10 = points[_i19];
  38705. if (_item10 !== null && _i19 > leftNum && _i19 < rightNum) {
  38706. context.beginPath();
  38707. var fillColor = _item10.color || eachSeries.color;
  38708. var startX = _item10.x0;
  38709. context.setFillStyle(fillColor);
  38710. context.moveTo(startX, _item10.y - _item10.width / 2);
  38711. context.fillRect(startX, _item10.y - _item10.width / 2, _item10.height, _item10.width - 2);
  38712. context.closePath();
  38713. context.fill();
  38714. }
  38715. }
  38716. ;
  38717. break;
  38718. }
  38719. });
  38720. if (opts.dataLabel !== false && process === 1) {
  38721. series.forEach(function (eachSeries, seriesIndex) {
  38722. var ranges, minRange, maxRange;
  38723. ranges = [].concat(opts.chartData.xAxisData.ranges);
  38724. maxRange = ranges.pop();
  38725. minRange = ranges.shift();
  38726. var data = eachSeries.data;
  38727. switch (columnOption.type) {
  38728. case 'group':
  38729. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  38730. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  38731. drawBarPointText(points, eachSeries, config, context, opts);
  38732. break;
  38733. case 'stack':
  38734. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38735. drawBarPointText(points, eachSeries, config, context, opts);
  38736. break;
  38737. }
  38738. });
  38739. }
  38740. return {
  38741. yAxisPoints: yAxisPoints,
  38742. calPoints: calPoints,
  38743. eachSpacing: eachSpacing
  38744. };
  38745. }
  38746. function drawCandleDataPoints(series, seriesMA, opts, config, context) {
  38747. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  38748. var candleOption = assign({}, {
  38749. color: {},
  38750. average: {}
  38751. }, opts.extra.candle);
  38752. candleOption.color = assign({}, {
  38753. upLine: '#f04864',
  38754. upFill: '#f04864',
  38755. downLine: '#2fc25b',
  38756. downFill: '#2fc25b'
  38757. }, candleOption.color);
  38758. candleOption.average = assign({}, {
  38759. show: false,
  38760. name: [],
  38761. day: [],
  38762. color: config.color
  38763. }, candleOption.average);
  38764. opts.extra.candle = candleOption;
  38765. var xAxisData = opts.chartData.xAxisData,
  38766. xAxisPoints = xAxisData.xAxisPoints,
  38767. eachSpacing = xAxisData.eachSpacing;
  38768. var calPoints = [];
  38769. context.save();
  38770. var leftNum = -2;
  38771. var rightNum = xAxisPoints.length + 2;
  38772. var leftSpace = 0;
  38773. var rightSpace = opts.width + eachSpacing;
  38774. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38775. context.translate(opts._scrollDistance_, 0);
  38776. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  38777. rightNum = leftNum + opts.xAxis.itemCount + 4;
  38778. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  38779. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  38780. }
  38781. //画均线
  38782. if (candleOption.average.show || seriesMA) {
  38783. //Merge pull request !12 from 邱贵翔
  38784. seriesMA.forEach(function (eachSeries, seriesIndex) {
  38785. var ranges, minRange, maxRange;
  38786. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38787. minRange = ranges.pop();
  38788. maxRange = ranges.shift();
  38789. var data = eachSeries.data;
  38790. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38791. var splitPointList = splitPoints(points, eachSeries);
  38792. for (var i = 0; i < splitPointList.length; i++) {
  38793. var _points = splitPointList[i];
  38794. context.beginPath();
  38795. context.setStrokeStyle(eachSeries.color);
  38796. context.setLineWidth(1);
  38797. if (_points.length === 1) {
  38798. context.moveTo(_points[0].x, _points[0].y);
  38799. context.arc(_points[0].x, _points[0].y, 1, 0, 2 * Math.PI);
  38800. } else {
  38801. context.moveTo(_points[0].x, _points[0].y);
  38802. var startPoint = 0;
  38803. for (var j = 0; j < _points.length; j++) {
  38804. var item = _points[j];
  38805. if (startPoint == 0 && item.x > leftSpace) {
  38806. context.moveTo(item.x, item.y);
  38807. startPoint = 1;
  38808. }
  38809. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  38810. var ctrlPoint = createCurveControlPoints(_points, j - 1);
  38811. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  38812. }
  38813. }
  38814. context.moveTo(_points[0].x, _points[0].y);
  38815. }
  38816. context.closePath();
  38817. context.stroke();
  38818. }
  38819. });
  38820. }
  38821. //画K线
  38822. series.forEach(function (eachSeries, seriesIndex) {
  38823. var ranges, minRange, maxRange;
  38824. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38825. minRange = ranges.pop();
  38826. maxRange = ranges.shift();
  38827. var data = eachSeries.data;
  38828. var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38829. calPoints.push(points);
  38830. var splitPointList = splitPoints(points, eachSeries);
  38831. for (var i = 0; i < splitPointList[0].length; i++) {
  38832. if (i > leftNum && i < rightNum) {
  38833. var item = splitPointList[0][i];
  38834. context.beginPath();
  38835. //如果上涨
  38836. if (data[i][1] - data[i][0] > 0) {
  38837. context.setStrokeStyle(candleOption.color.upLine);
  38838. context.setFillStyle(candleOption.color.upFill);
  38839. context.setLineWidth(1 * opts.pix);
  38840. context.moveTo(item[3].x, item[3].y); //顶点
  38841. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38842. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  38843. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  38844. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38845. context.lineTo(item[2].x, item[2].y); //底点
  38846. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38847. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  38848. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  38849. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38850. context.moveTo(item[3].x, item[3].y); //顶点
  38851. } else {
  38852. context.setStrokeStyle(candleOption.color.downLine);
  38853. context.setFillStyle(candleOption.color.downFill);
  38854. context.setLineWidth(1 * opts.pix);
  38855. context.moveTo(item[3].x, item[3].y); //顶点
  38856. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38857. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  38858. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  38859. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38860. context.lineTo(item[2].x, item[2].y); //底点
  38861. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38862. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  38863. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  38864. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38865. context.moveTo(item[3].x, item[3].y); //顶点
  38866. }
  38867. context.closePath();
  38868. context.fill();
  38869. context.stroke();
  38870. }
  38871. }
  38872. });
  38873. context.restore();
  38874. return {
  38875. xAxisPoints: xAxisPoints,
  38876. calPoints: calPoints,
  38877. eachSpacing: eachSpacing
  38878. };
  38879. }
  38880. function drawAreaDataPoints(series, opts, config, context) {
  38881. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38882. var areaOption = assign({}, {
  38883. type: 'straight',
  38884. opacity: 0.2,
  38885. addLine: false,
  38886. width: 2,
  38887. gradient: false
  38888. }, opts.extra.area);
  38889. var xAxisData = opts.chartData.xAxisData,
  38890. xAxisPoints = xAxisData.xAxisPoints,
  38891. eachSpacing = xAxisData.eachSpacing;
  38892. var endY = opts.height - opts.area[2];
  38893. var calPoints = [];
  38894. context.save();
  38895. var leftSpace = 0;
  38896. var rightSpace = opts.width + eachSpacing;
  38897. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38898. context.translate(opts._scrollDistance_, 0);
  38899. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  38900. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  38901. }
  38902. series.forEach(function (eachSeries, seriesIndex) {
  38903. var ranges, minRange, maxRange;
  38904. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38905. minRange = ranges.pop();
  38906. maxRange = ranges.shift();
  38907. var data = eachSeries.data;
  38908. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38909. calPoints.push(points);
  38910. var splitPointList = splitPoints(points, eachSeries);
  38911. for (var i = 0; i < splitPointList.length; i++) {
  38912. var _points2 = splitPointList[i];
  38913. // 绘制区域数
  38914. context.beginPath();
  38915. context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  38916. if (areaOption.gradient) {
  38917. var gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
  38918. gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
  38919. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  38920. context.setFillStyle(gradient);
  38921. } else {
  38922. context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  38923. }
  38924. context.setLineWidth(areaOption.width * opts.pix);
  38925. if (_points2.length > 1) {
  38926. var firstPoint = _points2[0];
  38927. var lastPoint = _points2[_points2.length - 1];
  38928. context.moveTo(firstPoint.x, firstPoint.y);
  38929. var startPoint = 0;
  38930. if (areaOption.type === 'curve') {
  38931. for (var j = 0; j < _points2.length; j++) {
  38932. var item = _points2[j];
  38933. if (startPoint == 0 && item.x > leftSpace) {
  38934. context.moveTo(item.x, item.y);
  38935. startPoint = 1;
  38936. }
  38937. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  38938. var ctrlPoint = createCurveControlPoints(_points2, j - 1);
  38939. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  38940. }
  38941. }
  38942. ;
  38943. }
  38944. if (areaOption.type === 'straight') {
  38945. for (var _j = 0; _j < _points2.length; _j++) {
  38946. var _item11 = _points2[_j];
  38947. if (startPoint == 0 && _item11.x > leftSpace) {
  38948. context.moveTo(_item11.x, _item11.y);
  38949. startPoint = 1;
  38950. }
  38951. if (_j > 0 && _item11.x > leftSpace && _item11.x < rightSpace) {
  38952. context.lineTo(_item11.x, _item11.y);
  38953. }
  38954. }
  38955. ;
  38956. }
  38957. if (areaOption.type === 'step') {
  38958. for (var _j2 = 0; _j2 < _points2.length; _j2++) {
  38959. var _item12 = _points2[_j2];
  38960. if (startPoint == 0 && _item12.x > leftSpace) {
  38961. context.moveTo(_item12.x, _item12.y);
  38962. startPoint = 1;
  38963. }
  38964. if (_j2 > 0 && _item12.x > leftSpace && _item12.x < rightSpace) {
  38965. context.lineTo(_item12.x, _points2[_j2 - 1].y);
  38966. context.lineTo(_item12.x, _item12.y);
  38967. }
  38968. }
  38969. ;
  38970. }
  38971. context.lineTo(lastPoint.x, endY);
  38972. context.lineTo(firstPoint.x, endY);
  38973. context.lineTo(firstPoint.x, firstPoint.y);
  38974. } else {
  38975. var _item13 = _points2[0];
  38976. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  38977. context.lineTo(_item13.x + eachSpacing / 2, _item13.y);
  38978. context.lineTo(_item13.x + eachSpacing / 2, endY);
  38979. context.lineTo(_item13.x - eachSpacing / 2, endY);
  38980. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  38981. }
  38982. context.closePath();
  38983. context.fill();
  38984. //画连线
  38985. if (areaOption.addLine) {
  38986. if (eachSeries.lineType == 'dash') {
  38987. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  38988. dashLength *= opts.pix;
  38989. context.setLineDash([dashLength, dashLength]);
  38990. }
  38991. context.beginPath();
  38992. context.setStrokeStyle(eachSeries.color);
  38993. context.setLineWidth(areaOption.width * opts.pix);
  38994. if (_points2.length === 1) {
  38995. context.moveTo(_points2[0].x, _points2[0].y);
  38996. context.arc(_points2[0].x, _points2[0].y, 1, 0, 2 * Math.PI);
  38997. } else {
  38998. context.moveTo(_points2[0].x, _points2[0].y);
  38999. var _startPoint = 0;
  39000. if (areaOption.type === 'curve') {
  39001. for (var _j3 = 0; _j3 < _points2.length; _j3++) {
  39002. var _item14 = _points2[_j3];
  39003. if (_startPoint == 0 && _item14.x > leftSpace) {
  39004. context.moveTo(_item14.x, _item14.y);
  39005. _startPoint = 1;
  39006. }
  39007. if (_j3 > 0 && _item14.x > leftSpace && _item14.x < rightSpace) {
  39008. var _ctrlPoint = createCurveControlPoints(_points2, _j3 - 1);
  39009. context.bezierCurveTo(_ctrlPoint.ctrA.x, _ctrlPoint.ctrA.y, _ctrlPoint.ctrB.x, _ctrlPoint.ctrB.y, _item14.x, _item14.y);
  39010. }
  39011. }
  39012. ;
  39013. }
  39014. if (areaOption.type === 'straight') {
  39015. for (var _j4 = 0; _j4 < _points2.length; _j4++) {
  39016. var _item15 = _points2[_j4];
  39017. if (_startPoint == 0 && _item15.x > leftSpace) {
  39018. context.moveTo(_item15.x, _item15.y);
  39019. _startPoint = 1;
  39020. }
  39021. if (_j4 > 0 && _item15.x > leftSpace && _item15.x < rightSpace) {
  39022. context.lineTo(_item15.x, _item15.y);
  39023. }
  39024. }
  39025. ;
  39026. }
  39027. if (areaOption.type === 'step') {
  39028. for (var _j5 = 0; _j5 < _points2.length; _j5++) {
  39029. var _item16 = _points2[_j5];
  39030. if (_startPoint == 0 && _item16.x > leftSpace) {
  39031. context.moveTo(_item16.x, _item16.y);
  39032. _startPoint = 1;
  39033. }
  39034. if (_j5 > 0 && _item16.x > leftSpace && _item16.x < rightSpace) {
  39035. context.lineTo(_item16.x, _points2[_j5 - 1].y);
  39036. context.lineTo(_item16.x, _item16.y);
  39037. }
  39038. }
  39039. ;
  39040. }
  39041. context.moveTo(_points2[0].x, _points2[0].y);
  39042. }
  39043. context.stroke();
  39044. context.setLineDash([]);
  39045. }
  39046. }
  39047. //画点
  39048. if (opts.dataPointShape !== false) {
  39049. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39050. }
  39051. });
  39052. if (opts.dataLabel !== false && process === 1) {
  39053. series.forEach(function (eachSeries, seriesIndex) {
  39054. var ranges, minRange, maxRange;
  39055. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39056. minRange = ranges.pop();
  39057. maxRange = ranges.shift();
  39058. var data = eachSeries.data;
  39059. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39060. drawPointText(points, eachSeries, config, context, opts);
  39061. });
  39062. }
  39063. context.restore();
  39064. return {
  39065. xAxisPoints: xAxisPoints,
  39066. calPoints: calPoints,
  39067. eachSpacing: eachSpacing
  39068. };
  39069. }
  39070. function drawScatterDataPoints(series, opts, config, context) {
  39071. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39072. var scatterOption = assign({}, {
  39073. type: 'circle'
  39074. }, opts.extra.scatter);
  39075. var xAxisData = opts.chartData.xAxisData,
  39076. xAxisPoints = xAxisData.xAxisPoints,
  39077. eachSpacing = xAxisData.eachSpacing;
  39078. var calPoints = [];
  39079. context.save();
  39080. var leftSpace = 0;
  39081. var rightSpace = opts.width + eachSpacing;
  39082. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39083. context.translate(opts._scrollDistance_, 0);
  39084. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  39085. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  39086. }
  39087. series.forEach(function (eachSeries, seriesIndex) {
  39088. var ranges, minRange, maxRange;
  39089. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39090. minRange = ranges.pop();
  39091. maxRange = ranges.shift();
  39092. var data = eachSeries.data;
  39093. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39094. context.beginPath();
  39095. context.setStrokeStyle(eachSeries.color);
  39096. context.setFillStyle(eachSeries.color);
  39097. context.setLineWidth(1 * opts.pix);
  39098. var shape = eachSeries.pointShape;
  39099. if (shape === 'diamond') {
  39100. points.forEach(function (item, index) {
  39101. if (item !== null) {
  39102. context.moveTo(item.x, item.y - 4.5);
  39103. context.lineTo(item.x - 4.5, item.y);
  39104. context.lineTo(item.x, item.y + 4.5);
  39105. context.lineTo(item.x + 4.5, item.y);
  39106. context.lineTo(item.x, item.y - 4.5);
  39107. }
  39108. });
  39109. } else if (shape === 'circle') {
  39110. points.forEach(function (item, index) {
  39111. if (item !== null) {
  39112. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  39113. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  39114. }
  39115. });
  39116. } else if (shape === 'square') {
  39117. points.forEach(function (item, index) {
  39118. if (item !== null) {
  39119. context.moveTo(item.x - 3.5, item.y - 3.5);
  39120. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  39121. }
  39122. });
  39123. } else if (shape === 'triangle') {
  39124. points.forEach(function (item, index) {
  39125. if (item !== null) {
  39126. context.moveTo(item.x, item.y - 4.5);
  39127. context.lineTo(item.x - 4.5, item.y + 4.5);
  39128. context.lineTo(item.x + 4.5, item.y + 4.5);
  39129. context.lineTo(item.x, item.y - 4.5);
  39130. }
  39131. });
  39132. } else if (shape === 'triangle') {
  39133. return;
  39134. }
  39135. context.closePath();
  39136. context.fill();
  39137. context.stroke();
  39138. });
  39139. if (opts.dataLabel !== false && process === 1) {
  39140. series.forEach(function (eachSeries, seriesIndex) {
  39141. var ranges, minRange, maxRange;
  39142. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39143. minRange = ranges.pop();
  39144. maxRange = ranges.shift();
  39145. var data = eachSeries.data;
  39146. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39147. drawPointText(points, eachSeries, config, context, opts);
  39148. });
  39149. }
  39150. context.restore();
  39151. return {
  39152. xAxisPoints: xAxisPoints,
  39153. calPoints: calPoints,
  39154. eachSpacing: eachSpacing
  39155. };
  39156. }
  39157. function drawBubbleDataPoints(series, opts, config, context) {
  39158. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39159. var bubbleOption = assign({}, {
  39160. opacity: 1,
  39161. border: 2
  39162. }, opts.extra.bubble);
  39163. var xAxisData = opts.chartData.xAxisData,
  39164. xAxisPoints = xAxisData.xAxisPoints,
  39165. eachSpacing = xAxisData.eachSpacing;
  39166. var calPoints = [];
  39167. context.save();
  39168. var leftSpace = 0;
  39169. var rightSpace = opts.width + eachSpacing;
  39170. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39171. context.translate(opts._scrollDistance_, 0);
  39172. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  39173. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  39174. }
  39175. series.forEach(function (eachSeries, seriesIndex) {
  39176. var ranges, minRange, maxRange;
  39177. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39178. minRange = ranges.pop();
  39179. maxRange = ranges.shift();
  39180. var data = eachSeries.data;
  39181. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39182. context.beginPath();
  39183. context.setStrokeStyle(eachSeries.color);
  39184. context.setLineWidth(bubbleOption.border * opts.pix);
  39185. context.setFillStyle(hexToRgb(eachSeries.color, bubbleOption.opacity));
  39186. points.forEach(function (item, index) {
  39187. context.moveTo(item.x + item.r, item.y);
  39188. context.arc(item.x, item.y, item.r * opts.pix, 0, 2 * Math.PI, false);
  39189. });
  39190. context.closePath();
  39191. context.fill();
  39192. context.stroke();
  39193. if (opts.dataLabel !== false && process === 1) {
  39194. points.forEach(function (item, index) {
  39195. context.beginPath();
  39196. var fontSize = series.textSize * opts.pix || config.fontSize;
  39197. context.setFontSize(fontSize);
  39198. context.setFillStyle(series.textColor || "#FFFFFF");
  39199. context.setTextAlign('center');
  39200. context.fillText(String(item.t), item.x, item.y + fontSize / 2);
  39201. context.closePath();
  39202. context.stroke();
  39203. context.setTextAlign('left');
  39204. });
  39205. }
  39206. });
  39207. context.restore();
  39208. return {
  39209. xAxisPoints: xAxisPoints,
  39210. calPoints: calPoints,
  39211. eachSpacing: eachSpacing
  39212. };
  39213. }
  39214. function drawLineDataPoints(series, opts, config, context) {
  39215. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39216. var lineOption = assign({}, {
  39217. type: 'straight',
  39218. width: 2
  39219. }, opts.extra.line);
  39220. lineOption.width *= opts.pix;
  39221. var xAxisData = opts.chartData.xAxisData,
  39222. xAxisPoints = xAxisData.xAxisPoints,
  39223. eachSpacing = xAxisData.eachSpacing;
  39224. var calPoints = [];
  39225. context.save();
  39226. var leftSpace = 0;
  39227. var rightSpace = opts.width + eachSpacing;
  39228. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39229. context.translate(opts._scrollDistance_, 0);
  39230. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  39231. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  39232. }
  39233. series.forEach(function (eachSeries, seriesIndex) {
  39234. var ranges, minRange, maxRange;
  39235. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39236. minRange = ranges.pop();
  39237. maxRange = ranges.shift();
  39238. var data = eachSeries.data;
  39239. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39240. calPoints.push(points);
  39241. var splitPointList = splitPoints(points, eachSeries);
  39242. if (eachSeries.lineType == 'dash') {
  39243. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  39244. dashLength *= opts.pix;
  39245. context.setLineDash([dashLength, dashLength]);
  39246. }
  39247. context.beginPath();
  39248. context.setStrokeStyle(eachSeries.color);
  39249. context.setLineWidth(lineOption.width);
  39250. splitPointList.forEach(function (points, index) {
  39251. if (points.length === 1) {
  39252. context.moveTo(points[0].x, points[0].y);
  39253. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  39254. } else {
  39255. context.moveTo(points[0].x, points[0].y);
  39256. var startPoint = 0;
  39257. if (lineOption.type === 'curve') {
  39258. for (var j = 0; j < points.length; j++) {
  39259. var item = points[j];
  39260. if (startPoint == 0 && item.x > leftSpace) {
  39261. context.moveTo(item.x, item.y);
  39262. startPoint = 1;
  39263. }
  39264. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  39265. var ctrlPoint = createCurveControlPoints(points, j - 1);
  39266. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  39267. }
  39268. }
  39269. ;
  39270. }
  39271. if (lineOption.type === 'straight') {
  39272. for (var _j6 = 0; _j6 < points.length; _j6++) {
  39273. var _item17 = points[_j6];
  39274. if (startPoint == 0 && _item17.x > leftSpace) {
  39275. context.moveTo(_item17.x, _item17.y);
  39276. startPoint = 1;
  39277. }
  39278. if (_j6 > 0 && _item17.x > leftSpace && _item17.x < rightSpace) {
  39279. context.lineTo(_item17.x, _item17.y);
  39280. }
  39281. }
  39282. ;
  39283. }
  39284. if (lineOption.type === 'step') {
  39285. for (var _j7 = 0; _j7 < points.length; _j7++) {
  39286. var _item18 = points[_j7];
  39287. if (startPoint == 0 && _item18.x > leftSpace) {
  39288. context.moveTo(_item18.x, _item18.y);
  39289. startPoint = 1;
  39290. }
  39291. if (_j7 > 0 && _item18.x > leftSpace && _item18.x < rightSpace) {
  39292. context.lineTo(_item18.x, points[_j7 - 1].y);
  39293. context.lineTo(_item18.x, _item18.y);
  39294. }
  39295. }
  39296. ;
  39297. }
  39298. context.moveTo(points[0].x, points[0].y);
  39299. }
  39300. });
  39301. context.stroke();
  39302. context.setLineDash([]);
  39303. if (opts.dataPointShape !== false) {
  39304. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39305. }
  39306. });
  39307. if (opts.dataLabel !== false && process === 1) {
  39308. series.forEach(function (eachSeries, seriesIndex) {
  39309. var ranges, minRange, maxRange;
  39310. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39311. minRange = ranges.pop();
  39312. maxRange = ranges.shift();
  39313. var data = eachSeries.data;
  39314. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39315. drawPointText(points, eachSeries, config, context, opts);
  39316. });
  39317. }
  39318. context.restore();
  39319. return {
  39320. xAxisPoints: xAxisPoints,
  39321. calPoints: calPoints,
  39322. eachSpacing: eachSpacing
  39323. };
  39324. }
  39325. function drawMixDataPoints(series, opts, config, context) {
  39326. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39327. var columnOption = assign({}, {
  39328. width: eachSpacing / 2,
  39329. barBorderCircle: false,
  39330. barBorderRadius: [],
  39331. seriesGap: 2,
  39332. linearType: 'none',
  39333. linearOpacity: 1,
  39334. customColor: [],
  39335. colorStop: 0
  39336. }, opts.extra.mix.column);
  39337. var xAxisData = opts.chartData.xAxisData,
  39338. xAxisPoints = xAxisData.xAxisPoints,
  39339. eachSpacing = xAxisData.eachSpacing;
  39340. var endY = opts.height - opts.area[2];
  39341. var calPoints = [];
  39342. var columnIndex = 0;
  39343. var columnLength = 0;
  39344. series.forEach(function (eachSeries, seriesIndex) {
  39345. if (eachSeries.type == 'column') {
  39346. columnLength += 1;
  39347. }
  39348. });
  39349. context.save();
  39350. var leftNum = -2;
  39351. var rightNum = xAxisPoints.length + 2;
  39352. var leftSpace = 0;
  39353. var rightSpace = opts.width + eachSpacing;
  39354. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39355. context.translate(opts._scrollDistance_, 0);
  39356. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  39357. rightNum = leftNum + opts.xAxis.itemCount + 4;
  39358. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  39359. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  39360. }
  39361. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  39362. series.forEach(function (eachSeries, seriesIndex) {
  39363. var ranges, minRange, maxRange;
  39364. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39365. minRange = ranges.pop();
  39366. maxRange = ranges.shift();
  39367. var data = eachSeries.data;
  39368. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39369. calPoints.push(points);
  39370. // 绘制柱状数据图
  39371. if (eachSeries.type == 'column') {
  39372. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  39373. for (var i = 0; i < points.length; i++) {
  39374. var item = points[i];
  39375. if (item !== null && i > leftNum && i < rightNum) {
  39376. var startX = item.x - item.width / 2;
  39377. var height = opts.height - item.y - opts.area[2];
  39378. context.beginPath();
  39379. var fillColor = item.color || eachSeries.color;
  39380. var strokeColor = item.color || eachSeries.color;
  39381. if (columnOption.linearType !== 'none') {
  39382. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  39383. //透明渐变
  39384. if (columnOption.linearType == 'opacity') {
  39385. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  39386. grd.addColorStop(1, hexToRgb(fillColor, 1));
  39387. } else {
  39388. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  39389. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  39390. grd.addColorStop(1, hexToRgb(fillColor, 1));
  39391. }
  39392. fillColor = grd;
  39393. }
  39394. // 圆角边框
  39395. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle) {
  39396. var left = startX;
  39397. var top = item.y;
  39398. var width = item.width;
  39399. var _height3 = opts.height - opts.area[2] - item.y;
  39400. if (columnOption.barBorderCircle) {
  39401. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  39402. }
  39403. var _columnOption$barBord3 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  39404. r0 = _columnOption$barBord3[0],
  39405. r1 = _columnOption$barBord3[1],
  39406. r2 = _columnOption$barBord3[2],
  39407. r3 = _columnOption$barBord3[3];
  39408. var minRadius = Math.min(width / 2, _height3 / 2);
  39409. r0 = r0 > minRadius ? minRadius : r0;
  39410. r1 = r1 > minRadius ? minRadius : r1;
  39411. r2 = r2 > minRadius ? minRadius : r2;
  39412. r3 = r3 > minRadius ? minRadius : r3;
  39413. r0 = r0 < 0 ? 0 : r0;
  39414. r1 = r1 < 0 ? 0 : r1;
  39415. r2 = r2 < 0 ? 0 : r2;
  39416. r3 = r3 < 0 ? 0 : r3;
  39417. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  39418. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  39419. context.arc(left + width - r2, top + _height3 - r2, r2, 0, Math.PI / 2);
  39420. context.arc(left + r3, top + _height3 - r3, r3, Math.PI / 2, Math.PI);
  39421. } else {
  39422. context.moveTo(startX, item.y);
  39423. context.lineTo(startX + item.width - 2, item.y);
  39424. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  39425. context.lineTo(startX, opts.height - opts.area[2]);
  39426. context.lineTo(startX, item.y);
  39427. context.setLineWidth(1);
  39428. context.setStrokeStyle(strokeColor);
  39429. }
  39430. context.setFillStyle(fillColor);
  39431. context.closePath();
  39432. context.fill();
  39433. }
  39434. }
  39435. columnIndex += 1;
  39436. }
  39437. //绘制区域图数据
  39438. if (eachSeries.type == 'area') {
  39439. var _splitPointList = splitPoints(points, eachSeries);
  39440. for (var _i20 = 0; _i20 < _splitPointList.length; _i20++) {
  39441. var _points3 = _splitPointList[_i20];
  39442. // 绘制区域数据
  39443. context.beginPath();
  39444. context.setStrokeStyle(eachSeries.color);
  39445. context.setFillStyle(hexToRgb(eachSeries.color, 0.2));
  39446. context.setLineWidth(2 * opts.pix);
  39447. if (_points3.length > 1) {
  39448. var firstPoint = _points3[0];
  39449. var lastPoint = _points3[_points3.length - 1];
  39450. context.moveTo(firstPoint.x, firstPoint.y);
  39451. var startPoint = 0;
  39452. if (eachSeries.style === 'curve') {
  39453. for (var j = 0; j < _points3.length; j++) {
  39454. var _item19 = _points3[j];
  39455. if (startPoint == 0 && _item19.x > leftSpace) {
  39456. context.moveTo(_item19.x, _item19.y);
  39457. startPoint = 1;
  39458. }
  39459. if (j > 0 && _item19.x > leftSpace && _item19.x < rightSpace) {
  39460. var ctrlPoint = createCurveControlPoints(_points3, j - 1);
  39461. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item19.x, _item19.y);
  39462. }
  39463. }
  39464. ;
  39465. } else {
  39466. for (var _j8 = 0; _j8 < _points3.length; _j8++) {
  39467. var _item20 = _points3[_j8];
  39468. if (startPoint == 0 && _item20.x > leftSpace) {
  39469. context.moveTo(_item20.x, _item20.y);
  39470. startPoint = 1;
  39471. }
  39472. if (_j8 > 0 && _item20.x > leftSpace && _item20.x < rightSpace) {
  39473. context.lineTo(_item20.x, _item20.y);
  39474. }
  39475. }
  39476. ;
  39477. }
  39478. context.lineTo(lastPoint.x, endY);
  39479. context.lineTo(firstPoint.x, endY);
  39480. context.lineTo(firstPoint.x, firstPoint.y);
  39481. } else {
  39482. var _item21 = _points3[0];
  39483. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  39484. context.lineTo(_item21.x + eachSpacing / 2, _item21.y);
  39485. context.lineTo(_item21.x + eachSpacing / 2, endY);
  39486. context.lineTo(_item21.x - eachSpacing / 2, endY);
  39487. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  39488. }
  39489. context.closePath();
  39490. context.fill();
  39491. }
  39492. }
  39493. // 绘制折线数据图
  39494. if (eachSeries.type == 'line') {
  39495. var splitPointList = splitPoints(points, eachSeries);
  39496. splitPointList.forEach(function (points, index) {
  39497. if (eachSeries.lineType == 'dash') {
  39498. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  39499. dashLength *= opts.pix;
  39500. context.setLineDash([dashLength, dashLength]);
  39501. }
  39502. context.beginPath();
  39503. context.setStrokeStyle(eachSeries.color);
  39504. context.setLineWidth(2 * opts.pix);
  39505. if (points.length === 1) {
  39506. context.moveTo(points[0].x, points[0].y);
  39507. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  39508. } else {
  39509. context.moveTo(points[0].x, points[0].y);
  39510. var _startPoint2 = 0;
  39511. if (eachSeries.style == 'curve') {
  39512. for (var _j9 = 0; _j9 < points.length; _j9++) {
  39513. var _item22 = points[_j9];
  39514. if (_startPoint2 == 0 && _item22.x > leftSpace) {
  39515. context.moveTo(_item22.x, _item22.y);
  39516. _startPoint2 = 1;
  39517. }
  39518. if (_j9 > 0 && _item22.x > leftSpace && _item22.x < rightSpace) {
  39519. var ctrlPoint = createCurveControlPoints(points, _j9 - 1);
  39520. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item22.x, _item22.y);
  39521. }
  39522. }
  39523. } else {
  39524. for (var _j10 = 0; _j10 < points.length; _j10++) {
  39525. var _item23 = points[_j10];
  39526. if (_startPoint2 == 0 && _item23.x > leftSpace) {
  39527. context.moveTo(_item23.x, _item23.y);
  39528. _startPoint2 = 1;
  39529. }
  39530. if (_j10 > 0 && _item23.x > leftSpace && _item23.x < rightSpace) {
  39531. context.lineTo(_item23.x, _item23.y);
  39532. }
  39533. }
  39534. }
  39535. context.moveTo(points[0].x, points[0].y);
  39536. }
  39537. context.stroke();
  39538. context.setLineDash([]);
  39539. });
  39540. }
  39541. // 绘制点数据图
  39542. if (eachSeries.type == 'point') {
  39543. eachSeries.addPoint = true;
  39544. }
  39545. if (eachSeries.addPoint == true && eachSeries.type !== 'column') {
  39546. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39547. }
  39548. });
  39549. if (opts.dataLabel !== false && process === 1) {
  39550. var columnIndex = 0;
  39551. series.forEach(function (eachSeries, seriesIndex) {
  39552. var ranges, minRange, maxRange;
  39553. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39554. minRange = ranges.pop();
  39555. maxRange = ranges.shift();
  39556. var data = eachSeries.data;
  39557. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39558. if (eachSeries.type !== 'column') {
  39559. drawPointText(points, eachSeries, config, context, opts);
  39560. } else {
  39561. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  39562. drawPointText(points, eachSeries, config, context, opts);
  39563. columnIndex += 1;
  39564. }
  39565. });
  39566. }
  39567. context.restore();
  39568. return {
  39569. xAxisPoints: xAxisPoints,
  39570. calPoints: calPoints,
  39571. eachSpacing: eachSpacing
  39572. };
  39573. }
  39574. function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
  39575. var toolTipOption = opts.extra.tooltip || {};
  39576. if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {
  39577. drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints);
  39578. }
  39579. context.save();
  39580. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39581. context.translate(opts._scrollDistance_, 0);
  39582. }
  39583. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  39584. drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
  39585. }
  39586. context.restore();
  39587. }
  39588. function drawXAxis(categories, opts, config, context) {
  39589. var xAxisData = opts.chartData.xAxisData,
  39590. xAxisPoints = xAxisData.xAxisPoints,
  39591. startX = xAxisData.startX,
  39592. endX = xAxisData.endX,
  39593. eachSpacing = xAxisData.eachSpacing;
  39594. var boundaryGap = 'center';
  39595. if (opts.type == 'bar' || opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  39596. boundaryGap = opts.xAxis.boundaryGap;
  39597. }
  39598. var startY = opts.height - opts.area[2];
  39599. var endY = opts.area[0];
  39600. //绘制滚动条
  39601. if (opts.enableScroll && opts.xAxis.scrollShow) {
  39602. var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
  39603. var scrollScreenWidth = endX - startX;
  39604. var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
  39605. var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
  39606. var scrollLeft = 0;
  39607. if (opts._scrollDistance_) {
  39608. scrollLeft = -opts._scrollDistance_ * scrollScreenWidth / scrollTotalWidth;
  39609. }
  39610. context.beginPath();
  39611. context.setLineCap('round');
  39612. context.setLineWidth(6 * opts.pix);
  39613. context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
  39614. context.moveTo(startX, scrollY);
  39615. context.lineTo(endX, scrollY);
  39616. context.stroke();
  39617. context.closePath();
  39618. context.beginPath();
  39619. context.setLineCap('round');
  39620. context.setLineWidth(6 * opts.pix);
  39621. context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
  39622. context.moveTo(startX + scrollLeft, scrollY);
  39623. context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
  39624. context.stroke();
  39625. context.closePath();
  39626. context.setLineCap('butt');
  39627. }
  39628. context.save();
  39629. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  39630. context.translate(opts._scrollDistance_, 0);
  39631. }
  39632. //绘制X轴刻度线
  39633. if (opts.xAxis.calibration === true) {
  39634. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  39635. context.setLineCap('butt');
  39636. context.setLineWidth(1 * opts.pix);
  39637. xAxisPoints.forEach(function (item, index) {
  39638. if (index > 0) {
  39639. context.beginPath();
  39640. context.moveTo(item - eachSpacing / 2, startY);
  39641. context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pix);
  39642. context.closePath();
  39643. context.stroke();
  39644. }
  39645. });
  39646. }
  39647. //绘制X轴网格
  39648. if (opts.xAxis.disableGrid !== true) {
  39649. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  39650. context.setLineCap('butt');
  39651. context.setLineWidth(1 * opts.pix);
  39652. if (opts.xAxis.gridType == 'dash') {
  39653. context.setLineDash([opts.xAxis.dashLength * opts.pix, opts.xAxis.dashLength * opts.pix]);
  39654. }
  39655. opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
  39656. xAxisPoints.forEach(function (item, index) {
  39657. if (index % opts.xAxis.gridEval == 0) {
  39658. context.beginPath();
  39659. context.moveTo(item, startY);
  39660. context.lineTo(item, endY);
  39661. context.stroke();
  39662. }
  39663. });
  39664. context.setLineDash([]);
  39665. }
  39666. //绘制X轴文案
  39667. if (opts.xAxis.disabled !== true) {
  39668. // 对X轴列表做抽稀处理
  39669. //默认全部显示X轴标签
  39670. var maxXAxisListLength = categories.length;
  39671. //如果设置了X轴单屏数量
  39672. if (opts.xAxis.labelCount) {
  39673. //如果设置X轴密度
  39674. if (opts.xAxis.itemCount) {
  39675. maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
  39676. } else {
  39677. maxXAxisListLength = opts.xAxis.labelCount;
  39678. }
  39679. maxXAxisListLength -= 1;
  39680. }
  39681. var ratio = Math.ceil(categories.length / maxXAxisListLength);
  39682. var newCategories = [];
  39683. var cgLength = categories.length;
  39684. for (var i = 0; i < cgLength; i++) {
  39685. if (i % ratio !== 0) {
  39686. newCategories.push("");
  39687. } else {
  39688. newCategories.push(categories[i]);
  39689. }
  39690. }
  39691. newCategories[cgLength - 1] = categories[cgLength - 1];
  39692. var xAxisFontSize = opts.xAxis.fontSize * opts.pix || config.fontSize;
  39693. if (config._xAxisTextAngle_ === 0) {
  39694. newCategories.forEach(function (item, index) {
  39695. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  39696. var offset = -measureText(String(xitem), xAxisFontSize, context) / 2;
  39697. if (boundaryGap == 'center') {
  39698. offset += eachSpacing / 2;
  39699. }
  39700. var scrollHeight = 0;
  39701. if (opts.xAxis.scrollShow) {
  39702. scrollHeight = 6 * opts.pix;
  39703. }
  39704. context.beginPath();
  39705. context.setFontSize(xAxisFontSize);
  39706. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  39707. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);
  39708. context.closePath();
  39709. context.stroke();
  39710. });
  39711. } else {
  39712. newCategories.forEach(function (item, index) {
  39713. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  39714. context.save();
  39715. context.beginPath();
  39716. context.setFontSize(xAxisFontSize);
  39717. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  39718. var textWidth = measureText(String(xitem), xAxisFontSize, context);
  39719. var offset = -textWidth;
  39720. if (boundaryGap == 'center') {
  39721. offset += eachSpacing / 2;
  39722. }
  39723. var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),
  39724. transX = _calRotateTranslate.transX,
  39725. transY = _calRotateTranslate.transY;
  39726. context.rotate(-1 * config._xAxisTextAngle_);
  39727. context.translate(transX, transY);
  39728. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);
  39729. context.closePath();
  39730. context.stroke();
  39731. context.restore();
  39732. });
  39733. }
  39734. }
  39735. context.restore();
  39736. //绘制X轴轴线
  39737. if (opts.xAxis.axisLine) {
  39738. context.beginPath();
  39739. context.setStrokeStyle(opts.xAxis.axisLineColor);
  39740. context.setLineWidth(1 * opts.pix);
  39741. context.moveTo(startX, opts.height - opts.area[2]);
  39742. context.lineTo(endX, opts.height - opts.area[2]);
  39743. context.stroke();
  39744. }
  39745. }
  39746. function drawYAxisGrid(categories, opts, config, context) {
  39747. if (opts.yAxis.disableGrid === true) {
  39748. return;
  39749. }
  39750. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  39751. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  39752. var startX = opts.area[3];
  39753. var xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  39754. xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
  39755. var TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
  39756. var endX = startX + TotalWidth;
  39757. var points = [];
  39758. var startY = 1;
  39759. if (opts.xAxis.axisLine === false) {
  39760. startY = 0;
  39761. }
  39762. for (var i = startY; i < opts.yAxis.splitNumber + 1; i++) {
  39763. points.push(opts.height - opts.area[2] - eachSpacing * i);
  39764. }
  39765. context.save();
  39766. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  39767. context.translate(opts._scrollDistance_, 0);
  39768. }
  39769. if (opts.yAxis.gridType == 'dash') {
  39770. context.setLineDash([opts.yAxis.dashLength * opts.pix, opts.yAxis.dashLength * opts.pix]);
  39771. }
  39772. context.setStrokeStyle(opts.yAxis.gridColor);
  39773. context.setLineWidth(1 * opts.pix);
  39774. points.forEach(function (item, index) {
  39775. context.beginPath();
  39776. context.moveTo(startX, item);
  39777. context.lineTo(endX, item);
  39778. context.stroke();
  39779. });
  39780. context.setLineDash([]);
  39781. context.restore();
  39782. }
  39783. function drawYAxis(series, opts, config, context) {
  39784. if (opts.yAxis.disabled === true) {
  39785. return;
  39786. }
  39787. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  39788. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  39789. var startX = opts.area[3];
  39790. var endX = opts.width - opts.area[1];
  39791. var endY = opts.height - opts.area[2];
  39792. var fillEndY = endY + config.xAxisHeight;
  39793. if (opts.xAxis.scrollShow) {
  39794. fillEndY -= 3 * opts.pix;
  39795. }
  39796. if (opts.xAxis.rotateLabel) {
  39797. fillEndY = opts.height - opts.area[2] + opts.fontSize * opts.pix / 2;
  39798. }
  39799. // set YAxis background
  39800. context.beginPath();
  39801. context.setFillStyle(opts.background);
  39802. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'left') {
  39803. context.fillRect(0, 0, startX, fillEndY);
  39804. }
  39805. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'right') {
  39806. context.fillRect(endX, 0, opts.width, fillEndY);
  39807. }
  39808. context.closePath();
  39809. context.stroke();
  39810. var tStartLeft = opts.area[3];
  39811. var tStartRight = opts.width - opts.area[1];
  39812. var tStartCenter = opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2;
  39813. if (opts.yAxis.data) {
  39814. var _loop4 = function _loop4(i) {
  39815. var yData = opts.yAxis.data[i];
  39816. points = [];
  39817. if (yData.type === 'categories') {
  39818. for (var _i21 = 0; _i21 <= yData.categories.length; _i21++) {
  39819. points.push(opts.area[0] + spacingValid / yData.categories.length / 2 + spacingValid / yData.categories.length * _i21);
  39820. }
  39821. } else {
  39822. for (var _i22 = 0; _i22 <= opts.yAxis.splitNumber; _i22++) {
  39823. points.push(opts.area[0] + eachSpacing * _i22);
  39824. }
  39825. }
  39826. if (yData.disabled !== true) {
  39827. var rangesFormat = opts.chartData.yAxisData.rangesFormat[i];
  39828. var yAxisFontSize = yData.fontSize ? yData.fontSize * opts.pix : config.fontSize;
  39829. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[i];
  39830. var textAlign = yData.textAlign || "right";
  39831. //画Y轴刻度及文案
  39832. rangesFormat.forEach(function (item, index) {
  39833. var pos = points[index] ? points[index] : endY;
  39834. context.beginPath();
  39835. context.setFontSize(yAxisFontSize);
  39836. context.setLineWidth(1 * opts.pix);
  39837. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  39838. context.setFillStyle(yData.fontColor || opts.fontColor);
  39839. var tmpstrat = 0;
  39840. var gapwidth = 4 * opts.pix;
  39841. if (yAxisWidth.position == 'left') {
  39842. //画刻度线
  39843. if (yData.calibration == true) {
  39844. context.moveTo(tStartLeft, pos);
  39845. context.lineTo(tStartLeft - 3 * opts.pix, pos);
  39846. gapwidth += 3 * opts.pix;
  39847. }
  39848. //画文字
  39849. switch (textAlign) {
  39850. case "left":
  39851. context.setTextAlign('left');
  39852. tmpstrat = tStartLeft - yAxisWidth.width;
  39853. break;
  39854. case "right":
  39855. context.setTextAlign('right');
  39856. tmpstrat = tStartLeft - gapwidth;
  39857. break;
  39858. default:
  39859. context.setTextAlign('center');
  39860. tmpstrat = tStartLeft - yAxisWidth.width / 2;
  39861. }
  39862. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  39863. } else if (yAxisWidth.position == 'right') {
  39864. //画刻度线
  39865. if (yData.calibration == true) {
  39866. context.moveTo(tStartRight, pos);
  39867. context.lineTo(tStartRight + 3 * opts.pix, pos);
  39868. gapwidth += 3 * opts.pix;
  39869. }
  39870. switch (textAlign) {
  39871. case "left":
  39872. context.setTextAlign('left');
  39873. tmpstrat = tStartRight + gapwidth;
  39874. break;
  39875. case "right":
  39876. context.setTextAlign('right');
  39877. tmpstrat = tStartRight + yAxisWidth.width;
  39878. break;
  39879. default:
  39880. context.setTextAlign('center');
  39881. tmpstrat = tStartRight + yAxisWidth.width / 2;
  39882. }
  39883. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  39884. } else if (yAxisWidth.position == 'center') {
  39885. //画刻度线
  39886. if (yData.calibration == true) {
  39887. context.moveTo(tStartCenter, pos);
  39888. context.lineTo(tStartCenter - 3 * opts.pix, pos);
  39889. gapwidth += 3 * opts.pix;
  39890. }
  39891. //画文字
  39892. switch (textAlign) {
  39893. case "left":
  39894. context.setTextAlign('left');
  39895. tmpstrat = tStartCenter - yAxisWidth.width;
  39896. break;
  39897. case "right":
  39898. context.setTextAlign('right');
  39899. tmpstrat = tStartCenter - gapwidth;
  39900. break;
  39901. default:
  39902. context.setTextAlign('center');
  39903. tmpstrat = tStartCenter - yAxisWidth.width / 2;
  39904. }
  39905. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  39906. }
  39907. context.closePath();
  39908. context.stroke();
  39909. context.setTextAlign('left');
  39910. });
  39911. //画Y轴轴线
  39912. if (yData.axisLine !== false) {
  39913. context.beginPath();
  39914. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  39915. context.setLineWidth(1 * opts.pix);
  39916. if (yAxisWidth.position == 'left') {
  39917. context.moveTo(tStartLeft, opts.height - opts.area[2]);
  39918. context.lineTo(tStartLeft, opts.area[0]);
  39919. } else if (yAxisWidth.position == 'right') {
  39920. context.moveTo(tStartRight, opts.height - opts.area[2]);
  39921. context.lineTo(tStartRight, opts.area[0]);
  39922. } else if (yAxisWidth.position == 'center') {
  39923. context.moveTo(tStartCenter, opts.height - opts.area[2]);
  39924. context.lineTo(tStartCenter, opts.area[0]);
  39925. }
  39926. context.stroke();
  39927. }
  39928. //画Y轴标题
  39929. if (opts.yAxis.showTitle) {
  39930. var titleFontSize = yData.titleFontSize * opts.pix || config.fontSize;
  39931. var title = yData.title;
  39932. context.beginPath();
  39933. context.setFontSize(titleFontSize);
  39934. context.setFillStyle(yData.titleFontColor || opts.fontColor);
  39935. if (yAxisWidth.position == 'left') {
  39936. context.fillText(title, tStartLeft - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  39937. } else if (yAxisWidth.position == 'right') {
  39938. context.fillText(title, tStartRight - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  39939. } else if (yAxisWidth.position == 'center') {
  39940. context.fillText(title, tStartCenter - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  39941. }
  39942. context.closePath();
  39943. context.stroke();
  39944. }
  39945. if (yAxisWidth.position == 'left') {
  39946. tStartLeft -= yAxisWidth.width + opts.yAxis.padding * opts.pix;
  39947. } else {
  39948. tStartRight += yAxisWidth.width + opts.yAxis.padding * opts.pix;
  39949. }
  39950. }
  39951. };
  39952. for (var i = 0; i < opts.yAxis.data.length; i++) {
  39953. var points;
  39954. _loop4(i);
  39955. }
  39956. }
  39957. }
  39958. function drawLegend(series, opts, config, context, chartData) {
  39959. if (opts.legend.show === false) {
  39960. return;
  39961. }
  39962. var legendData = chartData.legendData;
  39963. var legendList = legendData.points;
  39964. var legendArea = legendData.area;
  39965. var padding = opts.legend.padding * opts.pix;
  39966. var fontSize = opts.legend.fontSize * opts.pix;
  39967. var shapeWidth = 15 * opts.pix;
  39968. var shapeRight = 5 * opts.pix;
  39969. var itemGap = opts.legend.itemGap * opts.pix;
  39970. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  39971. //画背景及边框
  39972. context.beginPath();
  39973. context.setLineWidth(opts.legend.borderWidth * opts.pix);
  39974. context.setStrokeStyle(opts.legend.borderColor);
  39975. context.setFillStyle(opts.legend.backgroundColor);
  39976. context.moveTo(legendArea.start.x, legendArea.start.y);
  39977. context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
  39978. context.closePath();
  39979. context.fill();
  39980. context.stroke();
  39981. legendList.forEach(function (itemList, listIndex) {
  39982. var width = 0;
  39983. var height = 0;
  39984. width = legendData.widthArr[listIndex];
  39985. height = legendData.heightArr[listIndex];
  39986. var startX = 0;
  39987. var startY = 0;
  39988. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  39989. switch (opts.legend.float) {
  39990. case 'left':
  39991. startX = legendArea.start.x + padding;
  39992. break;
  39993. case 'right':
  39994. startX = legendArea.start.x + legendArea.width - width;
  39995. break;
  39996. default:
  39997. startX = legendArea.start.x + (legendArea.width - width) / 2;
  39998. }
  39999. startY = legendArea.start.y + padding + listIndex * lineHeight;
  40000. } else {
  40001. if (listIndex == 0) {
  40002. width = 0;
  40003. } else {
  40004. width = legendData.widthArr[listIndex - 1];
  40005. }
  40006. startX = legendArea.start.x + padding + width;
  40007. startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
  40008. }
  40009. context.setFontSize(config.fontSize);
  40010. for (var i = 0; i < itemList.length; i++) {
  40011. var item = itemList[i];
  40012. item.area = [0, 0, 0, 0];
  40013. item.area[0] = startX;
  40014. item.area[1] = startY;
  40015. item.area[3] = startY + lineHeight;
  40016. context.beginPath();
  40017. context.setLineWidth(1 * opts.pix);
  40018. context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
  40019. context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
  40020. switch (item.legendShape) {
  40021. case 'line':
  40022. context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pix);
  40023. context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pix, 15 * opts.pix, 4 * opts.pix);
  40024. break;
  40025. case 'triangle':
  40026. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  40027. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  40028. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  40029. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  40030. break;
  40031. case 'diamond':
  40032. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  40033. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight);
  40034. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  40035. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight);
  40036. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  40037. break;
  40038. case 'circle':
  40039. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight);
  40040. context.arc(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight, 5 * opts.pix, 0, 2 * Math.PI);
  40041. break;
  40042. case 'rect':
  40043. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  40044. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  40045. break;
  40046. case 'square':
  40047. context.moveTo(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  40048. context.fillRect(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix, 10 * opts.pix, 10 * opts.pix);
  40049. break;
  40050. case 'none':
  40051. break;
  40052. default:
  40053. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  40054. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  40055. }
  40056. context.closePath();
  40057. context.fill();
  40058. context.stroke();
  40059. startX += shapeWidth + shapeRight;
  40060. var fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
  40061. context.beginPath();
  40062. context.setFontSize(fontSize);
  40063. context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
  40064. context.fillText(item.name, startX, startY + fontTrans);
  40065. context.closePath();
  40066. context.stroke();
  40067. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  40068. startX += measureText(item.name, fontSize, context) + itemGap;
  40069. item.area[2] = startX;
  40070. } else {
  40071. item.area[2] = startX + measureText(item.name, fontSize, context) + itemGap;
  40072. ;
  40073. startX -= shapeWidth + shapeRight;
  40074. startY += lineHeight;
  40075. }
  40076. }
  40077. });
  40078. }
  40079. function drawPieDataPoints(series, opts, config, context) {
  40080. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40081. var pieOption = assign({}, {
  40082. activeOpacity: 0.5,
  40083. activeRadius: 10,
  40084. offsetAngle: 0,
  40085. labelWidth: 15,
  40086. ringWidth: 30,
  40087. customRadius: 0,
  40088. border: false,
  40089. borderWidth: 2,
  40090. borderColor: '#FFFFFF',
  40091. centerColor: '#FFFFFF',
  40092. linearType: 'none',
  40093. customColor: []
  40094. }, opts.type == "pie" ? opts.extra.pie : opts.extra.ring);
  40095. var centerPosition = {
  40096. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  40097. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  40098. };
  40099. if (config.pieChartLinePadding == 0) {
  40100. config.pieChartLinePadding = pieOption.activeRadius * opts.pix;
  40101. }
  40102. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
  40103. if (pieOption.customRadius > 0) {
  40104. radius = pieOption.customRadius * opts.pix;
  40105. }
  40106. series = getPieDataPoints(series, radius, process);
  40107. var activeRadius = pieOption.activeRadius * opts.pix;
  40108. pieOption.customColor = fillCustomColor(pieOption.linearType, pieOption.customColor, series, config);
  40109. series = series.map(function (eachSeries) {
  40110. eachSeries._start_ += pieOption.offsetAngle * Math.PI / 180;
  40111. return eachSeries;
  40112. });
  40113. series.forEach(function (eachSeries, seriesIndex) {
  40114. if (opts.tooltip) {
  40115. if (opts.tooltip.index == seriesIndex) {
  40116. context.beginPath();
  40117. context.setFillStyle(hexToRgb(eachSeries.color, pieOption.activeOpacity || 0.5));
  40118. context.moveTo(centerPosition.x, centerPosition.y);
  40119. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  40120. context.closePath();
  40121. context.fill();
  40122. }
  40123. }
  40124. context.beginPath();
  40125. context.setLineWidth(pieOption.borderWidth * opts.pix);
  40126. context.lineJoin = "round";
  40127. context.setStrokeStyle(pieOption.borderColor);
  40128. var fillcolor = eachSeries.color;
  40129. if (pieOption.linearType == 'custom') {
  40130. var grd;
  40131. if (context.createCircularGradient) {
  40132. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  40133. } else {
  40134. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  40135. }
  40136. grd.addColorStop(0, hexToRgb(pieOption.customColor[eachSeries.linearIndex], 1));
  40137. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  40138. fillcolor = grd;
  40139. }
  40140. context.setFillStyle(fillcolor);
  40141. context.moveTo(centerPosition.x, centerPosition.y);
  40142. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  40143. context.closePath();
  40144. context.fill();
  40145. if (pieOption.border == true) {
  40146. context.stroke();
  40147. }
  40148. });
  40149. if (opts.type === 'ring') {
  40150. var innerPieWidth = radius * 0.6;
  40151. if (typeof pieOption.ringWidth === 'number' && pieOption.ringWidth > 0) {
  40152. innerPieWidth = Math.max(0, radius - pieOption.ringWidth * opts.pix);
  40153. }
  40154. context.beginPath();
  40155. context.setFillStyle(pieOption.centerColor);
  40156. context.moveTo(centerPosition.x, centerPosition.y);
  40157. context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
  40158. context.closePath();
  40159. context.fill();
  40160. }
  40161. if (opts.dataLabel !== false && process === 1) {
  40162. var valid = false;
  40163. for (var i = 0, len = series.length; i < len; i++) {
  40164. if (series[i].data > 0) {
  40165. valid = true;
  40166. break;
  40167. }
  40168. }
  40169. if (valid) {
  40170. drawPieText(series, opts, config, context, radius, centerPosition);
  40171. }
  40172. }
  40173. if (process === 1 && opts.type === 'ring') {
  40174. drawRingTitle(opts, config, context, centerPosition);
  40175. }
  40176. return {
  40177. center: centerPosition,
  40178. radius: radius,
  40179. series: series
  40180. };
  40181. }
  40182. function drawRoseDataPoints(series, opts, config, context) {
  40183. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40184. var roseOption = assign({}, {
  40185. type: 'area',
  40186. activeOpacity: 0.5,
  40187. activeRadius: 10,
  40188. offsetAngle: 0,
  40189. labelWidth: 15,
  40190. border: false,
  40191. borderWidth: 2,
  40192. borderColor: '#FFFFFF',
  40193. linearType: 'none',
  40194. customColor: []
  40195. }, opts.extra.rose);
  40196. if (config.pieChartLinePadding == 0) {
  40197. config.pieChartLinePadding = roseOption.activeRadius * opts.pix;
  40198. }
  40199. var centerPosition = {
  40200. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  40201. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  40202. };
  40203. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
  40204. var minRadius = roseOption.minRadius || radius * 0.5;
  40205. series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
  40206. var activeRadius = roseOption.activeRadius * opts.pix;
  40207. roseOption.customColor = fillCustomColor(roseOption.linearType, roseOption.customColor, series, config);
  40208. series = series.map(function (eachSeries) {
  40209. eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
  40210. return eachSeries;
  40211. });
  40212. series.forEach(function (eachSeries, seriesIndex) {
  40213. if (opts.tooltip) {
  40214. if (opts.tooltip.index == seriesIndex) {
  40215. context.beginPath();
  40216. context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
  40217. context.moveTo(centerPosition.x, centerPosition.y);
  40218. context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  40219. context.closePath();
  40220. context.fill();
  40221. }
  40222. }
  40223. context.beginPath();
  40224. context.setLineWidth(roseOption.borderWidth * opts.pix);
  40225. context.lineJoin = "round";
  40226. context.setStrokeStyle(roseOption.borderColor);
  40227. var fillcolor = eachSeries.color;
  40228. if (roseOption.linearType == 'custom') {
  40229. var grd;
  40230. if (context.createCircularGradient) {
  40231. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  40232. } else {
  40233. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  40234. }
  40235. grd.addColorStop(0, hexToRgb(roseOption.customColor[eachSeries.linearIndex], 1));
  40236. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  40237. fillcolor = grd;
  40238. }
  40239. context.setFillStyle(fillcolor);
  40240. context.moveTo(centerPosition.x, centerPosition.y);
  40241. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  40242. context.closePath();
  40243. context.fill();
  40244. if (roseOption.border == true) {
  40245. context.stroke();
  40246. }
  40247. });
  40248. if (opts.dataLabel !== false && process === 1) {
  40249. var valid = false;
  40250. for (var i = 0, len = series.length; i < len; i++) {
  40251. if (series[i].data > 0) {
  40252. valid = true;
  40253. break;
  40254. }
  40255. }
  40256. if (valid) {
  40257. drawPieText(series, opts, config, context, radius, centerPosition);
  40258. }
  40259. }
  40260. return {
  40261. center: centerPosition,
  40262. radius: radius,
  40263. series: series
  40264. };
  40265. }
  40266. function drawArcbarDataPoints(series, opts, config, context) {
  40267. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40268. var arcbarOption = assign({}, {
  40269. startAngle: 0.75,
  40270. endAngle: 0.25,
  40271. type: 'default',
  40272. width: 12,
  40273. gap: 2,
  40274. linearType: 'none',
  40275. customColor: []
  40276. }, opts.extra.arcbar);
  40277. series = getArcbarDataPoints(series, arcbarOption, process);
  40278. var centerPosition;
  40279. if (arcbarOption.centerX || arcbarOption.centerY) {
  40280. centerPosition = {
  40281. x: arcbarOption.centerX ? arcbarOption.centerX : opts.width / 2,
  40282. y: arcbarOption.centerY ? arcbarOption.centerY : opts.height / 2
  40283. };
  40284. } else {
  40285. centerPosition = {
  40286. x: opts.width / 2,
  40287. y: opts.height / 2
  40288. };
  40289. }
  40290. var radius;
  40291. if (arcbarOption.radius) {
  40292. radius = arcbarOption.radius;
  40293. } else {
  40294. radius = Math.min(centerPosition.x, centerPosition.y);
  40295. radius -= 5 * opts.pix;
  40296. radius -= arcbarOption.width / 2;
  40297. }
  40298. arcbarOption.customColor = fillCustomColor(arcbarOption.linearType, arcbarOption.customColor, series, config);
  40299. for (var i = 0; i < series.length; i++) {
  40300. var eachSeries = series[i];
  40301. //背景颜色
  40302. context.setLineWidth(arcbarOption.width * opts.pix);
  40303. context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
  40304. context.setLineCap('round');
  40305. context.beginPath();
  40306. if (arcbarOption.type == 'default') {
  40307. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, arcbarOption.startAngle * Math.PI, arcbarOption.endAngle * Math.PI, false);
  40308. } else {
  40309. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, 0, 2 * Math.PI, false);
  40310. }
  40311. context.stroke();
  40312. //进度条
  40313. var fillColor = eachSeries.color;
  40314. if (arcbarOption.linearType == 'custom') {
  40315. var grd = context.createLinearGradient(centerPosition.x - radius, centerPosition.y, centerPosition.x + radius, centerPosition.y);
  40316. grd.addColorStop(1, hexToRgb(arcbarOption.customColor[eachSeries.linearIndex], 1));
  40317. grd.addColorStop(0, hexToRgb(eachSeries.color, 1));
  40318. fillColor = grd;
  40319. }
  40320. context.setLineWidth(arcbarOption.width * opts.pix);
  40321. context.setStrokeStyle(fillColor);
  40322. context.setLineCap('round');
  40323. context.beginPath();
  40324. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, false);
  40325. context.stroke();
  40326. }
  40327. drawRingTitle(opts, config, context, centerPosition);
  40328. return {
  40329. center: centerPosition,
  40330. radius: radius,
  40331. series: series
  40332. };
  40333. }
  40334. function drawGaugeDataPoints(categories, series, opts, config, context) {
  40335. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  40336. var gaugeOption = assign({}, {
  40337. type: 'default',
  40338. startAngle: 0.75,
  40339. endAngle: 0.25,
  40340. width: 15,
  40341. labelOffset: 13,
  40342. splitLine: {
  40343. fixRadius: 0,
  40344. splitNumber: 10,
  40345. width: 15,
  40346. color: '#FFFFFF',
  40347. childNumber: 5,
  40348. childWidth: 5
  40349. },
  40350. pointer: {
  40351. width: 15,
  40352. color: 'auto'
  40353. }
  40354. }, opts.extra.gauge);
  40355. if (gaugeOption.oldAngle == undefined) {
  40356. gaugeOption.oldAngle = gaugeOption.startAngle;
  40357. }
  40358. if (gaugeOption.oldData == undefined) {
  40359. gaugeOption.oldData = 0;
  40360. }
  40361. categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
  40362. var centerPosition = {
  40363. x: opts.width / 2,
  40364. y: opts.height / 2
  40365. };
  40366. var radius = Math.min(centerPosition.x, centerPosition.y);
  40367. radius -= 5 * opts.pix;
  40368. radius -= gaugeOption.width / 2;
  40369. var innerRadius = radius - gaugeOption.width;
  40370. var totalAngle = 0;
  40371. //判断仪表盘的样式:default百度样式,progress新样式
  40372. if (gaugeOption.type == 'progress') {
  40373. //## 第一步画中心圆形背景和进度条背景
  40374. //中心圆形背景
  40375. var pieRadius = radius - gaugeOption.width * 3;
  40376. context.beginPath();
  40377. var gradient = context.createLinearGradient(centerPosition.x, centerPosition.y - pieRadius, centerPosition.x, centerPosition.y + pieRadius);
  40378. //配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
  40379. gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
  40380. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  40381. context.setFillStyle(gradient);
  40382. context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2 * Math.PI, false);
  40383. context.fill();
  40384. //画进度条背景
  40385. context.setLineWidth(gaugeOption.width);
  40386. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  40387. context.setLineCap('round');
  40388. context.beginPath();
  40389. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, gaugeOption.endAngle * Math.PI, false);
  40390. context.stroke();
  40391. //## 第二步画刻度线
  40392. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  40393. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  40394. var childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  40395. var startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  40396. var endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  40397. context.save();
  40398. context.translate(centerPosition.x, centerPosition.y);
  40399. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  40400. var len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
  40401. var proc = series[0].data * process;
  40402. for (var i = 0; i < len; i++) {
  40403. context.beginPath();
  40404. //刻度线随进度变色
  40405. if (proc > i / len) {
  40406. context.setStrokeStyle(hexToRgb(series[0].color, 1));
  40407. } else {
  40408. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  40409. }
  40410. context.setLineWidth(3 * opts.pix);
  40411. context.moveTo(startX, 0);
  40412. context.lineTo(endX, 0);
  40413. context.stroke();
  40414. context.rotate(childAngle * Math.PI);
  40415. }
  40416. context.restore();
  40417. //## 第三步画进度条
  40418. series = getArcbarDataPoints(series, gaugeOption, process);
  40419. context.setLineWidth(gaugeOption.width);
  40420. context.setStrokeStyle(series[0].color);
  40421. context.setLineCap('round');
  40422. context.beginPath();
  40423. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, series[0]._proportion_ * Math.PI, false);
  40424. context.stroke();
  40425. //## 第四步画指针
  40426. var pointerRadius = radius - gaugeOption.width * 2.5;
  40427. context.save();
  40428. context.translate(centerPosition.x, centerPosition.y);
  40429. context.rotate((series[0]._proportion_ - 1) * Math.PI);
  40430. context.beginPath();
  40431. context.setLineWidth(gaugeOption.width / 3);
  40432. var gradient3 = context.createLinearGradient(0, -pointerRadius * 0.6, 0, pointerRadius * 0.6);
  40433. gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
  40434. gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
  40435. gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
  40436. context.setStrokeStyle(gradient3);
  40437. context.arc(0, 0, pointerRadius, 0.85 * Math.PI, 1.15 * Math.PI, false);
  40438. context.stroke();
  40439. context.beginPath();
  40440. context.setLineWidth(1);
  40441. context.setStrokeStyle(series[0].color);
  40442. context.setFillStyle(series[0].color);
  40443. context.moveTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  40444. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2 - 4, 0);
  40445. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, 4);
  40446. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  40447. context.stroke();
  40448. context.fill();
  40449. context.restore();
  40450. //default百度样式
  40451. } else {
  40452. //画背景
  40453. context.setLineWidth(gaugeOption.width);
  40454. context.setLineCap('butt');
  40455. for (var _i23 = 0; _i23 < categories.length; _i23++) {
  40456. var eachCategories = categories[_i23];
  40457. context.beginPath();
  40458. context.setStrokeStyle(eachCategories.color);
  40459. context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false);
  40460. context.stroke();
  40461. }
  40462. context.save();
  40463. //画刻度线
  40464. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  40465. var _splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  40466. var _childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  40467. var _startX2 = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  40468. var _endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  40469. var childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
  40470. context.translate(centerPosition.x, centerPosition.y);
  40471. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  40472. for (var _i24 = 0; _i24 < gaugeOption.splitLine.splitNumber + 1; _i24++) {
  40473. context.beginPath();
  40474. context.setStrokeStyle(gaugeOption.splitLine.color);
  40475. context.setLineWidth(2 * opts.pix);
  40476. context.moveTo(_startX2, 0);
  40477. context.lineTo(_endX, 0);
  40478. context.stroke();
  40479. context.rotate(_splitAngle * Math.PI);
  40480. }
  40481. context.restore();
  40482. context.save();
  40483. context.translate(centerPosition.x, centerPosition.y);
  40484. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  40485. for (var _i25 = 0; _i25 < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; _i25++) {
  40486. context.beginPath();
  40487. context.setStrokeStyle(gaugeOption.splitLine.color);
  40488. context.setLineWidth(1 * opts.pix);
  40489. context.moveTo(_startX2, 0);
  40490. context.lineTo(childendX, 0);
  40491. context.stroke();
  40492. context.rotate(_childAngle * Math.PI);
  40493. }
  40494. context.restore();
  40495. //画指针
  40496. series = getGaugeDataPoints(series, categories, gaugeOption, process);
  40497. for (var _i26 = 0; _i26 < series.length; _i26++) {
  40498. var eachSeries = series[_i26];
  40499. context.save();
  40500. context.translate(centerPosition.x, centerPosition.y);
  40501. context.rotate((eachSeries._proportion_ - 1) * Math.PI);
  40502. context.beginPath();
  40503. context.setFillStyle(eachSeries.color);
  40504. context.moveTo(gaugeOption.pointer.width, 0);
  40505. context.lineTo(0, -gaugeOption.pointer.width / 2);
  40506. context.lineTo(-innerRadius, 0);
  40507. context.lineTo(0, gaugeOption.pointer.width / 2);
  40508. context.lineTo(gaugeOption.pointer.width, 0);
  40509. context.closePath();
  40510. context.fill();
  40511. context.beginPath();
  40512. context.setFillStyle('#FFFFFF');
  40513. context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
  40514. context.fill();
  40515. context.restore();
  40516. }
  40517. if (opts.dataLabel !== false) {
  40518. drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
  40519. }
  40520. }
  40521. //画仪表盘标题,副标题
  40522. drawRingTitle(opts, config, context, centerPosition);
  40523. if (process === 1 && opts.type === 'gauge') {
  40524. opts.extra.gauge.oldAngle = series[0]._proportion_;
  40525. opts.extra.gauge.oldData = series[0].data;
  40526. }
  40527. return {
  40528. center: centerPosition,
  40529. radius: radius,
  40530. innerRadius: innerRadius,
  40531. categories: categories,
  40532. totalAngle: totalAngle
  40533. };
  40534. }
  40535. function drawRadarDataPoints(series, opts, config, context) {
  40536. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40537. var radarOption = assign({}, {
  40538. gridColor: '#cccccc',
  40539. gridType: 'radar',
  40540. opacity: 0.2,
  40541. gridCount: 3,
  40542. border: false,
  40543. borderWidth: 2
  40544. }, opts.extra.radar);
  40545. var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
  40546. var centerPosition = {
  40547. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  40548. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  40549. };
  40550. var xr = (opts.width - opts.area[1] - opts.area[3]) / 2;
  40551. var yr = (opts.height - opts.area[0] - opts.area[2]) / 2;
  40552. var radius = Math.min(xr - (getMaxTextListLength(opts.categories, config.fontSize, context) + config.radarLabelTextMargin), yr - config.radarLabelTextMargin);
  40553. radius -= config.radarLabelTextMargin * opts.pix;
  40554. // 画分割线
  40555. context.beginPath();
  40556. context.setLineWidth(1 * opts.pix);
  40557. context.setStrokeStyle(radarOption.gridColor);
  40558. coordinateAngle.forEach(function (angle) {
  40559. var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
  40560. context.moveTo(centerPosition.x, centerPosition.y);
  40561. context.lineTo(pos.x, pos.y);
  40562. });
  40563. context.stroke();
  40564. context.closePath();
  40565. // 画背景网格
  40566. var _loop = function _loop(i) {
  40567. var startPos = {};
  40568. context.beginPath();
  40569. context.setLineWidth(1 * opts.pix);
  40570. context.setStrokeStyle(radarOption.gridColor);
  40571. if (radarOption.gridType == 'radar') {
  40572. coordinateAngle.forEach(function (angle, index) {
  40573. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);
  40574. if (index === 0) {
  40575. startPos = pos;
  40576. context.moveTo(pos.x, pos.y);
  40577. } else {
  40578. context.lineTo(pos.x, pos.y);
  40579. }
  40580. });
  40581. context.lineTo(startPos.x, startPos.y);
  40582. } else {
  40583. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(1.5), radius / radarOption.gridCount * i * Math.sin(1.5), centerPosition);
  40584. context.arc(centerPosition.x, centerPosition.y, centerPosition.y - pos.y, 0, 2 * Math.PI, false);
  40585. }
  40586. context.stroke();
  40587. context.closePath();
  40588. };
  40589. for (var i = 1; i <= radarOption.gridCount; i++) {
  40590. _loop(i);
  40591. }
  40592. var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
  40593. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  40594. // 绘制区域数据
  40595. context.beginPath();
  40596. context.setLineWidth(radarOption.borderWidth * opts.pix);
  40597. context.setStrokeStyle(eachSeries.color);
  40598. context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));
  40599. eachSeries.data.forEach(function (item, index) {
  40600. if (index === 0) {
  40601. context.moveTo(item.position.x, item.position.y);
  40602. } else {
  40603. context.lineTo(item.position.x, item.position.y);
  40604. }
  40605. });
  40606. context.closePath();
  40607. context.fill();
  40608. if (radarOption.border === true) {
  40609. context.stroke();
  40610. }
  40611. context.closePath();
  40612. if (opts.dataPointShape !== false) {
  40613. var points = eachSeries.data.map(function (item) {
  40614. return item.position;
  40615. });
  40616. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  40617. }
  40618. });
  40619. // draw label text
  40620. drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
  40621. // draw dataLabel
  40622. if (opts.dataLabel !== false && process === 1) {
  40623. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  40624. context.beginPath();
  40625. var fontSize = eachSeries.textSize * opts.pix || config.fontSize;
  40626. context.setFontSize(fontSize);
  40627. context.setFillStyle(eachSeries.textColor || opts.fontColor);
  40628. eachSeries.data.forEach(function (item, index) {
  40629. //如果是中心点垂直的上下点位
  40630. if (Math.abs(item.position.x - centerPosition.x) < 2) {
  40631. //如果在上面
  40632. if (item.position.y < centerPosition.y) {
  40633. context.setTextAlign('center');
  40634. context.fillText(item.value, item.position.x, item.position.y - 4);
  40635. } else {
  40636. context.setTextAlign('center');
  40637. context.fillText(item.value, item.position.x, item.position.y + fontSize + 2);
  40638. }
  40639. } else {
  40640. //如果在左侧
  40641. if (item.position.x < centerPosition.x) {
  40642. context.setTextAlign('right');
  40643. context.fillText(item.value, item.position.x - 4, item.position.y + fontSize / 2 - 2);
  40644. } else {
  40645. context.setTextAlign('left');
  40646. context.fillText(item.value, item.position.x + 4, item.position.y + fontSize / 2 - 2);
  40647. }
  40648. }
  40649. });
  40650. context.closePath();
  40651. context.stroke();
  40652. });
  40653. context.setTextAlign('left');
  40654. }
  40655. return {
  40656. center: centerPosition,
  40657. radius: radius,
  40658. angleList: coordinateAngle
  40659. };
  40660. }
  40661. function normalInt(min, max, iter) {
  40662. iter = iter == 0 ? 1 : iter;
  40663. var arr = [];
  40664. for (var i = 0; i < iter; i++) {
  40665. arr[i] = Math.random();
  40666. }
  40667. ;
  40668. return Math.floor(arr.reduce(function (i, j) {
  40669. return i + j;
  40670. }) / iter * (max - min)) + min;
  40671. }
  40672. ;
  40673. function collisionNew(area, points, width, height) {
  40674. var isIn = false;
  40675. for (var i = 0; i < points.length; i++) {
  40676. if (points[i].area) {
  40677. if (area[3] < points[i].area[1] || area[0] > points[i].area[2] || area[1] > points[i].area[3] || area[2] < points[i].area[0]) {
  40678. if (area[0] < 0 || area[1] < 0 || area[2] > width || area[3] > height) {
  40679. isIn = true;
  40680. break;
  40681. } else {
  40682. isIn = false;
  40683. }
  40684. } else {
  40685. isIn = true;
  40686. break;
  40687. }
  40688. }
  40689. }
  40690. return isIn;
  40691. }
  40692. ;
  40693. function getBoundingBox(data) {
  40694. var bounds = {},
  40695. coords;
  40696. bounds.xMin = 180;
  40697. bounds.xMax = 0;
  40698. bounds.yMin = 90;
  40699. bounds.yMax = 0;
  40700. for (var i = 0; i < data.length; i++) {
  40701. var coorda = data[i].geometry.coordinates;
  40702. for (var k = 0; k < coorda.length; k++) {
  40703. coords = coorda[k];
  40704. if (coords.length == 1) {
  40705. coords = coords[0];
  40706. }
  40707. for (var j = 0; j < coords.length; j++) {
  40708. var longitude = coords[j][0];
  40709. var latitude = coords[j][1];
  40710. var point = {
  40711. x: longitude,
  40712. y: latitude
  40713. };
  40714. bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
  40715. bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
  40716. bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
  40717. bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
  40718. }
  40719. }
  40720. }
  40721. return bounds;
  40722. }
  40723. function coordinateToPoint(latitude, longitude, bounds, scale, xoffset, yoffset) {
  40724. return {
  40725. x: (longitude - bounds.xMin) * scale + xoffset,
  40726. y: (bounds.yMax - latitude) * scale + yoffset
  40727. };
  40728. }
  40729. function pointToCoordinate(pointY, pointX, bounds, scale, xoffset, yoffset) {
  40730. return {
  40731. x: (pointX - xoffset) / scale + bounds.xMin,
  40732. y: bounds.yMax - (pointY - yoffset) / scale
  40733. };
  40734. }
  40735. function isRayIntersectsSegment(poi, s_poi, e_poi) {
  40736. if (s_poi[1] == e_poi[1]) {
  40737. return false;
  40738. }
  40739. if (s_poi[1] > poi[1] && e_poi[1] > poi[1]) {
  40740. return false;
  40741. }
  40742. if (s_poi[1] < poi[1] && e_poi[1] < poi[1]) {
  40743. return false;
  40744. }
  40745. if (s_poi[1] == poi[1] && e_poi[1] > poi[1]) {
  40746. return false;
  40747. }
  40748. if (e_poi[1] == poi[1] && s_poi[1] > poi[1]) {
  40749. return false;
  40750. }
  40751. if (s_poi[0] < poi[0] && e_poi[1] < poi[1]) {
  40752. return false;
  40753. }
  40754. var xseg = e_poi[0] - (e_poi[0] - s_poi[0]) * (e_poi[1] - poi[1]) / (e_poi[1] - s_poi[1]);
  40755. if (xseg < poi[0]) {
  40756. return false;
  40757. } else {
  40758. return true;
  40759. }
  40760. }
  40761. function isPoiWithinPoly(poi, poly, mercator) {
  40762. var sinsc = 0;
  40763. for (var i = 0; i < poly.length; i++) {
  40764. var epoly = poly[i][0];
  40765. if (poly.length == 1) {
  40766. epoly = poly[i][0];
  40767. }
  40768. for (var j = 0; j < epoly.length - 1; j++) {
  40769. var s_poi = epoly[j];
  40770. var e_poi = epoly[j + 1];
  40771. if (mercator) {
  40772. s_poi = lonlat2mercator(epoly[j][0], epoly[j][1]);
  40773. e_poi = lonlat2mercator(epoly[j + 1][0], epoly[j + 1][1]);
  40774. }
  40775. if (isRayIntersectsSegment(poi, s_poi, e_poi)) {
  40776. sinsc += 1;
  40777. }
  40778. }
  40779. }
  40780. if (sinsc % 2 == 1) {
  40781. return true;
  40782. } else {
  40783. return false;
  40784. }
  40785. }
  40786. function drawMapDataPoints(series, opts, config, context) {
  40787. var mapOption = assign({}, {
  40788. border: true,
  40789. mercator: false,
  40790. borderWidth: 1,
  40791. borderColor: '#666666',
  40792. fillOpacity: 0.6,
  40793. activeBorderColor: '#f04864',
  40794. activeFillColor: '#facc14',
  40795. activeFillOpacity: 1
  40796. }, opts.extra.map);
  40797. var coords, point;
  40798. var data = series;
  40799. var bounds = getBoundingBox(data);
  40800. if (mapOption.mercator) {
  40801. var max = lonlat2mercator(bounds.xMax, bounds.yMax);
  40802. var min = lonlat2mercator(bounds.xMin, bounds.yMin);
  40803. bounds.xMax = max[0];
  40804. bounds.yMax = max[1];
  40805. bounds.xMin = min[0];
  40806. bounds.yMin = min[1];
  40807. }
  40808. var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
  40809. var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
  40810. var scale = xScale < yScale ? xScale : yScale;
  40811. var xoffset = opts.width / 2 - Math.abs(bounds.xMax - bounds.xMin) / 2 * scale;
  40812. var yoffset = opts.height / 2 - Math.abs(bounds.yMax - bounds.yMin) / 2 * scale;
  40813. for (var i = 0; i < data.length; i++) {
  40814. context.beginPath();
  40815. context.setLineWidth(mapOption.borderWidth * opts.pix);
  40816. context.setStrokeStyle(mapOption.borderColor);
  40817. context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));
  40818. if (opts.tooltip) {
  40819. if (opts.tooltip.index == i) {
  40820. context.setStrokeStyle(mapOption.activeBorderColor);
  40821. context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
  40822. }
  40823. }
  40824. var coorda = data[i].geometry.coordinates;
  40825. for (var k = 0; k < coorda.length; k++) {
  40826. coords = coorda[k];
  40827. if (coords.length == 1) {
  40828. coords = coords[0];
  40829. }
  40830. for (var j = 0; j < coords.length; j++) {
  40831. var gaosi = Array(2);
  40832. if (mapOption.mercator) {
  40833. gaosi = lonlat2mercator(coords[j][0], coords[j][1]);
  40834. } else {
  40835. gaosi = coords[j];
  40836. }
  40837. point = coordinateToPoint(gaosi[1], gaosi[0], bounds, scale, xoffset, yoffset);
  40838. if (j === 0) {
  40839. context.beginPath();
  40840. context.moveTo(point.x, point.y);
  40841. } else {
  40842. context.lineTo(point.x, point.y);
  40843. }
  40844. }
  40845. context.fill();
  40846. if (mapOption.border == true) {
  40847. context.stroke();
  40848. }
  40849. }
  40850. if (opts.dataLabel == true) {
  40851. var centerPoint = data[i].properties.centroid;
  40852. if (centerPoint) {
  40853. if (mapOption.mercator) {
  40854. centerPoint = lonlat2mercator(data[i].properties.centroid[0], data[i].properties.centroid[1]);
  40855. }
  40856. point = coordinateToPoint(centerPoint[1], centerPoint[0], bounds, scale, xoffset, yoffset);
  40857. var fontSize = data[i].textSize * opts.pix || config.fontSize;
  40858. var text = data[i].properties.name;
  40859. context.beginPath();
  40860. context.setFontSize(fontSize);
  40861. context.setFillStyle(data[i].textColor || opts.fontColor);
  40862. context.fillText(text, point.x - measureText(text, fontSize, context) / 2, point.y + fontSize / 2);
  40863. context.closePath();
  40864. context.stroke();
  40865. }
  40866. }
  40867. }
  40868. opts.chartData.mapData = {
  40869. bounds: bounds,
  40870. scale: scale,
  40871. xoffset: xoffset,
  40872. yoffset: yoffset,
  40873. mercator: mapOption.mercator
  40874. };
  40875. drawToolTipBridge(opts, config, context, 1);
  40876. context.draw();
  40877. }
  40878. function getWordCloudPoint(opts, type, context) {
  40879. var points = opts.series;
  40880. switch (type) {
  40881. case 'normal':
  40882. for (var i = 0; i < points.length; i++) {
  40883. var text = points[i].name;
  40884. var tHeight = points[i].textSize * opts.pix;
  40885. var tWidth = measureText(text, tHeight, context);
  40886. var x = void 0,
  40887. y = void 0;
  40888. var area = void 0;
  40889. var breaknum = 0;
  40890. while (true) {
  40891. breaknum++;
  40892. x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
  40893. y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
  40894. area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 + opts.height / 2];
  40895. var isCollision = collisionNew(area, points, opts.width, opts.height);
  40896. if (!isCollision) break;
  40897. if (breaknum == 1000) {
  40898. area = [-100, -100, -100, -100];
  40899. break;
  40900. }
  40901. }
  40902. ;
  40903. points[i].area = area;
  40904. }
  40905. break;
  40906. case 'vertical':
  40907. var Spin = function Spin() {
  40908. //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
  40909. if (Math.random() > 0.7) {
  40910. return true;
  40911. } else {
  40912. return false;
  40913. }
  40914. ;
  40915. };
  40916. ;
  40917. for (var _i27 = 0; _i27 < points.length; _i27++) {
  40918. var _text = points[_i27].name;
  40919. var _tHeight = points[_i27].textSize * opts.pix;
  40920. var _tWidth = measureText(_text, _tHeight, context);
  40921. var isSpin = Spin();
  40922. var _x = void 0,
  40923. _y = void 0,
  40924. _area = void 0,
  40925. areav = void 0;
  40926. var _breaknum = 0;
  40927. while (true) {
  40928. _breaknum++;
  40929. var _isCollision = void 0;
  40930. if (isSpin) {
  40931. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  40932. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  40933. _area = [_y - 5 - _tWidth + opts.width / 2, -_x - 5 + opts.height / 2, _y + 5 + opts.width / 2, -_x + _tHeight + 5 + opts.height / 2];
  40934. areav = [opts.width - (opts.width / 2 - opts.height / 2) - (-_x + _tHeight + 5 + opts.height / 2) - 5, opts.height / 2 - opts.width / 2 + (_y - 5 - _tWidth + opts.width / 2) - 5, opts.width - (opts.width / 2 - opts.height / 2) - (-_x + _tHeight + 5 + opts.height / 2) + _tHeight, opts.height / 2 - opts.width / 2 + (_y - 5 - _tWidth + opts.width / 2) + _tWidth + 5];
  40935. _isCollision = collisionNew(areav, points, opts.height, opts.width);
  40936. } else {
  40937. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  40938. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  40939. _area = [_x - 5 + opts.width / 2, _y - 5 - _tHeight + opts.height / 2, _x + _tWidth + 5 + opts.width / 2, _y + 5 + opts.height / 2];
  40940. _isCollision = collisionNew(_area, points, opts.width, opts.height);
  40941. }
  40942. if (!_isCollision) break;
  40943. if (_breaknum == 1000) {
  40944. _area = [-1000, -1000, -1000, -1000];
  40945. break;
  40946. }
  40947. }
  40948. ;
  40949. if (isSpin) {
  40950. points[_i27].area = areav;
  40951. points[_i27].areav = _area;
  40952. } else {
  40953. points[_i27].area = _area;
  40954. }
  40955. points[_i27].rotate = isSpin;
  40956. }
  40957. ;
  40958. break;
  40959. }
  40960. return points;
  40961. }
  40962. function drawWordCloudDataPoints(series, opts, config, context) {
  40963. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40964. var wordOption = assign({}, {
  40965. type: 'normal',
  40966. autoColors: true
  40967. }, opts.extra.word);
  40968. if (!opts.chartData.wordCloudData) {
  40969. opts.chartData.wordCloudData = getWordCloudPoint(opts, wordOption.type, context);
  40970. }
  40971. context.beginPath();
  40972. context.setFillStyle(opts.background);
  40973. context.rect(0, 0, opts.width, opts.height);
  40974. context.fill();
  40975. context.save();
  40976. var points = opts.chartData.wordCloudData;
  40977. context.translate(opts.width / 2, opts.height / 2);
  40978. for (var i = 0; i < points.length; i++) {
  40979. context.save();
  40980. if (points[i].rotate) {
  40981. context.rotate(90 * Math.PI / 180);
  40982. }
  40983. var text = points[i].name;
  40984. var tHeight = points[i].textSize * opts.pix;
  40985. var tWidth = measureText(text, tHeight, context);
  40986. context.beginPath();
  40987. context.setStrokeStyle(points[i].color);
  40988. context.setFillStyle(points[i].color);
  40989. context.setFontSize(tHeight);
  40990. if (points[i].rotate) {
  40991. if (points[i].areav[0] > 0) {
  40992. if (opts.tooltip) {
  40993. if (opts.tooltip.index == i) {
  40994. context.strokeText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  40995. } else {
  40996. context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  40997. }
  40998. } else {
  40999. context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  41000. }
  41001. }
  41002. } else {
  41003. if (points[i].area[0] > 0) {
  41004. if (opts.tooltip) {
  41005. if (opts.tooltip.index == i) {
  41006. context.strokeText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  41007. } else {
  41008. context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  41009. }
  41010. } else {
  41011. context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  41012. }
  41013. }
  41014. }
  41015. context.stroke();
  41016. context.restore();
  41017. }
  41018. context.restore();
  41019. }
  41020. function drawFunnelDataPoints(series, opts, config, context) {
  41021. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  41022. var funnelOption = assign({}, {
  41023. type: 'funnel',
  41024. activeWidth: 10,
  41025. activeOpacity: 0.3,
  41026. border: false,
  41027. borderWidth: 2,
  41028. borderColor: '#FFFFFF',
  41029. fillOpacity: 1,
  41030. labelAlign: 'right',
  41031. linearType: 'none',
  41032. customColor: []
  41033. }, opts.extra.funnel);
  41034. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / series.length;
  41035. var centerPosition = {
  41036. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  41037. y: opts.height - opts.area[2]
  41038. };
  41039. var activeWidth = funnelOption.activeWidth * opts.pix;
  41040. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
  41041. series = getFunnelDataPoints(series, radius, funnelOption.type, eachSpacing, process);
  41042. context.save();
  41043. context.translate(centerPosition.x, centerPosition.y);
  41044. funnelOption.customColor = fillCustomColor(funnelOption.linearType, funnelOption.customColor, series, config);
  41045. if (funnelOption.type == 'pyramid') {
  41046. for (var i = 0; i < series.length; i++) {
  41047. if (i == series.length - 1) {
  41048. if (opts.tooltip) {
  41049. if (opts.tooltip.index == i) {
  41050. context.beginPath();
  41051. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  41052. context.moveTo(-activeWidth, -eachSpacing);
  41053. context.lineTo(-series[i].radius - activeWidth, 0);
  41054. context.lineTo(series[i].radius + activeWidth, 0);
  41055. context.lineTo(activeWidth, -eachSpacing);
  41056. context.lineTo(-activeWidth, -eachSpacing);
  41057. context.closePath();
  41058. context.fill();
  41059. }
  41060. }
  41061. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  41062. context.beginPath();
  41063. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  41064. context.setStrokeStyle(funnelOption.borderColor);
  41065. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  41066. if (funnelOption.linearType == 'custom') {
  41067. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  41068. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  41069. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  41070. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  41071. fillColor = grd;
  41072. }
  41073. context.setFillStyle(fillColor);
  41074. context.moveTo(0, -eachSpacing);
  41075. context.lineTo(-series[i].radius, 0);
  41076. context.lineTo(series[i].radius, 0);
  41077. context.lineTo(0, -eachSpacing);
  41078. context.closePath();
  41079. context.fill();
  41080. if (funnelOption.border == true) {
  41081. context.stroke();
  41082. }
  41083. } else {
  41084. if (opts.tooltip) {
  41085. if (opts.tooltip.index == i) {
  41086. context.beginPath();
  41087. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  41088. context.moveTo(0, 0);
  41089. context.lineTo(-series[i].radius - activeWidth, 0);
  41090. context.lineTo(-series[i + 1].radius - activeWidth, -eachSpacing);
  41091. context.lineTo(series[i + 1].radius + activeWidth, -eachSpacing);
  41092. context.lineTo(series[i].radius + activeWidth, 0);
  41093. context.lineTo(0, 0);
  41094. context.closePath();
  41095. context.fill();
  41096. }
  41097. }
  41098. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  41099. context.beginPath();
  41100. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  41101. context.setStrokeStyle(funnelOption.borderColor);
  41102. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  41103. if (funnelOption.linearType == 'custom') {
  41104. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  41105. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  41106. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  41107. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  41108. fillColor = grd;
  41109. }
  41110. context.setFillStyle(fillColor);
  41111. context.moveTo(0, 0);
  41112. context.lineTo(-series[i].radius, 0);
  41113. context.lineTo(-series[i + 1].radius, -eachSpacing);
  41114. context.lineTo(series[i + 1].radius, -eachSpacing);
  41115. context.lineTo(series[i].radius, 0);
  41116. context.lineTo(0, 0);
  41117. context.closePath();
  41118. context.fill();
  41119. if (funnelOption.border == true) {
  41120. context.stroke();
  41121. }
  41122. }
  41123. context.translate(0, -eachSpacing);
  41124. }
  41125. } else {
  41126. for (var _i28 = 0; _i28 < series.length; _i28++) {
  41127. if (_i28 == 0) {
  41128. if (opts.tooltip) {
  41129. if (opts.tooltip.index == _i28) {
  41130. context.beginPath();
  41131. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  41132. context.moveTo(-activeWidth, 0);
  41133. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  41134. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  41135. context.lineTo(activeWidth, 0);
  41136. context.lineTo(-activeWidth, 0);
  41137. context.closePath();
  41138. context.fill();
  41139. }
  41140. }
  41141. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing, centerPosition.x + series[_i28].radius, centerPosition.y];
  41142. context.beginPath();
  41143. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  41144. context.setStrokeStyle(funnelOption.borderColor);
  41145. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  41146. if (funnelOption.linearType == 'custom') {
  41147. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  41148. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  41149. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  41150. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  41151. fillColor = grd;
  41152. }
  41153. context.setFillStyle(fillColor);
  41154. context.moveTo(0, 0);
  41155. context.lineTo(-series[_i28].radius, -eachSpacing);
  41156. context.lineTo(series[_i28].radius, -eachSpacing);
  41157. context.lineTo(0, 0);
  41158. context.closePath();
  41159. context.fill();
  41160. if (funnelOption.border == true) {
  41161. context.stroke();
  41162. }
  41163. } else {
  41164. if (opts.tooltip) {
  41165. if (opts.tooltip.index == _i28) {
  41166. context.beginPath();
  41167. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  41168. context.moveTo(0, 0);
  41169. context.lineTo(-series[_i28 - 1].radius - activeWidth, 0);
  41170. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  41171. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  41172. context.lineTo(series[_i28 - 1].radius + activeWidth, 0);
  41173. context.lineTo(0, 0);
  41174. context.closePath();
  41175. context.fill();
  41176. }
  41177. }
  41178. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing * (_i28 + 1), centerPosition.x + series[_i28].radius, centerPosition.y - eachSpacing * _i28];
  41179. context.beginPath();
  41180. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  41181. context.setStrokeStyle(funnelOption.borderColor);
  41182. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  41183. if (funnelOption.linearType == 'custom') {
  41184. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  41185. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  41186. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  41187. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  41188. fillColor = grd;
  41189. }
  41190. context.setFillStyle(fillColor);
  41191. context.moveTo(0, 0);
  41192. context.lineTo(-series[_i28 - 1].radius, 0);
  41193. context.lineTo(-series[_i28].radius, -eachSpacing);
  41194. context.lineTo(series[_i28].radius, -eachSpacing);
  41195. context.lineTo(series[_i28 - 1].radius, 0);
  41196. context.lineTo(0, 0);
  41197. context.closePath();
  41198. context.fill();
  41199. if (funnelOption.border == true) {
  41200. context.stroke();
  41201. }
  41202. }
  41203. context.translate(0, -eachSpacing);
  41204. }
  41205. }
  41206. context.restore();
  41207. if (opts.dataLabel !== false && process === 1) {
  41208. drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
  41209. }
  41210. return {
  41211. center: centerPosition,
  41212. radius: radius,
  41213. series: series
  41214. };
  41215. }
  41216. function drawFunnelText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
  41217. for (var i = 0; i < series.length; i++) {
  41218. var item = series[i];
  41219. var startX = void 0,
  41220. endX = void 0,
  41221. startY = void 0,
  41222. fontSize = void 0;
  41223. var text = item.formatter ? item.formatter(item, i, series) : util.toFixed(item._proportion_ * 100) + '%';
  41224. if (labelAlign == 'right') {
  41225. if (opts.extra.funnel.type === 'pyramid') {
  41226. if (i == series.length - 1) {
  41227. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  41228. } else {
  41229. startX = (item.funnelArea[2] + series[i + 1].funnelArea[2]) / 2;
  41230. }
  41231. } else {
  41232. if (i == 0) {
  41233. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  41234. } else {
  41235. startX = (item.funnelArea[2] + series[i - 1].funnelArea[2]) / 2;
  41236. }
  41237. }
  41238. endX = startX + activeWidth * 2;
  41239. startY = item.funnelArea[1] + eachSpacing / 2;
  41240. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  41241. context.setLineWidth(1 * opts.pix);
  41242. context.setStrokeStyle(item.color);
  41243. context.setFillStyle(item.color);
  41244. context.beginPath();
  41245. context.moveTo(startX, startY);
  41246. context.lineTo(endX, startY);
  41247. context.stroke();
  41248. context.closePath();
  41249. context.beginPath();
  41250. context.moveTo(endX, startY);
  41251. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  41252. context.closePath();
  41253. context.fill();
  41254. context.beginPath();
  41255. context.setFontSize(fontSize);
  41256. context.setFillStyle(item.textColor || opts.fontColor);
  41257. context.fillText(text, endX + 5, startY + fontSize / 2 - 2);
  41258. context.closePath();
  41259. context.stroke();
  41260. context.closePath();
  41261. } else {
  41262. if (opts.extra.funnel.type === 'pyramid') {
  41263. if (i == series.length - 1) {
  41264. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  41265. } else {
  41266. startX = (item.funnelArea[0] + series[i + 1].funnelArea[0]) / 2;
  41267. }
  41268. } else {
  41269. if (i == 0) {
  41270. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  41271. } else {
  41272. startX = (item.funnelArea[0] + series[i - 1].funnelArea[0]) / 2;
  41273. }
  41274. }
  41275. endX = startX - activeWidth * 2;
  41276. startY = item.funnelArea[1] + eachSpacing / 2;
  41277. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  41278. context.setLineWidth(1 * opts.pix);
  41279. context.setStrokeStyle(item.color);
  41280. context.setFillStyle(item.color);
  41281. context.beginPath();
  41282. context.moveTo(startX, startY);
  41283. context.lineTo(endX, startY);
  41284. context.stroke();
  41285. context.closePath();
  41286. context.beginPath();
  41287. context.moveTo(endX, startY);
  41288. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  41289. context.closePath();
  41290. context.fill();
  41291. context.beginPath();
  41292. context.setFontSize(fontSize);
  41293. context.setFillStyle(item.textColor || opts.fontColor);
  41294. context.fillText(text, endX - 5 - measureText(text, fontSize, context), startY + fontSize / 2 - 2);
  41295. context.closePath();
  41296. context.stroke();
  41297. context.closePath();
  41298. }
  41299. }
  41300. }
  41301. function drawCanvas(opts, context) {
  41302. context.draw();
  41303. }
  41304. var Timing = {
  41305. easeIn: function easeIn(pos) {
  41306. return Math.pow(pos, 3);
  41307. },
  41308. easeOut: function easeOut(pos) {
  41309. return Math.pow(pos - 1, 3) + 1;
  41310. },
  41311. easeInOut: function easeInOut(pos) {
  41312. if ((pos /= 0.5) < 1) {
  41313. return 0.5 * Math.pow(pos, 3);
  41314. } else {
  41315. return 0.5 * (Math.pow(pos - 2, 3) + 2);
  41316. }
  41317. },
  41318. linear: function linear(pos) {
  41319. return pos;
  41320. }
  41321. };
  41322. function Animation(opts) {
  41323. this.isStop = false;
  41324. opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
  41325. opts.timing = opts.timing || 'easeInOut';
  41326. var delay = 17;
  41327. function createAnimationFrame() {
  41328. if (typeof setTimeout !== 'undefined') {
  41329. return function (step, delay) {
  41330. setTimeout(function () {
  41331. var timeStamp = +new Date();
  41332. step(timeStamp);
  41333. }, delay);
  41334. };
  41335. } else if (typeof requestAnimationFrame !== 'undefined') {
  41336. return requestAnimationFrame;
  41337. } else {
  41338. return function (step) {
  41339. step(null);
  41340. };
  41341. }
  41342. }
  41343. ;
  41344. var animationFrame = createAnimationFrame();
  41345. var startTimeStamp = null;
  41346. var _step = function step(timestamp) {
  41347. if (timestamp === null || this.isStop === true) {
  41348. opts.onProcess && opts.onProcess(1);
  41349. opts.onAnimationFinish && opts.onAnimationFinish();
  41350. return;
  41351. }
  41352. if (startTimeStamp === null) {
  41353. startTimeStamp = timestamp;
  41354. }
  41355. if (timestamp - startTimeStamp < opts.duration) {
  41356. var process = (timestamp - startTimeStamp) / opts.duration;
  41357. var timingFunction = Timing[opts.timing];
  41358. process = timingFunction(process);
  41359. opts.onProcess && opts.onProcess(process);
  41360. animationFrame(_step, delay);
  41361. } else {
  41362. opts.onProcess && opts.onProcess(1);
  41363. opts.onAnimationFinish && opts.onAnimationFinish();
  41364. }
  41365. };
  41366. _step = _step.bind(this);
  41367. animationFrame(_step, delay);
  41368. }
  41369. Animation.prototype.stop = function () {
  41370. this.isStop = true;
  41371. };
  41372. function drawCharts(type, opts, config, context) {
  41373. var _this = this;
  41374. var series = opts.series;
  41375. //兼容ECharts饼图类数据格式
  41376. if (type === 'pie' || type === 'ring' || type === 'rose' || type === 'funnel') {
  41377. series = fixPieSeries(series, opts, config);
  41378. }
  41379. var categories = opts.categories;
  41380. series = fillSeries(series, opts, config);
  41381. var duration = opts.animation ? opts.duration : 0;
  41382. _this.animationInstance && _this.animationInstance.stop();
  41383. var seriesMA = null;
  41384. if (type == 'candle') {
  41385. var average = assign({}, opts.extra.candle.average);
  41386. if (average.show) {
  41387. seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
  41388. seriesMA = fillSeries(seriesMA, opts, config);
  41389. opts.seriesMA = seriesMA;
  41390. } else if (opts.seriesMA) {
  41391. seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
  41392. } else {
  41393. seriesMA = series;
  41394. }
  41395. } else {
  41396. seriesMA = series;
  41397. }
  41398. /* 过滤掉show=false的series */
  41399. opts._series_ = series = filterSeries(series);
  41400. //重新计算图表区域
  41401. opts.area = new Array(4);
  41402. //复位绘图区域
  41403. for (var j = 0; j < 4; j++) {
  41404. opts.area[j] = opts.padding[j] * opts.pix;
  41405. }
  41406. //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
  41407. var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData, context),
  41408. legendHeight = _calLegendData.area.wholeHeight,
  41409. legendWidth = _calLegendData.area.wholeWidth;
  41410. switch (opts.legend.position) {
  41411. case 'top':
  41412. opts.area[0] += legendHeight;
  41413. break;
  41414. case 'bottom':
  41415. opts.area[2] += legendHeight;
  41416. break;
  41417. case 'left':
  41418. opts.area[3] += legendWidth;
  41419. break;
  41420. case 'right':
  41421. opts.area[1] += legendWidth;
  41422. break;
  41423. }
  41424. var _calYAxisData = {},
  41425. yAxisWidth = 0;
  41426. if (opts.type === 'line' || opts.type === 'column' || opts.type === 'area' || opts.type === 'mix' || opts.type === 'candle' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
  41427. _calYAxisData = calYAxisData(series, opts, config, context);
  41428. yAxisWidth = _calYAxisData.yAxisWidth;
  41429. //如果显示Y轴标题
  41430. if (opts.yAxis.showTitle) {
  41431. var maxTitleHeight = 0;
  41432. for (var i = 0; i < opts.yAxis.data.length; i++) {
  41433. maxTitleHeight = Math.max(maxTitleHeight, opts.yAxis.data[i].titleFontSize ? opts.yAxis.data[i].titleFontSize * opts.pix : config.fontSize);
  41434. }
  41435. opts.area[0] += maxTitleHeight;
  41436. }
  41437. var rightIndex = 0,
  41438. leftIndex = 0;
  41439. //计算主绘图区域左右位置
  41440. for (var _i29 = 0; _i29 < yAxisWidth.length; _i29++) {
  41441. if (yAxisWidth[_i29].position == 'left') {
  41442. if (leftIndex > 0) {
  41443. opts.area[3] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  41444. } else {
  41445. opts.area[3] += yAxisWidth[_i29].width;
  41446. }
  41447. leftIndex += 1;
  41448. } else if (yAxisWidth[_i29].position == 'right') {
  41449. if (rightIndex > 0) {
  41450. opts.area[1] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  41451. } else {
  41452. opts.area[1] += yAxisWidth[_i29].width;
  41453. }
  41454. rightIndex += 1;
  41455. }
  41456. }
  41457. } else {
  41458. config.yAxisWidth = yAxisWidth;
  41459. }
  41460. opts.chartData.yAxisData = _calYAxisData;
  41461. if (opts.categories && opts.categories.length && opts.type !== 'radar' && opts.type !== 'gauge' && opts.type !== 'bar') {
  41462. opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
  41463. var _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  41464. xAxisHeight = _calCategoriesData.xAxisHeight,
  41465. angle = _calCategoriesData.angle;
  41466. config.xAxisHeight = xAxisHeight;
  41467. config._xAxisTextAngle_ = angle;
  41468. opts.area[2] += xAxisHeight;
  41469. opts.chartData.categoriesData = _calCategoriesData;
  41470. } else {
  41471. if (opts.type === 'line' || opts.type === 'area' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
  41472. opts.chartData.xAxisData = calXAxisData(series, opts, config, context);
  41473. categories = opts.chartData.xAxisData.rangesFormat;
  41474. var _calCategoriesData2 = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  41475. _xAxisHeight = _calCategoriesData2.xAxisHeight,
  41476. _angle = _calCategoriesData2.angle;
  41477. config.xAxisHeight = _xAxisHeight;
  41478. config._xAxisTextAngle_ = _angle;
  41479. opts.area[2] += _xAxisHeight;
  41480. opts.chartData.categoriesData = _calCategoriesData2;
  41481. } else {
  41482. opts.chartData.xAxisData = {
  41483. xAxisPoints: []
  41484. };
  41485. }
  41486. }
  41487. //计算右对齐偏移距离
  41488. if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
  41489. var offsetLeft = 0,
  41490. xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  41491. startX = opts.chartData.xAxisData.startX,
  41492. endX = opts.chartData.xAxisData.endX,
  41493. eachSpacing = opts.chartData.xAxisData.eachSpacing;
  41494. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  41495. var screenWidth = endX - startX;
  41496. offsetLeft = screenWidth - totalWidth;
  41497. _this.scrollOption = {
  41498. currentOffset: offsetLeft,
  41499. startTouchX: offsetLeft,
  41500. distance: 0,
  41501. lastMoveTime: 0
  41502. };
  41503. opts._scrollDistance_ = offsetLeft;
  41504. }
  41505. if (type === 'pie' || type === 'ring' || type === 'rose') {
  41506. config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA, config, context, opts);
  41507. }
  41508. switch (type) {
  41509. case 'word':
  41510. this.animationInstance = new Animation({
  41511. timing: opts.timing,
  41512. duration: duration,
  41513. onProcess: function onProcess(process) {
  41514. context.clearRect(0, 0, opts.width, opts.height);
  41515. if (opts.rotate) {
  41516. contextRotate(context, opts);
  41517. }
  41518. drawWordCloudDataPoints(series, opts, config, context, process);
  41519. drawCanvas(opts, context);
  41520. },
  41521. onAnimationFinish: function onAnimationFinish() {
  41522. _this.uevent.trigger('renderComplete');
  41523. }
  41524. });
  41525. break;
  41526. case 'map':
  41527. context.clearRect(0, 0, opts.width, opts.height);
  41528. drawMapDataPoints(series, opts, config, context);
  41529. break;
  41530. case 'funnel':
  41531. this.animationInstance = new Animation({
  41532. timing: opts.timing,
  41533. duration: duration,
  41534. onProcess: function onProcess(process) {
  41535. context.clearRect(0, 0, opts.width, opts.height);
  41536. if (opts.rotate) {
  41537. contextRotate(context, opts);
  41538. }
  41539. opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
  41540. drawLegend(opts.series, opts, config, context, opts.chartData);
  41541. drawToolTipBridge(opts, config, context, process);
  41542. drawCanvas(opts, context);
  41543. },
  41544. onAnimationFinish: function onAnimationFinish() {
  41545. _this.uevent.trigger('renderComplete');
  41546. }
  41547. });
  41548. break;
  41549. case 'line':
  41550. this.animationInstance = new Animation({
  41551. timing: opts.timing,
  41552. duration: duration,
  41553. onProcess: function onProcess(process) {
  41554. context.clearRect(0, 0, opts.width, opts.height);
  41555. if (opts.rotate) {
  41556. contextRotate(context, opts);
  41557. }
  41558. drawYAxisGrid(categories, opts, config, context);
  41559. drawXAxis(categories, opts, config, context);
  41560. var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
  41561. xAxisPoints = _drawLineDataPoints.xAxisPoints,
  41562. calPoints = _drawLineDataPoints.calPoints,
  41563. eachSpacing = _drawLineDataPoints.eachSpacing;
  41564. opts.chartData.xAxisPoints = xAxisPoints;
  41565. opts.chartData.calPoints = calPoints;
  41566. opts.chartData.eachSpacing = eachSpacing;
  41567. drawYAxis(series, opts, config, context);
  41568. if (opts.enableMarkLine !== false && process === 1) {
  41569. drawMarkLine(opts, config, context);
  41570. }
  41571. drawLegend(opts.series, opts, config, context, opts.chartData);
  41572. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41573. drawCanvas(opts, context);
  41574. },
  41575. onAnimationFinish: function onAnimationFinish() {
  41576. _this.uevent.trigger('renderComplete');
  41577. }
  41578. });
  41579. break;
  41580. case 'scatter':
  41581. this.animationInstance = new Animation({
  41582. timing: opts.timing,
  41583. duration: duration,
  41584. onProcess: function onProcess(process) {
  41585. context.clearRect(0, 0, opts.width, opts.height);
  41586. if (opts.rotate) {
  41587. contextRotate(context, opts);
  41588. }
  41589. drawYAxisGrid(categories, opts, config, context);
  41590. drawXAxis(categories, opts, config, context);
  41591. var _drawScatterDataPoints = drawScatterDataPoints(series, opts, config, context, process),
  41592. xAxisPoints = _drawScatterDataPoints.xAxisPoints,
  41593. calPoints = _drawScatterDataPoints.calPoints,
  41594. eachSpacing = _drawScatterDataPoints.eachSpacing;
  41595. opts.chartData.xAxisPoints = xAxisPoints;
  41596. opts.chartData.calPoints = calPoints;
  41597. opts.chartData.eachSpacing = eachSpacing;
  41598. drawYAxis(series, opts, config, context);
  41599. if (opts.enableMarkLine !== false && process === 1) {
  41600. drawMarkLine(opts, config, context);
  41601. }
  41602. drawLegend(opts.series, opts, config, context, opts.chartData);
  41603. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41604. drawCanvas(opts, context);
  41605. },
  41606. onAnimationFinish: function onAnimationFinish() {
  41607. _this.uevent.trigger('renderComplete');
  41608. }
  41609. });
  41610. break;
  41611. case 'bubble':
  41612. this.animationInstance = new Animation({
  41613. timing: opts.timing,
  41614. duration: duration,
  41615. onProcess: function onProcess(process) {
  41616. context.clearRect(0, 0, opts.width, opts.height);
  41617. if (opts.rotate) {
  41618. contextRotate(context, opts);
  41619. }
  41620. drawYAxisGrid(categories, opts, config, context);
  41621. drawXAxis(categories, opts, config, context);
  41622. var _drawBubbleDataPoints = drawBubbleDataPoints(series, opts, config, context, process),
  41623. xAxisPoints = _drawBubbleDataPoints.xAxisPoints,
  41624. calPoints = _drawBubbleDataPoints.calPoints,
  41625. eachSpacing = _drawBubbleDataPoints.eachSpacing;
  41626. opts.chartData.xAxisPoints = xAxisPoints;
  41627. opts.chartData.calPoints = calPoints;
  41628. opts.chartData.eachSpacing = eachSpacing;
  41629. drawYAxis(series, opts, config, context);
  41630. if (opts.enableMarkLine !== false && process === 1) {
  41631. drawMarkLine(opts, config, context);
  41632. }
  41633. drawLegend(opts.series, opts, config, context, opts.chartData);
  41634. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41635. drawCanvas(opts, context);
  41636. },
  41637. onAnimationFinish: function onAnimationFinish() {
  41638. _this.uevent.trigger('renderComplete');
  41639. }
  41640. });
  41641. break;
  41642. case 'mix':
  41643. this.animationInstance = new Animation({
  41644. timing: opts.timing,
  41645. duration: duration,
  41646. onProcess: function onProcess(process) {
  41647. context.clearRect(0, 0, opts.width, opts.height);
  41648. if (opts.rotate) {
  41649. contextRotate(context, opts);
  41650. }
  41651. drawYAxisGrid(categories, opts, config, context);
  41652. drawXAxis(categories, opts, config, context);
  41653. var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
  41654. xAxisPoints = _drawMixDataPoints.xAxisPoints,
  41655. calPoints = _drawMixDataPoints.calPoints,
  41656. eachSpacing = _drawMixDataPoints.eachSpacing;
  41657. opts.chartData.xAxisPoints = xAxisPoints;
  41658. opts.chartData.calPoints = calPoints;
  41659. opts.chartData.eachSpacing = eachSpacing;
  41660. drawYAxis(series, opts, config, context);
  41661. if (opts.enableMarkLine !== false && process === 1) {
  41662. drawMarkLine(opts, config, context);
  41663. }
  41664. drawLegend(opts.series, opts, config, context, opts.chartData);
  41665. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41666. drawCanvas(opts, context);
  41667. },
  41668. onAnimationFinish: function onAnimationFinish() {
  41669. _this.uevent.trigger('renderComplete');
  41670. }
  41671. });
  41672. break;
  41673. case 'column':
  41674. this.animationInstance = new Animation({
  41675. timing: opts.timing,
  41676. duration: duration,
  41677. onProcess: function onProcess(process) {
  41678. context.clearRect(0, 0, opts.width, opts.height);
  41679. if (opts.rotate) {
  41680. contextRotate(context, opts);
  41681. }
  41682. drawYAxisGrid(categories, opts, config, context);
  41683. drawXAxis(categories, opts, config, context);
  41684. var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
  41685. xAxisPoints = _drawColumnDataPoints.xAxisPoints,
  41686. calPoints = _drawColumnDataPoints.calPoints,
  41687. eachSpacing = _drawColumnDataPoints.eachSpacing;
  41688. opts.chartData.xAxisPoints = xAxisPoints;
  41689. opts.chartData.calPoints = calPoints;
  41690. opts.chartData.eachSpacing = eachSpacing;
  41691. drawYAxis(series, opts, config, context);
  41692. if (opts.enableMarkLine !== false && process === 1) {
  41693. drawMarkLine(opts, config, context);
  41694. }
  41695. drawLegend(opts.series, opts, config, context, opts.chartData);
  41696. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41697. drawCanvas(opts, context);
  41698. },
  41699. onAnimationFinish: function onAnimationFinish() {
  41700. _this.uevent.trigger('renderComplete');
  41701. }
  41702. });
  41703. break;
  41704. case 'bar':
  41705. this.animationInstance = new Animation({
  41706. timing: opts.timing,
  41707. duration: duration,
  41708. onProcess: function onProcess(process) {
  41709. context.clearRect(0, 0, opts.width, opts.height);
  41710. if (opts.rotate) {
  41711. contextRotate(context, opts);
  41712. }
  41713. drawXAxis(categories, opts, config, context);
  41714. var _drawBarDataPoints = drawBarDataPoints(series, opts, config, context, process),
  41715. yAxisPoints = _drawBarDataPoints.yAxisPoints,
  41716. calPoints = _drawBarDataPoints.calPoints,
  41717. eachSpacing = _drawBarDataPoints.eachSpacing;
  41718. opts.chartData.yAxisPoints = yAxisPoints;
  41719. opts.chartData.xAxisPoints = opts.chartData.xAxisData.xAxisPoints;
  41720. opts.chartData.calPoints = calPoints;
  41721. opts.chartData.eachSpacing = eachSpacing;
  41722. drawYAxis(series, opts, config, context);
  41723. if (opts.enableMarkLine !== false && process === 1) {
  41724. drawMarkLine(opts, config, context);
  41725. }
  41726. drawLegend(opts.series, opts, config, context, opts.chartData);
  41727. drawToolTipBridge(opts, config, context, process, eachSpacing, yAxisPoints);
  41728. drawCanvas(opts, context);
  41729. },
  41730. onAnimationFinish: function onAnimationFinish() {
  41731. _this.uevent.trigger('renderComplete');
  41732. }
  41733. });
  41734. break;
  41735. case 'area':
  41736. this.animationInstance = new Animation({
  41737. timing: opts.timing,
  41738. duration: duration,
  41739. onProcess: function onProcess(process) {
  41740. context.clearRect(0, 0, opts.width, opts.height);
  41741. if (opts.rotate) {
  41742. contextRotate(context, opts);
  41743. }
  41744. drawYAxisGrid(categories, opts, config, context);
  41745. drawXAxis(categories, opts, config, context);
  41746. var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
  41747. xAxisPoints = _drawAreaDataPoints.xAxisPoints,
  41748. calPoints = _drawAreaDataPoints.calPoints,
  41749. eachSpacing = _drawAreaDataPoints.eachSpacing;
  41750. opts.chartData.xAxisPoints = xAxisPoints;
  41751. opts.chartData.calPoints = calPoints;
  41752. opts.chartData.eachSpacing = eachSpacing;
  41753. drawYAxis(series, opts, config, context);
  41754. if (opts.enableMarkLine !== false && process === 1) {
  41755. drawMarkLine(opts, config, context);
  41756. }
  41757. drawLegend(opts.series, opts, config, context, opts.chartData);
  41758. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41759. drawCanvas(opts, context);
  41760. },
  41761. onAnimationFinish: function onAnimationFinish() {
  41762. _this.uevent.trigger('renderComplete');
  41763. }
  41764. });
  41765. break;
  41766. case 'ring':
  41767. case 'pie':
  41768. this.animationInstance = new Animation({
  41769. timing: opts.timing,
  41770. duration: duration,
  41771. onProcess: function onProcess(process) {
  41772. context.clearRect(0, 0, opts.width, opts.height);
  41773. if (opts.rotate) {
  41774. contextRotate(context, opts);
  41775. }
  41776. opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
  41777. drawLegend(opts.series, opts, config, context, opts.chartData);
  41778. drawToolTipBridge(opts, config, context, process);
  41779. drawCanvas(opts, context);
  41780. },
  41781. onAnimationFinish: function onAnimationFinish() {
  41782. _this.uevent.trigger('renderComplete');
  41783. }
  41784. });
  41785. break;
  41786. case 'rose':
  41787. this.animationInstance = new Animation({
  41788. timing: opts.timing,
  41789. duration: duration,
  41790. onProcess: function onProcess(process) {
  41791. context.clearRect(0, 0, opts.width, opts.height);
  41792. if (opts.rotate) {
  41793. contextRotate(context, opts);
  41794. }
  41795. opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
  41796. drawLegend(opts.series, opts, config, context, opts.chartData);
  41797. drawToolTipBridge(opts, config, context, process);
  41798. drawCanvas(opts, context);
  41799. },
  41800. onAnimationFinish: function onAnimationFinish() {
  41801. _this.uevent.trigger('renderComplete');
  41802. }
  41803. });
  41804. break;
  41805. case 'radar':
  41806. this.animationInstance = new Animation({
  41807. timing: opts.timing,
  41808. duration: duration,
  41809. onProcess: function onProcess(process) {
  41810. context.clearRect(0, 0, opts.width, opts.height);
  41811. if (opts.rotate) {
  41812. contextRotate(context, opts);
  41813. }
  41814. opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
  41815. drawLegend(opts.series, opts, config, context, opts.chartData);
  41816. drawToolTipBridge(opts, config, context, process);
  41817. drawCanvas(opts, context);
  41818. },
  41819. onAnimationFinish: function onAnimationFinish() {
  41820. _this.uevent.trigger('renderComplete');
  41821. }
  41822. });
  41823. break;
  41824. case 'arcbar':
  41825. this.animationInstance = new Animation({
  41826. timing: opts.timing,
  41827. duration: duration,
  41828. onProcess: function onProcess(process) {
  41829. context.clearRect(0, 0, opts.width, opts.height);
  41830. if (opts.rotate) {
  41831. contextRotate(context, opts);
  41832. }
  41833. opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
  41834. drawCanvas(opts, context);
  41835. },
  41836. onAnimationFinish: function onAnimationFinish() {
  41837. _this.uevent.trigger('renderComplete');
  41838. }
  41839. });
  41840. break;
  41841. case 'gauge':
  41842. this.animationInstance = new Animation({
  41843. timing: opts.timing,
  41844. duration: duration,
  41845. onProcess: function onProcess(process) {
  41846. context.clearRect(0, 0, opts.width, opts.height);
  41847. if (opts.rotate) {
  41848. contextRotate(context, opts);
  41849. }
  41850. opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);
  41851. drawCanvas(opts, context);
  41852. },
  41853. onAnimationFinish: function onAnimationFinish() {
  41854. _this.uevent.trigger('renderComplete');
  41855. }
  41856. });
  41857. break;
  41858. case 'candle':
  41859. this.animationInstance = new Animation({
  41860. timing: opts.timing,
  41861. duration: duration,
  41862. onProcess: function onProcess(process) {
  41863. context.clearRect(0, 0, opts.width, opts.height);
  41864. if (opts.rotate) {
  41865. contextRotate(context, opts);
  41866. }
  41867. drawYAxisGrid(categories, opts, config, context);
  41868. drawXAxis(categories, opts, config, context);
  41869. var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
  41870. xAxisPoints = _drawCandleDataPoints.xAxisPoints,
  41871. calPoints = _drawCandleDataPoints.calPoints,
  41872. eachSpacing = _drawCandleDataPoints.eachSpacing;
  41873. opts.chartData.xAxisPoints = xAxisPoints;
  41874. opts.chartData.calPoints = calPoints;
  41875. opts.chartData.eachSpacing = eachSpacing;
  41876. drawYAxis(series, opts, config, context);
  41877. if (opts.enableMarkLine !== false && process === 1) {
  41878. drawMarkLine(opts, config, context);
  41879. }
  41880. if (seriesMA) {
  41881. drawLegend(seriesMA, opts, config, context, opts.chartData);
  41882. } else {
  41883. drawLegend(opts.series, opts, config, context, opts.chartData);
  41884. }
  41885. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41886. drawCanvas(opts, context);
  41887. },
  41888. onAnimationFinish: function onAnimationFinish() {
  41889. _this.uevent.trigger('renderComplete');
  41890. }
  41891. });
  41892. break;
  41893. }
  41894. }
  41895. function uChartsEvent() {
  41896. this.events = {};
  41897. }
  41898. uChartsEvent.prototype.addEventListener = function (type, listener) {
  41899. this.events[type] = this.events[type] || [];
  41900. this.events[type].push(listener);
  41901. };
  41902. uChartsEvent.prototype.delEventListener = function (type) {
  41903. this.events[type] = [];
  41904. };
  41905. uChartsEvent.prototype.trigger = function () {
  41906. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  41907. args[_key] = arguments[_key];
  41908. }
  41909. var type = args[0];
  41910. var params = args.slice(1);
  41911. if (!!this.events[type]) {
  41912. this.events[type].forEach(function (listener) {
  41913. try {
  41914. listener.apply(null, params);
  41915. } catch (e) {
  41916. //console.log('[uCharts] '+e);
  41917. }
  41918. });
  41919. }
  41920. };
  41921. var uCharts = function uCharts(opts) {
  41922. opts.pix = opts.pixelRatio ? opts.pixelRatio : 1;
  41923. opts.fontSize = opts.fontSize ? opts.fontSize : 13;
  41924. opts.fontColor = opts.fontColor ? opts.fontColor : config.fontColor;
  41925. if (opts.background == "" || opts.background == "none") {
  41926. opts.background = "#FFFFFF";
  41927. }
  41928. opts.title = assign({}, opts.title);
  41929. opts.subtitle = assign({}, opts.subtitle);
  41930. opts.duration = opts.duration ? opts.duration : 1000;
  41931. opts.yAxis = assign({}, {
  41932. data: [],
  41933. showTitle: false,
  41934. disabled: false,
  41935. disableGrid: false,
  41936. splitNumber: 5,
  41937. gridType: 'solid',
  41938. dashLength: 4 * opts.pix,
  41939. gridColor: '#cccccc',
  41940. padding: 10,
  41941. fontColor: '#666666'
  41942. }, opts.yAxis);
  41943. opts.xAxis = assign({}, {
  41944. rotateLabel: false,
  41945. disabled: false,
  41946. disableGrid: false,
  41947. splitNumber: 5,
  41948. calibration: false,
  41949. gridType: 'solid',
  41950. dashLength: 4,
  41951. scrollAlign: 'left',
  41952. boundaryGap: 'center',
  41953. axisLine: true,
  41954. axisLineColor: '#cccccc'
  41955. }, opts.xAxis);
  41956. opts.xAxis.scrollPosition = opts.xAxis.scrollAlign;
  41957. opts.legend = assign({}, {
  41958. show: true,
  41959. position: 'bottom',
  41960. float: 'center',
  41961. backgroundColor: 'rgba(0,0,0,0)',
  41962. borderColor: 'rgba(0,0,0,0)',
  41963. borderWidth: 0,
  41964. padding: 5,
  41965. margin: 5,
  41966. itemGap: 10,
  41967. fontSize: opts.fontSize,
  41968. lineHeight: opts.fontSize,
  41969. fontColor: opts.fontColor,
  41970. formatter: {},
  41971. hiddenColor: '#CECECE'
  41972. }, opts.legend);
  41973. opts.extra = assign({}, opts.extra);
  41974. opts.rotate = opts.rotate ? true : false;
  41975. opts.animation = opts.animation ? true : false;
  41976. opts.rotate = opts.rotate ? true : false;
  41977. opts.canvas2d = opts.canvas2d ? true : false;
  41978. var config$$1 = JSON.parse(JSON.stringify(config));
  41979. config$$1.color = opts.color ? opts.color : config$$1.color;
  41980. config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;
  41981. if (opts.type == 'pie') {
  41982. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  41983. }
  41984. if (opts.type == 'ring') {
  41985. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.ring.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  41986. }
  41987. if (opts.type == 'rose') {
  41988. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  41989. }
  41990. config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pix;
  41991. config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;
  41992. //屏幕旋转
  41993. config$$1.rotate = opts.rotate;
  41994. if (opts.rotate) {
  41995. var tempWidth = opts.width;
  41996. var tempHeight = opts.height;
  41997. opts.width = tempHeight;
  41998. opts.height = tempWidth;
  41999. }
  42000. //适配高分屏
  42001. opts.padding = opts.padding ? opts.padding : config$$1.padding;
  42002. config$$1.yAxisWidth = config.yAxisWidth * opts.pix;
  42003. config$$1.xAxisHeight = config.xAxisHeight * opts.pix;
  42004. if (opts.enableScroll && opts.xAxis.scrollShow) {
  42005. config$$1.xAxisHeight += 6 * opts.pix;
  42006. }
  42007. config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pix;
  42008. config$$1.fontSize = opts.fontSize * opts.pix;
  42009. config$$1.titleFontSize = config.titleFontSize * opts.pix;
  42010. config$$1.subtitleFontSize = config.subtitleFontSize * opts.pix;
  42011. config$$1.toolTipPadding = config.toolTipPadding * opts.pix;
  42012. config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pix;
  42013. config$$1.columePadding = config.columePadding * opts.pix;
  42014. //this.context = opts.context ? opts.context : uni.createCanvasContext(opts.canvasId, opts.$this);
  42015. //v2.0版本后需要自行获取context并传入opts进行初始化,这么做是为了确保uCharts可以跨更多端使用,并保证了自定义组件this实例不被循环嵌套。如果您觉得不便请取消上面注释,采用v1.0版本的方式使用,对此给您带来的不便敬请谅解!
  42016. if (!opts.context) {
  42017. throw new Error('[uCharts] 未获取到context!注意:v2.0版本后,需要自行获取canvas的绘图上下文并传入opts.context!');
  42018. }
  42019. this.context = opts.context;
  42020. if (!this.context.setTextAlign) {
  42021. this.context.setStrokeStyle = function (e) {
  42022. return this.strokeStyle = e;
  42023. };
  42024. this.context.setLineWidth = function (e) {
  42025. return this.lineWidth = e;
  42026. };
  42027. this.context.setLineCap = function (e) {
  42028. return this.lineCap = e;
  42029. };
  42030. this.context.setFontSize = function (e) {
  42031. return this.font = e + "px sans-serif";
  42032. };
  42033. this.context.setFillStyle = function (e) {
  42034. return this.fillStyle = e;
  42035. };
  42036. this.context.setTextAlign = function (e) {
  42037. return this.textAlign = e;
  42038. };
  42039. this.context.draw = function () {};
  42040. }
  42041. //兼容NVUEsetLineDash
  42042. if (!this.context.setLineDash) {
  42043. this.context.setLineDash = function (e) {};
  42044. }
  42045. opts.chartData = {};
  42046. this.uevent = new uChartsEvent();
  42047. this.scrollOption = {
  42048. currentOffset: 0,
  42049. startTouchX: 0,
  42050. distance: 0,
  42051. lastMoveTime: 0
  42052. };
  42053. this.opts = opts;
  42054. this.config = config$$1;
  42055. drawCharts.call(this, opts.type, opts, config$$1, this.context);
  42056. };
  42057. uCharts.prototype.updateData = function () {
  42058. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  42059. this.opts = assign({}, this.opts, data);
  42060. this.opts.updateData = true;
  42061. var scrollPosition = data.scrollPosition || 'current';
  42062. switch (scrollPosition) {
  42063. case 'current':
  42064. //this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  42065. break;
  42066. case 'left':
  42067. this.opts._scrollDistance_ = 0;
  42068. this.scrollOption = {
  42069. currentOffset: 0,
  42070. startTouchX: 0,
  42071. distance: 0,
  42072. lastMoveTime: 0
  42073. };
  42074. break;
  42075. case 'right':
  42076. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  42077. yAxisWidth = _calYAxisData.yAxisWidth;
  42078. this.config.yAxisWidth = yAxisWidth;
  42079. var offsetLeft = 0;
  42080. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  42081. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  42082. startX = _getXAxisPoints0.startX,
  42083. endX = _getXAxisPoints0.endX,
  42084. eachSpacing = _getXAxisPoints0.eachSpacing;
  42085. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  42086. var screenWidth = endX - startX;
  42087. offsetLeft = screenWidth - totalWidth;
  42088. this.scrollOption = {
  42089. currentOffset: offsetLeft,
  42090. startTouchX: offsetLeft,
  42091. distance: 0,
  42092. lastMoveTime: 0
  42093. };
  42094. this.opts._scrollDistance_ = offsetLeft;
  42095. break;
  42096. }
  42097. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  42098. };
  42099. uCharts.prototype.zoom = function () {
  42100. var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
  42101. if (this.opts.enableScroll !== true) {
  42102. console.log('[uCharts] 请启用滚动条后使用');
  42103. return;
  42104. }
  42105. //当前屏幕中间点
  42106. var centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(this.opts.xAxis.itemCount / 2);
  42107. this.opts.animation = false;
  42108. this.opts.xAxis.itemCount = val.itemCount;
  42109. //重新计算x轴偏移距离
  42110. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  42111. yAxisWidth = _calYAxisData.yAxisWidth;
  42112. this.config.yAxisWidth = yAxisWidth;
  42113. var offsetLeft = 0;
  42114. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  42115. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  42116. startX = _getXAxisPoints0.startX,
  42117. endX = _getXAxisPoints0.endX,
  42118. eachSpacing = _getXAxisPoints0.eachSpacing;
  42119. var centerLeft = eachSpacing * centerPoint;
  42120. var screenWidth = endX - startX;
  42121. var MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
  42122. offsetLeft = screenWidth / 2 - centerLeft;
  42123. if (offsetLeft > 0) {
  42124. offsetLeft = 0;
  42125. }
  42126. if (offsetLeft < MaxLeft) {
  42127. offsetLeft = MaxLeft;
  42128. }
  42129. this.scrollOption = {
  42130. currentOffset: offsetLeft,
  42131. startTouchX: offsetLeft,
  42132. distance: 0,
  42133. lastMoveTime: 0
  42134. };
  42135. this.opts._scrollDistance_ = offsetLeft;
  42136. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  42137. };
  42138. uCharts.prototype.stopAnimation = function () {
  42139. this.animationInstance && this.animationInstance.stop();
  42140. };
  42141. uCharts.prototype.addEventListener = function (type, listener) {
  42142. this.uevent.addEventListener(type, listener);
  42143. };
  42144. uCharts.prototype.delEventListener = function (type) {
  42145. this.uevent.delEventListener(type);
  42146. };
  42147. uCharts.prototype.getCurrentDataIndex = function (e) {
  42148. var touches = null;
  42149. if (e.changedTouches) {
  42150. touches = e.changedTouches[0];
  42151. } else {
  42152. touches = e.mp.changedTouches[0];
  42153. }
  42154. if (touches) {
  42155. var _touches$ = getTouches(touches, this.opts, e);
  42156. if (this.opts.type === 'pie' || this.opts.type === 'ring') {
  42157. return findPieChartCurrentIndex({
  42158. x: _touches$.x,
  42159. y: _touches$.y
  42160. }, this.opts.chartData.pieData, this.opts);
  42161. } else if (this.opts.type === 'rose') {
  42162. return findRoseChartCurrentIndex({
  42163. x: _touches$.x,
  42164. y: _touches$.y
  42165. }, this.opts.chartData.pieData, this.opts);
  42166. } else if (this.opts.type === 'radar') {
  42167. return findRadarChartCurrentIndex({
  42168. x: _touches$.x,
  42169. y: _touches$.y
  42170. }, this.opts.chartData.radarData, this.opts.categories.length);
  42171. } else if (this.opts.type === 'funnel') {
  42172. return findFunnelChartCurrentIndex({
  42173. x: _touches$.x,
  42174. y: _touches$.y
  42175. }, this.opts.chartData.funnelData);
  42176. } else if (this.opts.type === 'map') {
  42177. return findMapChartCurrentIndex({
  42178. x: _touches$.x,
  42179. y: _touches$.y
  42180. }, this.opts);
  42181. } else if (this.opts.type === 'word') {
  42182. return findWordChartCurrentIndex({
  42183. x: _touches$.x,
  42184. y: _touches$.y
  42185. }, this.opts.chartData.wordCloudData);
  42186. } else if (this.opts.type === 'bar') {
  42187. return findBarChartCurrentIndex({
  42188. x: _touches$.x,
  42189. y: _touches$.y
  42190. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  42191. } else {
  42192. return findCurrentIndex({
  42193. x: _touches$.x,
  42194. y: _touches$.y
  42195. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  42196. }
  42197. }
  42198. return -1;
  42199. };
  42200. uCharts.prototype.getLegendDataIndex = function (e) {
  42201. var touches = null;
  42202. if (e.changedTouches) {
  42203. touches = e.changedTouches[0];
  42204. } else {
  42205. touches = e.mp.changedTouches[0];
  42206. }
  42207. if (touches) {
  42208. var _touches$ = getTouches(touches, this.opts, e);
  42209. return findLegendIndex({
  42210. x: _touches$.x,
  42211. y: _touches$.y
  42212. }, this.opts.chartData.legendData);
  42213. }
  42214. return -1;
  42215. };
  42216. uCharts.prototype.touchLegend = function (e) {
  42217. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  42218. var touches = null;
  42219. if (e.changedTouches) {
  42220. touches = e.changedTouches[0];
  42221. } else {
  42222. touches = e.mp.changedTouches[0];
  42223. }
  42224. if (touches) {
  42225. var _touches$ = getTouches(touches, this.opts, e);
  42226. var index = this.getLegendDataIndex(e);
  42227. if (index >= 0) {
  42228. if (this.opts.type == 'candle') {
  42229. this.opts.seriesMA[index].show = !this.opts.seriesMA[index].show;
  42230. } else {
  42231. this.opts.series[index].show = !this.opts.series[index].show;
  42232. }
  42233. this.opts.animation = option.animation ? true : false;
  42234. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  42235. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  42236. }
  42237. }
  42238. };
  42239. uCharts.prototype.showToolTip = function (e) {
  42240. var _this2 = this;
  42241. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  42242. var touches = null;
  42243. if (e.changedTouches) {
  42244. touches = e.changedTouches[0];
  42245. } else {
  42246. touches = e.mp.changedTouches[0];
  42247. }
  42248. if (!touches) {
  42249. console.log("[uCharts] 未获取到event坐标信息");
  42250. }
  42251. var _touches$ = getTouches(touches, this.opts, e);
  42252. var currentOffset = this.scrollOption.currentOffset;
  42253. var opts = assign({}, this.opts, {
  42254. _scrollDistance_: currentOffset,
  42255. animation: false
  42256. });
  42257. if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column' || this.opts.type === 'scatter' || this.opts.type === 'bubble') {
  42258. var current = this.getCurrentDataIndex(e);
  42259. var index = option.index == undefined ? current.index : option.index;
  42260. if (index > -1 || index.length > 0) {
  42261. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  42262. if (seriesData.length !== 0) {
  42263. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  42264. textList = _getToolTipData.textList,
  42265. offset = _getToolTipData.offset;
  42266. offset.y = _touches$.y;
  42267. opts.tooltip = {
  42268. textList: option.textList !== undefined ? option.textList : textList,
  42269. offset: option.offset !== undefined ? option.offset : offset,
  42270. option: option,
  42271. index: index
  42272. };
  42273. }
  42274. }
  42275. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42276. }
  42277. if (this.opts.type === 'bar') {
  42278. var current = this.getCurrentDataIndex(e);
  42279. var index = option.index == undefined ? current.index : option.index;
  42280. if (index > -1 || index.length > 0) {
  42281. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  42282. if (seriesData.length !== 0) {
  42283. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  42284. textList = _getToolTipData.textList,
  42285. offset = _getToolTipData.offset;
  42286. offset.x = _touches$.x;
  42287. opts.tooltip = {
  42288. textList: option.textList !== undefined ? option.textList : textList,
  42289. offset: option.offset !== undefined ? option.offset : offset,
  42290. option: option,
  42291. index: index
  42292. };
  42293. }
  42294. }
  42295. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42296. }
  42297. if (this.opts.type === 'mix') {
  42298. var current = this.getCurrentDataIndex(e);
  42299. var index = option.index == undefined ? current.index : option.index;
  42300. if (index > -1) {
  42301. var currentOffset = this.scrollOption.currentOffset;
  42302. var opts = assign({}, this.opts, {
  42303. _scrollDistance_: currentOffset,
  42304. animation: false
  42305. });
  42306. var seriesData = getSeriesDataItem(this.opts.series, index);
  42307. if (seriesData.length !== 0) {
  42308. var _getMixToolTipData = getMixToolTipData(seriesData, this.opts, index, this.opts.categories, option),
  42309. textList = _getMixToolTipData.textList,
  42310. offset = _getMixToolTipData.offset;
  42311. offset.y = _touches$.y;
  42312. opts.tooltip = {
  42313. textList: option.textList ? option.textList : textList,
  42314. offset: option.offset !== undefined ? option.offset : offset,
  42315. option: option,
  42316. index: index
  42317. };
  42318. }
  42319. }
  42320. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42321. }
  42322. if (this.opts.type === 'candle') {
  42323. var current = this.getCurrentDataIndex(e);
  42324. var index = option.index == undefined ? current.index : option.index;
  42325. if (index > -1) {
  42326. var currentOffset = this.scrollOption.currentOffset;
  42327. var opts = assign({}, this.opts, {
  42328. _scrollDistance_: currentOffset,
  42329. animation: false
  42330. });
  42331. var seriesData = getSeriesDataItem(this.opts.series, index);
  42332. if (seriesData.length !== 0) {
  42333. var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts, index, this.opts.categories, this.opts.extra.candle, option),
  42334. textList = _getToolTipData.textList,
  42335. offset = _getToolTipData.offset;
  42336. offset.y = _touches$.y;
  42337. opts.tooltip = {
  42338. textList: option.textList ? option.textList : textList,
  42339. offset: option.offset !== undefined ? option.offset : offset,
  42340. option: option,
  42341. index: index
  42342. };
  42343. }
  42344. }
  42345. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42346. }
  42347. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose' || this.opts.type === 'funnel') {
  42348. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  42349. if (index > -1) {
  42350. var opts = assign({}, this.opts, {
  42351. animation: false
  42352. });
  42353. var seriesData = assign({}, opts._series_[index]);
  42354. var textList = [{
  42355. text: option.formatter ? option.formatter(seriesData, undefined, index, opts) : seriesData.name + ': ' + seriesData.data,
  42356. color: seriesData.color
  42357. }];
  42358. var offset = {
  42359. x: _touches$.x,
  42360. y: _touches$.y
  42361. };
  42362. opts.tooltip = {
  42363. textList: option.textList ? option.textList : textList,
  42364. offset: option.offset !== undefined ? option.offset : offset,
  42365. option: option,
  42366. index: index
  42367. };
  42368. }
  42369. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42370. }
  42371. if (this.opts.type === 'map') {
  42372. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  42373. if (index > -1) {
  42374. var opts = assign({}, this.opts, {
  42375. animation: false
  42376. });
  42377. var seriesData = assign({}, this.opts.series[index]);
  42378. seriesData.name = seriesData.properties.name;
  42379. var textList = [{
  42380. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  42381. color: seriesData.color
  42382. }];
  42383. var offset = {
  42384. x: _touches$.x,
  42385. y: _touches$.y
  42386. };
  42387. opts.tooltip = {
  42388. textList: option.textList ? option.textList : textList,
  42389. offset: option.offset !== undefined ? option.offset : offset,
  42390. option: option,
  42391. index: index
  42392. };
  42393. }
  42394. opts.updateData = false;
  42395. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42396. }
  42397. if (this.opts.type === 'word') {
  42398. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  42399. if (index > -1) {
  42400. var opts = assign({}, this.opts, {
  42401. animation: false
  42402. });
  42403. var seriesData = assign({}, this.opts.series[index]);
  42404. var textList = [{
  42405. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  42406. color: seriesData.color
  42407. }];
  42408. var offset = {
  42409. x: _touches$.x,
  42410. y: _touches$.y
  42411. };
  42412. opts.tooltip = {
  42413. textList: option.textList ? option.textList : textList,
  42414. offset: option.offset !== undefined ? option.offset : offset,
  42415. option: option,
  42416. index: index
  42417. };
  42418. }
  42419. opts.updateData = false;
  42420. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42421. }
  42422. if (this.opts.type === 'radar') {
  42423. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  42424. if (index > -1) {
  42425. var opts = assign({}, this.opts, {
  42426. animation: false
  42427. });
  42428. var seriesData = getSeriesDataItem(this.opts.series, index);
  42429. if (seriesData.length !== 0) {
  42430. var textList = seriesData.map(function (item) {
  42431. return {
  42432. text: option.formatter ? option.formatter(item, _this2.opts.categories[index], index, _this2.opts) : item.name + ': ' + item.data,
  42433. color: item.color
  42434. };
  42435. });
  42436. var offset = {
  42437. x: _touches$.x,
  42438. y: _touches$.y
  42439. };
  42440. opts.tooltip = {
  42441. textList: option.textList ? option.textList : textList,
  42442. offset: option.offset !== undefined ? option.offset : offset,
  42443. option: option,
  42444. index: index
  42445. };
  42446. }
  42447. }
  42448. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42449. }
  42450. };
  42451. uCharts.prototype.translate = function (distance) {
  42452. this.scrollOption = {
  42453. currentOffset: distance,
  42454. startTouchX: distance,
  42455. distance: 0,
  42456. lastMoveTime: 0
  42457. };
  42458. var opts = assign({}, this.opts, {
  42459. _scrollDistance_: distance,
  42460. animation: false
  42461. });
  42462. drawCharts.call(this, this.opts.type, opts, this.config, this.context);
  42463. };
  42464. uCharts.prototype.scrollStart = function (e) {
  42465. var touches = null;
  42466. if (e.changedTouches) {
  42467. touches = e.changedTouches[0];
  42468. } else {
  42469. touches = e.mp.changedTouches[0];
  42470. }
  42471. var _touches$ = getTouches(touches, this.opts, e);
  42472. if (touches && this.opts.enableScroll === true) {
  42473. this.scrollOption.startTouchX = _touches$.x;
  42474. }
  42475. };
  42476. uCharts.prototype.scroll = function (e) {
  42477. if (this.scrollOption.lastMoveTime === 0) {
  42478. this.scrollOption.lastMoveTime = Date.now();
  42479. }
  42480. var Limit = this.opts.touchMoveLimit || 60;
  42481. var currMoveTime = Date.now();
  42482. var duration = currMoveTime - this.scrollOption.lastMoveTime;
  42483. if (duration < Math.floor(1000 / Limit)) return;
  42484. this.scrollOption.lastMoveTime = currMoveTime;
  42485. var touches = null;
  42486. if (e.changedTouches) {
  42487. touches = e.changedTouches[0];
  42488. } else {
  42489. touches = e.mp.changedTouches[0];
  42490. }
  42491. if (touches && this.opts.enableScroll === true) {
  42492. var _touches$ = getTouches(touches, this.opts, e);
  42493. var _distance;
  42494. _distance = _touches$.x - this.scrollOption.startTouchX;
  42495. var currentOffset = this.scrollOption.currentOffset;
  42496. var validDistance = calValidDistance(this, currentOffset + _distance, this.opts.chartData, this.config, this.opts);
  42497. this.scrollOption.distance = _distance = validDistance - currentOffset;
  42498. var opts = assign({}, this.opts, {
  42499. _scrollDistance_: currentOffset + _distance,
  42500. animation: false
  42501. });
  42502. this.opts = opts;
  42503. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42504. return currentOffset + _distance;
  42505. }
  42506. };
  42507. uCharts.prototype.scrollEnd = function (e) {
  42508. if (this.opts.enableScroll === true) {
  42509. var _scrollOption = this.scrollOption,
  42510. currentOffset = _scrollOption.currentOffset,
  42511. distance = _scrollOption.distance;
  42512. this.scrollOption.currentOffset = currentOffset + distance;
  42513. this.scrollOption.distance = 0;
  42514. }
  42515. };
  42516. if (( false ? undefined : (0, _typeof2.default)(module)) === "object" && (0, _typeof2.default)(module.exports) === "object") {
  42517. module.exports = uCharts;
  42518. }
  42519. var _default = uCharts;
  42520. exports.default = _default;
  42521. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/module.js */ 40)(module)))
  42522. /***/ }),
  42523. /***/ 52:
  42524. /*!*****************************************************************!*\
  42525. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  42526. \*****************************************************************/
  42527. /*! no static exports found */
  42528. /***/ (function(module, exports) {
  42529. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  42530. try {
  42531. var info = gen[key](arg);
  42532. var value = info.value;
  42533. } catch (error) {
  42534. reject(error);
  42535. return;
  42536. }
  42537. if (info.done) {
  42538. resolve(value);
  42539. } else {
  42540. Promise.resolve(value).then(_next, _throw);
  42541. }
  42542. }
  42543. function _asyncToGenerator(fn) {
  42544. return function () {
  42545. var self = this,
  42546. args = arguments;
  42547. return new Promise(function (resolve, reject) {
  42548. var gen = fn.apply(self, args);
  42549. function _next(value) {
  42550. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  42551. }
  42552. function _throw(err) {
  42553. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  42554. }
  42555. _next(undefined);
  42556. });
  42557. };
  42558. }
  42559. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42560. /***/ }),
  42561. /***/ 520:
  42562. /*!*************************************************************************************************!*\
  42563. !*** E:/Desktop/zd_wechatApp(1)/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js ***!
  42564. \*************************************************************************************************/
  42565. /*! no static exports found */
  42566. /***/ (function(module, exports, __webpack_require__) {
  42567. "use strict";
  42568. Object.defineProperty(exports, "__esModule", {
  42569. value: true
  42570. });
  42571. exports.default = void 0;
  42572. /*
  42573. * uCharts®
  42574. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  42575. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  42576. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  42577. * 复制使用请保留本段注释,感谢支持开源!
  42578. *
  42579. * uCharts®官方网站
  42580. * https://www.uCharts.cn
  42581. *
  42582. * 开源地址:
  42583. * https://gitee.com/uCharts/uCharts
  42584. *
  42585. * uni-app插件市场地址:
  42586. * http://ext.dcloud.net.cn/plugin?id=271
  42587. *
  42588. */
  42589. // 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
  42590. var color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
  42591. //事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
  42592. var formatDateTime = function formatDateTime(timeStamp, returnType) {
  42593. var date = new Date();
  42594. date.setTime(timeStamp * 1000);
  42595. var y = date.getFullYear();
  42596. var m = date.getMonth() + 1;
  42597. m = m < 10 ? '0' + m : m;
  42598. var d = date.getDate();
  42599. d = d < 10 ? '0' + d : d;
  42600. var h = date.getHours();
  42601. h = h < 10 ? '0' + h : h;
  42602. var minute = date.getMinutes();
  42603. var second = date.getSeconds();
  42604. minute = minute < 10 ? '0' + minute : minute;
  42605. second = second < 10 ? '0' + second : second;
  42606. if (returnType == 'full') {
  42607. return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
  42608. }
  42609. if (returnType == 'y-m-d') {
  42610. return y + '-' + m + '-' + d;
  42611. }
  42612. if (returnType == 'h:m') {
  42613. return h + ':' + minute;
  42614. }
  42615. if (returnType == 'h:m:s') {
  42616. return h + ':' + minute + ':' + second;
  42617. }
  42618. return [y, m, d, h, minute, second];
  42619. };
  42620. var cfu = {
  42621. //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
  42622. "type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"],
  42623. "range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "条状图", "区域图", "雷达图", "仪表盘", "K线图", "混合图", "时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"],
  42624. //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
  42625. //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
  42626. "categories": ["line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "demotype"],
  42627. //instance为实例变量承载属性,不要删除
  42628. "instance": {},
  42629. //option为opts及eopts承载属性,不要删除
  42630. "option": {},
  42631. //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
  42632. "formatter": {
  42633. "yAxisDemo1": function yAxisDemo1(val) {
  42634. return val + '元';
  42635. },
  42636. "yAxisDemo2": function yAxisDemo2(val) {
  42637. return val.toFixed(2);
  42638. },
  42639. "xAxisDemo1": function xAxisDemo1(val) {
  42640. return val + '年';
  42641. },
  42642. "xAxisDemo2": function xAxisDemo2(val) {
  42643. return formatDateTime(val, 'h:m');
  42644. },
  42645. "seriesDemo1": function seriesDemo1(val) {
  42646. return val + '元';
  42647. },
  42648. "tooltipDemo1": function tooltipDemo1(item, category, index, opts) {
  42649. if (index == 0) {
  42650. return '随便用' + item.data + '年';
  42651. } else {
  42652. return '其他我没改' + item.data + '天';
  42653. }
  42654. },
  42655. "pieDemo": function pieDemo(val, index, series) {
  42656. if (index !== undefined) {
  42657. return series[index].name + ':' + series[index].data + '元';
  42658. }
  42659. }
  42660. },
  42661. //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
  42662. "demotype": {
  42663. //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
  42664. "type": "line",
  42665. "color": color,
  42666. "padding": [15, 10, 0, 15],
  42667. "xAxis": {
  42668. "disableGrid": true
  42669. },
  42670. "yAxis": {
  42671. "gridType": "dash",
  42672. "dashLength": 2
  42673. },
  42674. "legend": {},
  42675. "extra": {
  42676. "line": {
  42677. "type": "curve",
  42678. "width": 2
  42679. }
  42680. }
  42681. },
  42682. //下面是自定义配置,请添加项目所需的通用配置
  42683. "pie": {
  42684. "type": "pie",
  42685. "color": color,
  42686. "padding": [5, 5, 5, 5],
  42687. "extra": {
  42688. "pie": {
  42689. "activeOpacity": 0.5,
  42690. "activeRadius": 10,
  42691. "offsetAngle": 0,
  42692. "labelWidth": 15,
  42693. "border": true,
  42694. "borderWidth": 3,
  42695. "borderColor": "#FFFFFF"
  42696. }
  42697. }
  42698. },
  42699. "ring": {
  42700. "type": "ring",
  42701. "color": color,
  42702. "padding": [5, 5, 5, 5],
  42703. "rotate": false,
  42704. "dataLabel": true,
  42705. "legend": {
  42706. "show": true,
  42707. "position": "right",
  42708. "lineHeight": 25
  42709. },
  42710. "title": {
  42711. "name": "收益率",
  42712. "fontSize": 15,
  42713. "color": "#666666"
  42714. },
  42715. "subtitle": {
  42716. "name": "70%",
  42717. "fontSize": 25,
  42718. "color": "#7cb5ec"
  42719. },
  42720. "extra": {
  42721. "ring": {
  42722. "ringWidth": 30,
  42723. "activeOpacity": 0.5,
  42724. "activeRadius": 10,
  42725. "offsetAngle": 0,
  42726. "labelWidth": 15,
  42727. "border": true,
  42728. "borderWidth": 3,
  42729. "borderColor": "#FFFFFF"
  42730. }
  42731. }
  42732. },
  42733. "rose": {
  42734. "type": "rose",
  42735. "color": color,
  42736. "padding": [5, 5, 5, 5],
  42737. "legend": {
  42738. "show": true,
  42739. "position": "left",
  42740. "lineHeight": 25
  42741. },
  42742. "extra": {
  42743. "rose": {
  42744. "type": "area",
  42745. "minRadius": 50,
  42746. "activeOpacity": 0.5,
  42747. "activeRadius": 10,
  42748. "offsetAngle": 0,
  42749. "labelWidth": 15,
  42750. "border": false,
  42751. "borderWidth": 2,
  42752. "borderColor": "#FFFFFF"
  42753. }
  42754. }
  42755. },
  42756. "word": {
  42757. "type": "word",
  42758. "color": color,
  42759. "extra": {
  42760. "word": {
  42761. "type": "normal",
  42762. "autoColors": false
  42763. }
  42764. }
  42765. },
  42766. "funnel": {
  42767. "type": "funnel",
  42768. "color": color,
  42769. "padding": [15, 15, 0, 15],
  42770. "extra": {
  42771. "funnel": {
  42772. "activeOpacity": 0.3,
  42773. "activeWidth": 10,
  42774. "border": true,
  42775. "borderWidth": 2,
  42776. "borderColor": "#FFFFFF",
  42777. "fillOpacity": 1,
  42778. "labelAlign": "right"
  42779. }
  42780. }
  42781. },
  42782. "map": {
  42783. "type": "map",
  42784. "color": color,
  42785. "padding": [0, 0, 0, 0],
  42786. "dataLabel": true,
  42787. "extra": {
  42788. "map": {
  42789. "border": true,
  42790. "borderWidth": 1,
  42791. "borderColor": "#666666",
  42792. "fillOpacity": 0.6,
  42793. "activeBorderColor": "#F04864",
  42794. "activeFillColor": "#FACC14",
  42795. "activeFillOpacity": 1
  42796. }
  42797. }
  42798. },
  42799. "arcbar": {
  42800. "type": "arcbar",
  42801. "color": color,
  42802. "title": {
  42803. "name": "百分比",
  42804. "fontSize": 25,
  42805. "color": "#00FF00"
  42806. },
  42807. "subtitle": {
  42808. "name": "默认标题",
  42809. "fontSize": 15,
  42810. "color": "#666666"
  42811. },
  42812. "extra": {
  42813. "arcbar": {
  42814. "type": "default",
  42815. "width": 12,
  42816. "backgroundColor": "#E9E9E9",
  42817. "startAngle": 0.75,
  42818. "endAngle": 0.25,
  42819. "gap": 2
  42820. }
  42821. }
  42822. },
  42823. "line": {
  42824. "type": "line",
  42825. "color": color,
  42826. "padding": [15, 10, 0, 15],
  42827. "xAxis": {
  42828. "disableGrid": true
  42829. },
  42830. "yAxis": {
  42831. "gridType": "dash",
  42832. "dashLength": 2
  42833. },
  42834. "legend": {},
  42835. "extra": {
  42836. "line": {
  42837. "type": "straight",
  42838. "width": 2
  42839. }
  42840. }
  42841. },
  42842. "tline": {
  42843. "type": "line",
  42844. "color": color,
  42845. "padding": [15, 10, 0, 15],
  42846. "xAxis": {
  42847. "disableGrid": false,
  42848. "boundaryGap": "justify"
  42849. },
  42850. "yAxis": {
  42851. "gridType": "dash",
  42852. "dashLength": 2,
  42853. "data": [{
  42854. "min": 0,
  42855. "max": 80
  42856. }]
  42857. },
  42858. "legend": {},
  42859. "extra": {
  42860. "line": {
  42861. "type": "curve",
  42862. "width": 2
  42863. }
  42864. }
  42865. },
  42866. "tarea": {
  42867. "type": "area",
  42868. "color": color,
  42869. "padding": [15, 10, 0, 15],
  42870. "xAxis": {
  42871. "disableGrid": true,
  42872. "boundaryGap": "justify"
  42873. },
  42874. "yAxis": {
  42875. "gridType": "dash",
  42876. "dashLength": 2,
  42877. "data": [{
  42878. "min": 0,
  42879. "max": 80
  42880. }]
  42881. },
  42882. "legend": {},
  42883. "extra": {
  42884. "area": {
  42885. "type": "curve",
  42886. "opacity": 0.2,
  42887. "addLine": true,
  42888. "width": 2,
  42889. "gradient": true
  42890. }
  42891. }
  42892. },
  42893. "column": {
  42894. "type": "column",
  42895. "color": color,
  42896. "padding": [15, 15, 0, 5],
  42897. "xAxis": {
  42898. "disableGrid": true
  42899. },
  42900. "yAxis": {
  42901. "data": [{
  42902. "min": 0
  42903. }]
  42904. },
  42905. "legend": {},
  42906. "extra": {
  42907. "column": {
  42908. "type": "group",
  42909. "width": 30,
  42910. "meterBorde": 1,
  42911. "meterFillColor": "#FFFFFF",
  42912. "activeBgColor": "#000000",
  42913. "activeBgOpacity": 0.08
  42914. }
  42915. }
  42916. },
  42917. "bar": {
  42918. "type": "bar",
  42919. "color": color,
  42920. "padding": [15, 30, 0, 5],
  42921. "xAxis": {
  42922. "boundaryGap": "justify",
  42923. "disableGrid": false,
  42924. "min": 0,
  42925. "axisLine": false
  42926. },
  42927. "yAxis": {},
  42928. "legend": {},
  42929. "extra": {
  42930. "bar": {
  42931. "type": "group",
  42932. "width": 30,
  42933. "meterBorde": 1,
  42934. "meterFillColor": "#FFFFFF",
  42935. "activeBgColor": "#000000",
  42936. "activeBgOpacity": 0.08
  42937. }
  42938. }
  42939. },
  42940. "area": {
  42941. "type": "area",
  42942. "color": color,
  42943. "padding": [15, 15, 0, 15],
  42944. "xAxis": {
  42945. "disableGrid": true
  42946. },
  42947. "yAxis": {
  42948. "gridType": "dash",
  42949. "dashLength": 2
  42950. },
  42951. "legend": {},
  42952. "extra": {
  42953. "area": {
  42954. "type": "straight",
  42955. "opacity": 0.2,
  42956. "addLine": true,
  42957. "width": 2,
  42958. "gradient": false
  42959. }
  42960. }
  42961. },
  42962. "radar": {
  42963. "type": "radar",
  42964. "color": color,
  42965. "padding": [5, 5, 5, 5],
  42966. "dataLabel": false,
  42967. "legend": {
  42968. "show": true,
  42969. "position": "right",
  42970. "lineHeight": 25
  42971. },
  42972. "extra": {
  42973. "radar": {
  42974. "gridType": "radar",
  42975. "gridColor": "#CCCCCC",
  42976. "gridCount": 3,
  42977. "opacity": 0.2,
  42978. "max": 200
  42979. }
  42980. }
  42981. },
  42982. "gauge": {
  42983. "type": "gauge",
  42984. "color": color,
  42985. "title": {
  42986. "name": "66Km/H",
  42987. "fontSize": 25,
  42988. "color": "#2fc25b",
  42989. "offsetY": 50
  42990. },
  42991. "subtitle": {
  42992. "name": "实时速度",
  42993. "fontSize": 15,
  42994. "color": "#1890ff",
  42995. "offsetY": -50
  42996. },
  42997. "extra": {
  42998. "gauge": {
  42999. "type": "default",
  43000. "width": 30,
  43001. "labelColor": "#666666",
  43002. "startAngle": 0.75,
  43003. "endAngle": 0.25,
  43004. "startNumber": 0,
  43005. "endNumber": 100,
  43006. "labelFormat": "",
  43007. "splitLine": {
  43008. "fixRadius": 0,
  43009. "splitNumber": 10,
  43010. "width": 30,
  43011. "color": "#FFFFFF",
  43012. "childNumber": 5,
  43013. "childWidth": 12
  43014. },
  43015. "pointer": {
  43016. "width": 24,
  43017. "color": "auto"
  43018. }
  43019. }
  43020. }
  43021. },
  43022. "candle": {
  43023. "type": "candle",
  43024. "color": color,
  43025. "padding": [15, 15, 0, 15],
  43026. "enableScroll": true,
  43027. "enableMarkLine": true,
  43028. "dataLabel": false,
  43029. "xAxis": {
  43030. "labelCount": 4,
  43031. "itemCount": 40,
  43032. "disableGrid": true,
  43033. "gridColor": "#CCCCCC",
  43034. "gridType": "solid",
  43035. "dashLength": 4,
  43036. "scrollShow": true,
  43037. "scrollAlign": "left",
  43038. "scrollColor": "#A6A6A6",
  43039. "scrollBackgroundColor": "#EFEBEF"
  43040. },
  43041. "yAxis": {},
  43042. "legend": {},
  43043. "extra": {
  43044. "candle": {
  43045. "color": {
  43046. "upLine": "#f04864",
  43047. "upFill": "#f04864",
  43048. "downLine": "#2fc25b",
  43049. "downFill": "#2fc25b"
  43050. },
  43051. "average": {
  43052. "show": true,
  43053. "name": ["MA5", "MA10", "MA30"],
  43054. "day": [5, 10, 20],
  43055. "color": ["#1890ff", "#2fc25b", "#facc14"]
  43056. }
  43057. },
  43058. "markLine": {
  43059. "type": "dash",
  43060. "dashLength": 5,
  43061. "data": [{
  43062. "value": 2150,
  43063. "lineColor": "#f04864",
  43064. "showLabel": true
  43065. }, {
  43066. "value": 2350,
  43067. "lineColor": "#f04864",
  43068. "showLabel": true
  43069. }]
  43070. }
  43071. }
  43072. },
  43073. "mix": {
  43074. "type": "mix",
  43075. "color": color,
  43076. "padding": [15, 15, 0, 15],
  43077. "xAxis": {
  43078. "disableGrid": true
  43079. },
  43080. "yAxis": {
  43081. "disabled": false,
  43082. "disableGrid": false,
  43083. "splitNumber": 5,
  43084. "gridType": "dash",
  43085. "dashLength": 4,
  43086. "gridColor": "#CCCCCC",
  43087. "padding": 10,
  43088. "showTitle": true,
  43089. "data": []
  43090. },
  43091. "legend": {},
  43092. "extra": {
  43093. "mix": {
  43094. "column": {
  43095. "width": 20
  43096. }
  43097. }
  43098. }
  43099. },
  43100. "scatter": {
  43101. "type": "scatter",
  43102. "color": color,
  43103. "padding": [15, 15, 0, 15],
  43104. "dataLabel": false,
  43105. "xAxis": {
  43106. "disableGrid": false,
  43107. "gridType": "dash",
  43108. "splitNumber": 5,
  43109. "boundaryGap": "justify",
  43110. "min": 0
  43111. },
  43112. "yAxis": {
  43113. "disableGrid": false,
  43114. "gridType": "dash"
  43115. },
  43116. "legend": {},
  43117. "extra": {
  43118. "scatter": {}
  43119. }
  43120. },
  43121. "bubble": {
  43122. "type": "bubble",
  43123. "color": color,
  43124. "padding": [15, 15, 0, 15],
  43125. "xAxis": {
  43126. "disableGrid": false,
  43127. "gridType": "dash",
  43128. "splitNumber": 5,
  43129. "boundaryGap": "justify",
  43130. "min": 0,
  43131. "max": 250
  43132. },
  43133. "yAxis": {
  43134. "disableGrid": false,
  43135. "gridType": "dash",
  43136. "data": [{
  43137. "min": 0,
  43138. "max": 150
  43139. }]
  43140. },
  43141. "legend": {},
  43142. "extra": {
  43143. "bubble": {
  43144. "border": 2,
  43145. "opacity": 0.5
  43146. }
  43147. }
  43148. }
  43149. };
  43150. var _default = cfu;
  43151. exports.default = _default;
  43152. /***/ }),
  43153. /***/ 53:
  43154. /*!***********************************************************************!*\
  43155. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/timeFormat.js ***!
  43156. \***********************************************************************/
  43157. /*! no static exports found */
  43158. /***/ (function(module, exports, __webpack_require__) {
  43159. "use strict";
  43160. Object.defineProperty(exports, "__esModule", {
  43161. value: true
  43162. });
  43163. exports.default = void 0;
  43164. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  43165. // 所以这里做一个兼容polyfill的兼容处理
  43166. if (!String.prototype.padStart) {
  43167. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  43168. String.prototype.padStart = function (maxLength) {
  43169. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  43170. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError('fillString must be String');
  43171. var str = this;
  43172. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  43173. if (str.length >= maxLength) return String(str);
  43174. var fillLength = maxLength - str.length,
  43175. times = Math.ceil(fillLength / fillString.length);
  43176. while (times >>= 1) {
  43177. fillString += fillString;
  43178. if (times === 1) {
  43179. fillString += fillString;
  43180. }
  43181. }
  43182. return fillString.slice(0, fillLength) + str;
  43183. };
  43184. }
  43185. // 其他更多是格式化有如下:
  43186. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  43187. function timeFormat() {
  43188. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  43189. var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  43190. // 如果为null,则格式化当前时间
  43191. if (!dateTime) dateTime = Number(new Date());
  43192. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  43193. if (dateTime.toString().length == 10) dateTime *= 1000;
  43194. var date = new Date(dateTime);
  43195. var ret;
  43196. var opt = {
  43197. "y+": date.getFullYear().toString(),
  43198. // 年
  43199. "m+": (date.getMonth() + 1).toString(),
  43200. // 月
  43201. "d+": date.getDate().toString(),
  43202. // 日
  43203. "h+": date.getHours().toString(),
  43204. // 时
  43205. "M+": date.getMinutes().toString(),
  43206. // 分
  43207. "s+": date.getSeconds().toString() // 秒
  43208. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  43209. };
  43210. for (var k in opt) {
  43211. ret = new RegExp("(" + k + ")").exec(fmt);
  43212. if (ret) {
  43213. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  43214. }
  43215. ;
  43216. }
  43217. ;
  43218. return fmt;
  43219. }
  43220. var _default = timeFormat;
  43221. exports.default = _default;
  43222. /***/ }),
  43223. /***/ 54:
  43224. /*!*********************************************************************!*\
  43225. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/timeFrom.js ***!
  43226. \*********************************************************************/
  43227. /*! no static exports found */
  43228. /***/ (function(module, exports, __webpack_require__) {
  43229. "use strict";
  43230. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  43231. Object.defineProperty(exports, "__esModule", {
  43232. value: true
  43233. });
  43234. exports.default = void 0;
  43235. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 53));
  43236. /**
  43237. * 时间戳转为多久之前
  43238. * @param String timestamp 时间戳
  43239. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  43240. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  43241. */
  43242. function timeFrom() {
  43243. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  43244. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  43245. // 如果为null,则格式化当前时间
  43246. if (!dateTime) dateTime = Number(new Date());
  43247. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  43248. if (dateTime.toString().length == 10) dateTime *= 1000;
  43249. var timestamp = +new Date(Number(dateTime));
  43250. var timer = (Number(new Date()) - timestamp) / 1000;
  43251. // 如果小于5分钟,则返回"刚刚",其他以此类推
  43252. var tips = '';
  43253. switch (true) {
  43254. case timer < 300:
  43255. tips = '刚刚';
  43256. break;
  43257. case timer >= 300 && timer < 3600:
  43258. tips = parseInt(timer / 60) + '分钟前';
  43259. break;
  43260. case timer >= 3600 && timer < 86400:
  43261. tips = parseInt(timer / 3600) + '小时前';
  43262. break;
  43263. case timer >= 86400 && timer < 2592000:
  43264. tips = parseInt(timer / 86400) + '天前';
  43265. break;
  43266. default:
  43267. // 如果format为false,则无论什么时间戳,都显示xx之前
  43268. if (format === false) {
  43269. if (timer >= 2592000 && timer < 365 * 86400) {
  43270. tips = parseInt(timer / (86400 * 30)) + '个月前';
  43271. } else {
  43272. tips = parseInt(timer / (86400 * 365)) + '年前';
  43273. }
  43274. } else {
  43275. tips = (0, _timeFormat.default)(timestamp, format);
  43276. }
  43277. }
  43278. return tips;
  43279. }
  43280. var _default = timeFrom;
  43281. exports.default = _default;
  43282. /***/ }),
  43283. /***/ 55:
  43284. /*!**************************************************************************!*\
  43285. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/colorGradient.js ***!
  43286. \**************************************************************************/
  43287. /*! no static exports found */
  43288. /***/ (function(module, exports, __webpack_require__) {
  43289. "use strict";
  43290. Object.defineProperty(exports, "__esModule", {
  43291. value: true
  43292. });
  43293. exports.default = void 0;
  43294. /**
  43295. * 求两个颜色之间的渐变值
  43296. * @param {string} startColor 开始的颜色
  43297. * @param {string} endColor 结束的颜色
  43298. * @param {number} step 颜色等分的份额
  43299. * */
  43300. function colorGradient() {
  43301. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  43302. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  43303. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  43304. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  43305. var startR = startRGB[0];
  43306. var startG = startRGB[1];
  43307. var startB = startRGB[2];
  43308. var endRGB = hexToRgb(endColor, false);
  43309. var endR = endRGB[0];
  43310. var endG = endRGB[1];
  43311. var endB = endRGB[2];
  43312. var sR = (endR - startR) / step; //总差值
  43313. var sG = (endG - startG) / step;
  43314. var sB = (endB - startB) / step;
  43315. var colorArr = [];
  43316. for (var i = 0; i < step; i++) {
  43317. //计算每一步的hex值
  43318. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB * i + startB) + ')');
  43319. colorArr.push(hex);
  43320. }
  43321. return colorArr;
  43322. }
  43323. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  43324. function hexToRgb(sColor) {
  43325. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  43326. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  43327. sColor = sColor.toLowerCase();
  43328. if (sColor && reg.test(sColor)) {
  43329. if (sColor.length === 4) {
  43330. var sColorNew = "#";
  43331. for (var i = 1; i < 4; i += 1) {
  43332. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  43333. }
  43334. sColor = sColorNew;
  43335. }
  43336. //处理六位的颜色值
  43337. var sColorChange = [];
  43338. for (var _i = 1; _i < 7; _i += 2) {
  43339. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  43340. }
  43341. if (!str) {
  43342. return sColorChange;
  43343. } else {
  43344. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  43345. }
  43346. } else if (/^(rgb|RGB)/.test(sColor)) {
  43347. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  43348. return arr.map(function (val) {
  43349. return Number(val);
  43350. });
  43351. } else {
  43352. return sColor;
  43353. }
  43354. }
  43355. ;
  43356. // 将rgb表示方式转换为hex表示方式
  43357. function rgbToHex(rgb) {
  43358. var _this = rgb;
  43359. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  43360. if (/^(rgb|RGB)/.test(_this)) {
  43361. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  43362. var strHex = "#";
  43363. for (var i = 0; i < aColor.length; i++) {
  43364. var hex = Number(aColor[i]).toString(16);
  43365. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  43366. if (hex === "0") {
  43367. hex += hex;
  43368. }
  43369. strHex += hex;
  43370. }
  43371. if (strHex.length !== 7) {
  43372. strHex = _this;
  43373. }
  43374. return strHex;
  43375. } else if (reg.test(_this)) {
  43376. var aNum = _this.replace(/#/, "").split("");
  43377. if (aNum.length === 6) {
  43378. return _this;
  43379. } else if (aNum.length === 3) {
  43380. var numHex = "#";
  43381. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  43382. numHex += aNum[_i2] + aNum[_i2];
  43383. }
  43384. return numHex;
  43385. }
  43386. } else {
  43387. return _this;
  43388. }
  43389. }
  43390. /**
  43391. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  43392. * sHex为传入的十六进制的色值
  43393. * alpha为rgba的透明度
  43394. */
  43395. function colorToRgba(color) {
  43396. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  43397. color = rgbToHex(color);
  43398. // 十六进制颜色值的正则表达式
  43399. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  43400. /* 16进制颜色转为RGB格式 */
  43401. var sColor = color.toLowerCase();
  43402. if (sColor && reg.test(sColor)) {
  43403. if (sColor.length === 4) {
  43404. var sColorNew = '#';
  43405. for (var i = 1; i < 4; i += 1) {
  43406. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  43407. }
  43408. sColor = sColorNew;
  43409. }
  43410. // 处理六位的颜色值
  43411. var sColorChange = [];
  43412. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  43413. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  43414. }
  43415. // return sColorChange.join(',')
  43416. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  43417. } else {
  43418. return sColor;
  43419. }
  43420. }
  43421. var _default = {
  43422. colorGradient: colorGradient,
  43423. hexToRgb: hexToRgb,
  43424. rgbToHex: rgbToHex,
  43425. colorToRgba: colorToRgba
  43426. };
  43427. exports.default = _default;
  43428. /***/ }),
  43429. /***/ 56:
  43430. /*!*****************************************************************!*\
  43431. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/guid.js ***!
  43432. \*****************************************************************/
  43433. /*! no static exports found */
  43434. /***/ (function(module, exports, __webpack_require__) {
  43435. "use strict";
  43436. Object.defineProperty(exports, "__esModule", {
  43437. value: true
  43438. });
  43439. exports.default = void 0;
  43440. /**
  43441. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  43442. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  43443. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  43444. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  43445. * v-for的时候,推荐使用后端返回的id而不是循环的index
  43446. * @param {Number} len uuid的长度
  43447. * @param {Boolean} firstU 将返回的首字母置为"u"
  43448. * @param {Number} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  43449. */
  43450. function guid() {
  43451. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  43452. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  43453. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  43454. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  43455. var uuid = [];
  43456. radix = radix || chars.length;
  43457. if (len) {
  43458. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  43459. for (var i = 0; i < len; i++) {
  43460. uuid[i] = chars[0 | Math.random() * radix];
  43461. }
  43462. } else {
  43463. var r;
  43464. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  43465. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  43466. uuid[14] = '4';
  43467. for (var _i = 0; _i < 36; _i++) {
  43468. if (!uuid[_i]) {
  43469. r = 0 | Math.random() * 16;
  43470. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  43471. }
  43472. }
  43473. }
  43474. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guid不能用作id或者class
  43475. if (firstU) {
  43476. uuid.shift();
  43477. return 'u' + uuid.join('');
  43478. } else {
  43479. return uuid.join('');
  43480. }
  43481. }
  43482. var _default = guid;
  43483. exports.default = _default;
  43484. /***/ }),
  43485. /***/ 57:
  43486. /*!******************************************************************!*\
  43487. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/color.js ***!
  43488. \******************************************************************/
  43489. /*! no static exports found */
  43490. /***/ (function(module, exports, __webpack_require__) {
  43491. "use strict";
  43492. Object.defineProperty(exports, "__esModule", {
  43493. value: true
  43494. });
  43495. exports.default = void 0;
  43496. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  43497. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  43498. var color = {
  43499. primary: "#2979ff",
  43500. primaryDark: "#2b85e4",
  43501. primaryDisabled: "#a0cfff",
  43502. primaryLight: "#ecf5ff",
  43503. bgColor: "#f3f4f6",
  43504. info: "#909399",
  43505. infoDark: "#82848a",
  43506. infoDisabled: "#c8c9cc",
  43507. infoLight: "#f4f4f5",
  43508. warning: "#ff9900",
  43509. warningDark: "#f29100",
  43510. warningDisabled: "#fcbd71",
  43511. warningLight: "#fdf6ec",
  43512. error: "#fa3534",
  43513. errorDark: "#dd6161",
  43514. errorDisabled: "#fab6b6",
  43515. errorLight: "#fef0f0",
  43516. success: "#19be6b",
  43517. successDark: "#18b566",
  43518. successDisabled: "#71d5a1",
  43519. successLight: "#dbf1e1",
  43520. mainColor: "#303133",
  43521. contentColor: "#606266",
  43522. tipsColor: "#909399",
  43523. lightColor: "#c0c4cc",
  43524. borderColor: "#e4e7ed"
  43525. };
  43526. var _default = color;
  43527. exports.default = _default;
  43528. /***/ }),
  43529. /***/ 58:
  43530. /*!**********************************************************************!*\
  43531. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/type2icon.js ***!
  43532. \**********************************************************************/
  43533. /*! no static exports found */
  43534. /***/ (function(module, exports, __webpack_require__) {
  43535. "use strict";
  43536. Object.defineProperty(exports, "__esModule", {
  43537. value: true
  43538. });
  43539. exports.default = void 0;
  43540. /**
  43541. * 根据主题type值,获取对应的图标
  43542. * @param String type 主题名称,primary|info|error|warning|success
  43543. * @param String fill 是否使用fill填充实体的图标
  43544. */
  43545. function type2icon() {
  43546. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  43547. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  43548. // 如果非预置值,默认为success
  43549. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  43550. var iconName = '';
  43551. // 目前(2019-12-12),info和primary使用同一个图标
  43552. switch (type) {
  43553. case 'primary':
  43554. iconName = 'info-circle';
  43555. break;
  43556. case 'info':
  43557. iconName = 'info-circle';
  43558. break;
  43559. case 'error':
  43560. iconName = 'close-circle';
  43561. break;
  43562. case 'warning':
  43563. iconName = 'error-circle';
  43564. break;
  43565. case 'success':
  43566. iconName = 'checkmark-circle';
  43567. break;
  43568. default:
  43569. iconName = 'checkmark-circle';
  43570. }
  43571. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  43572. if (fill) iconName += '-fill';
  43573. return iconName;
  43574. }
  43575. var _default = type2icon;
  43576. exports.default = _default;
  43577. /***/ }),
  43578. /***/ 59:
  43579. /*!************************************************************************!*\
  43580. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/randomArray.js ***!
  43581. \************************************************************************/
  43582. /*! no static exports found */
  43583. /***/ (function(module, exports, __webpack_require__) {
  43584. "use strict";
  43585. Object.defineProperty(exports, "__esModule", {
  43586. value: true
  43587. });
  43588. exports.default = void 0;
  43589. // 打乱数组
  43590. function randomArray() {
  43591. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  43592. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  43593. return array.sort(function () {
  43594. return Math.random() - 0.5;
  43595. });
  43596. }
  43597. var _default = randomArray;
  43598. exports.default = _default;
  43599. /***/ }),
  43600. /***/ 6:
  43601. /*!***************************************************************!*\
  43602. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  43603. \***************************************************************/
  43604. /*! no static exports found */
  43605. /***/ (function(module, exports) {
  43606. function _arrayWithHoles(arr) {
  43607. if (Array.isArray(arr)) return arr;
  43608. }
  43609. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  43610. /***/ }),
  43611. /***/ 60:
  43612. /*!********************************************************************!*\
  43613. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/addUnit.js ***!
  43614. \********************************************************************/
  43615. /*! no static exports found */
  43616. /***/ (function(module, exports, __webpack_require__) {
  43617. "use strict";
  43618. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  43619. Object.defineProperty(exports, "__esModule", {
  43620. value: true
  43621. });
  43622. exports.default = addUnit;
  43623. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 47));
  43624. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  43625. function addUnit() {
  43626. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  43627. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  43628. value = String(value);
  43629. // 用uView内置验证规则中的number判断是否为数值
  43630. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  43631. }
  43632. /***/ }),
  43633. /***/ 61:
  43634. /*!*******************************************************************!*\
  43635. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/random.js ***!
  43636. \*******************************************************************/
  43637. /*! no static exports found */
  43638. /***/ (function(module, exports, __webpack_require__) {
  43639. "use strict";
  43640. Object.defineProperty(exports, "__esModule", {
  43641. value: true
  43642. });
  43643. exports.default = void 0;
  43644. function random(min, max) {
  43645. if (min >= 0 && max > 0 && max >= min) {
  43646. var gab = max - min + 1;
  43647. return Math.floor(Math.random() * gab + min);
  43648. } else {
  43649. return 0;
  43650. }
  43651. }
  43652. var _default = random;
  43653. exports.default = _default;
  43654. /***/ }),
  43655. /***/ 62:
  43656. /*!*****************************************************************!*\
  43657. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/trim.js ***!
  43658. \*****************************************************************/
  43659. /*! no static exports found */
  43660. /***/ (function(module, exports, __webpack_require__) {
  43661. "use strict";
  43662. Object.defineProperty(exports, "__esModule", {
  43663. value: true
  43664. });
  43665. exports.default = void 0;
  43666. function trim(str) {
  43667. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  43668. if (pos == 'both') {
  43669. return str.replace(/^\s+|\s+$/g, "");
  43670. } else if (pos == "left") {
  43671. return str.replace(/^\s*/, '');
  43672. } else if (pos == 'right') {
  43673. return str.replace(/(\s*$)/g, "");
  43674. } else if (pos == 'all') {
  43675. return str.replace(/\s+/g, "");
  43676. } else {
  43677. return str;
  43678. }
  43679. }
  43680. var _default = trim;
  43681. exports.default = _default;
  43682. /***/ }),
  43683. /***/ 63:
  43684. /*!******************************************************************!*\
  43685. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/toast.js ***!
  43686. \******************************************************************/
  43687. /*! no static exports found */
  43688. /***/ (function(module, exports, __webpack_require__) {
  43689. "use strict";
  43690. /* WEBPACK VAR INJECTION */(function(uni) {
  43691. Object.defineProperty(exports, "__esModule", {
  43692. value: true
  43693. });
  43694. exports.default = void 0;
  43695. function toast(title) {
  43696. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  43697. uni.showToast({
  43698. title: title,
  43699. icon: 'none',
  43700. duration: duration
  43701. });
  43702. }
  43703. var _default = toast;
  43704. exports.default = _default;
  43705. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  43706. /***/ }),
  43707. /***/ 64:
  43708. /*!**********************************************************************!*\
  43709. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/getParent.js ***!
  43710. \**********************************************************************/
  43711. /*! no static exports found */
  43712. /***/ (function(module, exports, __webpack_require__) {
  43713. "use strict";
  43714. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  43715. Object.defineProperty(exports, "__esModule", {
  43716. value: true
  43717. });
  43718. exports.default = getParent;
  43719. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  43720. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  43721. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  43722. function getParent(name, keys) {
  43723. var parent = this.$parent;
  43724. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  43725. while (parent) {
  43726. // 父组件
  43727. if (parent.$options.name !== name) {
  43728. // 如果组件的name不相等,继续上一级寻找
  43729. parent = parent.$parent;
  43730. } else {
  43731. var _ret = function () {
  43732. var data = {};
  43733. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  43734. if (Array.isArray(keys)) {
  43735. keys.map(function (val) {
  43736. data[val] = parent[val] ? parent[val] : '';
  43737. });
  43738. } else {
  43739. // 历遍传过来的对象参数
  43740. for (var i in keys) {
  43741. // 如果子组件有此值则用,无此值则用父组件的值
  43742. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  43743. if (Array.isArray(keys[i])) {
  43744. if (keys[i].length) {
  43745. data[i] = keys[i];
  43746. } else {
  43747. data[i] = parent[i];
  43748. }
  43749. } else if (keys[i].constructor === Object) {
  43750. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  43751. if (Object.keys(keys[i]).length) {
  43752. data[i] = keys[i];
  43753. } else {
  43754. data[i] = parent[i];
  43755. }
  43756. } else {
  43757. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  43758. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  43759. }
  43760. }
  43761. }
  43762. return {
  43763. v: data
  43764. };
  43765. }();
  43766. if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
  43767. }
  43768. }
  43769. return {};
  43770. }
  43771. /***/ }),
  43772. /***/ 65:
  43773. /*!********************************************************************!*\
  43774. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/$parent.js ***!
  43775. \********************************************************************/
  43776. /*! no static exports found */
  43777. /***/ (function(module, exports, __webpack_require__) {
  43778. "use strict";
  43779. Object.defineProperty(exports, "__esModule", {
  43780. value: true
  43781. });
  43782. exports.default = $parent;
  43783. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  43784. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  43785. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  43786. // 值(默认为undefined),就是查找最顶层的$parent
  43787. function $parent() {
  43788. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  43789. var parent = this.$parent;
  43790. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  43791. while (parent) {
  43792. // 父组件
  43793. if (parent.$options && parent.$options.name !== name) {
  43794. // 如果组件的name不相等,继续上一级寻找
  43795. parent = parent.$parent;
  43796. } else {
  43797. return parent;
  43798. }
  43799. }
  43800. return false;
  43801. }
  43802. /***/ }),
  43803. /***/ 66:
  43804. /*!****************************************************************!*\
  43805. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/sys.js ***!
  43806. \****************************************************************/
  43807. /*! no static exports found */
  43808. /***/ (function(module, exports, __webpack_require__) {
  43809. "use strict";
  43810. /* WEBPACK VAR INJECTION */(function(uni) {
  43811. Object.defineProperty(exports, "__esModule", {
  43812. value: true
  43813. });
  43814. exports.os = os;
  43815. exports.sys = sys;
  43816. function os() {
  43817. return uni.getSystemInfoSync().platform;
  43818. }
  43819. ;
  43820. function sys() {
  43821. return uni.getSystemInfoSync();
  43822. }
  43823. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  43824. /***/ }),
  43825. /***/ 67:
  43826. /*!*********************************************************************!*\
  43827. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/debounce.js ***!
  43828. \*********************************************************************/
  43829. /*! no static exports found */
  43830. /***/ (function(module, exports, __webpack_require__) {
  43831. "use strict";
  43832. Object.defineProperty(exports, "__esModule", {
  43833. value: true
  43834. });
  43835. exports.default = void 0;
  43836. var timeout = null;
  43837. /**
  43838. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  43839. *
  43840. * @param {Function} func 要执行的回调函数
  43841. * @param {Number} wait 延时的时间
  43842. * @param {Boolean} immediate 是否立即执行
  43843. * @return null
  43844. */
  43845. function debounce(func) {
  43846. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  43847. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  43848. // 清除定时器
  43849. if (timeout !== null) clearTimeout(timeout);
  43850. // 立即执行,此类情况一般用不到
  43851. if (immediate) {
  43852. var callNow = !timeout;
  43853. timeout = setTimeout(function () {
  43854. timeout = null;
  43855. }, wait);
  43856. if (callNow) typeof func === 'function' && func();
  43857. } else {
  43858. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  43859. timeout = setTimeout(function () {
  43860. typeof func === 'function' && func();
  43861. }, wait);
  43862. }
  43863. }
  43864. var _default = debounce;
  43865. exports.default = _default;
  43866. /***/ }),
  43867. /***/ 68:
  43868. /*!*********************************************************************!*\
  43869. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/throttle.js ***!
  43870. \*********************************************************************/
  43871. /*! no static exports found */
  43872. /***/ (function(module, exports, __webpack_require__) {
  43873. "use strict";
  43874. Object.defineProperty(exports, "__esModule", {
  43875. value: true
  43876. });
  43877. exports.default = void 0;
  43878. var timer, flag;
  43879. /**
  43880. * 节流原理:在一定时间内,只能触发一次
  43881. *
  43882. * @param {Function} func 要执行的回调函数
  43883. * @param {Number} wait 延时的时间
  43884. * @param {Boolean} immediate 是否立即执行
  43885. * @return null
  43886. */
  43887. function throttle(func) {
  43888. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  43889. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  43890. if (immediate) {
  43891. if (!flag) {
  43892. flag = true;
  43893. // 如果是立即执行,则在wait毫秒内开始时执行
  43894. typeof func === 'function' && func();
  43895. timer = setTimeout(function () {
  43896. flag = false;
  43897. }, wait);
  43898. }
  43899. } else {
  43900. if (!flag) {
  43901. flag = true;
  43902. // 如果是非立即执行,则在wait毫秒内的结束处执行
  43903. timer = setTimeout(function () {
  43904. flag = false;
  43905. typeof func === 'function' && func();
  43906. }, wait);
  43907. }
  43908. }
  43909. }
  43910. ;
  43911. var _default = throttle;
  43912. exports.default = _default;
  43913. /***/ }),
  43914. /***/ 69:
  43915. /*!*****************************************************************!*\
  43916. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/config/config.js ***!
  43917. \*****************************************************************/
  43918. /*! no static exports found */
  43919. /***/ (function(module, exports, __webpack_require__) {
  43920. "use strict";
  43921. Object.defineProperty(exports, "__esModule", {
  43922. value: true
  43923. });
  43924. exports.default = void 0;
  43925. // 此版本发布于2022-04-19
  43926. var version = '1.8.6';
  43927. var _default = {
  43928. v: version,
  43929. version: version,
  43930. // 主题名称
  43931. type: ['primary', 'success', 'info', 'error', 'warning']
  43932. };
  43933. exports.default = _default;
  43934. /***/ }),
  43935. /***/ 7:
  43936. /*!*********************************************************************!*\
  43937. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  43938. \*********************************************************************/
  43939. /*! no static exports found */
  43940. /***/ (function(module, exports) {
  43941. function _iterableToArrayLimit(arr, i) {
  43942. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  43943. if (null != _i) {
  43944. var _s,
  43945. _e,
  43946. _x,
  43947. _r,
  43948. _arr = [],
  43949. _n = !0,
  43950. _d = !1;
  43951. try {
  43952. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  43953. if (Object(_i) !== _i) return;
  43954. _n = !1;
  43955. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  43956. ;
  43957. }
  43958. } catch (err) {
  43959. _d = !0, _e = err;
  43960. } finally {
  43961. try {
  43962. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  43963. } finally {
  43964. if (_d) throw _e;
  43965. }
  43966. }
  43967. return _arr;
  43968. }
  43969. }
  43970. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  43971. /***/ }),
  43972. /***/ 70:
  43973. /*!*****************************************************************!*\
  43974. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/config/zIndex.js ***!
  43975. \*****************************************************************/
  43976. /*! no static exports found */
  43977. /***/ (function(module, exports, __webpack_require__) {
  43978. "use strict";
  43979. Object.defineProperty(exports, "__esModule", {
  43980. value: true
  43981. });
  43982. exports.default = void 0;
  43983. // uniapp在H5中各API的z-index值如下:
  43984. /**
  43985. * actionsheet: 999
  43986. * modal: 999
  43987. * navigate: 998
  43988. * tabbar: 998
  43989. * toast: 999
  43990. */
  43991. var _default = {
  43992. toast: 10090,
  43993. noNetwork: 10080,
  43994. // popup包含popup,actionsheet,keyboard,picker的值
  43995. popup: 10075,
  43996. mask: 10070,
  43997. navbar: 980,
  43998. topTips: 975,
  43999. sticky: 970,
  44000. indexListSticky: 965
  44001. };
  44002. exports.default = _default;
  44003. /***/ }),
  44004. /***/ 8:
  44005. /*!***************************************************************************!*\
  44006. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  44007. \***************************************************************************/
  44008. /*! no static exports found */
  44009. /***/ (function(module, exports, __webpack_require__) {
  44010. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  44011. function _unsupportedIterableToArray(o, minLen) {
  44012. if (!o) return;
  44013. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  44014. var n = Object.prototype.toString.call(o).slice(8, -1);
  44015. if (n === "Object" && o.constructor) n = o.constructor.name;
  44016. if (n === "Map" || n === "Set") return Array.from(o);
  44017. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  44018. }
  44019. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  44020. /***/ }),
  44021. /***/ 9:
  44022. /*!*****************************************************************!*\
  44023. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  44024. \*****************************************************************/
  44025. /*! no static exports found */
  44026. /***/ (function(module, exports) {
  44027. function _arrayLikeToArray(arr, len) {
  44028. if (len == null || len > arr.length) len = arr.length;
  44029. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  44030. arr2[i] = arr[i];
  44031. }
  44032. return arr2;
  44033. }
  44034. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  44035. /***/ })
  44036. }]);
  44037. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map