vendor.js 1.3 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185
  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({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","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({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","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({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","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({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","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({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","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);
  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. }), _getDistrict$getUnit$);
  9072. exports.default = _default;
  9073. /***/ }),
  9074. /***/ 35:
  9075. /*!****************************************************!*\
  9076. !*** E:/Desktop/zd_wechatApp(1)/common/request.js ***!
  9077. \****************************************************/
  9078. /*! no static exports found */
  9079. /***/ (function(module, exports, __webpack_require__) {
  9080. "use strict";
  9081. /* WEBPACK VAR INJECTION */(function(uni) {
  9082. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9083. Object.defineProperty(exports, "__esModule", {
  9084. value: true
  9085. });
  9086. exports.default = void 0;
  9087. var _http = _interopRequireDefault(__webpack_require__(/*! ./http.js */ 36));
  9088. var _default = {
  9089. // 请求方法
  9090. requestEn: function requestEn(url) {
  9091. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9092. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9093. return new Promise(function (resolve, reject) {
  9094. // console.log(http.webUrl + url +'---'+ uni.getStorageSync('token'))
  9095. uni.request({
  9096. url: _http.default.webUrl + url,
  9097. method: methods ? methods : 'GET',
  9098. data: data,
  9099. success: function success(res) {
  9100. if (res.data.code === 200) {
  9101. resolve(res.data.data === undefined ? null : res.data.data);
  9102. } else if (res.data.code === 403 || res.data.code === 401) {
  9103. uni.showToast({
  9104. title: 'Token超时,请重新登录',
  9105. icon: 'none'
  9106. });
  9107. if (uni.getStorageSync('token')) {
  9108. uni.removeStorage({
  9109. key: 'token',
  9110. success: function success() {
  9111. uni.navigateTo({
  9112. url: '/pages/login/login'
  9113. });
  9114. }
  9115. });
  9116. } else {
  9117. uni.navigateTo({
  9118. url: '/pages/login/login'
  9119. });
  9120. }
  9121. } else {
  9122. uni.showToast({
  9123. title: res.data.msg ? res.data.msg : '系统异常',
  9124. icon: 'none'
  9125. });
  9126. }
  9127. },
  9128. fail: function fail() {
  9129. uni.showToast({
  9130. title: '网络异常',
  9131. icon: 'none'
  9132. });
  9133. }
  9134. });
  9135. });
  9136. },
  9137. // 请求方法
  9138. requestFn: function requestFn(url) {
  9139. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9140. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9141. return new Promise(function (resolve, reject) {
  9142. console.log(_http.default.webUrl + url + '---' + uni.getStorageSync('token'));
  9143. uni.request({
  9144. url: _http.default.webUrl + url,
  9145. method: methods ? methods : 'GET',
  9146. data: data,
  9147. header: {
  9148. "MAuthorization": "wxBearer ".concat(uni.getStorageSync('token') ? uni.getStorageSync('token') : ''),
  9149. "userType": 'MOdBILE'
  9150. },
  9151. success: function success(res) {
  9152. console.log(res);
  9153. if (res.data.code === 200) {
  9154. resolve(res.data.data === undefined ? null : res.data.data);
  9155. } else if (res.data.code === 403 || res.data.code === 401) {
  9156. uni.showToast({
  9157. title: 'Token超时,请重新登录',
  9158. icon: 'none'
  9159. });
  9160. if (uni.getStorageSync('token')) {
  9161. uni.removeStorage({
  9162. key: 'token',
  9163. success: function success() {
  9164. uni.navigateTo({
  9165. url: '/pages/login/login'
  9166. });
  9167. }
  9168. });
  9169. } else {
  9170. uni.navigateTo({
  9171. url: '/pages/login/login'
  9172. });
  9173. }
  9174. } else {
  9175. uni.showToast({
  9176. title: res.data.msg ? res.data.msg : '系统异常',
  9177. icon: 'none'
  9178. });
  9179. }
  9180. },
  9181. fail: function fail() {
  9182. uni.showToast({
  9183. title: '网络异常',
  9184. icon: 'none'
  9185. });
  9186. }
  9187. });
  9188. });
  9189. },
  9190. requestLo: function requestLo(url) {
  9191. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9192. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9193. return new Promise(function (resolve, reject) {
  9194. console.log(_http.default.webUrl + url);
  9195. uni.request({
  9196. url: _http.default.webUrl + url,
  9197. method: methods ? methods : 'GET',
  9198. data: data,
  9199. header: {
  9200. "userType": 'MOBILE'
  9201. },
  9202. success: function success(res) {
  9203. console.log(res);
  9204. if (res.data.code === 200) {
  9205. resolve(res.data === undefined ? null : res.data);
  9206. } else if (res.data.code === 403) {
  9207. uni.showToast({
  9208. title: res.data.msg ? res.data.msg : 'Token超时,请重新登录',
  9209. icon: 'none'
  9210. });
  9211. if (uni.getStorageSync('token')) {
  9212. uni.removeStorage({
  9213. key: 'token',
  9214. success: function success() {
  9215. uni.navigateTo({
  9216. url: '/pages/login/login'
  9217. });
  9218. }
  9219. });
  9220. } else {
  9221. uni.navigateTo({
  9222. url: '/pages/login/login'
  9223. });
  9224. }
  9225. } else {
  9226. uni.showToast({
  9227. title: res.data.msg ? res.data.msg : '系统异常',
  9228. icon: 'none'
  9229. });
  9230. }
  9231. },
  9232. fail: function fail() {
  9233. uni.showToast({
  9234. title: '网络异常',
  9235. icon: 'none'
  9236. });
  9237. }
  9238. });
  9239. });
  9240. }
  9241. };
  9242. exports.default = _default;
  9243. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9244. /***/ }),
  9245. /***/ 358:
  9246. /*!****************************************************************!*\
  9247. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/emitter.js ***!
  9248. \****************************************************************/
  9249. /*! no static exports found */
  9250. /***/ (function(module, exports, __webpack_require__) {
  9251. "use strict";
  9252. Object.defineProperty(exports, "__esModule", {
  9253. value: true
  9254. });
  9255. exports.default = void 0;
  9256. /**
  9257. * 递归使用 call 方式this指向
  9258. * @param componentName // 需要找的组件的名称
  9259. * @param eventName // 事件名称
  9260. * @param params // 需要传递的参数
  9261. */
  9262. function _broadcast(componentName, eventName, params) {
  9263. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  9264. this.$children.map(function (child) {
  9265. if (componentName === child.$options.name) {
  9266. child.$emit.apply(child, [eventName].concat(params));
  9267. } else {
  9268. _broadcast.apply(child, [componentName, eventName].concat(params));
  9269. }
  9270. });
  9271. }
  9272. var _default = {
  9273. methods: {
  9274. /**
  9275. * 派发 (向上查找) (一个)
  9276. * @param componentName // 需要找的组件的名称
  9277. * @param eventName // 事件名称
  9278. * @param params // 需要传递的参数
  9279. */
  9280. dispatch: function dispatch(componentName, eventName, params) {
  9281. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  9282. var name = parent.$options.name; // 获取当前组件实例的name
  9283. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  9284. // 循环出当前名称的一样的组件实例
  9285. while (parent && (!name || name !== componentName)) {
  9286. parent = parent.$parent;
  9287. if (parent) {
  9288. name = parent.$options.name;
  9289. }
  9290. }
  9291. // 有节点表示当前找到了name一样的实例
  9292. if (parent) {
  9293. parent.$emit.apply(parent, [eventName].concat(params));
  9294. }
  9295. },
  9296. /**
  9297. * 广播 (向下查找) (广播多个)
  9298. * @param componentName // 需要找的组件的名称
  9299. * @param eventName // 事件名称
  9300. * @param params // 需要传递的参数
  9301. */
  9302. broadcast: function broadcast(componentName, eventName, params) {
  9303. _broadcast.call(this, componentName, eventName, params);
  9304. }
  9305. }
  9306. };
  9307. exports.default = _default;
  9308. /***/ }),
  9309. /***/ 36:
  9310. /*!*************************************************!*\
  9311. !*** E:/Desktop/zd_wechatApp(1)/common/http.js ***!
  9312. \*************************************************/
  9313. /*! no static exports found */
  9314. /***/ (function(module, exports, __webpack_require__) {
  9315. "use strict";
  9316. Object.defineProperty(exports, "__esModule", {
  9317. value: true
  9318. });
  9319. exports.default = void 0;
  9320. // 配置信息
  9321. var _default = {
  9322. // webUrl: 'http://127.0.0.1:8080',
  9323. // webUrl: 'https://www.cczdsz.cn/prod-api/',
  9324. // webUrl: 'http://124.221.101.24:8082',
  9325. webUrl: 'http://192.168.4.20:8080'
  9326. };
  9327. exports.default = _default;
  9328. /***/ }),
  9329. /***/ 37:
  9330. /*!***********************************************!*\
  9331. !*** E:/Desktop/zd_wechatApp(1)/api/login.js ***!
  9332. \***********************************************/
  9333. /*! no static exports found */
  9334. /***/ (function(module, exports, __webpack_require__) {
  9335. "use strict";
  9336. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9337. Object.defineProperty(exports, "__esModule", {
  9338. value: true
  9339. });
  9340. exports.default = void 0;
  9341. var _request = _interopRequireDefault(__webpack_require__(/*! ../common/request.js */ 35));
  9342. var _default = {
  9343. // 登录
  9344. login: function login(data) {
  9345. return _request.default.requestEn('/mobile/user', data, 'POST');
  9346. }
  9347. };
  9348. exports.default = _default;
  9349. /***/ }),
  9350. /***/ 38:
  9351. /*!**************************************************!*\
  9352. !*** E:/Desktop/zd_wechatApp(1)/common/utils.js ***!
  9353. \**************************************************/
  9354. /*! no static exports found */
  9355. /***/ (function(module, exports, __webpack_require__) {
  9356. "use strict";
  9357. /* WEBPACK VAR INJECTION */(function(uni) {
  9358. Object.defineProperty(exports, "__esModule", {
  9359. value: true
  9360. });
  9361. exports.default = void 0;
  9362. var _default = {
  9363. // 页面提示信息函数
  9364. showPrompt: function showPrompt(msg) {
  9365. uni.showToast({
  9366. title: msg,
  9367. icon: 'none',
  9368. mask: true
  9369. });
  9370. },
  9371. // APP名称
  9372. appName: function appName() {
  9373. return "贞达市政工程";
  9374. },
  9375. formatRichText: function formatRichText(html) {
  9376. var newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
  9377. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  9378. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  9379. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  9380. return match;
  9381. });
  9382. newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {
  9383. match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
  9384. return match;
  9385. });
  9386. newContent = newContent.replace(/<br[^>]*\/>/gi, '');
  9387. newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"');
  9388. return newContent;
  9389. },
  9390. getHeight: function getHeight(e) {
  9391. console.log(e);
  9392. },
  9393. changeTwoDecimal_f: function changeTwoDecimal_f(x) {
  9394. var f_x = parseFloat(x);
  9395. if (isNaN(f_x)) {
  9396. return 0;
  9397. }
  9398. var f_x = Math.round(x * 100) / 100;
  9399. var s_x = f_x.toString();
  9400. var pos_decimal = s_x.indexOf('.');
  9401. if (pos_decimal < 0) {
  9402. pos_decimal = s_x.length;
  9403. s_x += '.';
  9404. }
  9405. while (s_x.length <= pos_decimal + 2) {
  9406. s_x += '0';
  9407. }
  9408. return s_x;
  9409. },
  9410. // token过期
  9411. tokenOverdue: function tokenOverdue() {
  9412. uni.setStorage({
  9413. key: "jumpUrl",
  9414. data: ''
  9415. });
  9416. uni.setStorage({
  9417. key: "jumpType",
  9418. data: ''
  9419. });
  9420. uni.navigateTo({
  9421. url: "/pages/login/login"
  9422. });
  9423. },
  9424. checkLoginTo: function checkLoginTo(url, type) {
  9425. console.log(type);
  9426. var status = uni.getStorageSync('token');
  9427. console.log(status);
  9428. if (status) {
  9429. uni.navigateTo({
  9430. url: url
  9431. });
  9432. } else {
  9433. uni.showModal({
  9434. title: '',
  9435. content: '您未登录,是否登录?',
  9436. success: function success(res) {
  9437. if (res.confirm) {
  9438. uni.setStorage({
  9439. key: "jumpUrl",
  9440. data: url
  9441. });
  9442. uni.setStorage({
  9443. key: "jumpType",
  9444. data: type
  9445. });
  9446. uni.navigateTo({
  9447. url: "/pages/login/login"
  9448. });
  9449. }
  9450. }
  9451. });
  9452. }
  9453. },
  9454. // 拨打电话
  9455. toCall: function toCall(tel) {
  9456. if (!tel) {
  9457. this.showPrompt('暂无商家电话');
  9458. return;
  9459. }
  9460. uni.makePhoneCall({
  9461. phoneNumber: tel
  9462. });
  9463. },
  9464. toBack: function toBack() {
  9465. uni.navigateBack({
  9466. delta: 1
  9467. });
  9468. },
  9469. // 图片预览
  9470. previewImage: function previewImage(url) {
  9471. var urlList = [];
  9472. if (typeof url == 'string') {
  9473. urlList.push(url);
  9474. } else {
  9475. urlList = url;
  9476. }
  9477. uni.previewImage({
  9478. urls: urlList
  9479. });
  9480. },
  9481. // 登录成功后的跳转
  9482. loginSuccess: function loginSuccess() {
  9483. var type = uni.getStorageSync('jumpType');
  9484. // console.log(type)
  9485. if (type) {
  9486. var url = uni.getStorageSync('jumpUrl');
  9487. // console.log(url)
  9488. if (!url) {
  9489. uni.navigateBack({
  9490. delta: 1
  9491. });
  9492. return;
  9493. }
  9494. if (type == 'page') {
  9495. uni.redirectTo({
  9496. url: url
  9497. });
  9498. } else {
  9499. uni.switchTab({
  9500. url: url,
  9501. fail: function fail(error) {
  9502. console.log(error);
  9503. }
  9504. });
  9505. }
  9506. } else {
  9507. // uni.switchTab({
  9508. // url: "/pages/index/index"
  9509. // })
  9510. uni.navigateBack({
  9511. delta: 1
  9512. });
  9513. }
  9514. },
  9515. parseNumber: function parseNumber(num) {
  9516. return num < 10 ? "0" + num : num;
  9517. },
  9518. // 时间格式化基类
  9519. dateFormat: function dateFormat(date, formatStr) {
  9520. var dateObj = {},
  9521. rStr = /\{([^}]+)\}/,
  9522. mons = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
  9523. dateObj["Y"] = date.getFullYear();
  9524. dateObj["M"] = date.getMonth() + 1;
  9525. dateObj["MM"] = this.parseNumber(dateObj["M"]);
  9526. dateObj["Mon"] = mons[dateObj['M'] - 1];
  9527. dateObj["D"] = date.getDate();
  9528. dateObj["DD"] = this.parseNumber(dateObj["D"]);
  9529. dateObj["h"] = date.getHours();
  9530. dateObj["hh"] = this.parseNumber(dateObj["h"]);
  9531. // dateObj["t"] = dateObj["h"] > 12 ? dateObj["h"] - 12 : dateObj["h"];
  9532. dateObj["t"] = dateObj["h"];
  9533. dateObj["tt"] = this.parseNumber(dateObj["t"]);
  9534. // dateObj["A"] = dateObj["h"] > 12 ? '下午' : '上午';
  9535. dateObj["i"] = date.getMinutes();
  9536. dateObj["ii"] = this.parseNumber(dateObj["i"]);
  9537. dateObj["s"] = date.getSeconds();
  9538. dateObj["ss"] = this.parseNumber(dateObj["s"]);
  9539. while (rStr.test(formatStr)) {
  9540. formatStr = formatStr.replace(rStr, dateObj[RegExp.$1]);
  9541. }
  9542. return formatStr;
  9543. },
  9544. // 时间格式 年月日时分秒
  9545. gettime: function gettime(shorttime, type) {
  9546. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9547. var now = new Date().getTime();
  9548. var cha = (now - parseInt(shorttime)) / 1000;
  9549. // type: 格式化类型 1为年月日时分秒 2为年月日时分 3为年月日
  9550. if (type == 1) {
  9551. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}:{ss}");
  9552. } else if (type == 2) {
  9553. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}");
  9554. } else if (type == 3) {
  9555. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9556. }
  9557. },
  9558. // 时间格式 年月日
  9559. getDate: function getDate(shorttime) {
  9560. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9561. var now = new Date().getTime();
  9562. var cha = (now - parseInt(shorttime)) / 1000;
  9563. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9564. },
  9565. // 时间格式 月日
  9566. getDateMd: function getDateMd(shorttime) {
  9567. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9568. var now = new Date().getTime();
  9569. var cha = (now - parseInt(shorttime)) / 1000;
  9570. return this.dateFormat(new Date(shorttime), "{MM}-{DD}");
  9571. },
  9572. getSevenDate: function getSevenDate(num) {
  9573. var date1 = new Date();
  9574. //今天时间
  9575. var time1 = (date1.getMonth() + 1 < 10 ? '0' + (date1.getMonth() + 1).toString() : date1.getMonth() + 1) + "-" + (date1.getDate() < 10 ? '0' + date1.getDate().toString() : date1.getDate());
  9576. var date2 = new Date(date1);
  9577. date2.setDate(date1.getDate() + num);
  9578. //num是正数表示之后的时间,num负数表示之前的时间,0表示今天
  9579. var time2 = date2.getMonth() + 1 + "-" + date2.getDate();
  9580. return this.getdiffdate(time1, time2, num);
  9581. },
  9582. //获取两日期之间日期列表函数
  9583. getdiffdate: function getdiffdate(stime, etime, num) {
  9584. //初始化日期列表,数组
  9585. var diffdate = new Array();
  9586. var i = 0;
  9587. //开始日期小于等于结束日期,并循环
  9588. while (i <= num - 1) {
  9589. diffdate.push({
  9590. dateStr: stime,
  9591. weekStr: this.getWeek(new Date().getFullYear().toString() + "-" + stime)
  9592. });
  9593. //获取开始日期时间戳
  9594. var stime_ts = new Date(stime).getTime();
  9595. // console.log('当前日期:'+stime +'当前时间戳:'+stime_ts)
  9596. //增加一天时间戳后的日期
  9597. var next_date = stime_ts + 24 * 60 * 60 * 1000;
  9598. //拼接年月日,这里的月份会返回(0-11),所以要+1
  9599. var next_dates_y = new Date(next_date).getFullYear() + '-';
  9600. var next_dates_m = new Date(next_date).getMonth() + 1 < 10 ? '0' + (new Date(next_date).getMonth() + 1) + '-' : new Date(next_date).getMonth() + 1 + '-';
  9601. var next_dates_d = new Date(next_date).getDate() < 10 ? '0' + new Date(next_date).getDate() : new Date(next_date).getDate();
  9602. stime = next_dates_m + next_dates_d;
  9603. // 增加数组key
  9604. i++;
  9605. }
  9606. return diffdate;
  9607. },
  9608. // 根据日期转换星期
  9609. getWeek: function getWeek(dateString) {
  9610. var dateArray = dateString.split("-");
  9611. var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
  9612. return "周" + "日一二三四五六".charAt(date.getDay());
  9613. },
  9614. // 获取当前位置
  9615. getNowAddress: function getNowAddress() {
  9616. console.log(222);
  9617. return new Promise(function (resolve, reject) {
  9618. var mapkey = '';
  9619. mapkey = 'c827c04d1d74d8589ec826fce02a135a';
  9620. console.log(mapkey);
  9621. var amapPlugin = new amap.AMapWX({
  9622. key: mapkey
  9623. });
  9624. amapPlugin.getRegeo({
  9625. success: function success(res) {
  9626. resolve(res[0]);
  9627. },
  9628. fail: function fail(error) {
  9629. console.log(error);
  9630. uni.showToast({
  9631. mask: true,
  9632. icon: "none",
  9633. title: error
  9634. });
  9635. }
  9636. });
  9637. });
  9638. }
  9639. };
  9640. exports.default = _default;
  9641. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9642. /***/ }),
  9643. /***/ 387:
  9644. /*!************************************************************************!*\
  9645. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/async-validator.js ***!
  9646. \************************************************************************/
  9647. /*! no static exports found */
  9648. /***/ (function(module, exports, __webpack_require__) {
  9649. "use strict";
  9650. /* WEBPACK VAR INJECTION */(function(process) {
  9651. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9652. Object.defineProperty(exports, "__esModule", {
  9653. value: true
  9654. });
  9655. exports.default = void 0;
  9656. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9657. function _extends() {
  9658. _extends = Object.assign || function (target) {
  9659. for (var i = 1; i < arguments.length; i++) {
  9660. var source = arguments[i];
  9661. for (var key in source) {
  9662. if (Object.prototype.hasOwnProperty.call(source, key)) {
  9663. target[key] = source[key];
  9664. }
  9665. }
  9666. }
  9667. return target;
  9668. };
  9669. return _extends.apply(this, arguments);
  9670. }
  9671. /* eslint no-console:0 */
  9672. var formatRegExp = /%[sdj%]/g;
  9673. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  9674. if (typeof process !== 'undefined' && Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
  9675. warning = function warning(type, errors) {
  9676. if (typeof console !== 'undefined' && console.warn) {
  9677. if (errors.every(function (e) {
  9678. return typeof e === 'string';
  9679. })) {
  9680. console.warn(type, errors);
  9681. }
  9682. }
  9683. };
  9684. }
  9685. function convertFieldsError(errors) {
  9686. if (!errors || !errors.length) return null;
  9687. var fields = {};
  9688. errors.forEach(function (error) {
  9689. var field = error.field;
  9690. fields[field] = fields[field] || [];
  9691. fields[field].push(error);
  9692. });
  9693. return fields;
  9694. }
  9695. function format() {
  9696. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  9697. args[_key] = arguments[_key];
  9698. }
  9699. var i = 1;
  9700. var f = args[0];
  9701. var len = args.length;
  9702. if (typeof f === 'function') {
  9703. return f.apply(null, args.slice(1));
  9704. }
  9705. if (typeof f === 'string') {
  9706. var str = String(f).replace(formatRegExp, function (x) {
  9707. if (x === '%%') {
  9708. return '%';
  9709. }
  9710. if (i >= len) {
  9711. return x;
  9712. }
  9713. switch (x) {
  9714. case '%s':
  9715. return String(args[i++]);
  9716. case '%d':
  9717. return Number(args[i++]);
  9718. case '%j':
  9719. try {
  9720. return JSON.stringify(args[i++]);
  9721. } catch (_) {
  9722. return '[Circular]';
  9723. }
  9724. break;
  9725. default:
  9726. return x;
  9727. }
  9728. });
  9729. for (var arg = args[i]; i < len; arg = args[++i]) {
  9730. str += " " + arg;
  9731. }
  9732. return str;
  9733. }
  9734. return f;
  9735. }
  9736. function isNativeStringType(type) {
  9737. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  9738. }
  9739. function isEmptyValue(value, type) {
  9740. if (value === undefined || value === null) {
  9741. return true;
  9742. }
  9743. if (type === 'array' && Array.isArray(value) && !value.length) {
  9744. return true;
  9745. }
  9746. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  9747. return true;
  9748. }
  9749. return false;
  9750. }
  9751. function asyncParallelArray(arr, func, callback) {
  9752. var results = [];
  9753. var total = 0;
  9754. var arrLength = arr.length;
  9755. function count(errors) {
  9756. results.push.apply(results, errors);
  9757. total++;
  9758. if (total === arrLength) {
  9759. callback(results);
  9760. }
  9761. }
  9762. arr.forEach(function (a) {
  9763. func(a, count);
  9764. });
  9765. }
  9766. function asyncSerialArray(arr, func, callback) {
  9767. var index = 0;
  9768. var arrLength = arr.length;
  9769. function next(errors) {
  9770. if (errors && errors.length) {
  9771. callback(errors);
  9772. return;
  9773. }
  9774. var original = index;
  9775. index = index + 1;
  9776. if (original < arrLength) {
  9777. func(arr[original], next);
  9778. } else {
  9779. callback([]);
  9780. }
  9781. }
  9782. next([]);
  9783. }
  9784. function flattenObjArr(objArr) {
  9785. var ret = [];
  9786. Object.keys(objArr).forEach(function (k) {
  9787. ret.push.apply(ret, objArr[k]);
  9788. });
  9789. return ret;
  9790. }
  9791. function asyncMap(objArr, option, func, callback) {
  9792. if (option.first) {
  9793. var _pending = new Promise(function (resolve, reject) {
  9794. var next = function next(errors) {
  9795. callback(errors);
  9796. return errors.length ? reject({
  9797. errors: errors,
  9798. fields: convertFieldsError(errors)
  9799. }) : resolve();
  9800. };
  9801. var flattenArr = flattenObjArr(objArr);
  9802. asyncSerialArray(flattenArr, func, next);
  9803. });
  9804. _pending["catch"](function (e) {
  9805. return e;
  9806. });
  9807. return _pending;
  9808. }
  9809. var firstFields = option.firstFields || [];
  9810. if (firstFields === true) {
  9811. firstFields = Object.keys(objArr);
  9812. }
  9813. var objArrKeys = Object.keys(objArr);
  9814. var objArrLength = objArrKeys.length;
  9815. var total = 0;
  9816. var results = [];
  9817. var pending = new Promise(function (resolve, reject) {
  9818. var next = function next(errors) {
  9819. results.push.apply(results, errors);
  9820. total++;
  9821. if (total === objArrLength) {
  9822. callback(results);
  9823. return results.length ? reject({
  9824. errors: results,
  9825. fields: convertFieldsError(results)
  9826. }) : resolve();
  9827. }
  9828. };
  9829. if (!objArrKeys.length) {
  9830. callback(results);
  9831. resolve();
  9832. }
  9833. objArrKeys.forEach(function (key) {
  9834. var arr = objArr[key];
  9835. if (firstFields.indexOf(key) !== -1) {
  9836. asyncSerialArray(arr, func, next);
  9837. } else {
  9838. asyncParallelArray(arr, func, next);
  9839. }
  9840. });
  9841. });
  9842. pending["catch"](function (e) {
  9843. return e;
  9844. });
  9845. return pending;
  9846. }
  9847. function complementError(rule) {
  9848. return function (oe) {
  9849. if (oe && oe.message) {
  9850. oe.field = oe.field || rule.fullField;
  9851. return oe;
  9852. }
  9853. return {
  9854. message: typeof oe === 'function' ? oe() : oe,
  9855. field: oe.field || rule.fullField
  9856. };
  9857. };
  9858. }
  9859. function deepMerge(target, source) {
  9860. if (source) {
  9861. for (var s in source) {
  9862. if (source.hasOwnProperty(s)) {
  9863. var value = source[s];
  9864. if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
  9865. target[s] = _extends({}, target[s], {}, value);
  9866. } else {
  9867. target[s] = value;
  9868. }
  9869. }
  9870. }
  9871. }
  9872. return target;
  9873. }
  9874. /**
  9875. * Rule for validating required fields.
  9876. *
  9877. * @param rule The validation rule.
  9878. * @param value The value of the field on the source object.
  9879. * @param source The source object being validated.
  9880. * @param errors An array of errors that this rule may add
  9881. * validation errors to.
  9882. * @param options The validation options.
  9883. * @param options.messages The validation messages.
  9884. */
  9885. function required(rule, value, source, errors, options, type) {
  9886. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  9887. errors.push(format(options.messages.required, rule.fullField));
  9888. }
  9889. }
  9890. /**
  9891. * Rule for validating whitespace.
  9892. *
  9893. * @param rule The validation rule.
  9894. * @param value The value of the field on the source object.
  9895. * @param source The source object being validated.
  9896. * @param errors An array of errors that this rule may add
  9897. * validation errors to.
  9898. * @param options The validation options.
  9899. * @param options.messages The validation messages.
  9900. */
  9901. function whitespace(rule, value, source, errors, options) {
  9902. if (/^\s+$/.test(value) || value === '') {
  9903. errors.push(format(options.messages.whitespace, rule.fullField));
  9904. }
  9905. }
  9906. /* eslint max-len:0 */
  9907. var pattern = {
  9908. // http://emailregex.com/
  9909. 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,}))$/,
  9910. 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'),
  9911. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  9912. };
  9913. var types = {
  9914. integer: function integer(value) {
  9915. return types.number(value) && parseInt(value, 10) === value;
  9916. },
  9917. "float": function float(value) {
  9918. return types.number(value) && !types.integer(value);
  9919. },
  9920. array: function array(value) {
  9921. return Array.isArray(value);
  9922. },
  9923. regexp: function regexp(value) {
  9924. if (value instanceof RegExp) {
  9925. return true;
  9926. }
  9927. try {
  9928. return !!new RegExp(value);
  9929. } catch (e) {
  9930. return false;
  9931. }
  9932. },
  9933. date: function date(value) {
  9934. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  9935. },
  9936. number: function number(value) {
  9937. if (isNaN(value)) {
  9938. return false;
  9939. }
  9940. // 修改源码,将字符串数值先转为数值
  9941. return typeof +value === 'number';
  9942. },
  9943. object: function object(value) {
  9944. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  9945. },
  9946. method: function method(value) {
  9947. return typeof value === 'function';
  9948. },
  9949. email: function email(value) {
  9950. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  9951. },
  9952. url: function url(value) {
  9953. return typeof value === 'string' && !!value.match(pattern.url);
  9954. },
  9955. hex: function hex(value) {
  9956. return typeof value === 'string' && !!value.match(pattern.hex);
  9957. }
  9958. };
  9959. /**
  9960. * Rule for validating the type of a value.
  9961. *
  9962. * @param rule The validation rule.
  9963. * @param value The value of the field on the source object.
  9964. * @param source The source object being validated.
  9965. * @param errors An array of errors that this rule may add
  9966. * validation errors to.
  9967. * @param options The validation options.
  9968. * @param options.messages The validation messages.
  9969. */
  9970. function type(rule, value, source, errors, options) {
  9971. if (rule.required && value === undefined) {
  9972. required(rule, value, source, errors, options);
  9973. return;
  9974. }
  9975. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  9976. var ruleType = rule.type;
  9977. if (custom.indexOf(ruleType) > -1) {
  9978. if (!types[ruleType](value)) {
  9979. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  9980. } // straight typeof check
  9981. } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
  9982. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  9983. }
  9984. }
  9985. /**
  9986. * Rule for validating minimum and maximum allowed values.
  9987. *
  9988. * @param rule The validation rule.
  9989. * @param value The value of the field on the source object.
  9990. * @param source The source object being validated.
  9991. * @param errors An array of errors that this rule may add
  9992. * validation errors to.
  9993. * @param options The validation options.
  9994. * @param options.messages The validation messages.
  9995. */
  9996. function range(rule, value, source, errors, options) {
  9997. var len = typeof rule.len === 'number';
  9998. var min = typeof rule.min === 'number';
  9999. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  10000. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  10001. var val = value;
  10002. var key = null;
  10003. var num = typeof value === 'number';
  10004. var str = typeof value === 'string';
  10005. var arr = Array.isArray(value);
  10006. if (num) {
  10007. key = 'number';
  10008. } else if (str) {
  10009. key = 'string';
  10010. } else if (arr) {
  10011. key = 'array';
  10012. } // if the value is not of a supported type for range validation
  10013. // the validation rule rule should use the
  10014. // type property to also test for a particular type
  10015. if (!key) {
  10016. return false;
  10017. }
  10018. if (arr) {
  10019. val = value.length;
  10020. }
  10021. if (str) {
  10022. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".length !== 3
  10023. val = value.replace(spRegexp, '_').length;
  10024. }
  10025. if (len) {
  10026. if (val !== rule.len) {
  10027. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  10028. }
  10029. } else if (min && !max && val < rule.min) {
  10030. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  10031. } else if (max && !min && val > rule.max) {
  10032. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  10033. } else if (min && max && (val < rule.min || val > rule.max)) {
  10034. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  10035. }
  10036. }
  10037. var ENUM = 'enum';
  10038. /**
  10039. * Rule for validating a value exists in an enumerable list.
  10040. *
  10041. * @param rule The validation rule.
  10042. * @param value The value of the field on the source object.
  10043. * @param source The source object being validated.
  10044. * @param errors An array of errors that this rule may add
  10045. * validation errors to.
  10046. * @param options The validation options.
  10047. * @param options.messages The validation messages.
  10048. */
  10049. function enumerable(rule, value, source, errors, options) {
  10050. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  10051. if (rule[ENUM].indexOf(value) === -1) {
  10052. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  10053. }
  10054. }
  10055. /**
  10056. * Rule for validating a regular expression pattern.
  10057. *
  10058. * @param rule The validation rule.
  10059. * @param value The value of the field on the source object.
  10060. * @param source The source object being validated.
  10061. * @param errors An array of errors that this rule may add
  10062. * validation errors to.
  10063. * @param options The validation options.
  10064. * @param options.messages The validation messages.
  10065. */
  10066. function pattern$1(rule, value, source, errors, options) {
  10067. if (rule.pattern) {
  10068. if (rule.pattern instanceof RegExp) {
  10069. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  10070. // flag is accidentally set to `true`, which in a validation scenario
  10071. // is not necessary and the result might be misleading
  10072. rule.pattern.lastIndex = 0;
  10073. if (!rule.pattern.test(value)) {
  10074. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10075. }
  10076. } else if (typeof rule.pattern === 'string') {
  10077. var _pattern = new RegExp(rule.pattern);
  10078. if (!_pattern.test(value)) {
  10079. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10080. }
  10081. }
  10082. }
  10083. }
  10084. var rules = {
  10085. required: required,
  10086. whitespace: whitespace,
  10087. type: type,
  10088. range: range,
  10089. "enum": enumerable,
  10090. pattern: pattern$1
  10091. };
  10092. /**
  10093. * Performs validation for string types.
  10094. *
  10095. * @param rule The validation rule.
  10096. * @param value The value of the field on the source object.
  10097. * @param callback The callback function.
  10098. * @param source The source object being validated.
  10099. * @param options The validation options.
  10100. * @param options.messages The validation messages.
  10101. */
  10102. function string(rule, value, callback, source, options) {
  10103. var errors = [];
  10104. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10105. if (validate) {
  10106. if (isEmptyValue(value, 'string') && !rule.required) {
  10107. return callback();
  10108. }
  10109. rules.required(rule, value, source, errors, options, 'string');
  10110. if (!isEmptyValue(value, 'string')) {
  10111. rules.type(rule, value, source, errors, options);
  10112. rules.range(rule, value, source, errors, options);
  10113. rules.pattern(rule, value, source, errors, options);
  10114. if (rule.whitespace === true) {
  10115. rules.whitespace(rule, value, source, errors, options);
  10116. }
  10117. }
  10118. }
  10119. callback(errors);
  10120. }
  10121. /**
  10122. * Validates a function.
  10123. *
  10124. * @param rule The validation rule.
  10125. * @param value The value of the field on the source object.
  10126. * @param callback The callback function.
  10127. * @param source The source object being validated.
  10128. * @param options The validation options.
  10129. * @param options.messages The validation messages.
  10130. */
  10131. function method(rule, value, callback, source, options) {
  10132. var errors = [];
  10133. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10134. if (validate) {
  10135. if (isEmptyValue(value) && !rule.required) {
  10136. return callback();
  10137. }
  10138. rules.required(rule, value, source, errors, options);
  10139. if (value !== undefined) {
  10140. rules.type(rule, value, source, errors, options);
  10141. }
  10142. }
  10143. callback(errors);
  10144. }
  10145. /**
  10146. * Validates a number.
  10147. *
  10148. * @param rule The validation rule.
  10149. * @param value The value of the field on the source object.
  10150. * @param callback The callback function.
  10151. * @param source The source object being validated.
  10152. * @param options The validation options.
  10153. * @param options.messages The validation messages.
  10154. */
  10155. function number(rule, value, callback, source, options) {
  10156. var errors = [];
  10157. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10158. if (validate) {
  10159. if (value === '') {
  10160. value = undefined;
  10161. }
  10162. if (isEmptyValue(value) && !rule.required) {
  10163. return callback();
  10164. }
  10165. rules.required(rule, value, source, errors, options);
  10166. if (value !== undefined) {
  10167. rules.type(rule, value, source, errors, options);
  10168. rules.range(rule, value, source, errors, options);
  10169. }
  10170. }
  10171. callback(errors);
  10172. }
  10173. /**
  10174. * Validates a boolean.
  10175. *
  10176. * @param rule The validation rule.
  10177. * @param value The value of the field on the source object.
  10178. * @param callback The callback function.
  10179. * @param source The source object being validated.
  10180. * @param options The validation options.
  10181. * @param options.messages The validation messages.
  10182. */
  10183. function _boolean(rule, value, callback, source, options) {
  10184. var errors = [];
  10185. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10186. if (validate) {
  10187. if (isEmptyValue(value) && !rule.required) {
  10188. return callback();
  10189. }
  10190. rules.required(rule, value, source, errors, options);
  10191. if (value !== undefined) {
  10192. rules.type(rule, value, source, errors, options);
  10193. }
  10194. }
  10195. callback(errors);
  10196. }
  10197. /**
  10198. * Validates the regular expression type.
  10199. *
  10200. * @param rule The validation rule.
  10201. * @param value The value of the field on the source object.
  10202. * @param callback The callback function.
  10203. * @param source The source object being validated.
  10204. * @param options The validation options.
  10205. * @param options.messages The validation messages.
  10206. */
  10207. function regexp(rule, value, callback, source, options) {
  10208. var errors = [];
  10209. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10210. if (validate) {
  10211. if (isEmptyValue(value) && !rule.required) {
  10212. return callback();
  10213. }
  10214. rules.required(rule, value, source, errors, options);
  10215. if (!isEmptyValue(value)) {
  10216. rules.type(rule, value, source, errors, options);
  10217. }
  10218. }
  10219. callback(errors);
  10220. }
  10221. /**
  10222. * Validates a number is an integer.
  10223. *
  10224. * @param rule The validation rule.
  10225. * @param value The value of the field on the source object.
  10226. * @param callback The callback function.
  10227. * @param source The source object being validated.
  10228. * @param options The validation options.
  10229. * @param options.messages The validation messages.
  10230. */
  10231. function integer(rule, value, callback, source, options) {
  10232. var errors = [];
  10233. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10234. if (validate) {
  10235. if (isEmptyValue(value) && !rule.required) {
  10236. return callback();
  10237. }
  10238. rules.required(rule, value, source, errors, options);
  10239. if (value !== undefined) {
  10240. rules.type(rule, value, source, errors, options);
  10241. rules.range(rule, value, source, errors, options);
  10242. }
  10243. }
  10244. callback(errors);
  10245. }
  10246. /**
  10247. * Validates a number is a floating point number.
  10248. *
  10249. * @param rule The validation rule.
  10250. * @param value The value of the field on the source object.
  10251. * @param callback The callback function.
  10252. * @param source The source object being validated.
  10253. * @param options The validation options.
  10254. * @param options.messages The validation messages.
  10255. */
  10256. function floatFn(rule, value, callback, source, options) {
  10257. var errors = [];
  10258. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10259. if (validate) {
  10260. if (isEmptyValue(value) && !rule.required) {
  10261. return callback();
  10262. }
  10263. rules.required(rule, value, source, errors, options);
  10264. if (value !== undefined) {
  10265. rules.type(rule, value, source, errors, options);
  10266. rules.range(rule, value, source, errors, options);
  10267. }
  10268. }
  10269. callback(errors);
  10270. }
  10271. /**
  10272. * Validates an array.
  10273. *
  10274. * @param rule The validation rule.
  10275. * @param value The value of the field on the source object.
  10276. * @param callback The callback function.
  10277. * @param source The source object being validated.
  10278. * @param options The validation options.
  10279. * @param options.messages The validation messages.
  10280. */
  10281. function array(rule, value, callback, source, options) {
  10282. var errors = [];
  10283. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10284. if (validate) {
  10285. if (isEmptyValue(value, 'array') && !rule.required) {
  10286. return callback();
  10287. }
  10288. rules.required(rule, value, source, errors, options, 'array');
  10289. if (!isEmptyValue(value, 'array')) {
  10290. rules.type(rule, value, source, errors, options);
  10291. rules.range(rule, value, source, errors, options);
  10292. }
  10293. }
  10294. callback(errors);
  10295. }
  10296. /**
  10297. * Validates an object.
  10298. *
  10299. * @param rule The validation rule.
  10300. * @param value The value of the field on the source object.
  10301. * @param callback The callback function.
  10302. * @param source The source object being validated.
  10303. * @param options The validation options.
  10304. * @param options.messages The validation messages.
  10305. */
  10306. function object(rule, value, callback, source, options) {
  10307. var errors = [];
  10308. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10309. if (validate) {
  10310. if (isEmptyValue(value) && !rule.required) {
  10311. return callback();
  10312. }
  10313. rules.required(rule, value, source, errors, options);
  10314. if (value !== undefined) {
  10315. rules.type(rule, value, source, errors, options);
  10316. }
  10317. }
  10318. callback(errors);
  10319. }
  10320. var ENUM$1 = 'enum';
  10321. /**
  10322. * Validates an enumerable list.
  10323. *
  10324. * @param rule The validation rule.
  10325. * @param value The value of the field on the source object.
  10326. * @param callback The callback function.
  10327. * @param source The source object being validated.
  10328. * @param options The validation options.
  10329. * @param options.messages The validation messages.
  10330. */
  10331. function enumerable$1(rule, value, callback, source, options) {
  10332. var errors = [];
  10333. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10334. if (validate) {
  10335. if (isEmptyValue(value) && !rule.required) {
  10336. return callback();
  10337. }
  10338. rules.required(rule, value, source, errors, options);
  10339. if (value !== undefined) {
  10340. rules[ENUM$1](rule, value, source, errors, options);
  10341. }
  10342. }
  10343. callback(errors);
  10344. }
  10345. /**
  10346. * Validates a regular expression pattern.
  10347. *
  10348. * Performs validation when a rule only contains
  10349. * a pattern property but is not declared as a string type.
  10350. *
  10351. * @param rule The validation rule.
  10352. * @param value The value of the field on the source object.
  10353. * @param callback The callback function.
  10354. * @param source The source object being validated.
  10355. * @param options The validation options.
  10356. * @param options.messages The validation messages.
  10357. */
  10358. function pattern$2(rule, value, callback, source, options) {
  10359. var errors = [];
  10360. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10361. if (validate) {
  10362. if (isEmptyValue(value, 'string') && !rule.required) {
  10363. return callback();
  10364. }
  10365. rules.required(rule, value, source, errors, options);
  10366. if (!isEmptyValue(value, 'string')) {
  10367. rules.pattern(rule, value, source, errors, options);
  10368. }
  10369. }
  10370. callback(errors);
  10371. }
  10372. function date(rule, value, callback, source, options) {
  10373. var errors = [];
  10374. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10375. if (validate) {
  10376. if (isEmptyValue(value) && !rule.required) {
  10377. return callback();
  10378. }
  10379. rules.required(rule, value, source, errors, options);
  10380. if (!isEmptyValue(value)) {
  10381. var dateObject;
  10382. if (typeof value === 'number') {
  10383. dateObject = new Date(value);
  10384. } else {
  10385. dateObject = value;
  10386. }
  10387. rules.type(rule, dateObject, source, errors, options);
  10388. if (dateObject) {
  10389. rules.range(rule, dateObject.getTime(), source, errors, options);
  10390. }
  10391. }
  10392. }
  10393. callback(errors);
  10394. }
  10395. function required$1(rule, value, callback, source, options) {
  10396. var errors = [];
  10397. var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
  10398. rules.required(rule, value, source, errors, options, type);
  10399. callback(errors);
  10400. }
  10401. function type$1(rule, value, callback, source, options) {
  10402. var ruleType = rule.type;
  10403. var errors = [];
  10404. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10405. if (validate) {
  10406. if (isEmptyValue(value, ruleType) && !rule.required) {
  10407. return callback();
  10408. }
  10409. rules.required(rule, value, source, errors, options, ruleType);
  10410. if (!isEmptyValue(value, ruleType)) {
  10411. rules.type(rule, value, source, errors, options);
  10412. }
  10413. }
  10414. callback(errors);
  10415. }
  10416. /**
  10417. * Performs validation for any type.
  10418. *
  10419. * @param rule The validation rule.
  10420. * @param value The value of the field on the source object.
  10421. * @param callback The callback function.
  10422. * @param source The source object being validated.
  10423. * @param options The validation options.
  10424. * @param options.messages The validation messages.
  10425. */
  10426. function any(rule, value, callback, source, options) {
  10427. var errors = [];
  10428. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10429. if (validate) {
  10430. if (isEmptyValue(value) && !rule.required) {
  10431. return callback();
  10432. }
  10433. rules.required(rule, value, source, errors, options);
  10434. }
  10435. callback(errors);
  10436. }
  10437. var validators = {
  10438. string: string,
  10439. method: method,
  10440. number: number,
  10441. "boolean": _boolean,
  10442. regexp: regexp,
  10443. integer: integer,
  10444. "float": floatFn,
  10445. array: array,
  10446. object: object,
  10447. "enum": enumerable$1,
  10448. pattern: pattern$2,
  10449. date: date,
  10450. url: type$1,
  10451. hex: type$1,
  10452. email: type$1,
  10453. required: required$1,
  10454. any: any
  10455. };
  10456. function newMessages() {
  10457. return {
  10458. "default": 'Validation error on field %s',
  10459. required: '%s is required',
  10460. "enum": '%s must be one of %s',
  10461. whitespace: '%s cannot be empty',
  10462. date: {
  10463. format: '%s date %s is invalid for format %s',
  10464. parse: '%s date could not be parsed, %s is invalid ',
  10465. invalid: '%s date %s is invalid'
  10466. },
  10467. types: {
  10468. string: '%s is not a %s',
  10469. method: '%s is not a %s (function)',
  10470. array: '%s is not an %s',
  10471. object: '%s is not an %s',
  10472. number: '%s is not a %s',
  10473. date: '%s is not a %s',
  10474. "boolean": '%s is not a %s',
  10475. integer: '%s is not an %s',
  10476. "float": '%s is not a %s',
  10477. regexp: '%s is not a valid %s',
  10478. email: '%s is not a valid %s',
  10479. url: '%s is not a valid %s',
  10480. hex: '%s is not a valid %s'
  10481. },
  10482. string: {
  10483. len: '%s must be exactly %s characters',
  10484. min: '%s must be at least %s characters',
  10485. max: '%s cannot be longer than %s characters',
  10486. range: '%s must be between %s and %s characters'
  10487. },
  10488. number: {
  10489. len: '%s must equal %s',
  10490. min: '%s cannot be less than %s',
  10491. max: '%s cannot be greater than %s',
  10492. range: '%s must be between %s and %s'
  10493. },
  10494. array: {
  10495. len: '%s must be exactly %s in length',
  10496. min: '%s cannot be less than %s in length',
  10497. max: '%s cannot be greater than %s in length',
  10498. range: '%s must be between %s and %s in length'
  10499. },
  10500. pattern: {
  10501. mismatch: '%s value %s does not match pattern %s'
  10502. },
  10503. clone: function clone() {
  10504. var cloned = JSON.parse(JSON.stringify(this));
  10505. cloned.clone = this.clone;
  10506. return cloned;
  10507. }
  10508. };
  10509. }
  10510. var messages = newMessages();
  10511. /**
  10512. * Encapsulates a validation schema.
  10513. *
  10514. * @param descriptor An object declaring validation rules
  10515. * for this schema.
  10516. */
  10517. function Schema(descriptor) {
  10518. this.rules = null;
  10519. this._messages = messages;
  10520. this.define(descriptor);
  10521. }
  10522. Schema.prototype = {
  10523. messages: function messages(_messages) {
  10524. if (_messages) {
  10525. this._messages = deepMerge(newMessages(), _messages);
  10526. }
  10527. return this._messages;
  10528. },
  10529. define: function define(rules) {
  10530. if (!rules) {
  10531. throw new Error('Cannot configure a schema with no rules');
  10532. }
  10533. if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
  10534. throw new Error('Rules must be an object');
  10535. }
  10536. this.rules = {};
  10537. var z;
  10538. var item;
  10539. for (z in rules) {
  10540. if (rules.hasOwnProperty(z)) {
  10541. item = rules[z];
  10542. this.rules[z] = Array.isArray(item) ? item : [item];
  10543. }
  10544. }
  10545. },
  10546. validate: function validate(source_, o, oc) {
  10547. var _this = this;
  10548. if (o === void 0) {
  10549. o = {};
  10550. }
  10551. if (oc === void 0) {
  10552. oc = function oc() {};
  10553. }
  10554. var source = source_;
  10555. var options = o;
  10556. var callback = oc;
  10557. if (typeof options === 'function') {
  10558. callback = options;
  10559. options = {};
  10560. }
  10561. if (!this.rules || Object.keys(this.rules).length === 0) {
  10562. if (callback) {
  10563. callback();
  10564. }
  10565. return Promise.resolve();
  10566. }
  10567. function complete(results) {
  10568. var i;
  10569. var errors = [];
  10570. var fields = {};
  10571. function add(e) {
  10572. if (Array.isArray(e)) {
  10573. var _errors;
  10574. errors = (_errors = errors).concat.apply(_errors, e);
  10575. } else {
  10576. errors.push(e);
  10577. }
  10578. }
  10579. for (i = 0; i < results.length; i++) {
  10580. add(results[i]);
  10581. }
  10582. if (!errors.length) {
  10583. errors = null;
  10584. fields = null;
  10585. } else {
  10586. fields = convertFieldsError(errors);
  10587. }
  10588. callback(errors, fields);
  10589. }
  10590. if (options.messages) {
  10591. var messages$1 = this.messages();
  10592. if (messages$1 === messages) {
  10593. messages$1 = newMessages();
  10594. }
  10595. deepMerge(messages$1, options.messages);
  10596. options.messages = messages$1;
  10597. } else {
  10598. options.messages = this.messages();
  10599. }
  10600. var arr;
  10601. var value;
  10602. var series = {};
  10603. var keys = options.keys || Object.keys(this.rules);
  10604. keys.forEach(function (z) {
  10605. arr = _this.rules[z];
  10606. value = source[z];
  10607. arr.forEach(function (r) {
  10608. var rule = r;
  10609. if (typeof rule.transform === 'function') {
  10610. if (source === source_) {
  10611. source = _extends({}, source);
  10612. }
  10613. value = source[z] = rule.transform(value);
  10614. }
  10615. if (typeof rule === 'function') {
  10616. rule = {
  10617. validator: rule
  10618. };
  10619. } else {
  10620. rule = _extends({}, rule);
  10621. }
  10622. rule.validator = _this.getValidationMethod(rule);
  10623. rule.field = z;
  10624. rule.fullField = rule.fullField || z;
  10625. rule.type = _this.getType(rule);
  10626. if (!rule.validator) {
  10627. return;
  10628. }
  10629. series[z] = series[z] || [];
  10630. series[z].push({
  10631. rule: rule,
  10632. value: value,
  10633. source: source,
  10634. field: z
  10635. });
  10636. });
  10637. });
  10638. var errorFields = {};
  10639. return asyncMap(series, options, function (data, doIt) {
  10640. var rule = data.rule;
  10641. var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
  10642. deep = deep && (rule.required || !rule.required && data.value);
  10643. rule.field = data.field;
  10644. function addFullfield(key, schema) {
  10645. return _extends({}, schema, {
  10646. fullField: rule.fullField + "." + key
  10647. });
  10648. }
  10649. function cb(e) {
  10650. if (e === void 0) {
  10651. e = [];
  10652. }
  10653. var errors = e;
  10654. if (!Array.isArray(errors)) {
  10655. errors = [errors];
  10656. }
  10657. if (!options.suppressWarning && errors.length) {
  10658. Schema.warning('async-validator:', errors);
  10659. }
  10660. if (errors.length && rule.message) {
  10661. errors = [].concat(rule.message);
  10662. }
  10663. errors = errors.map(complementError(rule));
  10664. if (options.first && errors.length) {
  10665. errorFields[rule.field] = 1;
  10666. return doIt(errors);
  10667. }
  10668. if (!deep) {
  10669. doIt(errors);
  10670. } else {
  10671. // if rule is required but the target object
  10672. // does not exist fail at the rule level and don't
  10673. // go deeper
  10674. if (rule.required && !data.value) {
  10675. if (rule.message) {
  10676. errors = [].concat(rule.message).map(complementError(rule));
  10677. } else if (options.error) {
  10678. errors = [options.error(rule, format(options.messages.required, rule.field))];
  10679. } else {
  10680. errors = [];
  10681. }
  10682. return doIt(errors);
  10683. }
  10684. var fieldsSchema = {};
  10685. if (rule.defaultField) {
  10686. for (var k in data.value) {
  10687. if (data.value.hasOwnProperty(k)) {
  10688. fieldsSchema[k] = rule.defaultField;
  10689. }
  10690. }
  10691. }
  10692. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  10693. for (var f in fieldsSchema) {
  10694. if (fieldsSchema.hasOwnProperty(f)) {
  10695. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  10696. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  10697. }
  10698. }
  10699. var schema = new Schema(fieldsSchema);
  10700. schema.messages(options.messages);
  10701. if (data.rule.options) {
  10702. data.rule.options.messages = options.messages;
  10703. data.rule.options.error = options.error;
  10704. }
  10705. schema.validate(data.value, data.rule.options || options, function (errs) {
  10706. var finalErrors = [];
  10707. if (errors && errors.length) {
  10708. finalErrors.push.apply(finalErrors, errors);
  10709. }
  10710. if (errs && errs.length) {
  10711. finalErrors.push.apply(finalErrors, errs);
  10712. }
  10713. doIt(finalErrors.length ? finalErrors : null);
  10714. });
  10715. }
  10716. }
  10717. var res;
  10718. if (rule.asyncValidator) {
  10719. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  10720. } else if (rule.validator) {
  10721. res = rule.validator(rule, data.value, cb, data.source, options);
  10722. if (res === true) {
  10723. cb();
  10724. } else if (res === false) {
  10725. cb(rule.message || rule.field + " fails");
  10726. } else if (res instanceof Array) {
  10727. cb(res);
  10728. } else if (res instanceof Error) {
  10729. cb(res.message);
  10730. }
  10731. }
  10732. if (res && res.then) {
  10733. res.then(function () {
  10734. return cb();
  10735. }, function (e) {
  10736. return cb(e);
  10737. });
  10738. }
  10739. }, function (results) {
  10740. complete(results);
  10741. });
  10742. },
  10743. getType: function getType(rule) {
  10744. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  10745. rule.type = 'pattern';
  10746. }
  10747. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  10748. throw new Error(format('Unknown rule type %s', rule.type));
  10749. }
  10750. return rule.type || 'string';
  10751. },
  10752. getValidationMethod: function getValidationMethod(rule) {
  10753. if (typeof rule.validator === 'function') {
  10754. return rule.validator;
  10755. }
  10756. var keys = Object.keys(rule);
  10757. var messageIndex = keys.indexOf('message');
  10758. if (messageIndex !== -1) {
  10759. keys.splice(messageIndex, 1);
  10760. }
  10761. if (keys.length === 1 && keys[0] === 'required') {
  10762. return validators.required;
  10763. }
  10764. return validators[this.getType(rule)] || false;
  10765. }
  10766. };
  10767. Schema.register = function register(type, validator) {
  10768. if (typeof validator !== 'function') {
  10769. throw new Error('Cannot register a validator by type, validator is not a function');
  10770. }
  10771. validators[type] = validator;
  10772. };
  10773. Schema.warning = warning;
  10774. Schema.messages = messages;
  10775. var _default = Schema;
  10776. exports.default = _default;
  10777. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 388)))
  10778. /***/ }),
  10779. /***/ 388:
  10780. /*!********************************************************!*\
  10781. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  10782. \********************************************************/
  10783. /*! no static exports found */
  10784. /***/ (function(module, exports, __webpack_require__) {
  10785. exports.nextTick = function nextTick(fn) {
  10786. var args = Array.prototype.slice.call(arguments);
  10787. args.shift();
  10788. setTimeout(function () {
  10789. fn.apply(null, args);
  10790. }, 0);
  10791. };
  10792. exports.platform = exports.arch =
  10793. exports.execPath = exports.title = 'browser';
  10794. exports.pid = 1;
  10795. exports.browser = true;
  10796. exports.env = {};
  10797. exports.argv = [];
  10798. exports.binding = function (name) {
  10799. throw new Error('No such module. (Possibly not yet loaded)')
  10800. };
  10801. (function () {
  10802. var cwd = '/';
  10803. var path;
  10804. exports.cwd = function () { return cwd };
  10805. exports.chdir = function (dir) {
  10806. if (!path) path = __webpack_require__(/*! path */ 389);
  10807. cwd = path.resolve(dir, cwd);
  10808. };
  10809. })();
  10810. exports.exit = exports.kill =
  10811. exports.umask = exports.dlopen =
  10812. exports.uptime = exports.memoryUsage =
  10813. exports.uvCounters = function() {};
  10814. exports.features = {};
  10815. /***/ }),
  10816. /***/ 389:
  10817. /*!***********************************************!*\
  10818. !*** ./node_modules/path-browserify/index.js ***!
  10819. \***********************************************/
  10820. /*! no static exports found */
  10821. /***/ (function(module, exports, __webpack_require__) {
  10822. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  10823. // backported and transplited with Babel, with backwards-compat fixes
  10824. // Copyright Joyent, Inc. and other Node contributors.
  10825. //
  10826. // Permission is hereby granted, free of charge, to any person obtaining a
  10827. // copy of this software and associated documentation files (the
  10828. // "Software"), to deal in the Software without restriction, including
  10829. // without limitation the rights to use, copy, modify, merge, publish,
  10830. // distribute, sublicense, and/or sell copies of the Software, and to permit
  10831. // persons to whom the Software is furnished to do so, subject to the
  10832. // following conditions:
  10833. //
  10834. // The above copyright notice and this permission notice shall be included
  10835. // in all copies or substantial portions of the Software.
  10836. //
  10837. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10838. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10839. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  10840. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10841. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  10842. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  10843. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  10844. // resolves . and .. elements in a path array with directory names there
  10845. // must be no slashes, empty elements, or device names (c:\) in the array
  10846. // (so also no leading and trailing slashes - it does not distinguish
  10847. // relative and absolute paths)
  10848. function normalizeArray(parts, allowAboveRoot) {
  10849. // if the path tries to go above the root, `up` ends up > 0
  10850. var up = 0;
  10851. for (var i = parts.length - 1; i >= 0; i--) {
  10852. var last = parts[i];
  10853. if (last === '.') {
  10854. parts.splice(i, 1);
  10855. } else if (last === '..') {
  10856. parts.splice(i, 1);
  10857. up++;
  10858. } else if (up) {
  10859. parts.splice(i, 1);
  10860. up--;
  10861. }
  10862. }
  10863. // if the path is allowed to go above the root, restore leading ..s
  10864. if (allowAboveRoot) {
  10865. for (; up--; up) {
  10866. parts.unshift('..');
  10867. }
  10868. }
  10869. return parts;
  10870. }
  10871. // path.resolve([from ...], to)
  10872. // posix version
  10873. exports.resolve = function() {
  10874. var resolvedPath = '',
  10875. resolvedAbsolute = false;
  10876. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  10877. var path = (i >= 0) ? arguments[i] : process.cwd();
  10878. // Skip empty and invalid entries
  10879. if (typeof path !== 'string') {
  10880. throw new TypeError('Arguments to path.resolve must be strings');
  10881. } else if (!path) {
  10882. continue;
  10883. }
  10884. resolvedPath = path + '/' + resolvedPath;
  10885. resolvedAbsolute = path.charAt(0) === '/';
  10886. }
  10887. // At this point the path should be resolved to a full absolute path, but
  10888. // handle relative paths to be safe (might happen when process.cwd() fails)
  10889. // Normalize the path
  10890. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  10891. return !!p;
  10892. }), !resolvedAbsolute).join('/');
  10893. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  10894. };
  10895. // path.normalize(path)
  10896. // posix version
  10897. exports.normalize = function(path) {
  10898. var isAbsolute = exports.isAbsolute(path),
  10899. trailingSlash = substr(path, -1) === '/';
  10900. // Normalize the path
  10901. path = normalizeArray(filter(path.split('/'), function(p) {
  10902. return !!p;
  10903. }), !isAbsolute).join('/');
  10904. if (!path && !isAbsolute) {
  10905. path = '.';
  10906. }
  10907. if (path && trailingSlash) {
  10908. path += '/';
  10909. }
  10910. return (isAbsolute ? '/' : '') + path;
  10911. };
  10912. // posix version
  10913. exports.isAbsolute = function(path) {
  10914. return path.charAt(0) === '/';
  10915. };
  10916. // posix version
  10917. exports.join = function() {
  10918. var paths = Array.prototype.slice.call(arguments, 0);
  10919. return exports.normalize(filter(paths, function(p, index) {
  10920. if (typeof p !== 'string') {
  10921. throw new TypeError('Arguments to path.join must be strings');
  10922. }
  10923. return p;
  10924. }).join('/'));
  10925. };
  10926. // path.relative(from, to)
  10927. // posix version
  10928. exports.relative = function(from, to) {
  10929. from = exports.resolve(from).substr(1);
  10930. to = exports.resolve(to).substr(1);
  10931. function trim(arr) {
  10932. var start = 0;
  10933. for (; start < arr.length; start++) {
  10934. if (arr[start] !== '') break;
  10935. }
  10936. var end = arr.length - 1;
  10937. for (; end >= 0; end--) {
  10938. if (arr[end] !== '') break;
  10939. }
  10940. if (start > end) return [];
  10941. return arr.slice(start, end - start + 1);
  10942. }
  10943. var fromParts = trim(from.split('/'));
  10944. var toParts = trim(to.split('/'));
  10945. var length = Math.min(fromParts.length, toParts.length);
  10946. var samePartsLength = length;
  10947. for (var i = 0; i < length; i++) {
  10948. if (fromParts[i] !== toParts[i]) {
  10949. samePartsLength = i;
  10950. break;
  10951. }
  10952. }
  10953. var outputParts = [];
  10954. for (var i = samePartsLength; i < fromParts.length; i++) {
  10955. outputParts.push('..');
  10956. }
  10957. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  10958. return outputParts.join('/');
  10959. };
  10960. exports.sep = '/';
  10961. exports.delimiter = ':';
  10962. exports.dirname = function (path) {
  10963. if (typeof path !== 'string') path = path + '';
  10964. if (path.length === 0) return '.';
  10965. var code = path.charCodeAt(0);
  10966. var hasRoot = code === 47 /*/*/;
  10967. var end = -1;
  10968. var matchedSlash = true;
  10969. for (var i = path.length - 1; i >= 1; --i) {
  10970. code = path.charCodeAt(i);
  10971. if (code === 47 /*/*/) {
  10972. if (!matchedSlash) {
  10973. end = i;
  10974. break;
  10975. }
  10976. } else {
  10977. // We saw the first non-path separator
  10978. matchedSlash = false;
  10979. }
  10980. }
  10981. if (end === -1) return hasRoot ? '/' : '.';
  10982. if (hasRoot && end === 1) {
  10983. // return '//';
  10984. // Backwards-compat fix:
  10985. return '/';
  10986. }
  10987. return path.slice(0, end);
  10988. };
  10989. function basename(path) {
  10990. if (typeof path !== 'string') path = path + '';
  10991. var start = 0;
  10992. var end = -1;
  10993. var matchedSlash = true;
  10994. var i;
  10995. for (i = path.length - 1; i >= 0; --i) {
  10996. if (path.charCodeAt(i) === 47 /*/*/) {
  10997. // If we reached a path separator that was not part of a set of path
  10998. // separators at the end of the string, stop now
  10999. if (!matchedSlash) {
  11000. start = i + 1;
  11001. break;
  11002. }
  11003. } else if (end === -1) {
  11004. // We saw the first non-path separator, mark this as the end of our
  11005. // path component
  11006. matchedSlash = false;
  11007. end = i + 1;
  11008. }
  11009. }
  11010. if (end === -1) return '';
  11011. return path.slice(start, end);
  11012. }
  11013. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  11014. // in new Node.js versions, so only basename() above is backported here
  11015. exports.basename = function (path, ext) {
  11016. var f = basename(path);
  11017. if (ext && f.substr(-1 * ext.length) === ext) {
  11018. f = f.substr(0, f.length - ext.length);
  11019. }
  11020. return f;
  11021. };
  11022. exports.extname = function (path) {
  11023. if (typeof path !== 'string') path = path + '';
  11024. var startDot = -1;
  11025. var startPart = 0;
  11026. var end = -1;
  11027. var matchedSlash = true;
  11028. // Track the state of characters (if any) we see before our first dot and
  11029. // after any path separator we find
  11030. var preDotState = 0;
  11031. for (var i = path.length - 1; i >= 0; --i) {
  11032. var code = path.charCodeAt(i);
  11033. if (code === 47 /*/*/) {
  11034. // If we reached a path separator that was not part of a set of path
  11035. // separators at the end of the string, stop now
  11036. if (!matchedSlash) {
  11037. startPart = i + 1;
  11038. break;
  11039. }
  11040. continue;
  11041. }
  11042. if (end === -1) {
  11043. // We saw the first non-path separator, mark this as the end of our
  11044. // extension
  11045. matchedSlash = false;
  11046. end = i + 1;
  11047. }
  11048. if (code === 46 /*.*/) {
  11049. // If this is our first dot, mark it as the start of our extension
  11050. if (startDot === -1)
  11051. startDot = i;
  11052. else if (preDotState !== 1)
  11053. preDotState = 1;
  11054. } else if (startDot !== -1) {
  11055. // We saw a non-dot and non-path separator before our dot, so we should
  11056. // have a good chance at having a non-empty extension
  11057. preDotState = -1;
  11058. }
  11059. }
  11060. if (startDot === -1 || end === -1 ||
  11061. // We saw a non-dot character immediately before the dot
  11062. preDotState === 0 ||
  11063. // The (right-most) trimmed path component is exactly '..'
  11064. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  11065. return '';
  11066. }
  11067. return path.slice(startDot, end);
  11068. };
  11069. function filter (xs, f) {
  11070. if (xs.filter) return xs.filter(f);
  11071. var res = [];
  11072. for (var i = 0; i < xs.length; i++) {
  11073. if (f(xs[i], i, xs)) res.push(xs[i]);
  11074. }
  11075. return res;
  11076. }
  11077. // String.prototype.substr - negative index don't work in IE8
  11078. var substr = 'ab'.substr(-1) === 'b'
  11079. ? function (str, start, len) { return str.substr(start, len) }
  11080. : function (str, start, len) {
  11081. if (start < 0) start = str.length + start;
  11082. return str.substr(start, len);
  11083. }
  11084. ;
  11085. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 388)))
  11086. /***/ }),
  11087. /***/ 39:
  11088. /*!*******************************************************!*\
  11089. !*** E:/Desktop/zd_wechatApp(1)/common/lodash.min.js ***!
  11090. \*******************************************************/
  11091. /*! no static exports found */
  11092. /***/ (function(module, exports, __webpack_require__) {
  11093. /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  11094. /**
  11095. * @license
  11096. * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
  11097. */
  11098. ;
  11099. (function () {
  11100. function n(n, t, r) {
  11101. switch (r.length) {
  11102. case 0:
  11103. return n.call(t);
  11104. case 1:
  11105. return n.call(t, r[0]);
  11106. case 2:
  11107. return n.call(t, r[0], r[1]);
  11108. case 3:
  11109. return n.call(t, r[0], r[1], r[2]);
  11110. }
  11111. return n.apply(t, r);
  11112. }
  11113. function t(n, t, r, e) {
  11114. for (var u = -1, i = null == n ? 0 : n.length; ++u < i;) {
  11115. var o = n[u];
  11116. t(e, o, r(o), n);
  11117. }
  11118. return e;
  11119. }
  11120. function r(n, t) {
  11121. for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n);) {
  11122. ;
  11123. }
  11124. return n;
  11125. }
  11126. function e(n, t) {
  11127. for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n);) {
  11128. ;
  11129. }
  11130. return n;
  11131. }
  11132. function u(n, t) {
  11133. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  11134. if (!t(n[r], r, n)) return false;
  11135. }
  11136. return true;
  11137. }
  11138. function i(n, t) {
  11139. for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e;) {
  11140. var o = n[r];
  11141. t(o, r, n) && (i[u++] = o);
  11142. }
  11143. return i;
  11144. }
  11145. function o(n, t) {
  11146. return !(null == n || !n.length) && -1 < v(n, t, 0);
  11147. }
  11148. function f(n, t, r) {
  11149. for (var e = -1, u = null == n ? 0 : n.length; ++e < u;) {
  11150. if (r(t, n[e])) return true;
  11151. }
  11152. return false;
  11153. }
  11154. function c(n, t) {
  11155. for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e;) {
  11156. u[r] = t(n[r], r, n);
  11157. }
  11158. return u;
  11159. }
  11160. function a(n, t) {
  11161. for (var r = -1, e = t.length, u = n.length; ++r < e;) {
  11162. n[u + r] = t[r];
  11163. }
  11164. return n;
  11165. }
  11166. function l(n, t, r, e) {
  11167. var u = -1,
  11168. i = null == n ? 0 : n.length;
  11169. for (e && i && (r = n[++u]); ++u < i;) {
  11170. r = t(r, n[u], u, n);
  11171. }
  11172. return r;
  11173. }
  11174. function s(n, t, r, e) {
  11175. var u = null == n ? 0 : n.length;
  11176. for (e && u && (r = n[--u]); u--;) {
  11177. r = t(r, n[u], u, n);
  11178. }
  11179. return r;
  11180. }
  11181. function h(n, t) {
  11182. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  11183. if (t(n[r], r, n)) return true;
  11184. }
  11185. return false;
  11186. }
  11187. function p(n, t, r) {
  11188. var e;
  11189. return r(n, function (n, r, u) {
  11190. if (t(n, r, u)) return e = r, false;
  11191. }), e;
  11192. }
  11193. function _(n, t, r, e) {
  11194. var u = n.length;
  11195. for (r += e ? 1 : -1; e ? r-- : ++r < u;) {
  11196. if (t(n[r], r, n)) return r;
  11197. }
  11198. return -1;
  11199. }
  11200. function v(n, t, r) {
  11201. if (t === t) n: {
  11202. --r;
  11203. for (var e = n.length; ++r < e;) {
  11204. if (n[r] === t) {
  11205. n = r;
  11206. break n;
  11207. }
  11208. }
  11209. n = -1;
  11210. } else n = _(n, d, r);
  11211. return n;
  11212. }
  11213. function g(n, t, r, e) {
  11214. --r;
  11215. for (var u = n.length; ++r < u;) {
  11216. if (e(n[r], t)) return r;
  11217. }
  11218. return -1;
  11219. }
  11220. function d(n) {
  11221. return n !== n;
  11222. }
  11223. function y(n, t) {
  11224. var r = null == n ? 0 : n.length;
  11225. return r ? m(n, t) / r : F;
  11226. }
  11227. function b(n) {
  11228. return function (t) {
  11229. return null == t ? T : t[n];
  11230. };
  11231. }
  11232. function x(n) {
  11233. return function (t) {
  11234. return null == n ? T : n[t];
  11235. };
  11236. }
  11237. function j(n, t, r, e, u) {
  11238. return u(n, function (n, u, i) {
  11239. r = e ? (e = false, n) : t(r, n, u, i);
  11240. }), r;
  11241. }
  11242. function w(n, t) {
  11243. var r = n.length;
  11244. for (n.sort(t); r--;) {
  11245. n[r] = n[r].c;
  11246. }
  11247. return n;
  11248. }
  11249. function m(n, t) {
  11250. for (var r, e = -1, u = n.length; ++e < u;) {
  11251. var i = t(n[e]);
  11252. i !== T && (r = r === T ? i : r + i);
  11253. }
  11254. return r;
  11255. }
  11256. function A(n, t) {
  11257. for (var r = -1, e = Array(n); ++r < n;) {
  11258. e[r] = t(r);
  11259. }
  11260. return e;
  11261. }
  11262. function E(n, t) {
  11263. return c(t, function (t) {
  11264. return [t, n[t]];
  11265. });
  11266. }
  11267. function k(n) {
  11268. return function (t) {
  11269. return n(t);
  11270. };
  11271. }
  11272. function S(n, t) {
  11273. return c(t, function (t) {
  11274. return n[t];
  11275. });
  11276. }
  11277. function O(n, t) {
  11278. return n.has(t);
  11279. }
  11280. function I(n, t) {
  11281. for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0);) {
  11282. ;
  11283. }
  11284. return r;
  11285. }
  11286. function R(n, t) {
  11287. for (var r = n.length; r-- && -1 < v(t, n[r], 0);) {
  11288. ;
  11289. }
  11290. return r;
  11291. }
  11292. function z(n) {
  11293. return "\\" + Un[n];
  11294. }
  11295. function W(n) {
  11296. var t = -1,
  11297. r = Array(n.size);
  11298. return n.forEach(function (n, e) {
  11299. r[++t] = [e, n];
  11300. }), r;
  11301. }
  11302. function B(n, t) {
  11303. return function (r) {
  11304. return n(t(r));
  11305. };
  11306. }
  11307. function L(n, t) {
  11308. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  11309. var o = n[r];
  11310. o !== t && "__lodash_placeholder__" !== o || (n[r] = "__lodash_placeholder__", i[u++] = r);
  11311. }
  11312. return i;
  11313. }
  11314. function U(n) {
  11315. var t = -1,
  11316. r = Array(n.size);
  11317. return n.forEach(function (n) {
  11318. r[++t] = n;
  11319. }), r;
  11320. }
  11321. function C(n) {
  11322. var t = -1,
  11323. r = Array(n.size);
  11324. return n.forEach(function (n) {
  11325. r[++t] = [n, n];
  11326. }), r;
  11327. }
  11328. function D(n) {
  11329. if (Rn.test(n)) {
  11330. for (var t = On.lastIndex = 0; On.test(n);) {
  11331. ++t;
  11332. }
  11333. n = t;
  11334. } else n = Qn(n);
  11335. return n;
  11336. }
  11337. function M(n) {
  11338. return Rn.test(n) ? n.match(On) || [] : n.split("");
  11339. }
  11340. var T,
  11341. $ = 1 / 0,
  11342. F = NaN,
  11343. N = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", 32], ["partialRight", 64], ["rearg", 256]],
  11344. P = /\b__p\+='';/g,
  11345. Z = /\b(__p\+=)''\+/g,
  11346. q = /(__e\(.*?\)|\b__t\))\+'';/g,
  11347. V = /&(?:amp|lt|gt|quot|#39);/g,
  11348. K = /[&<>"']/g,
  11349. G = RegExp(V.source),
  11350. H = RegExp(K.source),
  11351. J = /<%-([\s\S]+?)%>/g,
  11352. Y = /<%([\s\S]+?)%>/g,
  11353. Q = /<%=([\s\S]+?)%>/g,
  11354. X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  11355. nn = /^\w*$/,
  11356. tn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
  11357. rn = /[\\^$.*+?()[\]{}|]/g,
  11358. en = RegExp(rn.source),
  11359. un = /^\s+|\s+$/g,
  11360. on = /^\s+/,
  11361. fn = /\s+$/,
  11362. cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  11363. an = /\{\n\/\* \[wrapped with (.+)\] \*/,
  11364. ln = /,? & /,
  11365. sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,
  11366. hn = /\\(\\)?/g,
  11367. pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,
  11368. _n = /\w*$/,
  11369. vn = /^[-+]0x[0-9a-f]+$/i,
  11370. gn = /^0b[01]+$/i,
  11371. dn = /^\[object .+?Constructor\]$/,
  11372. yn = /^0o[0-7]+$/i,
  11373. bn = /^(?:0|[1-9]\d*)$/,
  11374. xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,
  11375. jn = /($^)/,
  11376. wn = /['\n\r\u2028\u2029\\]/g,
  11377. 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])?)*",
  11378. An = "(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])" + mn,
  11379. 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])",
  11380. kn = RegExp("['\u2019]", "g"),
  11381. Sn = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g"),
  11382. On = RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|" + En + mn, "g"),
  11383. 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"),
  11384. Rn = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),
  11385. zn = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,
  11386. 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(" "),
  11387. Bn = {};
  11388. 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;
  11389. var Ln = {};
  11390. 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;
  11391. var Un = {
  11392. "\\": "\\",
  11393. "'": "'",
  11394. "\n": "n",
  11395. "\r": "r",
  11396. "\u2028": "u2028",
  11397. "\u2029": "u2029"
  11398. },
  11399. Cn = parseFloat,
  11400. Dn = parseInt,
  11401. Mn = (typeof global === "undefined" ? "undefined" : _typeof(global)) == "object" && global && global.Object === Object && global,
  11402. Tn = (typeof self === "undefined" ? "undefined" : _typeof(self)) == "object" && self && self.Object === Object && self,
  11403. $n = Mn || Tn || Function("return this")(),
  11404. Fn = ( false ? undefined : _typeof(exports)) == "object" && exports && !exports.nodeType && exports,
  11405. Nn = Fn && ( false ? undefined : _typeof(module)) == "object" && module && !module.nodeType && module,
  11406. Pn = Nn && Nn.exports === Fn,
  11407. Zn = Pn && Mn.process,
  11408. qn = function () {
  11409. try {
  11410. var n = Nn && Nn.f && Nn.f("util").types;
  11411. return n ? n : Zn && Zn.binding && Zn.binding("util");
  11412. } catch (n) {}
  11413. }(),
  11414. Vn = qn && qn.isArrayBuffer,
  11415. Kn = qn && qn.isDate,
  11416. Gn = qn && qn.isMap,
  11417. Hn = qn && qn.isRegExp,
  11418. Jn = qn && qn.isSet,
  11419. Yn = qn && qn.isTypedArray,
  11420. Qn = b("length"),
  11421. Xn = x({
  11422. "\xc0": "A",
  11423. "\xc1": "A",
  11424. "\xc2": "A",
  11425. "\xc3": "A",
  11426. "\xc4": "A",
  11427. "\xc5": "A",
  11428. "\xe0": "a",
  11429. "\xe1": "a",
  11430. "\xe2": "a",
  11431. "\xe3": "a",
  11432. "\xe4": "a",
  11433. "\xe5": "a",
  11434. "\xc7": "C",
  11435. "\xe7": "c",
  11436. "\xd0": "D",
  11437. "\xf0": "d",
  11438. "\xc8": "E",
  11439. "\xc9": "E",
  11440. "\xca": "E",
  11441. "\xcb": "E",
  11442. "\xe8": "e",
  11443. "\xe9": "e",
  11444. "\xea": "e",
  11445. "\xeb": "e",
  11446. "\xcc": "I",
  11447. "\xcd": "I",
  11448. "\xce": "I",
  11449. "\xcf": "I",
  11450. "\xec": "i",
  11451. "\xed": "i",
  11452. "\xee": "i",
  11453. "\xef": "i",
  11454. "\xd1": "N",
  11455. "\xf1": "n",
  11456. "\xd2": "O",
  11457. "\xd3": "O",
  11458. "\xd4": "O",
  11459. "\xd5": "O",
  11460. "\xd6": "O",
  11461. "\xd8": "O",
  11462. "\xf2": "o",
  11463. "\xf3": "o",
  11464. "\xf4": "o",
  11465. "\xf5": "o",
  11466. "\xf6": "o",
  11467. "\xf8": "o",
  11468. "\xd9": "U",
  11469. "\xda": "U",
  11470. "\xdb": "U",
  11471. "\xdc": "U",
  11472. "\xf9": "u",
  11473. "\xfa": "u",
  11474. "\xfb": "u",
  11475. "\xfc": "u",
  11476. "\xdd": "Y",
  11477. "\xfd": "y",
  11478. "\xff": "y",
  11479. "\xc6": "Ae",
  11480. "\xe6": "ae",
  11481. "\xde": "Th",
  11482. "\xfe": "th",
  11483. "\xdf": "ss",
  11484. "\u0100": "A",
  11485. "\u0102": "A",
  11486. "\u0104": "A",
  11487. "\u0101": "a",
  11488. "\u0103": "a",
  11489. "\u0105": "a",
  11490. "\u0106": "C",
  11491. "\u0108": "C",
  11492. "\u010A": "C",
  11493. "\u010C": "C",
  11494. "\u0107": "c",
  11495. "\u0109": "c",
  11496. "\u010B": "c",
  11497. "\u010D": "c",
  11498. "\u010E": "D",
  11499. "\u0110": "D",
  11500. "\u010F": "d",
  11501. "\u0111": "d",
  11502. "\u0112": "E",
  11503. "\u0114": "E",
  11504. "\u0116": "E",
  11505. "\u0118": "E",
  11506. "\u011A": "E",
  11507. "\u0113": "e",
  11508. "\u0115": "e",
  11509. "\u0117": "e",
  11510. "\u0119": "e",
  11511. "\u011B": "e",
  11512. "\u011C": "G",
  11513. "\u011E": "G",
  11514. "\u0120": "G",
  11515. "\u0122": "G",
  11516. "\u011D": "g",
  11517. "\u011F": "g",
  11518. "\u0121": "g",
  11519. "\u0123": "g",
  11520. "\u0124": "H",
  11521. "\u0126": "H",
  11522. "\u0125": "h",
  11523. "\u0127": "h",
  11524. "\u0128": "I",
  11525. "\u012A": "I",
  11526. "\u012C": "I",
  11527. "\u012E": "I",
  11528. "\u0130": "I",
  11529. "\u0129": "i",
  11530. "\u012B": "i",
  11531. "\u012D": "i",
  11532. "\u012F": "i",
  11533. "\u0131": "i",
  11534. "\u0134": "J",
  11535. "\u0135": "j",
  11536. "\u0136": "K",
  11537. "\u0137": "k",
  11538. "\u0138": "k",
  11539. "\u0139": "L",
  11540. "\u013B": "L",
  11541. "\u013D": "L",
  11542. "\u013F": "L",
  11543. "\u0141": "L",
  11544. "\u013A": "l",
  11545. "\u013C": "l",
  11546. "\u013E": "l",
  11547. "\u0140": "l",
  11548. "\u0142": "l",
  11549. "\u0143": "N",
  11550. "\u0145": "N",
  11551. "\u0147": "N",
  11552. "\u014A": "N",
  11553. "\u0144": "n",
  11554. "\u0146": "n",
  11555. "\u0148": "n",
  11556. "\u014B": "n",
  11557. "\u014C": "O",
  11558. "\u014E": "O",
  11559. "\u0150": "O",
  11560. "\u014D": "o",
  11561. "\u014F": "o",
  11562. "\u0151": "o",
  11563. "\u0154": "R",
  11564. "\u0156": "R",
  11565. "\u0158": "R",
  11566. "\u0155": "r",
  11567. "\u0157": "r",
  11568. "\u0159": "r",
  11569. "\u015A": "S",
  11570. "\u015C": "S",
  11571. "\u015E": "S",
  11572. "\u0160": "S",
  11573. "\u015B": "s",
  11574. "\u015D": "s",
  11575. "\u015F": "s",
  11576. "\u0161": "s",
  11577. "\u0162": "T",
  11578. "\u0164": "T",
  11579. "\u0166": "T",
  11580. "\u0163": "t",
  11581. "\u0165": "t",
  11582. "\u0167": "t",
  11583. "\u0168": "U",
  11584. "\u016A": "U",
  11585. "\u016C": "U",
  11586. "\u016E": "U",
  11587. "\u0170": "U",
  11588. "\u0172": "U",
  11589. "\u0169": "u",
  11590. "\u016B": "u",
  11591. "\u016D": "u",
  11592. "\u016F": "u",
  11593. "\u0171": "u",
  11594. "\u0173": "u",
  11595. "\u0174": "W",
  11596. "\u0175": "w",
  11597. "\u0176": "Y",
  11598. "\u0177": "y",
  11599. "\u0178": "Y",
  11600. "\u0179": "Z",
  11601. "\u017B": "Z",
  11602. "\u017D": "Z",
  11603. "\u017A": "z",
  11604. "\u017C": "z",
  11605. "\u017E": "z",
  11606. "\u0132": "IJ",
  11607. "\u0133": "ij",
  11608. "\u0152": "Oe",
  11609. "\u0153": "oe",
  11610. "\u0149": "'n",
  11611. "\u017F": "s"
  11612. }),
  11613. nt = x({
  11614. "&": "&amp;",
  11615. "<": "&lt;",
  11616. ">": "&gt;",
  11617. '"': "&quot;",
  11618. "'": "&#39;"
  11619. }),
  11620. tt = x({
  11621. "&amp;": "&",
  11622. "&lt;": "<",
  11623. "&gt;": ">",
  11624. "&quot;": '"',
  11625. "&#39;": "'"
  11626. }),
  11627. rt = function x(mn) {
  11628. function An(n) {
  11629. if (du(n) && !of(n) && !(n instanceof Un)) {
  11630. if (n instanceof On) return n;
  11631. if (ii.call(n, "__wrapped__")) return $e(n);
  11632. }
  11633. return new On(n);
  11634. }
  11635. function En() {}
  11636. function On(n, t) {
  11637. this.__wrapped__ = n, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = T;
  11638. }
  11639. function Un(n) {
  11640. this.__wrapped__ = n, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = 4294967295, this.__views__ = [];
  11641. }
  11642. function Mn(n) {
  11643. var t = -1,
  11644. r = null == n ? 0 : n.length;
  11645. for (this.clear(); ++t < r;) {
  11646. var e = n[t];
  11647. this.set(e[0], e[1]);
  11648. }
  11649. }
  11650. function Tn(n) {
  11651. var t = -1,
  11652. r = null == n ? 0 : n.length;
  11653. for (this.clear(); ++t < r;) {
  11654. var e = n[t];
  11655. this.set(e[0], e[1]);
  11656. }
  11657. }
  11658. function Fn(n) {
  11659. var t = -1,
  11660. r = null == n ? 0 : n.length;
  11661. for (this.clear(); ++t < r;) {
  11662. var e = n[t];
  11663. this.set(e[0], e[1]);
  11664. }
  11665. }
  11666. function Nn(n) {
  11667. var t = -1,
  11668. r = null == n ? 0 : n.length;
  11669. for (this.__data__ = new Fn(); ++t < r;) {
  11670. this.add(n[t]);
  11671. }
  11672. }
  11673. function Zn(n) {
  11674. this.size = (this.__data__ = new Tn(n)).size;
  11675. }
  11676. function qn(n, t) {
  11677. var r,
  11678. e = of(n),
  11679. u = !e && uf(n),
  11680. i = !e && !u && cf(n),
  11681. o = !e && !u && !i && pf(n),
  11682. u = (e = e || u || i || o) ? A(n.length, Xu) : [],
  11683. f = u.length;
  11684. for (r in n) {
  11685. !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);
  11686. }
  11687. return u;
  11688. }
  11689. function Qn(n) {
  11690. var t = n.length;
  11691. return t ? n[ir(0, t - 1)] : T;
  11692. }
  11693. function et(n, t) {
  11694. return Ce(Ur(n), pt(t, 0, n.length));
  11695. }
  11696. function ut(n) {
  11697. return Ce(Ur(n));
  11698. }
  11699. function it(n, t, r) {
  11700. (r === T || au(n[t], r)) && (r !== T || t in n) || st(n, t, r);
  11701. }
  11702. function ot(n, t, r) {
  11703. var e = n[t];
  11704. ii.call(n, t) && au(e, r) && (r !== T || t in n) || st(n, t, r);
  11705. }
  11706. function ft(n, t) {
  11707. for (var r = n.length; r--;) {
  11708. if (au(n[r][0], t)) return r;
  11709. }
  11710. return -1;
  11711. }
  11712. function ct(n, t, r, e) {
  11713. return eo(n, function (n, u, i) {
  11714. t(e, n, r(n), i);
  11715. }), e;
  11716. }
  11717. function at(n, t) {
  11718. return n && Cr(t, zu(t), n);
  11719. }
  11720. function lt(n, t) {
  11721. return n && Cr(t, Wu(t), n);
  11722. }
  11723. function st(n, t, r) {
  11724. "__proto__" == t && mi ? mi(n, t, {
  11725. configurable: true,
  11726. enumerable: true,
  11727. value: r,
  11728. writable: true
  11729. }) : n[t] = r;
  11730. }
  11731. function ht(n, t) {
  11732. for (var r = -1, e = t.length, u = Vu(e), i = null == n; ++r < e;) {
  11733. u[r] = i ? T : Iu(n, t[r]);
  11734. }
  11735. return u;
  11736. }
  11737. function pt(n, t, r) {
  11738. return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n;
  11739. }
  11740. function _t(n, t, e, u, i, o) {
  11741. var f,
  11742. c = 1 & t,
  11743. a = 2 & t,
  11744. l = 4 & t;
  11745. if (e && (f = i ? e(n, u, i, o) : e(n)), f !== T) return f;
  11746. if (!gu(n)) return n;
  11747. if (u = of(n)) {
  11748. if (f = me(n), !c) return Ur(n, f);
  11749. } else {
  11750. var s = _o(n),
  11751. h = "[object Function]" == s || "[object GeneratorFunction]" == s;
  11752. if (cf(n)) return Ir(n, c);
  11753. if ("[object Object]" == s || "[object Arguments]" == s || h && !i) {
  11754. if (f = a || h ? {} : Ae(n), !c) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n));
  11755. } else {
  11756. if (!Ln[s]) return i ? n : {};
  11757. f = Ee(n, s, c);
  11758. }
  11759. }
  11760. if (o || (o = new Zn()), i = o.get(n)) return i;
  11761. if (o.set(n, f), hf(n)) return n.forEach(function (r) {
  11762. f.add(_t(r, t, e, r, n, o));
  11763. }), f;
  11764. if (lf(n)) return n.forEach(function (r, u) {
  11765. f.set(u, _t(r, t, e, u, n, o));
  11766. }), f;
  11767. var a = l ? a ? ve : _e : a ? Wu : zu,
  11768. p = u ? T : a(n);
  11769. return r(p || n, function (r, u) {
  11770. p && (u = r, r = n[u]), ot(f, u, _t(r, t, e, u, n, o));
  11771. }), f;
  11772. }
  11773. function vt(n) {
  11774. var t = zu(n);
  11775. return function (r) {
  11776. return gt(r, n, t);
  11777. };
  11778. }
  11779. function gt(n, t, r) {
  11780. var e = r.length;
  11781. if (null == n) return !e;
  11782. for (n = Yu(n); e--;) {
  11783. var u = r[e],
  11784. i = t[u],
  11785. o = n[u];
  11786. if (o === T && !(u in n) || !i(o)) return false;
  11787. }
  11788. return true;
  11789. }
  11790. function dt(n, t, r) {
  11791. if (typeof n != "function") throw new ni("Expected a function");
  11792. return yo(function () {
  11793. n.apply(T, r);
  11794. }, t);
  11795. }
  11796. function yt(n, t, r, e) {
  11797. var u = -1,
  11798. i = o,
  11799. a = true,
  11800. l = n.length,
  11801. s = [],
  11802. h = t.length;
  11803. if (!l) return s;
  11804. r && (t = c(t, k(r))), e ? (i = f, a = false) : 200 <= t.length && (i = O, a = false, t = new Nn(t));
  11805. n: for (; ++u < l;) {
  11806. var p = n[u],
  11807. _ = null == r ? p : r(p),
  11808. p = e || 0 !== p ? p : 0;
  11809. if (a && _ === _) {
  11810. for (var v = h; v--;) {
  11811. if (t[v] === _) continue n;
  11812. }
  11813. s.push(p);
  11814. } else i(t, _, e) || s.push(p);
  11815. }
  11816. return s;
  11817. }
  11818. function bt(n, t) {
  11819. var r = true;
  11820. return eo(n, function (n, e, u) {
  11821. return r = !!t(n, e, u);
  11822. }), r;
  11823. }
  11824. function xt(n, t, r) {
  11825. for (var e = -1, u = n.length; ++e < u;) {
  11826. var i = n[e],
  11827. o = t(i);
  11828. if (null != o && (f === T ? o === o && !ju(o) : r(o, f))) var f = o,
  11829. c = i;
  11830. }
  11831. return c;
  11832. }
  11833. function jt(n, t) {
  11834. var r = [];
  11835. return eo(n, function (n, e, u) {
  11836. t(n, e, u) && r.push(n);
  11837. }), r;
  11838. }
  11839. function wt(n, t, r, e, u) {
  11840. var i = -1,
  11841. o = n.length;
  11842. for (r || (r = ke), u || (u = []); ++i < o;) {
  11843. var f = n[i];
  11844. 0 < t && r(f) ? 1 < t ? wt(f, t - 1, r, e, u) : a(u, f) : e || (u[u.length] = f);
  11845. }
  11846. return u;
  11847. }
  11848. function mt(n, t) {
  11849. return n && io(n, t, zu);
  11850. }
  11851. function At(n, t) {
  11852. return n && oo(n, t, zu);
  11853. }
  11854. function Et(n, t) {
  11855. return i(t, function (t) {
  11856. return pu(n[t]);
  11857. });
  11858. }
  11859. function kt(n, t) {
  11860. t = Sr(t, n);
  11861. for (var r = 0, e = t.length; null != n && r < e;) {
  11862. n = n[De(t[r++])];
  11863. }
  11864. return r && r == e ? n : T;
  11865. }
  11866. function St(n, t, r) {
  11867. return t = t(n), of(n) ? t : a(t, r(n));
  11868. }
  11869. function Ot(n) {
  11870. if (null == n) n = n === T ? "[object Undefined]" : "[object Null]";else if (wi && wi in Yu(n)) {
  11871. var t = ii.call(n, wi),
  11872. r = n[wi];
  11873. try {
  11874. n[wi] = T;
  11875. var e = true;
  11876. } catch (n) {}
  11877. var u = ci.call(n);
  11878. e && (t ? n[wi] = r : delete n[wi]), n = u;
  11879. } else n = ci.call(n);
  11880. return n;
  11881. }
  11882. function It(n, t) {
  11883. return n > t;
  11884. }
  11885. function Rt(n, t) {
  11886. return null != n && ii.call(n, t);
  11887. }
  11888. function zt(n, t) {
  11889. return null != n && t in Yu(n);
  11890. }
  11891. function Wt(n, t, r) {
  11892. for (var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Vu(i), s = 1 / 0, h = []; a--;) {
  11893. var p = n[a];
  11894. 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;
  11895. }
  11896. var p = n[0],
  11897. _ = -1,
  11898. v = l[0];
  11899. n: for (; ++_ < u && h.length < s;) {
  11900. var g = p[_],
  11901. d = t ? t(g) : g,
  11902. g = r || 0 !== g ? g : 0;
  11903. if (v ? !O(v, d) : !e(h, d, r)) {
  11904. for (a = i; --a;) {
  11905. var y = l[a];
  11906. if (y ? !O(y, d) : !e(n[a], d, r)) continue n;
  11907. }
  11908. v && v.push(d), h.push(g);
  11909. }
  11910. }
  11911. return h;
  11912. }
  11913. function Bt(n, t, r) {
  11914. var e = {};
  11915. return mt(n, function (n, u, i) {
  11916. t(e, r(n), u, i);
  11917. }), e;
  11918. }
  11919. function Lt(t, r, e) {
  11920. 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);
  11921. }
  11922. function Ut(n) {
  11923. return du(n) && "[object Arguments]" == Ot(n);
  11924. }
  11925. function Ct(n) {
  11926. return du(n) && "[object ArrayBuffer]" == Ot(n);
  11927. }
  11928. function Dt(n) {
  11929. return du(n) && "[object Date]" == Ot(n);
  11930. }
  11931. function Mt(n, t, r, e, u) {
  11932. if (n === t) t = true;else if (null == n || null == t || !du(n) && !du(t)) t = n !== n && t !== t;else n: {
  11933. var i = of(n),
  11934. o = of(t),
  11935. f = i ? "[object Array]" : _o(n),
  11936. c = o ? "[object Array]" : _o(t),
  11937. f = "[object Arguments]" == f ? "[object Object]" : f,
  11938. c = "[object Arguments]" == c ? "[object Object]" : c,
  11939. a = "[object Object]" == f,
  11940. o = "[object Object]" == c;
  11941. if ((c = f == c) && cf(n)) {
  11942. if (!cf(t)) {
  11943. t = false;
  11944. break n;
  11945. }
  11946. i = true, a = false;
  11947. }
  11948. 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 {
  11949. if (!(1 & r) && (i = a && ii.call(n, "__wrapped__"), f = o && ii.call(t, "__wrapped__"), i || f)) {
  11950. n = i ? n.value() : n, t = f ? t.value() : t, u || (u = new Zn()), t = Mt(n, t, r, e, u);
  11951. break n;
  11952. }
  11953. if (c) {
  11954. t: if (u || (u = new Zn()), i = 1 & r, f = _e(n), o = f.length, c = _e(t).length, o == c || i) {
  11955. for (a = o; a--;) {
  11956. var l = f[a];
  11957. if (!(i ? l in t : ii.call(t, l))) {
  11958. t = false;
  11959. break t;
  11960. }
  11961. }
  11962. if ((c = u.get(n)) && u.get(t)) t = c == t;else {
  11963. c = true, u.set(n, t), u.set(t, n);
  11964. for (var s = i; ++a < o;) {
  11965. var l = f[a],
  11966. h = n[l],
  11967. p = t[l];
  11968. if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u);
  11969. if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) {
  11970. c = false;
  11971. break;
  11972. }
  11973. s || (s = "constructor" == l);
  11974. }
  11975. 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;
  11976. }
  11977. } else t = false;
  11978. } else t = false;
  11979. }
  11980. }
  11981. return t;
  11982. }
  11983. function Tt(n) {
  11984. return du(n) && "[object Map]" == _o(n);
  11985. }
  11986. function $t(n, t, r, e) {
  11987. var u = r.length,
  11988. i = u,
  11989. o = !e;
  11990. if (null == n) return !i;
  11991. for (n = Yu(n); u--;) {
  11992. var f = r[u];
  11993. if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false;
  11994. }
  11995. for (; ++u < i;) {
  11996. var f = r[u],
  11997. c = f[0],
  11998. a = n[c],
  11999. l = f[1];
  12000. if (o && f[2]) {
  12001. if (a === T && !(c in n)) return false;
  12002. } else {
  12003. if (f = new Zn(), e) var s = e(a, l, c, n, t, f);
  12004. if (s === T ? !Mt(l, a, 3, e, f) : !s) return false;
  12005. }
  12006. }
  12007. return true;
  12008. }
  12009. function Ft(n) {
  12010. return !(!gu(n) || fi && fi in n) && (pu(n) ? si : dn).test(Me(n));
  12011. }
  12012. function Nt(n) {
  12013. return du(n) && "[object RegExp]" == Ot(n);
  12014. }
  12015. function Pt(n) {
  12016. return du(n) && "[object Set]" == _o(n);
  12017. }
  12018. function Zt(n) {
  12019. return du(n) && vu(n.length) && !!Bn[Ot(n)];
  12020. }
  12021. function qt(n) {
  12022. return typeof n == "function" ? n : null == n ? Tu : _typeof(n) == "object" ? of(n) ? Jt(n[0], n[1]) : Ht(n) : Pu(n);
  12023. }
  12024. function Vt(n) {
  12025. if (!ze(n)) return Bi(n);
  12026. var t,
  12027. r = [];
  12028. for (t in Yu(n)) {
  12029. ii.call(n, t) && "constructor" != t && r.push(t);
  12030. }
  12031. return r;
  12032. }
  12033. function Kt(n, t) {
  12034. return n < t;
  12035. }
  12036. function Gt(n, t) {
  12037. var r = -1,
  12038. e = lu(n) ? Vu(n.length) : [];
  12039. return eo(n, function (n, u, i) {
  12040. e[++r] = t(n, u, i);
  12041. }), e;
  12042. }
  12043. function Ht(n) {
  12044. var t = xe(n);
  12045. return 1 == t.length && t[0][2] ? We(t[0][0], t[0][1]) : function (r) {
  12046. return r === n || $t(r, n, t);
  12047. };
  12048. }
  12049. function Jt(n, t) {
  12050. return Ie(n) && t === t && !gu(t) ? We(De(n), t) : function (r) {
  12051. var e = Iu(r, n);
  12052. return e === T && e === t ? Ru(r, n) : Mt(t, e, 3);
  12053. };
  12054. }
  12055. function Yt(n, t, r, e, u) {
  12056. n !== t && io(t, function (i, o) {
  12057. if (gu(i)) {
  12058. u || (u = new Zn());
  12059. var f = u,
  12060. c = "__proto__" == o ? T : n[o],
  12061. a = "__proto__" == o ? T : t[o],
  12062. l = f.get(a);
  12063. if (l) it(n, o, l);else {
  12064. var l = e ? e(c, a, o + "", n, t, f) : T,
  12065. s = l === T;
  12066. if (s) {
  12067. var h = of(a),
  12068. p = !h && cf(a),
  12069. _ = !h && !p && pf(a),
  12070. l = a;
  12071. 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;
  12072. }
  12073. s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l);
  12074. }
  12075. } else f = e ? e("__proto__" == o ? T : n[o], i, o + "", n, t, u) : T, f === T && (f = i), it(n, o, f);
  12076. }, Wu);
  12077. }
  12078. function Qt(n, t) {
  12079. var r = n.length;
  12080. if (r) return t += 0 > t ? r : 0, Se(t, r) ? n[t] : T;
  12081. }
  12082. function Xt(n, t, r) {
  12083. var e = -1;
  12084. return t = c(t.length ? t : [Tu], k(ye())), n = Gt(n, function (n) {
  12085. return {
  12086. a: c(t, function (t) {
  12087. return t(n);
  12088. }),
  12089. b: ++e,
  12090. c: n
  12091. };
  12092. }), w(n, function (n, t) {
  12093. var e;
  12094. n: {
  12095. e = -1;
  12096. for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o;) {
  12097. var c = Wr(u[e], i[e]);
  12098. if (c) {
  12099. e = e >= f ? c : c * ("desc" == r[e] ? -1 : 1);
  12100. break n;
  12101. }
  12102. }
  12103. e = n.b - t.b;
  12104. }
  12105. return e;
  12106. });
  12107. }
  12108. function nr(n, t) {
  12109. return tr(n, t, function (t, r) {
  12110. return Ru(n, r);
  12111. });
  12112. }
  12113. function tr(n, t, r) {
  12114. for (var e = -1, u = t.length, i = {}; ++e < u;) {
  12115. var o = t[e],
  12116. f = kt(n, o);
  12117. r(f, o) && lr(i, Sr(o, n), f);
  12118. }
  12119. return i;
  12120. }
  12121. function rr(n) {
  12122. return function (t) {
  12123. return kt(t, n);
  12124. };
  12125. }
  12126. function er(n, t, r, e) {
  12127. var u = e ? g : v,
  12128. i = -1,
  12129. o = t.length,
  12130. f = n;
  12131. for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o;) {
  12132. for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e));) {
  12133. f !== n && bi.call(f, a, 1), bi.call(n, a, 1);
  12134. }
  12135. }
  12136. return n;
  12137. }
  12138. function ur(n, t) {
  12139. for (var r = n ? t.length : 0, e = r - 1; r--;) {
  12140. var u = t[r];
  12141. if (r == e || u !== i) {
  12142. var i = u;
  12143. Se(u) ? bi.call(n, u, 1) : xr(n, u);
  12144. }
  12145. }
  12146. }
  12147. function ir(n, t) {
  12148. return n + Oi(Mi() * (t - n + 1));
  12149. }
  12150. function or(n, t) {
  12151. var r = "";
  12152. if (!n || 1 > t || 9007199254740991 < t) return r;
  12153. do {
  12154. t % 2 && (r += n), (t = Oi(t / 2)) && (n += n);
  12155. } while (t);
  12156. return r;
  12157. }
  12158. function fr(n, t) {
  12159. return bo(Be(n, t, Tu), n + "");
  12160. }
  12161. function cr(n) {
  12162. return Qn(Lu(n));
  12163. }
  12164. function ar(n, t) {
  12165. var r = Lu(n);
  12166. return Ce(r, pt(t, 0, r.length));
  12167. }
  12168. function lr(n, t, r, e) {
  12169. if (!gu(n)) return n;
  12170. t = Sr(t, n);
  12171. for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i;) {
  12172. var c = De(t[u]),
  12173. a = r;
  12174. if (u != o) {
  12175. var l = f[c],
  12176. a = e ? e(l, c, f) : T;
  12177. a === T && (a = gu(l) ? l : Se(t[u + 1]) ? [] : {});
  12178. }
  12179. ot(f, c, a), f = f[c];
  12180. }
  12181. return n;
  12182. }
  12183. function sr(n) {
  12184. return Ce(Lu(n));
  12185. }
  12186. function hr(n, t, r) {
  12187. var e = -1,
  12188. u = n.length;
  12189. 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;) {
  12190. r[e] = n[e + t];
  12191. }
  12192. return r;
  12193. }
  12194. function pr(n, t) {
  12195. var r;
  12196. return eo(n, function (n, e, u) {
  12197. return r = t(n, e, u), !r;
  12198. }), !!r;
  12199. }
  12200. function _r(n, t, r) {
  12201. var e = 0,
  12202. u = null == n ? e : n.length;
  12203. if (typeof t == "number" && t === t && 2147483647 >= u) {
  12204. for (; e < u;) {
  12205. var i = e + u >>> 1,
  12206. o = n[i];
  12207. null !== o && !ju(o) && (r ? o <= t : o < t) ? e = i + 1 : u = i;
  12208. }
  12209. return u;
  12210. }
  12211. return vr(n, t, Tu, r);
  12212. }
  12213. function vr(n, t, r, e) {
  12214. t = r(t);
  12215. for (var u = 0, i = null == n ? 0 : n.length, o = t !== t, f = null === t, c = ju(t), a = t === T; u < i;) {
  12216. var l = Oi((u + i) / 2),
  12217. s = r(n[l]),
  12218. h = s !== T,
  12219. p = null === s,
  12220. _ = s === s,
  12221. v = ju(s);
  12222. (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;
  12223. }
  12224. return Ui(i, 4294967294);
  12225. }
  12226. function gr(n, t) {
  12227. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  12228. var o = n[r],
  12229. f = t ? t(o) : o;
  12230. if (!r || !au(f, c)) {
  12231. var c = f;
  12232. i[u++] = 0 === o ? 0 : o;
  12233. }
  12234. }
  12235. return i;
  12236. }
  12237. function dr(n) {
  12238. return typeof n == "number" ? n : ju(n) ? F : +n;
  12239. }
  12240. function yr(n) {
  12241. if (typeof n == "string") return n;
  12242. if (of(n)) return c(n, yr) + "";
  12243. if (ju(n)) return to ? to.call(n) : "";
  12244. var t = n + "";
  12245. return "0" == t && 1 / n == -$ ? "-0" : t;
  12246. }
  12247. function br(n, t, r) {
  12248. var e = -1,
  12249. u = o,
  12250. i = n.length,
  12251. c = true,
  12252. a = [],
  12253. l = a;
  12254. if (r) c = false, u = f;else if (200 <= i) {
  12255. if (u = t ? null : lo(n)) return U(u);
  12256. c = false, u = O, l = new Nn();
  12257. } else l = t ? [] : a;
  12258. n: for (; ++e < i;) {
  12259. var s = n[e],
  12260. h = t ? t(s) : s,
  12261. s = r || 0 !== s ? s : 0;
  12262. if (c && h === h) {
  12263. for (var p = l.length; p--;) {
  12264. if (l[p] === h) continue n;
  12265. }
  12266. t && l.push(h), a.push(s);
  12267. } else u(l, h, r) || (l !== a && l.push(h), a.push(s));
  12268. }
  12269. return a;
  12270. }
  12271. function xr(n, t) {
  12272. return t = Sr(t, n), n = 2 > t.length ? n : kt(n, hr(t, 0, -1)), null == n || delete n[De(qe(t))];
  12273. }
  12274. function jr(n, t, r, e) {
  12275. for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n);) {
  12276. ;
  12277. }
  12278. return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i);
  12279. }
  12280. function wr(n, t) {
  12281. var r = n;
  12282. return r instanceof Un && (r = r.value()), l(t, function (n, t) {
  12283. return t.func.apply(t.thisArg, a([n], t.args));
  12284. }, r);
  12285. }
  12286. function mr(n, t, r) {
  12287. var e = n.length;
  12288. if (2 > e) return e ? br(n[0]) : [];
  12289. for (var u = -1, i = Vu(e); ++u < e;) {
  12290. for (var o = n[u], f = -1; ++f < e;) {
  12291. f != u && (i[u] = yt(i[u] || o, n[f], t, r));
  12292. }
  12293. }
  12294. return br(wt(i, 1), t, r);
  12295. }
  12296. function Ar(n, t, r) {
  12297. for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u;) {
  12298. r(o, n[e], e < i ? t[e] : T);
  12299. }
  12300. return o;
  12301. }
  12302. function Er(n) {
  12303. return su(n) ? n : [];
  12304. }
  12305. function kr(n) {
  12306. return typeof n == "function" ? n : Tu;
  12307. }
  12308. function Sr(n, t) {
  12309. return of(n) ? n : Ie(n, t) ? [n] : xo(Ou(n));
  12310. }
  12311. function Or(n, t, r) {
  12312. var e = n.length;
  12313. return r = r === T ? e : r, !t && r >= e ? n : hr(n, t, r);
  12314. }
  12315. function Ir(n, t) {
  12316. if (t) return n.slice();
  12317. var r = n.length,
  12318. r = vi ? vi(r) : new n.constructor(r);
  12319. return n.copy(r), r;
  12320. }
  12321. function Rr(n) {
  12322. var t = new n.constructor(n.byteLength);
  12323. return new _i(t).set(new _i(n)), t;
  12324. }
  12325. function zr(n, t) {
  12326. return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length);
  12327. }
  12328. function Wr(n, t) {
  12329. if (n !== t) {
  12330. var r = n !== T,
  12331. e = null === n,
  12332. u = n === n,
  12333. i = ju(n),
  12334. o = t !== T,
  12335. f = null === t,
  12336. c = t === t,
  12337. a = ju(t);
  12338. if (!f && !a && !i && n > t || i && o && c && !f && !a || e && o && c || !r && c || !u) return 1;
  12339. if (!e && !i && !a && n < t || a && r && u && !e && !i || f && r && u || !o && u || !c) return -1;
  12340. }
  12341. return 0;
  12342. }
  12343. function Br(n, t, r, e) {
  12344. var u = -1,
  12345. i = n.length,
  12346. o = r.length,
  12347. f = -1,
  12348. c = t.length,
  12349. a = Li(i - o, 0),
  12350. l = Vu(c + a);
  12351. for (e = !e; ++f < c;) {
  12352. l[f] = t[f];
  12353. }
  12354. for (; ++u < o;) {
  12355. (e || u < i) && (l[r[u]] = n[u]);
  12356. }
  12357. for (; a--;) {
  12358. l[f++] = n[u++];
  12359. }
  12360. return l;
  12361. }
  12362. function Lr(n, t, r, e) {
  12363. var u = -1,
  12364. i = n.length,
  12365. o = -1,
  12366. f = r.length,
  12367. c = -1,
  12368. a = t.length,
  12369. l = Li(i - f, 0),
  12370. s = Vu(l + a);
  12371. for (e = !e; ++u < l;) {
  12372. s[u] = n[u];
  12373. }
  12374. for (l = u; ++c < a;) {
  12375. s[l + c] = t[c];
  12376. }
  12377. for (; ++o < f;) {
  12378. (e || u < i) && (s[l + r[o]] = n[u++]);
  12379. }
  12380. return s;
  12381. }
  12382. function Ur(n, t) {
  12383. var r = -1,
  12384. e = n.length;
  12385. for (t || (t = Vu(e)); ++r < e;) {
  12386. t[r] = n[r];
  12387. }
  12388. return t;
  12389. }
  12390. function Cr(n, t, r, e) {
  12391. var u = !r;
  12392. r || (r = {});
  12393. for (var i = -1, o = t.length; ++i < o;) {
  12394. var f = t[i],
  12395. c = e ? e(r[f], n[f], f, r, n) : T;
  12396. c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c);
  12397. }
  12398. return r;
  12399. }
  12400. function Dr(n, t) {
  12401. return Cr(n, ho(n), t);
  12402. }
  12403. function Mr(n, t) {
  12404. return Cr(n, po(n), t);
  12405. }
  12406. function Tr(n, r) {
  12407. return function (e, u) {
  12408. var i = of(e) ? t : ct,
  12409. o = r ? r() : {};
  12410. return i(e, n, ye(u, 2), o);
  12411. };
  12412. }
  12413. function $r(n) {
  12414. return fr(function (t, r) {
  12415. var e = -1,
  12416. u = r.length,
  12417. i = 1 < u ? r[u - 1] : T,
  12418. o = 2 < u ? r[2] : T,
  12419. i = 3 < n.length && typeof i == "function" ? (u--, i) : T;
  12420. for (o && Oe(r[0], r[1], o) && (i = 3 > u ? T : i, u = 1), t = Yu(t); ++e < u;) {
  12421. (o = r[e]) && n(t, o, e, i);
  12422. }
  12423. return t;
  12424. });
  12425. }
  12426. function Fr(n, t) {
  12427. return function (r, e) {
  12428. if (null == r) return r;
  12429. if (!lu(r)) return n(r, e);
  12430. for (var u = r.length, i = t ? u : -1, o = Yu(r); (t ? i-- : ++i < u) && false !== e(o[i], i, o);) {
  12431. ;
  12432. }
  12433. return r;
  12434. };
  12435. }
  12436. function Nr(n) {
  12437. return function (t, r, e) {
  12438. var u = -1,
  12439. i = Yu(t);
  12440. e = e(t);
  12441. for (var o = e.length; o--;) {
  12442. var f = e[n ? o : ++u];
  12443. if (false === r(i[f], f, i)) break;
  12444. }
  12445. return t;
  12446. };
  12447. }
  12448. function Pr(n, t, r) {
  12449. function e() {
  12450. return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments);
  12451. }
  12452. var u = 1 & t,
  12453. i = Vr(n);
  12454. return e;
  12455. }
  12456. function Zr(n) {
  12457. return function (t) {
  12458. t = Ou(t);
  12459. var r = Rn.test(t) ? M(t) : T,
  12460. e = r ? r[0] : t.charAt(0);
  12461. return t = r ? Or(r, 1).join("") : t.slice(1), e[n]() + t;
  12462. };
  12463. }
  12464. function qr(n) {
  12465. return function (t) {
  12466. return l(Du(Cu(t).replace(kn, "")), n, "");
  12467. };
  12468. }
  12469. function Vr(n) {
  12470. return function () {
  12471. var t = arguments;
  12472. switch (t.length) {
  12473. case 0:
  12474. return new n();
  12475. case 1:
  12476. return new n(t[0]);
  12477. case 2:
  12478. return new n(t[0], t[1]);
  12479. case 3:
  12480. return new n(t[0], t[1], t[2]);
  12481. case 4:
  12482. return new n(t[0], t[1], t[2], t[3]);
  12483. case 5:
  12484. return new n(t[0], t[1], t[2], t[3], t[4]);
  12485. case 6:
  12486. return new n(t[0], t[1], t[2], t[3], t[4], t[5]);
  12487. case 7:
  12488. return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]);
  12489. }
  12490. var r = ro(n.prototype),
  12491. t = n.apply(r, t);
  12492. return gu(t) ? t : r;
  12493. };
  12494. }
  12495. function Kr(t, r, e) {
  12496. function u() {
  12497. for (var o = arguments.length, f = Vu(o), c = o, a = de(u); c--;) {
  12498. f[c] = arguments[c];
  12499. }
  12500. 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);
  12501. }
  12502. var i = Vr(t);
  12503. return u;
  12504. }
  12505. function Gr(n) {
  12506. return function (t, r, e) {
  12507. var u = Yu(t);
  12508. if (!lu(t)) {
  12509. var i = ye(r, 3);
  12510. t = zu(t), r = function r(n) {
  12511. return i(u[n], n, u);
  12512. };
  12513. }
  12514. return r = n(t, r, e), -1 < r ? u[i ? t[r] : r] : T;
  12515. };
  12516. }
  12517. function Hr(n) {
  12518. return pe(function (t) {
  12519. var r = t.length,
  12520. e = r,
  12521. u = On.prototype.thru;
  12522. for (n && t.reverse(); e--;) {
  12523. var i = t[e];
  12524. if (typeof i != "function") throw new ni("Expected a function");
  12525. if (u && !o && "wrapper" == ge(i)) var o = new On([], true);
  12526. }
  12527. for (e = o ? e : r; ++e < r;) {
  12528. var i = t[e],
  12529. u = ge(i),
  12530. f = "wrapper" == u ? so(i) : T,
  12531. 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);
  12532. }
  12533. return function () {
  12534. var n = arguments,
  12535. e = n[0];
  12536. if (o && 1 == n.length && of(e)) return o.plant(e).value();
  12537. for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r;) {
  12538. n = t[u].call(this, n);
  12539. }
  12540. return n;
  12541. };
  12542. });
  12543. }
  12544. function Jr(n, t, r, e, u, i, o, f, c, a) {
  12545. function l() {
  12546. for (var d = arguments.length, y = Vu(d), b = d; b--;) {
  12547. y[b] = arguments[b];
  12548. }
  12549. if (_) {
  12550. var x,
  12551. j = de(l),
  12552. b = y.length;
  12553. for (x = 0; b--;) {
  12554. y[b] === j && ++x;
  12555. }
  12556. }
  12557. 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);
  12558. if (j = h ? r : this, b = p ? j[n] : n, d = y.length, f) {
  12559. x = y.length;
  12560. for (var w = Ui(f.length, x), m = Ur(y); w--;) {
  12561. var A = f[w];
  12562. y[w] = Se(A, x) ? m[A] : T;
  12563. }
  12564. } else v && 1 < d && y.reverse();
  12565. return s && c < d && (y.length = c), this && this !== $n && this instanceof l && (b = g || Vr(b)), b.apply(j, y);
  12566. }
  12567. var s = 128 & t,
  12568. h = 1 & t,
  12569. p = 2 & t,
  12570. _ = 24 & t,
  12571. v = 512 & t,
  12572. g = p ? T : Vr(n);
  12573. return l;
  12574. }
  12575. function Yr(n, t) {
  12576. return function (r, e) {
  12577. return Bt(r, n, t(e));
  12578. };
  12579. }
  12580. function Qr(n, t) {
  12581. return function (r, e) {
  12582. var u;
  12583. if (r === T && e === T) return t;
  12584. if (r !== T && (u = r), e !== T) {
  12585. if (u === T) return e;
  12586. typeof r == "string" || typeof e == "string" ? (r = yr(r), e = yr(e)) : (r = dr(r), e = dr(e)), u = n(r, e);
  12587. }
  12588. return u;
  12589. };
  12590. }
  12591. function Xr(t) {
  12592. return pe(function (r) {
  12593. return r = c(r, k(ye())), fr(function (e) {
  12594. var u = this;
  12595. return t(r, function (t) {
  12596. return n(t, u, e);
  12597. });
  12598. });
  12599. });
  12600. }
  12601. function ne(n, t) {
  12602. t = t === T ? " " : yr(t);
  12603. var r = t.length;
  12604. 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));
  12605. }
  12606. function te(t, r, e, u) {
  12607. function i() {
  12608. 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;) {
  12609. s[a] = u[a];
  12610. }
  12611. for (; c--;) {
  12612. s[a++] = arguments[++r];
  12613. }
  12614. return n(h, o ? e : this, s);
  12615. }
  12616. var o = 1 & r,
  12617. f = Vr(t);
  12618. return i;
  12619. }
  12620. function re(n) {
  12621. return function (t, r, e) {
  12622. 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);
  12623. var u = -1;
  12624. r = Li(Si((r - t) / (e || 1)), 0);
  12625. for (var i = Vu(r); r--;) {
  12626. i[n ? r : ++u] = t, t += e;
  12627. }
  12628. return i;
  12629. };
  12630. }
  12631. function ee(n) {
  12632. return function (t, r) {
  12633. return typeof t == "string" && typeof r == "string" || (t = ku(t), r = ku(r)), n(t, r);
  12634. };
  12635. }
  12636. function ue(n, t, r, e, u, i, o, f, c, a) {
  12637. var l = 8 & t,
  12638. s = l ? o : T;
  12639. o = l ? T : o;
  12640. var h = l ? i : T;
  12641. 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);
  12642. }
  12643. function ie(n) {
  12644. var t = Ju[n];
  12645. return function (n, r) {
  12646. if (n = ku(n), r = null == r ? 0 : Ui(Au(r), 292)) {
  12647. var e = (Ou(n) + "e").split("e"),
  12648. e = t(e[0] + "e" + (+e[1] + r)),
  12649. e = (Ou(e) + "e").split("e");
  12650. return +(e[0] + "e" + (+e[1] - r));
  12651. }
  12652. return t(n);
  12653. };
  12654. }
  12655. function oe(n) {
  12656. return function (t) {
  12657. var r = _o(t);
  12658. return "[object Map]" == r ? W(t) : "[object Set]" == r ? C(t) : E(t, n(t));
  12659. };
  12660. }
  12661. function fe(n, t, r, e, u, i, o, f) {
  12662. var c = 2 & t;
  12663. if (!c && typeof n != "function") throw new ni("Expected a function");
  12664. var a = e ? e.length : 0;
  12665. 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) {
  12666. var l = e,
  12667. s = u;
  12668. e = u = T;
  12669. }
  12670. var h = c ? T : so(n);
  12671. 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);
  12672. }
  12673. function ce(n, t, r, e) {
  12674. return n === T || au(n, ri[r]) && !ii.call(e, r) ? t : n;
  12675. }
  12676. function ae(n, t, r, e, u, i) {
  12677. return gu(n) && gu(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n;
  12678. }
  12679. function le(n) {
  12680. return bu(n) ? T : n;
  12681. }
  12682. function se(n, t, r, e, u, i) {
  12683. var o = 1 & r,
  12684. f = n.length,
  12685. c = t.length;
  12686. if (f != c && !(o && c > f)) return false;
  12687. if ((c = i.get(n)) && i.get(t)) return c == t;
  12688. var c = -1,
  12689. a = true,
  12690. l = 2 & r ? new Nn() : T;
  12691. for (i.set(n, t), i.set(t, n); ++c < f;) {
  12692. var s = n[c],
  12693. p = t[c];
  12694. if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i);
  12695. if (_ !== T) {
  12696. if (_) continue;
  12697. a = false;
  12698. break;
  12699. }
  12700. if (l) {
  12701. if (!h(t, function (n, t) {
  12702. if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t);
  12703. })) {
  12704. a = false;
  12705. break;
  12706. }
  12707. } else if (s !== p && !u(s, p, r, e, i)) {
  12708. a = false;
  12709. break;
  12710. }
  12711. }
  12712. return i.delete(n), i.delete(t), a;
  12713. }
  12714. function he(n, t, r, e, u, i, o) {
  12715. switch (r) {
  12716. case "[object DataView]":
  12717. if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break;
  12718. n = n.buffer, t = t.buffer;
  12719. case "[object ArrayBuffer]":
  12720. if (n.byteLength != t.byteLength || !i(new _i(n), new _i(t))) break;
  12721. return true;
  12722. case "[object Boolean]":
  12723. case "[object Date]":
  12724. case "[object Number]":
  12725. return au(+n, +t);
  12726. case "[object Error]":
  12727. return n.name == t.name && n.message == t.message;
  12728. case "[object RegExp]":
  12729. case "[object String]":
  12730. return n == t + "";
  12731. case "[object Map]":
  12732. var f = W;
  12733. case "[object Set]":
  12734. if (f || (f = U), n.size != t.size && !(1 & e)) break;
  12735. 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);
  12736. case "[object Symbol]":
  12737. if (no) return no.call(n) == no.call(t);
  12738. }
  12739. return false;
  12740. }
  12741. function pe(n) {
  12742. return bo(Be(n, T, Pe), n + "");
  12743. }
  12744. function _e(n) {
  12745. return St(n, zu, ho);
  12746. }
  12747. function ve(n) {
  12748. return St(n, Wu, po);
  12749. }
  12750. function ge(n) {
  12751. for (var t = n.name + "", r = Ki[t], e = ii.call(Ki, t) ? r.length : 0; e--;) {
  12752. var u = r[e],
  12753. i = u.func;
  12754. if (null == i || i == n) return u.name;
  12755. }
  12756. return t;
  12757. }
  12758. function de(n) {
  12759. return (ii.call(An, "placeholder") ? An : n).placeholder;
  12760. }
  12761. function ye() {
  12762. var n = An.iteratee || $u,
  12763. n = n === $u ? qt : n;
  12764. return arguments.length ? n(arguments[0], arguments[1]) : n;
  12765. }
  12766. function be(n, t) {
  12767. var r = n.__data__,
  12768. e = _typeof(t);
  12769. return ("string" == e || "number" == e || "symbol" == e || "boolean" == e ? "__proto__" !== t : null === t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
  12770. }
  12771. function xe(n) {
  12772. for (var t = zu(n), r = t.length; r--;) {
  12773. var e = t[r],
  12774. u = n[e];
  12775. t[r] = [e, u, u === u && !gu(u)];
  12776. }
  12777. return t;
  12778. }
  12779. function je(n, t) {
  12780. var r = null == n ? T : n[t];
  12781. return Ft(r) ? r : T;
  12782. }
  12783. function we(n, t, r) {
  12784. t = Sr(t, n);
  12785. for (var e = -1, u = t.length, i = false; ++e < u;) {
  12786. var o = De(t[e]);
  12787. if (!(i = null != n && r(n, o))) break;
  12788. n = n[o];
  12789. }
  12790. return i || ++e != u ? i : (u = null == n ? 0 : n.length, !!u && vu(u) && Se(o, u) && (of(n) || uf(n)));
  12791. }
  12792. function me(n) {
  12793. var t = n.length,
  12794. r = new n.constructor(t);
  12795. return t && "string" == typeof n[0] && ii.call(n, "index") && (r.index = n.index, r.input = n.input), r;
  12796. }
  12797. function Ae(n) {
  12798. return typeof n.constructor != "function" || ze(n) ? {} : ro(gi(n));
  12799. }
  12800. function Ee(n, t, r) {
  12801. var e = n.constructor;
  12802. switch (t) {
  12803. case "[object ArrayBuffer]":
  12804. return Rr(n);
  12805. case "[object Boolean]":
  12806. case "[object Date]":
  12807. return new e(+n);
  12808. case "[object DataView]":
  12809. return t = r ? Rr(n.buffer) : n.buffer, new n.constructor(t, n.byteOffset, n.byteLength);
  12810. case "[object Float32Array]":
  12811. case "[object Float64Array]":
  12812. case "[object Int8Array]":
  12813. case "[object Int16Array]":
  12814. case "[object Int32Array]":
  12815. case "[object Uint8Array]":
  12816. case "[object Uint8ClampedArray]":
  12817. case "[object Uint16Array]":
  12818. case "[object Uint32Array]":
  12819. return zr(n, r);
  12820. case "[object Map]":
  12821. return new e();
  12822. case "[object Number]":
  12823. case "[object String]":
  12824. return new e(n);
  12825. case "[object RegExp]":
  12826. return t = new n.constructor(n.source, _n.exec(n)), t.lastIndex = n.lastIndex, t;
  12827. case "[object Set]":
  12828. return new e();
  12829. case "[object Symbol]":
  12830. return no ? Yu(no.call(n)) : {};
  12831. }
  12832. }
  12833. function ke(n) {
  12834. return of(n) || uf(n) || !!(xi && n && n[xi]);
  12835. }
  12836. function Se(n, t) {
  12837. var r = _typeof(n);
  12838. return t = null == t ? 9007199254740991 : t, !!t && ("number" == r || "symbol" != r && bn.test(n)) && -1 < n && 0 == n % 1 && n < t;
  12839. }
  12840. function Oe(n, t, r) {
  12841. if (!gu(r)) return false;
  12842. var e = _typeof(t);
  12843. return !!("number" == e ? lu(r) && Se(t, r.length) : "string" == e && t in r) && au(r[t], n);
  12844. }
  12845. function Ie(n, t) {
  12846. if (of(n)) return false;
  12847. var r = _typeof(n);
  12848. return !("number" != r && "symbol" != r && "boolean" != r && null != n && !ju(n)) || nn.test(n) || !X.test(n) || null != t && n in Yu(t);
  12849. }
  12850. function Re(n) {
  12851. var t = ge(n),
  12852. r = An[t];
  12853. return typeof r == "function" && t in Un.prototype && (n === r || (t = so(r), !!t && n === t[0]));
  12854. }
  12855. function ze(n) {
  12856. var t = n && n.constructor;
  12857. return n === (typeof t == "function" && t.prototype || ri);
  12858. }
  12859. function We(n, t) {
  12860. return function (r) {
  12861. return null != r && r[n] === t && (t !== T || n in Yu(r));
  12862. };
  12863. }
  12864. function Be(t, r, e) {
  12865. return r = Li(r === T ? t.length - 1 : r, 0), function () {
  12866. for (var u = arguments, i = -1, o = Li(u.length - r, 0), f = Vu(o); ++i < o;) {
  12867. f[i] = u[r + i];
  12868. }
  12869. for (i = -1, o = Vu(r + 1); ++i < r;) {
  12870. o[i] = u[i];
  12871. }
  12872. return o[r] = e(f), n(t, this, o);
  12873. };
  12874. }
  12875. function Le(n, t, r) {
  12876. var e = t + "";
  12877. t = bo;
  12878. var u,
  12879. i = Te;
  12880. 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);
  12881. }
  12882. function Ue(n) {
  12883. var t = 0,
  12884. r = 0;
  12885. return function () {
  12886. var e = Ci(),
  12887. u = 16 - (e - r);
  12888. if (r = e, 0 < u) {
  12889. if (800 <= ++t) return arguments[0];
  12890. } else t = 0;
  12891. return n.apply(T, arguments);
  12892. };
  12893. }
  12894. function Ce(n, t) {
  12895. var r = -1,
  12896. e = n.length,
  12897. u = e - 1;
  12898. for (t = t === T ? e : t; ++r < t;) {
  12899. var e = ir(r, u),
  12900. i = n[e];
  12901. n[e] = n[r], n[r] = i;
  12902. }
  12903. return n.length = t, n;
  12904. }
  12905. function De(n) {
  12906. if (typeof n == "string" || ju(n)) return n;
  12907. var t = n + "";
  12908. return "0" == t && 1 / n == -$ ? "-0" : t;
  12909. }
  12910. function Me(n) {
  12911. if (null != n) {
  12912. try {
  12913. return ui.call(n);
  12914. } catch (n) {}
  12915. return n + "";
  12916. }
  12917. return "";
  12918. }
  12919. function Te(n, t) {
  12920. return r(N, function (r) {
  12921. var e = "_." + r[0];
  12922. t & r[1] && !o(n, e) && n.push(e);
  12923. }), n.sort();
  12924. }
  12925. function $e(n) {
  12926. if (n instanceof Un) return n.clone();
  12927. var t = new On(n.__wrapped__, n.__chain__);
  12928. return t.__actions__ = Ur(n.__actions__), t.__index__ = n.__index__, t.__values__ = n.__values__, t;
  12929. }
  12930. function Fe(n, t, r) {
  12931. var e = null == n ? 0 : n.length;
  12932. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), _(n, ye(t, 3), r)) : -1;
  12933. }
  12934. function Ne(n, t, r) {
  12935. var e = null == n ? 0 : n.length;
  12936. if (!e) return -1;
  12937. var u = e - 1;
  12938. return r !== T && (u = Au(r), u = 0 > r ? Li(e + u, 0) : Ui(u, e - 1)), _(n, ye(t, 3), u, true);
  12939. }
  12940. function Pe(n) {
  12941. return (null == n ? 0 : n.length) ? wt(n, 1) : [];
  12942. }
  12943. function Ze(n) {
  12944. return n && n.length ? n[0] : T;
  12945. }
  12946. function qe(n) {
  12947. var t = null == n ? 0 : n.length;
  12948. return t ? n[t - 1] : T;
  12949. }
  12950. function Ve(n, t) {
  12951. return n && n.length && t && t.length ? er(n, t) : n;
  12952. }
  12953. function Ke(n) {
  12954. return null == n ? n : Ti.call(n);
  12955. }
  12956. function Ge(n) {
  12957. if (!n || !n.length) return [];
  12958. var t = 0;
  12959. return n = i(n, function (n) {
  12960. if (su(n)) return t = Li(n.length, t), true;
  12961. }), A(t, function (t) {
  12962. return c(n, b(t));
  12963. });
  12964. }
  12965. function He(t, r) {
  12966. if (!t || !t.length) return [];
  12967. var e = Ge(t);
  12968. return null == r ? e : c(e, function (t) {
  12969. return n(r, T, t);
  12970. });
  12971. }
  12972. function Je(n) {
  12973. return n = An(n), n.__chain__ = true, n;
  12974. }
  12975. function Ye(n, t) {
  12976. return t(n);
  12977. }
  12978. function Qe() {
  12979. return this;
  12980. }
  12981. function Xe(n, t) {
  12982. return (of(n) ? r : eo)(n, ye(t, 3));
  12983. }
  12984. function nu(n, t) {
  12985. return (of(n) ? e : uo)(n, ye(t, 3));
  12986. }
  12987. function tu(n, t) {
  12988. return (of(n) ? c : Gt)(n, ye(t, 3));
  12989. }
  12990. function ru(n, t, r) {
  12991. return t = r ? T : t, t = n && null == t ? n.length : t, fe(n, 128, T, T, T, T, t);
  12992. }
  12993. function eu(n, t) {
  12994. var r;
  12995. if (typeof t != "function") throw new ni("Expected a function");
  12996. return n = Au(n), function () {
  12997. return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r;
  12998. };
  12999. }
  13000. function uu(n, t, r) {
  13001. return t = r ? T : t, n = fe(n, 8, T, T, T, T, T, t), n.placeholder = uu.placeholder, n;
  13002. }
  13003. function iu(n, t, r) {
  13004. return t = r ? T : t, n = fe(n, 16, T, T, T, T, T, t), n.placeholder = iu.placeholder, n;
  13005. }
  13006. function ou(n, t, r) {
  13007. function e(t) {
  13008. var r = c,
  13009. e = a;
  13010. return c = a = T, _ = t, s = n.apply(e, r);
  13011. }
  13012. function u(n) {
  13013. var r = n - p;
  13014. return n -= _, p === T || r >= t || 0 > r || g && n >= l;
  13015. }
  13016. function i() {
  13017. var n = Ko();
  13018. if (u(n)) return o(n);
  13019. var r,
  13020. e = yo;
  13021. r = n - _, n = t - (n - p), r = g ? Ui(n, l - r) : n, h = e(i, r);
  13022. }
  13023. function o(n) {
  13024. return h = T, d && c ? e(n) : (c = a = T, s);
  13025. }
  13026. function f() {
  13027. var n = Ko(),
  13028. r = u(n);
  13029. if (c = arguments, a = this, p = n, r) {
  13030. if (h === T) return _ = n = p, h = yo(i, t), v ? e(n) : s;
  13031. if (g) return h = yo(i, t), e(p);
  13032. }
  13033. return h === T && (h = yo(i, t)), s;
  13034. }
  13035. var c,
  13036. a,
  13037. l,
  13038. s,
  13039. h,
  13040. p,
  13041. _ = 0,
  13042. v = false,
  13043. g = false,
  13044. d = true;
  13045. if (typeof n != "function") throw new ni("Expected a function");
  13046. 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 () {
  13047. h !== T && ao(h), _ = 0, c = p = a = h = T;
  13048. }, f.flush = function () {
  13049. return h === T ? s : o(Ko());
  13050. }, f;
  13051. }
  13052. function fu(n, t) {
  13053. function r() {
  13054. var e = arguments,
  13055. u = t ? t.apply(this, e) : e[0],
  13056. i = r.cache;
  13057. return i.has(u) ? i.get(u) : (e = n.apply(this, e), r.cache = i.set(u, e) || i, e);
  13058. }
  13059. if (typeof n != "function" || null != t && typeof t != "function") throw new ni("Expected a function");
  13060. return r.cache = new (fu.Cache || Fn)(), r;
  13061. }
  13062. function cu(n) {
  13063. if (typeof n != "function") throw new ni("Expected a function");
  13064. return function () {
  13065. var t = arguments;
  13066. switch (t.length) {
  13067. case 0:
  13068. return !n.call(this);
  13069. case 1:
  13070. return !n.call(this, t[0]);
  13071. case 2:
  13072. return !n.call(this, t[0], t[1]);
  13073. case 3:
  13074. return !n.call(this, t[0], t[1], t[2]);
  13075. }
  13076. return !n.apply(this, t);
  13077. };
  13078. }
  13079. function au(n, t) {
  13080. return n === t || n !== n && t !== t;
  13081. }
  13082. function lu(n) {
  13083. return null != n && vu(n.length) && !pu(n);
  13084. }
  13085. function su(n) {
  13086. return du(n) && lu(n);
  13087. }
  13088. function hu(n) {
  13089. if (!du(n)) return false;
  13090. var t = Ot(n);
  13091. return "[object Error]" == t || "[object DOMException]" == t || typeof n.message == "string" && typeof n.name == "string" && !bu(n);
  13092. }
  13093. function pu(n) {
  13094. return !!gu(n) && (n = Ot(n), "[object Function]" == n || "[object GeneratorFunction]" == n || "[object AsyncFunction]" == n || "[object Proxy]" == n);
  13095. }
  13096. function _u(n) {
  13097. return typeof n == "number" && n == Au(n);
  13098. }
  13099. function vu(n) {
  13100. return typeof n == "number" && -1 < n && 0 == n % 1 && 9007199254740991 >= n;
  13101. }
  13102. function gu(n) {
  13103. var t = _typeof(n);
  13104. return null != n && ("object" == t || "function" == t);
  13105. }
  13106. function du(n) {
  13107. return null != n && _typeof(n) == "object";
  13108. }
  13109. function yu(n) {
  13110. return typeof n == "number" || du(n) && "[object Number]" == Ot(n);
  13111. }
  13112. function bu(n) {
  13113. 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));
  13114. }
  13115. function xu(n) {
  13116. return typeof n == "string" || !of(n) && du(n) && "[object String]" == Ot(n);
  13117. }
  13118. function ju(n) {
  13119. return _typeof(n) == "symbol" || du(n) && "[object Symbol]" == Ot(n);
  13120. }
  13121. function wu(n) {
  13122. if (!n) return [];
  13123. if (lu(n)) return xu(n) ? M(n) : Ur(n);
  13124. if (ji && n[ji]) {
  13125. n = n[ji]();
  13126. for (var t, r = []; !(t = n.next()).done;) {
  13127. r.push(t.value);
  13128. }
  13129. return r;
  13130. }
  13131. return t = _o(n), ("[object Map]" == t ? W : "[object Set]" == t ? U : Lu)(n);
  13132. }
  13133. function mu(n) {
  13134. return n ? (n = ku(n), n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) : 0 === n ? n : 0;
  13135. }
  13136. function Au(n) {
  13137. n = mu(n);
  13138. var t = n % 1;
  13139. return n === n ? t ? n - t : n : 0;
  13140. }
  13141. function Eu(n) {
  13142. return n ? pt(Au(n), 0, 4294967295) : 0;
  13143. }
  13144. function ku(n) {
  13145. if (typeof n == "number") return n;
  13146. if (ju(n)) return F;
  13147. if (gu(n) && (n = typeof n.valueOf == "function" ? n.valueOf() : n, n = gu(n) ? n + "" : n), typeof n != "string") return 0 === n ? n : +n;
  13148. n = n.replace(un, "");
  13149. var t = gn.test(n);
  13150. return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n;
  13151. }
  13152. function Su(n) {
  13153. return Cr(n, Wu(n));
  13154. }
  13155. function Ou(n) {
  13156. return null == n ? "" : yr(n);
  13157. }
  13158. function Iu(n, t, r) {
  13159. return n = null == n ? T : kt(n, t), n === T ? r : n;
  13160. }
  13161. function Ru(n, t) {
  13162. return null != n && we(n, t, zt);
  13163. }
  13164. function zu(n) {
  13165. return lu(n) ? qn(n) : Vt(n);
  13166. }
  13167. function Wu(n) {
  13168. if (lu(n)) n = qn(n, true);else if (gu(n)) {
  13169. var t,
  13170. r = ze(n),
  13171. e = [];
  13172. for (t in n) {
  13173. ("constructor" != t || !r && ii.call(n, t)) && e.push(t);
  13174. }
  13175. n = e;
  13176. } else {
  13177. if (t = [], null != n) for (r in Yu(n)) {
  13178. t.push(r);
  13179. }
  13180. n = t;
  13181. }
  13182. return n;
  13183. }
  13184. function Bu(n, t) {
  13185. if (null == n) return {};
  13186. var r = c(ve(n), function (n) {
  13187. return [n];
  13188. });
  13189. return t = ye(t), tr(n, r, function (n, r) {
  13190. return t(n, r[0]);
  13191. });
  13192. }
  13193. function Lu(n) {
  13194. return null == n ? [] : S(n, zu(n));
  13195. }
  13196. function Uu(n) {
  13197. return Tf(Ou(n).toLowerCase());
  13198. }
  13199. function Cu(n) {
  13200. return (n = Ou(n)) && n.replace(xn, Xn).replace(Sn, "");
  13201. }
  13202. function Du(n, t, r) {
  13203. return n = Ou(n), t = r ? T : t, t === T ? zn.test(n) ? n.match(In) || [] : n.match(sn) || [] : n.match(t) || [];
  13204. }
  13205. function Mu(n) {
  13206. return function () {
  13207. return n;
  13208. };
  13209. }
  13210. function Tu(n) {
  13211. return n;
  13212. }
  13213. function $u(n) {
  13214. return qt(typeof n == "function" ? n : _t(n, 1));
  13215. }
  13216. function Fu(n, t, e) {
  13217. var u = zu(t),
  13218. i = Et(t, u);
  13219. null != e || gu(t) && (i.length || !u.length) || (e = t, t = n, n = this, i = Et(t, zu(t)));
  13220. var o = !(gu(e) && "chain" in e && !e.chain),
  13221. f = pu(n);
  13222. return r(i, function (r) {
  13223. var e = t[r];
  13224. n[r] = e, f && (n.prototype[r] = function () {
  13225. var t = this.__chain__;
  13226. if (o || t) {
  13227. var r = n(this.__wrapped__);
  13228. return (r.__actions__ = Ur(this.__actions__)).push({
  13229. func: e,
  13230. args: arguments,
  13231. thisArg: n
  13232. }), r.__chain__ = t, r;
  13233. }
  13234. return e.apply(n, a([this.value()], arguments));
  13235. });
  13236. }), n;
  13237. }
  13238. function Nu() {}
  13239. function Pu(n) {
  13240. return Ie(n) ? b(De(n)) : rr(n);
  13241. }
  13242. function Zu() {
  13243. return [];
  13244. }
  13245. function qu() {
  13246. return false;
  13247. }
  13248. mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn));
  13249. var Vu = mn.Array,
  13250. Ku = mn.Date,
  13251. Gu = mn.Error,
  13252. Hu = mn.Function,
  13253. Ju = mn.Math,
  13254. Yu = mn.Object,
  13255. Qu = mn.RegExp,
  13256. Xu = mn.String,
  13257. ni = mn.TypeError,
  13258. ti = Vu.prototype,
  13259. ri = Yu.prototype,
  13260. ei = mn["__core-js_shared__"],
  13261. ui = Hu.prototype.toString,
  13262. ii = ri.hasOwnProperty,
  13263. oi = 0,
  13264. fi = function () {
  13265. var n = /[^.]+$/.exec(ei && ei.keys && ei.keys.IE_PROTO || "");
  13266. return n ? "Symbol(src)_1." + n : "";
  13267. }(),
  13268. ci = ri.toString,
  13269. ai = ui.call(Yu),
  13270. li = $n._,
  13271. si = Qu("^" + ui.call(ii).replace(rn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"),
  13272. hi = Pn ? mn.Buffer : T,
  13273. pi = mn.Symbol,
  13274. _i = mn.Uint8Array,
  13275. vi = hi ? hi.g : T,
  13276. gi = B(Yu.getPrototypeOf, Yu),
  13277. di = Yu.create,
  13278. yi = ri.propertyIsEnumerable,
  13279. bi = ti.splice,
  13280. xi = pi ? pi.isConcatSpreadable : T,
  13281. ji = pi ? pi.iterator : T,
  13282. wi = pi ? pi.toStringTag : T,
  13283. mi = function () {
  13284. try {
  13285. var n = je(Yu, "defineProperty");
  13286. return n({}, "", {}), n;
  13287. } catch (n) {}
  13288. }(),
  13289. Ai = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout,
  13290. Ei = Ku && Ku.now !== $n.Date.now && Ku.now,
  13291. ki = mn.setTimeout !== $n.setTimeout && mn.setTimeout,
  13292. Si = Ju.ceil,
  13293. Oi = Ju.floor,
  13294. Ii = Yu.getOwnPropertySymbols,
  13295. Ri = hi ? hi.isBuffer : T,
  13296. zi = mn.isFinite,
  13297. Wi = ti.join,
  13298. Bi = B(Yu.keys, Yu),
  13299. Li = Ju.max,
  13300. Ui = Ju.min,
  13301. Ci = Ku.now,
  13302. Di = mn.parseInt,
  13303. Mi = Ju.random,
  13304. Ti = ti.reverse,
  13305. $i = je(mn, "DataView"),
  13306. Fi = je(mn, "Map"),
  13307. Ni = je(mn, "Promise"),
  13308. Pi = je(mn, "Set"),
  13309. Zi = je(mn, "WeakMap"),
  13310. qi = je(Yu, "create"),
  13311. Vi = Zi && new Zi(),
  13312. Ki = {},
  13313. Gi = Me($i),
  13314. Hi = Me(Fi),
  13315. Ji = Me(Ni),
  13316. Yi = Me(Pi),
  13317. Qi = Me(Zi),
  13318. Xi = pi ? pi.prototype : T,
  13319. no = Xi ? Xi.valueOf : T,
  13320. to = Xi ? Xi.toString : T,
  13321. ro = function () {
  13322. function n() {}
  13323. return function (t) {
  13324. return gu(t) ? di ? di(t) : (n.prototype = t, t = new n(), n.prototype = T, t) : {};
  13325. };
  13326. }();
  13327. An.templateSettings = {
  13328. escape: J,
  13329. evaluate: Y,
  13330. interpolate: Q,
  13331. variable: "",
  13332. imports: {
  13333. _: An
  13334. }
  13335. }, 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 () {
  13336. this.__data__ = qi ? qi(null) : {}, this.size = 0;
  13337. }, Mn.prototype.delete = function (n) {
  13338. return n = this.has(n) && delete this.__data__[n], this.size -= n ? 1 : 0, n;
  13339. }, Mn.prototype.get = function (n) {
  13340. var t = this.__data__;
  13341. return qi ? (n = t[n], "__lodash_hash_undefined__" === n ? T : n) : ii.call(t, n) ? t[n] : T;
  13342. }, Mn.prototype.has = function (n) {
  13343. var t = this.__data__;
  13344. return qi ? t[n] !== T : ii.call(t, n);
  13345. }, Mn.prototype.set = function (n, t) {
  13346. var r = this.__data__;
  13347. return this.size += this.has(n) ? 0 : 1, r[n] = qi && t === T ? "__lodash_hash_undefined__" : t, this;
  13348. }, Tn.prototype.clear = function () {
  13349. this.__data__ = [], this.size = 0;
  13350. }, Tn.prototype.delete = function (n) {
  13351. var t = this.__data__;
  13352. return n = ft(t, n), !(0 > n) && (n == t.length - 1 ? t.pop() : bi.call(t, n, 1), --this.size, true);
  13353. }, Tn.prototype.get = function (n) {
  13354. var t = this.__data__;
  13355. return n = ft(t, n), 0 > n ? T : t[n][1];
  13356. }, Tn.prototype.has = function (n) {
  13357. return -1 < ft(this.__data__, n);
  13358. }, Tn.prototype.set = function (n, t) {
  13359. var r = this.__data__,
  13360. e = ft(r, n);
  13361. return 0 > e ? (++this.size, r.push([n, t])) : r[e][1] = t, this;
  13362. }, Fn.prototype.clear = function () {
  13363. this.size = 0, this.__data__ = {
  13364. hash: new Mn(),
  13365. map: new (Fi || Tn)(),
  13366. string: new Mn()
  13367. };
  13368. }, Fn.prototype.delete = function (n) {
  13369. return n = be(this, n).delete(n), this.size -= n ? 1 : 0, n;
  13370. }, Fn.prototype.get = function (n) {
  13371. return be(this, n).get(n);
  13372. }, Fn.prototype.has = function (n) {
  13373. return be(this, n).has(n);
  13374. }, Fn.prototype.set = function (n, t) {
  13375. var r = be(this, n),
  13376. e = r.size;
  13377. return r.set(n, t), this.size += r.size == e ? 0 : 1, this;
  13378. }, Nn.prototype.add = Nn.prototype.push = function (n) {
  13379. return this.__data__.set(n, "__lodash_hash_undefined__"), this;
  13380. }, Nn.prototype.has = function (n) {
  13381. return this.__data__.has(n);
  13382. }, Zn.prototype.clear = function () {
  13383. this.__data__ = new Tn(), this.size = 0;
  13384. }, Zn.prototype.delete = function (n) {
  13385. var t = this.__data__;
  13386. return n = t.delete(n), this.size = t.size, n;
  13387. }, Zn.prototype.get = function (n) {
  13388. return this.__data__.get(n);
  13389. }, Zn.prototype.has = function (n) {
  13390. return this.__data__.has(n);
  13391. }, Zn.prototype.set = function (n, t) {
  13392. var r = this.__data__;
  13393. if (r instanceof Tn) {
  13394. var e = r.__data__;
  13395. if (!Fi || 199 > e.length) return e.push([n, t]), this.size = ++r.size, this;
  13396. r = this.__data__ = new Fn(e);
  13397. }
  13398. return r.set(n, t), this.size = r.size, this;
  13399. };
  13400. var eo = Fr(mt),
  13401. uo = Fr(At, true),
  13402. io = Nr(),
  13403. oo = Nr(true),
  13404. fo = Vi ? function (n, t) {
  13405. return Vi.set(n, t), n;
  13406. } : Tu,
  13407. co = mi ? function (n, t) {
  13408. return mi(n, "toString", {
  13409. configurable: true,
  13410. enumerable: false,
  13411. value: Mu(t),
  13412. writable: true
  13413. });
  13414. } : Tu,
  13415. ao = Ai || function (n) {
  13416. return $n.clearTimeout(n);
  13417. },
  13418. lo = Pi && 1 / U(new Pi([, -0]))[1] == $ ? function (n) {
  13419. return new Pi(n);
  13420. } : Nu,
  13421. so = Vi ? function (n) {
  13422. return Vi.get(n);
  13423. } : Nu,
  13424. ho = Ii ? function (n) {
  13425. return null == n ? [] : (n = Yu(n), i(Ii(n), function (t) {
  13426. return yi.call(n, t);
  13427. }));
  13428. } : Zu,
  13429. po = Ii ? function (n) {
  13430. for (var t = []; n;) {
  13431. a(t, ho(n)), n = gi(n);
  13432. }
  13433. return t;
  13434. } : Zu,
  13435. _o = Ot;
  13436. ($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) {
  13437. var t = Ot(n);
  13438. if (n = (n = "[object Object]" == t ? n.constructor : T) ? Me(n) : "") switch (n) {
  13439. case Gi:
  13440. return "[object DataView]";
  13441. case Hi:
  13442. return "[object Map]";
  13443. case Ji:
  13444. return "[object Promise]";
  13445. case Yi:
  13446. return "[object Set]";
  13447. case Qi:
  13448. return "[object WeakMap]";
  13449. }
  13450. return t;
  13451. });
  13452. var vo = ei ? pu : qu,
  13453. go = Ue(fo),
  13454. yo = ki || function (n, t) {
  13455. return $n.setTimeout(n, t);
  13456. },
  13457. bo = Ue(co),
  13458. xo = function (n) {
  13459. n = fu(n, function (n) {
  13460. return 500 === t.size && t.clear(), n;
  13461. });
  13462. var t = n.cache;
  13463. return n;
  13464. }(function (n) {
  13465. var t = [];
  13466. return 46 === n.charCodeAt(0) && t.push(""), n.replace(tn, function (n, r, e, u) {
  13467. t.push(e ? u.replace(hn, "$1") : r || n);
  13468. }), t;
  13469. }),
  13470. jo = fr(function (n, t) {
  13471. return su(n) ? yt(n, wt(t, 1, su, true)) : [];
  13472. }),
  13473. wo = fr(function (n, t) {
  13474. var r = qe(t);
  13475. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), ye(r, 2)) : [];
  13476. }),
  13477. mo = fr(function (n, t) {
  13478. var r = qe(t);
  13479. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), T, r) : [];
  13480. }),
  13481. Ao = fr(function (n) {
  13482. var t = c(n, Er);
  13483. return t.length && t[0] === n[0] ? Wt(t) : [];
  13484. }),
  13485. Eo = fr(function (n) {
  13486. var t = qe(n),
  13487. r = c(n, Er);
  13488. return t === qe(r) ? t = T : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : [];
  13489. }),
  13490. ko = fr(function (n) {
  13491. var t = qe(n),
  13492. r = c(n, Er);
  13493. return (t = typeof t == "function" ? t : T) && r.pop(), r.length && r[0] === n[0] ? Wt(r, T, t) : [];
  13494. }),
  13495. So = fr(Ve),
  13496. Oo = pe(function (n, t) {
  13497. var r = null == n ? 0 : n.length,
  13498. e = ht(n, t);
  13499. return ur(n, c(t, function (n) {
  13500. return Se(n, r) ? +n : n;
  13501. }).sort(Wr)), e;
  13502. }),
  13503. Io = fr(function (n) {
  13504. return br(wt(n, 1, su, true));
  13505. }),
  13506. Ro = fr(function (n) {
  13507. var t = qe(n);
  13508. return su(t) && (t = T), br(wt(n, 1, su, true), ye(t, 2));
  13509. }),
  13510. zo = fr(function (n) {
  13511. var t = qe(n),
  13512. t = typeof t == "function" ? t : T;
  13513. return br(wt(n, 1, su, true), T, t);
  13514. }),
  13515. Wo = fr(function (n, t) {
  13516. return su(n) ? yt(n, t) : [];
  13517. }),
  13518. Bo = fr(function (n) {
  13519. return mr(i(n, su));
  13520. }),
  13521. Lo = fr(function (n) {
  13522. var t = qe(n);
  13523. return su(t) && (t = T), mr(i(n, su), ye(t, 2));
  13524. }),
  13525. Uo = fr(function (n) {
  13526. var t = qe(n),
  13527. t = typeof t == "function" ? t : T;
  13528. return mr(i(n, su), T, t);
  13529. }),
  13530. Co = fr(Ge),
  13531. Do = fr(function (n) {
  13532. var t = n.length,
  13533. t = 1 < t ? n[t - 1] : T,
  13534. t = typeof t == "function" ? (n.pop(), t) : T;
  13535. return He(n, t);
  13536. }),
  13537. Mo = pe(function (n) {
  13538. function t(t) {
  13539. return ht(t, n);
  13540. }
  13541. var r = n.length,
  13542. e = r ? n[0] : 0,
  13543. u = this.__wrapped__;
  13544. return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) ? (u = u.slice(e, +e + (r ? 1 : 0)), u.__actions__.push({
  13545. func: Ye,
  13546. args: [t],
  13547. thisArg: T
  13548. }), new On(u, this.__chain__).thru(function (n) {
  13549. return r && !n.length && n.push(T), n;
  13550. })) : this.thru(t);
  13551. }),
  13552. To = Tr(function (n, t, r) {
  13553. ii.call(n, r) ? ++n[r] : st(n, r, 1);
  13554. }),
  13555. $o = Gr(Fe),
  13556. Fo = Gr(Ne),
  13557. No = Tr(function (n, t, r) {
  13558. ii.call(n, r) ? n[r].push(t) : st(n, r, [t]);
  13559. }),
  13560. Po = fr(function (t, r, e) {
  13561. var u = -1,
  13562. i = typeof r == "function",
  13563. o = lu(t) ? Vu(t.length) : [];
  13564. return eo(t, function (t) {
  13565. o[++u] = i ? n(r, t, e) : Lt(t, r, e);
  13566. }), o;
  13567. }),
  13568. Zo = Tr(function (n, t, r) {
  13569. st(n, r, t);
  13570. }),
  13571. qo = Tr(function (n, t, r) {
  13572. n[r ? 0 : 1].push(t);
  13573. }, function () {
  13574. return [[], []];
  13575. }),
  13576. Vo = fr(function (n, t) {
  13577. if (null == n) return [];
  13578. var r = t.length;
  13579. 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), []);
  13580. }),
  13581. Ko = Ei || function () {
  13582. return $n.Date.now();
  13583. },
  13584. Go = fr(function (n, t, r) {
  13585. var e = 1;
  13586. if (r.length) var u = L(r, de(Go)),
  13587. e = 32 | e;
  13588. return fe(n, e, t, r, u);
  13589. }),
  13590. Ho = fr(function (n, t, r) {
  13591. var e = 3;
  13592. if (r.length) var u = L(r, de(Ho)),
  13593. e = 32 | e;
  13594. return fe(t, e, n, r, u);
  13595. }),
  13596. Jo = fr(function (n, t) {
  13597. return dt(n, 1, t);
  13598. }),
  13599. Yo = fr(function (n, t, r) {
  13600. return dt(n, ku(t) || 0, r);
  13601. });
  13602. fu.Cache = Fn;
  13603. var Qo = fr(function (t, r) {
  13604. r = 1 == r.length && of(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye()));
  13605. var e = r.length;
  13606. return fr(function (u) {
  13607. for (var i = -1, o = Ui(u.length, e); ++i < o;) {
  13608. u[i] = r[i].call(this, u[i]);
  13609. }
  13610. return n(t, this, u);
  13611. });
  13612. }),
  13613. Xo = fr(function (n, t) {
  13614. return fe(n, 32, T, t, L(t, de(Xo)));
  13615. }),
  13616. nf = fr(function (n, t) {
  13617. return fe(n, 64, T, t, L(t, de(nf)));
  13618. }),
  13619. tf = pe(function (n, t) {
  13620. return fe(n, 256, T, T, T, t);
  13621. }),
  13622. rf = ee(It),
  13623. ef = ee(function (n, t) {
  13624. return n >= t;
  13625. }),
  13626. uf = Ut(function () {
  13627. return arguments;
  13628. }()) ? Ut : function (n) {
  13629. return du(n) && ii.call(n, "callee") && !yi.call(n, "callee");
  13630. },
  13631. of = Vu.isArray,
  13632. ff = Vn ? k(Vn) : Ct,
  13633. cf = Ri || qu,
  13634. af = Kn ? k(Kn) : Dt,
  13635. lf = Gn ? k(Gn) : Tt,
  13636. sf = Hn ? k(Hn) : Nt,
  13637. hf = Jn ? k(Jn) : Pt,
  13638. pf = Yn ? k(Yn) : Zt,
  13639. _f = ee(Kt),
  13640. vf = ee(function (n, t) {
  13641. return n <= t;
  13642. }),
  13643. gf = $r(function (n, t) {
  13644. if (ze(t) || lu(t)) Cr(t, zu(t), n);else for (var r in t) {
  13645. ii.call(t, r) && ot(n, r, t[r]);
  13646. }
  13647. }),
  13648. df = $r(function (n, t) {
  13649. Cr(t, Wu(t), n);
  13650. }),
  13651. yf = $r(function (n, t, r, e) {
  13652. Cr(t, Wu(t), n, e);
  13653. }),
  13654. bf = $r(function (n, t, r, e) {
  13655. Cr(t, zu(t), n, e);
  13656. }),
  13657. xf = pe(ht),
  13658. jf = fr(function (n, t) {
  13659. n = Yu(n);
  13660. var r = -1,
  13661. e = t.length,
  13662. u = 2 < e ? t[2] : T;
  13663. for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e;) {
  13664. for (var u = t[r], i = Wu(u), o = -1, f = i.length; ++o < f;) {
  13665. var c = i[o],
  13666. a = n[c];
  13667. (a === T || au(a, ri[c]) && !ii.call(n, c)) && (n[c] = u[c]);
  13668. }
  13669. }
  13670. return n;
  13671. }),
  13672. wf = fr(function (t) {
  13673. return t.push(T, ae), n(Sf, T, t);
  13674. }),
  13675. mf = Yr(function (n, t, r) {
  13676. null != t && typeof t.toString != "function" && (t = ci.call(t)), n[t] = r;
  13677. }, Mu(Tu)),
  13678. Af = Yr(function (n, t, r) {
  13679. null != t && typeof t.toString != "function" && (t = ci.call(t)), ii.call(n, t) ? n[t].push(r) : n[t] = [r];
  13680. }, ye),
  13681. Ef = fr(Lt),
  13682. kf = $r(function (n, t, r) {
  13683. Yt(n, t, r);
  13684. }),
  13685. Sf = $r(function (n, t, r, e) {
  13686. Yt(n, t, r, e);
  13687. }),
  13688. Of = pe(function (n, t) {
  13689. var r = {};
  13690. if (null == n) return r;
  13691. var e = false;
  13692. t = c(t, function (t) {
  13693. return t = Sr(t, n), e || (e = 1 < t.length), t;
  13694. }), Cr(n, ve(n), r), e && (r = _t(r, 7, le));
  13695. for (var u = t.length; u--;) {
  13696. xr(r, t[u]);
  13697. }
  13698. return r;
  13699. }),
  13700. If = pe(function (n, t) {
  13701. return null == n ? {} : nr(n, t);
  13702. }),
  13703. Rf = oe(zu),
  13704. zf = oe(Wu),
  13705. Wf = qr(function (n, t, r) {
  13706. return t = t.toLowerCase(), n + (r ? Uu(t) : t);
  13707. }),
  13708. Bf = qr(function (n, t, r) {
  13709. return n + (r ? "-" : "") + t.toLowerCase();
  13710. }),
  13711. Lf = qr(function (n, t, r) {
  13712. return n + (r ? " " : "") + t.toLowerCase();
  13713. }),
  13714. Uf = Zr("toLowerCase"),
  13715. Cf = qr(function (n, t, r) {
  13716. return n + (r ? "_" : "") + t.toLowerCase();
  13717. }),
  13718. Df = qr(function (n, t, r) {
  13719. return n + (r ? " " : "") + Tf(t);
  13720. }),
  13721. Mf = qr(function (n, t, r) {
  13722. return n + (r ? " " : "") + t.toUpperCase();
  13723. }),
  13724. Tf = Zr("toUpperCase"),
  13725. $f = fr(function (t, r) {
  13726. try {
  13727. return n(t, T, r);
  13728. } catch (n) {
  13729. return hu(n) ? n : new Gu(n);
  13730. }
  13731. }),
  13732. Ff = pe(function (n, t) {
  13733. return r(t, function (t) {
  13734. t = De(t), st(n, t, Go(n[t], n));
  13735. }), n;
  13736. }),
  13737. Nf = Hr(),
  13738. Pf = Hr(true),
  13739. Zf = fr(function (n, t) {
  13740. return function (r) {
  13741. return Lt(r, n, t);
  13742. };
  13743. }),
  13744. qf = fr(function (n, t) {
  13745. return function (r) {
  13746. return Lt(n, r, t);
  13747. };
  13748. }),
  13749. Vf = Xr(c),
  13750. Kf = Xr(u),
  13751. Gf = Xr(h),
  13752. Hf = re(),
  13753. Jf = re(true),
  13754. Yf = Qr(function (n, t) {
  13755. return n + t;
  13756. }, 0),
  13757. Qf = ie("ceil"),
  13758. Xf = Qr(function (n, t) {
  13759. return n / t;
  13760. }, 1),
  13761. nc = ie("floor"),
  13762. tc = Qr(function (n, t) {
  13763. return n * t;
  13764. }, 1),
  13765. rc = ie("round"),
  13766. ec = Qr(function (n, t) {
  13767. return n - t;
  13768. }, 0);
  13769. return An.after = function (n, t) {
  13770. if (typeof t != "function") throw new ni("Expected a function");
  13771. return n = Au(n), function () {
  13772. if (1 > --n) return t.apply(this, arguments);
  13773. };
  13774. }, 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 () {
  13775. if (!arguments.length) return [];
  13776. var n = arguments[0];
  13777. return of(n) ? n : [n];
  13778. }, An.chain = Je, An.chunk = function (n, t, r) {
  13779. if (t = (r ? Oe(n, t, r) : t === T) ? 1 : Li(Au(t), 0), r = null == n ? 0 : n.length, !r || 1 > t) return [];
  13780. for (var e = 0, u = 0, i = Vu(Si(r / t)); e < r;) {
  13781. i[u++] = hr(n, e, e += t);
  13782. }
  13783. return i;
  13784. }, An.compact = function (n) {
  13785. for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r;) {
  13786. var i = n[t];
  13787. i && (u[e++] = i);
  13788. }
  13789. return u;
  13790. }, An.concat = function () {
  13791. var n = arguments.length;
  13792. if (!n) return [];
  13793. for (var t = Vu(n - 1), r = arguments[0]; n--;) {
  13794. t[n - 1] = arguments[n];
  13795. }
  13796. return a(of(r) ? Ur(r) : [r], wt(t, 1));
  13797. }, An.cond = function (t) {
  13798. var r = null == t ? 0 : t.length,
  13799. e = ye();
  13800. return t = r ? c(t, function (n) {
  13801. if ("function" != typeof n[1]) throw new ni("Expected a function");
  13802. return [e(n[0]), n[1]];
  13803. }) : [], fr(function (e) {
  13804. for (var u = -1; ++u < r;) {
  13805. var i = t[u];
  13806. if (n(i[0], this, e)) return n(i[1], this, e);
  13807. }
  13808. });
  13809. }, An.conforms = function (n) {
  13810. return vt(_t(n, 1));
  13811. }, An.constant = Mu, An.countBy = To, An.create = function (n, t) {
  13812. var r = ro(n);
  13813. return null == t ? r : at(r, t);
  13814. }, 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) {
  13815. var e = null == n ? 0 : n.length;
  13816. return e ? (t = r || t === T ? 1 : Au(t), hr(n, 0 > t ? 0 : t, e)) : [];
  13817. }, An.dropRight = function (n, t, r) {
  13818. var e = null == n ? 0 : n.length;
  13819. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0, 0 > t ? 0 : t)) : [];
  13820. }, An.dropRightWhile = function (n, t) {
  13821. return n && n.length ? jr(n, ye(t, 3), true, true) : [];
  13822. }, An.dropWhile = function (n, t) {
  13823. return n && n.length ? jr(n, ye(t, 3), true) : [];
  13824. }, An.fill = function (n, t, r, e) {
  13825. var u = null == n ? 0 : n.length;
  13826. if (!u) return [];
  13827. 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;) {
  13828. n[r++] = t;
  13829. }
  13830. return n;
  13831. }, An.filter = function (n, t) {
  13832. return (of(n) ? i : jt)(n, ye(t, 3));
  13833. }, An.flatMap = function (n, t) {
  13834. return wt(tu(n, t), 1);
  13835. }, An.flatMapDeep = function (n, t) {
  13836. return wt(tu(n, t), $);
  13837. }, An.flatMapDepth = function (n, t, r) {
  13838. return r = r === T ? 1 : Au(r), wt(tu(n, t), r);
  13839. }, An.flatten = Pe, An.flattenDeep = function (n) {
  13840. return (null == n ? 0 : n.length) ? wt(n, $) : [];
  13841. }, An.flattenDepth = function (n, t) {
  13842. return null != n && n.length ? (t = t === T ? 1 : Au(t), wt(n, t)) : [];
  13843. }, An.flip = function (n) {
  13844. return fe(n, 512);
  13845. }, An.flow = Nf, An.flowRight = Pf, An.fromPairs = function (n) {
  13846. for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r;) {
  13847. var u = n[t];
  13848. e[u[0]] = u[1];
  13849. }
  13850. return e;
  13851. }, An.functions = function (n) {
  13852. return null == n ? [] : Et(n, zu(n));
  13853. }, An.functionsIn = function (n) {
  13854. return null == n ? [] : Et(n, Wu(n));
  13855. }, An.groupBy = No, An.initial = function (n) {
  13856. return (null == n ? 0 : n.length) ? hr(n, 0, -1) : [];
  13857. }, 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) {
  13858. var r = {};
  13859. return t = ye(t, 3), mt(n, function (n, e, u) {
  13860. st(r, t(n, e, u), n);
  13861. }), r;
  13862. }, An.mapValues = function (n, t) {
  13863. var r = {};
  13864. return t = ye(t, 3), mt(n, function (n, e, u) {
  13865. st(r, e, t(n, e, u));
  13866. }), r;
  13867. }, An.matches = function (n) {
  13868. return Ht(_t(n, 1));
  13869. }, An.matchesProperty = function (n, t) {
  13870. return Jt(n, _t(t, 1));
  13871. }, 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) {
  13872. return n = Au(n), fr(function (t) {
  13873. return Qt(t, n);
  13874. });
  13875. }, An.omit = Of, An.omitBy = function (n, t) {
  13876. return Bu(n, cu(ye(t)));
  13877. }, An.once = function (n) {
  13878. return eu(2, n);
  13879. }, An.orderBy = function (n, t, r, e) {
  13880. return null == n ? [] : (of(t) || (t = null == t ? [] : [t]), r = e ? T : r, of(r) || (r = null == r ? [] : [r]), Xt(n, t, r));
  13881. }, 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) {
  13882. return function (t) {
  13883. return null == n ? T : kt(n, t);
  13884. };
  13885. }, An.pull = So, An.pullAll = Ve, An.pullAllBy = function (n, t, r) {
  13886. return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n;
  13887. }, An.pullAllWith = function (n, t, r) {
  13888. return n && n.length && t && t.length ? er(n, t, T, r) : n;
  13889. }, An.pullAt = Oo, An.range = Hf, An.rangeRight = Jf, An.rearg = tf, An.reject = function (n, t) {
  13890. return (of(n) ? i : jt)(n, cu(ye(t, 3)));
  13891. }, An.remove = function (n, t) {
  13892. var r = [];
  13893. if (!n || !n.length) return r;
  13894. var e = -1,
  13895. u = [],
  13896. i = n.length;
  13897. for (t = ye(t, 3); ++e < i;) {
  13898. var o = n[e];
  13899. t(o, e, n) && (r.push(o), u.push(e));
  13900. }
  13901. return ur(n, u), r;
  13902. }, An.rest = function (n, t) {
  13903. if (typeof n != "function") throw new ni("Expected a function");
  13904. return t = t === T ? t : Au(t), fr(n, t);
  13905. }, An.reverse = Ke, An.sampleSize = function (n, t, r) {
  13906. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), (of(n) ? et : ar)(n, t);
  13907. }, An.set = function (n, t, r) {
  13908. return null == n ? n : lr(n, t, r);
  13909. }, An.setWith = function (n, t, r, e) {
  13910. return e = typeof e == "function" ? e : T, null == n ? n : lr(n, t, r, e);
  13911. }, An.shuffle = function (n) {
  13912. return (of(n) ? ut : sr)(n);
  13913. }, An.slice = function (n, t, r) {
  13914. var e = null == n ? 0 : n.length;
  13915. 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)) : [];
  13916. }, An.sortBy = Vo, An.sortedUniq = function (n) {
  13917. return n && n.length ? gr(n) : [];
  13918. }, An.sortedUniqBy = function (n, t) {
  13919. return n && n.length ? gr(n, ye(t, 2)) : [];
  13920. }, An.split = function (n, t, r) {
  13921. 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) : [];
  13922. }, An.spread = function (t, r) {
  13923. if (typeof t != "function") throw new ni("Expected a function");
  13924. return r = null == r ? 0 : Li(Au(r), 0), fr(function (e) {
  13925. var u = e[r];
  13926. return e = Or(e, 0, r), u && a(e, u), n(t, this, e);
  13927. });
  13928. }, An.tail = function (n) {
  13929. var t = null == n ? 0 : n.length;
  13930. return t ? hr(n, 1, t) : [];
  13931. }, An.take = function (n, t, r) {
  13932. return n && n.length ? (t = r || t === T ? 1 : Au(t), hr(n, 0, 0 > t ? 0 : t)) : [];
  13933. }, An.takeRight = function (n, t, r) {
  13934. var e = null == n ? 0 : n.length;
  13935. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0 > t ? 0 : t, e)) : [];
  13936. }, An.takeRightWhile = function (n, t) {
  13937. return n && n.length ? jr(n, ye(t, 3), false, true) : [];
  13938. }, An.takeWhile = function (n, t) {
  13939. return n && n.length ? jr(n, ye(t, 3)) : [];
  13940. }, An.tap = function (n, t) {
  13941. return t(n), n;
  13942. }, An.throttle = function (n, t, r) {
  13943. var e = true,
  13944. u = true;
  13945. if (typeof n != "function") throw new ni("Expected a function");
  13946. return gu(r) && (e = "leading" in r ? !!r.leading : e, u = "trailing" in r ? !!r.trailing : u), ou(n, t, {
  13947. leading: e,
  13948. maxWait: t,
  13949. trailing: u
  13950. });
  13951. }, An.thru = Ye, An.toArray = wu, An.toPairs = Rf, An.toPairsIn = zf, An.toPath = function (n) {
  13952. return of(n) ? c(n, De) : ju(n) ? [n] : Ur(xo(Ou(n)));
  13953. }, An.toPlainObject = Su, An.transform = function (n, t, e) {
  13954. var u = of(n),
  13955. i = u || cf(n) || pf(n);
  13956. if (t = ye(t, 4), null == e) {
  13957. var o = n && n.constructor;
  13958. e = i ? u ? new o() : [] : gu(n) && pu(o) ? ro(gi(n)) : {};
  13959. }
  13960. return (i ? r : mt)(n, function (n, r, u) {
  13961. return t(e, n, r, u);
  13962. }), e;
  13963. }, An.unary = function (n) {
  13964. return ru(n, 1);
  13965. }, An.union = Io, An.unionBy = Ro, An.unionWith = zo, An.uniq = function (n) {
  13966. return n && n.length ? br(n) : [];
  13967. }, An.uniqBy = function (n, t) {
  13968. return n && n.length ? br(n, ye(t, 2)) : [];
  13969. }, An.uniqWith = function (n, t) {
  13970. return t = typeof t == "function" ? t : T, n && n.length ? br(n, T, t) : [];
  13971. }, An.unset = function (n, t) {
  13972. return null == n || xr(n, t);
  13973. }, An.unzip = Ge, An.unzipWith = He, An.update = function (n, t, r) {
  13974. return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0);
  13975. }, An.updateWith = function (n, t, r, e) {
  13976. return e = typeof e == "function" ? e : T, null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n;
  13977. }, An.values = Lu, An.valuesIn = function (n) {
  13978. return null == n ? [] : S(n, Wu(n));
  13979. }, An.without = Wo, An.words = Du, An.wrap = function (n, t) {
  13980. return Xo(kr(t), n);
  13981. }, An.xor = Bo, An.xorBy = Lo, An.xorWith = Uo, An.zip = Co, An.zipObject = function (n, t) {
  13982. return Ar(n || [], t || [], ot);
  13983. }, An.zipObjectDeep = function (n, t) {
  13984. return Ar(n || [], t || [], lr);
  13985. }, 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) {
  13986. 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);
  13987. }, An.clone = function (n) {
  13988. return _t(n, 4);
  13989. }, An.cloneDeep = function (n) {
  13990. return _t(n, 5);
  13991. }, An.cloneDeepWith = function (n, t) {
  13992. return t = typeof t == "function" ? t : T, _t(n, 5, t);
  13993. }, An.cloneWith = function (n, t) {
  13994. return t = typeof t == "function" ? t : T, _t(n, 4, t);
  13995. }, An.conformsTo = function (n, t) {
  13996. return null == t || gt(n, t, zu(t));
  13997. }, An.deburr = Cu, An.defaultTo = function (n, t) {
  13998. return null == n || n !== n ? t : n;
  13999. }, An.divide = Xf, An.endsWith = function (n, t, r) {
  14000. n = Ou(n), t = yr(t);
  14001. var e = n.length,
  14002. e = r = r === T ? e : pt(Au(r), 0, e);
  14003. return r -= t.length, 0 <= r && n.slice(r, e) == t;
  14004. }, An.eq = au, An.escape = function (n) {
  14005. return (n = Ou(n)) && H.test(n) ? n.replace(K, nt) : n;
  14006. }, An.escapeRegExp = function (n) {
  14007. return (n = Ou(n)) && en.test(n) ? n.replace(rn, "\\$&") : n;
  14008. }, An.every = function (n, t, r) {
  14009. var e = of(n) ? u : bt;
  14010. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  14011. }, An.find = $o, An.findIndex = Fe, An.findKey = function (n, t) {
  14012. return p(n, ye(t, 3), mt);
  14013. }, An.findLast = Fo, An.findLastIndex = Ne, An.findLastKey = function (n, t) {
  14014. return p(n, ye(t, 3), At);
  14015. }, An.floor = nc, An.forEach = Xe, An.forEachRight = nu, An.forIn = function (n, t) {
  14016. return null == n ? n : io(n, ye(t, 3), Wu);
  14017. }, An.forInRight = function (n, t) {
  14018. return null == n ? n : oo(n, ye(t, 3), Wu);
  14019. }, An.forOwn = function (n, t) {
  14020. return n && mt(n, ye(t, 3));
  14021. }, An.forOwnRight = function (n, t) {
  14022. return n && At(n, ye(t, 3));
  14023. }, An.get = Iu, An.gt = rf, An.gte = ef, An.has = function (n, t) {
  14024. return null != n && we(n, t, Rt);
  14025. }, An.hasIn = Ru, An.head = Ze, An.identity = Tu, An.includes = function (n, t, r, e) {
  14026. 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);
  14027. }, An.indexOf = function (n, t, r) {
  14028. var e = null == n ? 0 : n.length;
  14029. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), v(n, t, r)) : -1;
  14030. }, An.inRange = function (n, t, r) {
  14031. return t = mu(t), r === T ? (r = t, t = 0) : r = mu(r), n = ku(n), n >= Ui(t, r) && n < Li(t, r);
  14032. }, An.invoke = Ef, An.isArguments = uf, An.isArray = of, An.isArrayBuffer = ff, An.isArrayLike = lu, An.isArrayLikeObject = su, An.isBoolean = function (n) {
  14033. return true === n || false === n || du(n) && "[object Boolean]" == Ot(n);
  14034. }, An.isBuffer = cf, An.isDate = af, An.isElement = function (n) {
  14035. return du(n) && 1 === n.nodeType && !bu(n);
  14036. }, An.isEmpty = function (n) {
  14037. if (null == n) return true;
  14038. if (lu(n) && (of(n) || typeof n == "string" || typeof n.splice == "function" || cf(n) || pf(n) || uf(n))) return !n.length;
  14039. var t = _o(n);
  14040. if ("[object Map]" == t || "[object Set]" == t) return !n.size;
  14041. if (ze(n)) return !Vt(n).length;
  14042. for (var r in n) {
  14043. if (ii.call(n, r)) return false;
  14044. }
  14045. return true;
  14046. }, An.isEqual = function (n, t) {
  14047. return Mt(n, t);
  14048. }, An.isEqualWith = function (n, t, r) {
  14049. var e = (r = typeof r == "function" ? r : T) ? r(n, t) : T;
  14050. return e === T ? Mt(n, t, T, r) : !!e;
  14051. }, An.isError = hu, An.isFinite = function (n) {
  14052. return typeof n == "number" && zi(n);
  14053. }, An.isFunction = pu, An.isInteger = _u, An.isLength = vu, An.isMap = lf, An.isMatch = function (n, t) {
  14054. return n === t || $t(n, t, xe(t));
  14055. }, An.isMatchWith = function (n, t, r) {
  14056. return r = typeof r == "function" ? r : T, $t(n, t, xe(t), r);
  14057. }, An.isNaN = function (n) {
  14058. return yu(n) && n != +n;
  14059. }, An.isNative = function (n) {
  14060. if (vo(n)) throw new Gu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
  14061. return Ft(n);
  14062. }, An.isNil = function (n) {
  14063. return null == n;
  14064. }, An.isNull = function (n) {
  14065. return null === n;
  14066. }, An.isNumber = yu, An.isObject = gu, An.isObjectLike = du, An.isPlainObject = bu, An.isRegExp = sf, An.isSafeInteger = function (n) {
  14067. return _u(n) && -9007199254740991 <= n && 9007199254740991 >= n;
  14068. }, An.isSet = hf, An.isString = xu, An.isSymbol = ju, An.isTypedArray = pf, An.isUndefined = function (n) {
  14069. return n === T;
  14070. }, An.isWeakMap = function (n) {
  14071. return du(n) && "[object WeakMap]" == _o(n);
  14072. }, An.isWeakSet = function (n) {
  14073. return du(n) && "[object WeakSet]" == Ot(n);
  14074. }, An.join = function (n, t) {
  14075. return null == n ? "" : Wi.call(n, t);
  14076. }, An.kebabCase = Bf, An.last = qe, An.lastIndexOf = function (n, t, r) {
  14077. var e = null == n ? 0 : n.length;
  14078. if (!e) return -1;
  14079. var u = e;
  14080. if (r !== T && (u = Au(r), u = 0 > u ? Li(e + u, 0) : Ui(u, e - 1)), t === t) {
  14081. for (r = u + 1; r-- && n[r] !== t;) {
  14082. ;
  14083. }
  14084. n = r;
  14085. } else n = _(n, d, u, true);
  14086. return n;
  14087. }, An.lowerCase = Lf, An.lowerFirst = Uf, An.lt = _f, An.lte = vf, An.max = function (n) {
  14088. return n && n.length ? xt(n, Tu, It) : T;
  14089. }, An.maxBy = function (n, t) {
  14090. return n && n.length ? xt(n, ye(t, 2), It) : T;
  14091. }, An.mean = function (n) {
  14092. return y(n, Tu);
  14093. }, An.meanBy = function (n, t) {
  14094. return y(n, ye(t, 2));
  14095. }, An.min = function (n) {
  14096. return n && n.length ? xt(n, Tu, Kt) : T;
  14097. }, An.minBy = function (n, t) {
  14098. return n && n.length ? xt(n, ye(t, 2), Kt) : T;
  14099. }, An.stubArray = Zu, An.stubFalse = qu, An.stubObject = function () {
  14100. return {};
  14101. }, An.stubString = function () {
  14102. return "";
  14103. }, An.stubTrue = function () {
  14104. return true;
  14105. }, An.multiply = tc, An.nth = function (n, t) {
  14106. return n && n.length ? Qt(n, Au(t)) : T;
  14107. }, An.noConflict = function () {
  14108. return $n._ === this && ($n._ = li), this;
  14109. }, An.noop = Nu, An.now = Ko, An.pad = function (n, t, r) {
  14110. n = Ou(n);
  14111. var e = (t = Au(t)) ? D(n) : 0;
  14112. return !t || e >= t ? n : (t = (t - e) / 2, ne(Oi(t), r) + n + ne(Si(t), r));
  14113. }, An.padEnd = function (n, t, r) {
  14114. n = Ou(n);
  14115. var e = (t = Au(t)) ? D(n) : 0;
  14116. return t && e < t ? n + ne(t - e, r) : n;
  14117. }, An.padStart = function (n, t, r) {
  14118. n = Ou(n);
  14119. var e = (t = Au(t)) ? D(n) : 0;
  14120. return t && e < t ? ne(t - e, r) + n : n;
  14121. }, An.parseInt = function (n, t, r) {
  14122. return r || null == t ? t = 0 : t && (t = +t), Di(Ou(n).replace(on, ""), t || 0);
  14123. }, An.random = function (n, t, r) {
  14124. 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) {
  14125. var e = n;
  14126. n = t, t = e;
  14127. }
  14128. return r || n % 1 || t % 1 ? (r = Mi(), Ui(n + r * (t - n + Cn("1e-" + ((r + "").length - 1))), t)) : ir(n, t);
  14129. }, An.reduce = function (n, t, r) {
  14130. var e = of(n) ? l : j,
  14131. u = 3 > arguments.length;
  14132. return e(n, ye(t, 4), r, u, eo);
  14133. }, An.reduceRight = function (n, t, r) {
  14134. var e = of(n) ? s : j,
  14135. u = 3 > arguments.length;
  14136. return e(n, ye(t, 4), r, u, uo);
  14137. }, An.repeat = function (n, t, r) {
  14138. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), or(Ou(n), t);
  14139. }, An.replace = function () {
  14140. var n = arguments,
  14141. t = Ou(n[0]);
  14142. return 3 > n.length ? t : t.replace(n[1], n[2]);
  14143. }, An.result = function (n, t, r) {
  14144. t = Sr(t, n);
  14145. var e = -1,
  14146. u = t.length;
  14147. for (u || (u = 1, n = T); ++e < u;) {
  14148. var i = null == n ? T : n[De(t[e])];
  14149. i === T && (e = u, i = r), n = pu(i) ? i.call(n) : i;
  14150. }
  14151. return n;
  14152. }, An.round = rc, An.runInContext = x, An.sample = function (n) {
  14153. return (of(n) ? Qn : cr)(n);
  14154. }, An.size = function (n) {
  14155. if (null == n) return 0;
  14156. if (lu(n)) return xu(n) ? D(n) : n.length;
  14157. var t = _o(n);
  14158. return "[object Map]" == t || "[object Set]" == t ? n.size : Vt(n).length;
  14159. }, An.snakeCase = Cf, An.some = function (n, t, r) {
  14160. var e = of(n) ? h : pr;
  14161. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  14162. }, An.sortedIndex = function (n, t) {
  14163. return _r(n, t);
  14164. }, An.sortedIndexBy = function (n, t, r) {
  14165. return vr(n, t, ye(r, 2));
  14166. }, An.sortedIndexOf = function (n, t) {
  14167. var r = null == n ? 0 : n.length;
  14168. if (r) {
  14169. var e = _r(n, t);
  14170. if (e < r && au(n[e], t)) return e;
  14171. }
  14172. return -1;
  14173. }, An.sortedLastIndex = function (n, t) {
  14174. return _r(n, t, true);
  14175. }, An.sortedLastIndexBy = function (n, t, r) {
  14176. return vr(n, t, ye(r, 2), true);
  14177. }, An.sortedLastIndexOf = function (n, t) {
  14178. if (null == n ? 0 : n.length) {
  14179. var r = _r(n, t, true) - 1;
  14180. if (au(n[r], t)) return r;
  14181. }
  14182. return -1;
  14183. }, An.startCase = Df, An.startsWith = function (n, t, r) {
  14184. return n = Ou(n), r = null == r ? 0 : pt(Au(r), 0, n.length), t = yr(t), n.slice(r, r + t.length) == t;
  14185. }, An.subtract = ec, An.sum = function (n) {
  14186. return n && n.length ? m(n, Tu) : 0;
  14187. }, An.sumBy = function (n, t) {
  14188. return n && n.length ? m(n, ye(t, 2)) : 0;
  14189. }, An.template = function (n, t, r) {
  14190. var e = An.templateSettings;
  14191. r && Oe(n, t, r) && (t = T), n = Ou(n), t = yf({}, t, e, ce), r = yf({}, t.imports, e.imports, ce);
  14192. var u,
  14193. i,
  14194. o = zu(r),
  14195. f = S(r, o),
  14196. c = 0;
  14197. r = t.interpolate || jn;
  14198. var a = "__p+='";
  14199. r = Qu((t.escape || jn).source + "|" + r.source + "|" + (r === Q ? pn : jn).source + "|" + (t.evaluate || jn).source + "|$", "g");
  14200. var l = "sourceURL" in t ? "//# sourceURL=" + t.sourceURL + "\n" : "";
  14201. if (n.replace(r, function (t, r, e, o, f, l) {
  14202. 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;
  14203. }), 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 () {
  14204. return Hu(o, l + "return " + a).apply(T, f);
  14205. }), t.source = a, hu(t)) throw t;
  14206. return t;
  14207. }, An.times = function (n, t) {
  14208. if (n = Au(n), 1 > n || 9007199254740991 < n) return [];
  14209. var r = 4294967295,
  14210. e = Ui(n, 4294967295);
  14211. for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n;) {
  14212. t(r);
  14213. }
  14214. return e;
  14215. }, An.toFinite = mu, An.toInteger = Au, An.toLength = Eu, An.toLower = function (n) {
  14216. return Ou(n).toLowerCase();
  14217. }, An.toNumber = ku, An.toSafeInteger = function (n) {
  14218. return n ? pt(Au(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0;
  14219. }, An.toString = Ou, An.toUpper = function (n) {
  14220. return Ou(n).toUpperCase();
  14221. }, An.trim = function (n, t, r) {
  14222. 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;
  14223. }, An.trimEnd = function (n, t, r) {
  14224. 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;
  14225. }, An.trimStart = function (n, t, r) {
  14226. 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;
  14227. }, An.truncate = function (n, t) {
  14228. var r = 30,
  14229. e = "...";
  14230. if (gu(t)) var u = "separator" in t ? t.separator : u,
  14231. r = "length" in t ? Au(t.length) : r,
  14232. e = "omission" in t ? yr(t.omission) : e;
  14233. n = Ou(n);
  14234. var i = n.length;
  14235. if (Rn.test(n)) var o = M(n),
  14236. i = o.length;
  14237. if (r >= i) return n;
  14238. if (i = r - D(e), 1 > i) return e;
  14239. if (r = o ? Or(o, 0, i).join("") : n.slice(0, i), u === T) return r + e;
  14240. if (o && (i += r.length - i), sf(u)) {
  14241. if (n.slice(i).search(u)) {
  14242. var f = r;
  14243. for (u.global || (u = Qu(u.source, Ou(_n.exec(u)) + "g")), u.lastIndex = 0; o = u.exec(f);) {
  14244. var c = o.index;
  14245. }
  14246. r = r.slice(0, c === T ? i : c);
  14247. }
  14248. } else n.indexOf(yr(u), i) != i && (u = r.lastIndexOf(u), -1 < u && (r = r.slice(0, u)));
  14249. return r + e;
  14250. }, An.unescape = function (n) {
  14251. return (n = Ou(n)) && G.test(n) ? n.replace(V, tt) : n;
  14252. }, An.uniqueId = function (n) {
  14253. var t = ++oi;
  14254. return Ou(n) + t;
  14255. }, An.upperCase = Mf, An.upperFirst = Tf, An.each = Xe, An.eachRight = nu, An.first = Ze, Fu(An, function () {
  14256. var n = {};
  14257. return mt(An, function (t, r) {
  14258. ii.call(An.prototype, r) || (n[r] = t);
  14259. }), n;
  14260. }(), {
  14261. chain: false
  14262. }), An.VERSION = "4.17.10", r("bind bindKey curry curryRight partial partialRight".split(" "), function (n) {
  14263. An[n].placeholder = An;
  14264. }), r(["drop", "take"], function (n, t) {
  14265. Un.prototype[n] = function (r) {
  14266. r = r === T ? 1 : Li(Au(r), 0);
  14267. var e = this.__filtered__ && !t ? new Un(this) : this.clone();
  14268. return e.__filtered__ ? e.__takeCount__ = Ui(r, e.__takeCount__) : e.__views__.push({
  14269. size: Ui(r, 4294967295),
  14270. type: n + (0 > e.__dir__ ? "Right" : "")
  14271. }), e;
  14272. }, Un.prototype[n + "Right"] = function (t) {
  14273. return this.reverse()[n](t).reverse();
  14274. };
  14275. }), r(["filter", "map", "takeWhile"], function (n, t) {
  14276. var r = t + 1,
  14277. e = 1 == r || 3 == r;
  14278. Un.prototype[n] = function (n) {
  14279. var t = this.clone();
  14280. return t.__iteratees__.push({
  14281. iteratee: ye(n, 3),
  14282. type: r
  14283. }), t.__filtered__ = t.__filtered__ || e, t;
  14284. };
  14285. }), r(["head", "last"], function (n, t) {
  14286. var r = "take" + (t ? "Right" : "");
  14287. Un.prototype[n] = function () {
  14288. return this[r](1).value()[0];
  14289. };
  14290. }), r(["initial", "tail"], function (n, t) {
  14291. var r = "drop" + (t ? "" : "Right");
  14292. Un.prototype[n] = function () {
  14293. return this.__filtered__ ? new Un(this) : this[r](1);
  14294. };
  14295. }), Un.prototype.compact = function () {
  14296. return this.filter(Tu);
  14297. }, Un.prototype.find = function (n) {
  14298. return this.filter(n).head();
  14299. }, Un.prototype.findLast = function (n) {
  14300. return this.reverse().find(n);
  14301. }, Un.prototype.invokeMap = fr(function (n, t) {
  14302. return typeof n == "function" ? new Un(this) : this.map(function (r) {
  14303. return Lt(r, n, t);
  14304. });
  14305. }), Un.prototype.reject = function (n) {
  14306. return this.filter(cu(ye(n)));
  14307. }, Un.prototype.slice = function (n, t) {
  14308. n = Au(n);
  14309. var r = this;
  14310. 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);
  14311. }, Un.prototype.takeRightWhile = function (n) {
  14312. return this.reverse().takeWhile(n).reverse();
  14313. }, Un.prototype.toArray = function () {
  14314. return this.take(4294967295);
  14315. }, mt(Un.prototype, function (n, t) {
  14316. var r = /^(?:filter|find|map|reject)|While$/.test(t),
  14317. e = /^(?:head|last)$/.test(t),
  14318. u = An[e ? "take" + ("last" == t ? "Right" : "") : t],
  14319. i = e || /^find/.test(t);
  14320. u && (An.prototype[t] = function () {
  14321. function t(n) {
  14322. return n = u.apply(An, a([n], f)), e && h ? n[0] : n;
  14323. }
  14324. var o = this.__wrapped__,
  14325. f = e ? [1] : arguments,
  14326. c = o instanceof Un,
  14327. l = f[0],
  14328. s = c || of(o);
  14329. s && r && typeof l == "function" && 1 != l.length && (c = s = false);
  14330. var h = this.__chain__,
  14331. p = !!this.__actions__.length,
  14332. l = i && !h,
  14333. c = c && !p;
  14334. return !i && s ? (o = c ? o : new Un(this), o = n.apply(o, f), o.__actions__.push({
  14335. func: Ye,
  14336. args: [t],
  14337. thisArg: T
  14338. }), new On(o, h)) : l && c ? n.apply(this, f) : (o = this.thru(t), l ? e ? o.value()[0] : o.value() : o);
  14339. });
  14340. }), r("pop push shift sort splice unshift".split(" "), function (n) {
  14341. var t = ti[n],
  14342. r = /^(?:push|sort|unshift)$/.test(n) ? "tap" : "thru",
  14343. e = /^(?:pop|shift)$/.test(n);
  14344. An.prototype[n] = function () {
  14345. var n = arguments;
  14346. if (e && !this.__chain__) {
  14347. var u = this.value();
  14348. return t.apply(of(u) ? u : [], n);
  14349. }
  14350. return this[r](function (r) {
  14351. return t.apply(of(r) ? r : [], n);
  14352. });
  14353. };
  14354. }), mt(Un.prototype, function (n, t) {
  14355. var r = An[t];
  14356. if (r) {
  14357. var e = r.name + "";
  14358. (Ki[e] || (Ki[e] = [])).push({
  14359. name: t,
  14360. func: r
  14361. });
  14362. }
  14363. }), Ki[Jr(T, 2).name] = [{
  14364. name: "wrapper",
  14365. func: T
  14366. }], Un.prototype.clone = function () {
  14367. var n = new Un(this.__wrapped__);
  14368. 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;
  14369. }, Un.prototype.reverse = function () {
  14370. if (this.__filtered__) {
  14371. var n = new Un(this);
  14372. n.__dir__ = -1, n.__filtered__ = true;
  14373. } else n = this.clone(), n.__dir__ *= -1;
  14374. return n;
  14375. }, Un.prototype.value = function () {
  14376. var n,
  14377. t = this.__wrapped__.value(),
  14378. r = this.__dir__,
  14379. e = of(t),
  14380. u = 0 > r,
  14381. i = e ? t.length : 0;
  14382. n = i;
  14383. for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a;) {
  14384. var l = o[c],
  14385. s = l.size;
  14386. switch (l.type) {
  14387. case "drop":
  14388. f += s;
  14389. break;
  14390. case "dropRight":
  14391. n -= s;
  14392. break;
  14393. case "take":
  14394. n = Ui(n, f + s);
  14395. break;
  14396. case "takeRight":
  14397. f = Li(f, n - s);
  14398. }
  14399. }
  14400. if (n = {
  14401. start: f,
  14402. end: n
  14403. }, 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__);
  14404. e = [];
  14405. n: for (; n-- && a < l;) {
  14406. for (o += r, u = -1, i = t[o]; ++u < c;) {
  14407. var h = f[u],
  14408. s = h.type,
  14409. h = (0, h.iteratee)(i);
  14410. if (2 == s) i = h;else if (!h) {
  14411. if (1 == s) continue n;
  14412. break n;
  14413. }
  14414. }
  14415. e[a++] = i;
  14416. }
  14417. return e;
  14418. }, An.prototype.at = Mo, An.prototype.chain = function () {
  14419. return Je(this);
  14420. }, An.prototype.commit = function () {
  14421. return new On(this.value(), this.__chain__);
  14422. }, An.prototype.next = function () {
  14423. this.__values__ === T && (this.__values__ = wu(this.value()));
  14424. var n = this.__index__ >= this.__values__.length;
  14425. return {
  14426. done: n,
  14427. value: n ? T : this.__values__[this.__index__++]
  14428. };
  14429. }, An.prototype.plant = function (n) {
  14430. for (var t, r = this; r instanceof En;) {
  14431. var e = $e(r);
  14432. e.__index__ = 0, e.__values__ = T, t ? u.__wrapped__ = e : t = e;
  14433. var u = e,
  14434. r = r.__wrapped__;
  14435. }
  14436. return u.__wrapped__ = n, t;
  14437. }, An.prototype.reverse = function () {
  14438. var n = this.__wrapped__;
  14439. return n instanceof Un ? (this.__actions__.length && (n = new Un(this)), n = n.reverse(), n.__actions__.push({
  14440. func: Ye,
  14441. args: [Ke],
  14442. thisArg: T
  14443. }), new On(n, this.__chain__)) : this.thru(Ke);
  14444. }, An.prototype.toJSON = An.prototype.valueOf = An.prototype.value = function () {
  14445. return wr(this.__wrapped__, this.__actions__);
  14446. }, An.prototype.first = An.prototype.head, ji && (An.prototype[ji] = Qe), An;
  14447. }();
  14448. true && _typeof(__webpack_require__(/*! !webpack amd options */ 41)) == "object" && __webpack_require__(/*! !webpack amd options */ 41) ? ($n._ = rt, !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  14449. return rt;
  14450. }).call(exports, __webpack_require__, exports, module),
  14451. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) : Nn ? ((Nn.exports = rt)._ = rt, Fn._ = rt) : $n._ = rt;
  14452. }).call(this);
  14453. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/global.js */ 3), __webpack_require__(/*! (webpack)/buildin/module.js */ 40)(module)))
  14454. /***/ }),
  14455. /***/ 4:
  14456. /*!**********************************************************************!*\
  14457. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  14458. \**********************************************************************/
  14459. /*! no static exports found */
  14460. /***/ (function(module, exports) {
  14461. function _interopRequireDefault(obj) {
  14462. return obj && obj.__esModule ? obj : {
  14463. "default": obj
  14464. };
  14465. }
  14466. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14467. /***/ }),
  14468. /***/ 40:
  14469. /*!***********************************!*\
  14470. !*** (webpack)/buildin/module.js ***!
  14471. \***********************************/
  14472. /*! no static exports found */
  14473. /***/ (function(module, exports) {
  14474. module.exports = function(module) {
  14475. if (!module.webpackPolyfill) {
  14476. module.deprecate = function() {};
  14477. module.paths = [];
  14478. // module.parent = undefined by default
  14479. if (!module.children) module.children = [];
  14480. Object.defineProperty(module, "loaded", {
  14481. enumerable: true,
  14482. get: function() {
  14483. return module.l;
  14484. }
  14485. });
  14486. Object.defineProperty(module, "id", {
  14487. enumerable: true,
  14488. get: function() {
  14489. return module.i;
  14490. }
  14491. });
  14492. module.webpackPolyfill = 1;
  14493. }
  14494. return module;
  14495. };
  14496. /***/ }),
  14497. /***/ 41:
  14498. /*!****************************************!*\
  14499. !*** (webpack)/buildin/amd-options.js ***!
  14500. \****************************************/
  14501. /*! no static exports found */
  14502. /***/ (function(module, exports) {
  14503. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  14504. module.exports = __webpack_amd_options__;
  14505. /* WEBPACK VAR INJECTION */}.call(this, {}))
  14506. /***/ }),
  14507. /***/ 42:
  14508. /*!****************************************************!*\
  14509. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/index.js ***!
  14510. \****************************************************/
  14511. /*! no static exports found */
  14512. /***/ (function(module, exports, __webpack_require__) {
  14513. "use strict";
  14514. /* WEBPACK VAR INJECTION */(function(uni) {
  14515. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14516. Object.defineProperty(exports, "__esModule", {
  14517. value: true
  14518. });
  14519. exports.default = void 0;
  14520. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 43));
  14521. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 44));
  14522. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 48));
  14523. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 49));
  14524. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 53));
  14525. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 54));
  14526. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 55));
  14527. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 56));
  14528. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 57));
  14529. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 58));
  14530. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 59));
  14531. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 46));
  14532. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 45));
  14533. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 60));
  14534. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 47));
  14535. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 61));
  14536. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 62));
  14537. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 63));
  14538. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 64));
  14539. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 65));
  14540. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 66);
  14541. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 67));
  14542. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 68));
  14543. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 69));
  14544. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 70));
  14545. // 引入全局mixin
  14546. // 引入关于是否mixin集成小程序分享的配置
  14547. // import wxshare from './libs/mixin/mpShare.js'
  14548. // 全局挂载引入http相关请求拦截插件
  14549. function wranning(str) {
  14550. // 开发环境进行信息输出,主要是一些报错信息
  14551. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  14552. // 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
  14553. if (true) {
  14554. console.warn(str);
  14555. }
  14556. }
  14557. // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  14558. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  14559. // let vuexStore = {};
  14560. // try {
  14561. // vuexStore = require("@/store/$u.mixin.js");
  14562. // } catch (e) {
  14563. // //TODO handle the exception
  14564. // }
  14565. // post类型对象参数转为get类型url参数
  14566. var $u = {
  14567. queryParams: _queryParams.default,
  14568. route: _route.default,
  14569. timeFormat: _timeFormat.default,
  14570. date: _timeFormat.default,
  14571. // 另名date
  14572. timeFrom: _timeFrom.default,
  14573. colorGradient: _colorGradient.default.colorGradient,
  14574. colorToRgba: _colorGradient.default.colorToRgba,
  14575. guid: _guid.default,
  14576. color: _color.default,
  14577. sys: _sys.sys,
  14578. os: _sys.os,
  14579. type2icon: _type2icon.default,
  14580. randomArray: _randomArray.default,
  14581. wranning: wranning,
  14582. get: _request.default.get,
  14583. post: _request.default.post,
  14584. put: _request.default.put,
  14585. 'delete': _request.default.delete,
  14586. hexToRgb: _colorGradient.default.hexToRgb,
  14587. rgbToHex: _colorGradient.default.rgbToHex,
  14588. test: _test.default,
  14589. random: _random.default,
  14590. deepClone: _deepClone.default,
  14591. deepMerge: _deepMerge.default,
  14592. getParent: _getParent.default,
  14593. $parent: _$parent.default,
  14594. addUnit: _addUnit.default,
  14595. trim: _trim.default,
  14596. type: ['primary', 'success', 'error', 'warning', 'info'],
  14597. http: _request.default,
  14598. toast: _toast.default,
  14599. config: _config.default,
  14600. // uView配置信息相关,比如版本号
  14601. zIndex: _zIndex.default,
  14602. debounce: _debounce.default,
  14603. throttle: _throttle.default
  14604. };
  14605. // $u挂载到uni对象上
  14606. uni.$u = $u;
  14607. var install = function install(Vue) {
  14608. Vue.mixin(_mixin.default);
  14609. if (Vue.prototype.openShare) {
  14610. Vue.mixin(mpShare);
  14611. }
  14612. // Vue.mixin(vuexStore);
  14613. // 时间格式化,同时两个名称,date和timeFormat
  14614. Vue.filter('timeFormat', function (timestamp, format) {
  14615. return (0, _timeFormat.default)(timestamp, format);
  14616. });
  14617. Vue.filter('date', function (timestamp, format) {
  14618. return (0, _timeFormat.default)(timestamp, format);
  14619. });
  14620. // 将多久以前的方法,注入到全局过滤器
  14621. Vue.filter('timeFrom', function (timestamp, format) {
  14622. return (0, _timeFrom.default)(timestamp, format);
  14623. });
  14624. Vue.prototype.$u = $u;
  14625. };
  14626. var _default = {
  14627. install: install
  14628. };
  14629. exports.default = _default;
  14630. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14631. /***/ }),
  14632. /***/ 43:
  14633. /*!***************************************************************!*\
  14634. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/mixin/mixin.js ***!
  14635. \***************************************************************/
  14636. /*! no static exports found */
  14637. /***/ (function(module, exports, __webpack_require__) {
  14638. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  14639. data: function data() {
  14640. return {};
  14641. },
  14642. onLoad: function onLoad() {
  14643. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  14644. this.$u.getRect = this.$uGetRect;
  14645. },
  14646. methods: {
  14647. // 查询节点信息
  14648. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  14649. // 解决办法为在组件根部再套一个没有任何作用的view元素
  14650. $uGetRect: function $uGetRect(selector, all) {
  14651. var _this = this;
  14652. return new Promise(function (resolve) {
  14653. uni.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  14654. if (all && Array.isArray(rect) && rect.length) {
  14655. resolve(rect);
  14656. }
  14657. if (!all && rect) {
  14658. resolve(rect);
  14659. }
  14660. }).exec();
  14661. });
  14662. },
  14663. getParentData: function getParentData() {
  14664. var _this2 = this;
  14665. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  14666. // 避免在created中去定义parent变量
  14667. if (!this.parent) this.parent = false;
  14668. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  14669. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  14670. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  14671. this.parent = this.$u.$parent.call(this, parentName);
  14672. if (this.parent) {
  14673. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  14674. Object.keys(this.parentData).map(function (key) {
  14675. _this2.parentData[key] = _this2.parent[key];
  14676. });
  14677. }
  14678. },
  14679. // 阻止事件冒泡
  14680. preventEvent: function preventEvent(e) {
  14681. e && e.stopPropagation && e.stopPropagation();
  14682. }
  14683. },
  14684. onReachBottom: function onReachBottom() {
  14685. uni.$emit('uOnReachBottom');
  14686. },
  14687. beforeDestroy: function beforeDestroy() {
  14688. var _this3 = this;
  14689. // 判断当前页面是否存在parent和children,一般在checkbox和checkbox-group父子联动的场景会有此情况
  14690. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  14691. if (this.parent && uni.$u.test.array(this.parent.children)) {
  14692. // 组件销毁时,移除父组件中的children数组中对应的实例
  14693. var childrenList = this.parent.children;
  14694. childrenList.map(function (child, index) {
  14695. // 如果相等,则移除
  14696. if (child === _this3) {
  14697. childrenList.splice(index, 1);
  14698. }
  14699. });
  14700. }
  14701. }
  14702. };
  14703. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14704. /***/ }),
  14705. /***/ 44:
  14706. /*!*****************************************************************!*\
  14707. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/request/index.js ***!
  14708. \*****************************************************************/
  14709. /*! no static exports found */
  14710. /***/ (function(module, exports, __webpack_require__) {
  14711. "use strict";
  14712. /* WEBPACK VAR INJECTION */(function(uni) {
  14713. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14714. Object.defineProperty(exports, "__esModule", {
  14715. value: true
  14716. });
  14717. exports.default = void 0;
  14718. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14719. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14720. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 45));
  14721. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 47));
  14722. var Request = /*#__PURE__*/function () {
  14723. function Request() {
  14724. var _this = this;
  14725. (0, _classCallCheck2.default)(this, Request);
  14726. this.config = {
  14727. baseUrl: '',
  14728. // 请求的根域名
  14729. // 默认的请求头
  14730. header: {},
  14731. method: 'POST',
  14732. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  14733. dataType: 'json',
  14734. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  14735. responseType: 'text',
  14736. showLoading: true,
  14737. // 是否显示请求中的loading
  14738. loadingText: '请求中...',
  14739. loadingTime: 800,
  14740. // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  14741. timer: null,
  14742. // 定时器
  14743. originalData: false,
  14744. // 是否在拦截器中返回服务端的原始数据,见文档说明
  14745. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  14746. };
  14747. // 拦截器
  14748. this.interceptor = {
  14749. // 请求前的拦截
  14750. request: null,
  14751. // 请求后的拦截
  14752. response: null
  14753. };
  14754. // get请求
  14755. this.get = function (url) {
  14756. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14757. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14758. return _this.request({
  14759. method: 'GET',
  14760. url: url,
  14761. header: header,
  14762. data: data
  14763. });
  14764. };
  14765. // post请求
  14766. this.post = function (url) {
  14767. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14768. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14769. return _this.request({
  14770. url: url,
  14771. method: 'POST',
  14772. header: header,
  14773. data: data
  14774. });
  14775. };
  14776. // put请求,不支持支付宝小程序(HX2.6.15)
  14777. this.put = function (url) {
  14778. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14779. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14780. return _this.request({
  14781. url: url,
  14782. method: 'PUT',
  14783. header: header,
  14784. data: data
  14785. });
  14786. };
  14787. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  14788. this.delete = function (url) {
  14789. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14790. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14791. return _this.request({
  14792. url: url,
  14793. method: 'DELETE',
  14794. header: header,
  14795. data: data
  14796. });
  14797. };
  14798. }
  14799. (0, _createClass2.default)(Request, [{
  14800. key: "setConfig",
  14801. value:
  14802. // 设置全局默认配置
  14803. function setConfig(customConfig) {
  14804. // 深度合并对象,否则会造成对象深层属性丢失
  14805. this.config = (0, _deepMerge.default)(this.config, customConfig);
  14806. }
  14807. // 主要请求部分
  14808. }, {
  14809. key: "request",
  14810. value: function request() {
  14811. var _this2 = this;
  14812. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14813. // 检查请求拦截
  14814. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  14815. var tmpConfig = {};
  14816. var interceptorRequest = this.interceptor.request(options);
  14817. if (interceptorRequest === false) {
  14818. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  14819. return new Promise(function () {});
  14820. }
  14821. this.options = interceptorRequest;
  14822. }
  14823. options.dataType = options.dataType || this.config.dataType;
  14824. options.responseType = options.responseType || this.config.responseType;
  14825. options.url = options.url || '';
  14826. options.params = options.params || {};
  14827. options.header = Object.assign({}, this.config.header, options.header);
  14828. options.method = options.method || this.config.method;
  14829. return new Promise(function (resolve, reject) {
  14830. options.complete = function (response) {
  14831. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  14832. uni.hideLoading();
  14833. // 清除定时器,如果请求回来了,就无需loading
  14834. clearTimeout(_this2.config.timer);
  14835. _this2.config.timer = null;
  14836. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  14837. if (_this2.config.originalData) {
  14838. // 判断是否存在拦截器
  14839. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14840. var resInterceptors = _this2.interceptor.response(response);
  14841. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  14842. if (resInterceptors !== false) {
  14843. resolve(resInterceptors);
  14844. } else {
  14845. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  14846. reject(response);
  14847. }
  14848. } else {
  14849. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  14850. resolve(response);
  14851. }
  14852. } else {
  14853. if (response.statusCode == 200) {
  14854. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14855. var _resInterceptors = _this2.interceptor.response(response.data);
  14856. if (_resInterceptors !== false) {
  14857. resolve(_resInterceptors);
  14858. } else {
  14859. reject(response.data);
  14860. }
  14861. } else {
  14862. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  14863. resolve(response.data);
  14864. }
  14865. } else {
  14866. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  14867. // if(response.errMsg) {
  14868. // uni.showModal({
  14869. // title: response.errMsg
  14870. // });
  14871. // }
  14872. reject(response);
  14873. }
  14874. }
  14875. };
  14876. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  14877. options.url = _test.default.url(options.url) ? options.url : _this2.config.baseUrl + (options.url.indexOf('/') == 0 ? options.url : '/' + options.url);
  14878. // 是否显示loading
  14879. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  14880. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  14881. if (_this2.config.showLoading && !_this2.config.timer) {
  14882. _this2.config.timer = setTimeout(function () {
  14883. uni.showLoading({
  14884. title: _this2.config.loadingText,
  14885. mask: _this2.config.loadingMask
  14886. });
  14887. _this2.config.timer = null;
  14888. }, _this2.config.loadingTime);
  14889. }
  14890. uni.request(options);
  14891. });
  14892. // .catch(res => {
  14893. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  14894. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  14895. // return new Promise(()=>{});
  14896. // })
  14897. }
  14898. }]);
  14899. return Request;
  14900. }();
  14901. var _default = new Request();
  14902. exports.default = _default;
  14903. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14904. /***/ }),
  14905. /***/ 45:
  14906. /*!**********************************************************************!*\
  14907. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/deepMerge.js ***!
  14908. \**********************************************************************/
  14909. /*! no static exports found */
  14910. /***/ (function(module, exports, __webpack_require__) {
  14911. "use strict";
  14912. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14913. Object.defineProperty(exports, "__esModule", {
  14914. value: true
  14915. });
  14916. exports.default = void 0;
  14917. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  14918. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 46));
  14919. // JS对象深度合并
  14920. function deepMerge() {
  14921. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14922. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14923. target = (0, _deepClone.default)(target);
  14924. if ((0, _typeof2.default)(target) !== 'object' || (0, _typeof2.default)(source) !== 'object') return false;
  14925. for (var prop in source) {
  14926. if (!source.hasOwnProperty(prop)) continue;
  14927. if (prop in target) {
  14928. if ((0, _typeof2.default)(target[prop]) !== 'object') {
  14929. target[prop] = source[prop];
  14930. } else {
  14931. if ((0, _typeof2.default)(source[prop]) !== 'object') {
  14932. target[prop] = source[prop];
  14933. } else {
  14934. if (target[prop].concat && source[prop].concat) {
  14935. target[prop] = target[prop].concat(source[prop]);
  14936. } else {
  14937. target[prop] = deepMerge(target[prop], source[prop]);
  14938. }
  14939. }
  14940. }
  14941. } else {
  14942. target[prop] = source[prop];
  14943. }
  14944. }
  14945. return target;
  14946. }
  14947. var _default = deepMerge;
  14948. exports.default = _default;
  14949. /***/ }),
  14950. /***/ 453:
  14951. /*!***********************************************************************************!*\
  14952. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/MpHtmlParser.js ***!
  14953. \***********************************************************************************/
  14954. /*! no static exports found */
  14955. /***/ (function(module, exports, __webpack_require__) {
  14956. /* WEBPACK VAR INJECTION */(function(uni) {/**
  14957. * html 解析器
  14958. * @tutorial https://github.com/jin-yufeng/Parser
  14959. * @version 20201029
  14960. * @author JinYufeng
  14961. * @listens MIT
  14962. */
  14963. var cfg = __webpack_require__(/*! ./config.js */ 454),
  14964. blankChar = cfg.blankChar,
  14965. CssHandler = __webpack_require__(/*! ./CssHandler.js */ 455),
  14966. windowWidth = uni.getSystemInfoSync().windowWidth;
  14967. var emoji;
  14968. function MpHtmlParser(data) {
  14969. var _this = this;
  14970. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14971. this.attrs = {};
  14972. this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
  14973. this.data = data;
  14974. this.domain = options.domain;
  14975. this.DOM = [];
  14976. this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
  14977. options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
  14978. this.options = options;
  14979. this.state = this.Text;
  14980. this.STACK = [];
  14981. // 工具函数
  14982. this.bubble = function () {
  14983. for (var i = _this.STACK.length, item; item = _this.STACK[--i];) {
  14984. if (cfg.richOnlyTags[item.name]) return false;
  14985. item.c = 1;
  14986. }
  14987. return true;
  14988. };
  14989. this.decode = function (val, amp) {
  14990. var i = -1,
  14991. j,
  14992. en;
  14993. while (1) {
  14994. if ((i = val.indexOf('&', i + 1)) == -1) break;
  14995. if ((j = val.indexOf(';', i + 2)) == -1) break;
  14996. if (val[i + 1] == '#') {
  14997. en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
  14998. if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
  14999. } else {
  15000. en = val.substring(i + 1, j);
  15001. if (cfg.entities[en] || en == amp) val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
  15002. }
  15003. }
  15004. return val;
  15005. };
  15006. this.getUrl = function (url) {
  15007. if (url[0] == '/') {
  15008. if (url[1] == '/') url = _this.options.prot + ':' + url;else if (_this.domain) url = _this.domain + url;
  15009. } else if (_this.domain && url.indexOf('data:') != 0 && !url.includes('://')) url = _this.domain + '/' + url;
  15010. return url;
  15011. };
  15012. this.isClose = function () {
  15013. return _this.data[_this.i] == '>' || _this.data[_this.i] == '/' && _this.data[_this.i + 1] == '>';
  15014. };
  15015. this.section = function () {
  15016. return _this.data.substring(_this.start, _this.i);
  15017. };
  15018. this.parent = function () {
  15019. return _this.STACK[_this.STACK.length - 1];
  15020. };
  15021. this.siblings = function () {
  15022. return _this.STACK.length ? _this.parent().children : _this.DOM;
  15023. };
  15024. }
  15025. MpHtmlParser.prototype.parse = function () {
  15026. if (emoji) this.data = emoji.parseEmoji(this.data);
  15027. for (var c; c = this.data[this.i]; this.i++) {
  15028. this.state(c);
  15029. }
  15030. if (this.state == this.Text) this.setText();
  15031. while (this.STACK.length) {
  15032. this.popNode(this.STACK.pop());
  15033. }
  15034. return this.DOM;
  15035. };
  15036. // 设置属性
  15037. MpHtmlParser.prototype.setAttr = function () {
  15038. var name = this.attrName.toLowerCase(),
  15039. val = this.attrVal;
  15040. if (cfg.boolAttrs[name]) this.attrs[name] = 'T';else if (val) {
  15041. 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;
  15042. }
  15043. this.attrVal = '';
  15044. while (blankChar[this.data[this.i]]) {
  15045. this.i++;
  15046. }
  15047. if (this.isClose()) this.setNode();else {
  15048. this.start = this.i;
  15049. this.state = this.AttrName;
  15050. }
  15051. };
  15052. // 设置文本节点
  15053. MpHtmlParser.prototype.setText = function () {
  15054. var back,
  15055. text = this.section();
  15056. if (!text) return;
  15057. text = cfg.onText && cfg.onText(text, function () {
  15058. return back = true;
  15059. }) || text;
  15060. if (back) {
  15061. this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
  15062. var j = this.start + text.length;
  15063. for (this.i = this.start; this.i < j; this.i++) {
  15064. this.state(this.data[this.i]);
  15065. }
  15066. return;
  15067. }
  15068. if (!this.pre) {
  15069. // 合并空白符
  15070. var flag,
  15071. tmp = [];
  15072. for (var i = text.length, c; c = text[--i];) {
  15073. if (!blankChar[c]) {
  15074. tmp.unshift(c);
  15075. if (!flag) flag = 1;
  15076. } else {
  15077. if (tmp[0] != ' ') tmp.unshift(' ');
  15078. if (c == '\n' && flag == void 0) flag = 0;
  15079. }
  15080. }
  15081. if (flag == 0) return;
  15082. text = tmp.join('');
  15083. }
  15084. this.siblings().push({
  15085. type: 'text',
  15086. text: this.decode(text)
  15087. });
  15088. };
  15089. // 设置元素节点
  15090. MpHtmlParser.prototype.setNode = function () {
  15091. var node = {
  15092. name: this.tagName.toLowerCase(),
  15093. attrs: this.attrs
  15094. },
  15095. close = cfg.selfClosingTags[node.name];
  15096. if (this.options.nodes.length) node.type = 'node';
  15097. this.attrs = {};
  15098. if (!cfg.ignoreTags[node.name]) {
  15099. // 处理属性
  15100. var attrs = node.attrs,
  15101. style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
  15102. styleObj = {};
  15103. if (attrs.id) {
  15104. if (this.options.compress & 1) attrs.id = void 0;else if (this.options.useAnchor) this.bubble();
  15105. }
  15106. if (this.options.compress & 2 && attrs.class) attrs.class = void 0;
  15107. switch (node.name) {
  15108. case 'a':
  15109. case 'ad':
  15110. this.bubble();
  15111. break;
  15112. case 'font':
  15113. if (attrs.color) {
  15114. styleObj['color'] = attrs.color;
  15115. attrs.color = void 0;
  15116. }
  15117. if (attrs.face) {
  15118. styleObj['font-family'] = attrs.face;
  15119. attrs.face = void 0;
  15120. }
  15121. if (attrs.size) {
  15122. var size = parseInt(attrs.size);
  15123. if (size < 1) size = 1;else if (size > 7) size = 7;
  15124. var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  15125. styleObj['font-size'] = map[size - 1];
  15126. attrs.size = void 0;
  15127. }
  15128. break;
  15129. case 'embed':
  15130. var src = node.attrs.src || '',
  15131. type = node.attrs.type || '';
  15132. 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;
  15133. if (node.attrs.autostart) node.attrs.autoplay = 'T';
  15134. node.attrs.controls = 'T';
  15135. case 'video':
  15136. case 'audio':
  15137. if (!attrs.id) attrs.id = node.name + ++this["".concat(node.name, "Num")];else this["".concat(node.name, "Num")]++;
  15138. if (node.name == 'video') {
  15139. if (this.videoNum > 3) node.lazyLoad = 1;
  15140. if (attrs.width) {
  15141. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  15142. attrs.width = void 0;
  15143. }
  15144. if (attrs.height) {
  15145. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  15146. attrs.height = void 0;
  15147. }
  15148. }
  15149. if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
  15150. attrs.source = [];
  15151. if (attrs.src) {
  15152. attrs.source.push(attrs.src);
  15153. attrs.src = void 0;
  15154. }
  15155. this.bubble();
  15156. break;
  15157. case 'td':
  15158. case 'th':
  15159. if (attrs.colspan || attrs.rowspan) for (var k = this.STACK.length, item; item = this.STACK[--k];) {
  15160. if (item.name == 'table') {
  15161. item.flag = 1;
  15162. break;
  15163. }
  15164. }
  15165. }
  15166. if (attrs.align) {
  15167. if (node.name == 'table') {
  15168. if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';else styleObj['float'] = attrs.align;
  15169. } else styleObj['text-align'] = attrs.align;
  15170. attrs.align = void 0;
  15171. }
  15172. // 压缩 style
  15173. var styles = style.split(';');
  15174. style = '';
  15175. for (var i = 0, len = styles.length; i < len; i++) {
  15176. var info = styles[i].split(':');
  15177. if (info.length < 2) continue;
  15178. var _key = info[0].trim().toLowerCase(),
  15179. _value = info.slice(1).join(':').trim();
  15180. 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;
  15181. }
  15182. if (node.name == 'img') {
  15183. if (attrs.src && !attrs.ignore) {
  15184. if (this.bubble()) attrs.i = (this.imgNum++).toString();else attrs.ignore = 'T';
  15185. }
  15186. if (attrs.ignore) {
  15187. style += ';-webkit-touch-callout:none';
  15188. styleObj['max-width'] = '100%';
  15189. }
  15190. var width;
  15191. if (styleObj.width) width = styleObj.width;else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px';
  15192. if (width) {
  15193. styleObj.width = width;
  15194. attrs.width = '100%';
  15195. if (parseInt(width) > windowWidth) {
  15196. styleObj.height = '';
  15197. if (attrs.height) attrs.height = void 0;
  15198. }
  15199. }
  15200. if (styleObj.height) {
  15201. attrs.height = styleObj.height;
  15202. styleObj.height = '';
  15203. } else if (attrs.height && !attrs.height.includes('%')) attrs.height = parseFloat(attrs.height) + 'px';
  15204. }
  15205. for (var key in styleObj) {
  15206. var value = styleObj[key];
  15207. if (!value) continue;
  15208. if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
  15209. // 填充链接
  15210. if (value.includes('url')) {
  15211. var j = value.indexOf('(');
  15212. if (j++ != -1) {
  15213. while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {
  15214. j++;
  15215. }
  15216. value = value.substr(0, j) + this.getUrl(value.substr(j));
  15217. }
  15218. }
  15219. // 转换 rpx
  15220. else if (value.includes('rpx')) value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  15221. return parseFloat($) * windowWidth / 750 + 'px';
  15222. });else if (key == 'white-space' && value.includes('pre') && !close) this.pre = node.pre = true;
  15223. style += ";".concat(key, ":").concat(value);
  15224. }
  15225. style = style.substr(1);
  15226. if (style) attrs.style = style;
  15227. if (!close) {
  15228. node.children = [];
  15229. if (node.name == 'pre' && cfg.highlight) {
  15230. this.remove(node);
  15231. this.pre = node.pre = true;
  15232. }
  15233. this.siblings().push(node);
  15234. this.STACK.push(node);
  15235. } else if (!cfg.filter || cfg.filter(node, this) != false) this.siblings().push(node);
  15236. } else {
  15237. if (!close) this.remove(node);else if (node.name == 'source') {
  15238. var parent = this.parent();
  15239. if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) parent.attrs.source.push(node.attrs.src);
  15240. } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
  15241. }
  15242. if (this.data[this.i] == '/') this.i++;
  15243. this.start = this.i + 1;
  15244. this.state = this.Text;
  15245. };
  15246. // 移除标签
  15247. MpHtmlParser.prototype.remove = function (node) {
  15248. var _this2 = this;
  15249. var name = node.name,
  15250. j = this.i;
  15251. // 处理 svg
  15252. var handleSvg = function handleSvg() {
  15253. var src = _this2.data.substring(j, _this2.i + 1);
  15254. node.attrs.xmlns = 'http://www.w3.org/2000/svg';
  15255. for (var key in node.attrs) {
  15256. if (key == 'viewbox') src = " viewBox=\"".concat(node.attrs.viewbox, "\"") + src;else if (key != 'style') src = " ".concat(key, "=\"").concat(node.attrs[key], "\"") + src;
  15257. }
  15258. src = '<svg' + src;
  15259. var parent = _this2.parent();
  15260. if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
  15261. _this2.siblings().push({
  15262. name: 'img',
  15263. attrs: {
  15264. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  15265. style: node.attrs.style,
  15266. ignore: 'T'
  15267. }
  15268. });
  15269. };
  15270. if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
  15271. while (1) {
  15272. if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
  15273. if (name == 'pre' || name == 'svg') this.i = j;else this.i = this.data.length;
  15274. return;
  15275. }
  15276. this.start = this.i += 2;
  15277. while (!blankChar[this.data[this.i]] && !this.isClose()) {
  15278. this.i++;
  15279. }
  15280. if (this.section().toLowerCase() == name) {
  15281. // 代码块高亮
  15282. if (name == 'pre') {
  15283. 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);
  15284. return this.i = j;
  15285. } 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);
  15286. if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
  15287. if (name == 'svg') handleSvg();
  15288. return;
  15289. }
  15290. }
  15291. };
  15292. // 节点出栈处理
  15293. MpHtmlParser.prototype.popNode = function (node) {
  15294. // 空白符处理
  15295. if (node.pre) {
  15296. node.pre = this.pre = void 0;
  15297. for (var i = this.STACK.length; i--;) {
  15298. if (this.STACK[i].pre) this.pre = true;
  15299. }
  15300. }
  15301. var siblings = this.siblings(),
  15302. len = siblings.length,
  15303. childs = node.children;
  15304. if (node.name == 'head' || cfg.filter && cfg.filter(node, this) == false) return siblings.pop();
  15305. var attrs = node.attrs;
  15306. // 替换一些标签名
  15307. if (cfg.blockTags[node.name]) node.name = 'div';else if (!cfg.trustTags[node.name]) node.name = 'span';
  15308. // 处理列表
  15309. if (node.c && (node.name == 'ul' || node.name == 'ol')) {
  15310. if ((node.attrs.style || '').includes('list-style:none')) {
  15311. for (var _i = 0, child; child = childs[_i++];) {
  15312. if (child.name == 'li') child.name = 'div';
  15313. }
  15314. } else if (node.name == 'ul') {
  15315. var floor = 1;
  15316. for (var _i2 = this.STACK.length; _i2--;) {
  15317. if (this.STACK[_i2].name == 'ul') floor++;
  15318. }
  15319. if (floor != 1) for (var _i3 = childs.length; _i3--;) {
  15320. childs[_i3].floor = floor;
  15321. }
  15322. } else {
  15323. for (var _i4 = 0, num = 1, _child; _child = childs[_i4++];) {
  15324. if (_child.name == 'li') {
  15325. _child.type = 'ol';
  15326. _child.num = function (num, type) {
  15327. if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
  15328. if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
  15329. if (type == 'i' || type == 'I') {
  15330. num = (num - 1) % 99 + 1;
  15331. var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
  15332. ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
  15333. res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
  15334. if (type == 'i') return res.toLowerCase();
  15335. return res;
  15336. }
  15337. return num;
  15338. }(num++, attrs.type) + '.';
  15339. }
  15340. }
  15341. }
  15342. }
  15343. // 处理表格
  15344. if (node.name == 'table') {
  15345. var padding = parseFloat(attrs.cellpadding),
  15346. spacing = parseFloat(attrs.cellspacing),
  15347. border = parseFloat(attrs.border);
  15348. if (node.c) {
  15349. if (isNaN(padding)) padding = 2;
  15350. if (isNaN(spacing)) spacing = 2;
  15351. }
  15352. if (border) attrs.style = "border:".concat(border, "px solid gray;").concat(attrs.style || '');
  15353. if (node.flag && node.c) {
  15354. // 有 colspan 或 rowspan 且含有链接的表格转为 grid 布局实现
  15355. attrs.style = "".concat(attrs.style || '', ";").concat(spacing ? ";grid-gap:".concat(spacing, "px") : ';border-left:0;border-top:0');
  15356. var row = 1,
  15357. col = 1,
  15358. colNum,
  15359. trs = [],
  15360. children = [],
  15361. map = {};
  15362. (function f(ns) {
  15363. for (var i = 0; i < ns.length; i++) {
  15364. if (ns[i].name == 'tr') trs.push(ns[i]);else f(ns[i].children || []);
  15365. }
  15366. })(node.children);
  15367. for (var _i5 = 0; _i5 < trs.length; _i5++) {
  15368. for (var j = 0, td; td = trs[_i5].children[j]; j++) {
  15369. if (td.name == 'td' || td.name == 'th') {
  15370. while (map[row + '.' + col]) {
  15371. col++;
  15372. }
  15373. var cell = {
  15374. name: 'div',
  15375. c: 1,
  15376. attrs: {
  15377. style: (td.attrs.style || '') + (border ? ";border:".concat(border, "px solid gray") + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? ";padding:".concat(padding, "px") : '')
  15378. },
  15379. children: td.children
  15380. };
  15381. if (td.attrs.colspan) {
  15382. cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan));
  15383. if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1);
  15384. col += parseInt(td.attrs.colspan) - 1;
  15385. }
  15386. if (td.attrs.rowspan) {
  15387. cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan));
  15388. if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1);
  15389. for (var k = 1; k < td.attrs.rowspan; k++) {
  15390. map[row + k + '.' + col] = 1;
  15391. }
  15392. }
  15393. children.push(cell);
  15394. col++;
  15395. }
  15396. }
  15397. if (!colNum) {
  15398. colNum = col - 1;
  15399. attrs.style += ";grid-template-columns:repeat(".concat(colNum, ",auto)");
  15400. }
  15401. col = 1;
  15402. row++;
  15403. }
  15404. node.children = children;
  15405. } else {
  15406. attrs.style = "border-spacing:".concat(spacing, "px;").concat(attrs.style || '');
  15407. if (border || padding) (function f(ns) {
  15408. for (var i = 0, n; n = ns[i]; i++) {
  15409. if (n.name == 'th' || n.name == 'td') {
  15410. if (border) n.attrs.style = "border:".concat(border, "px solid gray;").concat(n.attrs.style || '');
  15411. if (padding) n.attrs.style = "padding:".concat(padding, "px;").concat(n.attrs.style || '');
  15412. } else f(n.children || []);
  15413. }
  15414. })(childs);
  15415. }
  15416. if (this.options.autoscroll) {
  15417. var table = Object.assign({}, node);
  15418. node.name = 'div';
  15419. node.attrs = {
  15420. style: 'overflow:scroll'
  15421. };
  15422. node.children = [table];
  15423. }
  15424. }
  15425. this.CssHandler.pop && this.CssHandler.pop(node);
  15426. // 自动压缩
  15427. if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') siblings[len - 1] = childs[0];
  15428. };
  15429. // 状态机
  15430. MpHtmlParser.prototype.Text = function (c) {
  15431. if (c == '<') {
  15432. var next = this.data[this.i + 1],
  15433. isLetter = function isLetter(c) {
  15434. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15435. };
  15436. if (isLetter(next)) {
  15437. this.setText();
  15438. this.start = this.i + 1;
  15439. this.state = this.TagName;
  15440. } else if (next == '/') {
  15441. this.setText();
  15442. if (isLetter(this.data[++this.i + 1])) {
  15443. this.start = this.i + 1;
  15444. this.state = this.EndTag;
  15445. } else this.Comment();
  15446. } else if (next == '!' || next == '?') {
  15447. this.setText();
  15448. this.Comment();
  15449. }
  15450. }
  15451. };
  15452. MpHtmlParser.prototype.Comment = function () {
  15453. var key;
  15454. 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 = '>';
  15455. if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;else this.i += key.length - 1;
  15456. this.start = this.i + 1;
  15457. this.state = this.Text;
  15458. };
  15459. MpHtmlParser.prototype.TagName = function (c) {
  15460. if (blankChar[c]) {
  15461. this.tagName = this.section();
  15462. while (blankChar[this.data[this.i]]) {
  15463. this.i++;
  15464. }
  15465. if (this.isClose()) this.setNode();else {
  15466. this.start = this.i;
  15467. this.state = this.AttrName;
  15468. }
  15469. } else if (this.isClose()) {
  15470. this.tagName = this.section();
  15471. this.setNode();
  15472. }
  15473. };
  15474. MpHtmlParser.prototype.AttrName = function (c) {
  15475. if (c == '=' || blankChar[c] || this.isClose()) {
  15476. this.attrName = this.section();
  15477. if (blankChar[c]) while (blankChar[this.data[++this.i]]) {
  15478. ;
  15479. }
  15480. if (this.data[this.i] == '=') {
  15481. while (blankChar[this.data[++this.i]]) {
  15482. ;
  15483. }
  15484. this.start = this.i--;
  15485. this.state = this.AttrValue;
  15486. } else this.setAttr();
  15487. }
  15488. };
  15489. MpHtmlParser.prototype.AttrValue = function (c) {
  15490. if (c == '"' || c == "'") {
  15491. this.start++;
  15492. if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
  15493. this.attrVal = this.section();
  15494. this.i++;
  15495. } else {
  15496. for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++) {
  15497. ;
  15498. }
  15499. this.attrVal = this.section();
  15500. }
  15501. this.setAttr();
  15502. };
  15503. MpHtmlParser.prototype.EndTag = function (c) {
  15504. if (blankChar[c] || c == '>' || c == '/') {
  15505. var name = this.section().toLowerCase();
  15506. for (var i = this.STACK.length; i--;) {
  15507. if (this.STACK[i].name == name) break;
  15508. }
  15509. if (i != -1) {
  15510. var node;
  15511. while ((node = this.STACK.pop()).name != name) {
  15512. this.popNode(node);
  15513. }
  15514. this.popNode(node);
  15515. } else if (name == 'p' || name == 'br') this.siblings().push({
  15516. name: name,
  15517. attrs: {}
  15518. });
  15519. this.i = this.data.indexOf('>', this.i);
  15520. this.start = this.i + 1;
  15521. if (this.i == -1) this.i = this.data.length;else this.state = this.Text;
  15522. }
  15523. };
  15524. module.exports = MpHtmlParser;
  15525. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  15526. /***/ }),
  15527. /***/ 454:
  15528. /*!*****************************************************************************!*\
  15529. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/config.js ***!
  15530. \*****************************************************************************/
  15531. /*! no static exports found */
  15532. /***/ (function(module, exports, __webpack_require__) {
  15533. /* WEBPACK VAR INJECTION */(function(wx) {/* 配置文件 */
  15534. var cfg = {
  15535. // 出错占位图
  15536. errorImg: null,
  15537. // 过滤器函数
  15538. filter: null,
  15539. // 代码高亮函数
  15540. highlight: null,
  15541. // 文本处理函数
  15542. onText: null,
  15543. // 实体编码列表
  15544. entities: {
  15545. quot: '"',
  15546. apos: "'",
  15547. semi: ';',
  15548. nbsp: '\xA0',
  15549. ensp: "\u2002",
  15550. emsp: "\u2003",
  15551. ndash: '–',
  15552. mdash: '—',
  15553. middot: '·',
  15554. lsquo: '‘',
  15555. rsquo: '’',
  15556. ldquo: '“',
  15557. rdquo: '”',
  15558. bull: '•',
  15559. hellip: '…'
  15560. },
  15561. blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
  15562. boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
  15563. // 块级标签,将被转为 div
  15564. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  15565. // 将被移除的标签
  15566. ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
  15567. // 只能被 rich-text 显示的标签
  15568. richOnlyTags: makeMap('a,colgroup,fieldset,legend'),
  15569. // 自闭合的标签
  15570. selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  15571. // 信任的标签
  15572. 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'),
  15573. // 默认的标签样式
  15574. userAgentStyles: {
  15575. address: 'font-style:italic',
  15576. big: 'display:inline;font-size:1.2em',
  15577. blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
  15578. caption: 'display:table-caption;text-align:center',
  15579. center: 'text-align:center',
  15580. cite: 'font-style:italic',
  15581. dd: 'margin-left:40px',
  15582. mark: 'background-color:yellow',
  15583. pre: 'font-family:monospace;white-space:pre;overflow:scroll',
  15584. s: 'text-decoration:line-through',
  15585. small: 'display:inline;font-size:0.8em',
  15586. u: 'text-decoration:underline'
  15587. }
  15588. };
  15589. function makeMap(str) {
  15590. var map = Object.create(null),
  15591. list = str.split(',');
  15592. for (var i = list.length; i--;) {
  15593. map[list[i]] = true;
  15594. }
  15595. return map;
  15596. }
  15597. if (wx.canIUse('editor')) {
  15598. cfg.blockTags.pre = void 0;
  15599. cfg.ignoreTags.rp = true;
  15600. Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
  15601. Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
  15602. }
  15603. module.exports = cfg;
  15604. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  15605. /***/ }),
  15606. /***/ 455:
  15607. /*!*********************************************************************************!*\
  15608. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/CssHandler.js ***!
  15609. \*********************************************************************************/
  15610. /*! no static exports found */
  15611. /***/ (function(module, exports, __webpack_require__) {
  15612. var cfg = __webpack_require__(/*! ./config.js */ 454),
  15613. isLetter = function isLetter(c) {
  15614. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15615. };
  15616. function CssHandler(tagStyle) {
  15617. var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
  15618. for (var item in tagStyle) {
  15619. styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];
  15620. }
  15621. this.styles = styles;
  15622. }
  15623. CssHandler.prototype.getStyle = function (data) {
  15624. this.styles = new parser(data, this.styles).parse();
  15625. };
  15626. CssHandler.prototype.match = function (name, attrs) {
  15627. var tmp,
  15628. matched = (tmp = this.styles[name]) ? tmp + ';' : '';
  15629. if (attrs.class) {
  15630. var items = attrs.class.split(' ');
  15631. for (var i = 0, item; item = items[i]; i++) {
  15632. if (tmp = this.styles['.' + item]) matched += tmp + ';';
  15633. }
  15634. }
  15635. if (tmp = this.styles['#' + attrs.id]) matched += tmp + ';';
  15636. return matched;
  15637. };
  15638. module.exports = CssHandler;
  15639. function parser(data, init) {
  15640. this.data = data;
  15641. this.floor = 0;
  15642. this.i = 0;
  15643. this.list = [];
  15644. this.res = init;
  15645. this.state = this.Space;
  15646. }
  15647. parser.prototype.parse = function () {
  15648. for (var c; c = this.data[this.i]; this.i++) {
  15649. this.state(c);
  15650. }
  15651. return this.res;
  15652. };
  15653. parser.prototype.section = function () {
  15654. return this.data.substring(this.start, this.i);
  15655. };
  15656. // 状态机
  15657. parser.prototype.Space = function (c) {
  15658. if (c == '.' || c == '#' || isLetter(c)) {
  15659. this.start = this.i;
  15660. this.state = this.Name;
  15661. } else if (c == '/' && this.data[this.i + 1] == '*') this.Comment();else if (!cfg.blankChar[c] && c != ';') this.state = this.Ignore;
  15662. };
  15663. parser.prototype.Comment = function () {
  15664. this.i = this.data.indexOf('*/', this.i) + 1;
  15665. if (!this.i) this.i = this.data.length;
  15666. this.state = this.Space;
  15667. };
  15668. parser.prototype.Ignore = function (c) {
  15669. if (c == '{') this.floor++;else if (c == '}' && ! --this.floor) {
  15670. this.list = [];
  15671. this.state = this.Space;
  15672. }
  15673. };
  15674. parser.prototype.Name = function (c) {
  15675. if (cfg.blankChar[c]) {
  15676. this.list.push(this.section());
  15677. this.state = this.NameSpace;
  15678. } else if (c == '{') {
  15679. this.list.push(this.section());
  15680. this.Content();
  15681. } else if (c == ',') {
  15682. this.list.push(this.section());
  15683. this.Comma();
  15684. } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') this.state = this.Ignore;
  15685. };
  15686. parser.prototype.NameSpace = function (c) {
  15687. if (c == '{') this.Content();else if (c == ',') this.Comma();else if (!cfg.blankChar[c]) this.state = this.Ignore;
  15688. };
  15689. parser.prototype.Comma = function () {
  15690. while (cfg.blankChar[this.data[++this.i]]) {
  15691. ;
  15692. }
  15693. if (this.data[this.i] == '{') this.Content();else {
  15694. this.start = this.i--;
  15695. this.state = this.Name;
  15696. }
  15697. };
  15698. parser.prototype.Content = function () {
  15699. this.start = ++this.i;
  15700. if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
  15701. var content = this.section();
  15702. for (var i = 0, item; item = this.list[i++];) {
  15703. if (this.res[item]) this.res[item] += ';' + content;else this.res[item] = content;
  15704. }
  15705. this.list = [];
  15706. this.state = this.Space;
  15707. };
  15708. /***/ }),
  15709. /***/ 46:
  15710. /*!**********************************************************************!*\
  15711. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/deepClone.js ***!
  15712. \**********************************************************************/
  15713. /*! no static exports found */
  15714. /***/ (function(module, exports, __webpack_require__) {
  15715. "use strict";
  15716. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15717. Object.defineProperty(exports, "__esModule", {
  15718. value: true
  15719. });
  15720. exports.default = void 0;
  15721. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  15722. // 判断arr是否为一个数组,返回一个bool值
  15723. function isArray(arr) {
  15724. return Object.prototype.toString.call(arr) === '[object Array]';
  15725. }
  15726. // 深度克隆
  15727. function deepClone(obj) {
  15728. // 对常见的“非”值,直接返回原来值
  15729. if ([null, undefined, NaN, false].includes(obj)) return obj;
  15730. if ((0, _typeof2.default)(obj) !== "object" && typeof obj !== 'function') {
  15731. //原始类型直接返回
  15732. return obj;
  15733. }
  15734. var o = isArray(obj) ? [] : {};
  15735. for (var i in obj) {
  15736. if (obj.hasOwnProperty(i)) {
  15737. o[i] = (0, _typeof2.default)(obj[i]) === "object" ? deepClone(obj[i]) : obj[i];
  15738. }
  15739. }
  15740. return o;
  15741. }
  15742. var _default = deepClone;
  15743. exports.default = _default;
  15744. /***/ }),
  15745. /***/ 463:
  15746. /*!***************************************************************!*\
  15747. !*** E:/Desktop/zd_wechatApp(1)/components/mp-html/parser.js ***!
  15748. \***************************************************************/
  15749. /*! no static exports found */
  15750. /***/ (function(module, exports, __webpack_require__) {
  15751. "use strict";
  15752. /* WEBPACK VAR INJECTION */(function(uni, wx) {
  15753. Object.defineProperty(exports, "__esModule", {
  15754. value: true
  15755. });
  15756. exports.default = void 0;
  15757. /**
  15758. * @fileoverview html 解析器
  15759. */
  15760. // 配置
  15761. var config = {
  15762. // 信任的标签(保持标签名不变)
  15763. 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'),
  15764. // 块级标签(转为 div,其他的非信任标签转为 span)
  15765. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  15766. // 要移除的标签
  15767. ignoreTags: makeMap('area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr'),
  15768. // 自闭合的标签
  15769. voidTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  15770. // html 实体
  15771. entities: {
  15772. lt: '<',
  15773. gt: '>',
  15774. quot: '"',
  15775. apos: "'",
  15776. ensp: "\u2002",
  15777. emsp: "\u2003",
  15778. nbsp: '\xA0',
  15779. semi: ';',
  15780. ndash: '–',
  15781. mdash: '—',
  15782. middot: '·',
  15783. lsquo: '‘',
  15784. rsquo: '’',
  15785. ldquo: '“',
  15786. rdquo: '”',
  15787. bull: '•',
  15788. hellip: '…',
  15789. larr: '←',
  15790. uarr: '↑',
  15791. rarr: '→',
  15792. darr: '↓'
  15793. },
  15794. // 默认的标签样式
  15795. tagStyle: {
  15796. address: 'font-style:italic',
  15797. big: 'display:inline;font-size:1.2em',
  15798. caption: 'display:table-caption;text-align:center',
  15799. center: 'text-align:center',
  15800. cite: 'font-style:italic',
  15801. dd: 'margin-left:40px',
  15802. mark: 'background-color:yellow',
  15803. pre: 'font-family:monospace;white-space:pre',
  15804. s: 'text-decoration:line-through',
  15805. small: 'display:inline;font-size:0.8em',
  15806. strike: 'text-decoration:line-through',
  15807. u: 'text-decoration:underline'
  15808. },
  15809. // svg 大小写对照表
  15810. svgDict: {
  15811. animatetransform: 'animateTransform',
  15812. lineargradient: 'linearGradient',
  15813. viewbox: 'viewBox',
  15814. attributename: 'attributeName',
  15815. repeatcount: 'repeatCount',
  15816. repeatdur: 'repeatDur'
  15817. }
  15818. };
  15819. var tagSelector = {};
  15820. var _uni$getSystemInfoSyn = uni.getSystemInfoSync(),
  15821. windowWidth = _uni$getSystemInfoSyn.windowWidth,
  15822. system = _uni$getSystemInfoSyn.system;
  15823. var blankChar = makeMap(' ,\r,\n,\t,\f');
  15824. var idIndex = 0;
  15825. /**
  15826. * @description 创建 map
  15827. * @param {String} str 逗号分隔
  15828. */
  15829. function makeMap(str) {
  15830. var map = Object.create(null);
  15831. var list = str.split(',');
  15832. for (var i = list.length; i--;) {
  15833. map[list[i]] = true;
  15834. }
  15835. return map;
  15836. }
  15837. /**
  15838. * @description 解码 html 实体
  15839. * @param {String} str 要解码的字符串
  15840. * @param {Boolean} amp 要不要解码 &amp;
  15841. * @returns {String} 解码后的字符串
  15842. */
  15843. function decodeEntity(str, amp) {
  15844. var i = str.indexOf('&');
  15845. while (i !== -1) {
  15846. var j = str.indexOf(';', i + 3);
  15847. var code = void 0;
  15848. if (j === -1) break;
  15849. if (str[i + 1] === '#') {
  15850. // &#123; 形式的实体
  15851. code = parseInt((str[i + 2] === 'x' ? '0' : '') + str.substring(i + 2, j));
  15852. if (!isNaN(code)) {
  15853. str = str.substr(0, i) + String.fromCharCode(code) + str.substr(j + 1);
  15854. }
  15855. } else {
  15856. // &nbsp; 形式的实体
  15857. code = str.substring(i + 1, j);
  15858. if (config.entities[code] || code === 'amp' && amp) {
  15859. str = str.substr(0, i) + (config.entities[code] || '&') + str.substr(j + 1);
  15860. }
  15861. }
  15862. i = str.indexOf('&', i + 1);
  15863. }
  15864. return str;
  15865. }
  15866. /**
  15867. * @description 合并多个块级标签,加快长内容渲染
  15868. * @param {Array} nodes 要合并的标签数组
  15869. */
  15870. function mergeNodes(nodes) {
  15871. var i = nodes.length - 1;
  15872. for (var j = i; j >= -1; j--) {
  15873. 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')) {
  15874. if (i - j >= 5) {
  15875. nodes.splice(j + 1, i - j, {
  15876. name: 'div',
  15877. attrs: {},
  15878. children: nodes.slice(j + 1, i + 1)
  15879. });
  15880. }
  15881. i = j - 1;
  15882. }
  15883. }
  15884. }
  15885. /**
  15886. * @description html 解析器
  15887. * @param {Object} vm 组件实例
  15888. */
  15889. function Parser(vm) {
  15890. this.options = vm || {};
  15891. this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle);
  15892. this.imgList = vm.imgList || [];
  15893. this.imgList._unloadimgs = 0;
  15894. this.plugins = vm.plugins || [];
  15895. this.attrs = Object.create(null);
  15896. this.stack = [];
  15897. this.nodes = [];
  15898. this.pre = (this.options.containerStyle || '').includes('white-space') && this.options.containerStyle.includes('pre') ? 2 : 0;
  15899. }
  15900. /**
  15901. * @description 执行解析
  15902. * @param {String} content 要解析的文本
  15903. */
  15904. Parser.prototype.parse = function (content) {
  15905. // 插件处理
  15906. for (var i = this.plugins.length; i--;) {
  15907. if (this.plugins[i].onUpdate) {
  15908. content = this.plugins[i].onUpdate(content, config) || content;
  15909. }
  15910. }
  15911. new Lexer(this).parse(content);
  15912. // 出栈未闭合的标签
  15913. while (this.stack.length) {
  15914. this.popNode();
  15915. }
  15916. if (this.nodes.length > 50) {
  15917. mergeNodes(this.nodes);
  15918. }
  15919. return this.nodes;
  15920. };
  15921. /**
  15922. * @description 将标签暴露出来(不被 rich-text 包含)
  15923. */
  15924. Parser.prototype.expose = function () {
  15925. for (var i = this.stack.length; i--;) {
  15926. var item = this.stack[i];
  15927. if (item.c || item.name === 'a' || item.name === 'video' || item.name === 'audio') return;
  15928. item.c = 1;
  15929. }
  15930. };
  15931. /**
  15932. * @description 处理插件
  15933. * @param {Object} node 要处理的标签
  15934. * @returns {Boolean} 是否要移除此标签
  15935. */
  15936. Parser.prototype.hook = function (node) {
  15937. for (var i = this.plugins.length; i--;) {
  15938. if (this.plugins[i].onParse && this.plugins[i].onParse(node, this) === false) {
  15939. return false;
  15940. }
  15941. }
  15942. return true;
  15943. };
  15944. /**
  15945. * @description 将链接拼接上主域名
  15946. * @param {String} url 需要拼接的链接
  15947. * @returns {String} 拼接后的链接
  15948. */
  15949. Parser.prototype.getUrl = function (url) {
  15950. var domain = this.options.domain;
  15951. if (url[0] === '/') {
  15952. if (url[1] === '/') {
  15953. // // 开头的补充协议名
  15954. url = (domain ? domain.split('://')[0] : 'http') + ':' + url;
  15955. } else if (domain) {
  15956. // 否则补充整个域名
  15957. url = domain + url;
  15958. }
  15959. } else if (!url.includes('data:') && !url.includes('://')) {
  15960. if (domain) {
  15961. url = domain + '/' + url;
  15962. }
  15963. }
  15964. return url;
  15965. };
  15966. /**
  15967. * @description 解析样式表
  15968. * @param {Object} node 标签
  15969. * @returns {Object}
  15970. */
  15971. Parser.prototype.parseStyle = function (node) {
  15972. var attrs = node.attrs;
  15973. var list = (this.tagStyle[node.name] || '').split(';').concat((attrs.style || '').split(';'));
  15974. var styleObj = {};
  15975. var tmp = '';
  15976. if (attrs.id && !this.xml) {
  15977. // 暴露锚点
  15978. if (this.options.useAnchor) {
  15979. this.expose();
  15980. } else if (node.name !== 'img' && node.name !== 'a' && node.name !== 'video' && node.name !== 'audio') {
  15981. attrs.id = undefined;
  15982. }
  15983. }
  15984. // 转换 width 和 height 属性
  15985. if (attrs.width) {
  15986. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  15987. attrs.width = undefined;
  15988. }
  15989. if (attrs.height) {
  15990. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  15991. attrs.height = undefined;
  15992. }
  15993. for (var i = 0, len = list.length; i < len; i++) {
  15994. var info = list[i].split(':');
  15995. if (info.length < 2) continue;
  15996. var key = info.shift().trim().toLowerCase();
  15997. var value = info.join(':').trim();
  15998. if (value[0] === '-' && value.lastIndexOf('-') > 0 || value.includes('safe')) {
  15999. // 兼容性的 css 不压缩
  16000. tmp += ";".concat(key, ":").concat(value);
  16001. } else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) {
  16002. // 重复的样式进行覆盖
  16003. if (value.includes('url')) {
  16004. // 填充链接
  16005. var j = value.indexOf('(') + 1;
  16006. if (j) {
  16007. while (value[j] === '"' || value[j] === "'" || blankChar[value[j]]) {
  16008. j++;
  16009. }
  16010. value = value.substr(0, j) + this.getUrl(value.substr(j));
  16011. }
  16012. } else if (value.includes('rpx')) {
  16013. // 转换 rpx(rich-text 内部不支持 rpx)
  16014. value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  16015. return parseFloat($) * windowWidth / 750 + 'px';
  16016. });
  16017. }
  16018. styleObj[key] = value;
  16019. }
  16020. }
  16021. node.attrs.style = tmp;
  16022. return styleObj;
  16023. };
  16024. /**
  16025. * @description 解析到标签名
  16026. * @param {String} name 标签名
  16027. * @private
  16028. */
  16029. Parser.prototype.onTagName = function (name) {
  16030. this.tagName = this.xml ? name : name.toLowerCase();
  16031. if (this.tagName === 'svg') {
  16032. this.xml = (this.xml || 0) + 1; // svg 标签内大小写敏感
  16033. config.ignoreTags.style = undefined; // svg 标签内 style 可用
  16034. }
  16035. };
  16036. /**
  16037. * @description 解析到属性名
  16038. * @param {String} name 属性名
  16039. * @private
  16040. */
  16041. Parser.prototype.onAttrName = function (name) {
  16042. name = this.xml ? name : name.toLowerCase();
  16043. if (name.substr(0, 5) === 'data-') {
  16044. if (name === 'data-src' && !this.attrs.src) {
  16045. // data-src 自动转为 src
  16046. this.attrName = 'src';
  16047. } else if (this.tagName === 'img' || this.tagName === 'a') {
  16048. // a 和 img 标签保留 data- 的属性,可以在 imgtap 和 linktap 事件中使用
  16049. this.attrName = name;
  16050. } else {
  16051. // 剩余的移除以减小大小
  16052. this.attrName = undefined;
  16053. }
  16054. } else {
  16055. this.attrName = name;
  16056. this.attrs[name] = 'T'; // boolean 型属性缺省设置
  16057. }
  16058. };
  16059. /**
  16060. * @description 解析到属性值
  16061. * @param {String} val 属性值
  16062. * @private
  16063. */
  16064. Parser.prototype.onAttrVal = function (val) {
  16065. var name = this.attrName || '';
  16066. if (name === 'style' || name === 'href') {
  16067. // 部分属性进行实体解码
  16068. this.attrs[name] = decodeEntity(val, true);
  16069. } else if (name.includes('src')) {
  16070. // 拼接主域名
  16071. this.attrs[name] = this.getUrl(decodeEntity(val, true));
  16072. } else if (name) {
  16073. this.attrs[name] = val;
  16074. }
  16075. };
  16076. /**
  16077. * @description 解析到标签开始
  16078. * @param {Boolean} selfClose 是否有自闭合标识 />
  16079. * @private
  16080. */
  16081. Parser.prototype.onOpenTag = function (selfClose) {
  16082. // 拼装 node
  16083. var node = Object.create(null);
  16084. node.name = this.tagName;
  16085. node.attrs = this.attrs;
  16086. // 避免因为自动 diff 使得 type 被设置为 null 导致部分内容不显示
  16087. if (this.options.nodes.length) {
  16088. node.type = 'node';
  16089. }
  16090. this.attrs = Object.create(null);
  16091. var attrs = node.attrs;
  16092. var parent = this.stack[this.stack.length - 1];
  16093. var siblings = parent ? parent.children : this.nodes;
  16094. var close = this.xml ? selfClose : config.voidTags[node.name];
  16095. // 替换标签名选择器
  16096. if (tagSelector[node.name]) {
  16097. attrs.class = tagSelector[node.name] + (attrs.class ? ' ' + attrs.class : '');
  16098. }
  16099. // 转换 embed 标签
  16100. if (node.name === 'embed') {
  16101. var src = attrs.src || '';
  16102. // 按照后缀名和 type 将 embed 转为 video 或 audio
  16103. if (src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8') || (attrs.type || '').includes('video')) {
  16104. node.name = 'video';
  16105. } else if (src.includes('.mp3') || src.includes('.wav') || src.includes('.aac') || src.includes('.m4a') || (attrs.type || '').includes('audio')) {
  16106. node.name = 'audio';
  16107. }
  16108. if (attrs.autostart) {
  16109. attrs.autoplay = 'T';
  16110. }
  16111. attrs.controls = 'T';
  16112. }
  16113. // 处理音视频
  16114. if (node.name === 'video' || node.name === 'audio') {
  16115. // 设置 id 以便获取 context
  16116. if (node.name === 'video' && !attrs.id) {
  16117. attrs.id = 'v' + idIndex++;
  16118. }
  16119. // 没有设置 controls 也没有设置 autoplay 的自动设置 controls
  16120. if (!attrs.controls && !attrs.autoplay) {
  16121. attrs.controls = 'T';
  16122. }
  16123. // 用数组存储所有可用的 source
  16124. node.src = [];
  16125. if (attrs.src) {
  16126. node.src.push(attrs.src);
  16127. attrs.src = undefined;
  16128. }
  16129. this.expose();
  16130. }
  16131. // 处理自闭合标签
  16132. if (close) {
  16133. if (!this.hook(node) || config.ignoreTags[node.name]) {
  16134. // 通过 base 标签设置主域名
  16135. if (node.name === 'base' && !this.options.domain) {
  16136. this.options.domain = attrs.href;
  16137. } else if (node.name === 'source' && parent && (parent.name === 'video' || parent.name === 'audio') && attrs.src) {
  16138. // 设置 source 标签(仅父节点为 video 或 audio 时有效)
  16139. parent.src.push(attrs.src);
  16140. }
  16141. return;
  16142. }
  16143. // 解析 style
  16144. var styleObj = this.parseStyle(node);
  16145. // 处理图片
  16146. if (node.name === 'img') {
  16147. if (attrs.src) {
  16148. // 标记 webp
  16149. if (attrs.src.includes('webp')) {
  16150. node.webp = 'T';
  16151. }
  16152. // data url 图片如果没有设置 original-src 默认为不可预览的小图片
  16153. if (attrs.src.includes('data:') && !attrs['original-src']) {
  16154. attrs.ignore = 'T';
  16155. }
  16156. if (!attrs.ignore || node.webp || attrs.src.includes('cloud://')) {
  16157. for (var i = this.stack.length; i--;) {
  16158. var item = this.stack[i];
  16159. if (item.name === 'a') {
  16160. node.a = item.attrs;
  16161. }
  16162. if (item.name === 'table' && !node.webp && !attrs.src.includes('cloud://')) {
  16163. if (!styleObj.display || styleObj.display.includes('inline')) {
  16164. node.t = 'inline-block';
  16165. } else {
  16166. node.t = styleObj.display;
  16167. }
  16168. styleObj.display = undefined;
  16169. }
  16170. var style = item.attrs.style || '';
  16171. if (style.includes('flex:') && !style.includes('flex:0') && !style.includes('flex: 0') && (!styleObj.width || parseInt(styleObj.width) > 100)) {
  16172. styleObj.width = '100% !important';
  16173. styleObj.height = '';
  16174. for (var j = i + 1; j < this.stack.length; j++) {
  16175. this.stack[j].attrs.style = (this.stack[j].attrs.style || '').replace('inline-', '');
  16176. }
  16177. } else if (style.includes('flex') && styleObj.width === '100%') {
  16178. for (var _j = i + 1; _j < this.stack.length; _j++) {
  16179. var _style = this.stack[_j].attrs.style || '';
  16180. if (!_style.includes(';width') && !_style.includes(' width') && _style.indexOf('width') !== 0) {
  16181. styleObj.width = '';
  16182. break;
  16183. }
  16184. }
  16185. } else if (style.includes('inline-block')) {
  16186. if (styleObj.width && styleObj.width[styleObj.width.length - 1] === '%') {
  16187. item.attrs.style += ';max-width:' + styleObj.width;
  16188. styleObj.width = '';
  16189. } else {
  16190. item.attrs.style += ';max-width:100%';
  16191. }
  16192. }
  16193. item.c = 1;
  16194. }
  16195. attrs.i = this.imgList.length.toString();
  16196. var _src = attrs['original-src'] || attrs.src;
  16197. if (this.imgList.includes(_src)) {
  16198. // 如果有重复的链接则对域名进行随机大小写变换避免预览时错位
  16199. var _i = _src.indexOf('://');
  16200. if (_i !== -1) {
  16201. _i += 3;
  16202. var newSrc = _src.substr(0, _i);
  16203. for (; _i < _src.length; _i++) {
  16204. if (_src[_i] === '/') break;
  16205. newSrc += Math.random() > 0.5 ? _src[_i].toUpperCase() : _src[_i];
  16206. }
  16207. newSrc += _src.substr(_i);
  16208. _src = newSrc;
  16209. }
  16210. }
  16211. this.imgList.push(_src);
  16212. if (!node.t) {
  16213. this.imgList._unloadimgs += 1;
  16214. }
  16215. }
  16216. }
  16217. if (styleObj.display === 'inline') {
  16218. styleObj.display = '';
  16219. }
  16220. if (attrs.ignore) {
  16221. styleObj['max-width'] = styleObj['max-width'] || '100%';
  16222. attrs.style += ';-webkit-touch-callout:none';
  16223. }
  16224. // 设置的宽度超出屏幕,为避免变形,高度转为自动
  16225. if (parseInt(styleObj.width) > windowWidth) {
  16226. styleObj.height = undefined;
  16227. }
  16228. // 记录是否设置了宽高
  16229. if (!isNaN(parseInt(styleObj.width))) {
  16230. node.w = 'T';
  16231. }
  16232. if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes('%') || parent && (parent.attrs.style || '').includes('height'))) {
  16233. node.h = 'T';
  16234. }
  16235. } else if (node.name === 'svg') {
  16236. siblings.push(node);
  16237. this.stack.push(node);
  16238. this.popNode();
  16239. return;
  16240. }
  16241. for (var key in styleObj) {
  16242. if (styleObj[key]) {
  16243. attrs.style += ";".concat(key, ":").concat(styleObj[key].replace(' !important', ''));
  16244. }
  16245. }
  16246. attrs.style = attrs.style.substr(1) || undefined;
  16247. } else {
  16248. if ((node.name === 'pre' || (attrs.style || '').includes('white-space') && attrs.style.includes('pre')) && this.pre !== 2) {
  16249. this.pre = node.pre = 1;
  16250. }
  16251. node.children = [];
  16252. this.stack.push(node);
  16253. }
  16254. // 加入节点树
  16255. siblings.push(node);
  16256. };
  16257. /**
  16258. * @description 解析到标签结束
  16259. * @param {String} name 标签名
  16260. * @private
  16261. */
  16262. Parser.prototype.onCloseTag = function (name) {
  16263. // 依次出栈到匹配为止
  16264. name = this.xml ? name : name.toLowerCase();
  16265. var i;
  16266. for (i = this.stack.length; i--;) {
  16267. if (this.stack[i].name === name) break;
  16268. }
  16269. if (i !== -1) {
  16270. while (this.stack.length > i) {
  16271. this.popNode();
  16272. }
  16273. } else if (name === 'p' || name === 'br') {
  16274. var siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  16275. siblings.push({
  16276. name: name,
  16277. attrs: {
  16278. class: tagSelector[name] || '',
  16279. style: this.tagStyle[name] || ''
  16280. }
  16281. });
  16282. }
  16283. };
  16284. /**
  16285. * @description 处理标签出栈
  16286. * @private
  16287. */
  16288. Parser.prototype.popNode = function () {
  16289. var node = this.stack.pop();
  16290. var attrs = node.attrs;
  16291. var children = node.children;
  16292. var parent = this.stack[this.stack.length - 1];
  16293. var siblings = parent ? parent.children : this.nodes;
  16294. if (!this.hook(node) || config.ignoreTags[node.name]) {
  16295. // 获取标题
  16296. if (node.name === 'title' && children.length && children[0].type === 'text' && this.options.setTitle) {
  16297. uni.setNavigationBarTitle({
  16298. title: children[0].text
  16299. });
  16300. }
  16301. siblings.pop();
  16302. return;
  16303. }
  16304. if (node.pre && this.pre !== 2) {
  16305. // 是否合并空白符标识
  16306. this.pre = node.pre = undefined;
  16307. for (var i = this.stack.length; i--;) {
  16308. if (this.stack[i].pre) {
  16309. this.pre = 1;
  16310. }
  16311. }
  16312. }
  16313. var styleObj = {};
  16314. // 转换 svg
  16315. if (node.name === 'svg') {
  16316. if (this.xml > 1) {
  16317. // 多层 svg 嵌套
  16318. this.xml--;
  16319. return;
  16320. }
  16321. var src = '';
  16322. var style = attrs.style;
  16323. attrs.style = '';
  16324. attrs.xmlns = 'http://www.w3.org/2000/svg';
  16325. (function traversal(node) {
  16326. if (node.type === 'text') {
  16327. src += node.text;
  16328. return;
  16329. }
  16330. var name = config.svgDict[node.name] || node.name;
  16331. src += '<' + name;
  16332. for (var item in node.attrs) {
  16333. var val = node.attrs[item];
  16334. if (val) {
  16335. src += " ".concat(config.svgDict[item] || item, "=\"").concat(val, "\"");
  16336. }
  16337. }
  16338. if (!node.children) {
  16339. src += '/>';
  16340. } else {
  16341. src += '>';
  16342. for (var _i2 = 0; _i2 < node.children.length; _i2++) {
  16343. traversal(node.children[_i2]);
  16344. }
  16345. src += '</' + name + '>';
  16346. }
  16347. })(node);
  16348. node.name = 'img';
  16349. node.attrs = {
  16350. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  16351. style: style,
  16352. ignore: 'T'
  16353. };
  16354. node.children = undefined;
  16355. this.xml = false;
  16356. config.ignoreTags.style = true;
  16357. return;
  16358. }
  16359. // 转换 align 属性
  16360. if (attrs.align) {
  16361. if (node.name === 'table') {
  16362. if (attrs.align === 'center') {
  16363. styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';
  16364. } else {
  16365. styleObj.float = attrs.align;
  16366. }
  16367. } else {
  16368. styleObj['text-align'] = attrs.align;
  16369. }
  16370. attrs.align = undefined;
  16371. }
  16372. // 转换 dir 属性
  16373. if (attrs.dir) {
  16374. styleObj.direction = attrs.dir;
  16375. attrs.dir = undefined;
  16376. }
  16377. // 转换 font 标签的属性
  16378. if (node.name === 'font') {
  16379. if (attrs.color) {
  16380. styleObj.color = attrs.color;
  16381. attrs.color = undefined;
  16382. }
  16383. if (attrs.face) {
  16384. styleObj['font-family'] = attrs.face;
  16385. attrs.face = undefined;
  16386. }
  16387. if (attrs.size) {
  16388. var size = parseInt(attrs.size);
  16389. if (!isNaN(size)) {
  16390. if (size < 1) {
  16391. size = 1;
  16392. } else if (size > 7) {
  16393. size = 7;
  16394. }
  16395. styleObj['font-size'] = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large'][size - 1];
  16396. }
  16397. attrs.size = undefined;
  16398. }
  16399. }
  16400. // 一些编辑器的自带 class
  16401. if ((attrs.class || '').includes('align-center')) {
  16402. styleObj['text-align'] = 'center';
  16403. }
  16404. Object.assign(styleObj, this.parseStyle(node));
  16405. if (node.name !== 'table' && parseInt(styleObj.width) > windowWidth) {
  16406. styleObj['max-width'] = '100%';
  16407. styleObj['box-sizing'] = 'border-box';
  16408. }
  16409. if (config.blockTags[node.name]) {
  16410. node.name = 'div';
  16411. } else if (!config.trustTags[node.name] && !this.xml) {
  16412. // 未知标签转为 span,避免无法显示
  16413. node.name = 'span';
  16414. }
  16415. if (node.name === 'a' || node.name === 'ad') {
  16416. this.expose();
  16417. } else if (node.name === 'video') {
  16418. if ((styleObj.height || '').includes('auto')) {
  16419. styleObj.height = undefined;
  16420. }
  16421. } else if ((node.name === 'ul' || node.name === 'ol') && node.c) {
  16422. // 列表处理
  16423. var types = {
  16424. a: 'lower-alpha',
  16425. A: 'upper-alpha',
  16426. i: 'lower-roman',
  16427. I: 'upper-roman'
  16428. };
  16429. if (types[attrs.type]) {
  16430. attrs.style += ';list-style-type:' + types[attrs.type];
  16431. attrs.type = undefined;
  16432. }
  16433. for (var _i3 = children.length; _i3--;) {
  16434. if (children[_i3].name === 'li') {
  16435. children[_i3].c = 1;
  16436. }
  16437. }
  16438. } else if (node.name === 'table') {
  16439. // 表格处理
  16440. // cellpadding、cellspacing、border 这几个常用表格属性需要通过转换实现
  16441. var padding = parseFloat(attrs.cellpadding);
  16442. var spacing = parseFloat(attrs.cellspacing);
  16443. var border = parseFloat(attrs.border);
  16444. var bordercolor = styleObj['border-color'];
  16445. var borderstyle = styleObj['border-style'];
  16446. if (node.c) {
  16447. // padding 和 spacing 默认 2
  16448. if (isNaN(padding)) {
  16449. padding = 2;
  16450. }
  16451. if (isNaN(spacing)) {
  16452. spacing = 2;
  16453. }
  16454. }
  16455. if (border) {
  16456. attrs.style += ";border:".concat(border, "px ").concat(borderstyle || 'solid', " ").concat(bordercolor || 'gray');
  16457. }
  16458. if (node.flag && node.c) {
  16459. // 有 colspan 或 rowspan 且含有链接的表格通过 grid 布局实现
  16460. styleObj.display = 'grid';
  16461. if (spacing) {
  16462. styleObj['grid-gap'] = spacing + 'px';
  16463. styleObj.padding = spacing + 'px';
  16464. } else if (border) {
  16465. // 无间隔的情况下避免边框重叠
  16466. attrs.style += ';border-left:0;border-top:0';
  16467. }
  16468. var width = []; // 表格的列宽
  16469. var trList = []; // tr 列表
  16470. var cells = []; // 保存新的单元格
  16471. var map = {}; // 被合并单元格占用的格子
  16472. (function traversal(nodes) {
  16473. for (var _i4 = 0; _i4 < nodes.length; _i4++) {
  16474. if (nodes[_i4].name === 'tr') {
  16475. trList.push(nodes[_i4]);
  16476. } else {
  16477. traversal(nodes[_i4].children || []);
  16478. }
  16479. }
  16480. })(children);
  16481. for (var row = 1; row <= trList.length; row++) {
  16482. var col = 1;
  16483. for (var j = 0; j < trList[row - 1].children.length; j++) {
  16484. var td = trList[row - 1].children[j];
  16485. if (td.name === 'td' || td.name === 'th') {
  16486. // 这个格子被上面的单元格占用,则列号++
  16487. while (map[row + '.' + col]) {
  16488. col++;
  16489. }
  16490. var _style2 = td.attrs.style || '';
  16491. var start = _style2.indexOf('width') ? _style2.indexOf(';width') : 0;
  16492. // 提取出 td 的宽度
  16493. if (start !== -1) {
  16494. var end = _style2.indexOf(';', start + 6);
  16495. if (end === -1) {
  16496. end = _style2.length;
  16497. }
  16498. if (!td.attrs.colspan) {
  16499. width[col] = _style2.substring(start ? start + 7 : 6, end);
  16500. }
  16501. _style2 = _style2.substr(0, start) + _style2.substr(end);
  16502. }
  16503. // 设置竖直对齐
  16504. _style2 += ';display:flex';
  16505. start = _style2.indexOf('vertical-align');
  16506. if (start !== -1) {
  16507. var val = _style2.substr(start + 15, 10);
  16508. if (val.includes('middle')) {
  16509. _style2 += ';align-items:center';
  16510. } else if (val.includes('bottom')) {
  16511. _style2 += ';align-items:flex-end';
  16512. }
  16513. } else {
  16514. _style2 += ';align-items:center';
  16515. }
  16516. // 设置水平对齐
  16517. start = _style2.indexOf('text-align');
  16518. if (start !== -1) {
  16519. var _val = _style2.substr(start + 11, 10);
  16520. if (_val.includes('center')) {
  16521. _style2 += ';justify-content: center';
  16522. } else if (_val.includes('right')) {
  16523. _style2 += ';justify-content: right';
  16524. }
  16525. }
  16526. _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;
  16527. // 处理列合并
  16528. if (td.attrs.colspan) {
  16529. _style2 += ";grid-column-start:".concat(col, ";grid-column-end:").concat(col + parseInt(td.attrs.colspan));
  16530. if (!td.attrs.rowspan) {
  16531. _style2 += ";grid-row-start:".concat(row, ";grid-row-end:").concat(row + 1);
  16532. }
  16533. col += parseInt(td.attrs.colspan) - 1;
  16534. }
  16535. // 处理行合并
  16536. if (td.attrs.rowspan) {
  16537. _style2 += ";grid-row-start:".concat(row, ";grid-row-end:").concat(row + parseInt(td.attrs.rowspan));
  16538. if (!td.attrs.colspan) {
  16539. _style2 += ";grid-column-start:".concat(col, ";grid-column-end:").concat(col + 1);
  16540. }
  16541. // 记录下方单元格被占用
  16542. for (var rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
  16543. for (var colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
  16544. map[row + rowspan + '.' + (col - colspan)] = 1;
  16545. }
  16546. }
  16547. }
  16548. if (_style2) {
  16549. td.attrs.style = _style2;
  16550. }
  16551. cells.push(td);
  16552. col++;
  16553. }
  16554. }
  16555. if (row === 1) {
  16556. var temp = '';
  16557. for (var _i5 = 1; _i5 < col; _i5++) {
  16558. temp += (width[_i5] ? width[_i5] : 'auto') + ' ';
  16559. }
  16560. styleObj['grid-template-columns'] = temp;
  16561. }
  16562. }
  16563. node.children = cells;
  16564. } else {
  16565. // 没有使用合并单元格的表格通过 table 布局实现
  16566. if (node.c) {
  16567. styleObj.display = 'table';
  16568. }
  16569. if (!isNaN(spacing)) {
  16570. styleObj['border-spacing'] = spacing + 'px';
  16571. }
  16572. if (border || padding) {
  16573. // 遍历
  16574. (function traversal(nodes) {
  16575. for (var _i6 = 0; _i6 < nodes.length; _i6++) {
  16576. var _td = nodes[_i6];
  16577. if (_td.name === 'th' || _td.name === 'td') {
  16578. if (border) {
  16579. _td.attrs.style = "border:".concat(border, "px ").concat(borderstyle || 'solid', " ").concat(bordercolor || 'gray', ";").concat(_td.attrs.style || '');
  16580. }
  16581. if (padding) {
  16582. _td.attrs.style = "padding:".concat(padding, "px;").concat(_td.attrs.style || '');
  16583. }
  16584. } else if (_td.children) {
  16585. traversal(_td.children);
  16586. }
  16587. }
  16588. })(children);
  16589. }
  16590. }
  16591. // 给表格添加一个单独的横向滚动层
  16592. if (this.options.scrollTable && !(attrs.style || '').includes('inline')) {
  16593. var table = Object.assign({}, node);
  16594. node.name = 'div';
  16595. node.attrs = {
  16596. style: 'overflow:auto'
  16597. };
  16598. node.children = [table];
  16599. attrs = table.attrs;
  16600. }
  16601. } else if ((node.name === 'td' || node.name === 'th') && (attrs.colspan || attrs.rowspan)) {
  16602. for (var _i7 = this.stack.length; _i7--;) {
  16603. if (this.stack[_i7].name === 'table') {
  16604. this.stack[_i7].flag = 1; // 指示含有合并单元格
  16605. break;
  16606. }
  16607. }
  16608. } else if (node.name === 'ruby') {
  16609. // 转换 ruby
  16610. node.name = 'span';
  16611. for (var _i8 = 0; _i8 < children.length - 1; _i8++) {
  16612. if (children[_i8].type === 'text' && children[_i8 + 1].name === 'rt') {
  16613. children[_i8] = {
  16614. name: 'div',
  16615. attrs: {
  16616. style: 'display:inline-block;text-align:center'
  16617. },
  16618. children: [{
  16619. name: 'div',
  16620. attrs: {
  16621. style: 'font-size:50%;' + (children[_i8 + 1].attrs.style || '')
  16622. },
  16623. children: children[_i8 + 1].children
  16624. }, children[_i8]]
  16625. };
  16626. children.splice(_i8 + 1, 1);
  16627. }
  16628. }
  16629. } else if (node.c) {
  16630. (function traversal(node) {
  16631. node.c = 2;
  16632. for (var _i9 = node.children.length; _i9--;) {
  16633. var child = node.children[_i9];
  16634. if (!child.c || child.name === 'table') {
  16635. node.c = 1;
  16636. }
  16637. }
  16638. })(node);
  16639. }
  16640. if ((styleObj.display || '').includes('flex') && !node.c) {
  16641. for (var _i10 = children.length; _i10--;) {
  16642. var item = children[_i10];
  16643. if (item.f) {
  16644. item.attrs.style = (item.attrs.style || '') + item.f;
  16645. item.f = undefined;
  16646. }
  16647. }
  16648. }
  16649. // flex 布局时部分样式需要提取到 rich-text 外层
  16650. var flex = parent && ((parent.attrs.style || '').includes('flex') || (parent.attrs.style || '').includes('grid'))
  16651. // 检查基础库版本 virtualHost 是否可用
  16652. && !(node.c && wx.getNFCAdapter); // eslint-disable-line
  16653. if (flex) {
  16654. node.f = ';max-width:100%';
  16655. }
  16656. if (children.length >= 50 && node.c && !(styleObj.display || '').includes('flex')) {
  16657. mergeNodes(children);
  16658. }
  16659. for (var key in styleObj) {
  16660. if (styleObj[key]) {
  16661. var _val2 = ";".concat(key, ":").concat(styleObj[key].replace(' !important', ''));
  16662. if (flex && (key.includes('flex') && key !== 'flex-direction' || key === 'align-self' || key.includes('grid') || styleObj[key][0] === '-' || key.includes('width') && _val2.includes('%'))) {
  16663. node.f += _val2;
  16664. if (key === 'width') {
  16665. attrs.style += ';width:100%';
  16666. }
  16667. } else {
  16668. attrs.style += _val2;
  16669. }
  16670. }
  16671. }
  16672. attrs.style = attrs.style.substr(1) || undefined;
  16673. };
  16674. /**
  16675. * @description 解析到文本
  16676. * @param {String} text 文本内容
  16677. */
  16678. Parser.prototype.onText = function (text) {
  16679. if (!this.pre) {
  16680. // 合并空白符
  16681. var trim = '';
  16682. var flag;
  16683. for (var i = 0, len = text.length; i < len; i++) {
  16684. if (!blankChar[text[i]]) {
  16685. trim += text[i];
  16686. } else {
  16687. if (trim[trim.length - 1] !== ' ') {
  16688. trim += ' ';
  16689. }
  16690. if (text[i] === '\n' && !flag) {
  16691. flag = true;
  16692. }
  16693. }
  16694. }
  16695. // 去除含有换行符的空串
  16696. if (trim === ' ') {
  16697. if (flag) return;
  16698. }
  16699. text = trim;
  16700. }
  16701. var node = Object.create(null);
  16702. node.type = 'text';
  16703. node.text = decodeEntity(text);
  16704. if (this.hook(node)) {
  16705. if (this.options.selectable === 'force' && system.includes('iOS') && !uni.canIUse('rich-text.user-select')) {
  16706. this.expose();
  16707. }
  16708. var siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  16709. siblings.push(node);
  16710. }
  16711. };
  16712. /**
  16713. * @description html 词法分析器
  16714. * @param {Object} handler 高层处理器
  16715. */
  16716. function Lexer(handler) {
  16717. this.handler = handler;
  16718. }
  16719. /**
  16720. * @description 执行解析
  16721. * @param {String} content 要解析的文本
  16722. */
  16723. Lexer.prototype.parse = function (content) {
  16724. this.content = content || '';
  16725. this.i = 0; // 标记解析位置
  16726. this.start = 0; // 标记一个单词的开始位置
  16727. this.state = this.text; // 当前状态
  16728. for (var len = this.content.length; this.i !== -1 && this.i < len;) {
  16729. this.state();
  16730. }
  16731. };
  16732. /**
  16733. * @description 检查标签是否闭合
  16734. * @param {String} method 如果闭合要进行的操作
  16735. * @returns {Boolean} 是否闭合
  16736. * @private
  16737. */
  16738. Lexer.prototype.checkClose = function (method) {
  16739. var selfClose = this.content[this.i] === '/';
  16740. if (this.content[this.i] === '>' || selfClose && this.content[this.i + 1] === '>') {
  16741. if (method) {
  16742. this.handler[method](this.content.substring(this.start, this.i));
  16743. }
  16744. this.i += selfClose ? 2 : 1;
  16745. this.start = this.i;
  16746. this.handler.onOpenTag(selfClose);
  16747. if (this.handler.tagName === 'script') {
  16748. this.i = this.content.indexOf('</', this.i);
  16749. if (this.i !== -1) {
  16750. this.i += 2;
  16751. this.start = this.i;
  16752. }
  16753. this.state = this.endTag;
  16754. } else {
  16755. this.state = this.text;
  16756. }
  16757. return true;
  16758. }
  16759. return false;
  16760. };
  16761. /**
  16762. * @description 文本状态
  16763. * @private
  16764. */
  16765. Lexer.prototype.text = function () {
  16766. this.i = this.content.indexOf('<', this.i); // 查找最近的标签
  16767. if (this.i === -1) {
  16768. // 没有标签了
  16769. if (this.start < this.content.length) {
  16770. this.handler.onText(this.content.substring(this.start, this.content.length));
  16771. }
  16772. return;
  16773. }
  16774. var c = this.content[this.i + 1];
  16775. if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') {
  16776. // 标签开头
  16777. if (this.start !== this.i) {
  16778. this.handler.onText(this.content.substring(this.start, this.i));
  16779. }
  16780. this.start = ++this.i;
  16781. this.state = this.tagName;
  16782. } else if (c === '/' || c === '!' || c === '?') {
  16783. if (this.start !== this.i) {
  16784. this.handler.onText(this.content.substring(this.start, this.i));
  16785. }
  16786. var next = this.content[this.i + 2];
  16787. if (c === '/' && (next >= 'a' && next <= 'z' || next >= 'A' && next <= 'Z')) {
  16788. // 标签结尾
  16789. this.i += 2;
  16790. this.start = this.i;
  16791. this.state = this.endTag;
  16792. return;
  16793. }
  16794. // 处理注释
  16795. var end = '-->';
  16796. if (c !== '!' || this.content[this.i + 2] !== '-' || this.content[this.i + 3] !== '-') {
  16797. end = '>';
  16798. }
  16799. this.i = this.content.indexOf(end, this.i);
  16800. if (this.i !== -1) {
  16801. this.i += end.length;
  16802. this.start = this.i;
  16803. }
  16804. } else {
  16805. this.i++;
  16806. }
  16807. };
  16808. /**
  16809. * @description 标签名状态
  16810. * @private
  16811. */
  16812. Lexer.prototype.tagName = function () {
  16813. if (blankChar[this.content[this.i]]) {
  16814. // 解析到标签名
  16815. this.handler.onTagName(this.content.substring(this.start, this.i));
  16816. while (blankChar[this.content[++this.i]]) {
  16817. ;
  16818. }
  16819. if (this.i < this.content.length && !this.checkClose()) {
  16820. this.start = this.i;
  16821. this.state = this.attrName;
  16822. }
  16823. } else if (!this.checkClose('onTagName')) {
  16824. this.i++;
  16825. }
  16826. };
  16827. /**
  16828. * @description 属性名状态
  16829. * @private
  16830. */
  16831. Lexer.prototype.attrName = function () {
  16832. var c = this.content[this.i];
  16833. if (blankChar[c] || c === '=') {
  16834. // 解析到属性名
  16835. this.handler.onAttrName(this.content.substring(this.start, this.i));
  16836. var needVal = c === '=';
  16837. var len = this.content.length;
  16838. while (++this.i < len) {
  16839. c = this.content[this.i];
  16840. if (!blankChar[c]) {
  16841. if (this.checkClose()) return;
  16842. if (needVal) {
  16843. // 等号后遇到第一个非空字符
  16844. this.start = this.i;
  16845. this.state = this.attrVal;
  16846. return;
  16847. }
  16848. if (this.content[this.i] === '=') {
  16849. needVal = true;
  16850. } else {
  16851. this.start = this.i;
  16852. this.state = this.attrName;
  16853. return;
  16854. }
  16855. }
  16856. }
  16857. } else if (!this.checkClose('onAttrName')) {
  16858. this.i++;
  16859. }
  16860. };
  16861. /**
  16862. * @description 属性值状态
  16863. * @private
  16864. */
  16865. Lexer.prototype.attrVal = function () {
  16866. var c = this.content[this.i];
  16867. var len = this.content.length;
  16868. if (c === '"' || c === "'") {
  16869. // 有冒号的属性
  16870. this.start = ++this.i;
  16871. this.i = this.content.indexOf(c, this.i);
  16872. if (this.i === -1) return;
  16873. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  16874. } else {
  16875. // 没有冒号的属性
  16876. for (; this.i < len; this.i++) {
  16877. if (blankChar[this.content[this.i]]) {
  16878. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  16879. break;
  16880. } else if (this.checkClose('onAttrVal')) return;
  16881. }
  16882. }
  16883. while (blankChar[this.content[++this.i]]) {
  16884. ;
  16885. }
  16886. if (this.i < len && !this.checkClose()) {
  16887. this.start = this.i;
  16888. this.state = this.attrName;
  16889. }
  16890. };
  16891. /**
  16892. * @description 结束标签状态
  16893. * @returns {String} 结束的标签名
  16894. * @private
  16895. */
  16896. Lexer.prototype.endTag = function () {
  16897. var c = this.content[this.i];
  16898. if (blankChar[c] || c === '>' || c === '/') {
  16899. this.handler.onCloseTag(this.content.substring(this.start, this.i));
  16900. if (c !== '>') {
  16901. this.i = this.content.indexOf('>', this.i);
  16902. if (this.i === -1) return;
  16903. }
  16904. this.start = ++this.i;
  16905. this.state = this.text;
  16906. } else {
  16907. this.i++;
  16908. }
  16909. };
  16910. var _default = Parser;
  16911. exports.default = _default;
  16912. /* 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"]))
  16913. /***/ }),
  16914. /***/ 47:
  16915. /*!*****************************************************************!*\
  16916. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/test.js ***!
  16917. \*****************************************************************/
  16918. /*! no static exports found */
  16919. /***/ (function(module, exports, __webpack_require__) {
  16920. "use strict";
  16921. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16922. Object.defineProperty(exports, "__esModule", {
  16923. value: true
  16924. });
  16925. exports.default = void 0;
  16926. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  16927. /**
  16928. * 验证电子邮箱格式
  16929. */
  16930. function email(value) {
  16931. return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
  16932. }
  16933. /**
  16934. * 验证手机格式
  16935. */
  16936. function mobile(value) {
  16937. return /^1[3-9]\d{9}$/.test(value);
  16938. }
  16939. /**
  16940. * 验证URL格式
  16941. */
  16942. function url(value) {
  16943. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  16944. }
  16945. /**
  16946. * 验证日期格式
  16947. */
  16948. function date(value) {
  16949. return !/Invalid|NaN/.test(new Date(value).toString());
  16950. }
  16951. /**
  16952. * 验证ISO类型的日期格式
  16953. */
  16954. function dateISO(value) {
  16955. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  16956. }
  16957. /**
  16958. * 验证十进制数字
  16959. */
  16960. function number(value) {
  16961. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  16962. }
  16963. /**
  16964. * 验证整数
  16965. */
  16966. function digits(value) {
  16967. return /^\d+$/.test(value);
  16968. }
  16969. /**
  16970. * 验证身份证号码
  16971. */
  16972. function idCard(value) {
  16973. 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);
  16974. }
  16975. /**
  16976. * 是否车牌号
  16977. */
  16978. function carNo(value) {
  16979. // 新能源车牌
  16980. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  16981. // 旧车牌
  16982. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  16983. if (value.length === 7) {
  16984. return creg.test(value);
  16985. } else if (value.length === 8) {
  16986. return xreg.test(value);
  16987. } else {
  16988. return false;
  16989. }
  16990. }
  16991. /**
  16992. * 金额,只允许2位小数
  16993. */
  16994. function amount(value) {
  16995. //金额,只允许保留两位小数
  16996. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  16997. }
  16998. /**
  16999. * 中文
  17000. */
  17001. function chinese(value) {
  17002. var reg = /^[\u4e00-\u9fa5]+$/gi;
  17003. return reg.test(value);
  17004. }
  17005. /**
  17006. * 只能输入字母
  17007. */
  17008. function letter(value) {
  17009. return /^[a-zA-Z]*$/.test(value);
  17010. }
  17011. /**
  17012. * 只能是字母或者数字
  17013. */
  17014. function enOrNum(value) {
  17015. //英文或者数字
  17016. var reg = /^[0-9a-zA-Z]*$/g;
  17017. return reg.test(value);
  17018. }
  17019. /**
  17020. * 验证是否包含某个值
  17021. */
  17022. function contains(value, param) {
  17023. return value.indexOf(param) >= 0;
  17024. }
  17025. /**
  17026. * 验证一个值范围[min, max]
  17027. */
  17028. function range(value, param) {
  17029. return value >= param[0] && value <= param[1];
  17030. }
  17031. /**
  17032. * 验证一个长度范围[min, max]
  17033. */
  17034. function rangeLength(value, param) {
  17035. return value.length >= param[0] && value.length <= param[1];
  17036. }
  17037. /**
  17038. * 是否固定电话
  17039. */
  17040. function landline(value) {
  17041. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  17042. return reg.test(value);
  17043. }
  17044. /**
  17045. * 判断是否为空
  17046. */
  17047. function empty(value) {
  17048. switch ((0, _typeof2.default)(value)) {
  17049. case 'undefined':
  17050. return true;
  17051. case 'string':
  17052. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  17053. break;
  17054. case 'boolean':
  17055. if (!value) return true;
  17056. break;
  17057. case 'number':
  17058. if (0 === value || isNaN(value)) return true;
  17059. break;
  17060. case 'object':
  17061. if (null === value || value.length === 0) return true;
  17062. for (var i in value) {
  17063. return false;
  17064. }
  17065. return true;
  17066. }
  17067. return false;
  17068. }
  17069. /**
  17070. * 是否json字符串
  17071. */
  17072. function jsonString(value) {
  17073. if (typeof value == 'string') {
  17074. try {
  17075. var obj = JSON.parse(value);
  17076. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  17077. return true;
  17078. } else {
  17079. return false;
  17080. }
  17081. } catch (e) {
  17082. return false;
  17083. }
  17084. }
  17085. return false;
  17086. }
  17087. /**
  17088. * 是否数组
  17089. */
  17090. function array(value) {
  17091. if (typeof Array.isArray === "function") {
  17092. return Array.isArray(value);
  17093. } else {
  17094. return Object.prototype.toString.call(value) === "[object Array]";
  17095. }
  17096. }
  17097. /**
  17098. * 是否对象
  17099. */
  17100. function object(value) {
  17101. return Object.prototype.toString.call(value) === '[object Object]';
  17102. }
  17103. /**
  17104. * 是否短信验证码
  17105. */
  17106. function code(value) {
  17107. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  17108. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  17109. }
  17110. var _default = {
  17111. email: email,
  17112. mobile: mobile,
  17113. url: url,
  17114. date: date,
  17115. dateISO: dateISO,
  17116. number: number,
  17117. digits: digits,
  17118. idCard: idCard,
  17119. carNo: carNo,
  17120. amount: amount,
  17121. chinese: chinese,
  17122. letter: letter,
  17123. enOrNum: enOrNum,
  17124. contains: contains,
  17125. range: range,
  17126. rangeLength: rangeLength,
  17127. empty: empty,
  17128. isEmpty: empty,
  17129. jsonString: jsonString,
  17130. landline: landline,
  17131. object: object,
  17132. array: array,
  17133. code: code
  17134. };
  17135. exports.default = _default;
  17136. /***/ }),
  17137. /***/ 48:
  17138. /*!************************************************************************!*\
  17139. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/queryParams.js ***!
  17140. \************************************************************************/
  17141. /*! no static exports found */
  17142. /***/ (function(module, exports, __webpack_require__) {
  17143. "use strict";
  17144. Object.defineProperty(exports, "__esModule", {
  17145. value: true
  17146. });
  17147. exports.default = void 0;
  17148. /**
  17149. * 对象转url参数
  17150. * @param {*} data,对象
  17151. * @param {*} isPrefix,是否自动加上"?"
  17152. */
  17153. function queryParams() {
  17154. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17155. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  17156. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  17157. var prefix = isPrefix ? '?' : '';
  17158. var _result = [];
  17159. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  17160. var _loop = function _loop(key) {
  17161. var value = data[key];
  17162. // 去掉为空的参数
  17163. if (['', undefined, null].indexOf(value) >= 0) {
  17164. return "continue";
  17165. }
  17166. // 如果值为数组,另行处理
  17167. if (value.constructor === Array) {
  17168. // e.g. {ids: [1, 2, 3]}
  17169. switch (arrayFormat) {
  17170. case 'indices':
  17171. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  17172. for (var i = 0; i < value.length; i++) {
  17173. _result.push(key + '[' + i + ']=' + value[i]);
  17174. }
  17175. break;
  17176. case 'brackets':
  17177. // 结果: ids[]=1&ids[]=2&ids[]=3
  17178. value.forEach(function (_value) {
  17179. _result.push(key + '[]=' + _value);
  17180. });
  17181. break;
  17182. case 'repeat':
  17183. // 结果: ids=1&ids=2&ids=3
  17184. value.forEach(function (_value) {
  17185. _result.push(key + '=' + _value);
  17186. });
  17187. break;
  17188. case 'comma':
  17189. // 结果: ids=1,2,3
  17190. var commaStr = "";
  17191. value.forEach(function (_value) {
  17192. commaStr += (commaStr ? "," : "") + _value;
  17193. });
  17194. _result.push(key + '=' + commaStr);
  17195. break;
  17196. default:
  17197. value.forEach(function (_value) {
  17198. _result.push(key + '[]=' + _value);
  17199. });
  17200. }
  17201. } else {
  17202. _result.push(key + '=' + value);
  17203. }
  17204. };
  17205. for (var key in data) {
  17206. var _ret = _loop(key);
  17207. if (_ret === "continue") continue;
  17208. }
  17209. return _result.length ? prefix + _result.join('&') : '';
  17210. }
  17211. var _default = queryParams;
  17212. exports.default = _default;
  17213. /***/ }),
  17214. /***/ 485:
  17215. /*!*****************************************************************!*\
  17216. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/province.js ***!
  17217. \*****************************************************************/
  17218. /*! no static exports found */
  17219. /***/ (function(module, exports, __webpack_require__) {
  17220. "use strict";
  17221. Object.defineProperty(exports, "__esModule", {
  17222. value: true
  17223. });
  17224. exports.default = void 0;
  17225. var provinceData = [{
  17226. "label": "北京市",
  17227. "value": "11"
  17228. }, {
  17229. "label": "天津市",
  17230. "value": "12"
  17231. }, {
  17232. "label": "河北省",
  17233. "value": "13"
  17234. }, {
  17235. "label": "山西省",
  17236. "value": "14"
  17237. }, {
  17238. "label": "内蒙古自治区",
  17239. "value": "15"
  17240. }, {
  17241. "label": "辽宁省",
  17242. "value": "21"
  17243. }, {
  17244. "label": "吉林省",
  17245. "value": "22"
  17246. }, {
  17247. "label": "黑龙江省",
  17248. "value": "23"
  17249. }, {
  17250. "label": "上海市",
  17251. "value": "31"
  17252. }, {
  17253. "label": "江苏省",
  17254. "value": "32"
  17255. }, {
  17256. "label": "浙江省",
  17257. "value": "33"
  17258. }, {
  17259. "label": "安徽省",
  17260. "value": "34"
  17261. }, {
  17262. "label": "福建省",
  17263. "value": "35"
  17264. }, {
  17265. "label": "江西省",
  17266. "value": "36"
  17267. }, {
  17268. "label": "山东省",
  17269. "value": "37"
  17270. }, {
  17271. "label": "河南省",
  17272. "value": "41"
  17273. }, {
  17274. "label": "湖北省",
  17275. "value": "42"
  17276. }, {
  17277. "label": "湖南省",
  17278. "value": "43"
  17279. }, {
  17280. "label": "广东省",
  17281. "value": "44"
  17282. }, {
  17283. "label": "广西壮族自治区",
  17284. "value": "45"
  17285. }, {
  17286. "label": "海南省",
  17287. "value": "46"
  17288. }, {
  17289. "label": "重庆市",
  17290. "value": "50"
  17291. }, {
  17292. "label": "四川省",
  17293. "value": "51"
  17294. }, {
  17295. "label": "贵州省",
  17296. "value": "52"
  17297. }, {
  17298. "label": "云南省",
  17299. "value": "53"
  17300. }, {
  17301. "label": "西藏自治区",
  17302. "value": "54"
  17303. }, {
  17304. "label": "陕西省",
  17305. "value": "61"
  17306. }, {
  17307. "label": "甘肃省",
  17308. "value": "62"
  17309. }, {
  17310. "label": "青海省",
  17311. "value": "63"
  17312. }, {
  17313. "label": "宁夏回族自治区",
  17314. "value": "64"
  17315. }, {
  17316. "label": "新疆维吾尔自治区",
  17317. "value": "65"
  17318. }, {
  17319. "label": "台湾",
  17320. "value": "66"
  17321. }, {
  17322. "label": "香港",
  17323. "value": "67"
  17324. }, {
  17325. "label": "澳门",
  17326. "value": "68"
  17327. }];
  17328. var _default = provinceData;
  17329. exports.default = _default;
  17330. /***/ }),
  17331. /***/ 486:
  17332. /*!*************************************************************!*\
  17333. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/city.js ***!
  17334. \*************************************************************/
  17335. /*! no static exports found */
  17336. /***/ (function(module, exports, __webpack_require__) {
  17337. "use strict";
  17338. Object.defineProperty(exports, "__esModule", {
  17339. value: true
  17340. });
  17341. exports.default = void 0;
  17342. var cityData = [[{
  17343. "label": "市辖区",
  17344. "value": "1101"
  17345. }], [{
  17346. "label": "市辖区",
  17347. "value": "1201"
  17348. }], [{
  17349. "label": "石家庄市",
  17350. "value": "1301"
  17351. }, {
  17352. "label": "唐山市",
  17353. "value": "1302"
  17354. }, {
  17355. "label": "秦皇岛市",
  17356. "value": "1303"
  17357. }, {
  17358. "label": "邯郸市",
  17359. "value": "1304"
  17360. }, {
  17361. "label": "邢台市",
  17362. "value": "1305"
  17363. }, {
  17364. "label": "保定市",
  17365. "value": "1306"
  17366. }, {
  17367. "label": "张家口市",
  17368. "value": "1307"
  17369. }, {
  17370. "label": "承德市",
  17371. "value": "1308"
  17372. }, {
  17373. "label": "沧州市",
  17374. "value": "1309"
  17375. }, {
  17376. "label": "廊坊市",
  17377. "value": "1310"
  17378. }, {
  17379. "label": "衡水市",
  17380. "value": "1311"
  17381. }], [{
  17382. "label": "太原市",
  17383. "value": "1401"
  17384. }, {
  17385. "label": "大同市",
  17386. "value": "1402"
  17387. }, {
  17388. "label": "阳泉市",
  17389. "value": "1403"
  17390. }, {
  17391. "label": "长治市",
  17392. "value": "1404"
  17393. }, {
  17394. "label": "晋城市",
  17395. "value": "1405"
  17396. }, {
  17397. "label": "朔州市",
  17398. "value": "1406"
  17399. }, {
  17400. "label": "晋中市",
  17401. "value": "1407"
  17402. }, {
  17403. "label": "运城市",
  17404. "value": "1408"
  17405. }, {
  17406. "label": "忻州市",
  17407. "value": "1409"
  17408. }, {
  17409. "label": "临汾市",
  17410. "value": "1410"
  17411. }, {
  17412. "label": "吕梁市",
  17413. "value": "1411"
  17414. }], [{
  17415. "label": "呼和浩特市",
  17416. "value": "1501"
  17417. }, {
  17418. "label": "包头市",
  17419. "value": "1502"
  17420. }, {
  17421. "label": "乌海市",
  17422. "value": "1503"
  17423. }, {
  17424. "label": "赤峰市",
  17425. "value": "1504"
  17426. }, {
  17427. "label": "通辽市",
  17428. "value": "1505"
  17429. }, {
  17430. "label": "鄂尔多斯市",
  17431. "value": "1506"
  17432. }, {
  17433. "label": "呼伦贝尔市",
  17434. "value": "1507"
  17435. }, {
  17436. "label": "巴彦淖尔市",
  17437. "value": "1508"
  17438. }, {
  17439. "label": "乌兰察布市",
  17440. "value": "1509"
  17441. }, {
  17442. "label": "兴安盟",
  17443. "value": "1522"
  17444. }, {
  17445. "label": "锡林郭勒盟",
  17446. "value": "1525"
  17447. }, {
  17448. "label": "阿拉善盟",
  17449. "value": "1529"
  17450. }], [{
  17451. "label": "沈阳市",
  17452. "value": "2101"
  17453. }, {
  17454. "label": "大连市",
  17455. "value": "2102"
  17456. }, {
  17457. "label": "鞍山市",
  17458. "value": "2103"
  17459. }, {
  17460. "label": "抚顺市",
  17461. "value": "2104"
  17462. }, {
  17463. "label": "本溪市",
  17464. "value": "2105"
  17465. }, {
  17466. "label": "丹东市",
  17467. "value": "2106"
  17468. }, {
  17469. "label": "锦州市",
  17470. "value": "2107"
  17471. }, {
  17472. "label": "营口市",
  17473. "value": "2108"
  17474. }, {
  17475. "label": "阜新市",
  17476. "value": "2109"
  17477. }, {
  17478. "label": "辽阳市",
  17479. "value": "2110"
  17480. }, {
  17481. "label": "盘锦市",
  17482. "value": "2111"
  17483. }, {
  17484. "label": "铁岭市",
  17485. "value": "2112"
  17486. }, {
  17487. "label": "朝阳市",
  17488. "value": "2113"
  17489. }, {
  17490. "label": "葫芦岛市",
  17491. "value": "2114"
  17492. }], [{
  17493. "label": "长春市",
  17494. "value": "2201"
  17495. }, {
  17496. "label": "吉林市",
  17497. "value": "2202"
  17498. }, {
  17499. "label": "四平市",
  17500. "value": "2203"
  17501. }, {
  17502. "label": "辽源市",
  17503. "value": "2204"
  17504. }, {
  17505. "label": "通化市",
  17506. "value": "2205"
  17507. }, {
  17508. "label": "白山市",
  17509. "value": "2206"
  17510. }, {
  17511. "label": "松原市",
  17512. "value": "2207"
  17513. }, {
  17514. "label": "白城市",
  17515. "value": "2208"
  17516. }, {
  17517. "label": "延边朝鲜族自治州",
  17518. "value": "2224"
  17519. }], [{
  17520. "label": "哈尔滨市",
  17521. "value": "2301"
  17522. }, {
  17523. "label": "齐齐哈尔市",
  17524. "value": "2302"
  17525. }, {
  17526. "label": "鸡西市",
  17527. "value": "2303"
  17528. }, {
  17529. "label": "鹤岗市",
  17530. "value": "2304"
  17531. }, {
  17532. "label": "双鸭山市",
  17533. "value": "2305"
  17534. }, {
  17535. "label": "大庆市",
  17536. "value": "2306"
  17537. }, {
  17538. "label": "伊春市",
  17539. "value": "2307"
  17540. }, {
  17541. "label": "佳木斯市",
  17542. "value": "2308"
  17543. }, {
  17544. "label": "七台河市",
  17545. "value": "2309"
  17546. }, {
  17547. "label": "牡丹江市",
  17548. "value": "2310"
  17549. }, {
  17550. "label": "黑河市",
  17551. "value": "2311"
  17552. }, {
  17553. "label": "绥化市",
  17554. "value": "2312"
  17555. }, {
  17556. "label": "大兴安岭地区",
  17557. "value": "2327"
  17558. }], [{
  17559. "label": "市辖区",
  17560. "value": "3101"
  17561. }], [{
  17562. "label": "南京市",
  17563. "value": "3201"
  17564. }, {
  17565. "label": "无锡市",
  17566. "value": "3202"
  17567. }, {
  17568. "label": "徐州市",
  17569. "value": "3203"
  17570. }, {
  17571. "label": "常州市",
  17572. "value": "3204"
  17573. }, {
  17574. "label": "苏州市",
  17575. "value": "3205"
  17576. }, {
  17577. "label": "南通市",
  17578. "value": "3206"
  17579. }, {
  17580. "label": "连云港市",
  17581. "value": "3207"
  17582. }, {
  17583. "label": "淮安市",
  17584. "value": "3208"
  17585. }, {
  17586. "label": "盐城市",
  17587. "value": "3209"
  17588. }, {
  17589. "label": "扬州市",
  17590. "value": "3210"
  17591. }, {
  17592. "label": "镇江市",
  17593. "value": "3211"
  17594. }, {
  17595. "label": "泰州市",
  17596. "value": "3212"
  17597. }, {
  17598. "label": "宿迁市",
  17599. "value": "3213"
  17600. }], [{
  17601. "label": "杭州市",
  17602. "value": "3301"
  17603. }, {
  17604. "label": "宁波市",
  17605. "value": "3302"
  17606. }, {
  17607. "label": "温州市",
  17608. "value": "3303"
  17609. }, {
  17610. "label": "嘉兴市",
  17611. "value": "3304"
  17612. }, {
  17613. "label": "湖州市",
  17614. "value": "3305"
  17615. }, {
  17616. "label": "绍兴市",
  17617. "value": "3306"
  17618. }, {
  17619. "label": "金华市",
  17620. "value": "3307"
  17621. }, {
  17622. "label": "衢州市",
  17623. "value": "3308"
  17624. }, {
  17625. "label": "舟山市",
  17626. "value": "3309"
  17627. }, {
  17628. "label": "台州市",
  17629. "value": "3310"
  17630. }, {
  17631. "label": "丽水市",
  17632. "value": "3311"
  17633. }], [{
  17634. "label": "合肥市",
  17635. "value": "3401"
  17636. }, {
  17637. "label": "芜湖市",
  17638. "value": "3402"
  17639. }, {
  17640. "label": "蚌埠市",
  17641. "value": "3403"
  17642. }, {
  17643. "label": "淮南市",
  17644. "value": "3404"
  17645. }, {
  17646. "label": "马鞍山市",
  17647. "value": "3405"
  17648. }, {
  17649. "label": "淮北市",
  17650. "value": "3406"
  17651. }, {
  17652. "label": "铜陵市",
  17653. "value": "3407"
  17654. }, {
  17655. "label": "安庆市",
  17656. "value": "3408"
  17657. }, {
  17658. "label": "黄山市",
  17659. "value": "3410"
  17660. }, {
  17661. "label": "滁州市",
  17662. "value": "3411"
  17663. }, {
  17664. "label": "阜阳市",
  17665. "value": "3412"
  17666. }, {
  17667. "label": "宿州市",
  17668. "value": "3413"
  17669. }, {
  17670. "label": "六安市",
  17671. "value": "3415"
  17672. }, {
  17673. "label": "亳州市",
  17674. "value": "3416"
  17675. }, {
  17676. "label": "池州市",
  17677. "value": "3417"
  17678. }, {
  17679. "label": "宣城市",
  17680. "value": "3418"
  17681. }], [{
  17682. "label": "福州市",
  17683. "value": "3501"
  17684. }, {
  17685. "label": "厦门市",
  17686. "value": "3502"
  17687. }, {
  17688. "label": "莆田市",
  17689. "value": "3503"
  17690. }, {
  17691. "label": "三明市",
  17692. "value": "3504"
  17693. }, {
  17694. "label": "泉州市",
  17695. "value": "3505"
  17696. }, {
  17697. "label": "漳州市",
  17698. "value": "3506"
  17699. }, {
  17700. "label": "南平市",
  17701. "value": "3507"
  17702. }, {
  17703. "label": "龙岩市",
  17704. "value": "3508"
  17705. }, {
  17706. "label": "宁德市",
  17707. "value": "3509"
  17708. }], [{
  17709. "label": "南昌市",
  17710. "value": "3601"
  17711. }, {
  17712. "label": "景德镇市",
  17713. "value": "3602"
  17714. }, {
  17715. "label": "萍乡市",
  17716. "value": "3603"
  17717. }, {
  17718. "label": "九江市",
  17719. "value": "3604"
  17720. }, {
  17721. "label": "新余市",
  17722. "value": "3605"
  17723. }, {
  17724. "label": "鹰潭市",
  17725. "value": "3606"
  17726. }, {
  17727. "label": "赣州市",
  17728. "value": "3607"
  17729. }, {
  17730. "label": "吉安市",
  17731. "value": "3608"
  17732. }, {
  17733. "label": "宜春市",
  17734. "value": "3609"
  17735. }, {
  17736. "label": "抚州市",
  17737. "value": "3610"
  17738. }, {
  17739. "label": "上饶市",
  17740. "value": "3611"
  17741. }], [{
  17742. "label": "济南市",
  17743. "value": "3701"
  17744. }, {
  17745. "label": "青岛市",
  17746. "value": "3702"
  17747. }, {
  17748. "label": "淄博市",
  17749. "value": "3703"
  17750. }, {
  17751. "label": "枣庄市",
  17752. "value": "3704"
  17753. }, {
  17754. "label": "东营市",
  17755. "value": "3705"
  17756. }, {
  17757. "label": "烟台市",
  17758. "value": "3706"
  17759. }, {
  17760. "label": "潍坊市",
  17761. "value": "3707"
  17762. }, {
  17763. "label": "济宁市",
  17764. "value": "3708"
  17765. }, {
  17766. "label": "泰安市",
  17767. "value": "3709"
  17768. }, {
  17769. "label": "威海市",
  17770. "value": "3710"
  17771. }, {
  17772. "label": "日照市",
  17773. "value": "3711"
  17774. }, {
  17775. "label": "莱芜市",
  17776. "value": "3712"
  17777. }, {
  17778. "label": "临沂市",
  17779. "value": "3713"
  17780. }, {
  17781. "label": "德州市",
  17782. "value": "3714"
  17783. }, {
  17784. "label": "聊城市",
  17785. "value": "3715"
  17786. }, {
  17787. "label": "滨州市",
  17788. "value": "3716"
  17789. }, {
  17790. "label": "菏泽市",
  17791. "value": "3717"
  17792. }], [{
  17793. "label": "郑州市",
  17794. "value": "4101"
  17795. }, {
  17796. "label": "开封市",
  17797. "value": "4102"
  17798. }, {
  17799. "label": "洛阳市",
  17800. "value": "4103"
  17801. }, {
  17802. "label": "平顶山市",
  17803. "value": "4104"
  17804. }, {
  17805. "label": "安阳市",
  17806. "value": "4105"
  17807. }, {
  17808. "label": "鹤壁市",
  17809. "value": "4106"
  17810. }, {
  17811. "label": "新乡市",
  17812. "value": "4107"
  17813. }, {
  17814. "label": "焦作市",
  17815. "value": "4108"
  17816. }, {
  17817. "label": "濮阳市",
  17818. "value": "4109"
  17819. }, {
  17820. "label": "许昌市",
  17821. "value": "4110"
  17822. }, {
  17823. "label": "漯河市",
  17824. "value": "4111"
  17825. }, {
  17826. "label": "三门峡市",
  17827. "value": "4112"
  17828. }, {
  17829. "label": "南阳市",
  17830. "value": "4113"
  17831. }, {
  17832. "label": "商丘市",
  17833. "value": "4114"
  17834. }, {
  17835. "label": "信阳市",
  17836. "value": "4115"
  17837. }, {
  17838. "label": "周口市",
  17839. "value": "4116"
  17840. }, {
  17841. "label": "驻马店市",
  17842. "value": "4117"
  17843. }, {
  17844. "label": "省直辖县级行政区划",
  17845. "value": "4190"
  17846. }], [{
  17847. "label": "武汉市",
  17848. "value": "4201"
  17849. }, {
  17850. "label": "黄石市",
  17851. "value": "4202"
  17852. }, {
  17853. "label": "十堰市",
  17854. "value": "4203"
  17855. }, {
  17856. "label": "宜昌市",
  17857. "value": "4205"
  17858. }, {
  17859. "label": "襄阳市",
  17860. "value": "4206"
  17861. }, {
  17862. "label": "鄂州市",
  17863. "value": "4207"
  17864. }, {
  17865. "label": "荆门市",
  17866. "value": "4208"
  17867. }, {
  17868. "label": "孝感市",
  17869. "value": "4209"
  17870. }, {
  17871. "label": "荆州市",
  17872. "value": "4210"
  17873. }, {
  17874. "label": "黄冈市",
  17875. "value": "4211"
  17876. }, {
  17877. "label": "咸宁市",
  17878. "value": "4212"
  17879. }, {
  17880. "label": "随州市",
  17881. "value": "4213"
  17882. }, {
  17883. "label": "恩施土家族苗族自治州",
  17884. "value": "4228"
  17885. }, {
  17886. "label": "省直辖县级行政区划",
  17887. "value": "4290"
  17888. }], [{
  17889. "label": "长沙市",
  17890. "value": "4301"
  17891. }, {
  17892. "label": "株洲市",
  17893. "value": "4302"
  17894. }, {
  17895. "label": "湘潭市",
  17896. "value": "4303"
  17897. }, {
  17898. "label": "衡阳市",
  17899. "value": "4304"
  17900. }, {
  17901. "label": "邵阳市",
  17902. "value": "4305"
  17903. }, {
  17904. "label": "岳阳市",
  17905. "value": "4306"
  17906. }, {
  17907. "label": "常德市",
  17908. "value": "4307"
  17909. }, {
  17910. "label": "张家界市",
  17911. "value": "4308"
  17912. }, {
  17913. "label": "益阳市",
  17914. "value": "4309"
  17915. }, {
  17916. "label": "郴州市",
  17917. "value": "4310"
  17918. }, {
  17919. "label": "永州市",
  17920. "value": "4311"
  17921. }, {
  17922. "label": "怀化市",
  17923. "value": "4312"
  17924. }, {
  17925. "label": "娄底市",
  17926. "value": "4313"
  17927. }, {
  17928. "label": "湘西土家族苗族自治州",
  17929. "value": "4331"
  17930. }], [{
  17931. "label": "广州市",
  17932. "value": "4401"
  17933. }, {
  17934. "label": "韶关市",
  17935. "value": "4402"
  17936. }, {
  17937. "label": "深圳市",
  17938. "value": "4403"
  17939. }, {
  17940. "label": "珠海市",
  17941. "value": "4404"
  17942. }, {
  17943. "label": "汕头市",
  17944. "value": "4405"
  17945. }, {
  17946. "label": "佛山市",
  17947. "value": "4406"
  17948. }, {
  17949. "label": "江门市",
  17950. "value": "4407"
  17951. }, {
  17952. "label": "湛江市",
  17953. "value": "4408"
  17954. }, {
  17955. "label": "茂名市",
  17956. "value": "4409"
  17957. }, {
  17958. "label": "肇庆市",
  17959. "value": "4412"
  17960. }, {
  17961. "label": "惠州市",
  17962. "value": "4413"
  17963. }, {
  17964. "label": "梅州市",
  17965. "value": "4414"
  17966. }, {
  17967. "label": "汕尾市",
  17968. "value": "4415"
  17969. }, {
  17970. "label": "河源市",
  17971. "value": "4416"
  17972. }, {
  17973. "label": "阳江市",
  17974. "value": "4417"
  17975. }, {
  17976. "label": "清远市",
  17977. "value": "4418"
  17978. }, {
  17979. "label": "东莞市",
  17980. "value": "4419"
  17981. }, {
  17982. "label": "中山市",
  17983. "value": "4420"
  17984. }, {
  17985. "label": "潮州市",
  17986. "value": "4451"
  17987. }, {
  17988. "label": "揭阳市",
  17989. "value": "4452"
  17990. }, {
  17991. "label": "云浮市",
  17992. "value": "4453"
  17993. }], [{
  17994. "label": "南宁市",
  17995. "value": "4501"
  17996. }, {
  17997. "label": "柳州市",
  17998. "value": "4502"
  17999. }, {
  18000. "label": "桂林市",
  18001. "value": "4503"
  18002. }, {
  18003. "label": "梧州市",
  18004. "value": "4504"
  18005. }, {
  18006. "label": "北海市",
  18007. "value": "4505"
  18008. }, {
  18009. "label": "防城港市",
  18010. "value": "4506"
  18011. }, {
  18012. "label": "钦州市",
  18013. "value": "4507"
  18014. }, {
  18015. "label": "贵港市",
  18016. "value": "4508"
  18017. }, {
  18018. "label": "玉林市",
  18019. "value": "4509"
  18020. }, {
  18021. "label": "百色市",
  18022. "value": "4510"
  18023. }, {
  18024. "label": "贺州市",
  18025. "value": "4511"
  18026. }, {
  18027. "label": "河池市",
  18028. "value": "4512"
  18029. }, {
  18030. "label": "来宾市",
  18031. "value": "4513"
  18032. }, {
  18033. "label": "崇左市",
  18034. "value": "4514"
  18035. }], [{
  18036. "label": "海口市",
  18037. "value": "4601"
  18038. }, {
  18039. "label": "三亚市",
  18040. "value": "4602"
  18041. }, {
  18042. "label": "三沙市",
  18043. "value": "4603"
  18044. }, {
  18045. "label": "儋州市",
  18046. "value": "4604"
  18047. }, {
  18048. "label": "省直辖县级行政区划",
  18049. "value": "4690"
  18050. }], [{
  18051. "label": "市辖区",
  18052. "value": "5001"
  18053. }, {
  18054. "label": "县",
  18055. "value": "5002"
  18056. }], [{
  18057. "label": "成都市",
  18058. "value": "5101"
  18059. }, {
  18060. "label": "自贡市",
  18061. "value": "5103"
  18062. }, {
  18063. "label": "攀枝花市",
  18064. "value": "5104"
  18065. }, {
  18066. "label": "泸州市",
  18067. "value": "5105"
  18068. }, {
  18069. "label": "德阳市",
  18070. "value": "5106"
  18071. }, {
  18072. "label": "绵阳市",
  18073. "value": "5107"
  18074. }, {
  18075. "label": "广元市",
  18076. "value": "5108"
  18077. }, {
  18078. "label": "遂宁市",
  18079. "value": "5109"
  18080. }, {
  18081. "label": "内江市",
  18082. "value": "5110"
  18083. }, {
  18084. "label": "乐山市",
  18085. "value": "5111"
  18086. }, {
  18087. "label": "南充市",
  18088. "value": "5113"
  18089. }, {
  18090. "label": "眉山市",
  18091. "value": "5114"
  18092. }, {
  18093. "label": "宜宾市",
  18094. "value": "5115"
  18095. }, {
  18096. "label": "广安市",
  18097. "value": "5116"
  18098. }, {
  18099. "label": "达州市",
  18100. "value": "5117"
  18101. }, {
  18102. "label": "雅安市",
  18103. "value": "5118"
  18104. }, {
  18105. "label": "巴中市",
  18106. "value": "5119"
  18107. }, {
  18108. "label": "资阳市",
  18109. "value": "5120"
  18110. }, {
  18111. "label": "阿坝藏族羌族自治州",
  18112. "value": "5132"
  18113. }, {
  18114. "label": "甘孜藏族自治州",
  18115. "value": "5133"
  18116. }, {
  18117. "label": "凉山彝族自治州",
  18118. "value": "5134"
  18119. }], [{
  18120. "label": "贵阳市",
  18121. "value": "5201"
  18122. }, {
  18123. "label": "六盘水市",
  18124. "value": "5202"
  18125. }, {
  18126. "label": "遵义市",
  18127. "value": "5203"
  18128. }, {
  18129. "label": "安顺市",
  18130. "value": "5204"
  18131. }, {
  18132. "label": "毕节市",
  18133. "value": "5205"
  18134. }, {
  18135. "label": "铜仁市",
  18136. "value": "5206"
  18137. }, {
  18138. "label": "黔西南布依族苗族自治州",
  18139. "value": "5223"
  18140. }, {
  18141. "label": "黔东南苗族侗族自治州",
  18142. "value": "5226"
  18143. }, {
  18144. "label": "黔南布依族苗族自治州",
  18145. "value": "5227"
  18146. }], [{
  18147. "label": "昆明市",
  18148. "value": "5301"
  18149. }, {
  18150. "label": "曲靖市",
  18151. "value": "5303"
  18152. }, {
  18153. "label": "玉溪市",
  18154. "value": "5304"
  18155. }, {
  18156. "label": "保山市",
  18157. "value": "5305"
  18158. }, {
  18159. "label": "昭通市",
  18160. "value": "5306"
  18161. }, {
  18162. "label": "丽江市",
  18163. "value": "5307"
  18164. }, {
  18165. "label": "普洱市",
  18166. "value": "5308"
  18167. }, {
  18168. "label": "临沧市",
  18169. "value": "5309"
  18170. }, {
  18171. "label": "楚雄彝族自治州",
  18172. "value": "5323"
  18173. }, {
  18174. "label": "红河哈尼族彝族自治州",
  18175. "value": "5325"
  18176. }, {
  18177. "label": "文山壮族苗族自治州",
  18178. "value": "5326"
  18179. }, {
  18180. "label": "西双版纳傣族自治州",
  18181. "value": "5328"
  18182. }, {
  18183. "label": "大理白族自治州",
  18184. "value": "5329"
  18185. }, {
  18186. "label": "德宏傣族景颇族自治州",
  18187. "value": "5331"
  18188. }, {
  18189. "label": "怒江傈僳族自治州",
  18190. "value": "5333"
  18191. }, {
  18192. "label": "迪庆藏族自治州",
  18193. "value": "5334"
  18194. }], [{
  18195. "label": "拉萨市",
  18196. "value": "5401"
  18197. }, {
  18198. "label": "日喀则市",
  18199. "value": "5402"
  18200. }, {
  18201. "label": "昌都市",
  18202. "value": "5403"
  18203. }, {
  18204. "label": "林芝市",
  18205. "value": "5404"
  18206. }, {
  18207. "label": "山南市",
  18208. "value": "5405"
  18209. }, {
  18210. "label": "那曲地区",
  18211. "value": "5424"
  18212. }, {
  18213. "label": "阿里地区",
  18214. "value": "5425"
  18215. }], [{
  18216. "label": "西安市",
  18217. "value": "6101"
  18218. }, {
  18219. "label": "铜川市",
  18220. "value": "6102"
  18221. }, {
  18222. "label": "宝鸡市",
  18223. "value": "6103"
  18224. }, {
  18225. "label": "咸阳市",
  18226. "value": "6104"
  18227. }, {
  18228. "label": "渭南市",
  18229. "value": "6105"
  18230. }, {
  18231. "label": "延安市",
  18232. "value": "6106"
  18233. }, {
  18234. "label": "汉中市",
  18235. "value": "6107"
  18236. }, {
  18237. "label": "榆林市",
  18238. "value": "6108"
  18239. }, {
  18240. "label": "安康市",
  18241. "value": "6109"
  18242. }, {
  18243. "label": "商洛市",
  18244. "value": "6110"
  18245. }], [{
  18246. "label": "兰州市",
  18247. "value": "6201"
  18248. }, {
  18249. "label": "嘉峪关市",
  18250. "value": "6202"
  18251. }, {
  18252. "label": "金昌市",
  18253. "value": "6203"
  18254. }, {
  18255. "label": "白银市",
  18256. "value": "6204"
  18257. }, {
  18258. "label": "天水市",
  18259. "value": "6205"
  18260. }, {
  18261. "label": "武威市",
  18262. "value": "6206"
  18263. }, {
  18264. "label": "张掖市",
  18265. "value": "6207"
  18266. }, {
  18267. "label": "平凉市",
  18268. "value": "6208"
  18269. }, {
  18270. "label": "酒泉市",
  18271. "value": "6209"
  18272. }, {
  18273. "label": "庆阳市",
  18274. "value": "6210"
  18275. }, {
  18276. "label": "定西市",
  18277. "value": "6211"
  18278. }, {
  18279. "label": "陇南市",
  18280. "value": "6212"
  18281. }, {
  18282. "label": "临夏回族自治州",
  18283. "value": "6229"
  18284. }, {
  18285. "label": "甘南藏族自治州",
  18286. "value": "6230"
  18287. }], [{
  18288. "label": "西宁市",
  18289. "value": "6301"
  18290. }, {
  18291. "label": "海东市",
  18292. "value": "6302"
  18293. }, {
  18294. "label": "海北藏族自治州",
  18295. "value": "6322"
  18296. }, {
  18297. "label": "黄南藏族自治州",
  18298. "value": "6323"
  18299. }, {
  18300. "label": "海南藏族自治州",
  18301. "value": "6325"
  18302. }, {
  18303. "label": "果洛藏族自治州",
  18304. "value": "6326"
  18305. }, {
  18306. "label": "玉树藏族自治州",
  18307. "value": "6327"
  18308. }, {
  18309. "label": "海西蒙古族藏族自治州",
  18310. "value": "6328"
  18311. }], [{
  18312. "label": "银川市",
  18313. "value": "6401"
  18314. }, {
  18315. "label": "石嘴山市",
  18316. "value": "6402"
  18317. }, {
  18318. "label": "吴忠市",
  18319. "value": "6403"
  18320. }, {
  18321. "label": "固原市",
  18322. "value": "6404"
  18323. }, {
  18324. "label": "中卫市",
  18325. "value": "6405"
  18326. }], [{
  18327. "label": "乌鲁木齐市",
  18328. "value": "6501"
  18329. }, {
  18330. "label": "克拉玛依市",
  18331. "value": "6502"
  18332. }, {
  18333. "label": "吐鲁番市",
  18334. "value": "6504"
  18335. }, {
  18336. "label": "哈密市",
  18337. "value": "6505"
  18338. }, {
  18339. "label": "昌吉回族自治州",
  18340. "value": "6523"
  18341. }, {
  18342. "label": "博尔塔拉蒙古自治州",
  18343. "value": "6527"
  18344. }, {
  18345. "label": "巴音郭楞蒙古自治州",
  18346. "value": "6528"
  18347. }, {
  18348. "label": "阿克苏地区",
  18349. "value": "6529"
  18350. }, {
  18351. "label": "克孜勒苏柯尔克孜自治州",
  18352. "value": "6530"
  18353. }, {
  18354. "label": "喀什地区",
  18355. "value": "6531"
  18356. }, {
  18357. "label": "和田地区",
  18358. "value": "6532"
  18359. }, {
  18360. "label": "伊犁哈萨克自治州",
  18361. "value": "6540"
  18362. }, {
  18363. "label": "塔城地区",
  18364. "value": "6542"
  18365. }, {
  18366. "label": "阿勒泰地区",
  18367. "value": "6543"
  18368. }, {
  18369. "label": "自治区直辖县级行政区划",
  18370. "value": "6590"
  18371. }], [{
  18372. "label": "台北",
  18373. "value": "6601"
  18374. }, {
  18375. "label": "高雄",
  18376. "value": "6602"
  18377. }, {
  18378. "label": "基隆",
  18379. "value": "6603"
  18380. }, {
  18381. "label": "台中",
  18382. "value": "6604"
  18383. }, {
  18384. "label": "台南",
  18385. "value": "6605"
  18386. }, {
  18387. "label": "新竹",
  18388. "value": "6606"
  18389. }, {
  18390. "label": "嘉义",
  18391. "value": "6607"
  18392. }, {
  18393. "label": "宜兰",
  18394. "value": "6608"
  18395. }, {
  18396. "label": "桃园",
  18397. "value": "6609"
  18398. }, {
  18399. "label": "苗栗",
  18400. "value": "6610"
  18401. }, {
  18402. "label": "彰化",
  18403. "value": "6611"
  18404. }, {
  18405. "label": "南投",
  18406. "value": "6612"
  18407. }, {
  18408. "label": "云林",
  18409. "value": "6613"
  18410. }, {
  18411. "label": "屏东",
  18412. "value": "6614"
  18413. }, {
  18414. "label": "台东",
  18415. "value": "6615"
  18416. }, {
  18417. "label": "花莲",
  18418. "value": "6616"
  18419. }, {
  18420. "label": "澎湖",
  18421. "value": "6617"
  18422. }], [{
  18423. "label": "香港岛",
  18424. "value": "6701"
  18425. }, {
  18426. "label": "九龙",
  18427. "value": "6702"
  18428. }, {
  18429. "label": "新界",
  18430. "value": "6703"
  18431. }], [{
  18432. "label": "澳门半岛",
  18433. "value": "6801"
  18434. }, {
  18435. "label": "氹仔岛",
  18436. "value": "6802"
  18437. }, {
  18438. "label": "路环岛",
  18439. "value": "6803"
  18440. }, {
  18441. "label": "路氹城",
  18442. "value": "6804"
  18443. }]];
  18444. var _default = cityData;
  18445. exports.default = _default;
  18446. /***/ }),
  18447. /***/ 487:
  18448. /*!*************************************************************!*\
  18449. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/area.js ***!
  18450. \*************************************************************/
  18451. /*! no static exports found */
  18452. /***/ (function(module, exports, __webpack_require__) {
  18453. "use strict";
  18454. Object.defineProperty(exports, "__esModule", {
  18455. value: true
  18456. });
  18457. exports.default = void 0;
  18458. var areaData = [[[{
  18459. "label": "东城区",
  18460. "value": "110101"
  18461. }, {
  18462. "label": "西城区",
  18463. "value": "110102"
  18464. }, {
  18465. "label": "朝阳区",
  18466. "value": "110105"
  18467. }, {
  18468. "label": "丰台区",
  18469. "value": "110106"
  18470. }, {
  18471. "label": "石景山区",
  18472. "value": "110107"
  18473. }, {
  18474. "label": "海淀区",
  18475. "value": "110108"
  18476. }, {
  18477. "label": "门头沟区",
  18478. "value": "110109"
  18479. }, {
  18480. "label": "房山区",
  18481. "value": "110111"
  18482. }, {
  18483. "label": "通州区",
  18484. "value": "110112"
  18485. }, {
  18486. "label": "顺义区",
  18487. "value": "110113"
  18488. }, {
  18489. "label": "昌平区",
  18490. "value": "110114"
  18491. }, {
  18492. "label": "大兴区",
  18493. "value": "110115"
  18494. }, {
  18495. "label": "怀柔区",
  18496. "value": "110116"
  18497. }, {
  18498. "label": "平谷区",
  18499. "value": "110117"
  18500. }, {
  18501. "label": "密云区",
  18502. "value": "110118"
  18503. }, {
  18504. "label": "延庆区",
  18505. "value": "110119"
  18506. }]], [[{
  18507. "label": "和平区",
  18508. "value": "120101"
  18509. }, {
  18510. "label": "河东区",
  18511. "value": "120102"
  18512. }, {
  18513. "label": "河西区",
  18514. "value": "120103"
  18515. }, {
  18516. "label": "南开区",
  18517. "value": "120104"
  18518. }, {
  18519. "label": "河北区",
  18520. "value": "120105"
  18521. }, {
  18522. "label": "红桥区",
  18523. "value": "120106"
  18524. }, {
  18525. "label": "东丽区",
  18526. "value": "120110"
  18527. }, {
  18528. "label": "西青区",
  18529. "value": "120111"
  18530. }, {
  18531. "label": "津南区",
  18532. "value": "120112"
  18533. }, {
  18534. "label": "北辰区",
  18535. "value": "120113"
  18536. }, {
  18537. "label": "武清区",
  18538. "value": "120114"
  18539. }, {
  18540. "label": "宝坻区",
  18541. "value": "120115"
  18542. }, {
  18543. "label": "滨海新区",
  18544. "value": "120116"
  18545. }, {
  18546. "label": "宁河区",
  18547. "value": "120117"
  18548. }, {
  18549. "label": "静海区",
  18550. "value": "120118"
  18551. }, {
  18552. "label": "蓟州区",
  18553. "value": "120119"
  18554. }]], [[{
  18555. "label": "长安区",
  18556. "value": "130102"
  18557. }, {
  18558. "label": "桥西区",
  18559. "value": "130104"
  18560. }, {
  18561. "label": "新华区",
  18562. "value": "130105"
  18563. }, {
  18564. "label": "井陉矿区",
  18565. "value": "130107"
  18566. }, {
  18567. "label": "裕华区",
  18568. "value": "130108"
  18569. }, {
  18570. "label": "藁城区",
  18571. "value": "130109"
  18572. }, {
  18573. "label": "鹿泉区",
  18574. "value": "130110"
  18575. }, {
  18576. "label": "栾城区",
  18577. "value": "130111"
  18578. }, {
  18579. "label": "井陉县",
  18580. "value": "130121"
  18581. }, {
  18582. "label": "正定县",
  18583. "value": "130123"
  18584. }, {
  18585. "label": "行唐县",
  18586. "value": "130125"
  18587. }, {
  18588. "label": "灵寿县",
  18589. "value": "130126"
  18590. }, {
  18591. "label": "高邑县",
  18592. "value": "130127"
  18593. }, {
  18594. "label": "深泽县",
  18595. "value": "130128"
  18596. }, {
  18597. "label": "赞皇县",
  18598. "value": "130129"
  18599. }, {
  18600. "label": "无极县",
  18601. "value": "130130"
  18602. }, {
  18603. "label": "平山县",
  18604. "value": "130131"
  18605. }, {
  18606. "label": "元氏县",
  18607. "value": "130132"
  18608. }, {
  18609. "label": "赵县",
  18610. "value": "130133"
  18611. }, {
  18612. "label": "石家庄高新技术产业开发区",
  18613. "value": "130171"
  18614. }, {
  18615. "label": "石家庄循环化工园区",
  18616. "value": "130172"
  18617. }, {
  18618. "label": "辛集市",
  18619. "value": "130181"
  18620. }, {
  18621. "label": "晋州市",
  18622. "value": "130183"
  18623. }, {
  18624. "label": "新乐市",
  18625. "value": "130184"
  18626. }], [{
  18627. "label": "路南区",
  18628. "value": "130202"
  18629. }, {
  18630. "label": "路北区",
  18631. "value": "130203"
  18632. }, {
  18633. "label": "古冶区",
  18634. "value": "130204"
  18635. }, {
  18636. "label": "开平区",
  18637. "value": "130205"
  18638. }, {
  18639. "label": "丰南区",
  18640. "value": "130207"
  18641. }, {
  18642. "label": "丰润区",
  18643. "value": "130208"
  18644. }, {
  18645. "label": "曹妃甸区",
  18646. "value": "130209"
  18647. }, {
  18648. "label": "滦县",
  18649. "value": "130223"
  18650. }, {
  18651. "label": "滦南县",
  18652. "value": "130224"
  18653. }, {
  18654. "label": "乐亭县",
  18655. "value": "130225"
  18656. }, {
  18657. "label": "迁西县",
  18658. "value": "130227"
  18659. }, {
  18660. "label": "玉田县",
  18661. "value": "130229"
  18662. }, {
  18663. "label": "唐山市芦台经济技术开发区",
  18664. "value": "130271"
  18665. }, {
  18666. "label": "唐山市汉沽管理区",
  18667. "value": "130272"
  18668. }, {
  18669. "label": "唐山高新技术产业开发区",
  18670. "value": "130273"
  18671. }, {
  18672. "label": "河北唐山海港经济开发区",
  18673. "value": "130274"
  18674. }, {
  18675. "label": "遵化市",
  18676. "value": "130281"
  18677. }, {
  18678. "label": "迁安市",
  18679. "value": "130283"
  18680. }], [{
  18681. "label": "海港区",
  18682. "value": "130302"
  18683. }, {
  18684. "label": "山海关区",
  18685. "value": "130303"
  18686. }, {
  18687. "label": "北戴河区",
  18688. "value": "130304"
  18689. }, {
  18690. "label": "抚宁区",
  18691. "value": "130306"
  18692. }, {
  18693. "label": "青龙满族自治县",
  18694. "value": "130321"
  18695. }, {
  18696. "label": "昌黎县",
  18697. "value": "130322"
  18698. }, {
  18699. "label": "卢龙县",
  18700. "value": "130324"
  18701. }, {
  18702. "label": "秦皇岛市经济技术开发区",
  18703. "value": "130371"
  18704. }, {
  18705. "label": "北戴河新区",
  18706. "value": "130372"
  18707. }], [{
  18708. "label": "邯山区",
  18709. "value": "130402"
  18710. }, {
  18711. "label": "丛台区",
  18712. "value": "130403"
  18713. }, {
  18714. "label": "复兴区",
  18715. "value": "130404"
  18716. }, {
  18717. "label": "峰峰矿区",
  18718. "value": "130406"
  18719. }, {
  18720. "label": "肥乡区",
  18721. "value": "130407"
  18722. }, {
  18723. "label": "永年区",
  18724. "value": "130408"
  18725. }, {
  18726. "label": "临漳县",
  18727. "value": "130423"
  18728. }, {
  18729. "label": "成安县",
  18730. "value": "130424"
  18731. }, {
  18732. "label": "大名县",
  18733. "value": "130425"
  18734. }, {
  18735. "label": "涉县",
  18736. "value": "130426"
  18737. }, {
  18738. "label": "磁县",
  18739. "value": "130427"
  18740. }, {
  18741. "label": "邱县",
  18742. "value": "130430"
  18743. }, {
  18744. "label": "鸡泽县",
  18745. "value": "130431"
  18746. }, {
  18747. "label": "广平县",
  18748. "value": "130432"
  18749. }, {
  18750. "label": "馆陶县",
  18751. "value": "130433"
  18752. }, {
  18753. "label": "魏县",
  18754. "value": "130434"
  18755. }, {
  18756. "label": "曲周县",
  18757. "value": "130435"
  18758. }, {
  18759. "label": "邯郸经济技术开发区",
  18760. "value": "130471"
  18761. }, {
  18762. "label": "邯郸冀南新区",
  18763. "value": "130473"
  18764. }, {
  18765. "label": "武安市",
  18766. "value": "130481"
  18767. }], [{
  18768. "label": "桥东区",
  18769. "value": "130502"
  18770. }, {
  18771. "label": "桥西区",
  18772. "value": "130503"
  18773. }, {
  18774. "label": "邢台县",
  18775. "value": "130521"
  18776. }, {
  18777. "label": "临城县",
  18778. "value": "130522"
  18779. }, {
  18780. "label": "内丘县",
  18781. "value": "130523"
  18782. }, {
  18783. "label": "柏乡县",
  18784. "value": "130524"
  18785. }, {
  18786. "label": "隆尧县",
  18787. "value": "130525"
  18788. }, {
  18789. "label": "任县",
  18790. "value": "130526"
  18791. }, {
  18792. "label": "南和县",
  18793. "value": "130527"
  18794. }, {
  18795. "label": "宁晋县",
  18796. "value": "130528"
  18797. }, {
  18798. "label": "巨鹿县",
  18799. "value": "130529"
  18800. }, {
  18801. "label": "新河县",
  18802. "value": "130530"
  18803. }, {
  18804. "label": "广宗县",
  18805. "value": "130531"
  18806. }, {
  18807. "label": "平乡县",
  18808. "value": "130532"
  18809. }, {
  18810. "label": "威县",
  18811. "value": "130533"
  18812. }, {
  18813. "label": "清河县",
  18814. "value": "130534"
  18815. }, {
  18816. "label": "临西县",
  18817. "value": "130535"
  18818. }, {
  18819. "label": "河北邢台经济开发区",
  18820. "value": "130571"
  18821. }, {
  18822. "label": "南宫市",
  18823. "value": "130581"
  18824. }, {
  18825. "label": "沙河市",
  18826. "value": "130582"
  18827. }], [{
  18828. "label": "竞秀区",
  18829. "value": "130602"
  18830. }, {
  18831. "label": "莲池区",
  18832. "value": "130606"
  18833. }, {
  18834. "label": "满城区",
  18835. "value": "130607"
  18836. }, {
  18837. "label": "清苑区",
  18838. "value": "130608"
  18839. }, {
  18840. "label": "徐水区",
  18841. "value": "130609"
  18842. }, {
  18843. "label": "涞水县",
  18844. "value": "130623"
  18845. }, {
  18846. "label": "阜平县",
  18847. "value": "130624"
  18848. }, {
  18849. "label": "定兴县",
  18850. "value": "130626"
  18851. }, {
  18852. "label": "唐县",
  18853. "value": "130627"
  18854. }, {
  18855. "label": "高阳县",
  18856. "value": "130628"
  18857. }, {
  18858. "label": "容城县",
  18859. "value": "130629"
  18860. }, {
  18861. "label": "涞源县",
  18862. "value": "130630"
  18863. }, {
  18864. "label": "望都县",
  18865. "value": "130631"
  18866. }, {
  18867. "label": "安新县",
  18868. "value": "130632"
  18869. }, {
  18870. "label": "易县",
  18871. "value": "130633"
  18872. }, {
  18873. "label": "曲阳县",
  18874. "value": "130634"
  18875. }, {
  18876. "label": "蠡县",
  18877. "value": "130635"
  18878. }, {
  18879. "label": "顺平县",
  18880. "value": "130636"
  18881. }, {
  18882. "label": "博野县",
  18883. "value": "130637"
  18884. }, {
  18885. "label": "雄县",
  18886. "value": "130638"
  18887. }, {
  18888. "label": "保定高新技术产业开发区",
  18889. "value": "130671"
  18890. }, {
  18891. "label": "保定白沟新城",
  18892. "value": "130672"
  18893. }, {
  18894. "label": "涿州市",
  18895. "value": "130681"
  18896. }, {
  18897. "label": "定州市",
  18898. "value": "130682"
  18899. }, {
  18900. "label": "安国市",
  18901. "value": "130683"
  18902. }, {
  18903. "label": "高碑店市",
  18904. "value": "130684"
  18905. }], [{
  18906. "label": "桥东区",
  18907. "value": "130702"
  18908. }, {
  18909. "label": "桥西区",
  18910. "value": "130703"
  18911. }, {
  18912. "label": "宣化区",
  18913. "value": "130705"
  18914. }, {
  18915. "label": "下花园区",
  18916. "value": "130706"
  18917. }, {
  18918. "label": "万全区",
  18919. "value": "130708"
  18920. }, {
  18921. "label": "崇礼区",
  18922. "value": "130709"
  18923. }, {
  18924. "label": "张北县",
  18925. "value": "130722"
  18926. }, {
  18927. "label": "康保县",
  18928. "value": "130723"
  18929. }, {
  18930. "label": "沽源县",
  18931. "value": "130724"
  18932. }, {
  18933. "label": "尚义县",
  18934. "value": "130725"
  18935. }, {
  18936. "label": "蔚县",
  18937. "value": "130726"
  18938. }, {
  18939. "label": "阳原县",
  18940. "value": "130727"
  18941. }, {
  18942. "label": "怀安县",
  18943. "value": "130728"
  18944. }, {
  18945. "label": "怀来县",
  18946. "value": "130730"
  18947. }, {
  18948. "label": "涿鹿县",
  18949. "value": "130731"
  18950. }, {
  18951. "label": "赤城县",
  18952. "value": "130732"
  18953. }, {
  18954. "label": "张家口市高新技术产业开发区",
  18955. "value": "130771"
  18956. }, {
  18957. "label": "张家口市察北管理区",
  18958. "value": "130772"
  18959. }, {
  18960. "label": "张家口市塞北管理区",
  18961. "value": "130773"
  18962. }], [{
  18963. "label": "双桥区",
  18964. "value": "130802"
  18965. }, {
  18966. "label": "双滦区",
  18967. "value": "130803"
  18968. }, {
  18969. "label": "鹰手营子矿区",
  18970. "value": "130804"
  18971. }, {
  18972. "label": "承德县",
  18973. "value": "130821"
  18974. }, {
  18975. "label": "兴隆县",
  18976. "value": "130822"
  18977. }, {
  18978. "label": "滦平县",
  18979. "value": "130824"
  18980. }, {
  18981. "label": "隆化县",
  18982. "value": "130825"
  18983. }, {
  18984. "label": "丰宁满族自治县",
  18985. "value": "130826"
  18986. }, {
  18987. "label": "宽城满族自治县",
  18988. "value": "130827"
  18989. }, {
  18990. "label": "围场满族蒙古族自治县",
  18991. "value": "130828"
  18992. }, {
  18993. "label": "承德高新技术产业开发区",
  18994. "value": "130871"
  18995. }, {
  18996. "label": "平泉市",
  18997. "value": "130881"
  18998. }], [{
  18999. "label": "新华区",
  19000. "value": "130902"
  19001. }, {
  19002. "label": "运河区",
  19003. "value": "130903"
  19004. }, {
  19005. "label": "沧县",
  19006. "value": "130921"
  19007. }, {
  19008. "label": "青县",
  19009. "value": "130922"
  19010. }, {
  19011. "label": "东光县",
  19012. "value": "130923"
  19013. }, {
  19014. "label": "海兴县",
  19015. "value": "130924"
  19016. }, {
  19017. "label": "盐山县",
  19018. "value": "130925"
  19019. }, {
  19020. "label": "肃宁县",
  19021. "value": "130926"
  19022. }, {
  19023. "label": "南皮县",
  19024. "value": "130927"
  19025. }, {
  19026. "label": "吴桥县",
  19027. "value": "130928"
  19028. }, {
  19029. "label": "献县",
  19030. "value": "130929"
  19031. }, {
  19032. "label": "孟村回族自治县",
  19033. "value": "130930"
  19034. }, {
  19035. "label": "河北沧州经济开发区",
  19036. "value": "130971"
  19037. }, {
  19038. "label": "沧州高新技术产业开发区",
  19039. "value": "130972"
  19040. }, {
  19041. "label": "沧州渤海新区",
  19042. "value": "130973"
  19043. }, {
  19044. "label": "泊头市",
  19045. "value": "130981"
  19046. }, {
  19047. "label": "任丘市",
  19048. "value": "130982"
  19049. }, {
  19050. "label": "黄骅市",
  19051. "value": "130983"
  19052. }, {
  19053. "label": "河间市",
  19054. "value": "130984"
  19055. }], [{
  19056. "label": "安次区",
  19057. "value": "131002"
  19058. }, {
  19059. "label": "广阳区",
  19060. "value": "131003"
  19061. }, {
  19062. "label": "固安县",
  19063. "value": "131022"
  19064. }, {
  19065. "label": "永清县",
  19066. "value": "131023"
  19067. }, {
  19068. "label": "香河县",
  19069. "value": "131024"
  19070. }, {
  19071. "label": "大城县",
  19072. "value": "131025"
  19073. }, {
  19074. "label": "文安县",
  19075. "value": "131026"
  19076. }, {
  19077. "label": "大厂回族自治县",
  19078. "value": "131028"
  19079. }, {
  19080. "label": "廊坊经济技术开发区",
  19081. "value": "131071"
  19082. }, {
  19083. "label": "霸州市",
  19084. "value": "131081"
  19085. }, {
  19086. "label": "三河市",
  19087. "value": "131082"
  19088. }], [{
  19089. "label": "桃城区",
  19090. "value": "131102"
  19091. }, {
  19092. "label": "冀州区",
  19093. "value": "131103"
  19094. }, {
  19095. "label": "枣强县",
  19096. "value": "131121"
  19097. }, {
  19098. "label": "武邑县",
  19099. "value": "131122"
  19100. }, {
  19101. "label": "武强县",
  19102. "value": "131123"
  19103. }, {
  19104. "label": "饶阳县",
  19105. "value": "131124"
  19106. }, {
  19107. "label": "安平县",
  19108. "value": "131125"
  19109. }, {
  19110. "label": "故城县",
  19111. "value": "131126"
  19112. }, {
  19113. "label": "景县",
  19114. "value": "131127"
  19115. }, {
  19116. "label": "阜城县",
  19117. "value": "131128"
  19118. }, {
  19119. "label": "河北衡水经济开发区",
  19120. "value": "131171"
  19121. }, {
  19122. "label": "衡水滨湖新区",
  19123. "value": "131172"
  19124. }, {
  19125. "label": "深州市",
  19126. "value": "131182"
  19127. }]], [[{
  19128. "label": "小店区",
  19129. "value": "140105"
  19130. }, {
  19131. "label": "迎泽区",
  19132. "value": "140106"
  19133. }, {
  19134. "label": "杏花岭区",
  19135. "value": "140107"
  19136. }, {
  19137. "label": "尖草坪区",
  19138. "value": "140108"
  19139. }, {
  19140. "label": "万柏林区",
  19141. "value": "140109"
  19142. }, {
  19143. "label": "晋源区",
  19144. "value": "140110"
  19145. }, {
  19146. "label": "清徐县",
  19147. "value": "140121"
  19148. }, {
  19149. "label": "阳曲县",
  19150. "value": "140122"
  19151. }, {
  19152. "label": "娄烦县",
  19153. "value": "140123"
  19154. }, {
  19155. "label": "山西转型综合改革示范区",
  19156. "value": "140171"
  19157. }, {
  19158. "label": "古交市",
  19159. "value": "140181"
  19160. }], [{
  19161. "label": "城区",
  19162. "value": "140202"
  19163. }, {
  19164. "label": "矿区",
  19165. "value": "140203"
  19166. }, {
  19167. "label": "南郊区",
  19168. "value": "140211"
  19169. }, {
  19170. "label": "新荣区",
  19171. "value": "140212"
  19172. }, {
  19173. "label": "阳高县",
  19174. "value": "140221"
  19175. }, {
  19176. "label": "天镇县",
  19177. "value": "140222"
  19178. }, {
  19179. "label": "广灵县",
  19180. "value": "140223"
  19181. }, {
  19182. "label": "灵丘县",
  19183. "value": "140224"
  19184. }, {
  19185. "label": "浑源县",
  19186. "value": "140225"
  19187. }, {
  19188. "label": "左云县",
  19189. "value": "140226"
  19190. }, {
  19191. "label": "大同县",
  19192. "value": "140227"
  19193. }, {
  19194. "label": "山西大同经济开发区",
  19195. "value": "140271"
  19196. }], [{
  19197. "label": "城区",
  19198. "value": "140302"
  19199. }, {
  19200. "label": "矿区",
  19201. "value": "140303"
  19202. }, {
  19203. "label": "郊区",
  19204. "value": "140311"
  19205. }, {
  19206. "label": "平定县",
  19207. "value": "140321"
  19208. }, {
  19209. "label": "盂县",
  19210. "value": "140322"
  19211. }, {
  19212. "label": "山西阳泉经济开发区",
  19213. "value": "140371"
  19214. }], [{
  19215. "label": "城区",
  19216. "value": "140402"
  19217. }, {
  19218. "label": "郊区",
  19219. "value": "140411"
  19220. }, {
  19221. "label": "长治县",
  19222. "value": "140421"
  19223. }, {
  19224. "label": "襄垣县",
  19225. "value": "140423"
  19226. }, {
  19227. "label": "屯留县",
  19228. "value": "140424"
  19229. }, {
  19230. "label": "平顺县",
  19231. "value": "140425"
  19232. }, {
  19233. "label": "黎城县",
  19234. "value": "140426"
  19235. }, {
  19236. "label": "壶关县",
  19237. "value": "140427"
  19238. }, {
  19239. "label": "长子县",
  19240. "value": "140428"
  19241. }, {
  19242. "label": "武乡县",
  19243. "value": "140429"
  19244. }, {
  19245. "label": "沁县",
  19246. "value": "140430"
  19247. }, {
  19248. "label": "沁源县",
  19249. "value": "140431"
  19250. }, {
  19251. "label": "山西长治高新技术产业园区",
  19252. "value": "140471"
  19253. }, {
  19254. "label": "潞城市",
  19255. "value": "140481"
  19256. }], [{
  19257. "label": "城区",
  19258. "value": "140502"
  19259. }, {
  19260. "label": "沁水县",
  19261. "value": "140521"
  19262. }, {
  19263. "label": "阳城县",
  19264. "value": "140522"
  19265. }, {
  19266. "label": "陵川县",
  19267. "value": "140524"
  19268. }, {
  19269. "label": "泽州县",
  19270. "value": "140525"
  19271. }, {
  19272. "label": "高平市",
  19273. "value": "140581"
  19274. }], [{
  19275. "label": "朔城区",
  19276. "value": "140602"
  19277. }, {
  19278. "label": "平鲁区",
  19279. "value": "140603"
  19280. }, {
  19281. "label": "山阴县",
  19282. "value": "140621"
  19283. }, {
  19284. "label": "应县",
  19285. "value": "140622"
  19286. }, {
  19287. "label": "右玉县",
  19288. "value": "140623"
  19289. }, {
  19290. "label": "怀仁县",
  19291. "value": "140624"
  19292. }, {
  19293. "label": "山西朔州经济开发区",
  19294. "value": "140671"
  19295. }], [{
  19296. "label": "榆次区",
  19297. "value": "140702"
  19298. }, {
  19299. "label": "榆社县",
  19300. "value": "140721"
  19301. }, {
  19302. "label": "左权县",
  19303. "value": "140722"
  19304. }, {
  19305. "label": "和顺县",
  19306. "value": "140723"
  19307. }, {
  19308. "label": "昔阳县",
  19309. "value": "140724"
  19310. }, {
  19311. "label": "寿阳县",
  19312. "value": "140725"
  19313. }, {
  19314. "label": "太谷县",
  19315. "value": "140726"
  19316. }, {
  19317. "label": "祁县",
  19318. "value": "140727"
  19319. }, {
  19320. "label": "平遥县",
  19321. "value": "140728"
  19322. }, {
  19323. "label": "灵石县",
  19324. "value": "140729"
  19325. }, {
  19326. "label": "介休市",
  19327. "value": "140781"
  19328. }], [{
  19329. "label": "盐湖区",
  19330. "value": "140802"
  19331. }, {
  19332. "label": "临猗县",
  19333. "value": "140821"
  19334. }, {
  19335. "label": "万荣县",
  19336. "value": "140822"
  19337. }, {
  19338. "label": "闻喜县",
  19339. "value": "140823"
  19340. }, {
  19341. "label": "稷山县",
  19342. "value": "140824"
  19343. }, {
  19344. "label": "新绛县",
  19345. "value": "140825"
  19346. }, {
  19347. "label": "绛县",
  19348. "value": "140826"
  19349. }, {
  19350. "label": "垣曲县",
  19351. "value": "140827"
  19352. }, {
  19353. "label": "夏县",
  19354. "value": "140828"
  19355. }, {
  19356. "label": "平陆县",
  19357. "value": "140829"
  19358. }, {
  19359. "label": "芮城县",
  19360. "value": "140830"
  19361. }, {
  19362. "label": "永济市",
  19363. "value": "140881"
  19364. }, {
  19365. "label": "河津市",
  19366. "value": "140882"
  19367. }], [{
  19368. "label": "忻府区",
  19369. "value": "140902"
  19370. }, {
  19371. "label": "定襄县",
  19372. "value": "140921"
  19373. }, {
  19374. "label": "五台县",
  19375. "value": "140922"
  19376. }, {
  19377. "label": "代县",
  19378. "value": "140923"
  19379. }, {
  19380. "label": "繁峙县",
  19381. "value": "140924"
  19382. }, {
  19383. "label": "宁武县",
  19384. "value": "140925"
  19385. }, {
  19386. "label": "静乐县",
  19387. "value": "140926"
  19388. }, {
  19389. "label": "神池县",
  19390. "value": "140927"
  19391. }, {
  19392. "label": "五寨县",
  19393. "value": "140928"
  19394. }, {
  19395. "label": "岢岚县",
  19396. "value": "140929"
  19397. }, {
  19398. "label": "河曲县",
  19399. "value": "140930"
  19400. }, {
  19401. "label": "保德县",
  19402. "value": "140931"
  19403. }, {
  19404. "label": "偏关县",
  19405. "value": "140932"
  19406. }, {
  19407. "label": "五台山风景名胜区",
  19408. "value": "140971"
  19409. }, {
  19410. "label": "原平市",
  19411. "value": "140981"
  19412. }], [{
  19413. "label": "尧都区",
  19414. "value": "141002"
  19415. }, {
  19416. "label": "曲沃县",
  19417. "value": "141021"
  19418. }, {
  19419. "label": "翼城县",
  19420. "value": "141022"
  19421. }, {
  19422. "label": "襄汾县",
  19423. "value": "141023"
  19424. }, {
  19425. "label": "洪洞县",
  19426. "value": "141024"
  19427. }, {
  19428. "label": "古县",
  19429. "value": "141025"
  19430. }, {
  19431. "label": "安泽县",
  19432. "value": "141026"
  19433. }, {
  19434. "label": "浮山县",
  19435. "value": "141027"
  19436. }, {
  19437. "label": "吉县",
  19438. "value": "141028"
  19439. }, {
  19440. "label": "乡宁县",
  19441. "value": "141029"
  19442. }, {
  19443. "label": "大宁县",
  19444. "value": "141030"
  19445. }, {
  19446. "label": "隰县",
  19447. "value": "141031"
  19448. }, {
  19449. "label": "永和县",
  19450. "value": "141032"
  19451. }, {
  19452. "label": "蒲县",
  19453. "value": "141033"
  19454. }, {
  19455. "label": "汾西县",
  19456. "value": "141034"
  19457. }, {
  19458. "label": "侯马市",
  19459. "value": "141081"
  19460. }, {
  19461. "label": "霍州市",
  19462. "value": "141082"
  19463. }], [{
  19464. "label": "离石区",
  19465. "value": "141102"
  19466. }, {
  19467. "label": "文水县",
  19468. "value": "141121"
  19469. }, {
  19470. "label": "交城县",
  19471. "value": "141122"
  19472. }, {
  19473. "label": "兴县",
  19474. "value": "141123"
  19475. }, {
  19476. "label": "临县",
  19477. "value": "141124"
  19478. }, {
  19479. "label": "柳林县",
  19480. "value": "141125"
  19481. }, {
  19482. "label": "石楼县",
  19483. "value": "141126"
  19484. }, {
  19485. "label": "岚县",
  19486. "value": "141127"
  19487. }, {
  19488. "label": "方山县",
  19489. "value": "141128"
  19490. }, {
  19491. "label": "中阳县",
  19492. "value": "141129"
  19493. }, {
  19494. "label": "交口县",
  19495. "value": "141130"
  19496. }, {
  19497. "label": "孝义市",
  19498. "value": "141181"
  19499. }, {
  19500. "label": "汾阳市",
  19501. "value": "141182"
  19502. }]], [[{
  19503. "label": "新城区",
  19504. "value": "150102"
  19505. }, {
  19506. "label": "回民区",
  19507. "value": "150103"
  19508. }, {
  19509. "label": "玉泉区",
  19510. "value": "150104"
  19511. }, {
  19512. "label": "赛罕区",
  19513. "value": "150105"
  19514. }, {
  19515. "label": "土默特左旗",
  19516. "value": "150121"
  19517. }, {
  19518. "label": "托克托县",
  19519. "value": "150122"
  19520. }, {
  19521. "label": "和林格尔县",
  19522. "value": "150123"
  19523. }, {
  19524. "label": "清水河县",
  19525. "value": "150124"
  19526. }, {
  19527. "label": "武川县",
  19528. "value": "150125"
  19529. }, {
  19530. "label": "呼和浩特金海工业园区",
  19531. "value": "150171"
  19532. }, {
  19533. "label": "呼和浩特经济技术开发区",
  19534. "value": "150172"
  19535. }], [{
  19536. "label": "东河区",
  19537. "value": "150202"
  19538. }, {
  19539. "label": "昆都仑区",
  19540. "value": "150203"
  19541. }, {
  19542. "label": "青山区",
  19543. "value": "150204"
  19544. }, {
  19545. "label": "石拐区",
  19546. "value": "150205"
  19547. }, {
  19548. "label": "白云鄂博矿区",
  19549. "value": "150206"
  19550. }, {
  19551. "label": "九原区",
  19552. "value": "150207"
  19553. }, {
  19554. "label": "土默特右旗",
  19555. "value": "150221"
  19556. }, {
  19557. "label": "固阳县",
  19558. "value": "150222"
  19559. }, {
  19560. "label": "达尔罕茂明安联合旗",
  19561. "value": "150223"
  19562. }, {
  19563. "label": "包头稀土高新技术产业开发区",
  19564. "value": "150271"
  19565. }], [{
  19566. "label": "海勃湾区",
  19567. "value": "150302"
  19568. }, {
  19569. "label": "海南区",
  19570. "value": "150303"
  19571. }, {
  19572. "label": "乌达区",
  19573. "value": "150304"
  19574. }], [{
  19575. "label": "红山区",
  19576. "value": "150402"
  19577. }, {
  19578. "label": "元宝山区",
  19579. "value": "150403"
  19580. }, {
  19581. "label": "松山区",
  19582. "value": "150404"
  19583. }, {
  19584. "label": "阿鲁科尔沁旗",
  19585. "value": "150421"
  19586. }, {
  19587. "label": "巴林左旗",
  19588. "value": "150422"
  19589. }, {
  19590. "label": "巴林右旗",
  19591. "value": "150423"
  19592. }, {
  19593. "label": "林西县",
  19594. "value": "150424"
  19595. }, {
  19596. "label": "克什克腾旗",
  19597. "value": "150425"
  19598. }, {
  19599. "label": "翁牛特旗",
  19600. "value": "150426"
  19601. }, {
  19602. "label": "喀喇沁旗",
  19603. "value": "150428"
  19604. }, {
  19605. "label": "宁城县",
  19606. "value": "150429"
  19607. }, {
  19608. "label": "敖汉旗",
  19609. "value": "150430"
  19610. }], [{
  19611. "label": "科尔沁区",
  19612. "value": "150502"
  19613. }, {
  19614. "label": "科尔沁左翼中旗",
  19615. "value": "150521"
  19616. }, {
  19617. "label": "科尔沁左翼后旗",
  19618. "value": "150522"
  19619. }, {
  19620. "label": "开鲁县",
  19621. "value": "150523"
  19622. }, {
  19623. "label": "库伦旗",
  19624. "value": "150524"
  19625. }, {
  19626. "label": "奈曼旗",
  19627. "value": "150525"
  19628. }, {
  19629. "label": "扎鲁特旗",
  19630. "value": "150526"
  19631. }, {
  19632. "label": "通辽经济技术开发区",
  19633. "value": "150571"
  19634. }, {
  19635. "label": "霍林郭勒市",
  19636. "value": "150581"
  19637. }], [{
  19638. "label": "东胜区",
  19639. "value": "150602"
  19640. }, {
  19641. "label": "康巴什区",
  19642. "value": "150603"
  19643. }, {
  19644. "label": "达拉特旗",
  19645. "value": "150621"
  19646. }, {
  19647. "label": "准格尔旗",
  19648. "value": "150622"
  19649. }, {
  19650. "label": "鄂托克前旗",
  19651. "value": "150623"
  19652. }, {
  19653. "label": "鄂托克旗",
  19654. "value": "150624"
  19655. }, {
  19656. "label": "杭锦旗",
  19657. "value": "150625"
  19658. }, {
  19659. "label": "乌审旗",
  19660. "value": "150626"
  19661. }, {
  19662. "label": "伊金霍洛旗",
  19663. "value": "150627"
  19664. }], [{
  19665. "label": "海拉尔区",
  19666. "value": "150702"
  19667. }, {
  19668. "label": "扎赉诺尔区",
  19669. "value": "150703"
  19670. }, {
  19671. "label": "阿荣旗",
  19672. "value": "150721"
  19673. }, {
  19674. "label": "莫力达瓦达斡尔族自治旗",
  19675. "value": "150722"
  19676. }, {
  19677. "label": "鄂伦春自治旗",
  19678. "value": "150723"
  19679. }, {
  19680. "label": "鄂温克族自治旗",
  19681. "value": "150724"
  19682. }, {
  19683. "label": "陈巴尔虎旗",
  19684. "value": "150725"
  19685. }, {
  19686. "label": "新巴尔虎左旗",
  19687. "value": "150726"
  19688. }, {
  19689. "label": "新巴尔虎右旗",
  19690. "value": "150727"
  19691. }, {
  19692. "label": "满洲里市",
  19693. "value": "150781"
  19694. }, {
  19695. "label": "牙克石市",
  19696. "value": "150782"
  19697. }, {
  19698. "label": "扎兰屯市",
  19699. "value": "150783"
  19700. }, {
  19701. "label": "额尔古纳市",
  19702. "value": "150784"
  19703. }, {
  19704. "label": "根河市",
  19705. "value": "150785"
  19706. }], [{
  19707. "label": "临河区",
  19708. "value": "150802"
  19709. }, {
  19710. "label": "五原县",
  19711. "value": "150821"
  19712. }, {
  19713. "label": "磴口县",
  19714. "value": "150822"
  19715. }, {
  19716. "label": "乌拉特前旗",
  19717. "value": "150823"
  19718. }, {
  19719. "label": "乌拉特中旗",
  19720. "value": "150824"
  19721. }, {
  19722. "label": "乌拉特后旗",
  19723. "value": "150825"
  19724. }, {
  19725. "label": "杭锦后旗",
  19726. "value": "150826"
  19727. }], [{
  19728. "label": "集宁区",
  19729. "value": "150902"
  19730. }, {
  19731. "label": "卓资县",
  19732. "value": "150921"
  19733. }, {
  19734. "label": "化德县",
  19735. "value": "150922"
  19736. }, {
  19737. "label": "商都县",
  19738. "value": "150923"
  19739. }, {
  19740. "label": "兴和县",
  19741. "value": "150924"
  19742. }, {
  19743. "label": "凉城县",
  19744. "value": "150925"
  19745. }, {
  19746. "label": "察哈尔右翼前旗",
  19747. "value": "150926"
  19748. }, {
  19749. "label": "察哈尔右翼中旗",
  19750. "value": "150927"
  19751. }, {
  19752. "label": "察哈尔右翼后旗",
  19753. "value": "150928"
  19754. }, {
  19755. "label": "四子王旗",
  19756. "value": "150929"
  19757. }, {
  19758. "label": "丰镇市",
  19759. "value": "150981"
  19760. }], [{
  19761. "label": "乌兰浩特市",
  19762. "value": "152201"
  19763. }, {
  19764. "label": "阿尔山市",
  19765. "value": "152202"
  19766. }, {
  19767. "label": "科尔沁右翼前旗",
  19768. "value": "152221"
  19769. }, {
  19770. "label": "科尔沁右翼中旗",
  19771. "value": "152222"
  19772. }, {
  19773. "label": "扎赉特旗",
  19774. "value": "152223"
  19775. }, {
  19776. "label": "突泉县",
  19777. "value": "152224"
  19778. }], [{
  19779. "label": "二连浩特市",
  19780. "value": "152501"
  19781. }, {
  19782. "label": "锡林浩特市",
  19783. "value": "152502"
  19784. }, {
  19785. "label": "阿巴嘎旗",
  19786. "value": "152522"
  19787. }, {
  19788. "label": "苏尼特左旗",
  19789. "value": "152523"
  19790. }, {
  19791. "label": "苏尼特右旗",
  19792. "value": "152524"
  19793. }, {
  19794. "label": "东乌珠穆沁旗",
  19795. "value": "152525"
  19796. }, {
  19797. "label": "西乌珠穆沁旗",
  19798. "value": "152526"
  19799. }, {
  19800. "label": "太仆寺旗",
  19801. "value": "152527"
  19802. }, {
  19803. "label": "镶黄旗",
  19804. "value": "152528"
  19805. }, {
  19806. "label": "正镶白旗",
  19807. "value": "152529"
  19808. }, {
  19809. "label": "正蓝旗",
  19810. "value": "152530"
  19811. }, {
  19812. "label": "多伦县",
  19813. "value": "152531"
  19814. }, {
  19815. "label": "乌拉盖管委会",
  19816. "value": "152571"
  19817. }], [{
  19818. "label": "阿拉善左旗",
  19819. "value": "152921"
  19820. }, {
  19821. "label": "阿拉善右旗",
  19822. "value": "152922"
  19823. }, {
  19824. "label": "额济纳旗",
  19825. "value": "152923"
  19826. }, {
  19827. "label": "内蒙古阿拉善经济开发区",
  19828. "value": "152971"
  19829. }]], [[{
  19830. "label": "和平区",
  19831. "value": "210102"
  19832. }, {
  19833. "label": "沈河区",
  19834. "value": "210103"
  19835. }, {
  19836. "label": "大东区",
  19837. "value": "210104"
  19838. }, {
  19839. "label": "皇姑区",
  19840. "value": "210105"
  19841. }, {
  19842. "label": "铁西区",
  19843. "value": "210106"
  19844. }, {
  19845. "label": "苏家屯区",
  19846. "value": "210111"
  19847. }, {
  19848. "label": "浑南区",
  19849. "value": "210112"
  19850. }, {
  19851. "label": "沈北新区",
  19852. "value": "210113"
  19853. }, {
  19854. "label": "于洪区",
  19855. "value": "210114"
  19856. }, {
  19857. "label": "辽中区",
  19858. "value": "210115"
  19859. }, {
  19860. "label": "康平县",
  19861. "value": "210123"
  19862. }, {
  19863. "label": "法库县",
  19864. "value": "210124"
  19865. }, {
  19866. "label": "新民市",
  19867. "value": "210181"
  19868. }], [{
  19869. "label": "中山区",
  19870. "value": "210202"
  19871. }, {
  19872. "label": "西岗区",
  19873. "value": "210203"
  19874. }, {
  19875. "label": "沙河口区",
  19876. "value": "210204"
  19877. }, {
  19878. "label": "甘井子区",
  19879. "value": "210211"
  19880. }, {
  19881. "label": "旅顺口区",
  19882. "value": "210212"
  19883. }, {
  19884. "label": "金州区",
  19885. "value": "210213"
  19886. }, {
  19887. "label": "普兰店区",
  19888. "value": "210214"
  19889. }, {
  19890. "label": "长海县",
  19891. "value": "210224"
  19892. }, {
  19893. "label": "瓦房店市",
  19894. "value": "210281"
  19895. }, {
  19896. "label": "庄河市",
  19897. "value": "210283"
  19898. }], [{
  19899. "label": "铁东区",
  19900. "value": "210302"
  19901. }, {
  19902. "label": "铁西区",
  19903. "value": "210303"
  19904. }, {
  19905. "label": "立山区",
  19906. "value": "210304"
  19907. }, {
  19908. "label": "千山区",
  19909. "value": "210311"
  19910. }, {
  19911. "label": "台安县",
  19912. "value": "210321"
  19913. }, {
  19914. "label": "岫岩满族自治县",
  19915. "value": "210323"
  19916. }, {
  19917. "label": "海城市",
  19918. "value": "210381"
  19919. }], [{
  19920. "label": "新抚区",
  19921. "value": "210402"
  19922. }, {
  19923. "label": "东洲区",
  19924. "value": "210403"
  19925. }, {
  19926. "label": "望花区",
  19927. "value": "210404"
  19928. }, {
  19929. "label": "顺城区",
  19930. "value": "210411"
  19931. }, {
  19932. "label": "抚顺县",
  19933. "value": "210421"
  19934. }, {
  19935. "label": "新宾满族自治县",
  19936. "value": "210422"
  19937. }, {
  19938. "label": "清原满族自治县",
  19939. "value": "210423"
  19940. }], [{
  19941. "label": "平山区",
  19942. "value": "210502"
  19943. }, {
  19944. "label": "溪湖区",
  19945. "value": "210503"
  19946. }, {
  19947. "label": "明山区",
  19948. "value": "210504"
  19949. }, {
  19950. "label": "南芬区",
  19951. "value": "210505"
  19952. }, {
  19953. "label": "本溪满族自治县",
  19954. "value": "210521"
  19955. }, {
  19956. "label": "桓仁满族自治县",
  19957. "value": "210522"
  19958. }], [{
  19959. "label": "元宝区",
  19960. "value": "210602"
  19961. }, {
  19962. "label": "振兴区",
  19963. "value": "210603"
  19964. }, {
  19965. "label": "振安区",
  19966. "value": "210604"
  19967. }, {
  19968. "label": "宽甸满族自治县",
  19969. "value": "210624"
  19970. }, {
  19971. "label": "东港市",
  19972. "value": "210681"
  19973. }, {
  19974. "label": "凤城市",
  19975. "value": "210682"
  19976. }], [{
  19977. "label": "古塔区",
  19978. "value": "210702"
  19979. }, {
  19980. "label": "凌河区",
  19981. "value": "210703"
  19982. }, {
  19983. "label": "太和区",
  19984. "value": "210711"
  19985. }, {
  19986. "label": "黑山县",
  19987. "value": "210726"
  19988. }, {
  19989. "label": "义县",
  19990. "value": "210727"
  19991. }, {
  19992. "label": "凌海市",
  19993. "value": "210781"
  19994. }, {
  19995. "label": "北镇市",
  19996. "value": "210782"
  19997. }], [{
  19998. "label": "站前区",
  19999. "value": "210802"
  20000. }, {
  20001. "label": "西市区",
  20002. "value": "210803"
  20003. }, {
  20004. "label": "鲅鱼圈区",
  20005. "value": "210804"
  20006. }, {
  20007. "label": "老边区",
  20008. "value": "210811"
  20009. }, {
  20010. "label": "盖州市",
  20011. "value": "210881"
  20012. }, {
  20013. "label": "大石桥市",
  20014. "value": "210882"
  20015. }], [{
  20016. "label": "海州区",
  20017. "value": "210902"
  20018. }, {
  20019. "label": "新邱区",
  20020. "value": "210903"
  20021. }, {
  20022. "label": "太平区",
  20023. "value": "210904"
  20024. }, {
  20025. "label": "清河门区",
  20026. "value": "210905"
  20027. }, {
  20028. "label": "细河区",
  20029. "value": "210911"
  20030. }, {
  20031. "label": "阜新蒙古族自治县",
  20032. "value": "210921"
  20033. }, {
  20034. "label": "彰武县",
  20035. "value": "210922"
  20036. }], [{
  20037. "label": "白塔区",
  20038. "value": "211002"
  20039. }, {
  20040. "label": "文圣区",
  20041. "value": "211003"
  20042. }, {
  20043. "label": "宏伟区",
  20044. "value": "211004"
  20045. }, {
  20046. "label": "弓长岭区",
  20047. "value": "211005"
  20048. }, {
  20049. "label": "太子河区",
  20050. "value": "211011"
  20051. }, {
  20052. "label": "辽阳县",
  20053. "value": "211021"
  20054. }, {
  20055. "label": "灯塔市",
  20056. "value": "211081"
  20057. }], [{
  20058. "label": "双台子区",
  20059. "value": "211102"
  20060. }, {
  20061. "label": "兴隆台区",
  20062. "value": "211103"
  20063. }, {
  20064. "label": "大洼区",
  20065. "value": "211104"
  20066. }, {
  20067. "label": "盘山县",
  20068. "value": "211122"
  20069. }], [{
  20070. "label": "银州区",
  20071. "value": "211202"
  20072. }, {
  20073. "label": "清河区",
  20074. "value": "211204"
  20075. }, {
  20076. "label": "铁岭县",
  20077. "value": "211221"
  20078. }, {
  20079. "label": "西丰县",
  20080. "value": "211223"
  20081. }, {
  20082. "label": "昌图县",
  20083. "value": "211224"
  20084. }, {
  20085. "label": "调兵山市",
  20086. "value": "211281"
  20087. }, {
  20088. "label": "开原市",
  20089. "value": "211282"
  20090. }], [{
  20091. "label": "双塔区",
  20092. "value": "211302"
  20093. }, {
  20094. "label": "龙城区",
  20095. "value": "211303"
  20096. }, {
  20097. "label": "朝阳县",
  20098. "value": "211321"
  20099. }, {
  20100. "label": "建平县",
  20101. "value": "211322"
  20102. }, {
  20103. "label": "喀喇沁左翼蒙古族自治县",
  20104. "value": "211324"
  20105. }, {
  20106. "label": "北票市",
  20107. "value": "211381"
  20108. }, {
  20109. "label": "凌源市",
  20110. "value": "211382"
  20111. }], [{
  20112. "label": "连山区",
  20113. "value": "211402"
  20114. }, {
  20115. "label": "龙港区",
  20116. "value": "211403"
  20117. }, {
  20118. "label": "南票区",
  20119. "value": "211404"
  20120. }, {
  20121. "label": "绥中县",
  20122. "value": "211421"
  20123. }, {
  20124. "label": "建昌县",
  20125. "value": "211422"
  20126. }, {
  20127. "label": "兴城市",
  20128. "value": "211481"
  20129. }]], [[{
  20130. "label": "南关区",
  20131. "value": "220102"
  20132. }, {
  20133. "label": "宽城区",
  20134. "value": "220103"
  20135. }, {
  20136. "label": "朝阳区",
  20137. "value": "220104"
  20138. }, {
  20139. "label": "二道区",
  20140. "value": "220105"
  20141. }, {
  20142. "label": "绿园区",
  20143. "value": "220106"
  20144. }, {
  20145. "label": "双阳区",
  20146. "value": "220112"
  20147. }, {
  20148. "label": "九台区",
  20149. "value": "220113"
  20150. }, {
  20151. "label": "农安县",
  20152. "value": "220122"
  20153. }, {
  20154. "label": "长春经济技术开发区",
  20155. "value": "220171"
  20156. }, {
  20157. "label": "长春净月高新技术产业开发区",
  20158. "value": "220172"
  20159. }, {
  20160. "label": "长春高新技术产业开发区",
  20161. "value": "220173"
  20162. }, {
  20163. "label": "长春汽车经济技术开发区",
  20164. "value": "220174"
  20165. }, {
  20166. "label": "榆树市",
  20167. "value": "220182"
  20168. }, {
  20169. "label": "德惠市",
  20170. "value": "220183"
  20171. }], [{
  20172. "label": "昌邑区",
  20173. "value": "220202"
  20174. }, {
  20175. "label": "龙潭区",
  20176. "value": "220203"
  20177. }, {
  20178. "label": "船营区",
  20179. "value": "220204"
  20180. }, {
  20181. "label": "丰满区",
  20182. "value": "220211"
  20183. }, {
  20184. "label": "永吉县",
  20185. "value": "220221"
  20186. }, {
  20187. "label": "吉林经济开发区",
  20188. "value": "220271"
  20189. }, {
  20190. "label": "吉林高新技术产业开发区",
  20191. "value": "220272"
  20192. }, {
  20193. "label": "吉林中国新加坡食品区",
  20194. "value": "220273"
  20195. }, {
  20196. "label": "蛟河市",
  20197. "value": "220281"
  20198. }, {
  20199. "label": "桦甸市",
  20200. "value": "220282"
  20201. }, {
  20202. "label": "舒兰市",
  20203. "value": "220283"
  20204. }, {
  20205. "label": "磐石市",
  20206. "value": "220284"
  20207. }], [{
  20208. "label": "铁西区",
  20209. "value": "220302"
  20210. }, {
  20211. "label": "铁东区",
  20212. "value": "220303"
  20213. }, {
  20214. "label": "梨树县",
  20215. "value": "220322"
  20216. }, {
  20217. "label": "伊通满族自治县",
  20218. "value": "220323"
  20219. }, {
  20220. "label": "公主岭市",
  20221. "value": "220381"
  20222. }, {
  20223. "label": "双辽市",
  20224. "value": "220382"
  20225. }], [{
  20226. "label": "龙山区",
  20227. "value": "220402"
  20228. }, {
  20229. "label": "西安区",
  20230. "value": "220403"
  20231. }, {
  20232. "label": "东丰县",
  20233. "value": "220421"
  20234. }, {
  20235. "label": "东辽县",
  20236. "value": "220422"
  20237. }], [{
  20238. "label": "东昌区",
  20239. "value": "220502"
  20240. }, {
  20241. "label": "二道江区",
  20242. "value": "220503"
  20243. }, {
  20244. "label": "通化县",
  20245. "value": "220521"
  20246. }, {
  20247. "label": "辉南县",
  20248. "value": "220523"
  20249. }, {
  20250. "label": "柳河县",
  20251. "value": "220524"
  20252. }, {
  20253. "label": "梅河口市",
  20254. "value": "220581"
  20255. }, {
  20256. "label": "集安市",
  20257. "value": "220582"
  20258. }], [{
  20259. "label": "浑江区",
  20260. "value": "220602"
  20261. }, {
  20262. "label": "江源区",
  20263. "value": "220605"
  20264. }, {
  20265. "label": "抚松县",
  20266. "value": "220621"
  20267. }, {
  20268. "label": "靖宇县",
  20269. "value": "220622"
  20270. }, {
  20271. "label": "长白朝鲜族自治县",
  20272. "value": "220623"
  20273. }, {
  20274. "label": "临江市",
  20275. "value": "220681"
  20276. }], [{
  20277. "label": "宁江区",
  20278. "value": "220702"
  20279. }, {
  20280. "label": "前郭尔罗斯蒙古族自治县",
  20281. "value": "220721"
  20282. }, {
  20283. "label": "长岭县",
  20284. "value": "220722"
  20285. }, {
  20286. "label": "乾安县",
  20287. "value": "220723"
  20288. }, {
  20289. "label": "吉林松原经济开发区",
  20290. "value": "220771"
  20291. }, {
  20292. "label": "扶余市",
  20293. "value": "220781"
  20294. }], [{
  20295. "label": "洮北区",
  20296. "value": "220802"
  20297. }, {
  20298. "label": "镇赉县",
  20299. "value": "220821"
  20300. }, {
  20301. "label": "通榆县",
  20302. "value": "220822"
  20303. }, {
  20304. "label": "吉林白城经济开发区",
  20305. "value": "220871"
  20306. }, {
  20307. "label": "洮南市",
  20308. "value": "220881"
  20309. }, {
  20310. "label": "大安市",
  20311. "value": "220882"
  20312. }], [{
  20313. "label": "延吉市",
  20314. "value": "222401"
  20315. }, {
  20316. "label": "图们市",
  20317. "value": "222402"
  20318. }, {
  20319. "label": "敦化市",
  20320. "value": "222403"
  20321. }, {
  20322. "label": "珲春市",
  20323. "value": "222404"
  20324. }, {
  20325. "label": "龙井市",
  20326. "value": "222405"
  20327. }, {
  20328. "label": "和龙市",
  20329. "value": "222406"
  20330. }, {
  20331. "label": "汪清县",
  20332. "value": "222424"
  20333. }, {
  20334. "label": "安图县",
  20335. "value": "222426"
  20336. }]], [[{
  20337. "label": "道里区",
  20338. "value": "230102"
  20339. }, {
  20340. "label": "南岗区",
  20341. "value": "230103"
  20342. }, {
  20343. "label": "道外区",
  20344. "value": "230104"
  20345. }, {
  20346. "label": "平房区",
  20347. "value": "230108"
  20348. }, {
  20349. "label": "松北区",
  20350. "value": "230109"
  20351. }, {
  20352. "label": "香坊区",
  20353. "value": "230110"
  20354. }, {
  20355. "label": "呼兰区",
  20356. "value": "230111"
  20357. }, {
  20358. "label": "阿城区",
  20359. "value": "230112"
  20360. }, {
  20361. "label": "双城区",
  20362. "value": "230113"
  20363. }, {
  20364. "label": "依兰县",
  20365. "value": "230123"
  20366. }, {
  20367. "label": "方正县",
  20368. "value": "230124"
  20369. }, {
  20370. "label": "宾县",
  20371. "value": "230125"
  20372. }, {
  20373. "label": "巴彦县",
  20374. "value": "230126"
  20375. }, {
  20376. "label": "木兰县",
  20377. "value": "230127"
  20378. }, {
  20379. "label": "通河县",
  20380. "value": "230128"
  20381. }, {
  20382. "label": "延寿县",
  20383. "value": "230129"
  20384. }, {
  20385. "label": "尚志市",
  20386. "value": "230183"
  20387. }, {
  20388. "label": "五常市",
  20389. "value": "230184"
  20390. }], [{
  20391. "label": "龙沙区",
  20392. "value": "230202"
  20393. }, {
  20394. "label": "建华区",
  20395. "value": "230203"
  20396. }, {
  20397. "label": "铁锋区",
  20398. "value": "230204"
  20399. }, {
  20400. "label": "昂昂溪区",
  20401. "value": "230205"
  20402. }, {
  20403. "label": "富拉尔基区",
  20404. "value": "230206"
  20405. }, {
  20406. "label": "碾子山区",
  20407. "value": "230207"
  20408. }, {
  20409. "label": "梅里斯达斡尔族区",
  20410. "value": "230208"
  20411. }, {
  20412. "label": "龙江县",
  20413. "value": "230221"
  20414. }, {
  20415. "label": "依安县",
  20416. "value": "230223"
  20417. }, {
  20418. "label": "泰来县",
  20419. "value": "230224"
  20420. }, {
  20421. "label": "甘南县",
  20422. "value": "230225"
  20423. }, {
  20424. "label": "富裕县",
  20425. "value": "230227"
  20426. }, {
  20427. "label": "克山县",
  20428. "value": "230229"
  20429. }, {
  20430. "label": "克东县",
  20431. "value": "230230"
  20432. }, {
  20433. "label": "拜泉县",
  20434. "value": "230231"
  20435. }, {
  20436. "label": "讷河市",
  20437. "value": "230281"
  20438. }], [{
  20439. "label": "鸡冠区",
  20440. "value": "230302"
  20441. }, {
  20442. "label": "恒山区",
  20443. "value": "230303"
  20444. }, {
  20445. "label": "滴道区",
  20446. "value": "230304"
  20447. }, {
  20448. "label": "梨树区",
  20449. "value": "230305"
  20450. }, {
  20451. "label": "城子河区",
  20452. "value": "230306"
  20453. }, {
  20454. "label": "麻山区",
  20455. "value": "230307"
  20456. }, {
  20457. "label": "鸡东县",
  20458. "value": "230321"
  20459. }, {
  20460. "label": "虎林市",
  20461. "value": "230381"
  20462. }, {
  20463. "label": "密山市",
  20464. "value": "230382"
  20465. }], [{
  20466. "label": "向阳区",
  20467. "value": "230402"
  20468. }, {
  20469. "label": "工农区",
  20470. "value": "230403"
  20471. }, {
  20472. "label": "南山区",
  20473. "value": "230404"
  20474. }, {
  20475. "label": "兴安区",
  20476. "value": "230405"
  20477. }, {
  20478. "label": "东山区",
  20479. "value": "230406"
  20480. }, {
  20481. "label": "兴山区",
  20482. "value": "230407"
  20483. }, {
  20484. "label": "萝北县",
  20485. "value": "230421"
  20486. }, {
  20487. "label": "绥滨县",
  20488. "value": "230422"
  20489. }], [{
  20490. "label": "尖山区",
  20491. "value": "230502"
  20492. }, {
  20493. "label": "岭东区",
  20494. "value": "230503"
  20495. }, {
  20496. "label": "四方台区",
  20497. "value": "230505"
  20498. }, {
  20499. "label": "宝山区",
  20500. "value": "230506"
  20501. }, {
  20502. "label": "集贤县",
  20503. "value": "230521"
  20504. }, {
  20505. "label": "友谊县",
  20506. "value": "230522"
  20507. }, {
  20508. "label": "宝清县",
  20509. "value": "230523"
  20510. }, {
  20511. "label": "饶河县",
  20512. "value": "230524"
  20513. }], [{
  20514. "label": "萨尔图区",
  20515. "value": "230602"
  20516. }, {
  20517. "label": "龙凤区",
  20518. "value": "230603"
  20519. }, {
  20520. "label": "让胡路区",
  20521. "value": "230604"
  20522. }, {
  20523. "label": "红岗区",
  20524. "value": "230605"
  20525. }, {
  20526. "label": "大同区",
  20527. "value": "230606"
  20528. }, {
  20529. "label": "肇州县",
  20530. "value": "230621"
  20531. }, {
  20532. "label": "肇源县",
  20533. "value": "230622"
  20534. }, {
  20535. "label": "林甸县",
  20536. "value": "230623"
  20537. }, {
  20538. "label": "杜尔伯特蒙古族自治县",
  20539. "value": "230624"
  20540. }, {
  20541. "label": "大庆高新技术产业开发区",
  20542. "value": "230671"
  20543. }], [{
  20544. "label": "伊春区",
  20545. "value": "230702"
  20546. }, {
  20547. "label": "南岔区",
  20548. "value": "230703"
  20549. }, {
  20550. "label": "友好区",
  20551. "value": "230704"
  20552. }, {
  20553. "label": "西林区",
  20554. "value": "230705"
  20555. }, {
  20556. "label": "翠峦区",
  20557. "value": "230706"
  20558. }, {
  20559. "label": "新青区",
  20560. "value": "230707"
  20561. }, {
  20562. "label": "美溪区",
  20563. "value": "230708"
  20564. }, {
  20565. "label": "金山屯区",
  20566. "value": "230709"
  20567. }, {
  20568. "label": "五营区",
  20569. "value": "230710"
  20570. }, {
  20571. "label": "乌马河区",
  20572. "value": "230711"
  20573. }, {
  20574. "label": "汤旺河区",
  20575. "value": "230712"
  20576. }, {
  20577. "label": "带岭区",
  20578. "value": "230713"
  20579. }, {
  20580. "label": "乌伊岭区",
  20581. "value": "230714"
  20582. }, {
  20583. "label": "红星区",
  20584. "value": "230715"
  20585. }, {
  20586. "label": "上甘岭区",
  20587. "value": "230716"
  20588. }, {
  20589. "label": "嘉荫县",
  20590. "value": "230722"
  20591. }, {
  20592. "label": "铁力市",
  20593. "value": "230781"
  20594. }], [{
  20595. "label": "向阳区",
  20596. "value": "230803"
  20597. }, {
  20598. "label": "前进区",
  20599. "value": "230804"
  20600. }, {
  20601. "label": "东风区",
  20602. "value": "230805"
  20603. }, {
  20604. "label": "郊区",
  20605. "value": "230811"
  20606. }, {
  20607. "label": "桦南县",
  20608. "value": "230822"
  20609. }, {
  20610. "label": "桦川县",
  20611. "value": "230826"
  20612. }, {
  20613. "label": "汤原县",
  20614. "value": "230828"
  20615. }, {
  20616. "label": "同江市",
  20617. "value": "230881"
  20618. }, {
  20619. "label": "富锦市",
  20620. "value": "230882"
  20621. }, {
  20622. "label": "抚远市",
  20623. "value": "230883"
  20624. }], [{
  20625. "label": "新兴区",
  20626. "value": "230902"
  20627. }, {
  20628. "label": "桃山区",
  20629. "value": "230903"
  20630. }, {
  20631. "label": "茄子河区",
  20632. "value": "230904"
  20633. }, {
  20634. "label": "勃利县",
  20635. "value": "230921"
  20636. }], [{
  20637. "label": "东安区",
  20638. "value": "231002"
  20639. }, {
  20640. "label": "阳明区",
  20641. "value": "231003"
  20642. }, {
  20643. "label": "爱民区",
  20644. "value": "231004"
  20645. }, {
  20646. "label": "西安区",
  20647. "value": "231005"
  20648. }, {
  20649. "label": "林口县",
  20650. "value": "231025"
  20651. }, {
  20652. "label": "牡丹江经济技术开发区",
  20653. "value": "231071"
  20654. }, {
  20655. "label": "绥芬河市",
  20656. "value": "231081"
  20657. }, {
  20658. "label": "海林市",
  20659. "value": "231083"
  20660. }, {
  20661. "label": "宁安市",
  20662. "value": "231084"
  20663. }, {
  20664. "label": "穆棱市",
  20665. "value": "231085"
  20666. }, {
  20667. "label": "东宁市",
  20668. "value": "231086"
  20669. }], [{
  20670. "label": "爱辉区",
  20671. "value": "231102"
  20672. }, {
  20673. "label": "嫩江县",
  20674. "value": "231121"
  20675. }, {
  20676. "label": "逊克县",
  20677. "value": "231123"
  20678. }, {
  20679. "label": "孙吴县",
  20680. "value": "231124"
  20681. }, {
  20682. "label": "北安市",
  20683. "value": "231181"
  20684. }, {
  20685. "label": "五大连池市",
  20686. "value": "231182"
  20687. }], [{
  20688. "label": "北林区",
  20689. "value": "231202"
  20690. }, {
  20691. "label": "望奎县",
  20692. "value": "231221"
  20693. }, {
  20694. "label": "兰西县",
  20695. "value": "231222"
  20696. }, {
  20697. "label": "青冈县",
  20698. "value": "231223"
  20699. }, {
  20700. "label": "庆安县",
  20701. "value": "231224"
  20702. }, {
  20703. "label": "明水县",
  20704. "value": "231225"
  20705. }, {
  20706. "label": "绥棱县",
  20707. "value": "231226"
  20708. }, {
  20709. "label": "安达市",
  20710. "value": "231281"
  20711. }, {
  20712. "label": "肇东市",
  20713. "value": "231282"
  20714. }, {
  20715. "label": "海伦市",
  20716. "value": "231283"
  20717. }], [{
  20718. "label": "加格达奇区",
  20719. "value": "232701"
  20720. }, {
  20721. "label": "松岭区",
  20722. "value": "232702"
  20723. }, {
  20724. "label": "新林区",
  20725. "value": "232703"
  20726. }, {
  20727. "label": "呼中区",
  20728. "value": "232704"
  20729. }, {
  20730. "label": "呼玛县",
  20731. "value": "232721"
  20732. }, {
  20733. "label": "塔河县",
  20734. "value": "232722"
  20735. }, {
  20736. "label": "漠河县",
  20737. "value": "232723"
  20738. }]], [[{
  20739. "label": "黄浦区",
  20740. "value": "310101"
  20741. }, {
  20742. "label": "徐汇区",
  20743. "value": "310104"
  20744. }, {
  20745. "label": "长宁区",
  20746. "value": "310105"
  20747. }, {
  20748. "label": "静安区",
  20749. "value": "310106"
  20750. }, {
  20751. "label": "普陀区",
  20752. "value": "310107"
  20753. }, {
  20754. "label": "虹口区",
  20755. "value": "310109"
  20756. }, {
  20757. "label": "杨浦区",
  20758. "value": "310110"
  20759. }, {
  20760. "label": "闵行区",
  20761. "value": "310112"
  20762. }, {
  20763. "label": "宝山区",
  20764. "value": "310113"
  20765. }, {
  20766. "label": "嘉定区",
  20767. "value": "310114"
  20768. }, {
  20769. "label": "浦东新区",
  20770. "value": "310115"
  20771. }, {
  20772. "label": "金山区",
  20773. "value": "310116"
  20774. }, {
  20775. "label": "松江区",
  20776. "value": "310117"
  20777. }, {
  20778. "label": "青浦区",
  20779. "value": "310118"
  20780. }, {
  20781. "label": "奉贤区",
  20782. "value": "310120"
  20783. }, {
  20784. "label": "崇明区",
  20785. "value": "310151"
  20786. }]], [[{
  20787. "label": "玄武区",
  20788. "value": "320102"
  20789. }, {
  20790. "label": "秦淮区",
  20791. "value": "320104"
  20792. }, {
  20793. "label": "建邺区",
  20794. "value": "320105"
  20795. }, {
  20796. "label": "鼓楼区",
  20797. "value": "320106"
  20798. }, {
  20799. "label": "浦口区",
  20800. "value": "320111"
  20801. }, {
  20802. "label": "栖霞区",
  20803. "value": "320113"
  20804. }, {
  20805. "label": "雨花台区",
  20806. "value": "320114"
  20807. }, {
  20808. "label": "江宁区",
  20809. "value": "320115"
  20810. }, {
  20811. "label": "六合区",
  20812. "value": "320116"
  20813. }, {
  20814. "label": "溧水区",
  20815. "value": "320117"
  20816. }, {
  20817. "label": "高淳区",
  20818. "value": "320118"
  20819. }], [{
  20820. "label": "锡山区",
  20821. "value": "320205"
  20822. }, {
  20823. "label": "惠山区",
  20824. "value": "320206"
  20825. }, {
  20826. "label": "滨湖区",
  20827. "value": "320211"
  20828. }, {
  20829. "label": "梁溪区",
  20830. "value": "320213"
  20831. }, {
  20832. "label": "新吴区",
  20833. "value": "320214"
  20834. }, {
  20835. "label": "江阴市",
  20836. "value": "320281"
  20837. }, {
  20838. "label": "宜兴市",
  20839. "value": "320282"
  20840. }], [{
  20841. "label": "鼓楼区",
  20842. "value": "320302"
  20843. }, {
  20844. "label": "云龙区",
  20845. "value": "320303"
  20846. }, {
  20847. "label": "贾汪区",
  20848. "value": "320305"
  20849. }, {
  20850. "label": "泉山区",
  20851. "value": "320311"
  20852. }, {
  20853. "label": "铜山区",
  20854. "value": "320312"
  20855. }, {
  20856. "label": "丰县",
  20857. "value": "320321"
  20858. }, {
  20859. "label": "沛县",
  20860. "value": "320322"
  20861. }, {
  20862. "label": "睢宁县",
  20863. "value": "320324"
  20864. }, {
  20865. "label": "徐州经济技术开发区",
  20866. "value": "320371"
  20867. }, {
  20868. "label": "新沂市",
  20869. "value": "320381"
  20870. }, {
  20871. "label": "邳州市",
  20872. "value": "320382"
  20873. }], [{
  20874. "label": "天宁区",
  20875. "value": "320402"
  20876. }, {
  20877. "label": "钟楼区",
  20878. "value": "320404"
  20879. }, {
  20880. "label": "新北区",
  20881. "value": "320411"
  20882. }, {
  20883. "label": "武进区",
  20884. "value": "320412"
  20885. }, {
  20886. "label": "金坛区",
  20887. "value": "320413"
  20888. }, {
  20889. "label": "溧阳市",
  20890. "value": "320481"
  20891. }], [{
  20892. "label": "虎丘区",
  20893. "value": "320505"
  20894. }, {
  20895. "label": "吴中区",
  20896. "value": "320506"
  20897. }, {
  20898. "label": "相城区",
  20899. "value": "320507"
  20900. }, {
  20901. "label": "姑苏区",
  20902. "value": "320508"
  20903. }, {
  20904. "label": "吴江区",
  20905. "value": "320509"
  20906. }, {
  20907. "label": "苏州工业园区",
  20908. "value": "320571"
  20909. }, {
  20910. "label": "常熟市",
  20911. "value": "320581"
  20912. }, {
  20913. "label": "张家港市",
  20914. "value": "320582"
  20915. }, {
  20916. "label": "昆山市",
  20917. "value": "320583"
  20918. }, {
  20919. "label": "太仓市",
  20920. "value": "320585"
  20921. }], [{
  20922. "label": "崇川区",
  20923. "value": "320602"
  20924. }, {
  20925. "label": "港闸区",
  20926. "value": "320611"
  20927. }, {
  20928. "label": "通州区",
  20929. "value": "320612"
  20930. }, {
  20931. "label": "海安县",
  20932. "value": "320621"
  20933. }, {
  20934. "label": "如东县",
  20935. "value": "320623"
  20936. }, {
  20937. "label": "南通经济技术开发区",
  20938. "value": "320671"
  20939. }, {
  20940. "label": "启东市",
  20941. "value": "320681"
  20942. }, {
  20943. "label": "如皋市",
  20944. "value": "320682"
  20945. }, {
  20946. "label": "海门市",
  20947. "value": "320684"
  20948. }], [{
  20949. "label": "连云区",
  20950. "value": "320703"
  20951. }, {
  20952. "label": "海州区",
  20953. "value": "320706"
  20954. }, {
  20955. "label": "赣榆区",
  20956. "value": "320707"
  20957. }, {
  20958. "label": "东海县",
  20959. "value": "320722"
  20960. }, {
  20961. "label": "灌云县",
  20962. "value": "320723"
  20963. }, {
  20964. "label": "灌南县",
  20965. "value": "320724"
  20966. }, {
  20967. "label": "连云港经济技术开发区",
  20968. "value": "320771"
  20969. }, {
  20970. "label": "连云港高新技术产业开发区",
  20971. "value": "320772"
  20972. }], [{
  20973. "label": "淮安区",
  20974. "value": "320803"
  20975. }, {
  20976. "label": "淮阴区",
  20977. "value": "320804"
  20978. }, {
  20979. "label": "清江浦区",
  20980. "value": "320812"
  20981. }, {
  20982. "label": "洪泽区",
  20983. "value": "320813"
  20984. }, {
  20985. "label": "涟水县",
  20986. "value": "320826"
  20987. }, {
  20988. "label": "盱眙县",
  20989. "value": "320830"
  20990. }, {
  20991. "label": "金湖县",
  20992. "value": "320831"
  20993. }, {
  20994. "label": "淮安经济技术开发区",
  20995. "value": "320871"
  20996. }], [{
  20997. "label": "亭湖区",
  20998. "value": "320902"
  20999. }, {
  21000. "label": "盐都区",
  21001. "value": "320903"
  21002. }, {
  21003. "label": "大丰区",
  21004. "value": "320904"
  21005. }, {
  21006. "label": "响水县",
  21007. "value": "320921"
  21008. }, {
  21009. "label": "滨海县",
  21010. "value": "320922"
  21011. }, {
  21012. "label": "阜宁县",
  21013. "value": "320923"
  21014. }, {
  21015. "label": "射阳县",
  21016. "value": "320924"
  21017. }, {
  21018. "label": "建湖县",
  21019. "value": "320925"
  21020. }, {
  21021. "label": "盐城经济技术开发区",
  21022. "value": "320971"
  21023. }, {
  21024. "label": "东台市",
  21025. "value": "320981"
  21026. }], [{
  21027. "label": "广陵区",
  21028. "value": "321002"
  21029. }, {
  21030. "label": "邗江区",
  21031. "value": "321003"
  21032. }, {
  21033. "label": "江都区",
  21034. "value": "321012"
  21035. }, {
  21036. "label": "宝应县",
  21037. "value": "321023"
  21038. }, {
  21039. "label": "扬州经济技术开发区",
  21040. "value": "321071"
  21041. }, {
  21042. "label": "仪征市",
  21043. "value": "321081"
  21044. }, {
  21045. "label": "高邮市",
  21046. "value": "321084"
  21047. }], [{
  21048. "label": "京口区",
  21049. "value": "321102"
  21050. }, {
  21051. "label": "润州区",
  21052. "value": "321111"
  21053. }, {
  21054. "label": "丹徒区",
  21055. "value": "321112"
  21056. }, {
  21057. "label": "镇江新区",
  21058. "value": "321171"
  21059. }, {
  21060. "label": "丹阳市",
  21061. "value": "321181"
  21062. }, {
  21063. "label": "扬中市",
  21064. "value": "321182"
  21065. }, {
  21066. "label": "句容市",
  21067. "value": "321183"
  21068. }], [{
  21069. "label": "海陵区",
  21070. "value": "321202"
  21071. }, {
  21072. "label": "高港区",
  21073. "value": "321203"
  21074. }, {
  21075. "label": "姜堰区",
  21076. "value": "321204"
  21077. }, {
  21078. "label": "泰州医药高新技术产业开发区",
  21079. "value": "321271"
  21080. }, {
  21081. "label": "兴化市",
  21082. "value": "321281"
  21083. }, {
  21084. "label": "靖江市",
  21085. "value": "321282"
  21086. }, {
  21087. "label": "泰兴市",
  21088. "value": "321283"
  21089. }], [{
  21090. "label": "宿城区",
  21091. "value": "321302"
  21092. }, {
  21093. "label": "宿豫区",
  21094. "value": "321311"
  21095. }, {
  21096. "label": "沭阳县",
  21097. "value": "321322"
  21098. }, {
  21099. "label": "泗阳县",
  21100. "value": "321323"
  21101. }, {
  21102. "label": "泗洪县",
  21103. "value": "321324"
  21104. }, {
  21105. "label": "宿迁经济技术开发区",
  21106. "value": "321371"
  21107. }]], [[{
  21108. "label": "上城区",
  21109. "value": "330102"
  21110. }, {
  21111. "label": "下城区",
  21112. "value": "330103"
  21113. }, {
  21114. "label": "江干区",
  21115. "value": "330104"
  21116. }, {
  21117. "label": "拱墅区",
  21118. "value": "330105"
  21119. }, {
  21120. "label": "西湖区",
  21121. "value": "330106"
  21122. }, {
  21123. "label": "滨江区",
  21124. "value": "330108"
  21125. }, {
  21126. "label": "萧山区",
  21127. "value": "330109"
  21128. }, {
  21129. "label": "余杭区",
  21130. "value": "330110"
  21131. }, {
  21132. "label": "富阳区",
  21133. "value": "330111"
  21134. }, {
  21135. "label": "临安区",
  21136. "value": "330112"
  21137. }, {
  21138. "label": "桐庐县",
  21139. "value": "330122"
  21140. }, {
  21141. "label": "淳安县",
  21142. "value": "330127"
  21143. }, {
  21144. "label": "建德市",
  21145. "value": "330182"
  21146. }], [{
  21147. "label": "海曙区",
  21148. "value": "330203"
  21149. }, {
  21150. "label": "江北区",
  21151. "value": "330205"
  21152. }, {
  21153. "label": "北仑区",
  21154. "value": "330206"
  21155. }, {
  21156. "label": "镇海区",
  21157. "value": "330211"
  21158. }, {
  21159. "label": "鄞州区",
  21160. "value": "330212"
  21161. }, {
  21162. "label": "奉化区",
  21163. "value": "330213"
  21164. }, {
  21165. "label": "象山县",
  21166. "value": "330225"
  21167. }, {
  21168. "label": "宁海县",
  21169. "value": "330226"
  21170. }, {
  21171. "label": "余姚市",
  21172. "value": "330281"
  21173. }, {
  21174. "label": "慈溪市",
  21175. "value": "330282"
  21176. }], [{
  21177. "label": "鹿城区",
  21178. "value": "330302"
  21179. }, {
  21180. "label": "龙湾区",
  21181. "value": "330303"
  21182. }, {
  21183. "label": "瓯海区",
  21184. "value": "330304"
  21185. }, {
  21186. "label": "洞头区",
  21187. "value": "330305"
  21188. }, {
  21189. "label": "永嘉县",
  21190. "value": "330324"
  21191. }, {
  21192. "label": "平阳县",
  21193. "value": "330326"
  21194. }, {
  21195. "label": "苍南县",
  21196. "value": "330327"
  21197. }, {
  21198. "label": "文成县",
  21199. "value": "330328"
  21200. }, {
  21201. "label": "泰顺县",
  21202. "value": "330329"
  21203. }, {
  21204. "label": "温州经济技术开发区",
  21205. "value": "330371"
  21206. }, {
  21207. "label": "瑞安市",
  21208. "value": "330381"
  21209. }, {
  21210. "label": "乐清市",
  21211. "value": "330382"
  21212. }], [{
  21213. "label": "南湖区",
  21214. "value": "330402"
  21215. }, {
  21216. "label": "秀洲区",
  21217. "value": "330411"
  21218. }, {
  21219. "label": "嘉善县",
  21220. "value": "330421"
  21221. }, {
  21222. "label": "海盐县",
  21223. "value": "330424"
  21224. }, {
  21225. "label": "海宁市",
  21226. "value": "330481"
  21227. }, {
  21228. "label": "平湖市",
  21229. "value": "330482"
  21230. }, {
  21231. "label": "桐乡市",
  21232. "value": "330483"
  21233. }], [{
  21234. "label": "吴兴区",
  21235. "value": "330502"
  21236. }, {
  21237. "label": "南浔区",
  21238. "value": "330503"
  21239. }, {
  21240. "label": "德清县",
  21241. "value": "330521"
  21242. }, {
  21243. "label": "长兴县",
  21244. "value": "330522"
  21245. }, {
  21246. "label": "安吉县",
  21247. "value": "330523"
  21248. }], [{
  21249. "label": "越城区",
  21250. "value": "330602"
  21251. }, {
  21252. "label": "柯桥区",
  21253. "value": "330603"
  21254. }, {
  21255. "label": "上虞区",
  21256. "value": "330604"
  21257. }, {
  21258. "label": "新昌县",
  21259. "value": "330624"
  21260. }, {
  21261. "label": "诸暨市",
  21262. "value": "330681"
  21263. }, {
  21264. "label": "嵊州市",
  21265. "value": "330683"
  21266. }], [{
  21267. "label": "婺城区",
  21268. "value": "330702"
  21269. }, {
  21270. "label": "金东区",
  21271. "value": "330703"
  21272. }, {
  21273. "label": "武义县",
  21274. "value": "330723"
  21275. }, {
  21276. "label": "浦江县",
  21277. "value": "330726"
  21278. }, {
  21279. "label": "磐安县",
  21280. "value": "330727"
  21281. }, {
  21282. "label": "兰溪市",
  21283. "value": "330781"
  21284. }, {
  21285. "label": "义乌市",
  21286. "value": "330782"
  21287. }, {
  21288. "label": "东阳市",
  21289. "value": "330783"
  21290. }, {
  21291. "label": "永康市",
  21292. "value": "330784"
  21293. }], [{
  21294. "label": "柯城区",
  21295. "value": "330802"
  21296. }, {
  21297. "label": "衢江区",
  21298. "value": "330803"
  21299. }, {
  21300. "label": "常山县",
  21301. "value": "330822"
  21302. }, {
  21303. "label": "开化县",
  21304. "value": "330824"
  21305. }, {
  21306. "label": "龙游县",
  21307. "value": "330825"
  21308. }, {
  21309. "label": "江山市",
  21310. "value": "330881"
  21311. }], [{
  21312. "label": "定海区",
  21313. "value": "330902"
  21314. }, {
  21315. "label": "普陀区",
  21316. "value": "330903"
  21317. }, {
  21318. "label": "岱山县",
  21319. "value": "330921"
  21320. }, {
  21321. "label": "嵊泗县",
  21322. "value": "330922"
  21323. }], [{
  21324. "label": "椒江区",
  21325. "value": "331002"
  21326. }, {
  21327. "label": "黄岩区",
  21328. "value": "331003"
  21329. }, {
  21330. "label": "路桥区",
  21331. "value": "331004"
  21332. }, {
  21333. "label": "三门县",
  21334. "value": "331022"
  21335. }, {
  21336. "label": "天台县",
  21337. "value": "331023"
  21338. }, {
  21339. "label": "仙居县",
  21340. "value": "331024"
  21341. }, {
  21342. "label": "温岭市",
  21343. "value": "331081"
  21344. }, {
  21345. "label": "临海市",
  21346. "value": "331082"
  21347. }, {
  21348. "label": "玉环市",
  21349. "value": "331083"
  21350. }], [{
  21351. "label": "莲都区",
  21352. "value": "331102"
  21353. }, {
  21354. "label": "青田县",
  21355. "value": "331121"
  21356. }, {
  21357. "label": "缙云县",
  21358. "value": "331122"
  21359. }, {
  21360. "label": "遂昌县",
  21361. "value": "331123"
  21362. }, {
  21363. "label": "松阳县",
  21364. "value": "331124"
  21365. }, {
  21366. "label": "云和县",
  21367. "value": "331125"
  21368. }, {
  21369. "label": "庆元县",
  21370. "value": "331126"
  21371. }, {
  21372. "label": "景宁畲族自治县",
  21373. "value": "331127"
  21374. }, {
  21375. "label": "龙泉市",
  21376. "value": "331181"
  21377. }]], [[{
  21378. "label": "瑶海区",
  21379. "value": "340102"
  21380. }, {
  21381. "label": "庐阳区",
  21382. "value": "340103"
  21383. }, {
  21384. "label": "蜀山区",
  21385. "value": "340104"
  21386. }, {
  21387. "label": "包河区",
  21388. "value": "340111"
  21389. }, {
  21390. "label": "长丰县",
  21391. "value": "340121"
  21392. }, {
  21393. "label": "肥东县",
  21394. "value": "340122"
  21395. }, {
  21396. "label": "肥西县",
  21397. "value": "340123"
  21398. }, {
  21399. "label": "庐江县",
  21400. "value": "340124"
  21401. }, {
  21402. "label": "合肥高新技术产业开发区",
  21403. "value": "340171"
  21404. }, {
  21405. "label": "合肥经济技术开发区",
  21406. "value": "340172"
  21407. }, {
  21408. "label": "合肥新站高新技术产业开发区",
  21409. "value": "340173"
  21410. }, {
  21411. "label": "巢湖市",
  21412. "value": "340181"
  21413. }], [{
  21414. "label": "镜湖区",
  21415. "value": "340202"
  21416. }, {
  21417. "label": "弋江区",
  21418. "value": "340203"
  21419. }, {
  21420. "label": "鸠江区",
  21421. "value": "340207"
  21422. }, {
  21423. "label": "三山区",
  21424. "value": "340208"
  21425. }, {
  21426. "label": "芜湖县",
  21427. "value": "340221"
  21428. }, {
  21429. "label": "繁昌县",
  21430. "value": "340222"
  21431. }, {
  21432. "label": "南陵县",
  21433. "value": "340223"
  21434. }, {
  21435. "label": "无为县",
  21436. "value": "340225"
  21437. }, {
  21438. "label": "芜湖经济技术开发区",
  21439. "value": "340271"
  21440. }, {
  21441. "label": "安徽芜湖长江大桥经济开发区",
  21442. "value": "340272"
  21443. }], [{
  21444. "label": "龙子湖区",
  21445. "value": "340302"
  21446. }, {
  21447. "label": "蚌山区",
  21448. "value": "340303"
  21449. }, {
  21450. "label": "禹会区",
  21451. "value": "340304"
  21452. }, {
  21453. "label": "淮上区",
  21454. "value": "340311"
  21455. }, {
  21456. "label": "怀远县",
  21457. "value": "340321"
  21458. }, {
  21459. "label": "五河县",
  21460. "value": "340322"
  21461. }, {
  21462. "label": "固镇县",
  21463. "value": "340323"
  21464. }, {
  21465. "label": "蚌埠市高新技术开发区",
  21466. "value": "340371"
  21467. }, {
  21468. "label": "蚌埠市经济开发区",
  21469. "value": "340372"
  21470. }], [{
  21471. "label": "大通区",
  21472. "value": "340402"
  21473. }, {
  21474. "label": "田家庵区",
  21475. "value": "340403"
  21476. }, {
  21477. "label": "谢家集区",
  21478. "value": "340404"
  21479. }, {
  21480. "label": "八公山区",
  21481. "value": "340405"
  21482. }, {
  21483. "label": "潘集区",
  21484. "value": "340406"
  21485. }, {
  21486. "label": "凤台县",
  21487. "value": "340421"
  21488. }, {
  21489. "label": "寿县",
  21490. "value": "340422"
  21491. }], [{
  21492. "label": "花山区",
  21493. "value": "340503"
  21494. }, {
  21495. "label": "雨山区",
  21496. "value": "340504"
  21497. }, {
  21498. "label": "博望区",
  21499. "value": "340506"
  21500. }, {
  21501. "label": "当涂县",
  21502. "value": "340521"
  21503. }, {
  21504. "label": "含山县",
  21505. "value": "340522"
  21506. }, {
  21507. "label": "和县",
  21508. "value": "340523"
  21509. }], [{
  21510. "label": "杜集区",
  21511. "value": "340602"
  21512. }, {
  21513. "label": "相山区",
  21514. "value": "340603"
  21515. }, {
  21516. "label": "烈山区",
  21517. "value": "340604"
  21518. }, {
  21519. "label": "濉溪县",
  21520. "value": "340621"
  21521. }], [{
  21522. "label": "铜官区",
  21523. "value": "340705"
  21524. }, {
  21525. "label": "义安区",
  21526. "value": "340706"
  21527. }, {
  21528. "label": "郊区",
  21529. "value": "340711"
  21530. }, {
  21531. "label": "枞阳县",
  21532. "value": "340722"
  21533. }], [{
  21534. "label": "迎江区",
  21535. "value": "340802"
  21536. }, {
  21537. "label": "大观区",
  21538. "value": "340803"
  21539. }, {
  21540. "label": "宜秀区",
  21541. "value": "340811"
  21542. }, {
  21543. "label": "怀宁县",
  21544. "value": "340822"
  21545. }, {
  21546. "label": "潜山县",
  21547. "value": "340824"
  21548. }, {
  21549. "label": "太湖县",
  21550. "value": "340825"
  21551. }, {
  21552. "label": "宿松县",
  21553. "value": "340826"
  21554. }, {
  21555. "label": "望江县",
  21556. "value": "340827"
  21557. }, {
  21558. "label": "岳西县",
  21559. "value": "340828"
  21560. }, {
  21561. "label": "安徽安庆经济开发区",
  21562. "value": "340871"
  21563. }, {
  21564. "label": "桐城市",
  21565. "value": "340881"
  21566. }], [{
  21567. "label": "屯溪区",
  21568. "value": "341002"
  21569. }, {
  21570. "label": "黄山区",
  21571. "value": "341003"
  21572. }, {
  21573. "label": "徽州区",
  21574. "value": "341004"
  21575. }, {
  21576. "label": "歙县",
  21577. "value": "341021"
  21578. }, {
  21579. "label": "休宁县",
  21580. "value": "341022"
  21581. }, {
  21582. "label": "黟县",
  21583. "value": "341023"
  21584. }, {
  21585. "label": "祁门县",
  21586. "value": "341024"
  21587. }], [{
  21588. "label": "琅琊区",
  21589. "value": "341102"
  21590. }, {
  21591. "label": "南谯区",
  21592. "value": "341103"
  21593. }, {
  21594. "label": "来安县",
  21595. "value": "341122"
  21596. }, {
  21597. "label": "全椒县",
  21598. "value": "341124"
  21599. }, {
  21600. "label": "定远县",
  21601. "value": "341125"
  21602. }, {
  21603. "label": "凤阳县",
  21604. "value": "341126"
  21605. }, {
  21606. "label": "苏滁现代产业园",
  21607. "value": "341171"
  21608. }, {
  21609. "label": "滁州经济技术开发区",
  21610. "value": "341172"
  21611. }, {
  21612. "label": "天长市",
  21613. "value": "341181"
  21614. }, {
  21615. "label": "明光市",
  21616. "value": "341182"
  21617. }], [{
  21618. "label": "颍州区",
  21619. "value": "341202"
  21620. }, {
  21621. "label": "颍东区",
  21622. "value": "341203"
  21623. }, {
  21624. "label": "颍泉区",
  21625. "value": "341204"
  21626. }, {
  21627. "label": "临泉县",
  21628. "value": "341221"
  21629. }, {
  21630. "label": "太和县",
  21631. "value": "341222"
  21632. }, {
  21633. "label": "阜南县",
  21634. "value": "341225"
  21635. }, {
  21636. "label": "颍上县",
  21637. "value": "341226"
  21638. }, {
  21639. "label": "阜阳合肥现代产业园区",
  21640. "value": "341271"
  21641. }, {
  21642. "label": "阜阳经济技术开发区",
  21643. "value": "341272"
  21644. }, {
  21645. "label": "界首市",
  21646. "value": "341282"
  21647. }], [{
  21648. "label": "埇桥区",
  21649. "value": "341302"
  21650. }, {
  21651. "label": "砀山县",
  21652. "value": "341321"
  21653. }, {
  21654. "label": "萧县",
  21655. "value": "341322"
  21656. }, {
  21657. "label": "灵璧县",
  21658. "value": "341323"
  21659. }, {
  21660. "label": "泗县",
  21661. "value": "341324"
  21662. }, {
  21663. "label": "宿州马鞍山现代产业园区",
  21664. "value": "341371"
  21665. }, {
  21666. "label": "宿州经济技术开发区",
  21667. "value": "341372"
  21668. }], [{
  21669. "label": "金安区",
  21670. "value": "341502"
  21671. }, {
  21672. "label": "裕安区",
  21673. "value": "341503"
  21674. }, {
  21675. "label": "叶集区",
  21676. "value": "341504"
  21677. }, {
  21678. "label": "霍邱县",
  21679. "value": "341522"
  21680. }, {
  21681. "label": "舒城县",
  21682. "value": "341523"
  21683. }, {
  21684. "label": "金寨县",
  21685. "value": "341524"
  21686. }, {
  21687. "label": "霍山县",
  21688. "value": "341525"
  21689. }], [{
  21690. "label": "谯城区",
  21691. "value": "341602"
  21692. }, {
  21693. "label": "涡阳县",
  21694. "value": "341621"
  21695. }, {
  21696. "label": "蒙城县",
  21697. "value": "341622"
  21698. }, {
  21699. "label": "利辛县",
  21700. "value": "341623"
  21701. }], [{
  21702. "label": "贵池区",
  21703. "value": "341702"
  21704. }, {
  21705. "label": "东至县",
  21706. "value": "341721"
  21707. }, {
  21708. "label": "石台县",
  21709. "value": "341722"
  21710. }, {
  21711. "label": "青阳县",
  21712. "value": "341723"
  21713. }], [{
  21714. "label": "宣州区",
  21715. "value": "341802"
  21716. }, {
  21717. "label": "郎溪县",
  21718. "value": "341821"
  21719. }, {
  21720. "label": "广德县",
  21721. "value": "341822"
  21722. }, {
  21723. "label": "泾县",
  21724. "value": "341823"
  21725. }, {
  21726. "label": "绩溪县",
  21727. "value": "341824"
  21728. }, {
  21729. "label": "旌德县",
  21730. "value": "341825"
  21731. }, {
  21732. "label": "宣城市经济开发区",
  21733. "value": "341871"
  21734. }, {
  21735. "label": "宁国市",
  21736. "value": "341881"
  21737. }]], [[{
  21738. "label": "鼓楼区",
  21739. "value": "350102"
  21740. }, {
  21741. "label": "台江区",
  21742. "value": "350103"
  21743. }, {
  21744. "label": "仓山区",
  21745. "value": "350104"
  21746. }, {
  21747. "label": "马尾区",
  21748. "value": "350105"
  21749. }, {
  21750. "label": "晋安区",
  21751. "value": "350111"
  21752. }, {
  21753. "label": "闽侯县",
  21754. "value": "350121"
  21755. }, {
  21756. "label": "连江县",
  21757. "value": "350122"
  21758. }, {
  21759. "label": "罗源县",
  21760. "value": "350123"
  21761. }, {
  21762. "label": "闽清县",
  21763. "value": "350124"
  21764. }, {
  21765. "label": "永泰县",
  21766. "value": "350125"
  21767. }, {
  21768. "label": "平潭县",
  21769. "value": "350128"
  21770. }, {
  21771. "label": "福清市",
  21772. "value": "350181"
  21773. }, {
  21774. "label": "长乐市",
  21775. "value": "350182"
  21776. }], [{
  21777. "label": "思明区",
  21778. "value": "350203"
  21779. }, {
  21780. "label": "海沧区",
  21781. "value": "350205"
  21782. }, {
  21783. "label": "湖里区",
  21784. "value": "350206"
  21785. }, {
  21786. "label": "集美区",
  21787. "value": "350211"
  21788. }, {
  21789. "label": "同安区",
  21790. "value": "350212"
  21791. }, {
  21792. "label": "翔安区",
  21793. "value": "350213"
  21794. }], [{
  21795. "label": "城厢区",
  21796. "value": "350302"
  21797. }, {
  21798. "label": "涵江区",
  21799. "value": "350303"
  21800. }, {
  21801. "label": "荔城区",
  21802. "value": "350304"
  21803. }, {
  21804. "label": "秀屿区",
  21805. "value": "350305"
  21806. }, {
  21807. "label": "仙游县",
  21808. "value": "350322"
  21809. }], [{
  21810. "label": "梅列区",
  21811. "value": "350402"
  21812. }, {
  21813. "label": "三元区",
  21814. "value": "350403"
  21815. }, {
  21816. "label": "明溪县",
  21817. "value": "350421"
  21818. }, {
  21819. "label": "清流县",
  21820. "value": "350423"
  21821. }, {
  21822. "label": "宁化县",
  21823. "value": "350424"
  21824. }, {
  21825. "label": "大田县",
  21826. "value": "350425"
  21827. }, {
  21828. "label": "尤溪县",
  21829. "value": "350426"
  21830. }, {
  21831. "label": "沙县",
  21832. "value": "350427"
  21833. }, {
  21834. "label": "将乐县",
  21835. "value": "350428"
  21836. }, {
  21837. "label": "泰宁县",
  21838. "value": "350429"
  21839. }, {
  21840. "label": "建宁县",
  21841. "value": "350430"
  21842. }, {
  21843. "label": "永安市",
  21844. "value": "350481"
  21845. }], [{
  21846. "label": "鲤城区",
  21847. "value": "350502"
  21848. }, {
  21849. "label": "丰泽区",
  21850. "value": "350503"
  21851. }, {
  21852. "label": "洛江区",
  21853. "value": "350504"
  21854. }, {
  21855. "label": "泉港区",
  21856. "value": "350505"
  21857. }, {
  21858. "label": "惠安县",
  21859. "value": "350521"
  21860. }, {
  21861. "label": "安溪县",
  21862. "value": "350524"
  21863. }, {
  21864. "label": "永春县",
  21865. "value": "350525"
  21866. }, {
  21867. "label": "德化县",
  21868. "value": "350526"
  21869. }, {
  21870. "label": "金门县",
  21871. "value": "350527"
  21872. }, {
  21873. "label": "石狮市",
  21874. "value": "350581"
  21875. }, {
  21876. "label": "晋江市",
  21877. "value": "350582"
  21878. }, {
  21879. "label": "南安市",
  21880. "value": "350583"
  21881. }], [{
  21882. "label": "芗城区",
  21883. "value": "350602"
  21884. }, {
  21885. "label": "龙文区",
  21886. "value": "350603"
  21887. }, {
  21888. "label": "云霄县",
  21889. "value": "350622"
  21890. }, {
  21891. "label": "漳浦县",
  21892. "value": "350623"
  21893. }, {
  21894. "label": "诏安县",
  21895. "value": "350624"
  21896. }, {
  21897. "label": "长泰县",
  21898. "value": "350625"
  21899. }, {
  21900. "label": "东山县",
  21901. "value": "350626"
  21902. }, {
  21903. "label": "南靖县",
  21904. "value": "350627"
  21905. }, {
  21906. "label": "平和县",
  21907. "value": "350628"
  21908. }, {
  21909. "label": "华安县",
  21910. "value": "350629"
  21911. }, {
  21912. "label": "龙海市",
  21913. "value": "350681"
  21914. }], [{
  21915. "label": "延平区",
  21916. "value": "350702"
  21917. }, {
  21918. "label": "建阳区",
  21919. "value": "350703"
  21920. }, {
  21921. "label": "顺昌县",
  21922. "value": "350721"
  21923. }, {
  21924. "label": "浦城县",
  21925. "value": "350722"
  21926. }, {
  21927. "label": "光泽县",
  21928. "value": "350723"
  21929. }, {
  21930. "label": "松溪县",
  21931. "value": "350724"
  21932. }, {
  21933. "label": "政和县",
  21934. "value": "350725"
  21935. }, {
  21936. "label": "邵武市",
  21937. "value": "350781"
  21938. }, {
  21939. "label": "武夷山市",
  21940. "value": "350782"
  21941. }, {
  21942. "label": "建瓯市",
  21943. "value": "350783"
  21944. }], [{
  21945. "label": "新罗区",
  21946. "value": "350802"
  21947. }, {
  21948. "label": "永定区",
  21949. "value": "350803"
  21950. }, {
  21951. "label": "长汀县",
  21952. "value": "350821"
  21953. }, {
  21954. "label": "上杭县",
  21955. "value": "350823"
  21956. }, {
  21957. "label": "武平县",
  21958. "value": "350824"
  21959. }, {
  21960. "label": "连城县",
  21961. "value": "350825"
  21962. }, {
  21963. "label": "漳平市",
  21964. "value": "350881"
  21965. }], [{
  21966. "label": "蕉城区",
  21967. "value": "350902"
  21968. }, {
  21969. "label": "霞浦县",
  21970. "value": "350921"
  21971. }, {
  21972. "label": "古田县",
  21973. "value": "350922"
  21974. }, {
  21975. "label": "屏南县",
  21976. "value": "350923"
  21977. }, {
  21978. "label": "寿宁县",
  21979. "value": "350924"
  21980. }, {
  21981. "label": "周宁县",
  21982. "value": "350925"
  21983. }, {
  21984. "label": "柘荣县",
  21985. "value": "350926"
  21986. }, {
  21987. "label": "福安市",
  21988. "value": "350981"
  21989. }, {
  21990. "label": "福鼎市",
  21991. "value": "350982"
  21992. }]], [[{
  21993. "label": "东湖区",
  21994. "value": "360102"
  21995. }, {
  21996. "label": "西湖区",
  21997. "value": "360103"
  21998. }, {
  21999. "label": "青云谱区",
  22000. "value": "360104"
  22001. }, {
  22002. "label": "湾里区",
  22003. "value": "360105"
  22004. }, {
  22005. "label": "青山湖区",
  22006. "value": "360111"
  22007. }, {
  22008. "label": "新建区",
  22009. "value": "360112"
  22010. }, {
  22011. "label": "南昌县",
  22012. "value": "360121"
  22013. }, {
  22014. "label": "安义县",
  22015. "value": "360123"
  22016. }, {
  22017. "label": "进贤县",
  22018. "value": "360124"
  22019. }], [{
  22020. "label": "昌江区",
  22021. "value": "360202"
  22022. }, {
  22023. "label": "珠山区",
  22024. "value": "360203"
  22025. }, {
  22026. "label": "浮梁县",
  22027. "value": "360222"
  22028. }, {
  22029. "label": "乐平市",
  22030. "value": "360281"
  22031. }], [{
  22032. "label": "安源区",
  22033. "value": "360302"
  22034. }, {
  22035. "label": "湘东区",
  22036. "value": "360313"
  22037. }, {
  22038. "label": "莲花县",
  22039. "value": "360321"
  22040. }, {
  22041. "label": "上栗县",
  22042. "value": "360322"
  22043. }, {
  22044. "label": "芦溪县",
  22045. "value": "360323"
  22046. }], [{
  22047. "label": "濂溪区",
  22048. "value": "360402"
  22049. }, {
  22050. "label": "浔阳区",
  22051. "value": "360403"
  22052. }, {
  22053. "label": "柴桑区",
  22054. "value": "360404"
  22055. }, {
  22056. "label": "武宁县",
  22057. "value": "360423"
  22058. }, {
  22059. "label": "修水县",
  22060. "value": "360424"
  22061. }, {
  22062. "label": "永修县",
  22063. "value": "360425"
  22064. }, {
  22065. "label": "德安县",
  22066. "value": "360426"
  22067. }, {
  22068. "label": "都昌县",
  22069. "value": "360428"
  22070. }, {
  22071. "label": "湖口县",
  22072. "value": "360429"
  22073. }, {
  22074. "label": "彭泽县",
  22075. "value": "360430"
  22076. }, {
  22077. "label": "瑞昌市",
  22078. "value": "360481"
  22079. }, {
  22080. "label": "共青城市",
  22081. "value": "360482"
  22082. }, {
  22083. "label": "庐山市",
  22084. "value": "360483"
  22085. }], [{
  22086. "label": "渝水区",
  22087. "value": "360502"
  22088. }, {
  22089. "label": "分宜县",
  22090. "value": "360521"
  22091. }], [{
  22092. "label": "月湖区",
  22093. "value": "360602"
  22094. }, {
  22095. "label": "余江县",
  22096. "value": "360622"
  22097. }, {
  22098. "label": "贵溪市",
  22099. "value": "360681"
  22100. }], [{
  22101. "label": "章贡区",
  22102. "value": "360702"
  22103. }, {
  22104. "label": "南康区",
  22105. "value": "360703"
  22106. }, {
  22107. "label": "赣县区",
  22108. "value": "360704"
  22109. }, {
  22110. "label": "信丰县",
  22111. "value": "360722"
  22112. }, {
  22113. "label": "大余县",
  22114. "value": "360723"
  22115. }, {
  22116. "label": "上犹县",
  22117. "value": "360724"
  22118. }, {
  22119. "label": "崇义县",
  22120. "value": "360725"
  22121. }, {
  22122. "label": "安远县",
  22123. "value": "360726"
  22124. }, {
  22125. "label": "龙南县",
  22126. "value": "360727"
  22127. }, {
  22128. "label": "定南县",
  22129. "value": "360728"
  22130. }, {
  22131. "label": "全南县",
  22132. "value": "360729"
  22133. }, {
  22134. "label": "宁都县",
  22135. "value": "360730"
  22136. }, {
  22137. "label": "于都县",
  22138. "value": "360731"
  22139. }, {
  22140. "label": "兴国县",
  22141. "value": "360732"
  22142. }, {
  22143. "label": "会昌县",
  22144. "value": "360733"
  22145. }, {
  22146. "label": "寻乌县",
  22147. "value": "360734"
  22148. }, {
  22149. "label": "石城县",
  22150. "value": "360735"
  22151. }, {
  22152. "label": "瑞金市",
  22153. "value": "360781"
  22154. }], [{
  22155. "label": "吉州区",
  22156. "value": "360802"
  22157. }, {
  22158. "label": "青原区",
  22159. "value": "360803"
  22160. }, {
  22161. "label": "吉安县",
  22162. "value": "360821"
  22163. }, {
  22164. "label": "吉水县",
  22165. "value": "360822"
  22166. }, {
  22167. "label": "峡江县",
  22168. "value": "360823"
  22169. }, {
  22170. "label": "新干县",
  22171. "value": "360824"
  22172. }, {
  22173. "label": "永丰县",
  22174. "value": "360825"
  22175. }, {
  22176. "label": "泰和县",
  22177. "value": "360826"
  22178. }, {
  22179. "label": "遂川县",
  22180. "value": "360827"
  22181. }, {
  22182. "label": "万安县",
  22183. "value": "360828"
  22184. }, {
  22185. "label": "安福县",
  22186. "value": "360829"
  22187. }, {
  22188. "label": "永新县",
  22189. "value": "360830"
  22190. }, {
  22191. "label": "井冈山市",
  22192. "value": "360881"
  22193. }], [{
  22194. "label": "袁州区",
  22195. "value": "360902"
  22196. }, {
  22197. "label": "奉新县",
  22198. "value": "360921"
  22199. }, {
  22200. "label": "万载县",
  22201. "value": "360922"
  22202. }, {
  22203. "label": "上高县",
  22204. "value": "360923"
  22205. }, {
  22206. "label": "宜丰县",
  22207. "value": "360924"
  22208. }, {
  22209. "label": "靖安县",
  22210. "value": "360925"
  22211. }, {
  22212. "label": "铜鼓县",
  22213. "value": "360926"
  22214. }, {
  22215. "label": "丰城市",
  22216. "value": "360981"
  22217. }, {
  22218. "label": "樟树市",
  22219. "value": "360982"
  22220. }, {
  22221. "label": "高安市",
  22222. "value": "360983"
  22223. }], [{
  22224. "label": "临川区",
  22225. "value": "361002"
  22226. }, {
  22227. "label": "东乡区",
  22228. "value": "361003"
  22229. }, {
  22230. "label": "南城县",
  22231. "value": "361021"
  22232. }, {
  22233. "label": "黎川县",
  22234. "value": "361022"
  22235. }, {
  22236. "label": "南丰县",
  22237. "value": "361023"
  22238. }, {
  22239. "label": "崇仁县",
  22240. "value": "361024"
  22241. }, {
  22242. "label": "乐安县",
  22243. "value": "361025"
  22244. }, {
  22245. "label": "宜黄县",
  22246. "value": "361026"
  22247. }, {
  22248. "label": "金溪县",
  22249. "value": "361027"
  22250. }, {
  22251. "label": "资溪县",
  22252. "value": "361028"
  22253. }, {
  22254. "label": "广昌县",
  22255. "value": "361030"
  22256. }], [{
  22257. "label": "信州区",
  22258. "value": "361102"
  22259. }, {
  22260. "label": "广丰区",
  22261. "value": "361103"
  22262. }, {
  22263. "label": "上饶县",
  22264. "value": "361121"
  22265. }, {
  22266. "label": "玉山县",
  22267. "value": "361123"
  22268. }, {
  22269. "label": "铅山县",
  22270. "value": "361124"
  22271. }, {
  22272. "label": "横峰县",
  22273. "value": "361125"
  22274. }, {
  22275. "label": "弋阳县",
  22276. "value": "361126"
  22277. }, {
  22278. "label": "余干县",
  22279. "value": "361127"
  22280. }, {
  22281. "label": "鄱阳县",
  22282. "value": "361128"
  22283. }, {
  22284. "label": "万年县",
  22285. "value": "361129"
  22286. }, {
  22287. "label": "婺源县",
  22288. "value": "361130"
  22289. }, {
  22290. "label": "德兴市",
  22291. "value": "361181"
  22292. }]], [[{
  22293. "label": "历下区",
  22294. "value": "370102"
  22295. }, {
  22296. "label": "市中区",
  22297. "value": "370103"
  22298. }, {
  22299. "label": "槐荫区",
  22300. "value": "370104"
  22301. }, {
  22302. "label": "天桥区",
  22303. "value": "370105"
  22304. }, {
  22305. "label": "历城区",
  22306. "value": "370112"
  22307. }, {
  22308. "label": "长清区",
  22309. "value": "370113"
  22310. }, {
  22311. "label": "章丘区",
  22312. "value": "370114"
  22313. }, {
  22314. "label": "平阴县",
  22315. "value": "370124"
  22316. }, {
  22317. "label": "济阳县",
  22318. "value": "370125"
  22319. }, {
  22320. "label": "商河县",
  22321. "value": "370126"
  22322. }, {
  22323. "label": "济南高新技术产业开发区",
  22324. "value": "370171"
  22325. }], [{
  22326. "label": "市南区",
  22327. "value": "370202"
  22328. }, {
  22329. "label": "市北区",
  22330. "value": "370203"
  22331. }, {
  22332. "label": "黄岛区",
  22333. "value": "370211"
  22334. }, {
  22335. "label": "崂山区",
  22336. "value": "370212"
  22337. }, {
  22338. "label": "李沧区",
  22339. "value": "370213"
  22340. }, {
  22341. "label": "城阳区",
  22342. "value": "370214"
  22343. }, {
  22344. "label": "即墨区",
  22345. "value": "370215"
  22346. }, {
  22347. "label": "青岛高新技术产业开发区",
  22348. "value": "370271"
  22349. }, {
  22350. "label": "胶州市",
  22351. "value": "370281"
  22352. }, {
  22353. "label": "平度市",
  22354. "value": "370283"
  22355. }, {
  22356. "label": "莱西市",
  22357. "value": "370285"
  22358. }], [{
  22359. "label": "淄川区",
  22360. "value": "370302"
  22361. }, {
  22362. "label": "张店区",
  22363. "value": "370303"
  22364. }, {
  22365. "label": "博山区",
  22366. "value": "370304"
  22367. }, {
  22368. "label": "临淄区",
  22369. "value": "370305"
  22370. }, {
  22371. "label": "周村区",
  22372. "value": "370306"
  22373. }, {
  22374. "label": "桓台县",
  22375. "value": "370321"
  22376. }, {
  22377. "label": "高青县",
  22378. "value": "370322"
  22379. }, {
  22380. "label": "沂源县",
  22381. "value": "370323"
  22382. }], [{
  22383. "label": "市中区",
  22384. "value": "370402"
  22385. }, {
  22386. "label": "薛城区",
  22387. "value": "370403"
  22388. }, {
  22389. "label": "峄城区",
  22390. "value": "370404"
  22391. }, {
  22392. "label": "台儿庄区",
  22393. "value": "370405"
  22394. }, {
  22395. "label": "山亭区",
  22396. "value": "370406"
  22397. }, {
  22398. "label": "滕州市",
  22399. "value": "370481"
  22400. }], [{
  22401. "label": "东营区",
  22402. "value": "370502"
  22403. }, {
  22404. "label": "河口区",
  22405. "value": "370503"
  22406. }, {
  22407. "label": "垦利区",
  22408. "value": "370505"
  22409. }, {
  22410. "label": "利津县",
  22411. "value": "370522"
  22412. }, {
  22413. "label": "广饶县",
  22414. "value": "370523"
  22415. }, {
  22416. "label": "东营经济技术开发区",
  22417. "value": "370571"
  22418. }, {
  22419. "label": "东营港经济开发区",
  22420. "value": "370572"
  22421. }], [{
  22422. "label": "芝罘区",
  22423. "value": "370602"
  22424. }, {
  22425. "label": "福山区",
  22426. "value": "370611"
  22427. }, {
  22428. "label": "牟平区",
  22429. "value": "370612"
  22430. }, {
  22431. "label": "莱山区",
  22432. "value": "370613"
  22433. }, {
  22434. "label": "长岛县",
  22435. "value": "370634"
  22436. }, {
  22437. "label": "烟台高新技术产业开发区",
  22438. "value": "370671"
  22439. }, {
  22440. "label": "烟台经济技术开发区",
  22441. "value": "370672"
  22442. }, {
  22443. "label": "龙口市",
  22444. "value": "370681"
  22445. }, {
  22446. "label": "莱阳市",
  22447. "value": "370682"
  22448. }, {
  22449. "label": "莱州市",
  22450. "value": "370683"
  22451. }, {
  22452. "label": "蓬莱市",
  22453. "value": "370684"
  22454. }, {
  22455. "label": "招远市",
  22456. "value": "370685"
  22457. }, {
  22458. "label": "栖霞市",
  22459. "value": "370686"
  22460. }, {
  22461. "label": "海阳市",
  22462. "value": "370687"
  22463. }], [{
  22464. "label": "潍城区",
  22465. "value": "370702"
  22466. }, {
  22467. "label": "寒亭区",
  22468. "value": "370703"
  22469. }, {
  22470. "label": "坊子区",
  22471. "value": "370704"
  22472. }, {
  22473. "label": "奎文区",
  22474. "value": "370705"
  22475. }, {
  22476. "label": "临朐县",
  22477. "value": "370724"
  22478. }, {
  22479. "label": "昌乐县",
  22480. "value": "370725"
  22481. }, {
  22482. "label": "潍坊滨海经济技术开发区",
  22483. "value": "370772"
  22484. }, {
  22485. "label": "青州市",
  22486. "value": "370781"
  22487. }, {
  22488. "label": "诸城市",
  22489. "value": "370782"
  22490. }, {
  22491. "label": "寿光市",
  22492. "value": "370783"
  22493. }, {
  22494. "label": "安丘市",
  22495. "value": "370784"
  22496. }, {
  22497. "label": "高密市",
  22498. "value": "370785"
  22499. }, {
  22500. "label": "昌邑市",
  22501. "value": "370786"
  22502. }], [{
  22503. "label": "任城区",
  22504. "value": "370811"
  22505. }, {
  22506. "label": "兖州区",
  22507. "value": "370812"
  22508. }, {
  22509. "label": "微山县",
  22510. "value": "370826"
  22511. }, {
  22512. "label": "鱼台县",
  22513. "value": "370827"
  22514. }, {
  22515. "label": "金乡县",
  22516. "value": "370828"
  22517. }, {
  22518. "label": "嘉祥县",
  22519. "value": "370829"
  22520. }, {
  22521. "label": "汶上县",
  22522. "value": "370830"
  22523. }, {
  22524. "label": "泗水县",
  22525. "value": "370831"
  22526. }, {
  22527. "label": "梁山县",
  22528. "value": "370832"
  22529. }, {
  22530. "label": "济宁高新技术产业开发区",
  22531. "value": "370871"
  22532. }, {
  22533. "label": "曲阜市",
  22534. "value": "370881"
  22535. }, {
  22536. "label": "邹城市",
  22537. "value": "370883"
  22538. }], [{
  22539. "label": "泰山区",
  22540. "value": "370902"
  22541. }, {
  22542. "label": "岱岳区",
  22543. "value": "370911"
  22544. }, {
  22545. "label": "宁阳县",
  22546. "value": "370921"
  22547. }, {
  22548. "label": "东平县",
  22549. "value": "370923"
  22550. }, {
  22551. "label": "新泰市",
  22552. "value": "370982"
  22553. }, {
  22554. "label": "肥城市",
  22555. "value": "370983"
  22556. }], [{
  22557. "label": "环翠区",
  22558. "value": "371002"
  22559. }, {
  22560. "label": "文登区",
  22561. "value": "371003"
  22562. }, {
  22563. "label": "威海火炬高技术产业开发区",
  22564. "value": "371071"
  22565. }, {
  22566. "label": "威海经济技术开发区",
  22567. "value": "371072"
  22568. }, {
  22569. "label": "威海临港经济技术开发区",
  22570. "value": "371073"
  22571. }, {
  22572. "label": "荣成市",
  22573. "value": "371082"
  22574. }, {
  22575. "label": "乳山市",
  22576. "value": "371083"
  22577. }], [{
  22578. "label": "东港区",
  22579. "value": "371102"
  22580. }, {
  22581. "label": "岚山区",
  22582. "value": "371103"
  22583. }, {
  22584. "label": "五莲县",
  22585. "value": "371121"
  22586. }, {
  22587. "label": "莒县",
  22588. "value": "371122"
  22589. }, {
  22590. "label": "日照经济技术开发区",
  22591. "value": "371171"
  22592. }, {
  22593. "label": "日照国际海洋城",
  22594. "value": "371172"
  22595. }], [{
  22596. "label": "莱城区",
  22597. "value": "371202"
  22598. }, {
  22599. "label": "钢城区",
  22600. "value": "371203"
  22601. }], [{
  22602. "label": "兰山区",
  22603. "value": "371302"
  22604. }, {
  22605. "label": "罗庄区",
  22606. "value": "371311"
  22607. }, {
  22608. "label": "河东区",
  22609. "value": "371312"
  22610. }, {
  22611. "label": "沂南县",
  22612. "value": "371321"
  22613. }, {
  22614. "label": "郯城县",
  22615. "value": "371322"
  22616. }, {
  22617. "label": "沂水县",
  22618. "value": "371323"
  22619. }, {
  22620. "label": "兰陵县",
  22621. "value": "371324"
  22622. }, {
  22623. "label": "费县",
  22624. "value": "371325"
  22625. }, {
  22626. "label": "平邑县",
  22627. "value": "371326"
  22628. }, {
  22629. "label": "莒南县",
  22630. "value": "371327"
  22631. }, {
  22632. "label": "蒙阴县",
  22633. "value": "371328"
  22634. }, {
  22635. "label": "临沭县",
  22636. "value": "371329"
  22637. }, {
  22638. "label": "临沂高新技术产业开发区",
  22639. "value": "371371"
  22640. }, {
  22641. "label": "临沂经济技术开发区",
  22642. "value": "371372"
  22643. }, {
  22644. "label": "临沂临港经济开发区",
  22645. "value": "371373"
  22646. }], [{
  22647. "label": "德城区",
  22648. "value": "371402"
  22649. }, {
  22650. "label": "陵城区",
  22651. "value": "371403"
  22652. }, {
  22653. "label": "宁津县",
  22654. "value": "371422"
  22655. }, {
  22656. "label": "庆云县",
  22657. "value": "371423"
  22658. }, {
  22659. "label": "临邑县",
  22660. "value": "371424"
  22661. }, {
  22662. "label": "齐河县",
  22663. "value": "371425"
  22664. }, {
  22665. "label": "平原县",
  22666. "value": "371426"
  22667. }, {
  22668. "label": "夏津县",
  22669. "value": "371427"
  22670. }, {
  22671. "label": "武城县",
  22672. "value": "371428"
  22673. }, {
  22674. "label": "德州经济技术开发区",
  22675. "value": "371471"
  22676. }, {
  22677. "label": "德州运河经济开发区",
  22678. "value": "371472"
  22679. }, {
  22680. "label": "乐陵市",
  22681. "value": "371481"
  22682. }, {
  22683. "label": "禹城市",
  22684. "value": "371482"
  22685. }], [{
  22686. "label": "东昌府区",
  22687. "value": "371502"
  22688. }, {
  22689. "label": "阳谷县",
  22690. "value": "371521"
  22691. }, {
  22692. "label": "莘县",
  22693. "value": "371522"
  22694. }, {
  22695. "label": "茌平县",
  22696. "value": "371523"
  22697. }, {
  22698. "label": "东阿县",
  22699. "value": "371524"
  22700. }, {
  22701. "label": "冠县",
  22702. "value": "371525"
  22703. }, {
  22704. "label": "高唐县",
  22705. "value": "371526"
  22706. }, {
  22707. "label": "临清市",
  22708. "value": "371581"
  22709. }], [{
  22710. "label": "滨城区",
  22711. "value": "371602"
  22712. }, {
  22713. "label": "沾化区",
  22714. "value": "371603"
  22715. }, {
  22716. "label": "惠民县",
  22717. "value": "371621"
  22718. }, {
  22719. "label": "阳信县",
  22720. "value": "371622"
  22721. }, {
  22722. "label": "无棣县",
  22723. "value": "371623"
  22724. }, {
  22725. "label": "博兴县",
  22726. "value": "371625"
  22727. }, {
  22728. "label": "邹平县",
  22729. "value": "371626"
  22730. }], [{
  22731. "label": "牡丹区",
  22732. "value": "371702"
  22733. }, {
  22734. "label": "定陶区",
  22735. "value": "371703"
  22736. }, {
  22737. "label": "曹县",
  22738. "value": "371721"
  22739. }, {
  22740. "label": "单县",
  22741. "value": "371722"
  22742. }, {
  22743. "label": "成武县",
  22744. "value": "371723"
  22745. }, {
  22746. "label": "巨野县",
  22747. "value": "371724"
  22748. }, {
  22749. "label": "郓城县",
  22750. "value": "371725"
  22751. }, {
  22752. "label": "鄄城县",
  22753. "value": "371726"
  22754. }, {
  22755. "label": "东明县",
  22756. "value": "371728"
  22757. }, {
  22758. "label": "菏泽经济技术开发区",
  22759. "value": "371771"
  22760. }, {
  22761. "label": "菏泽高新技术开发区",
  22762. "value": "371772"
  22763. }]], [[{
  22764. "label": "中原区",
  22765. "value": "410102"
  22766. }, {
  22767. "label": "二七区",
  22768. "value": "410103"
  22769. }, {
  22770. "label": "管城回族区",
  22771. "value": "410104"
  22772. }, {
  22773. "label": "金水区",
  22774. "value": "410105"
  22775. }, {
  22776. "label": "上街区",
  22777. "value": "410106"
  22778. }, {
  22779. "label": "惠济区",
  22780. "value": "410108"
  22781. }, {
  22782. "label": "中牟县",
  22783. "value": "410122"
  22784. }, {
  22785. "label": "郑州经济技术开发区",
  22786. "value": "410171"
  22787. }, {
  22788. "label": "郑州高新技术产业开发区",
  22789. "value": "410172"
  22790. }, {
  22791. "label": "郑州航空港经济综合实验区",
  22792. "value": "410173"
  22793. }, {
  22794. "label": "巩义市",
  22795. "value": "410181"
  22796. }, {
  22797. "label": "荥阳市",
  22798. "value": "410182"
  22799. }, {
  22800. "label": "新密市",
  22801. "value": "410183"
  22802. }, {
  22803. "label": "新郑市",
  22804. "value": "410184"
  22805. }, {
  22806. "label": "登封市",
  22807. "value": "410185"
  22808. }], [{
  22809. "label": "龙亭区",
  22810. "value": "410202"
  22811. }, {
  22812. "label": "顺河回族区",
  22813. "value": "410203"
  22814. }, {
  22815. "label": "鼓楼区",
  22816. "value": "410204"
  22817. }, {
  22818. "label": "禹王台区",
  22819. "value": "410205"
  22820. }, {
  22821. "label": "祥符区",
  22822. "value": "410212"
  22823. }, {
  22824. "label": "杞县",
  22825. "value": "410221"
  22826. }, {
  22827. "label": "通许县",
  22828. "value": "410222"
  22829. }, {
  22830. "label": "尉氏县",
  22831. "value": "410223"
  22832. }, {
  22833. "label": "兰考县",
  22834. "value": "410225"
  22835. }], [{
  22836. "label": "老城区",
  22837. "value": "410302"
  22838. }, {
  22839. "label": "西工区",
  22840. "value": "410303"
  22841. }, {
  22842. "label": "瀍河回族区",
  22843. "value": "410304"
  22844. }, {
  22845. "label": "涧西区",
  22846. "value": "410305"
  22847. }, {
  22848. "label": "吉利区",
  22849. "value": "410306"
  22850. }, {
  22851. "label": "洛龙区",
  22852. "value": "410311"
  22853. }, {
  22854. "label": "孟津县",
  22855. "value": "410322"
  22856. }, {
  22857. "label": "新安县",
  22858. "value": "410323"
  22859. }, {
  22860. "label": "栾川县",
  22861. "value": "410324"
  22862. }, {
  22863. "label": "嵩县",
  22864. "value": "410325"
  22865. }, {
  22866. "label": "汝阳县",
  22867. "value": "410326"
  22868. }, {
  22869. "label": "宜阳县",
  22870. "value": "410327"
  22871. }, {
  22872. "label": "洛宁县",
  22873. "value": "410328"
  22874. }, {
  22875. "label": "伊川县",
  22876. "value": "410329"
  22877. }, {
  22878. "label": "洛阳高新技术产业开发区",
  22879. "value": "410371"
  22880. }, {
  22881. "label": "偃师市",
  22882. "value": "410381"
  22883. }], [{
  22884. "label": "新华区",
  22885. "value": "410402"
  22886. }, {
  22887. "label": "卫东区",
  22888. "value": "410403"
  22889. }, {
  22890. "label": "石龙区",
  22891. "value": "410404"
  22892. }, {
  22893. "label": "湛河区",
  22894. "value": "410411"
  22895. }, {
  22896. "label": "宝丰县",
  22897. "value": "410421"
  22898. }, {
  22899. "label": "叶县",
  22900. "value": "410422"
  22901. }, {
  22902. "label": "鲁山县",
  22903. "value": "410423"
  22904. }, {
  22905. "label": "郏县",
  22906. "value": "410425"
  22907. }, {
  22908. "label": "平顶山高新技术产业开发区",
  22909. "value": "410471"
  22910. }, {
  22911. "label": "平顶山市新城区",
  22912. "value": "410472"
  22913. }, {
  22914. "label": "舞钢市",
  22915. "value": "410481"
  22916. }, {
  22917. "label": "汝州市",
  22918. "value": "410482"
  22919. }], [{
  22920. "label": "文峰区",
  22921. "value": "410502"
  22922. }, {
  22923. "label": "北关区",
  22924. "value": "410503"
  22925. }, {
  22926. "label": "殷都区",
  22927. "value": "410505"
  22928. }, {
  22929. "label": "龙安区",
  22930. "value": "410506"
  22931. }, {
  22932. "label": "安阳县",
  22933. "value": "410522"
  22934. }, {
  22935. "label": "汤阴县",
  22936. "value": "410523"
  22937. }, {
  22938. "label": "滑县",
  22939. "value": "410526"
  22940. }, {
  22941. "label": "内黄县",
  22942. "value": "410527"
  22943. }, {
  22944. "label": "安阳高新技术产业开发区",
  22945. "value": "410571"
  22946. }, {
  22947. "label": "林州市",
  22948. "value": "410581"
  22949. }], [{
  22950. "label": "鹤山区",
  22951. "value": "410602"
  22952. }, {
  22953. "label": "山城区",
  22954. "value": "410603"
  22955. }, {
  22956. "label": "淇滨区",
  22957. "value": "410611"
  22958. }, {
  22959. "label": "浚县",
  22960. "value": "410621"
  22961. }, {
  22962. "label": "淇县",
  22963. "value": "410622"
  22964. }, {
  22965. "label": "鹤壁经济技术开发区",
  22966. "value": "410671"
  22967. }], [{
  22968. "label": "红旗区",
  22969. "value": "410702"
  22970. }, {
  22971. "label": "卫滨区",
  22972. "value": "410703"
  22973. }, {
  22974. "label": "凤泉区",
  22975. "value": "410704"
  22976. }, {
  22977. "label": "牧野区",
  22978. "value": "410711"
  22979. }, {
  22980. "label": "新乡县",
  22981. "value": "410721"
  22982. }, {
  22983. "label": "获嘉县",
  22984. "value": "410724"
  22985. }, {
  22986. "label": "原阳县",
  22987. "value": "410725"
  22988. }, {
  22989. "label": "延津县",
  22990. "value": "410726"
  22991. }, {
  22992. "label": "封丘县",
  22993. "value": "410727"
  22994. }, {
  22995. "label": "长垣县",
  22996. "value": "410728"
  22997. }, {
  22998. "label": "新乡高新技术产业开发区",
  22999. "value": "410771"
  23000. }, {
  23001. "label": "新乡经济技术开发区",
  23002. "value": "410772"
  23003. }, {
  23004. "label": "新乡市平原城乡一体化示范区",
  23005. "value": "410773"
  23006. }, {
  23007. "label": "卫辉市",
  23008. "value": "410781"
  23009. }, {
  23010. "label": "辉县市",
  23011. "value": "410782"
  23012. }], [{
  23013. "label": "解放区",
  23014. "value": "410802"
  23015. }, {
  23016. "label": "中站区",
  23017. "value": "410803"
  23018. }, {
  23019. "label": "马村区",
  23020. "value": "410804"
  23021. }, {
  23022. "label": "山阳区",
  23023. "value": "410811"
  23024. }, {
  23025. "label": "修武县",
  23026. "value": "410821"
  23027. }, {
  23028. "label": "博爱县",
  23029. "value": "410822"
  23030. }, {
  23031. "label": "武陟县",
  23032. "value": "410823"
  23033. }, {
  23034. "label": "温县",
  23035. "value": "410825"
  23036. }, {
  23037. "label": "焦作城乡一体化示范区",
  23038. "value": "410871"
  23039. }, {
  23040. "label": "沁阳市",
  23041. "value": "410882"
  23042. }, {
  23043. "label": "孟州市",
  23044. "value": "410883"
  23045. }], [{
  23046. "label": "华龙区",
  23047. "value": "410902"
  23048. }, {
  23049. "label": "清丰县",
  23050. "value": "410922"
  23051. }, {
  23052. "label": "南乐县",
  23053. "value": "410923"
  23054. }, {
  23055. "label": "范县",
  23056. "value": "410926"
  23057. }, {
  23058. "label": "台前县",
  23059. "value": "410927"
  23060. }, {
  23061. "label": "濮阳县",
  23062. "value": "410928"
  23063. }, {
  23064. "label": "河南濮阳工业园区",
  23065. "value": "410971"
  23066. }, {
  23067. "label": "濮阳经济技术开发区",
  23068. "value": "410972"
  23069. }], [{
  23070. "label": "魏都区",
  23071. "value": "411002"
  23072. }, {
  23073. "label": "建安区",
  23074. "value": "411003"
  23075. }, {
  23076. "label": "鄢陵县",
  23077. "value": "411024"
  23078. }, {
  23079. "label": "襄城县",
  23080. "value": "411025"
  23081. }, {
  23082. "label": "许昌经济技术开发区",
  23083. "value": "411071"
  23084. }, {
  23085. "label": "禹州市",
  23086. "value": "411081"
  23087. }, {
  23088. "label": "长葛市",
  23089. "value": "411082"
  23090. }], [{
  23091. "label": "源汇区",
  23092. "value": "411102"
  23093. }, {
  23094. "label": "郾城区",
  23095. "value": "411103"
  23096. }, {
  23097. "label": "召陵区",
  23098. "value": "411104"
  23099. }, {
  23100. "label": "舞阳县",
  23101. "value": "411121"
  23102. }, {
  23103. "label": "临颍县",
  23104. "value": "411122"
  23105. }, {
  23106. "label": "漯河经济技术开发区",
  23107. "value": "411171"
  23108. }], [{
  23109. "label": "湖滨区",
  23110. "value": "411202"
  23111. }, {
  23112. "label": "陕州区",
  23113. "value": "411203"
  23114. }, {
  23115. "label": "渑池县",
  23116. "value": "411221"
  23117. }, {
  23118. "label": "卢氏县",
  23119. "value": "411224"
  23120. }, {
  23121. "label": "河南三门峡经济开发区",
  23122. "value": "411271"
  23123. }, {
  23124. "label": "义马市",
  23125. "value": "411281"
  23126. }, {
  23127. "label": "灵宝市",
  23128. "value": "411282"
  23129. }], [{
  23130. "label": "宛城区",
  23131. "value": "411302"
  23132. }, {
  23133. "label": "卧龙区",
  23134. "value": "411303"
  23135. }, {
  23136. "label": "南召县",
  23137. "value": "411321"
  23138. }, {
  23139. "label": "方城县",
  23140. "value": "411322"
  23141. }, {
  23142. "label": "西峡县",
  23143. "value": "411323"
  23144. }, {
  23145. "label": "镇平县",
  23146. "value": "411324"
  23147. }, {
  23148. "label": "内乡县",
  23149. "value": "411325"
  23150. }, {
  23151. "label": "淅川县",
  23152. "value": "411326"
  23153. }, {
  23154. "label": "社旗县",
  23155. "value": "411327"
  23156. }, {
  23157. "label": "唐河县",
  23158. "value": "411328"
  23159. }, {
  23160. "label": "新野县",
  23161. "value": "411329"
  23162. }, {
  23163. "label": "桐柏县",
  23164. "value": "411330"
  23165. }, {
  23166. "label": "南阳高新技术产业开发区",
  23167. "value": "411371"
  23168. }, {
  23169. "label": "南阳市城乡一体化示范区",
  23170. "value": "411372"
  23171. }, {
  23172. "label": "邓州市",
  23173. "value": "411381"
  23174. }], [{
  23175. "label": "梁园区",
  23176. "value": "411402"
  23177. }, {
  23178. "label": "睢阳区",
  23179. "value": "411403"
  23180. }, {
  23181. "label": "民权县",
  23182. "value": "411421"
  23183. }, {
  23184. "label": "睢县",
  23185. "value": "411422"
  23186. }, {
  23187. "label": "宁陵县",
  23188. "value": "411423"
  23189. }, {
  23190. "label": "柘城县",
  23191. "value": "411424"
  23192. }, {
  23193. "label": "虞城县",
  23194. "value": "411425"
  23195. }, {
  23196. "label": "夏邑县",
  23197. "value": "411426"
  23198. }, {
  23199. "label": "豫东综合物流产业聚集区",
  23200. "value": "411471"
  23201. }, {
  23202. "label": "河南商丘经济开发区",
  23203. "value": "411472"
  23204. }, {
  23205. "label": "永城市",
  23206. "value": "411481"
  23207. }], [{
  23208. "label": "浉河区",
  23209. "value": "411502"
  23210. }, {
  23211. "label": "平桥区",
  23212. "value": "411503"
  23213. }, {
  23214. "label": "罗山县",
  23215. "value": "411521"
  23216. }, {
  23217. "label": "光山县",
  23218. "value": "411522"
  23219. }, {
  23220. "label": "新县",
  23221. "value": "411523"
  23222. }, {
  23223. "label": "商城县",
  23224. "value": "411524"
  23225. }, {
  23226. "label": "固始县",
  23227. "value": "411525"
  23228. }, {
  23229. "label": "潢川县",
  23230. "value": "411526"
  23231. }, {
  23232. "label": "淮滨县",
  23233. "value": "411527"
  23234. }, {
  23235. "label": "息县",
  23236. "value": "411528"
  23237. }, {
  23238. "label": "信阳高新技术产业开发区",
  23239. "value": "411571"
  23240. }], [{
  23241. "label": "川汇区",
  23242. "value": "411602"
  23243. }, {
  23244. "label": "扶沟县",
  23245. "value": "411621"
  23246. }, {
  23247. "label": "西华县",
  23248. "value": "411622"
  23249. }, {
  23250. "label": "商水县",
  23251. "value": "411623"
  23252. }, {
  23253. "label": "沈丘县",
  23254. "value": "411624"
  23255. }, {
  23256. "label": "郸城县",
  23257. "value": "411625"
  23258. }, {
  23259. "label": "淮阳县",
  23260. "value": "411626"
  23261. }, {
  23262. "label": "太康县",
  23263. "value": "411627"
  23264. }, {
  23265. "label": "鹿邑县",
  23266. "value": "411628"
  23267. }, {
  23268. "label": "河南周口经济开发区",
  23269. "value": "411671"
  23270. }, {
  23271. "label": "项城市",
  23272. "value": "411681"
  23273. }], [{
  23274. "label": "驿城区",
  23275. "value": "411702"
  23276. }, {
  23277. "label": "西平县",
  23278. "value": "411721"
  23279. }, {
  23280. "label": "上蔡县",
  23281. "value": "411722"
  23282. }, {
  23283. "label": "平舆县",
  23284. "value": "411723"
  23285. }, {
  23286. "label": "正阳县",
  23287. "value": "411724"
  23288. }, {
  23289. "label": "确山县",
  23290. "value": "411725"
  23291. }, {
  23292. "label": "泌阳县",
  23293. "value": "411726"
  23294. }, {
  23295. "label": "汝南县",
  23296. "value": "411727"
  23297. }, {
  23298. "label": "遂平县",
  23299. "value": "411728"
  23300. }, {
  23301. "label": "新蔡县",
  23302. "value": "411729"
  23303. }, {
  23304. "label": "河南驻马店经济开发区",
  23305. "value": "411771"
  23306. }], [{
  23307. "label": "济源市",
  23308. "value": "419001"
  23309. }]], [[{
  23310. "label": "江岸区",
  23311. "value": "420102"
  23312. }, {
  23313. "label": "江汉区",
  23314. "value": "420103"
  23315. }, {
  23316. "label": "硚口区",
  23317. "value": "420104"
  23318. }, {
  23319. "label": "汉阳区",
  23320. "value": "420105"
  23321. }, {
  23322. "label": "武昌区",
  23323. "value": "420106"
  23324. }, {
  23325. "label": "青山区",
  23326. "value": "420107"
  23327. }, {
  23328. "label": "洪山区",
  23329. "value": "420111"
  23330. }, {
  23331. "label": "东西湖区",
  23332. "value": "420112"
  23333. }, {
  23334. "label": "汉南区",
  23335. "value": "420113"
  23336. }, {
  23337. "label": "蔡甸区",
  23338. "value": "420114"
  23339. }, {
  23340. "label": "江夏区",
  23341. "value": "420115"
  23342. }, {
  23343. "label": "黄陂区",
  23344. "value": "420116"
  23345. }, {
  23346. "label": "新洲区",
  23347. "value": "420117"
  23348. }], [{
  23349. "label": "黄石港区",
  23350. "value": "420202"
  23351. }, {
  23352. "label": "西塞山区",
  23353. "value": "420203"
  23354. }, {
  23355. "label": "下陆区",
  23356. "value": "420204"
  23357. }, {
  23358. "label": "铁山区",
  23359. "value": "420205"
  23360. }, {
  23361. "label": "阳新县",
  23362. "value": "420222"
  23363. }, {
  23364. "label": "大冶市",
  23365. "value": "420281"
  23366. }], [{
  23367. "label": "茅箭区",
  23368. "value": "420302"
  23369. }, {
  23370. "label": "张湾区",
  23371. "value": "420303"
  23372. }, {
  23373. "label": "郧阳区",
  23374. "value": "420304"
  23375. }, {
  23376. "label": "郧西县",
  23377. "value": "420322"
  23378. }, {
  23379. "label": "竹山县",
  23380. "value": "420323"
  23381. }, {
  23382. "label": "竹溪县",
  23383. "value": "420324"
  23384. }, {
  23385. "label": "房县",
  23386. "value": "420325"
  23387. }, {
  23388. "label": "丹江口市",
  23389. "value": "420381"
  23390. }], [{
  23391. "label": "西陵区",
  23392. "value": "420502"
  23393. }, {
  23394. "label": "伍家岗区",
  23395. "value": "420503"
  23396. }, {
  23397. "label": "点军区",
  23398. "value": "420504"
  23399. }, {
  23400. "label": "猇亭区",
  23401. "value": "420505"
  23402. }, {
  23403. "label": "夷陵区",
  23404. "value": "420506"
  23405. }, {
  23406. "label": "远安县",
  23407. "value": "420525"
  23408. }, {
  23409. "label": "兴山县",
  23410. "value": "420526"
  23411. }, {
  23412. "label": "秭归县",
  23413. "value": "420527"
  23414. }, {
  23415. "label": "长阳土家族自治县",
  23416. "value": "420528"
  23417. }, {
  23418. "label": "五峰土家族自治县",
  23419. "value": "420529"
  23420. }, {
  23421. "label": "宜都市",
  23422. "value": "420581"
  23423. }, {
  23424. "label": "当阳市",
  23425. "value": "420582"
  23426. }, {
  23427. "label": "枝江市",
  23428. "value": "420583"
  23429. }], [{
  23430. "label": "襄城区",
  23431. "value": "420602"
  23432. }, {
  23433. "label": "樊城区",
  23434. "value": "420606"
  23435. }, {
  23436. "label": "襄州区",
  23437. "value": "420607"
  23438. }, {
  23439. "label": "南漳县",
  23440. "value": "420624"
  23441. }, {
  23442. "label": "谷城县",
  23443. "value": "420625"
  23444. }, {
  23445. "label": "保康县",
  23446. "value": "420626"
  23447. }, {
  23448. "label": "老河口市",
  23449. "value": "420682"
  23450. }, {
  23451. "label": "枣阳市",
  23452. "value": "420683"
  23453. }, {
  23454. "label": "宜城市",
  23455. "value": "420684"
  23456. }], [{
  23457. "label": "梁子湖区",
  23458. "value": "420702"
  23459. }, {
  23460. "label": "华容区",
  23461. "value": "420703"
  23462. }, {
  23463. "label": "鄂城区",
  23464. "value": "420704"
  23465. }], [{
  23466. "label": "东宝区",
  23467. "value": "420802"
  23468. }, {
  23469. "label": "掇刀区",
  23470. "value": "420804"
  23471. }, {
  23472. "label": "京山县",
  23473. "value": "420821"
  23474. }, {
  23475. "label": "沙洋县",
  23476. "value": "420822"
  23477. }, {
  23478. "label": "钟祥市",
  23479. "value": "420881"
  23480. }], [{
  23481. "label": "孝南区",
  23482. "value": "420902"
  23483. }, {
  23484. "label": "孝昌县",
  23485. "value": "420921"
  23486. }, {
  23487. "label": "大悟县",
  23488. "value": "420922"
  23489. }, {
  23490. "label": "云梦县",
  23491. "value": "420923"
  23492. }, {
  23493. "label": "应城市",
  23494. "value": "420981"
  23495. }, {
  23496. "label": "安陆市",
  23497. "value": "420982"
  23498. }, {
  23499. "label": "汉川市",
  23500. "value": "420984"
  23501. }], [{
  23502. "label": "沙市区",
  23503. "value": "421002"
  23504. }, {
  23505. "label": "荆州区",
  23506. "value": "421003"
  23507. }, {
  23508. "label": "公安县",
  23509. "value": "421022"
  23510. }, {
  23511. "label": "监利县",
  23512. "value": "421023"
  23513. }, {
  23514. "label": "江陵县",
  23515. "value": "421024"
  23516. }, {
  23517. "label": "荆州经济技术开发区",
  23518. "value": "421071"
  23519. }, {
  23520. "label": "石首市",
  23521. "value": "421081"
  23522. }, {
  23523. "label": "洪湖市",
  23524. "value": "421083"
  23525. }, {
  23526. "label": "松滋市",
  23527. "value": "421087"
  23528. }], [{
  23529. "label": "黄州区",
  23530. "value": "421102"
  23531. }, {
  23532. "label": "团风县",
  23533. "value": "421121"
  23534. }, {
  23535. "label": "红安县",
  23536. "value": "421122"
  23537. }, {
  23538. "label": "罗田县",
  23539. "value": "421123"
  23540. }, {
  23541. "label": "英山县",
  23542. "value": "421124"
  23543. }, {
  23544. "label": "浠水县",
  23545. "value": "421125"
  23546. }, {
  23547. "label": "蕲春县",
  23548. "value": "421126"
  23549. }, {
  23550. "label": "黄梅县",
  23551. "value": "421127"
  23552. }, {
  23553. "label": "龙感湖管理区",
  23554. "value": "421171"
  23555. }, {
  23556. "label": "麻城市",
  23557. "value": "421181"
  23558. }, {
  23559. "label": "武穴市",
  23560. "value": "421182"
  23561. }], [{
  23562. "label": "咸安区",
  23563. "value": "421202"
  23564. }, {
  23565. "label": "嘉鱼县",
  23566. "value": "421221"
  23567. }, {
  23568. "label": "通城县",
  23569. "value": "421222"
  23570. }, {
  23571. "label": "崇阳县",
  23572. "value": "421223"
  23573. }, {
  23574. "label": "通山县",
  23575. "value": "421224"
  23576. }, {
  23577. "label": "赤壁市",
  23578. "value": "421281"
  23579. }], [{
  23580. "label": "曾都区",
  23581. "value": "421303"
  23582. }, {
  23583. "label": "随县",
  23584. "value": "421321"
  23585. }, {
  23586. "label": "广水市",
  23587. "value": "421381"
  23588. }], [{
  23589. "label": "恩施市",
  23590. "value": "422801"
  23591. }, {
  23592. "label": "利川市",
  23593. "value": "422802"
  23594. }, {
  23595. "label": "建始县",
  23596. "value": "422822"
  23597. }, {
  23598. "label": "巴东县",
  23599. "value": "422823"
  23600. }, {
  23601. "label": "宣恩县",
  23602. "value": "422825"
  23603. }, {
  23604. "label": "咸丰县",
  23605. "value": "422826"
  23606. }, {
  23607. "label": "来凤县",
  23608. "value": "422827"
  23609. }, {
  23610. "label": "鹤峰县",
  23611. "value": "422828"
  23612. }], [{
  23613. "label": "仙桃市",
  23614. "value": "429004"
  23615. }, {
  23616. "label": "潜江市",
  23617. "value": "429005"
  23618. }, {
  23619. "label": "天门市",
  23620. "value": "429006"
  23621. }, {
  23622. "label": "神农架林区",
  23623. "value": "429021"
  23624. }]], [[{
  23625. "label": "芙蓉区",
  23626. "value": "430102"
  23627. }, {
  23628. "label": "天心区",
  23629. "value": "430103"
  23630. }, {
  23631. "label": "岳麓区",
  23632. "value": "430104"
  23633. }, {
  23634. "label": "开福区",
  23635. "value": "430105"
  23636. }, {
  23637. "label": "雨花区",
  23638. "value": "430111"
  23639. }, {
  23640. "label": "望城区",
  23641. "value": "430112"
  23642. }, {
  23643. "label": "长沙县",
  23644. "value": "430121"
  23645. }, {
  23646. "label": "浏阳市",
  23647. "value": "430181"
  23648. }, {
  23649. "label": "宁乡市",
  23650. "value": "430182"
  23651. }], [{
  23652. "label": "荷塘区",
  23653. "value": "430202"
  23654. }, {
  23655. "label": "芦淞区",
  23656. "value": "430203"
  23657. }, {
  23658. "label": "石峰区",
  23659. "value": "430204"
  23660. }, {
  23661. "label": "天元区",
  23662. "value": "430211"
  23663. }, {
  23664. "label": "株洲县",
  23665. "value": "430221"
  23666. }, {
  23667. "label": "攸县",
  23668. "value": "430223"
  23669. }, {
  23670. "label": "茶陵县",
  23671. "value": "430224"
  23672. }, {
  23673. "label": "炎陵县",
  23674. "value": "430225"
  23675. }, {
  23676. "label": "云龙示范区",
  23677. "value": "430271"
  23678. }, {
  23679. "label": "醴陵市",
  23680. "value": "430281"
  23681. }], [{
  23682. "label": "雨湖区",
  23683. "value": "430302"
  23684. }, {
  23685. "label": "岳塘区",
  23686. "value": "430304"
  23687. }, {
  23688. "label": "湘潭县",
  23689. "value": "430321"
  23690. }, {
  23691. "label": "湖南湘潭高新技术产业园区",
  23692. "value": "430371"
  23693. }, {
  23694. "label": "湘潭昭山示范区",
  23695. "value": "430372"
  23696. }, {
  23697. "label": "湘潭九华示范区",
  23698. "value": "430373"
  23699. }, {
  23700. "label": "湘乡市",
  23701. "value": "430381"
  23702. }, {
  23703. "label": "韶山市",
  23704. "value": "430382"
  23705. }], [{
  23706. "label": "珠晖区",
  23707. "value": "430405"
  23708. }, {
  23709. "label": "雁峰区",
  23710. "value": "430406"
  23711. }, {
  23712. "label": "石鼓区",
  23713. "value": "430407"
  23714. }, {
  23715. "label": "蒸湘区",
  23716. "value": "430408"
  23717. }, {
  23718. "label": "南岳区",
  23719. "value": "430412"
  23720. }, {
  23721. "label": "衡阳县",
  23722. "value": "430421"
  23723. }, {
  23724. "label": "衡南县",
  23725. "value": "430422"
  23726. }, {
  23727. "label": "衡山县",
  23728. "value": "430423"
  23729. }, {
  23730. "label": "衡东县",
  23731. "value": "430424"
  23732. }, {
  23733. "label": "祁东县",
  23734. "value": "430426"
  23735. }, {
  23736. "label": "衡阳综合保税区",
  23737. "value": "430471"
  23738. }, {
  23739. "label": "湖南衡阳高新技术产业园区",
  23740. "value": "430472"
  23741. }, {
  23742. "label": "湖南衡阳松木经济开发区",
  23743. "value": "430473"
  23744. }, {
  23745. "label": "耒阳市",
  23746. "value": "430481"
  23747. }, {
  23748. "label": "常宁市",
  23749. "value": "430482"
  23750. }], [{
  23751. "label": "双清区",
  23752. "value": "430502"
  23753. }, {
  23754. "label": "大祥区",
  23755. "value": "430503"
  23756. }, {
  23757. "label": "北塔区",
  23758. "value": "430511"
  23759. }, {
  23760. "label": "邵东县",
  23761. "value": "430521"
  23762. }, {
  23763. "label": "新邵县",
  23764. "value": "430522"
  23765. }, {
  23766. "label": "邵阳县",
  23767. "value": "430523"
  23768. }, {
  23769. "label": "隆回县",
  23770. "value": "430524"
  23771. }, {
  23772. "label": "洞口县",
  23773. "value": "430525"
  23774. }, {
  23775. "label": "绥宁县",
  23776. "value": "430527"
  23777. }, {
  23778. "label": "新宁县",
  23779. "value": "430528"
  23780. }, {
  23781. "label": "城步苗族自治县",
  23782. "value": "430529"
  23783. }, {
  23784. "label": "武冈市",
  23785. "value": "430581"
  23786. }], [{
  23787. "label": "岳阳楼区",
  23788. "value": "430602"
  23789. }, {
  23790. "label": "云溪区",
  23791. "value": "430603"
  23792. }, {
  23793. "label": "君山区",
  23794. "value": "430611"
  23795. }, {
  23796. "label": "岳阳县",
  23797. "value": "430621"
  23798. }, {
  23799. "label": "华容县",
  23800. "value": "430623"
  23801. }, {
  23802. "label": "湘阴县",
  23803. "value": "430624"
  23804. }, {
  23805. "label": "平江县",
  23806. "value": "430626"
  23807. }, {
  23808. "label": "岳阳市屈原管理区",
  23809. "value": "430671"
  23810. }, {
  23811. "label": "汨罗市",
  23812. "value": "430681"
  23813. }, {
  23814. "label": "临湘市",
  23815. "value": "430682"
  23816. }], [{
  23817. "label": "武陵区",
  23818. "value": "430702"
  23819. }, {
  23820. "label": "鼎城区",
  23821. "value": "430703"
  23822. }, {
  23823. "label": "安乡县",
  23824. "value": "430721"
  23825. }, {
  23826. "label": "汉寿县",
  23827. "value": "430722"
  23828. }, {
  23829. "label": "澧县",
  23830. "value": "430723"
  23831. }, {
  23832. "label": "临澧县",
  23833. "value": "430724"
  23834. }, {
  23835. "label": "桃源县",
  23836. "value": "430725"
  23837. }, {
  23838. "label": "石门县",
  23839. "value": "430726"
  23840. }, {
  23841. "label": "常德市西洞庭管理区",
  23842. "value": "430771"
  23843. }, {
  23844. "label": "津市市",
  23845. "value": "430781"
  23846. }], [{
  23847. "label": "永定区",
  23848. "value": "430802"
  23849. }, {
  23850. "label": "武陵源区",
  23851. "value": "430811"
  23852. }, {
  23853. "label": "慈利县",
  23854. "value": "430821"
  23855. }, {
  23856. "label": "桑植县",
  23857. "value": "430822"
  23858. }], [{
  23859. "label": "资阳区",
  23860. "value": "430902"
  23861. }, {
  23862. "label": "赫山区",
  23863. "value": "430903"
  23864. }, {
  23865. "label": "南县",
  23866. "value": "430921"
  23867. }, {
  23868. "label": "桃江县",
  23869. "value": "430922"
  23870. }, {
  23871. "label": "安化县",
  23872. "value": "430923"
  23873. }, {
  23874. "label": "益阳市大通湖管理区",
  23875. "value": "430971"
  23876. }, {
  23877. "label": "湖南益阳高新技术产业园区",
  23878. "value": "430972"
  23879. }, {
  23880. "label": "沅江市",
  23881. "value": "430981"
  23882. }], [{
  23883. "label": "北湖区",
  23884. "value": "431002"
  23885. }, {
  23886. "label": "苏仙区",
  23887. "value": "431003"
  23888. }, {
  23889. "label": "桂阳县",
  23890. "value": "431021"
  23891. }, {
  23892. "label": "宜章县",
  23893. "value": "431022"
  23894. }, {
  23895. "label": "永兴县",
  23896. "value": "431023"
  23897. }, {
  23898. "label": "嘉禾县",
  23899. "value": "431024"
  23900. }, {
  23901. "label": "临武县",
  23902. "value": "431025"
  23903. }, {
  23904. "label": "汝城县",
  23905. "value": "431026"
  23906. }, {
  23907. "label": "桂东县",
  23908. "value": "431027"
  23909. }, {
  23910. "label": "安仁县",
  23911. "value": "431028"
  23912. }, {
  23913. "label": "资兴市",
  23914. "value": "431081"
  23915. }], [{
  23916. "label": "零陵区",
  23917. "value": "431102"
  23918. }, {
  23919. "label": "冷水滩区",
  23920. "value": "431103"
  23921. }, {
  23922. "label": "祁阳县",
  23923. "value": "431121"
  23924. }, {
  23925. "label": "东安县",
  23926. "value": "431122"
  23927. }, {
  23928. "label": "双牌县",
  23929. "value": "431123"
  23930. }, {
  23931. "label": "道县",
  23932. "value": "431124"
  23933. }, {
  23934. "label": "江永县",
  23935. "value": "431125"
  23936. }, {
  23937. "label": "宁远县",
  23938. "value": "431126"
  23939. }, {
  23940. "label": "蓝山县",
  23941. "value": "431127"
  23942. }, {
  23943. "label": "新田县",
  23944. "value": "431128"
  23945. }, {
  23946. "label": "江华瑶族自治县",
  23947. "value": "431129"
  23948. }, {
  23949. "label": "永州经济技术开发区",
  23950. "value": "431171"
  23951. }, {
  23952. "label": "永州市金洞管理区",
  23953. "value": "431172"
  23954. }, {
  23955. "label": "永州市回龙圩管理区",
  23956. "value": "431173"
  23957. }], [{
  23958. "label": "鹤城区",
  23959. "value": "431202"
  23960. }, {
  23961. "label": "中方县",
  23962. "value": "431221"
  23963. }, {
  23964. "label": "沅陵县",
  23965. "value": "431222"
  23966. }, {
  23967. "label": "辰溪县",
  23968. "value": "431223"
  23969. }, {
  23970. "label": "溆浦县",
  23971. "value": "431224"
  23972. }, {
  23973. "label": "会同县",
  23974. "value": "431225"
  23975. }, {
  23976. "label": "麻阳苗族自治县",
  23977. "value": "431226"
  23978. }, {
  23979. "label": "新晃侗族自治县",
  23980. "value": "431227"
  23981. }, {
  23982. "label": "芷江侗族自治县",
  23983. "value": "431228"
  23984. }, {
  23985. "label": "靖州苗族侗族自治县",
  23986. "value": "431229"
  23987. }, {
  23988. "label": "通道侗族自治县",
  23989. "value": "431230"
  23990. }, {
  23991. "label": "怀化市洪江管理区",
  23992. "value": "431271"
  23993. }, {
  23994. "label": "洪江市",
  23995. "value": "431281"
  23996. }], [{
  23997. "label": "娄星区",
  23998. "value": "431302"
  23999. }, {
  24000. "label": "双峰县",
  24001. "value": "431321"
  24002. }, {
  24003. "label": "新化县",
  24004. "value": "431322"
  24005. }, {
  24006. "label": "冷水江市",
  24007. "value": "431381"
  24008. }, {
  24009. "label": "涟源市",
  24010. "value": "431382"
  24011. }], [{
  24012. "label": "吉首市",
  24013. "value": "433101"
  24014. }, {
  24015. "label": "泸溪县",
  24016. "value": "433122"
  24017. }, {
  24018. "label": "凤凰县",
  24019. "value": "433123"
  24020. }, {
  24021. "label": "花垣县",
  24022. "value": "433124"
  24023. }, {
  24024. "label": "保靖县",
  24025. "value": "433125"
  24026. }, {
  24027. "label": "古丈县",
  24028. "value": "433126"
  24029. }, {
  24030. "label": "永顺县",
  24031. "value": "433127"
  24032. }, {
  24033. "label": "龙山县",
  24034. "value": "433130"
  24035. }, {
  24036. "label": "湖南吉首经济开发区",
  24037. "value": "433172"
  24038. }, {
  24039. "label": "湖南永顺经济开发区",
  24040. "value": "433173"
  24041. }]], [[{
  24042. "label": "荔湾区",
  24043. "value": "440103"
  24044. }, {
  24045. "label": "越秀区",
  24046. "value": "440104"
  24047. }, {
  24048. "label": "海珠区",
  24049. "value": "440105"
  24050. }, {
  24051. "label": "天河区",
  24052. "value": "440106"
  24053. }, {
  24054. "label": "白云区",
  24055. "value": "440111"
  24056. }, {
  24057. "label": "黄埔区",
  24058. "value": "440112"
  24059. }, {
  24060. "label": "番禺区",
  24061. "value": "440113"
  24062. }, {
  24063. "label": "花都区",
  24064. "value": "440114"
  24065. }, {
  24066. "label": "南沙区",
  24067. "value": "440115"
  24068. }, {
  24069. "label": "从化区",
  24070. "value": "440117"
  24071. }, {
  24072. "label": "增城区",
  24073. "value": "440118"
  24074. }], [{
  24075. "label": "武江区",
  24076. "value": "440203"
  24077. }, {
  24078. "label": "浈江区",
  24079. "value": "440204"
  24080. }, {
  24081. "label": "曲江区",
  24082. "value": "440205"
  24083. }, {
  24084. "label": "始兴县",
  24085. "value": "440222"
  24086. }, {
  24087. "label": "仁化县",
  24088. "value": "440224"
  24089. }, {
  24090. "label": "翁源县",
  24091. "value": "440229"
  24092. }, {
  24093. "label": "乳源瑶族自治县",
  24094. "value": "440232"
  24095. }, {
  24096. "label": "新丰县",
  24097. "value": "440233"
  24098. }, {
  24099. "label": "乐昌市",
  24100. "value": "440281"
  24101. }, {
  24102. "label": "南雄市",
  24103. "value": "440282"
  24104. }], [{
  24105. "label": "罗湖区",
  24106. "value": "440303"
  24107. }, {
  24108. "label": "福田区",
  24109. "value": "440304"
  24110. }, {
  24111. "label": "南山区",
  24112. "value": "440305"
  24113. }, {
  24114. "label": "宝安区",
  24115. "value": "440306"
  24116. }, {
  24117. "label": "龙岗区",
  24118. "value": "440307"
  24119. }, {
  24120. "label": "盐田区",
  24121. "value": "440308"
  24122. }, {
  24123. "label": "龙华区",
  24124. "value": "440309"
  24125. }, {
  24126. "label": "坪山区",
  24127. "value": "440310"
  24128. }], [{
  24129. "label": "香洲区",
  24130. "value": "440402"
  24131. }, {
  24132. "label": "斗门区",
  24133. "value": "440403"
  24134. }, {
  24135. "label": "金湾区",
  24136. "value": "440404"
  24137. }], [{
  24138. "label": "龙湖区",
  24139. "value": "440507"
  24140. }, {
  24141. "label": "金平区",
  24142. "value": "440511"
  24143. }, {
  24144. "label": "濠江区",
  24145. "value": "440512"
  24146. }, {
  24147. "label": "潮阳区",
  24148. "value": "440513"
  24149. }, {
  24150. "label": "潮南区",
  24151. "value": "440514"
  24152. }, {
  24153. "label": "澄海区",
  24154. "value": "440515"
  24155. }, {
  24156. "label": "南澳县",
  24157. "value": "440523"
  24158. }], [{
  24159. "label": "禅城区",
  24160. "value": "440604"
  24161. }, {
  24162. "label": "南海区",
  24163. "value": "440605"
  24164. }, {
  24165. "label": "顺德区",
  24166. "value": "440606"
  24167. }, {
  24168. "label": "三水区",
  24169. "value": "440607"
  24170. }, {
  24171. "label": "高明区",
  24172. "value": "440608"
  24173. }], [{
  24174. "label": "蓬江区",
  24175. "value": "440703"
  24176. }, {
  24177. "label": "江海区",
  24178. "value": "440704"
  24179. }, {
  24180. "label": "新会区",
  24181. "value": "440705"
  24182. }, {
  24183. "label": "台山市",
  24184. "value": "440781"
  24185. }, {
  24186. "label": "开平市",
  24187. "value": "440783"
  24188. }, {
  24189. "label": "鹤山市",
  24190. "value": "440784"
  24191. }, {
  24192. "label": "恩平市",
  24193. "value": "440785"
  24194. }], [{
  24195. "label": "赤坎区",
  24196. "value": "440802"
  24197. }, {
  24198. "label": "霞山区",
  24199. "value": "440803"
  24200. }, {
  24201. "label": "坡头区",
  24202. "value": "440804"
  24203. }, {
  24204. "label": "麻章区",
  24205. "value": "440811"
  24206. }, {
  24207. "label": "遂溪县",
  24208. "value": "440823"
  24209. }, {
  24210. "label": "徐闻县",
  24211. "value": "440825"
  24212. }, {
  24213. "label": "廉江市",
  24214. "value": "440881"
  24215. }, {
  24216. "label": "雷州市",
  24217. "value": "440882"
  24218. }, {
  24219. "label": "吴川市",
  24220. "value": "440883"
  24221. }], [{
  24222. "label": "茂南区",
  24223. "value": "440902"
  24224. }, {
  24225. "label": "电白区",
  24226. "value": "440904"
  24227. }, {
  24228. "label": "高州市",
  24229. "value": "440981"
  24230. }, {
  24231. "label": "化州市",
  24232. "value": "440982"
  24233. }, {
  24234. "label": "信宜市",
  24235. "value": "440983"
  24236. }], [{
  24237. "label": "端州区",
  24238. "value": "441202"
  24239. }, {
  24240. "label": "鼎湖区",
  24241. "value": "441203"
  24242. }, {
  24243. "label": "高要区",
  24244. "value": "441204"
  24245. }, {
  24246. "label": "广宁县",
  24247. "value": "441223"
  24248. }, {
  24249. "label": "怀集县",
  24250. "value": "441224"
  24251. }, {
  24252. "label": "封开县",
  24253. "value": "441225"
  24254. }, {
  24255. "label": "德庆县",
  24256. "value": "441226"
  24257. }, {
  24258. "label": "四会市",
  24259. "value": "441284"
  24260. }], [{
  24261. "label": "惠城区",
  24262. "value": "441302"
  24263. }, {
  24264. "label": "惠阳区",
  24265. "value": "441303"
  24266. }, {
  24267. "label": "博罗县",
  24268. "value": "441322"
  24269. }, {
  24270. "label": "惠东县",
  24271. "value": "441323"
  24272. }, {
  24273. "label": "龙门县",
  24274. "value": "441324"
  24275. }], [{
  24276. "label": "梅江区",
  24277. "value": "441402"
  24278. }, {
  24279. "label": "梅县区",
  24280. "value": "441403"
  24281. }, {
  24282. "label": "大埔县",
  24283. "value": "441422"
  24284. }, {
  24285. "label": "丰顺县",
  24286. "value": "441423"
  24287. }, {
  24288. "label": "五华县",
  24289. "value": "441424"
  24290. }, {
  24291. "label": "平远县",
  24292. "value": "441426"
  24293. }, {
  24294. "label": "蕉岭县",
  24295. "value": "441427"
  24296. }, {
  24297. "label": "兴宁市",
  24298. "value": "441481"
  24299. }], [{
  24300. "label": "城区",
  24301. "value": "441502"
  24302. }, {
  24303. "label": "海丰县",
  24304. "value": "441521"
  24305. }, {
  24306. "label": "陆河县",
  24307. "value": "441523"
  24308. }, {
  24309. "label": "陆丰市",
  24310. "value": "441581"
  24311. }], [{
  24312. "label": "源城区",
  24313. "value": "441602"
  24314. }, {
  24315. "label": "紫金县",
  24316. "value": "441621"
  24317. }, {
  24318. "label": "龙川县",
  24319. "value": "441622"
  24320. }, {
  24321. "label": "连平县",
  24322. "value": "441623"
  24323. }, {
  24324. "label": "和平县",
  24325. "value": "441624"
  24326. }, {
  24327. "label": "东源县",
  24328. "value": "441625"
  24329. }], [{
  24330. "label": "江城区",
  24331. "value": "441702"
  24332. }, {
  24333. "label": "阳东区",
  24334. "value": "441704"
  24335. }, {
  24336. "label": "阳西县",
  24337. "value": "441721"
  24338. }, {
  24339. "label": "阳春市",
  24340. "value": "441781"
  24341. }], [{
  24342. "label": "清城区",
  24343. "value": "441802"
  24344. }, {
  24345. "label": "清新区",
  24346. "value": "441803"
  24347. }, {
  24348. "label": "佛冈县",
  24349. "value": "441821"
  24350. }, {
  24351. "label": "阳山县",
  24352. "value": "441823"
  24353. }, {
  24354. "label": "连山壮族瑶族自治县",
  24355. "value": "441825"
  24356. }, {
  24357. "label": "连南瑶族自治县",
  24358. "value": "441826"
  24359. }, {
  24360. "label": "英德市",
  24361. "value": "441881"
  24362. }, {
  24363. "label": "连州市",
  24364. "value": "441882"
  24365. }], [{
  24366. "label": "东莞市",
  24367. "value": "441900"
  24368. }], [{
  24369. "label": "中山市",
  24370. "value": "442000"
  24371. }], [{
  24372. "label": "湘桥区",
  24373. "value": "445102"
  24374. }, {
  24375. "label": "潮安区",
  24376. "value": "445103"
  24377. }, {
  24378. "label": "饶平县",
  24379. "value": "445122"
  24380. }], [{
  24381. "label": "榕城区",
  24382. "value": "445202"
  24383. }, {
  24384. "label": "揭东区",
  24385. "value": "445203"
  24386. }, {
  24387. "label": "揭西县",
  24388. "value": "445222"
  24389. }, {
  24390. "label": "惠来县",
  24391. "value": "445224"
  24392. }, {
  24393. "label": "普宁市",
  24394. "value": "445281"
  24395. }], [{
  24396. "label": "云城区",
  24397. "value": "445302"
  24398. }, {
  24399. "label": "云安区",
  24400. "value": "445303"
  24401. }, {
  24402. "label": "新兴县",
  24403. "value": "445321"
  24404. }, {
  24405. "label": "郁南县",
  24406. "value": "445322"
  24407. }, {
  24408. "label": "罗定市",
  24409. "value": "445381"
  24410. }]], [[{
  24411. "label": "兴宁区",
  24412. "value": "450102"
  24413. }, {
  24414. "label": "青秀区",
  24415. "value": "450103"
  24416. }, {
  24417. "label": "江南区",
  24418. "value": "450105"
  24419. }, {
  24420. "label": "西乡塘区",
  24421. "value": "450107"
  24422. }, {
  24423. "label": "良庆区",
  24424. "value": "450108"
  24425. }, {
  24426. "label": "邕宁区",
  24427. "value": "450109"
  24428. }, {
  24429. "label": "武鸣区",
  24430. "value": "450110"
  24431. }, {
  24432. "label": "隆安县",
  24433. "value": "450123"
  24434. }, {
  24435. "label": "马山县",
  24436. "value": "450124"
  24437. }, {
  24438. "label": "上林县",
  24439. "value": "450125"
  24440. }, {
  24441. "label": "宾阳县",
  24442. "value": "450126"
  24443. }, {
  24444. "label": "横县",
  24445. "value": "450127"
  24446. }], [{
  24447. "label": "城中区",
  24448. "value": "450202"
  24449. }, {
  24450. "label": "鱼峰区",
  24451. "value": "450203"
  24452. }, {
  24453. "label": "柳南区",
  24454. "value": "450204"
  24455. }, {
  24456. "label": "柳北区",
  24457. "value": "450205"
  24458. }, {
  24459. "label": "柳江区",
  24460. "value": "450206"
  24461. }, {
  24462. "label": "柳城县",
  24463. "value": "450222"
  24464. }, {
  24465. "label": "鹿寨县",
  24466. "value": "450223"
  24467. }, {
  24468. "label": "融安县",
  24469. "value": "450224"
  24470. }, {
  24471. "label": "融水苗族自治县",
  24472. "value": "450225"
  24473. }, {
  24474. "label": "三江侗族自治县",
  24475. "value": "450226"
  24476. }], [{
  24477. "label": "秀峰区",
  24478. "value": "450302"
  24479. }, {
  24480. "label": "叠彩区",
  24481. "value": "450303"
  24482. }, {
  24483. "label": "象山区",
  24484. "value": "450304"
  24485. }, {
  24486. "label": "七星区",
  24487. "value": "450305"
  24488. }, {
  24489. "label": "雁山区",
  24490. "value": "450311"
  24491. }, {
  24492. "label": "临桂区",
  24493. "value": "450312"
  24494. }, {
  24495. "label": "阳朔县",
  24496. "value": "450321"
  24497. }, {
  24498. "label": "灵川县",
  24499. "value": "450323"
  24500. }, {
  24501. "label": "全州县",
  24502. "value": "450324"
  24503. }, {
  24504. "label": "兴安县",
  24505. "value": "450325"
  24506. }, {
  24507. "label": "永福县",
  24508. "value": "450326"
  24509. }, {
  24510. "label": "灌阳县",
  24511. "value": "450327"
  24512. }, {
  24513. "label": "龙胜各族自治县",
  24514. "value": "450328"
  24515. }, {
  24516. "label": "资源县",
  24517. "value": "450329"
  24518. }, {
  24519. "label": "平乐县",
  24520. "value": "450330"
  24521. }, {
  24522. "label": "荔浦县",
  24523. "value": "450331"
  24524. }, {
  24525. "label": "恭城瑶族自治县",
  24526. "value": "450332"
  24527. }], [{
  24528. "label": "万秀区",
  24529. "value": "450403"
  24530. }, {
  24531. "label": "长洲区",
  24532. "value": "450405"
  24533. }, {
  24534. "label": "龙圩区",
  24535. "value": "450406"
  24536. }, {
  24537. "label": "苍梧县",
  24538. "value": "450421"
  24539. }, {
  24540. "label": "藤县",
  24541. "value": "450422"
  24542. }, {
  24543. "label": "蒙山县",
  24544. "value": "450423"
  24545. }, {
  24546. "label": "岑溪市",
  24547. "value": "450481"
  24548. }], [{
  24549. "label": "海城区",
  24550. "value": "450502"
  24551. }, {
  24552. "label": "银海区",
  24553. "value": "450503"
  24554. }, {
  24555. "label": "铁山港区",
  24556. "value": "450512"
  24557. }, {
  24558. "label": "合浦县",
  24559. "value": "450521"
  24560. }], [{
  24561. "label": "港口区",
  24562. "value": "450602"
  24563. }, {
  24564. "label": "防城区",
  24565. "value": "450603"
  24566. }, {
  24567. "label": "上思县",
  24568. "value": "450621"
  24569. }, {
  24570. "label": "东兴市",
  24571. "value": "450681"
  24572. }], [{
  24573. "label": "钦南区",
  24574. "value": "450702"
  24575. }, {
  24576. "label": "钦北区",
  24577. "value": "450703"
  24578. }, {
  24579. "label": "灵山县",
  24580. "value": "450721"
  24581. }, {
  24582. "label": "浦北县",
  24583. "value": "450722"
  24584. }], [{
  24585. "label": "港北区",
  24586. "value": "450802"
  24587. }, {
  24588. "label": "港南区",
  24589. "value": "450803"
  24590. }, {
  24591. "label": "覃塘区",
  24592. "value": "450804"
  24593. }, {
  24594. "label": "平南县",
  24595. "value": "450821"
  24596. }, {
  24597. "label": "桂平市",
  24598. "value": "450881"
  24599. }], [{
  24600. "label": "玉州区",
  24601. "value": "450902"
  24602. }, {
  24603. "label": "福绵区",
  24604. "value": "450903"
  24605. }, {
  24606. "label": "容县",
  24607. "value": "450921"
  24608. }, {
  24609. "label": "陆川县",
  24610. "value": "450922"
  24611. }, {
  24612. "label": "博白县",
  24613. "value": "450923"
  24614. }, {
  24615. "label": "兴业县",
  24616. "value": "450924"
  24617. }, {
  24618. "label": "北流市",
  24619. "value": "450981"
  24620. }], [{
  24621. "label": "右江区",
  24622. "value": "451002"
  24623. }, {
  24624. "label": "田阳县",
  24625. "value": "451021"
  24626. }, {
  24627. "label": "田东县",
  24628. "value": "451022"
  24629. }, {
  24630. "label": "平果县",
  24631. "value": "451023"
  24632. }, {
  24633. "label": "德保县",
  24634. "value": "451024"
  24635. }, {
  24636. "label": "那坡县",
  24637. "value": "451026"
  24638. }, {
  24639. "label": "凌云县",
  24640. "value": "451027"
  24641. }, {
  24642. "label": "乐业县",
  24643. "value": "451028"
  24644. }, {
  24645. "label": "田林县",
  24646. "value": "451029"
  24647. }, {
  24648. "label": "西林县",
  24649. "value": "451030"
  24650. }, {
  24651. "label": "隆林各族自治县",
  24652. "value": "451031"
  24653. }, {
  24654. "label": "靖西市",
  24655. "value": "451081"
  24656. }], [{
  24657. "label": "八步区",
  24658. "value": "451102"
  24659. }, {
  24660. "label": "平桂区",
  24661. "value": "451103"
  24662. }, {
  24663. "label": "昭平县",
  24664. "value": "451121"
  24665. }, {
  24666. "label": "钟山县",
  24667. "value": "451122"
  24668. }, {
  24669. "label": "富川瑶族自治县",
  24670. "value": "451123"
  24671. }], [{
  24672. "label": "金城江区",
  24673. "value": "451202"
  24674. }, {
  24675. "label": "宜州区",
  24676. "value": "451203"
  24677. }, {
  24678. "label": "南丹县",
  24679. "value": "451221"
  24680. }, {
  24681. "label": "天峨县",
  24682. "value": "451222"
  24683. }, {
  24684. "label": "凤山县",
  24685. "value": "451223"
  24686. }, {
  24687. "label": "东兰县",
  24688. "value": "451224"
  24689. }, {
  24690. "label": "罗城仫佬族自治县",
  24691. "value": "451225"
  24692. }, {
  24693. "label": "环江毛南族自治县",
  24694. "value": "451226"
  24695. }, {
  24696. "label": "巴马瑶族自治县",
  24697. "value": "451227"
  24698. }, {
  24699. "label": "都安瑶族自治县",
  24700. "value": "451228"
  24701. }, {
  24702. "label": "大化瑶族自治县",
  24703. "value": "451229"
  24704. }], [{
  24705. "label": "兴宾区",
  24706. "value": "451302"
  24707. }, {
  24708. "label": "忻城县",
  24709. "value": "451321"
  24710. }, {
  24711. "label": "象州县",
  24712. "value": "451322"
  24713. }, {
  24714. "label": "武宣县",
  24715. "value": "451323"
  24716. }, {
  24717. "label": "金秀瑶族自治县",
  24718. "value": "451324"
  24719. }, {
  24720. "label": "合山市",
  24721. "value": "451381"
  24722. }], [{
  24723. "label": "江州区",
  24724. "value": "451402"
  24725. }, {
  24726. "label": "扶绥县",
  24727. "value": "451421"
  24728. }, {
  24729. "label": "宁明县",
  24730. "value": "451422"
  24731. }, {
  24732. "label": "龙州县",
  24733. "value": "451423"
  24734. }, {
  24735. "label": "大新县",
  24736. "value": "451424"
  24737. }, {
  24738. "label": "天等县",
  24739. "value": "451425"
  24740. }, {
  24741. "label": "凭祥市",
  24742. "value": "451481"
  24743. }]], [[{
  24744. "label": "秀英区",
  24745. "value": "460105"
  24746. }, {
  24747. "label": "龙华区",
  24748. "value": "460106"
  24749. }, {
  24750. "label": "琼山区",
  24751. "value": "460107"
  24752. }, {
  24753. "label": "美兰区",
  24754. "value": "460108"
  24755. }], [{
  24756. "label": "海棠区",
  24757. "value": "460202"
  24758. }, {
  24759. "label": "吉阳区",
  24760. "value": "460203"
  24761. }, {
  24762. "label": "天涯区",
  24763. "value": "460204"
  24764. }, {
  24765. "label": "崖州区",
  24766. "value": "460205"
  24767. }], [{
  24768. "label": "西沙群岛",
  24769. "value": "460321"
  24770. }, {
  24771. "label": "南沙群岛",
  24772. "value": "460322"
  24773. }, {
  24774. "label": "中沙群岛的岛礁及其海域",
  24775. "value": "460323"
  24776. }], [{
  24777. "label": "儋州市",
  24778. "value": "460400"
  24779. }], [{
  24780. "label": "五指山市",
  24781. "value": "469001"
  24782. }, {
  24783. "label": "琼海市",
  24784. "value": "469002"
  24785. }, {
  24786. "label": "文昌市",
  24787. "value": "469005"
  24788. }, {
  24789. "label": "万宁市",
  24790. "value": "469006"
  24791. }, {
  24792. "label": "东方市",
  24793. "value": "469007"
  24794. }, {
  24795. "label": "定安县",
  24796. "value": "469021"
  24797. }, {
  24798. "label": "屯昌县",
  24799. "value": "469022"
  24800. }, {
  24801. "label": "澄迈县",
  24802. "value": "469023"
  24803. }, {
  24804. "label": "临高县",
  24805. "value": "469024"
  24806. }, {
  24807. "label": "白沙黎族自治县",
  24808. "value": "469025"
  24809. }, {
  24810. "label": "昌江黎族自治县",
  24811. "value": "469026"
  24812. }, {
  24813. "label": "乐东黎族自治县",
  24814. "value": "469027"
  24815. }, {
  24816. "label": "陵水黎族自治县",
  24817. "value": "469028"
  24818. }, {
  24819. "label": "保亭黎族苗族自治县",
  24820. "value": "469029"
  24821. }, {
  24822. "label": "琼中黎族苗族自治县",
  24823. "value": "469030"
  24824. }]], [[{
  24825. "label": "万州区",
  24826. "value": "500101"
  24827. }, {
  24828. "label": "涪陵区",
  24829. "value": "500102"
  24830. }, {
  24831. "label": "渝中区",
  24832. "value": "500103"
  24833. }, {
  24834. "label": "大渡口区",
  24835. "value": "500104"
  24836. }, {
  24837. "label": "江北区",
  24838. "value": "500105"
  24839. }, {
  24840. "label": "沙坪坝区",
  24841. "value": "500106"
  24842. }, {
  24843. "label": "九龙坡区",
  24844. "value": "500107"
  24845. }, {
  24846. "label": "南岸区",
  24847. "value": "500108"
  24848. }, {
  24849. "label": "北碚区",
  24850. "value": "500109"
  24851. }, {
  24852. "label": "綦江区",
  24853. "value": "500110"
  24854. }, {
  24855. "label": "大足区",
  24856. "value": "500111"
  24857. }, {
  24858. "label": "渝北区",
  24859. "value": "500112"
  24860. }, {
  24861. "label": "巴南区",
  24862. "value": "500113"
  24863. }, {
  24864. "label": "黔江区",
  24865. "value": "500114"
  24866. }, {
  24867. "label": "长寿区",
  24868. "value": "500115"
  24869. }, {
  24870. "label": "江津区",
  24871. "value": "500116"
  24872. }, {
  24873. "label": "合川区",
  24874. "value": "500117"
  24875. }, {
  24876. "label": "永川区",
  24877. "value": "500118"
  24878. }, {
  24879. "label": "南川区",
  24880. "value": "500119"
  24881. }, {
  24882. "label": "璧山区",
  24883. "value": "500120"
  24884. }, {
  24885. "label": "铜梁区",
  24886. "value": "500151"
  24887. }, {
  24888. "label": "潼南区",
  24889. "value": "500152"
  24890. }, {
  24891. "label": "荣昌区",
  24892. "value": "500153"
  24893. }, {
  24894. "label": "开州区",
  24895. "value": "500154"
  24896. }, {
  24897. "label": "梁平区",
  24898. "value": "500155"
  24899. }, {
  24900. "label": "武隆区",
  24901. "value": "500156"
  24902. }], [{
  24903. "label": "城口县",
  24904. "value": "500229"
  24905. }, {
  24906. "label": "丰都县",
  24907. "value": "500230"
  24908. }, {
  24909. "label": "垫江县",
  24910. "value": "500231"
  24911. }, {
  24912. "label": "忠县",
  24913. "value": "500233"
  24914. }, {
  24915. "label": "云阳县",
  24916. "value": "500235"
  24917. }, {
  24918. "label": "奉节县",
  24919. "value": "500236"
  24920. }, {
  24921. "label": "巫山县",
  24922. "value": "500237"
  24923. }, {
  24924. "label": "巫溪县",
  24925. "value": "500238"
  24926. }, {
  24927. "label": "石柱土家族自治县",
  24928. "value": "500240"
  24929. }, {
  24930. "label": "秀山土家族苗族自治县",
  24931. "value": "500241"
  24932. }, {
  24933. "label": "酉阳土家族苗族自治县",
  24934. "value": "500242"
  24935. }, {
  24936. "label": "彭水苗族土家族自治县",
  24937. "value": "500243"
  24938. }]], [[{
  24939. "label": "锦江区",
  24940. "value": "510104"
  24941. }, {
  24942. "label": "青羊区",
  24943. "value": "510105"
  24944. }, {
  24945. "label": "金牛区",
  24946. "value": "510106"
  24947. }, {
  24948. "label": "武侯区",
  24949. "value": "510107"
  24950. }, {
  24951. "label": "成华区",
  24952. "value": "510108"
  24953. }, {
  24954. "label": "龙泉驿区",
  24955. "value": "510112"
  24956. }, {
  24957. "label": "青白江区",
  24958. "value": "510113"
  24959. }, {
  24960. "label": "新都区",
  24961. "value": "510114"
  24962. }, {
  24963. "label": "温江区",
  24964. "value": "510115"
  24965. }, {
  24966. "label": "双流区",
  24967. "value": "510116"
  24968. }, {
  24969. "label": "郫都区",
  24970. "value": "510117"
  24971. }, {
  24972. "label": "金堂县",
  24973. "value": "510121"
  24974. }, {
  24975. "label": "大邑县",
  24976. "value": "510129"
  24977. }, {
  24978. "label": "蒲江县",
  24979. "value": "510131"
  24980. }, {
  24981. "label": "新津县",
  24982. "value": "510132"
  24983. }, {
  24984. "label": "都江堰市",
  24985. "value": "510181"
  24986. }, {
  24987. "label": "彭州市",
  24988. "value": "510182"
  24989. }, {
  24990. "label": "邛崃市",
  24991. "value": "510183"
  24992. }, {
  24993. "label": "崇州市",
  24994. "value": "510184"
  24995. }, {
  24996. "label": "简阳市",
  24997. "value": "510185"
  24998. }], [{
  24999. "label": "自流井区",
  25000. "value": "510302"
  25001. }, {
  25002. "label": "贡井区",
  25003. "value": "510303"
  25004. }, {
  25005. "label": "大安区",
  25006. "value": "510304"
  25007. }, {
  25008. "label": "沿滩区",
  25009. "value": "510311"
  25010. }, {
  25011. "label": "荣县",
  25012. "value": "510321"
  25013. }, {
  25014. "label": "富顺县",
  25015. "value": "510322"
  25016. }], [{
  25017. "label": "东区",
  25018. "value": "510402"
  25019. }, {
  25020. "label": "西区",
  25021. "value": "510403"
  25022. }, {
  25023. "label": "仁和区",
  25024. "value": "510411"
  25025. }, {
  25026. "label": "米易县",
  25027. "value": "510421"
  25028. }, {
  25029. "label": "盐边县",
  25030. "value": "510422"
  25031. }], [{
  25032. "label": "江阳区",
  25033. "value": "510502"
  25034. }, {
  25035. "label": "纳溪区",
  25036. "value": "510503"
  25037. }, {
  25038. "label": "龙马潭区",
  25039. "value": "510504"
  25040. }, {
  25041. "label": "泸县",
  25042. "value": "510521"
  25043. }, {
  25044. "label": "合江县",
  25045. "value": "510522"
  25046. }, {
  25047. "label": "叙永县",
  25048. "value": "510524"
  25049. }, {
  25050. "label": "古蔺县",
  25051. "value": "510525"
  25052. }], [{
  25053. "label": "旌阳区",
  25054. "value": "510603"
  25055. }, {
  25056. "label": "罗江区",
  25057. "value": "510604"
  25058. }, {
  25059. "label": "中江县",
  25060. "value": "510623"
  25061. }, {
  25062. "label": "广汉市",
  25063. "value": "510681"
  25064. }, {
  25065. "label": "什邡市",
  25066. "value": "510682"
  25067. }, {
  25068. "label": "绵竹市",
  25069. "value": "510683"
  25070. }], [{
  25071. "label": "涪城区",
  25072. "value": "510703"
  25073. }, {
  25074. "label": "游仙区",
  25075. "value": "510704"
  25076. }, {
  25077. "label": "安州区",
  25078. "value": "510705"
  25079. }, {
  25080. "label": "三台县",
  25081. "value": "510722"
  25082. }, {
  25083. "label": "盐亭县",
  25084. "value": "510723"
  25085. }, {
  25086. "label": "梓潼县",
  25087. "value": "510725"
  25088. }, {
  25089. "label": "北川羌族自治县",
  25090. "value": "510726"
  25091. }, {
  25092. "label": "平武县",
  25093. "value": "510727"
  25094. }, {
  25095. "label": "江油市",
  25096. "value": "510781"
  25097. }], [{
  25098. "label": "利州区",
  25099. "value": "510802"
  25100. }, {
  25101. "label": "昭化区",
  25102. "value": "510811"
  25103. }, {
  25104. "label": "朝天区",
  25105. "value": "510812"
  25106. }, {
  25107. "label": "旺苍县",
  25108. "value": "510821"
  25109. }, {
  25110. "label": "青川县",
  25111. "value": "510822"
  25112. }, {
  25113. "label": "剑阁县",
  25114. "value": "510823"
  25115. }, {
  25116. "label": "苍溪县",
  25117. "value": "510824"
  25118. }], [{
  25119. "label": "船山区",
  25120. "value": "510903"
  25121. }, {
  25122. "label": "安居区",
  25123. "value": "510904"
  25124. }, {
  25125. "label": "蓬溪县",
  25126. "value": "510921"
  25127. }, {
  25128. "label": "射洪县",
  25129. "value": "510922"
  25130. }, {
  25131. "label": "大英县",
  25132. "value": "510923"
  25133. }], [{
  25134. "label": "市中区",
  25135. "value": "511002"
  25136. }, {
  25137. "label": "东兴区",
  25138. "value": "511011"
  25139. }, {
  25140. "label": "威远县",
  25141. "value": "511024"
  25142. }, {
  25143. "label": "资中县",
  25144. "value": "511025"
  25145. }, {
  25146. "label": "内江经济开发区",
  25147. "value": "511071"
  25148. }, {
  25149. "label": "隆昌市",
  25150. "value": "511083"
  25151. }], [{
  25152. "label": "市中区",
  25153. "value": "511102"
  25154. }, {
  25155. "label": "沙湾区",
  25156. "value": "511111"
  25157. }, {
  25158. "label": "五通桥区",
  25159. "value": "511112"
  25160. }, {
  25161. "label": "金口河区",
  25162. "value": "511113"
  25163. }, {
  25164. "label": "犍为县",
  25165. "value": "511123"
  25166. }, {
  25167. "label": "井研县",
  25168. "value": "511124"
  25169. }, {
  25170. "label": "夹江县",
  25171. "value": "511126"
  25172. }, {
  25173. "label": "沐川县",
  25174. "value": "511129"
  25175. }, {
  25176. "label": "峨边彝族自治县",
  25177. "value": "511132"
  25178. }, {
  25179. "label": "马边彝族自治县",
  25180. "value": "511133"
  25181. }, {
  25182. "label": "峨眉山市",
  25183. "value": "511181"
  25184. }], [{
  25185. "label": "顺庆区",
  25186. "value": "511302"
  25187. }, {
  25188. "label": "高坪区",
  25189. "value": "511303"
  25190. }, {
  25191. "label": "嘉陵区",
  25192. "value": "511304"
  25193. }, {
  25194. "label": "南部县",
  25195. "value": "511321"
  25196. }, {
  25197. "label": "营山县",
  25198. "value": "511322"
  25199. }, {
  25200. "label": "蓬安县",
  25201. "value": "511323"
  25202. }, {
  25203. "label": "仪陇县",
  25204. "value": "511324"
  25205. }, {
  25206. "label": "西充县",
  25207. "value": "511325"
  25208. }, {
  25209. "label": "阆中市",
  25210. "value": "511381"
  25211. }], [{
  25212. "label": "东坡区",
  25213. "value": "511402"
  25214. }, {
  25215. "label": "彭山区",
  25216. "value": "511403"
  25217. }, {
  25218. "label": "仁寿县",
  25219. "value": "511421"
  25220. }, {
  25221. "label": "洪雅县",
  25222. "value": "511423"
  25223. }, {
  25224. "label": "丹棱县",
  25225. "value": "511424"
  25226. }, {
  25227. "label": "青神县",
  25228. "value": "511425"
  25229. }], [{
  25230. "label": "翠屏区",
  25231. "value": "511502"
  25232. }, {
  25233. "label": "南溪区",
  25234. "value": "511503"
  25235. }, {
  25236. "label": "宜宾县",
  25237. "value": "511521"
  25238. }, {
  25239. "label": "江安县",
  25240. "value": "511523"
  25241. }, {
  25242. "label": "长宁县",
  25243. "value": "511524"
  25244. }, {
  25245. "label": "高县",
  25246. "value": "511525"
  25247. }, {
  25248. "label": "珙县",
  25249. "value": "511526"
  25250. }, {
  25251. "label": "筠连县",
  25252. "value": "511527"
  25253. }, {
  25254. "label": "兴文县",
  25255. "value": "511528"
  25256. }, {
  25257. "label": "屏山县",
  25258. "value": "511529"
  25259. }], [{
  25260. "label": "广安区",
  25261. "value": "511602"
  25262. }, {
  25263. "label": "前锋区",
  25264. "value": "511603"
  25265. }, {
  25266. "label": "岳池县",
  25267. "value": "511621"
  25268. }, {
  25269. "label": "武胜县",
  25270. "value": "511622"
  25271. }, {
  25272. "label": "邻水县",
  25273. "value": "511623"
  25274. }, {
  25275. "label": "华蓥市",
  25276. "value": "511681"
  25277. }], [{
  25278. "label": "通川区",
  25279. "value": "511702"
  25280. }, {
  25281. "label": "达川区",
  25282. "value": "511703"
  25283. }, {
  25284. "label": "宣汉县",
  25285. "value": "511722"
  25286. }, {
  25287. "label": "开江县",
  25288. "value": "511723"
  25289. }, {
  25290. "label": "大竹县",
  25291. "value": "511724"
  25292. }, {
  25293. "label": "渠县",
  25294. "value": "511725"
  25295. }, {
  25296. "label": "达州经济开发区",
  25297. "value": "511771"
  25298. }, {
  25299. "label": "万源市",
  25300. "value": "511781"
  25301. }], [{
  25302. "label": "雨城区",
  25303. "value": "511802"
  25304. }, {
  25305. "label": "名山区",
  25306. "value": "511803"
  25307. }, {
  25308. "label": "荥经县",
  25309. "value": "511822"
  25310. }, {
  25311. "label": "汉源县",
  25312. "value": "511823"
  25313. }, {
  25314. "label": "石棉县",
  25315. "value": "511824"
  25316. }, {
  25317. "label": "天全县",
  25318. "value": "511825"
  25319. }, {
  25320. "label": "芦山县",
  25321. "value": "511826"
  25322. }, {
  25323. "label": "宝兴县",
  25324. "value": "511827"
  25325. }], [{
  25326. "label": "巴州区",
  25327. "value": "511902"
  25328. }, {
  25329. "label": "恩阳区",
  25330. "value": "511903"
  25331. }, {
  25332. "label": "通江县",
  25333. "value": "511921"
  25334. }, {
  25335. "label": "南江县",
  25336. "value": "511922"
  25337. }, {
  25338. "label": "平昌县",
  25339. "value": "511923"
  25340. }, {
  25341. "label": "巴中经济开发区",
  25342. "value": "511971"
  25343. }], [{
  25344. "label": "雁江区",
  25345. "value": "512002"
  25346. }, {
  25347. "label": "安岳县",
  25348. "value": "512021"
  25349. }, {
  25350. "label": "乐至县",
  25351. "value": "512022"
  25352. }], [{
  25353. "label": "马尔康市",
  25354. "value": "513201"
  25355. }, {
  25356. "label": "汶川县",
  25357. "value": "513221"
  25358. }, {
  25359. "label": "理县",
  25360. "value": "513222"
  25361. }, {
  25362. "label": "茂县",
  25363. "value": "513223"
  25364. }, {
  25365. "label": "松潘县",
  25366. "value": "513224"
  25367. }, {
  25368. "label": "九寨沟县",
  25369. "value": "513225"
  25370. }, {
  25371. "label": "金川县",
  25372. "value": "513226"
  25373. }, {
  25374. "label": "小金县",
  25375. "value": "513227"
  25376. }, {
  25377. "label": "黑水县",
  25378. "value": "513228"
  25379. }, {
  25380. "label": "壤塘县",
  25381. "value": "513230"
  25382. }, {
  25383. "label": "阿坝县",
  25384. "value": "513231"
  25385. }, {
  25386. "label": "若尔盖县",
  25387. "value": "513232"
  25388. }, {
  25389. "label": "红原县",
  25390. "value": "513233"
  25391. }], [{
  25392. "label": "康定市",
  25393. "value": "513301"
  25394. }, {
  25395. "label": "泸定县",
  25396. "value": "513322"
  25397. }, {
  25398. "label": "丹巴县",
  25399. "value": "513323"
  25400. }, {
  25401. "label": "九龙县",
  25402. "value": "513324"
  25403. }, {
  25404. "label": "雅江县",
  25405. "value": "513325"
  25406. }, {
  25407. "label": "道孚县",
  25408. "value": "513326"
  25409. }, {
  25410. "label": "炉霍县",
  25411. "value": "513327"
  25412. }, {
  25413. "label": "甘孜县",
  25414. "value": "513328"
  25415. }, {
  25416. "label": "新龙县",
  25417. "value": "513329"
  25418. }, {
  25419. "label": "德格县",
  25420. "value": "513330"
  25421. }, {
  25422. "label": "白玉县",
  25423. "value": "513331"
  25424. }, {
  25425. "label": "石渠县",
  25426. "value": "513332"
  25427. }, {
  25428. "label": "色达县",
  25429. "value": "513333"
  25430. }, {
  25431. "label": "理塘县",
  25432. "value": "513334"
  25433. }, {
  25434. "label": "巴塘县",
  25435. "value": "513335"
  25436. }, {
  25437. "label": "乡城县",
  25438. "value": "513336"
  25439. }, {
  25440. "label": "稻城县",
  25441. "value": "513337"
  25442. }, {
  25443. "label": "得荣县",
  25444. "value": "513338"
  25445. }], [{
  25446. "label": "西昌市",
  25447. "value": "513401"
  25448. }, {
  25449. "label": "木里藏族自治县",
  25450. "value": "513422"
  25451. }, {
  25452. "label": "盐源县",
  25453. "value": "513423"
  25454. }, {
  25455. "label": "德昌县",
  25456. "value": "513424"
  25457. }, {
  25458. "label": "会理县",
  25459. "value": "513425"
  25460. }, {
  25461. "label": "会东县",
  25462. "value": "513426"
  25463. }, {
  25464. "label": "宁南县",
  25465. "value": "513427"
  25466. }, {
  25467. "label": "普格县",
  25468. "value": "513428"
  25469. }, {
  25470. "label": "布拖县",
  25471. "value": "513429"
  25472. }, {
  25473. "label": "金阳县",
  25474. "value": "513430"
  25475. }, {
  25476. "label": "昭觉县",
  25477. "value": "513431"
  25478. }, {
  25479. "label": "喜德县",
  25480. "value": "513432"
  25481. }, {
  25482. "label": "冕宁县",
  25483. "value": "513433"
  25484. }, {
  25485. "label": "越西县",
  25486. "value": "513434"
  25487. }, {
  25488. "label": "甘洛县",
  25489. "value": "513435"
  25490. }, {
  25491. "label": "美姑县",
  25492. "value": "513436"
  25493. }, {
  25494. "label": "雷波县",
  25495. "value": "513437"
  25496. }]], [[{
  25497. "label": "南明区",
  25498. "value": "520102"
  25499. }, {
  25500. "label": "云岩区",
  25501. "value": "520103"
  25502. }, {
  25503. "label": "花溪区",
  25504. "value": "520111"
  25505. }, {
  25506. "label": "乌当区",
  25507. "value": "520112"
  25508. }, {
  25509. "label": "白云区",
  25510. "value": "520113"
  25511. }, {
  25512. "label": "观山湖区",
  25513. "value": "520115"
  25514. }, {
  25515. "label": "开阳县",
  25516. "value": "520121"
  25517. }, {
  25518. "label": "息烽县",
  25519. "value": "520122"
  25520. }, {
  25521. "label": "修文县",
  25522. "value": "520123"
  25523. }, {
  25524. "label": "清镇市",
  25525. "value": "520181"
  25526. }], [{
  25527. "label": "钟山区",
  25528. "value": "520201"
  25529. }, {
  25530. "label": "六枝特区",
  25531. "value": "520203"
  25532. }, {
  25533. "label": "水城县",
  25534. "value": "520221"
  25535. }, {
  25536. "label": "盘州市",
  25537. "value": "520281"
  25538. }], [{
  25539. "label": "红花岗区",
  25540. "value": "520302"
  25541. }, {
  25542. "label": "汇川区",
  25543. "value": "520303"
  25544. }, {
  25545. "label": "播州区",
  25546. "value": "520304"
  25547. }, {
  25548. "label": "桐梓县",
  25549. "value": "520322"
  25550. }, {
  25551. "label": "绥阳县",
  25552. "value": "520323"
  25553. }, {
  25554. "label": "正安县",
  25555. "value": "520324"
  25556. }, {
  25557. "label": "道真仡佬族苗族自治县",
  25558. "value": "520325"
  25559. }, {
  25560. "label": "务川仡佬族苗族自治县",
  25561. "value": "520326"
  25562. }, {
  25563. "label": "凤冈县",
  25564. "value": "520327"
  25565. }, {
  25566. "label": "湄潭县",
  25567. "value": "520328"
  25568. }, {
  25569. "label": "余庆县",
  25570. "value": "520329"
  25571. }, {
  25572. "label": "习水县",
  25573. "value": "520330"
  25574. }, {
  25575. "label": "赤水市",
  25576. "value": "520381"
  25577. }, {
  25578. "label": "仁怀市",
  25579. "value": "520382"
  25580. }], [{
  25581. "label": "西秀区",
  25582. "value": "520402"
  25583. }, {
  25584. "label": "平坝区",
  25585. "value": "520403"
  25586. }, {
  25587. "label": "普定县",
  25588. "value": "520422"
  25589. }, {
  25590. "label": "镇宁布依族苗族自治县",
  25591. "value": "520423"
  25592. }, {
  25593. "label": "关岭布依族苗族自治县",
  25594. "value": "520424"
  25595. }, {
  25596. "label": "紫云苗族布依族自治县",
  25597. "value": "520425"
  25598. }], [{
  25599. "label": "七星关区",
  25600. "value": "520502"
  25601. }, {
  25602. "label": "大方县",
  25603. "value": "520521"
  25604. }, {
  25605. "label": "黔西县",
  25606. "value": "520522"
  25607. }, {
  25608. "label": "金沙县",
  25609. "value": "520523"
  25610. }, {
  25611. "label": "织金县",
  25612. "value": "520524"
  25613. }, {
  25614. "label": "纳雍县",
  25615. "value": "520525"
  25616. }, {
  25617. "label": "威宁彝族回族苗族自治县",
  25618. "value": "520526"
  25619. }, {
  25620. "label": "赫章县",
  25621. "value": "520527"
  25622. }], [{
  25623. "label": "碧江区",
  25624. "value": "520602"
  25625. }, {
  25626. "label": "万山区",
  25627. "value": "520603"
  25628. }, {
  25629. "label": "江口县",
  25630. "value": "520621"
  25631. }, {
  25632. "label": "玉屏侗族自治县",
  25633. "value": "520622"
  25634. }, {
  25635. "label": "石阡县",
  25636. "value": "520623"
  25637. }, {
  25638. "label": "思南县",
  25639. "value": "520624"
  25640. }, {
  25641. "label": "印江土家族苗族自治县",
  25642. "value": "520625"
  25643. }, {
  25644. "label": "德江县",
  25645. "value": "520626"
  25646. }, {
  25647. "label": "沿河土家族自治县",
  25648. "value": "520627"
  25649. }, {
  25650. "label": "松桃苗族自治县",
  25651. "value": "520628"
  25652. }], [{
  25653. "label": "兴义市",
  25654. "value": "522301"
  25655. }, {
  25656. "label": "兴仁县",
  25657. "value": "522322"
  25658. }, {
  25659. "label": "普安县",
  25660. "value": "522323"
  25661. }, {
  25662. "label": "晴隆县",
  25663. "value": "522324"
  25664. }, {
  25665. "label": "贞丰县",
  25666. "value": "522325"
  25667. }, {
  25668. "label": "望谟县",
  25669. "value": "522326"
  25670. }, {
  25671. "label": "册亨县",
  25672. "value": "522327"
  25673. }, {
  25674. "label": "安龙县",
  25675. "value": "522328"
  25676. }], [{
  25677. "label": "凯里市",
  25678. "value": "522601"
  25679. }, {
  25680. "label": "黄平县",
  25681. "value": "522622"
  25682. }, {
  25683. "label": "施秉县",
  25684. "value": "522623"
  25685. }, {
  25686. "label": "三穗县",
  25687. "value": "522624"
  25688. }, {
  25689. "label": "镇远县",
  25690. "value": "522625"
  25691. }, {
  25692. "label": "岑巩县",
  25693. "value": "522626"
  25694. }, {
  25695. "label": "天柱县",
  25696. "value": "522627"
  25697. }, {
  25698. "label": "锦屏县",
  25699. "value": "522628"
  25700. }, {
  25701. "label": "剑河县",
  25702. "value": "522629"
  25703. }, {
  25704. "label": "台江县",
  25705. "value": "522630"
  25706. }, {
  25707. "label": "黎平县",
  25708. "value": "522631"
  25709. }, {
  25710. "label": "榕江县",
  25711. "value": "522632"
  25712. }, {
  25713. "label": "从江县",
  25714. "value": "522633"
  25715. }, {
  25716. "label": "雷山县",
  25717. "value": "522634"
  25718. }, {
  25719. "label": "麻江县",
  25720. "value": "522635"
  25721. }, {
  25722. "label": "丹寨县",
  25723. "value": "522636"
  25724. }], [{
  25725. "label": "都匀市",
  25726. "value": "522701"
  25727. }, {
  25728. "label": "福泉市",
  25729. "value": "522702"
  25730. }, {
  25731. "label": "荔波县",
  25732. "value": "522722"
  25733. }, {
  25734. "label": "贵定县",
  25735. "value": "522723"
  25736. }, {
  25737. "label": "瓮安县",
  25738. "value": "522725"
  25739. }, {
  25740. "label": "独山县",
  25741. "value": "522726"
  25742. }, {
  25743. "label": "平塘县",
  25744. "value": "522727"
  25745. }, {
  25746. "label": "罗甸县",
  25747. "value": "522728"
  25748. }, {
  25749. "label": "长顺县",
  25750. "value": "522729"
  25751. }, {
  25752. "label": "龙里县",
  25753. "value": "522730"
  25754. }, {
  25755. "label": "惠水县",
  25756. "value": "522731"
  25757. }, {
  25758. "label": "三都水族自治县",
  25759. "value": "522732"
  25760. }]], [[{
  25761. "label": "五华区",
  25762. "value": "530102"
  25763. }, {
  25764. "label": "盘龙区",
  25765. "value": "530103"
  25766. }, {
  25767. "label": "官渡区",
  25768. "value": "530111"
  25769. }, {
  25770. "label": "西山区",
  25771. "value": "530112"
  25772. }, {
  25773. "label": "东川区",
  25774. "value": "530113"
  25775. }, {
  25776. "label": "呈贡区",
  25777. "value": "530114"
  25778. }, {
  25779. "label": "晋宁区",
  25780. "value": "530115"
  25781. }, {
  25782. "label": "富民县",
  25783. "value": "530124"
  25784. }, {
  25785. "label": "宜良县",
  25786. "value": "530125"
  25787. }, {
  25788. "label": "石林彝族自治县",
  25789. "value": "530126"
  25790. }, {
  25791. "label": "嵩明县",
  25792. "value": "530127"
  25793. }, {
  25794. "label": "禄劝彝族苗族自治县",
  25795. "value": "530128"
  25796. }, {
  25797. "label": "寻甸回族彝族自治县",
  25798. "value": "530129"
  25799. }, {
  25800. "label": "安宁市",
  25801. "value": "530181"
  25802. }], [{
  25803. "label": "麒麟区",
  25804. "value": "530302"
  25805. }, {
  25806. "label": "沾益区",
  25807. "value": "530303"
  25808. }, {
  25809. "label": "马龙县",
  25810. "value": "530321"
  25811. }, {
  25812. "label": "陆良县",
  25813. "value": "530322"
  25814. }, {
  25815. "label": "师宗县",
  25816. "value": "530323"
  25817. }, {
  25818. "label": "罗平县",
  25819. "value": "530324"
  25820. }, {
  25821. "label": "富源县",
  25822. "value": "530325"
  25823. }, {
  25824. "label": "会泽县",
  25825. "value": "530326"
  25826. }, {
  25827. "label": "宣威市",
  25828. "value": "530381"
  25829. }], [{
  25830. "label": "红塔区",
  25831. "value": "530402"
  25832. }, {
  25833. "label": "江川区",
  25834. "value": "530403"
  25835. }, {
  25836. "label": "澄江县",
  25837. "value": "530422"
  25838. }, {
  25839. "label": "通海县",
  25840. "value": "530423"
  25841. }, {
  25842. "label": "华宁县",
  25843. "value": "530424"
  25844. }, {
  25845. "label": "易门县",
  25846. "value": "530425"
  25847. }, {
  25848. "label": "峨山彝族自治县",
  25849. "value": "530426"
  25850. }, {
  25851. "label": "新平彝族傣族自治县",
  25852. "value": "530427"
  25853. }, {
  25854. "label": "元江哈尼族彝族傣族自治县",
  25855. "value": "530428"
  25856. }], [{
  25857. "label": "隆阳区",
  25858. "value": "530502"
  25859. }, {
  25860. "label": "施甸县",
  25861. "value": "530521"
  25862. }, {
  25863. "label": "龙陵县",
  25864. "value": "530523"
  25865. }, {
  25866. "label": "昌宁县",
  25867. "value": "530524"
  25868. }, {
  25869. "label": "腾冲市",
  25870. "value": "530581"
  25871. }], [{
  25872. "label": "昭阳区",
  25873. "value": "530602"
  25874. }, {
  25875. "label": "鲁甸县",
  25876. "value": "530621"
  25877. }, {
  25878. "label": "巧家县",
  25879. "value": "530622"
  25880. }, {
  25881. "label": "盐津县",
  25882. "value": "530623"
  25883. }, {
  25884. "label": "大关县",
  25885. "value": "530624"
  25886. }, {
  25887. "label": "永善县",
  25888. "value": "530625"
  25889. }, {
  25890. "label": "绥江县",
  25891. "value": "530626"
  25892. }, {
  25893. "label": "镇雄县",
  25894. "value": "530627"
  25895. }, {
  25896. "label": "彝良县",
  25897. "value": "530628"
  25898. }, {
  25899. "label": "威信县",
  25900. "value": "530629"
  25901. }, {
  25902. "label": "水富县",
  25903. "value": "530630"
  25904. }], [{
  25905. "label": "古城区",
  25906. "value": "530702"
  25907. }, {
  25908. "label": "玉龙纳西族自治县",
  25909. "value": "530721"
  25910. }, {
  25911. "label": "永胜县",
  25912. "value": "530722"
  25913. }, {
  25914. "label": "华坪县",
  25915. "value": "530723"
  25916. }, {
  25917. "label": "宁蒗彝族自治县",
  25918. "value": "530724"
  25919. }], [{
  25920. "label": "思茅区",
  25921. "value": "530802"
  25922. }, {
  25923. "label": "宁洱哈尼族彝族自治县",
  25924. "value": "530821"
  25925. }, {
  25926. "label": "墨江哈尼族自治县",
  25927. "value": "530822"
  25928. }, {
  25929. "label": "景东彝族自治县",
  25930. "value": "530823"
  25931. }, {
  25932. "label": "景谷傣族彝族自治县",
  25933. "value": "530824"
  25934. }, {
  25935. "label": "镇沅彝族哈尼族拉祜族自治县",
  25936. "value": "530825"
  25937. }, {
  25938. "label": "江城哈尼族彝族自治县",
  25939. "value": "530826"
  25940. }, {
  25941. "label": "孟连傣族拉祜族佤族自治县",
  25942. "value": "530827"
  25943. }, {
  25944. "label": "澜沧拉祜族自治县",
  25945. "value": "530828"
  25946. }, {
  25947. "label": "西盟佤族自治县",
  25948. "value": "530829"
  25949. }], [{
  25950. "label": "临翔区",
  25951. "value": "530902"
  25952. }, {
  25953. "label": "凤庆县",
  25954. "value": "530921"
  25955. }, {
  25956. "label": "云县",
  25957. "value": "530922"
  25958. }, {
  25959. "label": "永德县",
  25960. "value": "530923"
  25961. }, {
  25962. "label": "镇康县",
  25963. "value": "530924"
  25964. }, {
  25965. "label": "双江拉祜族佤族布朗族傣族自治县",
  25966. "value": "530925"
  25967. }, {
  25968. "label": "耿马傣族佤族自治县",
  25969. "value": "530926"
  25970. }, {
  25971. "label": "沧源佤族自治县",
  25972. "value": "530927"
  25973. }], [{
  25974. "label": "楚雄市",
  25975. "value": "532301"
  25976. }, {
  25977. "label": "双柏县",
  25978. "value": "532322"
  25979. }, {
  25980. "label": "牟定县",
  25981. "value": "532323"
  25982. }, {
  25983. "label": "南华县",
  25984. "value": "532324"
  25985. }, {
  25986. "label": "姚安县",
  25987. "value": "532325"
  25988. }, {
  25989. "label": "大姚县",
  25990. "value": "532326"
  25991. }, {
  25992. "label": "永仁县",
  25993. "value": "532327"
  25994. }, {
  25995. "label": "元谋县",
  25996. "value": "532328"
  25997. }, {
  25998. "label": "武定县",
  25999. "value": "532329"
  26000. }, {
  26001. "label": "禄丰县",
  26002. "value": "532331"
  26003. }], [{
  26004. "label": "个旧市",
  26005. "value": "532501"
  26006. }, {
  26007. "label": "开远市",
  26008. "value": "532502"
  26009. }, {
  26010. "label": "蒙自市",
  26011. "value": "532503"
  26012. }, {
  26013. "label": "弥勒市",
  26014. "value": "532504"
  26015. }, {
  26016. "label": "屏边苗族自治县",
  26017. "value": "532523"
  26018. }, {
  26019. "label": "建水县",
  26020. "value": "532524"
  26021. }, {
  26022. "label": "石屏县",
  26023. "value": "532525"
  26024. }, {
  26025. "label": "泸西县",
  26026. "value": "532527"
  26027. }, {
  26028. "label": "元阳县",
  26029. "value": "532528"
  26030. }, {
  26031. "label": "红河县",
  26032. "value": "532529"
  26033. }, {
  26034. "label": "金平苗族瑶族傣族自治县",
  26035. "value": "532530"
  26036. }, {
  26037. "label": "绿春县",
  26038. "value": "532531"
  26039. }, {
  26040. "label": "河口瑶族自治县",
  26041. "value": "532532"
  26042. }], [{
  26043. "label": "文山市",
  26044. "value": "532601"
  26045. }, {
  26046. "label": "砚山县",
  26047. "value": "532622"
  26048. }, {
  26049. "label": "西畴县",
  26050. "value": "532623"
  26051. }, {
  26052. "label": "麻栗坡县",
  26053. "value": "532624"
  26054. }, {
  26055. "label": "马关县",
  26056. "value": "532625"
  26057. }, {
  26058. "label": "丘北县",
  26059. "value": "532626"
  26060. }, {
  26061. "label": "广南县",
  26062. "value": "532627"
  26063. }, {
  26064. "label": "富宁县",
  26065. "value": "532628"
  26066. }], [{
  26067. "label": "景洪市",
  26068. "value": "532801"
  26069. }, {
  26070. "label": "勐海县",
  26071. "value": "532822"
  26072. }, {
  26073. "label": "勐腊县",
  26074. "value": "532823"
  26075. }], [{
  26076. "label": "大理市",
  26077. "value": "532901"
  26078. }, {
  26079. "label": "漾濞彝族自治县",
  26080. "value": "532922"
  26081. }, {
  26082. "label": "祥云县",
  26083. "value": "532923"
  26084. }, {
  26085. "label": "宾川县",
  26086. "value": "532924"
  26087. }, {
  26088. "label": "弥渡县",
  26089. "value": "532925"
  26090. }, {
  26091. "label": "南涧彝族自治县",
  26092. "value": "532926"
  26093. }, {
  26094. "label": "巍山彝族回族自治县",
  26095. "value": "532927"
  26096. }, {
  26097. "label": "永平县",
  26098. "value": "532928"
  26099. }, {
  26100. "label": "云龙县",
  26101. "value": "532929"
  26102. }, {
  26103. "label": "洱源县",
  26104. "value": "532930"
  26105. }, {
  26106. "label": "剑川县",
  26107. "value": "532931"
  26108. }, {
  26109. "label": "鹤庆县",
  26110. "value": "532932"
  26111. }], [{
  26112. "label": "瑞丽市",
  26113. "value": "533102"
  26114. }, {
  26115. "label": "芒市",
  26116. "value": "533103"
  26117. }, {
  26118. "label": "梁河县",
  26119. "value": "533122"
  26120. }, {
  26121. "label": "盈江县",
  26122. "value": "533123"
  26123. }, {
  26124. "label": "陇川县",
  26125. "value": "533124"
  26126. }], [{
  26127. "label": "泸水市",
  26128. "value": "533301"
  26129. }, {
  26130. "label": "福贡县",
  26131. "value": "533323"
  26132. }, {
  26133. "label": "贡山独龙族怒族自治县",
  26134. "value": "533324"
  26135. }, {
  26136. "label": "兰坪白族普米族自治县",
  26137. "value": "533325"
  26138. }], [{
  26139. "label": "香格里拉市",
  26140. "value": "533401"
  26141. }, {
  26142. "label": "德钦县",
  26143. "value": "533422"
  26144. }, {
  26145. "label": "维西傈僳族自治县",
  26146. "value": "533423"
  26147. }]], [[{
  26148. "label": "城关区",
  26149. "value": "540102"
  26150. }, {
  26151. "label": "堆龙德庆区",
  26152. "value": "540103"
  26153. }, {
  26154. "label": "林周县",
  26155. "value": "540121"
  26156. }, {
  26157. "label": "当雄县",
  26158. "value": "540122"
  26159. }, {
  26160. "label": "尼木县",
  26161. "value": "540123"
  26162. }, {
  26163. "label": "曲水县",
  26164. "value": "540124"
  26165. }, {
  26166. "label": "达孜县",
  26167. "value": "540126"
  26168. }, {
  26169. "label": "墨竹工卡县",
  26170. "value": "540127"
  26171. }, {
  26172. "label": "格尔木藏青工业园区",
  26173. "value": "540171"
  26174. }, {
  26175. "label": "拉萨经济技术开发区",
  26176. "value": "540172"
  26177. }, {
  26178. "label": "西藏文化旅游创意园区",
  26179. "value": "540173"
  26180. }, {
  26181. "label": "达孜工业园区",
  26182. "value": "540174"
  26183. }], [{
  26184. "label": "桑珠孜区",
  26185. "value": "540202"
  26186. }, {
  26187. "label": "南木林县",
  26188. "value": "540221"
  26189. }, {
  26190. "label": "江孜县",
  26191. "value": "540222"
  26192. }, {
  26193. "label": "定日县",
  26194. "value": "540223"
  26195. }, {
  26196. "label": "萨迦县",
  26197. "value": "540224"
  26198. }, {
  26199. "label": "拉孜县",
  26200. "value": "540225"
  26201. }, {
  26202. "label": "昂仁县",
  26203. "value": "540226"
  26204. }, {
  26205. "label": "谢通门县",
  26206. "value": "540227"
  26207. }, {
  26208. "label": "白朗县",
  26209. "value": "540228"
  26210. }, {
  26211. "label": "仁布县",
  26212. "value": "540229"
  26213. }, {
  26214. "label": "康马县",
  26215. "value": "540230"
  26216. }, {
  26217. "label": "定结县",
  26218. "value": "540231"
  26219. }, {
  26220. "label": "仲巴县",
  26221. "value": "540232"
  26222. }, {
  26223. "label": "亚东县",
  26224. "value": "540233"
  26225. }, {
  26226. "label": "吉隆县",
  26227. "value": "540234"
  26228. }, {
  26229. "label": "聂拉木县",
  26230. "value": "540235"
  26231. }, {
  26232. "label": "萨嘎县",
  26233. "value": "540236"
  26234. }, {
  26235. "label": "岗巴县",
  26236. "value": "540237"
  26237. }], [{
  26238. "label": "卡若区",
  26239. "value": "540302"
  26240. }, {
  26241. "label": "江达县",
  26242. "value": "540321"
  26243. }, {
  26244. "label": "贡觉县",
  26245. "value": "540322"
  26246. }, {
  26247. "label": "类乌齐县",
  26248. "value": "540323"
  26249. }, {
  26250. "label": "丁青县",
  26251. "value": "540324"
  26252. }, {
  26253. "label": "察雅县",
  26254. "value": "540325"
  26255. }, {
  26256. "label": "八宿县",
  26257. "value": "540326"
  26258. }, {
  26259. "label": "左贡县",
  26260. "value": "540327"
  26261. }, {
  26262. "label": "芒康县",
  26263. "value": "540328"
  26264. }, {
  26265. "label": "洛隆县",
  26266. "value": "540329"
  26267. }, {
  26268. "label": "边坝县",
  26269. "value": "540330"
  26270. }], [{
  26271. "label": "巴宜区",
  26272. "value": "540402"
  26273. }, {
  26274. "label": "工布江达县",
  26275. "value": "540421"
  26276. }, {
  26277. "label": "米林县",
  26278. "value": "540422"
  26279. }, {
  26280. "label": "墨脱县",
  26281. "value": "540423"
  26282. }, {
  26283. "label": "波密县",
  26284. "value": "540424"
  26285. }, {
  26286. "label": "察隅县",
  26287. "value": "540425"
  26288. }, {
  26289. "label": "朗县",
  26290. "value": "540426"
  26291. }], [{
  26292. "label": "乃东区",
  26293. "value": "540502"
  26294. }, {
  26295. "label": "扎囊县",
  26296. "value": "540521"
  26297. }, {
  26298. "label": "贡嘎县",
  26299. "value": "540522"
  26300. }, {
  26301. "label": "桑日县",
  26302. "value": "540523"
  26303. }, {
  26304. "label": "琼结县",
  26305. "value": "540524"
  26306. }, {
  26307. "label": "曲松县",
  26308. "value": "540525"
  26309. }, {
  26310. "label": "措美县",
  26311. "value": "540526"
  26312. }, {
  26313. "label": "洛扎县",
  26314. "value": "540527"
  26315. }, {
  26316. "label": "加查县",
  26317. "value": "540528"
  26318. }, {
  26319. "label": "隆子县",
  26320. "value": "540529"
  26321. }, {
  26322. "label": "错那县",
  26323. "value": "540530"
  26324. }, {
  26325. "label": "浪卡子县",
  26326. "value": "540531"
  26327. }], [{
  26328. "label": "那曲县",
  26329. "value": "542421"
  26330. }, {
  26331. "label": "嘉黎县",
  26332. "value": "542422"
  26333. }, {
  26334. "label": "比如县",
  26335. "value": "542423"
  26336. }, {
  26337. "label": "聂荣县",
  26338. "value": "542424"
  26339. }, {
  26340. "label": "安多县",
  26341. "value": "542425"
  26342. }, {
  26343. "label": "申扎县",
  26344. "value": "542426"
  26345. }, {
  26346. "label": "索县",
  26347. "value": "542427"
  26348. }, {
  26349. "label": "班戈县",
  26350. "value": "542428"
  26351. }, {
  26352. "label": "巴青县",
  26353. "value": "542429"
  26354. }, {
  26355. "label": "尼玛县",
  26356. "value": "542430"
  26357. }, {
  26358. "label": "双湖县",
  26359. "value": "542431"
  26360. }], [{
  26361. "label": "普兰县",
  26362. "value": "542521"
  26363. }, {
  26364. "label": "札达县",
  26365. "value": "542522"
  26366. }, {
  26367. "label": "噶尔县",
  26368. "value": "542523"
  26369. }, {
  26370. "label": "日土县",
  26371. "value": "542524"
  26372. }, {
  26373. "label": "革吉县",
  26374. "value": "542525"
  26375. }, {
  26376. "label": "改则县",
  26377. "value": "542526"
  26378. }, {
  26379. "label": "措勤县",
  26380. "value": "542527"
  26381. }]], [[{
  26382. "label": "新城区",
  26383. "value": "610102"
  26384. }, {
  26385. "label": "碑林区",
  26386. "value": "610103"
  26387. }, {
  26388. "label": "莲湖区",
  26389. "value": "610104"
  26390. }, {
  26391. "label": "灞桥区",
  26392. "value": "610111"
  26393. }, {
  26394. "label": "未央区",
  26395. "value": "610112"
  26396. }, {
  26397. "label": "雁塔区",
  26398. "value": "610113"
  26399. }, {
  26400. "label": "阎良区",
  26401. "value": "610114"
  26402. }, {
  26403. "label": "临潼区",
  26404. "value": "610115"
  26405. }, {
  26406. "label": "长安区",
  26407. "value": "610116"
  26408. }, {
  26409. "label": "高陵区",
  26410. "value": "610117"
  26411. }, {
  26412. "label": "鄠邑区",
  26413. "value": "610118"
  26414. }, {
  26415. "label": "蓝田县",
  26416. "value": "610122"
  26417. }, {
  26418. "label": "周至县",
  26419. "value": "610124"
  26420. }], [{
  26421. "label": "王益区",
  26422. "value": "610202"
  26423. }, {
  26424. "label": "印台区",
  26425. "value": "610203"
  26426. }, {
  26427. "label": "耀州区",
  26428. "value": "610204"
  26429. }, {
  26430. "label": "宜君县",
  26431. "value": "610222"
  26432. }], [{
  26433. "label": "渭滨区",
  26434. "value": "610302"
  26435. }, {
  26436. "label": "金台区",
  26437. "value": "610303"
  26438. }, {
  26439. "label": "陈仓区",
  26440. "value": "610304"
  26441. }, {
  26442. "label": "凤翔县",
  26443. "value": "610322"
  26444. }, {
  26445. "label": "岐山县",
  26446. "value": "610323"
  26447. }, {
  26448. "label": "扶风县",
  26449. "value": "610324"
  26450. }, {
  26451. "label": "眉县",
  26452. "value": "610326"
  26453. }, {
  26454. "label": "陇县",
  26455. "value": "610327"
  26456. }, {
  26457. "label": "千阳县",
  26458. "value": "610328"
  26459. }, {
  26460. "label": "麟游县",
  26461. "value": "610329"
  26462. }, {
  26463. "label": "凤县",
  26464. "value": "610330"
  26465. }, {
  26466. "label": "太白县",
  26467. "value": "610331"
  26468. }], [{
  26469. "label": "秦都区",
  26470. "value": "610402"
  26471. }, {
  26472. "label": "杨陵区",
  26473. "value": "610403"
  26474. }, {
  26475. "label": "渭城区",
  26476. "value": "610404"
  26477. }, {
  26478. "label": "三原县",
  26479. "value": "610422"
  26480. }, {
  26481. "label": "泾阳县",
  26482. "value": "610423"
  26483. }, {
  26484. "label": "乾县",
  26485. "value": "610424"
  26486. }, {
  26487. "label": "礼泉县",
  26488. "value": "610425"
  26489. }, {
  26490. "label": "永寿县",
  26491. "value": "610426"
  26492. }, {
  26493. "label": "彬县",
  26494. "value": "610427"
  26495. }, {
  26496. "label": "长武县",
  26497. "value": "610428"
  26498. }, {
  26499. "label": "旬邑县",
  26500. "value": "610429"
  26501. }, {
  26502. "label": "淳化县",
  26503. "value": "610430"
  26504. }, {
  26505. "label": "武功县",
  26506. "value": "610431"
  26507. }, {
  26508. "label": "兴平市",
  26509. "value": "610481"
  26510. }], [{
  26511. "label": "临渭区",
  26512. "value": "610502"
  26513. }, {
  26514. "label": "华州区",
  26515. "value": "610503"
  26516. }, {
  26517. "label": "潼关县",
  26518. "value": "610522"
  26519. }, {
  26520. "label": "大荔县",
  26521. "value": "610523"
  26522. }, {
  26523. "label": "合阳县",
  26524. "value": "610524"
  26525. }, {
  26526. "label": "澄城县",
  26527. "value": "610525"
  26528. }, {
  26529. "label": "蒲城县",
  26530. "value": "610526"
  26531. }, {
  26532. "label": "白水县",
  26533. "value": "610527"
  26534. }, {
  26535. "label": "富平县",
  26536. "value": "610528"
  26537. }, {
  26538. "label": "韩城市",
  26539. "value": "610581"
  26540. }, {
  26541. "label": "华阴市",
  26542. "value": "610582"
  26543. }], [{
  26544. "label": "宝塔区",
  26545. "value": "610602"
  26546. }, {
  26547. "label": "安塞区",
  26548. "value": "610603"
  26549. }, {
  26550. "label": "延长县",
  26551. "value": "610621"
  26552. }, {
  26553. "label": "延川县",
  26554. "value": "610622"
  26555. }, {
  26556. "label": "子长县",
  26557. "value": "610623"
  26558. }, {
  26559. "label": "志丹县",
  26560. "value": "610625"
  26561. }, {
  26562. "label": "吴起县",
  26563. "value": "610626"
  26564. }, {
  26565. "label": "甘泉县",
  26566. "value": "610627"
  26567. }, {
  26568. "label": "富县",
  26569. "value": "610628"
  26570. }, {
  26571. "label": "洛川县",
  26572. "value": "610629"
  26573. }, {
  26574. "label": "宜川县",
  26575. "value": "610630"
  26576. }, {
  26577. "label": "黄龙县",
  26578. "value": "610631"
  26579. }, {
  26580. "label": "黄陵县",
  26581. "value": "610632"
  26582. }], [{
  26583. "label": "汉台区",
  26584. "value": "610702"
  26585. }, {
  26586. "label": "南郑区",
  26587. "value": "610703"
  26588. }, {
  26589. "label": "城固县",
  26590. "value": "610722"
  26591. }, {
  26592. "label": "洋县",
  26593. "value": "610723"
  26594. }, {
  26595. "label": "西乡县",
  26596. "value": "610724"
  26597. }, {
  26598. "label": "勉县",
  26599. "value": "610725"
  26600. }, {
  26601. "label": "宁强县",
  26602. "value": "610726"
  26603. }, {
  26604. "label": "略阳县",
  26605. "value": "610727"
  26606. }, {
  26607. "label": "镇巴县",
  26608. "value": "610728"
  26609. }, {
  26610. "label": "留坝县",
  26611. "value": "610729"
  26612. }, {
  26613. "label": "佛坪县",
  26614. "value": "610730"
  26615. }], [{
  26616. "label": "榆阳区",
  26617. "value": "610802"
  26618. }, {
  26619. "label": "横山区",
  26620. "value": "610803"
  26621. }, {
  26622. "label": "府谷县",
  26623. "value": "610822"
  26624. }, {
  26625. "label": "靖边县",
  26626. "value": "610824"
  26627. }, {
  26628. "label": "定边县",
  26629. "value": "610825"
  26630. }, {
  26631. "label": "绥德县",
  26632. "value": "610826"
  26633. }, {
  26634. "label": "米脂县",
  26635. "value": "610827"
  26636. }, {
  26637. "label": "佳县",
  26638. "value": "610828"
  26639. }, {
  26640. "label": "吴堡县",
  26641. "value": "610829"
  26642. }, {
  26643. "label": "清涧县",
  26644. "value": "610830"
  26645. }, {
  26646. "label": "子洲县",
  26647. "value": "610831"
  26648. }, {
  26649. "label": "神木市",
  26650. "value": "610881"
  26651. }], [{
  26652. "label": "汉滨区",
  26653. "value": "610902"
  26654. }, {
  26655. "label": "汉阴县",
  26656. "value": "610921"
  26657. }, {
  26658. "label": "石泉县",
  26659. "value": "610922"
  26660. }, {
  26661. "label": "宁陕县",
  26662. "value": "610923"
  26663. }, {
  26664. "label": "紫阳县",
  26665. "value": "610924"
  26666. }, {
  26667. "label": "岚皋县",
  26668. "value": "610925"
  26669. }, {
  26670. "label": "平利县",
  26671. "value": "610926"
  26672. }, {
  26673. "label": "镇坪县",
  26674. "value": "610927"
  26675. }, {
  26676. "label": "旬阳县",
  26677. "value": "610928"
  26678. }, {
  26679. "label": "白河县",
  26680. "value": "610929"
  26681. }], [{
  26682. "label": "商州区",
  26683. "value": "611002"
  26684. }, {
  26685. "label": "洛南县",
  26686. "value": "611021"
  26687. }, {
  26688. "label": "丹凤县",
  26689. "value": "611022"
  26690. }, {
  26691. "label": "商南县",
  26692. "value": "611023"
  26693. }, {
  26694. "label": "山阳县",
  26695. "value": "611024"
  26696. }, {
  26697. "label": "镇安县",
  26698. "value": "611025"
  26699. }, {
  26700. "label": "柞水县",
  26701. "value": "611026"
  26702. }]], [[{
  26703. "label": "城关区",
  26704. "value": "620102"
  26705. }, {
  26706. "label": "七里河区",
  26707. "value": "620103"
  26708. }, {
  26709. "label": "西固区",
  26710. "value": "620104"
  26711. }, {
  26712. "label": "安宁区",
  26713. "value": "620105"
  26714. }, {
  26715. "label": "红古区",
  26716. "value": "620111"
  26717. }, {
  26718. "label": "永登县",
  26719. "value": "620121"
  26720. }, {
  26721. "label": "皋兰县",
  26722. "value": "620122"
  26723. }, {
  26724. "label": "榆中县",
  26725. "value": "620123"
  26726. }, {
  26727. "label": "兰州新区",
  26728. "value": "620171"
  26729. }], [{
  26730. "label": "嘉峪关市",
  26731. "value": "620201"
  26732. }], [{
  26733. "label": "金川区",
  26734. "value": "620302"
  26735. }, {
  26736. "label": "永昌县",
  26737. "value": "620321"
  26738. }], [{
  26739. "label": "白银区",
  26740. "value": "620402"
  26741. }, {
  26742. "label": "平川区",
  26743. "value": "620403"
  26744. }, {
  26745. "label": "靖远县",
  26746. "value": "620421"
  26747. }, {
  26748. "label": "会宁县",
  26749. "value": "620422"
  26750. }, {
  26751. "label": "景泰县",
  26752. "value": "620423"
  26753. }], [{
  26754. "label": "秦州区",
  26755. "value": "620502"
  26756. }, {
  26757. "label": "麦积区",
  26758. "value": "620503"
  26759. }, {
  26760. "label": "清水县",
  26761. "value": "620521"
  26762. }, {
  26763. "label": "秦安县",
  26764. "value": "620522"
  26765. }, {
  26766. "label": "甘谷县",
  26767. "value": "620523"
  26768. }, {
  26769. "label": "武山县",
  26770. "value": "620524"
  26771. }, {
  26772. "label": "张家川回族自治县",
  26773. "value": "620525"
  26774. }], [{
  26775. "label": "凉州区",
  26776. "value": "620602"
  26777. }, {
  26778. "label": "民勤县",
  26779. "value": "620621"
  26780. }, {
  26781. "label": "古浪县",
  26782. "value": "620622"
  26783. }, {
  26784. "label": "天祝藏族自治县",
  26785. "value": "620623"
  26786. }], [{
  26787. "label": "甘州区",
  26788. "value": "620702"
  26789. }, {
  26790. "label": "肃南裕固族自治县",
  26791. "value": "620721"
  26792. }, {
  26793. "label": "民乐县",
  26794. "value": "620722"
  26795. }, {
  26796. "label": "临泽县",
  26797. "value": "620723"
  26798. }, {
  26799. "label": "高台县",
  26800. "value": "620724"
  26801. }, {
  26802. "label": "山丹县",
  26803. "value": "620725"
  26804. }], [{
  26805. "label": "崆峒区",
  26806. "value": "620802"
  26807. }, {
  26808. "label": "泾川县",
  26809. "value": "620821"
  26810. }, {
  26811. "label": "灵台县",
  26812. "value": "620822"
  26813. }, {
  26814. "label": "崇信县",
  26815. "value": "620823"
  26816. }, {
  26817. "label": "华亭县",
  26818. "value": "620824"
  26819. }, {
  26820. "label": "庄浪县",
  26821. "value": "620825"
  26822. }, {
  26823. "label": "静宁县",
  26824. "value": "620826"
  26825. }, {
  26826. "label": "平凉工业园区",
  26827. "value": "620871"
  26828. }], [{
  26829. "label": "肃州区",
  26830. "value": "620902"
  26831. }, {
  26832. "label": "金塔县",
  26833. "value": "620921"
  26834. }, {
  26835. "label": "瓜州县",
  26836. "value": "620922"
  26837. }, {
  26838. "label": "肃北蒙古族自治县",
  26839. "value": "620923"
  26840. }, {
  26841. "label": "阿克塞哈萨克族自治县",
  26842. "value": "620924"
  26843. }, {
  26844. "label": "玉门市",
  26845. "value": "620981"
  26846. }, {
  26847. "label": "敦煌市",
  26848. "value": "620982"
  26849. }], [{
  26850. "label": "西峰区",
  26851. "value": "621002"
  26852. }, {
  26853. "label": "庆城县",
  26854. "value": "621021"
  26855. }, {
  26856. "label": "环县",
  26857. "value": "621022"
  26858. }, {
  26859. "label": "华池县",
  26860. "value": "621023"
  26861. }, {
  26862. "label": "合水县",
  26863. "value": "621024"
  26864. }, {
  26865. "label": "正宁县",
  26866. "value": "621025"
  26867. }, {
  26868. "label": "宁县",
  26869. "value": "621026"
  26870. }, {
  26871. "label": "镇原县",
  26872. "value": "621027"
  26873. }], [{
  26874. "label": "安定区",
  26875. "value": "621102"
  26876. }, {
  26877. "label": "通渭县",
  26878. "value": "621121"
  26879. }, {
  26880. "label": "陇西县",
  26881. "value": "621122"
  26882. }, {
  26883. "label": "渭源县",
  26884. "value": "621123"
  26885. }, {
  26886. "label": "临洮县",
  26887. "value": "621124"
  26888. }, {
  26889. "label": "漳县",
  26890. "value": "621125"
  26891. }, {
  26892. "label": "岷县",
  26893. "value": "621126"
  26894. }], [{
  26895. "label": "武都区",
  26896. "value": "621202"
  26897. }, {
  26898. "label": "成县",
  26899. "value": "621221"
  26900. }, {
  26901. "label": "文县",
  26902. "value": "621222"
  26903. }, {
  26904. "label": "宕昌县",
  26905. "value": "621223"
  26906. }, {
  26907. "label": "康县",
  26908. "value": "621224"
  26909. }, {
  26910. "label": "西和县",
  26911. "value": "621225"
  26912. }, {
  26913. "label": "礼县",
  26914. "value": "621226"
  26915. }, {
  26916. "label": "徽县",
  26917. "value": "621227"
  26918. }, {
  26919. "label": "两当县",
  26920. "value": "621228"
  26921. }], [{
  26922. "label": "临夏市",
  26923. "value": "622901"
  26924. }, {
  26925. "label": "临夏县",
  26926. "value": "622921"
  26927. }, {
  26928. "label": "康乐县",
  26929. "value": "622922"
  26930. }, {
  26931. "label": "永靖县",
  26932. "value": "622923"
  26933. }, {
  26934. "label": "广河县",
  26935. "value": "622924"
  26936. }, {
  26937. "label": "和政县",
  26938. "value": "622925"
  26939. }, {
  26940. "label": "东乡族自治县",
  26941. "value": "622926"
  26942. }, {
  26943. "label": "积石山保安族东乡族撒拉族自治县",
  26944. "value": "622927"
  26945. }], [{
  26946. "label": "合作市",
  26947. "value": "623001"
  26948. }, {
  26949. "label": "临潭县",
  26950. "value": "623021"
  26951. }, {
  26952. "label": "卓尼县",
  26953. "value": "623022"
  26954. }, {
  26955. "label": "舟曲县",
  26956. "value": "623023"
  26957. }, {
  26958. "label": "迭部县",
  26959. "value": "623024"
  26960. }, {
  26961. "label": "玛曲县",
  26962. "value": "623025"
  26963. }, {
  26964. "label": "碌曲县",
  26965. "value": "623026"
  26966. }, {
  26967. "label": "夏河县",
  26968. "value": "623027"
  26969. }]], [[{
  26970. "label": "城东区",
  26971. "value": "630102"
  26972. }, {
  26973. "label": "城中区",
  26974. "value": "630103"
  26975. }, {
  26976. "label": "城西区",
  26977. "value": "630104"
  26978. }, {
  26979. "label": "城北区",
  26980. "value": "630105"
  26981. }, {
  26982. "label": "大通回族土族自治县",
  26983. "value": "630121"
  26984. }, {
  26985. "label": "湟中县",
  26986. "value": "630122"
  26987. }, {
  26988. "label": "湟源县",
  26989. "value": "630123"
  26990. }], [{
  26991. "label": "乐都区",
  26992. "value": "630202"
  26993. }, {
  26994. "label": "平安区",
  26995. "value": "630203"
  26996. }, {
  26997. "label": "民和回族土族自治县",
  26998. "value": "630222"
  26999. }, {
  27000. "label": "互助土族自治县",
  27001. "value": "630223"
  27002. }, {
  27003. "label": "化隆回族自治县",
  27004. "value": "630224"
  27005. }, {
  27006. "label": "循化撒拉族自治县",
  27007. "value": "630225"
  27008. }], [{
  27009. "label": "门源回族自治县",
  27010. "value": "632221"
  27011. }, {
  27012. "label": "祁连县",
  27013. "value": "632222"
  27014. }, {
  27015. "label": "海晏县",
  27016. "value": "632223"
  27017. }, {
  27018. "label": "刚察县",
  27019. "value": "632224"
  27020. }], [{
  27021. "label": "同仁县",
  27022. "value": "632321"
  27023. }, {
  27024. "label": "尖扎县",
  27025. "value": "632322"
  27026. }, {
  27027. "label": "泽库县",
  27028. "value": "632323"
  27029. }, {
  27030. "label": "河南蒙古族自治县",
  27031. "value": "632324"
  27032. }], [{
  27033. "label": "共和县",
  27034. "value": "632521"
  27035. }, {
  27036. "label": "同德县",
  27037. "value": "632522"
  27038. }, {
  27039. "label": "贵德县",
  27040. "value": "632523"
  27041. }, {
  27042. "label": "兴海县",
  27043. "value": "632524"
  27044. }, {
  27045. "label": "贵南县",
  27046. "value": "632525"
  27047. }], [{
  27048. "label": "玛沁县",
  27049. "value": "632621"
  27050. }, {
  27051. "label": "班玛县",
  27052. "value": "632622"
  27053. }, {
  27054. "label": "甘德县",
  27055. "value": "632623"
  27056. }, {
  27057. "label": "达日县",
  27058. "value": "632624"
  27059. }, {
  27060. "label": "久治县",
  27061. "value": "632625"
  27062. }, {
  27063. "label": "玛多县",
  27064. "value": "632626"
  27065. }], [{
  27066. "label": "玉树市",
  27067. "value": "632701"
  27068. }, {
  27069. "label": "杂多县",
  27070. "value": "632722"
  27071. }, {
  27072. "label": "称多县",
  27073. "value": "632723"
  27074. }, {
  27075. "label": "治多县",
  27076. "value": "632724"
  27077. }, {
  27078. "label": "囊谦县",
  27079. "value": "632725"
  27080. }, {
  27081. "label": "曲麻莱县",
  27082. "value": "632726"
  27083. }], [{
  27084. "label": "格尔木市",
  27085. "value": "632801"
  27086. }, {
  27087. "label": "德令哈市",
  27088. "value": "632802"
  27089. }, {
  27090. "label": "乌兰县",
  27091. "value": "632821"
  27092. }, {
  27093. "label": "都兰县",
  27094. "value": "632822"
  27095. }, {
  27096. "label": "天峻县",
  27097. "value": "632823"
  27098. }, {
  27099. "label": "大柴旦行政委员会",
  27100. "value": "632857"
  27101. }, {
  27102. "label": "冷湖行政委员会",
  27103. "value": "632858"
  27104. }, {
  27105. "label": "茫崖行政委员会",
  27106. "value": "632859"
  27107. }]], [[{
  27108. "label": "兴庆区",
  27109. "value": "640104"
  27110. }, {
  27111. "label": "西夏区",
  27112. "value": "640105"
  27113. }, {
  27114. "label": "金凤区",
  27115. "value": "640106"
  27116. }, {
  27117. "label": "永宁县",
  27118. "value": "640121"
  27119. }, {
  27120. "label": "贺兰县",
  27121. "value": "640122"
  27122. }, {
  27123. "label": "灵武市",
  27124. "value": "640181"
  27125. }], [{
  27126. "label": "大武口区",
  27127. "value": "640202"
  27128. }, {
  27129. "label": "惠农区",
  27130. "value": "640205"
  27131. }, {
  27132. "label": "平罗县",
  27133. "value": "640221"
  27134. }], [{
  27135. "label": "利通区",
  27136. "value": "640302"
  27137. }, {
  27138. "label": "红寺堡区",
  27139. "value": "640303"
  27140. }, {
  27141. "label": "盐池县",
  27142. "value": "640323"
  27143. }, {
  27144. "label": "同心县",
  27145. "value": "640324"
  27146. }, {
  27147. "label": "青铜峡市",
  27148. "value": "640381"
  27149. }], [{
  27150. "label": "原州区",
  27151. "value": "640402"
  27152. }, {
  27153. "label": "西吉县",
  27154. "value": "640422"
  27155. }, {
  27156. "label": "隆德县",
  27157. "value": "640423"
  27158. }, {
  27159. "label": "泾源县",
  27160. "value": "640424"
  27161. }, {
  27162. "label": "彭阳县",
  27163. "value": "640425"
  27164. }], [{
  27165. "label": "沙坡头区",
  27166. "value": "640502"
  27167. }, {
  27168. "label": "中宁县",
  27169. "value": "640521"
  27170. }, {
  27171. "label": "海原县",
  27172. "value": "640522"
  27173. }]], [[{
  27174. "label": "天山区",
  27175. "value": "650102"
  27176. }, {
  27177. "label": "沙依巴克区",
  27178. "value": "650103"
  27179. }, {
  27180. "label": "新市区",
  27181. "value": "650104"
  27182. }, {
  27183. "label": "水磨沟区",
  27184. "value": "650105"
  27185. }, {
  27186. "label": "头屯河区",
  27187. "value": "650106"
  27188. }, {
  27189. "label": "达坂城区",
  27190. "value": "650107"
  27191. }, {
  27192. "label": "米东区",
  27193. "value": "650109"
  27194. }, {
  27195. "label": "乌鲁木齐县",
  27196. "value": "650121"
  27197. }, {
  27198. "label": "乌鲁木齐经济技术开发区",
  27199. "value": "650171"
  27200. }, {
  27201. "label": "乌鲁木齐高新技术产业开发区",
  27202. "value": "650172"
  27203. }], [{
  27204. "label": "独山子区",
  27205. "value": "650202"
  27206. }, {
  27207. "label": "克拉玛依区",
  27208. "value": "650203"
  27209. }, {
  27210. "label": "白碱滩区",
  27211. "value": "650204"
  27212. }, {
  27213. "label": "乌尔禾区",
  27214. "value": "650205"
  27215. }], [{
  27216. "label": "高昌区",
  27217. "value": "650402"
  27218. }, {
  27219. "label": "鄯善县",
  27220. "value": "650421"
  27221. }, {
  27222. "label": "托克逊县",
  27223. "value": "650422"
  27224. }], [{
  27225. "label": "伊州区",
  27226. "value": "650502"
  27227. }, {
  27228. "label": "巴里坤哈萨克自治县",
  27229. "value": "650521"
  27230. }, {
  27231. "label": "伊吾县",
  27232. "value": "650522"
  27233. }], [{
  27234. "label": "昌吉市",
  27235. "value": "652301"
  27236. }, {
  27237. "label": "阜康市",
  27238. "value": "652302"
  27239. }, {
  27240. "label": "呼图壁县",
  27241. "value": "652323"
  27242. }, {
  27243. "label": "玛纳斯县",
  27244. "value": "652324"
  27245. }, {
  27246. "label": "奇台县",
  27247. "value": "652325"
  27248. }, {
  27249. "label": "吉木萨尔县",
  27250. "value": "652327"
  27251. }, {
  27252. "label": "木垒哈萨克自治县",
  27253. "value": "652328"
  27254. }], [{
  27255. "label": "博乐市",
  27256. "value": "652701"
  27257. }, {
  27258. "label": "阿拉山口市",
  27259. "value": "652702"
  27260. }, {
  27261. "label": "精河县",
  27262. "value": "652722"
  27263. }, {
  27264. "label": "温泉县",
  27265. "value": "652723"
  27266. }], [{
  27267. "label": "库尔勒市",
  27268. "value": "652801"
  27269. }, {
  27270. "label": "轮台县",
  27271. "value": "652822"
  27272. }, {
  27273. "label": "尉犁县",
  27274. "value": "652823"
  27275. }, {
  27276. "label": "若羌县",
  27277. "value": "652824"
  27278. }, {
  27279. "label": "且末县",
  27280. "value": "652825"
  27281. }, {
  27282. "label": "焉耆回族自治县",
  27283. "value": "652826"
  27284. }, {
  27285. "label": "和静县",
  27286. "value": "652827"
  27287. }, {
  27288. "label": "和硕县",
  27289. "value": "652828"
  27290. }, {
  27291. "label": "博湖县",
  27292. "value": "652829"
  27293. }, {
  27294. "label": "库尔勒经济技术开发区",
  27295. "value": "652871"
  27296. }], [{
  27297. "label": "阿克苏市",
  27298. "value": "652901"
  27299. }, {
  27300. "label": "温宿县",
  27301. "value": "652922"
  27302. }, {
  27303. "label": "库车县",
  27304. "value": "652923"
  27305. }, {
  27306. "label": "沙雅县",
  27307. "value": "652924"
  27308. }, {
  27309. "label": "新和县",
  27310. "value": "652925"
  27311. }, {
  27312. "label": "拜城县",
  27313. "value": "652926"
  27314. }, {
  27315. "label": "乌什县",
  27316. "value": "652927"
  27317. }, {
  27318. "label": "阿瓦提县",
  27319. "value": "652928"
  27320. }, {
  27321. "label": "柯坪县",
  27322. "value": "652929"
  27323. }], [{
  27324. "label": "阿图什市",
  27325. "value": "653001"
  27326. }, {
  27327. "label": "阿克陶县",
  27328. "value": "653022"
  27329. }, {
  27330. "label": "阿合奇县",
  27331. "value": "653023"
  27332. }, {
  27333. "label": "乌恰县",
  27334. "value": "653024"
  27335. }], [{
  27336. "label": "喀什市",
  27337. "value": "653101"
  27338. }, {
  27339. "label": "疏附县",
  27340. "value": "653121"
  27341. }, {
  27342. "label": "疏勒县",
  27343. "value": "653122"
  27344. }, {
  27345. "label": "英吉沙县",
  27346. "value": "653123"
  27347. }, {
  27348. "label": "泽普县",
  27349. "value": "653124"
  27350. }, {
  27351. "label": "莎车县",
  27352. "value": "653125"
  27353. }, {
  27354. "label": "叶城县",
  27355. "value": "653126"
  27356. }, {
  27357. "label": "麦盖提县",
  27358. "value": "653127"
  27359. }, {
  27360. "label": "岳普湖县",
  27361. "value": "653128"
  27362. }, {
  27363. "label": "伽师县",
  27364. "value": "653129"
  27365. }, {
  27366. "label": "巴楚县",
  27367. "value": "653130"
  27368. }, {
  27369. "label": "塔什库尔干塔吉克自治县",
  27370. "value": "653131"
  27371. }], [{
  27372. "label": "和田市",
  27373. "value": "653201"
  27374. }, {
  27375. "label": "和田县",
  27376. "value": "653221"
  27377. }, {
  27378. "label": "墨玉县",
  27379. "value": "653222"
  27380. }, {
  27381. "label": "皮山县",
  27382. "value": "653223"
  27383. }, {
  27384. "label": "洛浦县",
  27385. "value": "653224"
  27386. }, {
  27387. "label": "策勒县",
  27388. "value": "653225"
  27389. }, {
  27390. "label": "于田县",
  27391. "value": "653226"
  27392. }, {
  27393. "label": "民丰县",
  27394. "value": "653227"
  27395. }], [{
  27396. "label": "伊宁市",
  27397. "value": "654002"
  27398. }, {
  27399. "label": "奎屯市",
  27400. "value": "654003"
  27401. }, {
  27402. "label": "霍尔果斯市",
  27403. "value": "654004"
  27404. }, {
  27405. "label": "伊宁县",
  27406. "value": "654021"
  27407. }, {
  27408. "label": "察布查尔锡伯自治县",
  27409. "value": "654022"
  27410. }, {
  27411. "label": "霍城县",
  27412. "value": "654023"
  27413. }, {
  27414. "label": "巩留县",
  27415. "value": "654024"
  27416. }, {
  27417. "label": "新源县",
  27418. "value": "654025"
  27419. }, {
  27420. "label": "昭苏县",
  27421. "value": "654026"
  27422. }, {
  27423. "label": "特克斯县",
  27424. "value": "654027"
  27425. }, {
  27426. "label": "尼勒克县",
  27427. "value": "654028"
  27428. }], [{
  27429. "label": "塔城市",
  27430. "value": "654201"
  27431. }, {
  27432. "label": "乌苏市",
  27433. "value": "654202"
  27434. }, {
  27435. "label": "额敏县",
  27436. "value": "654221"
  27437. }, {
  27438. "label": "沙湾县",
  27439. "value": "654223"
  27440. }, {
  27441. "label": "托里县",
  27442. "value": "654224"
  27443. }, {
  27444. "label": "裕民县",
  27445. "value": "654225"
  27446. }, {
  27447. "label": "和布克赛尔蒙古自治县",
  27448. "value": "654226"
  27449. }], [{
  27450. "label": "阿勒泰市",
  27451. "value": "654301"
  27452. }, {
  27453. "label": "布尔津县",
  27454. "value": "654321"
  27455. }, {
  27456. "label": "富蕴县",
  27457. "value": "654322"
  27458. }, {
  27459. "label": "福海县",
  27460. "value": "654323"
  27461. }, {
  27462. "label": "哈巴河县",
  27463. "value": "654324"
  27464. }, {
  27465. "label": "青河县",
  27466. "value": "654325"
  27467. }, {
  27468. "label": "吉木乃县",
  27469. "value": "654326"
  27470. }], [{
  27471. "label": "石河子市",
  27472. "value": "659001"
  27473. }, {
  27474. "label": "阿拉尔市",
  27475. "value": "659002"
  27476. }, {
  27477. "label": "图木舒克市",
  27478. "value": "659003"
  27479. }, {
  27480. "label": "五家渠市",
  27481. "value": "659004"
  27482. }, {
  27483. "label": "铁门关市",
  27484. "value": "659006"
  27485. }]], [[{
  27486. "label": "台北",
  27487. "value": "660101"
  27488. }], [{
  27489. "label": "高雄",
  27490. "value": "660201"
  27491. }], [{
  27492. "label": "基隆",
  27493. "value": "660301"
  27494. }], [{
  27495. "label": "台中",
  27496. "value": "660401"
  27497. }], [{
  27498. "label": "台南",
  27499. "value": "660501"
  27500. }], [{
  27501. "label": "新竹",
  27502. "value": "660601"
  27503. }], [{
  27504. "label": "嘉义",
  27505. "value": "660701"
  27506. }], [{
  27507. "label": "宜兰",
  27508. "value": "660801"
  27509. }], [{
  27510. "label": "桃园",
  27511. "value": "660901"
  27512. }], [{
  27513. "label": "苗栗",
  27514. "value": "661001"
  27515. }], [{
  27516. "label": "彰化",
  27517. "value": "661101"
  27518. }], [{
  27519. "label": "南投",
  27520. "value": "661201"
  27521. }], [{
  27522. "label": "云林",
  27523. "value": "661301"
  27524. }], [{
  27525. "label": "屏东",
  27526. "value": "661401"
  27527. }], [{
  27528. "label": "台东",
  27529. "value": "661501"
  27530. }], [{
  27531. "label": "花莲",
  27532. "value": "661601"
  27533. }], [{
  27534. "label": "澎湖",
  27535. "value": "661701"
  27536. }]], [[{
  27537. "label": "香港岛",
  27538. "value": "670101"
  27539. }], [{
  27540. "label": "九龙",
  27541. "value": "670201"
  27542. }], [{
  27543. "label": "新界",
  27544. "value": "670301"
  27545. }]], [[{
  27546. "label": "澳门半岛",
  27547. "value": "680101"
  27548. }], [{
  27549. "label": "氹仔岛",
  27550. "value": "680201"
  27551. }], [{
  27552. "label": "路环岛",
  27553. "value": "680301"
  27554. }], [{
  27555. "label": "路氹城",
  27556. "value": "680401"
  27557. }]]];
  27558. var _default = areaData;
  27559. exports.default = _default;
  27560. /***/ }),
  27561. /***/ 49:
  27562. /*!******************************************************************!*\
  27563. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/route.js ***!
  27564. \******************************************************************/
  27565. /*! no static exports found */
  27566. /***/ (function(module, exports, __webpack_require__) {
  27567. "use strict";
  27568. /* WEBPACK VAR INJECTION */(function(uni) {
  27569. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  27570. Object.defineProperty(exports, "__esModule", {
  27571. value: true
  27572. });
  27573. exports.default = void 0;
  27574. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  27575. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  27576. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  27577. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  27578. /**
  27579. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  27580. * 并且带有路由拦截功能
  27581. */
  27582. var Router = /*#__PURE__*/function () {
  27583. function Router() {
  27584. (0, _classCallCheck2.default)(this, Router);
  27585. // 原始属性定义
  27586. this.config = {
  27587. type: 'navigateTo',
  27588. url: '',
  27589. delta: 1,
  27590. // navigateBack页面后退时,回退的层数
  27591. params: {},
  27592. // 传递的参数
  27593. animationType: 'pop-in',
  27594. // 窗口动画,只在APP有效
  27595. animationDuration: 300,
  27596. // 窗口动画持续时间,单位毫秒,只在APP有效
  27597. intercept: false // 是否需要拦截
  27598. };
  27599. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  27600. // 这里在构造函数中进行this绑定
  27601. this.route = this.route.bind(this);
  27602. }
  27603. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  27604. (0, _createClass2.default)(Router, [{
  27605. key: "addRootPath",
  27606. value: function addRootPath(url) {
  27607. return url[0] === '/' ? url : "/".concat(url);
  27608. }
  27609. // 整合路由参数
  27610. }, {
  27611. key: "mixinParam",
  27612. value: function mixinParam(url, params) {
  27613. url = url && this.addRootPath(url);
  27614. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  27615. // 如果有url中有get参数,转换后无需带上"?"
  27616. var query = '';
  27617. if (/.*\/.*\?.*=.*/.test(url)) {
  27618. // object对象转为get类型的参数
  27619. query = uni.$u.queryParams(params, false);
  27620. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  27621. return url += "&" + query;
  27622. } else {
  27623. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  27624. query = uni.$u.queryParams(params);
  27625. return url += query;
  27626. }
  27627. }
  27628. // 对外的方法名称
  27629. }, {
  27630. key: "route",
  27631. value: function () {
  27632. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  27633. var options,
  27634. params,
  27635. mergeConfig,
  27636. isNext,
  27637. _args = arguments;
  27638. return _regenerator.default.wrap(function _callee$(_context) {
  27639. while (1) {
  27640. switch (_context.prev = _context.next) {
  27641. case 0:
  27642. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  27643. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  27644. // 合并用户的配置和内部的默认配置
  27645. mergeConfig = {};
  27646. if (typeof options === 'string') {
  27647. // 如果options为字符串,则为route(url, params)的形式
  27648. mergeConfig.url = this.mixinParam(options, params);
  27649. mergeConfig.type = 'navigateTo';
  27650. } else {
  27651. mergeConfig = uni.$u.deepClone(options, this.config);
  27652. // 否则正常使用mergeConfig中的url和params进行拼接
  27653. mergeConfig.url = this.mixinParam(options.url, options.params);
  27654. }
  27655. if (params.intercept) {
  27656. this.config.intercept = params.intercept;
  27657. }
  27658. // params参数也带给拦截器
  27659. mergeConfig.params = params;
  27660. // 合并内外部参数
  27661. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  27662. // 判断用户是否定义了拦截器
  27663. if (!(typeof uni.$u.routeIntercept === 'function')) {
  27664. _context.next = 14;
  27665. break;
  27666. }
  27667. _context.next = 10;
  27668. return new Promise(function (resolve, reject) {
  27669. uni.$u.routeIntercept(mergeConfig, resolve);
  27670. });
  27671. case 10:
  27672. isNext = _context.sent;
  27673. // 如果isNext为true,则执行路由跳转
  27674. isNext && this.openPage(mergeConfig);
  27675. _context.next = 15;
  27676. break;
  27677. case 14:
  27678. this.openPage(mergeConfig);
  27679. case 15:
  27680. case "end":
  27681. return _context.stop();
  27682. }
  27683. }
  27684. }, _callee, this);
  27685. }));
  27686. function route() {
  27687. return _route.apply(this, arguments);
  27688. }
  27689. return route;
  27690. }() // 执行路由跳转
  27691. }, {
  27692. key: "openPage",
  27693. value: function openPage(config) {
  27694. // 解构参数
  27695. var url = config.url,
  27696. type = config.type,
  27697. delta = config.delta,
  27698. animationType = config.animationType,
  27699. animationDuration = config.animationDuration;
  27700. if (config.type == 'navigateTo' || config.type == 'to') {
  27701. uni.navigateTo({
  27702. url: url,
  27703. animationType: animationType,
  27704. animationDuration: animationDuration
  27705. });
  27706. }
  27707. if (config.type == 'redirectTo' || config.type == 'redirect') {
  27708. uni.redirectTo({
  27709. url: url
  27710. });
  27711. }
  27712. if (config.type == 'switchTab' || config.type == 'tab') {
  27713. uni.switchTab({
  27714. url: url
  27715. });
  27716. }
  27717. if (config.type == 'reLaunch' || config.type == 'launch') {
  27718. uni.reLaunch({
  27719. url: url
  27720. });
  27721. }
  27722. if (config.type == 'navigateBack' || config.type == 'back') {
  27723. uni.navigateBack({
  27724. delta: delta
  27725. });
  27726. }
  27727. }
  27728. }]);
  27729. return Router;
  27730. }();
  27731. var _default = new Router().route;
  27732. exports.default = _default;
  27733. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  27734. /***/ }),
  27735. /***/ 5:
  27736. /*!**************************************************************!*\
  27737. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  27738. \**************************************************************/
  27739. /*! no static exports found */
  27740. /***/ (function(module, exports, __webpack_require__) {
  27741. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  27742. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  27743. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  27744. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  27745. function _slicedToArray(arr, i) {
  27746. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  27747. }
  27748. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  27749. /***/ }),
  27750. /***/ 50:
  27751. /*!************************************************************************************************!*\
  27752. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  27753. \************************************************************************************************/
  27754. /*! no static exports found */
  27755. /***/ (function(module, exports, __webpack_require__) {
  27756. // TODO(Babel 8): Remove this file.
  27757. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 51)();
  27758. module.exports = runtime;
  27759. /***/ }),
  27760. /***/ 502:
  27761. /*!************************************************************************************!*\
  27762. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  27763. \************************************************************************************/
  27764. /*! no static exports found */
  27765. /***/ (function(module, exports, __webpack_require__) {
  27766. "use strict";
  27767. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  27768. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  27769. Object.defineProperty(exports, "__esModule", {
  27770. value: true
  27771. });
  27772. exports.default = void 0;
  27773. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  27774. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 503));
  27775. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  27776. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  27777. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  27778. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  27779. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  27780. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 504));
  27781. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 505));
  27782. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 506));
  27783. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 507));
  27784. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  27785. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  27786. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  27787. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 509));
  27788. 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; } } }; }
  27789. 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); }
  27790. 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; }
  27791. 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; }
  27792. 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; }
  27793. 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); }; }
  27794. 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; } }
  27795. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  27796. function n(e) {
  27797. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  27798. }
  27799. function s(e, t, n) {
  27800. return e(n = {
  27801. path: t,
  27802. exports: {},
  27803. require: function require(e, t) {
  27804. return function () {
  27805. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  27806. }(null == t && n.path);
  27807. }
  27808. }, n.exports), n.exports;
  27809. }
  27810. var r = s(function (e, t) {
  27811. var n;
  27812. e.exports = (n = n || function (e, t) {
  27813. var n = Object.create || function () {
  27814. function e() {}
  27815. return function (t) {
  27816. var n;
  27817. return e.prototype = t, n = new e(), e.prototype = null, n;
  27818. };
  27819. }(),
  27820. s = {},
  27821. r = s.lib = {},
  27822. i = r.Base = {
  27823. extend: function extend(e) {
  27824. var t = n(this);
  27825. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  27826. t.$super.init.apply(this, arguments);
  27827. }), t.init.prototype = t, t.$super = this, t;
  27828. },
  27829. create: function create() {
  27830. var e = this.extend();
  27831. return e.init.apply(e, arguments), e;
  27832. },
  27833. init: function init() {},
  27834. mixIn: function mixIn(e) {
  27835. for (var t in e) {
  27836. e.hasOwnProperty(t) && (this[t] = e[t]);
  27837. }
  27838. e.hasOwnProperty("toString") && (this.toString = e.toString);
  27839. },
  27840. clone: function clone() {
  27841. return this.init.prototype.extend(this);
  27842. }
  27843. },
  27844. o = r.WordArray = i.extend({
  27845. init: function init(e, n) {
  27846. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  27847. },
  27848. toString: function toString(e) {
  27849. return (e || c).stringify(this);
  27850. },
  27851. concat: function concat(e) {
  27852. var t = this.words,
  27853. n = e.words,
  27854. s = this.sigBytes,
  27855. r = e.sigBytes;
  27856. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  27857. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  27858. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  27859. } else for (i = 0; i < r; i += 4) {
  27860. t[s + i >>> 2] = n[i >>> 2];
  27861. }
  27862. return this.sigBytes += r, this;
  27863. },
  27864. clamp: function clamp() {
  27865. var t = this.words,
  27866. n = this.sigBytes;
  27867. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  27868. },
  27869. clone: function clone() {
  27870. var e = i.clone.call(this);
  27871. return e.words = this.words.slice(0), e;
  27872. },
  27873. random: function random(t) {
  27874. for (var n, s = [], r = function r(t) {
  27875. t = t;
  27876. var n = 987654321,
  27877. s = 4294967295;
  27878. return function () {
  27879. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  27880. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  27881. };
  27882. }, i = 0; i < t; i += 4) {
  27883. var a = r(4294967296 * (n || e.random()));
  27884. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  27885. }
  27886. return new o.init(s, t);
  27887. }
  27888. }),
  27889. a = s.enc = {},
  27890. c = a.Hex = {
  27891. stringify: function stringify(e) {
  27892. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  27893. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  27894. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  27895. }
  27896. return s.join("");
  27897. },
  27898. parse: function parse(e) {
  27899. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  27900. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  27901. }
  27902. return new o.init(n, t / 2);
  27903. }
  27904. },
  27905. u = a.Latin1 = {
  27906. stringify: function stringify(e) {
  27907. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  27908. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  27909. s.push(String.fromCharCode(i));
  27910. }
  27911. return s.join("");
  27912. },
  27913. parse: function parse(e) {
  27914. for (var t = e.length, n = [], s = 0; s < t; s++) {
  27915. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  27916. }
  27917. return new o.init(n, t);
  27918. }
  27919. },
  27920. h = a.Utf8 = {
  27921. stringify: function stringify(e) {
  27922. try {
  27923. return decodeURIComponent(escape(u.stringify(e)));
  27924. } catch (e) {
  27925. throw new Error("Malformed UTF-8 data");
  27926. }
  27927. },
  27928. parse: function parse(e) {
  27929. return u.parse(unescape(encodeURIComponent(e)));
  27930. }
  27931. },
  27932. l = r.BufferedBlockAlgorithm = i.extend({
  27933. reset: function reset() {
  27934. this._data = new o.init(), this._nDataBytes = 0;
  27935. },
  27936. _append: function _append(e) {
  27937. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  27938. },
  27939. _process: function _process(t) {
  27940. var n = this._data,
  27941. s = n.words,
  27942. r = n.sigBytes,
  27943. i = this.blockSize,
  27944. a = r / (4 * i),
  27945. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  27946. u = e.min(4 * c, r);
  27947. if (c) {
  27948. for (var h = 0; h < c; h += i) {
  27949. this._doProcessBlock(s, h);
  27950. }
  27951. var l = s.splice(0, c);
  27952. n.sigBytes -= u;
  27953. }
  27954. return new o.init(l, u);
  27955. },
  27956. clone: function clone() {
  27957. var e = i.clone.call(this);
  27958. return e._data = this._data.clone(), e;
  27959. },
  27960. _minBufferSize: 0
  27961. });
  27962. r.Hasher = l.extend({
  27963. cfg: i.extend(),
  27964. init: function init(e) {
  27965. this.cfg = this.cfg.extend(e), this.reset();
  27966. },
  27967. reset: function reset() {
  27968. l.reset.call(this), this._doReset();
  27969. },
  27970. update: function update(e) {
  27971. return this._append(e), this._process(), this;
  27972. },
  27973. finalize: function finalize(e) {
  27974. return e && this._append(e), this._doFinalize();
  27975. },
  27976. blockSize: 16,
  27977. _createHelper: function _createHelper(e) {
  27978. return function (t, n) {
  27979. return new e.init(n).finalize(t);
  27980. };
  27981. },
  27982. _createHmacHelper: function _createHmacHelper(e) {
  27983. return function (t, n) {
  27984. return new d.HMAC.init(e, n).finalize(t);
  27985. };
  27986. }
  27987. });
  27988. var d = s.algo = {};
  27989. return s;
  27990. }(Math), n);
  27991. }),
  27992. i = r,
  27993. o = (s(function (e, t) {
  27994. var n;
  27995. e.exports = (n = i, function (e) {
  27996. var t = n,
  27997. s = t.lib,
  27998. r = s.WordArray,
  27999. i = s.Hasher,
  28000. o = t.algo,
  28001. a = [];
  28002. !function () {
  28003. for (var t = 0; t < 64; t++) {
  28004. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  28005. }
  28006. }();
  28007. var c = o.MD5 = i.extend({
  28008. _doReset: function _doReset() {
  28009. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  28010. },
  28011. _doProcessBlock: function _doProcessBlock(e, t) {
  28012. for (var n = 0; n < 16; n++) {
  28013. var s = t + n,
  28014. r = e[s];
  28015. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  28016. }
  28017. var i = this._hash.words,
  28018. o = e[t + 0],
  28019. c = e[t + 1],
  28020. p = e[t + 2],
  28021. f = e[t + 3],
  28022. g = e[t + 4],
  28023. m = e[t + 5],
  28024. y = e[t + 6],
  28025. _ = e[t + 7],
  28026. w = e[t + 8],
  28027. v = e[t + 9],
  28028. I = e[t + 10],
  28029. S = e[t + 11],
  28030. b = e[t + 12],
  28031. k = e[t + 13],
  28032. C = e[t + 14],
  28033. T = e[t + 15],
  28034. P = i[0],
  28035. A = i[1],
  28036. E = i[2],
  28037. O = i[3];
  28038. 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;
  28039. },
  28040. _doFinalize: function _doFinalize() {
  28041. var t = this._data,
  28042. n = t.words,
  28043. s = 8 * this._nDataBytes,
  28044. r = 8 * t.sigBytes;
  28045. n[r >>> 5] |= 128 << 24 - r % 32;
  28046. var i = e.floor(s / 4294967296),
  28047. o = s;
  28048. 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();
  28049. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  28050. var h = c[u];
  28051. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  28052. }
  28053. return a;
  28054. },
  28055. clone: function clone() {
  28056. var e = i.clone.call(this);
  28057. return e._hash = this._hash.clone(), e;
  28058. }
  28059. });
  28060. function u(e, t, n, s, r, i, o) {
  28061. var a = e + (t & n | ~t & s) + r + o;
  28062. return (a << i | a >>> 32 - i) + t;
  28063. }
  28064. function h(e, t, n, s, r, i, o) {
  28065. var a = e + (t & s | n & ~s) + r + o;
  28066. return (a << i | a >>> 32 - i) + t;
  28067. }
  28068. function l(e, t, n, s, r, i, o) {
  28069. var a = e + (t ^ n ^ s) + r + o;
  28070. return (a << i | a >>> 32 - i) + t;
  28071. }
  28072. function d(e, t, n, s, r, i, o) {
  28073. var a = e + (n ^ (t | ~s)) + r + o;
  28074. return (a << i | a >>> 32 - i) + t;
  28075. }
  28076. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  28077. }(Math), n.MD5);
  28078. }), s(function (e, t) {
  28079. var n;
  28080. e.exports = (n = i, void function () {
  28081. var e = n,
  28082. t = e.lib.Base,
  28083. s = e.enc.Utf8;
  28084. e.algo.HMAC = t.extend({
  28085. init: function init(e, t) {
  28086. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  28087. var n = e.blockSize,
  28088. r = 4 * n;
  28089. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  28090. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  28091. a[u] ^= 1549556828, c[u] ^= 909522486;
  28092. }
  28093. i.sigBytes = o.sigBytes = r, this.reset();
  28094. },
  28095. reset: function reset() {
  28096. var e = this._hasher;
  28097. e.reset(), e.update(this._iKey);
  28098. },
  28099. update: function update(e) {
  28100. return this._hasher.update(e), this;
  28101. },
  28102. finalize: function finalize(e) {
  28103. var t = this._hasher,
  28104. n = t.finalize(e);
  28105. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  28106. }
  28107. });
  28108. }());
  28109. }), s(function (e, t) {
  28110. e.exports = i.HmacMD5;
  28111. })),
  28112. a = s(function (e, t) {
  28113. e.exports = i.enc.Utf8;
  28114. }),
  28115. c = s(function (e, t) {
  28116. var n;
  28117. e.exports = (n = i, function () {
  28118. var e = n,
  28119. t = e.lib.WordArray;
  28120. function s(e, n, s) {
  28121. for (var r = [], i = 0, o = 0; o < n; o++) {
  28122. if (o % 4) {
  28123. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  28124. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  28125. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  28126. }
  28127. }
  28128. return t.create(r, i);
  28129. }
  28130. e.enc.Base64 = {
  28131. stringify: function stringify(e) {
  28132. var t = e.words,
  28133. n = e.sigBytes,
  28134. s = this._map;
  28135. e.clamp();
  28136. for (var r = [], i = 0; i < n; i += 3) {
  28137. 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++) {
  28138. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  28139. }
  28140. }
  28141. var c = s.charAt(64);
  28142. if (c) for (; r.length % 4;) {
  28143. r.push(c);
  28144. }
  28145. return r.join("");
  28146. },
  28147. parse: function parse(e) {
  28148. var t = e.length,
  28149. n = this._map,
  28150. r = this._reverseMap;
  28151. if (!r) {
  28152. r = this._reverseMap = [];
  28153. for (var i = 0; i < n.length; i++) {
  28154. r[n.charCodeAt(i)] = i;
  28155. }
  28156. }
  28157. var o = n.charAt(64);
  28158. if (o) {
  28159. var a = e.indexOf(o);
  28160. -1 !== a && (t = a);
  28161. }
  28162. return s(e, t, r);
  28163. },
  28164. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  28165. };
  28166. }(), n.enc.Base64);
  28167. });
  28168. var u = "FUNCTION",
  28169. h = "OBJECT",
  28170. l = "CLIENT_DB",
  28171. d = "pending",
  28172. p = "fullfilled",
  28173. f = "rejected";
  28174. function g(e) {
  28175. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  28176. }
  28177. function m(e) {
  28178. return "object" === g(e);
  28179. }
  28180. function y(e) {
  28181. return "function" == typeof e;
  28182. }
  28183. function _(e) {
  28184. return function () {
  28185. try {
  28186. return e.apply(e, arguments);
  28187. } catch (e) {
  28188. console.error(e);
  28189. }
  28190. };
  28191. }
  28192. var w = "REJECTED",
  28193. v = "NOT_PENDING";
  28194. var I = /*#__PURE__*/function () {
  28195. function I() {
  28196. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  28197. e = _ref.createPromise,
  28198. _ref$retryRule = _ref.retryRule,
  28199. t = _ref$retryRule === void 0 ? w : _ref$retryRule;
  28200. (0, _classCallCheck2.default)(this, I);
  28201. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  28202. }
  28203. (0, _createClass2.default)(I, [{
  28204. key: "needRetry",
  28205. get: function get() {
  28206. if (!this.status) return !0;
  28207. switch (this.retryRule) {
  28208. case w:
  28209. return this.status === f;
  28210. case v:
  28211. return this.status !== d;
  28212. }
  28213. }
  28214. }, {
  28215. key: "exec",
  28216. value: function exec() {
  28217. var _this = this;
  28218. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then(function (e) {
  28219. return _this.status = p, Promise.resolve(e);
  28220. }, function (e) {
  28221. return _this.status = f, Promise.reject(e);
  28222. }), this.promise) : this.promise;
  28223. }
  28224. }]);
  28225. return I;
  28226. }();
  28227. function S(e) {
  28228. return e && "string" == typeof e ? JSON.parse(e) : e;
  28229. }
  28230. var b = "development" === "development",
  28231. k = "mp-weixin",
  28232. C = "true" === undefined || !0 === undefined,
  28233. T = S([]),
  28234. P = "h5" === k ? "web" : "app-plus" === k ? "app" : k,
  28235. A = S(undefined),
  28236. E = S(undefined) || [],
  28237. O = true;
  28238. var x = "";
  28239. try {
  28240. x = (__webpack_require__(/*! uni-stat-config */ 510).default || __webpack_require__(/*! uni-stat-config */ 510)).appid;
  28241. } catch (e) {}
  28242. var R = {};
  28243. function U(e) {
  28244. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  28245. var n, s;
  28246. return n = R, s = e, Object.prototype.hasOwnProperty.call(n, s) || (R[e] = t), R[e];
  28247. }
  28248. "app" === P && (R = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  28249. var L = ["invoke", "success", "fail", "complete"],
  28250. N = U("_globalUniCloudInterceptor");
  28251. function D(e, t) {
  28252. N[e] || (N[e] = {}), m(t) && Object.keys(t).forEach(function (n) {
  28253. L.indexOf(n) > -1 && function (e, t, n) {
  28254. var s = N[e][t];
  28255. s || (s = N[e][t] = []), -1 === s.indexOf(n) && y(n) && s.push(n);
  28256. }(e, n, t[n]);
  28257. });
  28258. }
  28259. function F(e, t) {
  28260. N[e] || (N[e] = {}), m(t) ? Object.keys(t).forEach(function (n) {
  28261. L.indexOf(n) > -1 && function (e, t, n) {
  28262. var s = N[e][t];
  28263. if (!s) return;
  28264. var r = s.indexOf(n);
  28265. r > -1 && s.splice(r, 1);
  28266. }(e, n, t[n]);
  28267. }) : delete N[e];
  28268. }
  28269. function q(e, t) {
  28270. return e && 0 !== e.length ? e.reduce(function (e, n) {
  28271. return e.then(function () {
  28272. return n(t);
  28273. });
  28274. }, Promise.resolve()) : Promise.resolve();
  28275. }
  28276. function M(e, t) {
  28277. return N[e] && N[e][t] || [];
  28278. }
  28279. function K(e) {
  28280. D("callObject", e);
  28281. }
  28282. var j = U("_globalUniCloudListener"),
  28283. B = "response",
  28284. $ = "needLogin",
  28285. W = "refreshToken",
  28286. z = "clientdb",
  28287. J = "cloudfunction",
  28288. H = "cloudobject";
  28289. function G(e) {
  28290. return j[e] || (j[e] = []), j[e];
  28291. }
  28292. function V(e, t) {
  28293. var n = G(e);
  28294. n.includes(t) || n.push(t);
  28295. }
  28296. function Y(e, t) {
  28297. var n = G(e),
  28298. s = n.indexOf(t);
  28299. -1 !== s && n.splice(s, 1);
  28300. }
  28301. function Q(e, t) {
  28302. var n = G(e);
  28303. for (var _e2 = 0; _e2 < n.length; _e2++) {
  28304. (0, n[_e2])(t);
  28305. }
  28306. }
  28307. var X,
  28308. Z = !1;
  28309. function ee() {
  28310. return X || (X = new Promise(function (e) {
  28311. Z && e(), function t() {
  28312. if ("function" == typeof getCurrentPages) {
  28313. var _t2 = getCurrentPages();
  28314. _t2 && _t2[0] && (Z = !0, e());
  28315. }
  28316. Z || setTimeout(function () {
  28317. t();
  28318. }, 30);
  28319. }();
  28320. }), X);
  28321. }
  28322. function te(e) {
  28323. var t = {};
  28324. for (var _n2 in e) {
  28325. var _s2 = e[_n2];
  28326. y(_s2) && (t[_n2] = _(_s2));
  28327. }
  28328. return t;
  28329. }
  28330. var ne = /*#__PURE__*/function (_Error) {
  28331. (0, _inherits2.default)(ne, _Error);
  28332. var _super = _createSuper(ne);
  28333. function ne(e) {
  28334. var _this2;
  28335. (0, _classCallCheck2.default)(this, ne);
  28336. _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;
  28337. return _this2;
  28338. }
  28339. (0, _createClass2.default)(ne, [{
  28340. key: "toJson",
  28341. value: function toJson() {
  28342. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  28343. if (!(e >= 10)) return e++, {
  28344. errCode: this.errCode,
  28345. errMsg: this.errMsg,
  28346. errSubject: this.errSubject,
  28347. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  28348. };
  28349. }
  28350. }]);
  28351. return ne;
  28352. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  28353. var se = {
  28354. request: function request(e) {
  28355. return uni.request(e);
  28356. },
  28357. uploadFile: function uploadFile(e) {
  28358. return uni.uploadFile(e);
  28359. },
  28360. setStorageSync: function setStorageSync(e, t) {
  28361. return uni.setStorageSync(e, t);
  28362. },
  28363. getStorageSync: function getStorageSync(e) {
  28364. return uni.getStorageSync(e);
  28365. },
  28366. removeStorageSync: function removeStorageSync(e) {
  28367. return uni.removeStorageSync(e);
  28368. },
  28369. clearStorageSync: function clearStorageSync() {
  28370. return uni.clearStorageSync();
  28371. }
  28372. };
  28373. function re() {
  28374. return {
  28375. token: se.getStorageSync("uni_id_token") || se.getStorageSync("uniIdToken"),
  28376. tokenExpired: se.getStorageSync("uni_id_token_expired")
  28377. };
  28378. }
  28379. function ie() {
  28380. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  28381. e = _ref2.token,
  28382. t = _ref2.tokenExpired;
  28383. e && se.setStorageSync("uni_id_token", e), t && se.setStorageSync("uni_id_token_expired", t);
  28384. }
  28385. var oe, ae;
  28386. function ce() {
  28387. return oe || (oe = uni.getSystemInfoSync()), oe;
  28388. }
  28389. function ue() {
  28390. var e, t;
  28391. try {
  28392. if (uni.getLaunchOptionsSync) {
  28393. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  28394. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  28395. _n3 = _uni$getLaunchOptions.scene,
  28396. _s3 = _uni$getLaunchOptions.channel;
  28397. e = _s3, t = _n3;
  28398. }
  28399. } catch (e) {}
  28400. return {
  28401. channel: e,
  28402. scene: t
  28403. };
  28404. }
  28405. function he() {
  28406. var e = uni.getLocale && uni.getLocale() || "en";
  28407. if (ae) return _objectSpread(_objectSpread({}, ae), {}, {
  28408. locale: e,
  28409. LOCALE: e
  28410. });
  28411. var t = ce(),
  28412. n = t.deviceId,
  28413. s = t.osName,
  28414. r = t.uniPlatform,
  28415. i = t.appId,
  28416. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  28417. for (var _e3 = 0; _e3 < o.length; _e3++) {
  28418. delete t[o[_e3]];
  28419. }
  28420. return ae = _objectSpread(_objectSpread({
  28421. PLATFORM: r,
  28422. OS: s,
  28423. APPID: i,
  28424. DEVICEID: n
  28425. }, ue()), t), _objectSpread(_objectSpread({}, ae), {}, {
  28426. locale: e,
  28427. LOCALE: e
  28428. });
  28429. }
  28430. var le = {
  28431. sign: function sign(e, t) {
  28432. var n = "";
  28433. return Object.keys(e).sort().forEach(function (t) {
  28434. e[t] && (n = n + "&" + t + "=" + e[t]);
  28435. }), n = n.slice(1), o(n, t).toString();
  28436. },
  28437. wrappedRequest: function wrappedRequest(e, t) {
  28438. return new Promise(function (n, s) {
  28439. t(Object.assign(e, {
  28440. complete: function complete(e) {
  28441. 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");
  28442. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  28443. if (!e.statusCode || e.statusCode >= 400) return s(new ne({
  28444. code: "SYS_ERR",
  28445. message: e.errMsg || "request:fail",
  28446. requestId: t
  28447. }));
  28448. var r = e.data;
  28449. if (r.error) return s(new ne({
  28450. code: r.error.code,
  28451. message: r.error.message,
  28452. requestId: t
  28453. }));
  28454. r.result = r.data, r.requestId = t, delete r.data, n(r);
  28455. }
  28456. }));
  28457. });
  28458. },
  28459. toBase64: function toBase64(e) {
  28460. return c.stringify(a.parse(e));
  28461. }
  28462. },
  28463. de = {
  28464. "uniCloud.init.paramRequired": "{param} required",
  28465. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  28466. };
  28467. var _e4 = (0, _uniI18n.initVueI18n)({
  28468. "zh-Hans": {
  28469. "uniCloud.init.paramRequired": "缺少参数:{param}",
  28470. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  28471. },
  28472. "zh-Hant": {
  28473. "uniCloud.init.paramRequired": "缺少参数:{param}",
  28474. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  28475. },
  28476. en: de,
  28477. fr: {
  28478. "uniCloud.init.paramRequired": "{param} required",
  28479. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  28480. },
  28481. es: {
  28482. "uniCloud.init.paramRequired": "{param} required",
  28483. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  28484. },
  28485. ja: de
  28486. }, "zh-Hans"),
  28487. pe = _e4.t;
  28488. var fe = /*#__PURE__*/function () {
  28489. function fe(e) {
  28490. var _this3 = this;
  28491. (0, _classCallCheck2.default)(this, fe);
  28492. ["spaceId", "clientSecret"].forEach(function (t) {
  28493. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(pe("uniCloud.init.paramRequired", {
  28494. param: t
  28495. }));
  28496. }), this.config = Object.assign({}, {
  28497. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  28498. }, 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({
  28499. createPromise: function createPromise() {
  28500. return _this3.requestAuth(_this3.setupRequest({
  28501. method: "serverless.auth.user.anonymousAuthorize",
  28502. params: "{}"
  28503. }, "auth")).then(function (e) {
  28504. if (!e.result || !e.result.accessToken) throw new ne({
  28505. code: "AUTH_FAILED",
  28506. message: "获取accessToken失败"
  28507. });
  28508. _this3.setAccessToken(e.result.accessToken);
  28509. });
  28510. },
  28511. retryRule: v
  28512. });
  28513. }
  28514. (0, _createClass2.default)(fe, [{
  28515. key: "hasAccessToken",
  28516. get: function get() {
  28517. return !!this.accessToken;
  28518. }
  28519. }, {
  28520. key: "setAccessToken",
  28521. value: function setAccessToken(e) {
  28522. this.accessToken = e;
  28523. }
  28524. }, {
  28525. key: "requestWrapped",
  28526. value: function requestWrapped(e) {
  28527. return le.wrappedRequest(e, this.adapter.request);
  28528. }
  28529. }, {
  28530. key: "requestAuth",
  28531. value: function requestAuth(e) {
  28532. return this.requestWrapped(e);
  28533. }
  28534. }, {
  28535. key: "request",
  28536. value: function request(e, t) {
  28537. var _this4 = this;
  28538. return Promise.resolve().then(function () {
  28539. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  28540. return new Promise(function (e, n) {
  28541. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  28542. }).then(function () {
  28543. return _this4.getAccessToken();
  28544. }).then(function () {
  28545. var t = _this4.rebuildRequest(e);
  28546. return _this4.request(t, !0);
  28547. });
  28548. }) : _this4.getAccessToken().then(function () {
  28549. var t = _this4.rebuildRequest(e);
  28550. return _this4.request(t, !0);
  28551. });
  28552. });
  28553. }
  28554. }, {
  28555. key: "rebuildRequest",
  28556. value: function rebuildRequest(e) {
  28557. var t = Object.assign({}, e);
  28558. 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;
  28559. }
  28560. }, {
  28561. key: "setupRequest",
  28562. value: function setupRequest(e, t) {
  28563. var n = Object.assign({}, e, {
  28564. spaceId: this.config.spaceId,
  28565. timestamp: Date.now()
  28566. }),
  28567. s = {
  28568. "Content-Type": "application/json"
  28569. };
  28570. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret), {
  28571. url: this.config.requestUrl,
  28572. method: "POST",
  28573. data: n,
  28574. dataType: "json",
  28575. header: s
  28576. };
  28577. }
  28578. }, {
  28579. key: "getAccessToken",
  28580. value: function getAccessToken() {
  28581. return this._getAccessTokenPromiseHub.exec();
  28582. }
  28583. }, {
  28584. key: "authorize",
  28585. value: function () {
  28586. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  28587. return _regenerator.default.wrap(function _callee$(_context) {
  28588. while (1) {
  28589. switch (_context.prev = _context.next) {
  28590. case 0:
  28591. _context.next = 2;
  28592. return this.getAccessToken();
  28593. case 2:
  28594. case "end":
  28595. return _context.stop();
  28596. }
  28597. }
  28598. }, _callee, this);
  28599. }));
  28600. function authorize() {
  28601. return _authorize.apply(this, arguments);
  28602. }
  28603. return authorize;
  28604. }()
  28605. }, {
  28606. key: "callFunction",
  28607. value: function callFunction(e) {
  28608. var t = {
  28609. method: "serverless.function.runtime.invoke",
  28610. params: JSON.stringify({
  28611. functionTarget: e.name,
  28612. functionArgs: e.data || {}
  28613. })
  28614. };
  28615. return this.request(this.setupRequest(t));
  28616. }
  28617. }, {
  28618. key: "getOSSUploadOptionsFromPath",
  28619. value: function getOSSUploadOptionsFromPath(e) {
  28620. var t = {
  28621. method: "serverless.file.resource.generateProximalSign",
  28622. params: JSON.stringify(e)
  28623. };
  28624. return this.request(this.setupRequest(t));
  28625. }
  28626. }, {
  28627. key: "uploadFileToOSS",
  28628. value: function uploadFileToOSS(_ref3) {
  28629. var _this5 = this;
  28630. var e = _ref3.url,
  28631. t = _ref3.formData,
  28632. n = _ref3.name,
  28633. s = _ref3.filePath,
  28634. r = _ref3.fileType,
  28635. i = _ref3.onUploadProgress;
  28636. return new Promise(function (o, a) {
  28637. var c = _this5.adapter.uploadFile({
  28638. url: e,
  28639. formData: t,
  28640. name: n,
  28641. filePath: s,
  28642. fileType: r,
  28643. header: {
  28644. "X-OSS-server-side-encrpytion": "AES256"
  28645. },
  28646. success: function success(e) {
  28647. e && e.statusCode < 400 ? o(e) : a(new ne({
  28648. code: "UPLOAD_FAILED",
  28649. message: "文件上传失败"
  28650. }));
  28651. },
  28652. fail: function fail(e) {
  28653. a(new ne({
  28654. code: e.code || "UPLOAD_FAILED",
  28655. message: e.message || e.errMsg || "文件上传失败"
  28656. }));
  28657. }
  28658. });
  28659. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  28660. i({
  28661. loaded: e.totalBytesSent,
  28662. total: e.totalBytesExpectedToSend
  28663. });
  28664. });
  28665. });
  28666. }
  28667. }, {
  28668. key: "reportOSSUpload",
  28669. value: function reportOSSUpload(e) {
  28670. var t = {
  28671. method: "serverless.file.resource.report",
  28672. params: JSON.stringify(e)
  28673. };
  28674. return this.request(this.setupRequest(t));
  28675. }
  28676. }, {
  28677. key: "uploadFile",
  28678. value: function () {
  28679. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  28680. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, h, l, d, p, f, m, y, _, _e5, w;
  28681. return _regenerator.default.wrap(function _callee2$(_context2) {
  28682. while (1) {
  28683. switch (_context2.prev = _context2.next) {
  28684. case 0:
  28685. 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;
  28686. if (!("string" !== g(t))) {
  28687. _context2.next = 3;
  28688. break;
  28689. }
  28690. throw new ne({
  28691. code: "INVALID_PARAM",
  28692. message: "cloudPath必须为字符串类型"
  28693. });
  28694. case 3:
  28695. if (t = t.trim()) {
  28696. _context2.next = 5;
  28697. break;
  28698. }
  28699. throw new ne({
  28700. code: "INVALID_PARAM",
  28701. message: "cloudPath不可为空"
  28702. });
  28703. case 5:
  28704. if (!/:\/\//.test(t)) {
  28705. _context2.next = 7;
  28706. break;
  28707. }
  28708. throw new ne({
  28709. code: "INVALID_PARAM",
  28710. message: "cloudPath不合法"
  28711. });
  28712. case 7:
  28713. o = i && i.envType || this.config.envType;
  28714. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  28715. _context2.next = 10;
  28716. break;
  28717. }
  28718. throw new ne({
  28719. code: "INVALID_PARAM",
  28720. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  28721. });
  28722. case 10:
  28723. _context2.next = 12;
  28724. return this.getOSSUploadOptionsFromPath({
  28725. env: o,
  28726. filename: s ? t.split("/").pop() : t,
  28727. fileId: s ? t : void 0
  28728. });
  28729. case 12:
  28730. a = _context2.sent.result;
  28731. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  28732. u = a.securityToken;
  28733. h = a.accessKeyId;
  28734. l = a.signature;
  28735. d = a.host;
  28736. p = a.ossPath;
  28737. f = a.id;
  28738. m = a.policy;
  28739. y = a.ossCallbackUrl;
  28740. _ = {
  28741. "Cache-Control": "max-age=2592000",
  28742. "Content-Disposition": "attachment",
  28743. OSSAccessKeyId: h,
  28744. Signature: l,
  28745. host: d,
  28746. id: f,
  28747. key: p,
  28748. policy: m,
  28749. success_action_status: 200
  28750. };
  28751. if (u && (_["x-oss-security-token"] = u), y) {
  28752. _e5 = JSON.stringify({
  28753. callbackUrl: y,
  28754. callbackBody: JSON.stringify({
  28755. fileId: f,
  28756. spaceId: this.config.spaceId
  28757. }),
  28758. callbackBodyType: "application/json"
  28759. });
  28760. _.callback = le.toBase64(_e5);
  28761. }
  28762. w = {
  28763. url: "https://" + a.host,
  28764. formData: _,
  28765. fileName: "file",
  28766. name: "file",
  28767. filePath: e,
  28768. fileType: n
  28769. };
  28770. _context2.next = 27;
  28771. return this.uploadFileToOSS(Object.assign({}, w, {
  28772. onUploadProgress: r
  28773. }));
  28774. case 27:
  28775. if (!y) {
  28776. _context2.next = 29;
  28777. break;
  28778. }
  28779. return _context2.abrupt("return", {
  28780. success: !0,
  28781. filePath: e,
  28782. fileID: c
  28783. });
  28784. case 29:
  28785. _context2.next = 31;
  28786. return this.reportOSSUpload({
  28787. id: f
  28788. });
  28789. case 31:
  28790. if (!_context2.sent.success) {
  28791. _context2.next = 33;
  28792. break;
  28793. }
  28794. return _context2.abrupt("return", {
  28795. success: !0,
  28796. filePath: e,
  28797. fileID: c
  28798. });
  28799. case 33:
  28800. throw new ne({
  28801. code: "UPLOAD_FAILED",
  28802. message: "文件上传失败"
  28803. });
  28804. case 34:
  28805. case "end":
  28806. return _context2.stop();
  28807. }
  28808. }
  28809. }, _callee2, this);
  28810. }));
  28811. function uploadFile(_x) {
  28812. return _uploadFile.apply(this, arguments);
  28813. }
  28814. return uploadFile;
  28815. }()
  28816. }, {
  28817. key: "getTempFileURL",
  28818. value: function getTempFileURL() {
  28819. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  28820. e = _ref5.fileList;
  28821. return new Promise(function (t, n) {
  28822. Array.isArray(e) && 0 !== e.length || n(new ne({
  28823. code: "INVALID_PARAM",
  28824. message: "fileList的元素必须是非空的字符串"
  28825. })), t({
  28826. fileList: e.map(function (e) {
  28827. return {
  28828. fileID: e,
  28829. tempFileURL: e
  28830. };
  28831. })
  28832. });
  28833. });
  28834. }
  28835. }, {
  28836. key: "getFileInfo",
  28837. value: function () {
  28838. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  28839. var _ref6,
  28840. e,
  28841. t,
  28842. _args3 = arguments;
  28843. return _regenerator.default.wrap(function _callee3$(_context3) {
  28844. while (1) {
  28845. switch (_context3.prev = _context3.next) {
  28846. case 0:
  28847. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  28848. if (!(!Array.isArray(e) || 0 === e.length)) {
  28849. _context3.next = 3;
  28850. break;
  28851. }
  28852. throw new ne({
  28853. code: "INVALID_PARAM",
  28854. message: "fileList的元素必须是非空的字符串"
  28855. });
  28856. case 3:
  28857. t = {
  28858. method: "serverless.file.resource.info",
  28859. params: JSON.stringify({
  28860. id: e.map(function (e) {
  28861. return e.split("?")[0];
  28862. }).join(",")
  28863. })
  28864. };
  28865. _context3.next = 6;
  28866. return this.request(this.setupRequest(t));
  28867. case 6:
  28868. _context3.t0 = _context3.sent.result;
  28869. return _context3.abrupt("return", {
  28870. fileList: _context3.t0
  28871. });
  28872. case 8:
  28873. case "end":
  28874. return _context3.stop();
  28875. }
  28876. }
  28877. }, _callee3, this);
  28878. }));
  28879. function getFileInfo() {
  28880. return _getFileInfo.apply(this, arguments);
  28881. }
  28882. return getFileInfo;
  28883. }()
  28884. }]);
  28885. return fe;
  28886. }();
  28887. var ge = {
  28888. init: function init(e) {
  28889. var t = new fe(e),
  28890. n = {
  28891. signInAnonymously: function signInAnonymously() {
  28892. return t.authorize();
  28893. },
  28894. getLoginState: function getLoginState() {
  28895. return Promise.resolve(!1);
  28896. }
  28897. };
  28898. return t.auth = function () {
  28899. return n;
  28900. }, t.customAuth = t.auth, t;
  28901. }
  28902. };
  28903. var me = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  28904. var ye;
  28905. !function (e) {
  28906. e.local = "local", e.none = "none", e.session = "session";
  28907. }(ye || (ye = {}));
  28908. var _e = function _e() {};
  28909. var we = function we() {
  28910. var e;
  28911. if (!Promise) {
  28912. e = function e() {}, e.promise = {};
  28913. var _t3 = function _t3() {
  28914. throw new ne({
  28915. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  28916. });
  28917. };
  28918. return Object.defineProperty(e.promise, "then", {
  28919. get: _t3
  28920. }), Object.defineProperty(e.promise, "catch", {
  28921. get: _t3
  28922. }), e;
  28923. }
  28924. var t = new Promise(function (t, n) {
  28925. e = function e(_e6, s) {
  28926. return _e6 ? n(_e6) : t(s);
  28927. };
  28928. });
  28929. return e.promise = t, e;
  28930. };
  28931. function ve(e) {
  28932. return void 0 === e;
  28933. }
  28934. function Ie(e) {
  28935. return "[object Null]" === Object.prototype.toString.call(e);
  28936. }
  28937. var Se;
  28938. function be(e) {
  28939. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  28940. var n;
  28941. var _iterator = _createForOfIteratorHelper(t),
  28942. _step;
  28943. try {
  28944. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  28945. var _e7 = _step.value;
  28946. var _t4 = _e7.isMatch,
  28947. _n4 = _e7.genAdapter,
  28948. _s4 = _e7.runtime;
  28949. if (_t4()) return {
  28950. adapter: _n4(),
  28951. runtime: _s4
  28952. };
  28953. }
  28954. } catch (err) {
  28955. _iterator.e(err);
  28956. } finally {
  28957. _iterator.f();
  28958. }
  28959. }
  28960. !function (e) {
  28961. e.WEB = "web", e.WX_MP = "wx_mp";
  28962. }(Se || (Se = {}));
  28963. var ke = {
  28964. adapter: null,
  28965. runtime: void 0
  28966. },
  28967. Ce = ["anonymousUuidKey"];
  28968. var Te = /*#__PURE__*/function (_e8) {
  28969. (0, _inherits2.default)(Te, _e8);
  28970. var _super2 = _createSuper(Te);
  28971. function Te() {
  28972. var _this6;
  28973. (0, _classCallCheck2.default)(this, Te);
  28974. _this6 = _super2.call(this), ke.adapter.root.tcbObject || (ke.adapter.root.tcbObject = {});
  28975. return _this6;
  28976. }
  28977. (0, _createClass2.default)(Te, [{
  28978. key: "setItem",
  28979. value: function setItem(e, t) {
  28980. ke.adapter.root.tcbObject[e] = t;
  28981. }
  28982. }, {
  28983. key: "getItem",
  28984. value: function getItem(e) {
  28985. return ke.adapter.root.tcbObject[e];
  28986. }
  28987. }, {
  28988. key: "removeItem",
  28989. value: function removeItem(e) {
  28990. delete ke.adapter.root.tcbObject[e];
  28991. }
  28992. }, {
  28993. key: "clear",
  28994. value: function clear() {
  28995. delete ke.adapter.root.tcbObject;
  28996. }
  28997. }]);
  28998. return Te;
  28999. }(_e);
  29000. function Pe(e, t) {
  29001. switch (e) {
  29002. case "local":
  29003. return t.localStorage || new Te();
  29004. case "none":
  29005. return new Te();
  29006. default:
  29007. return t.sessionStorage || new Te();
  29008. }
  29009. }
  29010. var Ae = /*#__PURE__*/function () {
  29011. function Ae(e) {
  29012. (0, _classCallCheck2.default)(this, Ae);
  29013. if (!this._storage) {
  29014. this._persistence = ke.adapter.primaryStorage || e.persistence, this._storage = Pe(this._persistence, ke.adapter);
  29015. var _t5 = "access_token_".concat(e.env),
  29016. _n5 = "access_token_expire_".concat(e.env),
  29017. _s5 = "refresh_token_".concat(e.env),
  29018. _r = "anonymous_uuid_".concat(e.env),
  29019. _i = "login_type_".concat(e.env),
  29020. _o = "user_info_".concat(e.env);
  29021. this.keys = {
  29022. accessTokenKey: _t5,
  29023. accessTokenExpireKey: _n5,
  29024. refreshTokenKey: _s5,
  29025. anonymousUuidKey: _r,
  29026. loginTypeKey: _i,
  29027. userInfoKey: _o
  29028. };
  29029. }
  29030. }
  29031. (0, _createClass2.default)(Ae, [{
  29032. key: "updatePersistence",
  29033. value: function updatePersistence(e) {
  29034. if (e === this._persistence) return;
  29035. var t = "local" === this._persistence;
  29036. this._persistence = e;
  29037. var n = Pe(e, ke.adapter);
  29038. for (var _e9 in this.keys) {
  29039. var _s6 = this.keys[_e9];
  29040. if (t && Ce.includes(_e9)) continue;
  29041. var _r2 = this._storage.getItem(_s6);
  29042. ve(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  29043. }
  29044. this._storage = n;
  29045. }
  29046. }, {
  29047. key: "setStore",
  29048. value: function setStore(e, t, n) {
  29049. if (!this._storage) return;
  29050. var s = {
  29051. version: n || "localCachev1",
  29052. content: t
  29053. },
  29054. r = JSON.stringify(s);
  29055. try {
  29056. this._storage.setItem(e, r);
  29057. } catch (e) {
  29058. throw e;
  29059. }
  29060. }
  29061. }, {
  29062. key: "getStore",
  29063. value: function getStore(e, t) {
  29064. try {
  29065. if (!this._storage) return;
  29066. } catch (e) {
  29067. return "";
  29068. }
  29069. t = t || "localCachev1";
  29070. var n = this._storage.getItem(e);
  29071. if (!n) return "";
  29072. if (n.indexOf(t) >= 0) {
  29073. return JSON.parse(n).content;
  29074. }
  29075. return "";
  29076. }
  29077. }, {
  29078. key: "removeStore",
  29079. value: function removeStore(e) {
  29080. this._storage.removeItem(e);
  29081. }
  29082. }]);
  29083. return Ae;
  29084. }();
  29085. var Ee = {},
  29086. Oe = {};
  29087. function xe(e) {
  29088. return Ee[e];
  29089. }
  29090. var Re = /*#__PURE__*/(0, _createClass2.default)(function Re(e, t) {
  29091. (0, _classCallCheck2.default)(this, Re);
  29092. this.data = t || null, this.name = e;
  29093. });
  29094. var Ue = /*#__PURE__*/function (_Re) {
  29095. (0, _inherits2.default)(Ue, _Re);
  29096. var _super3 = _createSuper(Ue);
  29097. function Ue(e, t) {
  29098. var _this7;
  29099. (0, _classCallCheck2.default)(this, Ue);
  29100. _this7 = _super3.call(this, "error", {
  29101. error: e,
  29102. data: t
  29103. }), _this7.error = e;
  29104. return _this7;
  29105. }
  29106. return (0, _createClass2.default)(Ue);
  29107. }(Re);
  29108. var Le = new ( /*#__PURE__*/function () {
  29109. function _class() {
  29110. (0, _classCallCheck2.default)(this, _class);
  29111. this._listeners = {};
  29112. }
  29113. (0, _createClass2.default)(_class, [{
  29114. key: "on",
  29115. value: function on(e, t) {
  29116. return function (e, t, n) {
  29117. n[e] = n[e] || [], n[e].push(t);
  29118. }(e, t, this._listeners), this;
  29119. }
  29120. }, {
  29121. key: "off",
  29122. value: function off(e, t) {
  29123. return function (e, t, n) {
  29124. if (n && n[e]) {
  29125. var _s7 = n[e].indexOf(t);
  29126. -1 !== _s7 && n[e].splice(_s7, 1);
  29127. }
  29128. }(e, t, this._listeners), this;
  29129. }
  29130. }, {
  29131. key: "fire",
  29132. value: function fire(e, t) {
  29133. if (e instanceof Ue) return console.error(e.error), this;
  29134. var n = "string" == typeof e ? new Re(e, t || {}) : e;
  29135. var s = n.name;
  29136. if (this._listens(s)) {
  29137. n.target = this;
  29138. var _e10 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  29139. var _iterator2 = _createForOfIteratorHelper(_e10),
  29140. _step2;
  29141. try {
  29142. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  29143. var _t6 = _step2.value;
  29144. _t6.call(this, n);
  29145. }
  29146. } catch (err) {
  29147. _iterator2.e(err);
  29148. } finally {
  29149. _iterator2.f();
  29150. }
  29151. }
  29152. return this;
  29153. }
  29154. }, {
  29155. key: "_listens",
  29156. value: function _listens(e) {
  29157. return this._listeners[e] && this._listeners[e].length > 0;
  29158. }
  29159. }]);
  29160. return _class;
  29161. }())();
  29162. function Ne(e, t) {
  29163. Le.on(e, t);
  29164. }
  29165. function De(e) {
  29166. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  29167. Le.fire(e, t);
  29168. }
  29169. function Fe(e, t) {
  29170. Le.off(e, t);
  29171. }
  29172. var qe = "loginStateChanged",
  29173. Me = "loginStateExpire",
  29174. Ke = "loginTypeChanged",
  29175. je = "anonymousConverted",
  29176. Be = "refreshAccessToken";
  29177. var $e;
  29178. !function (e) {
  29179. 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";
  29180. }($e || ($e = {}));
  29181. var We = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  29182. ze = {
  29183. "X-SDK-Version": "1.3.5"
  29184. };
  29185. function Je(e, t, n) {
  29186. var s = e[t];
  29187. e[t] = function (t) {
  29188. var r = {},
  29189. i = {};
  29190. n.forEach(function (n) {
  29191. var _n$call = n.call(e, t),
  29192. s = _n$call.data,
  29193. o = _n$call.headers;
  29194. Object.assign(r, s), Object.assign(i, o);
  29195. });
  29196. var o = t.data;
  29197. return o && function () {
  29198. var e;
  29199. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e11 in r) {
  29200. o.append(_e11, r[_e11]);
  29201. }
  29202. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  29203. };
  29204. }
  29205. function He() {
  29206. var e = Math.random().toString(16).slice(2);
  29207. return {
  29208. data: {
  29209. seqId: e
  29210. },
  29211. headers: _objectSpread(_objectSpread({}, ze), {}, {
  29212. "x-seqid": e
  29213. })
  29214. };
  29215. }
  29216. var Ge = /*#__PURE__*/function () {
  29217. function Ge() {
  29218. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  29219. (0, _classCallCheck2.default)(this, Ge);
  29220. var t;
  29221. this.config = e, this._reqClass = new ke.adapter.reqClass({
  29222. timeout: this.config.timeout,
  29223. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  29224. restrictedMethods: ["post"]
  29225. }), 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]);
  29226. }
  29227. (0, _createClass2.default)(Ge, [{
  29228. key: "post",
  29229. value: function () {
  29230. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  29231. return _regenerator.default.wrap(function _callee4$(_context4) {
  29232. while (1) {
  29233. switch (_context4.prev = _context4.next) {
  29234. case 0:
  29235. _context4.next = 2;
  29236. return this._reqClass.post(e);
  29237. case 2:
  29238. return _context4.abrupt("return", _context4.sent);
  29239. case 3:
  29240. case "end":
  29241. return _context4.stop();
  29242. }
  29243. }
  29244. }, _callee4, this);
  29245. }));
  29246. function post(_x2) {
  29247. return _post.apply(this, arguments);
  29248. }
  29249. return post;
  29250. }()
  29251. }, {
  29252. key: "upload",
  29253. value: function () {
  29254. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  29255. return _regenerator.default.wrap(function _callee5$(_context5) {
  29256. while (1) {
  29257. switch (_context5.prev = _context5.next) {
  29258. case 0:
  29259. _context5.next = 2;
  29260. return this._reqClass.upload(e);
  29261. case 2:
  29262. return _context5.abrupt("return", _context5.sent);
  29263. case 3:
  29264. case "end":
  29265. return _context5.stop();
  29266. }
  29267. }
  29268. }, _callee5, this);
  29269. }));
  29270. function upload(_x3) {
  29271. return _upload.apply(this, arguments);
  29272. }
  29273. return upload;
  29274. }()
  29275. }, {
  29276. key: "download",
  29277. value: function () {
  29278. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  29279. return _regenerator.default.wrap(function _callee6$(_context6) {
  29280. while (1) {
  29281. switch (_context6.prev = _context6.next) {
  29282. case 0:
  29283. _context6.next = 2;
  29284. return this._reqClass.download(e);
  29285. case 2:
  29286. return _context6.abrupt("return", _context6.sent);
  29287. case 3:
  29288. case "end":
  29289. return _context6.stop();
  29290. }
  29291. }
  29292. }, _callee6, this);
  29293. }));
  29294. function download(_x4) {
  29295. return _download.apply(this, arguments);
  29296. }
  29297. return download;
  29298. }()
  29299. }, {
  29300. key: "refreshAccessToken",
  29301. value: function () {
  29302. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  29303. var e, t;
  29304. return _regenerator.default.wrap(function _callee7$(_context7) {
  29305. while (1) {
  29306. switch (_context7.prev = _context7.next) {
  29307. case 0:
  29308. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  29309. _context7.prev = 1;
  29310. _context7.next = 4;
  29311. return this._refreshAccessTokenPromise;
  29312. case 4:
  29313. e = _context7.sent;
  29314. _context7.next = 10;
  29315. break;
  29316. case 7:
  29317. _context7.prev = 7;
  29318. _context7.t0 = _context7["catch"](1);
  29319. t = _context7.t0;
  29320. case 10:
  29321. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  29322. _context7.next = 12;
  29323. break;
  29324. }
  29325. throw t;
  29326. case 12:
  29327. return _context7.abrupt("return", e);
  29328. case 13:
  29329. case "end":
  29330. return _context7.stop();
  29331. }
  29332. }
  29333. }, _callee7, this, [[1, 7]]);
  29334. }));
  29335. function refreshAccessToken() {
  29336. return _refreshAccessToken2.apply(this, arguments);
  29337. }
  29338. return refreshAccessToken;
  29339. }()
  29340. }, {
  29341. key: "_refreshAccessToken",
  29342. value: function () {
  29343. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  29344. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e12, _e13, _t7, _s8;
  29345. return _regenerator.default.wrap(function _callee8$(_context8) {
  29346. while (1) {
  29347. switch (_context8.prev = _context8.next) {
  29348. case 0:
  29349. _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;
  29350. this._cache.removeStore(e), this._cache.removeStore(t);
  29351. i = this._cache.getStore(n);
  29352. if (i) {
  29353. _context8.next = 5;
  29354. break;
  29355. }
  29356. throw new ne({
  29357. message: "未登录CloudBase"
  29358. });
  29359. case 5:
  29360. o = {
  29361. refresh_token: i
  29362. };
  29363. _context8.next = 8;
  29364. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  29365. case 8:
  29366. a = _context8.sent;
  29367. if (!a.data.code) {
  29368. _context8.next = 21;
  29369. break;
  29370. }
  29371. _e12 = a.data.code;
  29372. if (!("SIGN_PARAM_INVALID" === _e12 || "REFRESH_TOKEN_EXPIRED" === _e12 || "INVALID_REFRESH_TOKEN" === _e12)) {
  29373. _context8.next = 20;
  29374. break;
  29375. }
  29376. if (!(this._cache.getStore(s) === $e.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e12)) {
  29377. _context8.next = 19;
  29378. break;
  29379. }
  29380. _e13 = this._cache.getStore(r);
  29381. _t7 = this._cache.getStore(n);
  29382. _context8.next = 17;
  29383. return this.send("auth.signInAnonymously", {
  29384. anonymous_uuid: _e13,
  29385. refresh_token: _t7
  29386. });
  29387. case 17:
  29388. _s8 = _context8.sent;
  29389. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  29390. case 19:
  29391. De(Me), this._cache.removeStore(n);
  29392. case 20:
  29393. throw new ne({
  29394. code: a.data.code,
  29395. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  29396. });
  29397. case 21:
  29398. if (!a.data.access_token) {
  29399. _context8.next = 23;
  29400. break;
  29401. }
  29402. 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()), {
  29403. accessToken: a.data.access_token,
  29404. accessTokenExpire: a.data.access_token_expire
  29405. }));
  29406. case 23:
  29407. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  29408. case 24:
  29409. case "end":
  29410. return _context8.stop();
  29411. }
  29412. }
  29413. }, _callee8, this);
  29414. }));
  29415. function _refreshAccessToken() {
  29416. return _refreshAccessToken3.apply(this, arguments);
  29417. }
  29418. return _refreshAccessToken;
  29419. }()
  29420. }, {
  29421. key: "getAccessToken",
  29422. value: function () {
  29423. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  29424. var _this$_cache$keys2, e, t, n, s, r, i;
  29425. return _regenerator.default.wrap(function _callee9$(_context9) {
  29426. while (1) {
  29427. switch (_context9.prev = _context9.next) {
  29428. case 0:
  29429. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  29430. if (this._cache.getStore(n)) {
  29431. _context9.next = 3;
  29432. break;
  29433. }
  29434. throw new ne({
  29435. message: "refresh token不存在,登录状态异常"
  29436. });
  29437. case 3:
  29438. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  29439. _context9.t0 = this._shouldRefreshAccessTokenHook;
  29440. if (!_context9.t0) {
  29441. _context9.next = 9;
  29442. break;
  29443. }
  29444. _context9.next = 8;
  29445. return this._shouldRefreshAccessTokenHook(s, r);
  29446. case 8:
  29447. _context9.t0 = !_context9.sent;
  29448. case 9:
  29449. _context9.t1 = _context9.t0;
  29450. if (!_context9.t1) {
  29451. _context9.next = 12;
  29452. break;
  29453. }
  29454. i = !1;
  29455. case 12:
  29456. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  29457. accessToken: s,
  29458. accessTokenExpire: r
  29459. });
  29460. case 13:
  29461. case "end":
  29462. return _context9.stop();
  29463. }
  29464. }
  29465. }, _callee9, this);
  29466. }));
  29467. function getAccessToken() {
  29468. return _getAccessToken.apply(this, arguments);
  29469. }
  29470. return getAccessToken;
  29471. }()
  29472. }, {
  29473. key: "request",
  29474. value: function () {
  29475. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  29476. var s, r, i, _e14, o, _e15, _e16, a, c, u, h, l, d, p, f, g;
  29477. return _regenerator.default.wrap(function _callee10$(_context10) {
  29478. while (1) {
  29479. switch (_context10.prev = _context10.next) {
  29480. case 0:
  29481. s = "x-tcb-trace_".concat(this.config.env);
  29482. r = "application/x-www-form-urlencoded";
  29483. i = _objectSpread({
  29484. action: e,
  29485. env: this.config.env,
  29486. dataVersion: "2019-08-16"
  29487. }, t);
  29488. if (!(-1 === We.indexOf(e))) {
  29489. _context10.next = 10;
  29490. break;
  29491. }
  29492. _e14 = this._cache.keys.refreshTokenKey;
  29493. _context10.t0 = this._cache.getStore(_e14);
  29494. if (!_context10.t0) {
  29495. _context10.next = 10;
  29496. break;
  29497. }
  29498. _context10.next = 9;
  29499. return this.getAccessToken();
  29500. case 9:
  29501. i.access_token = _context10.sent.accessToken;
  29502. case 10:
  29503. if ("storage.uploadFile" === e) {
  29504. o = new FormData();
  29505. for (_e15 in o) {
  29506. o.hasOwnProperty(_e15) && void 0 !== o[_e15] && o.append(_e15, i[_e15]);
  29507. }
  29508. r = "multipart/form-data";
  29509. } else {
  29510. r = "application/json", o = {};
  29511. for (_e16 in i) {
  29512. void 0 !== i[_e16] && (o[_e16] = i[_e16]);
  29513. }
  29514. }
  29515. a = {
  29516. headers: {
  29517. "content-type": r
  29518. }
  29519. };
  29520. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  29521. c = this._localCache.getStore(s);
  29522. c && (a.headers["X-TCB-Trace"] = c);
  29523. u = t.parse, h = t.inQuery, l = t.search;
  29524. d = {
  29525. env: this.config.env
  29526. };
  29527. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  29528. p = function (e, t) {
  29529. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  29530. var s = /\?/.test(t);
  29531. var r = "";
  29532. for (var _e17 in n) {
  29533. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e17, "=").concat(encodeURIComponent(n[_e17]));
  29534. }
  29535. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  29536. }(me, "//tcb-api.tencentcloudapi.com/web", d);
  29537. l && (p += l);
  29538. _context10.next = 22;
  29539. return this.post(_objectSpread({
  29540. url: p,
  29541. data: o
  29542. }, a));
  29543. case 22:
  29544. f = _context10.sent;
  29545. g = f.header && f.header["x-tcb-trace"];
  29546. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  29547. _context10.next = 26;
  29548. break;
  29549. }
  29550. throw new ne({
  29551. code: "NETWORK_ERROR",
  29552. message: "network request error"
  29553. });
  29554. case 26:
  29555. return _context10.abrupt("return", f);
  29556. case 27:
  29557. case "end":
  29558. return _context10.stop();
  29559. }
  29560. }
  29561. }, _callee10, this);
  29562. }));
  29563. function request(_x5, _x6, _x7) {
  29564. return _request.apply(this, arguments);
  29565. }
  29566. return request;
  29567. }()
  29568. }, {
  29569. key: "send",
  29570. value: function () {
  29571. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  29572. var t,
  29573. n,
  29574. _n6,
  29575. _args11 = arguments;
  29576. return _regenerator.default.wrap(function _callee11$(_context11) {
  29577. while (1) {
  29578. switch (_context11.prev = _context11.next) {
  29579. case 0:
  29580. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  29581. _context11.next = 3;
  29582. return this.request(e, t, {
  29583. onUploadProgress: t.onUploadProgress
  29584. });
  29585. case 3:
  29586. n = _context11.sent;
  29587. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === We.indexOf(e))) {
  29588. _context11.next = 13;
  29589. break;
  29590. }
  29591. _context11.next = 7;
  29592. return this.refreshAccessToken();
  29593. case 7:
  29594. _context11.next = 9;
  29595. return this.request(e, t, {
  29596. onUploadProgress: t.onUploadProgress
  29597. });
  29598. case 9:
  29599. _n6 = _context11.sent;
  29600. if (!_n6.data.code) {
  29601. _context11.next = 12;
  29602. break;
  29603. }
  29604. throw new ne({
  29605. code: _n6.data.code,
  29606. message: _n6.data.message
  29607. });
  29608. case 12:
  29609. return _context11.abrupt("return", _n6.data);
  29610. case 13:
  29611. if (!n.data.code) {
  29612. _context11.next = 15;
  29613. break;
  29614. }
  29615. throw new ne({
  29616. code: n.data.code,
  29617. message: n.data.message
  29618. });
  29619. case 15:
  29620. return _context11.abrupt("return", n.data);
  29621. case 16:
  29622. case "end":
  29623. return _context11.stop();
  29624. }
  29625. }
  29626. }, _callee11, this);
  29627. }));
  29628. function send(_x8) {
  29629. return _send.apply(this, arguments);
  29630. }
  29631. return send;
  29632. }()
  29633. }, {
  29634. key: "setRefreshToken",
  29635. value: function setRefreshToken(e) {
  29636. var _this$_cache$keys3 = this._cache.keys,
  29637. t = _this$_cache$keys3.accessTokenKey,
  29638. n = _this$_cache$keys3.accessTokenExpireKey,
  29639. s = _this$_cache$keys3.refreshTokenKey;
  29640. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  29641. }
  29642. }]);
  29643. return Ge;
  29644. }();
  29645. var Ve = {};
  29646. function Ye(e) {
  29647. return Ve[e];
  29648. }
  29649. var Qe = /*#__PURE__*/function () {
  29650. function Qe(e) {
  29651. (0, _classCallCheck2.default)(this, Qe);
  29652. this.config = e, this._cache = xe(e.env), this._request = Ye(e.env);
  29653. }
  29654. (0, _createClass2.default)(Qe, [{
  29655. key: "setRefreshToken",
  29656. value: function setRefreshToken(e) {
  29657. var _this$_cache$keys4 = this._cache.keys,
  29658. t = _this$_cache$keys4.accessTokenKey,
  29659. n = _this$_cache$keys4.accessTokenExpireKey,
  29660. s = _this$_cache$keys4.refreshTokenKey;
  29661. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  29662. }
  29663. }, {
  29664. key: "setAccessToken",
  29665. value: function setAccessToken(e, t) {
  29666. var _this$_cache$keys5 = this._cache.keys,
  29667. n = _this$_cache$keys5.accessTokenKey,
  29668. s = _this$_cache$keys5.accessTokenExpireKey;
  29669. this._cache.setStore(n, e), this._cache.setStore(s, t);
  29670. }
  29671. }, {
  29672. key: "refreshUserInfo",
  29673. value: function () {
  29674. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  29675. var _yield$this$_request$, e;
  29676. return _regenerator.default.wrap(function _callee12$(_context12) {
  29677. while (1) {
  29678. switch (_context12.prev = _context12.next) {
  29679. case 0:
  29680. _context12.next = 2;
  29681. return this._request.send("auth.getUserInfo", {});
  29682. case 2:
  29683. _yield$this$_request$ = _context12.sent;
  29684. e = _yield$this$_request$.data;
  29685. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  29686. case 5:
  29687. case "end":
  29688. return _context12.stop();
  29689. }
  29690. }
  29691. }, _callee12, this);
  29692. }));
  29693. function refreshUserInfo() {
  29694. return _refreshUserInfo.apply(this, arguments);
  29695. }
  29696. return refreshUserInfo;
  29697. }()
  29698. }, {
  29699. key: "setLocalUserInfo",
  29700. value: function setLocalUserInfo(e) {
  29701. var t = this._cache.keys.userInfoKey;
  29702. this._cache.setStore(t, e);
  29703. }
  29704. }]);
  29705. return Qe;
  29706. }();
  29707. var Xe = /*#__PURE__*/function () {
  29708. function Xe(e) {
  29709. (0, _classCallCheck2.default)(this, Xe);
  29710. if (!e) throw new ne({
  29711. code: "PARAM_ERROR",
  29712. message: "envId is not defined"
  29713. });
  29714. this._envId = e, this._cache = xe(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  29715. }
  29716. (0, _createClass2.default)(Xe, [{
  29717. key: "linkWithTicket",
  29718. value: function linkWithTicket(e) {
  29719. if ("string" != typeof e) throw new ne({
  29720. code: "PARAM_ERROR",
  29721. message: "ticket must be string"
  29722. });
  29723. return this._request.send("auth.linkWithTicket", {
  29724. ticket: e
  29725. });
  29726. }
  29727. }, {
  29728. key: "linkWithRedirect",
  29729. value: function linkWithRedirect(e) {
  29730. e.signInWithRedirect();
  29731. }
  29732. }, {
  29733. key: "updatePassword",
  29734. value: function updatePassword(e, t) {
  29735. return this._request.send("auth.updatePassword", {
  29736. oldPassword: t,
  29737. newPassword: e
  29738. });
  29739. }
  29740. }, {
  29741. key: "updateEmail",
  29742. value: function updateEmail(e) {
  29743. return this._request.send("auth.updateEmail", {
  29744. newEmail: e
  29745. });
  29746. }
  29747. }, {
  29748. key: "updateUsername",
  29749. value: function updateUsername(e) {
  29750. if ("string" != typeof e) throw new ne({
  29751. code: "PARAM_ERROR",
  29752. message: "username must be a string"
  29753. });
  29754. return this._request.send("auth.updateUsername", {
  29755. username: e
  29756. });
  29757. }
  29758. }, {
  29759. key: "getLinkedUidList",
  29760. value: function () {
  29761. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  29762. var _yield$this$_request$2, e, t, n;
  29763. return _regenerator.default.wrap(function _callee13$(_context13) {
  29764. while (1) {
  29765. switch (_context13.prev = _context13.next) {
  29766. case 0:
  29767. _context13.next = 2;
  29768. return this._request.send("auth.getLinkedUidList", {});
  29769. case 2:
  29770. _yield$this$_request$2 = _context13.sent;
  29771. e = _yield$this$_request$2.data;
  29772. t = !1;
  29773. n = e.users;
  29774. return _context13.abrupt("return", (n.forEach(function (e) {
  29775. e.wxOpenId && e.wxPublicId && (t = !0);
  29776. }), {
  29777. users: n,
  29778. hasPrimaryUid: t
  29779. }));
  29780. case 7:
  29781. case "end":
  29782. return _context13.stop();
  29783. }
  29784. }
  29785. }, _callee13, this);
  29786. }));
  29787. function getLinkedUidList() {
  29788. return _getLinkedUidList.apply(this, arguments);
  29789. }
  29790. return getLinkedUidList;
  29791. }()
  29792. }, {
  29793. key: "setPrimaryUid",
  29794. value: function setPrimaryUid(e) {
  29795. return this._request.send("auth.setPrimaryUid", {
  29796. uid: e
  29797. });
  29798. }
  29799. }, {
  29800. key: "unlink",
  29801. value: function unlink(e) {
  29802. return this._request.send("auth.unlink", {
  29803. platform: e
  29804. });
  29805. }
  29806. }, {
  29807. key: "update",
  29808. value: function () {
  29809. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  29810. var t, n, s, r, i, o, _yield$this$_request$3, a;
  29811. return _regenerator.default.wrap(function _callee14$(_context14) {
  29812. while (1) {
  29813. switch (_context14.prev = _context14.next) {
  29814. case 0:
  29815. t = e.nickName;
  29816. n = e.gender;
  29817. s = e.avatarUrl;
  29818. r = e.province;
  29819. i = e.country;
  29820. o = e.city;
  29821. _context14.next = 8;
  29822. return this._request.send("auth.updateUserInfo", {
  29823. nickName: t,
  29824. gender: n,
  29825. avatarUrl: s,
  29826. province: r,
  29827. country: i,
  29828. city: o
  29829. });
  29830. case 8:
  29831. _yield$this$_request$3 = _context14.sent;
  29832. a = _yield$this$_request$3.data;
  29833. this.setLocalUserInfo(a);
  29834. case 11:
  29835. case "end":
  29836. return _context14.stop();
  29837. }
  29838. }
  29839. }, _callee14, this);
  29840. }));
  29841. function update(_x9) {
  29842. return _update.apply(this, arguments);
  29843. }
  29844. return update;
  29845. }()
  29846. }, {
  29847. key: "refresh",
  29848. value: function () {
  29849. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  29850. var _yield$this$_request$4, e;
  29851. return _regenerator.default.wrap(function _callee15$(_context15) {
  29852. while (1) {
  29853. switch (_context15.prev = _context15.next) {
  29854. case 0:
  29855. _context15.next = 2;
  29856. return this._request.send("auth.getUserInfo", {});
  29857. case 2:
  29858. _yield$this$_request$4 = _context15.sent;
  29859. e = _yield$this$_request$4.data;
  29860. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  29861. case 5:
  29862. case "end":
  29863. return _context15.stop();
  29864. }
  29865. }
  29866. }, _callee15, this);
  29867. }));
  29868. function refresh() {
  29869. return _refresh.apply(this, arguments);
  29870. }
  29871. return refresh;
  29872. }()
  29873. }, {
  29874. key: "setUserInfo",
  29875. value: function setUserInfo() {
  29876. var _this8 = this;
  29877. var e = this._cache.keys.userInfoKey,
  29878. t = this._cache.getStore(e);
  29879. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  29880. _this8[e] = t[e];
  29881. }), this.location = {
  29882. country: t.country,
  29883. province: t.province,
  29884. city: t.city
  29885. };
  29886. }
  29887. }, {
  29888. key: "setLocalUserInfo",
  29889. value: function setLocalUserInfo(e) {
  29890. var t = this._cache.keys.userInfoKey;
  29891. this._cache.setStore(t, e), this.setUserInfo();
  29892. }
  29893. }]);
  29894. return Xe;
  29895. }();
  29896. var Ze = /*#__PURE__*/function () {
  29897. function Ze(e) {
  29898. (0, _classCallCheck2.default)(this, Ze);
  29899. if (!e) throw new ne({
  29900. code: "PARAM_ERROR",
  29901. message: "envId is not defined"
  29902. });
  29903. this._cache = xe(e);
  29904. var _this$_cache$keys6 = this._cache.keys,
  29905. t = _this$_cache$keys6.refreshTokenKey,
  29906. n = _this$_cache$keys6.accessTokenKey,
  29907. s = _this$_cache$keys6.accessTokenExpireKey,
  29908. r = this._cache.getStore(t),
  29909. i = this._cache.getStore(n),
  29910. o = this._cache.getStore(s);
  29911. this.credential = {
  29912. refreshToken: r,
  29913. accessToken: i,
  29914. accessTokenExpire: o
  29915. }, this.user = new Xe(e);
  29916. }
  29917. (0, _createClass2.default)(Ze, [{
  29918. key: "isAnonymousAuth",
  29919. get: function get() {
  29920. return this.loginType === $e.ANONYMOUS;
  29921. }
  29922. }, {
  29923. key: "isCustomAuth",
  29924. get: function get() {
  29925. return this.loginType === $e.CUSTOM;
  29926. }
  29927. }, {
  29928. key: "isWeixinAuth",
  29929. get: function get() {
  29930. return this.loginType === $e.WECHAT || this.loginType === $e.WECHAT_OPEN || this.loginType === $e.WECHAT_PUBLIC;
  29931. }
  29932. }, {
  29933. key: "loginType",
  29934. get: function get() {
  29935. return this._cache.getStore(this._cache.keys.loginTypeKey);
  29936. }
  29937. }]);
  29938. return Ze;
  29939. }();
  29940. var et = /*#__PURE__*/function (_Qe) {
  29941. (0, _inherits2.default)(et, _Qe);
  29942. var _super4 = _createSuper(et);
  29943. function et() {
  29944. (0, _classCallCheck2.default)(this, et);
  29945. return _super4.apply(this, arguments);
  29946. }
  29947. (0, _createClass2.default)(et, [{
  29948. key: "signIn",
  29949. value: function () {
  29950. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  29951. var _this$_cache$keys7, e, t, n, s, r, _e18;
  29952. return _regenerator.default.wrap(function _callee16$(_context16) {
  29953. while (1) {
  29954. switch (_context16.prev = _context16.next) {
  29955. case 0:
  29956. this._cache.updatePersistence("local");
  29957. _this$_cache$keys7 = this._cache.keys;
  29958. e = _this$_cache$keys7.anonymousUuidKey;
  29959. t = _this$_cache$keys7.refreshTokenKey;
  29960. n = this._cache.getStore(e) || void 0;
  29961. s = this._cache.getStore(t) || void 0;
  29962. _context16.next = 8;
  29963. return this._request.send("auth.signInAnonymously", {
  29964. anonymous_uuid: n,
  29965. refresh_token: s
  29966. });
  29967. case 8:
  29968. r = _context16.sent;
  29969. if (!(r.uuid && r.refresh_token)) {
  29970. _context16.next = 20;
  29971. break;
  29972. }
  29973. this._setAnonymousUUID(r.uuid);
  29974. this.setRefreshToken(r.refresh_token);
  29975. _context16.next = 14;
  29976. return this._request.refreshAccessToken();
  29977. case 14:
  29978. De(qe);
  29979. De(Ke, {
  29980. env: this.config.env,
  29981. loginType: $e.ANONYMOUS,
  29982. persistence: "local"
  29983. });
  29984. _e18 = new Ze(this.config.env);
  29985. _context16.next = 19;
  29986. return _e18.user.refresh();
  29987. case 19:
  29988. return _context16.abrupt("return", _e18);
  29989. case 20:
  29990. throw new ne({
  29991. message: "匿名登录失败"
  29992. });
  29993. case 21:
  29994. case "end":
  29995. return _context16.stop();
  29996. }
  29997. }
  29998. }, _callee16, this);
  29999. }));
  30000. function signIn() {
  30001. return _signIn.apply(this, arguments);
  30002. }
  30003. return signIn;
  30004. }()
  30005. }, {
  30006. key: "linkAndRetrieveDataWithTicket",
  30007. value: function () {
  30008. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  30009. var _this$_cache$keys8, t, n, s, r, i;
  30010. return _regenerator.default.wrap(function _callee17$(_context17) {
  30011. while (1) {
  30012. switch (_context17.prev = _context17.next) {
  30013. case 0:
  30014. _this$_cache$keys8 = this._cache.keys;
  30015. t = _this$_cache$keys8.anonymousUuidKey;
  30016. n = _this$_cache$keys8.refreshTokenKey;
  30017. s = this._cache.getStore(t);
  30018. r = this._cache.getStore(n);
  30019. _context17.next = 7;
  30020. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  30021. anonymous_uuid: s,
  30022. refresh_token: r,
  30023. ticket: e
  30024. });
  30025. case 7:
  30026. i = _context17.sent;
  30027. if (!i.refresh_token) {
  30028. _context17.next = 16;
  30029. break;
  30030. }
  30031. this._clearAnonymousUUID();
  30032. this.setRefreshToken(i.refresh_token);
  30033. _context17.next = 13;
  30034. return this._request.refreshAccessToken();
  30035. case 13:
  30036. De(je, {
  30037. env: this.config.env
  30038. });
  30039. De(Ke, {
  30040. loginType: $e.CUSTOM,
  30041. persistence: "local"
  30042. });
  30043. return _context17.abrupt("return", {
  30044. credential: {
  30045. refreshToken: i.refresh_token
  30046. }
  30047. });
  30048. case 16:
  30049. throw new ne({
  30050. message: "匿名转化失败"
  30051. });
  30052. case 17:
  30053. case "end":
  30054. return _context17.stop();
  30055. }
  30056. }
  30057. }, _callee17, this);
  30058. }));
  30059. function linkAndRetrieveDataWithTicket(_x10) {
  30060. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  30061. }
  30062. return linkAndRetrieveDataWithTicket;
  30063. }()
  30064. }, {
  30065. key: "_setAnonymousUUID",
  30066. value: function _setAnonymousUUID(e) {
  30067. var _this$_cache$keys9 = this._cache.keys,
  30068. t = _this$_cache$keys9.anonymousUuidKey,
  30069. n = _this$_cache$keys9.loginTypeKey;
  30070. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, $e.ANONYMOUS);
  30071. }
  30072. }, {
  30073. key: "_clearAnonymousUUID",
  30074. value: function _clearAnonymousUUID() {
  30075. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  30076. }
  30077. }]);
  30078. return et;
  30079. }(Qe);
  30080. var tt = /*#__PURE__*/function (_Qe2) {
  30081. (0, _inherits2.default)(tt, _Qe2);
  30082. var _super5 = _createSuper(tt);
  30083. function tt() {
  30084. (0, _classCallCheck2.default)(this, tt);
  30085. return _super5.apply(this, arguments);
  30086. }
  30087. (0, _createClass2.default)(tt, [{
  30088. key: "signIn",
  30089. value: function () {
  30090. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  30091. var t, n;
  30092. return _regenerator.default.wrap(function _callee18$(_context18) {
  30093. while (1) {
  30094. switch (_context18.prev = _context18.next) {
  30095. case 0:
  30096. if (!("string" != typeof e)) {
  30097. _context18.next = 2;
  30098. break;
  30099. }
  30100. throw new ne({
  30101. code: "PARAM_ERROR",
  30102. message: "ticket must be a string"
  30103. });
  30104. case 2:
  30105. t = this._cache.keys.refreshTokenKey;
  30106. _context18.next = 5;
  30107. return this._request.send("auth.signInWithTicket", {
  30108. ticket: e,
  30109. refresh_token: this._cache.getStore(t) || ""
  30110. });
  30111. case 5:
  30112. n = _context18.sent;
  30113. if (!n.refresh_token) {
  30114. _context18.next = 15;
  30115. break;
  30116. }
  30117. this.setRefreshToken(n.refresh_token);
  30118. _context18.next = 10;
  30119. return this._request.refreshAccessToken();
  30120. case 10:
  30121. De(qe);
  30122. De(Ke, {
  30123. env: this.config.env,
  30124. loginType: $e.CUSTOM,
  30125. persistence: this.config.persistence
  30126. });
  30127. _context18.next = 14;
  30128. return this.refreshUserInfo();
  30129. case 14:
  30130. return _context18.abrupt("return", new Ze(this.config.env));
  30131. case 15:
  30132. throw new ne({
  30133. message: "自定义登录失败"
  30134. });
  30135. case 16:
  30136. case "end":
  30137. return _context18.stop();
  30138. }
  30139. }
  30140. }, _callee18, this);
  30141. }));
  30142. function signIn(_x11) {
  30143. return _signIn2.apply(this, arguments);
  30144. }
  30145. return signIn;
  30146. }()
  30147. }]);
  30148. return tt;
  30149. }(Qe);
  30150. var nt = /*#__PURE__*/function (_Qe3) {
  30151. (0, _inherits2.default)(nt, _Qe3);
  30152. var _super6 = _createSuper(nt);
  30153. function nt() {
  30154. (0, _classCallCheck2.default)(this, nt);
  30155. return _super6.apply(this, arguments);
  30156. }
  30157. (0, _createClass2.default)(nt, [{
  30158. key: "signIn",
  30159. value: function () {
  30160. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  30161. var n, s, r, i, o;
  30162. return _regenerator.default.wrap(function _callee19$(_context19) {
  30163. while (1) {
  30164. switch (_context19.prev = _context19.next) {
  30165. case 0:
  30166. if (!("string" != typeof e)) {
  30167. _context19.next = 2;
  30168. break;
  30169. }
  30170. throw new ne({
  30171. code: "PARAM_ERROR",
  30172. message: "email must be a string"
  30173. });
  30174. case 2:
  30175. n = this._cache.keys.refreshTokenKey;
  30176. _context19.next = 5;
  30177. return this._request.send("auth.signIn", {
  30178. loginType: "EMAIL",
  30179. email: e,
  30180. password: t,
  30181. refresh_token: this._cache.getStore(n) || ""
  30182. });
  30183. case 5:
  30184. s = _context19.sent;
  30185. r = s.refresh_token;
  30186. i = s.access_token;
  30187. o = s.access_token_expire;
  30188. if (!r) {
  30189. _context19.next = 22;
  30190. break;
  30191. }
  30192. this.setRefreshToken(r);
  30193. if (!(i && o)) {
  30194. _context19.next = 15;
  30195. break;
  30196. }
  30197. this.setAccessToken(i, o);
  30198. _context19.next = 17;
  30199. break;
  30200. case 15:
  30201. _context19.next = 17;
  30202. return this._request.refreshAccessToken();
  30203. case 17:
  30204. _context19.next = 19;
  30205. return this.refreshUserInfo();
  30206. case 19:
  30207. De(qe);
  30208. De(Ke, {
  30209. env: this.config.env,
  30210. loginType: $e.EMAIL,
  30211. persistence: this.config.persistence
  30212. });
  30213. return _context19.abrupt("return", new Ze(this.config.env));
  30214. case 22:
  30215. throw s.code ? new ne({
  30216. code: s.code,
  30217. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  30218. }) : new ne({
  30219. message: "邮箱登录失败"
  30220. });
  30221. case 23:
  30222. case "end":
  30223. return _context19.stop();
  30224. }
  30225. }
  30226. }, _callee19, this);
  30227. }));
  30228. function signIn(_x12, _x13) {
  30229. return _signIn3.apply(this, arguments);
  30230. }
  30231. return signIn;
  30232. }()
  30233. }, {
  30234. key: "activate",
  30235. value: function () {
  30236. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  30237. return _regenerator.default.wrap(function _callee20$(_context20) {
  30238. while (1) {
  30239. switch (_context20.prev = _context20.next) {
  30240. case 0:
  30241. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  30242. token: e
  30243. }));
  30244. case 1:
  30245. case "end":
  30246. return _context20.stop();
  30247. }
  30248. }
  30249. }, _callee20, this);
  30250. }));
  30251. function activate(_x14) {
  30252. return _activate.apply(this, arguments);
  30253. }
  30254. return activate;
  30255. }()
  30256. }, {
  30257. key: "resetPasswordWithToken",
  30258. value: function () {
  30259. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  30260. return _regenerator.default.wrap(function _callee21$(_context21) {
  30261. while (1) {
  30262. switch (_context21.prev = _context21.next) {
  30263. case 0:
  30264. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  30265. token: e,
  30266. newPassword: t
  30267. }));
  30268. case 1:
  30269. case "end":
  30270. return _context21.stop();
  30271. }
  30272. }
  30273. }, _callee21, this);
  30274. }));
  30275. function resetPasswordWithToken(_x15, _x16) {
  30276. return _resetPasswordWithToken.apply(this, arguments);
  30277. }
  30278. return resetPasswordWithToken;
  30279. }()
  30280. }]);
  30281. return nt;
  30282. }(Qe);
  30283. var st = /*#__PURE__*/function (_Qe4) {
  30284. (0, _inherits2.default)(st, _Qe4);
  30285. var _super7 = _createSuper(st);
  30286. function st() {
  30287. (0, _classCallCheck2.default)(this, st);
  30288. return _super7.apply(this, arguments);
  30289. }
  30290. (0, _createClass2.default)(st, [{
  30291. key: "signIn",
  30292. value: function () {
  30293. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  30294. var n, s, r, i, o;
  30295. return _regenerator.default.wrap(function _callee22$(_context22) {
  30296. while (1) {
  30297. switch (_context22.prev = _context22.next) {
  30298. case 0:
  30299. if (!("string" != typeof e)) {
  30300. _context22.next = 2;
  30301. break;
  30302. }
  30303. throw new ne({
  30304. code: "PARAM_ERROR",
  30305. message: "username must be a string"
  30306. });
  30307. case 2:
  30308. "string" != typeof t && (t = "", console.warn("password is empty"));
  30309. n = this._cache.keys.refreshTokenKey;
  30310. _context22.next = 6;
  30311. return this._request.send("auth.signIn", {
  30312. loginType: $e.USERNAME,
  30313. username: e,
  30314. password: t,
  30315. refresh_token: this._cache.getStore(n) || ""
  30316. });
  30317. case 6:
  30318. s = _context22.sent;
  30319. r = s.refresh_token;
  30320. i = s.access_token_expire;
  30321. o = s.access_token;
  30322. if (!r) {
  30323. _context22.next = 23;
  30324. break;
  30325. }
  30326. this.setRefreshToken(r);
  30327. if (!(o && i)) {
  30328. _context22.next = 16;
  30329. break;
  30330. }
  30331. this.setAccessToken(o, i);
  30332. _context22.next = 18;
  30333. break;
  30334. case 16:
  30335. _context22.next = 18;
  30336. return this._request.refreshAccessToken();
  30337. case 18:
  30338. _context22.next = 20;
  30339. return this.refreshUserInfo();
  30340. case 20:
  30341. De(qe);
  30342. De(Ke, {
  30343. env: this.config.env,
  30344. loginType: $e.USERNAME,
  30345. persistence: this.config.persistence
  30346. });
  30347. return _context22.abrupt("return", new Ze(this.config.env));
  30348. case 23:
  30349. throw s.code ? new ne({
  30350. code: s.code,
  30351. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  30352. }) : new ne({
  30353. message: "用户名密码登录失败"
  30354. });
  30355. case 24:
  30356. case "end":
  30357. return _context22.stop();
  30358. }
  30359. }
  30360. }, _callee22, this);
  30361. }));
  30362. function signIn(_x17, _x18) {
  30363. return _signIn4.apply(this, arguments);
  30364. }
  30365. return signIn;
  30366. }()
  30367. }]);
  30368. return st;
  30369. }(Qe);
  30370. var rt = /*#__PURE__*/function () {
  30371. function rt(e) {
  30372. (0, _classCallCheck2.default)(this, rt);
  30373. 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);
  30374. }
  30375. (0, _createClass2.default)(rt, [{
  30376. key: "currentUser",
  30377. get: function get() {
  30378. var e = this.hasLoginState();
  30379. return e && e.user || null;
  30380. }
  30381. }, {
  30382. key: "loginType",
  30383. get: function get() {
  30384. return this._cache.getStore(this._cache.keys.loginTypeKey);
  30385. }
  30386. }, {
  30387. key: "anonymousAuthProvider",
  30388. value: function anonymousAuthProvider() {
  30389. return new et(this.config);
  30390. }
  30391. }, {
  30392. key: "customAuthProvider",
  30393. value: function customAuthProvider() {
  30394. return new tt(this.config);
  30395. }
  30396. }, {
  30397. key: "emailAuthProvider",
  30398. value: function emailAuthProvider() {
  30399. return new nt(this.config);
  30400. }
  30401. }, {
  30402. key: "usernameAuthProvider",
  30403. value: function usernameAuthProvider() {
  30404. return new st(this.config);
  30405. }
  30406. }, {
  30407. key: "signInAnonymously",
  30408. value: function () {
  30409. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  30410. return _regenerator.default.wrap(function _callee23$(_context23) {
  30411. while (1) {
  30412. switch (_context23.prev = _context23.next) {
  30413. case 0:
  30414. return _context23.abrupt("return", new et(this.config).signIn());
  30415. case 1:
  30416. case "end":
  30417. return _context23.stop();
  30418. }
  30419. }
  30420. }, _callee23, this);
  30421. }));
  30422. function signInAnonymously() {
  30423. return _signInAnonymously.apply(this, arguments);
  30424. }
  30425. return signInAnonymously;
  30426. }()
  30427. }, {
  30428. key: "signInWithEmailAndPassword",
  30429. value: function () {
  30430. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  30431. return _regenerator.default.wrap(function _callee24$(_context24) {
  30432. while (1) {
  30433. switch (_context24.prev = _context24.next) {
  30434. case 0:
  30435. return _context24.abrupt("return", new nt(this.config).signIn(e, t));
  30436. case 1:
  30437. case "end":
  30438. return _context24.stop();
  30439. }
  30440. }
  30441. }, _callee24, this);
  30442. }));
  30443. function signInWithEmailAndPassword(_x19, _x20) {
  30444. return _signInWithEmailAndPassword.apply(this, arguments);
  30445. }
  30446. return signInWithEmailAndPassword;
  30447. }()
  30448. }, {
  30449. key: "signInWithUsernameAndPassword",
  30450. value: function signInWithUsernameAndPassword(e, t) {
  30451. return new st(this.config).signIn(e, t);
  30452. }
  30453. }, {
  30454. key: "linkAndRetrieveDataWithTicket",
  30455. value: function () {
  30456. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  30457. return _regenerator.default.wrap(function _callee25$(_context25) {
  30458. while (1) {
  30459. switch (_context25.prev = _context25.next) {
  30460. case 0:
  30461. this._anonymousAuthProvider || (this._anonymousAuthProvider = new et(this.config)), Ne(je, this._onAnonymousConverted);
  30462. _context25.next = 3;
  30463. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  30464. case 3:
  30465. return _context25.abrupt("return", _context25.sent);
  30466. case 4:
  30467. case "end":
  30468. return _context25.stop();
  30469. }
  30470. }
  30471. }, _callee25, this);
  30472. }));
  30473. function linkAndRetrieveDataWithTicket(_x21) {
  30474. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  30475. }
  30476. return linkAndRetrieveDataWithTicket;
  30477. }()
  30478. }, {
  30479. key: "signOut",
  30480. value: function () {
  30481. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  30482. var _this$_cache$keys10, e, t, n, s, r;
  30483. return _regenerator.default.wrap(function _callee26$(_context26) {
  30484. while (1) {
  30485. switch (_context26.prev = _context26.next) {
  30486. case 0:
  30487. if (!(this.loginType === $e.ANONYMOUS)) {
  30488. _context26.next = 2;
  30489. break;
  30490. }
  30491. throw new ne({
  30492. message: "匿名用户不支持登出操作"
  30493. });
  30494. case 2:
  30495. _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);
  30496. if (s) {
  30497. _context26.next = 5;
  30498. break;
  30499. }
  30500. return _context26.abrupt("return");
  30501. case 5:
  30502. _context26.next = 7;
  30503. return this._request.send("auth.logout", {
  30504. refresh_token: s
  30505. });
  30506. case 7:
  30507. r = _context26.sent;
  30508. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), De(qe), De(Ke, {
  30509. env: this.config.env,
  30510. loginType: $e.NULL,
  30511. persistence: this.config.persistence
  30512. }), r));
  30513. case 9:
  30514. case "end":
  30515. return _context26.stop();
  30516. }
  30517. }
  30518. }, _callee26, this);
  30519. }));
  30520. function signOut() {
  30521. return _signOut.apply(this, arguments);
  30522. }
  30523. return signOut;
  30524. }()
  30525. }, {
  30526. key: "signUpWithEmailAndPassword",
  30527. value: function () {
  30528. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  30529. return _regenerator.default.wrap(function _callee27$(_context27) {
  30530. while (1) {
  30531. switch (_context27.prev = _context27.next) {
  30532. case 0:
  30533. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  30534. email: e,
  30535. password: t
  30536. }));
  30537. case 1:
  30538. case "end":
  30539. return _context27.stop();
  30540. }
  30541. }
  30542. }, _callee27, this);
  30543. }));
  30544. function signUpWithEmailAndPassword(_x22, _x23) {
  30545. return _signUpWithEmailAndPassword.apply(this, arguments);
  30546. }
  30547. return signUpWithEmailAndPassword;
  30548. }()
  30549. }, {
  30550. key: "sendPasswordResetEmail",
  30551. value: function () {
  30552. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  30553. return _regenerator.default.wrap(function _callee28$(_context28) {
  30554. while (1) {
  30555. switch (_context28.prev = _context28.next) {
  30556. case 0:
  30557. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  30558. email: e
  30559. }));
  30560. case 1:
  30561. case "end":
  30562. return _context28.stop();
  30563. }
  30564. }
  30565. }, _callee28, this);
  30566. }));
  30567. function sendPasswordResetEmail(_x24) {
  30568. return _sendPasswordResetEmail.apply(this, arguments);
  30569. }
  30570. return sendPasswordResetEmail;
  30571. }()
  30572. }, {
  30573. key: "onLoginStateChanged",
  30574. value: function onLoginStateChanged(e) {
  30575. var _this9 = this;
  30576. Ne(qe, function () {
  30577. var t = _this9.hasLoginState();
  30578. e.call(_this9, t);
  30579. });
  30580. var t = this.hasLoginState();
  30581. e.call(this, t);
  30582. }
  30583. }, {
  30584. key: "onLoginStateExpired",
  30585. value: function onLoginStateExpired(e) {
  30586. Ne(Me, e.bind(this));
  30587. }
  30588. }, {
  30589. key: "onAccessTokenRefreshed",
  30590. value: function onAccessTokenRefreshed(e) {
  30591. Ne(Be, e.bind(this));
  30592. }
  30593. }, {
  30594. key: "onAnonymousConverted",
  30595. value: function onAnonymousConverted(e) {
  30596. Ne(je, e.bind(this));
  30597. }
  30598. }, {
  30599. key: "onLoginTypeChanged",
  30600. value: function onLoginTypeChanged(e) {
  30601. var _this10 = this;
  30602. Ne(Ke, function () {
  30603. var t = _this10.hasLoginState();
  30604. e.call(_this10, t);
  30605. });
  30606. }
  30607. }, {
  30608. key: "getAccessToken",
  30609. value: function () {
  30610. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  30611. return _regenerator.default.wrap(function _callee29$(_context29) {
  30612. while (1) {
  30613. switch (_context29.prev = _context29.next) {
  30614. case 0:
  30615. _context29.next = 2;
  30616. return this._request.getAccessToken();
  30617. case 2:
  30618. _context29.t0 = _context29.sent.accessToken;
  30619. _context29.t1 = this.config.env;
  30620. return _context29.abrupt("return", {
  30621. accessToken: _context29.t0,
  30622. env: _context29.t1
  30623. });
  30624. case 5:
  30625. case "end":
  30626. return _context29.stop();
  30627. }
  30628. }
  30629. }, _callee29, this);
  30630. }));
  30631. function getAccessToken() {
  30632. return _getAccessToken2.apply(this, arguments);
  30633. }
  30634. return getAccessToken;
  30635. }()
  30636. }, {
  30637. key: "hasLoginState",
  30638. value: function hasLoginState() {
  30639. var e = this._cache.keys.refreshTokenKey;
  30640. return this._cache.getStore(e) ? new Ze(this.config.env) : null;
  30641. }
  30642. }, {
  30643. key: "isUsernameRegistered",
  30644. value: function () {
  30645. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  30646. var _yield$this$_request$5, t;
  30647. return _regenerator.default.wrap(function _callee30$(_context30) {
  30648. while (1) {
  30649. switch (_context30.prev = _context30.next) {
  30650. case 0:
  30651. if (!("string" != typeof e)) {
  30652. _context30.next = 2;
  30653. break;
  30654. }
  30655. throw new ne({
  30656. code: "PARAM_ERROR",
  30657. message: "username must be a string"
  30658. });
  30659. case 2:
  30660. _context30.next = 4;
  30661. return this._request.send("auth.isUsernameRegistered", {
  30662. username: e
  30663. });
  30664. case 4:
  30665. _yield$this$_request$5 = _context30.sent;
  30666. t = _yield$this$_request$5.data;
  30667. return _context30.abrupt("return", t && t.isRegistered);
  30668. case 7:
  30669. case "end":
  30670. return _context30.stop();
  30671. }
  30672. }
  30673. }, _callee30, this);
  30674. }));
  30675. function isUsernameRegistered(_x25) {
  30676. return _isUsernameRegistered.apply(this, arguments);
  30677. }
  30678. return isUsernameRegistered;
  30679. }()
  30680. }, {
  30681. key: "getLoginState",
  30682. value: function getLoginState() {
  30683. return Promise.resolve(this.hasLoginState());
  30684. }
  30685. }, {
  30686. key: "signInWithTicket",
  30687. value: function () {
  30688. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  30689. return _regenerator.default.wrap(function _callee31$(_context31) {
  30690. while (1) {
  30691. switch (_context31.prev = _context31.next) {
  30692. case 0:
  30693. return _context31.abrupt("return", new tt(this.config).signIn(e));
  30694. case 1:
  30695. case "end":
  30696. return _context31.stop();
  30697. }
  30698. }
  30699. }, _callee31, this);
  30700. }));
  30701. function signInWithTicket(_x26) {
  30702. return _signInWithTicket.apply(this, arguments);
  30703. }
  30704. return signInWithTicket;
  30705. }()
  30706. }, {
  30707. key: "shouldRefreshAccessToken",
  30708. value: function shouldRefreshAccessToken(e) {
  30709. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  30710. }
  30711. }, {
  30712. key: "getUserInfo",
  30713. value: function getUserInfo() {
  30714. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  30715. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  30716. requestId: e.seqId
  30717. });
  30718. });
  30719. }
  30720. }, {
  30721. key: "getAuthHeader",
  30722. value: function getAuthHeader() {
  30723. var _this$_cache$keys11 = this._cache.keys,
  30724. e = _this$_cache$keys11.refreshTokenKey,
  30725. t = _this$_cache$keys11.accessTokenKey,
  30726. n = this._cache.getStore(e);
  30727. return {
  30728. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  30729. };
  30730. }
  30731. }, {
  30732. key: "_onAnonymousConverted",
  30733. value: function _onAnonymousConverted(e) {
  30734. var t = e.data.env;
  30735. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  30736. }
  30737. }, {
  30738. key: "_onLoginTypeChanged",
  30739. value: function _onLoginTypeChanged(e) {
  30740. var _e$data = e.data,
  30741. t = _e$data.loginType,
  30742. n = _e$data.persistence,
  30743. s = _e$data.env;
  30744. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  30745. }
  30746. }]);
  30747. return rt;
  30748. }();
  30749. var it = function it(e, t) {
  30750. t = t || we();
  30751. var n = Ye(this.config.env),
  30752. s = e.cloudPath,
  30753. r = e.filePath,
  30754. i = e.onUploadProgress,
  30755. _e$fileType = e.fileType,
  30756. o = _e$fileType === void 0 ? "image" : _e$fileType;
  30757. return n.send("storage.getUploadMetadata", {
  30758. path: s
  30759. }).then(function (e) {
  30760. var _e$data2 = e.data,
  30761. a = _e$data2.url,
  30762. c = _e$data2.authorization,
  30763. u = _e$data2.token,
  30764. h = _e$data2.fileId,
  30765. l = _e$data2.cosFileId,
  30766. d = e.requestId,
  30767. p = {
  30768. key: s,
  30769. signature: c,
  30770. "x-cos-meta-fileid": l,
  30771. success_action_status: "201",
  30772. "x-cos-security-token": u
  30773. };
  30774. n.upload({
  30775. url: a,
  30776. data: p,
  30777. file: r,
  30778. name: s,
  30779. fileType: o,
  30780. onUploadProgress: i
  30781. }).then(function (e) {
  30782. 201 === e.statusCode ? t(null, {
  30783. fileID: h,
  30784. requestId: d
  30785. }) : t(new ne({
  30786. code: "STORAGE_REQUEST_FAIL",
  30787. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  30788. }));
  30789. }).catch(function (e) {
  30790. t(e);
  30791. });
  30792. }).catch(function (e) {
  30793. t(e);
  30794. }), t.promise;
  30795. },
  30796. ot = function ot(e, t) {
  30797. t = t || we();
  30798. var n = Ye(this.config.env),
  30799. s = e.cloudPath;
  30800. return n.send("storage.getUploadMetadata", {
  30801. path: s
  30802. }).then(function (e) {
  30803. t(null, e);
  30804. }).catch(function (e) {
  30805. t(e);
  30806. }), t.promise;
  30807. },
  30808. at = function at(_ref7, t) {
  30809. var e = _ref7.fileList;
  30810. if (t = t || we(), !e || !Array.isArray(e)) return {
  30811. code: "INVALID_PARAM",
  30812. message: "fileList必须是非空的数组"
  30813. };
  30814. var _iterator3 = _createForOfIteratorHelper(e),
  30815. _step3;
  30816. try {
  30817. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  30818. var _t8 = _step3.value;
  30819. if (!_t8 || "string" != typeof _t8) return {
  30820. code: "INVALID_PARAM",
  30821. message: "fileList的元素必须是非空的字符串"
  30822. };
  30823. }
  30824. } catch (err) {
  30825. _iterator3.e(err);
  30826. } finally {
  30827. _iterator3.f();
  30828. }
  30829. var n = {
  30830. fileid_list: e
  30831. };
  30832. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  30833. e.code ? t(null, e) : t(null, {
  30834. fileList: e.data.delete_list,
  30835. requestId: e.requestId
  30836. });
  30837. }).catch(function (e) {
  30838. t(e);
  30839. }), t.promise;
  30840. },
  30841. ct = function ct(_ref8, t) {
  30842. var e = _ref8.fileList;
  30843. t = t || we(), e && Array.isArray(e) || t(null, {
  30844. code: "INVALID_PARAM",
  30845. message: "fileList必须是非空的数组"
  30846. });
  30847. var n = [];
  30848. var _iterator4 = _createForOfIteratorHelper(e),
  30849. _step4;
  30850. try {
  30851. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  30852. var _s9 = _step4.value;
  30853. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  30854. code: "INVALID_PARAM",
  30855. message: "fileList的元素必须是包含fileID和maxAge的对象"
  30856. }), n.push({
  30857. fileid: _s9.fileID,
  30858. max_age: _s9.maxAge
  30859. })) : "string" == typeof _s9 ? n.push({
  30860. fileid: _s9
  30861. }) : t(null, {
  30862. code: "INVALID_PARAM",
  30863. message: "fileList的元素必须是字符串"
  30864. });
  30865. }
  30866. } catch (err) {
  30867. _iterator4.e(err);
  30868. } finally {
  30869. _iterator4.f();
  30870. }
  30871. var s = {
  30872. file_list: n
  30873. };
  30874. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  30875. e.code ? t(null, e) : t(null, {
  30876. fileList: e.data.download_list,
  30877. requestId: e.requestId
  30878. });
  30879. }).catch(function (e) {
  30880. t(e);
  30881. }), t.promise;
  30882. },
  30883. ut = /*#__PURE__*/function () {
  30884. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  30885. var e, n, s, r;
  30886. return _regenerator.default.wrap(function _callee32$(_context32) {
  30887. while (1) {
  30888. switch (_context32.prev = _context32.next) {
  30889. case 0:
  30890. e = _ref9.fileID;
  30891. _context32.next = 3;
  30892. return ct.call(this, {
  30893. fileList: [{
  30894. fileID: e,
  30895. maxAge: 600
  30896. }]
  30897. });
  30898. case 3:
  30899. n = _context32.sent.fileList[0];
  30900. if (!("SUCCESS" !== n.code)) {
  30901. _context32.next = 6;
  30902. break;
  30903. }
  30904. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  30905. e(n);
  30906. }));
  30907. case 6:
  30908. s = Ye(this.config.env);
  30909. r = n.download_url;
  30910. if (!(r = encodeURI(r), !t)) {
  30911. _context32.next = 10;
  30912. break;
  30913. }
  30914. return _context32.abrupt("return", s.download({
  30915. url: r
  30916. }));
  30917. case 10:
  30918. _context32.t0 = t;
  30919. _context32.next = 13;
  30920. return s.download({
  30921. url: r
  30922. });
  30923. case 13:
  30924. _context32.t1 = _context32.sent;
  30925. (0, _context32.t0)(_context32.t1);
  30926. case 15:
  30927. case "end":
  30928. return _context32.stop();
  30929. }
  30930. }
  30931. }, _callee32, this);
  30932. }));
  30933. return function ut(_x27, _x28) {
  30934. return _ref10.apply(this, arguments);
  30935. };
  30936. }(),
  30937. ht = function ht(_ref11, i) {
  30938. var e = _ref11.name,
  30939. t = _ref11.data,
  30940. n = _ref11.query,
  30941. s = _ref11.parse,
  30942. r = _ref11.search;
  30943. var o = i || we();
  30944. var a;
  30945. try {
  30946. a = t ? JSON.stringify(t) : "";
  30947. } catch (e) {
  30948. return Promise.reject(e);
  30949. }
  30950. if (!e) return Promise.reject(new ne({
  30951. code: "PARAM_ERROR",
  30952. message: "函数名不能为空"
  30953. }));
  30954. var c = {
  30955. inQuery: n,
  30956. parse: s,
  30957. search: r,
  30958. function_name: e,
  30959. request_data: a
  30960. };
  30961. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  30962. if (e.code) o(null, e);else {
  30963. var _t9 = e.data.response_data;
  30964. if (s) o(null, {
  30965. result: _t9,
  30966. requestId: e.requestId
  30967. });else try {
  30968. _t9 = JSON.parse(e.data.response_data), o(null, {
  30969. result: _t9,
  30970. requestId: e.requestId
  30971. });
  30972. } catch (e) {
  30973. o(new ne({
  30974. message: "response data must be json"
  30975. }));
  30976. }
  30977. }
  30978. return o.promise;
  30979. }).catch(function (e) {
  30980. o(e);
  30981. }), o.promise;
  30982. },
  30983. lt = {
  30984. timeout: 15e3,
  30985. persistence: "session"
  30986. },
  30987. dt = {};
  30988. var pt = /*#__PURE__*/function () {
  30989. function pt(e) {
  30990. (0, _classCallCheck2.default)(this, pt);
  30991. this.config = e || this.config, this.authObj = void 0;
  30992. }
  30993. (0, _createClass2.default)(pt, [{
  30994. key: "init",
  30995. value: function init(e) {
  30996. switch (ke.adapter || (this.requestClient = new ke.adapter.reqClass({
  30997. timeout: e.timeout || 5e3,
  30998. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  30999. })), this.config = _objectSpread(_objectSpread({}, lt), e), !0) {
  31000. case this.config.timeout > 6e5:
  31001. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  31002. break;
  31003. case this.config.timeout < 100:
  31004. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  31005. }
  31006. return new pt(this.config);
  31007. }
  31008. }, {
  31009. key: "auth",
  31010. value: function auth() {
  31011. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31012. e = _ref12.persistence;
  31013. if (this.authObj) return this.authObj;
  31014. var t = e || ke.adapter.primaryStorage || lt.persistence;
  31015. var n;
  31016. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  31017. var t = e.env;
  31018. Ee[t] = new Ae(e), Oe[t] = new Ae(_objectSpread(_objectSpread({}, e), {}, {
  31019. persistence: "local"
  31020. }));
  31021. }(this.config), n = this.config, Ve[n.env] = new Ge(n), this.authObj = new rt(this.config), this.authObj;
  31022. }
  31023. }, {
  31024. key: "on",
  31025. value: function on(e, t) {
  31026. return Ne.apply(this, [e, t]);
  31027. }
  31028. }, {
  31029. key: "off",
  31030. value: function off(e, t) {
  31031. return Fe.apply(this, [e, t]);
  31032. }
  31033. }, {
  31034. key: "callFunction",
  31035. value: function callFunction(e, t) {
  31036. return ht.apply(this, [e, t]);
  31037. }
  31038. }, {
  31039. key: "deleteFile",
  31040. value: function deleteFile(e, t) {
  31041. return at.apply(this, [e, t]);
  31042. }
  31043. }, {
  31044. key: "getTempFileURL",
  31045. value: function getTempFileURL(e, t) {
  31046. return ct.apply(this, [e, t]);
  31047. }
  31048. }, {
  31049. key: "downloadFile",
  31050. value: function downloadFile(e, t) {
  31051. return ut.apply(this, [e, t]);
  31052. }
  31053. }, {
  31054. key: "uploadFile",
  31055. value: function uploadFile(e, t) {
  31056. return it.apply(this, [e, t]);
  31057. }
  31058. }, {
  31059. key: "getUploadMetadata",
  31060. value: function getUploadMetadata(e, t) {
  31061. return ot.apply(this, [e, t]);
  31062. }
  31063. }, {
  31064. key: "registerExtension",
  31065. value: function registerExtension(e) {
  31066. dt[e.name] = e;
  31067. }
  31068. }, {
  31069. key: "invokeExtension",
  31070. value: function () {
  31071. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  31072. var n;
  31073. return _regenerator.default.wrap(function _callee33$(_context33) {
  31074. while (1) {
  31075. switch (_context33.prev = _context33.next) {
  31076. case 0:
  31077. n = dt[e];
  31078. if (n) {
  31079. _context33.next = 3;
  31080. break;
  31081. }
  31082. throw new ne({
  31083. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  31084. });
  31085. case 3:
  31086. _context33.next = 5;
  31087. return n.invoke(t, this);
  31088. case 5:
  31089. return _context33.abrupt("return", _context33.sent);
  31090. case 6:
  31091. case "end":
  31092. return _context33.stop();
  31093. }
  31094. }
  31095. }, _callee33, this);
  31096. }));
  31097. function invokeExtension(_x29, _x30) {
  31098. return _invokeExtension.apply(this, arguments);
  31099. }
  31100. return invokeExtension;
  31101. }()
  31102. }, {
  31103. key: "useAdapters",
  31104. value: function useAdapters(e) {
  31105. var _ref13 = be(e) || {},
  31106. t = _ref13.adapter,
  31107. n = _ref13.runtime;
  31108. t && (ke.adapter = t), n && (ke.runtime = n);
  31109. }
  31110. }]);
  31111. return pt;
  31112. }();
  31113. var ft = new pt();
  31114. function gt(e, t, n) {
  31115. void 0 === n && (n = {});
  31116. var s = /\?/.test(t),
  31117. r = "";
  31118. for (var i in n) {
  31119. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  31120. }
  31121. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  31122. }
  31123. var mt = /*#__PURE__*/function () {
  31124. function mt() {
  31125. (0, _classCallCheck2.default)(this, mt);
  31126. }
  31127. (0, _createClass2.default)(mt, [{
  31128. key: "post",
  31129. value: function post(e) {
  31130. var t = e.url,
  31131. n = e.data,
  31132. s = e.headers;
  31133. return new Promise(function (e, r) {
  31134. se.request({
  31135. url: gt("https:", t),
  31136. data: n,
  31137. method: "POST",
  31138. header: s,
  31139. success: function success(t) {
  31140. e(t);
  31141. },
  31142. fail: function fail(e) {
  31143. r(e);
  31144. }
  31145. });
  31146. });
  31147. }
  31148. }, {
  31149. key: "upload",
  31150. value: function upload(e) {
  31151. return new Promise(function (t, n) {
  31152. var s = e.url,
  31153. r = e.file,
  31154. i = e.data,
  31155. o = e.headers,
  31156. a = e.fileType,
  31157. c = se.uploadFile({
  31158. url: gt("https:", s),
  31159. name: "file",
  31160. formData: Object.assign({}, i),
  31161. filePath: r,
  31162. fileType: a,
  31163. header: o,
  31164. success: function success(e) {
  31165. var n = {
  31166. statusCode: e.statusCode,
  31167. data: e.data || {}
  31168. };
  31169. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  31170. },
  31171. fail: function fail(e) {
  31172. n(new Error(e.errMsg || "uploadFile:fail"));
  31173. }
  31174. });
  31175. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  31176. e.onUploadProgress({
  31177. loaded: t.totalBytesSent,
  31178. total: t.totalBytesExpectedToSend
  31179. });
  31180. });
  31181. });
  31182. }
  31183. }]);
  31184. return mt;
  31185. }();
  31186. var yt = {
  31187. setItem: function setItem(e, t) {
  31188. se.setStorageSync(e, t);
  31189. },
  31190. getItem: function getItem(e) {
  31191. return se.getStorageSync(e);
  31192. },
  31193. removeItem: function removeItem(e) {
  31194. se.removeStorageSync(e);
  31195. },
  31196. clear: function clear() {
  31197. se.clearStorageSync();
  31198. }
  31199. };
  31200. var _t = {
  31201. genAdapter: function genAdapter() {
  31202. return {
  31203. root: {},
  31204. reqClass: mt,
  31205. localStorage: yt,
  31206. primaryStorage: "local"
  31207. };
  31208. },
  31209. isMatch: function isMatch() {
  31210. return !0;
  31211. },
  31212. runtime: "uni_app"
  31213. };
  31214. ft.useAdapters(_t);
  31215. var wt = ft,
  31216. vt = wt.init;
  31217. wt.init = function (e) {
  31218. e.env = e.spaceId;
  31219. var t = vt.call(this, e);
  31220. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  31221. var n = t.auth;
  31222. return t.auth = function (e) {
  31223. var t = n.call(this, e);
  31224. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  31225. var n;
  31226. t[e] = (n = t[e], function (e) {
  31227. e = e || {};
  31228. var _te = te(e),
  31229. t = _te.success,
  31230. s = _te.fail,
  31231. r = _te.complete;
  31232. if (!(t || s || r)) return n.call(this, e);
  31233. n.call(this, e).then(function (e) {
  31234. t && t(e), r && r(e);
  31235. }, function (e) {
  31236. s && s(e), r && r(e);
  31237. });
  31238. }).bind(t);
  31239. }), t;
  31240. }, t.customAuth = t.auth, t;
  31241. };
  31242. var It = wt;
  31243. var St = /*#__PURE__*/function (_fe) {
  31244. (0, _inherits2.default)(St, _fe);
  31245. var _super8 = _createSuper(St);
  31246. function St() {
  31247. (0, _classCallCheck2.default)(this, St);
  31248. return _super8.apply(this, arguments);
  31249. }
  31250. (0, _createClass2.default)(St, [{
  31251. key: "getAccessToken",
  31252. value: function getAccessToken() {
  31253. var _this11 = this;
  31254. return new Promise(function (e, t) {
  31255. var n = "Anonymous_Access_token";
  31256. _this11.setAccessToken(n), e(n);
  31257. });
  31258. }
  31259. }, {
  31260. key: "setupRequest",
  31261. value: function setupRequest(e, t) {
  31262. var n = Object.assign({}, e, {
  31263. spaceId: this.config.spaceId,
  31264. timestamp: Date.now()
  31265. }),
  31266. s = {
  31267. "Content-Type": "application/json"
  31268. };
  31269. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret);
  31270. var r = he();
  31271. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  31272. var _re = re(),
  31273. i = _re.token;
  31274. return s["x-client-token"] = i, {
  31275. url: this.config.requestUrl,
  31276. method: "POST",
  31277. data: n,
  31278. dataType: "json",
  31279. header: JSON.parse(JSON.stringify(s))
  31280. };
  31281. }
  31282. }, {
  31283. key: "uploadFileToOSS",
  31284. value: function uploadFileToOSS(_ref14) {
  31285. var _this12 = this;
  31286. var e = _ref14.url,
  31287. t = _ref14.formData,
  31288. n = _ref14.name,
  31289. s = _ref14.filePath,
  31290. r = _ref14.fileType,
  31291. i = _ref14.onUploadProgress;
  31292. return new Promise(function (o, a) {
  31293. var c = _this12.adapter.uploadFile({
  31294. url: e,
  31295. formData: t,
  31296. name: n,
  31297. filePath: s,
  31298. fileType: r,
  31299. success: function success(e) {
  31300. e && e.statusCode < 400 ? o(e) : a(new ne({
  31301. code: "UPLOAD_FAILED",
  31302. message: "文件上传失败"
  31303. }));
  31304. },
  31305. fail: function fail(e) {
  31306. a(new ne({
  31307. code: e.code || "UPLOAD_FAILED",
  31308. message: e.message || e.errMsg || "文件上传失败"
  31309. }));
  31310. }
  31311. });
  31312. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  31313. i({
  31314. loaded: e.totalBytesSent,
  31315. total: e.totalBytesExpectedToSend
  31316. });
  31317. });
  31318. });
  31319. }
  31320. }, {
  31321. key: "uploadFile",
  31322. value: function uploadFile(_ref15) {
  31323. var _this13 = this;
  31324. var e = _ref15.filePath,
  31325. t = _ref15.cloudPath,
  31326. _ref15$fileType = _ref15.fileType,
  31327. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  31328. s = _ref15.onUploadProgress;
  31329. if (!t) throw new ne({
  31330. code: "CLOUDPATH_REQUIRED",
  31331. message: "cloudPath不可为空"
  31332. });
  31333. var r;
  31334. return this.getOSSUploadOptionsFromPath({
  31335. cloudPath: t
  31336. }).then(function (t) {
  31337. var _t$result = t.result,
  31338. i = _t$result.url,
  31339. o = _t$result.formData,
  31340. a = _t$result.name;
  31341. r = t.result.fileUrl;
  31342. var c = {
  31343. url: i,
  31344. formData: o,
  31345. name: a,
  31346. filePath: e,
  31347. fileType: n
  31348. };
  31349. return _this13.uploadFileToOSS(Object.assign({}, c, {
  31350. onUploadProgress: s
  31351. }));
  31352. }).then(function () {
  31353. return _this13.reportOSSUpload({
  31354. cloudPath: t
  31355. });
  31356. }).then(function (t) {
  31357. return new Promise(function (n, s) {
  31358. t.success ? n({
  31359. success: !0,
  31360. filePath: e,
  31361. fileID: r
  31362. }) : s(new ne({
  31363. code: "UPLOAD_FAILED",
  31364. message: "文件上传失败"
  31365. }));
  31366. });
  31367. });
  31368. }
  31369. }, {
  31370. key: "deleteFile",
  31371. value: function deleteFile(_ref16) {
  31372. var e = _ref16.fileList;
  31373. var t = {
  31374. method: "serverless.file.resource.delete",
  31375. params: JSON.stringify({
  31376. fileList: e
  31377. })
  31378. };
  31379. return this.request(this.setupRequest(t)).then(function (e) {
  31380. if (e.success) return e.result;
  31381. throw new ne({
  31382. code: "DELETE_FILE_FAILED",
  31383. message: "删除文件失败"
  31384. });
  31385. });
  31386. }
  31387. }, {
  31388. key: "getTempFileURL",
  31389. value: function getTempFileURL() {
  31390. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31391. e = _ref17.fileList;
  31392. if (!Array.isArray(e) || 0 === e.length) throw new ne({
  31393. code: "INVALID_PARAM",
  31394. message: "fileList的元素必须是非空的字符串"
  31395. });
  31396. var t = {
  31397. method: "serverless.file.resource.getTempFileURL",
  31398. params: JSON.stringify({
  31399. fileList: e
  31400. })
  31401. };
  31402. return this.request(this.setupRequest(t)).then(function (e) {
  31403. if (e.success) return {
  31404. fileList: e.result.fileList.map(function (e) {
  31405. return {
  31406. fileID: e.fileID,
  31407. tempFileURL: e.tempFileURL
  31408. };
  31409. })
  31410. };
  31411. throw new ne({
  31412. code: "GET_TEMP_FILE_URL_FAILED",
  31413. message: "获取临时文件链接失败"
  31414. });
  31415. });
  31416. }
  31417. }]);
  31418. return St;
  31419. }(fe);
  31420. var bt = {
  31421. init: function init(e) {
  31422. var t = new St(e),
  31423. n = {
  31424. signInAnonymously: function signInAnonymously() {
  31425. return t.authorize();
  31426. },
  31427. getLoginState: function getLoginState() {
  31428. return Promise.resolve(!1);
  31429. }
  31430. };
  31431. return t.auth = function () {
  31432. return n;
  31433. }, t.customAuth = t.auth, t;
  31434. }
  31435. };
  31436. function kt(_ref18) {
  31437. var e = _ref18.data;
  31438. var t;
  31439. t = he();
  31440. var n = JSON.parse(JSON.stringify(e || {}));
  31441. if (Object.assign(n, {
  31442. clientInfo: t
  31443. }), !n.uniIdToken) {
  31444. var _re2 = re(),
  31445. _e19 = _re2.token;
  31446. _e19 && (n.uniIdToken = _e19);
  31447. }
  31448. return n;
  31449. }
  31450. function Ct() {
  31451. return _Ct.apply(this, arguments);
  31452. }
  31453. function _Ct() {
  31454. _Ct = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  31455. var _this26 = this;
  31456. var _ref60,
  31457. e,
  31458. t,
  31459. _this$__dev__,
  31460. n,
  31461. s,
  31462. r,
  31463. i,
  31464. o,
  31465. a,
  31466. _args6 = arguments;
  31467. return _regenerator.default.wrap(function _callee54$(_context54) {
  31468. while (1) {
  31469. switch (_context54.prev = _context54.next) {
  31470. case 0:
  31471. _ref60 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref60.name, t = _ref60.data;
  31472. _context54.next = 3;
  31473. return this.__dev__.initLocalNetwork();
  31474. case 3:
  31475. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  31476. aliyun: "aliyun",
  31477. tencent: "tcb"
  31478. }[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);
  31479. return _context54.abrupt("return", new Promise(function (t, n) {
  31480. se.request({
  31481. method: "POST",
  31482. url: o,
  31483. data: {
  31484. name: e,
  31485. platform: P,
  31486. provider: r,
  31487. spaceId: i
  31488. },
  31489. timeout: 3e3,
  31490. success: function success(e) {
  31491. t(e);
  31492. },
  31493. fail: function fail() {
  31494. t({
  31495. data: {
  31496. code: "NETWORK_ERROR",
  31497. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  31498. }
  31499. });
  31500. }
  31501. });
  31502. }).then(function () {
  31503. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31504. e = _ref61.data;
  31505. var _ref62 = e || {},
  31506. t = _ref62.code,
  31507. n = _ref62.message;
  31508. return {
  31509. code: 0 === t ? 0 : t || "SYS_ERR",
  31510. message: n || "SYS_ERR"
  31511. };
  31512. }).then(function (_ref63) {
  31513. var n = _ref63.code,
  31514. s = _ref63.message;
  31515. if (0 !== n) {
  31516. switch (n) {
  31517. case "MODULE_ENCRYPTED":
  31518. 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"));
  31519. break;
  31520. case "FUNCTION_ENCRYPTED":
  31521. 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"));
  31522. break;
  31523. case "ACTION_ENCRYPTED":
  31524. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  31525. break;
  31526. case "NETWORK_ERROR":
  31527. {
  31528. var _e31 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  31529. throw console.error(_e31), new Error(_e31);
  31530. }
  31531. case "SWITCH_TO_CLOUD":
  31532. break;
  31533. default:
  31534. {
  31535. 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");
  31536. throw console.error(_e32), new Error(_e32);
  31537. }
  31538. }
  31539. return _this26._callCloudFunction({
  31540. name: e,
  31541. data: t
  31542. });
  31543. }
  31544. return new Promise(function (e, n) {
  31545. var s = kt.call(_this26, {
  31546. data: t
  31547. });
  31548. se.request({
  31549. method: "POST",
  31550. url: a,
  31551. data: {
  31552. provider: r,
  31553. platform: P,
  31554. param: s
  31555. },
  31556. success: function success() {
  31557. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31558. t = _ref64.statusCode,
  31559. s = _ref64.data;
  31560. return !t || t >= 400 ? n(new ne({
  31561. code: s.code || "SYS_ERR",
  31562. message: s.message || "request:fail"
  31563. })) : e({
  31564. result: s
  31565. });
  31566. },
  31567. fail: function fail(e) {
  31568. n(new ne({
  31569. code: e.code || e.errCode || "SYS_ERR",
  31570. message: e.message || e.errMsg || "request:fail"
  31571. }));
  31572. }
  31573. });
  31574. });
  31575. }));
  31576. case 5:
  31577. case "end":
  31578. return _context54.stop();
  31579. }
  31580. }
  31581. }, _callee54, this);
  31582. }));
  31583. return _Ct.apply(this, arguments);
  31584. }
  31585. var Tt = [{
  31586. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  31587. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  31588. mode: "append"
  31589. }];
  31590. var Pt = /[\\^$.*+?()[\]{}|]/g,
  31591. At = RegExp(Pt.source);
  31592. function Et(e, t, n) {
  31593. return e.replace(new RegExp((s = t) && At.test(s) ? s.replace(Pt, "\\$&") : s, "g"), n);
  31594. var s;
  31595. }
  31596. var Ot = "none",
  31597. xt = "request",
  31598. Rt = "response",
  31599. Ut = "both";
  31600. var Lt = /*#__PURE__*/function () {
  31601. function Lt() {
  31602. var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31603. e = _ref19.secretType,
  31604. t = _ref19.uniCloudIns;
  31605. (0, _classCallCheck2.default)(this, Lt);
  31606. this.clientType = "", this.secretType = e || Ot, this.uniCloudIns = t;
  31607. var _this$uniCloudIns$con = this.uniCloudIns.config,
  31608. n = _this$uniCloudIns$con.provider,
  31609. s = _this$uniCloudIns$con.spaceId;
  31610. var r;
  31611. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  31612. }
  31613. (0, _createClass2.default)(Lt, [{
  31614. key: "getSystemInfo",
  31615. value: function getSystemInfo() {
  31616. return this._systemInfo || (this._systemInfo = ce()), this._systemInfo;
  31617. }
  31618. }, {
  31619. key: "appId",
  31620. get: function get() {
  31621. return this.getSystemInfo().appId;
  31622. }
  31623. }, {
  31624. key: "deviceId",
  31625. get: function get() {
  31626. return this.getSystemInfo().deviceId;
  31627. }
  31628. }, {
  31629. key: "encryptData",
  31630. value: function () {
  31631. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  31632. return _regenerator.default.wrap(function _callee34$(_context34) {
  31633. while (1) {
  31634. switch (_context34.prev = _context34.next) {
  31635. case 0:
  31636. return _context34.abrupt("return", this.secretType === Ot ? e : this.platformEncryptData(e));
  31637. case 1:
  31638. case "end":
  31639. return _context34.stop();
  31640. }
  31641. }
  31642. }, _callee34, this);
  31643. }));
  31644. function encryptData(_x31) {
  31645. return _encryptData.apply(this, arguments);
  31646. }
  31647. return encryptData;
  31648. }()
  31649. }, {
  31650. key: "decryptResult",
  31651. value: function () {
  31652. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  31653. var _ref20, t, n;
  31654. return _regenerator.default.wrap(function _callee35$(_context35) {
  31655. while (1) {
  31656. switch (_context35.prev = _context35.next) {
  31657. case 0:
  31658. if (!(this.secretType === Ot)) {
  31659. _context35.next = 2;
  31660. break;
  31661. }
  31662. return _context35.abrupt("return", e);
  31663. case 2:
  31664. _ref20 = e || {}, t = _ref20.errCode, n = _ref20.content;
  31665. return _context35.abrupt("return", t || !n ? e : this.secretType === xt ? n : this.platformDecryptResult(e));
  31666. case 4:
  31667. case "end":
  31668. return _context35.stop();
  31669. }
  31670. }
  31671. }, _callee35, this);
  31672. }));
  31673. function decryptResult(_x32) {
  31674. return _decryptResult.apply(this, arguments);
  31675. }
  31676. return decryptResult;
  31677. }()
  31678. }, {
  31679. key: "wrapVerifyClientCallFunction",
  31680. value: function wrapVerifyClientCallFunction(e) {
  31681. var t = this;
  31682. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  31683. var _ref22,
  31684. n,
  31685. _ref22$data,
  31686. s,
  31687. r,
  31688. _args36 = arguments;
  31689. return _regenerator.default.wrap(function _callee36$(_context36) {
  31690. while (1) {
  31691. switch (_context36.prev = _context36.next) {
  31692. case 0:
  31693. _ref22 = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {}, n = _ref22.name, _ref22$data = _ref22.data, s = _ref22$data === void 0 ? {} : _ref22$data;
  31694. _context36.next = 3;
  31695. return t.prepare();
  31696. case 3:
  31697. _context36.next = 5;
  31698. return t.platformGetSignOption();
  31699. case 5:
  31700. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context36.sent;
  31701. _context36.next = 8;
  31702. return e({
  31703. name: n,
  31704. data: s
  31705. });
  31706. case 8:
  31707. r = _context36.sent;
  31708. _context36.t0 = t.isClientKeyNotFound(r);
  31709. if (!_context36.t0) {
  31710. _context36.next = 19;
  31711. break;
  31712. }
  31713. _context36.next = 13;
  31714. return t.prepare({
  31715. forceUpdate: !0
  31716. });
  31717. case 13:
  31718. _context36.next = 15;
  31719. return t.platformGetSignOption();
  31720. case 15:
  31721. s._uniCloudOptions = _context36.sent;
  31722. _context36.next = 18;
  31723. return e({
  31724. name: n,
  31725. data: s
  31726. });
  31727. case 18:
  31728. r = _context36.sent;
  31729. case 19:
  31730. return _context36.abrupt("return", r);
  31731. case 20:
  31732. case "end":
  31733. return _context36.stop();
  31734. }
  31735. }
  31736. }, _callee36);
  31737. }));
  31738. }
  31739. }, {
  31740. key: "wrapEncryptDataCallFunction",
  31741. value: function wrapEncryptDataCallFunction(e) {
  31742. var t = this;
  31743. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  31744. var _ref24,
  31745. n,
  31746. _ref24$data,
  31747. s,
  31748. r,
  31749. i,
  31750. _r3,
  31751. _args37 = arguments;
  31752. return _regenerator.default.wrap(function _callee37$(_context37) {
  31753. while (1) {
  31754. switch (_context37.prev = _context37.next) {
  31755. case 0:
  31756. _ref24 = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {}, n = _ref24.name, _ref24$data = _ref24.data, s = _ref24$data === void 0 ? {} : _ref24$data;
  31757. _context37.next = 3;
  31758. return t.prepare();
  31759. case 3:
  31760. _context37.next = 5;
  31761. return t.encryptData(s);
  31762. case 5:
  31763. r = _context37.sent;
  31764. _context37.next = 8;
  31765. return e({
  31766. name: n,
  31767. data: r
  31768. });
  31769. case 8:
  31770. i = _context37.sent;
  31771. if (!t.isClientKeyNotFound(i)) {
  31772. _context37.next = 21;
  31773. break;
  31774. }
  31775. _context37.next = 12;
  31776. return t.prepare({
  31777. forceUpdate: !0
  31778. });
  31779. case 12:
  31780. _context37.next = 14;
  31781. return t.encryptData(s);
  31782. case 14:
  31783. _r3 = _context37.sent;
  31784. _context37.next = 17;
  31785. return t.platformGetSignOption();
  31786. case 17:
  31787. s._uniCloudOptions = _context37.sent;
  31788. _context37.next = 20;
  31789. return e({
  31790. name: n,
  31791. data: _r3
  31792. });
  31793. case 20:
  31794. i = _context37.sent;
  31795. case 21:
  31796. _context37.next = 23;
  31797. return t.decryptResult(i.result);
  31798. case 23:
  31799. i.result = _context37.sent;
  31800. return _context37.abrupt("return", i);
  31801. case 25:
  31802. case "end":
  31803. return _context37.stop();
  31804. }
  31805. }
  31806. }, _callee37);
  31807. }));
  31808. }
  31809. }]);
  31810. return Lt;
  31811. }();
  31812. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  31813. function Nt(e) {
  31814. return parseInt(e) === e;
  31815. }
  31816. function Dt(e) {
  31817. if (!Nt(e.length)) return !1;
  31818. for (var t = 0; t < e.length; t++) {
  31819. if (!Nt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  31820. }
  31821. return !0;
  31822. }
  31823. function Ft(e, t) {
  31824. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  31825. if (Array.isArray(e)) {
  31826. if (!Dt(e)) throw new Error("Array contains invalid value: " + e);
  31827. return new Uint8Array(e);
  31828. }
  31829. if (Nt(e.length) && Dt(e)) return new Uint8Array(e);
  31830. throw new Error("unsupported array-like object");
  31831. }
  31832. function qt(e) {
  31833. return new Uint8Array(e);
  31834. }
  31835. function Mt(e, t, n, s, r) {
  31836. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  31837. }
  31838. var Kt,
  31839. jt = {
  31840. toBytes: function toBytes(e) {
  31841. var t = [],
  31842. n = 0;
  31843. for (e = encodeURI(e); n < e.length;) {
  31844. var s = e.charCodeAt(n++);
  31845. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  31846. }
  31847. return Ft(t);
  31848. },
  31849. fromBytes: function fromBytes(e) {
  31850. for (var t = [], n = 0; n < e.length;) {
  31851. var s = e[n];
  31852. 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);
  31853. }
  31854. return t.join("");
  31855. }
  31856. },
  31857. Bt = (Kt = "0123456789abcdef", {
  31858. toBytes: function toBytes(e) {
  31859. for (var t = [], n = 0; n < e.length; n += 2) {
  31860. t.push(parseInt(e.substr(n, 2), 16));
  31861. }
  31862. return t;
  31863. },
  31864. fromBytes: function fromBytes(e) {
  31865. for (var t = [], n = 0; n < e.length; n++) {
  31866. var s = e[n];
  31867. t.push(Kt[(240 & s) >> 4] + Kt[15 & s]);
  31868. }
  31869. return t.join("");
  31870. }
  31871. }),
  31872. $t = {
  31873. 16: 10,
  31874. 24: 12,
  31875. 32: 14
  31876. },
  31877. 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],
  31878. 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],
  31879. 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],
  31880. 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],
  31881. 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],
  31882. 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],
  31883. 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],
  31884. 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],
  31885. 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],
  31886. 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],
  31887. 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],
  31888. 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],
  31889. 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],
  31890. 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],
  31891. 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];
  31892. function on(e) {
  31893. for (var t = [], n = 0; n < e.length; n += 4) {
  31894. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  31895. }
  31896. return t;
  31897. }
  31898. var an = /*#__PURE__*/function () {
  31899. function an(e) {
  31900. (0, _classCallCheck2.default)(this, an);
  31901. if (!(this instanceof an)) throw Error("AES must be instanitated with `new`");
  31902. Object.defineProperty(this, "key", {
  31903. value: Ft(e, !0)
  31904. }), this._prepare();
  31905. }
  31906. (0, _createClass2.default)(an, [{
  31907. key: "_prepare",
  31908. value: function _prepare() {
  31909. var e = $t[this.key.length];
  31910. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  31911. this._Ke = [], this._Kd = [];
  31912. for (var t = 0; t <= e; t++) {
  31913. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  31914. }
  31915. var n,
  31916. s = 4 * (e + 1),
  31917. r = this.key.length / 4,
  31918. i = on(this.key);
  31919. for (t = 0; t < r; t++) {
  31920. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  31921. }
  31922. for (var o, a = 0, c = r; c < s;) {
  31923. 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++) {
  31924. i[t] ^= i[t - 1];
  31925. } else {
  31926. for (t = 1; t < r / 2; t++) {
  31927. i[t] ^= i[t - 1];
  31928. }
  31929. 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;
  31930. for (t = r / 2 + 1; t < r; t++) {
  31931. i[t] ^= i[t - 1];
  31932. }
  31933. }
  31934. for (t = 0; t < r && c < s;) {
  31935. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  31936. }
  31937. }
  31938. for (var u = 1; u < e; u++) {
  31939. for (var h = 0; h < 4; h++) {
  31940. o = this._Kd[u][h], this._Kd[u][h] = tn[o >> 24 & 255] ^ nn[o >> 16 & 255] ^ sn[o >> 8 & 255] ^ rn[255 & o];
  31941. }
  31942. }
  31943. }
  31944. }, {
  31945. key: "encrypt",
  31946. value: function encrypt(e) {
  31947. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  31948. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  31949. s[r] ^= this._Ke[0][r];
  31950. }
  31951. for (var i = 1; i < t; i++) {
  31952. for (r = 0; r < 4; r++) {
  31953. 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];
  31954. }
  31955. s = n.slice();
  31956. }
  31957. var o,
  31958. a = qt(16);
  31959. for (r = 0; r < 4; r++) {
  31960. 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);
  31961. }
  31962. return a;
  31963. }
  31964. }, {
  31965. key: "decrypt",
  31966. value: function decrypt(e) {
  31967. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  31968. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  31969. s[r] ^= this._Kd[0][r];
  31970. }
  31971. for (var i = 1; i < t; i++) {
  31972. for (r = 0; r < 4; r++) {
  31973. 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];
  31974. }
  31975. s = n.slice();
  31976. }
  31977. var o,
  31978. a = qt(16);
  31979. for (r = 0; r < 4; r++) {
  31980. 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);
  31981. }
  31982. return a;
  31983. }
  31984. }]);
  31985. return an;
  31986. }();
  31987. var cn = /*#__PURE__*/function () {
  31988. function cn(e) {
  31989. (0, _classCallCheck2.default)(this, cn);
  31990. if (!(this instanceof cn)) throw Error("AES must be instanitated with `new`");
  31991. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new an(e);
  31992. }
  31993. (0, _createClass2.default)(cn, [{
  31994. key: "encrypt",
  31995. value: function encrypt(e) {
  31996. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  31997. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  31998. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.encrypt(n), t, s);
  31999. }
  32000. return t;
  32001. }
  32002. }, {
  32003. key: "decrypt",
  32004. value: function decrypt(e) {
  32005. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  32006. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  32007. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.decrypt(n), t, s);
  32008. }
  32009. return t;
  32010. }
  32011. }]);
  32012. return cn;
  32013. }();
  32014. var un = /*#__PURE__*/function () {
  32015. function un(e, t) {
  32016. (0, _classCallCheck2.default)(this, un);
  32017. if (!(this instanceof un)) throw Error("AES must be instanitated with `new`");
  32018. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  32019. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  32020. } else t = qt(16);
  32021. this._lastCipherblock = Ft(t, !0), this._aes = new an(e);
  32022. }
  32023. (0, _createClass2.default)(un, [{
  32024. key: "encrypt",
  32025. value: function encrypt(e) {
  32026. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  32027. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  32028. Mt(e, n, 0, s, s + 16);
  32029. for (var r = 0; r < 16; r++) {
  32030. n[r] ^= this._lastCipherblock[r];
  32031. }
  32032. this._lastCipherblock = this._aes.encrypt(n), Mt(this._lastCipherblock, t, s);
  32033. }
  32034. return t;
  32035. }
  32036. }, {
  32037. key: "decrypt",
  32038. value: function decrypt(e) {
  32039. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  32040. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  32041. Mt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  32042. for (var r = 0; r < 16; r++) {
  32043. t[s + r] = n[r] ^ this._lastCipherblock[r];
  32044. }
  32045. Mt(e, this._lastCipherblock, 0, s, s + 16);
  32046. }
  32047. return t;
  32048. }
  32049. }]);
  32050. return un;
  32051. }();
  32052. var hn = /*#__PURE__*/function () {
  32053. function hn(e, t, n) {
  32054. (0, _classCallCheck2.default)(this, hn);
  32055. if (!(this instanceof hn)) throw Error("AES must be instanitated with `new`");
  32056. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  32057. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  32058. } else t = qt(16);
  32059. n || (n = 1), this.segmentSize = n, this._shiftRegister = Ft(t, !0), this._aes = new an(e);
  32060. }
  32061. (0, _createClass2.default)(hn, [{
  32062. key: "encrypt",
  32063. value: function encrypt(e) {
  32064. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  32065. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  32066. t = this._aes.encrypt(this._shiftRegister);
  32067. for (var r = 0; r < this.segmentSize; r++) {
  32068. n[s + r] ^= t[r];
  32069. }
  32070. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  32071. }
  32072. return n;
  32073. }
  32074. }, {
  32075. key: "decrypt",
  32076. value: function decrypt(e) {
  32077. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  32078. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  32079. t = this._aes.encrypt(this._shiftRegister);
  32080. for (var r = 0; r < this.segmentSize; r++) {
  32081. n[s + r] ^= t[r];
  32082. }
  32083. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  32084. }
  32085. return n;
  32086. }
  32087. }]);
  32088. return hn;
  32089. }();
  32090. var ln = /*#__PURE__*/function () {
  32091. function ln(e, t) {
  32092. (0, _classCallCheck2.default)(this, ln);
  32093. if (!(this instanceof ln)) throw Error("AES must be instanitated with `new`");
  32094. if (this.description = "Output Feedback", this.name = "ofb", t) {
  32095. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  32096. } else t = qt(16);
  32097. this._lastPrecipher = Ft(t, !0), this._lastPrecipherIndex = 16, this._aes = new an(e);
  32098. }
  32099. (0, _createClass2.default)(ln, [{
  32100. key: "encrypt",
  32101. value: function encrypt(e) {
  32102. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  32103. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  32104. }
  32105. return t;
  32106. }
  32107. }, {
  32108. key: "decrypt",
  32109. value: function decrypt(e) {
  32110. return this.encrypt(e);
  32111. }
  32112. }]);
  32113. return ln;
  32114. }();
  32115. var dn = /*#__PURE__*/function () {
  32116. function dn(e) {
  32117. (0, _classCallCheck2.default)(this, dn);
  32118. if (!(this instanceof dn)) throw Error("Counter must be instanitated with `new`");
  32119. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = qt(16), this.setValue(e)) : this.setBytes(e);
  32120. }
  32121. (0, _createClass2.default)(dn, [{
  32122. key: "setValue",
  32123. value: function setValue(e) {
  32124. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  32125. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  32126. for (var t = 15; t >= 0; --t) {
  32127. this._counter[t] = e % 256, e = parseInt(e / 256);
  32128. }
  32129. }
  32130. }, {
  32131. key: "setBytes",
  32132. value: function setBytes(e) {
  32133. if (16 != (e = Ft(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  32134. this._counter = e;
  32135. }
  32136. }, {
  32137. key: "increment",
  32138. value: function increment() {
  32139. for (var e = 15; e >= 0; e--) {
  32140. if (255 !== this._counter[e]) {
  32141. this._counter[e]++;
  32142. break;
  32143. }
  32144. this._counter[e] = 0;
  32145. }
  32146. }
  32147. }]);
  32148. return dn;
  32149. }();
  32150. var pn = /*#__PURE__*/function () {
  32151. function pn(e, t) {
  32152. (0, _classCallCheck2.default)(this, pn);
  32153. if (!(this instanceof pn)) throw Error("AES must be instanitated with `new`");
  32154. 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);
  32155. }
  32156. (0, _createClass2.default)(pn, [{
  32157. key: "encrypt",
  32158. value: function encrypt(e) {
  32159. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  32160. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  32161. }
  32162. return t;
  32163. }
  32164. }, {
  32165. key: "decrypt",
  32166. value: function decrypt(e) {
  32167. return this.encrypt(e);
  32168. }
  32169. }]);
  32170. return pn;
  32171. }();
  32172. var fn = {
  32173. AES: an,
  32174. Counter: dn,
  32175. ModeOfOperation: {
  32176. ecb: cn,
  32177. cbc: un,
  32178. cfb: hn,
  32179. ofb: ln,
  32180. ctr: pn
  32181. },
  32182. utils: {
  32183. hex: Bt,
  32184. utf8: jt
  32185. },
  32186. padding: {
  32187. pkcs7: {
  32188. pad: function pad(e) {
  32189. var t = 16 - (e = Ft(e, !0)).length % 16,
  32190. n = qt(e.length + t);
  32191. Mt(e, n);
  32192. for (var s = e.length; s < n.length; s++) {
  32193. n[s] = t;
  32194. }
  32195. return n;
  32196. },
  32197. strip: function strip(e) {
  32198. if ((e = Ft(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  32199. var t = e[e.length - 1];
  32200. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  32201. for (var n = e.length - t, s = 0; s < t; s++) {
  32202. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  32203. }
  32204. var r = qt(n);
  32205. return Mt(e, r, 0, 0, n), r;
  32206. }
  32207. }
  32208. },
  32209. _arrayTest: {
  32210. coerceArray: Ft,
  32211. createArray: qt,
  32212. copyArray: Mt
  32213. }
  32214. };
  32215. function gn(e, t, n) {
  32216. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  32217. r = fn.utils.utf8.toBytes(n),
  32218. i = fn.utils.utf8.toBytes(e),
  32219. o = new fn.ModeOfOperation.cbc(s, r),
  32220. a = fn.padding.pkcs7.pad(i),
  32221. c = o.encrypt(a);
  32222. return uni.arrayBufferToBase64(c);
  32223. }
  32224. var mn = {
  32225. code: 2e4,
  32226. message: "System error"
  32227. },
  32228. yn = {
  32229. code: 20101,
  32230. message: "Invalid client"
  32231. },
  32232. _n = {
  32233. code: 20102,
  32234. message: "Get encrypt key failed"
  32235. },
  32236. wn = {
  32237. 10001: "Secure network is not supported on current playground or unimpsdk",
  32238. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  32239. 10009: "Encrypt payload failed",
  32240. 10010: "Decrypt response failed"
  32241. };
  32242. function vn(e) {
  32243. var _ref25 = e || {},
  32244. t = _ref25.errSubject,
  32245. n = _ref25.subject,
  32246. s = _ref25.errCode,
  32247. r = _ref25.errMsg,
  32248. i = _ref25.code,
  32249. o = _ref25.message,
  32250. a = _ref25.cause;
  32251. return new ne({
  32252. subject: t || n || "uni-secure-network",
  32253. code: s || i || mn.code,
  32254. message: r || o,
  32255. cause: a
  32256. });
  32257. }
  32258. var In,
  32259. Sn,
  32260. bn = null;
  32261. var kn = /*#__PURE__*/function (_Lt) {
  32262. (0, _inherits2.default)(kn, _Lt);
  32263. var _super9 = _createSuper(kn);
  32264. function kn(e) {
  32265. var _this14;
  32266. (0, _classCallCheck2.default)(this, kn);
  32267. _this14 = _super9.call(this, e), _this14.clientType = "mp-weixin", _this14.userEncryptKey = null;
  32268. return _this14;
  32269. }
  32270. (0, _createClass2.default)(kn, [{
  32271. key: "isLogin",
  32272. value: function isLogin() {
  32273. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  32274. }
  32275. }, {
  32276. key: "prepare",
  32277. value: function () {
  32278. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  32279. return _regenerator.default.wrap(function _callee38$(_context38) {
  32280. while (1) {
  32281. switch (_context38.prev = _context38.next) {
  32282. case 0:
  32283. if (this.isLogin()) {
  32284. _context38.next = 7;
  32285. break;
  32286. }
  32287. if (this.scopedGlobalCache.initPromise) {
  32288. _context38.next = 3;
  32289. break;
  32290. }
  32291. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  32292. case 3:
  32293. _context38.next = 5;
  32294. return this.scopedGlobalCache.initPromise;
  32295. case 5:
  32296. if (this.isLogin()) {
  32297. _context38.next = 7;
  32298. break;
  32299. }
  32300. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  32301. case 7:
  32302. case "end":
  32303. return _context38.stop();
  32304. }
  32305. }
  32306. }, _callee38, this);
  32307. }));
  32308. function prepare() {
  32309. return _prepare2.apply(this, arguments);
  32310. }
  32311. return prepare;
  32312. }()
  32313. }, {
  32314. key: "getUserEncryptKey",
  32315. value: function () {
  32316. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  32317. var _this15 = this;
  32318. var e;
  32319. return _regenerator.default.wrap(function _callee39$(_context39) {
  32320. while (1) {
  32321. switch (_context39.prev = _context39.next) {
  32322. case 0:
  32323. if (!this.userEncryptKey) {
  32324. _context39.next = 2;
  32325. break;
  32326. }
  32327. return _context39.abrupt("return", this.userEncryptKey);
  32328. case 2:
  32329. if (!(bn && bn.expireTime)) {
  32330. _context39.next = 6;
  32331. break;
  32332. }
  32333. e = Date.now();
  32334. if (!(bn.expireTime - e > 0)) {
  32335. _context39.next = 6;
  32336. break;
  32337. }
  32338. return _context39.abrupt("return", (this.userEncryptKey = bn, this.userEncryptKey));
  32339. case 6:
  32340. return _context39.abrupt("return", new Promise(function (e, t) {
  32341. uni.getUserCryptoManager().getLatestUserKey({
  32342. success: function success(t) {
  32343. bn = t, _this15.userEncryptKey = t, e(_this15.userEncryptKey);
  32344. },
  32345. fail: function fail(e) {
  32346. t(vn(_objectSpread(_objectSpread({}, _n), {}, {
  32347. cause: e
  32348. })));
  32349. }
  32350. });
  32351. }));
  32352. case 7:
  32353. case "end":
  32354. return _context39.stop();
  32355. }
  32356. }
  32357. }, _callee39, this);
  32358. }));
  32359. function getUserEncryptKey() {
  32360. return _getUserEncryptKey.apply(this, arguments);
  32361. }
  32362. return getUserEncryptKey;
  32363. }()
  32364. }, {
  32365. key: "getWxAppId",
  32366. value: function getWxAppId() {
  32367. return wx.getAccountInfoSync().miniProgram.appId;
  32368. }
  32369. }, {
  32370. key: "platformGetSignOption",
  32371. value: function () {
  32372. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  32373. var _yield$this$getUserEn, e, t, n;
  32374. return _regenerator.default.wrap(function _callee40$(_context40) {
  32375. while (1) {
  32376. switch (_context40.prev = _context40.next) {
  32377. case 0:
  32378. _context40.next = 2;
  32379. return this.getUserEncryptKey();
  32380. case 2:
  32381. _yield$this$getUserEn = _context40.sent;
  32382. e = _yield$this$getUserEn.encryptKey;
  32383. t = _yield$this$getUserEn.iv;
  32384. n = _yield$this$getUserEn.version;
  32385. return _context40.abrupt("return", {
  32386. verifyClientSign: gn(JSON.stringify({
  32387. data: JSON.stringify({}),
  32388. appId: this.appId,
  32389. deviceId: this.deviceId,
  32390. wxAppId: this.getWxAppId(),
  32391. simulator: "devtools" === ce().platform,
  32392. timestamp: Date.now()
  32393. }), e, t),
  32394. encryptKeyId: n,
  32395. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  32396. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  32397. });
  32398. case 7:
  32399. case "end":
  32400. return _context40.stop();
  32401. }
  32402. }
  32403. }, _callee40, this);
  32404. }));
  32405. function platformGetSignOption() {
  32406. return _platformGetSignOption.apply(this, arguments);
  32407. }
  32408. return platformGetSignOption;
  32409. }()
  32410. }, {
  32411. key: "platformEncryptData",
  32412. value: function () {
  32413. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(e) {
  32414. var _yield$this$getUserEn2, t, n, s, r;
  32415. return _regenerator.default.wrap(function _callee41$(_context41) {
  32416. while (1) {
  32417. switch (_context41.prev = _context41.next) {
  32418. case 0:
  32419. _context41.next = 2;
  32420. return this.getUserEncryptKey();
  32421. case 2:
  32422. _yield$this$getUserEn2 = _context41.sent;
  32423. t = _yield$this$getUserEn2.encryptKey;
  32424. n = _yield$this$getUserEn2.iv;
  32425. s = _yield$this$getUserEn2.version;
  32426. r = {
  32427. secretType: this.secretType,
  32428. encryptKeyId: s,
  32429. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  32430. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  32431. };
  32432. return _context41.abrupt("return", this.secretType === Rt ? {
  32433. content: e,
  32434. _uniCloudOptions: r
  32435. } : {
  32436. content: gn(JSON.stringify({
  32437. data: JSON.stringify(e),
  32438. appId: this.appId,
  32439. deviceId: this.deviceId,
  32440. wxAppId: this.getWxAppId(),
  32441. simulator: "devtools" === ce().platform,
  32442. timestamp: Date.now()
  32443. }), t, n),
  32444. _uniCloudOptions: r
  32445. });
  32446. case 8:
  32447. case "end":
  32448. return _context41.stop();
  32449. }
  32450. }
  32451. }, _callee41, this);
  32452. }));
  32453. function platformEncryptData(_x33) {
  32454. return _platformEncryptData.apply(this, arguments);
  32455. }
  32456. return platformEncryptData;
  32457. }()
  32458. }, {
  32459. key: "platformDecryptResult",
  32460. value: function () {
  32461. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(e) {
  32462. var t, _yield$this$getUserEn3, n, s;
  32463. return _regenerator.default.wrap(function _callee42$(_context42) {
  32464. while (1) {
  32465. switch (_context42.prev = _context42.next) {
  32466. case 0:
  32467. t = e.content;
  32468. _context42.next = 3;
  32469. return this.getUserEncryptKey();
  32470. case 3:
  32471. _yield$this$getUserEn3 = _context42.sent;
  32472. n = _yield$this$getUserEn3.encryptKey;
  32473. s = _yield$this$getUserEn3.iv;
  32474. return _context42.abrupt("return", JSON.parse(function (e, t, n) {
  32475. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  32476. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  32477. i = fn.utils.utf8.toBytes(n),
  32478. o = new fn.ModeOfOperation.cbc(r, i),
  32479. a = fn.padding.pkcs7.strip(o.decrypt(s));
  32480. return fn.utils.utf8.fromBytes(a);
  32481. }(t, n, s)));
  32482. case 7:
  32483. case "end":
  32484. return _context42.stop();
  32485. }
  32486. }
  32487. }, _callee42, this);
  32488. }));
  32489. function platformDecryptResult(_x34) {
  32490. return _platformDecryptResult.apply(this, arguments);
  32491. }
  32492. return platformDecryptResult;
  32493. }()
  32494. }, {
  32495. key: "isClientKeyNotFound",
  32496. value: function isClientKeyNotFound() {
  32497. return !1;
  32498. }
  32499. }]);
  32500. return kn;
  32501. }(Lt);
  32502. function Cn(e) {
  32503. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  32504. n = {};
  32505. var _loop = function _loop(_s10) {
  32506. var r = t[_s10];
  32507. n[r] = function () {
  32508. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  32509. t[_key] = arguments[_key];
  32510. }
  32511. return new Promise(function (n, s) {
  32512. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  32513. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32514. e = _ref26.type,
  32515. t = _ref26.data,
  32516. r = _ref26.errCode,
  32517. i = _ref26.errMsg,
  32518. o = _ref26.errSubject,
  32519. a = _ref26.message;
  32520. "success" === e ? n(t) : s(vn({
  32521. errCode: r,
  32522. errMsg: wn[r] || i || a,
  32523. errSubject: o
  32524. }));
  32525. }])) : s(vn({
  32526. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  32527. }));
  32528. });
  32529. };
  32530. };
  32531. for (var _s10 = 0; _s10 < t.length; _s10++) {
  32532. _loop(_s10);
  32533. }
  32534. return n;
  32535. }
  32536. var Tn = /*#__PURE__*/function (_Lt2) {
  32537. (0, _inherits2.default)(Tn, _Lt2);
  32538. var _super10 = _createSuper(Tn);
  32539. function Tn(e) {
  32540. var _this16;
  32541. (0, _classCallCheck2.default)(this, Tn);
  32542. _this16 = _super10.call(this, e), _this16.clientType = "app", _this16.appUtils = _objectSpread({}, Cn(uni.requireNativePlugin("plus"))), _this16.systemInfo = In || (In = ce());
  32543. return _this16;
  32544. }
  32545. (0, _createClass2.default)(Tn, [{
  32546. key: "hasClientKey",
  32547. value: function () {
  32548. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  32549. return _regenerator.default.wrap(function _callee43$(_context43) {
  32550. while (1) {
  32551. switch (_context43.prev = _context43.next) {
  32552. case 0:
  32553. _context43.next = 2;
  32554. return this.appUtils.hasClientKey({
  32555. provider: this.provider,
  32556. spaceId: this.spaceId
  32557. });
  32558. case 2:
  32559. this._hasClientKey = _context43.sent;
  32560. return _context43.abrupt("return", this._hasClientKey);
  32561. case 4:
  32562. case "end":
  32563. return _context43.stop();
  32564. }
  32565. }
  32566. }, _callee43, this);
  32567. }));
  32568. function hasClientKey() {
  32569. return _hasClientKey.apply(this, arguments);
  32570. }
  32571. return hasClientKey;
  32572. }()
  32573. }, {
  32574. key: "getAppClientKey",
  32575. value: function () {
  32576. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  32577. var _yield$this$appUtils$, e, t, n, s, r;
  32578. return _regenerator.default.wrap(function _callee44$(_context44) {
  32579. while (1) {
  32580. switch (_context44.prev = _context44.next) {
  32581. case 0:
  32582. _context44.next = 2;
  32583. return this.appUtils.encryptGetClientKeyPayload({
  32584. data: JSON.stringify({})
  32585. });
  32586. case 2:
  32587. _yield$this$appUtils$ = _context44.sent;
  32588. e = _yield$this$appUtils$.data;
  32589. t = _yield$this$appUtils$.key;
  32590. _context44.next = 7;
  32591. return this.uniCloudIns.callFunction({
  32592. name: "DCloud-clientDB",
  32593. data: {
  32594. redirectTo: "encryption",
  32595. action: "getAppClientKey",
  32596. data: e,
  32597. key: t
  32598. }
  32599. });
  32600. case 7:
  32601. _context44.t0 = _context44.sent.result;
  32602. if (_context44.t0) {
  32603. _context44.next = 10;
  32604. break;
  32605. }
  32606. _context44.t0 = {};
  32607. case 10:
  32608. n = _context44.t0;
  32609. if (!(0 !== n.errCode)) {
  32610. _context44.next = 13;
  32611. break;
  32612. }
  32613. throw function (e) {
  32614. return new ne({
  32615. subject: e.errSubject || "uni-secure-network",
  32616. code: e.errCode || e.code || mn.code,
  32617. message: e.errMsg || e.message
  32618. });
  32619. }(n);
  32620. case 13:
  32621. s = n.clientKey, r = n.key;
  32622. _context44.next = 16;
  32623. return this.appUtils.setClientKey({
  32624. provider: this.provider,
  32625. spaceId: this.spaceId,
  32626. clientKey: s,
  32627. key: r
  32628. });
  32629. case 16:
  32630. case "end":
  32631. return _context44.stop();
  32632. }
  32633. }
  32634. }, _callee44, this);
  32635. }));
  32636. function getAppClientKey() {
  32637. return _getAppClientKey.apply(this, arguments);
  32638. }
  32639. return getAppClientKey;
  32640. }()
  32641. }, {
  32642. key: "ensureClientKey",
  32643. value: function () {
  32644. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  32645. var _this17 = this;
  32646. var _ref27,
  32647. _ref27$forceUpdate,
  32648. e,
  32649. _args45 = arguments;
  32650. return _regenerator.default.wrap(function _callee45$(_context45) {
  32651. while (1) {
  32652. switch (_context45.prev = _context45.next) {
  32653. case 0:
  32654. _ref27 = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {}, _ref27$forceUpdate = _ref27.forceUpdate, e = _ref27$forceUpdate === void 0 ? !1 : _ref27$forceUpdate;
  32655. _context45.t1 = !0;
  32656. _context45.next = 4;
  32657. return this.hasClientKey();
  32658. case 4:
  32659. _context45.t2 = _context45.sent;
  32660. _context45.t0 = _context45.t1 !== _context45.t2;
  32661. if (_context45.t0) {
  32662. _context45.next = 8;
  32663. break;
  32664. }
  32665. _context45.t0 = e;
  32666. case 8:
  32667. if (!_context45.t0) {
  32668. _context45.next = 10;
  32669. break;
  32670. }
  32671. 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) {
  32672. _this17.scopedGlobalCache.initStatus = p;
  32673. }).catch(function (e) {
  32674. throw _this17.scopedGlobalCache.initStatus = f, e;
  32675. }), this.scopedGlobalCache.initStatus = d), this.scopedGlobalCache.initPromise));
  32676. case 10:
  32677. case "end":
  32678. return _context45.stop();
  32679. }
  32680. }
  32681. }, _callee45, this);
  32682. }));
  32683. function ensureClientKey() {
  32684. return _ensureClientKey.apply(this, arguments);
  32685. }
  32686. return ensureClientKey;
  32687. }()
  32688. }, {
  32689. key: "prepare",
  32690. value: function () {
  32691. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  32692. var _ref28,
  32693. _ref28$forceUpdate,
  32694. e,
  32695. _args46 = arguments;
  32696. return _regenerator.default.wrap(function _callee46$(_context46) {
  32697. while (1) {
  32698. switch (_context46.prev = _context46.next) {
  32699. case 0:
  32700. _ref28 = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {}, _ref28$forceUpdate = _ref28.forceUpdate, e = _ref28$forceUpdate === void 0 ? !1 : _ref28$forceUpdate;
  32701. _context46.next = 3;
  32702. return this.ensureClientKey({
  32703. forceUpdate: e
  32704. });
  32705. case 3:
  32706. case "end":
  32707. return _context46.stop();
  32708. }
  32709. }
  32710. }, _callee46, this);
  32711. }));
  32712. function prepare() {
  32713. return _prepare3.apply(this, arguments);
  32714. }
  32715. return prepare;
  32716. }()
  32717. }, {
  32718. key: "platformGetSignOption",
  32719. value: function () {
  32720. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  32721. var _yield$this$appUtils$2, e, t;
  32722. return _regenerator.default.wrap(function _callee47$(_context47) {
  32723. while (1) {
  32724. switch (_context47.prev = _context47.next) {
  32725. case 0:
  32726. _context47.next = 2;
  32727. return this.appUtils.encrypt({
  32728. provider: this.provider,
  32729. spaceId: this.spaceId,
  32730. data: JSON.stringify({})
  32731. });
  32732. case 2:
  32733. _yield$this$appUtils$2 = _context47.sent;
  32734. e = _yield$this$appUtils$2.data;
  32735. t = _yield$this$appUtils$2.key;
  32736. return _context47.abrupt("return", {
  32737. verifyClientSign: e,
  32738. encryptKeyId: t
  32739. });
  32740. case 6:
  32741. case "end":
  32742. return _context47.stop();
  32743. }
  32744. }
  32745. }, _callee47, this);
  32746. }));
  32747. function platformGetSignOption() {
  32748. return _platformGetSignOption2.apply(this, arguments);
  32749. }
  32750. return platformGetSignOption;
  32751. }()
  32752. }, {
  32753. key: "platformEncryptData",
  32754. value: function () {
  32755. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48(e) {
  32756. var _yield$this$appUtils$3, t, n, s;
  32757. return _regenerator.default.wrap(function _callee48$(_context48) {
  32758. while (1) {
  32759. switch (_context48.prev = _context48.next) {
  32760. case 0:
  32761. _context48.next = 2;
  32762. return this.appUtils.encrypt({
  32763. provider: this.provider,
  32764. spaceId: this.spaceId,
  32765. data: JSON.stringify(e)
  32766. });
  32767. case 2:
  32768. _yield$this$appUtils$3 = _context48.sent;
  32769. t = _yield$this$appUtils$3.data;
  32770. n = _yield$this$appUtils$3.key;
  32771. s = {
  32772. secretType: this.secretType,
  32773. encryptKeyId: n
  32774. };
  32775. return _context48.abrupt("return", this.secretType === Rt ? {
  32776. content: e,
  32777. _uniCloudOptions: s
  32778. } : {
  32779. content: t,
  32780. _uniCloudOptions: s
  32781. });
  32782. case 7:
  32783. case "end":
  32784. return _context48.stop();
  32785. }
  32786. }
  32787. }, _callee48, this);
  32788. }));
  32789. function platformEncryptData(_x35) {
  32790. return _platformEncryptData2.apply(this, arguments);
  32791. }
  32792. return platformEncryptData;
  32793. }()
  32794. }, {
  32795. key: "platformDecryptResult",
  32796. value: function () {
  32797. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(e) {
  32798. var t, _e$_uniCloudOptions, n, s, r;
  32799. return _regenerator.default.wrap(function _callee49$(_context49) {
  32800. while (1) {
  32801. switch (_context49.prev = _context49.next) {
  32802. case 0:
  32803. t = e.content;
  32804. _e$_uniCloudOptions = e._uniCloudOptions;
  32805. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  32806. s = n.encryptKeyId;
  32807. _context49.next = 6;
  32808. return this.appUtils.decrypt({
  32809. provider: this.provider,
  32810. spaceId: this.spaceId,
  32811. data: t,
  32812. key: s
  32813. });
  32814. case 6:
  32815. r = _context49.sent;
  32816. return _context49.abrupt("return", JSON.parse(r.data));
  32817. case 8:
  32818. case "end":
  32819. return _context49.stop();
  32820. }
  32821. }
  32822. }, _callee49, this);
  32823. }));
  32824. function platformDecryptResult(_x36) {
  32825. return _platformDecryptResult2.apply(this, arguments);
  32826. }
  32827. return platformDecryptResult;
  32828. }()
  32829. }, {
  32830. key: "isClientKeyNotFound",
  32831. value: function isClientKeyNotFound() {
  32832. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32833. var t = e.result || {};
  32834. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  32835. }
  32836. }]);
  32837. return Tn;
  32838. }(Lt);
  32839. function Pn() {
  32840. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32841. e = _ref29.secretType;
  32842. return e === xt || e === Rt || e === Ut;
  32843. }
  32844. function An() {
  32845. var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32846. e = _ref30.name,
  32847. _ref30$data = _ref30.data,
  32848. t = _ref30$data === void 0 ? {} : _ref30$data;
  32849. return "app" === P && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  32850. }
  32851. function En() {
  32852. var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32853. e = _ref31.provider,
  32854. t = _ref31.spaceId,
  32855. n = _ref31.functionName;
  32856. var _ce = ce(),
  32857. s = _ce.appId,
  32858. r = _ce.uniPlatform,
  32859. i = _ce.osName;
  32860. var o = r;
  32861. "app" === r && (o = i);
  32862. var a = function () {
  32863. var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32864. e = _ref32.provider,
  32865. t = _ref32.spaceId;
  32866. var n = T;
  32867. if (!n) return {};
  32868. e = function (e) {
  32869. return "tencent" === e ? "tcb" : e;
  32870. }(e);
  32871. var s = n.find(function (n) {
  32872. return n.provider === e && n.spaceId === t;
  32873. });
  32874. return s && s.config;
  32875. }({
  32876. provider: e,
  32877. spaceId: t
  32878. });
  32879. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  32880. var c = a.accessControl.function || {},
  32881. u = Object.keys(c);
  32882. if (0 === u.length) return !0;
  32883. var h = function (e, t) {
  32884. var n, s, r;
  32885. for (var _i2 = 0; _i2 < e.length; _i2++) {
  32886. var _o2 = e[_i2];
  32887. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  32888. return e.trim();
  32889. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  32890. }
  32891. return n || s || r;
  32892. }(u, n);
  32893. if (!h) return !1;
  32894. if ((c[h] || []).find(function () {
  32895. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32896. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  32897. })) return !0;
  32898. 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);
  32899. }
  32900. function On(_ref33) {
  32901. var e = _ref33.functionName,
  32902. t = _ref33.result,
  32903. n = _ref33.logPvd;
  32904. if (b && this.__dev__.debugLog && t && t.requestId) {
  32905. var _s11 = JSON.stringify({
  32906. spaceId: this.config.spaceId,
  32907. functionName: e,
  32908. requestId: t.requestId
  32909. });
  32910. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  32911. }
  32912. }
  32913. function xn(e) {
  32914. var t = e.callFunction,
  32915. n = function n(_n7) {
  32916. var _this18 = this;
  32917. var s = _n7.name;
  32918. _n7.data = kt.call(e, {
  32919. data: _n7.data
  32920. });
  32921. var r = {
  32922. aliyun: "aliyun",
  32923. tencent: "tcb",
  32924. tcb: "tcb"
  32925. }[this.config.provider],
  32926. i = Pn(_n7),
  32927. o = An(_n7),
  32928. a = i || o;
  32929. return t.call(this, _n7).then(function (e) {
  32930. return e.errCode = 0, !a && On.call(_this18, {
  32931. functionName: s,
  32932. result: e,
  32933. logPvd: r
  32934. }), Promise.resolve(e);
  32935. }, function (e) {
  32936. return !a && On.call(_this18, {
  32937. functionName: s,
  32938. result: e,
  32939. logPvd: r
  32940. }), e && e.message && (e.message = function () {
  32941. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32942. _ref34$message = _ref34.message,
  32943. e = _ref34$message === void 0 ? "" : _ref34$message,
  32944. _ref34$extraInfo = _ref34.extraInfo,
  32945. t = _ref34$extraInfo === void 0 ? {} : _ref34$extraInfo,
  32946. _ref34$formatter = _ref34.formatter,
  32947. n = _ref34$formatter === void 0 ? [] : _ref34$formatter;
  32948. for (var _s12 = 0; _s12 < n.length; _s12++) {
  32949. var _n$_s = n[_s12],
  32950. _r4 = _n$_s.rule,
  32951. _i3 = _n$_s.content,
  32952. _o3 = _n$_s.mode,
  32953. _a = e.match(_r4);
  32954. if (!_a) continue;
  32955. var _c = _i3;
  32956. for (var _e20 = 1; _e20 < _a.length; _e20++) {
  32957. _c = Et(_c, "{$".concat(_e20, "}"), _a[_e20]);
  32958. }
  32959. for (var _e21 in t) {
  32960. _c = Et(_c, "{".concat(_e21, "}"), t[_e21]);
  32961. }
  32962. return "replace" === _o3 ? _c : e + _c;
  32963. }
  32964. return e;
  32965. }({
  32966. message: "[".concat(_n7.name, "]: ").concat(e.message),
  32967. formatter: Tt,
  32968. extraInfo: {
  32969. functionName: s
  32970. }
  32971. })), Promise.reject(e);
  32972. });
  32973. };
  32974. e.callFunction = function (t) {
  32975. var _e$config = e.config,
  32976. s = _e$config.provider,
  32977. r = _e$config.spaceId,
  32978. i = t.name;
  32979. var o, a;
  32980. 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) {
  32981. var e = _ref35.name,
  32982. _ref35$data = _ref35.data,
  32983. t = _ref35$data === void 0 ? {} : _ref35$data;
  32984. return "mp-weixin" === P && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  32985. }(t)) a = o.call(e, t);else if (Pn(t)) {
  32986. a = new Sn({
  32987. secretType: t.secretType,
  32988. uniCloudIns: e
  32989. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  32990. } else if (En({
  32991. provider: s,
  32992. spaceId: r,
  32993. functionName: i
  32994. })) {
  32995. a = new Sn({
  32996. secretType: t.secretType,
  32997. uniCloudIns: e
  32998. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  32999. } else a = o(t);
  33000. return Object.defineProperty(a, "result", {
  33001. get: function get() {
  33002. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  33003. }
  33004. }), a;
  33005. };
  33006. }
  33007. Sn = "mp-weixin" !== P && "app" !== P ? /*#__PURE__*/function () {
  33008. function _class2() {
  33009. (0, _classCallCheck2.default)(this, _class2);
  33010. throw vn({
  33011. message: "Platform ".concat(P, " is not supported by secure network")
  33012. });
  33013. }
  33014. return (0, _createClass2.default)(_class2);
  33015. }() : C ? "mp-weixin" === P ? kn : Tn : /*#__PURE__*/function () {
  33016. function _class3() {
  33017. (0, _classCallCheck2.default)(this, _class3);
  33018. throw vn({
  33019. message: "Platform ".concat(P, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  33020. });
  33021. }
  33022. return (0, _createClass2.default)(_class3);
  33023. }();
  33024. var Rn = Symbol("CLIENT_DB_INTERNAL");
  33025. function Un(e, t) {
  33026. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Rn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  33027. get: function get(e, n, s) {
  33028. if ("_uniClient" === n) return null;
  33029. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  33030. if (n in e || "string" != typeof n) {
  33031. var _t10 = e[n];
  33032. return "function" == typeof _t10 ? _t10.bind(e) : _t10;
  33033. }
  33034. return t.get(e, n, s);
  33035. }
  33036. });
  33037. }
  33038. function Ln(e) {
  33039. return {
  33040. on: function on(t, n) {
  33041. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  33042. },
  33043. off: function off(t, n) {
  33044. e[t] = e[t] || [];
  33045. var s = e[t].indexOf(n);
  33046. -1 !== s && e[t].splice(s, 1);
  33047. }
  33048. };
  33049. }
  33050. var Nn = ["db.Geo", "db.command", "command.aggregate"];
  33051. function Dn(e, t) {
  33052. return Nn.indexOf("".concat(e, ".").concat(t)) > -1;
  33053. }
  33054. function Fn(e) {
  33055. switch (g(e)) {
  33056. case "array":
  33057. return e.map(function (e) {
  33058. return Fn(e);
  33059. });
  33060. case "object":
  33061. return e._internalType === Rn || Object.keys(e).forEach(function (t) {
  33062. e[t] = Fn(e[t]);
  33063. }), e;
  33064. case "regexp":
  33065. return {
  33066. $regexp: {
  33067. source: e.source,
  33068. flags: e.flags
  33069. }
  33070. };
  33071. case "date":
  33072. return {
  33073. $date: e.toISOString()
  33074. };
  33075. default:
  33076. return e;
  33077. }
  33078. }
  33079. function qn(e) {
  33080. return e && e.content && e.content.$method;
  33081. }
  33082. var Mn = /*#__PURE__*/function () {
  33083. function Mn(e, t, n) {
  33084. (0, _classCallCheck2.default)(this, Mn);
  33085. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  33086. }
  33087. (0, _createClass2.default)(Mn, [{
  33088. key: "toJSON",
  33089. value: function toJSON() {
  33090. var e = this;
  33091. var t = [e.content];
  33092. for (; e.prevStage;) {
  33093. e = e.prevStage, t.push(e.content);
  33094. }
  33095. return {
  33096. $db: t.reverse().map(function (e) {
  33097. return {
  33098. $method: e.$method,
  33099. $param: Fn(e.$param)
  33100. };
  33101. })
  33102. };
  33103. }
  33104. }, {
  33105. key: "toString",
  33106. value: function toString() {
  33107. return JSON.stringify(this.toJSON());
  33108. }
  33109. }, {
  33110. key: "getAction",
  33111. value: function getAction() {
  33112. var e = this.toJSON().$db.find(function (e) {
  33113. return "action" === e.$method;
  33114. });
  33115. return e && e.$param && e.$param[0];
  33116. }
  33117. }, {
  33118. key: "getCommand",
  33119. value: function getCommand() {
  33120. return {
  33121. $db: this.toJSON().$db.filter(function (e) {
  33122. return "action" !== e.$method;
  33123. })
  33124. };
  33125. }
  33126. }, {
  33127. key: "isAggregate",
  33128. get: function get() {
  33129. var e = this;
  33130. for (; e;) {
  33131. var t = qn(e),
  33132. _n8 = qn(e.prevStage);
  33133. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  33134. e = e.prevStage;
  33135. }
  33136. return !1;
  33137. }
  33138. }, {
  33139. key: "isCommand",
  33140. get: function get() {
  33141. var e = this;
  33142. for (; e;) {
  33143. if ("command" === qn(e)) return !0;
  33144. e = e.prevStage;
  33145. }
  33146. return !1;
  33147. }
  33148. }, {
  33149. key: "isAggregateCommand",
  33150. get: function get() {
  33151. var e = this;
  33152. for (; e;) {
  33153. var t = qn(e),
  33154. _n9 = qn(e.prevStage);
  33155. if ("aggregate" === t && "command" === _n9) return !0;
  33156. e = e.prevStage;
  33157. }
  33158. return !1;
  33159. }
  33160. }, {
  33161. key: "getNextStageFn",
  33162. value: function getNextStageFn(e) {
  33163. var t = this;
  33164. return function () {
  33165. return Kn({
  33166. $method: e,
  33167. $param: Fn(Array.from(arguments))
  33168. }, t, t._database);
  33169. };
  33170. }
  33171. }, {
  33172. key: "count",
  33173. get: function get() {
  33174. return this.isAggregate ? this.getNextStageFn("count") : function () {
  33175. return this._send("count", Array.from(arguments));
  33176. };
  33177. }
  33178. }, {
  33179. key: "remove",
  33180. get: function get() {
  33181. return this.isCommand ? this.getNextStageFn("remove") : function () {
  33182. return this._send("remove", Array.from(arguments));
  33183. };
  33184. }
  33185. }, {
  33186. key: "get",
  33187. value: function get() {
  33188. return this._send("get", Array.from(arguments));
  33189. }
  33190. }, {
  33191. key: "add",
  33192. get: function get() {
  33193. return this.isCommand ? this.getNextStageFn("add") : function () {
  33194. return this._send("add", Array.from(arguments));
  33195. };
  33196. }
  33197. }, {
  33198. key: "update",
  33199. value: function update() {
  33200. return this._send("update", Array.from(arguments));
  33201. }
  33202. }, {
  33203. key: "end",
  33204. value: function end() {
  33205. return this._send("end", Array.from(arguments));
  33206. }
  33207. }, {
  33208. key: "set",
  33209. get: function get() {
  33210. return this.isCommand ? this.getNextStageFn("set") : function () {
  33211. throw new Error("JQL禁止使用set方法");
  33212. };
  33213. }
  33214. }, {
  33215. key: "_send",
  33216. value: function _send(e, t) {
  33217. var n = this.getAction(),
  33218. s = this.getCommand();
  33219. if (s.$db.push({
  33220. $method: e,
  33221. $param: Fn(t)
  33222. }), b) {
  33223. var _e22 = s.$db.find(function (e) {
  33224. return "collection" === e.$method;
  33225. }),
  33226. _t11 = _e22 && _e22.$param;
  33227. _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- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  33228. }
  33229. return this._database._callCloudFunction({
  33230. action: n,
  33231. command: s
  33232. });
  33233. }
  33234. }]);
  33235. return Mn;
  33236. }();
  33237. function Kn(e, t, n) {
  33238. return Un(new Mn(e, t, n), {
  33239. get: function get(e, t) {
  33240. var s = "db";
  33241. return e && e.content && (s = e.content.$method), Dn(s, t) ? Kn({
  33242. $method: t
  33243. }, e, n) : function () {
  33244. return Kn({
  33245. $method: t,
  33246. $param: Fn(Array.from(arguments))
  33247. }, e, n);
  33248. };
  33249. }
  33250. });
  33251. }
  33252. function jn(_ref36) {
  33253. var e = _ref36.path,
  33254. t = _ref36.method;
  33255. return /*#__PURE__*/function () {
  33256. function _class4() {
  33257. (0, _classCallCheck2.default)(this, _class4);
  33258. this.param = Array.from(arguments);
  33259. }
  33260. (0, _createClass2.default)(_class4, [{
  33261. key: "toJSON",
  33262. value: function toJSON() {
  33263. return {
  33264. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  33265. return {
  33266. $method: e
  33267. };
  33268. })), [{
  33269. $method: t,
  33270. $param: this.param
  33271. }])
  33272. };
  33273. }
  33274. }, {
  33275. key: "toString",
  33276. value: function toString() {
  33277. return JSON.stringify(this.toJSON());
  33278. }
  33279. }]);
  33280. return _class4;
  33281. }();
  33282. }
  33283. function Bn(e) {
  33284. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  33285. return Un(new e(t), {
  33286. get: function get(e, t) {
  33287. return Dn("db", t) ? Kn({
  33288. $method: t
  33289. }, null, e) : function () {
  33290. return Kn({
  33291. $method: t,
  33292. $param: Fn(Array.from(arguments))
  33293. }, null, e);
  33294. };
  33295. }
  33296. });
  33297. }
  33298. var $n = /*#__PURE__*/function (_ref37) {
  33299. (0, _inherits2.default)($n, _ref37);
  33300. var _super11 = _createSuper($n);
  33301. function $n() {
  33302. (0, _classCallCheck2.default)(this, $n);
  33303. return _super11.apply(this, arguments);
  33304. }
  33305. (0, _createClass2.default)($n, [{
  33306. key: "_parseResult",
  33307. value: function _parseResult(e) {
  33308. return this._isJQL ? e.result : e;
  33309. }
  33310. }, {
  33311. key: "_callCloudFunction",
  33312. value: function _callCloudFunction(_ref38) {
  33313. var _this19 = this;
  33314. var e = _ref38.action,
  33315. t = _ref38.command,
  33316. n = _ref38.multiCommand,
  33317. s = _ref38.queryList;
  33318. function r(e, t) {
  33319. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  33320. var _r5 = s[_n10];
  33321. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  33322. }
  33323. }
  33324. var i = this,
  33325. o = this._isJQL ? "databaseForJQL" : "database";
  33326. function a(e) {
  33327. return i._callback("error", [e]), q(M(o, "fail"), e).then(function () {
  33328. return q(M(o, "complete"), e);
  33329. }).then(function () {
  33330. return r(null, e), Q(B, {
  33331. type: z,
  33332. content: e
  33333. }), Promise.reject(e);
  33334. });
  33335. }
  33336. var c = q(M(o, "invoke")),
  33337. u = this._uniClient;
  33338. return c.then(function () {
  33339. return u.callFunction({
  33340. name: "DCloud-clientDB",
  33341. type: l,
  33342. data: {
  33343. action: e,
  33344. command: t,
  33345. multiCommand: n
  33346. }
  33347. });
  33348. }).then(function (e) {
  33349. var _e$result = e.result,
  33350. t = _e$result.code,
  33351. n = _e$result.message,
  33352. s = _e$result.token,
  33353. c = _e$result.tokenExpired,
  33354. _e$result$systemInfo = _e$result.systemInfo,
  33355. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  33356. if (u) for (var _e23 = 0; _e23 < u.length; _e23++) {
  33357. var _u$_e = u[_e23],
  33358. _t12 = _u$_e.level,
  33359. _n11 = _u$_e.message,
  33360. _s13 = _u$_e.detail,
  33361. _r6 = console["app" === P && "warn" === _t12 ? "error" : _t12] || console.log;
  33362. var _i4 = "[System Info]" + _n11;
  33363. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  33364. }
  33365. if (t) {
  33366. return a(new ne({
  33367. code: t,
  33368. message: n,
  33369. requestId: e.requestId
  33370. }));
  33371. }
  33372. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (ie({
  33373. token: s,
  33374. tokenExpired: c
  33375. }), _this19._callbackAuth("refreshToken", [{
  33376. token: s,
  33377. tokenExpired: c
  33378. }]), _this19._callback("refreshToken", [{
  33379. token: s,
  33380. tokenExpired: c
  33381. }]), Q(W, {
  33382. token: s,
  33383. tokenExpired: c
  33384. }));
  33385. var h = [{
  33386. prop: "affectedDocs",
  33387. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  33388. }, {
  33389. prop: "code",
  33390. tips: "code不再推荐使用,请使用errCode替代"
  33391. }, {
  33392. prop: "message",
  33393. tips: "message不再推荐使用,请使用errMsg替代"
  33394. }];
  33395. var _loop2 = function _loop2(_t13) {
  33396. var _h$_t = h[_t13],
  33397. n = _h$_t.prop,
  33398. s = _h$_t.tips;
  33399. if (n in e.result) {
  33400. var _t14 = e.result[n];
  33401. Object.defineProperty(e.result, n, {
  33402. get: function get() {
  33403. return console.warn(s), _t14;
  33404. }
  33405. });
  33406. }
  33407. };
  33408. for (var _t13 = 0; _t13 < h.length; _t13++) {
  33409. _loop2(_t13);
  33410. }
  33411. return function (e) {
  33412. return q(M(o, "success"), e).then(function () {
  33413. return q(M(o, "complete"), e);
  33414. }).then(function () {
  33415. r(e, null);
  33416. var t = i._parseResult(e);
  33417. return Q(B, {
  33418. type: z,
  33419. content: t
  33420. }), Promise.resolve(t);
  33421. });
  33422. }(e);
  33423. }, function (e) {
  33424. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  33425. return a(new ne({
  33426. code: e.code || "SYSTEM_ERROR",
  33427. message: e.message,
  33428. requestId: e.requestId
  33429. }));
  33430. });
  33431. }
  33432. }]);
  33433. return $n;
  33434. }( /*#__PURE__*/function () {
  33435. function _class5() {
  33436. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33437. _ref39$uniClient = _ref39.uniClient,
  33438. e = _ref39$uniClient === void 0 ? {} : _ref39$uniClient,
  33439. _ref39$isJQL = _ref39.isJQL,
  33440. t = _ref39$isJQL === void 0 ? !1 : _ref39$isJQL;
  33441. (0, _classCallCheck2.default)(this, _class5);
  33442. 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({}, {
  33443. get: function get(e, t) {
  33444. return {
  33445. $env: t
  33446. };
  33447. }
  33448. }), this.Geo = Un({}, {
  33449. get: function get(e, t) {
  33450. return jn({
  33451. path: ["Geo"],
  33452. method: t
  33453. });
  33454. }
  33455. }), this.serverDate = jn({
  33456. path: [],
  33457. method: "serverDate"
  33458. }), this.RegExp = jn({
  33459. path: [],
  33460. method: "RegExp"
  33461. });
  33462. }
  33463. (0, _createClass2.default)(_class5, [{
  33464. key: "getCloudEnv",
  33465. value: function getCloudEnv(e) {
  33466. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  33467. return {
  33468. $env: e.replace("$cloudEnv_", "")
  33469. };
  33470. }
  33471. }, {
  33472. key: "_callback",
  33473. value: function _callback(e, t) {
  33474. var n = this._dbCallBacks;
  33475. n[e] && n[e].forEach(function (e) {
  33476. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  33477. });
  33478. }
  33479. }, {
  33480. key: "_callbackAuth",
  33481. value: function _callbackAuth(e, t) {
  33482. var n = this._authCallBacks;
  33483. n[e] && n[e].forEach(function (e) {
  33484. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  33485. });
  33486. }
  33487. }, {
  33488. key: "multiSend",
  33489. value: function multiSend() {
  33490. var e = Array.from(arguments),
  33491. t = e.map(function (e) {
  33492. var t = e.getAction(),
  33493. n = e.getCommand();
  33494. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  33495. return {
  33496. action: t,
  33497. command: n
  33498. };
  33499. });
  33500. return this._callCloudFunction({
  33501. multiCommand: t,
  33502. queryList: e
  33503. });
  33504. }
  33505. }]);
  33506. return _class5;
  33507. }());
  33508. var Wn = "token无效,跳转登录页面",
  33509. zn = "token过期,跳转登录页面",
  33510. Jn = {
  33511. TOKEN_INVALID_TOKEN_EXPIRED: zn,
  33512. TOKEN_INVALID_INVALID_CLIENTID: Wn,
  33513. TOKEN_INVALID: Wn,
  33514. TOKEN_INVALID_WRONG_TOKEN: Wn,
  33515. TOKEN_INVALID_ANONYMOUS_USER: Wn
  33516. },
  33517. Hn = {
  33518. "uni-id-token-expired": zn,
  33519. "uni-id-check-token-failed": Wn,
  33520. "uni-id-token-not-exist": Wn,
  33521. "uni-id-check-device-feature-failed": Wn
  33522. };
  33523. function Gn(e, t) {
  33524. var n = "";
  33525. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  33526. }
  33527. function Vn() {
  33528. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  33529. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  33530. var n = [],
  33531. s = [];
  33532. return e.forEach(function (e) {
  33533. !0 === e.needLogin ? n.push(Gn(t, e.path)) : !1 === e.needLogin && s.push(Gn(t, e.path));
  33534. }), {
  33535. needLoginPage: n,
  33536. notNeedLoginPage: s
  33537. };
  33538. }
  33539. function Yn(e) {
  33540. return e.split("?")[0].replace(/^\//, "");
  33541. }
  33542. function Qn() {
  33543. return function (e) {
  33544. var t = e && e.$page && e.$page.fullPath || "";
  33545. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  33546. }(function () {
  33547. var e = getCurrentPages();
  33548. return e[e.length - 1];
  33549. }());
  33550. }
  33551. function Xn() {
  33552. return Yn(Qn());
  33553. }
  33554. function Zn() {
  33555. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  33556. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  33557. if (!e) return !1;
  33558. if (!(t && t.list && t.list.length)) return !1;
  33559. var n = t.list,
  33560. s = Yn(e);
  33561. return n.some(function (e) {
  33562. return e.pagePath === s;
  33563. });
  33564. }
  33565. var es = !!_pages.default.uniIdRouter;
  33566. var _ref40 = function () {
  33567. var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  33568. _ref21$pages = _ref21.pages,
  33569. e = _ref21$pages === void 0 ? [] : _ref21$pages,
  33570. _ref21$subPackages = _ref21.subPackages,
  33571. n = _ref21$subPackages === void 0 ? [] : _ref21$subPackages,
  33572. _ref21$uniIdRouter = _ref21.uniIdRouter,
  33573. s = _ref21$uniIdRouter === void 0 ? {} : _ref21$uniIdRouter,
  33574. _ref21$tabBar = _ref21.tabBar,
  33575. r = _ref21$tabBar === void 0 ? {} : _ref21$tabBar;
  33576. var i = s.loginPage,
  33577. _s$needLogin = s.needLogin,
  33578. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  33579. _s$resToLogin = s.resToLogin,
  33580. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  33581. _Vn = Vn(e),
  33582. c = _Vn.needLoginPage,
  33583. u = _Vn.notNeedLoginPage,
  33584. _ref23 = function () {
  33585. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  33586. var t = [],
  33587. n = [];
  33588. return e.forEach(function (e) {
  33589. var s = e.root,
  33590. _e$pages = e.pages,
  33591. r = _e$pages === void 0 ? [] : _e$pages,
  33592. _Vn2 = Vn(r, s),
  33593. i = _Vn2.needLoginPage,
  33594. o = _Vn2.notNeedLoginPage;
  33595. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  33596. }), {
  33597. needLoginPage: t,
  33598. notNeedLoginPage: n
  33599. };
  33600. }(n),
  33601. h = _ref23.needLoginPage,
  33602. l = _ref23.notNeedLoginPage;
  33603. return {
  33604. loginPage: i,
  33605. routerNeedLogin: o,
  33606. resToLogin: a,
  33607. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  33608. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  33609. loginPageInTabBar: Zn(i, r)
  33610. };
  33611. }(),
  33612. ts = _ref40.loginPage,
  33613. ns = _ref40.routerNeedLogin,
  33614. ss = _ref40.resToLogin,
  33615. rs = _ref40.needLoginPage,
  33616. is = _ref40.notNeedLoginPage,
  33617. os = _ref40.loginPageInTabBar;
  33618. if (rs.indexOf(ts) > -1) throw new Error("Login page [".concat(ts, "] should not be \"needLogin\", please check your pages.json"));
  33619. function as(e) {
  33620. var t = Xn();
  33621. if ("/" === e.charAt(0)) return e;
  33622. var _e$split = e.split("?"),
  33623. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  33624. n = _e$split2[0],
  33625. s = _e$split2[1],
  33626. r = n.replace(/^\//, "").split("/"),
  33627. i = t.split("/");
  33628. i.pop();
  33629. for (var _e24 = 0; _e24 < r.length; _e24++) {
  33630. var _t15 = r[_e24];
  33631. ".." === _t15 ? i.pop() : "." !== _t15 && i.push(_t15);
  33632. }
  33633. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  33634. }
  33635. function cs(e) {
  33636. var t = Yn(as(e));
  33637. return !(is.indexOf(t) > -1) && (rs.indexOf(t) > -1 || ns.some(function (t) {
  33638. return function (e, t) {
  33639. return new RegExp(t).test(e);
  33640. }(e, t);
  33641. }));
  33642. }
  33643. function us(_ref41) {
  33644. var e = _ref41.redirect;
  33645. var t = Yn(e),
  33646. n = Yn(ts);
  33647. return Xn() !== n && t !== n;
  33648. }
  33649. function hs() {
  33650. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33651. e = _ref42.api,
  33652. t = _ref42.redirect;
  33653. if (!t || !us({
  33654. redirect: t
  33655. })) return;
  33656. var n = function (e, t) {
  33657. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  33658. }(ts, t);
  33659. os ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  33660. var s = {
  33661. navigateTo: uni.navigateTo,
  33662. redirectTo: uni.redirectTo,
  33663. switchTab: uni.switchTab,
  33664. reLaunch: uni.reLaunch
  33665. };
  33666. setTimeout(function () {
  33667. s[e]({
  33668. url: n
  33669. });
  33670. });
  33671. }
  33672. function ls() {
  33673. var _ref43 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33674. e = _ref43.url;
  33675. var t = {
  33676. abortLoginPageJump: !1,
  33677. autoToLoginPage: !1
  33678. },
  33679. n = function () {
  33680. var _re3 = re(),
  33681. e = _re3.token,
  33682. t = _re3.tokenExpired;
  33683. var n;
  33684. if (e) {
  33685. if (t < Date.now()) {
  33686. var _e25 = "uni-id-token-expired";
  33687. n = {
  33688. errCode: _e25,
  33689. errMsg: Hn[_e25]
  33690. };
  33691. }
  33692. } else {
  33693. var _e26 = "uni-id-check-token-failed";
  33694. n = {
  33695. errCode: _e26,
  33696. errMsg: Hn[_e26]
  33697. };
  33698. }
  33699. return n;
  33700. }();
  33701. if (cs(e) && n) {
  33702. n.uniIdRedirectUrl = e;
  33703. if (G($).length > 0) return setTimeout(function () {
  33704. Q($, n);
  33705. }, 0), t.abortLoginPageJump = !0, t;
  33706. t.autoToLoginPage = !0;
  33707. }
  33708. return t;
  33709. }
  33710. function ds() {
  33711. !function () {
  33712. var e = Qn(),
  33713. _ls = ls({
  33714. url: e
  33715. }),
  33716. t = _ls.abortLoginPageJump,
  33717. n = _ls.autoToLoginPage;
  33718. t || n && hs({
  33719. api: "redirectTo",
  33720. redirect: e
  33721. });
  33722. }();
  33723. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  33724. var _loop3 = function _loop3(_t16) {
  33725. var n = e[_t16];
  33726. uni.addInterceptor(n, {
  33727. invoke: function invoke(e) {
  33728. var _ls2 = ls({
  33729. url: e.url
  33730. }),
  33731. t = _ls2.abortLoginPageJump,
  33732. s = _ls2.autoToLoginPage;
  33733. return t ? e : s ? (hs({
  33734. api: n,
  33735. redirect: as(e.url)
  33736. }), !1) : e;
  33737. }
  33738. });
  33739. };
  33740. for (var _t16 = 0; _t16 < e.length; _t16++) {
  33741. _loop3(_t16);
  33742. }
  33743. }
  33744. function ps() {
  33745. this.onResponse(function (e) {
  33746. var t = e.type,
  33747. n = e.content;
  33748. var s = !1;
  33749. switch (t) {
  33750. case "cloudobject":
  33751. s = function (e) {
  33752. if ("object" != (0, _typeof2.default)(e)) return !1;
  33753. var _ref44 = e || {},
  33754. t = _ref44.errCode;
  33755. return t in Hn;
  33756. }(n);
  33757. break;
  33758. case "clientdb":
  33759. s = function (e) {
  33760. if ("object" != (0, _typeof2.default)(e)) return !1;
  33761. var _ref45 = e || {},
  33762. t = _ref45.errCode;
  33763. return t in Jn;
  33764. }(n);
  33765. }
  33766. s && function () {
  33767. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  33768. var t = G($);
  33769. ee().then(function () {
  33770. var n = Qn();
  33771. if (n && us({
  33772. redirect: n
  33773. })) return t.length > 0 ? Q($, Object.assign({
  33774. uniIdRedirectUrl: n
  33775. }, e)) : void (ts && hs({
  33776. api: "navigateTo",
  33777. redirect: n
  33778. }));
  33779. });
  33780. }(n);
  33781. });
  33782. }
  33783. function fs(e) {
  33784. !function (e) {
  33785. e.onResponse = function (e) {
  33786. V(B, e);
  33787. }, e.offResponse = function (e) {
  33788. Y(B, e);
  33789. };
  33790. }(e), function (e) {
  33791. e.onNeedLogin = function (e) {
  33792. V($, e);
  33793. }, e.offNeedLogin = function (e) {
  33794. Y($, e);
  33795. }, es && (U("_globalUniCloudStatus").needLoginInit || (U("_globalUniCloudStatus").needLoginInit = !0, ee().then(function () {
  33796. ds.call(e);
  33797. }), ss && ps.call(e)));
  33798. }(e), function (e) {
  33799. e.onRefreshToken = function (e) {
  33800. V(W, e);
  33801. }, e.offRefreshToken = function (e) {
  33802. Y(W, e);
  33803. };
  33804. }(e);
  33805. }
  33806. var gs;
  33807. var ms = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  33808. ys = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  33809. function _s() {
  33810. var e = re().token || "",
  33811. t = e.split(".");
  33812. if (!e || 3 !== t.length) return {
  33813. uid: null,
  33814. role: [],
  33815. permission: [],
  33816. tokenExpired: 0
  33817. };
  33818. var n;
  33819. try {
  33820. n = JSON.parse((s = t[1], decodeURIComponent(gs(s).split("").map(function (e) {
  33821. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  33822. }).join(""))));
  33823. } catch (e) {
  33824. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  33825. }
  33826. var s;
  33827. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  33828. }
  33829. gs = "function" != typeof atob ? function (e) {
  33830. 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.");
  33831. var t;
  33832. e += "==".slice(2 - (3 & e.length));
  33833. for (var n, s, r = "", i = 0; i < e.length;) {
  33834. 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);
  33835. }
  33836. return r;
  33837. } : atob;
  33838. var ws = s(function (e, t) {
  33839. Object.defineProperty(t, "__esModule", {
  33840. value: !0
  33841. });
  33842. var n = "chooseAndUploadFile:ok",
  33843. s = "chooseAndUploadFile:fail";
  33844. function r(e, t) {
  33845. return e.tempFiles.forEach(function (e, n) {
  33846. 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("."));
  33847. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  33848. return e.path;
  33849. })), e;
  33850. }
  33851. function i(e, t, _ref46) {
  33852. var s = _ref46.onChooseFile,
  33853. r = _ref46.onUploadProgress;
  33854. return t.then(function (e) {
  33855. if (s) {
  33856. var _t17 = s(e);
  33857. if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {
  33858. return void 0 === t ? e : t;
  33859. });
  33860. }
  33861. return e;
  33862. }).then(function (t) {
  33863. return !1 === t ? {
  33864. errMsg: n,
  33865. tempFilePaths: [],
  33866. tempFiles: []
  33867. } : function (e, t) {
  33868. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  33869. var r = arguments.length > 3 ? arguments[3] : undefined;
  33870. (t = Object.assign({}, t)).errMsg = n;
  33871. var i = t.tempFiles,
  33872. o = i.length;
  33873. var a = 0;
  33874. return new Promise(function (n) {
  33875. for (; a < s;) {
  33876. c();
  33877. }
  33878. function c() {
  33879. var s = a++;
  33880. if (s >= o) return void (!i.find(function (e) {
  33881. return !e.url && !e.errMsg;
  33882. }) && n(t));
  33883. var u = i[s];
  33884. e.uploadFile({
  33885. filePath: u.path,
  33886. cloudPath: u.cloudPath,
  33887. fileType: u.fileType,
  33888. onUploadProgress: function onUploadProgress(e) {
  33889. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  33890. }
  33891. }).then(function (e) {
  33892. u.url = e.fileID, s < o && c();
  33893. }).catch(function (e) {
  33894. u.errMsg = e.errMsg || e.message, s < o && c();
  33895. });
  33896. }
  33897. });
  33898. }(e, t, 5, r);
  33899. });
  33900. }
  33901. t.initChooseAndUploadFile = function (e) {
  33902. return function () {
  33903. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  33904. type: "all"
  33905. };
  33906. return "image" === t.type ? i(e, function (e) {
  33907. var t = e.count,
  33908. n = e.sizeType,
  33909. _e$sourceType = e.sourceType,
  33910. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  33911. o = e.extension;
  33912. return new Promise(function (e, a) {
  33913. uni.chooseImage({
  33914. count: t,
  33915. sizeType: n,
  33916. sourceType: i,
  33917. extension: o,
  33918. success: function success(t) {
  33919. e(r(t, "image"));
  33920. },
  33921. fail: function fail(e) {
  33922. a({
  33923. errMsg: e.errMsg.replace("chooseImage:fail", s)
  33924. });
  33925. }
  33926. });
  33927. });
  33928. }(t), t) : "video" === t.type ? i(e, function (e) {
  33929. var t = e.camera,
  33930. n = e.compressed,
  33931. i = e.maxDuration,
  33932. _e$sourceType2 = e.sourceType,
  33933. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  33934. a = e.extension;
  33935. return new Promise(function (e, c) {
  33936. uni.chooseVideo({
  33937. camera: t,
  33938. compressed: n,
  33939. maxDuration: i,
  33940. sourceType: o,
  33941. extension: a,
  33942. success: function success(t) {
  33943. var n = t.tempFilePath,
  33944. s = t.duration,
  33945. i = t.size,
  33946. o = t.height,
  33947. a = t.width;
  33948. e(r({
  33949. errMsg: "chooseVideo:ok",
  33950. tempFilePaths: [n],
  33951. tempFiles: [{
  33952. name: t.tempFile && t.tempFile.name || "",
  33953. path: n,
  33954. size: i,
  33955. type: t.tempFile && t.tempFile.type || "",
  33956. width: a,
  33957. height: o,
  33958. duration: s,
  33959. fileType: "video",
  33960. cloudPath: ""
  33961. }]
  33962. }, "video"));
  33963. },
  33964. fail: function fail(e) {
  33965. c({
  33966. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  33967. });
  33968. }
  33969. });
  33970. });
  33971. }(t), t) : i(e, function (e) {
  33972. var t = e.count,
  33973. n = e.extension;
  33974. return new Promise(function (e, i) {
  33975. var o = uni.chooseFile;
  33976. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  33977. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  33978. });
  33979. o({
  33980. type: "all",
  33981. count: t,
  33982. extension: n,
  33983. success: function success(t) {
  33984. e(r(t));
  33985. },
  33986. fail: function fail(e) {
  33987. i({
  33988. errMsg: e.errMsg.replace("chooseFile:fail", s)
  33989. });
  33990. }
  33991. });
  33992. });
  33993. }(t), t);
  33994. };
  33995. };
  33996. }),
  33997. vs = n(ws);
  33998. var Is = "manual";
  33999. function Ss(e) {
  34000. return {
  34001. props: {
  34002. localdata: {
  34003. type: Array,
  34004. default: function _default() {
  34005. return [];
  34006. }
  34007. },
  34008. options: {
  34009. type: [Object, Array],
  34010. default: function _default() {
  34011. return {};
  34012. }
  34013. },
  34014. spaceInfo: {
  34015. type: Object,
  34016. default: function _default() {
  34017. return {};
  34018. }
  34019. },
  34020. collection: {
  34021. type: [String, Array],
  34022. default: ""
  34023. },
  34024. action: {
  34025. type: String,
  34026. default: ""
  34027. },
  34028. field: {
  34029. type: String,
  34030. default: ""
  34031. },
  34032. orderby: {
  34033. type: String,
  34034. default: ""
  34035. },
  34036. where: {
  34037. type: [String, Object],
  34038. default: ""
  34039. },
  34040. pageData: {
  34041. type: String,
  34042. default: "add"
  34043. },
  34044. pageCurrent: {
  34045. type: Number,
  34046. default: 1
  34047. },
  34048. pageSize: {
  34049. type: Number,
  34050. default: 20
  34051. },
  34052. getcount: {
  34053. type: [Boolean, String],
  34054. default: !1
  34055. },
  34056. gettree: {
  34057. type: [Boolean, String],
  34058. default: !1
  34059. },
  34060. gettreepath: {
  34061. type: [Boolean, String],
  34062. default: !1
  34063. },
  34064. startwith: {
  34065. type: String,
  34066. default: ""
  34067. },
  34068. limitlevel: {
  34069. type: Number,
  34070. default: 10
  34071. },
  34072. groupby: {
  34073. type: String,
  34074. default: ""
  34075. },
  34076. groupField: {
  34077. type: String,
  34078. default: ""
  34079. },
  34080. distinct: {
  34081. type: [Boolean, String],
  34082. default: !1
  34083. },
  34084. foreignKey: {
  34085. type: String,
  34086. default: ""
  34087. },
  34088. loadtime: {
  34089. type: String,
  34090. default: "auto"
  34091. },
  34092. manual: {
  34093. type: Boolean,
  34094. default: !1
  34095. }
  34096. },
  34097. data: function data() {
  34098. return {
  34099. mixinDatacomLoading: !1,
  34100. mixinDatacomHasMore: !1,
  34101. mixinDatacomResData: [],
  34102. mixinDatacomErrorMessage: "",
  34103. mixinDatacomPage: {}
  34104. };
  34105. },
  34106. created: function created() {
  34107. var _this20 = this;
  34108. this.mixinDatacomPage = {
  34109. current: this.pageCurrent,
  34110. size: this.pageSize,
  34111. count: 0
  34112. }, this.$watch(function () {
  34113. var e = [];
  34114. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  34115. e.push(_this20[t]);
  34116. }), e;
  34117. }, function (e, t) {
  34118. if (_this20.loadtime === Is) return;
  34119. var n = !1;
  34120. var s = [];
  34121. for (var _r7 = 2; _r7 < e.length; _r7++) {
  34122. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  34123. }
  34124. e[0] !== t[0] && (_this20.mixinDatacomPage.current = _this20.pageCurrent), _this20.mixinDatacomPage.size = _this20.pageSize, _this20.onMixinDatacomPropsChange(n, s);
  34125. });
  34126. },
  34127. methods: {
  34128. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  34129. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  34130. var _this21 = this;
  34131. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  34132. _ref47$getone = _ref47.getone,
  34133. e = _ref47$getone === void 0 ? !1 : _ref47$getone,
  34134. t = _ref47.success,
  34135. n = _ref47.fail;
  34136. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  34137. _this21.mixinDatacomLoading = !1;
  34138. var _n$result = n.result,
  34139. s = _n$result.data,
  34140. r = _n$result.count;
  34141. _this21.getcount && (_this21.mixinDatacomPage.count = r), _this21.mixinDatacomHasMore = s.length < _this21.pageSize;
  34142. var i = e ? s.length ? s[0] : void 0 : s;
  34143. _this21.mixinDatacomResData = i, t && t(i);
  34144. }).catch(function (e) {
  34145. _this21.mixinDatacomLoading = !1, _this21.mixinDatacomErrorMessage = e, n && n(e);
  34146. }));
  34147. },
  34148. mixinDatacomGet: function mixinDatacomGet() {
  34149. var _n12;
  34150. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  34151. var n = e.database(this.spaceInfo);
  34152. var s = t.action || this.action;
  34153. s && (n = n.action(s));
  34154. var r = t.collection || this.collection;
  34155. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  34156. var i = t.where || this.where;
  34157. i && Object.keys(i).length && (n = n.where(i));
  34158. var o = t.field || this.field;
  34159. o && (n = n.field(o));
  34160. var a = t.foreignKey || this.foreignKey;
  34161. a && (n = n.foreignKey(a));
  34162. var c = t.groupby || this.groupby;
  34163. c && (n = n.groupBy(c));
  34164. var u = t.groupField || this.groupField;
  34165. u && (n = n.groupField(u));
  34166. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  34167. var h = t.orderby || this.orderby;
  34168. h && (n = n.orderBy(h));
  34169. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  34170. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  34171. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  34172. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  34173. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  34174. m = {
  34175. getCount: p
  34176. },
  34177. y = {
  34178. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  34179. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  34180. };
  34181. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  34182. }
  34183. }
  34184. };
  34185. }
  34186. function bs(e) {
  34187. return function (t) {
  34188. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  34189. n = function (e) {
  34190. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  34191. 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;
  34192. }({
  34193. customUI: !1,
  34194. loadingOptions: {
  34195. title: "加载中...",
  34196. mask: !0
  34197. },
  34198. errorOptions: {
  34199. type: "modal",
  34200. retry: !1
  34201. }
  34202. }, n);
  34203. var _n13 = n,
  34204. s = _n13.customUI,
  34205. r = _n13.loadingOptions,
  34206. i = _n13.errorOptions,
  34207. o = _n13.parseSystemError,
  34208. a = !s;
  34209. return new Proxy({}, {
  34210. get: function get(s, c) {
  34211. return function () {
  34212. var _ref48 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  34213. e = _ref48.fn,
  34214. t = _ref48.interceptorName,
  34215. n = _ref48.getCallbackArgs;
  34216. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  34217. var _len2,
  34218. s,
  34219. _key2,
  34220. r,
  34221. i,
  34222. o,
  34223. _args = arguments;
  34224. return _regenerator.default.wrap(function _callee50$(_context50) {
  34225. while (1) {
  34226. switch (_context50.prev = _context50.next) {
  34227. case 0:
  34228. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  34229. s[_key2] = _args[_key2];
  34230. }
  34231. r = n ? n({
  34232. params: s
  34233. }) : {};
  34234. _context50.prev = 2;
  34235. _context50.next = 5;
  34236. return q(M(t, "invoke"), _objectSpread({}, r));
  34237. case 5:
  34238. _context50.next = 7;
  34239. return e.apply(void 0, s);
  34240. case 7:
  34241. i = _context50.sent;
  34242. _context50.next = 10;
  34243. return q(M(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  34244. result: i
  34245. }));
  34246. case 10:
  34247. return _context50.abrupt("return", i);
  34248. case 13:
  34249. _context50.prev = 13;
  34250. _context50.t0 = _context50["catch"](2);
  34251. o = _context50.t0;
  34252. _context50.next = 18;
  34253. return q(M(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  34254. error: o
  34255. }));
  34256. case 18:
  34257. throw o;
  34258. case 19:
  34259. _context50.prev = 19;
  34260. _context50.next = 22;
  34261. return q(M(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  34262. error: o
  34263. }) : _objectSpread(_objectSpread({}, r), {}, {
  34264. result: i
  34265. }));
  34266. case 22:
  34267. return _context50.finish(19);
  34268. case 23:
  34269. case "end":
  34270. return _context50.stop();
  34271. }
  34272. }
  34273. }, _callee50, null, [[2, 13, 19, 23]]);
  34274. }));
  34275. }({
  34276. fn: function () {
  34277. var _s14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  34278. var l,
  34279. _len3,
  34280. u,
  34281. _key3,
  34282. d,
  34283. p,
  34284. _ref50,
  34285. f,
  34286. g,
  34287. m,
  34288. y,
  34289. _e27,
  34290. _yield,
  34291. _t18,
  34292. _n14,
  34293. _args4 = arguments;
  34294. return _regenerator.default.wrap(function _callee52$(_context52) {
  34295. while (1) {
  34296. switch (_context52.prev = _context52.next) {
  34297. case 0:
  34298. a && uni.showLoading({
  34299. title: r.title,
  34300. mask: r.mask
  34301. });
  34302. for (_len3 = _args4.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  34303. u[_key3] = _args4[_key3];
  34304. }
  34305. d = {
  34306. name: t,
  34307. type: h,
  34308. data: {
  34309. method: c,
  34310. params: u
  34311. }
  34312. };
  34313. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  34314. var n = t.data.method,
  34315. s = e.secretMethods || {},
  34316. r = s[n] || s["*"];
  34317. r && (t.secretType = r);
  34318. }(n, d);
  34319. p = !1;
  34320. _context52.prev = 5;
  34321. _context52.next = 8;
  34322. return e.callFunction(d);
  34323. case 8:
  34324. l = _context52.sent;
  34325. _context52.next = 14;
  34326. break;
  34327. case 11:
  34328. _context52.prev = 11;
  34329. _context52.t0 = _context52["catch"](5);
  34330. p = !0, l = {
  34331. result: new ne(_context52.t0)
  34332. };
  34333. case 14:
  34334. _ref50 = l.result || {}, f = _ref50.errSubject, g = _ref50.errCode, m = _ref50.errMsg, y = _ref50.newToken;
  34335. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (ie(y), Q(W, _objectSpread({}, y))), g)) {
  34336. _context52.next = 39;
  34337. break;
  34338. }
  34339. _e27 = m;
  34340. if (!(p && o)) {
  34341. _context52.next = 24;
  34342. break;
  34343. }
  34344. _context52.next = 20;
  34345. return o({
  34346. objectName: t,
  34347. methodName: c,
  34348. params: u,
  34349. errSubject: f,
  34350. errCode: g,
  34351. errMsg: m
  34352. });
  34353. case 20:
  34354. _context52.t1 = _context52.sent.errMsg;
  34355. if (_context52.t1) {
  34356. _context52.next = 23;
  34357. break;
  34358. }
  34359. _context52.t1 = m;
  34360. case 23:
  34361. _e27 = _context52.t1;
  34362. case 24:
  34363. if (!a) {
  34364. _context52.next = 37;
  34365. break;
  34366. }
  34367. if (!("toast" === i.type)) {
  34368. _context52.next = 29;
  34369. break;
  34370. }
  34371. uni.showToast({
  34372. title: _e27,
  34373. icon: "none"
  34374. });
  34375. _context52.next = 37;
  34376. break;
  34377. case 29:
  34378. if (!("modal" !== i.type)) {
  34379. _context52.next = 31;
  34380. break;
  34381. }
  34382. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  34383. case 31:
  34384. _context52.next = 33;
  34385. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  34386. var _ref52,
  34387. e,
  34388. t,
  34389. n,
  34390. s,
  34391. r,
  34392. _args2 = arguments;
  34393. return _regenerator.default.wrap(function _callee51$(_context51) {
  34394. while (1) {
  34395. switch (_context51.prev = _context51.next) {
  34396. case 0:
  34397. _ref52 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref52.title, t = _ref52.content, n = _ref52.showCancel, s = _ref52.cancelText, r = _ref52.confirmText;
  34398. return _context51.abrupt("return", new Promise(function (i, o) {
  34399. uni.showModal({
  34400. title: e,
  34401. content: t,
  34402. showCancel: n,
  34403. cancelText: s,
  34404. confirmText: r,
  34405. success: function success(e) {
  34406. i(e);
  34407. },
  34408. fail: function fail() {
  34409. i({
  34410. confirm: !1,
  34411. cancel: !0
  34412. });
  34413. }
  34414. });
  34415. }));
  34416. case 2:
  34417. case "end":
  34418. return _context51.stop();
  34419. }
  34420. }
  34421. }, _callee51);
  34422. }))({
  34423. title: "提示",
  34424. content: _e27,
  34425. showCancel: i.retry,
  34426. cancelText: "取消",
  34427. confirmText: i.retry ? "重试" : "确定"
  34428. });
  34429. case 33:
  34430. _yield = _context52.sent;
  34431. _t18 = _yield.confirm;
  34432. if (!(i.retry && _t18)) {
  34433. _context52.next = 37;
  34434. break;
  34435. }
  34436. return _context52.abrupt("return", s.apply(void 0, u));
  34437. case 37:
  34438. _n14 = new ne({
  34439. subject: f,
  34440. code: g,
  34441. message: m,
  34442. requestId: l.requestId
  34443. });
  34444. throw _n14.detail = l.result, Q(B, {
  34445. type: H,
  34446. content: _n14
  34447. }), _n14;
  34448. case 39:
  34449. return _context52.abrupt("return", (Q(B, {
  34450. type: H,
  34451. content: l.result
  34452. }), l.result));
  34453. case 40:
  34454. case "end":
  34455. return _context52.stop();
  34456. }
  34457. }
  34458. }, _callee52, null, [[5, 11]]);
  34459. }));
  34460. function s() {
  34461. return _s14.apply(this, arguments);
  34462. }
  34463. return s;
  34464. }(),
  34465. interceptorName: "callObject",
  34466. getCallbackArgs: function getCallbackArgs() {
  34467. var _ref53 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  34468. e = _ref53.params;
  34469. return {
  34470. objectName: t,
  34471. methodName: c,
  34472. params: e
  34473. };
  34474. }
  34475. });
  34476. }
  34477. });
  34478. };
  34479. }
  34480. function ks(e) {
  34481. return U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  34482. }
  34483. function Cs() {
  34484. return _Cs.apply(this, arguments);
  34485. }
  34486. function _Cs() {
  34487. _Cs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  34488. var _ref65,
  34489. e,
  34490. _ref65$callLoginByWei,
  34491. t,
  34492. n,
  34493. s,
  34494. r,
  34495. _args7 = arguments;
  34496. return _regenerator.default.wrap(function _callee55$(_context55) {
  34497. while (1) {
  34498. switch (_context55.prev = _context55.next) {
  34499. case 0:
  34500. _ref65 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref65.openid, _ref65$callLoginByWei = _ref65.callLoginByWeixin, t = _ref65$callLoginByWei === void 0 ? !1 : _ref65$callLoginByWei;
  34501. n = ks(this);
  34502. if (!("mp-weixin" !== P)) {
  34503. _context55.next = 4;
  34504. break;
  34505. }
  34506. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(P, "`"));
  34507. case 4:
  34508. if (!(e && t)) {
  34509. _context55.next = 6;
  34510. break;
  34511. }
  34512. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  34513. case 6:
  34514. if (!e) {
  34515. _context55.next = 8;
  34516. break;
  34517. }
  34518. return _context55.abrupt("return", (n.mpWeixinOpenid = e, {}));
  34519. case 8:
  34520. _context55.next = 10;
  34521. return new Promise(function (e, t) {
  34522. uni.login({
  34523. success: function success(t) {
  34524. e(t.code);
  34525. },
  34526. fail: function fail(e) {
  34527. t(new Error(e.errMsg));
  34528. }
  34529. });
  34530. });
  34531. case 10:
  34532. s = _context55.sent;
  34533. r = this.importObject("uni-id-co", {
  34534. customUI: !0
  34535. });
  34536. _context55.next = 14;
  34537. return r.secureNetworkHandshakeByWeixin({
  34538. code: s,
  34539. callLoginByWeixin: t
  34540. });
  34541. case 14:
  34542. n.mpWeixinCode = s;
  34543. return _context55.abrupt("return", {
  34544. code: s
  34545. });
  34546. case 16:
  34547. case "end":
  34548. return _context55.stop();
  34549. }
  34550. }
  34551. }, _callee55, this);
  34552. }));
  34553. return _Cs.apply(this, arguments);
  34554. }
  34555. function Ts(_x37) {
  34556. return _Ts.apply(this, arguments);
  34557. }
  34558. function _Ts() {
  34559. _Ts = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56(e) {
  34560. var t;
  34561. return _regenerator.default.wrap(function _callee56$(_context56) {
  34562. while (1) {
  34563. switch (_context56.prev = _context56.next) {
  34564. case 0:
  34565. t = ks(this);
  34566. return _context56.abrupt("return", (t.initPromise || (t.initPromise = Cs.call(this, e)), t.initPromise));
  34567. case 2:
  34568. case "end":
  34569. return _context56.stop();
  34570. }
  34571. }
  34572. }, _callee56, this);
  34573. }));
  34574. return _Ts.apply(this, arguments);
  34575. }
  34576. function Ps(e) {
  34577. return function () {
  34578. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  34579. t = _ref54.openid,
  34580. _ref54$callLoginByWei = _ref54.callLoginByWeixin,
  34581. n = _ref54$callLoginByWei === void 0 ? !1 : _ref54$callLoginByWei;
  34582. return Ts.call(e, {
  34583. openid: t,
  34584. callLoginByWeixin: n
  34585. });
  34586. };
  34587. }
  34588. function As(e) {
  34589. var t = {
  34590. getSystemInfo: uni.getSystemInfo,
  34591. getPushClientId: uni.getPushClientId
  34592. };
  34593. return function (n) {
  34594. return new Promise(function (s, r) {
  34595. t[e](_objectSpread(_objectSpread({}, n), {}, {
  34596. success: function success(e) {
  34597. s(e);
  34598. },
  34599. fail: function fail(e) {
  34600. r(e);
  34601. }
  34602. }));
  34603. });
  34604. };
  34605. }
  34606. var Es = /*#__PURE__*/function (_ref55) {
  34607. (0, _inherits2.default)(Es, _ref55);
  34608. var _super12 = _createSuper(Es);
  34609. function Es() {
  34610. var _this22;
  34611. (0, _classCallCheck2.default)(this, Es);
  34612. _this22 = _super12.call(this), _this22._uniPushMessageCallback = _this22._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this22)), _this22._currentMessageId = -1, _this22._payloadQueue = [];
  34613. return _this22;
  34614. }
  34615. (0, _createClass2.default)(Es, [{
  34616. key: "init",
  34617. value: function init() {
  34618. var _this23 = this;
  34619. return Promise.all([As("getSystemInfo")(), As("getPushClientId")()]).then(function () {
  34620. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  34621. _ref57 = (0, _slicedToArray2.default)(_ref56, 2),
  34622. _ref57$ = _ref57[0];
  34623. _ref57$ = _ref57$ === void 0 ? {} : _ref57$;
  34624. var e = _ref57$.appId,
  34625. _ref57$2 = _ref57[1];
  34626. _ref57$2 = _ref57$2 === void 0 ? {} : _ref57$2;
  34627. var t = _ref57$2.cid;
  34628. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  34629. if (!t) throw new Error("Invalid push client id");
  34630. _this23._appId = e, _this23._pushClientId = t, _this23._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this23.emit("open"), _this23._initMessageListener();
  34631. }, function (e) {
  34632. throw _this23.emit("error", e), _this23.close(), e;
  34633. });
  34634. }
  34635. }, {
  34636. key: "open",
  34637. value: function () {
  34638. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  34639. return _regenerator.default.wrap(function _callee53$(_context53) {
  34640. while (1) {
  34641. switch (_context53.prev = _context53.next) {
  34642. case 0:
  34643. return _context53.abrupt("return", this.init());
  34644. case 1:
  34645. case "end":
  34646. return _context53.stop();
  34647. }
  34648. }
  34649. }, _callee53, this);
  34650. }));
  34651. function open() {
  34652. return _open.apply(this, arguments);
  34653. }
  34654. return open;
  34655. }()
  34656. }, {
  34657. key: "_isUniCloudSSE",
  34658. value: function _isUniCloudSSE(e) {
  34659. if ("receive" !== e.type) return !1;
  34660. var t = e && e.data && e.data.payload;
  34661. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  34662. }
  34663. }, {
  34664. key: "_receivePushMessage",
  34665. value: function _receivePushMessage(e) {
  34666. if (!this._isUniCloudSSE(e)) return;
  34667. var t = e && e.data && e.data.payload,
  34668. n = t.action,
  34669. s = t.messageId,
  34670. r = t.message;
  34671. this._payloadQueue.push({
  34672. action: n,
  34673. messageId: s,
  34674. message: r
  34675. }), this._consumMessage();
  34676. }
  34677. }, {
  34678. key: "_consumMessage",
  34679. value: function _consumMessage() {
  34680. var _this24 = this;
  34681. for (;;) {
  34682. var _e28 = this._payloadQueue.find(function (e) {
  34683. return e.messageId === _this24._currentMessageId + 1;
  34684. });
  34685. if (!_e28) break;
  34686. this._currentMessageId++, this._parseMessagePayload(_e28);
  34687. }
  34688. }
  34689. }, {
  34690. key: "_parseMessagePayload",
  34691. value: function _parseMessagePayload(e) {
  34692. var t = e.action,
  34693. n = e.messageId,
  34694. s = e.message;
  34695. "end" === t ? this._end({
  34696. messageId: n,
  34697. message: s
  34698. }) : "message" === t && this._appendMessage({
  34699. messageId: n,
  34700. message: s
  34701. });
  34702. }
  34703. }, {
  34704. key: "_appendMessage",
  34705. value: function _appendMessage() {
  34706. var _ref58 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  34707. e = _ref58.messageId,
  34708. t = _ref58.message;
  34709. this.emit("message", t);
  34710. }
  34711. }, {
  34712. key: "_end",
  34713. value: function _end() {
  34714. var _ref59 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  34715. e = _ref59.messageId,
  34716. t = _ref59.message;
  34717. this.emit("end", t), this.close();
  34718. }
  34719. }, {
  34720. key: "_initMessageListener",
  34721. value: function _initMessageListener() {
  34722. uni.onPushMessage(this._uniPushMessageCallback);
  34723. }
  34724. }, {
  34725. key: "_destroy",
  34726. value: function _destroy() {
  34727. uni.offPushMessage(this._uniPushMessageCallback);
  34728. }
  34729. }, {
  34730. key: "toJSON",
  34731. value: function toJSON() {
  34732. return {
  34733. appId: this._appId,
  34734. pushClientId: this._pushClientId,
  34735. seqId: this._seqId
  34736. };
  34737. }
  34738. }, {
  34739. key: "close",
  34740. value: function close() {
  34741. this._destroy(), this.emit("close");
  34742. }
  34743. }]);
  34744. return Es;
  34745. }( /*#__PURE__*/function () {
  34746. function _class6() {
  34747. (0, _classCallCheck2.default)(this, _class6);
  34748. this._callback = {};
  34749. }
  34750. (0, _createClass2.default)(_class6, [{
  34751. key: "addListener",
  34752. value: function addListener(e, t) {
  34753. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  34754. }
  34755. }, {
  34756. key: "on",
  34757. value: function on(e, t) {
  34758. return this.addListener(e, t);
  34759. }
  34760. }, {
  34761. key: "removeListener",
  34762. value: function removeListener(e, t) {
  34763. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  34764. var n = this._callback[e];
  34765. if (!n) return;
  34766. var s = function (e, t) {
  34767. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  34768. if (e[_n15] === t) return _n15;
  34769. }
  34770. return -1;
  34771. }(n, t);
  34772. n.splice(s, 1);
  34773. }
  34774. }, {
  34775. key: "off",
  34776. value: function off(e, t) {
  34777. return this.removeListener(e, t);
  34778. }
  34779. }, {
  34780. key: "removeAllListener",
  34781. value: function removeAllListener(e) {
  34782. delete this._callback[e];
  34783. }
  34784. }, {
  34785. key: "emit",
  34786. value: function emit(e) {
  34787. var n = this._callback[e];
  34788. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  34789. t[_key4 - 1] = arguments[_key4];
  34790. }
  34791. if (n) for (var _e29 = 0; _e29 < n.length; _e29++) {
  34792. n[_e29].apply(n, t);
  34793. }
  34794. }
  34795. }]);
  34796. return _class6;
  34797. }());
  34798. function Os(_x38, _x39) {
  34799. return _Os.apply(this, arguments);
  34800. }
  34801. function _Os() {
  34802. _Os = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(e, t) {
  34803. var n, _e33, s;
  34804. return _regenerator.default.wrap(function _callee57$(_context57) {
  34805. while (1) {
  34806. switch (_context57.prev = _context57.next) {
  34807. case 0:
  34808. n = "http://".concat(e, ":").concat(t, "/system/ping");
  34809. _context57.prev = 1;
  34810. _context57.next = 4;
  34811. return s = {
  34812. url: n,
  34813. timeout: 500
  34814. }, new Promise(function (e, t) {
  34815. se.request(_objectSpread(_objectSpread({}, s), {}, {
  34816. success: function success(t) {
  34817. e(t);
  34818. },
  34819. fail: function fail(e) {
  34820. t(e);
  34821. }
  34822. }));
  34823. });
  34824. case 4:
  34825. _e33 = _context57.sent;
  34826. return _context57.abrupt("return", !(!_e33.data || 0 !== _e33.data.code));
  34827. case 8:
  34828. _context57.prev = 8;
  34829. _context57.t0 = _context57["catch"](1);
  34830. return _context57.abrupt("return", !1);
  34831. case 11:
  34832. case "end":
  34833. return _context57.stop();
  34834. }
  34835. }
  34836. }, _callee57, null, [[1, 8]]);
  34837. }));
  34838. return _Os.apply(this, arguments);
  34839. }
  34840. function xs(_x40) {
  34841. return _xs.apply(this, arguments);
  34842. }
  34843. function _xs() {
  34844. _xs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  34845. var _ce2, _e34, _t20, t, _t$debugInfo, n, s, _yield2, r, i, o;
  34846. return _regenerator.default.wrap(function _callee59$(_context59) {
  34847. while (1) {
  34848. switch (_context59.prev = _context59.next) {
  34849. case 0:
  34850. if (b) {
  34851. _context59.next = 2;
  34852. break;
  34853. }
  34854. return _context59.abrupt("return", Promise.resolve());
  34855. case 2:
  34856. if ("app" === P) {
  34857. _ce2 = ce(), _e34 = _ce2.osName, _t20 = _ce2.osVersion;
  34858. "ios" === _e34 && function (e) {
  34859. if (!e || "string" != typeof e) return 0;
  34860. var t = e.match(/^(\d+)./);
  34861. return t && t[1] ? parseInt(t[1]) : 0;
  34862. }(_t20) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  34863. }
  34864. t = e.__dev__;
  34865. if (t.debugInfo) {
  34866. _context59.next = 6;
  34867. break;
  34868. }
  34869. return _context59.abrupt("return");
  34870. case 6:
  34871. _t$debugInfo = t.debugInfo;
  34872. n = _t$debugInfo.address;
  34873. s = _t$debugInfo.servePort;
  34874. _context59.next = 11;
  34875. return function () {
  34876. var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e, t) {
  34877. var n, _s15, _r8;
  34878. return _regenerator.default.wrap(function _callee58$(_context58) {
  34879. while (1) {
  34880. switch (_context58.prev = _context58.next) {
  34881. case 0:
  34882. _s15 = 0;
  34883. case 1:
  34884. if (!(_s15 < e.length)) {
  34885. _context58.next = 11;
  34886. break;
  34887. }
  34888. _r8 = e[_s15];
  34889. _context58.next = 5;
  34890. return Os(_r8, t);
  34891. case 5:
  34892. if (!_context58.sent) {
  34893. _context58.next = 8;
  34894. break;
  34895. }
  34896. n = _r8;
  34897. return _context58.abrupt("break", 11);
  34898. case 8:
  34899. _s15++;
  34900. _context58.next = 1;
  34901. break;
  34902. case 11:
  34903. return _context58.abrupt("return", {
  34904. address: n,
  34905. port: t
  34906. });
  34907. case 12:
  34908. case "end":
  34909. return _context58.stop();
  34910. }
  34911. }
  34912. }, _callee58);
  34913. }));
  34914. return function (_x41, _x42) {
  34915. return _ref66.apply(this, arguments);
  34916. };
  34917. }()(n, s);
  34918. case 11:
  34919. _yield2 = _context59.sent;
  34920. r = _yield2.address;
  34921. if (!r) {
  34922. _context59.next = 15;
  34923. break;
  34924. }
  34925. return _context59.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  34926. case 15:
  34927. i = console["app" === P ? "error" : "warn"];
  34928. o = "";
  34929. 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)) {
  34930. _context59.next = 19;
  34931. break;
  34932. }
  34933. throw new Error(o);
  34934. case 19:
  34935. i(o);
  34936. case 20:
  34937. case "end":
  34938. return _context59.stop();
  34939. }
  34940. }
  34941. }, _callee59);
  34942. }));
  34943. return _xs.apply(this, arguments);
  34944. }
  34945. function Rs(e) {
  34946. e._initPromiseHub || (e._initPromiseHub = new I({
  34947. createPromise: function createPromise() {
  34948. var t = Promise.resolve();
  34949. var n;
  34950. n = 1, t = new Promise(function (e) {
  34951. setTimeout(function () {
  34952. e();
  34953. }, n);
  34954. });
  34955. var s = e.auth();
  34956. return t.then(function () {
  34957. return s.getLoginState();
  34958. }).then(function (e) {
  34959. return e ? Promise.resolve() : s.signInAnonymously();
  34960. });
  34961. }
  34962. }));
  34963. }
  34964. var Us = {
  34965. tcb: It,
  34966. tencent: It,
  34967. aliyun: ge,
  34968. private: bt
  34969. };
  34970. var Ls = new ( /*#__PURE__*/function () {
  34971. function _class7() {
  34972. (0, _classCallCheck2.default)(this, _class7);
  34973. }
  34974. (0, _createClass2.default)(_class7, [{
  34975. key: "init",
  34976. value: function init(e) {
  34977. var t = {};
  34978. var n = Us[e.provider];
  34979. if (!n) throw new Error("未提供正确的provider参数");
  34980. t = n.init(e), b && function (e) {
  34981. if (!b) return;
  34982. var t = {};
  34983. e.__dev__ = t, t.debugLog = b && ("web" === P && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === P);
  34984. var n = A;
  34985. n && !n.code && (t.debugInfo = n);
  34986. var s = new I({
  34987. createPromise: function createPromise() {
  34988. return xs(e);
  34989. }
  34990. });
  34991. t.initLocalNetwork = function () {
  34992. return s.exec();
  34993. };
  34994. }(t), Rs(t), xn(t), function (e) {
  34995. var t = e.uploadFile;
  34996. e.uploadFile = function (e) {
  34997. return t.call(this, e);
  34998. };
  34999. }(t), function (e) {
  35000. e.database = function (t) {
  35001. if (t && Object.keys(t).length > 0) return e.init(t).database();
  35002. if (this._database) return this._database;
  35003. var n = Bn($n, {
  35004. uniClient: e
  35005. });
  35006. return this._database = n, n;
  35007. }, e.databaseForJQL = function (t) {
  35008. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  35009. if (this._databaseForJQL) return this._databaseForJQL;
  35010. var n = Bn($n, {
  35011. uniClient: e,
  35012. isJQL: !0
  35013. });
  35014. return this._databaseForJQL = n, n;
  35015. };
  35016. }(t), function (e) {
  35017. e.getCurrentUserInfo = _s, e.chooseAndUploadFile = vs.initChooseAndUploadFile(e), Object.assign(e, {
  35018. get mixinDatacom() {
  35019. return Ss(e);
  35020. }
  35021. }), e.SSEChannel = Es, e.initSecureNetworkByWeixin = Ps(e), e.importObject = bs(e);
  35022. }(t);
  35023. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  35024. if (!t[e]) return;
  35025. var n = t[e];
  35026. t[e] = function () {
  35027. return n.apply(t, Array.from(arguments));
  35028. }, t[e] = function (e, t) {
  35029. return function (n) {
  35030. var _this25 = this;
  35031. var s = !1;
  35032. if ("callFunction" === t) {
  35033. var _e30 = n && n.type || u;
  35034. s = _e30 !== u;
  35035. }
  35036. var r = "callFunction" === t && !s,
  35037. i = this._initPromiseHub.exec();
  35038. n = n || {};
  35039. var _te2 = te(n),
  35040. o = _te2.success,
  35041. a = _te2.fail,
  35042. c = _te2.complete,
  35043. h = i.then(function () {
  35044. return s ? Promise.resolve() : q(M(t, "invoke"), n);
  35045. }).then(function () {
  35046. return e.call(_this25, n);
  35047. }).then(function (e) {
  35048. return s ? Promise.resolve(e) : q(M(t, "success"), e).then(function () {
  35049. return q(M(t, "complete"), e);
  35050. }).then(function () {
  35051. return r && Q(B, {
  35052. type: J,
  35053. content: e
  35054. }), Promise.resolve(e);
  35055. });
  35056. }, function (e) {
  35057. return s ? Promise.reject(e) : q(M(t, "fail"), e).then(function () {
  35058. return q(M(t, "complete"), e);
  35059. }).then(function () {
  35060. return Q(B, {
  35061. type: J,
  35062. content: e
  35063. }), Promise.reject(e);
  35064. });
  35065. });
  35066. if (!(o || a || c)) return h;
  35067. h.then(function (e) {
  35068. o && o(e), c && c(e), r && Q(B, {
  35069. type: J,
  35070. content: e
  35071. });
  35072. }, function (e) {
  35073. a && a(e), c && c(e), r && Q(B, {
  35074. type: J,
  35075. content: e
  35076. });
  35077. });
  35078. };
  35079. }(t[e], e).bind(t);
  35080. }), t.init = this.init, t;
  35081. }
  35082. }]);
  35083. return _class7;
  35084. }())();
  35085. (function () {
  35086. var e = E;
  35087. var t = {};
  35088. if (e && 1 === e.length) t = e[0], Ls = Ls.init(t), Ls._isDefault = !0;else {
  35089. var _t19 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  35090. var _n16;
  35091. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : O ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t19.forEach(function (e) {
  35092. Ls[e] = function () {
  35093. return console.error(_n16), Promise.reject(new ne({
  35094. code: "SYS_ERR",
  35095. message: _n16
  35096. }));
  35097. };
  35098. });
  35099. }
  35100. Object.assign(Ls, {
  35101. get mixinDatacom() {
  35102. return Ss(Ls);
  35103. }
  35104. }), fs(Ls), Ls.addInterceptor = D, Ls.removeInterceptor = F, Ls.interceptObject = K, b && "web" === P && (window.uniCloud = Ls);
  35105. })();
  35106. var Ns = Ls;
  35107. exports.default = Ns;
  35108. /* 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"]))
  35109. /***/ }),
  35110. /***/ 503:
  35111. /*!**********************************************************************!*\
  35112. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  35113. \**********************************************************************/
  35114. /*! no static exports found */
  35115. /***/ (function(module, exports) {
  35116. function _assertThisInitialized(self) {
  35117. if (self === void 0) {
  35118. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  35119. }
  35120. return self;
  35121. }
  35122. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35123. /***/ }),
  35124. /***/ 504:
  35125. /*!*********************************************************!*\
  35126. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  35127. \*********************************************************/
  35128. /*! no static exports found */
  35129. /***/ (function(module, exports, __webpack_require__) {
  35130. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  35131. function _inherits(subClass, superClass) {
  35132. if (typeof superClass !== "function" && superClass !== null) {
  35133. throw new TypeError("Super expression must either be null or a function");
  35134. }
  35135. subClass.prototype = Object.create(superClass && superClass.prototype, {
  35136. constructor: {
  35137. value: subClass,
  35138. writable: true,
  35139. configurable: true
  35140. }
  35141. });
  35142. Object.defineProperty(subClass, "prototype", {
  35143. writable: false
  35144. });
  35145. if (superClass) setPrototypeOf(subClass, superClass);
  35146. }
  35147. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35148. /***/ }),
  35149. /***/ 505:
  35150. /*!**************************************************************************!*\
  35151. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  35152. \**************************************************************************/
  35153. /*! no static exports found */
  35154. /***/ (function(module, exports, __webpack_require__) {
  35155. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  35156. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 503);
  35157. function _possibleConstructorReturn(self, call) {
  35158. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  35159. return call;
  35160. } else if (call !== void 0) {
  35161. throw new TypeError("Derived constructors may only return object or undefined");
  35162. }
  35163. return assertThisInitialized(self);
  35164. }
  35165. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35166. /***/ }),
  35167. /***/ 506:
  35168. /*!***************************************************************!*\
  35169. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  35170. \***************************************************************/
  35171. /*! no static exports found */
  35172. /***/ (function(module, exports) {
  35173. function _getPrototypeOf(o) {
  35174. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  35175. return o.__proto__ || Object.getPrototypeOf(o);
  35176. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35177. return _getPrototypeOf(o);
  35178. }
  35179. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35180. /***/ }),
  35181. /***/ 507:
  35182. /*!****************************************************************!*\
  35183. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  35184. \****************************************************************/
  35185. /*! no static exports found */
  35186. /***/ (function(module, exports, __webpack_require__) {
  35187. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 506);
  35188. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  35189. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 508);
  35190. var construct = __webpack_require__(/*! ./construct.js */ 15);
  35191. function _wrapNativeSuper(Class) {
  35192. var _cache = typeof Map === "function" ? new Map() : undefined;
  35193. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  35194. if (Class === null || !isNativeFunction(Class)) return Class;
  35195. if (typeof Class !== "function") {
  35196. throw new TypeError("Super expression must either be null or a function");
  35197. }
  35198. if (typeof _cache !== "undefined") {
  35199. if (_cache.has(Class)) return _cache.get(Class);
  35200. _cache.set(Class, Wrapper);
  35201. }
  35202. function Wrapper() {
  35203. return construct(Class, arguments, getPrototypeOf(this).constructor);
  35204. }
  35205. Wrapper.prototype = Object.create(Class.prototype, {
  35206. constructor: {
  35207. value: Wrapper,
  35208. enumerable: false,
  35209. writable: true,
  35210. configurable: true
  35211. }
  35212. });
  35213. return setPrototypeOf(Wrapper, Class);
  35214. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35215. return _wrapNativeSuper(Class);
  35216. }
  35217. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35218. /***/ }),
  35219. /***/ 508:
  35220. /*!*****************************************************************!*\
  35221. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  35222. \*****************************************************************/
  35223. /*! no static exports found */
  35224. /***/ (function(module, exports) {
  35225. function _isNativeFunction(fn) {
  35226. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  35227. }
  35228. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35229. /***/ }),
  35230. /***/ 509:
  35231. /*!**************************************************************************!*\
  35232. !*** E:/Desktop/zd_wechatApp(1)/pages.json?{"type":"origin-pages-json"} ***!
  35233. \**************************************************************************/
  35234. /*! no static exports found */
  35235. /***/ (function(module, exports, __webpack_require__) {
  35236. "use strict";
  35237. Object.defineProperty(exports, "__esModule", {
  35238. value: true
  35239. });
  35240. exports.default = void 0;
  35241. var _default = {
  35242. "easycom": {
  35243. "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
  35244. },
  35245. "pages": [{
  35246. "path": "pages/login/login",
  35247. "style": {
  35248. "navigationStyle": "custom"
  35249. }
  35250. }, {
  35251. "path": "pages/noLogin/PressureRegulatingBox/PressureRegulatingBox",
  35252. "style": {
  35253. "navigationBarTitleText": "",
  35254. "enablePullDownRefresh": false
  35255. }
  35256. }, {
  35257. "path": "pages/index/index",
  35258. "style": {
  35259. "navigationStyle": "custom"
  35260. }
  35261. }, {
  35262. "path": "pages/noLogin/uploadProject",
  35263. "style": {
  35264. "navigationStyle": "custom"
  35265. }
  35266. }, {
  35267. "path": "pages/noLogin/typeList",
  35268. "style": {
  35269. "navigationStyle": "custom"
  35270. }
  35271. }, {
  35272. "path": "pages/noLogin/communitylist",
  35273. "style": {
  35274. "navigationBarTitleText": "",
  35275. "enablePullDownRefresh": false
  35276. }
  35277. }, {
  35278. "path": "pages/noLogin/buildinglist",
  35279. "style": {
  35280. "navigationStyle": "custom"
  35281. }
  35282. }, {
  35283. "path": "pages/noLogin/unitlist",
  35284. "style": {
  35285. "navigationStyle": "custom"
  35286. }
  35287. }, {
  35288. "path": "pages/historyConstruction/historyDetail",
  35289. "style": {
  35290. "navigationStyle": "custom"
  35291. }
  35292. }, {
  35293. "path": "pages/noLogin/listProject",
  35294. "style": {
  35295. "navigationBarTitleText": "历史记录",
  35296. "enablePullDownRefresh": true
  35297. }
  35298. }, {
  35299. "path": "pages/historyConstruction/updateInfo",
  35300. "style": {
  35301. "navigationBarTitleText": "修改"
  35302. }
  35303. }, {
  35304. "path": "pages/noLogin/cityProject",
  35305. "style": {
  35306. "navigationStyle": "custom"
  35307. }
  35308. }, {
  35309. "path": "pages/noLogin/data",
  35310. "style": {
  35311. "navigationStyle": "custom"
  35312. }
  35313. }, {
  35314. "path": "pages/noLogin/list",
  35315. "style": {
  35316. "navigationBarTitleText": "列表",
  35317. "enablePullDownRefresh": true
  35318. }
  35319. }, {
  35320. "path": "pages/notice/noticeDetail",
  35321. "style": {
  35322. "navigationStyle": "custom"
  35323. }
  35324. }, {
  35325. "path": "pages/notice/noticeList",
  35326. "style": {
  35327. "navigationBarTitleText": "公告列表",
  35328. "enablePullDownRefresh": true
  35329. }
  35330. }, {
  35331. "path": "pages/cityConstrution/cityConstrution",
  35332. "style": {
  35333. "navigationStyle": "custom"
  35334. }
  35335. }, {
  35336. "path": "pages/historyConstruction/historyConstruction",
  35337. "style": {
  35338. "navigationStyle": "custom"
  35339. }
  35340. }, {
  35341. "path": "pages/service/service",
  35342. "style": {
  35343. "navigationStyle": "custom"
  35344. }
  35345. }, {
  35346. "path": "pages/aboutme/aboutme",
  35347. "style": {
  35348. "navigationStyle": "custom"
  35349. }
  35350. }, {
  35351. "path": "pages/chart/chart",
  35352. "style": {
  35353. "navigationStyle": "custom"
  35354. }
  35355. }, {
  35356. "path": "pages/chart/chartAll",
  35357. "style": {
  35358. "navigationStyle": "custom"
  35359. }
  35360. }, {
  35361. "path": "pages/chart/chartDetail",
  35362. "style": {
  35363. "navigationStyle": "custom"
  35364. }
  35365. }, {
  35366. "path": "pages/chart/newchartDetail",
  35367. "style": {
  35368. "navigationStyle": "custom"
  35369. }
  35370. }, {
  35371. "path": "pages/chart/chartList",
  35372. "style": {
  35373. "navigationBarTitleText": "工程管理"
  35374. }
  35375. }, {
  35376. "path": "pages/chart/details",
  35377. "style": {
  35378. "navigationBarTitleText": "详情"
  35379. }
  35380. }, {
  35381. "path": "pages/noLogin/repair",
  35382. "style": {
  35383. "navigationStyle": "custom"
  35384. }
  35385. }, {
  35386. "path": "pages/noLogin/My",
  35387. "style": {
  35388. "navigationStyle": "custom"
  35389. }
  35390. }, {
  35391. "path": "pages/noLogin/Myphoto",
  35392. "style": {
  35393. "navigationStyle": "custom"
  35394. }
  35395. }, {
  35396. "path": "pages/noLogin/home/home",
  35397. "style": {
  35398. "navigationBarTitleText": "",
  35399. "enablePullDownRefresh": false
  35400. }
  35401. }, {
  35402. "path": "pages/noLogin/emergencyRepairOrder/emergencyRepairOrder",
  35403. "style": {
  35404. "navigationBarTitleText": "",
  35405. "enablePullDownRefresh": false
  35406. }
  35407. }, {
  35408. "path": "pages/noLogin/WarningPileForm/WarningPileForm",
  35409. "style": {
  35410. "navigationBarTitleText": "",
  35411. "enablePullDownRefresh": false
  35412. }
  35413. }, {
  35414. "path": "pages/noLogin/WarningPileList",
  35415. "style": {
  35416. "navigationBarTitleText": "",
  35417. "enablePullDownRefresh": false
  35418. }
  35419. }, {
  35420. "path": "pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement",
  35421. "style": {
  35422. "navigationBarTitleText": "",
  35423. "enablePullDownRefresh": false
  35424. }
  35425. }],
  35426. "globalStyle": {
  35427. "navigationBarTextStyle": "black",
  35428. "navigationBarTitleText": "长春贞达市政施工管理平台",
  35429. "navigationBarBackgroundColor": "#F8F8F8",
  35430. "backgroundColor": "#F8F8F8"
  35431. },
  35432. "tabBar": {
  35433. "list": [{
  35434. "pagePath": "pages/index/index",
  35435. "text": "首页",
  35436. "iconPath": "static/icon/home.png",
  35437. "selectedIconPath": "static/icon/home-on.png"
  35438. }, {
  35439. "pagePath": "pages/noLogin/typeList",
  35440. "text": "工作",
  35441. "iconPath": "static/icon/work.png",
  35442. "selectedIconPath": "static/icon/work-on.png"
  35443. }]
  35444. },
  35445. "condition": {
  35446. "current": 0,
  35447. "list": [{
  35448. "name": "",
  35449. "path": "",
  35450. "query": ""
  35451. }]
  35452. }
  35453. };
  35454. exports.default = _default;
  35455. /***/ }),
  35456. /***/ 51:
  35457. /*!*******************************************************************!*\
  35458. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  35459. \*******************************************************************/
  35460. /*! no static exports found */
  35461. /***/ (function(module, exports, __webpack_require__) {
  35462. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  35463. function _regeneratorRuntime() {
  35464. "use strict";
  35465. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  35466. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  35467. return exports;
  35468. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35469. var exports = {},
  35470. Op = Object.prototype,
  35471. hasOwn = Op.hasOwnProperty,
  35472. defineProperty = Object.defineProperty || function (obj, key, desc) {
  35473. obj[key] = desc.value;
  35474. },
  35475. $Symbol = "function" == typeof Symbol ? Symbol : {},
  35476. iteratorSymbol = $Symbol.iterator || "@@iterator",
  35477. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  35478. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  35479. function define(obj, key, value) {
  35480. return Object.defineProperty(obj, key, {
  35481. value: value,
  35482. enumerable: !0,
  35483. configurable: !0,
  35484. writable: !0
  35485. }), obj[key];
  35486. }
  35487. try {
  35488. define({}, "");
  35489. } catch (err) {
  35490. define = function define(obj, key, value) {
  35491. return obj[key] = value;
  35492. };
  35493. }
  35494. function wrap(innerFn, outerFn, self, tryLocsList) {
  35495. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  35496. generator = Object.create(protoGenerator.prototype),
  35497. context = new Context(tryLocsList || []);
  35498. return defineProperty(generator, "_invoke", {
  35499. value: makeInvokeMethod(innerFn, self, context)
  35500. }), generator;
  35501. }
  35502. function tryCatch(fn, obj, arg) {
  35503. try {
  35504. return {
  35505. type: "normal",
  35506. arg: fn.call(obj, arg)
  35507. };
  35508. } catch (err) {
  35509. return {
  35510. type: "throw",
  35511. arg: err
  35512. };
  35513. }
  35514. }
  35515. exports.wrap = wrap;
  35516. var ContinueSentinel = {};
  35517. function Generator() {}
  35518. function GeneratorFunction() {}
  35519. function GeneratorFunctionPrototype() {}
  35520. var IteratorPrototype = {};
  35521. define(IteratorPrototype, iteratorSymbol, function () {
  35522. return this;
  35523. });
  35524. var getProto = Object.getPrototypeOf,
  35525. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  35526. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  35527. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  35528. function defineIteratorMethods(prototype) {
  35529. ["next", "throw", "return"].forEach(function (method) {
  35530. define(prototype, method, function (arg) {
  35531. return this._invoke(method, arg);
  35532. });
  35533. });
  35534. }
  35535. function AsyncIterator(generator, PromiseImpl) {
  35536. function invoke(method, arg, resolve, reject) {
  35537. var record = tryCatch(generator[method], generator, arg);
  35538. if ("throw" !== record.type) {
  35539. var result = record.arg,
  35540. value = result.value;
  35541. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  35542. invoke("next", value, resolve, reject);
  35543. }, function (err) {
  35544. invoke("throw", err, resolve, reject);
  35545. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  35546. result.value = unwrapped, resolve(result);
  35547. }, function (error) {
  35548. return invoke("throw", error, resolve, reject);
  35549. });
  35550. }
  35551. reject(record.arg);
  35552. }
  35553. var previousPromise;
  35554. defineProperty(this, "_invoke", {
  35555. value: function value(method, arg) {
  35556. function callInvokeWithMethodAndArg() {
  35557. return new PromiseImpl(function (resolve, reject) {
  35558. invoke(method, arg, resolve, reject);
  35559. });
  35560. }
  35561. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  35562. }
  35563. });
  35564. }
  35565. function makeInvokeMethod(innerFn, self, context) {
  35566. var state = "suspendedStart";
  35567. return function (method, arg) {
  35568. if ("executing" === state) throw new Error("Generator is already running");
  35569. if ("completed" === state) {
  35570. if ("throw" === method) throw arg;
  35571. return doneResult();
  35572. }
  35573. for (context.method = method, context.arg = arg;;) {
  35574. var delegate = context.delegate;
  35575. if (delegate) {
  35576. var delegateResult = maybeInvokeDelegate(delegate, context);
  35577. if (delegateResult) {
  35578. if (delegateResult === ContinueSentinel) continue;
  35579. return delegateResult;
  35580. }
  35581. }
  35582. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  35583. if ("suspendedStart" === state) throw state = "completed", context.arg;
  35584. context.dispatchException(context.arg);
  35585. } else "return" === context.method && context.abrupt("return", context.arg);
  35586. state = "executing";
  35587. var record = tryCatch(innerFn, self, context);
  35588. if ("normal" === record.type) {
  35589. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  35590. return {
  35591. value: record.arg,
  35592. done: context.done
  35593. };
  35594. }
  35595. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  35596. }
  35597. };
  35598. }
  35599. function maybeInvokeDelegate(delegate, context) {
  35600. var methodName = context.method,
  35601. method = delegate.iterator[methodName];
  35602. 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;
  35603. var record = tryCatch(method, delegate.iterator, context.arg);
  35604. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  35605. var info = record.arg;
  35606. 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);
  35607. }
  35608. function pushTryEntry(locs) {
  35609. var entry = {
  35610. tryLoc: locs[0]
  35611. };
  35612. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  35613. }
  35614. function resetTryEntry(entry) {
  35615. var record = entry.completion || {};
  35616. record.type = "normal", delete record.arg, entry.completion = record;
  35617. }
  35618. function Context(tryLocsList) {
  35619. this.tryEntries = [{
  35620. tryLoc: "root"
  35621. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  35622. }
  35623. function values(iterable) {
  35624. if (iterable) {
  35625. var iteratorMethod = iterable[iteratorSymbol];
  35626. if (iteratorMethod) return iteratorMethod.call(iterable);
  35627. if ("function" == typeof iterable.next) return iterable;
  35628. if (!isNaN(iterable.length)) {
  35629. var i = -1,
  35630. next = function next() {
  35631. for (; ++i < iterable.length;) {
  35632. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  35633. }
  35634. return next.value = undefined, next.done = !0, next;
  35635. };
  35636. return next.next = next;
  35637. }
  35638. }
  35639. return {
  35640. next: doneResult
  35641. };
  35642. }
  35643. function doneResult() {
  35644. return {
  35645. value: undefined,
  35646. done: !0
  35647. };
  35648. }
  35649. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  35650. value: GeneratorFunctionPrototype,
  35651. configurable: !0
  35652. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  35653. value: GeneratorFunction,
  35654. configurable: !0
  35655. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  35656. var ctor = "function" == typeof genFun && genFun.constructor;
  35657. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  35658. }, exports.mark = function (genFun) {
  35659. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  35660. }, exports.awrap = function (arg) {
  35661. return {
  35662. __await: arg
  35663. };
  35664. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  35665. return this;
  35666. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  35667. void 0 === PromiseImpl && (PromiseImpl = Promise);
  35668. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  35669. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  35670. return result.done ? result.value : iter.next();
  35671. });
  35672. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  35673. return this;
  35674. }), define(Gp, "toString", function () {
  35675. return "[object Generator]";
  35676. }), exports.keys = function (val) {
  35677. var object = Object(val),
  35678. keys = [];
  35679. for (var key in object) {
  35680. keys.push(key);
  35681. }
  35682. return keys.reverse(), function next() {
  35683. for (; keys.length;) {
  35684. var key = keys.pop();
  35685. if (key in object) return next.value = key, next.done = !1, next;
  35686. }
  35687. return next.done = !0, next;
  35688. };
  35689. }, exports.values = values, Context.prototype = {
  35690. constructor: Context,
  35691. reset: function reset(skipTempReset) {
  35692. 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) {
  35693. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  35694. }
  35695. },
  35696. stop: function stop() {
  35697. this.done = !0;
  35698. var rootRecord = this.tryEntries[0].completion;
  35699. if ("throw" === rootRecord.type) throw rootRecord.arg;
  35700. return this.rval;
  35701. },
  35702. dispatchException: function dispatchException(exception) {
  35703. if (this.done) throw exception;
  35704. var context = this;
  35705. function handle(loc, caught) {
  35706. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  35707. }
  35708. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  35709. var entry = this.tryEntries[i],
  35710. record = entry.completion;
  35711. if ("root" === entry.tryLoc) return handle("end");
  35712. if (entry.tryLoc <= this.prev) {
  35713. var hasCatch = hasOwn.call(entry, "catchLoc"),
  35714. hasFinally = hasOwn.call(entry, "finallyLoc");
  35715. if (hasCatch && hasFinally) {
  35716. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  35717. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  35718. } else if (hasCatch) {
  35719. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  35720. } else {
  35721. if (!hasFinally) throw new Error("try statement without catch or finally");
  35722. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  35723. }
  35724. }
  35725. }
  35726. },
  35727. abrupt: function abrupt(type, arg) {
  35728. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  35729. var entry = this.tryEntries[i];
  35730. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  35731. var finallyEntry = entry;
  35732. break;
  35733. }
  35734. }
  35735. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  35736. var record = finallyEntry ? finallyEntry.completion : {};
  35737. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  35738. },
  35739. complete: function complete(record, afterLoc) {
  35740. if ("throw" === record.type) throw record.arg;
  35741. 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;
  35742. },
  35743. finish: function finish(finallyLoc) {
  35744. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  35745. var entry = this.tryEntries[i];
  35746. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  35747. }
  35748. },
  35749. "catch": function _catch(tryLoc) {
  35750. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  35751. var entry = this.tryEntries[i];
  35752. if (entry.tryLoc === tryLoc) {
  35753. var record = entry.completion;
  35754. if ("throw" === record.type) {
  35755. var thrown = record.arg;
  35756. resetTryEntry(entry);
  35757. }
  35758. return thrown;
  35759. }
  35760. }
  35761. throw new Error("illegal catch attempt");
  35762. },
  35763. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  35764. return this.delegate = {
  35765. iterator: values(iterable),
  35766. resultName: resultName,
  35767. nextLoc: nextLoc
  35768. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  35769. }
  35770. }, exports;
  35771. }
  35772. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  35773. /***/ }),
  35774. /***/ 510:
  35775. /*!*************************************************************!*\
  35776. !*** E:/Desktop/zd_wechatApp(1)/pages.json?{"type":"stat"} ***!
  35777. \*************************************************************/
  35778. /*! no static exports found */
  35779. /***/ (function(module, exports, __webpack_require__) {
  35780. "use strict";
  35781. Object.defineProperty(exports, "__esModule", {
  35782. value: true
  35783. });
  35784. exports.default = void 0;
  35785. var _default = {
  35786. "appid": "__UNI__5FB7046"
  35787. };
  35788. exports.default = _default;
  35789. /***/ }),
  35790. /***/ 511:
  35791. /*!*******************************************************************************************!*\
  35792. !*** E:/Desktop/zd_wechatApp(1)/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js ***!
  35793. \*******************************************************************************************/
  35794. /*! no static exports found */
  35795. /***/ (function(module, exports, __webpack_require__) {
  35796. "use strict";
  35797. /* WEBPACK VAR INJECTION */(function(module) {/*
  35798. * uCharts®
  35799. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  35800. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  35801. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  35802. * 复制使用请保留本段注释,感谢支持开源!
  35803. *
  35804. * uCharts®官方网站
  35805. * https://www.uCharts.cn
  35806. *
  35807. * 开源地址:
  35808. * https://gitee.com/uCharts/uCharts
  35809. *
  35810. * uni-app插件市场地址:
  35811. * http://ext.dcloud.net.cn/plugin?id=271
  35812. *
  35813. */
  35814. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  35815. Object.defineProperty(exports, "__esModule", {
  35816. value: true
  35817. });
  35818. exports.default = void 0;
  35819. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  35820. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  35821. var config = {
  35822. version: 'v2.3.6-20211201',
  35823. yAxisWidth: 15,
  35824. yAxisSplit: 5,
  35825. xAxisHeight: 22,
  35826. xAxisLineHeight: 22,
  35827. legendHeight: 15,
  35828. yAxisTitleWidth: 15,
  35829. padding: [10, 10, 10, 10],
  35830. pixelRatio: 1,
  35831. rotate: false,
  35832. columePadding: 3,
  35833. fontSize: 13,
  35834. fontColor: '#666666',
  35835. dataPointShape: ['circle', 'circle', 'circle', 'circle'],
  35836. color: ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
  35837. linearColor: ['#0EE2F8', '#2BDCA8', '#FA7D8D', '#EB88E2', '#2AE3A0', '#0EE2F8', '#EB88E2', '#6773E3', '#F78A85'],
  35838. pieChartLinePadding: 15,
  35839. pieChartTextPadding: 5,
  35840. xAxisTextPadding: 3,
  35841. titleColor: '#333333',
  35842. titleFontSize: 20,
  35843. subtitleColor: '#999999',
  35844. subtitleFontSize: 15,
  35845. toolTipPadding: 3,
  35846. toolTipBackground: '#000000',
  35847. toolTipOpacity: 0.7,
  35848. toolTipLineHeight: 20,
  35849. radarLabelTextMargin: 13,
  35850. gaugeLabelTextMargin: 13
  35851. };
  35852. var assign = function assign(target) {
  35853. for (var _len2 = arguments.length, varArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  35854. varArgs[_key2 - 1] = arguments[_key2];
  35855. }
  35856. if (target == null) {
  35857. throw new TypeError('[uCharts] Cannot convert undefined or null to object');
  35858. }
  35859. if (!varArgs || varArgs.length <= 0) {
  35860. return target;
  35861. }
  35862. // 深度合并对象
  35863. function deepAssign(obj1, obj2) {
  35864. for (var key in obj2) {
  35865. obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ? deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
  35866. }
  35867. return obj1;
  35868. }
  35869. varArgs.forEach(function (val) {
  35870. target = deepAssign(target, val);
  35871. });
  35872. return target;
  35873. };
  35874. var util = {
  35875. toFixed: function toFixed(num, limit) {
  35876. limit = limit || 2;
  35877. if (this.isFloat(num)) {
  35878. num = num.toFixed(limit);
  35879. }
  35880. return num;
  35881. },
  35882. isFloat: function isFloat(num) {
  35883. return num % 1 !== 0;
  35884. },
  35885. approximatelyEqual: function approximatelyEqual(num1, num2) {
  35886. return Math.abs(num1 - num2) < 1e-10;
  35887. },
  35888. isSameSign: function isSameSign(num1, num2) {
  35889. return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
  35890. },
  35891. isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
  35892. return this.isSameSign(p1.x, p2.x);
  35893. },
  35894. isCollision: function isCollision(obj1, obj2) {
  35895. obj1.end = {};
  35896. obj1.end.x = obj1.start.x + obj1.width;
  35897. obj1.end.y = obj1.start.y - obj1.height;
  35898. obj2.end = {};
  35899. obj2.end.x = obj2.start.x + obj2.width;
  35900. obj2.end.y = obj2.start.y - obj2.height;
  35901. 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;
  35902. return !flag;
  35903. }
  35904. };
  35905. //兼容H5点击事件
  35906. function getH5Offset(e) {
  35907. e.mp = {
  35908. changedTouches: []
  35909. };
  35910. e.mp.changedTouches.push({
  35911. x: e.offsetX,
  35912. y: e.offsetY
  35913. });
  35914. return e;
  35915. }
  35916. // 经纬度转墨卡托
  35917. function lonlat2mercator(longitude, latitude) {
  35918. var mercator = Array(2);
  35919. var x = longitude * 20037508.34 / 180;
  35920. var y = Math.log(Math.tan((90 + latitude) * Math.PI / 360)) / (Math.PI / 180);
  35921. y = y * 20037508.34 / 180;
  35922. mercator[0] = x;
  35923. mercator[1] = y;
  35924. return mercator;
  35925. }
  35926. // 墨卡托转经纬度
  35927. function mercator2lonlat(longitude, latitude) {
  35928. var lonlat = Array(2);
  35929. var x = longitude / 20037508.34 * 180;
  35930. var y = latitude / 20037508.34 * 180;
  35931. y = 180 / Math.PI * (2 * Math.atan(Math.exp(y * Math.PI / 180)) - Math.PI / 2);
  35932. lonlat[0] = x;
  35933. lonlat[1] = y;
  35934. return lonlat;
  35935. }
  35936. // hex 转 rgba
  35937. function hexToRgb(hexValue, opc) {
  35938. var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  35939. var hex = hexValue.replace(rgx, function (m, r, g, b) {
  35940. return r + r + g + g + b + b;
  35941. });
  35942. var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  35943. var r = parseInt(rgb[1], 16);
  35944. var g = parseInt(rgb[2], 16);
  35945. var b = parseInt(rgb[3], 16);
  35946. return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
  35947. }
  35948. function findRange(num, type, limit) {
  35949. if (isNaN(num)) {
  35950. throw new Error('[uCharts] series数据需为Number格式');
  35951. }
  35952. limit = limit || 10;
  35953. type = type ? type : 'upper';
  35954. var multiple = 1;
  35955. while (limit < 1) {
  35956. limit *= 10;
  35957. multiple *= 10;
  35958. }
  35959. if (type === 'upper') {
  35960. num = Math.ceil(num * multiple);
  35961. } else {
  35962. num = Math.floor(num * multiple);
  35963. }
  35964. while (num % limit !== 0) {
  35965. if (type === 'upper') {
  35966. num++;
  35967. } else {
  35968. num--;
  35969. }
  35970. }
  35971. return num / multiple;
  35972. }
  35973. function calCandleMA(dayArr, nameArr, colorArr, kdata) {
  35974. var seriesTemp = [];
  35975. for (var k = 0; k < dayArr.length; k++) {
  35976. var seriesItem = {
  35977. data: [],
  35978. name: nameArr[k],
  35979. color: colorArr[k]
  35980. };
  35981. for (var i = 0, len = kdata.length; i < len; i++) {
  35982. if (i < dayArr[k]) {
  35983. seriesItem.data.push(null);
  35984. continue;
  35985. }
  35986. var sum = 0;
  35987. for (var j = 0; j < dayArr[k]; j++) {
  35988. sum += kdata[i - j][1];
  35989. }
  35990. seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
  35991. }
  35992. seriesTemp.push(seriesItem);
  35993. }
  35994. return seriesTemp;
  35995. }
  35996. function calValidDistance(self, distance, chartData, config, opts) {
  35997. var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
  35998. var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length - 1);
  35999. var validDistance = distance;
  36000. if (distance >= 0) {
  36001. validDistance = 0;
  36002. self.uevent.trigger('scrollLeft');
  36003. self.scrollOption.position = 'left';
  36004. opts.xAxis.scrollPosition = 'left';
  36005. } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
  36006. validDistance = dataChartAreaWidth - dataChartWidth;
  36007. self.uevent.trigger('scrollRight');
  36008. self.scrollOption.position = 'right';
  36009. opts.xAxis.scrollPosition = 'right';
  36010. } else {
  36011. self.scrollOption.position = distance;
  36012. opts.xAxis.scrollPosition = distance;
  36013. }
  36014. return validDistance;
  36015. }
  36016. function isInAngleRange(angle, startAngle, endAngle) {
  36017. function adjust(angle) {
  36018. while (angle < 0) {
  36019. angle += 2 * Math.PI;
  36020. }
  36021. while (angle > 2 * Math.PI) {
  36022. angle -= 2 * Math.PI;
  36023. }
  36024. return angle;
  36025. }
  36026. angle = adjust(angle);
  36027. startAngle = adjust(startAngle);
  36028. endAngle = adjust(endAngle);
  36029. if (startAngle > endAngle) {
  36030. endAngle += 2 * Math.PI;
  36031. if (angle < startAngle) {
  36032. angle += 2 * Math.PI;
  36033. }
  36034. }
  36035. return angle >= startAngle && angle <= endAngle;
  36036. }
  36037. function calRotateTranslate(x, y, h) {
  36038. var xv = x;
  36039. var yv = h - y;
  36040. var transX = xv + (h - yv - xv) / Math.sqrt(2);
  36041. transX *= -1;
  36042. var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);
  36043. return {
  36044. transX: transX,
  36045. transY: transY
  36046. };
  36047. }
  36048. function createCurveControlPoints(points, i) {
  36049. function isNotMiddlePoint(points, i) {
  36050. if (points[i - 1] && points[i + 1]) {
  36051. 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);
  36052. } else {
  36053. return false;
  36054. }
  36055. }
  36056. function isNotMiddlePointX(points, i) {
  36057. if (points[i - 1] && points[i + 1]) {
  36058. 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);
  36059. } else {
  36060. return false;
  36061. }
  36062. }
  36063. var a = 0.2;
  36064. var b = 0.2;
  36065. var pAx = null;
  36066. var pAy = null;
  36067. var pBx = null;
  36068. var pBy = null;
  36069. if (i < 1) {
  36070. pAx = points[0].x + (points[1].x - points[0].x) * a;
  36071. pAy = points[0].y + (points[1].y - points[0].y) * a;
  36072. } else {
  36073. pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
  36074. pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
  36075. }
  36076. if (i > points.length - 3) {
  36077. var last = points.length - 1;
  36078. pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
  36079. pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
  36080. } else {
  36081. pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
  36082. pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
  36083. }
  36084. if (isNotMiddlePoint(points, i + 1)) {
  36085. pBy = points[i + 1].y;
  36086. }
  36087. if (isNotMiddlePoint(points, i)) {
  36088. pAy = points[i].y;
  36089. }
  36090. if (isNotMiddlePointX(points, i + 1)) {
  36091. pBx = points[i + 1].x;
  36092. }
  36093. if (isNotMiddlePointX(points, i)) {
  36094. pAx = points[i].x;
  36095. }
  36096. if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
  36097. pAy = points[i].y;
  36098. }
  36099. if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
  36100. pBy = points[i + 1].y;
  36101. }
  36102. if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
  36103. pAx = points[i].x;
  36104. }
  36105. if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
  36106. pBx = points[i + 1].x;
  36107. }
  36108. return {
  36109. ctrA: {
  36110. x: pAx,
  36111. y: pAy
  36112. },
  36113. ctrB: {
  36114. x: pBx,
  36115. y: pBy
  36116. }
  36117. };
  36118. }
  36119. function convertCoordinateOrigin(x, y, center) {
  36120. return {
  36121. x: center.x + x,
  36122. y: center.y - y
  36123. };
  36124. }
  36125. function avoidCollision(obj, target) {
  36126. if (target) {
  36127. // is collision test
  36128. while (util.isCollision(obj, target)) {
  36129. if (obj.start.x > 0) {
  36130. obj.start.y--;
  36131. } else if (obj.start.x < 0) {
  36132. obj.start.y++;
  36133. } else {
  36134. if (obj.start.y > 0) {
  36135. obj.start.y++;
  36136. } else {
  36137. obj.start.y--;
  36138. }
  36139. }
  36140. }
  36141. }
  36142. return obj;
  36143. }
  36144. function fixPieSeries(series, opts, config) {
  36145. var pieSeriesArr = [];
  36146. if (series.length > 0 && series[0].data.constructor.toString().indexOf('Array') > -1) {
  36147. opts._pieSeries_ = series;
  36148. var oldseries = series[0].data;
  36149. for (var i = 0; i < oldseries.length; i++) {
  36150. oldseries[i].formatter = series[0].formatter;
  36151. oldseries[i].data = oldseries[i].value;
  36152. pieSeriesArr.push(oldseries[i]);
  36153. }
  36154. opts.series = pieSeriesArr;
  36155. } else {
  36156. pieSeriesArr = series;
  36157. }
  36158. return pieSeriesArr;
  36159. }
  36160. function fillSeries(series, opts, config) {
  36161. var index = 0;
  36162. for (var i = 0; i < series.length; i++) {
  36163. var item = series[i];
  36164. if (!item.color) {
  36165. item.color = config.color[index];
  36166. index = (index + 1) % config.color.length;
  36167. }
  36168. if (!item.linearIndex) {
  36169. item.linearIndex = i;
  36170. }
  36171. if (!item.index) {
  36172. item.index = 0;
  36173. }
  36174. if (!item.type) {
  36175. item.type = opts.type;
  36176. }
  36177. if (typeof item.show == "undefined") {
  36178. item.show = true;
  36179. }
  36180. if (!item.type) {
  36181. item.type = opts.type;
  36182. }
  36183. if (!item.pointShape) {
  36184. item.pointShape = "circle";
  36185. }
  36186. if (!item.legendShape) {
  36187. switch (item.type) {
  36188. case 'line':
  36189. item.legendShape = "line";
  36190. break;
  36191. case 'column':
  36192. item.legendShape = "rect";
  36193. break;
  36194. case 'area':
  36195. item.legendShape = "triangle";
  36196. break;
  36197. case 'bar':
  36198. item.legendShape = "rect";
  36199. break;
  36200. default:
  36201. item.legendShape = "circle";
  36202. }
  36203. }
  36204. }
  36205. return series;
  36206. }
  36207. function fillCustomColor(linearType, customColor, series, config) {
  36208. var newcolor = customColor || [];
  36209. if (linearType == 'custom' && newcolor.length == 0) {
  36210. newcolor = config.linearColor;
  36211. }
  36212. if (linearType == 'custom' && newcolor.length < series.length) {
  36213. var chazhi = series.length - newcolor.length;
  36214. for (var i = 0; i < chazhi; i++) {
  36215. newcolor.push(config.linearColor[(i + 1) % config.linearColor.length]);
  36216. }
  36217. }
  36218. return newcolor;
  36219. }
  36220. function getDataRange(minData, maxData) {
  36221. var limit = 0;
  36222. var range = maxData - minData;
  36223. if (range >= 10000) {
  36224. limit = 1000;
  36225. } else if (range >= 1000) {
  36226. limit = 100;
  36227. } else if (range >= 100) {
  36228. limit = 10;
  36229. } else if (range >= 10) {
  36230. limit = 5;
  36231. } else if (range >= 1) {
  36232. limit = 1;
  36233. } else if (range >= 0.1) {
  36234. limit = 0.1;
  36235. } else if (range >= 0.01) {
  36236. limit = 0.01;
  36237. } else if (range >= 0.001) {
  36238. limit = 0.001;
  36239. } else if (range >= 0.0001) {
  36240. limit = 0.0001;
  36241. } else if (range >= 0.00001) {
  36242. limit = 0.00001;
  36243. } else {
  36244. limit = 0.000001;
  36245. }
  36246. return {
  36247. minRange: findRange(minData, 'lower', limit),
  36248. maxRange: findRange(maxData, 'upper', limit)
  36249. };
  36250. }
  36251. function measureText(text, fontSize, context) {
  36252. var width = 0;
  36253. text = String(text);
  36254. if (context !== false && context !== undefined && context.setFontSize && context.measureText) {
  36255. context.setFontSize(fontSize);
  36256. return context.measureText(text).width;
  36257. } else {
  36258. var text = text.split('');
  36259. for (var i = 0; i < text.length; i++) {
  36260. var item = text[i];
  36261. if (/[a-zA-Z]/.test(item)) {
  36262. width += 7;
  36263. } else if (/[0-9]/.test(item)) {
  36264. width += 5.5;
  36265. } else if (/\./.test(item)) {
  36266. width += 2.7;
  36267. } else if (/-/.test(item)) {
  36268. width += 3.25;
  36269. } else if (/:/.test(item)) {
  36270. width += 2.5;
  36271. } else if (/[\u4e00-\u9fa5]/.test(item)) {
  36272. width += 10;
  36273. } else if (/\(|\)/.test(item)) {
  36274. width += 3.73;
  36275. } else if (/\s/.test(item)) {
  36276. width += 2.5;
  36277. } else if (/%/.test(item)) {
  36278. width += 8;
  36279. } else {
  36280. width += 10;
  36281. }
  36282. }
  36283. return width * fontSize / 10;
  36284. }
  36285. }
  36286. function dataCombine(series) {
  36287. return series.reduce(function (a, b) {
  36288. return (a.data ? a.data : a).concat(b.data);
  36289. }, []);
  36290. }
  36291. function dataCombineStack(series, len) {
  36292. var sum = new Array(len);
  36293. for (var j = 0; j < sum.length; j++) {
  36294. sum[j] = 0;
  36295. }
  36296. for (var i = 0; i < series.length; i++) {
  36297. for (var j = 0; j < sum.length; j++) {
  36298. sum[j] += series[i].data[j];
  36299. }
  36300. }
  36301. return series.reduce(function (a, b) {
  36302. return (a.data ? a.data : a).concat(b.data).concat(sum);
  36303. }, []);
  36304. }
  36305. function getTouches(touches, opts, e) {
  36306. var x, y;
  36307. if (touches.clientX) {
  36308. if (opts.rotate) {
  36309. y = opts.height - touches.clientX * opts.pix;
  36310. x = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  36311. } else {
  36312. x = touches.clientX * opts.pix;
  36313. y = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  36314. }
  36315. } else {
  36316. if (opts.rotate) {
  36317. y = opts.height - touches.x * opts.pix;
  36318. x = touches.y * opts.pix;
  36319. } else {
  36320. x = touches.x * opts.pix;
  36321. y = touches.y * opts.pix;
  36322. }
  36323. }
  36324. return {
  36325. x: x,
  36326. y: y
  36327. };
  36328. }
  36329. function getSeriesDataItem(series, index, group) {
  36330. var data = [];
  36331. var newSeries = [];
  36332. var indexIsArr = index.constructor.toString().indexOf('Array') > -1;
  36333. if (indexIsArr) {
  36334. var tempSeries = filterSeries(series);
  36335. for (var i = 0; i < group.length; i++) {
  36336. newSeries.push(tempSeries[group[i]]);
  36337. }
  36338. } else {
  36339. newSeries = series;
  36340. }
  36341. ;
  36342. for (var _i = 0; _i < newSeries.length; _i++) {
  36343. var item = newSeries[_i];
  36344. var tmpindex = -1;
  36345. if (indexIsArr) {
  36346. tmpindex = index[_i];
  36347. } else {
  36348. tmpindex = index;
  36349. }
  36350. if (item.data[tmpindex] !== null && typeof item.data[tmpindex] !== 'undefined' && item.show) {
  36351. var seriesItem = {};
  36352. seriesItem.color = item.color;
  36353. seriesItem.type = item.type;
  36354. seriesItem.style = item.style;
  36355. seriesItem.pointShape = item.pointShape;
  36356. seriesItem.disableLegend = item.disableLegend;
  36357. seriesItem.name = item.name;
  36358. seriesItem.show = item.show;
  36359. seriesItem.data = item.formatter ? item.formatter(item.data[tmpindex]) : item.data[tmpindex];
  36360. data.push(seriesItem);
  36361. }
  36362. }
  36363. return data;
  36364. }
  36365. function getMaxTextListLength(list, fontSize, context) {
  36366. var lengthList = list.map(function (item) {
  36367. return measureText(item, fontSize, context);
  36368. });
  36369. return Math.max.apply(null, lengthList);
  36370. }
  36371. function getRadarCoordinateSeries(length) {
  36372. var eachAngle = 2 * Math.PI / length;
  36373. var CoordinateSeries = [];
  36374. for (var i = 0; i < length; i++) {
  36375. CoordinateSeries.push(eachAngle * i);
  36376. }
  36377. return CoordinateSeries.map(function (item) {
  36378. return -1 * item + Math.PI / 2;
  36379. });
  36380. }
  36381. function getToolTipData(seriesData, opts, index, group, categories) {
  36382. var option = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  36383. var calPoints = opts.chartData.calPoints ? opts.chartData.calPoints : [];
  36384. var points = {};
  36385. if (group.length > 0) {
  36386. var filterPoints = [];
  36387. for (var i = 0; i < group.length; i++) {
  36388. filterPoints.push(calPoints[group[i]]);
  36389. }
  36390. points = filterPoints[0][index[0]];
  36391. } else {
  36392. points = calPoints[0][index];
  36393. }
  36394. ;
  36395. var textList = seriesData.map(function (item) {
  36396. var titleText = null;
  36397. if (opts.categories && opts.categories.length > 0) {
  36398. titleText = categories[index];
  36399. }
  36400. ;
  36401. return {
  36402. text: option.formatter ? option.formatter(item, titleText, index, opts) : item.name + ': ' + item.data,
  36403. color: item.color
  36404. };
  36405. });
  36406. var offset = {
  36407. x: Math.round(points.x),
  36408. y: Math.round(points.y)
  36409. };
  36410. return {
  36411. textList: textList,
  36412. offset: offset
  36413. };
  36414. }
  36415. function getMixToolTipData(seriesData, opts, index, categories) {
  36416. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  36417. var points = opts.chartData.xAxisPoints[index] + opts.chartData.eachSpacing / 2;
  36418. var textList = seriesData.map(function (item) {
  36419. return {
  36420. text: option.formatter ? option.formatter(item, categories[index], index, opts) : item.name + ': ' + item.data,
  36421. color: item.color,
  36422. disableLegend: item.disableLegend ? true : false
  36423. };
  36424. });
  36425. textList = textList.filter(function (item) {
  36426. if (item.disableLegend !== true) {
  36427. return item;
  36428. }
  36429. });
  36430. var offset = {
  36431. x: Math.round(points),
  36432. y: 0
  36433. };
  36434. return {
  36435. textList: textList,
  36436. offset: offset
  36437. };
  36438. }
  36439. function getCandleToolTipData(series, seriesData, opts, index, categories, extra) {
  36440. var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
  36441. var calPoints = opts.chartData.calPoints;
  36442. var upColor = extra.color.upFill;
  36443. var downColor = extra.color.downFill;
  36444. //颜色顺序为开盘,收盘,最低,最高
  36445. var color = [upColor, upColor, downColor, upColor];
  36446. var textList = [];
  36447. seriesData.map(function (item) {
  36448. if (index == 0) {
  36449. if (item.data[1] - item.data[0] < 0) {
  36450. color[1] = downColor;
  36451. } else {
  36452. color[1] = upColor;
  36453. }
  36454. } else {
  36455. if (item.data[0] < series[index - 1][1]) {
  36456. color[0] = downColor;
  36457. }
  36458. if (item.data[1] < item.data[0]) {
  36459. color[1] = downColor;
  36460. }
  36461. if (item.data[2] > series[index - 1][1]) {
  36462. color[2] = upColor;
  36463. }
  36464. if (item.data[3] < series[index - 1][1]) {
  36465. color[3] = downColor;
  36466. }
  36467. }
  36468. var text1 = {
  36469. text: '开盘:' + item.data[0],
  36470. color: color[0]
  36471. };
  36472. var text2 = {
  36473. text: '收盘:' + item.data[1],
  36474. color: color[1]
  36475. };
  36476. var text3 = {
  36477. text: '最低:' + item.data[2],
  36478. color: color[2]
  36479. };
  36480. var text4 = {
  36481. text: '最高:' + item.data[3],
  36482. color: color[3]
  36483. };
  36484. textList.push(text1, text2, text3, text4);
  36485. });
  36486. var validCalPoints = [];
  36487. var offset = {
  36488. x: 0,
  36489. y: 0
  36490. };
  36491. for (var i = 0; i < calPoints.length; i++) {
  36492. var points = calPoints[i];
  36493. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  36494. validCalPoints.push(points[index]);
  36495. }
  36496. }
  36497. offset.x = Math.round(validCalPoints[0][0].x);
  36498. return {
  36499. textList: textList,
  36500. offset: offset
  36501. };
  36502. }
  36503. function filterSeries(series) {
  36504. var tempSeries = [];
  36505. for (var i = 0; i < series.length; i++) {
  36506. if (series[i].show == true) {
  36507. tempSeries.push(series[i]);
  36508. }
  36509. }
  36510. return tempSeries;
  36511. }
  36512. function findCurrentIndex(currentPoints, calPoints, opts, config) {
  36513. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  36514. var current = {
  36515. index: -1,
  36516. group: []
  36517. };
  36518. var spacing = opts.chartData.eachSpacing / 2;
  36519. var xAxisPoints = [];
  36520. if (calPoints && calPoints.length > 0) {
  36521. if (!opts.categories) {
  36522. spacing = 0;
  36523. } else {
  36524. for (var i = 1; i < opts.chartData.xAxisPoints.length; i++) {
  36525. xAxisPoints.push(opts.chartData.xAxisPoints[i] - spacing);
  36526. }
  36527. if ((opts.type == 'line' || opts.type == 'area') && opts.xAxis.boundaryGap == 'justify') {
  36528. xAxisPoints = opts.chartData.xAxisPoints;
  36529. }
  36530. }
  36531. if (isInExactChartArea(currentPoints, opts, config)) {
  36532. if (!opts.categories) {
  36533. var timePoints = Array(calPoints.length);
  36534. for (var _i2 = 0; _i2 < calPoints.length; _i2++) {
  36535. timePoints[_i2] = Array(calPoints[_i2].length);
  36536. for (var j = 0; j < calPoints[_i2].length; j++) {
  36537. timePoints[_i2][j] = Math.abs(calPoints[_i2][j].x - currentPoints.x);
  36538. }
  36539. }
  36540. ;
  36541. var pointValue = Array(timePoints.length);
  36542. var pointIndex = Array(timePoints.length);
  36543. for (var _i3 = 0; _i3 < timePoints.length; _i3++) {
  36544. pointValue[_i3] = Math.min.apply(null, timePoints[_i3]);
  36545. pointIndex[_i3] = timePoints[_i3].indexOf(pointValue[_i3]);
  36546. }
  36547. var minValue = Math.min.apply(null, pointValue);
  36548. current.index = [];
  36549. for (var _i4 = 0; _i4 < pointValue.length; _i4++) {
  36550. if (pointValue[_i4] == minValue) {
  36551. current.group.push(_i4);
  36552. current.index.push(pointIndex[_i4]);
  36553. }
  36554. }
  36555. ;
  36556. } else {
  36557. xAxisPoints.forEach(function (item, index) {
  36558. if (currentPoints.x + offset + spacing > item) {
  36559. current.index = index;
  36560. }
  36561. });
  36562. }
  36563. }
  36564. }
  36565. return current;
  36566. }
  36567. function findBarChartCurrentIndex(currentPoints, calPoints, opts, config) {
  36568. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  36569. var current = {
  36570. index: -1,
  36571. group: []
  36572. };
  36573. var spacing = opts.chartData.eachSpacing / 2;
  36574. var yAxisPoints = opts.chartData.yAxisPoints;
  36575. if (calPoints && calPoints.length > 0) {
  36576. if (isInExactChartArea(currentPoints, opts, config)) {
  36577. yAxisPoints.forEach(function (item, index) {
  36578. if (currentPoints.y + offset + spacing > item) {
  36579. current.index = index;
  36580. }
  36581. });
  36582. }
  36583. }
  36584. return current;
  36585. }
  36586. function findLegendIndex(currentPoints, legendData, opts) {
  36587. var currentIndex = -1;
  36588. var gap = 0;
  36589. if (isInExactLegendArea(currentPoints, legendData.area)) {
  36590. var points = legendData.points;
  36591. var index = -1;
  36592. for (var i = 0, len = points.length; i < len; i++) {
  36593. var item = points[i];
  36594. for (var j = 0; j < item.length; j++) {
  36595. index += 1;
  36596. var area = item[j]['area'];
  36597. if (area && currentPoints.x > area[0] - gap && currentPoints.x < area[2] + gap && currentPoints.y > area[1] - gap && currentPoints.y < area[3] + gap) {
  36598. currentIndex = index;
  36599. break;
  36600. }
  36601. }
  36602. }
  36603. return currentIndex;
  36604. }
  36605. return currentIndex;
  36606. }
  36607. function isInExactLegendArea(currentPoints, area) {
  36608. return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && currentPoints.y < area.end.y;
  36609. }
  36610. function isInExactChartArea(currentPoints, opts, config) {
  36611. 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];
  36612. }
  36613. function findRadarChartCurrentIndex(currentPoints, radarData, count) {
  36614. var eachAngleArea = 2 * Math.PI / count;
  36615. var currentIndex = -1;
  36616. if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
  36617. var fixAngle = function fixAngle(angle) {
  36618. if (angle < 0) {
  36619. angle += 2 * Math.PI;
  36620. }
  36621. if (angle > 2 * Math.PI) {
  36622. angle -= 2 * Math.PI;
  36623. }
  36624. return angle;
  36625. };
  36626. var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
  36627. angle = -1 * angle;
  36628. if (angle < 0) {
  36629. angle += 2 * Math.PI;
  36630. }
  36631. var angleList = radarData.angleList.map(function (item) {
  36632. item = fixAngle(-1 * item);
  36633. return item;
  36634. });
  36635. angleList.forEach(function (item, index) {
  36636. var rangeStart = fixAngle(item - eachAngleArea / 2);
  36637. var rangeEnd = fixAngle(item + eachAngleArea / 2);
  36638. if (rangeEnd < rangeStart) {
  36639. rangeEnd += 2 * Math.PI;
  36640. }
  36641. if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) {
  36642. currentIndex = index;
  36643. }
  36644. });
  36645. }
  36646. return currentIndex;
  36647. }
  36648. function findFunnelChartCurrentIndex(currentPoints, funnelData) {
  36649. var currentIndex = -1;
  36650. for (var i = 0, len = funnelData.series.length; i < len; i++) {
  36651. var item = funnelData.series[i];
  36652. if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
  36653. currentIndex = i;
  36654. break;
  36655. }
  36656. }
  36657. return currentIndex;
  36658. }
  36659. function findWordChartCurrentIndex(currentPoints, wordData) {
  36660. var currentIndex = -1;
  36661. for (var i = 0, len = wordData.length; i < len; i++) {
  36662. var item = wordData[i];
  36663. if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
  36664. currentIndex = i;
  36665. break;
  36666. }
  36667. }
  36668. return currentIndex;
  36669. }
  36670. function findMapChartCurrentIndex(currentPoints, opts) {
  36671. var currentIndex = -1;
  36672. var cData = opts.chartData.mapData;
  36673. var data = opts.series;
  36674. var tmp = pointToCoordinate(currentPoints.y, currentPoints.x, cData.bounds, cData.scale, cData.xoffset, cData.yoffset);
  36675. var poi = [tmp.x, tmp.y];
  36676. for (var i = 0, len = data.length; i < len; i++) {
  36677. var item = data[i].geometry.coordinates;
  36678. if (isPoiWithinPoly(poi, item, opts.chartData.mapData.mercator)) {
  36679. currentIndex = i;
  36680. break;
  36681. }
  36682. }
  36683. return currentIndex;
  36684. }
  36685. function findRoseChartCurrentIndex(currentPoints, pieData, opts) {
  36686. var currentIndex = -1;
  36687. var series = getRoseDataPoints(opts._series_, opts.extra.rose.type, pieData.radius, pieData.radius);
  36688. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  36689. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  36690. angle = -angle;
  36691. if (opts.extra.rose && opts.extra.rose.offsetAngle) {
  36692. angle = angle - opts.extra.rose.offsetAngle * Math.PI / 180;
  36693. }
  36694. for (var i = 0, len = series.length; i < len; i++) {
  36695. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._rose_proportion_ * 2 * Math.PI)) {
  36696. currentIndex = i;
  36697. break;
  36698. }
  36699. }
  36700. }
  36701. return currentIndex;
  36702. }
  36703. function findPieChartCurrentIndex(currentPoints, pieData, opts) {
  36704. var currentIndex = -1;
  36705. var series = getPieDataPoints(pieData.series);
  36706. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  36707. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  36708. angle = -angle;
  36709. if (opts.extra.pie && opts.extra.pie.offsetAngle) {
  36710. angle = angle - opts.extra.pie.offsetAngle * Math.PI / 180;
  36711. }
  36712. if (opts.extra.ring && opts.extra.ring.offsetAngle) {
  36713. angle = angle - opts.extra.ring.offsetAngle * Math.PI / 180;
  36714. }
  36715. for (var i = 0, len = series.length; i < len; i++) {
  36716. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._proportion_ * 2 * Math.PI)) {
  36717. currentIndex = i;
  36718. break;
  36719. }
  36720. }
  36721. }
  36722. return currentIndex;
  36723. }
  36724. function isInExactPieChartArea(currentPoints, center, radius) {
  36725. return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
  36726. }
  36727. function splitPoints(points, eachSeries) {
  36728. var newPoints = [];
  36729. var items = [];
  36730. points.forEach(function (item, index) {
  36731. if (eachSeries.connectNulls) {
  36732. if (item !== null) {
  36733. items.push(item);
  36734. }
  36735. } else {
  36736. if (item !== null) {
  36737. items.push(item);
  36738. } else {
  36739. if (items.length) {
  36740. newPoints.push(items);
  36741. }
  36742. items = [];
  36743. }
  36744. }
  36745. });
  36746. if (items.length) {
  36747. newPoints.push(items);
  36748. }
  36749. return newPoints;
  36750. }
  36751. function calLegendData(series, opts, config, chartData, context) {
  36752. var legendData = {
  36753. area: {
  36754. start: {
  36755. x: 0,
  36756. y: 0
  36757. },
  36758. end: {
  36759. x: 0,
  36760. y: 0
  36761. },
  36762. width: 0,
  36763. height: 0,
  36764. wholeWidth: 0,
  36765. wholeHeight: 0
  36766. },
  36767. points: [],
  36768. widthArr: [],
  36769. heightArr: []
  36770. };
  36771. if (opts.legend.show === false) {
  36772. chartData.legendData = legendData;
  36773. return legendData;
  36774. }
  36775. var padding = opts.legend.padding * opts.pix;
  36776. var margin = opts.legend.margin * opts.pix;
  36777. var fontSize = opts.legend.fontSize ? opts.legend.fontSize * opts.pix : config.fontSize;
  36778. var shapeWidth = 15 * opts.pix;
  36779. var shapeRight = 5 * opts.pix;
  36780. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  36781. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  36782. var legendList = [];
  36783. var widthCount = 0;
  36784. var widthCountArr = [];
  36785. var currentRow = [];
  36786. for (var i = 0; i < series.length; i++) {
  36787. var item = series[i];
  36788. var itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  36789. if (widthCount + itemWidth > opts.width - opts.area[1] - opts.area[3]) {
  36790. legendList.push(currentRow);
  36791. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  36792. widthCount = itemWidth;
  36793. currentRow = [item];
  36794. } else {
  36795. widthCount += itemWidth;
  36796. currentRow.push(item);
  36797. }
  36798. }
  36799. if (currentRow.length) {
  36800. legendList.push(currentRow);
  36801. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  36802. legendData.widthArr = widthCountArr;
  36803. var legendWidth = Math.max.apply(null, widthCountArr);
  36804. switch (opts.legend.float) {
  36805. case 'left':
  36806. legendData.area.start.x = opts.area[3];
  36807. legendData.area.end.x = opts.area[3] + legendWidth + 2 * padding;
  36808. break;
  36809. case 'right':
  36810. legendData.area.start.x = opts.width - opts.area[1] - legendWidth - 2 * padding;
  36811. legendData.area.end.x = opts.width - opts.area[1];
  36812. break;
  36813. default:
  36814. legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
  36815. legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
  36816. }
  36817. legendData.area.width = legendWidth + 2 * padding;
  36818. legendData.area.wholeWidth = legendWidth + 2 * padding;
  36819. legendData.area.height = legendList.length * lineHeight + 2 * padding;
  36820. legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
  36821. legendData.points = legendList;
  36822. }
  36823. } else {
  36824. var len = series.length;
  36825. var maxHeight = opts.height - opts.area[0] - opts.area[2] - 2 * margin - 2 * padding;
  36826. var maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
  36827. legendData.area.height = maxLength * lineHeight + padding * 2;
  36828. legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
  36829. switch (opts.legend.float) {
  36830. case 'top':
  36831. legendData.area.start.y = opts.area[0] + margin;
  36832. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  36833. break;
  36834. case 'bottom':
  36835. legendData.area.start.y = opts.height - opts.area[2] - margin - legendData.area.height;
  36836. legendData.area.end.y = opts.height - opts.area[2] - margin;
  36837. break;
  36838. default:
  36839. legendData.area.start.y = (opts.height - legendData.area.height) / 2;
  36840. legendData.area.end.y = (opts.height + legendData.area.height) / 2;
  36841. }
  36842. var lineNum = len % maxLength === 0 ? len / maxLength : Math.floor(len / maxLength + 1);
  36843. var _currentRow = [];
  36844. for (var _i5 = 0; _i5 < lineNum; _i5++) {
  36845. var temp = series.slice(_i5 * maxLength, _i5 * maxLength + maxLength);
  36846. _currentRow.push(temp);
  36847. }
  36848. legendData.points = _currentRow;
  36849. if (_currentRow.length) {
  36850. for (var _i6 = 0; _i6 < _currentRow.length; _i6++) {
  36851. var _item = _currentRow[_i6];
  36852. var maxWidth = 0;
  36853. for (var j = 0; j < _item.length; j++) {
  36854. var _itemWidth = shapeWidth + shapeRight + measureText(_item[j].name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  36855. if (_itemWidth > maxWidth) {
  36856. maxWidth = _itemWidth;
  36857. }
  36858. }
  36859. legendData.widthArr.push(maxWidth);
  36860. legendData.heightArr.push(_item.length * lineHeight + padding * 2);
  36861. }
  36862. var _legendWidth = 0;
  36863. for (var _i7 = 0; _i7 < legendData.widthArr.length; _i7++) {
  36864. _legendWidth += legendData.widthArr[_i7];
  36865. }
  36866. legendData.area.width = _legendWidth - opts.legend.itemGap * opts.pix + 2 * padding;
  36867. legendData.area.wholeWidth = legendData.area.width + padding;
  36868. }
  36869. }
  36870. switch (opts.legend.position) {
  36871. case 'top':
  36872. legendData.area.start.y = opts.area[0] + margin;
  36873. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  36874. break;
  36875. case 'bottom':
  36876. legendData.area.start.y = opts.height - opts.area[2] - legendData.area.height - margin;
  36877. legendData.area.end.y = opts.height - opts.area[2] - margin;
  36878. break;
  36879. case 'left':
  36880. legendData.area.start.x = opts.area[3];
  36881. legendData.area.end.x = opts.area[3] + legendData.area.width;
  36882. break;
  36883. case 'right':
  36884. legendData.area.start.x = opts.width - opts.area[1] - legendData.area.width;
  36885. legendData.area.end.x = opts.width - opts.area[1];
  36886. break;
  36887. }
  36888. chartData.legendData = legendData;
  36889. return legendData;
  36890. }
  36891. function calCategoriesData(categories, opts, config, eachSpacing, context) {
  36892. var result = {
  36893. angle: 0,
  36894. xAxisHeight: config.xAxisHeight
  36895. };
  36896. var categoriesTextLenth = categories.map(function (item) {
  36897. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  36898. });
  36899. var maxTextLength = Math.max.apply(this, categoriesTextLenth);
  36900. if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  36901. result.angle = 45 * Math.PI / 180;
  36902. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  36903. }
  36904. return result;
  36905. }
  36906. function getXAxisTextList(series, opts, config, stack) {
  36907. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  36908. var data;
  36909. if (stack == 'stack') {
  36910. data = dataCombineStack(series, opts.categories.length);
  36911. } else {
  36912. data = dataCombine(series);
  36913. }
  36914. var sorted = [];
  36915. // remove null from data
  36916. data = data.filter(function (item) {
  36917. //return item !== null;
  36918. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  36919. if (item.constructor.toString().indexOf('Array') > -1) {
  36920. return item !== null;
  36921. } else {
  36922. return item.value !== null;
  36923. }
  36924. } else {
  36925. return item !== null;
  36926. }
  36927. });
  36928. data.map(function (item) {
  36929. if ((0, _typeof2.default)(item) === 'object') {
  36930. if (item.constructor.toString().indexOf('Array') > -1) {
  36931. if (opts.type == 'candle') {
  36932. item.map(function (subitem) {
  36933. sorted.push(subitem);
  36934. });
  36935. } else {
  36936. sorted.push(item[0]);
  36937. }
  36938. } else {
  36939. sorted.push(item.value);
  36940. }
  36941. } else {
  36942. sorted.push(item);
  36943. }
  36944. });
  36945. var minData = 0;
  36946. var maxData = 0;
  36947. if (sorted.length > 0) {
  36948. minData = Math.min.apply(this, sorted);
  36949. maxData = Math.max.apply(this, sorted);
  36950. }
  36951. //为了兼容v1.9.0之前的项目
  36952. if (index > -1) {
  36953. if (typeof opts.xAxis.data[index].min === 'number') {
  36954. minData = Math.min(opts.xAxis.data[index].min, minData);
  36955. }
  36956. if (typeof opts.xAxis.data[index].max === 'number') {
  36957. maxData = Math.max(opts.xAxis.data[index].max, maxData);
  36958. }
  36959. } else {
  36960. if (typeof opts.xAxis.min === 'number') {
  36961. minData = Math.min(opts.xAxis.min, minData);
  36962. }
  36963. if (typeof opts.xAxis.max === 'number') {
  36964. maxData = Math.max(opts.xAxis.max, maxData);
  36965. }
  36966. }
  36967. if (minData === maxData) {
  36968. var rangeSpan = maxData || 10;
  36969. maxData += rangeSpan;
  36970. }
  36971. //var dataRange = getDataRange(minData, maxData);
  36972. var minRange = minData;
  36973. var maxRange = maxData;
  36974. var range = [];
  36975. var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
  36976. for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
  36977. range.push(minRange + eachRange * i);
  36978. }
  36979. return range;
  36980. }
  36981. function calXAxisData(series, opts, config, context) {
  36982. //堆叠图重算Y轴
  36983. var columnstyle = assign({}, {
  36984. type: ""
  36985. }, opts.extra.bar);
  36986. var result = {
  36987. angle: 0,
  36988. xAxisHeight: config.xAxisHeight
  36989. };
  36990. result.ranges = getXAxisTextList(series, opts, config, columnstyle.type);
  36991. result.rangesFormat = result.ranges.map(function (item) {
  36992. //item = opts.xAxis.formatter ? opts.xAxis.formatter(item) : util.toFixed(item, 2);
  36993. item = util.toFixed(item, 2);
  36994. return item;
  36995. });
  36996. var xAxisScaleValues = result.ranges.map(function (item) {
  36997. // 如果刻度值是浮点数,则保留两位小数
  36998. item = util.toFixed(item, 2);
  36999. // 若有自定义格式则调用自定义的格式化函数
  37000. //item = opts.xAxis.formatter ? opts.xAxis.formatter(Number(item)) : item;
  37001. return item;
  37002. });
  37003. result = Object.assign(result, getXAxisPoints(xAxisScaleValues, opts, config));
  37004. // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
  37005. var eachSpacing = result.eachSpacing;
  37006. var textLength = xAxisScaleValues.map(function (item) {
  37007. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  37008. });
  37009. // get max length of categories text
  37010. var maxTextLength = Math.max.apply(this, textLength);
  37011. // 如果刻度值文本内容过长,则将其逆时针旋转45°
  37012. if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  37013. result.angle = 45 * Math.PI / 180;
  37014. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  37015. }
  37016. if (opts.xAxis.disabled === true) {
  37017. result.xAxisHeight = 0;
  37018. }
  37019. return result;
  37020. }
  37021. function getRadarDataPoints(angleList, center, radius, series, opts) {
  37022. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  37023. var radarOption = opts.extra.radar || {};
  37024. radarOption.max = radarOption.max || 0;
  37025. var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
  37026. var data = [];
  37027. var _loop2 = function _loop2(i) {
  37028. var each = series[i];
  37029. var listItem = {};
  37030. listItem.color = each.color;
  37031. listItem.legendShape = each.legendShape;
  37032. listItem.pointShape = each.pointShape;
  37033. listItem.data = [];
  37034. each.data.forEach(function (item, index) {
  37035. var tmp = {};
  37036. tmp.angle = angleList[index];
  37037. tmp.proportion = item / maxData;
  37038. tmp.value = item;
  37039. tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center);
  37040. listItem.data.push(tmp);
  37041. });
  37042. data.push(listItem);
  37043. };
  37044. for (var i = 0; i < series.length; i++) {
  37045. _loop2(i);
  37046. }
  37047. return data;
  37048. }
  37049. function getPieDataPoints(series, radius) {
  37050. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  37051. var count = 0;
  37052. var _start_ = 0;
  37053. for (var i = 0; i < series.length; i++) {
  37054. var item = series[i];
  37055. item.data = item.data === null ? 0 : item.data;
  37056. count += item.data;
  37057. }
  37058. for (var _i8 = 0; _i8 < series.length; _i8++) {
  37059. var _item2 = series[_i8];
  37060. _item2.data = _item2.data === null ? 0 : _item2.data;
  37061. if (count === 0) {
  37062. _item2._proportion_ = 1 / series.length * process;
  37063. } else {
  37064. _item2._proportion_ = _item2.data / count * process;
  37065. }
  37066. _item2._radius_ = radius;
  37067. }
  37068. for (var _i9 = 0; _i9 < series.length; _i9++) {
  37069. var _item3 = series[_i9];
  37070. _item3._start_ = _start_;
  37071. _start_ += 2 * _item3._proportion_ * Math.PI;
  37072. }
  37073. return series;
  37074. }
  37075. function getFunnelDataPoints(series, radius, type, eachSpacing) {
  37076. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37077. series = series.sort(function (a, b) {
  37078. return parseInt(b.data) - parseInt(a.data);
  37079. });
  37080. for (var i = 0; i < series.length; i++) {
  37081. if (type == 'funnel') {
  37082. series[i].radius = series[i].data / series[0].data * radius * process;
  37083. } else {
  37084. series[i].radius = eachSpacing * (series.length - i) / (eachSpacing * series.length) * radius * process;
  37085. }
  37086. series[i]._proportion_ = series[i].data / series[0].data;
  37087. }
  37088. if (type !== 'pyramid') {
  37089. series.reverse();
  37090. }
  37091. return series;
  37092. }
  37093. function getRoseDataPoints(series, type, minRadius, radius) {
  37094. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37095. var count = 0;
  37096. var _start_ = 0;
  37097. var dataArr = [];
  37098. for (var i = 0; i < series.length; i++) {
  37099. var item = series[i];
  37100. item.data = item.data === null ? 0 : item.data;
  37101. count += item.data;
  37102. dataArr.push(item.data);
  37103. }
  37104. var minData = Math.min.apply(null, dataArr);
  37105. var maxData = Math.max.apply(null, dataArr);
  37106. var radiusLength = radius - minRadius;
  37107. for (var _i10 = 0; _i10 < series.length; _i10++) {
  37108. var _item4 = series[_i10];
  37109. _item4.data = _item4.data === null ? 0 : _item4.data;
  37110. if (count === 0) {
  37111. _item4._proportion_ = 1 / series.length * process;
  37112. _item4._rose_proportion_ = 1 / series.length * process;
  37113. } else {
  37114. _item4._proportion_ = _item4.data / count * process;
  37115. if (type == 'area') {
  37116. _item4._rose_proportion_ = 1 / series.length * process;
  37117. } else {
  37118. _item4._rose_proportion_ = _item4.data / count * process;
  37119. }
  37120. }
  37121. _item4._radius_ = minRadius + radiusLength * ((_item4.data - minData) / (maxData - minData)) || radius;
  37122. }
  37123. for (var _i11 = 0; _i11 < series.length; _i11++) {
  37124. var _item5 = series[_i11];
  37125. _item5._start_ = _start_;
  37126. _start_ += 2 * _item5._rose_proportion_ * Math.PI;
  37127. }
  37128. return series;
  37129. }
  37130. function getArcbarDataPoints(series, arcbarOption) {
  37131. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  37132. if (process == 1) {
  37133. process = 0.999999;
  37134. }
  37135. for (var i = 0; i < series.length; i++) {
  37136. var item = series[i];
  37137. item.data = item.data === null ? 0 : item.data;
  37138. var totalAngle = void 0;
  37139. if (arcbarOption.type == 'circle') {
  37140. totalAngle = 2;
  37141. } else {
  37142. if (arcbarOption.endAngle < arcbarOption.startAngle) {
  37143. totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
  37144. } else {
  37145. totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
  37146. }
  37147. }
  37148. item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
  37149. if (item._proportion_ >= 2) {
  37150. item._proportion_ = item._proportion_ % 2;
  37151. }
  37152. }
  37153. return series;
  37154. }
  37155. function getGaugeAxisPoints(categories, startAngle, endAngle) {
  37156. var totalAngle = startAngle - endAngle + 1;
  37157. var tempStartAngle = startAngle;
  37158. for (var i = 0; i < categories.length; i++) {
  37159. categories[i].value = categories[i].value === null ? 0 : categories[i].value;
  37160. categories[i]._startAngle_ = tempStartAngle;
  37161. categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
  37162. if (categories[i]._endAngle_ >= 2) {
  37163. categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
  37164. }
  37165. tempStartAngle = categories[i]._endAngle_;
  37166. }
  37167. return categories;
  37168. }
  37169. function getGaugeDataPoints(series, categories, gaugeOption) {
  37170. var process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
  37171. for (var i = 0; i < series.length; i++) {
  37172. var item = series[i];
  37173. item.data = item.data === null ? 0 : item.data;
  37174. if (gaugeOption.pointer.color == 'auto') {
  37175. for (var _i12 = 0; _i12 < categories.length; _i12++) {
  37176. if (item.data <= categories[_i12].value) {
  37177. item.color = categories[_i12].color;
  37178. break;
  37179. }
  37180. }
  37181. } else {
  37182. item.color = gaugeOption.pointer.color;
  37183. }
  37184. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  37185. item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
  37186. item._oldAngle_ = gaugeOption.oldAngle;
  37187. if (gaugeOption.oldAngle < gaugeOption.endAngle) {
  37188. item._oldAngle_ += 2;
  37189. }
  37190. if (item.data >= gaugeOption.oldData) {
  37191. item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
  37192. } else {
  37193. item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
  37194. }
  37195. if (item._proportion_ >= 2) {
  37196. item._proportion_ = item._proportion_ % 2;
  37197. }
  37198. }
  37199. return series;
  37200. }
  37201. function getPieTextMaxLength(series, config, context, opts) {
  37202. series = getPieDataPoints(series);
  37203. var maxLength = 0;
  37204. for (var i = 0; i < series.length; i++) {
  37205. var item = series[i];
  37206. var text = item.formatter ? item.formatter(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  37207. maxLength = Math.max(maxLength, measureText(text, item.textSize * opts.pix || config.fontSize, context));
  37208. }
  37209. return maxLength;
  37210. }
  37211. function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
  37212. return points.map(function (item) {
  37213. if (item === null) {
  37214. return null;
  37215. }
  37216. var seriesGap = 0;
  37217. var categoryGap = 0;
  37218. if (opts.type == 'mix') {
  37219. seriesGap = opts.extra.mix.column.seriesGap * opts.pix || 0;
  37220. categoryGap = opts.extra.mix.column.categoryGap * opts.pix || 0;
  37221. } else {
  37222. seriesGap = opts.extra.column.seriesGap * opts.pix || 0;
  37223. categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  37224. }
  37225. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  37226. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  37227. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  37228. if (opts.extra.mix && opts.extra.mix.column.width && +opts.extra.mix.column.width > 0) {
  37229. item.width = Math.min(item.width, +opts.extra.mix.column.width * opts.pix);
  37230. }
  37231. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  37232. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  37233. }
  37234. if (item.width <= 0) {
  37235. item.width = 1;
  37236. }
  37237. item.x += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  37238. return item;
  37239. });
  37240. }
  37241. function fixBarData(points, eachSpacing, columnLen, index, config, opts) {
  37242. return points.map(function (item) {
  37243. if (item === null) {
  37244. return null;
  37245. }
  37246. var seriesGap = 0;
  37247. var categoryGap = 0;
  37248. seriesGap = opts.extra.bar.seriesGap * opts.pix || 0;
  37249. categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  37250. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  37251. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  37252. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  37253. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  37254. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  37255. }
  37256. if (item.width <= 0) {
  37257. item.width = 1;
  37258. }
  37259. item.y += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  37260. return item;
  37261. });
  37262. }
  37263. function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
  37264. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  37265. return points.map(function (item) {
  37266. if (item === null) {
  37267. return null;
  37268. }
  37269. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  37270. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  37271. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  37272. }
  37273. if (index > 0) {
  37274. item.width -= 2 * border;
  37275. }
  37276. return item;
  37277. });
  37278. }
  37279. function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  37280. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  37281. return points.map(function (item, indexn) {
  37282. if (item === null) {
  37283. return null;
  37284. }
  37285. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  37286. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  37287. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  37288. }
  37289. if (item.width <= 0) {
  37290. item.width = 1;
  37291. }
  37292. return item;
  37293. });
  37294. }
  37295. function fixBarStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  37296. var categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  37297. return points.map(function (item, indexn) {
  37298. if (item === null) {
  37299. return null;
  37300. }
  37301. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  37302. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  37303. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  37304. }
  37305. if (item.width <= 0) {
  37306. item.width = 1;
  37307. }
  37308. return item;
  37309. });
  37310. }
  37311. function getXAxisPoints(categories, opts, config) {
  37312. var spacingValid = opts.width - opts.area[1] - opts.area[3];
  37313. var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
  37314. if ((opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble' || opts.type == 'bar') && dataCount > 1 && opts.xAxis.boundaryGap == 'justify') {
  37315. dataCount -= 1;
  37316. }
  37317. var eachSpacing = spacingValid / dataCount;
  37318. var xAxisPoints = [];
  37319. var startX = opts.area[3];
  37320. var endX = opts.width - opts.area[1];
  37321. categories.forEach(function (item, index) {
  37322. xAxisPoints.push(startX + index * eachSpacing);
  37323. });
  37324. if (opts.xAxis.boundaryGap !== 'justify') {
  37325. if (opts.enableScroll === true) {
  37326. xAxisPoints.push(startX + categories.length * eachSpacing);
  37327. } else {
  37328. xAxisPoints.push(endX);
  37329. }
  37330. }
  37331. return {
  37332. xAxisPoints: xAxisPoints,
  37333. startX: startX,
  37334. endX: endX,
  37335. eachSpacing: eachSpacing
  37336. };
  37337. }
  37338. function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  37339. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  37340. var points = [];
  37341. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37342. data.forEach(function (item, index) {
  37343. if (item === null) {
  37344. points.push(null);
  37345. } else {
  37346. var cPoints = [];
  37347. item.forEach(function (items, indexs) {
  37348. var point = {};
  37349. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  37350. var value = items.value || items;
  37351. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37352. height *= process;
  37353. point.y = opts.height - Math.round(height) - opts.area[2];
  37354. cPoints.push(point);
  37355. });
  37356. points.push(cPoints);
  37357. }
  37358. });
  37359. return points;
  37360. }
  37361. function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  37362. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  37363. var boundaryGap = 'center';
  37364. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  37365. boundaryGap = opts.xAxis.boundaryGap;
  37366. }
  37367. var points = [];
  37368. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37369. var validWidth = opts.width - opts.area[1] - opts.area[3];
  37370. data.forEach(function (item, index) {
  37371. if (item === null) {
  37372. points.push(null);
  37373. } else {
  37374. var point = {};
  37375. point.color = item.color;
  37376. point.x = xAxisPoints[index];
  37377. var value = item;
  37378. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  37379. if (item.constructor.toString().indexOf('Array') > -1) {
  37380. var xranges, xminRange, xmaxRange;
  37381. xranges = [].concat(opts.chartData.xAxisData.ranges);
  37382. xminRange = xranges.shift();
  37383. xmaxRange = xranges.pop();
  37384. value = item[1];
  37385. point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
  37386. if (opts.type == 'bubble') {
  37387. point.r = item[2];
  37388. point.t = item[3];
  37389. }
  37390. } else {
  37391. value = item.value;
  37392. }
  37393. }
  37394. if (boundaryGap == 'center') {
  37395. point.x += eachSpacing / 2;
  37396. }
  37397. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37398. height *= process;
  37399. point.y = opts.height - height - opts.area[2];
  37400. points.push(point);
  37401. }
  37402. });
  37403. return points;
  37404. }
  37405. function getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config) {
  37406. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  37407. var points = [];
  37408. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37409. var validWidth = opts.width - opts.area[1] - opts.area[3];
  37410. data.forEach(function (item, index) {
  37411. if (item === null) {
  37412. points.push(null);
  37413. } else {
  37414. var point = {};
  37415. point.color = item.color;
  37416. point.y = yAxisPoints[index];
  37417. var value = item;
  37418. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  37419. value = item.value;
  37420. }
  37421. var height = validWidth * (value - minRange) / (maxRange - minRange);
  37422. height *= process;
  37423. point.height = height;
  37424. point.value = value;
  37425. point.x = height + opts.area[3];
  37426. points.push(point);
  37427. }
  37428. });
  37429. return points;
  37430. }
  37431. function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  37432. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  37433. var points = [];
  37434. var validHeight = opts.height - opts.area[0] - opts.area[2];
  37435. data.forEach(function (item, index) {
  37436. if (item === null) {
  37437. points.push(null);
  37438. } else {
  37439. var point = {};
  37440. point.color = item.color;
  37441. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  37442. if (seriesIndex > 0) {
  37443. var value = 0;
  37444. for (var i = 0; i <= seriesIndex; i++) {
  37445. value += stackSeries[i].data[index];
  37446. }
  37447. var value0 = value - item;
  37448. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37449. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  37450. } else {
  37451. var value = item;
  37452. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37453. var height0 = 0;
  37454. }
  37455. var heightc = height0;
  37456. height *= process;
  37457. heightc *= process;
  37458. point.y = opts.height - Math.round(height) - opts.area[2];
  37459. point.y0 = opts.height - Math.round(heightc) - opts.area[2];
  37460. points.push(point);
  37461. }
  37462. });
  37463. return points;
  37464. }
  37465. function getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  37466. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  37467. var points = [];
  37468. var validHeight = opts.width - opts.area[1] - opts.area[3];
  37469. data.forEach(function (item, index) {
  37470. if (item === null) {
  37471. points.push(null);
  37472. } else {
  37473. var point = {};
  37474. point.color = item.color;
  37475. point.y = yAxisPoints[index];
  37476. if (seriesIndex > 0) {
  37477. var value = 0;
  37478. for (var i = 0; i <= seriesIndex; i++) {
  37479. value += stackSeries[i].data[index];
  37480. }
  37481. var value0 = value - item;
  37482. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37483. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  37484. } else {
  37485. var value = item;
  37486. var height = validHeight * (value - minRange) / (maxRange - minRange);
  37487. var height0 = 0;
  37488. }
  37489. var heightc = height0;
  37490. height *= process;
  37491. heightc *= process;
  37492. point.height = height - heightc;
  37493. point.x = opts.area[3] + height;
  37494. point.x0 = opts.area[3] + heightc;
  37495. points.push(point);
  37496. }
  37497. });
  37498. return points;
  37499. }
  37500. function getYAxisTextList(series, opts, config, stack, yData) {
  37501. var index = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : -1;
  37502. var data;
  37503. if (stack == 'stack') {
  37504. data = dataCombineStack(series, opts.categories.length);
  37505. } else {
  37506. data = dataCombine(series);
  37507. }
  37508. var sorted = [];
  37509. // remove null from data
  37510. data = data.filter(function (item) {
  37511. //return item !== null;
  37512. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  37513. if (item.constructor.toString().indexOf('Array') > -1) {
  37514. return item !== null;
  37515. } else {
  37516. return item.value !== null;
  37517. }
  37518. } else {
  37519. return item !== null;
  37520. }
  37521. });
  37522. data.map(function (item) {
  37523. if ((0, _typeof2.default)(item) === 'object') {
  37524. if (item.constructor.toString().indexOf('Array') > -1) {
  37525. if (opts.type == 'candle') {
  37526. item.map(function (subitem) {
  37527. sorted.push(subitem);
  37528. });
  37529. } else {
  37530. sorted.push(item[1]);
  37531. }
  37532. } else {
  37533. sorted.push(item.value);
  37534. }
  37535. } else {
  37536. sorted.push(item);
  37537. }
  37538. });
  37539. var minData = yData.min || 0;
  37540. var maxData = yData.max || 0;
  37541. if (sorted.length > 0) {
  37542. minData = Math.min.apply(this, sorted);
  37543. maxData = Math.max.apply(this, sorted);
  37544. }
  37545. //为了兼容v1.9.0之前的项目
  37546. // if (index > -1) {
  37547. // if (typeof opts.yAxis.data[index].min === 'number') {
  37548. // minData = Math.min(opts.yAxis.data[index].min, minData);
  37549. // }
  37550. // if (typeof opts.yAxis.data[index].max === 'number') {
  37551. // maxData = Math.max(opts.yAxis.data[index].max, maxData);
  37552. // }
  37553. // } else {
  37554. // if (typeof opts.yAxis.min === 'number') {
  37555. // minData = Math.min(opts.yAxis.min, minData);
  37556. // }
  37557. // if (typeof opts.yAxis.max === 'number') {
  37558. // maxData = Math.max(opts.yAxis.max, maxData);
  37559. // }
  37560. // }
  37561. if (minData === maxData) {
  37562. var rangeSpan = maxData || 10;
  37563. maxData += rangeSpan;
  37564. }
  37565. var dataRange = getDataRange(minData, maxData);
  37566. var minRange = yData.min === undefined || yData.min === null ? dataRange.minRange : yData.min;
  37567. var maxRange = yData.max === undefined || yData.min === null ? dataRange.maxRange : yData.max;
  37568. var range = [];
  37569. var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
  37570. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  37571. range.push(minRange + eachRange * i);
  37572. }
  37573. return range.reverse();
  37574. }
  37575. function calYAxisData(series, opts, config, context) {
  37576. //堆叠图重算Y轴
  37577. var columnstyle = assign({}, {
  37578. type: ""
  37579. }, opts.extra.column);
  37580. //如果是多Y轴,重新计算
  37581. var YLength = opts.yAxis.data.length;
  37582. var newSeries = new Array(YLength);
  37583. if (YLength > 0) {
  37584. for (var i = 0; i < YLength; i++) {
  37585. newSeries[i] = [];
  37586. for (var j = 0; j < series.length; j++) {
  37587. if (series[j].index == i) {
  37588. newSeries[i].push(series[j]);
  37589. }
  37590. }
  37591. }
  37592. var rangesArr = new Array(YLength);
  37593. var rangesFormatArr = new Array(YLength);
  37594. var yAxisWidthArr = new Array(YLength);
  37595. var _loop3 = function _loop3(_i13) {
  37596. var yData = opts.yAxis.data[_i13];
  37597. //如果总开关不显示,强制每个Y轴为不显示
  37598. if (opts.yAxis.disabled == true) {
  37599. yData.disabled = true;
  37600. }
  37601. if (yData.type === 'categories') {
  37602. if (!yData.formatter) {
  37603. yData.formatter = function (val) {
  37604. return val + (yData.unit || '');
  37605. };
  37606. }
  37607. yData.categories = yData.categories || opts.categories;
  37608. rangesArr[_i13] = yData.categories;
  37609. } else {
  37610. if (!yData.formatter) {
  37611. yData.formatter = function (val) {
  37612. return val.toFixed(yData.tofix) + (yData.unit || '');
  37613. };
  37614. }
  37615. rangesArr[_i13] = getYAxisTextList(newSeries[_i13], opts, config, columnstyle.type, yData, _i13);
  37616. }
  37617. var yAxisFontSizes = yData.fontSize * opts.pix || config.fontSize;
  37618. yAxisWidthArr[_i13] = {
  37619. position: yData.position ? yData.position : 'left',
  37620. width: 0
  37621. };
  37622. rangesFormatArr[_i13] = rangesArr[_i13].map(function (items) {
  37623. items = yData.formatter(items);
  37624. yAxisWidthArr[_i13].width = Math.max(yAxisWidthArr[_i13].width, measureText(items, yAxisFontSizes, context) + 5);
  37625. return items;
  37626. });
  37627. var calibration = yData.calibration ? 4 * opts.pix : 0;
  37628. yAxisWidthArr[_i13].width += calibration + 3 * opts.pix;
  37629. if (yData.disabled === true) {
  37630. yAxisWidthArr[_i13].width = 0;
  37631. }
  37632. };
  37633. for (var _i13 = 0; _i13 < YLength; _i13++) {
  37634. _loop3(_i13);
  37635. }
  37636. } else {
  37637. var rangesArr = new Array(1);
  37638. var rangesFormatArr = new Array(1);
  37639. var yAxisWidthArr = new Array(1);
  37640. if (opts.type === 'bar') {
  37641. rangesArr[0] = opts.categories;
  37642. if (!opts.yAxis.formatter) {
  37643. opts.yAxis.formatter = function (val) {
  37644. return val + (opts.yAxis.unit || '');
  37645. };
  37646. }
  37647. } else {
  37648. if (!opts.yAxis.formatter) {
  37649. opts.yAxis.formatter = function (val) {
  37650. return val.toFixed(opts.yAxis.tofix) + (opts.yAxis.unit || '');
  37651. };
  37652. }
  37653. rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type, {});
  37654. }
  37655. yAxisWidthArr[0] = {
  37656. position: 'left',
  37657. width: 0
  37658. };
  37659. var yAxisFontSize = opts.yAxis.fontSize * opts.pix || config.fontSize;
  37660. rangesFormatArr[0] = rangesArr[0].map(function (item) {
  37661. item = opts.yAxis.formatter(item);
  37662. yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize, context) + 5);
  37663. return item;
  37664. });
  37665. yAxisWidthArr[0].width += 3 * opts.pix;
  37666. if (opts.yAxis.disabled === true) {
  37667. yAxisWidthArr[0] = {
  37668. position: 'left',
  37669. width: 0
  37670. };
  37671. opts.yAxis.data[0] = {
  37672. disabled: true
  37673. };
  37674. } else {
  37675. opts.yAxis.data[0] = {
  37676. disabled: false,
  37677. position: 'left',
  37678. max: opts.yAxis.max,
  37679. min: opts.yAxis.min,
  37680. formatter: opts.yAxis.formatter
  37681. };
  37682. if (opts.type === 'bar') {
  37683. opts.yAxis.data[0].categories = opts.categories;
  37684. opts.yAxis.data[0].type = 'categories';
  37685. }
  37686. }
  37687. }
  37688. return {
  37689. rangesFormat: rangesFormatArr,
  37690. ranges: rangesArr,
  37691. yAxisWidth: yAxisWidthArr
  37692. };
  37693. }
  37694. function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
  37695. var ranges = [].concat(opts.chartData.yAxisData.ranges);
  37696. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  37697. var minAxis = opts.area[0];
  37698. var items = [];
  37699. for (var i = 0; i < ranges.length; i++) {
  37700. var maxVal = ranges[i].shift();
  37701. var minVal = ranges[i].pop();
  37702. var item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
  37703. item = opts.yAxis.data[i].formatter ? opts.yAxis.data[i].formatter(item) : item.toFixed(0);
  37704. items.push(String(item));
  37705. }
  37706. return items;
  37707. }
  37708. function calMarkLineData(points, opts) {
  37709. var minRange, maxRange;
  37710. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  37711. for (var i = 0; i < points.length; i++) {
  37712. points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex : 0;
  37713. var range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
  37714. minRange = range.pop();
  37715. maxRange = range.shift();
  37716. var height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
  37717. points[i].y = opts.height - Math.round(height) - opts.area[2];
  37718. }
  37719. return points;
  37720. }
  37721. function contextRotate(context, opts) {
  37722. if (opts.rotateLock !== true) {
  37723. context.translate(opts.height, 0);
  37724. context.rotate(90 * Math.PI / 180);
  37725. } else if (opts._rotate_ !== true) {
  37726. context.translate(opts.height, 0);
  37727. context.rotate(90 * Math.PI / 180);
  37728. opts._rotate_ = true;
  37729. }
  37730. }
  37731. function drawPointShape(points, color, shape, context, opts) {
  37732. context.beginPath();
  37733. if (opts.dataPointShapeType == 'hollow') {
  37734. context.setStrokeStyle(color);
  37735. context.setFillStyle(opts.background);
  37736. context.setLineWidth(2 * opts.pix);
  37737. } else {
  37738. context.setStrokeStyle("#ffffff");
  37739. context.setFillStyle(color);
  37740. context.setLineWidth(1 * opts.pix);
  37741. }
  37742. if (shape === 'diamond') {
  37743. points.forEach(function (item, index) {
  37744. if (item !== null) {
  37745. context.moveTo(item.x, item.y - 4.5);
  37746. context.lineTo(item.x - 4.5, item.y);
  37747. context.lineTo(item.x, item.y + 4.5);
  37748. context.lineTo(item.x + 4.5, item.y);
  37749. context.lineTo(item.x, item.y - 4.5);
  37750. }
  37751. });
  37752. } else if (shape === 'circle') {
  37753. points.forEach(function (item, index) {
  37754. if (item !== null) {
  37755. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  37756. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  37757. }
  37758. });
  37759. } else if (shape === 'square') {
  37760. points.forEach(function (item, index) {
  37761. if (item !== null) {
  37762. context.moveTo(item.x - 3.5, item.y - 3.5);
  37763. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  37764. }
  37765. });
  37766. } else if (shape === 'triangle') {
  37767. points.forEach(function (item, index) {
  37768. if (item !== null) {
  37769. context.moveTo(item.x, item.y - 4.5);
  37770. context.lineTo(item.x - 4.5, item.y + 4.5);
  37771. context.lineTo(item.x + 4.5, item.y + 4.5);
  37772. context.lineTo(item.x, item.y - 4.5);
  37773. }
  37774. });
  37775. } else if (shape === 'triangle') {
  37776. return;
  37777. }
  37778. context.closePath();
  37779. context.fill();
  37780. context.stroke();
  37781. }
  37782. function drawRingTitle(opts, config, context, center) {
  37783. var titlefontSize = opts.title.fontSize || config.titleFontSize;
  37784. var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
  37785. var title = opts.title.name || '';
  37786. var subtitle = opts.subtitle.name || '';
  37787. var titleFontColor = opts.title.color || opts.fontColor;
  37788. var subtitleFontColor = opts.subtitle.color || opts.fontColor;
  37789. var titleHeight = title ? titlefontSize : 0;
  37790. var subtitleHeight = subtitle ? subtitlefontSize : 0;
  37791. var margin = 5;
  37792. if (subtitle) {
  37793. var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context);
  37794. var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0) * opts.pix;
  37795. var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix;
  37796. if (title) {
  37797. startY += (titleHeight * opts.pix + margin) / 2;
  37798. }
  37799. context.beginPath();
  37800. context.setFontSize(subtitlefontSize * opts.pix);
  37801. context.setFillStyle(subtitleFontColor);
  37802. context.fillText(subtitle, startX, startY);
  37803. context.closePath();
  37804. context.stroke();
  37805. }
  37806. if (title) {
  37807. var _textWidth = measureText(title, titlefontSize * opts.pix, context);
  37808. var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
  37809. var _startY = center.y + titlefontSize * opts.pix / 2 + (opts.title.offsetY || 0) * opts.pix;
  37810. if (subtitle) {
  37811. _startY -= (subtitleHeight * opts.pix + margin) / 2;
  37812. }
  37813. context.beginPath();
  37814. context.setFontSize(titlefontSize * opts.pix);
  37815. context.setFillStyle(titleFontColor);
  37816. context.fillText(title, _startX, _startY);
  37817. context.closePath();
  37818. context.stroke();
  37819. }
  37820. }
  37821. function drawPointText(points, series, config, context, opts) {
  37822. // 绘制数据文案
  37823. var data = series.data;
  37824. var textOffset = series.textOffset ? series.textOffset : 0;
  37825. points.forEach(function (item, index) {
  37826. if (item !== null) {
  37827. context.beginPath();
  37828. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  37829. context.setFontSize(fontSize);
  37830. context.setFillStyle(series.textColor || opts.fontColor);
  37831. var value = data[index];
  37832. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  37833. if (data[index].constructor.toString().indexOf('Array') > -1) {
  37834. value = data[index][1];
  37835. } else {
  37836. value = data[index].value;
  37837. }
  37838. }
  37839. var formatVal = series.formatter ? series.formatter(value, index) : value;
  37840. context.setTextAlign('center');
  37841. context.fillText(String(formatVal), item.x, item.y - 4 + textOffset * opts.pix);
  37842. context.closePath();
  37843. context.stroke();
  37844. context.setTextAlign('left');
  37845. }
  37846. });
  37847. }
  37848. function drawBarPointText(points, series, config, context, opts) {
  37849. // 绘制数据文案
  37850. var data = series.data;
  37851. var textOffset = series.textOffset ? series.textOffset : 0;
  37852. points.forEach(function (item, index) {
  37853. if (item !== null) {
  37854. context.beginPath();
  37855. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  37856. context.setFontSize(fontSize);
  37857. context.setFillStyle(series.textColor || opts.fontColor);
  37858. var value = data[index];
  37859. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  37860. value = data[index].value;
  37861. }
  37862. var formatVal = series.formatter ? series.formatter(value, index) : value;
  37863. context.setTextAlign('left');
  37864. context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
  37865. context.closePath();
  37866. context.stroke();
  37867. }
  37868. });
  37869. }
  37870. function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
  37871. radius -= gaugeOption.width / 2 + gaugeOption.labelOffset * opts.pix;
  37872. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  37873. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  37874. var totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
  37875. var splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
  37876. var nowAngle = gaugeOption.startAngle;
  37877. var nowNumber = gaugeOption.startNumber;
  37878. for (var i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
  37879. var pos = {
  37880. x: radius * Math.cos(nowAngle * Math.PI),
  37881. y: radius * Math.sin(nowAngle * Math.PI)
  37882. };
  37883. var labelText = gaugeOption.formatter ? gaugeOption.formatter(nowNumber) : nowNumber;
  37884. pos.x += centerPosition.x - measureText(labelText, config.fontSize, context) / 2;
  37885. pos.y += centerPosition.y;
  37886. var startX = pos.x;
  37887. var startY = pos.y;
  37888. context.beginPath();
  37889. context.setFontSize(config.fontSize);
  37890. context.setFillStyle(gaugeOption.labelColor || opts.fontColor);
  37891. context.fillText(labelText, startX, startY + config.fontSize / 2);
  37892. context.closePath();
  37893. context.stroke();
  37894. nowAngle += splitAngle;
  37895. if (nowAngle >= 2) {
  37896. nowAngle = nowAngle % 2;
  37897. }
  37898. nowNumber += splitNumber;
  37899. }
  37900. }
  37901. function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
  37902. var radarOption = opts.extra.radar || {};
  37903. radius += config.radarLabelTextMargin * opts.pix;
  37904. angleList.forEach(function (angle, index) {
  37905. var pos = {
  37906. x: radius * Math.cos(angle),
  37907. y: radius * Math.sin(angle)
  37908. };
  37909. var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
  37910. var startX = posRelativeCanvas.x;
  37911. var startY = posRelativeCanvas.y;
  37912. if (util.approximatelyEqual(pos.x, 0)) {
  37913. startX -= measureText(opts.categories[index] || '', config.fontSize, context) / 2;
  37914. } else if (pos.x < 0) {
  37915. startX -= measureText(opts.categories[index] || '', config.fontSize, context);
  37916. }
  37917. context.beginPath();
  37918. context.setFontSize(config.fontSize);
  37919. context.setFillStyle(radarOption.labelColor || opts.fontColor);
  37920. context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
  37921. context.closePath();
  37922. context.stroke();
  37923. });
  37924. }
  37925. function drawPieText(series, opts, config, context, radius, center) {
  37926. var lineRadius = config.pieChartLinePadding;
  37927. var textObjectCollection = [];
  37928. var lastTextObject = null;
  37929. var seriesConvert = series.map(function (item, index, series) {
  37930. var text = item.formatter ? item.formatter(item, index, series) : util.toFixed(item._proportion_.toFixed(4) * 100) + '%';
  37931. var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
  37932. if (item._rose_proportion_) {
  37933. arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._rose_proportion_ / 2);
  37934. }
  37935. var color = item.color;
  37936. var radius = item._radius_;
  37937. return {
  37938. arc: arc,
  37939. text: text,
  37940. color: color,
  37941. radius: radius,
  37942. textColor: item.textColor,
  37943. textSize: item.textSize
  37944. };
  37945. });
  37946. for (var i = 0; i < seriesConvert.length; i++) {
  37947. var item = seriesConvert[i];
  37948. // line end
  37949. var orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
  37950. var orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
  37951. // line start
  37952. var orginX2 = Math.cos(item.arc) * item.radius;
  37953. var orginY2 = Math.sin(item.arc) * item.radius;
  37954. // text start
  37955. var orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
  37956. var orginY3 = orginY1;
  37957. var textWidth = measureText(item.text, item.textSize * opts.pix || config.fontSize, context);
  37958. var startY = orginY3;
  37959. if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
  37960. x: orginX3
  37961. })) {
  37962. if (orginX3 > 0) {
  37963. startY = Math.min(orginY3, lastTextObject.start.y);
  37964. } else if (orginX1 < 0) {
  37965. startY = Math.max(orginY3, lastTextObject.start.y);
  37966. } else {
  37967. if (orginY3 > 0) {
  37968. startY = Math.max(orginY3, lastTextObject.start.y);
  37969. } else {
  37970. startY = Math.min(orginY3, lastTextObject.start.y);
  37971. }
  37972. }
  37973. }
  37974. if (orginX3 < 0) {
  37975. orginX3 -= textWidth;
  37976. }
  37977. var textObject = {
  37978. lineStart: {
  37979. x: orginX2,
  37980. y: orginY2
  37981. },
  37982. lineEnd: {
  37983. x: orginX1,
  37984. y: orginY1
  37985. },
  37986. start: {
  37987. x: orginX3,
  37988. y: startY
  37989. },
  37990. width: textWidth,
  37991. height: config.fontSize,
  37992. text: item.text,
  37993. color: item.color,
  37994. textColor: item.textColor,
  37995. textSize: item.textSize
  37996. };
  37997. lastTextObject = avoidCollision(textObject, lastTextObject);
  37998. textObjectCollection.push(lastTextObject);
  37999. }
  38000. for (var _i14 = 0; _i14 < textObjectCollection.length; _i14++) {
  38001. var _item6 = textObjectCollection[_i14];
  38002. var lineStartPoistion = convertCoordinateOrigin(_item6.lineStart.x, _item6.lineStart.y, center);
  38003. var lineEndPoistion = convertCoordinateOrigin(_item6.lineEnd.x, _item6.lineEnd.y, center);
  38004. var textPosition = convertCoordinateOrigin(_item6.start.x, _item6.start.y, center);
  38005. context.setLineWidth(1 * opts.pix);
  38006. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  38007. context.beginPath();
  38008. context.setStrokeStyle(_item6.color);
  38009. context.setFillStyle(_item6.color);
  38010. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  38011. var curveStartX = _item6.start.x < 0 ? textPosition.x + _item6.width : textPosition.x;
  38012. var textStartX = _item6.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
  38013. context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
  38014. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  38015. context.stroke();
  38016. context.closePath();
  38017. context.beginPath();
  38018. context.moveTo(textPosition.x + _item6.width, textPosition.y);
  38019. context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);
  38020. context.closePath();
  38021. context.fill();
  38022. context.beginPath();
  38023. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  38024. context.setFillStyle(_item6.textColor || opts.fontColor);
  38025. context.fillText(_item6.text, textStartX, textPosition.y + 3);
  38026. context.closePath();
  38027. context.stroke();
  38028. context.closePath();
  38029. }
  38030. }
  38031. function drawToolTipSplitLine(offsetX, opts, config, context) {
  38032. var toolTipOption = opts.extra.tooltip || {};
  38033. toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
  38034. toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
  38035. var startY = opts.area[0];
  38036. var endY = opts.height - opts.area[2];
  38037. if (toolTipOption.gridType == 'dash') {
  38038. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  38039. }
  38040. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  38041. context.setLineWidth(1 * opts.pix);
  38042. context.beginPath();
  38043. context.moveTo(offsetX, startY);
  38044. context.lineTo(offsetX, endY);
  38045. context.stroke();
  38046. context.setLineDash([]);
  38047. if (toolTipOption.xAxisLabel) {
  38048. var labelText = opts.categories[opts.tooltip.index];
  38049. context.setFontSize(config.fontSize);
  38050. var textWidth = measureText(labelText, config.fontSize, context);
  38051. var textX = offsetX - 0.5 * textWidth;
  38052. var textY = endY;
  38053. context.beginPath();
  38054. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  38055. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  38056. context.setLineWidth(1 * opts.pix);
  38057. context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);
  38058. context.closePath();
  38059. context.stroke();
  38060. context.fill();
  38061. context.beginPath();
  38062. context.setFontSize(config.fontSize);
  38063. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  38064. context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);
  38065. context.closePath();
  38066. context.stroke();
  38067. }
  38068. }
  38069. function drawMarkLine(opts, config, context) {
  38070. var markLineOption = assign({}, {
  38071. type: 'solid',
  38072. dashLength: 4,
  38073. data: []
  38074. }, opts.extra.markLine);
  38075. var startX = opts.area[3];
  38076. var endX = opts.width - opts.area[1];
  38077. var points = calMarkLineData(markLineOption.data, opts);
  38078. for (var i = 0; i < points.length; i++) {
  38079. var item = assign({}, {
  38080. lineColor: '#DE4A42',
  38081. showLabel: false,
  38082. labelFontColor: '#666666',
  38083. labelBgColor: '#DFE8FF',
  38084. labelBgOpacity: 0.8,
  38085. yAxisIndex: 0
  38086. }, points[i]);
  38087. if (markLineOption.type == 'dash') {
  38088. context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
  38089. }
  38090. context.setStrokeStyle(item.lineColor);
  38091. context.setLineWidth(1 * opts.pix);
  38092. context.beginPath();
  38093. context.moveTo(startX, item.y);
  38094. context.lineTo(endX, item.y);
  38095. context.stroke();
  38096. context.setLineDash([]);
  38097. if (item.showLabel) {
  38098. var labelText = opts.yAxis.formatter ? opts.yAxis.formatter(item.value) : item.value;
  38099. context.setFontSize(config.fontSize);
  38100. var textWidth = measureText(labelText, config.fontSize, context);
  38101. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[0].width;
  38102. var bgStartX = opts.area[3] - textWidth - config.toolTipPadding * 2;
  38103. var bgEndX = opts.area[3];
  38104. var bgWidth = bgEndX - bgStartX;
  38105. var textX = bgEndX - config.toolTipPadding;
  38106. var textY = item.y;
  38107. context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
  38108. context.setStrokeStyle(item.labelBgColor);
  38109. context.setLineWidth(1 * opts.pix);
  38110. context.beginPath();
  38111. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  38112. context.closePath();
  38113. context.stroke();
  38114. context.fill();
  38115. context.setFontSize(config.fontSize);
  38116. context.setTextAlign('right');
  38117. context.setFillStyle(item.labelFontColor);
  38118. context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);
  38119. context.stroke();
  38120. context.setTextAlign('left');
  38121. }
  38122. }
  38123. }
  38124. function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
  38125. var toolTipOption = assign({}, {
  38126. gridType: 'solid',
  38127. dashLength: 4
  38128. }, opts.extra.tooltip);
  38129. var startX = opts.area[3];
  38130. var endX = opts.width - opts.area[1];
  38131. if (toolTipOption.gridType == 'dash') {
  38132. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  38133. }
  38134. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  38135. context.setLineWidth(1 * opts.pix);
  38136. context.beginPath();
  38137. context.moveTo(startX, opts.tooltip.offset.y);
  38138. context.lineTo(endX, opts.tooltip.offset.y);
  38139. context.stroke();
  38140. context.setLineDash([]);
  38141. if (toolTipOption.yAxisLabel) {
  38142. var labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
  38143. var widthArr = opts.chartData.yAxisData.yAxisWidth;
  38144. var tStartLeft = opts.area[3];
  38145. var tStartRight = opts.width - opts.area[1];
  38146. for (var i = 0; i < labelText.length; i++) {
  38147. context.setFontSize(config.fontSize);
  38148. var textWidth = measureText(labelText[i], config.fontSize, context);
  38149. var bgStartX = void 0,
  38150. bgEndX = void 0,
  38151. bgWidth = void 0;
  38152. if (widthArr[i].position == 'left') {
  38153. bgStartX = tStartLeft - widthArr[i].width;
  38154. bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);
  38155. } else {
  38156. bgStartX = tStartRight;
  38157. bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);
  38158. }
  38159. bgWidth = bgEndX - bgStartX;
  38160. var textX = bgStartX + (bgWidth - textWidth) / 2;
  38161. var textY = opts.tooltip.offset.y;
  38162. context.beginPath();
  38163. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  38164. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  38165. context.setLineWidth(1 * opts.pix);
  38166. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  38167. context.closePath();
  38168. context.stroke();
  38169. context.fill();
  38170. context.beginPath();
  38171. context.setFontSize(config.fontSize);
  38172. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  38173. context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
  38174. context.closePath();
  38175. context.stroke();
  38176. if (widthArr[i].position == 'left') {
  38177. tStartLeft -= widthArr[i].width + opts.yAxis.padding * opts.pix;
  38178. } else {
  38179. tStartRight += widthArr[i].width + opts.yAxis.padding * opts.pix;
  38180. }
  38181. }
  38182. }
  38183. }
  38184. function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  38185. var toolTipOption = assign({}, {
  38186. activeBgColor: '#000000',
  38187. activeBgOpacity: 0.08
  38188. }, opts.extra.column);
  38189. var startY = opts.area[0];
  38190. var endY = opts.height - opts.area[2];
  38191. context.beginPath();
  38192. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  38193. context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);
  38194. context.closePath();
  38195. context.fill();
  38196. context.setFillStyle("#FFFFFF");
  38197. }
  38198. function drawBarToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  38199. var toolTipOption = assign({}, {
  38200. activeBgColor: '#000000',
  38201. activeBgOpacity: 0.08
  38202. }, opts.extra.bar);
  38203. var startX = opts.area[3];
  38204. var endX = opts.width - opts.area[1];
  38205. context.beginPath();
  38206. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  38207. context.rect(startX, offsetX - eachSpacing / 2, endX - startX, eachSpacing);
  38208. context.closePath();
  38209. context.fill();
  38210. context.setFillStyle("#FFFFFF");
  38211. }
  38212. function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
  38213. var toolTipOption = assign({}, {
  38214. showBox: true,
  38215. showArrow: true,
  38216. showCategory: false,
  38217. bgColor: '#000000',
  38218. bgOpacity: 0.7,
  38219. borderColor: '#000000',
  38220. borderWidth: 0,
  38221. borderRadius: 0,
  38222. borderOpacity: 0.7,
  38223. fontColor: '#FFFFFF',
  38224. splitLine: true
  38225. }, opts.extra.tooltip);
  38226. if (toolTipOption.showCategory == true && opts.categories) {
  38227. textList.unshift({
  38228. text: opts.categories[opts.tooltip.index],
  38229. color: null
  38230. });
  38231. }
  38232. var legendWidth = 4 * opts.pix;
  38233. var legendMarginRight = 5 * opts.pix;
  38234. var arrowWidth = toolTipOption.showArrow ? 8 * opts.pix : 0;
  38235. var isOverRightBorder = false;
  38236. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
  38237. if (toolTipOption.splitLine == true) {
  38238. drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
  38239. }
  38240. }
  38241. offset = assign({
  38242. x: 0,
  38243. y: 0
  38244. }, offset);
  38245. offset.y -= 8 * opts.pix;
  38246. var textWidth = textList.map(function (item) {
  38247. return measureText(item.text, config.fontSize, context);
  38248. });
  38249. var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);
  38250. var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;
  38251. if (toolTipOption.showBox == false) {
  38252. return;
  38253. }
  38254. // if beyond the right border
  38255. if (offset.x - Math.abs(opts._scrollDistance_ || 0) + arrowWidth + toolTipWidth > opts.width) {
  38256. isOverRightBorder = true;
  38257. }
  38258. if (toolTipHeight + offset.y > opts.height) {
  38259. offset.y = opts.height - toolTipHeight;
  38260. }
  38261. // draw background rect
  38262. context.beginPath();
  38263. context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));
  38264. context.setLineWidth(toolTipOption.borderWidth * opts.pix);
  38265. context.setStrokeStyle(hexToRgb(toolTipOption.borderColor, toolTipOption.borderOpacity));
  38266. var radius = toolTipOption.borderRadius;
  38267. if (isOverRightBorder) {
  38268. if (toolTipOption.showArrow) {
  38269. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  38270. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  38271. }
  38272. context.arc(offset.x - arrowWidth - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  38273. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  38274. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  38275. context.arc(offset.x - arrowWidth - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  38276. if (toolTipOption.showArrow) {
  38277. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  38278. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  38279. }
  38280. } else {
  38281. if (toolTipOption.showArrow) {
  38282. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  38283. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  38284. }
  38285. context.arc(offset.x + arrowWidth + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  38286. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  38287. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  38288. context.arc(offset.x + arrowWidth + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  38289. if (toolTipOption.showArrow) {
  38290. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  38291. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  38292. }
  38293. }
  38294. context.closePath();
  38295. context.fill();
  38296. if (toolTipOption.borderWidth > 0) {
  38297. context.stroke();
  38298. }
  38299. // draw legend
  38300. textList.forEach(function (item, index) {
  38301. if (item.color !== null) {
  38302. context.beginPath();
  38303. context.setFillStyle(item.color);
  38304. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;
  38305. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding + 1;
  38306. if (isOverRightBorder) {
  38307. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;
  38308. }
  38309. context.fillRect(startX, startY, legendWidth, config.fontSize);
  38310. context.closePath();
  38311. }
  38312. });
  38313. // draw text list
  38314. textList.forEach(function (item, index) {
  38315. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;
  38316. if (isOverRightBorder) {
  38317. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;
  38318. }
  38319. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding;
  38320. context.beginPath();
  38321. context.setFontSize(config.fontSize);
  38322. context.setFillStyle(toolTipOption.fontColor);
  38323. context.fillText(item.text, startX, startY + config.fontSize);
  38324. context.closePath();
  38325. context.stroke();
  38326. });
  38327. }
  38328. function drawColumnDataPoints(series, opts, config, context) {
  38329. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38330. var xAxisData = opts.chartData.xAxisData,
  38331. xAxisPoints = xAxisData.xAxisPoints,
  38332. eachSpacing = xAxisData.eachSpacing;
  38333. var columnOption = assign({}, {
  38334. type: 'group',
  38335. width: eachSpacing / 2,
  38336. meterBorder: 4,
  38337. meterFillColor: '#FFFFFF',
  38338. barBorderCircle: false,
  38339. barBorderRadius: [],
  38340. seriesGap: 2,
  38341. linearType: 'none',
  38342. linearOpacity: 1,
  38343. customColor: [],
  38344. colorStop: 0
  38345. }, opts.extra.column);
  38346. var calPoints = [];
  38347. context.save();
  38348. var leftNum = -2;
  38349. var rightNum = xAxisPoints.length + 2;
  38350. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38351. context.translate(opts._scrollDistance_, 0);
  38352. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  38353. rightNum = leftNum + opts.xAxis.itemCount + 4;
  38354. }
  38355. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  38356. drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
  38357. }
  38358. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  38359. series.forEach(function (eachSeries, seriesIndex) {
  38360. var ranges, minRange, maxRange;
  38361. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38362. minRange = ranges.pop();
  38363. maxRange = ranges.shift();
  38364. var data = eachSeries.data;
  38365. switch (columnOption.type) {
  38366. case 'group':
  38367. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38368. var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38369. calPoints.push(tooltipPoints);
  38370. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  38371. for (var i = 0; i < points.length; i++) {
  38372. var item = points[i];
  38373. //fix issues/I27B1N yyoinge & Joeshu
  38374. if (item !== null && i > leftNum && i < rightNum) {
  38375. var startX = item.x - item.width / 2;
  38376. var height = opts.height - item.y - opts.area[2];
  38377. context.beginPath();
  38378. var fillColor = item.color || eachSeries.color;
  38379. var strokeColor = item.color || eachSeries.color;
  38380. if (columnOption.linearType !== 'none') {
  38381. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  38382. //透明渐变
  38383. if (columnOption.linearType == 'opacity') {
  38384. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  38385. grd.addColorStop(1, hexToRgb(fillColor, 1));
  38386. } else {
  38387. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  38388. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  38389. grd.addColorStop(1, hexToRgb(fillColor, 1));
  38390. }
  38391. fillColor = grd;
  38392. }
  38393. // 圆角边框
  38394. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  38395. var left = startX;
  38396. var top = item.y;
  38397. var width = item.width;
  38398. var _height = opts.height - opts.area[2] - item.y;
  38399. if (columnOption.barBorderCircle) {
  38400. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  38401. }
  38402. var _columnOption$barBord = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  38403. r0 = _columnOption$barBord[0],
  38404. r1 = _columnOption$barBord[1],
  38405. r2 = _columnOption$barBord[2],
  38406. r3 = _columnOption$barBord[3];
  38407. var minRadius = Math.min(width / 2, _height / 2);
  38408. r0 = r0 > minRadius ? minRadius : r0;
  38409. r1 = r1 > minRadius ? minRadius : r1;
  38410. r2 = r2 > minRadius ? minRadius : r2;
  38411. r3 = r3 > minRadius ? minRadius : r3;
  38412. r0 = r0 < 0 ? 0 : r0;
  38413. r1 = r1 < 0 ? 0 : r1;
  38414. r2 = r2 < 0 ? 0 : r2;
  38415. r3 = r3 < 0 ? 0 : r3;
  38416. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  38417. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  38418. context.arc(left + width - r2, top + _height - r2, r2, 0, Math.PI / 2);
  38419. context.arc(left + r3, top + _height - r3, r3, Math.PI / 2, Math.PI);
  38420. } else {
  38421. context.moveTo(startX, item.y);
  38422. context.lineTo(startX + item.width - 2, item.y);
  38423. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  38424. context.lineTo(startX, opts.height - opts.area[2]);
  38425. context.lineTo(startX, item.y);
  38426. context.setLineWidth(1);
  38427. context.setStrokeStyle(strokeColor);
  38428. }
  38429. context.setFillStyle(fillColor);
  38430. context.closePath();
  38431. //context.stroke();
  38432. context.fill();
  38433. }
  38434. }
  38435. ;
  38436. break;
  38437. case 'stack':
  38438. // 绘制堆叠数据图
  38439. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38440. calPoints.push(points);
  38441. points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  38442. for (var _i15 = 0; _i15 < points.length; _i15++) {
  38443. var _item7 = points[_i15];
  38444. if (_item7 !== null && _i15 > leftNum && _i15 < rightNum) {
  38445. context.beginPath();
  38446. var fillColor = _item7.color || eachSeries.color;
  38447. var startX = _item7.x - _item7.width / 2 + 1;
  38448. var height = opts.height - _item7.y - opts.area[2];
  38449. var height0 = opts.height - _item7.y0 - opts.area[2];
  38450. if (seriesIndex > 0) {
  38451. height -= height0;
  38452. }
  38453. context.setFillStyle(fillColor);
  38454. context.moveTo(startX, _item7.y);
  38455. context.fillRect(startX, _item7.y, _item7.width - 2, height);
  38456. context.closePath();
  38457. context.fill();
  38458. }
  38459. }
  38460. ;
  38461. break;
  38462. case 'meter':
  38463. // 绘制温度计数据图
  38464. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38465. calPoints.push(points);
  38466. points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meterBorder);
  38467. if (seriesIndex == 0) {
  38468. for (var _i16 = 0; _i16 < points.length; _i16++) {
  38469. var _item8 = points[_i16];
  38470. if (_item8 !== null && _i16 > leftNum && _i16 < rightNum) {
  38471. //画背景颜色
  38472. context.beginPath();
  38473. context.setFillStyle(columnOption.meterFillColor);
  38474. var startX = _item8.x - _item8.width / 2;
  38475. var height = opts.height - _item8.y - opts.area[2];
  38476. if (columnOption.barBorderCircle) {
  38477. var barBorderRadius = (_item8.width - columnOption.meterBorder * 2) / 2;
  38478. if (barBorderRadius > height) {
  38479. barBorderRadius = height;
  38480. }
  38481. context.moveTo(startX + columnOption.meterBorder, opts.height - opts.area[2]);
  38482. context.lineTo(startX + columnOption.meterBorder, _item8.y + barBorderRadius);
  38483. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius, barBorderRadius, -Math.PI, 0);
  38484. context.lineTo(startX + _item8.width - columnOption.meterBorder, opts.height - opts.area[2]);
  38485. context.lineTo(startX, opts.height - opts.area[2]);
  38486. context.fill();
  38487. } else {
  38488. context.moveTo(startX, _item8.y);
  38489. context.fillRect(startX, _item8.y, _item8.width, height);
  38490. context.closePath();
  38491. context.fill();
  38492. }
  38493. //画边框线
  38494. if (columnOption.meterBorder > 0) {
  38495. context.beginPath();
  38496. context.setStrokeStyle(eachSeries.color);
  38497. context.setLineWidth(columnOption.meterBorder * opts.pix);
  38498. if (columnOption.barBorderCircle) {
  38499. var barBorderRadius = (_item8.width - columnOption.meterBorder) / 2;
  38500. if (barBorderRadius > height) {
  38501. barBorderRadius = height;
  38502. }
  38503. context.moveTo(startX + columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  38504. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + barBorderRadius);
  38505. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius - columnOption.meterBorder * 0.5, barBorderRadius, -Math.PI, 0);
  38506. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  38507. } else {
  38508. context.moveTo(startX + columnOption.meterBorder * 0.5, _item8.y + height);
  38509. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  38510. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  38511. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + height);
  38512. }
  38513. context.stroke();
  38514. }
  38515. }
  38516. }
  38517. ;
  38518. } else {
  38519. for (var _i17 = 0; _i17 < points.length; _i17++) {
  38520. var _item9 = points[_i17];
  38521. if (_item9 !== null && _i17 > leftNum && _i17 < rightNum) {
  38522. context.beginPath();
  38523. context.setFillStyle(_item9.color || eachSeries.color);
  38524. var startX = _item9.x - _item9.width / 2;
  38525. var height = opts.height - _item9.y - opts.area[2];
  38526. if (columnOption.barBorderCircle) {
  38527. var barBorderRadius = _item9.width / 2;
  38528. if (barBorderRadius > height) {
  38529. barBorderRadius = height;
  38530. }
  38531. context.moveTo(startX, opts.height - opts.area[2]);
  38532. context.arc(startX + barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI, -Math.PI / 2);
  38533. context.arc(startX + _item9.width - barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI / 2, 0);
  38534. context.lineTo(startX + _item9.width, opts.height - opts.area[2]);
  38535. context.lineTo(startX, opts.height - opts.area[2]);
  38536. context.fill();
  38537. } else {
  38538. context.moveTo(startX, _item9.y);
  38539. context.fillRect(startX, _item9.y, _item9.width, height);
  38540. context.closePath();
  38541. context.fill();
  38542. }
  38543. }
  38544. }
  38545. ;
  38546. }
  38547. break;
  38548. }
  38549. });
  38550. if (opts.dataLabel !== false && process === 1) {
  38551. series.forEach(function (eachSeries, seriesIndex) {
  38552. var ranges, minRange, maxRange;
  38553. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38554. minRange = ranges.pop();
  38555. maxRange = ranges.shift();
  38556. var data = eachSeries.data;
  38557. switch (columnOption.type) {
  38558. case 'group':
  38559. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38560. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  38561. drawPointText(points, eachSeries, config, context, opts);
  38562. break;
  38563. case 'stack':
  38564. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38565. drawPointText(points, eachSeries, config, context, opts);
  38566. break;
  38567. case 'meter':
  38568. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38569. drawPointText(points, eachSeries, config, context, opts);
  38570. break;
  38571. }
  38572. });
  38573. }
  38574. context.restore();
  38575. return {
  38576. xAxisPoints: xAxisPoints,
  38577. calPoints: calPoints,
  38578. eachSpacing: eachSpacing
  38579. };
  38580. }
  38581. function drawBarDataPoints(series, opts, config, context) {
  38582. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38583. var yAxisPoints = [];
  38584. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / opts.categories.length;
  38585. for (var i = 0; i < opts.categories.length; i++) {
  38586. yAxisPoints.push(opts.area[0] + eachSpacing / 2 + eachSpacing * i);
  38587. }
  38588. var columnOption = assign({}, {
  38589. type: 'group',
  38590. width: eachSpacing / 2,
  38591. meterBorder: 4,
  38592. meterFillColor: '#FFFFFF',
  38593. barBorderCircle: false,
  38594. barBorderRadius: [],
  38595. seriesGap: 2,
  38596. linearType: 'none',
  38597. linearOpacity: 1,
  38598. customColor: [],
  38599. colorStop: 0
  38600. }, opts.extra.bar);
  38601. var calPoints = [];
  38602. context.save();
  38603. var leftNum = -2;
  38604. var rightNum = yAxisPoints.length + 2;
  38605. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  38606. drawBarToolTipSplitArea(opts.tooltip.offset.y, opts, config, context, eachSpacing);
  38607. }
  38608. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  38609. series.forEach(function (eachSeries, seriesIndex) {
  38610. var ranges, minRange, maxRange;
  38611. ranges = [].concat(opts.chartData.xAxisData.ranges);
  38612. maxRange = ranges.pop();
  38613. minRange = ranges.shift();
  38614. var data = eachSeries.data;
  38615. switch (columnOption.type) {
  38616. case 'group':
  38617. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  38618. var tooltipPoints = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38619. calPoints.push(tooltipPoints);
  38620. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  38621. for (var _i18 = 0; _i18 < points.length; _i18++) {
  38622. var item = points[_i18];
  38623. //fix issues/I27B1N yyoinge & Joeshu
  38624. if (item !== null && _i18 > leftNum && _i18 < rightNum) {
  38625. //var startX = item.x - item.width / 2;
  38626. var startX = opts.area[3];
  38627. var startY = item.y - item.width / 2;
  38628. var height = item.height;
  38629. context.beginPath();
  38630. var fillColor = item.color || eachSeries.color;
  38631. var strokeColor = item.color || eachSeries.color;
  38632. if (columnOption.linearType !== 'none') {
  38633. var grd = context.createLinearGradient(startX, item.y, item.x, item.y);
  38634. //透明渐变
  38635. if (columnOption.linearType == 'opacity') {
  38636. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  38637. grd.addColorStop(1, hexToRgb(fillColor, 1));
  38638. } else {
  38639. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  38640. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  38641. grd.addColorStop(1, hexToRgb(fillColor, 1));
  38642. }
  38643. fillColor = grd;
  38644. }
  38645. // 圆角边框
  38646. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  38647. var left = startX;
  38648. var width = item.width;
  38649. var top = item.y - item.width / 2;
  38650. var _height2 = item.heigh;
  38651. if (columnOption.barBorderCircle) {
  38652. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  38653. }
  38654. var _columnOption$barBord2 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  38655. r0 = _columnOption$barBord2[0],
  38656. r1 = _columnOption$barBord2[1],
  38657. r2 = _columnOption$barBord2[2],
  38658. r3 = _columnOption$barBord2[3];
  38659. var minRadius = Math.min(width / 2, _height2 / 2);
  38660. r0 = r0 > minRadius ? minRadius : r0;
  38661. r1 = r1 > minRadius ? minRadius : r1;
  38662. r2 = r2 > minRadius ? minRadius : r2;
  38663. r3 = r3 > minRadius ? minRadius : r3;
  38664. r0 = r0 < 0 ? 0 : r0;
  38665. r1 = r1 < 0 ? 0 : r1;
  38666. r2 = r2 < 0 ? 0 : r2;
  38667. r3 = r3 < 0 ? 0 : r3;
  38668. context.arc(left + r3, top + r3, r3, -Math.PI, -Math.PI / 2);
  38669. context.arc(item.x - r0, top + r0, r0, -Math.PI / 2, 0);
  38670. context.arc(item.x - r1, top + width - r1, r1, 0, Math.PI / 2);
  38671. context.arc(left + r2, top + width - r2, r2, Math.PI / 2, Math.PI);
  38672. } else {
  38673. context.moveTo(startX, startY);
  38674. context.lineTo(item.x, startY);
  38675. context.lineTo(item.x, startY + item.width - 2);
  38676. context.lineTo(startX, startY + item.width - 2);
  38677. context.lineTo(startX, startY);
  38678. context.setLineWidth(1);
  38679. context.setStrokeStyle(strokeColor);
  38680. }
  38681. context.setFillStyle(fillColor);
  38682. context.closePath();
  38683. //context.stroke();
  38684. context.fill();
  38685. }
  38686. }
  38687. ;
  38688. break;
  38689. case 'stack':
  38690. // 绘制堆叠数据图
  38691. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38692. calPoints.push(points);
  38693. points = fixBarStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  38694. for (var _i19 = 0; _i19 < points.length; _i19++) {
  38695. var _item10 = points[_i19];
  38696. if (_item10 !== null && _i19 > leftNum && _i19 < rightNum) {
  38697. context.beginPath();
  38698. var fillColor = _item10.color || eachSeries.color;
  38699. var startX = _item10.x0;
  38700. context.setFillStyle(fillColor);
  38701. context.moveTo(startX, _item10.y - _item10.width / 2);
  38702. context.fillRect(startX, _item10.y - _item10.width / 2, _item10.height, _item10.width - 2);
  38703. context.closePath();
  38704. context.fill();
  38705. }
  38706. }
  38707. ;
  38708. break;
  38709. }
  38710. });
  38711. if (opts.dataLabel !== false && process === 1) {
  38712. series.forEach(function (eachSeries, seriesIndex) {
  38713. var ranges, minRange, maxRange;
  38714. ranges = [].concat(opts.chartData.xAxisData.ranges);
  38715. maxRange = ranges.pop();
  38716. minRange = ranges.shift();
  38717. var data = eachSeries.data;
  38718. switch (columnOption.type) {
  38719. case 'group':
  38720. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  38721. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  38722. drawBarPointText(points, eachSeries, config, context, opts);
  38723. break;
  38724. case 'stack':
  38725. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  38726. drawBarPointText(points, eachSeries, config, context, opts);
  38727. break;
  38728. }
  38729. });
  38730. }
  38731. return {
  38732. yAxisPoints: yAxisPoints,
  38733. calPoints: calPoints,
  38734. eachSpacing: eachSpacing
  38735. };
  38736. }
  38737. function drawCandleDataPoints(series, seriesMA, opts, config, context) {
  38738. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  38739. var candleOption = assign({}, {
  38740. color: {},
  38741. average: {}
  38742. }, opts.extra.candle);
  38743. candleOption.color = assign({}, {
  38744. upLine: '#f04864',
  38745. upFill: '#f04864',
  38746. downLine: '#2fc25b',
  38747. downFill: '#2fc25b'
  38748. }, candleOption.color);
  38749. candleOption.average = assign({}, {
  38750. show: false,
  38751. name: [],
  38752. day: [],
  38753. color: config.color
  38754. }, candleOption.average);
  38755. opts.extra.candle = candleOption;
  38756. var xAxisData = opts.chartData.xAxisData,
  38757. xAxisPoints = xAxisData.xAxisPoints,
  38758. eachSpacing = xAxisData.eachSpacing;
  38759. var calPoints = [];
  38760. context.save();
  38761. var leftNum = -2;
  38762. var rightNum = xAxisPoints.length + 2;
  38763. var leftSpace = 0;
  38764. var rightSpace = opts.width + eachSpacing;
  38765. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38766. context.translate(opts._scrollDistance_, 0);
  38767. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  38768. rightNum = leftNum + opts.xAxis.itemCount + 4;
  38769. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  38770. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  38771. }
  38772. //画均线
  38773. if (candleOption.average.show || seriesMA) {
  38774. //Merge pull request !12 from 邱贵翔
  38775. seriesMA.forEach(function (eachSeries, seriesIndex) {
  38776. var ranges, minRange, maxRange;
  38777. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38778. minRange = ranges.pop();
  38779. maxRange = ranges.shift();
  38780. var data = eachSeries.data;
  38781. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38782. var splitPointList = splitPoints(points, eachSeries);
  38783. for (var i = 0; i < splitPointList.length; i++) {
  38784. var _points = splitPointList[i];
  38785. context.beginPath();
  38786. context.setStrokeStyle(eachSeries.color);
  38787. context.setLineWidth(1);
  38788. if (_points.length === 1) {
  38789. context.moveTo(_points[0].x, _points[0].y);
  38790. context.arc(_points[0].x, _points[0].y, 1, 0, 2 * Math.PI);
  38791. } else {
  38792. context.moveTo(_points[0].x, _points[0].y);
  38793. var startPoint = 0;
  38794. for (var j = 0; j < _points.length; j++) {
  38795. var item = _points[j];
  38796. if (startPoint == 0 && item.x > leftSpace) {
  38797. context.moveTo(item.x, item.y);
  38798. startPoint = 1;
  38799. }
  38800. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  38801. var ctrlPoint = createCurveControlPoints(_points, j - 1);
  38802. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  38803. }
  38804. }
  38805. context.moveTo(_points[0].x, _points[0].y);
  38806. }
  38807. context.closePath();
  38808. context.stroke();
  38809. }
  38810. });
  38811. }
  38812. //画K线
  38813. series.forEach(function (eachSeries, seriesIndex) {
  38814. var ranges, minRange, maxRange;
  38815. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38816. minRange = ranges.pop();
  38817. maxRange = ranges.shift();
  38818. var data = eachSeries.data;
  38819. var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38820. calPoints.push(points);
  38821. var splitPointList = splitPoints(points, eachSeries);
  38822. for (var i = 0; i < splitPointList[0].length; i++) {
  38823. if (i > leftNum && i < rightNum) {
  38824. var item = splitPointList[0][i];
  38825. context.beginPath();
  38826. //如果上涨
  38827. if (data[i][1] - data[i][0] > 0) {
  38828. context.setStrokeStyle(candleOption.color.upLine);
  38829. context.setFillStyle(candleOption.color.upFill);
  38830. context.setLineWidth(1 * opts.pix);
  38831. context.moveTo(item[3].x, item[3].y); //顶点
  38832. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38833. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  38834. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  38835. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38836. context.lineTo(item[2].x, item[2].y); //底点
  38837. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38838. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  38839. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  38840. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38841. context.moveTo(item[3].x, item[3].y); //顶点
  38842. } else {
  38843. context.setStrokeStyle(candleOption.color.downLine);
  38844. context.setFillStyle(candleOption.color.downFill);
  38845. context.setLineWidth(1 * opts.pix);
  38846. context.moveTo(item[3].x, item[3].y); //顶点
  38847. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38848. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  38849. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  38850. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38851. context.lineTo(item[2].x, item[2].y); //底点
  38852. context.lineTo(item[1].x, item[1].y); //收盘中间点
  38853. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  38854. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  38855. context.lineTo(item[0].x, item[0].y); //开盘中间点
  38856. context.moveTo(item[3].x, item[3].y); //顶点
  38857. }
  38858. context.closePath();
  38859. context.fill();
  38860. context.stroke();
  38861. }
  38862. }
  38863. });
  38864. context.restore();
  38865. return {
  38866. xAxisPoints: xAxisPoints,
  38867. calPoints: calPoints,
  38868. eachSpacing: eachSpacing
  38869. };
  38870. }
  38871. function drawAreaDataPoints(series, opts, config, context) {
  38872. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38873. var areaOption = assign({}, {
  38874. type: 'straight',
  38875. opacity: 0.2,
  38876. addLine: false,
  38877. width: 2,
  38878. gradient: false
  38879. }, opts.extra.area);
  38880. var xAxisData = opts.chartData.xAxisData,
  38881. xAxisPoints = xAxisData.xAxisPoints,
  38882. eachSpacing = xAxisData.eachSpacing;
  38883. var endY = opts.height - opts.area[2];
  38884. var calPoints = [];
  38885. context.save();
  38886. var leftSpace = 0;
  38887. var rightSpace = opts.width + eachSpacing;
  38888. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38889. context.translate(opts._scrollDistance_, 0);
  38890. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  38891. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  38892. }
  38893. series.forEach(function (eachSeries, seriesIndex) {
  38894. var ranges, minRange, maxRange;
  38895. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38896. minRange = ranges.pop();
  38897. maxRange = ranges.shift();
  38898. var data = eachSeries.data;
  38899. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38900. calPoints.push(points);
  38901. var splitPointList = splitPoints(points, eachSeries);
  38902. for (var i = 0; i < splitPointList.length; i++) {
  38903. var _points2 = splitPointList[i];
  38904. // 绘制区域数
  38905. context.beginPath();
  38906. context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  38907. if (areaOption.gradient) {
  38908. var gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
  38909. gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
  38910. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  38911. context.setFillStyle(gradient);
  38912. } else {
  38913. context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  38914. }
  38915. context.setLineWidth(areaOption.width * opts.pix);
  38916. if (_points2.length > 1) {
  38917. var firstPoint = _points2[0];
  38918. var lastPoint = _points2[_points2.length - 1];
  38919. context.moveTo(firstPoint.x, firstPoint.y);
  38920. var startPoint = 0;
  38921. if (areaOption.type === 'curve') {
  38922. for (var j = 0; j < _points2.length; j++) {
  38923. var item = _points2[j];
  38924. if (startPoint == 0 && item.x > leftSpace) {
  38925. context.moveTo(item.x, item.y);
  38926. startPoint = 1;
  38927. }
  38928. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  38929. var ctrlPoint = createCurveControlPoints(_points2, j - 1);
  38930. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  38931. }
  38932. }
  38933. ;
  38934. }
  38935. if (areaOption.type === 'straight') {
  38936. for (var _j = 0; _j < _points2.length; _j++) {
  38937. var _item11 = _points2[_j];
  38938. if (startPoint == 0 && _item11.x > leftSpace) {
  38939. context.moveTo(_item11.x, _item11.y);
  38940. startPoint = 1;
  38941. }
  38942. if (_j > 0 && _item11.x > leftSpace && _item11.x < rightSpace) {
  38943. context.lineTo(_item11.x, _item11.y);
  38944. }
  38945. }
  38946. ;
  38947. }
  38948. if (areaOption.type === 'step') {
  38949. for (var _j2 = 0; _j2 < _points2.length; _j2++) {
  38950. var _item12 = _points2[_j2];
  38951. if (startPoint == 0 && _item12.x > leftSpace) {
  38952. context.moveTo(_item12.x, _item12.y);
  38953. startPoint = 1;
  38954. }
  38955. if (_j2 > 0 && _item12.x > leftSpace && _item12.x < rightSpace) {
  38956. context.lineTo(_item12.x, _points2[_j2 - 1].y);
  38957. context.lineTo(_item12.x, _item12.y);
  38958. }
  38959. }
  38960. ;
  38961. }
  38962. context.lineTo(lastPoint.x, endY);
  38963. context.lineTo(firstPoint.x, endY);
  38964. context.lineTo(firstPoint.x, firstPoint.y);
  38965. } else {
  38966. var _item13 = _points2[0];
  38967. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  38968. context.lineTo(_item13.x + eachSpacing / 2, _item13.y);
  38969. context.lineTo(_item13.x + eachSpacing / 2, endY);
  38970. context.lineTo(_item13.x - eachSpacing / 2, endY);
  38971. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  38972. }
  38973. context.closePath();
  38974. context.fill();
  38975. //画连线
  38976. if (areaOption.addLine) {
  38977. if (eachSeries.lineType == 'dash') {
  38978. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  38979. dashLength *= opts.pix;
  38980. context.setLineDash([dashLength, dashLength]);
  38981. }
  38982. context.beginPath();
  38983. context.setStrokeStyle(eachSeries.color);
  38984. context.setLineWidth(areaOption.width * opts.pix);
  38985. if (_points2.length === 1) {
  38986. context.moveTo(_points2[0].x, _points2[0].y);
  38987. context.arc(_points2[0].x, _points2[0].y, 1, 0, 2 * Math.PI);
  38988. } else {
  38989. context.moveTo(_points2[0].x, _points2[0].y);
  38990. var _startPoint = 0;
  38991. if (areaOption.type === 'curve') {
  38992. for (var _j3 = 0; _j3 < _points2.length; _j3++) {
  38993. var _item14 = _points2[_j3];
  38994. if (_startPoint == 0 && _item14.x > leftSpace) {
  38995. context.moveTo(_item14.x, _item14.y);
  38996. _startPoint = 1;
  38997. }
  38998. if (_j3 > 0 && _item14.x > leftSpace && _item14.x < rightSpace) {
  38999. var _ctrlPoint = createCurveControlPoints(_points2, _j3 - 1);
  39000. context.bezierCurveTo(_ctrlPoint.ctrA.x, _ctrlPoint.ctrA.y, _ctrlPoint.ctrB.x, _ctrlPoint.ctrB.y, _item14.x, _item14.y);
  39001. }
  39002. }
  39003. ;
  39004. }
  39005. if (areaOption.type === 'straight') {
  39006. for (var _j4 = 0; _j4 < _points2.length; _j4++) {
  39007. var _item15 = _points2[_j4];
  39008. if (_startPoint == 0 && _item15.x > leftSpace) {
  39009. context.moveTo(_item15.x, _item15.y);
  39010. _startPoint = 1;
  39011. }
  39012. if (_j4 > 0 && _item15.x > leftSpace && _item15.x < rightSpace) {
  39013. context.lineTo(_item15.x, _item15.y);
  39014. }
  39015. }
  39016. ;
  39017. }
  39018. if (areaOption.type === 'step') {
  39019. for (var _j5 = 0; _j5 < _points2.length; _j5++) {
  39020. var _item16 = _points2[_j5];
  39021. if (_startPoint == 0 && _item16.x > leftSpace) {
  39022. context.moveTo(_item16.x, _item16.y);
  39023. _startPoint = 1;
  39024. }
  39025. if (_j5 > 0 && _item16.x > leftSpace && _item16.x < rightSpace) {
  39026. context.lineTo(_item16.x, _points2[_j5 - 1].y);
  39027. context.lineTo(_item16.x, _item16.y);
  39028. }
  39029. }
  39030. ;
  39031. }
  39032. context.moveTo(_points2[0].x, _points2[0].y);
  39033. }
  39034. context.stroke();
  39035. context.setLineDash([]);
  39036. }
  39037. }
  39038. //画点
  39039. if (opts.dataPointShape !== false) {
  39040. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39041. }
  39042. });
  39043. if (opts.dataLabel !== false && process === 1) {
  39044. series.forEach(function (eachSeries, seriesIndex) {
  39045. var ranges, minRange, maxRange;
  39046. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39047. minRange = ranges.pop();
  39048. maxRange = ranges.shift();
  39049. var data = eachSeries.data;
  39050. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39051. drawPointText(points, eachSeries, config, context, opts);
  39052. });
  39053. }
  39054. context.restore();
  39055. return {
  39056. xAxisPoints: xAxisPoints,
  39057. calPoints: calPoints,
  39058. eachSpacing: eachSpacing
  39059. };
  39060. }
  39061. function drawScatterDataPoints(series, opts, config, context) {
  39062. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39063. var scatterOption = assign({}, {
  39064. type: 'circle'
  39065. }, opts.extra.scatter);
  39066. var xAxisData = opts.chartData.xAxisData,
  39067. xAxisPoints = xAxisData.xAxisPoints,
  39068. eachSpacing = xAxisData.eachSpacing;
  39069. var calPoints = [];
  39070. context.save();
  39071. var leftSpace = 0;
  39072. var rightSpace = opts.width + eachSpacing;
  39073. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39074. context.translate(opts._scrollDistance_, 0);
  39075. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  39076. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  39077. }
  39078. series.forEach(function (eachSeries, seriesIndex) {
  39079. var ranges, minRange, maxRange;
  39080. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39081. minRange = ranges.pop();
  39082. maxRange = ranges.shift();
  39083. var data = eachSeries.data;
  39084. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39085. context.beginPath();
  39086. context.setStrokeStyle(eachSeries.color);
  39087. context.setFillStyle(eachSeries.color);
  39088. context.setLineWidth(1 * opts.pix);
  39089. var shape = eachSeries.pointShape;
  39090. if (shape === 'diamond') {
  39091. points.forEach(function (item, index) {
  39092. if (item !== null) {
  39093. context.moveTo(item.x, item.y - 4.5);
  39094. context.lineTo(item.x - 4.5, item.y);
  39095. context.lineTo(item.x, item.y + 4.5);
  39096. context.lineTo(item.x + 4.5, item.y);
  39097. context.lineTo(item.x, item.y - 4.5);
  39098. }
  39099. });
  39100. } else if (shape === 'circle') {
  39101. points.forEach(function (item, index) {
  39102. if (item !== null) {
  39103. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  39104. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  39105. }
  39106. });
  39107. } else if (shape === 'square') {
  39108. points.forEach(function (item, index) {
  39109. if (item !== null) {
  39110. context.moveTo(item.x - 3.5, item.y - 3.5);
  39111. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  39112. }
  39113. });
  39114. } else if (shape === 'triangle') {
  39115. points.forEach(function (item, index) {
  39116. if (item !== null) {
  39117. context.moveTo(item.x, item.y - 4.5);
  39118. context.lineTo(item.x - 4.5, item.y + 4.5);
  39119. context.lineTo(item.x + 4.5, item.y + 4.5);
  39120. context.lineTo(item.x, item.y - 4.5);
  39121. }
  39122. });
  39123. } else if (shape === 'triangle') {
  39124. return;
  39125. }
  39126. context.closePath();
  39127. context.fill();
  39128. context.stroke();
  39129. });
  39130. if (opts.dataLabel !== false && process === 1) {
  39131. series.forEach(function (eachSeries, seriesIndex) {
  39132. var ranges, minRange, maxRange;
  39133. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39134. minRange = ranges.pop();
  39135. maxRange = ranges.shift();
  39136. var data = eachSeries.data;
  39137. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39138. drawPointText(points, eachSeries, config, context, opts);
  39139. });
  39140. }
  39141. context.restore();
  39142. return {
  39143. xAxisPoints: xAxisPoints,
  39144. calPoints: calPoints,
  39145. eachSpacing: eachSpacing
  39146. };
  39147. }
  39148. function drawBubbleDataPoints(series, opts, config, context) {
  39149. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39150. var bubbleOption = assign({}, {
  39151. opacity: 1,
  39152. border: 2
  39153. }, opts.extra.bubble);
  39154. var xAxisData = opts.chartData.xAxisData,
  39155. xAxisPoints = xAxisData.xAxisPoints,
  39156. eachSpacing = xAxisData.eachSpacing;
  39157. var calPoints = [];
  39158. context.save();
  39159. var leftSpace = 0;
  39160. var rightSpace = opts.width + eachSpacing;
  39161. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39162. context.translate(opts._scrollDistance_, 0);
  39163. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  39164. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  39165. }
  39166. series.forEach(function (eachSeries, seriesIndex) {
  39167. var ranges, minRange, maxRange;
  39168. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39169. minRange = ranges.pop();
  39170. maxRange = ranges.shift();
  39171. var data = eachSeries.data;
  39172. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39173. context.beginPath();
  39174. context.setStrokeStyle(eachSeries.color);
  39175. context.setLineWidth(bubbleOption.border * opts.pix);
  39176. context.setFillStyle(hexToRgb(eachSeries.color, bubbleOption.opacity));
  39177. points.forEach(function (item, index) {
  39178. context.moveTo(item.x + item.r, item.y);
  39179. context.arc(item.x, item.y, item.r * opts.pix, 0, 2 * Math.PI, false);
  39180. });
  39181. context.closePath();
  39182. context.fill();
  39183. context.stroke();
  39184. if (opts.dataLabel !== false && process === 1) {
  39185. points.forEach(function (item, index) {
  39186. context.beginPath();
  39187. var fontSize = series.textSize * opts.pix || config.fontSize;
  39188. context.setFontSize(fontSize);
  39189. context.setFillStyle(series.textColor || "#FFFFFF");
  39190. context.setTextAlign('center');
  39191. context.fillText(String(item.t), item.x, item.y + fontSize / 2);
  39192. context.closePath();
  39193. context.stroke();
  39194. context.setTextAlign('left');
  39195. });
  39196. }
  39197. });
  39198. context.restore();
  39199. return {
  39200. xAxisPoints: xAxisPoints,
  39201. calPoints: calPoints,
  39202. eachSpacing: eachSpacing
  39203. };
  39204. }
  39205. function drawLineDataPoints(series, opts, config, context) {
  39206. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39207. var lineOption = assign({}, {
  39208. type: 'straight',
  39209. width: 2
  39210. }, opts.extra.line);
  39211. lineOption.width *= opts.pix;
  39212. var xAxisData = opts.chartData.xAxisData,
  39213. xAxisPoints = xAxisData.xAxisPoints,
  39214. eachSpacing = xAxisData.eachSpacing;
  39215. var calPoints = [];
  39216. context.save();
  39217. var leftSpace = 0;
  39218. var rightSpace = opts.width + eachSpacing;
  39219. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39220. context.translate(opts._scrollDistance_, 0);
  39221. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  39222. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  39223. }
  39224. series.forEach(function (eachSeries, seriesIndex) {
  39225. var ranges, minRange, maxRange;
  39226. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39227. minRange = ranges.pop();
  39228. maxRange = ranges.shift();
  39229. var data = eachSeries.data;
  39230. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39231. calPoints.push(points);
  39232. var splitPointList = splitPoints(points, eachSeries);
  39233. if (eachSeries.lineType == 'dash') {
  39234. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  39235. dashLength *= opts.pix;
  39236. context.setLineDash([dashLength, dashLength]);
  39237. }
  39238. context.beginPath();
  39239. context.setStrokeStyle(eachSeries.color);
  39240. context.setLineWidth(lineOption.width);
  39241. splitPointList.forEach(function (points, index) {
  39242. if (points.length === 1) {
  39243. context.moveTo(points[0].x, points[0].y);
  39244. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  39245. } else {
  39246. context.moveTo(points[0].x, points[0].y);
  39247. var startPoint = 0;
  39248. if (lineOption.type === 'curve') {
  39249. for (var j = 0; j < points.length; j++) {
  39250. var item = points[j];
  39251. if (startPoint == 0 && item.x > leftSpace) {
  39252. context.moveTo(item.x, item.y);
  39253. startPoint = 1;
  39254. }
  39255. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  39256. var ctrlPoint = createCurveControlPoints(points, j - 1);
  39257. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  39258. }
  39259. }
  39260. ;
  39261. }
  39262. if (lineOption.type === 'straight') {
  39263. for (var _j6 = 0; _j6 < points.length; _j6++) {
  39264. var _item17 = points[_j6];
  39265. if (startPoint == 0 && _item17.x > leftSpace) {
  39266. context.moveTo(_item17.x, _item17.y);
  39267. startPoint = 1;
  39268. }
  39269. if (_j6 > 0 && _item17.x > leftSpace && _item17.x < rightSpace) {
  39270. context.lineTo(_item17.x, _item17.y);
  39271. }
  39272. }
  39273. ;
  39274. }
  39275. if (lineOption.type === 'step') {
  39276. for (var _j7 = 0; _j7 < points.length; _j7++) {
  39277. var _item18 = points[_j7];
  39278. if (startPoint == 0 && _item18.x > leftSpace) {
  39279. context.moveTo(_item18.x, _item18.y);
  39280. startPoint = 1;
  39281. }
  39282. if (_j7 > 0 && _item18.x > leftSpace && _item18.x < rightSpace) {
  39283. context.lineTo(_item18.x, points[_j7 - 1].y);
  39284. context.lineTo(_item18.x, _item18.y);
  39285. }
  39286. }
  39287. ;
  39288. }
  39289. context.moveTo(points[0].x, points[0].y);
  39290. }
  39291. });
  39292. context.stroke();
  39293. context.setLineDash([]);
  39294. if (opts.dataPointShape !== false) {
  39295. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39296. }
  39297. });
  39298. if (opts.dataLabel !== false && process === 1) {
  39299. series.forEach(function (eachSeries, seriesIndex) {
  39300. var ranges, minRange, maxRange;
  39301. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39302. minRange = ranges.pop();
  39303. maxRange = ranges.shift();
  39304. var data = eachSeries.data;
  39305. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39306. drawPointText(points, eachSeries, config, context, opts);
  39307. });
  39308. }
  39309. context.restore();
  39310. return {
  39311. xAxisPoints: xAxisPoints,
  39312. calPoints: calPoints,
  39313. eachSpacing: eachSpacing
  39314. };
  39315. }
  39316. function drawMixDataPoints(series, opts, config, context) {
  39317. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39318. var columnOption = assign({}, {
  39319. width: eachSpacing / 2,
  39320. barBorderCircle: false,
  39321. barBorderRadius: [],
  39322. seriesGap: 2,
  39323. linearType: 'none',
  39324. linearOpacity: 1,
  39325. customColor: [],
  39326. colorStop: 0
  39327. }, opts.extra.mix.column);
  39328. var xAxisData = opts.chartData.xAxisData,
  39329. xAxisPoints = xAxisData.xAxisPoints,
  39330. eachSpacing = xAxisData.eachSpacing;
  39331. var endY = opts.height - opts.area[2];
  39332. var calPoints = [];
  39333. var columnIndex = 0;
  39334. var columnLength = 0;
  39335. series.forEach(function (eachSeries, seriesIndex) {
  39336. if (eachSeries.type == 'column') {
  39337. columnLength += 1;
  39338. }
  39339. });
  39340. context.save();
  39341. var leftNum = -2;
  39342. var rightNum = xAxisPoints.length + 2;
  39343. var leftSpace = 0;
  39344. var rightSpace = opts.width + eachSpacing;
  39345. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39346. context.translate(opts._scrollDistance_, 0);
  39347. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  39348. rightNum = leftNum + opts.xAxis.itemCount + 4;
  39349. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  39350. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  39351. }
  39352. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  39353. series.forEach(function (eachSeries, seriesIndex) {
  39354. var ranges, minRange, maxRange;
  39355. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39356. minRange = ranges.pop();
  39357. maxRange = ranges.shift();
  39358. var data = eachSeries.data;
  39359. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39360. calPoints.push(points);
  39361. // 绘制柱状数据图
  39362. if (eachSeries.type == 'column') {
  39363. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  39364. for (var i = 0; i < points.length; i++) {
  39365. var item = points[i];
  39366. if (item !== null && i > leftNum && i < rightNum) {
  39367. var startX = item.x - item.width / 2;
  39368. var height = opts.height - item.y - opts.area[2];
  39369. context.beginPath();
  39370. var fillColor = item.color || eachSeries.color;
  39371. var strokeColor = item.color || eachSeries.color;
  39372. if (columnOption.linearType !== 'none') {
  39373. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  39374. //透明渐变
  39375. if (columnOption.linearType == 'opacity') {
  39376. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  39377. grd.addColorStop(1, hexToRgb(fillColor, 1));
  39378. } else {
  39379. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  39380. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  39381. grd.addColorStop(1, hexToRgb(fillColor, 1));
  39382. }
  39383. fillColor = grd;
  39384. }
  39385. // 圆角边框
  39386. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle) {
  39387. var left = startX;
  39388. var top = item.y;
  39389. var width = item.width;
  39390. var _height3 = opts.height - opts.area[2] - item.y;
  39391. if (columnOption.barBorderCircle) {
  39392. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  39393. }
  39394. var _columnOption$barBord3 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  39395. r0 = _columnOption$barBord3[0],
  39396. r1 = _columnOption$barBord3[1],
  39397. r2 = _columnOption$barBord3[2],
  39398. r3 = _columnOption$barBord3[3];
  39399. var minRadius = Math.min(width / 2, _height3 / 2);
  39400. r0 = r0 > minRadius ? minRadius : r0;
  39401. r1 = r1 > minRadius ? minRadius : r1;
  39402. r2 = r2 > minRadius ? minRadius : r2;
  39403. r3 = r3 > minRadius ? minRadius : r3;
  39404. r0 = r0 < 0 ? 0 : r0;
  39405. r1 = r1 < 0 ? 0 : r1;
  39406. r2 = r2 < 0 ? 0 : r2;
  39407. r3 = r3 < 0 ? 0 : r3;
  39408. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  39409. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  39410. context.arc(left + width - r2, top + _height3 - r2, r2, 0, Math.PI / 2);
  39411. context.arc(left + r3, top + _height3 - r3, r3, Math.PI / 2, Math.PI);
  39412. } else {
  39413. context.moveTo(startX, item.y);
  39414. context.lineTo(startX + item.width - 2, item.y);
  39415. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  39416. context.lineTo(startX, opts.height - opts.area[2]);
  39417. context.lineTo(startX, item.y);
  39418. context.setLineWidth(1);
  39419. context.setStrokeStyle(strokeColor);
  39420. }
  39421. context.setFillStyle(fillColor);
  39422. context.closePath();
  39423. context.fill();
  39424. }
  39425. }
  39426. columnIndex += 1;
  39427. }
  39428. //绘制区域图数据
  39429. if (eachSeries.type == 'area') {
  39430. var _splitPointList = splitPoints(points, eachSeries);
  39431. for (var _i20 = 0; _i20 < _splitPointList.length; _i20++) {
  39432. var _points3 = _splitPointList[_i20];
  39433. // 绘制区域数据
  39434. context.beginPath();
  39435. context.setStrokeStyle(eachSeries.color);
  39436. context.setFillStyle(hexToRgb(eachSeries.color, 0.2));
  39437. context.setLineWidth(2 * opts.pix);
  39438. if (_points3.length > 1) {
  39439. var firstPoint = _points3[0];
  39440. var lastPoint = _points3[_points3.length - 1];
  39441. context.moveTo(firstPoint.x, firstPoint.y);
  39442. var startPoint = 0;
  39443. if (eachSeries.style === 'curve') {
  39444. for (var j = 0; j < _points3.length; j++) {
  39445. var _item19 = _points3[j];
  39446. if (startPoint == 0 && _item19.x > leftSpace) {
  39447. context.moveTo(_item19.x, _item19.y);
  39448. startPoint = 1;
  39449. }
  39450. if (j > 0 && _item19.x > leftSpace && _item19.x < rightSpace) {
  39451. var ctrlPoint = createCurveControlPoints(_points3, j - 1);
  39452. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item19.x, _item19.y);
  39453. }
  39454. }
  39455. ;
  39456. } else {
  39457. for (var _j8 = 0; _j8 < _points3.length; _j8++) {
  39458. var _item20 = _points3[_j8];
  39459. if (startPoint == 0 && _item20.x > leftSpace) {
  39460. context.moveTo(_item20.x, _item20.y);
  39461. startPoint = 1;
  39462. }
  39463. if (_j8 > 0 && _item20.x > leftSpace && _item20.x < rightSpace) {
  39464. context.lineTo(_item20.x, _item20.y);
  39465. }
  39466. }
  39467. ;
  39468. }
  39469. context.lineTo(lastPoint.x, endY);
  39470. context.lineTo(firstPoint.x, endY);
  39471. context.lineTo(firstPoint.x, firstPoint.y);
  39472. } else {
  39473. var _item21 = _points3[0];
  39474. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  39475. context.lineTo(_item21.x + eachSpacing / 2, _item21.y);
  39476. context.lineTo(_item21.x + eachSpacing / 2, endY);
  39477. context.lineTo(_item21.x - eachSpacing / 2, endY);
  39478. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  39479. }
  39480. context.closePath();
  39481. context.fill();
  39482. }
  39483. }
  39484. // 绘制折线数据图
  39485. if (eachSeries.type == 'line') {
  39486. var splitPointList = splitPoints(points, eachSeries);
  39487. splitPointList.forEach(function (points, index) {
  39488. if (eachSeries.lineType == 'dash') {
  39489. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  39490. dashLength *= opts.pix;
  39491. context.setLineDash([dashLength, dashLength]);
  39492. }
  39493. context.beginPath();
  39494. context.setStrokeStyle(eachSeries.color);
  39495. context.setLineWidth(2 * opts.pix);
  39496. if (points.length === 1) {
  39497. context.moveTo(points[0].x, points[0].y);
  39498. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  39499. } else {
  39500. context.moveTo(points[0].x, points[0].y);
  39501. var _startPoint2 = 0;
  39502. if (eachSeries.style == 'curve') {
  39503. for (var _j9 = 0; _j9 < points.length; _j9++) {
  39504. var _item22 = points[_j9];
  39505. if (_startPoint2 == 0 && _item22.x > leftSpace) {
  39506. context.moveTo(_item22.x, _item22.y);
  39507. _startPoint2 = 1;
  39508. }
  39509. if (_j9 > 0 && _item22.x > leftSpace && _item22.x < rightSpace) {
  39510. var ctrlPoint = createCurveControlPoints(points, _j9 - 1);
  39511. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item22.x, _item22.y);
  39512. }
  39513. }
  39514. } else {
  39515. for (var _j10 = 0; _j10 < points.length; _j10++) {
  39516. var _item23 = points[_j10];
  39517. if (_startPoint2 == 0 && _item23.x > leftSpace) {
  39518. context.moveTo(_item23.x, _item23.y);
  39519. _startPoint2 = 1;
  39520. }
  39521. if (_j10 > 0 && _item23.x > leftSpace && _item23.x < rightSpace) {
  39522. context.lineTo(_item23.x, _item23.y);
  39523. }
  39524. }
  39525. }
  39526. context.moveTo(points[0].x, points[0].y);
  39527. }
  39528. context.stroke();
  39529. context.setLineDash([]);
  39530. });
  39531. }
  39532. // 绘制点数据图
  39533. if (eachSeries.type == 'point') {
  39534. eachSeries.addPoint = true;
  39535. }
  39536. if (eachSeries.addPoint == true && eachSeries.type !== 'column') {
  39537. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39538. }
  39539. });
  39540. if (opts.dataLabel !== false && process === 1) {
  39541. var columnIndex = 0;
  39542. series.forEach(function (eachSeries, seriesIndex) {
  39543. var ranges, minRange, maxRange;
  39544. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  39545. minRange = ranges.pop();
  39546. maxRange = ranges.shift();
  39547. var data = eachSeries.data;
  39548. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  39549. if (eachSeries.type !== 'column') {
  39550. drawPointText(points, eachSeries, config, context, opts);
  39551. } else {
  39552. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  39553. drawPointText(points, eachSeries, config, context, opts);
  39554. columnIndex += 1;
  39555. }
  39556. });
  39557. }
  39558. context.restore();
  39559. return {
  39560. xAxisPoints: xAxisPoints,
  39561. calPoints: calPoints,
  39562. eachSpacing: eachSpacing
  39563. };
  39564. }
  39565. function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
  39566. var toolTipOption = opts.extra.tooltip || {};
  39567. if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {
  39568. drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints);
  39569. }
  39570. context.save();
  39571. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  39572. context.translate(opts._scrollDistance_, 0);
  39573. }
  39574. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  39575. drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
  39576. }
  39577. context.restore();
  39578. }
  39579. function drawXAxis(categories, opts, config, context) {
  39580. var xAxisData = opts.chartData.xAxisData,
  39581. xAxisPoints = xAxisData.xAxisPoints,
  39582. startX = xAxisData.startX,
  39583. endX = xAxisData.endX,
  39584. eachSpacing = xAxisData.eachSpacing;
  39585. var boundaryGap = 'center';
  39586. if (opts.type == 'bar' || opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  39587. boundaryGap = opts.xAxis.boundaryGap;
  39588. }
  39589. var startY = opts.height - opts.area[2];
  39590. var endY = opts.area[0];
  39591. //绘制滚动条
  39592. if (opts.enableScroll && opts.xAxis.scrollShow) {
  39593. var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
  39594. var scrollScreenWidth = endX - startX;
  39595. var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
  39596. var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
  39597. var scrollLeft = 0;
  39598. if (opts._scrollDistance_) {
  39599. scrollLeft = -opts._scrollDistance_ * scrollScreenWidth / scrollTotalWidth;
  39600. }
  39601. context.beginPath();
  39602. context.setLineCap('round');
  39603. context.setLineWidth(6 * opts.pix);
  39604. context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
  39605. context.moveTo(startX, scrollY);
  39606. context.lineTo(endX, scrollY);
  39607. context.stroke();
  39608. context.closePath();
  39609. context.beginPath();
  39610. context.setLineCap('round');
  39611. context.setLineWidth(6 * opts.pix);
  39612. context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
  39613. context.moveTo(startX + scrollLeft, scrollY);
  39614. context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
  39615. context.stroke();
  39616. context.closePath();
  39617. context.setLineCap('butt');
  39618. }
  39619. context.save();
  39620. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  39621. context.translate(opts._scrollDistance_, 0);
  39622. }
  39623. //绘制X轴刻度线
  39624. if (opts.xAxis.calibration === true) {
  39625. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  39626. context.setLineCap('butt');
  39627. context.setLineWidth(1 * opts.pix);
  39628. xAxisPoints.forEach(function (item, index) {
  39629. if (index > 0) {
  39630. context.beginPath();
  39631. context.moveTo(item - eachSpacing / 2, startY);
  39632. context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pix);
  39633. context.closePath();
  39634. context.stroke();
  39635. }
  39636. });
  39637. }
  39638. //绘制X轴网格
  39639. if (opts.xAxis.disableGrid !== true) {
  39640. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  39641. context.setLineCap('butt');
  39642. context.setLineWidth(1 * opts.pix);
  39643. if (opts.xAxis.gridType == 'dash') {
  39644. context.setLineDash([opts.xAxis.dashLength * opts.pix, opts.xAxis.dashLength * opts.pix]);
  39645. }
  39646. opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
  39647. xAxisPoints.forEach(function (item, index) {
  39648. if (index % opts.xAxis.gridEval == 0) {
  39649. context.beginPath();
  39650. context.moveTo(item, startY);
  39651. context.lineTo(item, endY);
  39652. context.stroke();
  39653. }
  39654. });
  39655. context.setLineDash([]);
  39656. }
  39657. //绘制X轴文案
  39658. if (opts.xAxis.disabled !== true) {
  39659. // 对X轴列表做抽稀处理
  39660. //默认全部显示X轴标签
  39661. var maxXAxisListLength = categories.length;
  39662. //如果设置了X轴单屏数量
  39663. if (opts.xAxis.labelCount) {
  39664. //如果设置X轴密度
  39665. if (opts.xAxis.itemCount) {
  39666. maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
  39667. } else {
  39668. maxXAxisListLength = opts.xAxis.labelCount;
  39669. }
  39670. maxXAxisListLength -= 1;
  39671. }
  39672. var ratio = Math.ceil(categories.length / maxXAxisListLength);
  39673. var newCategories = [];
  39674. var cgLength = categories.length;
  39675. for (var i = 0; i < cgLength; i++) {
  39676. if (i % ratio !== 0) {
  39677. newCategories.push("");
  39678. } else {
  39679. newCategories.push(categories[i]);
  39680. }
  39681. }
  39682. newCategories[cgLength - 1] = categories[cgLength - 1];
  39683. var xAxisFontSize = opts.xAxis.fontSize * opts.pix || config.fontSize;
  39684. if (config._xAxisTextAngle_ === 0) {
  39685. newCategories.forEach(function (item, index) {
  39686. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  39687. var offset = -measureText(String(xitem), xAxisFontSize, context) / 2;
  39688. if (boundaryGap == 'center') {
  39689. offset += eachSpacing / 2;
  39690. }
  39691. var scrollHeight = 0;
  39692. if (opts.xAxis.scrollShow) {
  39693. scrollHeight = 6 * opts.pix;
  39694. }
  39695. context.beginPath();
  39696. context.setFontSize(xAxisFontSize);
  39697. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  39698. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);
  39699. context.closePath();
  39700. context.stroke();
  39701. });
  39702. } else {
  39703. newCategories.forEach(function (item, index) {
  39704. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  39705. context.save();
  39706. context.beginPath();
  39707. context.setFontSize(xAxisFontSize);
  39708. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  39709. var textWidth = measureText(String(xitem), xAxisFontSize, context);
  39710. var offset = -textWidth;
  39711. if (boundaryGap == 'center') {
  39712. offset += eachSpacing / 2;
  39713. }
  39714. var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),
  39715. transX = _calRotateTranslate.transX,
  39716. transY = _calRotateTranslate.transY;
  39717. context.rotate(-1 * config._xAxisTextAngle_);
  39718. context.translate(transX, transY);
  39719. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);
  39720. context.closePath();
  39721. context.stroke();
  39722. context.restore();
  39723. });
  39724. }
  39725. }
  39726. context.restore();
  39727. //绘制X轴轴线
  39728. if (opts.xAxis.axisLine) {
  39729. context.beginPath();
  39730. context.setStrokeStyle(opts.xAxis.axisLineColor);
  39731. context.setLineWidth(1 * opts.pix);
  39732. context.moveTo(startX, opts.height - opts.area[2]);
  39733. context.lineTo(endX, opts.height - opts.area[2]);
  39734. context.stroke();
  39735. }
  39736. }
  39737. function drawYAxisGrid(categories, opts, config, context) {
  39738. if (opts.yAxis.disableGrid === true) {
  39739. return;
  39740. }
  39741. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  39742. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  39743. var startX = opts.area[3];
  39744. var xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  39745. xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
  39746. var TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
  39747. var endX = startX + TotalWidth;
  39748. var points = [];
  39749. var startY = 1;
  39750. if (opts.xAxis.axisLine === false) {
  39751. startY = 0;
  39752. }
  39753. for (var i = startY; i < opts.yAxis.splitNumber + 1; i++) {
  39754. points.push(opts.height - opts.area[2] - eachSpacing * i);
  39755. }
  39756. context.save();
  39757. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  39758. context.translate(opts._scrollDistance_, 0);
  39759. }
  39760. if (opts.yAxis.gridType == 'dash') {
  39761. context.setLineDash([opts.yAxis.dashLength * opts.pix, opts.yAxis.dashLength * opts.pix]);
  39762. }
  39763. context.setStrokeStyle(opts.yAxis.gridColor);
  39764. context.setLineWidth(1 * opts.pix);
  39765. points.forEach(function (item, index) {
  39766. context.beginPath();
  39767. context.moveTo(startX, item);
  39768. context.lineTo(endX, item);
  39769. context.stroke();
  39770. });
  39771. context.setLineDash([]);
  39772. context.restore();
  39773. }
  39774. function drawYAxis(series, opts, config, context) {
  39775. if (opts.yAxis.disabled === true) {
  39776. return;
  39777. }
  39778. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  39779. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  39780. var startX = opts.area[3];
  39781. var endX = opts.width - opts.area[1];
  39782. var endY = opts.height - opts.area[2];
  39783. var fillEndY = endY + config.xAxisHeight;
  39784. if (opts.xAxis.scrollShow) {
  39785. fillEndY -= 3 * opts.pix;
  39786. }
  39787. if (opts.xAxis.rotateLabel) {
  39788. fillEndY = opts.height - opts.area[2] + opts.fontSize * opts.pix / 2;
  39789. }
  39790. // set YAxis background
  39791. context.beginPath();
  39792. context.setFillStyle(opts.background);
  39793. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'left') {
  39794. context.fillRect(0, 0, startX, fillEndY);
  39795. }
  39796. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'right') {
  39797. context.fillRect(endX, 0, opts.width, fillEndY);
  39798. }
  39799. context.closePath();
  39800. context.stroke();
  39801. var tStartLeft = opts.area[3];
  39802. var tStartRight = opts.width - opts.area[1];
  39803. var tStartCenter = opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2;
  39804. if (opts.yAxis.data) {
  39805. var _loop4 = function _loop4(i) {
  39806. var yData = opts.yAxis.data[i];
  39807. points = [];
  39808. if (yData.type === 'categories') {
  39809. for (var _i21 = 0; _i21 <= yData.categories.length; _i21++) {
  39810. points.push(opts.area[0] + spacingValid / yData.categories.length / 2 + spacingValid / yData.categories.length * _i21);
  39811. }
  39812. } else {
  39813. for (var _i22 = 0; _i22 <= opts.yAxis.splitNumber; _i22++) {
  39814. points.push(opts.area[0] + eachSpacing * _i22);
  39815. }
  39816. }
  39817. if (yData.disabled !== true) {
  39818. var rangesFormat = opts.chartData.yAxisData.rangesFormat[i];
  39819. var yAxisFontSize = yData.fontSize ? yData.fontSize * opts.pix : config.fontSize;
  39820. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[i];
  39821. var textAlign = yData.textAlign || "right";
  39822. //画Y轴刻度及文案
  39823. rangesFormat.forEach(function (item, index) {
  39824. var pos = points[index] ? points[index] : endY;
  39825. context.beginPath();
  39826. context.setFontSize(yAxisFontSize);
  39827. context.setLineWidth(1 * opts.pix);
  39828. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  39829. context.setFillStyle(yData.fontColor || opts.fontColor);
  39830. var tmpstrat = 0;
  39831. var gapwidth = 4 * opts.pix;
  39832. if (yAxisWidth.position == 'left') {
  39833. //画刻度线
  39834. if (yData.calibration == true) {
  39835. context.moveTo(tStartLeft, pos);
  39836. context.lineTo(tStartLeft - 3 * opts.pix, pos);
  39837. gapwidth += 3 * opts.pix;
  39838. }
  39839. //画文字
  39840. switch (textAlign) {
  39841. case "left":
  39842. context.setTextAlign('left');
  39843. tmpstrat = tStartLeft - yAxisWidth.width;
  39844. break;
  39845. case "right":
  39846. context.setTextAlign('right');
  39847. tmpstrat = tStartLeft - gapwidth;
  39848. break;
  39849. default:
  39850. context.setTextAlign('center');
  39851. tmpstrat = tStartLeft - yAxisWidth.width / 2;
  39852. }
  39853. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  39854. } else if (yAxisWidth.position == 'right') {
  39855. //画刻度线
  39856. if (yData.calibration == true) {
  39857. context.moveTo(tStartRight, pos);
  39858. context.lineTo(tStartRight + 3 * opts.pix, pos);
  39859. gapwidth += 3 * opts.pix;
  39860. }
  39861. switch (textAlign) {
  39862. case "left":
  39863. context.setTextAlign('left');
  39864. tmpstrat = tStartRight + gapwidth;
  39865. break;
  39866. case "right":
  39867. context.setTextAlign('right');
  39868. tmpstrat = tStartRight + yAxisWidth.width;
  39869. break;
  39870. default:
  39871. context.setTextAlign('center');
  39872. tmpstrat = tStartRight + yAxisWidth.width / 2;
  39873. }
  39874. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  39875. } else if (yAxisWidth.position == 'center') {
  39876. //画刻度线
  39877. if (yData.calibration == true) {
  39878. context.moveTo(tStartCenter, pos);
  39879. context.lineTo(tStartCenter - 3 * opts.pix, pos);
  39880. gapwidth += 3 * opts.pix;
  39881. }
  39882. //画文字
  39883. switch (textAlign) {
  39884. case "left":
  39885. context.setTextAlign('left');
  39886. tmpstrat = tStartCenter - yAxisWidth.width;
  39887. break;
  39888. case "right":
  39889. context.setTextAlign('right');
  39890. tmpstrat = tStartCenter - gapwidth;
  39891. break;
  39892. default:
  39893. context.setTextAlign('center');
  39894. tmpstrat = tStartCenter - yAxisWidth.width / 2;
  39895. }
  39896. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  39897. }
  39898. context.closePath();
  39899. context.stroke();
  39900. context.setTextAlign('left');
  39901. });
  39902. //画Y轴轴线
  39903. if (yData.axisLine !== false) {
  39904. context.beginPath();
  39905. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  39906. context.setLineWidth(1 * opts.pix);
  39907. if (yAxisWidth.position == 'left') {
  39908. context.moveTo(tStartLeft, opts.height - opts.area[2]);
  39909. context.lineTo(tStartLeft, opts.area[0]);
  39910. } else if (yAxisWidth.position == 'right') {
  39911. context.moveTo(tStartRight, opts.height - opts.area[2]);
  39912. context.lineTo(tStartRight, opts.area[0]);
  39913. } else if (yAxisWidth.position == 'center') {
  39914. context.moveTo(tStartCenter, opts.height - opts.area[2]);
  39915. context.lineTo(tStartCenter, opts.area[0]);
  39916. }
  39917. context.stroke();
  39918. }
  39919. //画Y轴标题
  39920. if (opts.yAxis.showTitle) {
  39921. var titleFontSize = yData.titleFontSize * opts.pix || config.fontSize;
  39922. var title = yData.title;
  39923. context.beginPath();
  39924. context.setFontSize(titleFontSize);
  39925. context.setFillStyle(yData.titleFontColor || opts.fontColor);
  39926. if (yAxisWidth.position == 'left') {
  39927. context.fillText(title, tStartLeft - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  39928. } else if (yAxisWidth.position == 'right') {
  39929. context.fillText(title, tStartRight - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  39930. } else if (yAxisWidth.position == 'center') {
  39931. context.fillText(title, tStartCenter - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  39932. }
  39933. context.closePath();
  39934. context.stroke();
  39935. }
  39936. if (yAxisWidth.position == 'left') {
  39937. tStartLeft -= yAxisWidth.width + opts.yAxis.padding * opts.pix;
  39938. } else {
  39939. tStartRight += yAxisWidth.width + opts.yAxis.padding * opts.pix;
  39940. }
  39941. }
  39942. };
  39943. for (var i = 0; i < opts.yAxis.data.length; i++) {
  39944. var points;
  39945. _loop4(i);
  39946. }
  39947. }
  39948. }
  39949. function drawLegend(series, opts, config, context, chartData) {
  39950. if (opts.legend.show === false) {
  39951. return;
  39952. }
  39953. var legendData = chartData.legendData;
  39954. var legendList = legendData.points;
  39955. var legendArea = legendData.area;
  39956. var padding = opts.legend.padding * opts.pix;
  39957. var fontSize = opts.legend.fontSize * opts.pix;
  39958. var shapeWidth = 15 * opts.pix;
  39959. var shapeRight = 5 * opts.pix;
  39960. var itemGap = opts.legend.itemGap * opts.pix;
  39961. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  39962. //画背景及边框
  39963. context.beginPath();
  39964. context.setLineWidth(opts.legend.borderWidth * opts.pix);
  39965. context.setStrokeStyle(opts.legend.borderColor);
  39966. context.setFillStyle(opts.legend.backgroundColor);
  39967. context.moveTo(legendArea.start.x, legendArea.start.y);
  39968. context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
  39969. context.closePath();
  39970. context.fill();
  39971. context.stroke();
  39972. legendList.forEach(function (itemList, listIndex) {
  39973. var width = 0;
  39974. var height = 0;
  39975. width = legendData.widthArr[listIndex];
  39976. height = legendData.heightArr[listIndex];
  39977. var startX = 0;
  39978. var startY = 0;
  39979. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  39980. switch (opts.legend.float) {
  39981. case 'left':
  39982. startX = legendArea.start.x + padding;
  39983. break;
  39984. case 'right':
  39985. startX = legendArea.start.x + legendArea.width - width;
  39986. break;
  39987. default:
  39988. startX = legendArea.start.x + (legendArea.width - width) / 2;
  39989. }
  39990. startY = legendArea.start.y + padding + listIndex * lineHeight;
  39991. } else {
  39992. if (listIndex == 0) {
  39993. width = 0;
  39994. } else {
  39995. width = legendData.widthArr[listIndex - 1];
  39996. }
  39997. startX = legendArea.start.x + padding + width;
  39998. startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
  39999. }
  40000. context.setFontSize(config.fontSize);
  40001. for (var i = 0; i < itemList.length; i++) {
  40002. var item = itemList[i];
  40003. item.area = [0, 0, 0, 0];
  40004. item.area[0] = startX;
  40005. item.area[1] = startY;
  40006. item.area[3] = startY + lineHeight;
  40007. context.beginPath();
  40008. context.setLineWidth(1 * opts.pix);
  40009. context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
  40010. context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
  40011. switch (item.legendShape) {
  40012. case 'line':
  40013. context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pix);
  40014. context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pix, 15 * opts.pix, 4 * opts.pix);
  40015. break;
  40016. case 'triangle':
  40017. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  40018. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  40019. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  40020. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  40021. break;
  40022. case 'diamond':
  40023. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  40024. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight);
  40025. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  40026. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight);
  40027. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  40028. break;
  40029. case 'circle':
  40030. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight);
  40031. context.arc(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight, 5 * opts.pix, 0, 2 * Math.PI);
  40032. break;
  40033. case 'rect':
  40034. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  40035. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  40036. break;
  40037. case 'square':
  40038. context.moveTo(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  40039. context.fillRect(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix, 10 * opts.pix, 10 * opts.pix);
  40040. break;
  40041. case 'none':
  40042. break;
  40043. default:
  40044. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  40045. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  40046. }
  40047. context.closePath();
  40048. context.fill();
  40049. context.stroke();
  40050. startX += shapeWidth + shapeRight;
  40051. var fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
  40052. context.beginPath();
  40053. context.setFontSize(fontSize);
  40054. context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
  40055. context.fillText(item.name, startX, startY + fontTrans);
  40056. context.closePath();
  40057. context.stroke();
  40058. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  40059. startX += measureText(item.name, fontSize, context) + itemGap;
  40060. item.area[2] = startX;
  40061. } else {
  40062. item.area[2] = startX + measureText(item.name, fontSize, context) + itemGap;
  40063. ;
  40064. startX -= shapeWidth + shapeRight;
  40065. startY += lineHeight;
  40066. }
  40067. }
  40068. });
  40069. }
  40070. function drawPieDataPoints(series, opts, config, context) {
  40071. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40072. var pieOption = assign({}, {
  40073. activeOpacity: 0.5,
  40074. activeRadius: 10,
  40075. offsetAngle: 0,
  40076. labelWidth: 15,
  40077. ringWidth: 30,
  40078. customRadius: 0,
  40079. border: false,
  40080. borderWidth: 2,
  40081. borderColor: '#FFFFFF',
  40082. centerColor: '#FFFFFF',
  40083. linearType: 'none',
  40084. customColor: []
  40085. }, opts.type == "pie" ? opts.extra.pie : opts.extra.ring);
  40086. var centerPosition = {
  40087. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  40088. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  40089. };
  40090. if (config.pieChartLinePadding == 0) {
  40091. config.pieChartLinePadding = pieOption.activeRadius * opts.pix;
  40092. }
  40093. 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);
  40094. if (pieOption.customRadius > 0) {
  40095. radius = pieOption.customRadius * opts.pix;
  40096. }
  40097. series = getPieDataPoints(series, radius, process);
  40098. var activeRadius = pieOption.activeRadius * opts.pix;
  40099. pieOption.customColor = fillCustomColor(pieOption.linearType, pieOption.customColor, series, config);
  40100. series = series.map(function (eachSeries) {
  40101. eachSeries._start_ += pieOption.offsetAngle * Math.PI / 180;
  40102. return eachSeries;
  40103. });
  40104. series.forEach(function (eachSeries, seriesIndex) {
  40105. if (opts.tooltip) {
  40106. if (opts.tooltip.index == seriesIndex) {
  40107. context.beginPath();
  40108. context.setFillStyle(hexToRgb(eachSeries.color, pieOption.activeOpacity || 0.5));
  40109. context.moveTo(centerPosition.x, centerPosition.y);
  40110. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  40111. context.closePath();
  40112. context.fill();
  40113. }
  40114. }
  40115. context.beginPath();
  40116. context.setLineWidth(pieOption.borderWidth * opts.pix);
  40117. context.lineJoin = "round";
  40118. context.setStrokeStyle(pieOption.borderColor);
  40119. var fillcolor = eachSeries.color;
  40120. if (pieOption.linearType == 'custom') {
  40121. var grd;
  40122. if (context.createCircularGradient) {
  40123. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  40124. } else {
  40125. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  40126. }
  40127. grd.addColorStop(0, hexToRgb(pieOption.customColor[eachSeries.linearIndex], 1));
  40128. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  40129. fillcolor = grd;
  40130. }
  40131. context.setFillStyle(fillcolor);
  40132. context.moveTo(centerPosition.x, centerPosition.y);
  40133. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  40134. context.closePath();
  40135. context.fill();
  40136. if (pieOption.border == true) {
  40137. context.stroke();
  40138. }
  40139. });
  40140. if (opts.type === 'ring') {
  40141. var innerPieWidth = radius * 0.6;
  40142. if (typeof pieOption.ringWidth === 'number' && pieOption.ringWidth > 0) {
  40143. innerPieWidth = Math.max(0, radius - pieOption.ringWidth * opts.pix);
  40144. }
  40145. context.beginPath();
  40146. context.setFillStyle(pieOption.centerColor);
  40147. context.moveTo(centerPosition.x, centerPosition.y);
  40148. context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
  40149. context.closePath();
  40150. context.fill();
  40151. }
  40152. if (opts.dataLabel !== false && process === 1) {
  40153. var valid = false;
  40154. for (var i = 0, len = series.length; i < len; i++) {
  40155. if (series[i].data > 0) {
  40156. valid = true;
  40157. break;
  40158. }
  40159. }
  40160. if (valid) {
  40161. drawPieText(series, opts, config, context, radius, centerPosition);
  40162. }
  40163. }
  40164. if (process === 1 && opts.type === 'ring') {
  40165. drawRingTitle(opts, config, context, centerPosition);
  40166. }
  40167. return {
  40168. center: centerPosition,
  40169. radius: radius,
  40170. series: series
  40171. };
  40172. }
  40173. function drawRoseDataPoints(series, opts, config, context) {
  40174. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40175. var roseOption = assign({}, {
  40176. type: 'area',
  40177. activeOpacity: 0.5,
  40178. activeRadius: 10,
  40179. offsetAngle: 0,
  40180. labelWidth: 15,
  40181. border: false,
  40182. borderWidth: 2,
  40183. borderColor: '#FFFFFF',
  40184. linearType: 'none',
  40185. customColor: []
  40186. }, opts.extra.rose);
  40187. if (config.pieChartLinePadding == 0) {
  40188. config.pieChartLinePadding = roseOption.activeRadius * opts.pix;
  40189. }
  40190. var centerPosition = {
  40191. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  40192. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  40193. };
  40194. 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);
  40195. var minRadius = roseOption.minRadius || radius * 0.5;
  40196. series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
  40197. var activeRadius = roseOption.activeRadius * opts.pix;
  40198. roseOption.customColor = fillCustomColor(roseOption.linearType, roseOption.customColor, series, config);
  40199. series = series.map(function (eachSeries) {
  40200. eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
  40201. return eachSeries;
  40202. });
  40203. series.forEach(function (eachSeries, seriesIndex) {
  40204. if (opts.tooltip) {
  40205. if (opts.tooltip.index == seriesIndex) {
  40206. context.beginPath();
  40207. context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
  40208. context.moveTo(centerPosition.x, centerPosition.y);
  40209. context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  40210. context.closePath();
  40211. context.fill();
  40212. }
  40213. }
  40214. context.beginPath();
  40215. context.setLineWidth(roseOption.borderWidth * opts.pix);
  40216. context.lineJoin = "round";
  40217. context.setStrokeStyle(roseOption.borderColor);
  40218. var fillcolor = eachSeries.color;
  40219. if (roseOption.linearType == 'custom') {
  40220. var grd;
  40221. if (context.createCircularGradient) {
  40222. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  40223. } else {
  40224. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  40225. }
  40226. grd.addColorStop(0, hexToRgb(roseOption.customColor[eachSeries.linearIndex], 1));
  40227. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  40228. fillcolor = grd;
  40229. }
  40230. context.setFillStyle(fillcolor);
  40231. context.moveTo(centerPosition.x, centerPosition.y);
  40232. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  40233. context.closePath();
  40234. context.fill();
  40235. if (roseOption.border == true) {
  40236. context.stroke();
  40237. }
  40238. });
  40239. if (opts.dataLabel !== false && process === 1) {
  40240. var valid = false;
  40241. for (var i = 0, len = series.length; i < len; i++) {
  40242. if (series[i].data > 0) {
  40243. valid = true;
  40244. break;
  40245. }
  40246. }
  40247. if (valid) {
  40248. drawPieText(series, opts, config, context, radius, centerPosition);
  40249. }
  40250. }
  40251. return {
  40252. center: centerPosition,
  40253. radius: radius,
  40254. series: series
  40255. };
  40256. }
  40257. function drawArcbarDataPoints(series, opts, config, context) {
  40258. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40259. var arcbarOption = assign({}, {
  40260. startAngle: 0.75,
  40261. endAngle: 0.25,
  40262. type: 'default',
  40263. width: 12,
  40264. gap: 2,
  40265. linearType: 'none',
  40266. customColor: []
  40267. }, opts.extra.arcbar);
  40268. series = getArcbarDataPoints(series, arcbarOption, process);
  40269. var centerPosition;
  40270. if (arcbarOption.centerX || arcbarOption.centerY) {
  40271. centerPosition = {
  40272. x: arcbarOption.centerX ? arcbarOption.centerX : opts.width / 2,
  40273. y: arcbarOption.centerY ? arcbarOption.centerY : opts.height / 2
  40274. };
  40275. } else {
  40276. centerPosition = {
  40277. x: opts.width / 2,
  40278. y: opts.height / 2
  40279. };
  40280. }
  40281. var radius;
  40282. if (arcbarOption.radius) {
  40283. radius = arcbarOption.radius;
  40284. } else {
  40285. radius = Math.min(centerPosition.x, centerPosition.y);
  40286. radius -= 5 * opts.pix;
  40287. radius -= arcbarOption.width / 2;
  40288. }
  40289. arcbarOption.customColor = fillCustomColor(arcbarOption.linearType, arcbarOption.customColor, series, config);
  40290. for (var i = 0; i < series.length; i++) {
  40291. var eachSeries = series[i];
  40292. //背景颜色
  40293. context.setLineWidth(arcbarOption.width * opts.pix);
  40294. context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
  40295. context.setLineCap('round');
  40296. context.beginPath();
  40297. if (arcbarOption.type == 'default') {
  40298. 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);
  40299. } else {
  40300. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, 0, 2 * Math.PI, false);
  40301. }
  40302. context.stroke();
  40303. //进度条
  40304. var fillColor = eachSeries.color;
  40305. if (arcbarOption.linearType == 'custom') {
  40306. var grd = context.createLinearGradient(centerPosition.x - radius, centerPosition.y, centerPosition.x + radius, centerPosition.y);
  40307. grd.addColorStop(1, hexToRgb(arcbarOption.customColor[eachSeries.linearIndex], 1));
  40308. grd.addColorStop(0, hexToRgb(eachSeries.color, 1));
  40309. fillColor = grd;
  40310. }
  40311. context.setLineWidth(arcbarOption.width * opts.pix);
  40312. context.setStrokeStyle(fillColor);
  40313. context.setLineCap('round');
  40314. context.beginPath();
  40315. 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);
  40316. context.stroke();
  40317. }
  40318. drawRingTitle(opts, config, context, centerPosition);
  40319. return {
  40320. center: centerPosition,
  40321. radius: radius,
  40322. series: series
  40323. };
  40324. }
  40325. function drawGaugeDataPoints(categories, series, opts, config, context) {
  40326. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  40327. var gaugeOption = assign({}, {
  40328. type: 'default',
  40329. startAngle: 0.75,
  40330. endAngle: 0.25,
  40331. width: 15,
  40332. labelOffset: 13,
  40333. splitLine: {
  40334. fixRadius: 0,
  40335. splitNumber: 10,
  40336. width: 15,
  40337. color: '#FFFFFF',
  40338. childNumber: 5,
  40339. childWidth: 5
  40340. },
  40341. pointer: {
  40342. width: 15,
  40343. color: 'auto'
  40344. }
  40345. }, opts.extra.gauge);
  40346. if (gaugeOption.oldAngle == undefined) {
  40347. gaugeOption.oldAngle = gaugeOption.startAngle;
  40348. }
  40349. if (gaugeOption.oldData == undefined) {
  40350. gaugeOption.oldData = 0;
  40351. }
  40352. categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
  40353. var centerPosition = {
  40354. x: opts.width / 2,
  40355. y: opts.height / 2
  40356. };
  40357. var radius = Math.min(centerPosition.x, centerPosition.y);
  40358. radius -= 5 * opts.pix;
  40359. radius -= gaugeOption.width / 2;
  40360. var innerRadius = radius - gaugeOption.width;
  40361. var totalAngle = 0;
  40362. //判断仪表盘的样式:default百度样式,progress新样式
  40363. if (gaugeOption.type == 'progress') {
  40364. //## 第一步画中心圆形背景和进度条背景
  40365. //中心圆形背景
  40366. var pieRadius = radius - gaugeOption.width * 3;
  40367. context.beginPath();
  40368. var gradient = context.createLinearGradient(centerPosition.x, centerPosition.y - pieRadius, centerPosition.x, centerPosition.y + pieRadius);
  40369. //配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
  40370. gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
  40371. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  40372. context.setFillStyle(gradient);
  40373. context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2 * Math.PI, false);
  40374. context.fill();
  40375. //画进度条背景
  40376. context.setLineWidth(gaugeOption.width);
  40377. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  40378. context.setLineCap('round');
  40379. context.beginPath();
  40380. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, gaugeOption.endAngle * Math.PI, false);
  40381. context.stroke();
  40382. //## 第二步画刻度线
  40383. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  40384. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  40385. var childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  40386. var startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  40387. var endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  40388. context.save();
  40389. context.translate(centerPosition.x, centerPosition.y);
  40390. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  40391. var len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
  40392. var proc = series[0].data * process;
  40393. for (var i = 0; i < len; i++) {
  40394. context.beginPath();
  40395. //刻度线随进度变色
  40396. if (proc > i / len) {
  40397. context.setStrokeStyle(hexToRgb(series[0].color, 1));
  40398. } else {
  40399. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  40400. }
  40401. context.setLineWidth(3 * opts.pix);
  40402. context.moveTo(startX, 0);
  40403. context.lineTo(endX, 0);
  40404. context.stroke();
  40405. context.rotate(childAngle * Math.PI);
  40406. }
  40407. context.restore();
  40408. //## 第三步画进度条
  40409. series = getArcbarDataPoints(series, gaugeOption, process);
  40410. context.setLineWidth(gaugeOption.width);
  40411. context.setStrokeStyle(series[0].color);
  40412. context.setLineCap('round');
  40413. context.beginPath();
  40414. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, series[0]._proportion_ * Math.PI, false);
  40415. context.stroke();
  40416. //## 第四步画指针
  40417. var pointerRadius = radius - gaugeOption.width * 2.5;
  40418. context.save();
  40419. context.translate(centerPosition.x, centerPosition.y);
  40420. context.rotate((series[0]._proportion_ - 1) * Math.PI);
  40421. context.beginPath();
  40422. context.setLineWidth(gaugeOption.width / 3);
  40423. var gradient3 = context.createLinearGradient(0, -pointerRadius * 0.6, 0, pointerRadius * 0.6);
  40424. gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
  40425. gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
  40426. gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
  40427. context.setStrokeStyle(gradient3);
  40428. context.arc(0, 0, pointerRadius, 0.85 * Math.PI, 1.15 * Math.PI, false);
  40429. context.stroke();
  40430. context.beginPath();
  40431. context.setLineWidth(1);
  40432. context.setStrokeStyle(series[0].color);
  40433. context.setFillStyle(series[0].color);
  40434. context.moveTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  40435. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2 - 4, 0);
  40436. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, 4);
  40437. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  40438. context.stroke();
  40439. context.fill();
  40440. context.restore();
  40441. //default百度样式
  40442. } else {
  40443. //画背景
  40444. context.setLineWidth(gaugeOption.width);
  40445. context.setLineCap('butt');
  40446. for (var _i23 = 0; _i23 < categories.length; _i23++) {
  40447. var eachCategories = categories[_i23];
  40448. context.beginPath();
  40449. context.setStrokeStyle(eachCategories.color);
  40450. context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false);
  40451. context.stroke();
  40452. }
  40453. context.save();
  40454. //画刻度线
  40455. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  40456. var _splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  40457. var _childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  40458. var _startX2 = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  40459. var _endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  40460. var childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
  40461. context.translate(centerPosition.x, centerPosition.y);
  40462. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  40463. for (var _i24 = 0; _i24 < gaugeOption.splitLine.splitNumber + 1; _i24++) {
  40464. context.beginPath();
  40465. context.setStrokeStyle(gaugeOption.splitLine.color);
  40466. context.setLineWidth(2 * opts.pix);
  40467. context.moveTo(_startX2, 0);
  40468. context.lineTo(_endX, 0);
  40469. context.stroke();
  40470. context.rotate(_splitAngle * Math.PI);
  40471. }
  40472. context.restore();
  40473. context.save();
  40474. context.translate(centerPosition.x, centerPosition.y);
  40475. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  40476. for (var _i25 = 0; _i25 < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; _i25++) {
  40477. context.beginPath();
  40478. context.setStrokeStyle(gaugeOption.splitLine.color);
  40479. context.setLineWidth(1 * opts.pix);
  40480. context.moveTo(_startX2, 0);
  40481. context.lineTo(childendX, 0);
  40482. context.stroke();
  40483. context.rotate(_childAngle * Math.PI);
  40484. }
  40485. context.restore();
  40486. //画指针
  40487. series = getGaugeDataPoints(series, categories, gaugeOption, process);
  40488. for (var _i26 = 0; _i26 < series.length; _i26++) {
  40489. var eachSeries = series[_i26];
  40490. context.save();
  40491. context.translate(centerPosition.x, centerPosition.y);
  40492. context.rotate((eachSeries._proportion_ - 1) * Math.PI);
  40493. context.beginPath();
  40494. context.setFillStyle(eachSeries.color);
  40495. context.moveTo(gaugeOption.pointer.width, 0);
  40496. context.lineTo(0, -gaugeOption.pointer.width / 2);
  40497. context.lineTo(-innerRadius, 0);
  40498. context.lineTo(0, gaugeOption.pointer.width / 2);
  40499. context.lineTo(gaugeOption.pointer.width, 0);
  40500. context.closePath();
  40501. context.fill();
  40502. context.beginPath();
  40503. context.setFillStyle('#FFFFFF');
  40504. context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
  40505. context.fill();
  40506. context.restore();
  40507. }
  40508. if (opts.dataLabel !== false) {
  40509. drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
  40510. }
  40511. }
  40512. //画仪表盘标题,副标题
  40513. drawRingTitle(opts, config, context, centerPosition);
  40514. if (process === 1 && opts.type === 'gauge') {
  40515. opts.extra.gauge.oldAngle = series[0]._proportion_;
  40516. opts.extra.gauge.oldData = series[0].data;
  40517. }
  40518. return {
  40519. center: centerPosition,
  40520. radius: radius,
  40521. innerRadius: innerRadius,
  40522. categories: categories,
  40523. totalAngle: totalAngle
  40524. };
  40525. }
  40526. function drawRadarDataPoints(series, opts, config, context) {
  40527. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40528. var radarOption = assign({}, {
  40529. gridColor: '#cccccc',
  40530. gridType: 'radar',
  40531. opacity: 0.2,
  40532. gridCount: 3,
  40533. border: false,
  40534. borderWidth: 2
  40535. }, opts.extra.radar);
  40536. var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
  40537. var centerPosition = {
  40538. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  40539. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  40540. };
  40541. var xr = (opts.width - opts.area[1] - opts.area[3]) / 2;
  40542. var yr = (opts.height - opts.area[0] - opts.area[2]) / 2;
  40543. var radius = Math.min(xr - (getMaxTextListLength(opts.categories, config.fontSize, context) + config.radarLabelTextMargin), yr - config.radarLabelTextMargin);
  40544. radius -= config.radarLabelTextMargin * opts.pix;
  40545. // 画分割线
  40546. context.beginPath();
  40547. context.setLineWidth(1 * opts.pix);
  40548. context.setStrokeStyle(radarOption.gridColor);
  40549. coordinateAngle.forEach(function (angle) {
  40550. var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
  40551. context.moveTo(centerPosition.x, centerPosition.y);
  40552. context.lineTo(pos.x, pos.y);
  40553. });
  40554. context.stroke();
  40555. context.closePath();
  40556. // 画背景网格
  40557. var _loop = function _loop(i) {
  40558. var startPos = {};
  40559. context.beginPath();
  40560. context.setLineWidth(1 * opts.pix);
  40561. context.setStrokeStyle(radarOption.gridColor);
  40562. if (radarOption.gridType == 'radar') {
  40563. coordinateAngle.forEach(function (angle, index) {
  40564. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);
  40565. if (index === 0) {
  40566. startPos = pos;
  40567. context.moveTo(pos.x, pos.y);
  40568. } else {
  40569. context.lineTo(pos.x, pos.y);
  40570. }
  40571. });
  40572. context.lineTo(startPos.x, startPos.y);
  40573. } else {
  40574. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(1.5), radius / radarOption.gridCount * i * Math.sin(1.5), centerPosition);
  40575. context.arc(centerPosition.x, centerPosition.y, centerPosition.y - pos.y, 0, 2 * Math.PI, false);
  40576. }
  40577. context.stroke();
  40578. context.closePath();
  40579. };
  40580. for (var i = 1; i <= radarOption.gridCount; i++) {
  40581. _loop(i);
  40582. }
  40583. var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
  40584. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  40585. // 绘制区域数据
  40586. context.beginPath();
  40587. context.setLineWidth(radarOption.borderWidth * opts.pix);
  40588. context.setStrokeStyle(eachSeries.color);
  40589. context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));
  40590. eachSeries.data.forEach(function (item, index) {
  40591. if (index === 0) {
  40592. context.moveTo(item.position.x, item.position.y);
  40593. } else {
  40594. context.lineTo(item.position.x, item.position.y);
  40595. }
  40596. });
  40597. context.closePath();
  40598. context.fill();
  40599. if (radarOption.border === true) {
  40600. context.stroke();
  40601. }
  40602. context.closePath();
  40603. if (opts.dataPointShape !== false) {
  40604. var points = eachSeries.data.map(function (item) {
  40605. return item.position;
  40606. });
  40607. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  40608. }
  40609. });
  40610. // draw label text
  40611. drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
  40612. // draw dataLabel
  40613. if (opts.dataLabel !== false && process === 1) {
  40614. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  40615. context.beginPath();
  40616. var fontSize = eachSeries.textSize * opts.pix || config.fontSize;
  40617. context.setFontSize(fontSize);
  40618. context.setFillStyle(eachSeries.textColor || opts.fontColor);
  40619. eachSeries.data.forEach(function (item, index) {
  40620. //如果是中心点垂直的上下点位
  40621. if (Math.abs(item.position.x - centerPosition.x) < 2) {
  40622. //如果在上面
  40623. if (item.position.y < centerPosition.y) {
  40624. context.setTextAlign('center');
  40625. context.fillText(item.value, item.position.x, item.position.y - 4);
  40626. } else {
  40627. context.setTextAlign('center');
  40628. context.fillText(item.value, item.position.x, item.position.y + fontSize + 2);
  40629. }
  40630. } else {
  40631. //如果在左侧
  40632. if (item.position.x < centerPosition.x) {
  40633. context.setTextAlign('right');
  40634. context.fillText(item.value, item.position.x - 4, item.position.y + fontSize / 2 - 2);
  40635. } else {
  40636. context.setTextAlign('left');
  40637. context.fillText(item.value, item.position.x + 4, item.position.y + fontSize / 2 - 2);
  40638. }
  40639. }
  40640. });
  40641. context.closePath();
  40642. context.stroke();
  40643. });
  40644. context.setTextAlign('left');
  40645. }
  40646. return {
  40647. center: centerPosition,
  40648. radius: radius,
  40649. angleList: coordinateAngle
  40650. };
  40651. }
  40652. function normalInt(min, max, iter) {
  40653. iter = iter == 0 ? 1 : iter;
  40654. var arr = [];
  40655. for (var i = 0; i < iter; i++) {
  40656. arr[i] = Math.random();
  40657. }
  40658. ;
  40659. return Math.floor(arr.reduce(function (i, j) {
  40660. return i + j;
  40661. }) / iter * (max - min)) + min;
  40662. }
  40663. ;
  40664. function collisionNew(area, points, width, height) {
  40665. var isIn = false;
  40666. for (var i = 0; i < points.length; i++) {
  40667. if (points[i].area) {
  40668. 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]) {
  40669. if (area[0] < 0 || area[1] < 0 || area[2] > width || area[3] > height) {
  40670. isIn = true;
  40671. break;
  40672. } else {
  40673. isIn = false;
  40674. }
  40675. } else {
  40676. isIn = true;
  40677. break;
  40678. }
  40679. }
  40680. }
  40681. return isIn;
  40682. }
  40683. ;
  40684. function getBoundingBox(data) {
  40685. var bounds = {},
  40686. coords;
  40687. bounds.xMin = 180;
  40688. bounds.xMax = 0;
  40689. bounds.yMin = 90;
  40690. bounds.yMax = 0;
  40691. for (var i = 0; i < data.length; i++) {
  40692. var coorda = data[i].geometry.coordinates;
  40693. for (var k = 0; k < coorda.length; k++) {
  40694. coords = coorda[k];
  40695. if (coords.length == 1) {
  40696. coords = coords[0];
  40697. }
  40698. for (var j = 0; j < coords.length; j++) {
  40699. var longitude = coords[j][0];
  40700. var latitude = coords[j][1];
  40701. var point = {
  40702. x: longitude,
  40703. y: latitude
  40704. };
  40705. bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
  40706. bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
  40707. bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
  40708. bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
  40709. }
  40710. }
  40711. }
  40712. return bounds;
  40713. }
  40714. function coordinateToPoint(latitude, longitude, bounds, scale, xoffset, yoffset) {
  40715. return {
  40716. x: (longitude - bounds.xMin) * scale + xoffset,
  40717. y: (bounds.yMax - latitude) * scale + yoffset
  40718. };
  40719. }
  40720. function pointToCoordinate(pointY, pointX, bounds, scale, xoffset, yoffset) {
  40721. return {
  40722. x: (pointX - xoffset) / scale + bounds.xMin,
  40723. y: bounds.yMax - (pointY - yoffset) / scale
  40724. };
  40725. }
  40726. function isRayIntersectsSegment(poi, s_poi, e_poi) {
  40727. if (s_poi[1] == e_poi[1]) {
  40728. return false;
  40729. }
  40730. if (s_poi[1] > poi[1] && e_poi[1] > poi[1]) {
  40731. return false;
  40732. }
  40733. if (s_poi[1] < poi[1] && e_poi[1] < poi[1]) {
  40734. return false;
  40735. }
  40736. if (s_poi[1] == poi[1] && e_poi[1] > poi[1]) {
  40737. return false;
  40738. }
  40739. if (e_poi[1] == poi[1] && s_poi[1] > poi[1]) {
  40740. return false;
  40741. }
  40742. if (s_poi[0] < poi[0] && e_poi[1] < poi[1]) {
  40743. return false;
  40744. }
  40745. var xseg = e_poi[0] - (e_poi[0] - s_poi[0]) * (e_poi[1] - poi[1]) / (e_poi[1] - s_poi[1]);
  40746. if (xseg < poi[0]) {
  40747. return false;
  40748. } else {
  40749. return true;
  40750. }
  40751. }
  40752. function isPoiWithinPoly(poi, poly, mercator) {
  40753. var sinsc = 0;
  40754. for (var i = 0; i < poly.length; i++) {
  40755. var epoly = poly[i][0];
  40756. if (poly.length == 1) {
  40757. epoly = poly[i][0];
  40758. }
  40759. for (var j = 0; j < epoly.length - 1; j++) {
  40760. var s_poi = epoly[j];
  40761. var e_poi = epoly[j + 1];
  40762. if (mercator) {
  40763. s_poi = lonlat2mercator(epoly[j][0], epoly[j][1]);
  40764. e_poi = lonlat2mercator(epoly[j + 1][0], epoly[j + 1][1]);
  40765. }
  40766. if (isRayIntersectsSegment(poi, s_poi, e_poi)) {
  40767. sinsc += 1;
  40768. }
  40769. }
  40770. }
  40771. if (sinsc % 2 == 1) {
  40772. return true;
  40773. } else {
  40774. return false;
  40775. }
  40776. }
  40777. function drawMapDataPoints(series, opts, config, context) {
  40778. var mapOption = assign({}, {
  40779. border: true,
  40780. mercator: false,
  40781. borderWidth: 1,
  40782. borderColor: '#666666',
  40783. fillOpacity: 0.6,
  40784. activeBorderColor: '#f04864',
  40785. activeFillColor: '#facc14',
  40786. activeFillOpacity: 1
  40787. }, opts.extra.map);
  40788. var coords, point;
  40789. var data = series;
  40790. var bounds = getBoundingBox(data);
  40791. if (mapOption.mercator) {
  40792. var max = lonlat2mercator(bounds.xMax, bounds.yMax);
  40793. var min = lonlat2mercator(bounds.xMin, bounds.yMin);
  40794. bounds.xMax = max[0];
  40795. bounds.yMax = max[1];
  40796. bounds.xMin = min[0];
  40797. bounds.yMin = min[1];
  40798. }
  40799. var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
  40800. var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
  40801. var scale = xScale < yScale ? xScale : yScale;
  40802. var xoffset = opts.width / 2 - Math.abs(bounds.xMax - bounds.xMin) / 2 * scale;
  40803. var yoffset = opts.height / 2 - Math.abs(bounds.yMax - bounds.yMin) / 2 * scale;
  40804. for (var i = 0; i < data.length; i++) {
  40805. context.beginPath();
  40806. context.setLineWidth(mapOption.borderWidth * opts.pix);
  40807. context.setStrokeStyle(mapOption.borderColor);
  40808. context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));
  40809. if (opts.tooltip) {
  40810. if (opts.tooltip.index == i) {
  40811. context.setStrokeStyle(mapOption.activeBorderColor);
  40812. context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
  40813. }
  40814. }
  40815. var coorda = data[i].geometry.coordinates;
  40816. for (var k = 0; k < coorda.length; k++) {
  40817. coords = coorda[k];
  40818. if (coords.length == 1) {
  40819. coords = coords[0];
  40820. }
  40821. for (var j = 0; j < coords.length; j++) {
  40822. var gaosi = Array(2);
  40823. if (mapOption.mercator) {
  40824. gaosi = lonlat2mercator(coords[j][0], coords[j][1]);
  40825. } else {
  40826. gaosi = coords[j];
  40827. }
  40828. point = coordinateToPoint(gaosi[1], gaosi[0], bounds, scale, xoffset, yoffset);
  40829. if (j === 0) {
  40830. context.beginPath();
  40831. context.moveTo(point.x, point.y);
  40832. } else {
  40833. context.lineTo(point.x, point.y);
  40834. }
  40835. }
  40836. context.fill();
  40837. if (mapOption.border == true) {
  40838. context.stroke();
  40839. }
  40840. }
  40841. if (opts.dataLabel == true) {
  40842. var centerPoint = data[i].properties.centroid;
  40843. if (centerPoint) {
  40844. if (mapOption.mercator) {
  40845. centerPoint = lonlat2mercator(data[i].properties.centroid[0], data[i].properties.centroid[1]);
  40846. }
  40847. point = coordinateToPoint(centerPoint[1], centerPoint[0], bounds, scale, xoffset, yoffset);
  40848. var fontSize = data[i].textSize * opts.pix || config.fontSize;
  40849. var text = data[i].properties.name;
  40850. context.beginPath();
  40851. context.setFontSize(fontSize);
  40852. context.setFillStyle(data[i].textColor || opts.fontColor);
  40853. context.fillText(text, point.x - measureText(text, fontSize, context) / 2, point.y + fontSize / 2);
  40854. context.closePath();
  40855. context.stroke();
  40856. }
  40857. }
  40858. }
  40859. opts.chartData.mapData = {
  40860. bounds: bounds,
  40861. scale: scale,
  40862. xoffset: xoffset,
  40863. yoffset: yoffset,
  40864. mercator: mapOption.mercator
  40865. };
  40866. drawToolTipBridge(opts, config, context, 1);
  40867. context.draw();
  40868. }
  40869. function getWordCloudPoint(opts, type, context) {
  40870. var points = opts.series;
  40871. switch (type) {
  40872. case 'normal':
  40873. for (var i = 0; i < points.length; i++) {
  40874. var text = points[i].name;
  40875. var tHeight = points[i].textSize * opts.pix;
  40876. var tWidth = measureText(text, tHeight, context);
  40877. var x = void 0,
  40878. y = void 0;
  40879. var area = void 0;
  40880. var breaknum = 0;
  40881. while (true) {
  40882. breaknum++;
  40883. x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
  40884. y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
  40885. area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 + opts.height / 2];
  40886. var isCollision = collisionNew(area, points, opts.width, opts.height);
  40887. if (!isCollision) break;
  40888. if (breaknum == 1000) {
  40889. area = [-100, -100, -100, -100];
  40890. break;
  40891. }
  40892. }
  40893. ;
  40894. points[i].area = area;
  40895. }
  40896. break;
  40897. case 'vertical':
  40898. var Spin = function Spin() {
  40899. //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
  40900. if (Math.random() > 0.7) {
  40901. return true;
  40902. } else {
  40903. return false;
  40904. }
  40905. ;
  40906. };
  40907. ;
  40908. for (var _i27 = 0; _i27 < points.length; _i27++) {
  40909. var _text = points[_i27].name;
  40910. var _tHeight = points[_i27].textSize * opts.pix;
  40911. var _tWidth = measureText(_text, _tHeight, context);
  40912. var isSpin = Spin();
  40913. var _x = void 0,
  40914. _y = void 0,
  40915. _area = void 0,
  40916. areav = void 0;
  40917. var _breaknum = 0;
  40918. while (true) {
  40919. _breaknum++;
  40920. var _isCollision = void 0;
  40921. if (isSpin) {
  40922. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  40923. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  40924. _area = [_y - 5 - _tWidth + opts.width / 2, -_x - 5 + opts.height / 2, _y + 5 + opts.width / 2, -_x + _tHeight + 5 + opts.height / 2];
  40925. 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];
  40926. _isCollision = collisionNew(areav, points, opts.height, opts.width);
  40927. } else {
  40928. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  40929. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  40930. _area = [_x - 5 + opts.width / 2, _y - 5 - _tHeight + opts.height / 2, _x + _tWidth + 5 + opts.width / 2, _y + 5 + opts.height / 2];
  40931. _isCollision = collisionNew(_area, points, opts.width, opts.height);
  40932. }
  40933. if (!_isCollision) break;
  40934. if (_breaknum == 1000) {
  40935. _area = [-1000, -1000, -1000, -1000];
  40936. break;
  40937. }
  40938. }
  40939. ;
  40940. if (isSpin) {
  40941. points[_i27].area = areav;
  40942. points[_i27].areav = _area;
  40943. } else {
  40944. points[_i27].area = _area;
  40945. }
  40946. points[_i27].rotate = isSpin;
  40947. }
  40948. ;
  40949. break;
  40950. }
  40951. return points;
  40952. }
  40953. function drawWordCloudDataPoints(series, opts, config, context) {
  40954. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40955. var wordOption = assign({}, {
  40956. type: 'normal',
  40957. autoColors: true
  40958. }, opts.extra.word);
  40959. if (!opts.chartData.wordCloudData) {
  40960. opts.chartData.wordCloudData = getWordCloudPoint(opts, wordOption.type, context);
  40961. }
  40962. context.beginPath();
  40963. context.setFillStyle(opts.background);
  40964. context.rect(0, 0, opts.width, opts.height);
  40965. context.fill();
  40966. context.save();
  40967. var points = opts.chartData.wordCloudData;
  40968. context.translate(opts.width / 2, opts.height / 2);
  40969. for (var i = 0; i < points.length; i++) {
  40970. context.save();
  40971. if (points[i].rotate) {
  40972. context.rotate(90 * Math.PI / 180);
  40973. }
  40974. var text = points[i].name;
  40975. var tHeight = points[i].textSize * opts.pix;
  40976. var tWidth = measureText(text, tHeight, context);
  40977. context.beginPath();
  40978. context.setStrokeStyle(points[i].color);
  40979. context.setFillStyle(points[i].color);
  40980. context.setFontSize(tHeight);
  40981. if (points[i].rotate) {
  40982. if (points[i].areav[0] > 0) {
  40983. if (opts.tooltip) {
  40984. if (opts.tooltip.index == i) {
  40985. 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);
  40986. } else {
  40987. 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);
  40988. }
  40989. } else {
  40990. 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);
  40991. }
  40992. }
  40993. } else {
  40994. if (points[i].area[0] > 0) {
  40995. if (opts.tooltip) {
  40996. if (opts.tooltip.index == i) {
  40997. 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);
  40998. } else {
  40999. 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);
  41000. }
  41001. } else {
  41002. 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);
  41003. }
  41004. }
  41005. }
  41006. context.stroke();
  41007. context.restore();
  41008. }
  41009. context.restore();
  41010. }
  41011. function drawFunnelDataPoints(series, opts, config, context) {
  41012. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  41013. var funnelOption = assign({}, {
  41014. type: 'funnel',
  41015. activeWidth: 10,
  41016. activeOpacity: 0.3,
  41017. border: false,
  41018. borderWidth: 2,
  41019. borderColor: '#FFFFFF',
  41020. fillOpacity: 1,
  41021. labelAlign: 'right',
  41022. linearType: 'none',
  41023. customColor: []
  41024. }, opts.extra.funnel);
  41025. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / series.length;
  41026. var centerPosition = {
  41027. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  41028. y: opts.height - opts.area[2]
  41029. };
  41030. var activeWidth = funnelOption.activeWidth * opts.pix;
  41031. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
  41032. series = getFunnelDataPoints(series, radius, funnelOption.type, eachSpacing, process);
  41033. context.save();
  41034. context.translate(centerPosition.x, centerPosition.y);
  41035. funnelOption.customColor = fillCustomColor(funnelOption.linearType, funnelOption.customColor, series, config);
  41036. if (funnelOption.type == 'pyramid') {
  41037. for (var i = 0; i < series.length; i++) {
  41038. if (i == series.length - 1) {
  41039. if (opts.tooltip) {
  41040. if (opts.tooltip.index == i) {
  41041. context.beginPath();
  41042. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  41043. context.moveTo(-activeWidth, -eachSpacing);
  41044. context.lineTo(-series[i].radius - activeWidth, 0);
  41045. context.lineTo(series[i].radius + activeWidth, 0);
  41046. context.lineTo(activeWidth, -eachSpacing);
  41047. context.lineTo(-activeWidth, -eachSpacing);
  41048. context.closePath();
  41049. context.fill();
  41050. }
  41051. }
  41052. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  41053. context.beginPath();
  41054. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  41055. context.setStrokeStyle(funnelOption.borderColor);
  41056. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  41057. if (funnelOption.linearType == 'custom') {
  41058. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  41059. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  41060. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  41061. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  41062. fillColor = grd;
  41063. }
  41064. context.setFillStyle(fillColor);
  41065. context.moveTo(0, -eachSpacing);
  41066. context.lineTo(-series[i].radius, 0);
  41067. context.lineTo(series[i].radius, 0);
  41068. context.lineTo(0, -eachSpacing);
  41069. context.closePath();
  41070. context.fill();
  41071. if (funnelOption.border == true) {
  41072. context.stroke();
  41073. }
  41074. } else {
  41075. if (opts.tooltip) {
  41076. if (opts.tooltip.index == i) {
  41077. context.beginPath();
  41078. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  41079. context.moveTo(0, 0);
  41080. context.lineTo(-series[i].radius - activeWidth, 0);
  41081. context.lineTo(-series[i + 1].radius - activeWidth, -eachSpacing);
  41082. context.lineTo(series[i + 1].radius + activeWidth, -eachSpacing);
  41083. context.lineTo(series[i].radius + activeWidth, 0);
  41084. context.lineTo(0, 0);
  41085. context.closePath();
  41086. context.fill();
  41087. }
  41088. }
  41089. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  41090. context.beginPath();
  41091. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  41092. context.setStrokeStyle(funnelOption.borderColor);
  41093. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  41094. if (funnelOption.linearType == 'custom') {
  41095. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  41096. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  41097. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  41098. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  41099. fillColor = grd;
  41100. }
  41101. context.setFillStyle(fillColor);
  41102. context.moveTo(0, 0);
  41103. context.lineTo(-series[i].radius, 0);
  41104. context.lineTo(-series[i + 1].radius, -eachSpacing);
  41105. context.lineTo(series[i + 1].radius, -eachSpacing);
  41106. context.lineTo(series[i].radius, 0);
  41107. context.lineTo(0, 0);
  41108. context.closePath();
  41109. context.fill();
  41110. if (funnelOption.border == true) {
  41111. context.stroke();
  41112. }
  41113. }
  41114. context.translate(0, -eachSpacing);
  41115. }
  41116. } else {
  41117. for (var _i28 = 0; _i28 < series.length; _i28++) {
  41118. if (_i28 == 0) {
  41119. if (opts.tooltip) {
  41120. if (opts.tooltip.index == _i28) {
  41121. context.beginPath();
  41122. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  41123. context.moveTo(-activeWidth, 0);
  41124. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  41125. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  41126. context.lineTo(activeWidth, 0);
  41127. context.lineTo(-activeWidth, 0);
  41128. context.closePath();
  41129. context.fill();
  41130. }
  41131. }
  41132. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing, centerPosition.x + series[_i28].radius, centerPosition.y];
  41133. context.beginPath();
  41134. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  41135. context.setStrokeStyle(funnelOption.borderColor);
  41136. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  41137. if (funnelOption.linearType == 'custom') {
  41138. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  41139. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  41140. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  41141. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  41142. fillColor = grd;
  41143. }
  41144. context.setFillStyle(fillColor);
  41145. context.moveTo(0, 0);
  41146. context.lineTo(-series[_i28].radius, -eachSpacing);
  41147. context.lineTo(series[_i28].radius, -eachSpacing);
  41148. context.lineTo(0, 0);
  41149. context.closePath();
  41150. context.fill();
  41151. if (funnelOption.border == true) {
  41152. context.stroke();
  41153. }
  41154. } else {
  41155. if (opts.tooltip) {
  41156. if (opts.tooltip.index == _i28) {
  41157. context.beginPath();
  41158. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  41159. context.moveTo(0, 0);
  41160. context.lineTo(-series[_i28 - 1].radius - activeWidth, 0);
  41161. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  41162. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  41163. context.lineTo(series[_i28 - 1].radius + activeWidth, 0);
  41164. context.lineTo(0, 0);
  41165. context.closePath();
  41166. context.fill();
  41167. }
  41168. }
  41169. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing * (_i28 + 1), centerPosition.x + series[_i28].radius, centerPosition.y - eachSpacing * _i28];
  41170. context.beginPath();
  41171. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  41172. context.setStrokeStyle(funnelOption.borderColor);
  41173. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  41174. if (funnelOption.linearType == 'custom') {
  41175. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  41176. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  41177. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  41178. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  41179. fillColor = grd;
  41180. }
  41181. context.setFillStyle(fillColor);
  41182. context.moveTo(0, 0);
  41183. context.lineTo(-series[_i28 - 1].radius, 0);
  41184. context.lineTo(-series[_i28].radius, -eachSpacing);
  41185. context.lineTo(series[_i28].radius, -eachSpacing);
  41186. context.lineTo(series[_i28 - 1].radius, 0);
  41187. context.lineTo(0, 0);
  41188. context.closePath();
  41189. context.fill();
  41190. if (funnelOption.border == true) {
  41191. context.stroke();
  41192. }
  41193. }
  41194. context.translate(0, -eachSpacing);
  41195. }
  41196. }
  41197. context.restore();
  41198. if (opts.dataLabel !== false && process === 1) {
  41199. drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
  41200. }
  41201. return {
  41202. center: centerPosition,
  41203. radius: radius,
  41204. series: series
  41205. };
  41206. }
  41207. function drawFunnelText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
  41208. for (var i = 0; i < series.length; i++) {
  41209. var item = series[i];
  41210. var startX = void 0,
  41211. endX = void 0,
  41212. startY = void 0,
  41213. fontSize = void 0;
  41214. var text = item.formatter ? item.formatter(item, i, series) : util.toFixed(item._proportion_ * 100) + '%';
  41215. if (labelAlign == 'right') {
  41216. if (opts.extra.funnel.type === 'pyramid') {
  41217. if (i == series.length - 1) {
  41218. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  41219. } else {
  41220. startX = (item.funnelArea[2] + series[i + 1].funnelArea[2]) / 2;
  41221. }
  41222. } else {
  41223. if (i == 0) {
  41224. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  41225. } else {
  41226. startX = (item.funnelArea[2] + series[i - 1].funnelArea[2]) / 2;
  41227. }
  41228. }
  41229. endX = startX + activeWidth * 2;
  41230. startY = item.funnelArea[1] + eachSpacing / 2;
  41231. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  41232. context.setLineWidth(1 * opts.pix);
  41233. context.setStrokeStyle(item.color);
  41234. context.setFillStyle(item.color);
  41235. context.beginPath();
  41236. context.moveTo(startX, startY);
  41237. context.lineTo(endX, startY);
  41238. context.stroke();
  41239. context.closePath();
  41240. context.beginPath();
  41241. context.moveTo(endX, startY);
  41242. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  41243. context.closePath();
  41244. context.fill();
  41245. context.beginPath();
  41246. context.setFontSize(fontSize);
  41247. context.setFillStyle(item.textColor || opts.fontColor);
  41248. context.fillText(text, endX + 5, startY + fontSize / 2 - 2);
  41249. context.closePath();
  41250. context.stroke();
  41251. context.closePath();
  41252. } else {
  41253. if (opts.extra.funnel.type === 'pyramid') {
  41254. if (i == series.length - 1) {
  41255. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  41256. } else {
  41257. startX = (item.funnelArea[0] + series[i + 1].funnelArea[0]) / 2;
  41258. }
  41259. } else {
  41260. if (i == 0) {
  41261. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  41262. } else {
  41263. startX = (item.funnelArea[0] + series[i - 1].funnelArea[0]) / 2;
  41264. }
  41265. }
  41266. endX = startX - activeWidth * 2;
  41267. startY = item.funnelArea[1] + eachSpacing / 2;
  41268. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  41269. context.setLineWidth(1 * opts.pix);
  41270. context.setStrokeStyle(item.color);
  41271. context.setFillStyle(item.color);
  41272. context.beginPath();
  41273. context.moveTo(startX, startY);
  41274. context.lineTo(endX, startY);
  41275. context.stroke();
  41276. context.closePath();
  41277. context.beginPath();
  41278. context.moveTo(endX, startY);
  41279. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  41280. context.closePath();
  41281. context.fill();
  41282. context.beginPath();
  41283. context.setFontSize(fontSize);
  41284. context.setFillStyle(item.textColor || opts.fontColor);
  41285. context.fillText(text, endX - 5 - measureText(text, fontSize, context), startY + fontSize / 2 - 2);
  41286. context.closePath();
  41287. context.stroke();
  41288. context.closePath();
  41289. }
  41290. }
  41291. }
  41292. function drawCanvas(opts, context) {
  41293. context.draw();
  41294. }
  41295. var Timing = {
  41296. easeIn: function easeIn(pos) {
  41297. return Math.pow(pos, 3);
  41298. },
  41299. easeOut: function easeOut(pos) {
  41300. return Math.pow(pos - 1, 3) + 1;
  41301. },
  41302. easeInOut: function easeInOut(pos) {
  41303. if ((pos /= 0.5) < 1) {
  41304. return 0.5 * Math.pow(pos, 3);
  41305. } else {
  41306. return 0.5 * (Math.pow(pos - 2, 3) + 2);
  41307. }
  41308. },
  41309. linear: function linear(pos) {
  41310. return pos;
  41311. }
  41312. };
  41313. function Animation(opts) {
  41314. this.isStop = false;
  41315. opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
  41316. opts.timing = opts.timing || 'easeInOut';
  41317. var delay = 17;
  41318. function createAnimationFrame() {
  41319. if (typeof setTimeout !== 'undefined') {
  41320. return function (step, delay) {
  41321. setTimeout(function () {
  41322. var timeStamp = +new Date();
  41323. step(timeStamp);
  41324. }, delay);
  41325. };
  41326. } else if (typeof requestAnimationFrame !== 'undefined') {
  41327. return requestAnimationFrame;
  41328. } else {
  41329. return function (step) {
  41330. step(null);
  41331. };
  41332. }
  41333. }
  41334. ;
  41335. var animationFrame = createAnimationFrame();
  41336. var startTimeStamp = null;
  41337. var _step = function step(timestamp) {
  41338. if (timestamp === null || this.isStop === true) {
  41339. opts.onProcess && opts.onProcess(1);
  41340. opts.onAnimationFinish && opts.onAnimationFinish();
  41341. return;
  41342. }
  41343. if (startTimeStamp === null) {
  41344. startTimeStamp = timestamp;
  41345. }
  41346. if (timestamp - startTimeStamp < opts.duration) {
  41347. var process = (timestamp - startTimeStamp) / opts.duration;
  41348. var timingFunction = Timing[opts.timing];
  41349. process = timingFunction(process);
  41350. opts.onProcess && opts.onProcess(process);
  41351. animationFrame(_step, delay);
  41352. } else {
  41353. opts.onProcess && opts.onProcess(1);
  41354. opts.onAnimationFinish && opts.onAnimationFinish();
  41355. }
  41356. };
  41357. _step = _step.bind(this);
  41358. animationFrame(_step, delay);
  41359. }
  41360. Animation.prototype.stop = function () {
  41361. this.isStop = true;
  41362. };
  41363. function drawCharts(type, opts, config, context) {
  41364. var _this = this;
  41365. var series = opts.series;
  41366. //兼容ECharts饼图类数据格式
  41367. if (type === 'pie' || type === 'ring' || type === 'rose' || type === 'funnel') {
  41368. series = fixPieSeries(series, opts, config);
  41369. }
  41370. var categories = opts.categories;
  41371. series = fillSeries(series, opts, config);
  41372. var duration = opts.animation ? opts.duration : 0;
  41373. _this.animationInstance && _this.animationInstance.stop();
  41374. var seriesMA = null;
  41375. if (type == 'candle') {
  41376. var average = assign({}, opts.extra.candle.average);
  41377. if (average.show) {
  41378. seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
  41379. seriesMA = fillSeries(seriesMA, opts, config);
  41380. opts.seriesMA = seriesMA;
  41381. } else if (opts.seriesMA) {
  41382. seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
  41383. } else {
  41384. seriesMA = series;
  41385. }
  41386. } else {
  41387. seriesMA = series;
  41388. }
  41389. /* 过滤掉show=false的series */
  41390. opts._series_ = series = filterSeries(series);
  41391. //重新计算图表区域
  41392. opts.area = new Array(4);
  41393. //复位绘图区域
  41394. for (var j = 0; j < 4; j++) {
  41395. opts.area[j] = opts.padding[j] * opts.pix;
  41396. }
  41397. //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
  41398. var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData, context),
  41399. legendHeight = _calLegendData.area.wholeHeight,
  41400. legendWidth = _calLegendData.area.wholeWidth;
  41401. switch (opts.legend.position) {
  41402. case 'top':
  41403. opts.area[0] += legendHeight;
  41404. break;
  41405. case 'bottom':
  41406. opts.area[2] += legendHeight;
  41407. break;
  41408. case 'left':
  41409. opts.area[3] += legendWidth;
  41410. break;
  41411. case 'right':
  41412. opts.area[1] += legendWidth;
  41413. break;
  41414. }
  41415. var _calYAxisData = {},
  41416. yAxisWidth = 0;
  41417. 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') {
  41418. _calYAxisData = calYAxisData(series, opts, config, context);
  41419. yAxisWidth = _calYAxisData.yAxisWidth;
  41420. //如果显示Y轴标题
  41421. if (opts.yAxis.showTitle) {
  41422. var maxTitleHeight = 0;
  41423. for (var i = 0; i < opts.yAxis.data.length; i++) {
  41424. maxTitleHeight = Math.max(maxTitleHeight, opts.yAxis.data[i].titleFontSize ? opts.yAxis.data[i].titleFontSize * opts.pix : config.fontSize);
  41425. }
  41426. opts.area[0] += maxTitleHeight;
  41427. }
  41428. var rightIndex = 0,
  41429. leftIndex = 0;
  41430. //计算主绘图区域左右位置
  41431. for (var _i29 = 0; _i29 < yAxisWidth.length; _i29++) {
  41432. if (yAxisWidth[_i29].position == 'left') {
  41433. if (leftIndex > 0) {
  41434. opts.area[3] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  41435. } else {
  41436. opts.area[3] += yAxisWidth[_i29].width;
  41437. }
  41438. leftIndex += 1;
  41439. } else if (yAxisWidth[_i29].position == 'right') {
  41440. if (rightIndex > 0) {
  41441. opts.area[1] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  41442. } else {
  41443. opts.area[1] += yAxisWidth[_i29].width;
  41444. }
  41445. rightIndex += 1;
  41446. }
  41447. }
  41448. } else {
  41449. config.yAxisWidth = yAxisWidth;
  41450. }
  41451. opts.chartData.yAxisData = _calYAxisData;
  41452. if (opts.categories && opts.categories.length && opts.type !== 'radar' && opts.type !== 'gauge' && opts.type !== 'bar') {
  41453. opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
  41454. var _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  41455. xAxisHeight = _calCategoriesData.xAxisHeight,
  41456. angle = _calCategoriesData.angle;
  41457. config.xAxisHeight = xAxisHeight;
  41458. config._xAxisTextAngle_ = angle;
  41459. opts.area[2] += xAxisHeight;
  41460. opts.chartData.categoriesData = _calCategoriesData;
  41461. } else {
  41462. if (opts.type === 'line' || opts.type === 'area' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
  41463. opts.chartData.xAxisData = calXAxisData(series, opts, config, context);
  41464. categories = opts.chartData.xAxisData.rangesFormat;
  41465. var _calCategoriesData2 = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  41466. _xAxisHeight = _calCategoriesData2.xAxisHeight,
  41467. _angle = _calCategoriesData2.angle;
  41468. config.xAxisHeight = _xAxisHeight;
  41469. config._xAxisTextAngle_ = _angle;
  41470. opts.area[2] += _xAxisHeight;
  41471. opts.chartData.categoriesData = _calCategoriesData2;
  41472. } else {
  41473. opts.chartData.xAxisData = {
  41474. xAxisPoints: []
  41475. };
  41476. }
  41477. }
  41478. //计算右对齐偏移距离
  41479. if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
  41480. var offsetLeft = 0,
  41481. xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  41482. startX = opts.chartData.xAxisData.startX,
  41483. endX = opts.chartData.xAxisData.endX,
  41484. eachSpacing = opts.chartData.xAxisData.eachSpacing;
  41485. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  41486. var screenWidth = endX - startX;
  41487. offsetLeft = screenWidth - totalWidth;
  41488. _this.scrollOption = {
  41489. currentOffset: offsetLeft,
  41490. startTouchX: offsetLeft,
  41491. distance: 0,
  41492. lastMoveTime: 0
  41493. };
  41494. opts._scrollDistance_ = offsetLeft;
  41495. }
  41496. if (type === 'pie' || type === 'ring' || type === 'rose') {
  41497. config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA, config, context, opts);
  41498. }
  41499. switch (type) {
  41500. case 'word':
  41501. this.animationInstance = new Animation({
  41502. timing: opts.timing,
  41503. duration: duration,
  41504. onProcess: function onProcess(process) {
  41505. context.clearRect(0, 0, opts.width, opts.height);
  41506. if (opts.rotate) {
  41507. contextRotate(context, opts);
  41508. }
  41509. drawWordCloudDataPoints(series, opts, config, context, process);
  41510. drawCanvas(opts, context);
  41511. },
  41512. onAnimationFinish: function onAnimationFinish() {
  41513. _this.uevent.trigger('renderComplete');
  41514. }
  41515. });
  41516. break;
  41517. case 'map':
  41518. context.clearRect(0, 0, opts.width, opts.height);
  41519. drawMapDataPoints(series, opts, config, context);
  41520. break;
  41521. case 'funnel':
  41522. this.animationInstance = new Animation({
  41523. timing: opts.timing,
  41524. duration: duration,
  41525. onProcess: function onProcess(process) {
  41526. context.clearRect(0, 0, opts.width, opts.height);
  41527. if (opts.rotate) {
  41528. contextRotate(context, opts);
  41529. }
  41530. opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
  41531. drawLegend(opts.series, opts, config, context, opts.chartData);
  41532. drawToolTipBridge(opts, config, context, process);
  41533. drawCanvas(opts, context);
  41534. },
  41535. onAnimationFinish: function onAnimationFinish() {
  41536. _this.uevent.trigger('renderComplete');
  41537. }
  41538. });
  41539. break;
  41540. case 'line':
  41541. this.animationInstance = new Animation({
  41542. timing: opts.timing,
  41543. duration: duration,
  41544. onProcess: function onProcess(process) {
  41545. context.clearRect(0, 0, opts.width, opts.height);
  41546. if (opts.rotate) {
  41547. contextRotate(context, opts);
  41548. }
  41549. drawYAxisGrid(categories, opts, config, context);
  41550. drawXAxis(categories, opts, config, context);
  41551. var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
  41552. xAxisPoints = _drawLineDataPoints.xAxisPoints,
  41553. calPoints = _drawLineDataPoints.calPoints,
  41554. eachSpacing = _drawLineDataPoints.eachSpacing;
  41555. opts.chartData.xAxisPoints = xAxisPoints;
  41556. opts.chartData.calPoints = calPoints;
  41557. opts.chartData.eachSpacing = eachSpacing;
  41558. drawYAxis(series, opts, config, context);
  41559. if (opts.enableMarkLine !== false && process === 1) {
  41560. drawMarkLine(opts, config, context);
  41561. }
  41562. drawLegend(opts.series, opts, config, context, opts.chartData);
  41563. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41564. drawCanvas(opts, context);
  41565. },
  41566. onAnimationFinish: function onAnimationFinish() {
  41567. _this.uevent.trigger('renderComplete');
  41568. }
  41569. });
  41570. break;
  41571. case 'scatter':
  41572. this.animationInstance = new Animation({
  41573. timing: opts.timing,
  41574. duration: duration,
  41575. onProcess: function onProcess(process) {
  41576. context.clearRect(0, 0, opts.width, opts.height);
  41577. if (opts.rotate) {
  41578. contextRotate(context, opts);
  41579. }
  41580. drawYAxisGrid(categories, opts, config, context);
  41581. drawXAxis(categories, opts, config, context);
  41582. var _drawScatterDataPoints = drawScatterDataPoints(series, opts, config, context, process),
  41583. xAxisPoints = _drawScatterDataPoints.xAxisPoints,
  41584. calPoints = _drawScatterDataPoints.calPoints,
  41585. eachSpacing = _drawScatterDataPoints.eachSpacing;
  41586. opts.chartData.xAxisPoints = xAxisPoints;
  41587. opts.chartData.calPoints = calPoints;
  41588. opts.chartData.eachSpacing = eachSpacing;
  41589. drawYAxis(series, opts, config, context);
  41590. if (opts.enableMarkLine !== false && process === 1) {
  41591. drawMarkLine(opts, config, context);
  41592. }
  41593. drawLegend(opts.series, opts, config, context, opts.chartData);
  41594. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41595. drawCanvas(opts, context);
  41596. },
  41597. onAnimationFinish: function onAnimationFinish() {
  41598. _this.uevent.trigger('renderComplete');
  41599. }
  41600. });
  41601. break;
  41602. case 'bubble':
  41603. this.animationInstance = new Animation({
  41604. timing: opts.timing,
  41605. duration: duration,
  41606. onProcess: function onProcess(process) {
  41607. context.clearRect(0, 0, opts.width, opts.height);
  41608. if (opts.rotate) {
  41609. contextRotate(context, opts);
  41610. }
  41611. drawYAxisGrid(categories, opts, config, context);
  41612. drawXAxis(categories, opts, config, context);
  41613. var _drawBubbleDataPoints = drawBubbleDataPoints(series, opts, config, context, process),
  41614. xAxisPoints = _drawBubbleDataPoints.xAxisPoints,
  41615. calPoints = _drawBubbleDataPoints.calPoints,
  41616. eachSpacing = _drawBubbleDataPoints.eachSpacing;
  41617. opts.chartData.xAxisPoints = xAxisPoints;
  41618. opts.chartData.calPoints = calPoints;
  41619. opts.chartData.eachSpacing = eachSpacing;
  41620. drawYAxis(series, opts, config, context);
  41621. if (opts.enableMarkLine !== false && process === 1) {
  41622. drawMarkLine(opts, config, context);
  41623. }
  41624. drawLegend(opts.series, opts, config, context, opts.chartData);
  41625. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41626. drawCanvas(opts, context);
  41627. },
  41628. onAnimationFinish: function onAnimationFinish() {
  41629. _this.uevent.trigger('renderComplete');
  41630. }
  41631. });
  41632. break;
  41633. case 'mix':
  41634. this.animationInstance = new Animation({
  41635. timing: opts.timing,
  41636. duration: duration,
  41637. onProcess: function onProcess(process) {
  41638. context.clearRect(0, 0, opts.width, opts.height);
  41639. if (opts.rotate) {
  41640. contextRotate(context, opts);
  41641. }
  41642. drawYAxisGrid(categories, opts, config, context);
  41643. drawXAxis(categories, opts, config, context);
  41644. var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
  41645. xAxisPoints = _drawMixDataPoints.xAxisPoints,
  41646. calPoints = _drawMixDataPoints.calPoints,
  41647. eachSpacing = _drawMixDataPoints.eachSpacing;
  41648. opts.chartData.xAxisPoints = xAxisPoints;
  41649. opts.chartData.calPoints = calPoints;
  41650. opts.chartData.eachSpacing = eachSpacing;
  41651. drawYAxis(series, opts, config, context);
  41652. if (opts.enableMarkLine !== false && process === 1) {
  41653. drawMarkLine(opts, config, context);
  41654. }
  41655. drawLegend(opts.series, opts, config, context, opts.chartData);
  41656. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41657. drawCanvas(opts, context);
  41658. },
  41659. onAnimationFinish: function onAnimationFinish() {
  41660. _this.uevent.trigger('renderComplete');
  41661. }
  41662. });
  41663. break;
  41664. case 'column':
  41665. this.animationInstance = new Animation({
  41666. timing: opts.timing,
  41667. duration: duration,
  41668. onProcess: function onProcess(process) {
  41669. context.clearRect(0, 0, opts.width, opts.height);
  41670. if (opts.rotate) {
  41671. contextRotate(context, opts);
  41672. }
  41673. drawYAxisGrid(categories, opts, config, context);
  41674. drawXAxis(categories, opts, config, context);
  41675. var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
  41676. xAxisPoints = _drawColumnDataPoints.xAxisPoints,
  41677. calPoints = _drawColumnDataPoints.calPoints,
  41678. eachSpacing = _drawColumnDataPoints.eachSpacing;
  41679. opts.chartData.xAxisPoints = xAxisPoints;
  41680. opts.chartData.calPoints = calPoints;
  41681. opts.chartData.eachSpacing = eachSpacing;
  41682. drawYAxis(series, opts, config, context);
  41683. if (opts.enableMarkLine !== false && process === 1) {
  41684. drawMarkLine(opts, config, context);
  41685. }
  41686. drawLegend(opts.series, opts, config, context, opts.chartData);
  41687. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41688. drawCanvas(opts, context);
  41689. },
  41690. onAnimationFinish: function onAnimationFinish() {
  41691. _this.uevent.trigger('renderComplete');
  41692. }
  41693. });
  41694. break;
  41695. case 'bar':
  41696. this.animationInstance = new Animation({
  41697. timing: opts.timing,
  41698. duration: duration,
  41699. onProcess: function onProcess(process) {
  41700. context.clearRect(0, 0, opts.width, opts.height);
  41701. if (opts.rotate) {
  41702. contextRotate(context, opts);
  41703. }
  41704. drawXAxis(categories, opts, config, context);
  41705. var _drawBarDataPoints = drawBarDataPoints(series, opts, config, context, process),
  41706. yAxisPoints = _drawBarDataPoints.yAxisPoints,
  41707. calPoints = _drawBarDataPoints.calPoints,
  41708. eachSpacing = _drawBarDataPoints.eachSpacing;
  41709. opts.chartData.yAxisPoints = yAxisPoints;
  41710. opts.chartData.xAxisPoints = opts.chartData.xAxisData.xAxisPoints;
  41711. opts.chartData.calPoints = calPoints;
  41712. opts.chartData.eachSpacing = eachSpacing;
  41713. drawYAxis(series, opts, config, context);
  41714. if (opts.enableMarkLine !== false && process === 1) {
  41715. drawMarkLine(opts, config, context);
  41716. }
  41717. drawLegend(opts.series, opts, config, context, opts.chartData);
  41718. drawToolTipBridge(opts, config, context, process, eachSpacing, yAxisPoints);
  41719. drawCanvas(opts, context);
  41720. },
  41721. onAnimationFinish: function onAnimationFinish() {
  41722. _this.uevent.trigger('renderComplete');
  41723. }
  41724. });
  41725. break;
  41726. case 'area':
  41727. this.animationInstance = new Animation({
  41728. timing: opts.timing,
  41729. duration: duration,
  41730. onProcess: function onProcess(process) {
  41731. context.clearRect(0, 0, opts.width, opts.height);
  41732. if (opts.rotate) {
  41733. contextRotate(context, opts);
  41734. }
  41735. drawYAxisGrid(categories, opts, config, context);
  41736. drawXAxis(categories, opts, config, context);
  41737. var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
  41738. xAxisPoints = _drawAreaDataPoints.xAxisPoints,
  41739. calPoints = _drawAreaDataPoints.calPoints,
  41740. eachSpacing = _drawAreaDataPoints.eachSpacing;
  41741. opts.chartData.xAxisPoints = xAxisPoints;
  41742. opts.chartData.calPoints = calPoints;
  41743. opts.chartData.eachSpacing = eachSpacing;
  41744. drawYAxis(series, opts, config, context);
  41745. if (opts.enableMarkLine !== false && process === 1) {
  41746. drawMarkLine(opts, config, context);
  41747. }
  41748. drawLegend(opts.series, opts, config, context, opts.chartData);
  41749. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41750. drawCanvas(opts, context);
  41751. },
  41752. onAnimationFinish: function onAnimationFinish() {
  41753. _this.uevent.trigger('renderComplete');
  41754. }
  41755. });
  41756. break;
  41757. case 'ring':
  41758. case 'pie':
  41759. this.animationInstance = new Animation({
  41760. timing: opts.timing,
  41761. duration: duration,
  41762. onProcess: function onProcess(process) {
  41763. context.clearRect(0, 0, opts.width, opts.height);
  41764. if (opts.rotate) {
  41765. contextRotate(context, opts);
  41766. }
  41767. opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
  41768. drawLegend(opts.series, opts, config, context, opts.chartData);
  41769. drawToolTipBridge(opts, config, context, process);
  41770. drawCanvas(opts, context);
  41771. },
  41772. onAnimationFinish: function onAnimationFinish() {
  41773. _this.uevent.trigger('renderComplete');
  41774. }
  41775. });
  41776. break;
  41777. case 'rose':
  41778. this.animationInstance = new Animation({
  41779. timing: opts.timing,
  41780. duration: duration,
  41781. onProcess: function onProcess(process) {
  41782. context.clearRect(0, 0, opts.width, opts.height);
  41783. if (opts.rotate) {
  41784. contextRotate(context, opts);
  41785. }
  41786. opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
  41787. drawLegend(opts.series, opts, config, context, opts.chartData);
  41788. drawToolTipBridge(opts, config, context, process);
  41789. drawCanvas(opts, context);
  41790. },
  41791. onAnimationFinish: function onAnimationFinish() {
  41792. _this.uevent.trigger('renderComplete');
  41793. }
  41794. });
  41795. break;
  41796. case 'radar':
  41797. this.animationInstance = new Animation({
  41798. timing: opts.timing,
  41799. duration: duration,
  41800. onProcess: function onProcess(process) {
  41801. context.clearRect(0, 0, opts.width, opts.height);
  41802. if (opts.rotate) {
  41803. contextRotate(context, opts);
  41804. }
  41805. opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
  41806. drawLegend(opts.series, opts, config, context, opts.chartData);
  41807. drawToolTipBridge(opts, config, context, process);
  41808. drawCanvas(opts, context);
  41809. },
  41810. onAnimationFinish: function onAnimationFinish() {
  41811. _this.uevent.trigger('renderComplete');
  41812. }
  41813. });
  41814. break;
  41815. case 'arcbar':
  41816. this.animationInstance = new Animation({
  41817. timing: opts.timing,
  41818. duration: duration,
  41819. onProcess: function onProcess(process) {
  41820. context.clearRect(0, 0, opts.width, opts.height);
  41821. if (opts.rotate) {
  41822. contextRotate(context, opts);
  41823. }
  41824. opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
  41825. drawCanvas(opts, context);
  41826. },
  41827. onAnimationFinish: function onAnimationFinish() {
  41828. _this.uevent.trigger('renderComplete');
  41829. }
  41830. });
  41831. break;
  41832. case 'gauge':
  41833. this.animationInstance = new Animation({
  41834. timing: opts.timing,
  41835. duration: duration,
  41836. onProcess: function onProcess(process) {
  41837. context.clearRect(0, 0, opts.width, opts.height);
  41838. if (opts.rotate) {
  41839. contextRotate(context, opts);
  41840. }
  41841. opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);
  41842. drawCanvas(opts, context);
  41843. },
  41844. onAnimationFinish: function onAnimationFinish() {
  41845. _this.uevent.trigger('renderComplete');
  41846. }
  41847. });
  41848. break;
  41849. case 'candle':
  41850. this.animationInstance = new Animation({
  41851. timing: opts.timing,
  41852. duration: duration,
  41853. onProcess: function onProcess(process) {
  41854. context.clearRect(0, 0, opts.width, opts.height);
  41855. if (opts.rotate) {
  41856. contextRotate(context, opts);
  41857. }
  41858. drawYAxisGrid(categories, opts, config, context);
  41859. drawXAxis(categories, opts, config, context);
  41860. var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
  41861. xAxisPoints = _drawCandleDataPoints.xAxisPoints,
  41862. calPoints = _drawCandleDataPoints.calPoints,
  41863. eachSpacing = _drawCandleDataPoints.eachSpacing;
  41864. opts.chartData.xAxisPoints = xAxisPoints;
  41865. opts.chartData.calPoints = calPoints;
  41866. opts.chartData.eachSpacing = eachSpacing;
  41867. drawYAxis(series, opts, config, context);
  41868. if (opts.enableMarkLine !== false && process === 1) {
  41869. drawMarkLine(opts, config, context);
  41870. }
  41871. if (seriesMA) {
  41872. drawLegend(seriesMA, opts, config, context, opts.chartData);
  41873. } else {
  41874. drawLegend(opts.series, opts, config, context, opts.chartData);
  41875. }
  41876. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  41877. drawCanvas(opts, context);
  41878. },
  41879. onAnimationFinish: function onAnimationFinish() {
  41880. _this.uevent.trigger('renderComplete');
  41881. }
  41882. });
  41883. break;
  41884. }
  41885. }
  41886. function uChartsEvent() {
  41887. this.events = {};
  41888. }
  41889. uChartsEvent.prototype.addEventListener = function (type, listener) {
  41890. this.events[type] = this.events[type] || [];
  41891. this.events[type].push(listener);
  41892. };
  41893. uChartsEvent.prototype.delEventListener = function (type) {
  41894. this.events[type] = [];
  41895. };
  41896. uChartsEvent.prototype.trigger = function () {
  41897. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  41898. args[_key] = arguments[_key];
  41899. }
  41900. var type = args[0];
  41901. var params = args.slice(1);
  41902. if (!!this.events[type]) {
  41903. this.events[type].forEach(function (listener) {
  41904. try {
  41905. listener.apply(null, params);
  41906. } catch (e) {
  41907. //console.log('[uCharts] '+e);
  41908. }
  41909. });
  41910. }
  41911. };
  41912. var uCharts = function uCharts(opts) {
  41913. opts.pix = opts.pixelRatio ? opts.pixelRatio : 1;
  41914. opts.fontSize = opts.fontSize ? opts.fontSize : 13;
  41915. opts.fontColor = opts.fontColor ? opts.fontColor : config.fontColor;
  41916. if (opts.background == "" || opts.background == "none") {
  41917. opts.background = "#FFFFFF";
  41918. }
  41919. opts.title = assign({}, opts.title);
  41920. opts.subtitle = assign({}, opts.subtitle);
  41921. opts.duration = opts.duration ? opts.duration : 1000;
  41922. opts.yAxis = assign({}, {
  41923. data: [],
  41924. showTitle: false,
  41925. disabled: false,
  41926. disableGrid: false,
  41927. splitNumber: 5,
  41928. gridType: 'solid',
  41929. dashLength: 4 * opts.pix,
  41930. gridColor: '#cccccc',
  41931. padding: 10,
  41932. fontColor: '#666666'
  41933. }, opts.yAxis);
  41934. opts.xAxis = assign({}, {
  41935. rotateLabel: false,
  41936. disabled: false,
  41937. disableGrid: false,
  41938. splitNumber: 5,
  41939. calibration: false,
  41940. gridType: 'solid',
  41941. dashLength: 4,
  41942. scrollAlign: 'left',
  41943. boundaryGap: 'center',
  41944. axisLine: true,
  41945. axisLineColor: '#cccccc'
  41946. }, opts.xAxis);
  41947. opts.xAxis.scrollPosition = opts.xAxis.scrollAlign;
  41948. opts.legend = assign({}, {
  41949. show: true,
  41950. position: 'bottom',
  41951. float: 'center',
  41952. backgroundColor: 'rgba(0,0,0,0)',
  41953. borderColor: 'rgba(0,0,0,0)',
  41954. borderWidth: 0,
  41955. padding: 5,
  41956. margin: 5,
  41957. itemGap: 10,
  41958. fontSize: opts.fontSize,
  41959. lineHeight: opts.fontSize,
  41960. fontColor: opts.fontColor,
  41961. formatter: {},
  41962. hiddenColor: '#CECECE'
  41963. }, opts.legend);
  41964. opts.extra = assign({}, opts.extra);
  41965. opts.rotate = opts.rotate ? true : false;
  41966. opts.animation = opts.animation ? true : false;
  41967. opts.rotate = opts.rotate ? true : false;
  41968. opts.canvas2d = opts.canvas2d ? true : false;
  41969. var config$$1 = JSON.parse(JSON.stringify(config));
  41970. config$$1.color = opts.color ? opts.color : config$$1.color;
  41971. config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;
  41972. if (opts.type == 'pie') {
  41973. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  41974. }
  41975. if (opts.type == 'ring') {
  41976. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.ring.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  41977. }
  41978. if (opts.type == 'rose') {
  41979. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  41980. }
  41981. config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pix;
  41982. config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;
  41983. //屏幕旋转
  41984. config$$1.rotate = opts.rotate;
  41985. if (opts.rotate) {
  41986. var tempWidth = opts.width;
  41987. var tempHeight = opts.height;
  41988. opts.width = tempHeight;
  41989. opts.height = tempWidth;
  41990. }
  41991. //适配高分屏
  41992. opts.padding = opts.padding ? opts.padding : config$$1.padding;
  41993. config$$1.yAxisWidth = config.yAxisWidth * opts.pix;
  41994. config$$1.xAxisHeight = config.xAxisHeight * opts.pix;
  41995. if (opts.enableScroll && opts.xAxis.scrollShow) {
  41996. config$$1.xAxisHeight += 6 * opts.pix;
  41997. }
  41998. config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pix;
  41999. config$$1.fontSize = opts.fontSize * opts.pix;
  42000. config$$1.titleFontSize = config.titleFontSize * opts.pix;
  42001. config$$1.subtitleFontSize = config.subtitleFontSize * opts.pix;
  42002. config$$1.toolTipPadding = config.toolTipPadding * opts.pix;
  42003. config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pix;
  42004. config$$1.columePadding = config.columePadding * opts.pix;
  42005. //this.context = opts.context ? opts.context : uni.createCanvasContext(opts.canvasId, opts.$this);
  42006. //v2.0版本后需要自行获取context并传入opts进行初始化,这么做是为了确保uCharts可以跨更多端使用,并保证了自定义组件this实例不被循环嵌套。如果您觉得不便请取消上面注释,采用v1.0版本的方式使用,对此给您带来的不便敬请谅解!
  42007. if (!opts.context) {
  42008. throw new Error('[uCharts] 未获取到context!注意:v2.0版本后,需要自行获取canvas的绘图上下文并传入opts.context!');
  42009. }
  42010. this.context = opts.context;
  42011. if (!this.context.setTextAlign) {
  42012. this.context.setStrokeStyle = function (e) {
  42013. return this.strokeStyle = e;
  42014. };
  42015. this.context.setLineWidth = function (e) {
  42016. return this.lineWidth = e;
  42017. };
  42018. this.context.setLineCap = function (e) {
  42019. return this.lineCap = e;
  42020. };
  42021. this.context.setFontSize = function (e) {
  42022. return this.font = e + "px sans-serif";
  42023. };
  42024. this.context.setFillStyle = function (e) {
  42025. return this.fillStyle = e;
  42026. };
  42027. this.context.setTextAlign = function (e) {
  42028. return this.textAlign = e;
  42029. };
  42030. this.context.draw = function () {};
  42031. }
  42032. //兼容NVUEsetLineDash
  42033. if (!this.context.setLineDash) {
  42034. this.context.setLineDash = function (e) {};
  42035. }
  42036. opts.chartData = {};
  42037. this.uevent = new uChartsEvent();
  42038. this.scrollOption = {
  42039. currentOffset: 0,
  42040. startTouchX: 0,
  42041. distance: 0,
  42042. lastMoveTime: 0
  42043. };
  42044. this.opts = opts;
  42045. this.config = config$$1;
  42046. drawCharts.call(this, opts.type, opts, config$$1, this.context);
  42047. };
  42048. uCharts.prototype.updateData = function () {
  42049. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  42050. this.opts = assign({}, this.opts, data);
  42051. this.opts.updateData = true;
  42052. var scrollPosition = data.scrollPosition || 'current';
  42053. switch (scrollPosition) {
  42054. case 'current':
  42055. //this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  42056. break;
  42057. case 'left':
  42058. this.opts._scrollDistance_ = 0;
  42059. this.scrollOption = {
  42060. currentOffset: 0,
  42061. startTouchX: 0,
  42062. distance: 0,
  42063. lastMoveTime: 0
  42064. };
  42065. break;
  42066. case 'right':
  42067. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  42068. yAxisWidth = _calYAxisData.yAxisWidth;
  42069. this.config.yAxisWidth = yAxisWidth;
  42070. var offsetLeft = 0;
  42071. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  42072. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  42073. startX = _getXAxisPoints0.startX,
  42074. endX = _getXAxisPoints0.endX,
  42075. eachSpacing = _getXAxisPoints0.eachSpacing;
  42076. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  42077. var screenWidth = endX - startX;
  42078. offsetLeft = screenWidth - totalWidth;
  42079. this.scrollOption = {
  42080. currentOffset: offsetLeft,
  42081. startTouchX: offsetLeft,
  42082. distance: 0,
  42083. lastMoveTime: 0
  42084. };
  42085. this.opts._scrollDistance_ = offsetLeft;
  42086. break;
  42087. }
  42088. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  42089. };
  42090. uCharts.prototype.zoom = function () {
  42091. var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
  42092. if (this.opts.enableScroll !== true) {
  42093. console.log('[uCharts] 请启用滚动条后使用');
  42094. return;
  42095. }
  42096. //当前屏幕中间点
  42097. var centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(this.opts.xAxis.itemCount / 2);
  42098. this.opts.animation = false;
  42099. this.opts.xAxis.itemCount = val.itemCount;
  42100. //重新计算x轴偏移距离
  42101. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  42102. yAxisWidth = _calYAxisData.yAxisWidth;
  42103. this.config.yAxisWidth = yAxisWidth;
  42104. var offsetLeft = 0;
  42105. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  42106. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  42107. startX = _getXAxisPoints0.startX,
  42108. endX = _getXAxisPoints0.endX,
  42109. eachSpacing = _getXAxisPoints0.eachSpacing;
  42110. var centerLeft = eachSpacing * centerPoint;
  42111. var screenWidth = endX - startX;
  42112. var MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
  42113. offsetLeft = screenWidth / 2 - centerLeft;
  42114. if (offsetLeft > 0) {
  42115. offsetLeft = 0;
  42116. }
  42117. if (offsetLeft < MaxLeft) {
  42118. offsetLeft = MaxLeft;
  42119. }
  42120. this.scrollOption = {
  42121. currentOffset: offsetLeft,
  42122. startTouchX: offsetLeft,
  42123. distance: 0,
  42124. lastMoveTime: 0
  42125. };
  42126. this.opts._scrollDistance_ = offsetLeft;
  42127. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  42128. };
  42129. uCharts.prototype.stopAnimation = function () {
  42130. this.animationInstance && this.animationInstance.stop();
  42131. };
  42132. uCharts.prototype.addEventListener = function (type, listener) {
  42133. this.uevent.addEventListener(type, listener);
  42134. };
  42135. uCharts.prototype.delEventListener = function (type) {
  42136. this.uevent.delEventListener(type);
  42137. };
  42138. uCharts.prototype.getCurrentDataIndex = function (e) {
  42139. var touches = null;
  42140. if (e.changedTouches) {
  42141. touches = e.changedTouches[0];
  42142. } else {
  42143. touches = e.mp.changedTouches[0];
  42144. }
  42145. if (touches) {
  42146. var _touches$ = getTouches(touches, this.opts, e);
  42147. if (this.opts.type === 'pie' || this.opts.type === 'ring') {
  42148. return findPieChartCurrentIndex({
  42149. x: _touches$.x,
  42150. y: _touches$.y
  42151. }, this.opts.chartData.pieData, this.opts);
  42152. } else if (this.opts.type === 'rose') {
  42153. return findRoseChartCurrentIndex({
  42154. x: _touches$.x,
  42155. y: _touches$.y
  42156. }, this.opts.chartData.pieData, this.opts);
  42157. } else if (this.opts.type === 'radar') {
  42158. return findRadarChartCurrentIndex({
  42159. x: _touches$.x,
  42160. y: _touches$.y
  42161. }, this.opts.chartData.radarData, this.opts.categories.length);
  42162. } else if (this.opts.type === 'funnel') {
  42163. return findFunnelChartCurrentIndex({
  42164. x: _touches$.x,
  42165. y: _touches$.y
  42166. }, this.opts.chartData.funnelData);
  42167. } else if (this.opts.type === 'map') {
  42168. return findMapChartCurrentIndex({
  42169. x: _touches$.x,
  42170. y: _touches$.y
  42171. }, this.opts);
  42172. } else if (this.opts.type === 'word') {
  42173. return findWordChartCurrentIndex({
  42174. x: _touches$.x,
  42175. y: _touches$.y
  42176. }, this.opts.chartData.wordCloudData);
  42177. } else if (this.opts.type === 'bar') {
  42178. return findBarChartCurrentIndex({
  42179. x: _touches$.x,
  42180. y: _touches$.y
  42181. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  42182. } else {
  42183. return findCurrentIndex({
  42184. x: _touches$.x,
  42185. y: _touches$.y
  42186. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  42187. }
  42188. }
  42189. return -1;
  42190. };
  42191. uCharts.prototype.getLegendDataIndex = function (e) {
  42192. var touches = null;
  42193. if (e.changedTouches) {
  42194. touches = e.changedTouches[0];
  42195. } else {
  42196. touches = e.mp.changedTouches[0];
  42197. }
  42198. if (touches) {
  42199. var _touches$ = getTouches(touches, this.opts, e);
  42200. return findLegendIndex({
  42201. x: _touches$.x,
  42202. y: _touches$.y
  42203. }, this.opts.chartData.legendData);
  42204. }
  42205. return -1;
  42206. };
  42207. uCharts.prototype.touchLegend = function (e) {
  42208. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  42209. var touches = null;
  42210. if (e.changedTouches) {
  42211. touches = e.changedTouches[0];
  42212. } else {
  42213. touches = e.mp.changedTouches[0];
  42214. }
  42215. if (touches) {
  42216. var _touches$ = getTouches(touches, this.opts, e);
  42217. var index = this.getLegendDataIndex(e);
  42218. if (index >= 0) {
  42219. if (this.opts.type == 'candle') {
  42220. this.opts.seriesMA[index].show = !this.opts.seriesMA[index].show;
  42221. } else {
  42222. this.opts.series[index].show = !this.opts.series[index].show;
  42223. }
  42224. this.opts.animation = option.animation ? true : false;
  42225. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  42226. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  42227. }
  42228. }
  42229. };
  42230. uCharts.prototype.showToolTip = function (e) {
  42231. var _this2 = this;
  42232. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  42233. var touches = null;
  42234. if (e.changedTouches) {
  42235. touches = e.changedTouches[0];
  42236. } else {
  42237. touches = e.mp.changedTouches[0];
  42238. }
  42239. if (!touches) {
  42240. console.log("[uCharts] 未获取到event坐标信息");
  42241. }
  42242. var _touches$ = getTouches(touches, this.opts, e);
  42243. var currentOffset = this.scrollOption.currentOffset;
  42244. var opts = assign({}, this.opts, {
  42245. _scrollDistance_: currentOffset,
  42246. animation: false
  42247. });
  42248. if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column' || this.opts.type === 'scatter' || this.opts.type === 'bubble') {
  42249. var current = this.getCurrentDataIndex(e);
  42250. var index = option.index == undefined ? current.index : option.index;
  42251. if (index > -1 || index.length > 0) {
  42252. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  42253. if (seriesData.length !== 0) {
  42254. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  42255. textList = _getToolTipData.textList,
  42256. offset = _getToolTipData.offset;
  42257. offset.y = _touches$.y;
  42258. opts.tooltip = {
  42259. textList: option.textList !== undefined ? option.textList : textList,
  42260. offset: option.offset !== undefined ? option.offset : offset,
  42261. option: option,
  42262. index: index
  42263. };
  42264. }
  42265. }
  42266. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42267. }
  42268. if (this.opts.type === 'bar') {
  42269. var current = this.getCurrentDataIndex(e);
  42270. var index = option.index == undefined ? current.index : option.index;
  42271. if (index > -1 || index.length > 0) {
  42272. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  42273. if (seriesData.length !== 0) {
  42274. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  42275. textList = _getToolTipData.textList,
  42276. offset = _getToolTipData.offset;
  42277. offset.x = _touches$.x;
  42278. opts.tooltip = {
  42279. textList: option.textList !== undefined ? option.textList : textList,
  42280. offset: option.offset !== undefined ? option.offset : offset,
  42281. option: option,
  42282. index: index
  42283. };
  42284. }
  42285. }
  42286. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42287. }
  42288. if (this.opts.type === 'mix') {
  42289. var current = this.getCurrentDataIndex(e);
  42290. var index = option.index == undefined ? current.index : option.index;
  42291. if (index > -1) {
  42292. var currentOffset = this.scrollOption.currentOffset;
  42293. var opts = assign({}, this.opts, {
  42294. _scrollDistance_: currentOffset,
  42295. animation: false
  42296. });
  42297. var seriesData = getSeriesDataItem(this.opts.series, index);
  42298. if (seriesData.length !== 0) {
  42299. var _getMixToolTipData = getMixToolTipData(seriesData, this.opts, index, this.opts.categories, option),
  42300. textList = _getMixToolTipData.textList,
  42301. offset = _getMixToolTipData.offset;
  42302. offset.y = _touches$.y;
  42303. opts.tooltip = {
  42304. textList: option.textList ? option.textList : textList,
  42305. offset: option.offset !== undefined ? option.offset : offset,
  42306. option: option,
  42307. index: index
  42308. };
  42309. }
  42310. }
  42311. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42312. }
  42313. if (this.opts.type === 'candle') {
  42314. var current = this.getCurrentDataIndex(e);
  42315. var index = option.index == undefined ? current.index : option.index;
  42316. if (index > -1) {
  42317. var currentOffset = this.scrollOption.currentOffset;
  42318. var opts = assign({}, this.opts, {
  42319. _scrollDistance_: currentOffset,
  42320. animation: false
  42321. });
  42322. var seriesData = getSeriesDataItem(this.opts.series, index);
  42323. if (seriesData.length !== 0) {
  42324. var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts, index, this.opts.categories, this.opts.extra.candle, option),
  42325. textList = _getToolTipData.textList,
  42326. offset = _getToolTipData.offset;
  42327. offset.y = _touches$.y;
  42328. opts.tooltip = {
  42329. textList: option.textList ? option.textList : textList,
  42330. offset: option.offset !== undefined ? option.offset : offset,
  42331. option: option,
  42332. index: index
  42333. };
  42334. }
  42335. }
  42336. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42337. }
  42338. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose' || this.opts.type === 'funnel') {
  42339. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  42340. if (index > -1) {
  42341. var opts = assign({}, this.opts, {
  42342. animation: false
  42343. });
  42344. var seriesData = assign({}, opts._series_[index]);
  42345. var textList = [{
  42346. text: option.formatter ? option.formatter(seriesData, undefined, index, opts) : seriesData.name + ': ' + seriesData.data,
  42347. color: seriesData.color
  42348. }];
  42349. var offset = {
  42350. x: _touches$.x,
  42351. y: _touches$.y
  42352. };
  42353. opts.tooltip = {
  42354. textList: option.textList ? option.textList : textList,
  42355. offset: option.offset !== undefined ? option.offset : offset,
  42356. option: option,
  42357. index: index
  42358. };
  42359. }
  42360. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42361. }
  42362. if (this.opts.type === 'map') {
  42363. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  42364. if (index > -1) {
  42365. var opts = assign({}, this.opts, {
  42366. animation: false
  42367. });
  42368. var seriesData = assign({}, this.opts.series[index]);
  42369. seriesData.name = seriesData.properties.name;
  42370. var textList = [{
  42371. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  42372. color: seriesData.color
  42373. }];
  42374. var offset = {
  42375. x: _touches$.x,
  42376. y: _touches$.y
  42377. };
  42378. opts.tooltip = {
  42379. textList: option.textList ? option.textList : textList,
  42380. offset: option.offset !== undefined ? option.offset : offset,
  42381. option: option,
  42382. index: index
  42383. };
  42384. }
  42385. opts.updateData = false;
  42386. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42387. }
  42388. if (this.opts.type === 'word') {
  42389. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  42390. if (index > -1) {
  42391. var opts = assign({}, this.opts, {
  42392. animation: false
  42393. });
  42394. var seriesData = assign({}, this.opts.series[index]);
  42395. var textList = [{
  42396. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  42397. color: seriesData.color
  42398. }];
  42399. var offset = {
  42400. x: _touches$.x,
  42401. y: _touches$.y
  42402. };
  42403. opts.tooltip = {
  42404. textList: option.textList ? option.textList : textList,
  42405. offset: option.offset !== undefined ? option.offset : offset,
  42406. option: option,
  42407. index: index
  42408. };
  42409. }
  42410. opts.updateData = false;
  42411. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42412. }
  42413. if (this.opts.type === 'radar') {
  42414. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  42415. if (index > -1) {
  42416. var opts = assign({}, this.opts, {
  42417. animation: false
  42418. });
  42419. var seriesData = getSeriesDataItem(this.opts.series, index);
  42420. if (seriesData.length !== 0) {
  42421. var textList = seriesData.map(function (item) {
  42422. return {
  42423. text: option.formatter ? option.formatter(item, _this2.opts.categories[index], index, _this2.opts) : item.name + ': ' + item.data,
  42424. color: item.color
  42425. };
  42426. });
  42427. var offset = {
  42428. x: _touches$.x,
  42429. y: _touches$.y
  42430. };
  42431. opts.tooltip = {
  42432. textList: option.textList ? option.textList : textList,
  42433. offset: option.offset !== undefined ? option.offset : offset,
  42434. option: option,
  42435. index: index
  42436. };
  42437. }
  42438. }
  42439. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42440. }
  42441. };
  42442. uCharts.prototype.translate = function (distance) {
  42443. this.scrollOption = {
  42444. currentOffset: distance,
  42445. startTouchX: distance,
  42446. distance: 0,
  42447. lastMoveTime: 0
  42448. };
  42449. var opts = assign({}, this.opts, {
  42450. _scrollDistance_: distance,
  42451. animation: false
  42452. });
  42453. drawCharts.call(this, this.opts.type, opts, this.config, this.context);
  42454. };
  42455. uCharts.prototype.scrollStart = function (e) {
  42456. var touches = null;
  42457. if (e.changedTouches) {
  42458. touches = e.changedTouches[0];
  42459. } else {
  42460. touches = e.mp.changedTouches[0];
  42461. }
  42462. var _touches$ = getTouches(touches, this.opts, e);
  42463. if (touches && this.opts.enableScroll === true) {
  42464. this.scrollOption.startTouchX = _touches$.x;
  42465. }
  42466. };
  42467. uCharts.prototype.scroll = function (e) {
  42468. if (this.scrollOption.lastMoveTime === 0) {
  42469. this.scrollOption.lastMoveTime = Date.now();
  42470. }
  42471. var Limit = this.opts.touchMoveLimit || 60;
  42472. var currMoveTime = Date.now();
  42473. var duration = currMoveTime - this.scrollOption.lastMoveTime;
  42474. if (duration < Math.floor(1000 / Limit)) return;
  42475. this.scrollOption.lastMoveTime = currMoveTime;
  42476. var touches = null;
  42477. if (e.changedTouches) {
  42478. touches = e.changedTouches[0];
  42479. } else {
  42480. touches = e.mp.changedTouches[0];
  42481. }
  42482. if (touches && this.opts.enableScroll === true) {
  42483. var _touches$ = getTouches(touches, this.opts, e);
  42484. var _distance;
  42485. _distance = _touches$.x - this.scrollOption.startTouchX;
  42486. var currentOffset = this.scrollOption.currentOffset;
  42487. var validDistance = calValidDistance(this, currentOffset + _distance, this.opts.chartData, this.config, this.opts);
  42488. this.scrollOption.distance = _distance = validDistance - currentOffset;
  42489. var opts = assign({}, this.opts, {
  42490. _scrollDistance_: currentOffset + _distance,
  42491. animation: false
  42492. });
  42493. this.opts = opts;
  42494. drawCharts.call(this, opts.type, opts, this.config, this.context);
  42495. return currentOffset + _distance;
  42496. }
  42497. };
  42498. uCharts.prototype.scrollEnd = function (e) {
  42499. if (this.opts.enableScroll === true) {
  42500. var _scrollOption = this.scrollOption,
  42501. currentOffset = _scrollOption.currentOffset,
  42502. distance = _scrollOption.distance;
  42503. this.scrollOption.currentOffset = currentOffset + distance;
  42504. this.scrollOption.distance = 0;
  42505. }
  42506. };
  42507. if (( false ? undefined : (0, _typeof2.default)(module)) === "object" && (0, _typeof2.default)(module.exports) === "object") {
  42508. module.exports = uCharts;
  42509. }
  42510. var _default = uCharts;
  42511. exports.default = _default;
  42512. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/module.js */ 40)(module)))
  42513. /***/ }),
  42514. /***/ 512:
  42515. /*!*************************************************************************************************!*\
  42516. !*** E:/Desktop/zd_wechatApp(1)/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js ***!
  42517. \*************************************************************************************************/
  42518. /*! no static exports found */
  42519. /***/ (function(module, exports, __webpack_require__) {
  42520. "use strict";
  42521. Object.defineProperty(exports, "__esModule", {
  42522. value: true
  42523. });
  42524. exports.default = void 0;
  42525. /*
  42526. * uCharts®
  42527. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  42528. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  42529. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  42530. * 复制使用请保留本段注释,感谢支持开源!
  42531. *
  42532. * uCharts®官方网站
  42533. * https://www.uCharts.cn
  42534. *
  42535. * 开源地址:
  42536. * https://gitee.com/uCharts/uCharts
  42537. *
  42538. * uni-app插件市场地址:
  42539. * http://ext.dcloud.net.cn/plugin?id=271
  42540. *
  42541. */
  42542. // 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
  42543. var color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
  42544. //事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
  42545. var formatDateTime = function formatDateTime(timeStamp, returnType) {
  42546. var date = new Date();
  42547. date.setTime(timeStamp * 1000);
  42548. var y = date.getFullYear();
  42549. var m = date.getMonth() + 1;
  42550. m = m < 10 ? '0' + m : m;
  42551. var d = date.getDate();
  42552. d = d < 10 ? '0' + d : d;
  42553. var h = date.getHours();
  42554. h = h < 10 ? '0' + h : h;
  42555. var minute = date.getMinutes();
  42556. var second = date.getSeconds();
  42557. minute = minute < 10 ? '0' + minute : minute;
  42558. second = second < 10 ? '0' + second : second;
  42559. if (returnType == 'full') {
  42560. return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
  42561. }
  42562. if (returnType == 'y-m-d') {
  42563. return y + '-' + m + '-' + d;
  42564. }
  42565. if (returnType == 'h:m') {
  42566. return h + ':' + minute;
  42567. }
  42568. if (returnType == 'h:m:s') {
  42569. return h + ':' + minute + ':' + second;
  42570. }
  42571. return [y, m, d, h, minute, second];
  42572. };
  42573. var cfu = {
  42574. //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
  42575. "type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"],
  42576. "range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "条状图", "区域图", "雷达图", "仪表盘", "K线图", "混合图", "时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"],
  42577. //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
  42578. //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
  42579. "categories": ["line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "demotype"],
  42580. //instance为实例变量承载属性,不要删除
  42581. "instance": {},
  42582. //option为opts及eopts承载属性,不要删除
  42583. "option": {},
  42584. //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
  42585. "formatter": {
  42586. "yAxisDemo1": function yAxisDemo1(val) {
  42587. return val + '元';
  42588. },
  42589. "yAxisDemo2": function yAxisDemo2(val) {
  42590. return val.toFixed(2);
  42591. },
  42592. "xAxisDemo1": function xAxisDemo1(val) {
  42593. return val + '年';
  42594. },
  42595. "xAxisDemo2": function xAxisDemo2(val) {
  42596. return formatDateTime(val, 'h:m');
  42597. },
  42598. "seriesDemo1": function seriesDemo1(val) {
  42599. return val + '元';
  42600. },
  42601. "tooltipDemo1": function tooltipDemo1(item, category, index, opts) {
  42602. if (index == 0) {
  42603. return '随便用' + item.data + '年';
  42604. } else {
  42605. return '其他我没改' + item.data + '天';
  42606. }
  42607. },
  42608. "pieDemo": function pieDemo(val, index, series) {
  42609. if (index !== undefined) {
  42610. return series[index].name + ':' + series[index].data + '元';
  42611. }
  42612. }
  42613. },
  42614. //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
  42615. "demotype": {
  42616. //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
  42617. "type": "line",
  42618. "color": color,
  42619. "padding": [15, 10, 0, 15],
  42620. "xAxis": {
  42621. "disableGrid": true
  42622. },
  42623. "yAxis": {
  42624. "gridType": "dash",
  42625. "dashLength": 2
  42626. },
  42627. "legend": {},
  42628. "extra": {
  42629. "line": {
  42630. "type": "curve",
  42631. "width": 2
  42632. }
  42633. }
  42634. },
  42635. //下面是自定义配置,请添加项目所需的通用配置
  42636. "pie": {
  42637. "type": "pie",
  42638. "color": color,
  42639. "padding": [5, 5, 5, 5],
  42640. "extra": {
  42641. "pie": {
  42642. "activeOpacity": 0.5,
  42643. "activeRadius": 10,
  42644. "offsetAngle": 0,
  42645. "labelWidth": 15,
  42646. "border": true,
  42647. "borderWidth": 3,
  42648. "borderColor": "#FFFFFF"
  42649. }
  42650. }
  42651. },
  42652. "ring": {
  42653. "type": "ring",
  42654. "color": color,
  42655. "padding": [5, 5, 5, 5],
  42656. "rotate": false,
  42657. "dataLabel": true,
  42658. "legend": {
  42659. "show": true,
  42660. "position": "right",
  42661. "lineHeight": 25
  42662. },
  42663. "title": {
  42664. "name": "收益率",
  42665. "fontSize": 15,
  42666. "color": "#666666"
  42667. },
  42668. "subtitle": {
  42669. "name": "70%",
  42670. "fontSize": 25,
  42671. "color": "#7cb5ec"
  42672. },
  42673. "extra": {
  42674. "ring": {
  42675. "ringWidth": 30,
  42676. "activeOpacity": 0.5,
  42677. "activeRadius": 10,
  42678. "offsetAngle": 0,
  42679. "labelWidth": 15,
  42680. "border": true,
  42681. "borderWidth": 3,
  42682. "borderColor": "#FFFFFF"
  42683. }
  42684. }
  42685. },
  42686. "rose": {
  42687. "type": "rose",
  42688. "color": color,
  42689. "padding": [5, 5, 5, 5],
  42690. "legend": {
  42691. "show": true,
  42692. "position": "left",
  42693. "lineHeight": 25
  42694. },
  42695. "extra": {
  42696. "rose": {
  42697. "type": "area",
  42698. "minRadius": 50,
  42699. "activeOpacity": 0.5,
  42700. "activeRadius": 10,
  42701. "offsetAngle": 0,
  42702. "labelWidth": 15,
  42703. "border": false,
  42704. "borderWidth": 2,
  42705. "borderColor": "#FFFFFF"
  42706. }
  42707. }
  42708. },
  42709. "word": {
  42710. "type": "word",
  42711. "color": color,
  42712. "extra": {
  42713. "word": {
  42714. "type": "normal",
  42715. "autoColors": false
  42716. }
  42717. }
  42718. },
  42719. "funnel": {
  42720. "type": "funnel",
  42721. "color": color,
  42722. "padding": [15, 15, 0, 15],
  42723. "extra": {
  42724. "funnel": {
  42725. "activeOpacity": 0.3,
  42726. "activeWidth": 10,
  42727. "border": true,
  42728. "borderWidth": 2,
  42729. "borderColor": "#FFFFFF",
  42730. "fillOpacity": 1,
  42731. "labelAlign": "right"
  42732. }
  42733. }
  42734. },
  42735. "map": {
  42736. "type": "map",
  42737. "color": color,
  42738. "padding": [0, 0, 0, 0],
  42739. "dataLabel": true,
  42740. "extra": {
  42741. "map": {
  42742. "border": true,
  42743. "borderWidth": 1,
  42744. "borderColor": "#666666",
  42745. "fillOpacity": 0.6,
  42746. "activeBorderColor": "#F04864",
  42747. "activeFillColor": "#FACC14",
  42748. "activeFillOpacity": 1
  42749. }
  42750. }
  42751. },
  42752. "arcbar": {
  42753. "type": "arcbar",
  42754. "color": color,
  42755. "title": {
  42756. "name": "百分比",
  42757. "fontSize": 25,
  42758. "color": "#00FF00"
  42759. },
  42760. "subtitle": {
  42761. "name": "默认标题",
  42762. "fontSize": 15,
  42763. "color": "#666666"
  42764. },
  42765. "extra": {
  42766. "arcbar": {
  42767. "type": "default",
  42768. "width": 12,
  42769. "backgroundColor": "#E9E9E9",
  42770. "startAngle": 0.75,
  42771. "endAngle": 0.25,
  42772. "gap": 2
  42773. }
  42774. }
  42775. },
  42776. "line": {
  42777. "type": "line",
  42778. "color": color,
  42779. "padding": [15, 10, 0, 15],
  42780. "xAxis": {
  42781. "disableGrid": true
  42782. },
  42783. "yAxis": {
  42784. "gridType": "dash",
  42785. "dashLength": 2
  42786. },
  42787. "legend": {},
  42788. "extra": {
  42789. "line": {
  42790. "type": "straight",
  42791. "width": 2
  42792. }
  42793. }
  42794. },
  42795. "tline": {
  42796. "type": "line",
  42797. "color": color,
  42798. "padding": [15, 10, 0, 15],
  42799. "xAxis": {
  42800. "disableGrid": false,
  42801. "boundaryGap": "justify"
  42802. },
  42803. "yAxis": {
  42804. "gridType": "dash",
  42805. "dashLength": 2,
  42806. "data": [{
  42807. "min": 0,
  42808. "max": 80
  42809. }]
  42810. },
  42811. "legend": {},
  42812. "extra": {
  42813. "line": {
  42814. "type": "curve",
  42815. "width": 2
  42816. }
  42817. }
  42818. },
  42819. "tarea": {
  42820. "type": "area",
  42821. "color": color,
  42822. "padding": [15, 10, 0, 15],
  42823. "xAxis": {
  42824. "disableGrid": true,
  42825. "boundaryGap": "justify"
  42826. },
  42827. "yAxis": {
  42828. "gridType": "dash",
  42829. "dashLength": 2,
  42830. "data": [{
  42831. "min": 0,
  42832. "max": 80
  42833. }]
  42834. },
  42835. "legend": {},
  42836. "extra": {
  42837. "area": {
  42838. "type": "curve",
  42839. "opacity": 0.2,
  42840. "addLine": true,
  42841. "width": 2,
  42842. "gradient": true
  42843. }
  42844. }
  42845. },
  42846. "column": {
  42847. "type": "column",
  42848. "color": color,
  42849. "padding": [15, 15, 0, 5],
  42850. "xAxis": {
  42851. "disableGrid": true
  42852. },
  42853. "yAxis": {
  42854. "data": [{
  42855. "min": 0
  42856. }]
  42857. },
  42858. "legend": {},
  42859. "extra": {
  42860. "column": {
  42861. "type": "group",
  42862. "width": 30,
  42863. "meterBorde": 1,
  42864. "meterFillColor": "#FFFFFF",
  42865. "activeBgColor": "#000000",
  42866. "activeBgOpacity": 0.08
  42867. }
  42868. }
  42869. },
  42870. "bar": {
  42871. "type": "bar",
  42872. "color": color,
  42873. "padding": [15, 30, 0, 5],
  42874. "xAxis": {
  42875. "boundaryGap": "justify",
  42876. "disableGrid": false,
  42877. "min": 0,
  42878. "axisLine": false
  42879. },
  42880. "yAxis": {},
  42881. "legend": {},
  42882. "extra": {
  42883. "bar": {
  42884. "type": "group",
  42885. "width": 30,
  42886. "meterBorde": 1,
  42887. "meterFillColor": "#FFFFFF",
  42888. "activeBgColor": "#000000",
  42889. "activeBgOpacity": 0.08
  42890. }
  42891. }
  42892. },
  42893. "area": {
  42894. "type": "area",
  42895. "color": color,
  42896. "padding": [15, 15, 0, 15],
  42897. "xAxis": {
  42898. "disableGrid": true
  42899. },
  42900. "yAxis": {
  42901. "gridType": "dash",
  42902. "dashLength": 2
  42903. },
  42904. "legend": {},
  42905. "extra": {
  42906. "area": {
  42907. "type": "straight",
  42908. "opacity": 0.2,
  42909. "addLine": true,
  42910. "width": 2,
  42911. "gradient": false
  42912. }
  42913. }
  42914. },
  42915. "radar": {
  42916. "type": "radar",
  42917. "color": color,
  42918. "padding": [5, 5, 5, 5],
  42919. "dataLabel": false,
  42920. "legend": {
  42921. "show": true,
  42922. "position": "right",
  42923. "lineHeight": 25
  42924. },
  42925. "extra": {
  42926. "radar": {
  42927. "gridType": "radar",
  42928. "gridColor": "#CCCCCC",
  42929. "gridCount": 3,
  42930. "opacity": 0.2,
  42931. "max": 200
  42932. }
  42933. }
  42934. },
  42935. "gauge": {
  42936. "type": "gauge",
  42937. "color": color,
  42938. "title": {
  42939. "name": "66Km/H",
  42940. "fontSize": 25,
  42941. "color": "#2fc25b",
  42942. "offsetY": 50
  42943. },
  42944. "subtitle": {
  42945. "name": "实时速度",
  42946. "fontSize": 15,
  42947. "color": "#1890ff",
  42948. "offsetY": -50
  42949. },
  42950. "extra": {
  42951. "gauge": {
  42952. "type": "default",
  42953. "width": 30,
  42954. "labelColor": "#666666",
  42955. "startAngle": 0.75,
  42956. "endAngle": 0.25,
  42957. "startNumber": 0,
  42958. "endNumber": 100,
  42959. "labelFormat": "",
  42960. "splitLine": {
  42961. "fixRadius": 0,
  42962. "splitNumber": 10,
  42963. "width": 30,
  42964. "color": "#FFFFFF",
  42965. "childNumber": 5,
  42966. "childWidth": 12
  42967. },
  42968. "pointer": {
  42969. "width": 24,
  42970. "color": "auto"
  42971. }
  42972. }
  42973. }
  42974. },
  42975. "candle": {
  42976. "type": "candle",
  42977. "color": color,
  42978. "padding": [15, 15, 0, 15],
  42979. "enableScroll": true,
  42980. "enableMarkLine": true,
  42981. "dataLabel": false,
  42982. "xAxis": {
  42983. "labelCount": 4,
  42984. "itemCount": 40,
  42985. "disableGrid": true,
  42986. "gridColor": "#CCCCCC",
  42987. "gridType": "solid",
  42988. "dashLength": 4,
  42989. "scrollShow": true,
  42990. "scrollAlign": "left",
  42991. "scrollColor": "#A6A6A6",
  42992. "scrollBackgroundColor": "#EFEBEF"
  42993. },
  42994. "yAxis": {},
  42995. "legend": {},
  42996. "extra": {
  42997. "candle": {
  42998. "color": {
  42999. "upLine": "#f04864",
  43000. "upFill": "#f04864",
  43001. "downLine": "#2fc25b",
  43002. "downFill": "#2fc25b"
  43003. },
  43004. "average": {
  43005. "show": true,
  43006. "name": ["MA5", "MA10", "MA30"],
  43007. "day": [5, 10, 20],
  43008. "color": ["#1890ff", "#2fc25b", "#facc14"]
  43009. }
  43010. },
  43011. "markLine": {
  43012. "type": "dash",
  43013. "dashLength": 5,
  43014. "data": [{
  43015. "value": 2150,
  43016. "lineColor": "#f04864",
  43017. "showLabel": true
  43018. }, {
  43019. "value": 2350,
  43020. "lineColor": "#f04864",
  43021. "showLabel": true
  43022. }]
  43023. }
  43024. }
  43025. },
  43026. "mix": {
  43027. "type": "mix",
  43028. "color": color,
  43029. "padding": [15, 15, 0, 15],
  43030. "xAxis": {
  43031. "disableGrid": true
  43032. },
  43033. "yAxis": {
  43034. "disabled": false,
  43035. "disableGrid": false,
  43036. "splitNumber": 5,
  43037. "gridType": "dash",
  43038. "dashLength": 4,
  43039. "gridColor": "#CCCCCC",
  43040. "padding": 10,
  43041. "showTitle": true,
  43042. "data": []
  43043. },
  43044. "legend": {},
  43045. "extra": {
  43046. "mix": {
  43047. "column": {
  43048. "width": 20
  43049. }
  43050. }
  43051. }
  43052. },
  43053. "scatter": {
  43054. "type": "scatter",
  43055. "color": color,
  43056. "padding": [15, 15, 0, 15],
  43057. "dataLabel": false,
  43058. "xAxis": {
  43059. "disableGrid": false,
  43060. "gridType": "dash",
  43061. "splitNumber": 5,
  43062. "boundaryGap": "justify",
  43063. "min": 0
  43064. },
  43065. "yAxis": {
  43066. "disableGrid": false,
  43067. "gridType": "dash"
  43068. },
  43069. "legend": {},
  43070. "extra": {
  43071. "scatter": {}
  43072. }
  43073. },
  43074. "bubble": {
  43075. "type": "bubble",
  43076. "color": color,
  43077. "padding": [15, 15, 0, 15],
  43078. "xAxis": {
  43079. "disableGrid": false,
  43080. "gridType": "dash",
  43081. "splitNumber": 5,
  43082. "boundaryGap": "justify",
  43083. "min": 0,
  43084. "max": 250
  43085. },
  43086. "yAxis": {
  43087. "disableGrid": false,
  43088. "gridType": "dash",
  43089. "data": [{
  43090. "min": 0,
  43091. "max": 150
  43092. }]
  43093. },
  43094. "legend": {},
  43095. "extra": {
  43096. "bubble": {
  43097. "border": 2,
  43098. "opacity": 0.5
  43099. }
  43100. }
  43101. }
  43102. };
  43103. var _default = cfu;
  43104. exports.default = _default;
  43105. /***/ }),
  43106. /***/ 52:
  43107. /*!*****************************************************************!*\
  43108. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  43109. \*****************************************************************/
  43110. /*! no static exports found */
  43111. /***/ (function(module, exports) {
  43112. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  43113. try {
  43114. var info = gen[key](arg);
  43115. var value = info.value;
  43116. } catch (error) {
  43117. reject(error);
  43118. return;
  43119. }
  43120. if (info.done) {
  43121. resolve(value);
  43122. } else {
  43123. Promise.resolve(value).then(_next, _throw);
  43124. }
  43125. }
  43126. function _asyncToGenerator(fn) {
  43127. return function () {
  43128. var self = this,
  43129. args = arguments;
  43130. return new Promise(function (resolve, reject) {
  43131. var gen = fn.apply(self, args);
  43132. function _next(value) {
  43133. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  43134. }
  43135. function _throw(err) {
  43136. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  43137. }
  43138. _next(undefined);
  43139. });
  43140. };
  43141. }
  43142. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  43143. /***/ }),
  43144. /***/ 53:
  43145. /*!***********************************************************************!*\
  43146. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/timeFormat.js ***!
  43147. \***********************************************************************/
  43148. /*! no static exports found */
  43149. /***/ (function(module, exports, __webpack_require__) {
  43150. "use strict";
  43151. Object.defineProperty(exports, "__esModule", {
  43152. value: true
  43153. });
  43154. exports.default = void 0;
  43155. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  43156. // 所以这里做一个兼容polyfill的兼容处理
  43157. if (!String.prototype.padStart) {
  43158. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  43159. String.prototype.padStart = function (maxLength) {
  43160. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  43161. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError('fillString must be String');
  43162. var str = this;
  43163. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  43164. if (str.length >= maxLength) return String(str);
  43165. var fillLength = maxLength - str.length,
  43166. times = Math.ceil(fillLength / fillString.length);
  43167. while (times >>= 1) {
  43168. fillString += fillString;
  43169. if (times === 1) {
  43170. fillString += fillString;
  43171. }
  43172. }
  43173. return fillString.slice(0, fillLength) + str;
  43174. };
  43175. }
  43176. // 其他更多是格式化有如下:
  43177. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  43178. function timeFormat() {
  43179. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  43180. var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  43181. // 如果为null,则格式化当前时间
  43182. if (!dateTime) dateTime = Number(new Date());
  43183. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  43184. if (dateTime.toString().length == 10) dateTime *= 1000;
  43185. var date = new Date(dateTime);
  43186. var ret;
  43187. var opt = {
  43188. "y+": date.getFullYear().toString(),
  43189. // 年
  43190. "m+": (date.getMonth() + 1).toString(),
  43191. // 月
  43192. "d+": date.getDate().toString(),
  43193. // 日
  43194. "h+": date.getHours().toString(),
  43195. // 时
  43196. "M+": date.getMinutes().toString(),
  43197. // 分
  43198. "s+": date.getSeconds().toString() // 秒
  43199. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  43200. };
  43201. for (var k in opt) {
  43202. ret = new RegExp("(" + k + ")").exec(fmt);
  43203. if (ret) {
  43204. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  43205. }
  43206. ;
  43207. }
  43208. ;
  43209. return fmt;
  43210. }
  43211. var _default = timeFormat;
  43212. exports.default = _default;
  43213. /***/ }),
  43214. /***/ 54:
  43215. /*!*********************************************************************!*\
  43216. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/timeFrom.js ***!
  43217. \*********************************************************************/
  43218. /*! no static exports found */
  43219. /***/ (function(module, exports, __webpack_require__) {
  43220. "use strict";
  43221. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  43222. Object.defineProperty(exports, "__esModule", {
  43223. value: true
  43224. });
  43225. exports.default = void 0;
  43226. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 53));
  43227. /**
  43228. * 时间戳转为多久之前
  43229. * @param String timestamp 时间戳
  43230. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  43231. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  43232. */
  43233. function timeFrom() {
  43234. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  43235. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  43236. // 如果为null,则格式化当前时间
  43237. if (!dateTime) dateTime = Number(new Date());
  43238. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  43239. if (dateTime.toString().length == 10) dateTime *= 1000;
  43240. var timestamp = +new Date(Number(dateTime));
  43241. var timer = (Number(new Date()) - timestamp) / 1000;
  43242. // 如果小于5分钟,则返回"刚刚",其他以此类推
  43243. var tips = '';
  43244. switch (true) {
  43245. case timer < 300:
  43246. tips = '刚刚';
  43247. break;
  43248. case timer >= 300 && timer < 3600:
  43249. tips = parseInt(timer / 60) + '分钟前';
  43250. break;
  43251. case timer >= 3600 && timer < 86400:
  43252. tips = parseInt(timer / 3600) + '小时前';
  43253. break;
  43254. case timer >= 86400 && timer < 2592000:
  43255. tips = parseInt(timer / 86400) + '天前';
  43256. break;
  43257. default:
  43258. // 如果format为false,则无论什么时间戳,都显示xx之前
  43259. if (format === false) {
  43260. if (timer >= 2592000 && timer < 365 * 86400) {
  43261. tips = parseInt(timer / (86400 * 30)) + '个月前';
  43262. } else {
  43263. tips = parseInt(timer / (86400 * 365)) + '年前';
  43264. }
  43265. } else {
  43266. tips = (0, _timeFormat.default)(timestamp, format);
  43267. }
  43268. }
  43269. return tips;
  43270. }
  43271. var _default = timeFrom;
  43272. exports.default = _default;
  43273. /***/ }),
  43274. /***/ 55:
  43275. /*!**************************************************************************!*\
  43276. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/colorGradient.js ***!
  43277. \**************************************************************************/
  43278. /*! no static exports found */
  43279. /***/ (function(module, exports, __webpack_require__) {
  43280. "use strict";
  43281. Object.defineProperty(exports, "__esModule", {
  43282. value: true
  43283. });
  43284. exports.default = void 0;
  43285. /**
  43286. * 求两个颜色之间的渐变值
  43287. * @param {string} startColor 开始的颜色
  43288. * @param {string} endColor 结束的颜色
  43289. * @param {number} step 颜色等分的份额
  43290. * */
  43291. function colorGradient() {
  43292. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  43293. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  43294. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  43295. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  43296. var startR = startRGB[0];
  43297. var startG = startRGB[1];
  43298. var startB = startRGB[2];
  43299. var endRGB = hexToRgb(endColor, false);
  43300. var endR = endRGB[0];
  43301. var endG = endRGB[1];
  43302. var endB = endRGB[2];
  43303. var sR = (endR - startR) / step; //总差值
  43304. var sG = (endG - startG) / step;
  43305. var sB = (endB - startB) / step;
  43306. var colorArr = [];
  43307. for (var i = 0; i < step; i++) {
  43308. //计算每一步的hex值
  43309. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB * i + startB) + ')');
  43310. colorArr.push(hex);
  43311. }
  43312. return colorArr;
  43313. }
  43314. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  43315. function hexToRgb(sColor) {
  43316. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  43317. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  43318. sColor = sColor.toLowerCase();
  43319. if (sColor && reg.test(sColor)) {
  43320. if (sColor.length === 4) {
  43321. var sColorNew = "#";
  43322. for (var i = 1; i < 4; i += 1) {
  43323. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  43324. }
  43325. sColor = sColorNew;
  43326. }
  43327. //处理六位的颜色值
  43328. var sColorChange = [];
  43329. for (var _i = 1; _i < 7; _i += 2) {
  43330. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  43331. }
  43332. if (!str) {
  43333. return sColorChange;
  43334. } else {
  43335. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  43336. }
  43337. } else if (/^(rgb|RGB)/.test(sColor)) {
  43338. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  43339. return arr.map(function (val) {
  43340. return Number(val);
  43341. });
  43342. } else {
  43343. return sColor;
  43344. }
  43345. }
  43346. ;
  43347. // 将rgb表示方式转换为hex表示方式
  43348. function rgbToHex(rgb) {
  43349. var _this = rgb;
  43350. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  43351. if (/^(rgb|RGB)/.test(_this)) {
  43352. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  43353. var strHex = "#";
  43354. for (var i = 0; i < aColor.length; i++) {
  43355. var hex = Number(aColor[i]).toString(16);
  43356. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  43357. if (hex === "0") {
  43358. hex += hex;
  43359. }
  43360. strHex += hex;
  43361. }
  43362. if (strHex.length !== 7) {
  43363. strHex = _this;
  43364. }
  43365. return strHex;
  43366. } else if (reg.test(_this)) {
  43367. var aNum = _this.replace(/#/, "").split("");
  43368. if (aNum.length === 6) {
  43369. return _this;
  43370. } else if (aNum.length === 3) {
  43371. var numHex = "#";
  43372. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  43373. numHex += aNum[_i2] + aNum[_i2];
  43374. }
  43375. return numHex;
  43376. }
  43377. } else {
  43378. return _this;
  43379. }
  43380. }
  43381. /**
  43382. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  43383. * sHex为传入的十六进制的色值
  43384. * alpha为rgba的透明度
  43385. */
  43386. function colorToRgba(color) {
  43387. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  43388. color = rgbToHex(color);
  43389. // 十六进制颜色值的正则表达式
  43390. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  43391. /* 16进制颜色转为RGB格式 */
  43392. var sColor = color.toLowerCase();
  43393. if (sColor && reg.test(sColor)) {
  43394. if (sColor.length === 4) {
  43395. var sColorNew = '#';
  43396. for (var i = 1; i < 4; i += 1) {
  43397. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  43398. }
  43399. sColor = sColorNew;
  43400. }
  43401. // 处理六位的颜色值
  43402. var sColorChange = [];
  43403. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  43404. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  43405. }
  43406. // return sColorChange.join(',')
  43407. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  43408. } else {
  43409. return sColor;
  43410. }
  43411. }
  43412. var _default = {
  43413. colorGradient: colorGradient,
  43414. hexToRgb: hexToRgb,
  43415. rgbToHex: rgbToHex,
  43416. colorToRgba: colorToRgba
  43417. };
  43418. exports.default = _default;
  43419. /***/ }),
  43420. /***/ 56:
  43421. /*!*****************************************************************!*\
  43422. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/guid.js ***!
  43423. \*****************************************************************/
  43424. /*! no static exports found */
  43425. /***/ (function(module, exports, __webpack_require__) {
  43426. "use strict";
  43427. Object.defineProperty(exports, "__esModule", {
  43428. value: true
  43429. });
  43430. exports.default = void 0;
  43431. /**
  43432. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  43433. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  43434. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  43435. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  43436. * v-for的时候,推荐使用后端返回的id而不是循环的index
  43437. * @param {Number} len uuid的长度
  43438. * @param {Boolean} firstU 将返回的首字母置为"u"
  43439. * @param {Number} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  43440. */
  43441. function guid() {
  43442. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  43443. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  43444. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  43445. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  43446. var uuid = [];
  43447. radix = radix || chars.length;
  43448. if (len) {
  43449. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  43450. for (var i = 0; i < len; i++) {
  43451. uuid[i] = chars[0 | Math.random() * radix];
  43452. }
  43453. } else {
  43454. var r;
  43455. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  43456. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  43457. uuid[14] = '4';
  43458. for (var _i = 0; _i < 36; _i++) {
  43459. if (!uuid[_i]) {
  43460. r = 0 | Math.random() * 16;
  43461. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  43462. }
  43463. }
  43464. }
  43465. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guid不能用作id或者class
  43466. if (firstU) {
  43467. uuid.shift();
  43468. return 'u' + uuid.join('');
  43469. } else {
  43470. return uuid.join('');
  43471. }
  43472. }
  43473. var _default = guid;
  43474. exports.default = _default;
  43475. /***/ }),
  43476. /***/ 57:
  43477. /*!******************************************************************!*\
  43478. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/color.js ***!
  43479. \******************************************************************/
  43480. /*! no static exports found */
  43481. /***/ (function(module, exports, __webpack_require__) {
  43482. "use strict";
  43483. Object.defineProperty(exports, "__esModule", {
  43484. value: true
  43485. });
  43486. exports.default = void 0;
  43487. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  43488. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  43489. var color = {
  43490. primary: "#2979ff",
  43491. primaryDark: "#2b85e4",
  43492. primaryDisabled: "#a0cfff",
  43493. primaryLight: "#ecf5ff",
  43494. bgColor: "#f3f4f6",
  43495. info: "#909399",
  43496. infoDark: "#82848a",
  43497. infoDisabled: "#c8c9cc",
  43498. infoLight: "#f4f4f5",
  43499. warning: "#ff9900",
  43500. warningDark: "#f29100",
  43501. warningDisabled: "#fcbd71",
  43502. warningLight: "#fdf6ec",
  43503. error: "#fa3534",
  43504. errorDark: "#dd6161",
  43505. errorDisabled: "#fab6b6",
  43506. errorLight: "#fef0f0",
  43507. success: "#19be6b",
  43508. successDark: "#18b566",
  43509. successDisabled: "#71d5a1",
  43510. successLight: "#dbf1e1",
  43511. mainColor: "#303133",
  43512. contentColor: "#606266",
  43513. tipsColor: "#909399",
  43514. lightColor: "#c0c4cc",
  43515. borderColor: "#e4e7ed"
  43516. };
  43517. var _default = color;
  43518. exports.default = _default;
  43519. /***/ }),
  43520. /***/ 58:
  43521. /*!**********************************************************************!*\
  43522. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/type2icon.js ***!
  43523. \**********************************************************************/
  43524. /*! no static exports found */
  43525. /***/ (function(module, exports, __webpack_require__) {
  43526. "use strict";
  43527. Object.defineProperty(exports, "__esModule", {
  43528. value: true
  43529. });
  43530. exports.default = void 0;
  43531. /**
  43532. * 根据主题type值,获取对应的图标
  43533. * @param String type 主题名称,primary|info|error|warning|success
  43534. * @param String fill 是否使用fill填充实体的图标
  43535. */
  43536. function type2icon() {
  43537. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  43538. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  43539. // 如果非预置值,默认为success
  43540. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  43541. var iconName = '';
  43542. // 目前(2019-12-12),info和primary使用同一个图标
  43543. switch (type) {
  43544. case 'primary':
  43545. iconName = 'info-circle';
  43546. break;
  43547. case 'info':
  43548. iconName = 'info-circle';
  43549. break;
  43550. case 'error':
  43551. iconName = 'close-circle';
  43552. break;
  43553. case 'warning':
  43554. iconName = 'error-circle';
  43555. break;
  43556. case 'success':
  43557. iconName = 'checkmark-circle';
  43558. break;
  43559. default:
  43560. iconName = 'checkmark-circle';
  43561. }
  43562. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  43563. if (fill) iconName += '-fill';
  43564. return iconName;
  43565. }
  43566. var _default = type2icon;
  43567. exports.default = _default;
  43568. /***/ }),
  43569. /***/ 59:
  43570. /*!************************************************************************!*\
  43571. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/randomArray.js ***!
  43572. \************************************************************************/
  43573. /*! no static exports found */
  43574. /***/ (function(module, exports, __webpack_require__) {
  43575. "use strict";
  43576. Object.defineProperty(exports, "__esModule", {
  43577. value: true
  43578. });
  43579. exports.default = void 0;
  43580. // 打乱数组
  43581. function randomArray() {
  43582. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  43583. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  43584. return array.sort(function () {
  43585. return Math.random() - 0.5;
  43586. });
  43587. }
  43588. var _default = randomArray;
  43589. exports.default = _default;
  43590. /***/ }),
  43591. /***/ 6:
  43592. /*!***************************************************************!*\
  43593. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  43594. \***************************************************************/
  43595. /*! no static exports found */
  43596. /***/ (function(module, exports) {
  43597. function _arrayWithHoles(arr) {
  43598. if (Array.isArray(arr)) return arr;
  43599. }
  43600. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  43601. /***/ }),
  43602. /***/ 60:
  43603. /*!********************************************************************!*\
  43604. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/addUnit.js ***!
  43605. \********************************************************************/
  43606. /*! no static exports found */
  43607. /***/ (function(module, exports, __webpack_require__) {
  43608. "use strict";
  43609. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  43610. Object.defineProperty(exports, "__esModule", {
  43611. value: true
  43612. });
  43613. exports.default = addUnit;
  43614. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 47));
  43615. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  43616. function addUnit() {
  43617. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  43618. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  43619. value = String(value);
  43620. // 用uView内置验证规则中的number判断是否为数值
  43621. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  43622. }
  43623. /***/ }),
  43624. /***/ 61:
  43625. /*!*******************************************************************!*\
  43626. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/random.js ***!
  43627. \*******************************************************************/
  43628. /*! no static exports found */
  43629. /***/ (function(module, exports, __webpack_require__) {
  43630. "use strict";
  43631. Object.defineProperty(exports, "__esModule", {
  43632. value: true
  43633. });
  43634. exports.default = void 0;
  43635. function random(min, max) {
  43636. if (min >= 0 && max > 0 && max >= min) {
  43637. var gab = max - min + 1;
  43638. return Math.floor(Math.random() * gab + min);
  43639. } else {
  43640. return 0;
  43641. }
  43642. }
  43643. var _default = random;
  43644. exports.default = _default;
  43645. /***/ }),
  43646. /***/ 62:
  43647. /*!*****************************************************************!*\
  43648. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/trim.js ***!
  43649. \*****************************************************************/
  43650. /*! no static exports found */
  43651. /***/ (function(module, exports, __webpack_require__) {
  43652. "use strict";
  43653. Object.defineProperty(exports, "__esModule", {
  43654. value: true
  43655. });
  43656. exports.default = void 0;
  43657. function trim(str) {
  43658. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  43659. if (pos == 'both') {
  43660. return str.replace(/^\s+|\s+$/g, "");
  43661. } else if (pos == "left") {
  43662. return str.replace(/^\s*/, '');
  43663. } else if (pos == 'right') {
  43664. return str.replace(/(\s*$)/g, "");
  43665. } else if (pos == 'all') {
  43666. return str.replace(/\s+/g, "");
  43667. } else {
  43668. return str;
  43669. }
  43670. }
  43671. var _default = trim;
  43672. exports.default = _default;
  43673. /***/ }),
  43674. /***/ 63:
  43675. /*!******************************************************************!*\
  43676. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/toast.js ***!
  43677. \******************************************************************/
  43678. /*! no static exports found */
  43679. /***/ (function(module, exports, __webpack_require__) {
  43680. "use strict";
  43681. /* WEBPACK VAR INJECTION */(function(uni) {
  43682. Object.defineProperty(exports, "__esModule", {
  43683. value: true
  43684. });
  43685. exports.default = void 0;
  43686. function toast(title) {
  43687. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  43688. uni.showToast({
  43689. title: title,
  43690. icon: 'none',
  43691. duration: duration
  43692. });
  43693. }
  43694. var _default = toast;
  43695. exports.default = _default;
  43696. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  43697. /***/ }),
  43698. /***/ 64:
  43699. /*!**********************************************************************!*\
  43700. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/getParent.js ***!
  43701. \**********************************************************************/
  43702. /*! no static exports found */
  43703. /***/ (function(module, exports, __webpack_require__) {
  43704. "use strict";
  43705. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  43706. Object.defineProperty(exports, "__esModule", {
  43707. value: true
  43708. });
  43709. exports.default = getParent;
  43710. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  43711. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  43712. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  43713. function getParent(name, keys) {
  43714. var parent = this.$parent;
  43715. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  43716. while (parent) {
  43717. // 父组件
  43718. if (parent.$options.name !== name) {
  43719. // 如果组件的name不相等,继续上一级寻找
  43720. parent = parent.$parent;
  43721. } else {
  43722. var _ret = function () {
  43723. var data = {};
  43724. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  43725. if (Array.isArray(keys)) {
  43726. keys.map(function (val) {
  43727. data[val] = parent[val] ? parent[val] : '';
  43728. });
  43729. } else {
  43730. // 历遍传过来的对象参数
  43731. for (var i in keys) {
  43732. // 如果子组件有此值则用,无此值则用父组件的值
  43733. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  43734. if (Array.isArray(keys[i])) {
  43735. if (keys[i].length) {
  43736. data[i] = keys[i];
  43737. } else {
  43738. data[i] = parent[i];
  43739. }
  43740. } else if (keys[i].constructor === Object) {
  43741. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  43742. if (Object.keys(keys[i]).length) {
  43743. data[i] = keys[i];
  43744. } else {
  43745. data[i] = parent[i];
  43746. }
  43747. } else {
  43748. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  43749. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  43750. }
  43751. }
  43752. }
  43753. return {
  43754. v: data
  43755. };
  43756. }();
  43757. if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
  43758. }
  43759. }
  43760. return {};
  43761. }
  43762. /***/ }),
  43763. /***/ 65:
  43764. /*!********************************************************************!*\
  43765. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/$parent.js ***!
  43766. \********************************************************************/
  43767. /*! no static exports found */
  43768. /***/ (function(module, exports, __webpack_require__) {
  43769. "use strict";
  43770. Object.defineProperty(exports, "__esModule", {
  43771. value: true
  43772. });
  43773. exports.default = $parent;
  43774. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  43775. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  43776. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  43777. // 值(默认为undefined),就是查找最顶层的$parent
  43778. function $parent() {
  43779. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  43780. var parent = this.$parent;
  43781. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  43782. while (parent) {
  43783. // 父组件
  43784. if (parent.$options && parent.$options.name !== name) {
  43785. // 如果组件的name不相等,继续上一级寻找
  43786. parent = parent.$parent;
  43787. } else {
  43788. return parent;
  43789. }
  43790. }
  43791. return false;
  43792. }
  43793. /***/ }),
  43794. /***/ 66:
  43795. /*!****************************************************************!*\
  43796. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/sys.js ***!
  43797. \****************************************************************/
  43798. /*! no static exports found */
  43799. /***/ (function(module, exports, __webpack_require__) {
  43800. "use strict";
  43801. /* WEBPACK VAR INJECTION */(function(uni) {
  43802. Object.defineProperty(exports, "__esModule", {
  43803. value: true
  43804. });
  43805. exports.os = os;
  43806. exports.sys = sys;
  43807. function os() {
  43808. return uni.getSystemInfoSync().platform;
  43809. }
  43810. ;
  43811. function sys() {
  43812. return uni.getSystemInfoSync();
  43813. }
  43814. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  43815. /***/ }),
  43816. /***/ 67:
  43817. /*!*********************************************************************!*\
  43818. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/debounce.js ***!
  43819. \*********************************************************************/
  43820. /*! no static exports found */
  43821. /***/ (function(module, exports, __webpack_require__) {
  43822. "use strict";
  43823. Object.defineProperty(exports, "__esModule", {
  43824. value: true
  43825. });
  43826. exports.default = void 0;
  43827. var timeout = null;
  43828. /**
  43829. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  43830. *
  43831. * @param {Function} func 要执行的回调函数
  43832. * @param {Number} wait 延时的时间
  43833. * @param {Boolean} immediate 是否立即执行
  43834. * @return null
  43835. */
  43836. function debounce(func) {
  43837. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  43838. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  43839. // 清除定时器
  43840. if (timeout !== null) clearTimeout(timeout);
  43841. // 立即执行,此类情况一般用不到
  43842. if (immediate) {
  43843. var callNow = !timeout;
  43844. timeout = setTimeout(function () {
  43845. timeout = null;
  43846. }, wait);
  43847. if (callNow) typeof func === 'function' && func();
  43848. } else {
  43849. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  43850. timeout = setTimeout(function () {
  43851. typeof func === 'function' && func();
  43852. }, wait);
  43853. }
  43854. }
  43855. var _default = debounce;
  43856. exports.default = _default;
  43857. /***/ }),
  43858. /***/ 68:
  43859. /*!*********************************************************************!*\
  43860. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/throttle.js ***!
  43861. \*********************************************************************/
  43862. /*! no static exports found */
  43863. /***/ (function(module, exports, __webpack_require__) {
  43864. "use strict";
  43865. Object.defineProperty(exports, "__esModule", {
  43866. value: true
  43867. });
  43868. exports.default = void 0;
  43869. var timer, flag;
  43870. /**
  43871. * 节流原理:在一定时间内,只能触发一次
  43872. *
  43873. * @param {Function} func 要执行的回调函数
  43874. * @param {Number} wait 延时的时间
  43875. * @param {Boolean} immediate 是否立即执行
  43876. * @return null
  43877. */
  43878. function throttle(func) {
  43879. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  43880. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  43881. if (immediate) {
  43882. if (!flag) {
  43883. flag = true;
  43884. // 如果是立即执行,则在wait毫秒内开始时执行
  43885. typeof func === 'function' && func();
  43886. timer = setTimeout(function () {
  43887. flag = false;
  43888. }, wait);
  43889. }
  43890. } else {
  43891. if (!flag) {
  43892. flag = true;
  43893. // 如果是非立即执行,则在wait毫秒内的结束处执行
  43894. timer = setTimeout(function () {
  43895. flag = false;
  43896. typeof func === 'function' && func();
  43897. }, wait);
  43898. }
  43899. }
  43900. }
  43901. ;
  43902. var _default = throttle;
  43903. exports.default = _default;
  43904. /***/ }),
  43905. /***/ 69:
  43906. /*!*****************************************************************!*\
  43907. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/config/config.js ***!
  43908. \*****************************************************************/
  43909. /*! no static exports found */
  43910. /***/ (function(module, exports, __webpack_require__) {
  43911. "use strict";
  43912. Object.defineProperty(exports, "__esModule", {
  43913. value: true
  43914. });
  43915. exports.default = void 0;
  43916. // 此版本发布于2022-04-19
  43917. var version = '1.8.6';
  43918. var _default = {
  43919. v: version,
  43920. version: version,
  43921. // 主题名称
  43922. type: ['primary', 'success', 'info', 'error', 'warning']
  43923. };
  43924. exports.default = _default;
  43925. /***/ }),
  43926. /***/ 7:
  43927. /*!*********************************************************************!*\
  43928. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  43929. \*********************************************************************/
  43930. /*! no static exports found */
  43931. /***/ (function(module, exports) {
  43932. function _iterableToArrayLimit(arr, i) {
  43933. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  43934. if (null != _i) {
  43935. var _s,
  43936. _e,
  43937. _x,
  43938. _r,
  43939. _arr = [],
  43940. _n = !0,
  43941. _d = !1;
  43942. try {
  43943. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  43944. if (Object(_i) !== _i) return;
  43945. _n = !1;
  43946. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  43947. ;
  43948. }
  43949. } catch (err) {
  43950. _d = !0, _e = err;
  43951. } finally {
  43952. try {
  43953. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  43954. } finally {
  43955. if (_d) throw _e;
  43956. }
  43957. }
  43958. return _arr;
  43959. }
  43960. }
  43961. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  43962. /***/ }),
  43963. /***/ 70:
  43964. /*!*****************************************************************!*\
  43965. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/config/zIndex.js ***!
  43966. \*****************************************************************/
  43967. /*! no static exports found */
  43968. /***/ (function(module, exports, __webpack_require__) {
  43969. "use strict";
  43970. Object.defineProperty(exports, "__esModule", {
  43971. value: true
  43972. });
  43973. exports.default = void 0;
  43974. // uniapp在H5中各API的z-index值如下:
  43975. /**
  43976. * actionsheet: 999
  43977. * modal: 999
  43978. * navigate: 998
  43979. * tabbar: 998
  43980. * toast: 999
  43981. */
  43982. var _default = {
  43983. toast: 10090,
  43984. noNetwork: 10080,
  43985. // popup包含popup,actionsheet,keyboard,picker的值
  43986. popup: 10075,
  43987. mask: 10070,
  43988. navbar: 980,
  43989. topTips: 975,
  43990. sticky: 970,
  43991. indexListSticky: 965
  43992. };
  43993. exports.default = _default;
  43994. /***/ }),
  43995. /***/ 8:
  43996. /*!***************************************************************************!*\
  43997. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  43998. \***************************************************************************/
  43999. /*! no static exports found */
  44000. /***/ (function(module, exports, __webpack_require__) {
  44001. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  44002. function _unsupportedIterableToArray(o, minLen) {
  44003. if (!o) return;
  44004. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  44005. var n = Object.prototype.toString.call(o).slice(8, -1);
  44006. if (n === "Object" && o.constructor) n = o.constructor.name;
  44007. if (n === "Map" || n === "Set") return Array.from(o);
  44008. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  44009. }
  44010. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  44011. /***/ }),
  44012. /***/ 9:
  44013. /*!*****************************************************************!*\
  44014. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  44015. \*****************************************************************/
  44016. /*! no static exports found */
  44017. /***/ (function(module, exports) {
  44018. function _arrayLikeToArray(arr, len) {
  44019. if (len == null || len > arr.length) len = arr.length;
  44020. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  44021. arr2[i] = arr[i];
  44022. }
  44023. return arr2;
  44024. }
  44025. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  44026. /***/ })
  44027. }]);
  44028. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map