1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851488524885348854488554885648857488584885948860488614886248863488644886548866488674886848869488704887148872488734887448875488764887748878488794888048881488824888348884488854888648887488884888948890488914889248893488944889548896488974889848899489004890148902489034890448905489064890748908489094891048911489124891348914489154891648917489184891948920489214892248923489244892548926489274892848929489304893148932489334893448935489364893748938489394894048941489424894348944489454894648947489484894948950489514895248953489544895548956489574895848959489604896148962489634896448965489664896748968489694897048971489724897348974489754897648977489784897948980489814898248983489844898548986489874898848989489904899148992489934899448995489964899748998489994900049001490024900349004490054900649007490084900949010490114901249013490144901549016490174901849019490204902149022490234902449025490264902749028490294903049031490324903349034490354903649037490384903949040490414904249043490444904549046490474904849049490504905149052490534905449055490564905749058490594906049061490624906349064490654906649067490684906949070490714907249073490744907549076490774907849079490804908149082490834908449085490864908749088490894909049091490924909349094490954909649097490984909949100491014910249103491044910549106491074910849109491104911149112491134911449115491164911749118491194912049121491224912349124491254912649127491284912949130491314913249133491344913549136491374913849139491404914149142491434914449145491464914749148491494915049151491524915349154491554915649157491584915949160491614916249163491644916549166491674916849169491704917149172491734917449175491764917749178491794918049181491824918349184491854918649187491884918949190491914919249193491944919549196491974919849199492004920149202492034920449205492064920749208492094921049211492124921349214492154921649217492184921949220492214922249223492244922549226492274922849229492304923149232492334923449235492364923749238492394924049241492424924349244492454924649247492484924949250492514925249253492544925549256492574925849259492604926149262492634926449265492664926749268492694927049271492724927349274492754927649277492784927949280492814928249283492844928549286492874928849289492904929149292492934929449295492964929749298492994930049301493024930349304493054930649307493084930949310493114931249313493144931549316493174931849319493204932149322493234932449325493264932749328493294933049331493324933349334493354933649337493384933949340493414934249343493444934549346493474934849349493504935149352493534935449355493564935749358493594936049361493624936349364493654936649367493684936949370493714937249373493744937549376493774937849379493804938149382493834938449385493864938749388493894939049391493924939349394493954939649397493984939949400494014940249403494044940549406494074940849409494104941149412494134941449415494164941749418494194942049421494224942349424494254942649427494284942949430494314943249433494344943549436494374943849439494404944149442494434944449445494464944749448494494945049451494524945349454494554945649457494584945949460494614946249463494644946549466494674946849469494704947149472494734947449475494764947749478494794948049481494824948349484494854948649487494884948949490494914949249493494944949549496494974949849499495004950149502495034950449505495064950749508495094951049511495124951349514495154951649517495184951949520495214952249523495244952549526495274952849529495304953149532495334953449535495364953749538495394954049541495424954349544495454954649547495484954949550495514955249553495544955549556495574955849559495604956149562495634956449565495664956749568495694957049571495724957349574495754957649577495784957949580495814958249583495844958549586495874958849589495904959149592495934959449595495964959749598495994960049601496024960349604496054960649607496084960949610496114961249613496144961549616496174961849619496204962149622496234962449625496264962749628496294963049631496324963349634496354963649637496384963949640496414964249643496444964549646496474964849649496504965149652496534965449655496564965749658496594966049661496624966349664496654966649667496684966949670496714967249673496744967549676496774967849679496804968149682496834968449685496864968749688496894969049691496924969349694496954969649697496984969949700497014970249703497044970549706497074970849709497104971149712497134971449715497164971749718497194972049721497224972349724497254972649727497284972949730497314973249733497344973549736497374973849739497404974149742497434974449745497464974749748497494975049751497524975349754497554975649757497584975949760497614976249763497644976549766497674976849769497704977149772497734977449775497764977749778497794978049781497824978349784497854978649787497884978949790497914979249793497944979549796497974979849799498004980149802498034980449805498064980749808498094981049811498124981349814498154981649817498184981949820498214982249823498244982549826498274982849829498304983149832498334983449835498364983749838498394984049841498424984349844498454984649847498484984949850498514985249853498544985549856498574985849859498604986149862498634986449865498664986749868498694987049871498724987349874498754987649877498784987949880498814988249883498844988549886498874988849889498904989149892498934989449895498964989749898498994990049901499024990349904499054990649907499084990949910499114991249913499144991549916499174991849919499204992149922499234992449925499264992749928499294993049931499324993349934499354993649937499384993949940499414994249943499444994549946499474994849949499504995149952499534995449955499564995749958499594996049961499624996349964499654996649967499684996949970499714997249973499744997549976499774997849979499804998149982499834998449985499864998749988499894999049991499924999349994499954999649997499984999950000500015000250003500045000550006500075000850009500105001150012500135001450015500165001750018500195002050021500225002350024500255002650027500285002950030500315003250033500345003550036500375003850039500405004150042500435004450045500465004750048500495005050051500525005350054500555005650057500585005950060500615006250063500645006550066500675006850069500705007150072500735007450075500765007750078500795008050081500825008350084500855008650087500885008950090500915009250093500945009550096500975009850099501005010150102501035010450105501065010750108501095011050111501125011350114501155011650117501185011950120501215012250123501245012550126501275012850129501305013150132501335013450135501365013750138501395014050141501425014350144501455014650147501485014950150501515015250153501545015550156501575015850159501605016150162501635016450165501665016750168501695017050171501725017350174501755017650177501785017950180501815018250183501845018550186501875018850189501905019150192501935019450195501965019750198501995020050201502025020350204502055020650207502085020950210502115021250213502145021550216502175021850219502205022150222502235022450225502265022750228502295023050231502325023350234502355023650237502385023950240502415024250243502445024550246502475024850249502505025150252502535025450255502565025750258502595026050261502625026350264502655026650267502685026950270502715027250273502745027550276502775027850279502805028150282502835028450285502865028750288502895029050291502925029350294502955029650297502985029950300503015030250303503045030550306503075030850309503105031150312503135031450315503165031750318503195032050321503225032350324503255032650327503285032950330503315033250333503345033550336503375033850339503405034150342503435034450345503465034750348503495035050351503525035350354503555035650357503585035950360503615036250363503645036550366503675036850369503705037150372503735037450375503765037750378503795038050381503825038350384503855038650387503885038950390503915039250393503945039550396503975039850399504005040150402504035040450405504065040750408504095041050411504125041350414504155041650417504185041950420504215042250423504245042550426504275042850429504305043150432504335043450435504365043750438504395044050441504425044350444504455044650447504485044950450504515045250453504545045550456504575045850459504605046150462504635046450465504665046750468504695047050471504725047350474504755047650477504785047950480504815048250483504845048550486504875048850489504905049150492504935049450495504965049750498504995050050501505025050350504505055050650507505085050950510505115051250513505145051550516505175051850519505205052150522505235052450525505265052750528505295053050531505325053350534505355053650537505385053950540505415054250543505445054550546505475054850549505505055150552505535055450555505565055750558505595056050561505625056350564505655056650567505685056950570505715057250573505745057550576505775057850579505805058150582505835058450585505865058750588505895059050591505925059350594505955059650597505985059950600506015060250603506045060550606506075060850609506105061150612506135061450615506165061750618506195062050621506225062350624506255062650627506285062950630506315063250633506345063550636506375063850639506405064150642506435064450645506465064750648506495065050651506525065350654506555065650657506585065950660506615066250663506645066550666506675066850669506705067150672506735067450675506765067750678506795068050681506825068350684506855068650687506885068950690506915069250693506945069550696506975069850699507005070150702507035070450705507065070750708507095071050711507125071350714507155071650717507185071950720507215072250723507245072550726507275072850729507305073150732507335073450735507365073750738507395074050741507425074350744507455074650747507485074950750507515075250753507545075550756507575075850759507605076150762507635076450765507665076750768507695077050771507725077350774507755077650777507785077950780507815078250783507845078550786507875078850789507905079150792507935079450795507965079750798507995080050801508025080350804508055080650807508085080950810508115081250813508145081550816508175081850819508205082150822508235082450825508265082750828508295083050831508325083350834508355083650837508385083950840508415084250843508445084550846508475084850849508505085150852508535085450855508565085750858508595086050861508625086350864508655086650867508685086950870508715087250873508745087550876508775087850879508805088150882508835088450885508865088750888508895089050891508925089350894508955089650897508985089950900509015090250903509045090550906509075090850909509105091150912509135091450915509165091750918509195092050921509225092350924509255092650927509285092950930509315093250933509345093550936509375093850939509405094150942509435094450945509465094750948509495095050951509525095350954509555095650957509585095950960509615096250963509645096550966509675096850969509705097150972509735097450975509765097750978509795098050981509825098350984509855098650987509885098950990509915099250993509945099550996509975099850999510005100151002510035100451005510065100751008510095101051011510125101351014510155101651017510185101951020510215102251023510245102551026510275102851029510305103151032510335103451035510365103751038510395104051041510425104351044510455104651047510485104951050510515105251053510545105551056510575105851059510605106151062510635106451065510665106751068510695107051071510725107351074510755107651077510785107951080510815108251083510845108551086510875108851089510905109151092510935109451095510965109751098510995110051101511025110351104511055110651107511085110951110511115111251113511145111551116511175111851119511205112151122511235112451125511265112751128511295113051131511325113351134511355113651137511385113951140511415114251143511445114551146511475114851149511505115151152511535115451155511565115751158511595116051161511625116351164511655116651167511685116951170511715117251173511745117551176511775117851179511805118151182511835118451185511865118751188 |
- /*!
- *
- * @supermap/vue-iclient.(https://iclient.supermap.io)
- * Copyright© 2000 - 2020 SuperMap Software Co.Ltd
- * license: Apache-2.0
- * version: v10.1.0
- *
- */
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory(require("vue"), require("leaflet"), require("../static/libs/iclient-leaflet/iclient-leaflet.min.js"), require("vue-echarts"), require("ant-design-vue"), require("echarts-liquidfill"), require("video.js"), require("echarts"));
- else if(typeof define === 'function' && define.amd)
- define(["vue", "leaflet", "../static/libs/iclient-leaflet/iclient-leaflet.min.js", "vue-echarts", "ant-design-vue", "echarts-liquidfill", "video.js", "echarts"], factory);
- else if(typeof exports === 'object')
- exports["Components"] = factory(require("vue"), require("leaflet"), require("../static/libs/iclient-leaflet/iclient-leaflet.min.js"), require("vue-echarts"), require("ant-design-vue"), require("echarts-liquidfill"), require("video.js"), require("echarts"));
- else
- root["SuperMap"] = root["SuperMap"] || {}, root["SuperMap"]["Components"] = factory(root["Vue"], root["L"], root["SuperMap"], root["VueECharts"], root["antd"], root["echarts-liquidfill"], root["_videojs"], root["echarts"]);
- })(window, function(__WEBPACK_EXTERNAL_MODULE__5643__, __WEBPACK_EXTERNAL_MODULE__73e4__, __WEBPACK_EXTERNAL_MODULE__751d__, __WEBPACK_EXTERNAL_MODULE__8275__, __WEBPACK_EXTERNAL_MODULE_a587__, __WEBPACK_EXTERNAL_MODULE_acbb__, __WEBPACK_EXTERNAL_MODULE_be3f__, __WEBPACK_EXTERNAL_MODULE_f840__) {
- return /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId]) {
- /******/ return installedModules[moduleId].exports;
- /******/ }
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {}
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
- /******/ }
- /******/ };
- /******/
- /******/ // define __esModule on exports
- /******/ __webpack_require__.r = function(exports) {
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- /******/ }
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
- /******/ };
- /******/
- /******/ // create a fake namespace object
- /******/ // mode & 1: value is a module id, require it
- /******/ // mode & 2: merge all properties of value into the ns
- /******/ // mode & 4: return value when already ns object
- /******/ // mode & 8|1: behave like require
- /******/ __webpack_require__.t = function(value, mode) {
- /******/ if(mode & 1) value = __webpack_require__(value);
- /******/ if(mode & 8) return value;
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- /******/ var ns = Object.create(null);
- /******/ __webpack_require__.r(ns);
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- /******/ return ns;
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "/";
- /******/
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = 0);
- /******/ })
- /************************************************************************/
- /******/ ({
- /***/ 0:
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("f8a6");
- /***/ }),
- /***/ "022b":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/indicator/Indicator.vue?vue&type=template&id=39b17318&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-indicator",style:(_vm.getBackgroundStyle)},[_c('div',{class:("sm-component-indicator__content sm-component-indicator__content-" + _vm.mode)},[_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.showTitleUnit),expression:"showTitleUnit"}],staticClass:"sm-component-indicator__title",style:([_vm.unit_titleStyle, _vm.getTextColorStyle])},[_vm._v(_vm._s(_vm.titleData))]),_vm._v(" "),_c('div',[_c('span',{staticClass:"sm-component-indicator__num",style:(_vm.indicatorStyle)},[(_vm.isNumber(_vm.indicatorNum))?_c('countTo',{attrs:{"decimals":_vm.calDecimals,"startVal":_vm.startData,"endVal":_vm.numData,"duration":Number(_vm.duration) || 1000,"separator":_vm.separator,"numBackground":_vm.numBackground,"numSpacing":_vm.numSpacing,"separatorBackground":_vm.separatorBackground,"fontSize":parseFloat(_vm.fontSize) + _vm.fontUnit}}):_vm._e(),_vm._v("\n "+_vm._s(_vm.isNumber(_vm.indicatorNum) ? '' : _vm.indicatorNum)+"\n ")],1),_vm._v(" "),_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.showTitleUnit),expression:"showTitleUnit"}],staticClass:"sm-component-indicator__unit",style:([_vm.unit_titleStyle, _vm.getTextColorStyle])},[_vm._v(_vm._s(_vm.unitData))])])])])}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/indicator/Indicator.vue?vue&type=template&id=39b17318&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "0318":
- /***/ (function(module, exports, __webpack_require__) {
- /* eslint-disable node/no-deprecated-api */
- var buffer = __webpack_require__("3be6")
- var Buffer = buffer.Buffer
- // alternative to using Object.keys for old browsers
- function copyProps (src, dst) {
- for (var key in src) {
- dst[key] = src[key]
- }
- }
- if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
- module.exports = buffer
- } else {
- // Copy properties from require('buffer')
- copyProps(buffer, exports)
- exports.Buffer = SafeBuffer
- }
- function SafeBuffer (arg, encodingOrOffset, length) {
- return Buffer(arg, encodingOrOffset, length)
- }
- // Copy static methods from Buffer
- copyProps(Buffer, SafeBuffer)
- SafeBuffer.from = function (arg, encodingOrOffset, length) {
- if (typeof arg === 'number') {
- throw new TypeError('Argument must not be a number')
- }
- return Buffer(arg, encodingOrOffset, length)
- }
- SafeBuffer.alloc = function (size, fill, encoding) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- var buf = Buffer(size)
- if (fill !== undefined) {
- if (typeof encoding === 'string') {
- buf.fill(fill, encoding)
- } else {
- buf.fill(fill)
- }
- } else {
- buf.fill(0)
- }
- return buf
- }
- SafeBuffer.allocUnsafe = function (size) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- return Buffer(size)
- }
- SafeBuffer.allocUnsafeSlow = function (size) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- return buffer.SlowBuffer(size)
- }
- /***/ }),
- /***/ "05d2":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAFw1JREFUeAHt3U+rJOd1B+D+f1sj7OWQ1WgjSAhk4QS0NsGQD+CP4m2CMckqkI+iDxAwwWtB7EUgJKCNZhVmmUQzt/9V5ZzqrqvWydgJZ9fiqfGdqlPVp2/3I0P/eN+3epbvP3x4u/h/bO/evfvqYw/77M2bLz923jkCBAgQIEDg8QS+efv25x971a9fv/7iY+fruWUGi9Vy/fU4DovFcjUuF4txPl7czi3GxeLXv/ndL+PCOMRPPkke5P50PufORoAAAQIECPwABLabzfQulqtlRILFInbT9rOf/uRXizwzDsvIC9N+GfsIA8s8l8fDePl8ChbxiK+/+u2//93pdBqHacvdasgQMVzi8JYoDsfjNVTk+VuwyF96f5y1jQABAgQIEHg8gdUtTOQrz+Pc8vhpt4vcMP1vuVqvpkur1ZAH8bNabbfb5Rd//sd/PS7Gz+dYMt6HivNleRkukSgiQByPU9gYs8wTQ/65hYo8kb9wrvPYRoAAAQIECDymwBwsMjHkO8g6ssPycnlerjNQxIndbjtm5oiAMW5yvGIxLCJDrHLWYzFeFlOwiO6XkYprqBimXJEjFBkozlOqyFGKa6iY9pdxzOjxmHReNQECBAgQIPD7BCJDRHCI8JD7DBe5vyyHTaSLyACrHMHI3vNiFUHiGi4yS+TRFCwiMuSoQwSIHKkYhufDMYLFZTifr6HifL4OV5xOl1iIsVg8Pz9PgSIe8r19XrMRIECAAAECjykQuWEKDPN+v99P9XY7DVdEshjHzbCO+YzDar1eL/ZPu5dwkVkit5epkFxTkXMcOTgxh4pjJIkMFRkojsdjhI8hpkbOef0lUMTl6fgxCb1qAgQIECBA4F5gE+FiDhbxmR9TH5vV8bgadrvdlAOGTX7ub6eWyAyLXIcxLFdxcDcVEhMhsZJzmtoYcvojRyruQ0WOUMyBIkcpMkzE9Mh4OV8DRoQP4eL+v4pjAgQIECDwgAKbzXp5iNe9jn1Me8TPEOsrLmOMTixzCmSx2F+HJab3tl0clseYJ3mKXBGLPP/XiEWMVORCzRyxyDUV80jFHCriWpwfxkNMk2SQOMXP+XwWKB7w/zheMgECBAgQ+EMCm81muc1wET9PT7tVBozr459fwsW8/iLyQeaKOmIRazqnW0inkYiPhornCBaH5+MwB4oIHIvj6TpScToJGH/oP5BrBAgQIEDgEQS2280UIHbbWD+x348ZMHIw4Wm/i0Axb9dwMQeLmDaJtRSxbvM21LDJb9T8l3/9j3/IL7zK0YpYRjHd/ZFrKnL6I0cq5lDx4fkwzIEiw0SOcOSvmffzr7QnQIAAAQIEHk8gbiWdgsUp9jF4sJwDRn0nq9VxHQs6c2nmlB0iQyzzizT/7E//6Be3u0JifWesrZhDRS7WzISR8yrT9EeMVMyh4tv3h2nKZA4ThwgXh8M1YNRfrCZAgAABAgQeR+Dpabt8ylARn+0ZMjJgxKvP0YppbUWuu1hHNsiMkFkhpkqmb9PMDLFe76fBhilYTEMY2XX35VfXxZrXNRU5/ZEjFfehYg4Uz8/Xb+N8HDavlAABAgQIEPiYQH6m7/e7WFdxHbm4PSZDxSqmRaZ1lnnXSGaE/X6xngYkIjvEcs9pSUU+/nq7aRzE9MjLiEUu2JxHK3JuJRdp5nqKTDD585//9T6mRK6BIvfvPxxuMyv5lDYCBAgQIEDgEQVeffI0TYXMAePHP3o1ra2ItReZBRbn83qaychRi8wK83RIZoj5/V6nQqZ1FdeTQ3yj5nwxbymdRyvmNRU5UiFUzEL2BAgQIEDghyMwDxTkqEV+1sfIxZQJ8mu8I0jEXSIRMCIbPN3GJebMkCMXuVYzJV5GLLLIOZPc53dVTD9ltCKvzesp5pGK9x+u38KZ12wECBAgQIDAD0Mgw0V+5s9rLuZRi/wOqzkn5Duds8P8rjefvXnz5Ve//WauF7FscwoX05dgRfPLhTiYRytqqPj2W+Hi3skxAQIECBB4RIFPP93Hv3r+/c/0HLWY7xbJ9zQtkYgBiDyeM0Men2KqJDPFy4jFtADjNoyRSSQfNG8v0yC3uz/moZK8nqHiv+cH2hMgQIAAAQKPKxCf6Rku8g3kZ/13oxbTXSKZDaZreX3OCvf5Ic/ffeFFljYCBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX2Azt65Wy2X+ZL1er6b9fG273Sx3u+3y6Wm7fH4+jq8+eVq+/3AY8/qnn+6Xi2+fp+P58fYECBAgQIDA4wlMn+m3l52f9XmYn/2ZATIL3L+jOSvc54e8vvnm7dufbzebvz+dztPj1/GI6UKEi81m/b0neYon3u933zv3/sPzeP9CpifxFwECBAgQIPCQAq8+2S8zVOTnff7kZ//9G8lssLkNQMyZIa9HllhkpngZsciTq1uoyBQy/WTzJkYrtuvFKZ74eDyN86hFDRjZbyNAgAABAgQeW2AOFfku8jM/9zliEVlgygTryAZzTshrc3bI49ymNRbLu2mQ1fo6HZIXN+v1chtPsN/vFy/TIXejFhku5qGSfLyNAAECBAgQeFyB+1Axj1bM0yBTFphGK76bzZgzQ06HZJbId/4yYhGnpjUWmTyiOUYnzjHUMUzTIfejFtn04x+9WkWKGQ+H07S2wuhFqtgIECBAgMDjC0yBIkYqcgpkGqm4G62Yp0HWMfCQWSEzwxQqIkPM73wKFhk08kRcflnAudttVpfLJaY+dqvz+TLGE2SIyBGOIR+bW/7S+4BxPetvAgQIECBA4BEFcupjXlMxh4pPXz2t5tGKzAQ5DZIZId9fhorMDtPxLUtMwSKO44l2y8vleUof2+16dTyuhkwkOWrxtN/Nt6VmqFjFtMgYv3DMNRf5i59215GLfGIbAQIECBAg8JgC+Zmerzz30xKIWFeRoeKT/dMqs0Au2sxskCMVmRXmEYvMELllb9w2+uHtcrH+t3/8p3/+m+fnw3A4ns4xDXKJaY7L8/NzhIfzEAFieI6fw/NxOMXoxfl8HuPa4ni6TFMhcUeJ201T00aAAAECBB5YYL6lNBdqZqDIpRC51jJDxX63XUXgiJ9NjmDkjMU6jtcxwrHZR/D4q7/8i78dF5c/ua6xiIwxrbuIBBILNlfDZhyHYYiwsI8Riud5tGJazHk4HIfzeT3GL8uAMfNNKWUu7AkQIECAAIHHFZgDRa6pyOmPHKm4DxU5WhHX4vxt1CJHKzIJRHK4BotxWK7iWjRloFhthvU4bDJY5PZduFjHmot88vNlGM9xfInRi3xErsHIvY0AAQIECBB4XIEMEvnq85bSvDP0OvVxnf6YRyruQ0Xmipw2yQyxiCyRvbcRi9U0YpG5I+ZJxnE8xCjFNq/ftv2wWh3XOYqRUyMZMJ6i9TIFjCEWeM6PsydAgAABAgQeWWAOE/kecj1FBopcS7Hb7eKrJ64jFbs42MTpXFuR2WG6CWQZ0WG83I1YrIbVMC7HTB/xRDeT7fTFF9kSzzGeTpchplzWufYiH5DB4n5/a7IjQIAAAQIEHlAgMsB1xOK2z7UU+TYyUGQWmKc/MlREVsg7RPKmkFjMOXx/xCJO5S0jq01MjpzjjtL90y5Dw+KwPE63n8a1ZQxWxLqKWH8R+wwZw2UcL9M6jAeU85IJECBAgACB3ysw5YX4wswME5kB5n2uqcgwMY1UZNaIn816nB6eWSKSwXXEIoYdsinGMIY4cQ0X+dtilWfeUppf3RnfaRETIREqhvwT+7yeJ677a53HNgIECBAgQOAxBTJE5CvPIHHdR1zIP3E+s0Cen9ZUxGLN+1CRFzJLZM/L4s3tdrs8nU4v4WJYrpeRH8bbYEUmiuXheIy+dSSSvGvkuzBxf5xPaiNAgAABAgQeT2AOFvnK8zi3PJ6+pyLqPJWBYtrH9EccZKaI77eK77+4Ld6cvsci1nt+HVEhxy3GeIaMDdNxPOi2Xyx+/Zvf/XIKFPFX/pIIGtP+9N0tp3naRoAAAQIECDywQP4rpbllish9hojcfvbTn/zqektp3P0xLdQc4mxMf8RDM1Tk8TBePp+CRTb+X9u7d++++thjPnvz5suPnXeOAAECBAgQeDyB/KfPP/aqX79+/cXHztdz/wOOaWdXmTJgygAAAABJRU5ErkJggg=="
- /***/ }),
- /***/ "0640":
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("bbe9").PassThrough
- /***/ }),
- /***/ "089f":
- /***/ (function(module, exports) {
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = objectProto.toString;
- /**
- * Converts `value` to a string using `Object.prototype.toString`.
- *
- * @private
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- */
- function objectToString(value) {
- return nativeObjectToString.call(value);
- }
- module.exports = objectToString;
- /***/ }),
- /***/ "08d1":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Indicator_vue_vue_type_template_id_39b17318___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("022b");
- /* harmony import */ var _Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("13f5");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _Indicator_vue_vue_type_template_id_39b17318___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _Indicator_vue_vue_type_template_id_39b17318___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "0956":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- var R = typeof Reflect === 'object' ? Reflect : null
- var ReflectApply = R && typeof R.apply === 'function'
- ? R.apply
- : function ReflectApply(target, receiver, args) {
- return Function.prototype.apply.call(target, receiver, args);
- }
- var ReflectOwnKeys
- if (R && typeof R.ownKeys === 'function') {
- ReflectOwnKeys = R.ownKeys
- } else if (Object.getOwnPropertySymbols) {
- ReflectOwnKeys = function ReflectOwnKeys(target) {
- return Object.getOwnPropertyNames(target)
- .concat(Object.getOwnPropertySymbols(target));
- };
- } else {
- ReflectOwnKeys = function ReflectOwnKeys(target) {
- return Object.getOwnPropertyNames(target);
- };
- }
- function ProcessEmitWarning(warning) {
- if (console && console.warn) console.warn(warning);
- }
- var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
- return value !== value;
- }
- function EventEmitter() {
- EventEmitter.init.call(this);
- }
- module.exports = EventEmitter;
- // Backwards-compat with node 0.10.x
- EventEmitter.EventEmitter = EventEmitter;
- EventEmitter.prototype._events = undefined;
- EventEmitter.prototype._eventsCount = 0;
- EventEmitter.prototype._maxListeners = undefined;
- // By default EventEmitters will print a warning if more than 10 listeners are
- // added to it. This is a useful default which helps finding memory leaks.
- var defaultMaxListeners = 10;
- Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
- enumerable: true,
- get: function() {
- return defaultMaxListeners;
- },
- set: function(arg) {
- if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
- throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
- }
- defaultMaxListeners = arg;
- }
- });
- EventEmitter.init = function() {
- if (this._events === undefined ||
- this._events === Object.getPrototypeOf(this)._events) {
- this._events = Object.create(null);
- this._eventsCount = 0;
- }
- this._maxListeners = this._maxListeners || undefined;
- };
- // Obviously not all Emitters should be limited to 10. This function allows
- // that to be increased. Set to zero for unlimited.
- EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
- if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
- throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
- }
- this._maxListeners = n;
- return this;
- };
- function $getMaxListeners(that) {
- if (that._maxListeners === undefined)
- return EventEmitter.defaultMaxListeners;
- return that._maxListeners;
- }
- EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
- return $getMaxListeners(this);
- };
- EventEmitter.prototype.emit = function emit(type) {
- var args = [];
- for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
- var doError = (type === 'error');
- var events = this._events;
- if (events !== undefined)
- doError = (doError && events.error === undefined);
- else if (!doError)
- return false;
- // If there is no 'error' event listener then throw.
- if (doError) {
- var er;
- if (args.length > 0)
- er = args[0];
- if (er instanceof Error) {
- // Note: The comments on the `throw` lines are intentional, they show
- // up in Node's output if this results in an unhandled exception.
- throw er; // Unhandled 'error' event
- }
- // At least give some kind of context to the user
- var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
- err.context = er;
- throw err; // Unhandled 'error' event
- }
- var handler = events[type];
- if (handler === undefined)
- return false;
- if (typeof handler === 'function') {
- ReflectApply(handler, this, args);
- } else {
- var len = handler.length;
- var listeners = arrayClone(handler, len);
- for (var i = 0; i < len; ++i)
- ReflectApply(listeners[i], this, args);
- }
- return true;
- };
- function _addListener(target, type, listener, prepend) {
- var m;
- var events;
- var existing;
- if (typeof listener !== 'function') {
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
- }
- events = target._events;
- if (events === undefined) {
- events = target._events = Object.create(null);
- target._eventsCount = 0;
- } else {
- // To avoid recursion in the case that type === "newListener"! Before
- // adding it to the listeners, first emit "newListener".
- if (events.newListener !== undefined) {
- target.emit('newListener', type,
- listener.listener ? listener.listener : listener);
- // Re-assign `events` because a newListener handler could have caused the
- // this._events to be assigned to a new object
- events = target._events;
- }
- existing = events[type];
- }
- if (existing === undefined) {
- // Optimize the case of one listener. Don't need the extra array object.
- existing = events[type] = listener;
- ++target._eventsCount;
- } else {
- if (typeof existing === 'function') {
- // Adding the second element, need to change to array.
- existing = events[type] =
- prepend ? [listener, existing] : [existing, listener];
- // If we've already got an array, just append.
- } else if (prepend) {
- existing.unshift(listener);
- } else {
- existing.push(listener);
- }
- // Check for listener leak
- m = $getMaxListeners(target);
- if (m > 0 && existing.length > m && !existing.warned) {
- existing.warned = true;
- // No error code for this since it is a Warning
- // eslint-disable-next-line no-restricted-syntax
- var w = new Error('Possible EventEmitter memory leak detected. ' +
- existing.length + ' ' + String(type) + ' listeners ' +
- 'added. Use emitter.setMaxListeners() to ' +
- 'increase limit');
- w.name = 'MaxListenersExceededWarning';
- w.emitter = target;
- w.type = type;
- w.count = existing.length;
- ProcessEmitWarning(w);
- }
- }
- return target;
- }
- EventEmitter.prototype.addListener = function addListener(type, listener) {
- return _addListener(this, type, listener, false);
- };
- EventEmitter.prototype.on = EventEmitter.prototype.addListener;
- EventEmitter.prototype.prependListener =
- function prependListener(type, listener) {
- return _addListener(this, type, listener, true);
- };
- function onceWrapper() {
- var args = [];
- for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);
- if (!this.fired) {
- this.target.removeListener(this.type, this.wrapFn);
- this.fired = true;
- ReflectApply(this.listener, this.target, args);
- }
- }
- function _onceWrap(target, type, listener) {
- var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
- var wrapped = onceWrapper.bind(state);
- wrapped.listener = listener;
- state.wrapFn = wrapped;
- return wrapped;
- }
- EventEmitter.prototype.once = function once(type, listener) {
- if (typeof listener !== 'function') {
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
- }
- this.on(type, _onceWrap(this, type, listener));
- return this;
- };
- EventEmitter.prototype.prependOnceListener =
- function prependOnceListener(type, listener) {
- if (typeof listener !== 'function') {
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
- }
- this.prependListener(type, _onceWrap(this, type, listener));
- return this;
- };
- // Emits a 'removeListener' event if and only if the listener was removed.
- EventEmitter.prototype.removeListener =
- function removeListener(type, listener) {
- var list, events, position, i, originalListener;
- if (typeof listener !== 'function') {
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
- }
- events = this._events;
- if (events === undefined)
- return this;
- list = events[type];
- if (list === undefined)
- return this;
- if (list === listener || list.listener === listener) {
- if (--this._eventsCount === 0)
- this._events = Object.create(null);
- else {
- delete events[type];
- if (events.removeListener)
- this.emit('removeListener', type, list.listener || listener);
- }
- } else if (typeof list !== 'function') {
- position = -1;
- for (i = list.length - 1; i >= 0; i--) {
- if (list[i] === listener || list[i].listener === listener) {
- originalListener = list[i].listener;
- position = i;
- break;
- }
- }
- if (position < 0)
- return this;
- if (position === 0)
- list.shift();
- else {
- spliceOne(list, position);
- }
- if (list.length === 1)
- events[type] = list[0];
- if (events.removeListener !== undefined)
- this.emit('removeListener', type, originalListener || listener);
- }
- return this;
- };
- EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
- EventEmitter.prototype.removeAllListeners =
- function removeAllListeners(type) {
- var listeners, events, i;
- events = this._events;
- if (events === undefined)
- return this;
- // not listening for removeListener, no need to emit
- if (events.removeListener === undefined) {
- if (arguments.length === 0) {
- this._events = Object.create(null);
- this._eventsCount = 0;
- } else if (events[type] !== undefined) {
- if (--this._eventsCount === 0)
- this._events = Object.create(null);
- else
- delete events[type];
- }
- return this;
- }
- // emit removeListener for all listeners on all events
- if (arguments.length === 0) {
- var keys = Object.keys(events);
- var key;
- for (i = 0; i < keys.length; ++i) {
- key = keys[i];
- if (key === 'removeListener') continue;
- this.removeAllListeners(key);
- }
- this.removeAllListeners('removeListener');
- this._events = Object.create(null);
- this._eventsCount = 0;
- return this;
- }
- listeners = events[type];
- if (typeof listeners === 'function') {
- this.removeListener(type, listeners);
- } else if (listeners !== undefined) {
- // LIFO order
- for (i = listeners.length - 1; i >= 0; i--) {
- this.removeListener(type, listeners[i]);
- }
- }
- return this;
- };
- function _listeners(target, type, unwrap) {
- var events = target._events;
- if (events === undefined)
- return [];
- var evlistener = events[type];
- if (evlistener === undefined)
- return [];
- if (typeof evlistener === 'function')
- return unwrap ? [evlistener.listener || evlistener] : [evlistener];
- return unwrap ?
- unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
- }
- EventEmitter.prototype.listeners = function listeners(type) {
- return _listeners(this, type, true);
- };
- EventEmitter.prototype.rawListeners = function rawListeners(type) {
- return _listeners(this, type, false);
- };
- EventEmitter.listenerCount = function(emitter, type) {
- if (typeof emitter.listenerCount === 'function') {
- return emitter.listenerCount(type);
- } else {
- return listenerCount.call(emitter, type);
- }
- };
- EventEmitter.prototype.listenerCount = listenerCount;
- function listenerCount(type) {
- var events = this._events;
- if (events !== undefined) {
- var evlistener = events[type];
- if (typeof evlistener === 'function') {
- return 1;
- } else if (evlistener !== undefined) {
- return evlistener.length;
- }
- }
- return 0;
- }
- EventEmitter.prototype.eventNames = function eventNames() {
- return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
- };
- function arrayClone(arr, n) {
- var copy = new Array(n);
- for (var i = 0; i < n; ++i)
- copy[i] = arr[i];
- return copy;
- }
- function spliceOne(list, index) {
- for (; index + 1 < list.length; index++)
- list[index] = list[index + 1];
- list.pop();
- }
- function unwrapListeners(arr) {
- var ret = new Array(arr.length);
- for (var i = 0; i < ret.length; ++i) {
- ret[i] = arr[i].listener || arr[i];
- }
- return ret;
- }
- /***/ }),
- /***/ "0b0f":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _TimeText_vue_vue_type_template_id_6da009bc___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("827d");
- /* harmony import */ var _TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("d5f4");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _TimeText_vue_vue_type_template_id_6da009bc___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _TimeText_vue_vue_type_template_id_6da009bc___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "0b11":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/chart/ChartMixin.vue?vue&type=template&id=1f1efe10&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('sm-card',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"}],staticClass:"sm-component-chart",attrs:{"icon-class":_vm.iconClass,"icon-position":_vm.position,"header-name":_vm.headerName,"auto-rotate":_vm.autoRotate,"collapsed":_vm.collapsed}},[_c('v-chart',{ref:_vm.chartId,style:(_vm._chartStyle),attrs:{"id":_vm.chartId,"options":_vm._chartOptions,"initOptions":_vm.initOptions,"group":_vm.group,"manual-update":_vm.manualUpdate,"theme":_vm.theme || _vm.chartTheme},on:{"datazoom":_vm.dataZoomHandler}}),_vm._v(" "),_c('TablePopup',_vm._b({directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"chartTablePopup",attrs:{"text-color":_vm.textColor,"background":_vm.background}},'TablePopup',_vm.tablePopupProps,false))],1)}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/chart/ChartMixin.vue?vue&type=template&id=1f1efe10&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "0e27":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _default = {
- props: {
- content: {
- type: String,
- default: '',
- custom: true
- }
- },
- data: function data() {
- return {
- isMap: false
- };
- },
- mounted: function mounted() {
- this.popperOptions = {};
- },
- render: function render(h) {
- if (this.$slots.default) {
- // 如果是其他bindpopup的layer,不要绑定style
- var style = this.isMap ? {
- style: {
- display: 'none'
- }
- } : {};
- return h('div', style, this.$slots.default);
- }
- return null;
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "0f9e":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("4066"));
- var _defineProperty2 = _interopRequireDefault(__webpack_require__("279f"));
- __webpack_require__("f840");
- var _vueEcharts = _interopRequireDefault(__webpack_require__("8275"));
- var _lodash = _interopRequireDefault(__webpack_require__("f344"));
- var _lodash2 = _interopRequireDefault(__webpack_require__("6e63"));
- var _lodash3 = _interopRequireDefault(__webpack_require__("5f9f"));
- var _debounce = _interopRequireDefault(__webpack_require__("331f"));
- var _lodash4 = _interopRequireDefault(__webpack_require__("25a2"));
- var _card = _interopRequireDefault(__webpack_require__("333c"));
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- var _timer = _interopRequireDefault(__webpack_require__("8156"));
- var _chart = __webpack_require__("33aa");
- var _EchartsDataService = _interopRequireDefault(__webpack_require__("50c6"));
- var _TablePopup = _interopRequireDefault(__webpack_require__("b397"));
- var _util = __webpack_require__("1448");
- var _resizeDetector = __webpack_require__("e0f2");
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
- // 枚举事件类型
- var EVENTS = ['legendselectchanged', 'legendselected', 'legendunselected', 'legendscroll', 'datazoom', 'datarangeselected', 'timelinechanged', 'timelineplaychanged', 'restore', 'dataviewchanged', 'magictypechanged', 'geoselectchanged', 'geoselected', 'geounselected', 'pieselectchanged', 'pieselected', 'pieunselected', 'mapselectchanged', 'mapselected', 'mapunselected', 'axisareaselected', 'focusnodeadjacency', 'unfocusnodeadjacency', 'brush', 'brushselected', 'rendered', 'finished', 'click', 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'mouseup', 'globalout', 'contextmenu'];
- var _default2 = {
- components: {
- 'v-chart': _vueEcharts.default,
- TablePopup: _TablePopup.default
- },
- mixins: [_theme.default, _card.default, _timer.default],
- props: {
- iconClass: {
- type: String,
- default: 'sm-components-icons-attribute'
- },
- dataset: {
- type: Object,
- default: function _default() {
- return null;
- }
- },
- datasetOptions: {
- type: Array,
- default: function _default() {
- return null;
- }
- },
- colorGroup: {
- type: Array
- },
- options: {
- type: Object,
- default: function _default() {
- return {};
- }
- },
- autoresize: {
- type: Boolean,
- default: true
- },
- theme: {
- type: [Object, String]
- },
- initOptions: {
- type: Object
- },
- group: {
- type: String
- },
- manualUpdate: {
- type: Boolean,
- default: false
- },
- autoPlay: {
- type: Boolean,
- default: false
- },
- associatedMap: {
- type: Boolean,
- default: false
- },
- highlightOptions: {
- type: Array,
- default: function _default() {
- return [];
- }
- },
- highlightColor: {
- type: String,
- default: '#01ffff'
- }
- },
- data: function data() {
- return {
- chartId: (0, _lodash.default)("".concat(this.$options.name.toLowerCase(), "-")),
- chartTheme: {},
- // 图表的主题
- echartOptions: {},
- // 最后生成的echart数据
- datasetChange: false,
- // dataset是否改变
- dataSeriesCache: {},
- tablePopupProps: {},
- startSpin: null,
- customSeries: [],
- dataZoomHandler: function dataZoomHandler() {}
- };
- },
- computed: {
- width: function width() {
- return this.smChart && this.smChart.width;
- },
- height: function height() {
- return this.smChart && this.smChart.height;
- },
- computedOptions: function computedOptions() {
- return this.smChart && this.smChart.computedOptions;
- },
- _chartStyle: function _chartStyle() {
- return {
- width: '100%',
- height: this.headerName ? 'calc(100% - 30px)' : '100%'
- };
- },
- parseOptions: function parseOptions() {
- var _this2 = this;
- if (!this.options.series) {
- return this.options;
- }
- if (this.options.series.find(function (item) {
- return item.type === '2.5Bar';
- })) {
- return _objectSpread({}, this.options, {
- series: []
- });
- }
- if (this.options.series[0] && this.options.series[0].customType === 'customRingsSeries') {
- return _objectSpread({}, this.options, {
- series: [].concat((0, _toConsumableArray2.default)(this.options.series), (0, _toConsumableArray2.default)(this.customSeries))
- });
- }
- var series = this.options.series.map(function (serie, index) {
- if (serie.label) {
- var cloneSerie = (0, _lodash4.default)(serie);
- cloneSerie.label.normal = _this2._controlLabel(cloneSerie.label.normal, cloneSerie.maxLabels);
- return cloneSerie;
- }
- return serie;
- });
- return _objectSpread({}, this.options, {
- series: series
- });
- },
- _chartOptions: function _chartOptions() {
- return this._isRequestData && this.echartOptions || this.parseOptions;
- },
- // 是否传入dataset和datasetOptions
- _isRequestData: function _isRequestData() {
- return this.dataset && Object.keys(this.dataset).length > 0 && (this.dataset.url || this.dataset.geoJSON) && this.datasetOptions && this.datasetOptions.length > 0;
- },
- xBar: function xBar() {
- return this.options && this.options.yAxis && this.options.yAxis.type === 'category';
- },
- popupBackground: function popupBackground() {
- return this.backgroundData ? (0, _util.getColorWithOpacity)(this.backgroundData, 0.5) : this.backgroundData;
- },
- colorNumber: function colorNumber() {
- var length = this.datasetOptions && this.datasetOptions.length || this.echartOptions.series && this.echartOptions.series.length;
- var colorNumber = this.colorGroupsData.length;
- if (length && length > colorNumber) {
- colorNumber = length;
- }
- return colorNumber;
- }
- },
- watch: {
- theme: function theme() {
- this.chartTheme = null;
- },
- colorGroupsData: function colorGroupsData(newVal, oldVal) {
- if (!(0, _lodash3.default)(newVal, oldVal)) {
- this._setChartTheme();
- }
- },
- textColorsData: function textColorsData(newVal, oldVal) {
- if (!(0, _lodash3.default)(newVal, oldVal)) {
- this._setChartTheme();
- }
- },
- backgroundData: function backgroundData(newVal, oldVal) {
- if (!(0, _lodash3.default)(newVal, oldVal)) {
- this._setChartTheme();
- this.changePopupArrowStyle();
- }
- },
- dataset: {
- handler: function handler(newVal, oldVal) {
- this._isRequestData && this._setEchartOptions(this.dataset, this.datasetOptions, this.options);
- this.datasetChange = true;
- },
- deep: true
- },
- datasetOptions: {
- handler: function handler(newVal, oldVal) {
- if (!(0, _lodash3.default)(newVal, oldVal)) {
- this._setChartTheme();
- this.registerShape();
- }
- !this.echartsDataService && this._isRequestData && this._setEchartOptions(this.dataset, this.datasetOptions, this.options);
- this.echartsDataService && this.echartsDataService.setDatasetOptions(this.datasetOptions);
- this.echartsDataService && this.dataSeriesCache && this._changeChartData(this.echartsDataService, this.datasetOptions, this.options);
- }
- },
- options: {
- handler: function handler(newVal, oldVal) {
- if (this.datasetChange && !this.dataSeriesCache) {
- return;
- }
- if (this.dataSeriesCache && JSON.stringify(this.dataSeriesCache) !== '{}') {
- this.echartOptions = this._optionsHandler(this.options, this.dataSeriesCache);
- } else {
- this.echartOptions = Object.assign({}, this.options);
- }
- },
- deep: true
- },
- autoresize: function autoresize() {
- if (this.autoresize) {
- (0, _resizeDetector.addListener)(this.$el, this.__resizeHandler);
- } else {
- (0, _resizeDetector.removeListener)(this.$el, this.__resizeHandler);
- }
- },
- // 以下为echart的配置参数
- width: function width() {
- return this.smChart && this.smChart.width;
- },
- height: function height() {
- return this.smChart && this.smChart.height;
- },
- computedOptions: function computedOptions() {
- return this.smChart && this.smChart.computedOptions;
- },
- autoPlay: function autoPlay() {
- this._handlePieAutoPlay();
- },
- associatedMap: function associatedMap() {
- if (!this.associatedMap) {
- this.clearPopup && this.clearPopup();
- }
- },
- highlightOptions: {
- handler: function handler(newVal, oldVal) {
- this.setItemStyleColor();
- },
- deep: true
- }
- },
- created: function created() {
- this._setChartTheme(); // // 切换主题
- // this.$on('theme-style-changed', () => {
- // this._setChartTheme();
- // });
- this.registerShape();
- },
- mounted: function mounted() {
- // 设置echarts实例
- this.smChart = this.$refs[this.chartId]; // 派发echart所有事件
- var smChart = this._getEchart();
- var self = this;
- EVENTS.forEach(function (event) {
- smChart.$on(event, function (params) {
- if (event === 'click') {
- self.handleChartClick(params);
- }
- self.$emit(event, params);
- });
- });
- this._initAutoResize();
- this._initDataZoom();
- if (this.options.series && this.options.series[0] && this.options.series[0].customType === 'customRingsSeries') {
- this.startEffect();
- }
- !this._isRequestData && this.autoPlay && this._handlePieAutoPlay(); // 请求数据, 合并echartopiton, 设置echartOptions
- this._isRequestData && this._setEchartOptions(this.dataset, this.datasetOptions, this.options);
- },
- updated: function updated() {
- this._handlePieAutoPlay(); // 更新自动播放
- },
- beforeDestroy: function beforeDestroy() {
- clearInterval(this.pieAutoPlay); // clear 自动播放
- clearInterval(this.startAngle);
- if (this.autoresize) {
- (0, _resizeDetector.removeListener)(this.$el, this.__resizeHandler);
- }
- },
- methods: {
- _initAutoResize: function _initAutoResize() {
- var _this3 = this;
- this.__resizeHandler = (0, _debounce.default)(function () {
- _this3.resize();
- }, 100, {
- leading: true
- });
- if (this.autoresize) {
- // @ts-ignore
- (0, _resizeDetector.addListener)(this.$el, this.__resizeHandler);
- }
- },
- _initDataZoom: function _initDataZoom() {
- var _this4 = this;
- this.dataZoomHandler = (0, _debounce.default)(function () {
- _this4._dataZoomChanged();
- }, 500, {
- leading: true
- });
- },
- getStringColor: function getStringColor(color) {
- if (color instanceof Object) {
- return ((color.colorStops || [])[0] || {}).color;
- }
- return color;
- },
- setGradientColor: function setGradientColor(color, nextColor) {
- if (typeof color === 'string') {
- return new this.$options.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: color
- }, {
- offset: 1,
- color: nextColor || color
- }]);
- }
- return color;
- },
- _initAxisLabel: function _initAxisLabel(axisLabel, data, visualMap, series) {
- if (!this.xBar) {
- return;
- }
- var sortSeriesIndex = this.datasetOptions.findIndex(function (item) {
- return item.sort !== 'unsort' && item.rankLabel;
- });
- if (sortSeriesIndex > -1 && axisLabel && data) {
- for (var index = 0, len = data.length, rankIndex = len - 1; index < len; index++, rankIndex--) {
- data[index] = rankIndex < 10 ? "0".concat(rankIndex).concat(data[index]) : "".concat(rankIndex).concat(data[index]);
- }
- var firstVisualMap = visualMap && visualMap.find(function (item) {
- return item.seriesIndex === sortSeriesIndex;
- });
- axisLabel.rich = axisLabel.rich || {};
- axisLabel.rich.default = {
- backgroundColor: this.getStringColor(this.colorGroup[sortSeriesIndex]),
- width: 20,
- height: 20,
- align: 'center',
- borderRadius: 2
- };
- firstVisualMap && firstVisualMap.pieces.map(function (item) {
- axisLabel.rich["".concat(parseInt(item.min), "_").concat(parseInt(item.max))] = {
- backgroundColor: item.color,
- width: 20,
- height: 20,
- align: 'center',
- borderRadius: 2
- };
- });
- var serieData = series && series[sortSeriesIndex].data;
- axisLabel.formatter = function (label, index) {
- var orderNum = parseInt(label.slice(0, 2)) + 1;
- var leftLabel = label.slice(2);
- var labelValue = serieData && +serieData[index];
- if (firstVisualMap) {
- var matchItem = firstVisualMap.pieces.find(function (item) {
- return labelValue >= item.min && labelValue <= item.max;
- });
- if (matchItem) {
- return ["{".concat(parseInt(matchItem.min), "_").concat(parseInt(matchItem.max), "|").concat(orderNum, "} ").concat(leftLabel)].join('\n');
- }
- }
- return ["{default|".concat(orderNum, "} ").concat(leftLabel)].join('\n');
- };
- }
- },
- setItemStyleColor: function setItemStyleColor() {
- var _this5 = this;
- var isSet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
- var series = arguments.length > 1 ? arguments[1] : undefined;
- var highlightOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.highlightOptions;
- var color = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.highlightColor;
- series = series || (0, _lodash4.default)(this.echartOptions && this.echartOptions.series) || [];
- series.forEach(function (serie, seriesIndex) {
- var dataIndexs = highlightOptions.map(function (item) {
- if (item.seriesIndex.includes(seriesIndex)) {
- return item.dataIndex;
- }
- });
- var colors = highlightOptions.map(function (item) {
- if (item.seriesIndex.includes(seriesIndex)) {
- return item.color || color;
- }
- });
- var serieColor = _this5.options.series && _this5.options.series[seriesIndex] && _this5.options.series[seriesIndex].itemStyle && _this5.options.series[seriesIndex].itemStyle.color;
- serie.itemStyle = serie.itemStyle || {
- color: ''
- };
- serie.itemStyle.color = function (_ref) {
- var dataIndex = _ref.dataIndex;
- var index = dataIndexs.indexOf(dataIndex);
- if (index > -1) {
- return colors[index];
- } else if (serie.type === 'pie') {
- var colorGroup = _this5._handlerColorGroup(serie.data.length);
- return colorGroup[dataIndex];
- } else {
- return serieColor;
- }
- };
- });
- isSet && this.$set(this.echartOptions, 'series', series);
- },
- _handlePieAutoPlay: function _handlePieAutoPlay() {
- var seriesType = this._chartOptions.series && this._chartOptions.series[0] && this._chartOptions.series[0].type;
- var echartsNode = this.smChart.chart;
- if (this._chartOptions.legend && this._chartOptions.legend.data && this._chartOptions.legend.data.length && echartsNode && seriesType === 'pie') {
- this.clearPieAutoPlay(echartsNode);
- if (this.autoPlay) {
- this.setPieAutoPlay(echartsNode);
- }
- }
- },
- setPieAutoPlay: function setPieAutoPlay(echartsNode) {
- var _this6 = this;
- var i = -1;
- this.pieAutoPlay = setInterval(function () {
- echartsNode.dispatchAction({
- type: 'downplay',
- seriesIndex: 0,
- dataIndex: i
- });
- i++;
- if (i >= _this6._chartOptions.legend.data.length) {
- i = 0;
- }
- echartsNode.dispatchAction({
- type: 'highlight',
- seriesIndex: 0,
- dataIndex: i
- });
- }, 2000);
- },
- clearPieAutoPlay: function clearPieAutoPlay(echartsNode) {
- clearInterval(this.pieAutoPlay);
- for (var i = 0; i < this._chartOptions.legend.data.length; i++) {
- echartsNode.dispatchAction({
- type: 'downplay',
- seriesIndex: 0,
- dataIndex: i
- });
- }
- },
- timing: function timing() {
- var _this7 = this;
- this.echartsDataService && this.echartsDataService.getDataOption(this.dataset, this.xBar).then(function (options) {
- _this7.hideLoading(); // 缓存dataSeriesCache,请求后格式化成echart的数据
- _this7.dataSeriesCache = Object.assign({}, options);
- _this7.datasetChange = false; // 设置echartOptions
- _this7.echartOptions = _this7._optionsHandler(_this7.options, options);
- });
- },
- // 请求数据,设置echartOptions
- _setEchartOptions: function _setEchartOptions(dataset, datasetOptions, echartOptions) {
- var _this8 = this;
- this.echartsDataService = null;
- this.dataSeriesCache = null;
- if (this.dataset.type !== 'geoJSON') {
- this.showLoading('default', {
- text: this.$t('info.loading'),
- color: this.colorGroupsData[0],
- textColor: this.textColorsData,
- maskColor: 'rgba(0,0,0,0.8)',
- zlevel: 0
- });
- }
- this.echartsDataService = new _EchartsDataService.default(dataset, datasetOptions);
- this.echartsDataService.getDataOption(dataset, this.xBar).then(function (options) {
- _this8.hideLoading(); // 缓存dataSeriesCache,请求后格式化成echart的数据
- _this8.dataSeriesCache = Object.assign({}, options);
- _this8.datasetChange = false; // 设置echartOptions
- _this8.echartOptions = _this8._optionsHandler(echartOptions, options);
- });
- },
- _optionsHandler: function _optionsHandler(options, dataOptions, dataZoomChanged) {
- var _this9 = this;
- dataOptions = dataOptions && (0, _lodash4.default)(dataOptions); // clone 避免引起重复刷新
- options = options && (0, _lodash4.default)(options); // clone 避免引起重复刷新
- var extraSeries = [];
- if (options && options.legend && !options.legend.type) {
- options.legend.type = 'scroll';
- }
- var yAxis = options.yAxis;
- var xAxis = options.xAxis;
- if (xAxis && dataOptions.xAxis) {
- var axis = xAxis;
- var axisData = dataOptions.xAxis[0];
- var type = 'xAxis';
- if (yAxis && yAxis.type === 'category') {
- // 处理条形图
- type = 'yAxis';
- axis = yAxis;
- dataOptions.yAxis = dataOptions.xAxis;
- delete dataOptions.xAxis;
- this._initAxisLabel(yAxis.axisLabel, dataOptions.yAxis[0].data, options.visualMap, dataOptions.series);
- }
- if (dataOptions.series.length === 0) {
- axis = [{}];
- } else if (!Array.isArray(axis)) {
- if (axisData.data && axisData.data.length) {
- axis.data = [];
- }
- axis = [Object.assign({}, axisData, axis)];
- }
- options[type] = axis;
- }
- if (options && options.series && dataOptions.series) {
- if (dataOptions.series.length === 0) {
- options.series = [];
- } else {
- options.series = options.series.map(function (element, index) {
- return Object.assign({}, element, dataOptions.series[index] || {});
- });
- var dataZoom = options.dataZoom && options.dataZoom[0];
- options.series = options.series.map(function (serie, index) {
- var label = serie.label && serie.label.normal;
- if (serie.label) {
- serie.label.normal = _this9._controlLabel(label, serie.maxLabels);
- }
- if (label && label.show && label.smart) {
- label.position = label.position || 'top';
- var data = serie.data;
- var startDataIndex = 0;
- var endDataIndex = data.length - 1;
- if (dataZoom && dataZoom.show !== false) {
- if (dataZoom.start > dataZoom.end) {
- var oldStart = dataZoom.start;
- dataZoom.start = dataZoom.end;
- dataZoom.end = oldStart;
- }
- if (dataZoomChanged) {
- var _ref2 = _this9.smChart.chart.getOption().dataZoom[0] || {},
- startValue = _ref2.startValue,
- endValue = _ref2.endValue;
- startDataIndex = startValue;
- endDataIndex = endValue;
- options.dataZoom = options.dataZoom.map(function (val) {
- if (startValue >= 0 && endValue >= 0) {
- val.startValue = startValue;
- val.endValue = endValue;
- delete val.start;
- delete val.end;
- return val;
- }
- return val;
- });
- } else {
- startDataIndex = Math.floor(dataZoom.start / 100 * data.length);
- endDataIndex = Math.ceil(dataZoom.end / 100 * data.length);
- }
- data = serie.data.slice(startDataIndex, endDataIndex + 1);
- }
- label.formatter = function (_ref3) {
- var dataIndex = _ref3.dataIndex,
- value = _ref3.value;
- var result = '';
- if (dataIndex === startDataIndex || dataIndex === endDataIndex || Math.max.apply(null, data) + '' === value + '') {
- result = value;
- }
- return result;
- };
- } else if (serie && serie.type !== 'pie' && serie.type !== 'radar') {
- var colorGroup = (0, _chart.getMultiColorGroup)(_this9.colorGroupsData, _this9.colorNumber);
- if (serie.type === '2.5Bar') {
- var shape = serie.shape;
- var defaultColor = serie.itemStyle && serie.itemStyle.color;
- if (['square', 'rectangle'].includes(shape)) {
- var cubeType = shape;
- serie.type = 'custom';
- dataOptions.series[index] && (dataOptions.series[index].type = 'custom');
- var _this = _this9;
- serie.renderItem = function (params, api) {
- var location = api.coord([api.value(0), api.value(1)]);
- var fillColor = defaultColor || colorGroup[params.seriesIndex];
- if (_this.highlightOptions) {
- var matchData = _this.highlightOptions.find(function (item) {
- return item.seriesIndex.includes(params.seriesIndex) && item.dataIndex === params.dataIndex;
- });
- if (matchData && (matchData.color || _this.highlightColor)) {
- fillColor = matchData.color || _this.highlightColor;
- }
- }
- var leftColor, rightColor, topColor;
- if ((0, _typeof2.default)(fillColor) === 'object') {
- var copyLeftColor = (0, _lodash4.default)(fillColor);
- var copyRightColor = (0, _lodash4.default)(fillColor);
- var copyTopColor = (0, _lodash4.default)(fillColor);
- copyLeftColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyLeftColor.colorStops[0].color, 0.4);
- copyLeftColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyLeftColor.colorStops[1].color, 0.4);
- copyRightColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyRightColor.colorStops[0].color, 0.7);
- copyRightColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyRightColor.colorStops[1].color, 0.7);
- copyTopColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyTopColor.colorStops[0].color, 0.85);
- copyTopColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyTopColor.colorStops[1].color, 0.85);
- leftColor = copyLeftColor;
- rightColor = copyRightColor;
- topColor = copyTopColor;
- } else {
- leftColor = (0, _util.getColorWithOpacity)(fillColor, 0.4);
- rightColor = (0, _util.getColorWithOpacity)(fillColor, 0.7);
- topColor = (0, _util.getColorWithOpacity)(fillColor, 0.85);
- }
- return {
- type: 'group',
- children: [{
- type: "Cube".concat(cubeType, "Left"),
- shape: {
- api: api,
- xValue: api.value(0),
- yValue: api.value(1),
- x: location[0],
- y: location[1],
- xAxisPoint: api.coord([api.value(0), 0])
- },
- style: {
- fill: leftColor
- }
- }, {
- type: "Cube".concat(cubeType, "Right"),
- shape: {
- api: api,
- xValue: api.value(0),
- yValue: api.value(1),
- x: location[0],
- y: location[1],
- xAxisPoint: api.coord([api.value(0), 0])
- },
- style: {
- fill: rightColor
- }
- }, {
- type: "Cube".concat(cubeType, "Top"),
- shape: {
- api: api,
- xValue: api.value(0),
- yValue: api.value(1),
- x: location[0],
- y: location[1],
- xAxisPoint: api.coord([api.value(0), 0])
- },
- style: {
- fill: topColor
- }
- }]
- };
- };
- } else if (shape === 'cylinder') {
- var baseWidth = '100%';
- var nextSerieDatas = dataOptions.series[index + 1] && dataOptions.series[index + 1].data;
- serie.type = 'bar';
- serie.barGap = '-100%';
- options.tooltip.trigger === 'axis' && (options.tooltip.trigger = 'item');
- dataOptions.series[index] && (dataOptions.series[index].type = 'bar');
- var cirCleColor = defaultColor || colorGroup[index];
- if (typeof cirCleColor === 'string') {
- cirCleColor = _this9.setGradientColor(cirCleColor, '#fff');
- }
- extraSeries.push( // 头部的圆片
- {
- name: '',
- type: 'pictorialBar',
- symbolOffset: [0, -8],
- symbolPosition: 'end',
- z: 12,
- itemStyle: {
- normal: {
- color: cirCleColor
- }
- },
- data: dataOptions.series[index].data.map(function (item, dataIndex) {
- return {
- value: item,
- symbolSize: !nextSerieDatas || nextSerieDatas[dataIndex] && +item >= +nextSerieDatas[dataIndex] ? [baseWidth, 15] : [0, 15]
- };
- })
- }, {
- // 底部的圆片
- name: '',
- type: 'pictorialBar',
- symbolSize: [baseWidth, 10],
- symbolOffset: [0, 5],
- z: 12,
- itemStyle: {
- normal: {
- color: cirCleColor
- }
- },
- data: dataOptions.series[index].data
- });
- }
- delete serie.shape;
- }
- }
- return serie;
- }); // 玫瑰图多个选中
- if (options.series[0].type === 'pie' && options.series[0].roseType) {
- options.series = options.series.map(function (serie) {
- if (!serie.roseType) {
- serie.roseType = options.series[0].roseType;
- }
- return serie;
- });
- } // pie的图例需要一个扇形是一个图例
- if (options.legend && options.series.length > 0 && options.series[0].type === 'pie') {
- options.legend.data = [];
- options.series.forEach(function (element) {
- if (element.data) {
- var _options$legend$data;
- (_options$legend$data = options.legend.data).push.apply(_options$legend$data, (0, _toConsumableArray2.default)(element.data.map(function (item) {
- return item.name;
- })));
- }
- });
- }
- }
- }
- if (options && options.radar && dataOptions.radar) {
- options.radar.indicator = Object.assign({}, dataOptions.radar.indicator || {});
- }
- var series = dataOptions.series;
- if (series && series.length && series[0].type === 'pie') {
- this.setItemStyleColor(false, series);
- }
- if (this.highlightOptions && this.highlightOptions.length > 0) {
- this.setItemStyleColor(true, series);
- }
- dataOptions.series = this._createRingShineSeries(series, options.series);
- var mergeOptions = (0, _lodash2.default)(options, dataOptions);
- if (extraSeries.length > 0) {
- var _mergeOptions$series;
- (_mergeOptions$series = mergeOptions.series).push.apply(_mergeOptions$series, extraSeries);
- }
- return mergeOptions;
- },
- _createRingShineSeries: function _createRingShineSeries(series, optionsSeries) {
- var _this10 = this;
- if (optionsSeries) {
- this.datasetOptions.forEach(function (datasetOption, index) {
- var _ref4 = optionsSeries[index] || {},
- type = _ref4.type,
- outerGap = _ref4.outerGap,
- isShine = _ref4.isShine;
- if (type === 'pie' && outerGap >= 0) {
- var data = series[index].data.map(function (val) {
- return val.value;
- });
- outerGap = outerGap || Math.min.apply(null, data) / 5;
- series[index].data = _this10._createRingShineDataOption(series[index].data, outerGap, isShine);
- delete optionsSeries[index].outerGap;
- delete optionsSeries[index].isShine;
- }
- });
- }
- return series;
- },
- _createRingShineDataOption: function _createRingShineDataOption(data, outerGap, isShine) {
- if (!data) {
- return;
- }
- var colors = this._handlerColorGroup(data.length);
- var gapItem = {
- value: outerGap,
- name: '',
- itemStyle: {
- normal: {
- label: {
- show: false
- },
- labelLine: {
- show: false
- },
- color: 'rgba(0, 0, 0, 0)',
- borderColor: 'rgba(0, 0, 0, 0)',
- borderWidth: 0
- }
- }
- };
- var result = [];
- for (var i = 0; i < data.length; i++) {
- var dataItem = {
- value: data[i].value,
- name: data[i].name
- };
- if (isShine) {
- dataItem.itemStyle = {
- normal: {
- borderWidth: 5,
- shadowBlur: 10,
- color: colors[i],
- borderColor: colors[i],
- shadowColor: colors[i]
- }
- };
- }
- result.push(dataItem);
- if (data.length > 1) {
- result.push(gapItem);
- }
- }
- return result;
- },
- _handlerColorGroup: function _handlerColorGroup(serielDataLength) {
- if ((0, _typeof2.default)(this.colorGroupsData[0]) === 'object') {
- return (0, _chart.handleMultiGradient)(this.colorGroupsData, serielDataLength);
- } else {
- return SuperMap.ColorsPickerUtil.getGradientColors(this.colorGroupsData, serielDataLength, 'RANGE');
- }
- },
- // 控制label显示条数
- _controlLabel: function _controlLabel(normalLabel, maxLabels) {
- if (normalLabel && normalLabel.show && maxLabels) {
- var endNormalLabel = (0, _lodash4.default)(normalLabel);
- var formatMode;
- if (endNormalLabel.formatter && typeof endNormalLabel.formatter === 'string') {
- formatMode = endNormalLabel.formatter;
- }
- endNormalLabel.formatter = function (_ref5) {
- var dataIndex = _ref5.dataIndex,
- value = _ref5.value,
- name = _ref5.name,
- percent = _ref5.percent;
- var FORMATTER_MAP = {
- '{b}: {c}': "".concat(name, ": ").concat(value),
- '{b}': "".concat(name),
- '{c}': "".concat(value),
- '{d}%': "".concat(percent, "%")
- };
- var result = '';
- if (dataIndex < maxLabels) {
- result = FORMATTER_MAP[formatMode || '{c}'];
- }
- return result;
- };
- return endNormalLabel;
- }
- return normalLabel;
- },
- // 当datasetUrl不变,datasetOptions改变时
- _changeChartData: function _changeChartData(echartsDataService, datasetOptions, echartOptions) {
- var options;
- options = echartsDataService.formatChartData(datasetOptions, this.xBar); // 缓存dataSeriesCache,格式化成echart的数据
- this.dataSeriesCache = Object.assign({}, options); // 设置echartOptions
- this.echartOptions = this._optionsHandler(echartOptions, options);
- },
- _setChartTheme: function _setChartTheme() {
- if (!this.theme) {
- var colorNumber = this.colorNumber;
- this.chartTheme = (0, _chart.chartThemeUtil)(this.backgroundData, this.textColorsData, this.colorGroupsData, colorNumber);
- }
- },
- // 获取echart实例
- _getEchart: function _getEchart() {
- return this.smChart;
- },
- // 以下全是同名调用echart的方法
- /**
- * 提供了一个更贴切的名称来描述 setOption 方法的实际行为。
- * @param {Object} options - 图表的配置项和数据
- * @param {Boolean} [notMerge = false] - 可选,是否不跟之前设置的 option 进行合并,默认为 false,即合并
- * @param {Boolean} [lazyUpdate = false] - 可选,阻止调用 setOption 时抛出事件,默认为 false,即抛出事件
- */
- mergeOptions: function mergeOptions(options, notMerge, lazyUpdate) {
- this._delegateMethod('mergeOptions', options, notMerge, lazyUpdate);
- },
- /**
- * 此接口用于,在大数据量(百万以上)的渲染场景,分片加载数据和增量渲染。
- * @param {Object} params - 数据配置
- */
- appendData: function appendData(params) {
- this._delegateMethod('appendData', params);
- },
- /**
- * 此接口用于,改变图表尺寸,在容器大小发生改变时需要手动调用。
- * @param {Object} [options] - options可缺省。有下面几个可选项:width, height, silent
- */
- resize: function resize(options) {
- this._delegateMethod('resize', options);
- },
- /**
- * 此接口用于,触发图表行为。
- * @param {Object} payload - 参数可以通过batch属性同时触发多个行为。
- */
- dispatchAction: function dispatchAction(payload) {
- this._delegateMethod('dispatchAction', payload);
- },
- /**
- * 此接口用于,转换坐标系上的点到像素坐标值。
- * @param {Object} finder - 用于指示『在哪个坐标系或者系列上判断』。
- * @param {Array|string} value - 要被转换的值。
- */
- convertToPixel: function convertToPixel(finder, value) {
- return this._delegateMethod('convertToPixel', finder, value);
- },
- /**
- * 此接口用于,转换像素坐标值到逻辑坐标系上的点。是 convertToPixel 的逆运算。
- * @param {Object} finder - 用于指示『在哪个坐标系或者系列上判断』。
- * @param {Array|string} value - 要被转换的值。
- */
- convertFromPixel: function convertFromPixel(finder, value) {
- return this._delegateMethod('convertFromPixel', finder, value);
- },
- /**
- * 此接口用于,判断给定的点是否在指定的坐标系或者系列上。
- * @param {Object} finder - 用于指示『在哪个坐标系或者系列上判断』。
- * @param {Array} value - 要被判断的点。
- */
- containPixel: function containPixel(finder, value) {
- return this._delegateMethod('containPixel', finder, value);
- },
- /**
- * 此接口用于,显示加载动画效果。可以在加载数据前手动调用该接口显示加载动画,在数据加载完成后调用 hideLoading 隐藏加载动画。
- * @param {Object} [type] - 可选,加载动画类型,目前只有一种'default'。
- * @param {Object} [options] - 可选,加载动画配置项,跟type有关。
- */
- showLoading: function showLoading(type, options) {
- this._delegateMethod('showLoading', type, options);
- },
- /**
- * 此接口用于,隐藏动画加载效果。
- */
- hideLoading: function hideLoading() {
- this._delegateMethod('hideLoading');
- },
- /**
- * 此接口用于,导出图表图片,返回一个 base64 的 URL,可以设置为Image的src。
- * @param {Object} options - 导出配置
- */
- getDataURL: function getDataURL(options) {
- return this._delegateMethod('getDataURL', options);
- },
- /**
- * 此接口用于,导出联动的图表图片,返回一个 base64 的 url,可以设置为Image的src。导出图片中每个图表的相对位置跟容器的相对位置有关。
- * @param {Object} options - 导出配置
- */
- getConnectedDataURL: function getConnectedDataURL(options) {
- return this._delegateMethod('getConnectedDataURL', options);
- },
- /**
- * 此接口用于,清空当前实例,会移除实例中所有的组件和图表。清空后调用 getOption 方法返回一个{}空对象。
- */
- clear: function clear() {
- this._delegateMethod('clear');
- },
- /**
- * 此接口用于,销毁实例,销毁后实例无法再被使用。
- */
- dispose: function dispose() {
- this._delegateMethod('dispose');
- },
- // 内部调用的方法
- _delegateMethod: function _delegateMethod(name) {
- var _this$smChart;
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
- return (_this$smChart = this.smChart)[name].apply(_this$smChart, args);
- },
- unSupportedFeatureTip: function unSupportedFeatureTip() {
- this.$message.destroy();
- this.$message.warning(this.$t('chart.unSupportedData'));
- },
- handleChartClick: function handleChartClick(params) {
- if (this.associatedMap) {
- var dataIndex = params.dataIndex;
- var features = [];
- if (this.echartsDataService && this.echartsDataService.sortDataCache) {
- features = this.echartsDataService.sortDataCache.features || features;
- }
- var selectedFeature = features[dataIndex];
- this.showDetailInfo(selectedFeature);
- }
- },
- showDetailInfo: function showDetailInfo(feature) {
- var _this11 = this;
- var coordinates = ((feature || {}).geometry || {}).coordinates;
- var hasCoordinates = coordinates && !!coordinates.length;
- if (hasCoordinates && this.viewModel) {
- var properties = feature.properties || {};
- var _coordinates = (0, _util.getFeatureCenter)(feature);
- var propsData = this.generateTableData(properties);
- this.tablePopupProps = _objectSpread({}, propsData);
- this.$nextTick(function () {
- _this11.viewModel.setPopupContent(_coordinates, _this11.$refs.chartTablePopup.$el, _this11.changePopupArrowStyle);
- });
- } else {
- var mapNotLoaded = this.mapNotLoadedTip();
- if (mapNotLoaded) {
- return;
- }
- if (!hasCoordinates) {
- this.unSupportedFeatureTip();
- }
- }
- },
- generateTableData: function generateTableData(properties) {
- var propsData = {
- columns: [{
- title: this.$t('search.attribute'),
- dataIndex: 'attribute',
- width: 120
- }, {
- title: this.$t('search.attributeValue'),
- dataIndex: 'attributeValue',
- width: 150
- }],
- data: []
- };
- for (var key in properties) {
- if (key && properties[key]) {
- var dataItem = {};
- dataItem.attribute = key;
- dataItem.attributeValue = properties[key];
- propsData.data.push(dataItem);
- }
- }
- return propsData;
- },
- changePopupArrowStyle: function changePopupArrowStyle() {},
- mapNotLoadedTip: function mapNotLoadedTip() {},
- _dataZoomChanged: function _dataZoomChanged() {
- var flag = false;
- this.options.series && this.options.series.forEach(function (serie, index) {
- var labelConfig = serie.label && serie.label.normal;
- flag = labelConfig.show && labelConfig.smart;
- });
- if (flag) {
- this.echartOptions = this._optionsHandler(this.options, this.dataSeriesCache, true);
- }
- },
- registerShape: function registerShape() {
- var _this12 = this;
- this.datasetOptions && this.options.series && this.datasetOptions.forEach(function (item, index) {
- var graphicIntance = _this12.$options.graphic;
- if (item.seriesType === '2.5Bar') {
- var cubeType = _this12.options.series[index].shape;
- if (graphicIntance.getShapeClass("Cube".concat(cubeType, "Left"))) {
- return;
- }
- var CubeLeft, CubeRight, CubeTop;
- switch (cubeType) {
- case 'square':
- // 绘制左侧面
- CubeLeft = graphicIntance.extendShape({
- shape: {
- x: 0,
- y: 0
- },
- buildPath: function buildPath(ctx, shape) {
- // 会canvas的应该都能看得懂,shape是从custom传入的
- var xAxisPoint = shape.xAxisPoint;
- var c0 = [shape.x, shape.y];
- var c1 = [shape.x - 13, shape.y - 13];
- var c2 = [xAxisPoint[0] - 13, xAxisPoint[1] - 13];
- var c3 = [xAxisPoint[0], xAxisPoint[1]];
- ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath();
- }
- }); // 绘制右侧面
- CubeRight = graphicIntance.extendShape({
- shape: {
- x: 0,
- y: 0
- },
- buildPath: function buildPath(ctx, shape) {
- var xAxisPoint = shape.xAxisPoint;
- var c1 = [shape.x, shape.y];
- var c2 = [xAxisPoint[0], xAxisPoint[1]];
- var c3 = [xAxisPoint[0] + 18, xAxisPoint[1] - 9];
- var c4 = [shape.x + 18, shape.y - 9];
- ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();
- }
- }); // 绘制顶面
- CubeTop = graphicIntance.extendShape({
- shape: {
- x: 0,
- y: 0
- },
- buildPath: function buildPath(ctx, shape) {
- var c1 = [shape.x, shape.y];
- var c2 = [shape.x + 18, shape.y - 9];
- var c3 = [shape.x + 5, shape.y - 22];
- var c4 = [shape.x - 13, shape.y - 13];
- ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();
- }
- });
- break;
- case 'rectangle':
- // 绘制左侧面
- CubeLeft = graphicIntance.extendShape({
- shape: {
- x: 0,
- y: 0
- },
- buildPath: function buildPath(ctx, shape) {
- var xAxisPoint = shape.xAxisPoint;
- var c0 = [shape.x, shape.y];
- var c1 = [shape.x - 9, shape.y - 9];
- var c2 = [xAxisPoint[0] - 9, xAxisPoint[1] - 9];
- var c3 = [xAxisPoint[0], xAxisPoint[1]];
- ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath();
- }
- });
- CubeRight = graphicIntance.extendShape({
- shape: {
- x: 0,
- y: 0
- },
- buildPath: function buildPath(ctx, shape) {
- var xAxisPoint = shape.xAxisPoint;
- var c1 = [shape.x, shape.y];
- var c2 = [xAxisPoint[0], xAxisPoint[1]];
- var c3 = [xAxisPoint[0] + 18, xAxisPoint[1] - 9];
- var c4 = [shape.x + 18, shape.y - 9];
- ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();
- }
- });
- CubeTop = graphicIntance.extendShape({
- shape: {
- x: 0,
- y: 0
- },
- buildPath: function buildPath(ctx, shape) {
- var c1 = [shape.x, shape.y];
- var c2 = [shape.x + 18, shape.y - 9];
- var c3 = [shape.x + 9, shape.y - 18];
- var c4 = [shape.x - 9, shape.y - 9];
- ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();
- }
- });
- break;
- }
- CubeLeft && graphicIntance.registerShape("Cube".concat(cubeType, "Left"), CubeLeft);
- CubeRight && graphicIntance.registerShape("Cube".concat(cubeType, "Right"), CubeRight);
- CubeTop && graphicIntance.registerShape("Cube".concat(cubeType, "Top"), CubeTop);
- }
- });
- },
- getCirlPoint: function getCirlPoint(x0, y0, r, angle) {
- var x1 = x0 + r * Math.cos(angle * Math.PI / 180);
- var y1 = y0 + r * Math.sin(angle * Math.PI / 180);
- return {
- x: x1,
- y: y1
- };
- },
- spinLine: function spinLine(startAngle, endAngle, angle, effectColor, radius) {
- return function (params, api) {
- return {
- type: 'arc',
- shape: {
- cx: api.getWidth() / 2,
- cy: api.getHeight() / 2,
- r: Math.min(api.getWidth(), api.getHeight()) / 2 * radius,
- startAngle: (startAngle + angle) * Math.PI / 180,
- endAngle: (endAngle + angle) * Math.PI / 180
- },
- style: {
- stroke: effectColor,
- fill: 'transparent',
- lineWidth: 1.5
- },
- silent: true
- };
- };
- },
- spinPoint: function spinPoint(angle, spinAngle, effectColor, radius) {
- var _this13 = this;
- return function (params, api) {
- var x0 = api.getWidth() / 2;
- var y0 = api.getHeight() / 2;
- var r = Math.min(api.getWidth(), api.getHeight()) / 2 * radius;
- var point = _this13.getCirlPoint(x0, y0, r, angle + spinAngle);
- return {
- type: 'circle',
- shape: {
- cx: point.x,
- cy: point.y,
- r: 4
- },
- style: {
- stroke: effectColor,
- fill: effectColor
- },
- silent: true
- };
- };
- },
- customRingsLine: function customRingsLine(startAngle, endAngle, angle, effectColor, effectRadius) {
- var series = {
- name: 'ring0',
- type: 'custom',
- coordinateSystem: 'none',
- renderItem: null,
- data: [0]
- };
- series.renderItem = this.spinLine(startAngle, endAngle, angle, effectColor, effectRadius);
- return series;
- },
- customRingsPoint: function customRingsPoint(startAngle, angle, effectColor, outEffectRadius) {
- var series = {
- name: 'ring4',
- type: 'custom',
- coordinateSystem: 'none',
- renderItem: null,
- data: [0]
- };
- series.renderItem = this.spinPoint(startAngle, angle, effectColor, outEffectRadius);
- return series;
- },
- addEffect: function addEffect(angle) {
- angle = angle || 0;
- var effectColor = this.options.series[0].customOptions.color;
- var effectRadius = this.options.series[0].customOptions.radius;
- var outEffectRadius = effectRadius + 0.1; // customRightBottomLine
- this.customSeries.push(this.customRingsLine(0, 90, angle, effectColor, effectRadius)); // customRightTopLine
- this.customSeries.push(this.customRingsLine(270, 40, -angle, effectColor, outEffectRadius)); // customLeftTopLine
- this.customSeries.push(this.customRingsLine(180, 270, angle, effectColor, effectRadius)); // customLeftBottomLine
- this.customSeries.push(this.customRingsLine(90, 220, -angle, effectColor, outEffectRadius));
- if (this.options.series[0].customOptions.pointState === 'startPoint') {
- this.customSeries.push(this.customRingsPoint(270, -angle, effectColor, outEffectRadius));
- this.customSeries.push(this.customRingsPoint(90, -angle, effectColor, outEffectRadius));
- }
- },
- startEffect: function startEffect() {
- var _this14 = this;
- var angle = 0;
- this.startSpin = setInterval(function () {
- if (!_this14.options.series) {
- return;
- }
- if (_this14.options.series[0].customType === 'customRingsSeries') {
- _this14.customSeries = [];
- angle += 3;
- _this14.addEffect(angle);
- }
- }, 100);
- },
- customRenderItem: function customRenderItem() {}
- },
- // echarts所有静态方法
- /**
- * @function connect
- * 多个图表实例实现联动。
- * @param {string|Array} group - group的id,或者图表实例的数组。
- */
- connect: function connect(group) {
- _vueEcharts.default && _vueEcharts.default.connect(group);
- },
- /**
- * 解除图表实例的联动,如果只需要移除单个实例,可以将通过将该图表实例 group 设为空。
- * @param {string} group - group的id。
- */
- disconnect: function disconnect(group) {
- _vueEcharts.default && _vueEcharts.default.disConnect(group);
- },
- /**
- * 注册可用的地图,必须在包括 geo 组件或者 map 图表类型的时候才能使用。
- * @param {string} mapName - 地图名称,在 geo 组件或者 map 图表类型中设置的 map 对应的就是该值。
- * @param {Object} geoJSON - GeoJson 格式的数据,具体格式见 http://geojson.org/。
- * @param {Object} [specialAreas] - 可选。将地图中的部分区域缩放到合适的位置,可以使得整个地图的显示更加好看。
- */
- registerMap: function registerMap(mapName, geoJSON, specialAreas) {
- _vueEcharts.default && _vueEcharts.default.registerMap(mapName, geoJSON, specialAreas);
- },
- /**
- * 注册主题,用于初始化实例的时候指定。
- * @param {string} name - 主题命名。
- * @param {Object} theme - 主题配置。
- */
- registerTheme: function registerTheme(name, theme) {
- _vueEcharts.default && _vueEcharts.default.registerTheme(name, theme);
- },
- /**
- * @desc 图形相关帮助方法。
- */
- graphic: _vueEcharts.default && _vueEcharts.default.graphic
- };
- exports.default = _default2;
- /***/ }),
- /***/ "0fb2":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _propsBinder = __webpack_require__("efee");
- var _default = {
- props: {
- pane: {
- type: String,
- default: 'overlayPane'
- },
- name: {
- type: String,
- default: undefined
- },
- attribution: {
- type: String,
- default: null
- }
- },
- mounted: function mounted() {
- var _this = this;
- if (this.layer) {
- this.layer.on('add', function (e) {
- _this.$emit('load', e);
- });
- }
- (0, _propsBinder.propsBinder)(this, this.$props);
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ 1:
- /***/ (function(module, exports) {
- /* (ignored) */
- /***/ }),
- /***/ "10ba":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- var _util = __webpack_require__("1448");
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var _default2 = {
- name: 'SmTablePopup',
- mixins: [_theme.default],
- props: {
- data: {
- type: Array,
- default: function _default() {
- return [];
- }
- },
- columns: {
- type: Array,
- default: function _default() {
- return [];
- }
- }
- },
- computed: {
- styleObject: function styleObject() {
- return {
- '--table-popup-active-color--text': this.colorGroupsData[0]
- };
- },
- backgroundStyle: function backgroundStyle() {
- return {
- background: this.backgroundData ? (0, _util.getColorWithOpacity)(this.backgroundData, 0.5) : this.backgroundData
- };
- }
- }
- };
- exports.default = _default2;
- /***/ }),
- /***/ "1164":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var meta_1 = __webpack_require__("49c0");
- /**
- * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
- *
- * @name bbox
- * @param {GeoJSON} geojson any GeoJSON object
- * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
- * @example
- * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
- * var bbox = turf.bbox(line);
- * var bboxPolygon = turf.bboxPolygon(bbox);
- *
- * //addToMap
- * var addToMap = [line, bboxPolygon]
- */
- function bbox(geojson) {
- var result = [Infinity, Infinity, -Infinity, -Infinity];
- meta_1.coordEach(geojson, function (coord) {
- if (result[0] > coord[0]) {
- result[0] = coord[0];
- }
- if (result[1] > coord[1]) {
- result[1] = coord[1];
- }
- if (result[2] < coord[0]) {
- result[2] = coord[0];
- }
- if (result[3] < coord[1]) {
- result[3] = coord[1];
- }
- });
- return result;
- }
- exports.default = bbox;
- /***/ }),
- /***/ "11f8":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
- /**
- * Copyright Marc J. Schmidt. See the LICENSE file at the top-level
- * directory of this distribution and at
- * https://github.com/marcj/css-element-queries/blob/master/LICENSE.
- */
- (function (root, factory) {
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__("76b8")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
- }(typeof window !== 'undefined' ? window : this, function (ResizeSensor) {
- /**
- *
- * @type {Function}
- * @constructor
- */
- var ElementQueries = function () {
- //<style> element with our dynamically created styles
- var cssStyleElement;
- //all rules found for element queries
- var allQueries = {};
- //association map to identify which selector belongs to a element from the animationstart event.
- var idToSelectorMapping = [];
- /**
- *
- * @param element
- * @returns {Number}
- */
- function getEmSize(element) {
- if (!element) {
- element = document.documentElement;
- }
- var fontSize = window.getComputedStyle(element, null).fontSize;
- return parseFloat(fontSize) || 16;
- }
- /**
- * Get element size
- * @param {HTMLElement} element
- * @returns {Object} {width, height}
- */
- function getElementSize(element) {
- if (!element.getBoundingClientRect) {
- return {
- width: element.offsetWidth,
- height: element.offsetHeight
- }
- }
- var rect = element.getBoundingClientRect();
- return {
- width: Math.round(rect.width),
- height: Math.round(rect.height)
- }
- }
- /**
- *
- * @copyright https://github.com/Mr0grog/element-query/blob/master/LICENSE
- *
- * @param {HTMLElement} element
- * @param {*} value
- * @returns {*}
- */
- function convertToPx(element, value) {
- var numbers = value.split(/\d/);
- var units = numbers[numbers.length - 1];
- value = parseFloat(value);
- switch (units) {
- case "px":
- return value;
- case "em":
- return value * getEmSize(element);
- case "rem":
- return value * getEmSize();
- // Viewport units!
- // According to http://quirksmode.org/mobile/tableViewport.html
- // documentElement.clientWidth/Height gets us the most reliable info
- case "vw":
- return value * document.documentElement.clientWidth / 100;
- case "vh":
- return value * document.documentElement.clientHeight / 100;
- case "vmin":
- case "vmax":
- var vw = document.documentElement.clientWidth / 100;
- var vh = document.documentElement.clientHeight / 100;
- var chooser = Math[units === "vmin" ? "min" : "max"];
- return value * chooser(vw, vh);
- default:
- return value;
- // for now, not supporting physical units (since they are just a set number of px)
- // or ex/ch (getting accurate measurements is hard)
- }
- }
- /**
- *
- * @param {HTMLElement} element
- * @param {String} id
- * @constructor
- */
- function SetupInformation(element, id) {
- this.element = element;
- var key, option, elementSize, value, actualValue, attrValues, attrValue, attrName;
- var attributes = ['min-width', 'min-height', 'max-width', 'max-height'];
- /**
- * Extracts the computed width/height and sets to min/max- attribute.
- */
- this.call = function () {
- // extract current dimensions
- elementSize = getElementSize(this.element);
- attrValues = {};
- for (key in allQueries[id]) {
- if (!allQueries[id].hasOwnProperty(key)) {
- continue;
- }
- option = allQueries[id][key];
- value = convertToPx(this.element, option.value);
- actualValue = option.property === 'width' ? elementSize.width : elementSize.height;
- attrName = option.mode + '-' + option.property;
- attrValue = '';
- if (option.mode === 'min' && actualValue >= value) {
- attrValue += option.value;
- }
- if (option.mode === 'max' && actualValue <= value) {
- attrValue += option.value;
- }
- if (!attrValues[attrName]) attrValues[attrName] = '';
- if (attrValue && -1 === (' ' + attrValues[attrName] + ' ').indexOf(' ' + attrValue + ' ')) {
- attrValues[attrName] += ' ' + attrValue;
- }
- }
- for (var k in attributes) {
- if (!attributes.hasOwnProperty(k)) continue;
- if (attrValues[attributes[k]]) {
- this.element.setAttribute(attributes[k], attrValues[attributes[k]].substr(1));
- } else {
- this.element.removeAttribute(attributes[k]);
- }
- }
- };
- }
- /**
- * @param {HTMLElement} element
- * @param {Object} id
- */
- function setupElement(element, id) {
- if (!element.elementQueriesSetupInformation) {
- element.elementQueriesSetupInformation = new SetupInformation(element, id);
- }
- if (!element.elementQueriesSensor) {
- element.elementQueriesSensor = new ResizeSensor(element, function () {
- element.elementQueriesSetupInformation.call();
- });
- }
- }
- /**
- * Stores rules to the selector that should be applied once resized.
- *
- * @param {String} selector
- * @param {String} mode min|max
- * @param {String} property width|height
- * @param {String} value
- */
- function queueQuery(selector, mode, property, value) {
- if (typeof(allQueries[selector]) === 'undefined') {
- allQueries[selector] = [];
- // add animation to trigger animationstart event, so we know exactly when a element appears in the DOM
- var id = idToSelectorMapping.length;
- cssStyleElement.innerHTML += '\n' + selector + ' {animation: 0.1s element-queries;}';
- cssStyleElement.innerHTML += '\n' + selector + ' > .resize-sensor {min-width: '+id+'px;}';
- idToSelectorMapping.push(selector);
- }
- allQueries[selector].push({
- mode: mode,
- property: property,
- value: value
- });
- }
- function getQuery(container) {
- var query;
- if (document.querySelectorAll) query = (container) ? container.querySelectorAll.bind(container) : document.querySelectorAll.bind(document);
- if (!query && 'undefined' !== typeof $$) query = $$;
- if (!query && 'undefined' !== typeof jQuery) query = jQuery;
- if (!query) {
- throw 'No document.querySelectorAll, jQuery or Mootools\'s $$ found.';
- }
- return query;
- }
- /**
- * If animationStart didn't catch a new element in the DOM, we can manually search for it
- */
- function findElementQueriesElements(container) {
- var query = getQuery(container);
- for (var selector in allQueries) if (allQueries.hasOwnProperty(selector)) {
- // find all elements based on the extract query selector from the element query rule
- var elements = query(selector, container);
- for (var i = 0, j = elements.length; i < j; i++) {
- setupElement(elements[i], selector);
- }
- }
- }
- /**
- *
- * @param {HTMLElement} element
- */
- function attachResponsiveImage(element) {
- var children = [];
- var rules = [];
- var sources = [];
- var defaultImageId = 0;
- var lastActiveImage = -1;
- var loadedImages = [];
- for (var i in element.children) {
- if (!element.children.hasOwnProperty(i)) continue;
- if (element.children[i].tagName && element.children[i].tagName.toLowerCase() === 'img') {
- children.push(element.children[i]);
- var minWidth = element.children[i].getAttribute('min-width') || element.children[i].getAttribute('data-min-width');
- //var minHeight = element.children[i].getAttribute('min-height') || element.children[i].getAttribute('data-min-height');
- var src = element.children[i].getAttribute('data-src') || element.children[i].getAttribute('url');
- sources.push(src);
- var rule = {
- minWidth: minWidth
- };
- rules.push(rule);
- if (!minWidth) {
- defaultImageId = children.length - 1;
- element.children[i].style.display = 'block';
- } else {
- element.children[i].style.display = 'none';
- }
- }
- }
- lastActiveImage = defaultImageId;
- function check() {
- var imageToDisplay = false, i;
- for (i in children) {
- if (!children.hasOwnProperty(i)) continue;
- if (rules[i].minWidth) {
- if (element.offsetWidth > rules[i].minWidth) {
- imageToDisplay = i;
- }
- }
- }
- if (!imageToDisplay) {
- //no rule matched, show default
- imageToDisplay = defaultImageId;
- }
- if (lastActiveImage !== imageToDisplay) {
- //image change
- if (!loadedImages[imageToDisplay]) {
- //image has not been loaded yet, we need to load the image first in memory to prevent flash of
- //no content
- var image = new Image();
- image.onload = function () {
- children[imageToDisplay].src = sources[imageToDisplay];
- children[lastActiveImage].style.display = 'none';
- children[imageToDisplay].style.display = 'block';
- loadedImages[imageToDisplay] = true;
- lastActiveImage = imageToDisplay;
- };
- image.src = sources[imageToDisplay];
- } else {
- children[lastActiveImage].style.display = 'none';
- children[imageToDisplay].style.display = 'block';
- lastActiveImage = imageToDisplay;
- }
- } else {
- //make sure for initial check call the .src is set correctly
- children[imageToDisplay].src = sources[imageToDisplay];
- }
- }
- element.resizeSensorInstance = new ResizeSensor(element, check);
- check();
- }
- function findResponsiveImages() {
- var query = getQuery();
- var elements = query('[data-responsive-image],[responsive-image]');
- for (var i = 0, j = elements.length; i < j; i++) {
- attachResponsiveImage(elements[i]);
- }
- }
- var regex = /,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/mgi;
- var attrRegex = /\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/mgi;
- /**
- * @param {String} css
- */
- function extractQuery(css) {
- var match, smatch, attrs, attrMatch;
- css = css.replace(/'/g, '"');
- while (null !== (match = regex.exec(css))) {
- smatch = match[1] + match[3];
- attrs = match[2];
- while (null !== (attrMatch = attrRegex.exec(attrs))) {
- queueQuery(smatch, attrMatch[1], attrMatch[2], attrMatch[3]);
- }
- }
- }
- /**
- * @param {CssRule[]|String} rules
- */
- function readRules(rules) {
- var selector = '';
- if (!rules) {
- return;
- }
- if ('string' === typeof rules) {
- rules = rules.toLowerCase();
- if (-1 !== rules.indexOf('min-width') || -1 !== rules.indexOf('max-width')) {
- extractQuery(rules);
- }
- } else {
- for (var i = 0, j = rules.length; i < j; i++) {
- if (1 === rules[i].type) {
- selector = rules[i].selectorText || rules[i].cssText;
- if (-1 !== selector.indexOf('min-height') || -1 !== selector.indexOf('max-height')) {
- extractQuery(selector);
- } else if (-1 !== selector.indexOf('min-width') || -1 !== selector.indexOf('max-width')) {
- extractQuery(selector);
- }
- } else if (4 === rules[i].type) {
- readRules(rules[i].cssRules || rules[i].rules);
- } else if (3 === rules[i].type) {
- if(rules[i].styleSheet.hasOwnProperty("cssRules")) {
- readRules(rules[i].styleSheet.cssRules);
- }
- }
- }
- }
- }
- var defaultCssInjected = false;
- /**
- * Searches all css rules and setups the event listener to all elements with element query rules..
- */
- this.init = function () {
- var animationStart = 'animationstart';
- if (typeof document.documentElement.style['webkitAnimationName'] !== 'undefined') {
- animationStart = 'webkitAnimationStart';
- } else if (typeof document.documentElement.style['MozAnimationName'] !== 'undefined') {
- animationStart = 'mozanimationstart';
- } else if (typeof document.documentElement.style['OAnimationName'] !== 'undefined') {
- animationStart = 'oanimationstart';
- }
- document.body.addEventListener(animationStart, function (e) {
- var element = e.target;
- var styles = element && window.getComputedStyle(element, null);
- var animationName = styles && styles.getPropertyValue('animation-name');
- var requiresSetup = animationName && (-1 !== animationName.indexOf('element-queries'));
- if (requiresSetup) {
- element.elementQueriesSensor = new ResizeSensor(element, function () {
- if (element.elementQueriesSetupInformation) {
- element.elementQueriesSetupInformation.call();
- }
- });
- var sensorStyles = window.getComputedStyle(element.resizeSensor, null);
- var id = sensorStyles.getPropertyValue('min-width');
- id = parseInt(id.replace('px', ''));
- setupElement(e.target, idToSelectorMapping[id]);
- }
- });
- if (!defaultCssInjected) {
- cssStyleElement = document.createElement('style');
- cssStyleElement.type = 'text/css';
- cssStyleElement.innerHTML = '[responsive-image] > img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}';
- //safari wants at least one rule in keyframes to start working
- cssStyleElement.innerHTML += '\n@keyframes element-queries { 0% { visibility: inherit; } }';
- document.getElementsByTagName('head')[0].appendChild(cssStyleElement);
- defaultCssInjected = true;
- }
- for (var i = 0, j = document.styleSheets.length; i < j; i++) {
- try {
- if (document.styleSheets[i].href && 0 === document.styleSheets[i].href.indexOf('file://')) {
- console.warn("CssElementQueries: unable to parse local css files, " + document.styleSheets[i].href);
- }
- readRules(document.styleSheets[i].cssRules || document.styleSheets[i].rules || document.styleSheets[i].cssText);
- } catch (e) {
- }
- }
- findResponsiveImages();
- };
- /**
- * Go through all collected rules (readRules()) and attach the resize-listener.
- * Not necessary to call it manually, since we detect automatically when new elements
- * are available in the DOM. However, sometimes handy for dirty DOM modifications.
- *
- * @param {HTMLElement} container only elements of the container are considered (document.body if not set)
- */
- this.findElementQueriesElements = function (container) {
- findElementQueriesElements(container);
- };
- this.update = function () {
- this.init();
- };
- };
- ElementQueries.update = function () {
- ElementQueries.instance.update();
- };
- /**
- * Removes all sensor and elementquery information from the element.
- *
- * @param {HTMLElement} element
- */
- ElementQueries.detach = function (element) {
- if (element.elementQueriesSetupInformation) {
- //element queries
- element.elementQueriesSensor.detach();
- delete element.elementQueriesSetupInformation;
- delete element.elementQueriesSensor;
- } else if (element.resizeSensorInstance) {
- //responsive image
- element.resizeSensorInstance.detach();
- delete element.resizeSensorInstance;
- }
- };
- ElementQueries.init = function () {
- if (!ElementQueries.instance) {
- ElementQueries.instance = new ElementQueries();
- }
- ElementQueries.instance.init();
- };
- var domLoaded = function (callback) {
- /* Mozilla, Chrome, Opera */
- if (document.addEventListener) {
- document.addEventListener('DOMContentLoaded', callback, false);
- }
- /* Safari, iCab, Konqueror */
- else if (/KHTML|WebKit|iCab/i.test(navigator.userAgent)) {
- var DOMLoadTimer = setInterval(function () {
- if (/loaded|complete/i.test(document.readyState)) {
- callback();
- clearInterval(DOMLoadTimer);
- }
- }, 10);
- }
- /* Other web browsers */
- else window.onload = callback;
- };
- ElementQueries.findElementQueriesElements = function (container) {
- ElementQueries.instance.findElementQueriesElements(container);
- };
- ElementQueries.listen = function () {
- domLoaded(ElementQueries.init);
- };
- return ElementQueries;
- }));
- /***/ }),
- /***/ "13f5":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a142");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "13fc":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _mapGetter = _interopRequireDefault(__webpack_require__("2ed5"));
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- var _IdentifyViewModel = _interopRequireDefault(__webpack_require__("9153"));
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var _default2 = {
- name: 'SmIdentify',
- mixins: [_mapGetter.default, _theme.default],
- props: {
- layerNames: {
- type: Array,
- default: function _default() {
- return [];
- }
- },
- fields: {
- type: Array,
- default: function _default() {
- return [];
- }
- },
- layerStyle: {
- type: Object,
- default: function _default() {
- return {};
- }
- }
- },
- data: function data() {
- return {
- popupProps: {},
- layers: [],
- layerType: false,
- popupLayers: [],
- mapClickPosition: null
- };
- },
- watch: {
- layerNames: function layerNames(val, oldVal) {
- if (val) {
- this.$options.removed.call(this, oldVal);
- this.setLayers();
- }
- },
- backgroundData: function backgroundData() {
- this.changeStyle();
- }
- },
- loaded: function loaded() {
- var _this = this;
- this.setViewModel();
- this.setLayers();
- if (this.layers && this.layers.length > 0) {
- this.layers.forEach(function (layer) {
- var layerType = _this.viewModel.getLayerType(layer);
- _this.bindLayerClick(layer, layerType);
- });
- } // 客户端专题图图层无准确坐标,通过地图坐标来实现
- this.map.on('click', function (e) {
- _this.mapClickPosition = _this.map.layerPointToLatLng(e.layerPoint);
- });
- },
- removed: function removed() {
- var layers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.layers;
- // 清除点击事件和popup
- this.popupLayers && this.popupLayers.forEach(function (layer) {
- layer.closePopup();
- layer.off('click');
- layer.off('popupclose');
- });
- layers && layers.forEach(function (layer) {
- layer.off('click');
- }); // 清除高亮的图层
- this.viewModel && this.viewModel.removed(); // 重置
- this.popupLayers = [];
- this.layers = [];
- },
- beforeDestroy: function beforeDestroy() {
- this.map && this.map.off('click');
- this.$options.removed.call(this);
- },
- methods: {
- setViewModel: function setViewModel() {
- this.viewModel = new _IdentifyViewModel.default(this.map, {
- mapTarget: this.getTargetName(),
- layerNames: this.layerNames,
- layerStyle: this.layerStyle
- });
- },
- // 通过layerName设置layers
- setLayers: function setLayers() {
- var _this2 = this;
- // 重置layers
- this.layers = [];
- this.layerNames.forEach(function (layerName) {
- var layer = _this2.getLayerByName(layerName);
- layer && _this2.layers.push(layer);
- });
- },
- // 通过layerName获取layer
- getLayerByName: function getLayerByName(layerName) {
- var layer = this.viewModel.getLayerByName(layerName);
- if (!layer) {
- this.$message.error(this.$t('identify.layerNotExit', {
- layer: layerName
- }));
- }
- return layer;
- },
- // 给选中图层绑定click
- bindLayerClick: function bindLayerClick(layer, layerType) {
- if (layerType) {
- // 如果是geojson
- this.bindGeojsonLayer(layer);
- } else if (layer.TFEvents) {
- // 如果是客户端专题图
- this.bindThemeLayer(layer);
- } else {
- // 如果是其他的图层(marker,polygon,polyline,隐藏的客户端专题图)
- this.bindOtherLayer(layer);
- }
- },
- // geojsonlayer绑定click事件
- bindGeojsonLayer: function bindGeojsonLayer(geojsonLayer) {
- var _this3 = this;
- geojsonLayer.on('click', function (e) {
- // e.layer是被选中的某个要素
- _this3.bindPopupLayer(e.layer.feature, e.layer, e.latlng);
- });
- },
- // 给客户端专题图绑定click事件
- bindThemeLayer: function bindThemeLayer(themeLayer) {
- var _this4 = this;
- themeLayer.on('click', function (e) {
- if (e.target && e.target.refDataID) {
- var themeFeature = themeLayer.getFeatureById(e.target.refDataID); // 将矢量要素转换成geojson
- var feature = _this4.viewModel.formatGeoJSON(themeFeature); // 因为线坐标等要素不准确,所以用地图的点击的坐标点
- _this4.bindPopupLayer(feature, themeLayer, '');
- }
- });
- },
- // 其他layer(layergroup等)绑定click事件
- bindOtherLayer: function bindOtherLayer(otherLayer) {
- var _this5 = this;
- if (otherLayer._layers) {
- for (var key in otherLayer._layers) {
- var layer = otherLayer._layers[key];
- if (layer.TFEvents) {
- // 说明是客户端专题图
- this.bindThemeLayer(otherLayer._layers[key]);
- } else if (this.viewModel.getLayerType(layer)) {
- this.bindGeojsonLayer(layer);
- } else {
- (function () {
- // 普通图层
- var popupLayer = void 0;
- var feature = void 0;
- layer.on('click', function (e) {
- // geojson点线面图层marker,image-marker、 RANK_SYMBOL:等级符号专题图(返回的是layergroup);
- var coordinates = e.sourceTarget && e.sourceTarget._point && _this5.map.layerPointToLatLng(e.sourceTarget._point) || e.target && e.target._latlng || e.latlng;
- feature = {
- type: 'Feature',
- properties: coordinates,
- geometry: {
- type: 'Point',
- coordinates: [coordinates.lng, coordinates.lat]
- }
- };
- e.sourceTarget.feature = feature;
- popupLayer = e.sourceTarget;
- _this5.bindPopupLayer(feature, popupLayer, e.latlng);
- });
- })();
- }
- }
- }
- },
- // 绑定popup
- bindPopupLayer: function bindPopupLayer(feature, popupLayer, latlng) {
- var _this6 = this;
- if (!feature) {
- return;
- }
- this.filterFeature(feature);
- this.$nextTick(function () {
- // 这个定时器是避免和专题图的点击事件(要清空popup)冲突
- setTimeout(function () {
- var popupDom = _this6.$refs.Popup;
- popupDom.style.display = 'block';
- popupLayer.bindPopup(popupDom); // 定时为了获取最近的一次地图点击事件的坐标mapClickPosition
- popupLayer.openPopup(latlng || _this6.mapClickPosition); // popupclose(点击地图的时候,清除最后一次的高亮)
- popupLayer.on('popupclose', function () {
- return _this6.viewModel.removed();
- });
- if (!popupLayer.feature) {
- popupLayer.feature = feature;
- }
- _this6.viewModel.addOverlayToMap(popupLayer, feature, _this6.layerStyle);
- _this6.popupLayers.push(popupLayer);
- }, 0);
- });
- },
- // 过滤用户传入的字段
- filterFeature: function filterFeature(feature) {
- var _this7 = this;
- // 重置popupProps
- this.popupProps = {};
- if (feature.properties) {
- // 过滤字段
- if (this.fields.length > 0) {
- this.fields.forEach(function (field) {
- if (feature.properties.hasOwnProperty(field)) {
- _this7.popupProps[field] = feature.properties[field];
- }
- });
- } else {
- // 默认是读取layer的全部字段
- this.popupProps = feature.properties;
- }
- }
- },
- // 根据主题改变样式
- changeStyle: function changeStyle() {
- var wrapper = document.querySelector('.leaflet-popup-content-wrapper');
- var tip = document.querySelector('.leaflet-popup-tip');
- wrapper && (wrapper.style.background = this.backgroundData);
- tip && (tip.style.background = this.backgroundData);
- }
- }
- };
- exports.default = _default2;
- /***/ }),
- /***/ "1448":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.getDateTime = getDateTime;
- exports.hexToRgba = hexToRgba;
- exports.isTransparent = isTransparent;
- exports.reservedDecimal = reservedDecimal;
- exports.clearNumberComma = clearNumberComma;
- exports.isXField = isXField;
- exports.isYField = isYField;
- exports.getColorWithOpacity = getColorWithOpacity;
- exports.parseUrl = parseUrl;
- exports.getDataType = getDataType;
- exports.isMatchUrl = isMatchUrl;
- exports.isDate = isDate;
- exports.isNumber = isNumber;
- exports.getFeatureCenter = getFeatureCenter;
- exports.getValueCaseInsensitive = getValueCaseInsensitive;
- exports.filterInvalidData = filterInvalidData;
- exports.handleWithCredentials = handleWithCredentials;
- var _lang = __webpack_require__("4e21");
- var _colorcolor = _interopRequireDefault(__webpack_require__("4552"));
- var _center = _interopRequireDefault(__webpack_require__("cf46"));
- // 获取当前时间返回置顶格式
- function getDateTime(timeType) {
- return (0, _lang.geti18n)().d(new Date(), timeType.replace(/\+/g, '_'), (0, _lang.getLanguage)());
- } // hex -> rgba
- function hexToRgba(hex, opacity) {
- return 'rgba(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5)) + ',' + parseInt('0x' + hex.slice(5, 7)) + ',' + opacity + ')';
- }
- function isTransparent(color) {
- var rgba = (0, _colorcolor.default)(color, 'rgba');
- return +rgba.match(/(\d(\.\d+)?)+/g)[3] === 0;
- } // 保留指定位数的小数
- function reservedDecimal(val, precise) {
- return Number(val).toFixed(precise);
- } // 清除数字(字符串型的)的逗号
- function clearNumberComma(num) {
- if (num.replace) {
- num = num.replace(/,/g, '');
- }
- return num;
- }
- /**
- * 判断是否地理X坐标
- * @param data
- */
- function isXField(data) {
- var lowerdata = data.toLowerCase();
- return lowerdata === 'x' || lowerdata === 'smx' || lowerdata === 'jd' || lowerdata === '经度' || lowerdata === '东经' || lowerdata === 'longitude' || lowerdata === 'lot' || lowerdata === 'lon' || lowerdata === 'lng' || lowerdata === 'x坐标';
- }
- /**
- * 判断是否地理Y坐标
- * @param data
- */
- function isYField(data) {
- var lowerdata = data.toLowerCase();
- return lowerdata === 'y' || lowerdata === 'smy' || lowerdata === 'wd' || lowerdata === '纬度' || lowerdata === '北纬' || lowerdata === 'latitude' || lowerdata === 'lat' || lowerdata === 'y坐标';
- }
- function getColorWithOpacity(color, opacity) {
- if (color.indexOf('rgba') > -1) {
- return color.substring(0, color.lastIndexOf(',') + 1) + opacity + ')';
- }
- var newColor = (0, _colorcolor.default)(color, 'rgb');
- return 'rgba' + newColor.substring(3, newColor.length - 1) + ",".concat(opacity, ")");
- }
- function parseUrl(url) {
- var urlRe = /^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;
- return url.match(urlRe);
- }
- function getDataType(data) {
- return Object.prototype.toString.call(data);
- } // 判断输入的地址是否符合地址格式
- function isMatchUrl(str) {
- var reg = new RegExp('(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
- return reg.test(str);
- } // 判断是否为日期
- function isDate(data) {
- var reg = /((^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(10|12|0?[13578])([-\/\._])(3[01]|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(11|0?[469])([-\/\._])(30|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(0?2)([-\/\._])(2[0-8]|1[0-9]|0?[1-9])$)|(^([2468][048]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([3579][26]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][13579][26])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][13579][26])([-\/\._])(0?2)([-\/\._])(29)$))/gi;
- return reg.test(data);
- } // 判断是否为数值
- function isNumber(data) {
- var mdata = Number(data);
- if (mdata === 0) {
- return true;
- }
- return !isNaN(mdata);
- }
- function getFeatureCenter(feature) {
- var coordinates = ((feature || {}).geometry || {}).coordinates;
- var hasCoordinates = coordinates && !!coordinates.length;
- if (!hasCoordinates) {
- return;
- }
- var featureType = feature.geometry.type;
- var center;
- if (featureType === 'LineString') {
- center = coordinates[parseInt(coordinates.length / 2)];
- } else if (featureType === 'MultiLineString') {
- var coord = coordinates[parseInt(coordinates.length / 2)];
- center = coord[parseInt(coord.length / 2)];
- } else {
- center = (0, _center.default)(feature).geometry.coordinates;
- }
- return center;
- }
- function getValueCaseInsensitive(properties, searchKey) {
- var isObj = getDataType(properties) === '[object Object]';
- if (!searchKey || !isObj) {
- return '';
- }
- var lowerSearchKey = searchKey.toLocaleLowerCase();
- for (var key in properties) {
- if (key.toLocaleLowerCase() === lowerSearchKey) {
- return properties[key];
- }
- }
- return '';
- }
- function filterInvalidData(datasetOptions, features) {
- var xFields = datasetOptions.map(function (item) {
- return item.xField;
- });
- var yFields = datasetOptions.map(function (item) {
- return item.yField;
- });
- var nextFeatures = features.filter(function (feature) {
- var matchXField = xFields.find(function (item) {
- return feature.properties.hasOwnProperty(item);
- });
- var matchYField = yFields.find(function (item) {
- return ![undefined, null, ''].includes(feature.properties[item]);
- });
- return !!(matchXField && matchYField);
- });
- return nextFeatures;
- }
- function handleWithCredentials(url, iportalServiceProxyUrl) {
- var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- if (!iportalServiceProxyUrl) {
- return defaultValue;
- }
- return url.indexOf(iportalServiceProxyUrl) >= 0 || defaultValue;
- }
- /***/ }),
- /***/ "14c7":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("13fc");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "14f6":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8537");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "1587":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- var _util = __webpack_require__("1448");
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var _default = {
- name: 'SmImage',
- mixins: [_theme.default],
- props: {
- src: {
- type: String
- },
- repeat: {
- type: String,
- default: 'center'
- },
- href: {
- type: String,
- default: ''
- },
- target: {
- type: String,
- default: '_self'
- }
- },
- data: function data() {
- return {
- repeatOption: {
- center: {
- backgroundRepeat: 'no-repeat',
- backgroundPosition: 'center',
- backgroundSize: 'contain'
- },
- noRepeat: {
- backgroundSize: '100% 100%',
- backgroundRepeat: 'no-repeat'
- },
- repeatX: {
- backgroundRepeat: 'repeat-x',
- backgroundSize: 'auto 100%'
- },
- repeatY: {
- backgroundRepeat: 'repeat-Y',
- backgroundSize: '100% auto'
- },
- repeatXY: {
- backgroundRepeat: 'repeat',
- backgroundSize: 'auto'
- }
- }
- };
- },
- computed: {
- repeatStyle: function repeatStyle() {
- return this.repeatOption[this.repeat];
- },
- imgUrl: function imgUrl() {
- return {
- backgroundImage: "url(".concat(this.src, ")")
- };
- },
- realHref: function realHref() {
- var href = this.href.replace(/ /g, '');
- if (href && !(0, _util.parseUrl)(href)) {
- return "http://".concat(href);
- }
- return href;
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "15ad":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aa59");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "16ed":
- /***/ (function(module, exports, __webpack_require__) {
- var _typeof = __webpack_require__("7ae5");
- function _getRequireWildcardCache() {
- if (typeof WeakMap !== "function") return null;
- var cache = new WeakMap();
- _getRequireWildcardCache = function _getRequireWildcardCache() {
- return cache;
- };
- return cache;
- }
- function _interopRequireWildcard(obj) {
- if (obj && obj.__esModule) {
- return obj;
- }
- if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
- return {
- "default": obj
- };
- }
- var cache = _getRequireWildcardCache();
- if (cache && cache.has(obj)) {
- return cache.get(obj);
- }
- var newObj = {};
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
- if (desc && (desc.get || desc.set)) {
- Object.defineProperty(newObj, key, desc);
- } else {
- newObj[key] = obj[key];
- }
- }
- }
- newObj["default"] = obj;
- if (cache) {
- cache.set(obj, newObj);
- }
- return newObj;
- }
- module.exports = _interopRequireWildcard;
- /***/ }),
- /***/ "18ca":
- /***/ (function(module, exports, __webpack_require__) {
- var freeGlobal = __webpack_require__("5de5");
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
- module.exports = root;
- /***/ }),
- /***/ "18e4":
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = {
- ResizeSensor: __webpack_require__("76b8"),
- ElementQueries: __webpack_require__("11f8")
- };
- /***/ }),
- /***/ "1969":
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- /***/ }),
- /***/ "19e1":
- /***/ (function(module, exports) {
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
- module.exports = _classCallCheck;
- /***/ }),
- /***/ "1a91":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.registerProjection = registerProjection;
- exports.getProjection = getProjection;
- exports.toEpsgCode = toEpsgCode;
- exports.default = void 0;
- var _vue = _interopRequireDefault(__webpack_require__("5643"));
- var _util = __webpack_require__("1448");
- var EpsgDefine = new _vue.default({
- epsgCodes: {
- 'EPSG:3857': 'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]',
- 'EPSG:4326': 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],AXIS["Northing", "NORTH"],AXIS["Easting", "EAST"],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]',
- 'EPSG:4490': 'GEOGCS["China Geodetic Coordinate System 2000", DATUM["China 2000", SPHEROID["CGCS2000", 6378137.0, 298.257222101, AUTHORITY["EPSG","1024"]], AUTHORITY["EPSG","1043"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4490"]]'
- },
- registerProjection: function registerProjection(epsgKey, epsgValue) {
- if ((0, _util.getDataType)(arguments[0]) === '[object Object]' && arguments.length === 1) {
- this.epsgCodes = Object.assign({}, this.epsgCodes, arguments[0]);
- } else if (epsgKey && epsgValue) {
- this.epsgCodes[epsgKey] = epsgValue;
- }
- },
- getProjection: function getProjection(epsgKey) {
- return this.epsgCodes[epsgKey];
- },
- getAllProjections: function getAllProjections() {
- return this.epsgCodes;
- }
- });
- var _default = EpsgDefine;
- exports.default = _default;
- function registerProjection(epsgKey, epsgValue) {
- return EpsgDefine.$options.registerProjection(epsgKey, epsgValue);
- }
- function getProjection(epsgKey) {
- return EpsgDefine.$options.getProjection(epsgKey);
- }
- function toEpsgCode(wkt) {
- if (typeof wkt !== 'string') {
- return '';
- } else if (wkt.indexOf('EPSG') === 0) {
- return wkt;
- } else {
- var lastAuthority = wkt.lastIndexOf('AUTHORITY') + 10;
- var endString = wkt.indexOf(']', lastAuthority) - 1;
- if (lastAuthority > 0 && endString > 0) {
- return "EPSG:".concat(wkt.substring(lastAuthority, endString).split(',')[1].substr(1));
- } else {
- return '';
- }
- }
- }
- /***/ }),
- /***/ "1a9e":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.Util = void 0;
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
- * This program are made available under the terms of the Apache License, Version 2.0
- * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */
- var Util = {};
- /**
- * @name Util
- * @namespace
- * @category BaseTypes Util
- * @description common 工具类。
- */
- exports.Util = Util;
- Util.extend = function (destination, source) {
- destination = destination || {};
- if (source) {
- for (var property in source) {
- var value = source[property];
- if (value !== undefined) {
- destination[property] = value;
- }
- }
- var sourceIsEvt = typeof window.Event === 'function' && source instanceof window.Event;
- if (!sourceIsEvt && source.hasOwnProperty && source.hasOwnProperty('toString')) {
- destination.toString = source.toString;
- }
- }
- return destination;
- };
- /**
- * @description 对象拷贝。
- * @param {Object} [des] - 目标对象。
- * @param {Object} soc - 源对象。
- */
- Util.copy = function (des, soc) {
- des = des || {};
- var v;
- if (soc) {
- for (var p in des) {
- v = soc[p];
- if (typeof v !== 'undefined') {
- des[p] = v;
- }
- }
- }
- };
- /**
- * @description 销毁对象,将其属性置空。
- * @param {Object} [obj] - 目标对象。
- */
- Util.reset = function (obj) {
- obj = obj || {};
- for (var p in obj) {
- if (obj.hasOwnProperty(p)) {
- if ((0, _typeof2.default)(obj[p]) === 'object' && obj[p] instanceof Array) {
- for (var i in obj[p]) {
- if (obj[p][i].destroy) {
- obj[p][i].destroy();
- }
- }
- obj[p].length = 0;
- } else if ((0, _typeof2.default)(obj[p]) === 'object' && obj[p] instanceof Object) {
- if (obj[p].destroy) {
- obj[p].destroy();
- }
- }
- obj[p] = null;
- }
- }
- };
- /**
- * @description 获取 HTML 元素数组。
- * @returns {Array.<HTMLElement>} HTML 元素数组。
- */
- Util.getElement = function () {
- var elements = [];
- for (var i = 0, len = arguments.length; i < len; i++) {
- var element = arguments[i];
- if (typeof element === 'string') {
- element = document.getElementById(element);
- }
- if (arguments.length === 1) {
- return element;
- }
- elements.push(element);
- }
- return elements;
- };
- /**
- * @description instance of 的跨浏览器实现。
- * @param {Object} o - 对象。
- * @returns {boolean} 是否是页面元素。
- */
- Util.isElement = function (o) {
- return !!(o && o.nodeType === 1);
- };
- /**
- * @description 判断一个对象是否是数组。
- * @param {Object} a - 对象。
- * @returns {boolean} 是否是数组。
- */
- Util.isArray = function (a) {
- return Object.prototype.toString.call(a) === '[object Array]';
- };
- /**
- * @description 从数组中删除某一项。
- * @param {Array} array - 数组。
- * @param {Object} item - 数组中要删除的一项。
- * @returns {Array} 执行删除操作后的数组。
- */
- Util.removeItem = function (array, item) {
- for (var i = array.length - 1; i >= 0; i--) {
- if (array[i] === item) {
- array.splice(i, 1);
- }
- }
- return array;
- };
- /**
- * @description 获取某对象再数组中的索引值。
- * @param {Array} array - 数组。
- * @param {Object} obj - 对象。
- * @returns {number} 某对象再数组中的索引值。
- */
- Util.indexOf = function (array, obj) {
- if (array == null) {
- return -1;
- } else {
- // use the build-in function if available.
- if (typeof array.indexOf === 'function') {
- return array.indexOf(obj);
- } else {
- for (var i = 0, len = array.length; i < len; i++) {
- if (array[i] === obj) {
- return i;
- }
- }
- return -1;
- }
- }
- };
- Util.getElement = function () {
- var elements = [];
- for (var i = 0, len = arguments.length; i < len; i++) {
- var element = arguments[i];
- if (typeof element === 'string') {
- element = document.getElementById(element);
- }
- if (arguments.length === 1) {
- return element;
- }
- elements.push(element);
- }
- return elements;
- };
- Util.lastSeqID = 0;
- Util.createUniqueID = function (prefix) {
- if (prefix == null) {
- prefix = 'id_';
- }
- Util.lastSeqID += 1;
- return prefix + Util.lastSeqID;
- };
- /***/ }),
- /***/ "1d96":
- /***/ (function(module, exports) {
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
- try {
- var info = gen[key](arg);
- var value = info.value;
- } catch (error) {
- reject(error);
- return;
- }
- if (info.done) {
- resolve(value);
- } else {
- Promise.resolve(value).then(_next, _throw);
- }
- }
- function _asyncToGenerator(fn) {
- return function () {
- var self = this,
- args = arguments;
- return new Promise(function (resolve, reject) {
- var gen = fn.apply(self, args);
- function _next(value) {
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
- }
- function _throw(err) {
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
- }
- _next(undefined);
- });
- };
- }
- module.exports = _asyncToGenerator;
- /***/ }),
- /***/ "1e44":
- /***/ (function(module, exports) {
- function _nonIterableSpread() {
- throw new TypeError("Invalid attempt to spread non-iterable instance");
- }
- module.exports = _nonIterableSpread;
- /***/ }),
- /***/ 2:
- /***/ (function(module, exports) {
- /* (ignored) */
- /***/ }),
- /***/ "2322":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _WebMapViewModel = _interopRequireDefault(__webpack_require__("fb97"));
- var _vmUpdater = _interopRequireDefault(__webpack_require__("3a49"));
- var _mapEvent = _interopRequireDefault(__webpack_require__("3a8c"));
- var _vuePropertyDecorator = __webpack_require__("e22c");
- var _resizeDetector = __webpack_require__("e0f2");
- var _debounce = _interopRequireDefault(__webpack_require__("331f"));
- var _mapEvents = _interopRequireDefault(__webpack_require__("2b31"));
- var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
- var c = arguments.length,
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
- d;
- if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- }
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- var SmWebMap =
- /*#__PURE__*/
- function (_Mixins) {
- (0, _inherits2.default)(SmWebMap, _Mixins);
- function SmWebMap() {
- var _this;
- (0, _classCallCheck2.default)(this, SmWebMap);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SmWebMap).apply(this, arguments));
- _this.spinning = true;
- _this.ready = false;
- return _this;
- }
- (0, _createClass2.default)(SmWebMap, [{
- key: "mapIdChanged",
- value: function mapIdChanged() {
- this.spinning = true;
- }
- }, {
- key: "mounted",
- value: function mounted() {
- this.initializeWebMap();
- this.registerEvents();
- }
- }, {
- key: "beforeDestroy",
- value: function beforeDestroy() {
- this.destory();
- _mapEvent.default.$options.deleteMap(this.target);
- _mapEvent.default.$options.deleteWebMap(this.target);
- }
- }, {
- key: "load",
- value: function load(value) {
- return value;
- }
- }, {
- key: "getMapFailed",
- value: function getMapFailed(value) {
- return value;
- }
- }, {
- key: "getLayerDatasourceFailed",
- value: function getLayerDatasourceFailed(value) {
- return value;
- }
- }, {
- key: "initializeWebMap",
- value: function initializeWebMap() {
- var _this2 = this;
- var _this$$props = this.$props,
- target = _this$$props.target,
- serverUrl = _this$$props.serverUrl,
- accessToken = _this$$props.accessToken,
- accessKey = _this$$props.accessKey,
- tiandituKey = _this$$props.tiandituKey,
- withCredentials = _this$$props.withCredentials,
- excludePortalProxyUrl = _this$$props.excludePortalProxyUrl,
- isSuperMapOnline = _this$$props.isSuperMapOnline,
- mapOptions = _this$$props.mapOptions;
- this.viewModel = new _WebMapViewModel.default(this.mapId, {
- target: target,
- serverUrl: serverUrl,
- accessToken: accessToken,
- accessKey: accessKey,
- tiandituKey: tiandituKey,
- withCredentials: withCredentials,
- excludePortalProxyUrl: excludePortalProxyUrl,
- isSuperMapOnline: isSuperMapOnline
- }, mapOptions);
- if (this.autoresize) {
- this.__resizeHandler = (0, _debounce.default)(function () {
- _this2.resize();
- }, 100, {
- leading: true
- });
- (0, _resizeDetector.addListener)(this.$el, this.__resizeHandler);
- }
- }
- }, {
- key: "resize",
- value: function resize() {
- var _this3 = this;
- if (this.viewModel && this.viewModel.resize) {
- this.$nextTick(function () {
- _this3.viewModel.resize();
- });
- }
- }
- }, {
- key: "registerEvents",
- value: function registerEvents() {
- var _this4 = this;
- this.viewModel.on({
- addlayerssucceeded: function addlayerssucceeded(e) {
- _this4.spinning = false;
- _mapEvent.default.$options.setMap(_this4.target, e.map);
- _this4.viewModel && _mapEvent.default.$options.setWebMap(_this4.target, _this4.viewModel);
- _mapEvent.default.$emit('load-map', e.map, _this4.target);
- _this4.map = e.map;
- _this4.mapObject = e.map;
- _this4.ready = true;
- _this4.$nextTick(function () {
- _this4.viewModel.resize();
- });
- _this4.bindMapEvents();
- _this4.load({
- map: e.map
- });
- },
- getmapinfofailed: function getmapinfofailed(e) {
- _this4.getMapFailed({
- error: e.error
- });
- _this4.$message.error(e.error.message);
- _this4.spinning = false;
- },
- getlayerdatasourcefailed: function getlayerdatasourcefailed(e) {
- _this4.getLayerDatasourceFailed({
- error: e.error,
- layer: e.layer,
- map: e.map
- });
- if (e.error === 'SAMPLE DATA is not supported') {
- _this4.$message.error(_this4.$t('webmap.sampleDataNotSupport'));
- } else {
- _this4.$message.error(_this4.$t('webmap.getLayerInfoFailed'));
- }
- },
- notsupportmvt: function notsupportmvt() {
- _this4.$message.error('暂不支持加载矢量瓦片图层!');
- _this4.spinning = false;
- }
- });
- }
- }, {
- key: "destory",
- value: function destory() {
- if (this.autoresize) {
- (0, _resizeDetector.removeListener)(this.$el, this.__resizeHandler);
- }
- }
- }, {
- key: "getMapTarget",
- get: function get() {
- return this.target;
- }
- }]);
- return SmWebMap;
- }((0, _vuePropertyDecorator.Mixins)(_vmUpdater.default, _mapEvents.default));
- __decorate([(0, _vuePropertyDecorator.Provide)()], SmWebMap.prototype, "__resizeHandler", void 0);
- __decorate([(0, _vuePropertyDecorator.Provide)()], SmWebMap.prototype, "ready", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "mapId", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)({
- default: 'map'
- })], SmWebMap.prototype, "target", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)({
- default: 'https://www.supermapol.com'
- })], SmWebMap.prototype, "serverUrl", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "accessToken", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "accessKey", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "tiandituKey", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)({
- default: false
- })], SmWebMap.prototype, "withCredentials", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "excludePortalProxyUrl", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "isSuperMapOnline", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "mapOptions", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)({
- default: true
- })], SmWebMap.prototype, "autoresize", void 0);
- __decorate([(0, _vuePropertyDecorator.Watch)('mapId')], SmWebMap.prototype, "mapIdChanged", null);
- __decorate([(0, _vuePropertyDecorator.Emit)()], SmWebMap.prototype, "load", null);
- __decorate([(0, _vuePropertyDecorator.Emit)()], SmWebMap.prototype, "getMapFailed", null);
- __decorate([(0, _vuePropertyDecorator.Emit)()], SmWebMap.prototype, "getLayerDatasourceFailed", null);
- SmWebMap = __decorate([(0, _vuePropertyDecorator.Component)({
- name: 'SmWebMap',
- viewModelProps: ['mapId', 'serverUrl', 'mapOptions.center', 'mapOptions.zoom', 'mapOptions.minZoom', 'mapOptions.maxZoom', 'mapOptions.maxBounds', 'withCredentials']
- })], SmWebMap);
- var _default = SmWebMap;
- exports.default = _default;
- /***/ }),
- /***/ "2389":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Image_vue_vue_type_template_id_3aa6b84a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a51f");
- /* harmony import */ var _Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("eb1b");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _Image_vue_vue_type_template_id_3aa6b84a___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _Image_vue_vue_type_template_id_3aa6b84a___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "238e":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/liquidfill/LiquidFill.vue?vue&type=template&id=8aedaae4&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"chart",staticClass:"sm-component-liquidFill",style:([_vm.background && _vm.getBackgroundStyle]),attrs:{"id":"chart"}})}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/liquidfill/LiquidFill.vue?vue&type=template&id=8aedaae4&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "2411":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg=="
- /***/ }),
- /***/ "25a2":
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global, module) {/**
- * lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
- /** Used as references for various `Number` constants. */
- var MAX_SAFE_INTEGER = 9007199254740991;
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- promiseTag = '[object Promise]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- weakMapTag = '[object WeakMap]';
- var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
- /**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
- /** Used to match `RegExp` flags from their coerced string values. */
- var reFlags = /\w*$/;
- /** Used to detect host constructors (Safari). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
- /** Used to identify `toStringTag` values supported by `_.clone`. */
- var cloneableTags = {};
- cloneableTags[argsTag] = cloneableTags[arrayTag] =
- cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
- cloneableTags[boolTag] = cloneableTags[dateTag] =
- cloneableTags[float32Tag] = cloneableTags[float64Tag] =
- cloneableTags[int8Tag] = cloneableTags[int16Tag] =
- cloneableTags[int32Tag] = cloneableTags[mapTag] =
- cloneableTags[numberTag] = cloneableTags[objectTag] =
- cloneableTags[regexpTag] = cloneableTags[setTag] =
- cloneableTags[stringTag] = cloneableTags[symbolTag] =
- cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
- cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
- cloneableTags[errorTag] = cloneableTags[funcTag] =
- cloneableTags[weakMapTag] = false;
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
- /** Detect free variable `exports`. */
- var freeExports = true && exports && !exports.nodeType && exports;
- /** Detect free variable `module`. */
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports;
- /**
- * Adds the key-value `pair` to `map`.
- *
- * @private
- * @param {Object} map The map to modify.
- * @param {Array} pair The key-value pair to add.
- * @returns {Object} Returns `map`.
- */
- function addMapEntry(map, pair) {
- // Don't return `map.set` because it's not chainable in IE 11.
- map.set(pair[0], pair[1]);
- return map;
- }
- /**
- * Adds `value` to `set`.
- *
- * @private
- * @param {Object} set The set to modify.
- * @param {*} value The value to add.
- * @returns {Object} Returns `set`.
- */
- function addSetEntry(set, value) {
- // Don't return `set.add` because it's not chainable in IE 11.
- set.add(value);
- return set;
- }
- /**
- * A specialized version of `_.forEach` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEach(array, iteratee) {
- var index = -1,
- length = array ? array.length : 0;
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
- }
- }
- return array;
- }
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
- }
- /**
- * A specialized version of `_.reduce` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the first element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduce(array, iteratee, accumulator, initAccum) {
- var index = -1,
- length = array ? array.length : 0;
- if (initAccum && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
- }
- /**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
- function baseTimes(n, iteratee) {
- var index = -1,
- result = Array(n);
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
- }
- /**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function getValue(object, key) {
- return object == null ? undefined : object[key];
- }
- /**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
- function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
- }
- /**
- * Converts `map` to its key-value pairs.
- *
- * @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the key-value pairs.
- */
- function mapToArray(map) {
- var index = -1,
- result = Array(map.size);
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
- }
- /**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
- }
- /**
- * Converts `set` to an array of its values.
- *
- * @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the values.
- */
- function setToArray(set) {
- var index = -1,
- result = Array(set.size);
- set.forEach(function(value) {
- result[++index] = value;
- });
- return result;
- }
- /** Used for built-in method references. */
- var arrayProto = Array.prototype,
- funcProto = Function.prototype,
- objectProto = Object.prototype;
- /** Used to detect overreaching core-js shims. */
- var coreJsData = root['__core-js_shared__'];
- /** Used to detect methods masquerading as native. */
- var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
- return uid ? ('Symbol(src)_1.' + uid) : '';
- }());
- /** Used to resolve the decompiled source of functions. */
- var funcToString = funcProto.toString;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objectToString = objectProto.toString;
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
- /** Built-in value references. */
- var Buffer = moduleExports ? root.Buffer : undefined,
- Symbol = root.Symbol,
- Uint8Array = root.Uint8Array,
- getPrototype = overArg(Object.getPrototypeOf, Object),
- objectCreate = Object.create,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- splice = arrayProto.splice;
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeGetSymbols = Object.getOwnPropertySymbols,
- nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
- nativeKeys = overArg(Object.keys, Object);
- /* Built-in method references that are verified to be native. */
- var DataView = getNative(root, 'DataView'),
- Map = getNative(root, 'Map'),
- Promise = getNative(root, 'Promise'),
- Set = getNative(root, 'Set'),
- WeakMap = getNative(root, 'WeakMap'),
- nativeCreate = getNative(Object, 'create');
- /** Used to detect maps, sets, and weakmaps. */
- var dataViewCtorString = toSource(DataView),
- mapCtorString = toSource(Map),
- promiseCtorString = toSource(Promise),
- setCtorString = toSource(Set),
- weakMapCtorString = toSource(WeakMap);
- /** Used to convert symbols to primitives and strings. */
- var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
- /**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Hash(entries) {
- var index = -1,
- length = entries ? entries.length : 0;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the hash.
- *
- * @private
- * @name clear
- * @memberOf Hash
- */
- function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
- }
- /**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @name delete
- * @memberOf Hash
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function hashDelete(key) {
- return this.has(key) && delete this.__data__[key];
- }
- /**
- * Gets the hash value for `key`.
- *
- * @private
- * @name get
- * @memberOf Hash
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate) {
- var result = data[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
- }
- /**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Hash
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function hashHas(key) {
- var data = this.__data__;
- return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
- }
- /**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Hash
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the hash instance.
- */
- function hashSet(key, value) {
- var data = this.__data__;
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
- return this;
- }
- // Add methods to `Hash`.
- Hash.prototype.clear = hashClear;
- Hash.prototype['delete'] = hashDelete;
- Hash.prototype.get = hashGet;
- Hash.prototype.has = hashHas;
- Hash.prototype.set = hashSet;
- /**
- * Creates an list cache object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function ListCache(entries) {
- var index = -1,
- length = entries ? entries.length : 0;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the list cache.
- *
- * @private
- * @name clear
- * @memberOf ListCache
- */
- function listCacheClear() {
- this.__data__ = [];
- }
- /**
- * Removes `key` and its value from the list cache.
- *
- * @private
- * @name delete
- * @memberOf ListCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function listCacheDelete(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- if (index < 0) {
- return false;
- }
- var lastIndex = data.length - 1;
- if (index == lastIndex) {
- data.pop();
- } else {
- splice.call(data, index, 1);
- }
- return true;
- }
- /**
- * Gets the list cache value for `key`.
- *
- * @private
- * @name get
- * @memberOf ListCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function listCacheGet(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- return index < 0 ? undefined : data[index][1];
- }
- /**
- * Checks if a list cache value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf ListCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function listCacheHas(key) {
- return assocIndexOf(this.__data__, key) > -1;
- }
- /**
- * Sets the list cache `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf ListCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the list cache instance.
- */
- function listCacheSet(key, value) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- if (index < 0) {
- data.push([key, value]);
- } else {
- data[index][1] = value;
- }
- return this;
- }
- // Add methods to `ListCache`.
- ListCache.prototype.clear = listCacheClear;
- ListCache.prototype['delete'] = listCacheDelete;
- ListCache.prototype.get = listCacheGet;
- ListCache.prototype.has = listCacheHas;
- ListCache.prototype.set = listCacheSet;
- /**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function MapCache(entries) {
- var index = -1,
- length = entries ? entries.length : 0;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
- function mapCacheClear() {
- this.__data__ = {
- 'hash': new Hash,
- 'map': new (Map || ListCache),
- 'string': new Hash
- };
- }
- /**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function mapCacheDelete(key) {
- return getMapData(this, key)['delete'](key);
- }
- /**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function mapCacheGet(key) {
- return getMapData(this, key).get(key);
- }
- /**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapCacheHas(key) {
- return getMapData(this, key).has(key);
- }
- /**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
- function mapCacheSet(key, value) {
- getMapData(this, key).set(key, value);
- return this;
- }
- // Add methods to `MapCache`.
- MapCache.prototype.clear = mapCacheClear;
- MapCache.prototype['delete'] = mapCacheDelete;
- MapCache.prototype.get = mapCacheGet;
- MapCache.prototype.has = mapCacheHas;
- MapCache.prototype.set = mapCacheSet;
- /**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Stack(entries) {
- this.__data__ = new ListCache(entries);
- }
- /**
- * Removes all key-value entries from the stack.
- *
- * @private
- * @name clear
- * @memberOf Stack
- */
- function stackClear() {
- this.__data__ = new ListCache;
- }
- /**
- * Removes `key` and its value from the stack.
- *
- * @private
- * @name delete
- * @memberOf Stack
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function stackDelete(key) {
- return this.__data__['delete'](key);
- }
- /**
- * Gets the stack value for `key`.
- *
- * @private
- * @name get
- * @memberOf Stack
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function stackGet(key) {
- return this.__data__.get(key);
- }
- /**
- * Checks if a stack value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Stack
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function stackHas(key) {
- return this.__data__.has(key);
- }
- /**
- * Sets the stack `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Stack
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the stack cache instance.
- */
- function stackSet(key, value) {
- var cache = this.__data__;
- if (cache instanceof ListCache) {
- var pairs = cache.__data__;
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
- pairs.push([key, value]);
- return this;
- }
- cache = this.__data__ = new MapCache(pairs);
- }
- cache.set(key, value);
- return this;
- }
- // Add methods to `Stack`.
- Stack.prototype.clear = stackClear;
- Stack.prototype['delete'] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
- /**
- * Creates an array of the enumerable property names of the array-like `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @param {boolean} inherited Specify returning inherited property names.
- * @returns {Array} Returns the array of property names.
- */
- function arrayLikeKeys(value, inherited) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- // Safari 9 makes `arguments.length` enumerable in strict mode.
- var result = (isArray(value) || isArguments(value))
- ? baseTimes(value.length, String)
- : [];
- var length = result.length,
- skipIndexes = !!length;
- for (var key in value) {
- if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
- (value === undefined && !(key in object))) {
- object[key] = value;
- }
- }
- /**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
- }
- /**
- * The base implementation of `_.assign` without support for multiple sources
- * or `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
- function baseAssign(object, source) {
- return object && copyObject(source, keys(source), object);
- }
- /**
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
- * traversed objects.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {boolean} [isFull] Specify a clone including symbols.
- * @param {Function} [customizer] The function to customize cloning.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The parent object of `value`.
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
- * @returns {*} Returns the cloned value.
- */
- function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
- var result;
- if (customizer) {
- result = object ? customizer(value, key, object, stack) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return copyArray(value, result);
- }
- } else {
- var tag = getTag(value),
- isFunc = tag == funcTag || tag == genTag;
- if (isBuffer(value)) {
- return cloneBuffer(value, isDeep);
- }
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- if (isHostObject(value)) {
- return object ? value : {};
- }
- result = initCloneObject(isFunc ? {} : value);
- if (!isDeep) {
- return copySymbols(value, baseAssign(result, value));
- }
- } else {
- if (!cloneableTags[tag]) {
- return object ? value : {};
- }
- result = initCloneByTag(value, tag, baseClone, isDeep);
- }
- }
- // Check for circular references and return its corresponding clone.
- stack || (stack = new Stack);
- var stacked = stack.get(value);
- if (stacked) {
- return stacked;
- }
- stack.set(value, result);
- if (!isArr) {
- var props = isFull ? getAllKeys(value) : keys(value);
- }
- arrayEach(props || value, function(subValue, key) {
- if (props) {
- key = subValue;
- subValue = value[key];
- }
- // Recursively populate clone (susceptible to call stack limits).
- assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
- });
- return result;
- }
- /**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} prototype The object to inherit from.
- * @returns {Object} Returns the new object.
- */
- function baseCreate(proto) {
- return isObject(proto) ? objectCreate(proto) : {};
- }
- /**
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
- * symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object);
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
- }
- /**
- * The base implementation of `getTag`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- return objectToString.call(value);
- }
- /**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- */
- function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
- }
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
- }
- /**
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeys(object) {
- if (!isPrototype(object)) {
- return nativeKeys(object);
- }
- var result = [];
- for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * Creates a clone of `buffer`.
- *
- * @private
- * @param {Buffer} buffer The buffer to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Buffer} Returns the cloned buffer.
- */
- function cloneBuffer(buffer, isDeep) {
- if (isDeep) {
- return buffer.slice();
- }
- var result = new buffer.constructor(buffer.length);
- buffer.copy(result);
- return result;
- }
- /**
- * Creates a clone of `arrayBuffer`.
- *
- * @private
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
- function cloneArrayBuffer(arrayBuffer) {
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
- return result;
- }
- /**
- * Creates a clone of `dataView`.
- *
- * @private
- * @param {Object} dataView The data view to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned data view.
- */
- function cloneDataView(dataView, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
- }
- /**
- * Creates a clone of `map`.
- *
- * @private
- * @param {Object} map The map to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned map.
- */
- function cloneMap(map, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
- return arrayReduce(array, addMapEntry, new map.constructor);
- }
- /**
- * Creates a clone of `regexp`.
- *
- * @private
- * @param {Object} regexp The regexp to clone.
- * @returns {Object} Returns the cloned regexp.
- */
- function cloneRegExp(regexp) {
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
- result.lastIndex = regexp.lastIndex;
- return result;
- }
- /**
- * Creates a clone of `set`.
- *
- * @private
- * @param {Object} set The set to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned set.
- */
- function cloneSet(set, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
- return arrayReduce(array, addSetEntry, new set.constructor);
- }
- /**
- * Creates a clone of the `symbol` object.
- *
- * @private
- * @param {Object} symbol The symbol object to clone.
- * @returns {Object} Returns the cloned symbol object.
- */
- function cloneSymbol(symbol) {
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
- }
- /**
- * Creates a clone of `typedArray`.
- *
- * @private
- * @param {Object} typedArray The typed array to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned typed array.
- */
- function cloneTypedArray(typedArray, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
- }
- /**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
- function copyArray(source, array) {
- var index = -1,
- length = source.length;
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
- }
- /**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property identifiers to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @param {Function} [customizer] The function to customize copied values.
- * @returns {Object} Returns `object`.
- */
- function copyObject(source, props, object, customizer) {
- object || (object = {});
- var index = -1,
- length = props.length;
- while (++index < length) {
- var key = props[index];
- var newValue = customizer
- ? customizer(object[key], source[key], key, object, source)
- : undefined;
- assignValue(object, key, newValue === undefined ? source[key] : newValue);
- }
- return object;
- }
- /**
- * Copies own symbol properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy symbols from.
- * @param {Object} [object={}] The object to copy symbols to.
- * @returns {Object} Returns `object`.
- */
- function copySymbols(source, object) {
- return copyObject(source, getSymbols(source), object);
- }
- /**
- * Creates an array of own enumerable property names and symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function getAllKeys(object) {
- return baseGetAllKeys(object, keys, getSymbols);
- }
- /**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
- function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key)
- ? data[typeof key == 'string' ? 'string' : 'hash']
- : data.map;
- }
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : undefined;
- }
- /**
- * Creates an array of the own enumerable symbol properties of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
- var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
- /**
- * Gets the `toStringTag` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- var getTag = baseGetTag;
- // Fallback for data views, maps, sets, and weak maps in IE 11,
- // for data views in Edge < 14, and promises in Node.js.
- if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
- (Map && getTag(new Map) != mapTag) ||
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
- (Set && getTag(new Set) != setTag) ||
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
- getTag = function(value) {
- var result = objectToString.call(value),
- Ctor = result == objectTag ? value.constructor : undefined,
- ctorString = Ctor ? toSource(Ctor) : undefined;
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString: return dataViewTag;
- case mapCtorString: return mapTag;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
- }
- }
- return result;
- };
- }
- /**
- * Initializes an array clone.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
- */
- function initCloneArray(array) {
- var length = array.length,
- result = array.constructor(length);
- // Add properties assigned by `RegExp#exec`.
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
- result.index = array.index;
- result.input = array.input;
- }
- return result;
- }
- /**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneObject(object) {
- return (typeof object.constructor == 'function' && !isPrototype(object))
- ? baseCreate(getPrototype(object))
- : {};
- }
- /**
- * Initializes an object clone based on its `toStringTag`.
- *
- * **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {string} tag The `toStringTag` of the object to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneByTag(object, tag, cloneFunc, isDeep) {
- var Ctor = object.constructor;
- switch (tag) {
- case arrayBufferTag:
- return cloneArrayBuffer(object);
- case boolTag:
- case dateTag:
- return new Ctor(+object);
- case dataViewTag:
- return cloneDataView(object, isDeep);
- case float32Tag: case float64Tag:
- case int8Tag: case int16Tag: case int32Tag:
- case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
- return cloneTypedArray(object, isDeep);
- case mapTag:
- return cloneMap(object, isDeep, cloneFunc);
- case numberTag:
- case stringTag:
- return new Ctor(object);
- case regexpTag:
- return cloneRegExp(object);
- case setTag:
- return cloneSet(object, isDeep, cloneFunc);
- case symbolTag:
- return cloneSymbol(object);
- }
- }
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- length = length == null ? MAX_SAFE_INTEGER : length;
- return !!length &&
- (typeof value == 'number' || reIsUint.test(value)) &&
- (value > -1 && value % 1 == 0 && value < length);
- }
- /**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
- function isKeyable(value) {
- var type = typeof value;
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
- ? (value !== '__proto__')
- : (value === null);
- }
- /**
- * Checks if `func` has its source masked.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
- */
- function isMasked(func) {
- return !!maskSrcKey && (maskSrcKey in func);
- }
- /**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
- function isPrototype(value) {
- var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
- return value === proto;
- }
- /**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to process.
- * @returns {string} Returns the source code.
- */
- function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
- }
- return '';
- }
- /**
- * This method is like `_.clone` except that it recursively clones `value`.
- *
- * @static
- * @memberOf _
- * @since 1.0.0
- * @category Lang
- * @param {*} value The value to recursively clone.
- * @returns {*} Returns the deep cloned value.
- * @see _.clone
- * @example
- *
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
- *
- * var deep = _.cloneDeep(objects);
- * console.log(deep[0] === objects[0]);
- * // => false
- */
- function cloneDeep(value) {
- return baseClone(value, true, true);
- }
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
- /**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- function isArguments(value) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
- }
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
- /**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
- function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
- }
- /**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
- function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
- }
- /**
- * Checks if `value` is a buffer.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
- * @example
- *
- * _.isBuffer(new Buffer(2));
- * // => true
- *
- * _.isBuffer(new Uint8Array(2));
- * // => false
- */
- var isBuffer = nativeIsBuffer || stubFalse;
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
- }
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
- function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
- }
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
- }
- /**
- * This method returns a new empty array.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {Array} Returns the new empty array.
- * @example
- *
- * var arrays = _.times(2, _.stubArray);
- *
- * console.log(arrays);
- * // => [[], []]
- *
- * console.log(arrays[0] === arrays[1]);
- * // => false
- */
- function stubArray() {
- return [];
- }
- /**
- * This method returns `false`.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {boolean} Returns `false`.
- * @example
- *
- * _.times(2, _.stubFalse);
- * // => [false, false]
- */
- function stubFalse() {
- return false;
- }
- module.exports = cloneDeep;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d"), __webpack_require__("f586")(module)))
- /***/ }),
- /***/ "279f":
- /***/ (function(module, exports) {
- function _defineProperty(obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
- return obj;
- }
- module.exports = _defineProperty;
- /***/ }),
- /***/ "27f6":
- /***/ (function(module, exports) {
- function _assertThisInitialized(self) {
- if (self === void 0) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
- return self;
- }
- module.exports = _assertThisInitialized;
- /***/ }),
- /***/ "29e0":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAADb5JREFUeAHt3bGK3QkdhuFzJhtRsNRyr8DOQiHaiJ3LFILiDdhpZ7Gla2lhpxchLliE2AoSU1gIFlvY2FiK2AgK2Z1xpghvsUyW5Jt1T2aeNPvtzvzO/M9zin0hgRwPd/DX9y8vH/z2ybOfX15e/uQOvr2Tf0vH4/EX333n0bu/OR4/OvmH9YAECBAgcKsCx1t9tRN4sS/+7s9f/u/Ff359FRXfOoHHubePcBUXv//82Rd+8O/vfPUf9xbBGydAgMA9FLhTYfHw8bOvXRwu3r/6HN++h5/lKb7lv58dzr73/PzRn07x4TwTAQJ3R+DB46eXd+fdfPydfHT+zTfm/9dnH3/8N/O/PHzy9IcXx4s/XD29qDidj/Dt68/k+rM5nUfyJAQIECDwaQoc73rlfZp4XpsAAQIECBAgQIAAAQIECBAgQIAAAQIECBA4dYE35g+DnBrkm/5bSG/SHwQ6tc/e8xAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgbslcLz6y7q+dLfekndDgAABAgQIfFYCd+bvCvmsAP1cAgQIECBAIAFhkYVFgAABAgQIjALCYgR0ToAAAQIECCQgLLKwCBAgQIAAgVFAWIyAzgkQIECAAIEEhEUWFgECBAgQIDAKCIsR0DkBAgQIECCQgLDIwiJAgAABAgRGAWExAjonQIAAAQIEEhAWWVgECBAgQIDAKCAsRkDnBAgQIECAQALCIguLAAECBAgQGAWExQjonAABAgQIEEhAWGRhESBAgAABAqOAsBgBnRMgQIAAAQIJCIssLAIECBAgQGAUEBYjoHMCBAgQIEAgAWGRhUWAAAECBAiMAsJiBHROgAABAgQIJCAssrAIECBAgACBUUBYjIDOCRAgQIAAgQSERRYWAQIECBAgMAoIixHQOQECBAgQIJCAsMjCIkCAAAECBEYBYTECOidAgAABAgQSEBZZWAQIECBAgMAoICxGQOcECBAgQIBAAsIiC4sAAQIECBAYBYTFCOicAAECBAgQSEBYZGERIECAAAECo4CwGAGdEyBAgAABAgkIiywsAgQIECBAYBQQFiOgcwIECBAgQCABYZGFRYAAAQIECIwCwmIEdE6AAAECBAgkICyysAgQIECAAIFRQFiMgM4JECBAgACBBIRFFhYBAgQIECAwCgiLEdA5AQIECBAgkICwyMIiQIAAAQIERgFhMQI6J0CAAAECBBIQFllYBAgQIECAwCggLEZA5wQIECBAgEACwiILiwABAgQIEBgFhMUI6JwAAQIECBBIQFhkYREgQIAAAQKjgLAYAZ0TIECAAAECCQiLLCwCBAgQIEBgFBAWI6BzAgQIECBAIAFhkYVFgAABAgQIjALCYgR0ToAAAQIECCQgLLKwCBAgQIAAgVFAWIyAzgkQIECAAIEEhEUWFgECBAgQIDAKCIsR0DkBAgQIECCQgLDIwiJAgAABAgRGAWExAjonQIAAAQIEEhAWWVgECBAgQIDAKCAsRkDnBAgQIECAQALCIguLAAECBAgQGAWExQjonAABAgQIEEhAWGRhESBAgAABAqOAsBgBnRMgQIAAAQIJCIssLAIECBAgQGAUEBYjoHMCBAgQIEAgAWGRhUWAAAECBAiMAsJiBHROgAABAgQIJCAssrAIECBAgACBUUBYjIDOCRAgQIAAgQSERRYWAQIECBAgMAoIixHQOQECBAgQIJCAsMjCIkCAAAECBEYBYTECOidAgAABAgQSEBZZWAQIECBAgMAoICxGQOcECBAgQIBAAsIiC4sAAQIECBAYBYTFCOicAAECBAgQSEBYZGERIECAAAECo4CwGAGdEyBAgAABAgkIiywsAgQIECBAYBQQFiOgcwIECBAgQCABYZGFRYAAAQIECIwCwmIEdE6AAAECBAgkICyysAgQIECAAIFRQFiMgM4JECBAgACBBIRFFhYBAgQIECAwCgiLEdA5AQIECBAgkICwyMIiQIAAAQIERgFhMQI6J0CAAAECBBIQFllYBAgQIECAwCggLEZA5wQIECBAgEACwiILiwABAgQIEBgFhMUI6JwAAQIECBBIQFhkYREgQIAAAQKjgLAYAZ0TIECAAAECCQiLLCwCBAgQIEBgFBAWI6BzAgQIECBAIAFhkYVFgAABAgQIjALCYgR0ToAAAQIECCQgLLKwCBAgQIAAgVFAWIyAzgkQIECAAIEEhEUWFgECBAgQIDAKCIsR0DkBAgQIECCQgLDIwiJAgAABAgRGAWExAjonQIAAAQIEEhAWWVgECBAgQIDAKCAsRkDnBAgQIECAQALCIguLAAECBAgQGAWExQjonAABAgQIEEhAWGRhESBAgAABAqOAsBgBnRMgQIAAAQIJCIssLAIECBAgQGAUEBYjoHMCBAgQIEAgAWGRhUWAAAECBAiMAsJiBHROgAABAgQIJCAssrAIECBAgACBUUBYjIDOCRAgQIAAgQSERRYWAQIECBAgMAoIixHQOQECBAgQIJCAsMjCIkCAAAECBEYBYTECOidAgAABAgQSEBZZWAQIECBAgMAoICxGQOcECBAgQIBAAsIiC4sAAQIECBAYBYTFCOicAAECBAgQSEBYZGERIECAAAECo4CwGAGdEyBAgAABAgkIiywsAgQIECBAYBQQFiOgcwIECBAgQCABYZGFRYAAAQIECIwCwmIEdE6AAAECBAgkICyysAgQIECAAIFRQFiMgM4JECBAgACBBIRFFhYBAgQIECAwCgiLEdA5AQIECBAgkICwyMIiQIAAAQIERgFhMQI6J0CAAAECBBIQFllYBAgQIECAwCggLEZA5wQIECBAgEACwiILiwABAgQIEBgFhMUI6JwAAQIECBBIQFhkYREgQIAAAQKjgLAYAZ0TIECAAAECCQiLLCwCBAgQIEBgFBAWI6BzAgQIECBAIAFhkYVFgAABAgQIjALCYgR0ToAAAQIECCQgLLKwCBAgQIAAgVFAWIyAzgkQIECAAIEEhEUWFgECBAgQIDAKCIsR0DkBAgQIECCQgLDIwiJAgAABAgRGAWExAjonQIAAAQIEEhAWWVgECBAgQIDAKCAsRkDnBAgQIECAQALCIguLAAECBAgQGAWExQjonAABAgQIEEhAWGRhESBAgAABAqOAsBgBnRMgQIAAAQIJCIssLAIECBAgQGAUEBYjoHMCBAgQIEAgAWGRhUWAAAECBAiMAsJiBHROgAABAgQIJCAssrAIECBAgACBUUBYjIDOCRAgQIAAgQSERRYWAQIECBAgMAoIixHQOQECBAgQIJCAsMjCIkCAAAECBEYBYTECOidAgAABAgQSEBZZWAQIECBAgMAoICxGQOcECBAgQIBAAsIiC4sAAQIECBAYBYTFCOicAAECBAgQSEBYZGERIECAAAECo4CwGAGdEyBAgAABAgkIiywsAgQIECBAYBQQFiOgcwIECBAgQCABYZGFRYAAAQIECIwCwmIEdE6AAAECBAgkICyysAgQIECAAIFRQFiMgM4JECBAgACBBIRFFhYBAgQIECAwCgiLEdA5AQIECBAgkICwyMIiQIAAAQIERgFhMQI6J0CAAAECBBIQFllYBAgQIECAwCggLEZA5wQIECBAgEACwiILiwABAgQIEBgFhMUI6JwAAQIECBBIQFhkYREgQIAAAQKjgLAYAZ0TIECAAAECCQiLLCwCBAgQIEBgFBAWI6BzAgQIECBAIAFhkYVFgAABAgQIjALCYgR0ToAAAQIECCQgLLKwCBAgQIAAgVFAWIyAzgkQIECAAIEEhEUWFgECBAgQIDAKCIsR0DkBAgQIECCQgLDIwiJAgAABAgRGAWExAjonQIAAAQIEEhAWWVgECBAgQIDAKCAsRkDnBAgQIECAQALCIguLAAECBAgQGAWExQjonAABAgQIEEhAWGRhESBAgAABAqOAsBgBnRMgQIAAAQIJCIssLAIECBAgQGAUEBYjoHMCBAgQIEAgAWGRhUWAAAECBAiMAsJiBHROgAABAgQIJCAssrAIECBAgACBUUBYjIDOCRAgQIAAgQSERRYWAQIECBAgMAoIixHQOQECBAgQIJCAsMjCIkCAAAECBEYBYTECOidAgAABAgQSEBZZWAQIECBAgMAoICxGQOcECBAgQIBAAsIiC4sAAQIECBAYBYTFCOicAAECBAgQSEBYZGERIECAAAECo4CwGAGdEyBAgAABAgkIiywsAgQIECBAYBQQFiOgcwIECBAgQCABYZGFRYAAAQIECIwCwmIEdE6AAAECBAgkICyysAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEC91DgeA/fs7dMgAABAv8HgYdPnv3o4uLil9c/6uzs7MfP33n0qxc/9ra/9pUPPvjcX//2r/cvD4fzw+H4z7PDW99+fv71v7z4eW89/uN7l4fLn774d/+8WeB4OP7sw/NvvHfzd7z8K8Li5T6+SoAAAQKvIXDb4XD9CDe9pqh4jQ/oE06WuBAWn4DrywQIECDwagI3BcD1q9z210TFq302r/LdrxsXwuJVlH0vAQIECLxU4LbD4fqH3fSaouKlH8WtfPF14uL44PHTq9+S8osAAQIECBAgsAv8D3+y/1UxtS72AAAAAElFTkSuQmCC"
- /***/ }),
- /***/ "2b31":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _vue = _interopRequireDefault(__webpack_require__("5643"));
- var _vuePropertyDecorator = __webpack_require__("e22c");
- var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
- var c = arguments.length,
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
- d;
- if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- }
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- var MAP_EVENT_NAMES = ['zoomlevelschange', 'resize', 'unload', 'viewreset', 'load', 'zoomstart', 'movestart', 'zoom', 'move', 'zoomend', 'moveend', 'popupopen', 'popupclose', 'autopanstart', 'tooltipopen', 'tooltipclose', 'locationerror', 'locationfound', 'click', 'dblclick', 'mousedown', 'mouseup', 'mouseover', 'mouseout', 'mousemove', 'contextmenu', 'keypress', 'keydown', 'keyup', 'preclick', 'zoomanim'];
- var MapEvents =
- /*#__PURE__*/
- function (_Vue) {
- (0, _inherits2.default)(MapEvents, _Vue);
- function MapEvents() {
- (0, _classCallCheck2.default)(this, MapEvents);
- return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(MapEvents).apply(this, arguments));
- }
- (0, _createClass2.default)(MapEvents, [{
- key: "mapEventCallback",
- value: function mapEventCallback(event) {
- var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- this.emitMapEvent(event.type, Object.assign({
- mapboxEvent: event
- }, data));
- }
- }, {
- key: "bindMapEvents",
- value: function bindMapEvents() {
- var _this = this;
- Object.keys(this.$listeners).forEach(function (eventName) {
- if (MAP_EVENT_NAMES.includes(eventName)) {
- _this.bindMapEvent(eventName, _this.mapEventCallback.bind(_this));
- }
- });
- }
- }, {
- key: "emitMapEvent",
- value: function emitMapEvent(name) {
- var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- this.$emit(name, Object.assign({
- map: this.map,
- component: this
- }, data));
- }
- }, {
- key: "bindMapEvent",
- value: function bindMapEvent(eventName, eventCallback) {
- this.map.on(eventName, eventCallback);
- }
- }]);
- return MapEvents;
- }(_vue.default);
- MapEvents = __decorate([_vuePropertyDecorator.Component], MapEvents);
- var _default = MapEvents;
- exports.default = _default;
- /***/ }),
- /***/ "2bec":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3a31");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "2c06":
- /***/ (function(module) {
- module.exports = JSON.parse("[{\"name\":\"黑龙江省\",\"coord\":[127.64559817675396,48.48668098449708]},{\"name\":\"内蒙古自治区\",\"coord\":[118.34519572208615,45.370218276977525]},{\"name\":\"新疆维吾尔自治区\",\"coord\":[87.13479065593184,41.75497055053711]},{\"name\":\"吉林省\",\"coord\":[126.12985278813787,43.57983207702637]},{\"name\":\"辽宁省\",\"coord\":[124.02494773936439,41.105743408203125]},{\"name\":\"甘肃省\",\"coord\":[102.87785725633012,37.69582366943361]},{\"name\":\"河北省\",\"coord\":[115.66327227481898,39.33383178710938]},{\"name\":\"北京市\",\"coord\":[116.62199343603638,40.25053787231445]},{\"name\":\"山西省\",\"coord\":[112.45180235808988,37.666561126708984]},{\"name\":\"天津市\",\"coord\":[117.35711842642581,39.406789779663086]},{\"name\":\"陕西省\",\"coord\":[109.56294003056632,35.64754199981689]},{\"name\":\"宁夏回族自治区\",\"coord\":[105.96110877640074,37.3081169128418]},{\"name\":\"青海省\",\"coord\":[96.07301048277901,35.44417190551758]},{\"name\":\"山东省\",\"coord\":[118.03833752951093,36.29800605773925]},{\"name\":\"西藏自治区\",\"coord\":[87.47361520439412,31.6703872680664]},{\"name\":\"河南省\",\"coord\":[113.07832397097275,33.87751102447509]},{\"name\":\"江苏省\",\"coord\":[119.93926538201052,32.945452690124505]},{\"name\":\"安徽省\",\"coord\":[117.15146765881019,32.024482727050774]},{\"name\":\"四川省\",\"coord\":[102.28998890142759,30.182161331176758]},{\"name\":\"湖北省\",\"coord\":[112.87798261431585,31.157071113586426]},{\"name\":\"重庆市\",\"coord\":[107.870126637831,30.188085556030266]},{\"name\":\"上海市\",\"coord\":[121.42561166015514,31.276043891906745]},{\"name\":\"浙江省\",\"coord\":[119.75337092707514,29.175934791564945]},{\"name\":\"湖南省\",\"coord\":[111.52770282777405,27.38110256195069]},{\"name\":\"江西省\",\"coord\":[115.51091280655628,27.283511161804206]},{\"name\":\"云南省\",\"coord\":[101.27053825991308,25.19783210754396]},{\"name\":\"贵州省\",\"coord\":[106.49672346773299,26.92267990112305]},{\"name\":\"福建省\",\"coord\":[117.9976766946587,25.939599990844727]},{\"name\":\"广西壮族自治区\",\"coord\":[108.98706831086302,23.891559600830078]},{\"name\":\"台湾省\",\"coord\":[120.82468432537434,23.602651596069336]},{\"name\":\"香港特别行政区\",\"coord\":[114.21036850371561,22.374858856201172]},{\"name\":\"海南省\",\"coord\":[109.62792940960824,19.163116455078125]},{\"name\":\"广东省\",\"coord\":[113.32127888266032,22.873867034912106]},{\"name\":\"澳门特别行政区\",\"coord\":[113.56819996291901,22.160347992976]}]");
- /***/ }),
- /***/ "2df9":
- /***/ (function(module, exports) {
- /**
- * lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- /** `Object#toString` result references. */
- var symbolTag = '[object Symbol]';
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objectToString = objectProto.toString;
- /**
- * The base implementation of methods like `_.max` and `_.min` which accepts a
- * `comparator` to determine the extremum value.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The iteratee invoked per iteration.
- * @param {Function} comparator The comparator used to compare values.
- * @returns {*} Returns the extremum value.
- */
- function baseExtremum(array, iteratee, comparator) {
- var index = -1,
- length = array.length;
- while (++index < length) {
- var value = array[index],
- current = iteratee(value);
- if (current != null && (computed === undefined
- ? (current === current && !isSymbol(current))
- : comparator(current, computed)
- )) {
- var computed = current,
- result = value;
- }
- }
- return result;
- }
- /**
- * The base implementation of `_.gt` which doesn't coerce arguments to numbers.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than `other`,
- * else `false`.
- */
- function baseGt(value, other) {
- return value > other;
- }
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
- }
- /**
- * This method returns the first argument given to it.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'user': 'fred' };
- *
- * _.identity(object) === object;
- * // => true
- */
- function identity(value) {
- return value;
- }
- /**
- * Computes the maximum value of `array`. If `array` is empty or falsey,
- * `undefined` is returned.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {*} Returns the maximum value.
- * @example
- *
- * _.max([4, 2, 8, 6]);
- * // => 8
- *
- * _.max([]);
- * // => undefined
- */
- function max(array) {
- return (array && array.length)
- ? baseExtremum(array, identity, baseGt)
- : undefined;
- }
- module.exports = max;
- /***/ }),
- /***/ "2ed5":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _mapEvent = _interopRequireDefault(__webpack_require__("3a8c"));
- var _globalEvent = _interopRequireDefault(__webpack_require__("fb6a"));
- var _vue = _interopRequireDefault(__webpack_require__("5643"));
- var _vuePropertyDecorator = __webpack_require__("e22c");
- var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
- var c = arguments.length,
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
- d;
- if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- }
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- function callHook(vm, hook) {
- var options = vm.constructor.options;
- options.mixins && options.mixins.forEach(function (mixin) {
- mixin[hook] && mixin[hook].call(vm, vm.$options.name);
- });
- options[hook] && options[hook].call(vm, vm);
- }
- var MapGetter =
- /*#__PURE__*/
- function (_Vue) {
- (0, _inherits2.default)(MapGetter, _Vue);
- function MapGetter() {
- (0, _classCallCheck2.default)(this, MapGetter);
- return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(MapGetter).apply(this, arguments));
- }
- (0, _createClass2.default)(MapGetter, [{
- key: "mapTargetChanged",
- value: function mapTargetChanged(newVal, oldVal) {
- if (newVal && oldVal && newVal !== oldVal) {
- callHook(this, 'removed');
- if (_mapEvent.default.$options.getMap(newVal)) {
- this.loadMap(newVal);
- }
- }
- }
- }, {
- key: "mounted",
- value: function mounted() {
- var targetName = this.getTargetName();
- if (_mapEvent.default.$options.getMap(targetName)) {
- this.loadMap(targetName);
- }
- _mapEvent.default.$on('load-map', this.loadMapSucceed);
- _globalEvent.default.$on('delete-map', this.deleteMapSucceed);
- }
- }, {
- key: "beforeDestroy",
- value: function beforeDestroy() {
- _mapEvent.default.$off('load-map', this.loadMapSucceed);
- _globalEvent.default.$off('delete-map', this.deleteMapSucceed);
- }
- }, {
- key: "loadMapSucceed",
- value: function loadMapSucceed(map, target) {
- var targetName = this.getTargetName();
- if (target === targetName) {
- this.loadMap(target);
- }
- }
- }, {
- key: "getTargetName",
- value: function getTargetName() {
- var selfParent = this.$parent;
- var parentTarget = selfParent && selfParent.$options.name && selfParent.$options.name.toLowerCase() === 'smwebmap' && selfParent.target;
- return this.mapTarget || parentTarget || Object.keys(_mapEvent.default.$options.getAllMaps())[0];
- }
- }, {
- key: "loadMap",
- value: function loadMap(targetName) {
- var _this = this;
- this.map = _mapEvent.default.$options.getMap(targetName);
- this.webmap = _mapEvent.default.$options.getWebMap(targetName);
- callHook(this, 'loaded');
- this.$nextTick(function () {
- _this.$emit('loaded');
- });
- }
- }, {
- key: "deleteMapSucceed",
- value: function deleteMapSucceed(target) {
- var targetName = this.getTargetName();
- if (target === targetName) {
- callHook(this, 'removed');
- this.map = null;
- this.webmap = null;
- this.viewModel && (this.viewModel = null);
- }
- }
- }, {
- key: "mapNotLoadedTip",
- value: function mapNotLoadedTip() {
- if (!this.map) {
- this.$message.destroy();
- this.$message.warning(this.$t('warning.unassociatedMap'));
- return true;
- }
- return false;
- }
- }]);
- return MapGetter;
- }(_vue.default);
- __decorate([(0, _vuePropertyDecorator.Prop)()], MapGetter.prototype, "mapTarget", void 0);
- __decorate([(0, _vuePropertyDecorator.Watch)('mapTarget')], MapGetter.prototype, "mapTargetChanged", null);
- MapGetter = __decorate([_vuePropertyDecorator.Component], MapGetter);
- var _default = MapGetter;
- exports.default = _default;
- /***/ }),
- /***/ "2efc":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /*!
- * vue-i18n v8.16.0
- * (c) 2020 kazuya kawaguchi
- * Released under the MIT License.
- */
- /* */
- /**
- * constants
- */
- var numberFormatKeys = [
- 'style',
- 'currency',
- 'currencyDisplay',
- 'useGrouping',
- 'minimumIntegerDigits',
- 'minimumFractionDigits',
- 'maximumFractionDigits',
- 'minimumSignificantDigits',
- 'maximumSignificantDigits',
- 'localeMatcher',
- 'formatMatcher',
- 'unit'
- ];
- /**
- * utilities
- */
- function warn (msg, err) {
- if (typeof console !== 'undefined') {
- console.warn('[vue-i18n] ' + msg);
- /* istanbul ignore if */
- if (err) {
- console.warn(err.stack);
- }
- }
- }
- function error (msg, err) {
- if (typeof console !== 'undefined') {
- console.error('[vue-i18n] ' + msg);
- /* istanbul ignore if */
- if (err) {
- console.error(err.stack);
- }
- }
- }
- function isObject (obj) {
- return obj !== null && typeof obj === 'object'
- }
- var toString = Object.prototype.toString;
- var OBJECT_STRING = '[object Object]';
- function isPlainObject (obj) {
- return toString.call(obj) === OBJECT_STRING
- }
- function isNull (val) {
- return val === null || val === undefined
- }
- function parseArgs () {
- var args = [], len = arguments.length;
- while ( len-- ) args[ len ] = arguments[ len ];
- var locale = null;
- var params = null;
- if (args.length === 1) {
- if (isObject(args[0]) || Array.isArray(args[0])) {
- params = args[0];
- } else if (typeof args[0] === 'string') {
- locale = args[0];
- }
- } else if (args.length === 2) {
- if (typeof args[0] === 'string') {
- locale = args[0];
- }
- /* istanbul ignore if */
- if (isObject(args[1]) || Array.isArray(args[1])) {
- params = args[1];
- }
- }
- return { locale: locale, params: params }
- }
- function looseClone (obj) {
- return JSON.parse(JSON.stringify(obj))
- }
- function remove (arr, item) {
- if (arr.length) {
- var index = arr.indexOf(item);
- if (index > -1) {
- return arr.splice(index, 1)
- }
- }
- }
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- function hasOwn (obj, key) {
- return hasOwnProperty.call(obj, key)
- }
- function merge (target) {
- var arguments$1 = arguments;
- var output = Object(target);
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments$1[i];
- if (source !== undefined && source !== null) {
- var key = (void 0);
- for (key in source) {
- if (hasOwn(source, key)) {
- if (isObject(source[key])) {
- output[key] = merge(output[key], source[key]);
- } else {
- output[key] = source[key];
- }
- }
- }
- }
- }
- return output
- }
- function looseEqual (a, b) {
- if (a === b) { return true }
- var isObjectA = isObject(a);
- var isObjectB = isObject(b);
- if (isObjectA && isObjectB) {
- try {
- var isArrayA = Array.isArray(a);
- var isArrayB = Array.isArray(b);
- if (isArrayA && isArrayB) {
- return a.length === b.length && a.every(function (e, i) {
- return looseEqual(e, b[i])
- })
- } else if (!isArrayA && !isArrayB) {
- var keysA = Object.keys(a);
- var keysB = Object.keys(b);
- return keysA.length === keysB.length && keysA.every(function (key) {
- return looseEqual(a[key], b[key])
- })
- } else {
- /* istanbul ignore next */
- return false
- }
- } catch (e) {
- /* istanbul ignore next */
- return false
- }
- } else if (!isObjectA && !isObjectB) {
- return String(a) === String(b)
- } else {
- return false
- }
- }
- /* */
- function extend (Vue) {
- if (!Vue.prototype.hasOwnProperty('$i18n')) {
- // $FlowFixMe
- Object.defineProperty(Vue.prototype, '$i18n', {
- get: function get () { return this._i18n }
- });
- }
- Vue.prototype.$t = function (key) {
- var values = [], len = arguments.length - 1;
- while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];
- var i18n = this.$i18n;
- return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))
- };
- Vue.prototype.$tc = function (key, choice) {
- var values = [], len = arguments.length - 2;
- while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];
- var i18n = this.$i18n;
- return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))
- };
- Vue.prototype.$te = function (key, locale) {
- var i18n = this.$i18n;
- return i18n._te(key, i18n.locale, i18n._getMessages(), locale)
- };
- Vue.prototype.$d = function (value) {
- var ref;
- var args = [], len = arguments.length - 1;
- while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
- return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))
- };
- Vue.prototype.$n = function (value) {
- var ref;
- var args = [], len = arguments.length - 1;
- while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
- return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))
- };
- }
- /* */
- var mixin = {
- beforeCreate: function beforeCreate () {
- var options = this.$options;
- options.i18n = options.i18n || (options.__i18n ? {} : null);
- if (options.i18n) {
- if (options.i18n instanceof VueI18n) {
- // init locale messages via custom blocks
- if (options.__i18n) {
- try {
- var localeMessages = {};
- options.__i18n.forEach(function (resource) {
- localeMessages = merge(localeMessages, JSON.parse(resource));
- });
- Object.keys(localeMessages).forEach(function (locale) {
- options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);
- });
- } catch (e) {
- if (false) {}
- }
- }
- this._i18n = options.i18n;
- this._i18nWatcher = this._i18n.watchI18nData();
- } else if (isPlainObject(options.i18n)) {
- // component local i18n
- if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {
- options.i18n.root = this.$root;
- options.i18n.formatter = this.$root.$i18n.formatter;
- options.i18n.fallbackLocale = this.$root.$i18n.fallbackLocale;
- options.i18n.formatFallbackMessages = this.$root.$i18n.formatFallbackMessages;
- options.i18n.silentTranslationWarn = this.$root.$i18n.silentTranslationWarn;
- options.i18n.silentFallbackWarn = this.$root.$i18n.silentFallbackWarn;
- options.i18n.pluralizationRules = this.$root.$i18n.pluralizationRules;
- options.i18n.preserveDirectiveContent = this.$root.$i18n.preserveDirectiveContent;
- }
- // init locale messages via custom blocks
- if (options.__i18n) {
- try {
- var localeMessages$1 = {};
- options.__i18n.forEach(function (resource) {
- localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));
- });
- options.i18n.messages = localeMessages$1;
- } catch (e) {
- if (false) {}
- }
- }
- var ref = options.i18n;
- var sharedMessages = ref.sharedMessages;
- if (sharedMessages && isPlainObject(sharedMessages)) {
- options.i18n.messages = merge(options.i18n.messages, sharedMessages);
- }
- this._i18n = new VueI18n(options.i18n);
- this._i18nWatcher = this._i18n.watchI18nData();
- if (options.i18n.sync === undefined || !!options.i18n.sync) {
- this._localeWatcher = this.$i18n.watchLocale();
- }
- } else {
- if (false) {}
- }
- } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {
- // root i18n
- this._i18n = this.$root.$i18n;
- } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {
- // parent i18n
- this._i18n = options.parent.$i18n;
- }
- },
- beforeMount: function beforeMount () {
- var options = this.$options;
- options.i18n = options.i18n || (options.__i18n ? {} : null);
- if (options.i18n) {
- if (options.i18n instanceof VueI18n) {
- // init locale messages via custom blocks
- this._i18n.subscribeDataChanging(this);
- this._subscribing = true;
- } else if (isPlainObject(options.i18n)) {
- this._i18n.subscribeDataChanging(this);
- this._subscribing = true;
- } else {
- if (false) {}
- }
- } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {
- this._i18n.subscribeDataChanging(this);
- this._subscribing = true;
- } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {
- this._i18n.subscribeDataChanging(this);
- this._subscribing = true;
- }
- },
- beforeDestroy: function beforeDestroy () {
- if (!this._i18n) { return }
- var self = this;
- this.$nextTick(function () {
- if (self._subscribing) {
- self._i18n.unsubscribeDataChanging(self);
- delete self._subscribing;
- }
- if (self._i18nWatcher) {
- self._i18nWatcher();
- self._i18n.destroyVM();
- delete self._i18nWatcher;
- }
- if (self._localeWatcher) {
- self._localeWatcher();
- delete self._localeWatcher;
- }
- self._i18n = null;
- });
- }
- };
- /* */
- var interpolationComponent = {
- name: 'i18n',
- functional: true,
- props: {
- tag: {
- type: String
- },
- path: {
- type: String,
- required: true
- },
- locale: {
- type: String
- },
- places: {
- type: [Array, Object]
- }
- },
- render: function render (h, ref) {
- var data = ref.data;
- var parent = ref.parent;
- var props = ref.props;
- var slots = ref.slots;
- var $i18n = parent.$i18n;
- if (!$i18n) {
- if (false) {}
- return
- }
- var path = props.path;
- var locale = props.locale;
- var places = props.places;
- var params = slots();
- var children = $i18n.i(
- path,
- locale,
- onlyHasDefaultPlace(params) || places
- ? useLegacyPlaces(params.default, places)
- : params
- );
- var tag = props.tag || 'span';
- return tag ? h(tag, data, children) : children
- }
- };
- function onlyHasDefaultPlace (params) {
- var prop;
- for (prop in params) {
- if (prop !== 'default') { return false }
- }
- return Boolean(prop)
- }
- function useLegacyPlaces (children, places) {
- var params = places ? createParamsFromPlaces(places) : {};
- if (!children) { return params }
- // Filter empty text nodes
- children = children.filter(function (child) {
- return child.tag || child.text.trim() !== ''
- });
- var everyPlace = children.every(vnodeHasPlaceAttribute);
- if (false) {}
- return children.reduce(
- everyPlace ? assignChildPlace : assignChildIndex,
- params
- )
- }
- function createParamsFromPlaces (places) {
- if (false) {}
- return Array.isArray(places)
- ? places.reduce(assignChildIndex, {})
- : Object.assign({}, places)
- }
- function assignChildPlace (params, child) {
- if (child.data && child.data.attrs && child.data.attrs.place) {
- params[child.data.attrs.place] = child;
- }
- return params
- }
- function assignChildIndex (params, child, index) {
- params[index] = child;
- return params
- }
- function vnodeHasPlaceAttribute (vnode) {
- return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)
- }
- /* */
- var numberComponent = {
- name: 'i18n-n',
- functional: true,
- props: {
- tag: {
- type: String,
- default: 'span'
- },
- value: {
- type: Number,
- required: true
- },
- format: {
- type: [String, Object]
- },
- locale: {
- type: String
- }
- },
- render: function render (h, ref) {
- var props = ref.props;
- var parent = ref.parent;
- var data = ref.data;
- var i18n = parent.$i18n;
- if (!i18n) {
- if (false) {}
- return null
- }
- var key = null;
- var options = null;
- if (typeof props.format === 'string') {
- key = props.format;
- } else if (isObject(props.format)) {
- if (props.format.key) {
- key = props.format.key;
- }
- // Filter out number format options only
- options = Object.keys(props.format).reduce(function (acc, prop) {
- var obj;
- if (numberFormatKeys.includes(prop)) {
- return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))
- }
- return acc
- }, null);
- }
- var locale = props.locale || i18n.locale;
- var parts = i18n._ntp(props.value, locale, key, options);
- var values = parts.map(function (part, index) {
- var obj;
- var slot = data.scopedSlots && data.scopedSlots[part.type];
- return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value
- });
- return h(props.tag, {
- attrs: data.attrs,
- 'class': data['class'],
- staticClass: data.staticClass
- }, values)
- }
- };
- /* */
- function bind (el, binding, vnode) {
- if (!assert(el, vnode)) { return }
- t(el, binding, vnode);
- }
- function update (el, binding, vnode, oldVNode) {
- if (!assert(el, vnode)) { return }
- var i18n = vnode.context.$i18n;
- if (localeEqual(el, vnode) &&
- (looseEqual(binding.value, binding.oldValue) &&
- looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }
- t(el, binding, vnode);
- }
- function unbind (el, binding, vnode, oldVNode) {
- var vm = vnode.context;
- if (!vm) {
- warn('Vue instance does not exists in VNode context');
- return
- }
- var i18n = vnode.context.$i18n || {};
- if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {
- el.textContent = '';
- }
- el._vt = undefined;
- delete el['_vt'];
- el._locale = undefined;
- delete el['_locale'];
- el._localeMessage = undefined;
- delete el['_localeMessage'];
- }
- function assert (el, vnode) {
- var vm = vnode.context;
- if (!vm) {
- warn('Vue instance does not exists in VNode context');
- return false
- }
- if (!vm.$i18n) {
- warn('VueI18n instance does not exists in Vue instance');
- return false
- }
- return true
- }
- function localeEqual (el, vnode) {
- var vm = vnode.context;
- return el._locale === vm.$i18n.locale
- }
- function t (el, binding, vnode) {
- var ref$1, ref$2;
- var value = binding.value;
- var ref = parseValue(value);
- var path = ref.path;
- var locale = ref.locale;
- var args = ref.args;
- var choice = ref.choice;
- if (!path && !locale && !args) {
- warn('value type not supported');
- return
- }
- if (!path) {
- warn('`path` is required in v-t directive');
- return
- }
- var vm = vnode.context;
- if (choice) {
- el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));
- } else {
- el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));
- }
- el._locale = vm.$i18n.locale;
- el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);
- }
- function parseValue (value) {
- var path;
- var locale;
- var args;
- var choice;
- if (typeof value === 'string') {
- path = value;
- } else if (isPlainObject(value)) {
- path = value.path;
- locale = value.locale;
- args = value.args;
- choice = value.choice;
- }
- return { path: path, locale: locale, args: args, choice: choice }
- }
- function makeParams (locale, args) {
- var params = [];
- locale && params.push(locale);
- if (args && (Array.isArray(args) || isPlainObject(args))) {
- params.push(args);
- }
- return params
- }
- var Vue;
- function install (_Vue) {
- /* istanbul ignore if */
- if (false) {}
- install.installed = true;
- Vue = _Vue;
- var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;
- /* istanbul ignore if */
- if (false) {}
- extend(Vue);
- Vue.mixin(mixin);
- Vue.directive('t', { bind: bind, update: update, unbind: unbind });
- Vue.component(interpolationComponent.name, interpolationComponent);
- Vue.component(numberComponent.name, numberComponent);
- // use simple mergeStrategies to prevent i18n instance lose '__proto__'
- var strats = Vue.config.optionMergeStrategies;
- strats.i18n = function (parentVal, childVal) {
- return childVal === undefined
- ? parentVal
- : childVal
- };
- }
- /* */
- var BaseFormatter = function BaseFormatter () {
- this._caches = Object.create(null);
- };
- BaseFormatter.prototype.interpolate = function interpolate (message, values) {
- if (!values) {
- return [message]
- }
- var tokens = this._caches[message];
- if (!tokens) {
- tokens = parse(message);
- this._caches[message] = tokens;
- }
- return compile(tokens, values)
- };
- var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
- var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
- function parse (format) {
- var tokens = [];
- var position = 0;
- var text = '';
- while (position < format.length) {
- var char = format[position++];
- if (char === '{') {
- if (text) {
- tokens.push({ type: 'text', value: text });
- }
- text = '';
- var sub = '';
- char = format[position++];
- while (char !== undefined && char !== '}') {
- sub += char;
- char = format[position++];
- }
- var isClosed = char === '}';
- var type = RE_TOKEN_LIST_VALUE.test(sub)
- ? 'list'
- : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)
- ? 'named'
- : 'unknown';
- tokens.push({ value: sub, type: type });
- } else if (char === '%') {
- // when found rails i18n syntax, skip text capture
- if (format[(position)] !== '{') {
- text += char;
- }
- } else {
- text += char;
- }
- }
- text && tokens.push({ type: 'text', value: text });
- return tokens
- }
- function compile (tokens, values) {
- var compiled = [];
- var index = 0;
- var mode = Array.isArray(values)
- ? 'list'
- : isObject(values)
- ? 'named'
- : 'unknown';
- if (mode === 'unknown') { return compiled }
- while (index < tokens.length) {
- var token = tokens[index];
- switch (token.type) {
- case 'text':
- compiled.push(token.value);
- break
- case 'list':
- compiled.push(values[parseInt(token.value, 10)]);
- break
- case 'named':
- if (mode === 'named') {
- compiled.push((values)[token.value]);
- } else {
- if (false) {}
- }
- break
- case 'unknown':
- if (false) {}
- break
- }
- index++;
- }
- return compiled
- }
- /* */
- /**
- * Path parser
- * - Inspired:
- * Vue.js Path parser
- */
- // actions
- var APPEND = 0;
- var PUSH = 1;
- var INC_SUB_PATH_DEPTH = 2;
- var PUSH_SUB_PATH = 3;
- // states
- var BEFORE_PATH = 0;
- var IN_PATH = 1;
- var BEFORE_IDENT = 2;
- var IN_IDENT = 3;
- var IN_SUB_PATH = 4;
- var IN_SINGLE_QUOTE = 5;
- var IN_DOUBLE_QUOTE = 6;
- var AFTER_PATH = 7;
- var ERROR = 8;
- var pathStateMachine = [];
- pathStateMachine[BEFORE_PATH] = {
- 'ws': [BEFORE_PATH],
- 'ident': [IN_IDENT, APPEND],
- '[': [IN_SUB_PATH],
- 'eof': [AFTER_PATH]
- };
- pathStateMachine[IN_PATH] = {
- 'ws': [IN_PATH],
- '.': [BEFORE_IDENT],
- '[': [IN_SUB_PATH],
- 'eof': [AFTER_PATH]
- };
- pathStateMachine[BEFORE_IDENT] = {
- 'ws': [BEFORE_IDENT],
- 'ident': [IN_IDENT, APPEND],
- '0': [IN_IDENT, APPEND],
- 'number': [IN_IDENT, APPEND]
- };
- pathStateMachine[IN_IDENT] = {
- 'ident': [IN_IDENT, APPEND],
- '0': [IN_IDENT, APPEND],
- 'number': [IN_IDENT, APPEND],
- 'ws': [IN_PATH, PUSH],
- '.': [BEFORE_IDENT, PUSH],
- '[': [IN_SUB_PATH, PUSH],
- 'eof': [AFTER_PATH, PUSH]
- };
- pathStateMachine[IN_SUB_PATH] = {
- "'": [IN_SINGLE_QUOTE, APPEND],
- '"': [IN_DOUBLE_QUOTE, APPEND],
- '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],
- ']': [IN_PATH, PUSH_SUB_PATH],
- 'eof': ERROR,
- 'else': [IN_SUB_PATH, APPEND]
- };
- pathStateMachine[IN_SINGLE_QUOTE] = {
- "'": [IN_SUB_PATH, APPEND],
- 'eof': ERROR,
- 'else': [IN_SINGLE_QUOTE, APPEND]
- };
- pathStateMachine[IN_DOUBLE_QUOTE] = {
- '"': [IN_SUB_PATH, APPEND],
- 'eof': ERROR,
- 'else': [IN_DOUBLE_QUOTE, APPEND]
- };
- /**
- * Check if an expression is a literal value.
- */
- var literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
- function isLiteral (exp) {
- return literalValueRE.test(exp)
- }
- /**
- * Strip quotes from a string
- */
- function stripQuotes (str) {
- var a = str.charCodeAt(0);
- var b = str.charCodeAt(str.length - 1);
- return a === b && (a === 0x22 || a === 0x27)
- ? str.slice(1, -1)
- : str
- }
- /**
- * Determine the type of a character in a keypath.
- */
- function getPathCharType (ch) {
- if (ch === undefined || ch === null) { return 'eof' }
- var code = ch.charCodeAt(0);
- switch (code) {
- case 0x5B: // [
- case 0x5D: // ]
- case 0x2E: // .
- case 0x22: // "
- case 0x27: // '
- return ch
- case 0x5F: // _
- case 0x24: // $
- case 0x2D: // -
- return 'ident'
- case 0x09: // Tab
- case 0x0A: // Newline
- case 0x0D: // Return
- case 0xA0: // No-break space
- case 0xFEFF: // Byte Order Mark
- case 0x2028: // Line Separator
- case 0x2029: // Paragraph Separator
- return 'ws'
- }
- return 'ident'
- }
- /**
- * Format a subPath, return its plain form if it is
- * a literal string or number. Otherwise prepend the
- * dynamic indicator (*).
- */
- function formatSubPath (path) {
- var trimmed = path.trim();
- // invalid leading 0
- if (path.charAt(0) === '0' && isNaN(path)) { return false }
- return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed
- }
- /**
- * Parse a string path into an array of segments
- */
- function parse$1 (path) {
- var keys = [];
- var index = -1;
- var mode = BEFORE_PATH;
- var subPathDepth = 0;
- var c;
- var key;
- var newChar;
- var type;
- var transition;
- var action;
- var typeMap;
- var actions = [];
- actions[PUSH] = function () {
- if (key !== undefined) {
- keys.push(key);
- key = undefined;
- }
- };
- actions[APPEND] = function () {
- if (key === undefined) {
- key = newChar;
- } else {
- key += newChar;
- }
- };
- actions[INC_SUB_PATH_DEPTH] = function () {
- actions[APPEND]();
- subPathDepth++;
- };
- actions[PUSH_SUB_PATH] = function () {
- if (subPathDepth > 0) {
- subPathDepth--;
- mode = IN_SUB_PATH;
- actions[APPEND]();
- } else {
- subPathDepth = 0;
- if (key === undefined) { return false }
- key = formatSubPath(key);
- if (key === false) {
- return false
- } else {
- actions[PUSH]();
- }
- }
- };
- function maybeUnescapeQuote () {
- var nextChar = path[index + 1];
- if ((mode === IN_SINGLE_QUOTE && nextChar === "'") ||
- (mode === IN_DOUBLE_QUOTE && nextChar === '"')) {
- index++;
- newChar = '\\' + nextChar;
- actions[APPEND]();
- return true
- }
- }
- while (mode !== null) {
- index++;
- c = path[index];
- if (c === '\\' && maybeUnescapeQuote()) {
- continue
- }
- type = getPathCharType(c);
- typeMap = pathStateMachine[mode];
- transition = typeMap[type] || typeMap['else'] || ERROR;
- if (transition === ERROR) {
- return // parse error
- }
- mode = transition[0];
- action = actions[transition[1]];
- if (action) {
- newChar = transition[2];
- newChar = newChar === undefined
- ? c
- : newChar;
- if (action() === false) {
- return
- }
- }
- if (mode === AFTER_PATH) {
- return keys
- }
- }
- }
- var I18nPath = function I18nPath () {
- this._cache = Object.create(null);
- };
- /**
- * External parse that check for a cache hit first
- */
- I18nPath.prototype.parsePath = function parsePath (path) {
- var hit = this._cache[path];
- if (!hit) {
- hit = parse$1(path);
- if (hit) {
- this._cache[path] = hit;
- }
- }
- return hit || []
- };
- /**
- * Get path value from path string
- */
- I18nPath.prototype.getPathValue = function getPathValue (obj, path) {
- if (!isObject(obj)) { return null }
- var paths = this.parsePath(path);
- if (paths.length === 0) {
- return null
- } else {
- var length = paths.length;
- var last = obj;
- var i = 0;
- while (i < length) {
- var value = last[paths[i]];
- if (value === undefined) {
- return null
- }
- last = value;
- i++;
- }
- return last
- }
- };
- /* */
- var htmlTagMatcher = /<\/?[\w\s="/.':;#-\/]+>/;
- var linkKeyMatcher = /(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g;
- var linkKeyPrefixMatcher = /^@(?:\.([a-z]+))?:/;
- var bracketsMatcher = /[()]/g;
- var defaultModifiers = {
- 'upper': function (str) { return str.toLocaleUpperCase(); },
- 'lower': function (str) { return str.toLocaleLowerCase(); },
- 'capitalize': function (str) { return ("" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }
- };
- var defaultFormatter = new BaseFormatter();
- var VueI18n = function VueI18n (options) {
- var this$1 = this;
- if ( options === void 0 ) options = {};
- // Auto install if it is not done yet and `window` has `Vue`.
- // To allow users to avoid auto-installation in some cases,
- // this code should be placed here. See #290
- /* istanbul ignore if */
- if (!Vue && typeof window !== 'undefined' && window.Vue) {
- install(window.Vue);
- }
- var locale = options.locale || 'en-US';
- var fallbackLocale = options.fallbackLocale || 'en-US';
- var messages = options.messages || {};
- var dateTimeFormats = options.dateTimeFormats || {};
- var numberFormats = options.numberFormats || {};
- this._vm = null;
- this._formatter = options.formatter || defaultFormatter;
- this._modifiers = options.modifiers || {};
- this._missing = options.missing || null;
- this._root = options.root || null;
- this._sync = options.sync === undefined ? true : !!options.sync;
- this._fallbackRoot = options.fallbackRoot === undefined
- ? true
- : !!options.fallbackRoot;
- this._formatFallbackMessages = options.formatFallbackMessages === undefined
- ? false
- : !!options.formatFallbackMessages;
- this._silentTranslationWarn = options.silentTranslationWarn === undefined
- ? false
- : options.silentTranslationWarn;
- this._silentFallbackWarn = options.silentFallbackWarn === undefined
- ? false
- : !!options.silentFallbackWarn;
- this._dateTimeFormatters = {};
- this._numberFormatters = {};
- this._path = new I18nPath();
- this._dataListeners = [];
- this._preserveDirectiveContent = options.preserveDirectiveContent === undefined
- ? false
- : !!options.preserveDirectiveContent;
- this.pluralizationRules = options.pluralizationRules || {};
- this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';
- this._postTranslation = options.postTranslation || null;
- this._exist = function (message, key) {
- if (!message || !key) { return false }
- if (!isNull(this$1._path.getPathValue(message, key))) { return true }
- // fallback for flat key
- if (message[key]) { return true }
- return false
- };
- if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {
- Object.keys(messages).forEach(function (locale) {
- this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);
- });
- }
- this._initVM({
- locale: locale,
- fallbackLocale: fallbackLocale,
- messages: messages,
- dateTimeFormats: dateTimeFormats,
- numberFormats: numberFormats
- });
- };
- var prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true } };
- VueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {
- var paths = [];
- var fn = function (level, locale, message, paths) {
- if (isPlainObject(message)) {
- Object.keys(message).forEach(function (key) {
- var val = message[key];
- if (isPlainObject(val)) {
- paths.push(key);
- paths.push('.');
- fn(level, locale, val, paths);
- paths.pop();
- paths.pop();
- } else {
- paths.push(key);
- fn(level, locale, val, paths);
- paths.pop();
- }
- });
- } else if (Array.isArray(message)) {
- message.forEach(function (item, index) {
- if (isPlainObject(item)) {
- paths.push(("[" + index + "]"));
- paths.push('.');
- fn(level, locale, item, paths);
- paths.pop();
- paths.pop();
- } else {
- paths.push(("[" + index + "]"));
- fn(level, locale, item, paths);
- paths.pop();
- }
- });
- } else if (typeof message === 'string') {
- var ret = htmlTagMatcher.test(message);
- if (ret) {
- var msg = "Detected HTML in message '" + message + "' of keypath '" + (paths.join('')) + "' at '" + locale + "'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";
- if (level === 'warn') {
- warn(msg);
- } else if (level === 'error') {
- error(msg);
- }
- }
- }
- };
- fn(level, locale, message, paths);
- };
- VueI18n.prototype._initVM = function _initVM (data) {
- var silent = Vue.config.silent;
- Vue.config.silent = true;
- this._vm = new Vue({ data: data });
- Vue.config.silent = silent;
- };
- VueI18n.prototype.destroyVM = function destroyVM () {
- this._vm.$destroy();
- };
- VueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {
- this._dataListeners.push(vm);
- };
- VueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {
- remove(this._dataListeners, vm);
- };
- VueI18n.prototype.watchI18nData = function watchI18nData () {
- var self = this;
- return this._vm.$watch('$data', function () {
- var i = self._dataListeners.length;
- while (i--) {
- Vue.nextTick(function () {
- self._dataListeners[i] && self._dataListeners[i].$forceUpdate();
- });
- }
- }, { deep: true })
- };
- VueI18n.prototype.watchLocale = function watchLocale () {
- /* istanbul ignore if */
- if (!this._sync || !this._root) { return null }
- var target = this._vm;
- return this._root.$i18n.vm.$watch('locale', function (val) {
- target.$set(target, 'locale', val);
- target.$forceUpdate();
- }, { immediate: true })
- };
- prototypeAccessors.vm.get = function () { return this._vm };
- prototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };
- prototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };
- prototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };
- prototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };
- prototypeAccessors.locale.get = function () { return this._vm.locale };
- prototypeAccessors.locale.set = function (locale) {
- this._vm.$set(this._vm, 'locale', locale);
- };
- prototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };
- prototypeAccessors.fallbackLocale.set = function (locale) {
- this._vm.$set(this._vm, 'fallbackLocale', locale);
- };
- prototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };
- prototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };
- prototypeAccessors.missing.get = function () { return this._missing };
- prototypeAccessors.missing.set = function (handler) { this._missing = handler; };
- prototypeAccessors.formatter.get = function () { return this._formatter };
- prototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };
- prototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };
- prototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };
- prototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };
- prototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };
- prototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };
- prototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };
- prototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };
- prototypeAccessors.warnHtmlInMessage.set = function (level) {
- var this$1 = this;
- var orgLevel = this._warnHtmlInMessage;
- this._warnHtmlInMessage = level;
- if (orgLevel !== level && (level === 'warn' || level === 'error')) {
- var messages = this._getMessages();
- Object.keys(messages).forEach(function (locale) {
- this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);
- });
- }
- };
- prototypeAccessors.postTranslation.get = function () { return this._postTranslation };
- prototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };
- VueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };
- VueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };
- VueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };
- VueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {
- if (!isNull(result)) { return result }
- if (this._missing) {
- var missingRet = this._missing.apply(null, [locale, key, vm, values]);
- if (typeof missingRet === 'string') {
- return missingRet
- }
- } else {
- if (false) {}
- }
- if (this._formatFallbackMessages) {
- var parsedArgs = parseArgs.apply(void 0, values);
- return this._render(key, interpolateMode, parsedArgs.params, key)
- } else {
- return key
- }
- };
- VueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {
- return !val && !isNull(this._root) && this._fallbackRoot
- };
- VueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {
- return this._silentFallbackWarn instanceof RegExp
- ? this._silentFallbackWarn.test(key)
- : this._silentFallbackWarn
- };
- VueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {
- return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)
- };
- VueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {
- return this._silentTranslationWarn instanceof RegExp
- ? this._silentTranslationWarn.test(key)
- : this._silentTranslationWarn
- };
- VueI18n.prototype._interpolate = function _interpolate (
- locale,
- message,
- key,
- host,
- interpolateMode,
- values,
- visitedLinkStack
- ) {
- if (!message) { return null }
- var pathRet = this._path.getPathValue(message, key);
- if (Array.isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }
- var ret;
- if (isNull(pathRet)) {
- /* istanbul ignore else */
- if (isPlainObject(message)) {
- ret = message[key];
- if (typeof ret !== 'string') {
- if (false) {}
- return null
- }
- } else {
- return null
- }
- } else {
- /* istanbul ignore else */
- if (typeof pathRet === 'string') {
- ret = pathRet;
- } else {
- if (false) {}
- return null
- }
- }
- // Check for the existence of links within the translated string
- if (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0) {
- ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);
- }
- return this._render(ret, interpolateMode, values, key)
- };
- VueI18n.prototype._link = function _link (
- locale,
- message,
- str,
- host,
- interpolateMode,
- values,
- visitedLinkStack
- ) {
- var ret = str;
- // Match all the links within the local
- // We are going to replace each of
- // them with its translation
- var matches = ret.match(linkKeyMatcher);
- for (var idx in matches) {
- // ie compatible: filter custom array
- // prototype method
- if (!matches.hasOwnProperty(idx)) {
- continue
- }
- var link = matches[idx];
- var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);
- var linkPrefix = linkKeyPrefixMatches[0];
- var formatterName = linkKeyPrefixMatches[1];
- // Remove the leading @:, @.case: and the brackets
- var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');
- if (visitedLinkStack.includes(linkPlaceholder)) {
- if (false) {}
- return ret
- }
- visitedLinkStack.push(linkPlaceholder);
- // Translate the link
- var translated = this._interpolate(
- locale, message, linkPlaceholder, host,
- interpolateMode === 'raw' ? 'string' : interpolateMode,
- interpolateMode === 'raw' ? undefined : values,
- visitedLinkStack
- );
- if (this._isFallbackRoot(translated)) {
- if (false) {}
- /* istanbul ignore if */
- if (!this._root) { throw Error('unexpected error') }
- var root = this._root.$i18n;
- translated = root._translate(
- root._getMessages(), root.locale, root.fallbackLocale,
- linkPlaceholder, host, interpolateMode, values
- );
- }
- translated = this._warnDefault(
- locale, linkPlaceholder, translated, host,
- Array.isArray(values) ? values : [values],
- interpolateMode
- );
- if (this._modifiers.hasOwnProperty(formatterName)) {
- translated = this._modifiers[formatterName](translated);
- } else if (defaultModifiers.hasOwnProperty(formatterName)) {
- translated = defaultModifiers[formatterName](translated);
- }
- visitedLinkStack.pop();
- // Replace the link with the translated
- ret = !translated ? ret : ret.replace(link, translated);
- }
- return ret
- };
- VueI18n.prototype._render = function _render (message, interpolateMode, values, path) {
- var ret = this._formatter.interpolate(message, values, path);
- // If the custom formatter refuses to work - apply the default one
- if (!ret) {
- ret = defaultFormatter.interpolate(message, values, path);
- }
- // if interpolateMode is **not** 'string' ('row'),
- // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter
- return interpolateMode === 'string' && typeof ret !== 'string' ? ret.join('') : ret
- };
- VueI18n.prototype._translate = function _translate (
- messages,
- locale,
- fallback,
- key,
- host,
- interpolateMode,
- args
- ) {
- var res =
- this._interpolate(locale, messages[locale], key, host, interpolateMode, args, [key]);
- if (!isNull(res)) { return res }
- res = this._interpolate(fallback, messages[fallback], key, host, interpolateMode, args, [key]);
- if (!isNull(res)) {
- if (false) {}
- return res
- } else {
- return null
- }
- };
- VueI18n.prototype._t = function _t (key, _locale, messages, host) {
- var ref;
- var values = [], len = arguments.length - 4;
- while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];
- if (!key) { return '' }
- var parsedArgs = parseArgs.apply(void 0, values);
- var locale = parsedArgs.locale || _locale;
- var ret = this._translate(
- messages, locale, this.fallbackLocale, key,
- host, 'string', parsedArgs.params
- );
- if (this._isFallbackRoot(ret)) {
- if (false) {}
- /* istanbul ignore if */
- if (!this._root) { throw Error('unexpected error') }
- return (ref = this._root).$t.apply(ref, [ key ].concat( values ))
- } else {
- ret = this._warnDefault(locale, key, ret, host, values, 'string');
- if (this._postTranslation) {
- ret = this._postTranslation(ret);
- }
- return ret
- }
- };
- VueI18n.prototype.t = function t (key) {
- var ref;
- var values = [], len = arguments.length - 1;
- while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];
- return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))
- };
- VueI18n.prototype._i = function _i (key, locale, messages, host, values) {
- var ret =
- this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);
- if (this._isFallbackRoot(ret)) {
- if (false) {}
- if (!this._root) { throw Error('unexpected error') }
- return this._root.$i18n.i(key, locale, values)
- } else {
- return this._warnDefault(locale, key, ret, host, [values], 'raw')
- }
- };
- VueI18n.prototype.i = function i (key, locale, values) {
- /* istanbul ignore if */
- if (!key) { return '' }
- if (typeof locale !== 'string') {
- locale = this.locale;
- }
- return this._i(key, locale, this._getMessages(), null, values)
- };
- VueI18n.prototype._tc = function _tc (
- key,
- _locale,
- messages,
- host,
- choice
- ) {
- var ref;
- var values = [], len = arguments.length - 5;
- while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];
- if (!key) { return '' }
- if (choice === undefined) {
- choice = 1;
- }
- var predefined = { 'count': choice, 'n': choice };
- var parsedArgs = parseArgs.apply(void 0, values);
- parsedArgs.params = Object.assign(predefined, parsedArgs.params);
- values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];
- return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)
- };
- VueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {
- /* istanbul ignore if */
- if (!message && typeof message !== 'string') { return null }
- var choices = message.split('|');
- choice = this.getChoiceIndex(choice, choices.length);
- if (!choices[choice]) { return message }
- return choices[choice].trim()
- };
- /**
- * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`
- * @param choicesLength {number} an overall amount of available choices
- * @returns a final choice index
- */
- VueI18n.prototype.getChoiceIndex = function getChoiceIndex (choice, choicesLength) {
- // Default (old) getChoiceIndex implementation - english-compatible
- var defaultImpl = function (_choice, _choicesLength) {
- _choice = Math.abs(_choice);
- if (_choicesLength === 2) {
- return _choice
- ? _choice > 1
- ? 1
- : 0
- : 1
- }
- return _choice ? Math.min(_choice, 2) : 0
- };
- if (this.locale in this.pluralizationRules) {
- return this.pluralizationRules[this.locale].apply(this, [choice, choicesLength])
- } else {
- return defaultImpl(choice, choicesLength)
- }
- };
- VueI18n.prototype.tc = function tc (key, choice) {
- var ref;
- var values = [], len = arguments.length - 2;
- while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];
- return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))
- };
- VueI18n.prototype._te = function _te (key, locale, messages) {
- var args = [], len = arguments.length - 3;
- while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];
- var _locale = parseArgs.apply(void 0, args).locale || locale;
- return this._exist(messages[_locale], key)
- };
- VueI18n.prototype.te = function te (key, locale) {
- return this._te(key, this.locale, this._getMessages(), locale)
- };
- VueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {
- return looseClone(this._vm.messages[locale] || {})
- };
- VueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {
- if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {
- this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);
- }
- this._vm.$set(this._vm.messages, locale, message);
- };
- VueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {
- if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {
- this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);
- }
- this._vm.$set(this._vm.messages, locale, merge({}, this._vm.messages[locale] || {}, message));
- };
- VueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {
- return looseClone(this._vm.dateTimeFormats[locale] || {})
- };
- VueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {
- this._vm.$set(this._vm.dateTimeFormats, locale, format);
- };
- VueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {
- this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));
- };
- VueI18n.prototype._localizeDateTime = function _localizeDateTime (
- value,
- locale,
- fallback,
- dateTimeFormats,
- key
- ) {
- var _locale = locale;
- var formats = dateTimeFormats[_locale];
- // fallback locale
- if (isNull(formats) || isNull(formats[key])) {
- if (false) {}
- _locale = fallback;
- formats = dateTimeFormats[_locale];
- }
- if (isNull(formats) || isNull(formats[key])) {
- return null
- } else {
- var format = formats[key];
- var id = _locale + "__" + key;
- var formatter = this._dateTimeFormatters[id];
- if (!formatter) {
- formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);
- }
- return formatter.format(value)
- }
- };
- VueI18n.prototype._d = function _d (value, locale, key) {
- /* istanbul ignore if */
- if (false) {}
- if (!key) {
- return new Intl.DateTimeFormat(locale).format(value)
- }
- var ret =
- this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key);
- if (this._isFallbackRoot(ret)) {
- if (false) {}
- /* istanbul ignore if */
- if (!this._root) { throw Error('unexpected error') }
- return this._root.$i18n.d(value, key, locale)
- } else {
- return ret || ''
- }
- };
- VueI18n.prototype.d = function d (value) {
- var args = [], len = arguments.length - 1;
- while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
- var locale = this.locale;
- var key = null;
- if (args.length === 1) {
- if (typeof args[0] === 'string') {
- key = args[0];
- } else if (isObject(args[0])) {
- if (args[0].locale) {
- locale = args[0].locale;
- }
- if (args[0].key) {
- key = args[0].key;
- }
- }
- } else if (args.length === 2) {
- if (typeof args[0] === 'string') {
- key = args[0];
- }
- if (typeof args[1] === 'string') {
- locale = args[1];
- }
- }
- return this._d(value, locale, key)
- };
- VueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {
- return looseClone(this._vm.numberFormats[locale] || {})
- };
- VueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {
- this._vm.$set(this._vm.numberFormats, locale, format);
- this._clearNumberFormat(locale, format);
- };
- VueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {
- this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));
- this._clearNumberFormat(locale, format);
- };
- VueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {
- for (var key in format) {
- var id = locale + "__" + key;
- if (!this._numberFormatters.hasOwnProperty(id)) {
- continue
- }
- delete this._numberFormatters[id];
- }
- };
- VueI18n.prototype._getNumberFormatter = function _getNumberFormatter (
- value,
- locale,
- fallback,
- numberFormats,
- key,
- options
- ) {
- var _locale = locale;
- var formats = numberFormats[_locale];
- // fallback locale
- if (isNull(formats) || isNull(formats[key])) {
- if (false) {}
- _locale = fallback;
- formats = numberFormats[_locale];
- }
- if (isNull(formats) || isNull(formats[key])) {
- return null
- } else {
- var format = formats[key];
- var formatter;
- if (options) {
- // If options specified - create one time number formatter
- formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));
- } else {
- var id = _locale + "__" + key;
- formatter = this._numberFormatters[id];
- if (!formatter) {
- formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);
- }
- }
- return formatter
- }
- };
- VueI18n.prototype._n = function _n (value, locale, key, options) {
- /* istanbul ignore if */
- if (!VueI18n.availabilities.numberFormat) {
- if (false) {}
- return ''
- }
- if (!key) {
- var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);
- return nf.format(value)
- }
- var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);
- var ret = formatter && formatter.format(value);
- if (this._isFallbackRoot(ret)) {
- if (false) {}
- /* istanbul ignore if */
- if (!this._root) { throw Error('unexpected error') }
- return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))
- } else {
- return ret || ''
- }
- };
- VueI18n.prototype.n = function n (value) {
- var args = [], len = arguments.length - 1;
- while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
- var locale = this.locale;
- var key = null;
- var options = null;
- if (args.length === 1) {
- if (typeof args[0] === 'string') {
- key = args[0];
- } else if (isObject(args[0])) {
- if (args[0].locale) {
- locale = args[0].locale;
- }
- if (args[0].key) {
- key = args[0].key;
- }
- // Filter out number format options only
- options = Object.keys(args[0]).reduce(function (acc, key) {
- var obj;
- if (numberFormatKeys.includes(key)) {
- return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))
- }
- return acc
- }, null);
- }
- } else if (args.length === 2) {
- if (typeof args[0] === 'string') {
- key = args[0];
- }
- if (typeof args[1] === 'string') {
- locale = args[1];
- }
- }
- return this._n(value, locale, key, options)
- };
- VueI18n.prototype._ntp = function _ntp (value, locale, key, options) {
- /* istanbul ignore if */
- if (!VueI18n.availabilities.numberFormat) {
- if (false) {}
- return []
- }
- if (!key) {
- var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);
- return nf.formatToParts(value)
- }
- var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);
- var ret = formatter && formatter.formatToParts(value);
- if (this._isFallbackRoot(ret)) {
- if (false) {}
- /* istanbul ignore if */
- if (!this._root) { throw Error('unexpected error') }
- return this._root.$i18n._ntp(value, locale, key, options)
- } else {
- return ret || []
- }
- };
- Object.defineProperties( VueI18n.prototype, prototypeAccessors );
- var availabilities;
- // $FlowFixMe
- Object.defineProperty(VueI18n, 'availabilities', {
- get: function get () {
- if (!availabilities) {
- var intlDefined = typeof Intl !== 'undefined';
- availabilities = {
- dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',
- numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'
- };
- }
- return availabilities
- }
- });
- VueI18n.install = install;
- VueI18n.version = '8.16.0';
- /* harmony default export */ __webpack_exports__["default"] = (VueI18n);
- /***/ }),
- /***/ "2f66":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _lang = __webpack_require__("4e21");
- var RestParameter = function RestParameter(options) {
- (0, _classCallCheck2.default)(this, RestParameter);
- this.url = options.url;
- this.type = 'rest';
- this.attributeFilter = options.attributeFilter || null;
- this.maxFeatures = options.maxFeatures || 20;
- this.name = options.name || (0, _lang.geti18n)().t('commontypes.restData');
- this.proxy = options.proxy;
- };
- exports.default = RestParameter;
- /***/ }),
- /***/ "2f96":
- /***/ (function(module, exports, __webpack_require__) {
- var helper = __webpack_require__("cabd");
- var xml2js = __webpack_require__("98c2");
- function validateOptions (userOptions) {
- var options = helper.copyOptions(userOptions);
- helper.ensureSpacesExists(options);
- return options;
- }
- module.exports = function(xml, userOptions) {
- var options, js, json, parentKey;
- options = validateOptions(userOptions);
- js = xml2js(xml, options);
- parentKey = 'compact' in options && options.compact ? '_parent' : 'parent';
- // parentKey = ptions.compact ? '_parent' : 'parent'; // consider this
- if ('addParent' in options && options.addParent) {
- json = JSON.stringify(js, function (k, v) { return k === parentKey? '_' : v; }, options.spaces);
- } else {
- json = JSON.stringify(js, null, options.spaces);
- }
- return json.replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
- };
- /***/ }),
- /***/ "30f7":
- /***/ (function(module, exports) {
- /**
- * lodash 3.0.3 (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
- /** `Object#toString` result references. */
- var numberTag = '[object Number]';
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
- /**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objectToString = objectProto.toString;
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
- /**
- * Checks if `value` is classified as a `Number` primitive or object.
- *
- * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
- * as numbers, use the `_.isFinite` method.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isNumber(3);
- * // => true
- *
- * _.isNumber(Number.MIN_VALUE);
- * // => true
- *
- * _.isNumber(Infinity);
- * // => true
- *
- * _.isNumber('3');
- * // => false
- */
- function isNumber(value) {
- return typeof value == 'number' ||
- (isObjectLike(value) && objectToString.call(value) == numberTag);
- }
- module.exports = isNumber;
- /***/ }),
- /***/ "31ff":
- /***/ (function(module, exports) {
- function _arrayWithHoles(arr) {
- if (Array.isArray(arr)) return arr;
- }
- module.exports = _arrayWithHoles;
- /***/ }),
- /***/ "32bc":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _util = __webpack_require__("1448");
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- //
- //
- //
- //
- //
- //
- var _default = {
- name: 'SmTimeText',
- mixins: [_theme.default],
- props: {
- timeType: {
- type: String,
- default: 'date' // "date+second" "date+second+week"
- },
- fontStyle: {
- type: Object
- }
- },
- data: function data() {
- return {
- time: '',
- timeInterval: null
- };
- },
- watch: {
- timeType: function timeType() {
- this.initTime(this.timeType);
- }
- },
- mounted: function mounted() {
- this.initTime(this.timeType);
- },
- destroyed: function destroyed() {
- clearInterval(this.timeInterval);
- },
- methods: {
- // 初始化
- initTime: function initTime(timeType) {
- var _this = this;
- clearInterval(this.timeInterval);
- this.time = (0, _util.getDateTime)(timeType);
- this.timeInterval = setInterval(function () {
- _this.time = (0, _util.getDateTime)(timeType);
- }, 1000);
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "331f":
- /***/ (function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__("d3a8"),
- now = __webpack_require__("d201"),
- toNumber = __webpack_require__("b9e2");
- /** Error message constants. */
- var FUNC_ERROR_TEXT = 'Expected a function';
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeMax = Math.max,
- nativeMin = Math.min;
- /**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed `func` invocations and a `flush` method to immediately invoke them.
- * Provide `options` to indicate whether `func` should be invoked on the
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
- * with the last arguments provided to the debounced function. Subsequent
- * calls to the debounced function return the result of the last `func`
- * invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the debounced function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=false]
- * Specify invoking on the leading edge of the timeout.
- * @param {number} [options.maxWait]
- * The maximum time `func` is allowed to be delayed before it's invoked.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // Avoid costly calculations while the window size is in flux.
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', debounced);
- *
- * // Cancel the trailing debounced invocation.
- * jQuery(window).on('popstate', debounced.cancel);
- */
- function debounce(func, wait, options) {
- var lastArgs,
- lastThis,
- maxWait,
- result,
- timerId,
- lastCallTime,
- lastInvokeTime = 0,
- leading = false,
- maxing = false,
- trailing = true;
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = toNumber(wait) || 0;
- if (isObject(options)) {
- leading = !!options.leading;
- maxing = 'maxWait' in options;
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- function invokeFunc(time) {
- var args = lastArgs,
- thisArg = lastThis;
- lastArgs = lastThis = undefined;
- lastInvokeTime = time;
- result = func.apply(thisArg, args);
- return result;
- }
- function leadingEdge(time) {
- // Reset any `maxWait` timer.
- lastInvokeTime = time;
- // Start the timer for the trailing edge.
- timerId = setTimeout(timerExpired, wait);
- // Invoke the leading edge.
- return leading ? invokeFunc(time) : result;
- }
- function remainingWait(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime,
- timeWaiting = wait - timeSinceLastCall;
- return maxing
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
- : timeWaiting;
- }
- function shouldInvoke(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime;
- // Either this is the first call, activity has stopped and we're at the
- // trailing edge, the system time has gone backwards and we're treating
- // it as the trailing edge, or we've hit the `maxWait` limit.
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
- }
- function timerExpired() {
- var time = now();
- if (shouldInvoke(time)) {
- return trailingEdge(time);
- }
- // Restart the timer.
- timerId = setTimeout(timerExpired, remainingWait(time));
- }
- function trailingEdge(time) {
- timerId = undefined;
- // Only invoke if we have `lastArgs` which means `func` has been
- // debounced at least once.
- if (trailing && lastArgs) {
- return invokeFunc(time);
- }
- lastArgs = lastThis = undefined;
- return result;
- }
- function cancel() {
- if (timerId !== undefined) {
- clearTimeout(timerId);
- }
- lastInvokeTime = 0;
- lastArgs = lastCallTime = lastThis = timerId = undefined;
- }
- function flush() {
- return timerId === undefined ? result : trailingEdge(now());
- }
- function debounced() {
- var time = now(),
- isInvoking = shouldInvoke(time);
- lastArgs = arguments;
- lastThis = this;
- lastCallTime = time;
- if (isInvoking) {
- if (timerId === undefined) {
- return leadingEdge(lastCallTime);
- }
- if (maxing) {
- // Handle invocations in a tight loop.
- clearTimeout(timerId);
- timerId = setTimeout(timerExpired, wait);
- return invokeFunc(lastCallTime);
- }
- }
- if (timerId === undefined) {
- timerId = setTimeout(timerExpired, wait);
- }
- return result;
- }
- debounced.cancel = cancel;
- debounced.flush = flush;
- return debounced;
- }
- module.exports = debounce;
- /***/ }),
- /***/ "333c":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _Card = _interopRequireDefault(__webpack_require__("f7bd"));
- var _default = {
- components: {
- 'sm-card': _Card.default
- },
- data: function data() {
- return {
- isShow: true
- };
- },
- props: {
- position: {
- type: String,
- default: 'top-left',
- validator: function validator(value) {
- return ['top-left', 'top-right', 'bottom-left', 'bottom-right'].includes(value);
- }
- },
- iconClass: {
- type: String
- },
- autoRotate: {
- type: Boolean,
- default: false
- },
- headerName: {
- type: String
- },
- collapsed: {
- type: Boolean,
- // 是否折叠
- default: false
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "338a":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var _default = {
- name: 'SmIcon',
- mixins: [_theme.default],
- props: {
- type: {
- type: String,
- default: 'info'
- },
- iconStyle: {
- type: Object
- },
- theme: {
- type: String,
- default: 'outlined'
- },
- twoToneColor: {
- type: String
- },
- iconClass: {
- type: String
- },
- component: {
- type: Object
- },
- autoPrefix: {
- type: Boolean,
- default: true
- }
- },
- computed: {
- colorStyle: function colorStyle() {
- return !this.iconStyle || !this.iconStyle.color ? this.getColorStyle(0) : {
- color: this.iconStyle.color
- };
- },
- customIconClass: function customIconClass() {
- return this.autoPrefix ? 'sm-components-icons-' + this.iconClass : this.iconClass;
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "33aa":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.chartThemeUtil = exports.getMultiColorGroup = exports.handleMultiGradient = void 0;
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _util = __webpack_require__("1448");
- var _lodash = _interopRequireDefault(__webpack_require__("25a2"));
- var handleMultiGradient = function handleMultiGradient(colorGroupsData, dataLength) {
- var startColors = [];
- var endColors = [];
- var startColorGroups = [];
- var endColorGroups = [];
- var results = [];
- colorGroupsData.forEach(function (colorInfo) {
- startColors.push(colorInfo.colorStops[0].color);
- endColors.push(colorInfo.colorStops[1].color);
- });
- startColorGroups = SuperMap.ColorsPickerUtil.getGradientColors(startColors, dataLength, 'RANGE');
- endColorGroups = SuperMap.ColorsPickerUtil.getGradientColors(endColors, dataLength, 'RANGE');
- for (var i = 0; i < dataLength; i++) {
- var colorGroupDataCopy = (0, _lodash.default)(colorGroupsData[0]);
- colorGroupDataCopy.colorStops = [{
- offset: 0,
- color: startColorGroups[i]
- }, {
- offset: 1,
- color: endColorGroups[i]
- }];
- results.push(colorGroupDataCopy);
- }
- return results;
- };
- exports.handleMultiGradient = handleMultiGradient;
- var getMultiColorGroup = function getMultiColorGroup(colorGroup, dataNumber) {
- var nextColorGroup; // 是否需要产生分段颜色值
- if (colorGroup && dataNumber > colorGroup.length && (0, _typeof2.default)(colorGroup[0]) === 'object') {
- nextColorGroup = handleMultiGradient(colorGroup, dataNumber);
- } else {
- nextColorGroup = SuperMap.ColorsPickerUtil.getGradientColors(colorGroup, dataNumber, 'RANGE');
- }
- return nextColorGroup;
- };
- exports.getMultiColorGroup = getMultiColorGroup;
- var chartThemeUtil = function chartThemeUtil() {
- var background = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgba(255, 255, 255, 0.6)';
- var textColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#333';
- var colorGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ['#3fb1e3', '#6be6c1', '#626c91', '#a0a7e6', '#c4ebad', '#96dee8'];
- var dataNumber = arguments.length > 3 ? arguments[3] : undefined;
- colorGroup = getMultiColorGroup(colorGroup, dataNumber);
- var chartTheme = {
- color: colorGroup,
- backgroundColor: background,
- textStyle: {},
- title: {
- textStyle: {
- color: textColor
- },
- subtextStyle: {
- color: '#999999'
- }
- },
- line: {
- itemStyle: {
- normal: {
- borderWidth: '2'
- }
- },
- lineStyle: {
- normal: {
- width: '3'
- }
- },
- symbolSize: '8',
- symbol: 'emptyCircle',
- smooth: false
- },
- radar: {
- name: {
- textStyle: {
- color: textColor
- }
- },
- lineStyle: {
- normal: {
- width: '3',
- color: textColor
- }
- },
- splitLine: {
- lineStyle: {
- color: [(0, _util.getColorWithOpacity)(textColor, 1), (0, _util.getColorWithOpacity)(textColor, 0.8), (0, _util.getColorWithOpacity)(textColor, 0.6), (0, _util.getColorWithOpacity)(textColor, 0.4), (0, _util.getColorWithOpacity)(textColor, 0.2), (0, _util.getColorWithOpacity)(textColor, 0.1)]
- }
- },
- axisLine: {
- lineStyle: {
- color: (0, _util.getColorWithOpacity)(textColor, 0.3)
- }
- },
- symbolSize: '8',
- symbol: 'emptyCircle',
- smooth: false // 'radius': '63%'
- },
- bar: {
- itemStyle: {
- normal: {
- barBorderWidth: 0,
- barBorderColor: '#cccccc'
- },
- emphasis: {
- barBorderWidth: 0,
- barBorderColor: '#cccccc'
- }
- }
- },
- pie: {
- itemStyle: {
- normal: {
- borderWidth: 0,
- borderColor: '#cccccc'
- },
- emphasis: {
- borderWidth: 0,
- borderColor: '#cccccc'
- }
- },
- radius: '63%'
- },
- scatter: {
- itemStyle: {
- normal: {
- borderWidth: 0,
- borderColor: '#cccccc'
- },
- emphasis: {
- borderWidth: 0,
- borderColor: '#cccccc'
- }
- }
- },
- boxplot: {
- itemStyle: {
- normal: {
- borderWidth: 0,
- borderColor: '#cccccc'
- },
- emphasis: {
- borderWidth: 0,
- borderColor: '#cccccc'
- }
- }
- },
- parallel: {
- itemStyle: {
- normal: {
- borderWidth: 0,
- borderColor: '#cccccc'
- },
- emphasis: {
- borderWidth: 0,
- borderColor: '#cccccc'
- }
- }
- },
- sankey: {
- itemStyle: {
- normal: {
- borderWidth: 0,
- borderColor: '#cccccc'
- },
- emphasis: {
- borderWidth: 0,
- borderColor: '#cccccc'
- }
- }
- },
- funnel: {
- itemStyle: {
- normal: {
- borderWidth: 0,
- borderColor: '#cccccc'
- },
- emphasis: {
- borderWidth: 0,
- borderColor: '#cccccc'
- }
- }
- },
- gauge: {
- axisLine: {
- // 坐标轴线
- lineStyle: {
- // 属性lineStyle控制线条样式
- color: [[0.2, colorGroup[0]], [0.8, colorGroup[1]], [1, colorGroup[2]]]
- }
- },
- itemStyle: {
- normal: {
- borderWidth: 0,
- borderColor: '#cccccc'
- },
- emphasis: {
- borderWidth: 0,
- borderColor: '#cccccc'
- }
- }
- },
- candlestick: {
- itemStyle: {
- normal: {
- color: '#e6a0d2',
- color0: 'transparent',
- borderColor: '#e6a0d2',
- borderColor0: '#3fb1e3',
- borderWidth: '2'
- }
- }
- },
- graph: {
- itemStyle: {
- normal: {
- borderWidth: 0,
- borderColor: '#cccccc'
- }
- },
- lineStyle: {
- normal: {
- width: '1',
- color: '#cccccc'
- }
- },
- symbolSize: '8',
- symbol: 'emptyCircle',
- smooth: false,
- color: colorGroup,
- label: {
- normal: {
- textStyle: {
- color: '#ffffff'
- }
- }
- }
- },
- map: {
- itemStyle: {
- normal: {
- areaColor: '#eeeeee',
- borderColor: '#aaaaaa',
- borderWidth: 0.5
- },
- emphasis: {
- areaColor: 'rgba(63,177,227,0.25)',
- borderColor: '#3fb1e3',
- borderWidth: 1
- }
- },
- label: {
- normal: {
- textStyle: {
- color: '#ffffff'
- }
- },
- emphasis: {
- textStyle: {
- color: 'rgb(63,177,227)'
- }
- }
- }
- },
- geo: {
- itemStyle: {
- normal: {
- areaColor: '#eeeeee',
- borderColor: '#aaaaaa',
- borderWidth: 0.5
- },
- emphasis: {
- areaColor: 'rgba(63,177,227,0.25)',
- borderColor: '#3fb1e3',
- borderWidth: 1
- }
- },
- label: {
- normal: {
- textStyle: {
- color: '#ffffff'
- }
- },
- emphasis: {
- textStyle: {
- color: 'rgb(63,177,227)'
- }
- }
- }
- },
- categoryAxis: {
- axisLine: {
- show: true,
- lineStyle: {
- color: textColor
- }
- },
- axisTick: {
- show: true,
- lineStyle: {
- color: textColor
- }
- },
- axisLabel: {
- show: true,
- rotate: -45,
- interval: 'auto',
- textStyle: {
- color: textColor
- }
- },
- splitLine: {
- show: false,
- lineStyle: {
- color: ['#eeeeee']
- }
- },
- splitArea: {
- show: false,
- areaStyle: {
- color: ['rgba(250,250,250,0.05)', 'rgba(200,200,200,0.02)']
- }
- },
- nameTextStyle: {
- fontSize: 14
- }
- },
- valueAxis: {
- axisLine: {
- show: true,
- lineStyle: {
- color: textColor
- }
- },
- axisTick: {
- show: true,
- lineStyle: {
- color: textColor
- }
- },
- axisLabel: {
- show: true,
- rotate: 45,
- interval: 'auto',
- textStyle: {
- color: textColor
- }
- },
- splitLine: {
- show: false,
- lineStyle: {
- color: ['#eeeeee']
- }
- },
- splitArea: {
- show: true // 'areaStyle': {
- // 'color': [
- // 'rgba(237,237,236,1)',
- // 'rgba(252,252,251,1)'
- // ]
- // }
- },
- nameTextStyle: {
- fontSize: 14
- }
- },
- logAxis: {
- axisLine: {
- show: true,
- lineStyle: {
- color: textColor
- }
- },
- axisTick: {
- show: false,
- lineStyle: {
- color: textColor
- }
- },
- axisLabel: {
- show: true,
- textStyle: {
- color: textColor
- }
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: [textColor]
- }
- },
- splitArea: {
- show: false,
- areaStyle: {
- color: ['rgba(250,250,250,0.05)', 'rgba(200,200,200,0.02)']
- }
- }
- },
- timeAxis: {
- axisLine: {
- show: true,
- lineStyle: {
- color: textColor
- }
- },
- axisTick: {
- show: false,
- lineStyle: {
- color: textColor
- }
- },
- axisLabel: {
- show: true,
- textStyle: {
- color: textColor
- }
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: [textColor]
- }
- },
- splitArea: {
- show: false,
- areaStyle: {
- color: ['rgba(250,250,250,0.05)', 'rgba(200,200,200,0.02)']
- }
- }
- },
- toolbox: {
- iconStyle: {
- normal: {
- borderColor: '#999999'
- },
- emphasis: {
- borderColor: '#666666'
- }
- }
- },
- legend: {
- textStyle: {
- color: textColor
- },
- pageTextStyle: {
- color: textColor
- }
- },
- tooltip: {
- axisPointer: {
- lineStyle: {
- color: '#cccccc',
- width: 1
- },
- crossStyle: {
- color: '#cccccc',
- width: 1
- }
- }
- },
- timeline: {
- lineStyle: {
- color: '#626c91',
- width: 1
- },
- itemStyle: {
- normal: {
- color: '#626c91',
- borderWidth: 1
- },
- emphasis: {
- color: '#626c91'
- }
- },
- controlStyle: {
- normal: {
- color: '#626c91',
- borderColor: '#626c91',
- borderWidth: 0.5
- },
- emphasis: {
- color: '#626c91',
- borderColor: '#626c91',
- borderWidth: 0.5
- }
- },
- checkpointStyle: {
- color: '#3fb1e3',
- borderColor: 'rgba(63,177,227,0.15)'
- },
- label: {
- normal: {
- textStyle: {
- color: '#626c91'
- }
- },
- emphasis: {
- textStyle: {
- color: '#626c91'
- }
- }
- }
- },
- visualMap: {
- color: colorGroup
- },
- dataZoom: {
- backgroundColor: 'rgba(255,255,255,0)',
- dataBackgroundColor: 'rgba(222,222,222,1)',
- fillerColor: 'rgba(114,230,212,0.25)',
- handleColor: '#cccccc',
- handleSize: '100%',
- textStyle: {
- color: textColor
- }
- },
- markPoint: {
- label: {
- normal: {
- textStyle: {
- color: textColor
- }
- },
- emphasis: {
- textStyle: {
- color: textColor
- }
- }
- }
- }
- };
- return chartTheme;
- };
- exports.chartThemeUtil = chartThemeUtil;
- /***/ }),
- /***/ "34c8":
- /***/ (function(module, exports) {
- function _iterableToArrayLimit(arr, i) {
- if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
- return;
- }
- var _arr = [];
- var _n = true;
- var _d = false;
- var _e = undefined;
- try {
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
- _arr.push(_s.value);
- if (i && _arr.length === i) break;
- }
- } catch (err) {
- _d = true;
- _e = err;
- } finally {
- try {
- if (!_n && _i["return"] != null) _i["return"]();
- } finally {
- if (_d) throw _e;
- }
- }
- return _arr;
- }
- module.exports = _iterableToArrayLimit;
- /***/ }),
- /***/ "3605":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _ChartMixin_vue_vue_type_template_id_1f1efe10___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0b11");
- /* harmony import */ var _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("d83d");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _ChartMixin_vue_vue_type_template_id_1f1efe10___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _ChartMixin_vue_vue_type_template_id_1f1efe10___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "383e":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("338a");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "3853":
- /***/ (function(module) {
- module.exports = JSON.parse("[{\"title\":\"经典深色\",\"label\":\"dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#dd6b66\",\"#759aa0\",\"#e69d87\",\"#8dc1a9\",\"#ea7e53\"]},{\"title\":\"经典浅色\",\"label\":\"light\",\"textColor\":\"#333\",\"background\":\"rgba(255, 255, 255,0.6)\",\"colorGroup\":[\"#3fb1e3\",\"#6be6c1\",\"#626c91\",\"#a0a7e6\",\"#c4ebad\"]},{\"title\":\"绿色渐变\",\"label\":\"green-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#064049\",\"#165A65\",\"#1F717F\",\"#3097AB\",\"#9AEAF4\"]},{\"title\":\"蓝色渐变\",\"label\":\"blue-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#243BCC\",\"#1C55FF\",\"#0C75FF\",\"#338FFF\",\"#00CDF1\"]},{\"title\":\"橙红渐变\",\"label\":\"red-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#770000\",\"#882241\",\"#BE3144\",\"#F05940\",\"#FF8417\"]},{\"title\":\"紫色渐变\",\"label\":\"purple-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#2F2AA4\",\"#5432D3\",\"#8B3B86\",\"#9740B1\",\"#7B6CF5\"]},{\"title\":\"深蓝黑色\",\"label\":\"bluedark-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#15D1F2\",\"#499BFF\",\"#2C61FF\",\"#243BCC\",\"#67A9FF\"]},{\"title\":\"墨绿黑色\",\"label\":\"green-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#2D808D\",\"#53A8B6\",\"#7AC2D0\",\"#BCE4E9\",\"#F1FDFF\"]},{\"title\":\"浅蓝黑色\",\"label\":\"blue-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#00E9FF\",\"#BBE7FF\",\"#6AE5C1\",\"#46ABFF\",\"#363EFF\"]},{\"title\":\"浅灰黑色\",\"label\":\"grey-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#52606D\",\"#8894A0\",\"#BACBDB\",\"#D3DDE8\",\"#F2F5F8\"]},{\"title\":\"深紫黑色\",\"label\":\"purple-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#7B6CF6\",\"#5432D3\",\"#241F92\",\"#8B3B86\",\"#E6A5FF\"]},{\"title\":\"深蓝白色\",\"label\":\"blue-light\",\"textColor\":\"#000\",\"background\":\"rgba(255,255,255,0.6)\",\"colorGroup\":[\"#243BCC\",\"#2C61FF\",\"#499BFF\",\"#15D1F2\",\"#67A9FF\"]},{\"title\":\"深红白色\",\"label\":\"red-light\",\"textColor\":\"#000\",\"background\":\"rgba(255,255,255,0.6)\",\"colorGroup\":[\"#F05940\",\"#BE3144\",\"#882241\",\"#770000\",\"#FF8418\"]}]");
- /***/ }),
- /***/ "38ce":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- /**
- * @module helpers
- */
- /**
- * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
- *
- * @memberof helpers
- * @type {number}
- */
- exports.earthRadius = 6371008.8;
- /**
- * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
- *
- * @memberof helpers
- * @type {Object}
- */
- exports.factors = {
- centimeters: exports.earthRadius * 100,
- centimetres: exports.earthRadius * 100,
- degrees: exports.earthRadius / 111325,
- feet: exports.earthRadius * 3.28084,
- inches: exports.earthRadius * 39.370,
- kilometers: exports.earthRadius / 1000,
- kilometres: exports.earthRadius / 1000,
- meters: exports.earthRadius,
- metres: exports.earthRadius,
- miles: exports.earthRadius / 1609.344,
- millimeters: exports.earthRadius * 1000,
- millimetres: exports.earthRadius * 1000,
- nauticalmiles: exports.earthRadius / 1852,
- radians: 1,
- yards: exports.earthRadius / 1.0936,
- };
- /**
- * Units of measurement factors based on 1 meter.
- *
- * @memberof helpers
- * @type {Object}
- */
- exports.unitsFactors = {
- centimeters: 100,
- centimetres: 100,
- degrees: 1 / 111325,
- feet: 3.28084,
- inches: 39.370,
- kilometers: 1 / 1000,
- kilometres: 1 / 1000,
- meters: 1,
- metres: 1,
- miles: 1 / 1609.344,
- millimeters: 1000,
- millimetres: 1000,
- nauticalmiles: 1 / 1852,
- radians: 1 / exports.earthRadius,
- yards: 1 / 1.0936,
- };
- /**
- * Area of measurement factors based on 1 square meter.
- *
- * @memberof helpers
- * @type {Object}
- */
- exports.areaFactors = {
- acres: 0.000247105,
- centimeters: 10000,
- centimetres: 10000,
- feet: 10.763910417,
- inches: 1550.003100006,
- kilometers: 0.000001,
- kilometres: 0.000001,
- meters: 1,
- metres: 1,
- miles: 3.86e-7,
- millimeters: 1000000,
- millimetres: 1000000,
- yards: 1.195990046,
- };
- /**
- * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
- *
- * @name feature
- * @param {Geometry} geometry input geometry
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature} a GeoJSON Feature
- * @example
- * var geometry = {
- * "type": "Point",
- * "coordinates": [110, 50]
- * };
- *
- * var feature = turf.feature(geometry);
- *
- * //=feature
- */
- function feature(geom, properties, options) {
- if (options === void 0) { options = {}; }
- var feat = { type: "Feature" };
- if (options.id === 0 || options.id) {
- feat.id = options.id;
- }
- if (options.bbox) {
- feat.bbox = options.bbox;
- }
- feat.properties = properties || {};
- feat.geometry = geom;
- return feat;
- }
- exports.feature = feature;
- /**
- * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
- * For GeometryCollection type use `helpers.geometryCollection`
- *
- * @name geometry
- * @param {string} type Geometry Type
- * @param {Array<any>} coordinates Coordinates
- * @param {Object} [options={}] Optional Parameters
- * @returns {Geometry} a GeoJSON Geometry
- * @example
- * var type = "Point";
- * var coordinates = [110, 50];
- * var geometry = turf.geometry(type, coordinates);
- * // => geometry
- */
- function geometry(type, coordinates, options) {
- if (options === void 0) { options = {}; }
- switch (type) {
- case "Point": return point(coordinates).geometry;
- case "LineString": return lineString(coordinates).geometry;
- case "Polygon": return polygon(coordinates).geometry;
- case "MultiPoint": return multiPoint(coordinates).geometry;
- case "MultiLineString": return multiLineString(coordinates).geometry;
- case "MultiPolygon": return multiPolygon(coordinates).geometry;
- default: throw new Error(type + " is invalid");
- }
- }
- exports.geometry = geometry;
- /**
- * Creates a {@link Point} {@link Feature} from a Position.
- *
- * @name point
- * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature<Point>} a Point feature
- * @example
- * var point = turf.point([-75.343, 39.984]);
- *
- * //=point
- */
- function point(coordinates, properties, options) {
- if (options === void 0) { options = {}; }
- var geom = {
- type: "Point",
- coordinates: coordinates,
- };
- return feature(geom, properties, options);
- }
- exports.point = point;
- /**
- * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
- *
- * @name points
- * @param {Array<Array<number>>} coordinates an array of Points
- * @param {Object} [properties={}] Translate these properties to each Feature
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]
- * associated with the FeatureCollection
- * @param {string|number} [options.id] Identifier associated with the FeatureCollection
- * @returns {FeatureCollection<Point>} Point Feature
- * @example
- * var points = turf.points([
- * [-75, 39],
- * [-80, 45],
- * [-78, 50]
- * ]);
- *
- * //=points
- */
- function points(coordinates, properties, options) {
- if (options === void 0) { options = {}; }
- return featureCollection(coordinates.map(function (coords) {
- return point(coords, properties);
- }), options);
- }
- exports.points = points;
- /**
- * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
- *
- * @name polygon
- * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature<Polygon>} Polygon Feature
- * @example
- * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
- *
- * //=polygon
- */
- function polygon(coordinates, properties, options) {
- if (options === void 0) { options = {}; }
- for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {
- var ring = coordinates_1[_i];
- if (ring.length < 4) {
- throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
- }
- for (var j = 0; j < ring[ring.length - 1].length; j++) {
- // Check if first point of Polygon contains two numbers
- if (ring[ring.length - 1][j] !== ring[0][j]) {
- throw new Error("First and last Position are not equivalent.");
- }
- }
- }
- var geom = {
- type: "Polygon",
- coordinates: coordinates,
- };
- return feature(geom, properties, options);
- }
- exports.polygon = polygon;
- /**
- * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
- *
- * @name polygons
- * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the FeatureCollection
- * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
- * @example
- * var polygons = turf.polygons([
- * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
- * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
- * ]);
- *
- * //=polygons
- */
- function polygons(coordinates, properties, options) {
- if (options === void 0) { options = {}; }
- return featureCollection(coordinates.map(function (coords) {
- return polygon(coords, properties);
- }), options);
- }
- exports.polygons = polygons;
- /**
- * Creates a {@link LineString} {@link Feature} from an Array of Positions.
- *
- * @name lineString
- * @param {Array<Array<number>>} coordinates an array of Positions
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature<LineString>} LineString Feature
- * @example
- * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
- * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
- *
- * //=linestring1
- * //=linestring2
- */
- function lineString(coordinates, properties, options) {
- if (options === void 0) { options = {}; }
- if (coordinates.length < 2) {
- throw new Error("coordinates must be an array of two or more positions");
- }
- var geom = {
- type: "LineString",
- coordinates: coordinates,
- };
- return feature(geom, properties, options);
- }
- exports.lineString = lineString;
- /**
- * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
- *
- * @name lineStrings
- * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]
- * associated with the FeatureCollection
- * @param {string|number} [options.id] Identifier associated with the FeatureCollection
- * @returns {FeatureCollection<LineString>} LineString FeatureCollection
- * @example
- * var linestrings = turf.lineStrings([
- * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
- * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
- * ]);
- *
- * //=linestrings
- */
- function lineStrings(coordinates, properties, options) {
- if (options === void 0) { options = {}; }
- return featureCollection(coordinates.map(function (coords) {
- return lineString(coords, properties);
- }), options);
- }
- exports.lineStrings = lineStrings;
- /**
- * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
- *
- * @name featureCollection
- * @param {Feature[]} features input features
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {FeatureCollection} FeatureCollection of Features
- * @example
- * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
- * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
- * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
- *
- * var collection = turf.featureCollection([
- * locationA,
- * locationB,
- * locationC
- * ]);
- *
- * //=collection
- */
- function featureCollection(features, options) {
- if (options === void 0) { options = {}; }
- var fc = { type: "FeatureCollection" };
- if (options.id) {
- fc.id = options.id;
- }
- if (options.bbox) {
- fc.bbox = options.bbox;
- }
- fc.features = features;
- return fc;
- }
- exports.featureCollection = featureCollection;
- /**
- * Creates a {@link Feature<MultiLineString>} based on a
- * coordinate array. Properties can be added optionally.
- *
- * @name multiLineString
- * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature<MultiLineString>} a MultiLineString feature
- * @throws {Error} if no coordinates are passed
- * @example
- * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
- *
- * //=multiLine
- */
- function multiLineString(coordinates, properties, options) {
- if (options === void 0) { options = {}; }
- var geom = {
- type: "MultiLineString",
- coordinates: coordinates,
- };
- return feature(geom, properties, options);
- }
- exports.multiLineString = multiLineString;
- /**
- * Creates a {@link Feature<MultiPoint>} based on a
- * coordinate array. Properties can be added optionally.
- *
- * @name multiPoint
- * @param {Array<Array<number>>} coordinates an array of Positions
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature<MultiPoint>} a MultiPoint feature
- * @throws {Error} if no coordinates are passed
- * @example
- * var multiPt = turf.multiPoint([[0,0],[10,10]]);
- *
- * //=multiPt
- */
- function multiPoint(coordinates, properties, options) {
- if (options === void 0) { options = {}; }
- var geom = {
- type: "MultiPoint",
- coordinates: coordinates,
- };
- return feature(geom, properties, options);
- }
- exports.multiPoint = multiPoint;
- /**
- * Creates a {@link Feature<MultiPolygon>} based on a
- * coordinate array. Properties can be added optionally.
- *
- * @name multiPolygon
- * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature<MultiPolygon>} a multipolygon feature
- * @throws {Error} if no coordinates are passed
- * @example
- * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
- *
- * //=multiPoly
- *
- */
- function multiPolygon(coordinates, properties, options) {
- if (options === void 0) { options = {}; }
- var geom = {
- type: "MultiPolygon",
- coordinates: coordinates,
- };
- return feature(geom, properties, options);
- }
- exports.multiPolygon = multiPolygon;
- /**
- * Creates a {@link Feature<GeometryCollection>} based on a
- * coordinate array. Properties can be added optionally.
- *
- * @name geometryCollection
- * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
- * @example
- * var pt = turf.geometry("Point", [100, 0]);
- * var line = turf.geometry("LineString", [[101, 0], [102, 1]]);
- * var collection = turf.geometryCollection([pt, line]);
- *
- * // => collection
- */
- function geometryCollection(geometries, properties, options) {
- if (options === void 0) { options = {}; }
- var geom = {
- type: "GeometryCollection",
- geometries: geometries,
- };
- return feature(geom, properties, options);
- }
- exports.geometryCollection = geometryCollection;
- /**
- * Round number to precision
- *
- * @param {number} num Number
- * @param {number} [precision=0] Precision
- * @returns {number} rounded number
- * @example
- * turf.round(120.4321)
- * //=120
- *
- * turf.round(120.4321, 2)
- * //=120.43
- */
- function round(num, precision) {
- if (precision === void 0) { precision = 0; }
- if (precision && !(precision >= 0)) {
- throw new Error("precision must be a positive number");
- }
- var multiplier = Math.pow(10, precision || 0);
- return Math.round(num * multiplier) / multiplier;
- }
- exports.round = round;
- /**
- * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
- * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
- *
- * @name radiansToLength
- * @param {number} radians in radians across the sphere
- * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
- * meters, kilometres, kilometers.
- * @returns {number} distance
- */
- function radiansToLength(radians, units) {
- if (units === void 0) { units = "kilometers"; }
- var factor = exports.factors[units];
- if (!factor) {
- throw new Error(units + " units is invalid");
- }
- return radians * factor;
- }
- exports.radiansToLength = radiansToLength;
- /**
- * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
- * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
- *
- * @name lengthToRadians
- * @param {number} distance in real units
- * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
- * meters, kilometres, kilometers.
- * @returns {number} radians
- */
- function lengthToRadians(distance, units) {
- if (units === void 0) { units = "kilometers"; }
- var factor = exports.factors[units];
- if (!factor) {
- throw new Error(units + " units is invalid");
- }
- return distance / factor;
- }
- exports.lengthToRadians = lengthToRadians;
- /**
- * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
- * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
- *
- * @name lengthToDegrees
- * @param {number} distance in real units
- * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
- * meters, kilometres, kilometers.
- * @returns {number} degrees
- */
- function lengthToDegrees(distance, units) {
- return radiansToDegrees(lengthToRadians(distance, units));
- }
- exports.lengthToDegrees = lengthToDegrees;
- /**
- * Converts any bearing angle from the north line direction (positive clockwise)
- * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
- *
- * @name bearingToAzimuth
- * @param {number} bearing angle, between -180 and +180 degrees
- * @returns {number} angle between 0 and 360 degrees
- */
- function bearingToAzimuth(bearing) {
- var angle = bearing % 360;
- if (angle < 0) {
- angle += 360;
- }
- return angle;
- }
- exports.bearingToAzimuth = bearingToAzimuth;
- /**
- * Converts an angle in radians to degrees
- *
- * @name radiansToDegrees
- * @param {number} radians angle in radians
- * @returns {number} degrees between 0 and 360 degrees
- */
- function radiansToDegrees(radians) {
- var degrees = radians % (2 * Math.PI);
- return degrees * 180 / Math.PI;
- }
- exports.radiansToDegrees = radiansToDegrees;
- /**
- * Converts an angle in degrees to radians
- *
- * @name degreesToRadians
- * @param {number} degrees angle between 0 and 360 degrees
- * @returns {number} angle in radians
- */
- function degreesToRadians(degrees) {
- var radians = degrees % 360;
- return radians * Math.PI / 180;
- }
- exports.degreesToRadians = degreesToRadians;
- /**
- * Converts a length to the requested unit.
- * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
- *
- * @param {number} length to be converted
- * @param {Units} [originalUnit="kilometers"] of the length
- * @param {Units} [finalUnit="kilometers"] returned unit
- * @returns {number} the converted length
- */
- function convertLength(length, originalUnit, finalUnit) {
- if (originalUnit === void 0) { originalUnit = "kilometers"; }
- if (finalUnit === void 0) { finalUnit = "kilometers"; }
- if (!(length >= 0)) {
- throw new Error("length must be a positive number");
- }
- return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);
- }
- exports.convertLength = convertLength;
- /**
- * Converts a area to the requested unit.
- * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
- * @param {number} area to be converted
- * @param {Units} [originalUnit="meters"] of the distance
- * @param {Units} [finalUnit="kilometers"] returned unit
- * @returns {number} the converted distance
- */
- function convertArea(area, originalUnit, finalUnit) {
- if (originalUnit === void 0) { originalUnit = "meters"; }
- if (finalUnit === void 0) { finalUnit = "kilometers"; }
- if (!(area >= 0)) {
- throw new Error("area must be a positive number");
- }
- var startFactor = exports.areaFactors[originalUnit];
- if (!startFactor) {
- throw new Error("invalid original units");
- }
- var finalFactor = exports.areaFactors[finalUnit];
- if (!finalFactor) {
- throw new Error("invalid final units");
- }
- return (area / startFactor) * finalFactor;
- }
- exports.convertArea = convertArea;
- /**
- * isNumber
- *
- * @param {*} num Number to validate
- * @returns {boolean} true/false
- * @example
- * turf.isNumber(123)
- * //=true
- * turf.isNumber('foo')
- * //=false
- */
- function isNumber(num) {
- return !isNaN(num) && num !== null && !Array.isArray(num) && !/^\s*$/.test(num);
- }
- exports.isNumber = isNumber;
- /**
- * isObject
- *
- * @param {*} input variable to validate
- * @returns {boolean} true/false
- * @example
- * turf.isObject({elevation: 10})
- * //=true
- * turf.isObject('foo')
- * //=false
- */
- function isObject(input) {
- return (!!input) && (input.constructor === Object);
- }
- exports.isObject = isObject;
- /**
- * Validate BBox
- *
- * @private
- * @param {Array<number>} bbox BBox to validate
- * @returns {void}
- * @throws Error if BBox is not valid
- * @example
- * validateBBox([-180, -40, 110, 50])
- * //=OK
- * validateBBox([-180, -40])
- * //=Error
- * validateBBox('Foo')
- * //=Error
- * validateBBox(5)
- * //=Error
- * validateBBox(null)
- * //=Error
- * validateBBox(undefined)
- * //=Error
- */
- function validateBBox(bbox) {
- if (!bbox) {
- throw new Error("bbox is required");
- }
- if (!Array.isArray(bbox)) {
- throw new Error("bbox must be an Array");
- }
- if (bbox.length !== 4 && bbox.length !== 6) {
- throw new Error("bbox must be an Array of 4 or 6 numbers");
- }
- bbox.forEach(function (num) {
- if (!isNumber(num)) {
- throw new Error("bbox must only contain numbers");
- }
- });
- }
- exports.validateBBox = validateBBox;
- /**
- * Validate Id
- *
- * @private
- * @param {string|number} id Id to validate
- * @returns {void}
- * @throws Error if Id is not valid
- * @example
- * validateId([-180, -40, 110, 50])
- * //=Error
- * validateId([-180, -40])
- * //=Error
- * validateId('Foo')
- * //=OK
- * validateId(5)
- * //=OK
- * validateId(null)
- * //=Error
- * validateId(undefined)
- * //=Error
- */
- function validateId(id) {
- if (!id) {
- throw new Error("id is required");
- }
- if (["string", "number"].indexOf(typeof id) === -1) {
- throw new Error("id must be a number or a string");
- }
- }
- exports.validateId = validateId;
- // Deprecated methods
- function radians2degrees() {
- throw new Error("method has been renamed to `radiansToDegrees`");
- }
- exports.radians2degrees = radians2degrees;
- function degrees2radians() {
- throw new Error("method has been renamed to `degreesToRadians`");
- }
- exports.degrees2radians = degrees2radians;
- function distanceToDegrees() {
- throw new Error("method has been renamed to `lengthToDegrees`");
- }
- exports.distanceToDegrees = distanceToDegrees;
- function distanceToRadians() {
- throw new Error("method has been renamed to `lengthToRadians`");
- }
- exports.distanceToRadians = distanceToRadians;
- function radiansToDistance() {
- throw new Error("method has been renamed to `radiansToLength`");
- }
- exports.radiansToDistance = radiansToDistance;
- function bearingToAngle() {
- throw new Error("method has been renamed to `bearingToAzimuth`");
- }
- exports.bearingToAngle = bearingToAngle;
- function convertDistance() {
- throw new Error("method has been renamed to `convertLength`");
- }
- exports.convertDistance = convertDistance;
- /***/ }),
- /***/ "38cf":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Border_vue_vue_type_template_id_531a677a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c492");
- /* harmony import */ var _Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("cadc");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _Border_vue_vue_type_template_id_531a677a___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _Border_vue_vue_type_template_id_531a677a___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "3a31":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _echarts = _interopRequireDefault(__webpack_require__("f840"));
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- __webpack_require__("acbb");
- var _cssElementQueries = __webpack_require__("18e4");
- var _timer = _interopRequireDefault(__webpack_require__("8156"));
- var _thirdService = _interopRequireDefault(__webpack_require__("c51e"));
- //
- //
- //
- var _default = {
- name: 'SmLiquidFill',
- mixins: [_theme.default, _timer.default, _thirdService.default],
- props: {
- // 百分比的值
- value: {
- type: [Number, String],
- default: 0
- },
- // 波浪数
- waveCount: {
- type: Number,
- default: 1
- },
- // 字体
- fontSize: {
- type: [Number, String]
- },
- // 波浪颜色
- waveColor: {
- type: String
- },
- // 边框颜色
- borderColor: {
- type: String
- },
- // 数字在波浪外的颜色
- labelColor: {
- type: String,
- default: '#626c91'
- },
- // 背景色
- backgroundColor: {
- type: String
- },
- // 数字在波浪内的颜色
- insideLabelColor: {
- type: String,
- default: '#fff'
- },
- // 是否开启波浪动画
- waveAnimation: {
- type: Boolean,
- default: false
- }
- },
- data: function data() {
- return {
- waveColorData: '',
- labelColorData: '',
- insideLabelColorData: '',
- borderColorData: '',
- backgroundColorData: '',
- finalValue: this.value
- };
- },
- computed: {
- // 根据波浪数渲染数据
- calcData: function calcData() {
- var data = [];
- var formatValue = isNaN(this.finalValue) ? 0 : parseFloat(this.finalValue);
- for (var i = 0; i < this.waveCount; i++) {
- data.push(formatValue - i * 0.05);
- }
- return data;
- }
- },
- watch: {
- waveColor: function waveColor(val) {
- this.waveColorData = val;
- this.updateChart();
- },
- labelColor: function labelColor(val) {
- this.labelColorData = val;
- this.updateChart();
- },
- insideLabelColor: function insideLabelColor(val) {
- this.insideLabelColorData = val;
- this.updateChart();
- },
- borderColor: function borderColor(val) {
- this.borderColorData = val;
- this.updateChart();
- },
- backgroundColor: function backgroundColor(val) {
- this.backgroundColorData = val;
- this.updateChart();
- },
- finalValue: function finalValue() {
- this.updateChart();
- },
- fontSize: function fontSize() {
- this.updateChart();
- },
- waveCount: function waveCount() {
- this.updateChart();
- },
- waveAnimation: function waveAnimation() {
- this.updateChart();
- },
- value: function value(val) {
- this.finalValue = val;
- }
- },
- mounted: function mounted() {
- var _this = this;
- this.waveColorData = this.waveColor || this.getColor(0);
- this.labelColorData = this.labelColor || this.getTextColor;
- this.insideLabelColorData = this.insideLabelColor || this.getTextColor;
- this.borderColorData = this.borderColor || this.waveColorData;
- this.backgroundColorData = this.backgroundColor || this.getBackground;
- setTimeout(function () {
- _this.initializeChart();
- _this.resize();
- }, 0);
- },
- beforeDestroy: function beforeDestroy() {
- this.restService && this.restService.remove('getdatasucceeded');
- },
- methods: {
- resize: function resize() {
- this.chart && this.chart.resize();
- },
- initializeChart: function initializeChart() {
- var _this2 = this;
- this.chart = _echarts.default.init(this.$refs.chart);
- this.updateChart();
- this.$on('theme-style-changed', function () {
- _this2.waveColorData = _this2.getColor(0);
- _this2.labelColorData = _this2.getTextColor;
- _this2.insideLabelColorData = _this2.getTextColor;
- _this2.borderColorData = _this2.getColor(0);
- _this2.backgroundColorData = _this2.getBackground;
- _this2.updateChart(true);
- });
- this.resizeObsever = new _cssElementQueries.ResizeSensor(this.$el, function () {
- _this2.resize();
- });
- },
- updateChart: function updateChart() {
- var propsUpdate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
- this.chart && this.chart.setOption({
- series: [{
- color: [this.waveColorData],
- type: 'liquidFill',
- waveAnimation: this.waveAnimation,
- animation: false,
- radius: '95%',
- data: this.calcData,
- label: {
- fontSize: parseFloat(this.fontSize),
- color: this.labelColorData,
- insideColor: this.insideLabelColorData
- },
- backgroundStyle: {
- color: this.backgroundColorData
- },
- itemStyle: {
- shadowColor: '#fff'
- },
- outline: {
- borderDistance: 3,
- itemStyle: {
- borderColor: this.borderColorData,
- borderWidth: 3,
- shadowBlur: 0,
- shadowColor: '#fff'
- }
- }
- }]
- });
- },
- timing: function timing() {
- this.getData();
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "3a49":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _vue = _interopRequireDefault(__webpack_require__("5643"));
- var _vuePropertyDecorator = __webpack_require__("e22c");
- var _lodash = _interopRequireDefault(__webpack_require__("5f9f"));
- var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
- var c = arguments.length,
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
- d;
- if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- }
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- var VmUpdater =
- /*#__PURE__*/
- function (_Vue) {
- (0, _inherits2.default)(VmUpdater, _Vue);
- function VmUpdater() {
- (0, _classCallCheck2.default)(this, VmUpdater);
- return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(VmUpdater).apply(this, arguments));
- }
- (0, _createClass2.default)(VmUpdater, [{
- key: "mounted",
- value: function mounted() {
- if (this.$options.viewModelProps) {
- this.watchViewModelOptions(this.$options.viewModelProps);
- }
- }
- }, {
- key: "setViewModel",
- value: function setViewModel(viewModel) {
- this.viewModel = viewModel;
- }
- }, {
- key: "watchViewModelOptions",
- value: function watchViewModelOptions(viewModelProps) {
- var _this = this;
- viewModelProps.map(function (item) {
- _this.$watch(item, function (newVal, oldVal) {
- if (!(0, _lodash.default)(newVal, oldVal)) {
- if (item.includes('.')) {
- var itemArr = item.split('.');
- item = itemArr[itemArr.length - 1];
- }
- var setFun = 'set' + item.replace(item[0], item[0].toUpperCase());
- this.viewModel && this.viewModel[setFun](newVal);
- }
- }, {
- deep: true
- });
- });
- }
- }]);
- return VmUpdater;
- }(_vue.default);
- VmUpdater = __decorate([_vuePropertyDecorator.Component], VmUpdater);
- var _default = VmUpdater;
- exports.default = _default;
- /***/ }),
- /***/ "3a8c":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _vue = _interopRequireDefault(__webpack_require__("5643"));
- var _globalEvent = _interopRequireDefault(__webpack_require__("fb6a"));
- var _default = new _vue.default({
- mapCache: {},
- webMapCache: {},
- getMap: function getMap(mapTarget) {
- return this.mapCache[mapTarget];
- },
- getAllMaps: function getAllMaps() {
- return this.mapCache;
- },
- setMap: function setMap(mapTarget, map) {
- this.mapCache[mapTarget] = map;
- },
- deleteMap: function deleteMap(mapTarget) {
- _globalEvent.default.$emit('delete-map', mapTarget);
- delete this.mapCache[mapTarget];
- },
- getWebMap: function getWebMap(webmapTarget) {
- return this.webMapCache[webmapTarget];
- },
- getAllWebMap: function getAllWebMap() {
- return this.webMapCache;
- },
- setWebMap: function setWebMap(webmapTarget, webmap) {
- this.webMapCache[webmapTarget] = webmap;
- },
- deleteWebMap: function deleteWebMap(webmapTarget) {
- delete this.webMapCache[webmapTarget];
- }
- });
- exports.default = _default;
- /***/ }),
- /***/ "3be6":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {/*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh <http://feross.org>
- * @license MIT
- */
- /* eslint-disable no-proto */
- var base64 = __webpack_require__("9711")
- var ieee754 = __webpack_require__("4a62")
- var isArray = __webpack_require__("5b56")
- exports.Buffer = Buffer
- exports.SlowBuffer = SlowBuffer
- exports.INSPECT_MAX_BYTES = 50
- /**
- * If `Buffer.TYPED_ARRAY_SUPPORT`:
- * === true Use Uint8Array implementation (fastest)
- * === false Use Object implementation (most compatible, even IE6)
- *
- * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
- * Opera 11.6+, iOS 4.2+.
- *
- * Due to various browser bugs, sometimes the Object implementation will be used even
- * when the browser supports typed arrays.
- *
- * Note:
- *
- * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
- * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
- *
- * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
- *
- * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
- * incorrect length in some situations.
- * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
- * get the Object implementation, which is slower but behaves correctly.
- */
- Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
- ? global.TYPED_ARRAY_SUPPORT
- : typedArraySupport()
- /*
- * Export kMaxLength after typed array support is determined.
- */
- exports.kMaxLength = kMaxLength()
- function typedArraySupport () {
- try {
- var arr = new Uint8Array(1)
- arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
- return arr.foo() === 42 && // typed array instances can be augmented
- typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
- arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
- } catch (e) {
- return false
- }
- }
- function kMaxLength () {
- return Buffer.TYPED_ARRAY_SUPPORT
- ? 0x7fffffff
- : 0x3fffffff
- }
- function createBuffer (that, length) {
- if (kMaxLength() < length) {
- throw new RangeError('Invalid typed array length')
- }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- // Return an augmented `Uint8Array` instance, for best performance
- that = new Uint8Array(length)
- that.__proto__ = Buffer.prototype
- } else {
- // Fallback: Return an object instance of the Buffer class
- if (that === null) {
- that = new Buffer(length)
- }
- that.length = length
- }
- return that
- }
- /**
- * The Buffer constructor returns instances of `Uint8Array` that have their
- * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
- * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
- * and the `Uint8Array` methods. Square bracket notation works as expected -- it
- * returns a single octet.
- *
- * The `Uint8Array` prototype remains unmodified.
- */
- function Buffer (arg, encodingOrOffset, length) {
- if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
- return new Buffer(arg, encodingOrOffset, length)
- }
- // Common case.
- if (typeof arg === 'number') {
- if (typeof encodingOrOffset === 'string') {
- throw new Error(
- 'If encoding is specified then the first argument must be a string'
- )
- }
- return allocUnsafe(this, arg)
- }
- return from(this, arg, encodingOrOffset, length)
- }
- Buffer.poolSize = 8192 // not used by this implementation
- // TODO: Legacy, not needed anymore. Remove in next major version.
- Buffer._augment = function (arr) {
- arr.__proto__ = Buffer.prototype
- return arr
- }
- function from (that, value, encodingOrOffset, length) {
- if (typeof value === 'number') {
- throw new TypeError('"value" argument must not be a number')
- }
- if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
- return fromArrayBuffer(that, value, encodingOrOffset, length)
- }
- if (typeof value === 'string') {
- return fromString(that, value, encodingOrOffset)
- }
- return fromObject(that, value)
- }
- /**
- * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
- * if value is a number.
- * Buffer.from(str[, encoding])
- * Buffer.from(array)
- * Buffer.from(buffer)
- * Buffer.from(arrayBuffer[, byteOffset[, length]])
- **/
- Buffer.from = function (value, encodingOrOffset, length) {
- return from(null, value, encodingOrOffset, length)
- }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- Buffer.prototype.__proto__ = Uint8Array.prototype
- Buffer.__proto__ = Uint8Array
- if (typeof Symbol !== 'undefined' && Symbol.species &&
- Buffer[Symbol.species] === Buffer) {
- // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
- Object.defineProperty(Buffer, Symbol.species, {
- value: null,
- configurable: true
- })
- }
- }
- function assertSize (size) {
- if (typeof size !== 'number') {
- throw new TypeError('"size" argument must be a number')
- } else if (size < 0) {
- throw new RangeError('"size" argument must not be negative')
- }
- }
- function alloc (that, size, fill, encoding) {
- assertSize(size)
- if (size <= 0) {
- return createBuffer(that, size)
- }
- if (fill !== undefined) {
- // Only pay attention to encoding if it's a string. This
- // prevents accidentally sending in a number that would
- // be interpretted as a start offset.
- return typeof encoding === 'string'
- ? createBuffer(that, size).fill(fill, encoding)
- : createBuffer(that, size).fill(fill)
- }
- return createBuffer(that, size)
- }
- /**
- * Creates a new filled Buffer instance.
- * alloc(size[, fill[, encoding]])
- **/
- Buffer.alloc = function (size, fill, encoding) {
- return alloc(null, size, fill, encoding)
- }
- function allocUnsafe (that, size) {
- assertSize(size)
- that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
- if (!Buffer.TYPED_ARRAY_SUPPORT) {
- for (var i = 0; i < size; ++i) {
- that[i] = 0
- }
- }
- return that
- }
- /**
- * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
- * */
- Buffer.allocUnsafe = function (size) {
- return allocUnsafe(null, size)
- }
- /**
- * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
- */
- Buffer.allocUnsafeSlow = function (size) {
- return allocUnsafe(null, size)
- }
- function fromString (that, string, encoding) {
- if (typeof encoding !== 'string' || encoding === '') {
- encoding = 'utf8'
- }
- if (!Buffer.isEncoding(encoding)) {
- throw new TypeError('"encoding" must be a valid string encoding')
- }
- var length = byteLength(string, encoding) | 0
- that = createBuffer(that, length)
- var actual = that.write(string, encoding)
- if (actual !== length) {
- // Writing a hex string, for example, that contains invalid characters will
- // cause everything after the first invalid character to be ignored. (e.g.
- // 'abxxcd' will be treated as 'ab')
- that = that.slice(0, actual)
- }
- return that
- }
- function fromArrayLike (that, array) {
- var length = array.length < 0 ? 0 : checked(array.length) | 0
- that = createBuffer(that, length)
- for (var i = 0; i < length; i += 1) {
- that[i] = array[i] & 255
- }
- return that
- }
- function fromArrayBuffer (that, array, byteOffset, length) {
- array.byteLength // this throws if `array` is not a valid ArrayBuffer
- if (byteOffset < 0 || array.byteLength < byteOffset) {
- throw new RangeError('\'offset\' is out of bounds')
- }
- if (array.byteLength < byteOffset + (length || 0)) {
- throw new RangeError('\'length\' is out of bounds')
- }
- if (byteOffset === undefined && length === undefined) {
- array = new Uint8Array(array)
- } else if (length === undefined) {
- array = new Uint8Array(array, byteOffset)
- } else {
- array = new Uint8Array(array, byteOffset, length)
- }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- // Return an augmented `Uint8Array` instance, for best performance
- that = array
- that.__proto__ = Buffer.prototype
- } else {
- // Fallback: Return an object instance of the Buffer class
- that = fromArrayLike(that, array)
- }
- return that
- }
- function fromObject (that, obj) {
- if (Buffer.isBuffer(obj)) {
- var len = checked(obj.length) | 0
- that = createBuffer(that, len)
- if (that.length === 0) {
- return that
- }
- obj.copy(that, 0, 0, len)
- return that
- }
- if (obj) {
- if ((typeof ArrayBuffer !== 'undefined' &&
- obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
- if (typeof obj.length !== 'number' || isnan(obj.length)) {
- return createBuffer(that, 0)
- }
- return fromArrayLike(that, obj)
- }
- if (obj.type === 'Buffer' && isArray(obj.data)) {
- return fromArrayLike(that, obj.data)
- }
- }
- throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
- }
- function checked (length) {
- // Note: cannot use `length < kMaxLength()` here because that fails when
- // length is NaN (which is otherwise coerced to zero.)
- if (length >= kMaxLength()) {
- throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
- 'size: 0x' + kMaxLength().toString(16) + ' bytes')
- }
- return length | 0
- }
- function SlowBuffer (length) {
- if (+length != length) { // eslint-disable-line eqeqeq
- length = 0
- }
- return Buffer.alloc(+length)
- }
- Buffer.isBuffer = function isBuffer (b) {
- return !!(b != null && b._isBuffer)
- }
- Buffer.compare = function compare (a, b) {
- if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
- throw new TypeError('Arguments must be Buffers')
- }
- if (a === b) return 0
- var x = a.length
- var y = b.length
- for (var i = 0, len = Math.min(x, y); i < len; ++i) {
- if (a[i] !== b[i]) {
- x = a[i]
- y = b[i]
- break
- }
- }
- if (x < y) return -1
- if (y < x) return 1
- return 0
- }
- Buffer.isEncoding = function isEncoding (encoding) {
- switch (String(encoding).toLowerCase()) {
- case 'hex':
- case 'utf8':
- case 'utf-8':
- case 'ascii':
- case 'latin1':
- case 'binary':
- case 'base64':
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return true
- default:
- return false
- }
- }
- Buffer.concat = function concat (list, length) {
- if (!isArray(list)) {
- throw new TypeError('"list" argument must be an Array of Buffers')
- }
- if (list.length === 0) {
- return Buffer.alloc(0)
- }
- var i
- if (length === undefined) {
- length = 0
- for (i = 0; i < list.length; ++i) {
- length += list[i].length
- }
- }
- var buffer = Buffer.allocUnsafe(length)
- var pos = 0
- for (i = 0; i < list.length; ++i) {
- var buf = list[i]
- if (!Buffer.isBuffer(buf)) {
- throw new TypeError('"list" argument must be an Array of Buffers')
- }
- buf.copy(buffer, pos)
- pos += buf.length
- }
- return buffer
- }
- function byteLength (string, encoding) {
- if (Buffer.isBuffer(string)) {
- return string.length
- }
- if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
- (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
- return string.byteLength
- }
- if (typeof string !== 'string') {
- string = '' + string
- }
- var len = string.length
- if (len === 0) return 0
- // Use a for loop to avoid recursion
- var loweredCase = false
- for (;;) {
- switch (encoding) {
- case 'ascii':
- case 'latin1':
- case 'binary':
- return len
- case 'utf8':
- case 'utf-8':
- case undefined:
- return utf8ToBytes(string).length
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return len * 2
- case 'hex':
- return len >>> 1
- case 'base64':
- return base64ToBytes(string).length
- default:
- if (loweredCase) return utf8ToBytes(string).length // assume utf8
- encoding = ('' + encoding).toLowerCase()
- loweredCase = true
- }
- }
- }
- Buffer.byteLength = byteLength
- function slowToString (encoding, start, end) {
- var loweredCase = false
- // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
- // property of a typed array.
- // This behaves neither like String nor Uint8Array in that we set start/end
- // to their upper/lower bounds if the value passed is out of range.
- // undefined is handled specially as per ECMA-262 6th Edition,
- // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
- if (start === undefined || start < 0) {
- start = 0
- }
- // Return early if start > this.length. Done here to prevent potential uint32
- // coercion fail below.
- if (start > this.length) {
- return ''
- }
- if (end === undefined || end > this.length) {
- end = this.length
- }
- if (end <= 0) {
- return ''
- }
- // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
- end >>>= 0
- start >>>= 0
- if (end <= start) {
- return ''
- }
- if (!encoding) encoding = 'utf8'
- while (true) {
- switch (encoding) {
- case 'hex':
- return hexSlice(this, start, end)
- case 'utf8':
- case 'utf-8':
- return utf8Slice(this, start, end)
- case 'ascii':
- return asciiSlice(this, start, end)
- case 'latin1':
- case 'binary':
- return latin1Slice(this, start, end)
- case 'base64':
- return base64Slice(this, start, end)
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return utf16leSlice(this, start, end)
- default:
- if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
- encoding = (encoding + '').toLowerCase()
- loweredCase = true
- }
- }
- }
- // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
- // Buffer instances.
- Buffer.prototype._isBuffer = true
- function swap (b, n, m) {
- var i = b[n]
- b[n] = b[m]
- b[m] = i
- }
- Buffer.prototype.swap16 = function swap16 () {
- var len = this.length
- if (len % 2 !== 0) {
- throw new RangeError('Buffer size must be a multiple of 16-bits')
- }
- for (var i = 0; i < len; i += 2) {
- swap(this, i, i + 1)
- }
- return this
- }
- Buffer.prototype.swap32 = function swap32 () {
- var len = this.length
- if (len % 4 !== 0) {
- throw new RangeError('Buffer size must be a multiple of 32-bits')
- }
- for (var i = 0; i < len; i += 4) {
- swap(this, i, i + 3)
- swap(this, i + 1, i + 2)
- }
- return this
- }
- Buffer.prototype.swap64 = function swap64 () {
- var len = this.length
- if (len % 8 !== 0) {
- throw new RangeError('Buffer size must be a multiple of 64-bits')
- }
- for (var i = 0; i < len; i += 8) {
- swap(this, i, i + 7)
- swap(this, i + 1, i + 6)
- swap(this, i + 2, i + 5)
- swap(this, i + 3, i + 4)
- }
- return this
- }
- Buffer.prototype.toString = function toString () {
- var length = this.length | 0
- if (length === 0) return ''
- if (arguments.length === 0) return utf8Slice(this, 0, length)
- return slowToString.apply(this, arguments)
- }
- Buffer.prototype.equals = function equals (b) {
- if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
- if (this === b) return true
- return Buffer.compare(this, b) === 0
- }
- Buffer.prototype.inspect = function inspect () {
- var str = ''
- var max = exports.INSPECT_MAX_BYTES
- if (this.length > 0) {
- str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
- if (this.length > max) str += ' ... '
- }
- return '<Buffer ' + str + '>'
- }
- Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
- if (!Buffer.isBuffer(target)) {
- throw new TypeError('Argument must be a Buffer')
- }
- if (start === undefined) {
- start = 0
- }
- if (end === undefined) {
- end = target ? target.length : 0
- }
- if (thisStart === undefined) {
- thisStart = 0
- }
- if (thisEnd === undefined) {
- thisEnd = this.length
- }
- if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
- throw new RangeError('out of range index')
- }
- if (thisStart >= thisEnd && start >= end) {
- return 0
- }
- if (thisStart >= thisEnd) {
- return -1
- }
- if (start >= end) {
- return 1
- }
- start >>>= 0
- end >>>= 0
- thisStart >>>= 0
- thisEnd >>>= 0
- if (this === target) return 0
- var x = thisEnd - thisStart
- var y = end - start
- var len = Math.min(x, y)
- var thisCopy = this.slice(thisStart, thisEnd)
- var targetCopy = target.slice(start, end)
- for (var i = 0; i < len; ++i) {
- if (thisCopy[i] !== targetCopy[i]) {
- x = thisCopy[i]
- y = targetCopy[i]
- break
- }
- }
- if (x < y) return -1
- if (y < x) return 1
- return 0
- }
- // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
- // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
- //
- // Arguments:
- // - buffer - a Buffer to search
- // - val - a string, Buffer, or number
- // - byteOffset - an index into `buffer`; will be clamped to an int32
- // - encoding - an optional encoding, relevant is val is a string
- // - dir - true for indexOf, false for lastIndexOf
- function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
- // Empty buffer means no match
- if (buffer.length === 0) return -1
- // Normalize byteOffset
- if (typeof byteOffset === 'string') {
- encoding = byteOffset
- byteOffset = 0
- } else if (byteOffset > 0x7fffffff) {
- byteOffset = 0x7fffffff
- } else if (byteOffset < -0x80000000) {
- byteOffset = -0x80000000
- }
- byteOffset = +byteOffset // Coerce to Number.
- if (isNaN(byteOffset)) {
- // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
- byteOffset = dir ? 0 : (buffer.length - 1)
- }
- // Normalize byteOffset: negative offsets start from the end of the buffer
- if (byteOffset < 0) byteOffset = buffer.length + byteOffset
- if (byteOffset >= buffer.length) {
- if (dir) return -1
- else byteOffset = buffer.length - 1
- } else if (byteOffset < 0) {
- if (dir) byteOffset = 0
- else return -1
- }
- // Normalize val
- if (typeof val === 'string') {
- val = Buffer.from(val, encoding)
- }
- // Finally, search either indexOf (if dir is true) or lastIndexOf
- if (Buffer.isBuffer(val)) {
- // Special case: looking for empty string/buffer always fails
- if (val.length === 0) {
- return -1
- }
- return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
- } else if (typeof val === 'number') {
- val = val & 0xFF // Search for a byte value [0-255]
- if (Buffer.TYPED_ARRAY_SUPPORT &&
- typeof Uint8Array.prototype.indexOf === 'function') {
- if (dir) {
- return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
- } else {
- return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
- }
- }
- return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
- }
- throw new TypeError('val must be string, number or Buffer')
- }
- function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
- var indexSize = 1
- var arrLength = arr.length
- var valLength = val.length
- if (encoding !== undefined) {
- encoding = String(encoding).toLowerCase()
- if (encoding === 'ucs2' || encoding === 'ucs-2' ||
- encoding === 'utf16le' || encoding === 'utf-16le') {
- if (arr.length < 2 || val.length < 2) {
- return -1
- }
- indexSize = 2
- arrLength /= 2
- valLength /= 2
- byteOffset /= 2
- }
- }
- function read (buf, i) {
- if (indexSize === 1) {
- return buf[i]
- } else {
- return buf.readUInt16BE(i * indexSize)
- }
- }
- var i
- if (dir) {
- var foundIndex = -1
- for (i = byteOffset; i < arrLength; i++) {
- if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
- if (foundIndex === -1) foundIndex = i
- if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
- } else {
- if (foundIndex !== -1) i -= i - foundIndex
- foundIndex = -1
- }
- }
- } else {
- if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
- for (i = byteOffset; i >= 0; i--) {
- var found = true
- for (var j = 0; j < valLength; j++) {
- if (read(arr, i + j) !== read(val, j)) {
- found = false
- break
- }
- }
- if (found) return i
- }
- }
- return -1
- }
- Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
- return this.indexOf(val, byteOffset, encoding) !== -1
- }
- Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
- return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
- }
- Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
- return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
- }
- function hexWrite (buf, string, offset, length) {
- offset = Number(offset) || 0
- var remaining = buf.length - offset
- if (!length) {
- length = remaining
- } else {
- length = Number(length)
- if (length > remaining) {
- length = remaining
- }
- }
- // must be an even number of digits
- var strLen = string.length
- if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
- if (length > strLen / 2) {
- length = strLen / 2
- }
- for (var i = 0; i < length; ++i) {
- var parsed = parseInt(string.substr(i * 2, 2), 16)
- if (isNaN(parsed)) return i
- buf[offset + i] = parsed
- }
- return i
- }
- function utf8Write (buf, string, offset, length) {
- return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
- }
- function asciiWrite (buf, string, offset, length) {
- return blitBuffer(asciiToBytes(string), buf, offset, length)
- }
- function latin1Write (buf, string, offset, length) {
- return asciiWrite(buf, string, offset, length)
- }
- function base64Write (buf, string, offset, length) {
- return blitBuffer(base64ToBytes(string), buf, offset, length)
- }
- function ucs2Write (buf, string, offset, length) {
- return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
- }
- Buffer.prototype.write = function write (string, offset, length, encoding) {
- // Buffer#write(string)
- if (offset === undefined) {
- encoding = 'utf8'
- length = this.length
- offset = 0
- // Buffer#write(string, encoding)
- } else if (length === undefined && typeof offset === 'string') {
- encoding = offset
- length = this.length
- offset = 0
- // Buffer#write(string, offset[, length][, encoding])
- } else if (isFinite(offset)) {
- offset = offset | 0
- if (isFinite(length)) {
- length = length | 0
- if (encoding === undefined) encoding = 'utf8'
- } else {
- encoding = length
- length = undefined
- }
- // legacy write(string, encoding, offset, length) - remove in v0.13
- } else {
- throw new Error(
- 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
- )
- }
- var remaining = this.length - offset
- if (length === undefined || length > remaining) length = remaining
- if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
- throw new RangeError('Attempt to write outside buffer bounds')
- }
- if (!encoding) encoding = 'utf8'
- var loweredCase = false
- for (;;) {
- switch (encoding) {
- case 'hex':
- return hexWrite(this, string, offset, length)
- case 'utf8':
- case 'utf-8':
- return utf8Write(this, string, offset, length)
- case 'ascii':
- return asciiWrite(this, string, offset, length)
- case 'latin1':
- case 'binary':
- return latin1Write(this, string, offset, length)
- case 'base64':
- // Warning: maxLength not taken into account in base64Write
- return base64Write(this, string, offset, length)
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return ucs2Write(this, string, offset, length)
- default:
- if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
- encoding = ('' + encoding).toLowerCase()
- loweredCase = true
- }
- }
- }
- Buffer.prototype.toJSON = function toJSON () {
- return {
- type: 'Buffer',
- data: Array.prototype.slice.call(this._arr || this, 0)
- }
- }
- function base64Slice (buf, start, end) {
- if (start === 0 && end === buf.length) {
- return base64.fromByteArray(buf)
- } else {
- return base64.fromByteArray(buf.slice(start, end))
- }
- }
- function utf8Slice (buf, start, end) {
- end = Math.min(buf.length, end)
- var res = []
- var i = start
- while (i < end) {
- var firstByte = buf[i]
- var codePoint = null
- var bytesPerSequence = (firstByte > 0xEF) ? 4
- : (firstByte > 0xDF) ? 3
- : (firstByte > 0xBF) ? 2
- : 1
- if (i + bytesPerSequence <= end) {
- var secondByte, thirdByte, fourthByte, tempCodePoint
- switch (bytesPerSequence) {
- case 1:
- if (firstByte < 0x80) {
- codePoint = firstByte
- }
- break
- case 2:
- secondByte = buf[i + 1]
- if ((secondByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
- if (tempCodePoint > 0x7F) {
- codePoint = tempCodePoint
- }
- }
- break
- case 3:
- secondByte = buf[i + 1]
- thirdByte = buf[i + 2]
- if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
- if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
- codePoint = tempCodePoint
- }
- }
- break
- case 4:
- secondByte = buf[i + 1]
- thirdByte = buf[i + 2]
- fourthByte = buf[i + 3]
- if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
- if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
- codePoint = tempCodePoint
- }
- }
- }
- }
- if (codePoint === null) {
- // we did not generate a valid codePoint so insert a
- // replacement char (U+FFFD) and advance only 1 byte
- codePoint = 0xFFFD
- bytesPerSequence = 1
- } else if (codePoint > 0xFFFF) {
- // encode to utf16 (surrogate pair dance)
- codePoint -= 0x10000
- res.push(codePoint >>> 10 & 0x3FF | 0xD800)
- codePoint = 0xDC00 | codePoint & 0x3FF
- }
- res.push(codePoint)
- i += bytesPerSequence
- }
- return decodeCodePointsArray(res)
- }
- // Based on http://stackoverflow.com/a/22747272/680742, the browser with
- // the lowest limit is Chrome, with 0x10000 args.
- // We go 1 magnitude less, for safety
- var MAX_ARGUMENTS_LENGTH = 0x1000
- function decodeCodePointsArray (codePoints) {
- var len = codePoints.length
- if (len <= MAX_ARGUMENTS_LENGTH) {
- return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
- }
- // Decode in chunks to avoid "call stack size exceeded".
- var res = ''
- var i = 0
- while (i < len) {
- res += String.fromCharCode.apply(
- String,
- codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
- )
- }
- return res
- }
- function asciiSlice (buf, start, end) {
- var ret = ''
- end = Math.min(buf.length, end)
- for (var i = start; i < end; ++i) {
- ret += String.fromCharCode(buf[i] & 0x7F)
- }
- return ret
- }
- function latin1Slice (buf, start, end) {
- var ret = ''
- end = Math.min(buf.length, end)
- for (var i = start; i < end; ++i) {
- ret += String.fromCharCode(buf[i])
- }
- return ret
- }
- function hexSlice (buf, start, end) {
- var len = buf.length
- if (!start || start < 0) start = 0
- if (!end || end < 0 || end > len) end = len
- var out = ''
- for (var i = start; i < end; ++i) {
- out += toHex(buf[i])
- }
- return out
- }
- function utf16leSlice (buf, start, end) {
- var bytes = buf.slice(start, end)
- var res = ''
- for (var i = 0; i < bytes.length; i += 2) {
- res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
- }
- return res
- }
- Buffer.prototype.slice = function slice (start, end) {
- var len = this.length
- start = ~~start
- end = end === undefined ? len : ~~end
- if (start < 0) {
- start += len
- if (start < 0) start = 0
- } else if (start > len) {
- start = len
- }
- if (end < 0) {
- end += len
- if (end < 0) end = 0
- } else if (end > len) {
- end = len
- }
- if (end < start) end = start
- var newBuf
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- newBuf = this.subarray(start, end)
- newBuf.__proto__ = Buffer.prototype
- } else {
- var sliceLen = end - start
- newBuf = new Buffer(sliceLen, undefined)
- for (var i = 0; i < sliceLen; ++i) {
- newBuf[i] = this[i + start]
- }
- }
- return newBuf
- }
- /*
- * Need to make sure that buffer isn't trying to write out of bounds.
- */
- function checkOffset (offset, ext, length) {
- if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
- if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
- }
- Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkOffset(offset, byteLength, this.length)
- var val = this[offset]
- var mul = 1
- var i = 0
- while (++i < byteLength && (mul *= 0x100)) {
- val += this[offset + i] * mul
- }
- return val
- }
- Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) {
- checkOffset(offset, byteLength, this.length)
- }
- var val = this[offset + --byteLength]
- var mul = 1
- while (byteLength > 0 && (mul *= 0x100)) {
- val += this[offset + --byteLength] * mul
- }
- return val
- }
- Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 1, this.length)
- return this[offset]
- }
- Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- return this[offset] | (this[offset + 1] << 8)
- }
- Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- return (this[offset] << 8) | this[offset + 1]
- }
- Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return ((this[offset]) |
- (this[offset + 1] << 8) |
- (this[offset + 2] << 16)) +
- (this[offset + 3] * 0x1000000)
- }
- Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return (this[offset] * 0x1000000) +
- ((this[offset + 1] << 16) |
- (this[offset + 2] << 8) |
- this[offset + 3])
- }
- Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkOffset(offset, byteLength, this.length)
- var val = this[offset]
- var mul = 1
- var i = 0
- while (++i < byteLength && (mul *= 0x100)) {
- val += this[offset + i] * mul
- }
- mul *= 0x80
- if (val >= mul) val -= Math.pow(2, 8 * byteLength)
- return val
- }
- Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkOffset(offset, byteLength, this.length)
- var i = byteLength
- var mul = 1
- var val = this[offset + --i]
- while (i > 0 && (mul *= 0x100)) {
- val += this[offset + --i] * mul
- }
- mul *= 0x80
- if (val >= mul) val -= Math.pow(2, 8 * byteLength)
- return val
- }
- Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 1, this.length)
- if (!(this[offset] & 0x80)) return (this[offset])
- return ((0xff - this[offset] + 1) * -1)
- }
- Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- var val = this[offset] | (this[offset + 1] << 8)
- return (val & 0x8000) ? val | 0xFFFF0000 : val
- }
- Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- var val = this[offset + 1] | (this[offset] << 8)
- return (val & 0x8000) ? val | 0xFFFF0000 : val
- }
- Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return (this[offset]) |
- (this[offset + 1] << 8) |
- (this[offset + 2] << 16) |
- (this[offset + 3] << 24)
- }
- Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return (this[offset] << 24) |
- (this[offset + 1] << 16) |
- (this[offset + 2] << 8) |
- (this[offset + 3])
- }
- Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return ieee754.read(this, offset, true, 23, 4)
- }
- Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return ieee754.read(this, offset, false, 23, 4)
- }
- Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 8, this.length)
- return ieee754.read(this, offset, true, 52, 8)
- }
- Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 8, this.length)
- return ieee754.read(this, offset, false, 52, 8)
- }
- function checkInt (buf, value, offset, ext, max, min) {
- if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
- if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
- if (offset + ext > buf.length) throw new RangeError('Index out of range')
- }
- Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) {
- var maxBytes = Math.pow(2, 8 * byteLength) - 1
- checkInt(this, value, offset, byteLength, maxBytes, 0)
- }
- var mul = 1
- var i = 0
- this[offset] = value & 0xFF
- while (++i < byteLength && (mul *= 0x100)) {
- this[offset + i] = (value / mul) & 0xFF
- }
- return offset + byteLength
- }
- Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) {
- var maxBytes = Math.pow(2, 8 * byteLength) - 1
- checkInt(this, value, offset, byteLength, maxBytes, 0)
- }
- var i = byteLength - 1
- var mul = 1
- this[offset + i] = value & 0xFF
- while (--i >= 0 && (mul *= 0x100)) {
- this[offset + i] = (value / mul) & 0xFF
- }
- return offset + byteLength
- }
- Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
- if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
- this[offset] = (value & 0xff)
- return offset + 1
- }
- function objectWriteUInt16 (buf, value, offset, littleEndian) {
- if (value < 0) value = 0xffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
- buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
- (littleEndian ? i : 1 - i) * 8
- }
- }
- Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
- this[offset + 1] = (value >>> 8)
- } else {
- objectWriteUInt16(this, value, offset, true)
- }
- return offset + 2
- }
- Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 8)
- this[offset + 1] = (value & 0xff)
- } else {
- objectWriteUInt16(this, value, offset, false)
- }
- return offset + 2
- }
- function objectWriteUInt32 (buf, value, offset, littleEndian) {
- if (value < 0) value = 0xffffffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
- buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
- }
- }
- Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset + 3] = (value >>> 24)
- this[offset + 2] = (value >>> 16)
- this[offset + 1] = (value >>> 8)
- this[offset] = (value & 0xff)
- } else {
- objectWriteUInt32(this, value, offset, true)
- }
- return offset + 4
- }
- Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 24)
- this[offset + 1] = (value >>> 16)
- this[offset + 2] = (value >>> 8)
- this[offset + 3] = (value & 0xff)
- } else {
- objectWriteUInt32(this, value, offset, false)
- }
- return offset + 4
- }
- Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) {
- var limit = Math.pow(2, 8 * byteLength - 1)
- checkInt(this, value, offset, byteLength, limit - 1, -limit)
- }
- var i = 0
- var mul = 1
- var sub = 0
- this[offset] = value & 0xFF
- while (++i < byteLength && (mul *= 0x100)) {
- if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
- sub = 1
- }
- this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
- }
- return offset + byteLength
- }
- Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) {
- var limit = Math.pow(2, 8 * byteLength - 1)
- checkInt(this, value, offset, byteLength, limit - 1, -limit)
- }
- var i = byteLength - 1
- var mul = 1
- var sub = 0
- this[offset + i] = value & 0xFF
- while (--i >= 0 && (mul *= 0x100)) {
- if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
- sub = 1
- }
- this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
- }
- return offset + byteLength
- }
- Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
- if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
- if (value < 0) value = 0xff + value + 1
- this[offset] = (value & 0xff)
- return offset + 1
- }
- Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
- this[offset + 1] = (value >>> 8)
- } else {
- objectWriteUInt16(this, value, offset, true)
- }
- return offset + 2
- }
- Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 8)
- this[offset + 1] = (value & 0xff)
- } else {
- objectWriteUInt16(this, value, offset, false)
- }
- return offset + 2
- }
- Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
- this[offset + 1] = (value >>> 8)
- this[offset + 2] = (value >>> 16)
- this[offset + 3] = (value >>> 24)
- } else {
- objectWriteUInt32(this, value, offset, true)
- }
- return offset + 4
- }
- Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
- if (value < 0) value = 0xffffffff + value + 1
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 24)
- this[offset + 1] = (value >>> 16)
- this[offset + 2] = (value >>> 8)
- this[offset + 3] = (value & 0xff)
- } else {
- objectWriteUInt32(this, value, offset, false)
- }
- return offset + 4
- }
- function checkIEEE754 (buf, value, offset, ext, max, min) {
- if (offset + ext > buf.length) throw new RangeError('Index out of range')
- if (offset < 0) throw new RangeError('Index out of range')
- }
- function writeFloat (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
- }
- ieee754.write(buf, value, offset, littleEndian, 23, 4)
- return offset + 4
- }
- Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
- return writeFloat(this, value, offset, true, noAssert)
- }
- Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
- return writeFloat(this, value, offset, false, noAssert)
- }
- function writeDouble (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
- }
- ieee754.write(buf, value, offset, littleEndian, 52, 8)
- return offset + 8
- }
- Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
- return writeDouble(this, value, offset, true, noAssert)
- }
- Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
- return writeDouble(this, value, offset, false, noAssert)
- }
- // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
- Buffer.prototype.copy = function copy (target, targetStart, start, end) {
- if (!start) start = 0
- if (!end && end !== 0) end = this.length
- if (targetStart >= target.length) targetStart = target.length
- if (!targetStart) targetStart = 0
- if (end > 0 && end < start) end = start
- // Copy 0 bytes; we're done
- if (end === start) return 0
- if (target.length === 0 || this.length === 0) return 0
- // Fatal error conditions
- if (targetStart < 0) {
- throw new RangeError('targetStart out of bounds')
- }
- if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
- if (end < 0) throw new RangeError('sourceEnd out of bounds')
- // Are we oob?
- if (end > this.length) end = this.length
- if (target.length - targetStart < end - start) {
- end = target.length - targetStart + start
- }
- var len = end - start
- var i
- if (this === target && start < targetStart && targetStart < end) {
- // descending copy from end
- for (i = len - 1; i >= 0; --i) {
- target[i + targetStart] = this[i + start]
- }
- } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
- // ascending copy from start
- for (i = 0; i < len; ++i) {
- target[i + targetStart] = this[i + start]
- }
- } else {
- Uint8Array.prototype.set.call(
- target,
- this.subarray(start, start + len),
- targetStart
- )
- }
- return len
- }
- // Usage:
- // buffer.fill(number[, offset[, end]])
- // buffer.fill(buffer[, offset[, end]])
- // buffer.fill(string[, offset[, end]][, encoding])
- Buffer.prototype.fill = function fill (val, start, end, encoding) {
- // Handle string cases:
- if (typeof val === 'string') {
- if (typeof start === 'string') {
- encoding = start
- start = 0
- end = this.length
- } else if (typeof end === 'string') {
- encoding = end
- end = this.length
- }
- if (val.length === 1) {
- var code = val.charCodeAt(0)
- if (code < 256) {
- val = code
- }
- }
- if (encoding !== undefined && typeof encoding !== 'string') {
- throw new TypeError('encoding must be a string')
- }
- if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
- throw new TypeError('Unknown encoding: ' + encoding)
- }
- } else if (typeof val === 'number') {
- val = val & 255
- }
- // Invalid ranges are not set to a default, so can range check early.
- if (start < 0 || this.length < start || this.length < end) {
- throw new RangeError('Out of range index')
- }
- if (end <= start) {
- return this
- }
- start = start >>> 0
- end = end === undefined ? this.length : end >>> 0
- if (!val) val = 0
- var i
- if (typeof val === 'number') {
- for (i = start; i < end; ++i) {
- this[i] = val
- }
- } else {
- var bytes = Buffer.isBuffer(val)
- ? val
- : utf8ToBytes(new Buffer(val, encoding).toString())
- var len = bytes.length
- for (i = 0; i < end - start; ++i) {
- this[i + start] = bytes[i % len]
- }
- }
- return this
- }
- // HELPER FUNCTIONS
- // ================
- var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
- function base64clean (str) {
- // Node strips out invalid characters like \n and \t from the string, base64-js does not
- str = stringtrim(str).replace(INVALID_BASE64_RE, '')
- // Node converts strings with length < 2 to ''
- if (str.length < 2) return ''
- // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
- while (str.length % 4 !== 0) {
- str = str + '='
- }
- return str
- }
- function stringtrim (str) {
- if (str.trim) return str.trim()
- return str.replace(/^\s+|\s+$/g, '')
- }
- function toHex (n) {
- if (n < 16) return '0' + n.toString(16)
- return n.toString(16)
- }
- function utf8ToBytes (string, units) {
- units = units || Infinity
- var codePoint
- var length = string.length
- var leadSurrogate = null
- var bytes = []
- for (var i = 0; i < length; ++i) {
- codePoint = string.charCodeAt(i)
- // is surrogate component
- if (codePoint > 0xD7FF && codePoint < 0xE000) {
- // last char was a lead
- if (!leadSurrogate) {
- // no lead yet
- if (codePoint > 0xDBFF) {
- // unexpected trail
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- continue
- } else if (i + 1 === length) {
- // unpaired lead
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- continue
- }
- // valid lead
- leadSurrogate = codePoint
- continue
- }
- // 2 leads in a row
- if (codePoint < 0xDC00) {
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- leadSurrogate = codePoint
- continue
- }
- // valid surrogate pair
- codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
- } else if (leadSurrogate) {
- // valid bmp char, but last char was a lead
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- }
- leadSurrogate = null
- // encode utf8
- if (codePoint < 0x80) {
- if ((units -= 1) < 0) break
- bytes.push(codePoint)
- } else if (codePoint < 0x800) {
- if ((units -= 2) < 0) break
- bytes.push(
- codePoint >> 0x6 | 0xC0,
- codePoint & 0x3F | 0x80
- )
- } else if (codePoint < 0x10000) {
- if ((units -= 3) < 0) break
- bytes.push(
- codePoint >> 0xC | 0xE0,
- codePoint >> 0x6 & 0x3F | 0x80,
- codePoint & 0x3F | 0x80
- )
- } else if (codePoint < 0x110000) {
- if ((units -= 4) < 0) break
- bytes.push(
- codePoint >> 0x12 | 0xF0,
- codePoint >> 0xC & 0x3F | 0x80,
- codePoint >> 0x6 & 0x3F | 0x80,
- codePoint & 0x3F | 0x80
- )
- } else {
- throw new Error('Invalid code point')
- }
- }
- return bytes
- }
- function asciiToBytes (str) {
- var byteArray = []
- for (var i = 0; i < str.length; ++i) {
- // Node's code seems to be doing this and not & 0x7F..
- byteArray.push(str.charCodeAt(i) & 0xFF)
- }
- return byteArray
- }
- function utf16leToBytes (str, units) {
- var c, hi, lo
- var byteArray = []
- for (var i = 0; i < str.length; ++i) {
- if ((units -= 2) < 0) break
- c = str.charCodeAt(i)
- hi = c >> 8
- lo = c % 256
- byteArray.push(lo)
- byteArray.push(hi)
- }
- return byteArray
- }
- function base64ToBytes (str) {
- return base64.toByteArray(base64clean(str))
- }
- function blitBuffer (src, dst, offset, length) {
- for (var i = 0; i < length; ++i) {
- if ((i + offset >= dst.length) || (i >= src.length)) break
- dst[i + offset] = src[i]
- }
- return i
- }
- function isnan (val) {
- return val !== val // eslint-disable-line no-self-compare
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d")))
- /***/ }),
- /***/ "3e48":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {
- if (typeof process === 'undefined' ||
- !process.version ||
- process.version.indexOf('v0.') === 0 ||
- process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
- module.exports = { nextTick: nextTick };
- } else {
- module.exports = process
- }
- function nextTick(fn, arg1, arg2, arg3) {
- if (typeof fn !== 'function') {
- throw new TypeError('"callback" argument must be a function');
- }
- var len = arguments.length;
- var args, i;
- switch (len) {
- case 0:
- case 1:
- return process.nextTick(fn);
- case 2:
- return process.nextTick(function afterTickOne() {
- fn.call(null, arg1);
- });
- case 3:
- return process.nextTick(function afterTickTwo() {
- fn.call(null, arg1, arg2);
- });
- case 4:
- return process.nextTick(function afterTickThree() {
- fn.call(null, arg1, arg2, arg3);
- });
- default:
- args = new Array(len - 1);
- i = 0;
- while (i < args.length) {
- args[i++] = arguments[i];
- }
- return process.nextTick(function afterTick() {
- fn.apply(null, args);
- });
- }
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("f2ac")))
- /***/ }),
- /***/ "3e59":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/table-popup/TablePopup.vue?vue&type=template&id=1c51b447&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-table-popup",style:([_vm.backgroundStyle, _vm.getTextColorStyle, _vm.styleObject])},[_c('div',{staticClass:"sm-component-table-popup__close"},[_vm._v("x")]),_vm._v(" "),_c('a-table',{staticClass:"sm-component-table-popup__table",style:(_vm.backgroundStyle),attrs:{"data-source":_vm.data,"columns":_vm.columns,"rowKey":function (record, index) { return index; },"pagination":false}})],1)}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/table-popup/TablePopup.vue?vue&type=template&id=1c51b447&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "3ef3":
- /***/ (function(module, exports, __webpack_require__) {
- /**
- * geostats() is a tiny and standalone javascript library for classification
- * Project page - https://github.com/simogeo/geostats
- * Copyright (c) 2011 Simon Georget, http://www.empreinte-urbaine.eu
- * Licensed under the MIT license
- */
- (function (definition) {
- // This file will function properly as a <script> tag, or a module
- // using CommonJS and NodeJS or RequireJS module formats.
- // CommonJS
- if (true) {
- module.exports = definition();
- // RequireJS
- } else {}
- })(function () {
- var isInt = function(n) {
- return typeof n === 'number' && parseFloat(n) == parseInt(n, 10) && !isNaN(n);
- } // 6 characters
- var _t = function(str) {
- return str;
- };
- //taking from http://stackoverflow.com/questions/18082/validate-decimal-numbers-in-javascript-isnumeric
- var isNumber = function(n) {
- return !isNaN(parseFloat(n)) && isFinite(n);
- }
- //indexOf polyfill
- // from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
- if (!Array.prototype.indexOf) {
- Array.prototype.indexOf = function (searchElement, fromIndex) {
- if ( this === undefined || this === null ) {
- throw new TypeError( '"this" is null or not defined' );
- }
- var length = this.length >>> 0; // Hack to convert object.length to a UInt32
- fromIndex = +fromIndex || 0;
- if (Math.abs(fromIndex) === Infinity) {
- fromIndex = 0;
- }
- if (fromIndex < 0) {
- fromIndex += length;
- if (fromIndex < 0) {
- fromIndex = 0;
- }
- }
- for (;fromIndex < length; fromIndex++) {
- if (this[fromIndex] === searchElement) {
- return fromIndex;
- }
- }
- return -1;
- };
- }
- var geostats = function(a) {
- this.objectID = '';
- this.separator = ' - ';
- this.legendSeparator = this.separator;
- this.method = '';
- this.precision = 0;
- this.precisionflag = 'auto';
- this.roundlength = 2; // Number of decimals, round values
- this.is_uniqueValues = false;
- this.debug = false;
- this.silent = false;
-
- this.bounds = Array();
- this.ranges = Array();
- this.inner_ranges = null;
- this.colors = Array();
- this.counter = Array();
-
- // statistics information
- this.stat_sorted = null;
- this.stat_mean = null;
- this.stat_median = null;
- this.stat_sum = null;
- this.stat_max = null;
- this.stat_min = null;
- this.stat_pop = null;
- this.stat_variance = null;
- this.stat_stddev = null;
- this.stat_cov = null;
-
- /**
- * logging method
- */
- this.log = function(msg, force) {
-
- if(this.debug == true || force != null)
- console.log(this.objectID + "(object id) :: " + msg);
-
- };
-
- /**
- * Set bounds
- */
- this.setBounds = function(a) {
-
- this.log('Setting bounds (' + a.length + ') : ' + a.join());
-
- this.bounds = Array() // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
-
- this.bounds = a;
- //this.bounds = this.decimalFormat(a);
-
- };
-
- /**
- * Set a new serie
- */
- this.setSerie = function(a) {
-
- this.log('Setting serie (' + a.length + ') : ' + a.join());
-
- this.serie = Array() // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
- this.serie = a;
-
- //reset statistics after changing serie
- this.resetStatistics();
-
- this.setPrecision();
-
- };
-
- /**
- * Set colors
- */
- this.setColors = function(colors) {
-
- this.log('Setting color ramp (' + colors.length + ') : ' + colors.join());
-
- this.colors = colors;
-
- };
-
- /**
- * Get feature count
- * With bounds array(0, 0.75, 1.5, 2.25, 3);
- * should populate this.counter with 5 keys
- * and increment counters for each key
- */
- this.doCount = function() {
- if (this._nodata())
- return;
-
- var tmp = this.sorted();
-
- this.counter = new Array();
-
- // we init counter with 0 value
- for(i = 0; i < this.bounds.length -1; i++) {
- this.counter[i]= 0;
- }
-
- for(j=0; j < tmp.length; j++) {
-
- // get current class for value to increment the counter
- var cclass = this.getClass(tmp[j]);
- this.counter[cclass]++;
- }
- };
-
- /**
- * Set decimal precision according to user input
- * or automatcally determined according
- * to the given serie.
- */
- this.setPrecision = function(decimals) {
-
- // only when called from user
- if(typeof decimals !== "undefined") {
- this.precisionflag = 'manual';
- this.precision = decimals;
- }
-
- // we calculate the maximal decimal length on given serie
- if(this.precisionflag == 'auto') {
-
- for (var i = 0; i < this.serie.length; i++) {
-
- // check if the given value is a number and a float
- if (!isNaN((this.serie[i]+"")) && (this.serie[i]+"").toString().indexOf('.') != -1) {
- var precision = (this.serie[i] + "").split(".")[1].length;
- } else {
- var precision = 0;
- }
-
- if(precision > this.precision) {
- this.precision = precision;
- }
-
- }
-
- }
- if(this.precision > 20) {
- // prevent "Uncaught RangeError: toFixed() digits argument must be between 0 and 20" bug. See https://github.com/simogeo/geostats/issues/34
- this.log('this.precision value (' + this.precision + ') is greater than max value. Automatic set-up to 20 to prevent "Uncaught RangeError: toFixed()" when calling decimalFormat() method.');
- this.precision = 20;
- }
- this.log('Calling setPrecision(). Mode : ' + this.precisionflag + ' - Decimals : '+ this.precision);
-
- this.serie = this.decimalFormat(this.serie);
-
- };
-
- /**
- * Format array numbers regarding to precision
- */
- this.decimalFormat = function(a) {
-
- var b = new Array();
-
- for (var i = 0; i < a.length; i++) {
- // check if the given value is a number
- if (isNumber(a[i])) {
- b[i] = parseFloat(parseFloat(a[i]).toFixed(this.precision));
- } else {
- b[i] = a[i];
- }
- }
-
- return b;
- }
-
- /**
- * Transform a bounds array to a range array the following array : array(0,
- * 0.75, 1.5, 2.25, 3); becomes : array('0-0.75', '0.75-1.5', '1.5-2.25',
- * '2.25-3');
- */
- this.setRanges = function() {
-
- this.ranges = Array(); // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
-
- for (i = 0; i < (this.bounds.length - 1); i++) {
- this.ranges[i] = this.bounds[i] + this.separator + this.bounds[i + 1];
- }
- };
- /** return min value */
- this.min = function() {
-
- if (this._nodata())
- return;
-
- this.stat_min = this.serie[0];
-
- for (i = 0; i < this.pop(); i++) {
- if (this.serie[i] < this.stat_min) {
- this.stat_min = this.serie[i];
- }
- }
- return this.stat_min;
- };
- /** return max value */
- this.max = function() {
-
- if (this._nodata())
- return;
-
- this.stat_max = this.serie[0];
- for (i = 0; i < this.pop(); i++) {
- if (this.serie[i] > this.stat_max) {
- this.stat_max = this.serie[i];
- }
- }
-
- return this.stat_max;
- };
- /** return sum value */
- this.sum = function() {
-
- if (this._nodata())
- return;
-
- if (this.stat_sum == null) {
-
- this.stat_sum = 0;
- for (i = 0; i < this.pop(); i++) {
- this.stat_sum += parseFloat(this.serie[i]);
- }
-
- }
-
- return this.stat_sum;
- };
- /** return population number */
- this.pop = function() {
-
- if (this._nodata())
- return;
-
- if (this.stat_pop == null) {
-
- this.stat_pop = this.serie.length;
-
- }
-
- return this.stat_pop;
- };
- /** return mean value */
- this.mean = function() {
-
- if (this._nodata())
- return;
- if (this.stat_mean == null) {
-
- this.stat_mean = parseFloat(this.sum() / this.pop());
-
- }
-
- return this.stat_mean;
- };
- /** return median value */
- this.median = function() {
-
- if (this._nodata())
- return;
-
- if (this.stat_median == null) {
-
- this.stat_median = 0;
- var tmp = this.sorted();
-
- // serie pop is odd
- if (tmp.length % 2) {
- this.stat_median = parseFloat(tmp[(Math.ceil(tmp.length / 2) - 1)]);
-
- // serie pop is even
- } else {
- this.stat_median = ( parseFloat(tmp[((tmp.length / 2) - 1)]) + parseFloat(tmp[(tmp.length / 2)]) ) / 2;
- }
-
- }
-
- return this.stat_median;
- };
- /** return variance value */
- this.variance = function() {
-
- round = (typeof round === "undefined") ? true : false;
-
- if (this._nodata())
- return;
-
- if (this.stat_variance == null) {
- var tmp = 0, serie_mean = this.mean();
- for (var i = 0; i < this.pop(); i++) {
- tmp += Math.pow( (this.serie[i] - serie_mean), 2 );
- }
- this.stat_variance = tmp / this.pop();
-
- if(round == true) {
- this.stat_variance = Math.round(this.stat_variance * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);
- }
-
- }
-
- return this.stat_variance;
- };
-
- /** return standard deviation value */
- this.stddev = function(round) {
-
- round = (typeof round === "undefined") ? true : false;
-
- if (this._nodata())
- return;
-
- if (this.stat_stddev == null) {
-
- this.stat_stddev = Math.sqrt(this.variance());
-
- if(round == true) {
- this.stat_stddev = Math.round(this.stat_stddev * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);
- }
-
- }
-
- return this.stat_stddev;
- };
-
- /** coefficient of variation - measure of dispersion */
- this.cov = function(round) {
-
- round = (typeof round === "undefined") ? true : false;
-
- if (this._nodata())
- return;
-
- if (this.stat_cov == null) {
-
- this.stat_cov = this.stddev() / this.mean();
-
- if(round == true) {
- this.stat_cov = Math.round(this.stat_cov * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);
- }
-
- }
-
- return this.stat_cov;
- };
-
- /** reset all attributes after setting a new serie */
- this.resetStatistics = function() {
- this.stat_sorted = null;
- this.stat_mean = null;
- this.stat_median = null;
- this.stat_sum = null;
- this.stat_max = null;
- this.stat_min = null;
- this.stat_pop = null;
- this.stat_variance = null;
- this.stat_stddev = null;
- this.stat_cov = null;
- }
-
- /** data test */
- this._nodata = function() {
- if (this.serie.length == 0) {
-
- if(this.silent) this.log("[silent mode] Error. You should first enter a serie!", true);
- else throw new TypeError("Error. You should first enter a serie!");
- return 1;
- } else
- return 0;
-
- };
-
- /** check if the serie contains negative value */
- this._hasNegativeValue = function() {
-
- for (i = 0; i < this.serie.length; i++) {
- if(this.serie[i] < 0)
- return true;
- }
- return false;
- };
-
- /** check if the serie contains zero value */
- this._hasZeroValue = function() {
-
- for (i = 0; i < this.serie.length; i++) {
- if(parseFloat(this.serie[i]) === 0)
- return true;
- }
- return false;
- };
- /** return sorted values (as array) */
- this.sorted = function() {
-
- if (this.stat_sorted == null) {
-
- if(this.is_uniqueValues == false) {
- this.stat_sorted = this.serie.sort(function(a, b) {
- return a - b;
- });
- } else {
- this.stat_sorted = this.serie.sort(function(a,b){
- var nameA=a.toString().toLowerCase(), nameB=b.toString().toLowerCase();
- if(nameA < nameB) return -1;
- if(nameA > nameB) return 1;
- return 0;
- })
- }
- }
-
- return this.stat_sorted;
-
- };
- /** return all info */
- this.info = function() {
-
- if (this._nodata())
- return;
-
- var content = '';
- content += _t('Population') + ' : ' + this.pop() + ' - [' + _t('Min')
- + ' : ' + this.min() + ' | ' + _t('Max') + ' : ' + this.max()
- + ']' + "\n";
- content += _t('Mean') + ' : ' + this.mean() + ' - ' + _t('Median') + ' : ' + this.median() + "\n";
- content += _t('Variance') + ' : ' + this.variance() + ' - ' + _t('Standard deviation') + ' : ' + this.stddev()
- + ' - ' + _t('Coefficient of variation') + ' : ' + this.cov() + "\n";
- return content;
- };
-
- /**
- * Set Manual classification Return an array with bounds : ie array(0,
- * 0.75, 1.5, 2.25, 3);
- * Set ranges and prepare data for displaying legend
- *
- */
- this.setClassManually = function(array) {
- if (this._nodata())
- return;
- if(array[0] !== this.min() || array[array.length-1] !== this.max()) {
- if(this.silent) this.log("[silent mode] " + t('Given bounds may not be correct! please check your input.\nMin value : ' + this.min() + ' / Max value : ' + this.max()), true);
- else throw new TypeError(_t('Given bounds may not be correct! please check your input.\nMin value : ' + this.min() + ' / Max value : ' + this.max()));
- return;
- }
- this.setBounds(array);
- this.setRanges();
-
- // we specify the classification method
- this.method = _t('manual classification') + ' (' + (array.length -1) + ' ' + _t('classes') + ')';
- return this.bounds;
- };
- /**
- * Equal intervals classification Return an array with bounds : ie array(0,
- * 0.75, 1.5, 2.25, 3);
- */
- this.getClassEqInterval = function(nbClass, forceMin, forceMax) {
- if (this._nodata())
- return;
- var tmpMin = (typeof forceMin === "undefined") ? this.min() : forceMin;
- var tmpMax = (typeof forceMax === "undefined") ? this.max() : forceMax;
-
- var a = Array();
- var val = tmpMin;
- var interval = (tmpMax - tmpMin) / nbClass;
- for (i = 0; i <= nbClass; i++) {
- a[i] = val;
- val += interval;
- }
- //-> Fix last bound to Max of values
- a[nbClass] = tmpMax;
- this.setBounds(a);
- this.setRanges();
-
- // we specify the classification method
- this.method = _t('eq. intervals') + ' (' + nbClass + ' ' + _t('classes') + ')';
- return this.bounds;
- };
-
- this.getQuantiles = function(nbClass) {
- var tmp = this.sorted();
- var quantiles = [];
- var step = this.pop() / nbClass;
- for (var i = 1; i < nbClass; i++) {
- var qidx = Math.round(i*step+0.49);
- quantiles.push(tmp[qidx-1]); // zero-based
- }
- return quantiles;
- };
- /**
- * Quantile classification Return an array with bounds : ie array(0, 0.75,
- * 1.5, 2.25, 3);
- */
- this.getClassQuantile = function(nbClass) {
- if (this._nodata())
- return;
- var tmp = this.sorted();
- var bounds = this.getQuantiles(nbClass);
- bounds.unshift(tmp[0]);
- if (bounds[tmp.length - 1] !== tmp[tmp.length - 1])
- bounds.push(tmp[tmp.length - 1]);
- this.setBounds(bounds);
- this.setRanges();
- // we specify the classification method
- this.method = _t('quantile') + ' (' + nbClass + ' ' + _t('classes') + ')';
- return this.bounds;
- };
-
- /**
- * Standard Deviation classification
- * Return an array with bounds : ie array(0,
- * 0.75, 1.5, 2.25, 3);
- */
- this.getClassStdDeviation = function(nbClass, matchBounds) {
- if (this._nodata())
- return;
- var tmpMax = this.max();
- var tmpMin = this.min();
-
- var a = Array();
-
- // number of classes is odd
- if(nbClass % 2 == 1) {
- // Euclidean division to get the inferior bound
- var infBound = Math.floor(nbClass / 2);
-
- var supBound = infBound + 1;
-
- // we set the central bounds
- a[infBound] = this.mean() - ( this.stddev() / 2);
- a[supBound] = this.mean() + ( this.stddev() / 2);
-
- // Values < to infBound, except first one
- for (i = infBound - 1; i > 0; i--) {
- var val = a[i+1] - this.stddev();
- a[i] = val;
- }
-
- // Values > to supBound, except last one
- for (i = supBound + 1; i < nbClass; i++) {
- var val = a[i-1] + this.stddev();
- a[i] = val;
- }
-
- // number of classes is even
- } else {
-
- var meanBound = nbClass / 2;
-
- // we get the mean value
- a[meanBound] = this.mean();
-
- // Values < to the mean, except first one
- for (i = meanBound - 1; i > 0; i--) {
- var val = a[i+1] - this.stddev();
- a[i] = val;
- }
-
- // Values > to the mean, except last one
- for (i = meanBound + 1; i < nbClass; i++) {
- var val = a[i-1] + this.stddev();
- a[i] = val;
- }
- }
-
-
- // we finally set the first value
- // do we excatly match min value or not ?
- a[0] = (typeof matchBounds === "undefined") ? a[1]-this.stddev() : this.min();
-
- // we finally set the last value
- // do we excatly match max value or not ?
- a[nbClass] = (typeof matchBounds === "undefined") ? a[nbClass-1]+this.stddev() : this.max();
- this.setBounds(a);
- this.setRanges();
-
- // we specify the classification method
- this.method = _t('std deviation') + ' (' + nbClass + ' ' + _t('classes')+ ')';
-
- return this.bounds;
- };
-
-
- /**
- * Geometric Progression classification
- * http://en.wikipedia.org/wiki/Geometric_progression
- * Return an array with bounds : ie array(0,
- * 0.75, 1.5, 2.25, 3);
- */
- this.getClassGeometricProgression = function(nbClass) {
- if (this._nodata())
- return;
- if(this._hasNegativeValue() || this._hasZeroValue()) {
- if(this.silent) this.log("[silent mode] " + _t('geometric progression can\'t be applied with a serie containing negative or zero values.'), true);
- else throw new TypeError(_t('geometric progression can\'t be applied with a serie containing negative or zero values.'));
- return;
- }
-
- var a = Array();
- var tmpMin = this.min();
- var tmpMax = this.max();
-
- var logMax = Math.log(tmpMax) / Math.LN10; // max decimal logarithm (or base 10)
- var logMin = Math.log(tmpMin) / Math.LN10;; // min decimal logarithm (or base 10)
-
- var interval = (logMax - logMin) / nbClass;
-
- // we compute log bounds
- for (i = 0; i < nbClass; i++) {
- if(i == 0) {
- a[i] = logMin;
- } else {
- a[i] = a[i-1] + interval;
- }
- }
-
- // we compute antilog
- a = a.map(function(x) { return Math.pow(10, x); });
-
- // and we finally add max value
- a.push(this.max());
-
- this.setBounds(a);
- this.setRanges();
-
- // we specify the classification method
- this.method = _t('geometric progression') + ' (' + nbClass + ' ' + _t('classes') + ')';
- return this.bounds;
- };
-
- /**
- * Arithmetic Progression classification
- * http://en.wikipedia.org/wiki/Arithmetic_progression
- * Return an array with bounds : ie array(0,
- * 0.75, 1.5, 2.25, 3);
- */
- this.getClassArithmeticProgression = function(nbClass) {
- if (this._nodata())
- return;
-
- var denominator = 0;
-
- // we compute the (french) "Raison"
- for (i = 1; i <= nbClass; i++) {
- denominator += i;
- }
- var a = Array();
- var tmpMin = this.min();
- var tmpMax = this.max();
-
- var interval = (tmpMax - tmpMin) / denominator;
- for (i = 0; i <= nbClass; i++) {
- if(i == 0) {
- a[i] = tmpMin;
- } else {
- a[i] = a[i-1] + (i * interval);
- }
- }
- this.setBounds(a);
- this.setRanges();
-
- // we specify the classification method
- this.method = _t('arithmetic progression') + ' (' + nbClass + ' ' + _t('classes') + ')';
- return this.bounds;
- };
-
- /**
- * Credits : Doug Curl (javascript) and Daniel J Lewis (python implementation)
- * http://www.arcgis.com/home/item.html?id=0b633ff2f40d412995b8be377211c47b
- * http://danieljlewis.org/2010/06/07/jenks-natural-breaks-algorithm-in-python/
- */
- this.getClassJenks = function(nbClass) {
-
- if (this._nodata())
- return;
-
- dataList = this.sorted();
- // now iterate through the datalist:
- // determine mat1 and mat2
- // really not sure how these 2 different arrays are set - the code for
- // each seems the same!
- // but the effect are 2 different arrays: mat1 and mat2
- var mat1 = []
- for ( var x = 0, xl = dataList.length + 1; x < xl; x++) {
- var temp = []
- for ( var j = 0, jl = nbClass + 1; j < jl; j++) {
- temp.push(0)
- }
- mat1.push(temp)
- }
- var mat2 = []
- for ( var i = 0, il = dataList.length + 1; i < il; i++) {
- var temp2 = []
- for ( var c = 0, cl = nbClass + 1; c < cl; c++) {
- temp2.push(0)
- }
- mat2.push(temp2)
- }
- // absolutely no idea what this does - best I can tell, it sets the 1st
- // group in the
- // mat1 and mat2 arrays to 1 and 0 respectively
- for ( var y = 1, yl = nbClass + 1; y < yl; y++) {
- mat1[0][y] = 1
- mat2[0][y] = 0
- for ( var t = 1, tl = dataList.length + 1; t < tl; t++) {
- mat2[t][y] = Infinity
- }
- var v = 0.0
- }
- // and this part - I'm a little clueless on - but it works
- // pretty sure it iterates across the entire dataset and compares each
- // value to
- // one another to and adjust the indices until you meet the rules:
- // minimum deviation
- // within a class and maximum separation between classes
- for ( var l = 2, ll = dataList.length + 1; l < ll; l++) {
- var s1 = 0.0
- var s2 = 0.0
- var w = 0.0
- for ( var m = 1, ml = l + 1; m < ml; m++) {
- var i3 = l - m + 1
- var val = parseFloat(dataList[i3 - 1])
- s2 += val * val
- s1 += val
- w += 1
- v = s2 - (s1 * s1) / w
- var i4 = i3 - 1
- if (i4 != 0) {
- for ( var p = 2, pl = nbClass + 1; p < pl; p++) {
- if (mat2[l][p] >= (v + mat2[i4][p - 1])) {
- mat1[l][p] = i3
- mat2[l][p] = v + mat2[i4][p - 1]
- }
- }
- }
- }
- mat1[l][1] = 1
- mat2[l][1] = v
- }
- var k = dataList.length
- var kclass = []
- // fill the kclass (classification) array with zeros:
- for (i = 0; i <= nbClass; i++) {
- kclass.push(0);
- }
- // this is the last number in the array:
- kclass[nbClass] = parseFloat(dataList[dataList.length - 1])
- // this is the first number - can set to zero, but want to set to lowest
- // to use for legend:
- kclass[0] = parseFloat(dataList[0])
- var countNum = nbClass
- while (countNum >= 2) {
- var id = parseInt((mat1[k][countNum]) - 2)
- kclass[countNum - 1] = dataList[id]
- k = parseInt((mat1[k][countNum] - 1))
- // spits out the rank and value of the break values:
- // console.log("id="+id,"rank = " + String(mat1[k][countNum]),"val =
- // " + String(dataList[id]))
- // count down:
- countNum -= 1
- }
- // check to see if the 0 and 1 in the array are the same - if so, set 0
- // to 0:
- if (kclass[0] == kclass[1]) {
- kclass[0] = 0
- }
- this.setBounds(kclass);
- this.setRanges();
-
- this.method = _t('Jenks') + ' (' + nbClass + ' ' + _t('classes') + ')';
-
- return this.bounds; //array of breaks
- }
-
-
- /**
- * Quantile classification Return an array with bounds : ie array(0, 0.75,
- * 1.5, 2.25, 3);
- */
- this.getClassUniqueValues = function() {
- if (this._nodata())
- return;
-
- this.is_uniqueValues = true;
-
- var tmp = this.sorted(); // display in alphabetical order
- var a = Array();
- for (i = 0; i < this.pop(); i++) {
- if(a.indexOf(tmp[i]) === -1)
- a.push(tmp[i]);
- }
-
- this.bounds = a;
-
- // we specify the classification method
- this.method = _t('unique values');
-
- return a;
- };
-
-
- /**
- * Return the class of a given value.
- * For example value : 6
- * and bounds array = (0, 4, 8, 12);
- * Return 2
- */
- this.getClass = function(value) {
- for(i = 0; i < this.bounds.length; i++) {
-
-
- if(this.is_uniqueValues == true) {
- if(value == this.bounds[i])
- return i;
- } else {
- // parseFloat() is necessary
- if(parseFloat(value) <= this.bounds[i + 1]) {
- return i;
- }
- }
- }
-
- return _t("Unable to get value's class.");
-
- };
- /**
- * Return the ranges array : array('0-0.75', '0.75-1.5', '1.5-2.25',
- * '2.25-3');
- */
- this.getRanges = function() {
-
- return this.ranges;
-
- };
- /**
- * Returns the number/index of this.ranges that value falls into
- */
- this.getRangeNum = function(value) {
-
- var bounds, i;
- for (i = 0; i < this.ranges.length; i++) {
- bounds = this.ranges[i].split(/ - /);
- if (value <= parseFloat(bounds[1])) {
- return i;
- }
- }
- }
-
- /*
- * Compute inner ranges based on serie.
- * Produce discontinous ranges used for legend - return an array similar to :
- * array('0.00-0.74', '0.98-1.52', '1.78-2.25', '2.99-3.14');
- * If inner ranges already computed, return array values.
- */
- this.getInnerRanges = function() {
-
- // if already computed, we return the result
- if(this.inner_ranges != null)
- return this.inner_ranges;
-
- var a = new Array();
- var tmp = this.sorted();
-
- var cnt = 1; // bounds array counter
-
- for (i = 0; i < tmp.length; i++) {
-
- if(i == 0) var range_firstvalue = tmp[i]; // we init first range value
-
- if(parseFloat(tmp[i]) > parseFloat(this.bounds[cnt])) {
-
- a[cnt - 1] = '' + range_firstvalue + this.separator + tmp[i-1];
-
- var range_firstvalue = tmp[i];
-
- cnt++;
- }
-
- // we reach the last range, we finally complete manually
- // and return the array
- if(cnt == (this.bounds.length - 1)) {
- // we set the last value
- a[cnt - 1] = '' + range_firstvalue + this.separator + tmp[tmp.length-1];
-
- this.inner_ranges = a;
- return this.inner_ranges;
- }
-
- }
-
- };
-
- this.getSortedlist = function() {
-
- return this.sorted().join(', ');
-
- };
-
- /**
- * Return an html legend
- * colors : specify an array of color (hexadecimal values)
- * legend : specify a text input for the legend. By default, just displays 'legend'
- * counter : if not null, display counter value
- * callback : if not null, callback function applied on legend boundaries
- * mode : null, 'default', 'distinct', 'discontinuous' :
- * - if mode is null, will display legend as 'default mode'
- * - 'default' : displays ranges like in ranges array (continuous values), sample : 29.26 - 378.80 / 378.80 - 2762.25 / 2762.25 - 6884.84
- * - 'distinct' : Add + 1 according to decimal precision to distinguish classes (discrete values), sample : 29.26 - 378.80 / 378.81 - 2762.25 / 2762.26 - 6884.84
- * - 'discontinuous' : indicates the range of data actually falling in each class , sample : 29.26 - 225.43 / 852.12 - 2762.20 / 3001.25 - 6884.84 / not implemented yet
- * order : null, 'ASC', 'DESC'
- */
- this.getHtmlLegend = function(colors, legend, counter, callback, mode, order) {
-
- var cnt= '';
- var elements = new Array();
-
- this.doCount(); // we do count, even if not displayed
-
- if(colors != null) {
- ccolors = colors;
- }
- else {
- ccolors = this.colors;
- }
-
- if(legend != null) {
- lg = legend;
- }
- else {
- lg = 'Legend';
- }
-
- if(counter != null) {
- getcounter = true;
- }
- else {
- getcounter = false;
- }
-
- if(callback != null) {
- fn = callback;
- }
- else {
- fn = function(o) {return o;};
- }
- if(mode == null) {
- mode = 'default';
- }
- if(mode == 'discontinuous') {
- this.getInnerRanges();
- // check if some classes are not populated / equivalent of in_array function
- if(this.counter.indexOf(0) !== -1) {
- if(this.silent) this.log("[silent mode] " + _t("Geostats cannot apply 'discontinuous' mode to the getHtmlLegend() method because some classes are not populated.\nPlease switch to 'default' or 'distinct' modes. Exit!"), true);
- else throw new TypeError(_t("Geostats cannot apply 'discontinuous' mode to the getHtmlLegend() method because some classes are not populated.\nPlease switch to 'default' or 'distinct' modes. Exit!"));
- return;
- }
- }
- if(order !== 'DESC') order = 'ASC';
-
- if(ccolors.length < this.ranges.length) {
- if(this.silent) this.log("[silent mode] " + _t('The number of colors should fit the number of ranges. Exit!'), true);
- else throw new TypeError(_t('The number of colors should fit the number of ranges. Exit!'));
- return;
- }
-
- if(this.is_uniqueValues == false) {
-
- for (i = 0; i < (this.ranges.length); i++) {
- if(getcounter===true) {
- cnt = ' <span class="geostats-legend-counter">(' + this.counter[i] + ')</span>';
- }
- //console.log("Ranges : " + this.ranges[i]);
-
- // default mode
- var tmp = this.ranges[i].split(this.separator);
-
- var start_value = parseFloat(tmp[0]).toFixed(this.precision);
- var end_value = parseFloat(tmp[1]).toFixed(this.precision);
-
-
- // if mode == 'distinct' and we are not working on the first value
- if(mode == 'distinct' && i != 0) {
- if(isInt(start_value)) {
- start_value = parseInt(start_value) + 1;
- // format to float if necessary
- if(this.precisionflag == 'manual' && this.precision != 0) start_value = parseFloat(start_value).toFixed(this.precision);
- } else {
- start_value = parseFloat(start_value) + (1 / Math.pow(10,this.precision));
- // strangely the formula above return sometimes long decimal values,
- // the following instruction fix it
- start_value = parseFloat(start_value).toFixed(this.precision);
- }
- }
-
- // if mode == 'discontinuous'
- if(mode == 'discontinuous') {
-
- var tmp = this.inner_ranges[i].split(this.separator);
- // console.log("Ranges : " + this.inner_ranges[i]);
-
- var start_value = parseFloat(tmp[0]).toFixed(this.precision);
- var end_value = parseFloat(tmp[1]).toFixed(this.precision);
-
- }
-
- // we apply callback function
- var el = fn(start_value) + this.legendSeparator + fn(end_value);
-
- var block = '<div><div class="geostats-legend-block" style="background-color:' + ccolors[i] + '"></div> ' + el + cnt + '</div>';
- elements.push(block);
- }
-
- } else {
-
- // only if classification is done on unique values
- for (i = 0; i < (this.bounds.length); i++) {
- if(getcounter===true) {
- cnt = ' <span class="geostats-legend-counter">(' + this.counter[i] + ')</span>';
- }
- var el = fn(this.bounds[i]);
- var block = '<div><div class="geostats-legend-block" style="background-color:' + ccolors[i] + '"></div> ' + el + cnt + '</div>';
- elements.push(block);
- }
-
- }
-
- // do we reverse the return legend ?
- if(order === 'DESC') elements.reverse();
-
- // finally we create HTML and return it
- var content = '<div class="geostats-legend"><div class="geostats-legend-title">' + _t(lg) + '</div>';
- for (i = 0; i < (elements.length); i++) {
- content += elements[i];
- }
- content += '</div>';
-
- return content;
- };
-
-
- // object constructor
- // At the end of script. If not setPrecision() method is not known
-
- // we create an object identifier for debugging
- this.objectID = new Date().getUTCMilliseconds();
- this.log('Creating new geostats object');
-
- if(typeof a !== 'undefined' && a.length > 0) {
- this.serie = a;
- this.setPrecision();
- this.log('Setting serie (' + a.length + ') : ' + a.join());
- } else {
- this.serie = Array();
- };
-
- // creating aliases on classification function for backward compatibility
- this.getJenks = this.getClassJenks;
- this.getGeometricProgression = this.getClassGeometricProgression;
- this.getEqInterval = this.getClassEqInterval;
- this.getQuantile = this.getClassQuantile;
- this.getStdDeviation = this.getClassStdDeviation;
- this.getUniqueValues = this.getClassUniqueValues;
- this.getArithmeticProgression = this.getClassArithmeticProgression;
- };
- window.geostats = geostats;
- return geostats;
- });
- /***/ }),
- /***/ "4066":
- /***/ (function(module, exports, __webpack_require__) {
- var arrayWithoutHoles = __webpack_require__("d372");
- var iterableToArray = __webpack_require__("4fe1");
- var nonIterableSpread = __webpack_require__("1e44");
- function _toConsumableArray(arr) {
- return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();
- }
- module.exports = _toConsumableArray;
- /***/ }),
- /***/ "4156":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _CountTo_vue_vue_type_template_id_c61b74f4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("77c4");
- /* harmony import */ var _CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("f14a");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _CountTo_vue_vue_type_template_id_c61b74f4___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _CountTo_vue_vue_type_template_id_c61b74f4___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "4366":
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("bbe9").Transform
- /***/ }),
- /***/ "4552":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var _interopRequireDefault = __webpack_require__("8e6d");
- var _slicedToArray2 = _interopRequireDefault(__webpack_require__("5e4c"));
- /*jshint esversion: 6 */
- function colorcolor(color) {
- var newColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "rgba";
- var calculateOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- color = color.toLowerCase();
- newColor = newColor.toLowerCase();
- var returnedColor = color;
- var namedColor = __webpack_require__("8afa");
- var r, g, b, a;
- var roundTo = 4;
- var colorDefinitions = {
- rgb: {
- re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
- example: ["rgb(123, 234, 45)", "rgb(255,234,245)"],
- toRGBA: function toRGBA(bits) {
- return [parseInt(bits[1], 10), parseInt(bits[2], 10), parseInt(bits[3], 10), 1];
- }
- },
- rgba: {
- re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d+(?:\.\d+)?|\.\d+)\s*\)/,
- example: ["rgba(123, 234, 45, 1)", "rgba(255,234,245, 0.5)"],
- toRGBA: function toRGBA(bits) {
- return [parseInt(bits[1], 10), parseInt(bits[2], 10), parseInt(bits[3], 10), parseFloat(bits[4])];
- }
- },
- hex: {
- re: /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
- example: ["00ff00", "336699"],
- toRGBA: function toRGBA(bits) {
- return [parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16), 1];
- }
- },
- hex3: {
- re: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- example: ["fb0", "f0f"],
- toRGBA: function toRGBA(bits) {
- return [parseInt(bits[1] + bits[1], 16), parseInt(bits[2] + bits[2], 16), parseInt(bits[3] + bits[3], 16), 1];
- }
- },
- hexa: {
- re: /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
- example: ["00ff00ff", "336699a0"],
- toRGBA: function toRGBA(bits) {
- return [parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16), parseInt(bits[4], 16) / 255];
- }
- },
- hex4a: {
- re: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- example: ["fb0f", "f0f8"],
- toRGBA: function toRGBA(bits) {
- return [parseInt(bits[1] + bits[1], 16), parseInt(bits[2] + bits[2], 16), parseInt(bits[3] + bits[3], 16), parseInt(bits[4] + bits[4], 16) / 255];
- }
- },
- hsl: {
- re: /^hsl\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,
- example: ["hsl(120, 100%, 25%)", "hsl(0, 100%, 50%)"],
- toRGBA: function toRGBA(bits) {
- bits[4] = 1;
- var rgba = hslToRgb(bits);
- return [rgba.r, rgba.g, rgba.b, rgba.a];
- }
- },
- hsla: {
- re: /^hsla\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%,\s*(\d+(?:\.\d+)?|\.\d+)\s*\)/,
- example: ["hsla(120, 100%, 25%, 1)", "hsla(0, 100%, 50%, 0.5)"],
- toRGBA: function toRGBA(bits) {
- var rgba = hslToRgb(bits);
- return [rgba.r, rgba.g, rgba.b, rgba.a];
- }
- },
- hsv: {
- re: /^hsv\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,
- example: ["hsv(120, 100%, 25%)", "hsv(0, 100%, 50%)"],
- toRGBA: function toRGBA(bits) {
- var rgb = hsvToRgb(bits);
- return [rgb.r, rgb.g, rgb.b, 1];
- }
- },
- hsb: {
- re: /^hsb\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,
- example: ["hsb(120, 100%, 25%)", "hsb(0, 100%, 50%)"],
- toRGBA: function toRGBA(bits) {
- var rgb = hsvToRgb(bits);
- return [rgb.r, rgb.g, rgb.b, 1];
- }
- }
- }; // If this is a named color, convert it to hex
- if (namedColor.hasOwnProperty(color)) {
- color = namedColor[color];
- color.forEach(function (piece, index) {
- "use strict";
- color[index] = ("0" + piece.toString(16)).slice(-2);
- });
- color = "#" + color.join('');
- } // Search the color definitions for a match
- for (var colorDefinition in colorDefinitions) {
- var re = colorDefinitions[colorDefinition].re;
- var processor = colorDefinitions[colorDefinition].toRGBA;
- var bits = re.exec(color);
- if (bits) {
- var channels = processor(bits);
- r = channels[0];
- g = channels[1];
- b = channels[2];
- a = +(Math.round(channels[3] + ("e+" + roundTo)) + ("e-" + roundTo));
- }
- }
- r = Math.round(r < 0 || isNaN(r) ? 0 : r > 255 ? 255 : r);
- g = Math.round(g < 0 || isNaN(g) ? 0 : g > 255 ? 255 : g);
- b = Math.round(b < 0 || isNaN(b) ? 0 : b > 255 ? 255 : b);
- a = a < 0 || isNaN(a) ? 0 : a > 1 ? 1 : a;
- switch (newColor) {
- case "hex":
- returnedColor = "#" + ("0" + r.toString(16)).slice(-2) + ("0" + g.toString(16)).slice(-2) + ("0" + b.toString(16)).slice(-2);
- break;
- case "hexa":
- if (calculateOpacity) {
- var _calculateOpacityFrom = calculateOpacityFromWhite(r, g, b, a);
- var _calculateOpacityFrom2 = (0, _slicedToArray2.default)(_calculateOpacityFrom, 4);
- r = _calculateOpacityFrom2[0];
- g = _calculateOpacityFrom2[1];
- b = _calculateOpacityFrom2[2];
- a = _calculateOpacityFrom2[3];
- }
- returnedColor = "#" + ("0" + r.toString(16)).slice(-2) + ("0" + g.toString(16)).slice(-2) + ("0" + b.toString(16)).slice(-2) + ("0" + Math.round(255 * a).toString(16)).slice(-2);
- break;
- case "hsl":
- var hsl = rgbToHsl({
- "r": r,
- "g": g,
- "b": b
- });
- returnedColor = "hsl(".concat(hsl.h, ",").concat(hsl.s, "%,").concat(hsl.l, "%)");
- break;
- case "hsla":
- if (calculateOpacity) {
- var _calculateOpacityFrom3 = calculateOpacityFromWhite(r, g, b, a);
- var _calculateOpacityFrom4 = (0, _slicedToArray2.default)(_calculateOpacityFrom3, 4);
- r = _calculateOpacityFrom4[0];
- g = _calculateOpacityFrom4[1];
- b = _calculateOpacityFrom4[2];
- a = _calculateOpacityFrom4[3];
- }
- var hsla = rgbToHsl({
- "r": r,
- "g": g,
- "b": b,
- "a": a
- });
- returnedColor = "hsla(".concat(hsla.h, ",").concat(hsla.s, "%,").concat(hsla.l, "%,").concat(hsla.a, ")");
- break;
- case "hsb":
- /* Same as `hsv` */
- var hsb = rgbToHsv({
- "r": r,
- "g": g,
- "b": b
- });
- returnedColor = "hsb(".concat(hsb.h, ",").concat(hsb.s, "%,").concat(hsb.v, "%)");
- break;
- case "hsv":
- var hsv = rgbToHsv({
- "r": r,
- "g": g,
- "b": b
- });
- returnedColor = "hsv(".concat(hsv.h, ",").concat(hsv.s, "%,").concat(hsv.v, "%)");
- break;
- case "rgb":
- returnedColor = "rgb(".concat(r, ",").concat(g, ",").concat(b, ")");
- break;
- case "rgba":
- /* falls through */
- default:
- if (calculateOpacity) {
- var _calculateOpacityFrom5 = calculateOpacityFromWhite(r, g, b, a);
- var _calculateOpacityFrom6 = (0, _slicedToArray2.default)(_calculateOpacityFrom5, 4);
- r = _calculateOpacityFrom6[0];
- g = _calculateOpacityFrom6[1];
- b = _calculateOpacityFrom6[2];
- a = _calculateOpacityFrom6[3];
- }
- returnedColor = "rgba(".concat(r, ",").concat(g, ",").concat(b, ",").concat(a, ")");
- break;
- }
- return returnedColor;
- }
- function calculateOpacityFromWhite(r, g, b, a) {
- "use strict";
- var min = 0;
- a = (255 - (min = Math.min(r, g, b))) / 255;
- r = ( false || (r - min) / a).toFixed(0);
- g = ( false || (g - min) / a).toFixed(0);
- b = ( false || (b - min) / a).toFixed(0);
- a = parseFloat(a.toFixed(4));
- return [r, g, b, a];
- }
- function hslToRgb(bits) {
- var rgba = {},
- hsl = {
- h: bits[1] / 360,
- s: bits[2] / 100,
- l: bits[3] / 100,
- a: parseFloat(bits[4])
- };
- if (hsl.s === 0) {
- var v = 255 * hsl.l;
- rgba = {
- r: v,
- g: v,
- b: v,
- a: hsl.a
- };
- } else {
- var q = hsl.l < 0.5 ? hsl.l * (1 + hsl.s) : hsl.l + hsl.s - hsl.l * hsl.s;
- var p = 2 * hsl.l - q;
- rgba.r = hueToRgb(p, q, hsl.h + 1 / 3) * 255;
- rgba.g = hueToRgb(p, q, hsl.h) * 255;
- rgba.b = hueToRgb(p, q, hsl.h - 1 / 3) * 255;
- rgba.a = hsl.a;
- }
- return rgba;
- }
- function rgbToHsl(rgba) {
- rgba.r = rgba.r / 255;
- rgba.g = rgba.g / 255;
- rgba.b = rgba.b / 255;
- var max = Math.max(rgba.r, rgba.g, rgba.b),
- min = Math.min(rgba.r, rgba.g, rgba.b),
- hsl = [],
- d;
- hsl.a = rgba.a;
- hsl.l = (max + min) / 2;
- if (max === min) {
- hsl.h = 0;
- hsl.s = 0;
- } else {
- d = max - min;
- hsl.s = hsl.l >= 0.5 ? d / (2 - max - min) : d / (max + min);
- switch (max) {
- case rgba.r:
- hsl.h = (rgba.g - rgba.b) / d + (rgba.g < rgba.b ? 6 : 0);
- break;
- case rgba.g:
- hsl.h = (rgba.b - rgba.r) / d + 2;
- break;
- case rgba.b:
- hsl.h = (rgba.r - rgba.g) / d + 4;
- break;
- }
- hsl.h /= 6;
- }
- hsl.h = parseInt((hsl.h * 360).toFixed(0), 10);
- hsl.s = parseInt((hsl.s * 100).toFixed(0), 10);
- hsl.l = parseInt((hsl.l * 100).toFixed(0), 10);
- return hsl;
- }
- function hsvToRgb(bits) {
- var rgb = {},
- hsv = {
- h: bits[1] / 360,
- s: bits[2] / 100,
- v: bits[3] / 100
- },
- i = Math.floor(hsv.h * 6),
- f = hsv.h * 6 - i,
- p = hsv.v * (1 - hsv.s),
- q = hsv.v * (1 - f * hsv.s),
- t = hsv.v * (1 - (1 - f) * hsv.s);
- switch (i % 6) {
- case 0:
- rgb.r = hsv.v;
- rgb.g = t;
- rgb.b = p;
- break;
- case 1:
- rgb.r = q;
- rgb.g = hsv.v;
- rgb.b = p;
- break;
- case 2:
- rgb.r = p;
- rgb.g = hsv.v;
- rgb.b = t;
- break;
- case 3:
- rgb.r = p;
- rgb.g = q;
- rgb.b = hsv.v;
- break;
- case 4:
- rgb.r = t;
- rgb.g = p;
- rgb.b = hsv.v;
- break;
- case 5:
- rgb.r = hsv.v;
- rgb.g = p;
- rgb.b = q;
- break;
- }
- rgb.r = rgb.r * 255;
- rgb.g = rgb.g * 255;
- rgb.b = rgb.b * 255;
- return rgb;
- }
- function rgbToHsv(rgba) {
- rgba.r = toPercent(parseInt(rgba.r, 10) % 256, 256);
- rgba.g = toPercent(parseInt(rgba.g, 10) % 256, 256);
- rgba.b = toPercent(parseInt(rgba.b, 10) % 256, 256);
- var max = Math.max(rgba.r, rgba.g, rgba.b),
- min = Math.min(rgba.r, rgba.g, rgba.b),
- d = max - min,
- hsv = {
- "h": 0,
- "s": max === 0 ? 0 : d / max,
- "v": max
- };
- if (max !== min) {
- switch (max) {
- case rgba.r:
- hsv.h = (rgba.g - rgba.b) / d + (rgba.g < rgba.b ? 6 : 0);
- break;
- case rgba.g:
- hsv.h = (rgba.b - rgba.r) / d + 2;
- break;
- case rgba.b:
- hsv.h = (rgba.r - rgba.g) / d + 4;
- break;
- }
- hsv.h /= 6;
- }
- hsv.h = parseInt((hsv.h * 360).toFixed(0), 10);
- hsv.s = parseInt((hsv.s * 100).toFixed(0), 10);
- hsv.v = parseInt((hsv.v * 100).toFixed(0), 10);
- return hsv;
- }
- function hueToRgb(p, q, t) {
- if (t < 0) {
- t += 1;
- }
- if (t > 1) {
- t -= 1;
- }
- if (t < 1 / 6) {
- return p + (q - p) * 6 * t;
- }
- if (t < 1 / 2) {
- return q;
- }
- if (t < 2 / 3) {
- return p + (q - p) * ((2 / 3 - t) * 6);
- }
- return p;
- }
- function toPercent(amount, limit) {
- return amount / limit;
- }
- module.exports = colorcolor;
- global.colorcolor = module.exports;
- /* ew */
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d")))
- /***/ }),
- /***/ "4849":
- /***/ (function(module, exports, __webpack_require__) {
- !function(t,e){ true?module.exports=e():undefined}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=2)}([function(t,e,i){var n=i(4)(i(1),i(5),null,null);t.exports=n.exports},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(3);e.default={props:{startVal:{type:Number,required:!1,default:0},endVal:{type:Number,required:!1,default:2017},duration:{type:Number,required:!1,default:3e3},autoplay:{type:Boolean,required:!1,default:!0},decimals:{type:Number,required:!1,default:0,validator:function(t){return t>=0}},decimal:{type:String,required:!1,default:"."},separator:{type:String,required:!1,default:","},prefix:{type:String,required:!1,default:""},suffix:{type:String,required:!1,default:""},useEasing:{type:Boolean,required:!1,default:!0},easingFn:{type:Function,default:function(t,e,i,n){return i*(1-Math.pow(2,-10*t/n))*1024/1023+e}}},data:function(){return{localStartVal:this.startVal,displayValue:this.formatNumber(this.startVal),printVal:null,paused:!1,localDuration:this.duration,startTime:null,timestamp:null,remaining:null,rAF:null}},computed:{countDown:function(){return this.startVal>this.endVal}},watch:{startVal:function(){this.autoplay&&this.start()},endVal:function(){this.autoplay&&this.start()}},mounted:function(){this.autoplay&&this.start(),this.$emit("mountedCallback")},methods:{start:function(){this.localStartVal=this.startVal,this.startTime=null,this.localDuration=this.duration,this.paused=!1,this.rAF=(0,n.requestAnimationFrame)(this.count)},pauseResume:function(){this.paused?(this.resume(),this.paused=!1):(this.pause(),this.paused=!0)},pause:function(){(0,n.cancelAnimationFrame)(this.rAF)},resume:function(){this.startTime=null,this.localDuration=+this.remaining,this.localStartVal=+this.printVal,(0,n.requestAnimationFrame)(this.count)},reset:function(){this.startTime=null,(0,n.cancelAnimationFrame)(this.rAF),this.displayValue=this.formatNumber(this.startVal)},count:function(t){this.startTime||(this.startTime=t),this.timestamp=t;var e=t-this.startTime;this.remaining=this.localDuration-e,this.useEasing?this.countDown?this.printVal=this.localStartVal-this.easingFn(e,0,this.localStartVal-this.endVal,this.localDuration):this.printVal=this.easingFn(e,this.localStartVal,this.endVal-this.localStartVal,this.localDuration):this.countDown?this.printVal=this.localStartVal-(this.localStartVal-this.endVal)*(e/this.localDuration):this.printVal=this.localStartVal+(this.localStartVal-this.startVal)*(e/this.localDuration),this.countDown?this.printVal=this.printVal<this.endVal?this.endVal:this.printVal:this.printVal=this.printVal>this.endVal?this.endVal:this.printVal,this.displayValue=this.formatNumber(this.printVal),e<this.localDuration?this.rAF=(0,n.requestAnimationFrame)(this.count):this.$emit("callback")},isNumber:function(t){return!isNaN(parseFloat(t))},formatNumber:function(t){t=t.toFixed(this.decimals),t+="";var e=t.split("."),i=e[0],n=e.length>1?this.decimal+e[1]:"",a=/(\d+)(\d{3})/;if(this.separator&&!this.isNumber(this.separator))for(;a.test(i);)i=i.replace(a,"$1"+this.separator+"$2");return this.prefix+i+n+this.suffix}},destroyed:function(){(0,n.cancelAnimationFrame)(this.rAF)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),a=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=a.default,"undefined"!=typeof window&&window.Vue&&window.Vue.component("count-to",a.default)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=0,a="webkit moz ms o".split(" "),r=void 0,o=void 0;if("undefined"==typeof window)e.requestAnimationFrame=r=function(){},e.cancelAnimationFrame=o=function(){};else{e.requestAnimationFrame=r=window.requestAnimationFrame,e.cancelAnimationFrame=o=window.cancelAnimationFrame;for(var s=void 0,u=0;u<a.length&&(!r||!o);u++)s=a[u],e.requestAnimationFrame=r=r||window[s+"RequestAnimationFrame"],e.cancelAnimationFrame=o=o||window[s+"CancelAnimationFrame"]||window[s+"CancelRequestAnimationFrame"];r&&o||(e.requestAnimationFrame=r=function(t){var e=(new Date).getTime(),i=Math.max(0,16-(e-n)),a=window.setTimeout(function(){t(e+i)},i);return n=e+i,a},e.cancelAnimationFrame=o=function(t){window.clearTimeout(t)})}e.requestAnimationFrame=r,e.cancelAnimationFrame=o},function(t,e){t.exports=function(t,e,i,n){var a,r=t=t||{},o=typeof t.default;"object"!==o&&"function"!==o||(a=t,r=t.default);var s="function"==typeof r?r.options:r;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),i&&(s._scopeId=i),n){var u=Object.create(s.computed||null);Object.keys(n).forEach(function(t){var e=n[t];u[t]=function(){return e}}),s.computed=u}return{esModule:a,exports:r,options:s}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",[t._v("\n "+t._s(t.displayValue)+"\n")])},staticRenderFns:[]}}])});
- //# sourceMappingURL=vue-count-to.min.js.map
- /***/ }),
- /***/ "49c0":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, '__esModule', { value: true });
- var helpers = __webpack_require__("38ce");
- /**
- * Callback for coordEach
- *
- * @callback coordEachCallback
- * @param {Array<number>} currentCoord The current coordinate being processed.
- * @param {number} coordIndex The current index of the coordinate being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
- * @param {number} geometryIndex The current index of the Geometry being processed.
- */
- /**
- * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
- *
- * @name coordEach
- * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
- * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
- * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
- * @returns {void}
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {"foo": "bar"}),
- * turf.point([36, 53], {"hello": "world"})
- * ]);
- *
- * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
- * //=currentCoord
- * //=coordIndex
- * //=featureIndex
- * //=multiFeatureIndex
- * //=geometryIndex
- * });
- */
- function coordEach(geojson, callback, excludeWrapCoord) {
- // Handles null Geometry -- Skips this GeoJSON
- if (geojson === null) return;
- var j, k, l, geometry, stopG, coords,
- geometryMaybeCollection,
- wrapShrink = 0,
- coordIndex = 0,
- isGeometryCollection,
- type = geojson.type,
- isFeatureCollection = type === 'FeatureCollection',
- isFeature = type === 'Feature',
- stop = isFeatureCollection ? geojson.features.length : 1;
- // This logic may look a little weird. The reason why it is that way
- // is because it's trying to be fast. GeoJSON supports multiple kinds
- // of objects at its root: FeatureCollection, Features, Geometries.
- // This function has the responsibility of handling all of them, and that
- // means that some of the `for` loops you see below actually just don't apply
- // to certain inputs. For instance, if you give this just a
- // Point geometry, then both loops are short-circuited and all we do
- // is gradually rename the input until it's called 'geometry'.
- //
- // This also aims to allocate as few resources as possible: just a
- // few numbers and booleans, rather than any temporary arrays as would
- // be required with the normalization approach.
- for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
- geometryMaybeCollection = (isFeatureCollection ? geojson.features[featureIndex].geometry :
- (isFeature ? geojson.geometry : geojson));
- isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
- stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
- for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
- var multiFeatureIndex = 0;
- var geometryIndex = 0;
- geometry = isGeometryCollection ?
- geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection;
- // Handles null Geometry -- Skips this geometry
- if (geometry === null) continue;
- coords = geometry.coordinates;
- var geomType = geometry.type;
- wrapShrink = (excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon')) ? 1 : 0;
- switch (geomType) {
- case null:
- break;
- case 'Point':
- if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
- coordIndex++;
- multiFeatureIndex++;
- break;
- case 'LineString':
- case 'MultiPoint':
- for (j = 0; j < coords.length; j++) {
- if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
- coordIndex++;
- if (geomType === 'MultiPoint') multiFeatureIndex++;
- }
- if (geomType === 'LineString') multiFeatureIndex++;
- break;
- case 'Polygon':
- case 'MultiLineString':
- for (j = 0; j < coords.length; j++) {
- for (k = 0; k < coords[j].length - wrapShrink; k++) {
- if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
- coordIndex++;
- }
- if (geomType === 'MultiLineString') multiFeatureIndex++;
- if (geomType === 'Polygon') geometryIndex++;
- }
- if (geomType === 'Polygon') multiFeatureIndex++;
- break;
- case 'MultiPolygon':
- for (j = 0; j < coords.length; j++) {
- geometryIndex = 0;
- for (k = 0; k < coords[j].length; k++) {
- for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
- if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
- coordIndex++;
- }
- geometryIndex++;
- }
- multiFeatureIndex++;
- }
- break;
- case 'GeometryCollection':
- for (j = 0; j < geometry.geometries.length; j++)
- if (coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
- break;
- default:
- throw new Error('Unknown Geometry Type');
- }
- }
- }
- }
- /**
- * Callback for coordReduce
- *
- * The first time the callback function is called, the values provided as arguments depend
- * on whether the reduce method has an initialValue argument.
- *
- * If an initialValue is provided to the reduce method:
- * - The previousValue argument is initialValue.
- * - The currentValue argument is the value of the first element present in the array.
- *
- * If an initialValue is not provided:
- * - The previousValue argument is the value of the first element present in the array.
- * - The currentValue argument is the value of the second element present in the array.
- *
- * @callback coordReduceCallback
- * @param {*} previousValue The accumulated value previously returned in the last invocation
- * of the callback, or initialValue, if supplied.
- * @param {Array<number>} currentCoord The current coordinate being processed.
- * @param {number} coordIndex The current index of the coordinate being processed.
- * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
- * @param {number} featureIndex The current index of the Feature being processed.
- * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
- * @param {number} geometryIndex The current index of the Geometry being processed.
- */
- /**
- * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
- *
- * @name coordReduce
- * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
- * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
- * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
- * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
- * @returns {*} The value that results from the reduction.
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {"foo": "bar"}),
- * turf.point([36, 53], {"hello": "world"})
- * ]);
- *
- * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
- * //=previousValue
- * //=currentCoord
- * //=coordIndex
- * //=featureIndex
- * //=multiFeatureIndex
- * //=geometryIndex
- * return currentCoord;
- * });
- */
- function coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
- var previousValue = initialValue;
- coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
- if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;
- else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
- }, excludeWrapCoord);
- return previousValue;
- }
- /**
- * Callback for propEach
- *
- * @callback propEachCallback
- * @param {Object} currentProperties The current Properties being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- */
- /**
- * Iterate over properties in any GeoJSON object, similar to Array.forEach()
- *
- * @name propEach
- * @param {FeatureCollection|Feature} geojson any GeoJSON object
- * @param {Function} callback a method that takes (currentProperties, featureIndex)
- * @returns {void}
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {foo: 'bar'}),
- * turf.point([36, 53], {hello: 'world'})
- * ]);
- *
- * turf.propEach(features, function (currentProperties, featureIndex) {
- * //=currentProperties
- * //=featureIndex
- * });
- */
- function propEach(geojson, callback) {
- var i;
- switch (geojson.type) {
- case 'FeatureCollection':
- for (i = 0; i < geojson.features.length; i++) {
- if (callback(geojson.features[i].properties, i) === false) break;
- }
- break;
- case 'Feature':
- callback(geojson.properties, 0);
- break;
- }
- }
- /**
- * Callback for propReduce
- *
- * The first time the callback function is called, the values provided as arguments depend
- * on whether the reduce method has an initialValue argument.
- *
- * If an initialValue is provided to the reduce method:
- * - The previousValue argument is initialValue.
- * - The currentValue argument is the value of the first element present in the array.
- *
- * If an initialValue is not provided:
- * - The previousValue argument is the value of the first element present in the array.
- * - The currentValue argument is the value of the second element present in the array.
- *
- * @callback propReduceCallback
- * @param {*} previousValue The accumulated value previously returned in the last invocation
- * of the callback, or initialValue, if supplied.
- * @param {*} currentProperties The current Properties being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- */
- /**
- * Reduce properties in any GeoJSON object into a single value,
- * similar to how Array.reduce works. However, in this case we lazily run
- * the reduction, so an array of all properties is unnecessary.
- *
- * @name propReduce
- * @param {FeatureCollection|Feature} geojson any GeoJSON object
- * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
- * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
- * @returns {*} The value that results from the reduction.
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {foo: 'bar'}),
- * turf.point([36, 53], {hello: 'world'})
- * ]);
- *
- * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
- * //=previousValue
- * //=currentProperties
- * //=featureIndex
- * return currentProperties
- * });
- */
- function propReduce(geojson, callback, initialValue) {
- var previousValue = initialValue;
- propEach(geojson, function (currentProperties, featureIndex) {
- if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;
- else previousValue = callback(previousValue, currentProperties, featureIndex);
- });
- return previousValue;
- }
- /**
- * Callback for featureEach
- *
- * @callback featureEachCallback
- * @param {Feature<any>} currentFeature The current Feature being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- */
- /**
- * Iterate over features in any GeoJSON object, similar to
- * Array.forEach.
- *
- * @name featureEach
- * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
- * @param {Function} callback a method that takes (currentFeature, featureIndex)
- * @returns {void}
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {foo: 'bar'}),
- * turf.point([36, 53], {hello: 'world'})
- * ]);
- *
- * turf.featureEach(features, function (currentFeature, featureIndex) {
- * //=currentFeature
- * //=featureIndex
- * });
- */
- function featureEach(geojson, callback) {
- if (geojson.type === 'Feature') {
- callback(geojson, 0);
- } else if (geojson.type === 'FeatureCollection') {
- for (var i = 0; i < geojson.features.length; i++) {
- if (callback(geojson.features[i], i) === false) break;
- }
- }
- }
- /**
- * Callback for featureReduce
- *
- * The first time the callback function is called, the values provided as arguments depend
- * on whether the reduce method has an initialValue argument.
- *
- * If an initialValue is provided to the reduce method:
- * - The previousValue argument is initialValue.
- * - The currentValue argument is the value of the first element present in the array.
- *
- * If an initialValue is not provided:
- * - The previousValue argument is the value of the first element present in the array.
- * - The currentValue argument is the value of the second element present in the array.
- *
- * @callback featureReduceCallback
- * @param {*} previousValue The accumulated value previously returned in the last invocation
- * of the callback, or initialValue, if supplied.
- * @param {Feature} currentFeature The current Feature being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- */
- /**
- * Reduce features in any GeoJSON object, similar to Array.reduce().
- *
- * @name featureReduce
- * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
- * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
- * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
- * @returns {*} The value that results from the reduction.
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {"foo": "bar"}),
- * turf.point([36, 53], {"hello": "world"})
- * ]);
- *
- * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
- * //=previousValue
- * //=currentFeature
- * //=featureIndex
- * return currentFeature
- * });
- */
- function featureReduce(geojson, callback, initialValue) {
- var previousValue = initialValue;
- featureEach(geojson, function (currentFeature, featureIndex) {
- if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
- else previousValue = callback(previousValue, currentFeature, featureIndex);
- });
- return previousValue;
- }
- /**
- * Get all coordinates from any GeoJSON object.
- *
- * @name coordAll
- * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
- * @returns {Array<Array<number>>} coordinate position array
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {foo: 'bar'}),
- * turf.point([36, 53], {hello: 'world'})
- * ]);
- *
- * var coords = turf.coordAll(features);
- * //= [[26, 37], [36, 53]]
- */
- function coordAll(geojson) {
- var coords = [];
- coordEach(geojson, function (coord) {
- coords.push(coord);
- });
- return coords;
- }
- /**
- * Callback for geomEach
- *
- * @callback geomEachCallback
- * @param {Geometry} currentGeometry The current Geometry being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- * @param {Object} featureProperties The current Feature Properties being processed.
- * @param {Array<number>} featureBBox The current Feature BBox being processed.
- * @param {number|string} featureId The current Feature Id being processed.
- */
- /**
- * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
- *
- * @name geomEach
- * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
- * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
- * @returns {void}
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {foo: 'bar'}),
- * turf.point([36, 53], {hello: 'world'})
- * ]);
- *
- * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
- * //=currentGeometry
- * //=featureIndex
- * //=featureProperties
- * //=featureBBox
- * //=featureId
- * });
- */
- function geomEach(geojson, callback) {
- var i, j, g, geometry, stopG,
- geometryMaybeCollection,
- isGeometryCollection,
- featureProperties,
- featureBBox,
- featureId,
- featureIndex = 0,
- isFeatureCollection = geojson.type === 'FeatureCollection',
- isFeature = geojson.type === 'Feature',
- stop = isFeatureCollection ? geojson.features.length : 1;
- // This logic may look a little weird. The reason why it is that way
- // is because it's trying to be fast. GeoJSON supports multiple kinds
- // of objects at its root: FeatureCollection, Features, Geometries.
- // This function has the responsibility of handling all of them, and that
- // means that some of the `for` loops you see below actually just don't apply
- // to certain inputs. For instance, if you give this just a
- // Point geometry, then both loops are short-circuited and all we do
- // is gradually rename the input until it's called 'geometry'.
- //
- // This also aims to allocate as few resources as possible: just a
- // few numbers and booleans, rather than any temporary arrays as would
- // be required with the normalization approach.
- for (i = 0; i < stop; i++) {
- geometryMaybeCollection = (isFeatureCollection ? geojson.features[i].geometry :
- (isFeature ? geojson.geometry : geojson));
- featureProperties = (isFeatureCollection ? geojson.features[i].properties :
- (isFeature ? geojson.properties : {}));
- featureBBox = (isFeatureCollection ? geojson.features[i].bbox :
- (isFeature ? geojson.bbox : undefined));
- featureId = (isFeatureCollection ? geojson.features[i].id :
- (isFeature ? geojson.id : undefined));
- isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
- stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
- for (g = 0; g < stopG; g++) {
- geometry = isGeometryCollection ?
- geometryMaybeCollection.geometries[g] : geometryMaybeCollection;
- // Handle null Geometry
- if (geometry === null) {
- if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
- continue;
- }
- switch (geometry.type) {
- case 'Point':
- case 'LineString':
- case 'MultiPoint':
- case 'Polygon':
- case 'MultiLineString':
- case 'MultiPolygon': {
- if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
- break;
- }
- case 'GeometryCollection': {
- for (j = 0; j < geometry.geometries.length; j++) {
- if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
- }
- break;
- }
- default:
- throw new Error('Unknown Geometry Type');
- }
- }
- // Only increase `featureIndex` per each feature
- featureIndex++;
- }
- }
- /**
- * Callback for geomReduce
- *
- * The first time the callback function is called, the values provided as arguments depend
- * on whether the reduce method has an initialValue argument.
- *
- * If an initialValue is provided to the reduce method:
- * - The previousValue argument is initialValue.
- * - The currentValue argument is the value of the first element present in the array.
- *
- * If an initialValue is not provided:
- * - The previousValue argument is the value of the first element present in the array.
- * - The currentValue argument is the value of the second element present in the array.
- *
- * @callback geomReduceCallback
- * @param {*} previousValue The accumulated value previously returned in the last invocation
- * of the callback, or initialValue, if supplied.
- * @param {Geometry} currentGeometry The current Geometry being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- * @param {Object} featureProperties The current Feature Properties being processed.
- * @param {Array<number>} featureBBox The current Feature BBox being processed.
- * @param {number|string} featureId The current Feature Id being processed.
- */
- /**
- * Reduce geometry in any GeoJSON object, similar to Array.reduce().
- *
- * @name geomReduce
- * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
- * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
- * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
- * @returns {*} The value that results from the reduction.
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {foo: 'bar'}),
- * turf.point([36, 53], {hello: 'world'})
- * ]);
- *
- * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
- * //=previousValue
- * //=currentGeometry
- * //=featureIndex
- * //=featureProperties
- * //=featureBBox
- * //=featureId
- * return currentGeometry
- * });
- */
- function geomReduce(geojson, callback, initialValue) {
- var previousValue = initialValue;
- geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
- if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;
- else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
- });
- return previousValue;
- }
- /**
- * Callback for flattenEach
- *
- * @callback flattenEachCallback
- * @param {Feature} currentFeature The current flattened feature being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
- */
- /**
- * Iterate over flattened features in any GeoJSON object, similar to
- * Array.forEach.
- *
- * @name flattenEach
- * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
- * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {foo: 'bar'}),
- * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
- * ]);
- *
- * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
- * //=currentFeature
- * //=featureIndex
- * //=multiFeatureIndex
- * });
- */
- function flattenEach(geojson, callback) {
- geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
- // Callback for single geometry
- var type = (geometry === null) ? null : geometry.type;
- switch (type) {
- case null:
- case 'Point':
- case 'LineString':
- case 'Polygon':
- if (callback(helpers.feature(geometry, properties, {bbox: bbox, id: id}), featureIndex, 0) === false) return false;
- return;
- }
- var geomType;
- // Callback for multi-geometry
- switch (type) {
- case 'MultiPoint':
- geomType = 'Point';
- break;
- case 'MultiLineString':
- geomType = 'LineString';
- break;
- case 'MultiPolygon':
- geomType = 'Polygon';
- break;
- }
- for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
- var coordinate = geometry.coordinates[multiFeatureIndex];
- var geom = {
- type: geomType,
- coordinates: coordinate
- };
- if (callback(helpers.feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
- }
- });
- }
- /**
- * Callback for flattenReduce
- *
- * The first time the callback function is called, the values provided as arguments depend
- * on whether the reduce method has an initialValue argument.
- *
- * If an initialValue is provided to the reduce method:
- * - The previousValue argument is initialValue.
- * - The currentValue argument is the value of the first element present in the array.
- *
- * If an initialValue is not provided:
- * - The previousValue argument is the value of the first element present in the array.
- * - The currentValue argument is the value of the second element present in the array.
- *
- * @callback flattenReduceCallback
- * @param {*} previousValue The accumulated value previously returned in the last invocation
- * of the callback, or initialValue, if supplied.
- * @param {Feature} currentFeature The current Feature being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
- */
- /**
- * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
- *
- * @name flattenReduce
- * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
- * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
- * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
- * @returns {*} The value that results from the reduction.
- * @example
- * var features = turf.featureCollection([
- * turf.point([26, 37], {foo: 'bar'}),
- * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
- * ]);
- *
- * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
- * //=previousValue
- * //=currentFeature
- * //=featureIndex
- * //=multiFeatureIndex
- * return currentFeature
- * });
- */
- function flattenReduce(geojson, callback, initialValue) {
- var previousValue = initialValue;
- flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
- if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
- else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
- });
- return previousValue;
- }
- /**
- * Callback for segmentEach
- *
- * @callback segmentEachCallback
- * @param {Feature<LineString>} currentSegment The current Segment being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
- * @param {number} geometryIndex The current index of the Geometry being processed.
- * @param {number} segmentIndex The current index of the Segment being processed.
- * @returns {void}
- */
- /**
- * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
- * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
- *
- * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
- * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
- * @returns {void}
- * @example
- * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
- *
- * // Iterate over GeoJSON by 2-vertex segments
- * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
- * //=currentSegment
- * //=featureIndex
- * //=multiFeatureIndex
- * //=geometryIndex
- * //=segmentIndex
- * });
- *
- * // Calculate the total number of segments
- * var total = 0;
- * turf.segmentEach(polygon, function () {
- * total++;
- * });
- */
- function segmentEach(geojson, callback) {
- flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {
- var segmentIndex = 0;
- // Exclude null Geometries
- if (!feature.geometry) return;
- // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
- var type = feature.geometry.type;
- if (type === 'Point' || type === 'MultiPoint') return;
- // Generate 2-vertex line segments
- var previousCoords;
- var previousFeatureIndex = 0;
- var previousMultiIndex = 0;
- var prevGeomIndex = 0;
- if (coordEach(feature, function (currentCoord, coordIndex, featureIndexCoord, multiPartIndexCoord, geometryIndex) {
- // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
- if (previousCoords === undefined || featureIndex > previousFeatureIndex || multiPartIndexCoord > previousMultiIndex || geometryIndex > prevGeomIndex) {
- previousCoords = currentCoord;
- previousFeatureIndex = featureIndex;
- previousMultiIndex = multiPartIndexCoord;
- prevGeomIndex = geometryIndex;
- segmentIndex = 0;
- return;
- }
- var currentSegment = helpers.lineString([previousCoords, currentCoord], feature.properties);
- if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
- segmentIndex++;
- previousCoords = currentCoord;
- }) === false) return false;
- });
- }
- /**
- * Callback for segmentReduce
- *
- * The first time the callback function is called, the values provided as arguments depend
- * on whether the reduce method has an initialValue argument.
- *
- * If an initialValue is provided to the reduce method:
- * - The previousValue argument is initialValue.
- * - The currentValue argument is the value of the first element present in the array.
- *
- * If an initialValue is not provided:
- * - The previousValue argument is the value of the first element present in the array.
- * - The currentValue argument is the value of the second element present in the array.
- *
- * @callback segmentReduceCallback
- * @param {*} previousValue The accumulated value previously returned in the last invocation
- * of the callback, or initialValue, if supplied.
- * @param {Feature<LineString>} currentSegment The current Segment being processed.
- * @param {number} featureIndex The current index of the Feature being processed.
- * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
- * @param {number} geometryIndex The current index of the Geometry being processed.
- * @param {number} segmentIndex The current index of the Segment being processed.
- */
- /**
- * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
- * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
- *
- * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
- * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
- * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
- * @returns {void}
- * @example
- * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
- *
- * // Iterate over GeoJSON by 2-vertex segments
- * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
- * //= previousSegment
- * //= currentSegment
- * //= featureIndex
- * //= multiFeatureIndex
- * //= geometryIndex
- * //= segmentInex
- * return currentSegment
- * });
- *
- * // Calculate the total number of segments
- * var initialValue = 0
- * var total = turf.segmentReduce(polygon, function (previousValue) {
- * previousValue++;
- * return previousValue;
- * }, initialValue);
- */
- function segmentReduce(geojson, callback, initialValue) {
- var previousValue = initialValue;
- var started = false;
- segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
- if (started === false && initialValue === undefined) previousValue = currentSegment;
- else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
- started = true;
- });
- return previousValue;
- }
- /**
- * Callback for lineEach
- *
- * @callback lineEachCallback
- * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
- * @param {number} featureIndex The current index of the Feature being processed
- * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
- * @param {number} geometryIndex The current index of the Geometry being processed
- */
- /**
- * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
- * similar to Array.forEach.
- *
- * @name lineEach
- * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
- * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
- * @example
- * var multiLine = turf.multiLineString([
- * [[26, 37], [35, 45]],
- * [[36, 53], [38, 50], [41, 55]]
- * ]);
- *
- * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
- * //=currentLine
- * //=featureIndex
- * //=multiFeatureIndex
- * //=geometryIndex
- * });
- */
- function lineEach(geojson, callback) {
- // validation
- if (!geojson) throw new Error('geojson is required');
- flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {
- if (feature.geometry === null) return;
- var type = feature.geometry.type;
- var coords = feature.geometry.coordinates;
- switch (type) {
- case 'LineString':
- if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
- break;
- case 'Polygon':
- for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
- if (callback(helpers.lineString(coords[geometryIndex], feature.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
- }
- break;
- }
- });
- }
- /**
- * Callback for lineReduce
- *
- * The first time the callback function is called, the values provided as arguments depend
- * on whether the reduce method has an initialValue argument.
- *
- * If an initialValue is provided to the reduce method:
- * - The previousValue argument is initialValue.
- * - The currentValue argument is the value of the first element present in the array.
- *
- * If an initialValue is not provided:
- * - The previousValue argument is the value of the first element present in the array.
- * - The currentValue argument is the value of the second element present in the array.
- *
- * @callback lineReduceCallback
- * @param {*} previousValue The accumulated value previously returned in the last invocation
- * of the callback, or initialValue, if supplied.
- * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
- * @param {number} featureIndex The current index of the Feature being processed
- * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
- * @param {number} geometryIndex The current index of the Geometry being processed
- */
- /**
- * Reduce features in any GeoJSON object, similar to Array.reduce().
- *
- * @name lineReduce
- * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
- * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
- * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
- * @returns {*} The value that results from the reduction.
- * @example
- * var multiPoly = turf.multiPolygon([
- * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
- * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
- * ]);
- *
- * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
- * //=previousValue
- * //=currentLine
- * //=featureIndex
- * //=multiFeatureIndex
- * //=geometryIndex
- * return currentLine
- * });
- */
- function lineReduce(geojson, callback, initialValue) {
- var previousValue = initialValue;
- lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
- if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;
- else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
- });
- return previousValue;
- }
- /**
- * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
- *
- * Negative indexes are permitted.
- * Point & MultiPoint will always return null.
- *
- * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
- * @param {Object} [options={}] Optional parameters
- * @param {number} [options.featureIndex=0] Feature Index
- * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
- * @param {number} [options.geometryIndex=0] Geometry Index
- * @param {number} [options.segmentIndex=0] Segment Index
- * @param {Object} [options.properties={}] Translate Properties to output LineString
- * @param {BBox} [options.bbox={}] Translate BBox to output LineString
- * @param {number|string} [options.id={}] Translate Id to output LineString
- * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
- * @example
- * var multiLine = turf.multiLineString([
- * [[10, 10], [50, 30], [30, 40]],
- * [[-10, -10], [-50, -30], [-30, -40]]
- * ]);
- *
- * // First Segment (defaults are 0)
- * turf.findSegment(multiLine);
- * // => Feature<LineString<[[10, 10], [50, 30]]>>
- *
- * // First Segment of 2nd Multi Feature
- * turf.findSegment(multiLine, {multiFeatureIndex: 1});
- * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
- *
- * // Last Segment of Last Multi Feature
- * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
- * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
- */
- function findSegment(geojson, options) {
- // Optional Parameters
- options = options || {};
- if (!helpers.isObject(options)) throw new Error('options is invalid');
- var featureIndex = options.featureIndex || 0;
- var multiFeatureIndex = options.multiFeatureIndex || 0;
- var geometryIndex = options.geometryIndex || 0;
- var segmentIndex = options.segmentIndex || 0;
- // Find FeatureIndex
- var properties = options.properties;
- var geometry;
- switch (geojson.type) {
- case 'FeatureCollection':
- if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
- properties = properties || geojson.features[featureIndex].properties;
- geometry = geojson.features[featureIndex].geometry;
- break;
- case 'Feature':
- properties = properties || geojson.properties;
- geometry = geojson.geometry;
- break;
- case 'Point':
- case 'MultiPoint':
- return null;
- case 'LineString':
- case 'Polygon':
- case 'MultiLineString':
- case 'MultiPolygon':
- geometry = geojson;
- break;
- default:
- throw new Error('geojson is invalid');
- }
- // Find SegmentIndex
- if (geometry === null) return null;
- var coords = geometry.coordinates;
- switch (geometry.type) {
- case 'Point':
- case 'MultiPoint':
- return null;
- case 'LineString':
- if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
- return helpers.lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
- case 'Polygon':
- if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
- if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
- return helpers.lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
- case 'MultiLineString':
- if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
- if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
- return helpers.lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
- case 'MultiPolygon':
- if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
- if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
- if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
- return helpers.lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
- }
- throw new Error('geojson is invalid');
- }
- /**
- * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
- *
- * Negative indexes are permitted.
- *
- * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
- * @param {Object} [options={}] Optional parameters
- * @param {number} [options.featureIndex=0] Feature Index
- * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
- * @param {number} [options.geometryIndex=0] Geometry Index
- * @param {number} [options.coordIndex=0] Coord Index
- * @param {Object} [options.properties={}] Translate Properties to output Point
- * @param {BBox} [options.bbox={}] Translate BBox to output Point
- * @param {number|string} [options.id={}] Translate Id to output Point
- * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
- * @example
- * var multiLine = turf.multiLineString([
- * [[10, 10], [50, 30], [30, 40]],
- * [[-10, -10], [-50, -30], [-30, -40]]
- * ]);
- *
- * // First Segment (defaults are 0)
- * turf.findPoint(multiLine);
- * // => Feature<Point<[10, 10]>>
- *
- * // First Segment of the 2nd Multi-Feature
- * turf.findPoint(multiLine, {multiFeatureIndex: 1});
- * // => Feature<Point<[-10, -10]>>
- *
- * // Last Segment of last Multi-Feature
- * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
- * // => Feature<Point<[-30, -40]>>
- */
- function findPoint(geojson, options) {
- // Optional Parameters
- options = options || {};
- if (!helpers.isObject(options)) throw new Error('options is invalid');
- var featureIndex = options.featureIndex || 0;
- var multiFeatureIndex = options.multiFeatureIndex || 0;
- var geometryIndex = options.geometryIndex || 0;
- var coordIndex = options.coordIndex || 0;
- // Find FeatureIndex
- var properties = options.properties;
- var geometry;
- switch (geojson.type) {
- case 'FeatureCollection':
- if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
- properties = properties || geojson.features[featureIndex].properties;
- geometry = geojson.features[featureIndex].geometry;
- break;
- case 'Feature':
- properties = properties || geojson.properties;
- geometry = geojson.geometry;
- break;
- case 'Point':
- case 'MultiPoint':
- return null;
- case 'LineString':
- case 'Polygon':
- case 'MultiLineString':
- case 'MultiPolygon':
- geometry = geojson;
- break;
- default:
- throw new Error('geojson is invalid');
- }
- // Find Coord Index
- if (geometry === null) return null;
- var coords = geometry.coordinates;
- switch (geometry.type) {
- case 'Point':
- return helpers.point(coords, properties, options);
- case 'MultiPoint':
- if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
- return helpers.point(coords[multiFeatureIndex], properties, options);
- case 'LineString':
- if (coordIndex < 0) coordIndex = coords.length + coordIndex;
- return helpers.point(coords[coordIndex], properties, options);
- case 'Polygon':
- if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
- if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
- return helpers.point(coords[geometryIndex][coordIndex], properties, options);
- case 'MultiLineString':
- if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
- if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
- return helpers.point(coords[multiFeatureIndex][coordIndex], properties, options);
- case 'MultiPolygon':
- if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
- if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
- if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
- return helpers.point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
- }
- throw new Error('geojson is invalid');
- }
- exports.coordEach = coordEach;
- exports.coordReduce = coordReduce;
- exports.propEach = propEach;
- exports.propReduce = propReduce;
- exports.featureEach = featureEach;
- exports.featureReduce = featureReduce;
- exports.coordAll = coordAll;
- exports.geomEach = geomEach;
- exports.geomReduce = geomReduce;
- exports.flattenEach = flattenEach;
- exports.flattenReduce = flattenReduce;
- exports.segmentEach = segmentEach;
- exports.segmentReduce = segmentReduce;
- exports.lineEach = lineEach;
- exports.lineReduce = lineReduce;
- exports.findSegment = findSegment;
- exports.findPoint = findPoint;
- /***/ }),
- /***/ "49f9":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _WebMap_vue_vue_type_template_id_d25de088___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a3cf");
- /* harmony import */ var _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8232");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__["default"],
- _WebMap_vue_vue_type_template_id_d25de088___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _WebMap_vue_vue_type_template_id_d25de088___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "4a62":
- /***/ (function(module, exports) {
- exports.read = function (buffer, offset, isLE, mLen, nBytes) {
- var e, m
- var eLen = (nBytes * 8) - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var nBits = -7
- var i = isLE ? (nBytes - 1) : 0
- var d = isLE ? -1 : 1
- var s = buffer[offset + i]
- i += d
- e = s & ((1 << (-nBits)) - 1)
- s >>= (-nBits)
- nBits += eLen
- for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
- m = e & ((1 << (-nBits)) - 1)
- e >>= (-nBits)
- nBits += mLen
- for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
- if (e === 0) {
- e = 1 - eBias
- } else if (e === eMax) {
- return m ? NaN : ((s ? -1 : 1) * Infinity)
- } else {
- m = m + Math.pow(2, mLen)
- e = e - eBias
- }
- return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
- }
- exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
- var e, m, c
- var eLen = (nBytes * 8) - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
- var i = isLE ? 0 : (nBytes - 1)
- var d = isLE ? 1 : -1
- var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
- value = Math.abs(value)
- if (isNaN(value) || value === Infinity) {
- m = isNaN(value) ? 1 : 0
- e = eMax
- } else {
- e = Math.floor(Math.log(value) / Math.LN2)
- if (value * (c = Math.pow(2, -e)) < 1) {
- e--
- c *= 2
- }
- if (e + eBias >= 1) {
- value += rt / c
- } else {
- value += rt * Math.pow(2, 1 - eBias)
- }
- if (value * c >= 2) {
- e++
- c /= 2
- }
- if (e + eBias >= eMax) {
- m = 0
- e = eMax
- } else if (e + eBias >= 1) {
- m = ((value * c) - 1) * Math.pow(2, mLen)
- e = e + eBias
- } else {
- m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
- e = 0
- }
- }
- for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
- e = (e << mLen) | m
- eLen += mLen
- for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
- buffer[offset + i - d] |= s * 128
- }
- /***/ }),
- /***/ "4b85":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5310");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "4b93":
- /***/ (function(module, exports) {
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return value != null && typeof value == 'object';
- }
- module.exports = isObjectLike;
- /***/ }),
- /***/ "4e21":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.getLanguage = getLanguage;
- exports.geti18n = geti18n;
- exports.setLocale = setLocale;
- exports.initi18n = initi18n;
- exports.default = exports.lang = void 0;
- var _defineProperty2 = _interopRequireDefault(__webpack_require__("279f"));
- var _jsCookie = _interopRequireDefault(__webpack_require__("f53a"));
- var _en = _interopRequireDefault(__webpack_require__("7fd4"));
- var _zh = _interopRequireDefault(__webpack_require__("99ae"));
- var _lodash = _interopRequireDefault(__webpack_require__("25a2"));
- var _vueI18n = _interopRequireDefault(__webpack_require__("2efc"));
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
- var dateTimeFormats = {
- en: _en.default.dateTimeFormat,
- zh: _zh.default.dateTimeFormat
- };
- var i18n = {};
- var rooti18n;
- var messages = {
- en: _objectSpread({}, _en.default),
- zh: _objectSpread({}, _zh.default)
- };
- function getLanguage() {
- var lang = _jsCookie.default.get('language');
- if (!lang) {
- if (navigator.appName === 'Netscape') {
- lang = navigator.language;
- } else {
- lang = navigator.browserLanguage;
- }
- }
- if (lang) {
- if (lang.indexOf('zh') === 0) {
- return 'zh';
- }
- if (lang.indexOf('en') === 0) {
- return 'en';
- }
- }
- return 'zh';
- }
- function geti18n(n) {
- return rooti18n || i18n;
- }
- function setLocale(locales) {
- i18n.mergeLocaleMessage && i18n.mergeLocaleMessage(i18n.locale, locales);
- }
- var lang = {
- en: (0, _lodash.default)(_en.default),
- zh: (0, _lodash.default)(_zh.default)
- };
- exports.lang = lang;
- function initi18n(Vue, config) {
- config = config || {};
- if (config.i18n) {
- i18n = config.i18n;
- if (!i18n.getDateTimeFormat().hasOwnProperty()) {
- i18n.setDateTimeFormat('en', _en.default.dateTimeFormat);
- i18n.setDateTimeFormat('zh', _zh.default.dateTimeFormat);
- }
- i18n.mergeLocaleMessage && i18n.mergeLocaleMessage('en', _en.default);
- i18n.mergeLocaleMessage && i18n.mergeLocaleMessage('zh', _zh.default);
- } else if (!Vue.prototype.hasOwnProperty('$i18n')) {
- Object.defineProperty(Vue.prototype, '$i18n', {
- get: function get() {
- if (!rooti18n && this.$root && this.$root.$options.i18n) {
- rooti18n = this.$root.$options.i18n;
- }
- return rooti18n || i18n;
- }
- });
- Vue.use(_vueI18n.default);
- i18n = new _vueI18n.default({
- dateTimeFormats: dateTimeFormats,
- locale: getLanguage(),
- fallbackLocale: 'zh',
- messages: messages
- });
- }
- if (config.locale) {
- setLocale(config.locale);
- }
- }
- var _default = i18n;
- /*
- Example
- 假设国际化资源配置为:
- layerList: {
- title: "图层",
- hello: '{msg} world',
- hello1: '{0} world',
- theWorld: 'the world',
- dio: 'DIO:',
- linked: '@:(message.dio) @:(message.theWorld) !!!!',
- apple: 'no apples | one apple | {count} apples'
- },
- vue中调用:
- this.$tc('layerList.apple',10,{ count: 20 })
- 文本模板调用:
- $t方法:
- <span>{{$t("layerList.title")}}</span>
- ==>
- <span>图层</span>
- <span>{{$t("layerList.hello",{msg:"hello"})}}</span>
- ==>
- <span>hello world</span>
- <span>{{$t("layerList.hello1",["bye"])}}</span>
- ==>
- <span>bye world</span>
- <span>{{$t("layerList.linked")}}</span>
- ==>
- <span>DIO: the world !!!!</span>
- $tc方法:
- <p>{{ $tc('layerList.apple', 0) }}</p>
- ==>
- <p>no apples</p>
- <p>{{ $tc('layerList.apple', 1) }}</p>
- ==>
- <p>one apple</p>
- <p>{{ $tc('layerList.apple', 10}}</p>
- ==>
- <p>10 apples</p>
- <p>{{ $tc('layerList.apple', 10, { count: 20 }) }}</p>
- ==>
- <p>20 apples</p>
- 日期格式处理($d):https://kazupon.github.io/vue-i18n/guide/datetime.html
- 数字格式处理($n):https://kazupon.github.io/vue-i18n/guide/number.html
- */
- exports.default = _default;
- /***/ }),
- /***/ "4fe1":
- /***/ (function(module, exports) {
- function _iterableToArray(iter) {
- if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
- }
- module.exports = _iterableToArray;
- /***/ }),
- /***/ "50c6":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.tranformSingleToMulti = tranformSingleToMulti;
- exports.sortData = sortData;
- exports.default = void 0;
- var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("4066"));
- var _defineProperty2 = _interopRequireDefault(__webpack_require__("279f"));
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _slicedToArray2 = _interopRequireDefault(__webpack_require__("5e4c"));
- var _getFeatures = _interopRequireDefault(__webpack_require__("6e0d"));
- var _lodash = _interopRequireDefault(__webpack_require__("ca6a"));
- var _lodash2 = _interopRequireDefault(__webpack_require__("2df9"));
- var _lodash3 = _interopRequireDefault(__webpack_require__("ae5c"));
- var _util = __webpack_require__("1448");
- var _statistics = __webpack_require__("9dde");
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
- // 三方服务请求的结果为单对象的时候,是否要转成多个features
- function tranformSingleToMulti(data) {
- var dataInfo = (data.features[0] || {}).properties;
- if (dataInfo) {
- data.features = Object.entries(dataInfo).map(function (_ref) {
- var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
- key = _ref2[0],
- value = _ref2[1];
- return {
- properties: {
- label: key,
- value: value
- }
- };
- });
- return Object.assign(data, (0, _statistics.statisticsFeatures)(data.features));
- }
- return data;
- }
- function sortData(features, datasetOptions, maxFeatures, xBar) {
- var matchItem = datasetOptions.find(function (item) {
- return item.sort && item.sort !== 'unsort';
- });
- var nextFeatures = [].concat(features);
- if (matchItem) {
- nextFeatures = (0, _lodash3.default)(features, function (feature) {
- return isNaN(+feature.properties[matchItem.yField]) ? -Number.MAX_VALUE : +feature.properties[matchItem.yField];
- }, matchItem.sort === 'ascending' ? 'asc' : 'desc');
- }
- var maxLen = +maxFeatures;
- if (maxLen && nextFeatures.length > maxLen) {
- nextFeatures.length = maxLen;
- }
- matchItem && xBar && nextFeatures.reverse();
- return nextFeatures;
- }
- /**
- * @class EchartsDataService
- * @classdesc 图表组件功能类
- * @param {Chart-dataset} dataset - 请求的参数
- * @param {Array.<Chart-datasetOption>} datasetOptions - 数据解析的配置。
- */
- /**
- * @typedef {Object} Chart-dataset - 数据来源
- * @property {string} [type = 'iServer'] - 服务类型 iServer, iPortal。
- * @property {string} url - 服务url地址。
- * @property {boolean} [withCredentials = false] - 设置请求是否带cookie
- * @property {SuperMap.FilterParameter} queryInfo - 查询条件
- */
- /**
- * @typedef {Object} Chart-datasetOption - 解析数据的配置
- * @property {string} seriesType - 图表类型line, bar, scatter, pie, radar, gauge。
- * @property {boolean} [isStastic = false] - 是否统计数据。
- * @property {boolean} [isStack = false] - 图表(line, bar, scatter)是否堆叠
- * @property {string} xField - 数据的字段,坐标值
- * @property {string} yField - 数据的字段,数据值
- */
- var EchartsDataService =
- /*#__PURE__*/
- function () {
- function EchartsDataService(dataset, datasetOptions) {
- (0, _classCallCheck2.default)(this, EchartsDataService);
- // 设置默认值
- dataset.withCredentials = dataset.withCredentials || false; // 请求认证
- this.dataset = dataset;
- this.datasetOptions = datasetOptions;
- this.dataCache = null; // 缓存的是请求后的数据
- this.sortDataCache = null;
- this.axisDatas = []; // 坐标data
- this.serieDatas = []; // series data
- this.gridAxis = {
- xAxis: [],
- yAxis: {}
- }; // 直角坐标系
- this.radarAxis = {}; // 雷达图坐标系
- this.radarMax = 0; // 雷达图坐标最大值
- }
- /**
- * @function EchartsDataService.prototype.getDataOption
- * @description 获取符合echart data数据格式的数据, 入口函数。
- * @returns {Object} 带有请求的数据的promise对象
- */
- (0, _createClass2.default)(EchartsDataService, [{
- key: "getDataOption",
- value: function getDataOption(dataset) {
- var _this = this;
- var xBar = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- // 设置datasets的默认配置type,withCredentials
- var promise = new Promise(function (resolve, reject) {
- // 请求数据,请求成功后,解析数据
- var matchItem = _this.datasetOptions.find(function (item) {
- return item.sort !== 'unsort';
- });
- var maxFeatures = matchItem ? '' : dataset.maxFeatures;
- (0, _getFeatures.default)(_objectSpread({}, dataset, {
- maxFeatures: maxFeatures
- })).then(function (data) {
- // 兼容三方服务接口返回的一个普通的对象
- if (data.transformed && !!data.features.length) {
- data = tranformSingleToMulti(data);
- } // 解析数据,生成dataOption
- var options;
- if (_this.dataset.type === 'iPortal' || _this.dataset.type === 'iServer' || _this.dataset.type === 'rest' || _this.dataset.type === 'geoJSON') {
- options = _this.formatChartData(_this.datasetOptions, xBar, data);
- }
- resolve(options);
- }).catch(function (e) {
- reject(e);
- });
- });
- return promise;
- }
- /**
- * @function EchartsDataService.prototype.formatChartData
- * @description _requestData方法中返回的数据: 设置数据,转换数据格式。
- * @param {Object} data - 从superMap的iserver,iportal中请求返回的数据
- * @param {Object} datasetOptions - 数据解析的配置参数
- * @returns {Object} 符合echart格式的数据
- */
- }, {
- key: "formatChartData",
- value: function formatChartData(datasetOptions) {
- var _this2 = this;
- var xBar = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.dataCache;
- // 清除数据缓存
- this._clearChartCache(); // 设置datasetOptions
- this.setDatasetOptions(datasetOptions); // 设置this.data
- data = this._setData(data, xBar); // 生成seriedata
- datasetOptions.forEach(function (item) {
- // 生成YData, XData
- var fieldData = _this2._fieldsData(data, item, xBar); // 解析YData, XData,生成EchartsOption的data
- var serieData = _this2._createDataOption(fieldData, item); // 设置坐标
- _this2._createAxisData(fieldData, item);
- if (!serieData.tooltip) {
- serieData.tooltip = _this2._fixToolTip(data, item);
- }
- _this2.serieDatas.push(serieData);
- });
- var gridAxis = (this.gridAxis.xAxis.length > 0 || JSON.stringify(this.gridAxis.yAxis) !== '{}') && this.gridAxis;
- var radarAxis = this.radarAxis;
- var series = this.serieDatas;
- return _objectSpread({}, gridAxis, {}, radarAxis, {
- series: series
- });
- }
- /**
- * @function EchartsDataService.prototype.setDatasetOptions
- * @private
- * @description 设置datasetOptions
- * @param {Array.<Chart-datasetOption>} datasetOptions - 数据解析的配置
- */
- }, {
- key: "setDatasetOptions",
- value: function setDatasetOptions(datasetOptions) {
- this.datasetOptions = datasetOptions;
- }
- /**
- * @function EchartsDataService.prototype._setData
- * @private
- * @description 给实例绑定data。
- * @param {Object} data - 从superMap的iserver,iportal中请求返回的数据
- */
- }, {
- key: "_setData",
- value: function _setData(data, xBar) {
- var nextData = data;
- if (data) {
- var nextFeatures = (0, _util.filterInvalidData)(this.datasetOptions, data.features); // 只过滤空数据但不排序的原数据
- this.dataCache = (0, _statistics.statisticsFeatures)(nextFeatures);
- nextFeatures = sortData(nextFeatures, this.datasetOptions, this.dataset.maxFeatures, xBar);
- nextData = (0, _statistics.statisticsFeatures)(nextFeatures);
- this.sortDataCache = nextData;
- }
- return nextData;
- }
- /**
- * @function EchartsDataService.prototype._clearChartCache
- * @private
- * @description 清除已经生成的chart数据的缓存。
- */
- }, {
- key: "_clearChartCache",
- value: function _clearChartCache() {
- this.axisDatas = []; // 坐标data
- this.serieDatas = []; // series data
- this.gridAxis = {
- xAxis: [],
- yAxis: {}
- }; // 直角坐标系
- }
- /**
- * @function EchartsDataService.prototype._createSeriesData
- * @private
- * @description 生成chart的serie。
- * @param {Object} fieldData - 解析后的数据{xData,yData}
- * @param {Chart-datasetOption} datasetOption - 数据解析的配置
- * @returns {Object} 配置好的serieData
- */
- }, {
- key: "_createDataOption",
- value: function _createDataOption(fieldData, datasetOption) {
- var chartType = datasetOption.seriesType;
- var XData = fieldData.xData;
- var YData = fieldData.yData;
- var serieData = {
- type: chartType,
- name: datasetOption.yField,
- data: []
- };
- if (chartType === 'pie') {
- YData.forEach(function (value, index) {
- serieData.data.push({
- value: value,
- name: XData[index]
- });
- });
- } else if (chartType === 'radar') {
- var yData = (0, _toConsumableArray2.default)(YData);
- serieData.data.push({
- value: (0, _toConsumableArray2.default)(YData),
- name: datasetOption.yField
- }); // 获取雷达图的max最大值
- var maxValue = (0, _lodash2.default)(yData);
- this.radarMax = Math.max(maxValue, this.radarMax);
- } else {
- // line bar scatter gauge
- serieData.data = (0, _toConsumableArray2.default)(YData); // 是否堆叠数据(line,bar,scatter)
- if (datasetOption.isStack) {
- serieData.stack = 1;
- } else {
- serieData.stack = 0;
- }
- }
- return serieData;
- }
- /**
- * @function EchartsDataService.prototype._fixToolTip
- * @private
- * @description 调整tooltip显示,Todo 考虑支持用户自定义tooltip内容
- * @param {Object} data - 数据
- * @param {Chart-datasetOption} datasetOption - 数据解析的配置
- * @returns {Object} tooltip
- */
- }, {
- key: "_fixToolTip",
- value: function _fixToolTip(data, datasetOption) {
- if (data.transformed) {
- if (datasetOption.seriesType === 'pie') {
- return {
- trigger: 'item',
- formatter: '{b} : {c} ({d}%)'
- };
- }
- return {
- trigger: 'item',
- formatter: '{b} : {c}'
- };
- }
- return null;
- }
- /**
- * @function EchartsDataService.prototype._createSeriesData
- * @private
- * @description 生成chart的serie。
- * @param {Object} fieldData - 解析后的数据{xData,yData}
- * @param {Chart-datasetOption} datasetOption - 数据解析的配置
- * @returns {Object} 配置好的坐标data
- */
- }, {
- key: "_createAxisData",
- value: function _createAxisData(fieldData, datasetOption) {
- var chartType = datasetOption.seriesType;
- var XData = fieldData.xData;
- var radarData = [];
- var axisData;
- if (chartType === 'radar' && XData) {
- var radarMax = this.radarMax;
- XData.forEach(function (text) {
- radarData.push({
- text: text,
- max: radarMax
- });
- });
- this.radarAxis = {
- radar: {
- indicator: radarData
- }
- };
- axisData = this.radarAxis;
- } else if (['bar', 'line', 'scatter', '2.5Bar'].find(function (item) {
- return item === chartType;
- })) {
- var data = XData && (0, _toConsumableArray2.default)(XData);
- if (!this.gridAxis.xAxis) {
- this.gridAxis.xAxis = [];
- this.gridAxis.yAxis = {};
- }
- if (this.gridAxis.xAxis.length === 0) {
- this.gridAxis.xAxis.push({
- data: data
- });
- } else {
- this.gridAxis.xAxis[0] = {
- data: data
- };
- }
- axisData = this.gridAxis;
- } else {
- axisData = {};
- }
- return axisData;
- }
- /**
- * @function EchartsDataService.prototype._fieldsData
- * @private
- * @description 将请求回来的数据,转换成适用于chart配置的数据。
- * @param {Object} data - 从superMap的iserver,iportal中请求返回的数据
- * @param {Chart-datasetOption} datasetOption - 数据解析的配置
- * @returns {Object} 解析好的Ydata,xdata
- */
- }, {
- key: "_fieldsData",
- value: function _fieldsData(data, datasetOption) {
- var xBar = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- var fieldCaptions, fieldValues, xFieldIndex, yFieldIndex, fieldValueIndex, xData, yData, result;
- var sort = datasetOption.sort,
- yField = datasetOption.yField,
- xField = datasetOption.xField,
- isStastic = datasetOption.isStastic;
- fieldCaptions = data.fieldCaptions; // 所有x字段
- xFieldIndex = fieldCaptions.indexOf(xField); // x字段的下标
- yFieldIndex = fieldCaptions.indexOf(yField); // y字段的下标
- fieldValues = yFieldIndex < 0 ? [] : data.fieldValues[yFieldIndex]; // y字段的所有feature值
- // 该数据是否需要统计,统计的是数组下标
- if (isStastic) {
- fieldValueIndex = this._getUniqFieldDatas(data, xFieldIndex, sort); // 生成统计后的数据
- xData = this._stasticXData(fieldValueIndex, sort);
- yData = this._stasticYData(fieldValues, fieldValueIndex, sort);
- } else {
- // 如果不是统计图表
- xData = this._getFieldDatas(data, xFieldIndex);
- yData = (0, _toConsumableArray2.default)(fieldValues);
- }
- result = {
- xData: xData,
- yData: yData
- };
- return result;
- }
- /**
- * @function EchartsDataService.prototype._stasticXData
- * @private
- * @description 统计X字段数据,生成xData。
- * @param {Object} fieldValueIndex - x字段的统计索引
- * @returns {Array} 统计后的Xdata、
- */
- }, {
- key: "_stasticXData",
- value: function _stasticXData(fieldValueIndex) {
- var xData = Object.keys(fieldValueIndex);
- return xData;
- }
- /**
- * @function EchartsDataService.prototype._stasticYData
- * @private
- * @description 统计数据,生成yData。
- * @param {Object} fieldValues - y字段的所有feature值
- * @param {Object} fieldValueIndex - x字段的统计索引
- * @returns {Array} 统计后的Ydata、
- */
- }, {
- key: "_stasticYData",
- value: function _stasticYData(fieldValues, fieldValueIndex) {
- var yData = []; // 统计Y字段
- for (var key in fieldValueIndex) {
- var total = 0;
- fieldValueIndex[key].forEach(function (index) {
- // 清除字符串型的数字的逗号
- var num = fieldValues[index] && (0, _util.clearNumberComma)(fieldValues[index]);
- total += (0, _lodash.default)(num);
- });
- yData.push(total);
- }
- return yData;
- }
- /**
- * @function EchartsDataService.prototype._getUniqFieldDatas
- * @private
- * @description 获取x轴字段要统计的属性值
- * @param {Object} data - 从superMap的iserver,iportal中请求返回的数据的fieldValue
- * @param {String} fieldIndexs - x字段索引值数组
- * @returns {Object} 返回x轴字段要统计的属性值,返回值为eg:[fieldIndex:1, statiscIndex:{浇水地:[5,2,5,4], 林地:[5,2,5,4]...}]。
- */
- }, {
- key: "_getUniqFieldDatas",
- value: function _getUniqFieldDatas(data, fieldIndex) {
- var fieldValues = this._getFieldDatas(data, fieldIndex);
- var uniqFieldValues = {};
- if (fieldValues) {
- fieldValues.forEach(function (value, index) {
- if (!uniqFieldValues[value]) {
- uniqFieldValues[value] = [index];
- } else {
- uniqFieldValues[value].push(index);
- }
- });
- }
- return uniqFieldValues;
- }
- /**
- * @function EchartsDataService.prototype._getFieldDatas
- * @private
- * @description 。
- * @param {Object} data - 从superMap的iserver,iportal中请求返回的数据的fieldValue
- * @param {String} fieldIndex - x字段索引值
- * @returns {Array} 返回的是一个数组[林地, 旱地, 林地,沼泽,旱地...]
- */
- }, {
- key: "_getFieldDatas",
- value: function _getFieldDatas(data, fieldIndex) {
- // 获取x字段所有值,
- return data.fieldValues[fieldIndex];
- }
- }]);
- return EchartsDataService;
- }();
- exports.default = EchartsDataService;
- /***/ }),
- /***/ "5106":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAANrxJREFUeAHt3QmcXGWd7vH3nFPVa9ZOYlYgbAIJIIu4IggqCjPjXBDxznVmnLkzd7xzHRY3FCGkERFxZbnO4vXq1RlnVMZxxgWRsCnKDiIMO0GW7DtJ73WW+/zfU1VdXalOKiVIkv5V0l1nec9S3+5PzpP3fc97AvcSvN5wzTd6M+eWjrfrwLlLbj/7fb216wvnXPKW1LkfuizrrF3ONAIIIIAAAgj8LgWCLHDBXybXXPy1Vo6qa/yL+7JQMdDfv/ThBx50pZFSdefFtqJbfNSRrqu7u1GoOEmh4seEiioXEwgggAACe7qArrBBELogDFwURs7pPQw1r2VhFLooijSvS7hfpnctj6xsMXKa0zpbr7L2Fdn6wBUKhdFlfj/5PqOCtlF5296XV9nRY2i/5fMoFgsqUz6+3v203p3LtJ0dN3OrVq51v7jtzjROkr9Irrz4/+3qj+FFDRYthYqzP3li6tLrhNL12tce7ebMm+M/qH4c/oNWPpCB2itVVUgQ6Jt9/DT10Jkg/EsZy0/r3VmZ/K/yispZec2nfmF1C5XRtJUrl0/9jBboldm68rvtTLvxy+zUrJi9rEzlPdPJpVZIr3w3Wuf/2n7sT37Ofr2V0fn79eWPaudpn8+/7Nj+y+Zs2s7cPoO+23I7Vl5Qq23f/i3fxpbbvu1N6/wxfJl8n7bctti0bpPbsnGTzfJCAAEEEHiRBexSFPoLvF30ywGhfIEPFSrsuuaDRiUM2IVegcPK2gU/DyAqY4FDwSEPGHrXdn6dtrOgoA1UXuUKOoamK8csVraxY1uQ8futhJX82HY8v38fdDSt/VgI2bBhs/vJdTemcSn+s+Tqpf+4KzR2SXtRXi2FinM/dXyaJdcXorD7Hae9xc2bN9vygl7l07KLYnk2s4oZuxyWF+Vv5YumXTm11i6itqW/IOvCaz9Uf+HXan+BtX2pjE375ZpNrZwu0bb3vEx+jPzCrWl/pc+3scNY6er+K8ey5eV95vut7ENBwR/T1isY2Gna0aplNacAkO8z34dm8nn7bufm522dhZB83t79udbsx7bLz9/K+b91ZWxbrdBKK7d5/Sa3eQOhwn4ivBBAAIGXREDXoDw45Bdvq7nwAUOhwgcHCwM+QOTL8xqMSg1HHjBsm0JUrqXwIcUChy7+2kehHBzy/Y7WVhRs//qyMJGHDIWKwObzfVmY8IHCBw0LE/lXpPVWs+JrUXRN3LB+o/vRj5alcZz8SXLVxf/crFH5Ct5s8cblWgoV53zqDWkW/1QpbNI73nGym79gjlNzyWB3d/daO4pdAvU/c2n7qoTyeWpay7Ig0NXYX0CtmAJEkNi75Qh71xr9danmbTt/Hdcqiwi2zF93/XR+nbbLtyUL28auvSpvV+AgtaOVt7PE4rdXKU0Hmk61ryDPH3YM/bXj24Qd07bXNvn2fj/5ctu3frEsz2h7zdjZ6fwVMLTcZUkWxH63Oo7tz87Hl8vPT/vUfu3Ta0srb+vtsNpf4svZvPZve863z9/125wKSVtmWSFJ7vv6ooX36zx5IYAAAgi8RALvfvjhthfiuBh1dUUdm+Ji0tVeSJOS8kDYkaZRIcsStWzoPU0LxSjozNKwUFB7hP65L6ah6h/CoBClrlPXOC3LigoUhVD/hCtIqJrCdfh5LVd8UU7Rehd26LpZCKKwoH/rC5HKa9uiLVPA6FDNREHXl4KuDVbNofoNV9Al1rbT9kGnbaP9FgYHh2bGcWmqhYz16za4f//+DYnm/zi5+uJvN0Ol/f92r1ZCRfHsT70uCZIblJgmW6hYsO9cpafC0KTurvX+bPK2Dk3qupwvsEusHOx0bZkFC2u8sEAgGrushj50WCHbwocDzdhFXpspCOQXYNtL+cLv92jhRcssKJQvxHYBt7J+53pXdtAefWCwd9u+etG2aS3zy304sGk1hmh7f0xbb+dmwcdaORQEtAfbZnSfPqT4D+XL2nb5+duyPDDoF8KHAjuO3z7U9joJCwr+U/vz0q9kpkDhEksusb05lbNztR1pzm+jfdz7jcP2u89ceCGAAAIIIFAR6H143aTB6dHXdVU9bmhoeGaSxN1W87Fm1Vr3b9+/3sLFHyVXLb22Un68d11nWn+1FCo++KnX6GSXqeplyjtOPdntu898dVQpDHd3da7TRdWugE9mUXheGCfDkV0O9YrtgqpXoa1tzLwbGnaF9vbMDQ25uPxesm06LI51ZIqDvnxJl2Pbvlidz5cXlM98+cq6fudGurSuz0o7N1wu36bLc1v3pGyr2+rcNufaJmVZezrZ73PIIot/bXHtU6dmA+VtbFGnhQp7bdzo+np6MpfHJtc1Q8t9vYxzW2flZbqTxJedGi/Q+zN+M/s+eeHCzD31lJ+fMXKQ1j3iVi1alO/Xlt6XZ4R5xx6bL7v1Vl/Wvj385jfny67Nfw++++53W+AZ3bZakgkEEEAAAQSc6123btJQKfxn1Yq8Jh4Zmab/FLfb/57XrV3vvnvtD+NSKf6vChff25FVy8GixVDx6iROblRzztS3q6Ziv/0WWIeUkpo/1tl/qtWUtLzNtZ3ZO2/Khh2dNOsQQAABBBBA4KURsHBRSqLv6L/kr4uTeJKa/dusH8bKVavdd779w1IpSc5Krlzy7+MdvaVg0VKoOO+yY1RTcaOq9aef8o6T3ML9FSqisNQ9qXuDTtr+J/105orvunzu5PL/68c7ZZYjgAACCCCAwEspcP5j6ycXp4XfVx3361Uv367/+EeJbjZ4/vnVqrn4UUkdOs9Mrlryg0bnYDev7tKrxVBxVJKWlqk7xPS3veMEt/8B+1jP09hChfVYVf+IZ1zY9m5CxS79KCiMAAIIIIDASyLw2UNnbStF6en6T//duk4n6iuoFpHAzZs/x535rlOL6mV6bXTeJb/X6OC7FCxaCRVt5152pNVU6OR63nbKm90BB+xvnSmTrkmdG/RuvSKfaQ/jMz89e1K510Gj02QZAggggAACCPwuBT47a9a24Sh5py7av1T3wUHd1RCr14KGhpjjzjj9tLZCVPyewsWp9efUdLBoKVScc9nhcVa6SflhxlveeoI78MCFuokjSLq7OzfYvTE6mefak+zM3le8Yk39iTGPAAIIIIAAAi+vQB4u4j9UdcUd6mcxoLMpxWoSecXsme4P/uBt7bpf9t8KZ196Su1ZNhUsWgoVZ396kYUKHWzmSW893h10kNVUuNSHiiiyeylWhHH2rt59Z62qPSGmEUAAAQQQQGD3EbBwUdqSnq7aijujYnGrOjAMJxoEYdbsGe7UU9/aEbWF/1H44KVvrZzxTjtvthQqzrv0MCWaW3Snx+yTTj7eHXLIQTb8RtrV1b5B41Uk6gyyUl9nXDZ/xvOVE+EdAQQQQAABBHZfgd51me4W2fQdjaRwVN/g4LRkJO6yDp2rV691119/y2CapL8fX7nk5h0Gi1ZCRfu5lx5SSpNbRTPnzSe/0R16aDlUdHZu1F0gsTqBrIyz4F1XzOt5bvfl48wQQAABBBBAoF7Aj3MRh99UuDhyoH9gztDwSLfVXqxds8HdeMOtA2kpPW3cppCWQsU5lx5cyqymws054cTXu1eqpsJ6knZ2dqimIhrRcKKrXBaeSaio/1ExjwACCCCAwO4voD6RfR2F9E/VYfLeru6ulRqLaluqWoueGdPda9/w6i4N8fzjhsGipVBx9qUHlpxCRZbNPf6E17pDFx1sfSqyrs7O9QXdWqqEsa7ogjMvmzf92d2fjjNEAAEEEEAAgUYCFi7SqPQX6it576TJk562gaMtXMybN9fGuuzeLli0Eio6Pnj5AeVQMf8Nb3qNW7TolXb3h0JFx0Y9YGVEM2uyqHRm79zpzzQ6SZYhgAACCCCAwJ4j8Pk5c/qzYvJXGjZCXSrtEVejT4sYEyxaChXnXb5wJBm2jpr7vP6Nr/ahQk/XzDo7OjcU29oGNJ7G+iyJ3/OZ2bOf3nPIOFMEEEAAAQQQ2JGADxdZGidJ6iq1FlbeHpHqXy2Fig9/ar+RkkJF5vZ93euPdYsXH6ocEbjO9vaNbW2FAbWEbMyS9D2f2ecV+VO0KgfjHQEEEEAAAQT2eAE9Tls1FoligH+2t/88Pli0Eio6P/SpfYZHEuuoufC41xztFh1+qHXUdNZRs629qGeAhptcmvw3QsUe/3vDB0AAAQQQQKChgAbOKiX2kG6NIZHG1iSiq39LoeLsKxYMxxYqsv1ffdyr3BGvOkyZInAdHW0b29vbtmp6UyFL3nv5gllPNDwTFiKAAAIIIIDAHi+gob59HwuNYeFs5Et7FfS29OEHHnSlkVL1Axbbim7xUUe6ru7uS24/+3291RWa6Dr/inlDQ0M3q+fngUcfc4Q7/MjFWqpQ0d6+qaOzc5PyxVZllj/51PxZj9duxzQCCCCAAAII7F0C6repYJGpKUQ1FgoX9vJNIU2HivMumzs0OKiaCnfwUUcf7o44arG1frj2trbNXd0dG5Qvtlmo+Oy8mY/6vfMNAQQQQAABBPZaAQ1Vpc6bidUv6JbTvMZizF0hO6qp6D73stlDSelm6bzyiCMXuSOPOtyaVFybhYrJ3XoyabDVlUrvI1Tstb8/fDAEEEAAAQTGCChLxEmmZhCNZZFkChh6VYPFjkLFpI987hWDmQ8Vhy4+4lB31DGHqyUkc8X2ti2TpnSvDrJsqwuDP7tiv7kPjzkiMwgggAACCCCwFwvk41jYsN6VGgvfFLLDUHH2p2cNjPTfpOaTRYsWH+KOPuZIAQWuvaP9halTJ61wWdAfZOH/uGJuD6FiL/7V4aMhgAACCCBQL6BAMZT3rQichQt7+RqL8TpqTr7g0zMGgpEbFSoOP+Swg9xRxx7hayoKbcWtU6dMek6b9xWz8K+u2KfnofqDMY8AAggggAACe7eA7gIt2d0gpVjjb/sROMvBotHdH1M++MWe/r6S1VQc+cpDD3THvPoor6NQsW36tClPa6YvdMn//PQ+PQ/u3Wx8OgQQQAABBBBoJJDY7aZ2q6l9lTtvFtSRc7tbSqd+/PLp2wa23ahxKl510CsPcEcfm4eKqFDo6+mZ9pQGxBgMXPEDVyyY/utGB2IZAggggAACCEwAAT0rxO4KSdWBU10j/AcO68epmHbel6b1DYwsU5vH0QcetNAdowGwVNrp0aj9PT3Tn9DtpQNhGJz9uQXTH5gAZHxEBBBAAAEEEBhHQI/tiK0pxGorxjSFVMpP/9hnpm5Lt96gOz6O3f/A/dzRxx2lfOFcFEUDM3qmPxoFQX8hDM793LxZ91e24R0BBBBAAAEEJqZAphoLvXyo2C5Y9Jx99ZStg0PXK1Qct9/++7hjjzvaD35VKBQGZ86a8YjVWOgu1Q9/Zt6s+yYmH58aAQQQQAABBGoFNOKmf1aIhYpSqeaukJnnXzH5hWDTT1Q78bp991ug5g+rqdCzyoJwqGfm9IfCKNqWpcFHv7Dv3Htqd8g0AggggAACCExcAT3ddDjzY1ikyg3qZ6FXOKv3y5M2Dw1epxzxhgX7znfH6Eml9uhzhYnhWbNmPthWiOzujwu+sO9MQsXE/d3hkyOAAAIIINBAIC3ZqJvWxyIr325a2LRp/Y8VKo6fO2+Ob/6wjppBVBiZOavnQbu1NAuSi76wYM5dDfbGIgQQQAABBBCYwAKqrNCI3qkGx0p9pYRRhAoVJ9jE4UfrKaW6UyQMw9KMGdMfaGsvblZvzyVfXDDnTlvPCwEEEEAAAQQQGCMQBepjYc0g6oVZqbGoFOjs6PCTM2fOeKCzo31bkLhLvrRw9h2V9bwjgAACCCCAAAK1AgoU+dNNaxb6Z4XYvKUN/XUdnR2b9RYqVNxeU45JBBBAAAEEEEBgjEASa+RNCw+WIcprqsHC2kE0+JUGzgoyPa10zIbMIIAAAggggAAC9QJZ6PQQsvw2U9+fQgWqwUJ9Oi1V+NShqfyekfo9MI8AAggggAACCJQFrCkkHxgr0J0hecCoBgtfh2FVFkFltG/cEEAAAQQQQACB8QXUyFENFtXbTSvFfetH4Csq1A6igMELAQQQQAABBBDYgYDChIJFPoaF+lH4kqM1FnmVhTWHaE352ac72BmrEEAAAQQQQGBiC2RBWMqqDyCrCxZ+1n+z6BGEE5uKT48AAggggAACOxNIU3tseuzvLPV3gGiDao2FbwrJbxexh4RUunjubJ+sRwABBBBAAIGJKpAlQ5WBsdRF0ytUg4Wfy7tW6N6QlBqLifpLwudGAAEEEECgSYHM5U0hVrwykkU1WORPJQstb1jkyGNHkzumGAIIIIAAAghMQIFQjyCzIb310StPN60GC38niD3yVANaMD7WBPzl4CMjgAACCCCwiwIjSVjyd4UoP1RqJKrBwicN32dTI3D6iotd3DvFEUAAAQQQQGBCCRRVY5FaqCjXWtiHrwaLPGr4vGE1FvSxmFC/GnxYBBBAAAEEdl0g1e2mSZzf72FjbNqrGizy0byt60Wqob/Lo1zkZfiOAAIIIIAAAghsJxCPlIbzh5jaDaV5shgNFr6aIl9olRrbbc0CBBBAAAEEEECgRiDRXSH2rBBLD5UOmqPBwvptqqJCK63vZp4wajZmEgEEEEAAAQQQqBUIQz04vdxx00bgtFc1WOS3g/jBvNMwoI9FLRzTCCCAAAIIILC9QBLWDOldvi2kGixsXoHCXqP3jPhZviGAAAIIIIAAAtsLZKU4ieO42r/CSlSDhTWAWLiwzhdqJ6GPxfZ+LEEAAQQQQACBGoHicDpknTcVHNSdIl9Rva00f+ypr8cgVNSgMYkAAggggAACjQUKUVtsY1jYHwsX9hqtsVB9hXXd1GKFDosfvBBAAAEEEEAAgfEFhlynHpuuUKHWDl9zoaI1wSK/HUTf9RTUkGAxviNrEEAAAQQQQEACHZ2bdVeIJtSDwm43tdaQalOITxJaYneNUGPB7wsCCCCAAAII7Exg8aJF+e2magapDK05GiyUNHw1hsKF1tPPYmearEcAAQQQQGCCC/QGwXZ3klabQnyoyBtA0nLHzgnOxcdHAAEEEEAAgV0VGFNjoYYQ257ail1VpDwCCCCAAAIIeIFqsLA564ChmgsLFoQLz8M3BBBAAAEEENgVgdFgoVBhDSVBGCpbqM2EFwIIIIAAAgggsIsCo30stKH16EwT/5iy0cCxizukOAIIIIAAAghMXIHRYGF3hcjB7jjVm33xQgABBBBAAAEEdklgTLCo3A3C7aa7ZEhhBBBAAAEEECgLjAkWtkxVFZkeREaNBb8iCCCAAAIIILDLAg2Chd0VQq7YZUk2QAABBBBAAIHRIb29hR4iokyx3ShaOCGAAAIIIIAAAs0IVGssfBuIPUAk9MNZcLtpM3qUQQABBBBAAIExAtVgYU8ls1eqMSxUb1HpxzmmMDMIIIAAAggggMCOBGrGq1BtRR4nLGHQyWJHaqxDAAEEEEAAgYYC1RoL/xAyFcmCLNHImzWBo+F2LEQAAQQQQAABBLYTGBssrA0k77pJjcV2VCxAAAEEEEAAgZ0JVIOFFcw0MpYShY3BSefNncmxHgEEEEAAAQS2E6gGi3LfTUsVqRpC6Ly5HRULEEAAAQQQQGBnAtW+FGmlkiLwd4XQFLIzOdYjgAACCCCAwHYC1RoL3wCisbGsFUTfaQrZjooFCCCAAAIIILAzgWqwyJtCVFERWMQIqbHYmRzrEUAAAQQQQGA7gWqwsMeOWZrQraaJWkN+tl1JFiCAAAIIIIAAAjsRqPaxyKsoMhcF2a1fPWjBzTvZjtUIIIAAAggggMB2AtUaCxsga+2qNe4rBy24ZbtSLEAAAQQQQAABBJoQqAaLtatWuzUr1zSxCUUQQAABBBBAAIHGAtWmEEJFYyCWIoAAAggggEDzAtVg0fwmlEQAAQQQQAABBBoLECwau7AUAQQQQAABBFoQIFi0gMYmCCCAAAIIINBYgGDR2IWlCCCAAAIIINCCAMGiBTQ2QQABBBBAAIHGAgSLxi4sRQABBBBAAIEWBAgWLaCxCQIIIIAAAgg0FiBYNHZhKQIIIIAAAgi0IECwaAGNTRBAAAEEEECgsQDBorELSxFAAAEEEECgBQGCRQtobIIAAggggAACjQUIFo1dWIoAAggggAACLQgQLFpAYxMEEEAAAQQQaCxAsGjswlIEEEAAAQQQaEGAYNECGpsggAACCCCAQGMBgkVjF5YigAACCCCAQAsCBIsW0NgEAQQQQAABBBoLECwau7AUAQQQQAABBFoQIFi0gMYmCCCAAAIIINBYgGDR2IWlCCCAAAIIINCCAMGiBTQ2QQABBBBAAIHGAgSLxi4sRQABBBBAAIEWBAgWLaCxCQIIIIAAAgg0FiBYNHZhKQIIIIAAAgi0IECwaAGNTRBAAAEEEECgsQDBorELSxFAAAEEEECgBQGCRQtobIIAAggggAACjQUIFo1dWIoAAggggAACLQgQLFpAYxMEEEAAAQQQaCxAsGjswlIEEEAAAQQQaEGAYNECGpsggAACCCCAQGMBgkVjF5YigAACCCCAQAsCBIsW0NgEAQQQQAABBBoLECwau7AUAQQQQAABBFoQIFi0gMYmCCCAAAIIINBYgGDR2IWlCCCAAAIIINCCAMGiBTQ2QQABBBBAAIFRgSnTp1VnCBZVCiYQQAABBBBAYFcFpvZMc9NmECx21Y3yCCCAAAIIIFAn8N5Hlx8xbcZ0LQ2qa6ixqFIwgQACCCCAAALNCvzpY88f6Vx0hJUPgtFgUWh2B5RDAAEEEEAAAQQqAqlLjgiCyFKF6itGgwU1FhUh3hFAAAEEEECgaQHVUoRpmoZhMDZKUGPRNCEFEUAAAQQQQKAikOUtIL6qorYpZGzMqJTmHQEEEEAAAQQQ2IFAkAZhNqZ3RV6YGosdoLEKAQQQQAABBBoLqGtFGLjUBfruMtVflF8Ei4oE7wgggAACCCDQtIDVVoROnTet4+Zo301HsGiakIIIIIAAAgggUBGwm0Eyl6p7hdVYVJY6gsUoBVMIIIAAAggg0LRAmka+osJXWIxWWVBj0bQgBRFAAAEEEECgImC3mwZhmFmk8N/KKwgWFSHeEUAAAQQQQKBpAYUJ/VHnTT9A1uhm3G46asEUAggggAACCDQpEIRqCUl1Z4j1sbCv8otgUZHgHQEEEEAAAQSaFsji1EKFDxajscI5gkXThBREAAEEEEAAgYpAGPkMkddYVBbqnT4WNRhMIoAAAggggECTAr4NRGV9S8honQXBokk/iiGAAAIIIIDAqIDlCZvz+aKm/aNmcrQwUwgggAACCCCAwA4FMo1j4Yf1LoeLcmFqLHaoxkoEEEAAAQQQaCTgH0CW2ggWdt/p6Isai1ELphBAAAEEEECgSQHdbKqnm9oYWbWxgs6bTfJRDAEEEEAAAQRqBfR4kEBPNVUFhRJGTTVFzWRtcaYRQAABBBBAAIEdCejhpj5F1DyBTMXpY7EjM9YhgAACCCCAQEMBPdo0VE1FVrnrtFKIGouKBO8IIIAAAggg0LSA6iuC1Ib0ti0Y0rtpNwoigAACCCCAQAMBX1URZOq96Z9GVi1BU0iVggkEEEAAAQQQaFZANRXW6qFUoc6bNTecEiyaFaQcAggggAACCIwKZPYAskjzujmk5o5TgsUoEVMIIIAAAggg0KSAv91Uz02v77xJsGgSkGIIIIAAAgggMCqguoow1az129QonNUVBIsqBRMIIIAAAggg0KyAmj8ClypW0MeiWTLKIYAAAggggMC4AlkW2b2mvimkZowsaizGFWMFAggggAACCIwnYJnC1uXf/HdflAGyxhNjOQIIIIAAAgiMK5B33lSwsHEsRnMFQ3qPK8YKBBBAAAEEEBhXQE0gkXptptbVIq+2yItSYzEuGSsQQAABBBBAYHwB9dysporRKguCxfhirEEAAQQQQACB8QSCIFSFRahRssaUoPPmGA5mEEAAAQQQQKAZgcDGxtKTQqwZpHZIb2osmtGjDAIIIIAAAgiMFdAjQrLKwJs1lRbUWIxlYg4BBBBAAAEEmhBQ94owC2zMTf2pCRbUWDSBRxEEEEAAAQQQGCuQN4JYc4iiRE2yoMZirBNzCCCAAAIIINCEgOoqMkUK9d2sqa7QdgSLJvAoggACCCCAAAJjBQIN6W0dN7NMEaMmXBAsxjoxhwACCCCAAALNCWjMTXWzsAeG1LzoY1GDwSQCCCCAAAIINC2grpupcoUfJau6ETUWVQomEEAAAQQQQKBZARvEQg0h5UaQ0VoLgkWzgpRDAAEEEEAAgVGBVH03fbuH3Xg6uphgMWrBFAIIIIAAAgg0K1CJFb7iYnSjmowxupApBBBAAAEEEEBgRwK+a0X12emjJQkWoxZMIYAAAggggECTAnaTqRpDdKcpnTebJKMYAggggAACCIwnoEebRlkW+Gen15ahj0WtBtMIIIAAAggg0JSAtYLkw3qPrbGgKaQpPgohgAACCCCAQK2AAkSoUTdDe1SIBvauriJYVCmYQAABBBBAAIFmBdS/wrpYKEdo/M3yaBa2LcGiWUHKIYAAAggggECNgH9s+th2EK2lj0UNEZMIIIAAAggg0JyAOm+GqYrW1lbYltRYNOdHKQQQQAABBBCoEUjVEmKNILZIHTmrL4JFlYIJBBBAAAEEEGhWQInChwr/ELLRvps0hTQLSDkEEEAAAQQQqBFQdYWvqlDHzdpaCvpY1BgxiQACCCCAAALNCaiSIsz04HQbeZOmkObMKIUAAggggAAC4wiUm0J8I4iFi8qrtvaisox3BBBAAAEEEEBgpwJ2Z0j9s0IIFjtlowACCCCAAAII1AvkDzYNynebUmNR78M8AggggAACCOyCgEbGiqzXpm8GGc0VYzpy7sLuKIoAAggggAACE1lAWcLihHpXjB3Sm7tCJvJvBZ8dAQQQQACBFgUyP5i39drUxHY1FlrgbxXR+7u/+92oxWOwGQIIIIAAAghMEIF82E2NvlkTKuyj5503tdSee2rtJI8sXkywmCC/FHxMBBBAAAEEWhbQg0IsPtj2vvKivCO/INRTT9WvU1+hO2BwOs0jLSuzIQIIIIAAAhNFIAhThQurmKjtsZknjcjaRyxYBK6QvNA5UUj4nAgggAACCCDQmoD1sbBqCetMUdse4msnAltlbST6lnS1U2PRmjFbIYAAAgggMGEErJ4iDVzqA0Q6Oqi3DxGV/hVeo1igj8WE+bXggyKAAAIIILDrAh9ZseHkNFM7iCorrLZCtRfVV15j4W8V8VUWLktK1FhUeZhAAAEEEEAAgVqBD61YfVKWZUstVGzetHl/tYi4gcHBahEfIqJipZIicFFaLFbXMoEAAggggAACCJQFPrJ6/ZvVYfMSl2WFzVu27Ds4ODg/U8L49f0PlUsEWV5jYX0vyq80jamxqGDwjgACCCCAAAJe4IPPrz8xS7LL9KT0cMuWFxYMDQzNt7aOu++4z61auVpT/hnq/8uHCDWQVNnUxYJgUdVgAgEEEEAAAQQ+aqHCuSvSLAv6tvbPG+gfWqCKCnf37fe5555dkQMF7uz06ov/Pg8W1vGiPLxFmiUEC36HEEAAAQQQQMALfOy5dSckLvucOmiGA339r+jr719g9RF33HGve/aZ53OlMDw3veriL9uMDxE2MJaNY5Epfah3Z0deiu8IIIAAAgggMJEFPrpq05uSJPmC6h6igf6Bmf19g/tYG8ddChXPPP1cThMGH1KouLriNBostCTQQFmhS+m8WdHhHQEEEEAAgQkq8LFV645P0+RK1TsUBgaHpvX39S+wwbvvvvN+9/TyZ3OVIPyoQsWXaonKTSGhCxUqbHiLLA1pCqkVYhoBBBBAAIEJJnDByk1vjNP4Grv7Y2hoeFpfX586agbBnXfc45Y/+ZuyRvBx9an4fD1NucbCitudqKqxyFKCRb0S8wgggAACCEwQgY+uXPvGOEv+VrmgODg8PGlbX//8IMtDxVNPPJ0rhOGFqqm4ohGJDxGFor3pTlRVWUQRNRaNoFiGAAIIIIDA3i7wsZUb36C7Rv9On7M4PDI8eaB/cJ4CRnDn7fe4Jx5fnn/8ILhYoeLTjSxO+PtvHewHsPC1FRrLwj+hLMvoY9FIi2UIIIAAAgjsxQIXrFj7+izI/kH1DB3DpZFJfdsG5mVpFtgtpY8/9pT/5LrB45L06qWXNmI4/n9/87WlOLnH11j4p5KpKaR8W0hlGM5G27EMAQQQQAABBPYygfNXbHxdGmb/V0GgrVQqdQz2D821moq71afi0Uef8J9WN5B+Mr5qaW+jj26hIk6Tn+qhplN9jUUY5bUVYRhZrQV9LBqpsQwBBBBAAIG9UOCCNRteq9DwNY2b2ZXGWefAwNBcPQskvPP2e90jj5RDRRBcHl/Vu7TRx6+EiscfemSqrc9rLLRH61+he001joXrbLQhyxBAAAEEEEBg7xK4cPWG1ySp+6Y+VUecJMWBgcHZmg5tnIqH//Mx/2E10tXn4quXfqLRJ68NFZs3bvJFfLBQ1YVqKnR3qh8kK6DGopEeyxBAAAEEENiLBD6+esNxSeb+SXeEdiVxXBgcGJyVpamvqXjowUf9J1VlwxcVKs5v9LEbhQorV62xsBnrvKn+FvSxMAxeCCCAAAII7KUCFipUE/Ftddbs1Mia0cDQ8ExVL4R33Xmfe/DXj/hPrTxwlULFhxsRjBcqrGw5WGj8Cquy0Eu3qlJj4SX4hgACCCCAwN4nsGTVlmNjl35bw2JOSnXXx9DQSI/6Q/jmjwd+9bD/wGrBuEah4rxGn35HocLKV2ssKsEictxu2giSZQgggAACCOzpAktWrT82CdJ/VVXCJNVUBIPDI9OCLItsmO7773/Ifzz1ivjb5Oql5zT6rDsLFbaNr6awh5BZsLC+FuoJSo1FI02WIYAAAgggsAcLLFm3+ejEhd/T4BKT9fjzaKRUmhakWXTnHfe5e+/9tf9k6m/xD7ql9G8afcxmQoVt50NEIYoUKjSnZ6JGQUSwaCTKMgQQQAABBPZQgSUr1x2dJekPwjCYlKXODY+MTNZ7dNddv3L33POA/1TKAV+Nr7r4r9UMYveJjnk1GypsIx8iItVWKFNoFE/LFtRYjNFkBgEEEEAAgT1YoHfF5qOSQvoDDSsxRc0SwXCp1GXNH3fddb+zL3spTHxdoeKvfptQMX1Gj+3oBR8s8iebWpWFnhXCOBbegW8IIIAAAgjs6QJL1m5+VeKyH6t2Ypqu8ulIKe50aao+Fb9yd6gJxF5a/s0lPRf/5W8bKg45YtELagE5Jb8VRHeYqnrEf6kqhKaQPf03ifNHAAEEEJjwAp9c03eE2iGu07M/pqsmIYvjpEs1FtHdavr4pR4qZi9d8/9pyYylf97bG6iBZOyr2eYPq6mwUFEstp1y21+/9+5yjYU6burI1olTj0YlWIy1ZQ4BBBBAAIE9SmDJmk1HxEFpmfo3TNeJZ0lSardhuu+6+wH3i9vu9p9FHTX/5YzjD/uz3rNevFBhO/Y1FpGvrQid9bVQsiBYeHK+IYAAAgggsOcJfHL1xsWqilimM59hZ58kcdGlLrSaitt+fqf/QKqp+O4ZbzrsT64966zEL6j51mpNRWUXeY2FBQq97CmnGniTYFHR4R0BBBBAAIE9SKB39cZFSRDerH4Ts3TaSZYmBXXaVKj4tfvZrXf4T6JL/b++qefE91571kkveqiwA9QECx3Znm6aMUCWl+cbAggggAACe5DARas2HJaG7iad8izd5JnaaJqpLu02RsUtt/zSfxJ10Pz+m3pO+KNbe0+K6z/ab1tTYfs79err2vNgofgSqaIisz+arD8Y8wgggAACCCCw+wpctHL9IWEULlPtxEz1mbRxKIIszcJ77/u1u+mmX/gTV6j4j6MWz3nPre9/6ULFlmD99/NgEeUjb9o9JxHPCtl9f3M4MwQQQAABBOoELl33wsGlNL1edQOzFCf0gFJVEugppffe95C7cdltvrTqD350aM9hZ933/rNKdZu7F6umwkKF9n1qufOmBQvdbqoja+yMYv1BmUcAAQQQQACB3U+gd90LB41k6fWKErMtTiRxGvpQoed+LFv2c3/CurRfd2jPonc93HvWSP0neDFDxca160+1/ftgYc8Jiax/hWouojDrqD8w8wgggAACCCCwewn0rl17QJKkP9ZtpAoVdveHxtfU4Ff36wmly26ohorr9896zvhdhIonH33UA/mmEB8qVGOR5wzGsdi9fnU4GwQQQAABBMYK9K7evDBO0ut0x8UcrVFVRVpUyCj8+sFH3A0//ZkvrD4Vy/bp2ff0p3r/fHjs1u5Fbf6wmgoLFb5nhw7kg0VgzSCqrbCXnnBK500vwTcEEEAAAQR2P4ELV23erxRkP1S/SIWKzCWltC3VbaUPPfRYbai4aW40+Q+f6f3zofpP8GI3f9SGCjtWXmPhm0AsWNg4FtxuWv9DYB4BBBBAAIHdQaB31aZ9Sy77D+WJ+aohUJ+KuCtJ07aH//Nx99Of3upPUTUVt8zumfPOFb3vH6w/55c6VNjx8rtCgvyuEKvG0BNO/bL6k2EeAQQQQAABBF4+gQtXbtyn5NJ/Uw3AfD2EI431lFKFinYLFTcsqzR/uJ8rVPz+qt73D9Sf6UsdKtRJ1L/G1Fj4R6eH9LGo/2EwjwACCCCAwMspcOHzG+ZnYfg9VVLso/aFtFQa6VZnzc5HH3kyDxVWMRC4X8xs6z7t5QoVBx92mBH9JK+xUFOI+lb4W0SosXg5f3U4NgIIIIAAAmMFzn9u/by0EFyrR4kt0JpsuJR0xiOl7sefWO5+esOt1s3CQsXtPT2zTl3b+4H+sVu/tB017VhWU2GhYsbsWT+Zls063ffYtIeP2Zfddqp8QVNI/U+FeQQQQAABBF4Ggd51fXOiKPyuRtHcT5dwNX8kHSPDw1Mee+KpvKNmHirunN7R+Y71vR/oqz/F30XzR22o+Mk5pw3nNRZKEzpxnY9abRwDZNX/YJhHAAEEEEDgdy3wibV9s4fiwe/of/z76NqclErxpCGFiuVPPe2W/fTnur3Trtnu7qlZz9s3fPacbfXn93KECjuHPFiUaywUfJQteGy6MfBCAAEEEEDg5RLoXbPmFUPp8D9rfKl9LUGMqKOmQsW05U89Eyy74WeVUHHv5Gjq2zddec7W+vN8uUKFnUfeFBJpKG/NWK0F41jU/3iYRwABBBBA4HcncMHqbbMGk+hbyhP76dqsjppx58DQ0IxqqNCzQPS6f1J3+ylbrvzglvozezlDhZ2LDxaqYvGhIlSTiCJG2wWr151Wf6LMI4AAAggggMBLK/DhVatmJunQN/W//YUuzYLS8EhXf//ArKeXP5vXVFioCNwDkwpT3vbCZy7YXH82L3eosPPxwWJoaMg/gMxqLPr7BhakSXDVx1au/4P6E2YeAQQQQAABBF4agQtWrJgRpcVv6D/7CzX8Q1qK445t/QOzn/nNc8FN1qciDxUPdne3vXXrlz60qf4sdodQYedkwWLgnrt+5e8IiTS0d0ntOAODg/NUe/HlC1Zt+C/1J848AggggAACCLy4Ah98/vmeOG37ehYoVOgx46WRuLOvb2DO88+s8DUVaZZaTcV/dhcnvWXb5Z/YWH/03SVU2HnpaenBO597buXgz275pTqDqJ9FIbJU1DUyPDJL/S2+cuHazafXfwDmEUAAAQQQQODFEfj4s1umF4PO/6P/6u+v5g+njprtff1985955vnwxmW3+o6aChWPdLV1v2XbFz6yof6ou1OosHML46uX3qSKij9U+83QLTf/Qp9LDyTTXSJ6nntHaWRkqkvSr120dvMZ9R+EeQQQQAABBBD47QR6f7N5WhyOfCVz2UG6JGelJG7btrV/n+eeXRHerGG607yj5mOdQfHkvs9/dF390Xa3UGHn5/tYxFctXRYG0enLlz87vMzGG1fVhQ3vrc4jbap+mRRm2bcuWr3xzPoPxDwCCCCAAAIItCbwseWbpvYV47/T7ZgKFS7VwFcdWzdv3f/551dENy27LQ8VQfB4Z0fXSf1XXbi2/ii7GioKYfT22/76vXfX7ufUq69r3xKs/379o8+tTP2Imjb4Ve224037YGEr46uXXK+6ijOeeuo3IzfoHtnI11zY/SJBQe097Xpa2j9etG4L4WI8SZYjgAACCCDQpEDvkxunpB3pl9UD4WBtkumW0vatW7fuv2Ll6ujmG3+hx5Zan4rgyY6OjpP7P3f+mvrdthIqfvE3f3pX7X5eilBh+68GC5tJrl5yXZAFZz7xxPKRH193U96uYyusy4hz7YpPX7tw1cZ3+SV8QwABBBBAAIFdFjh//frJfZ3JNepycIhaBjRMd9y2efOWg1asWFO4+cafK1QkFiqWt0fRSQOf/diq+gPszqHCznVMsLAFyTVLf6hairMef/zp0o9+fKPT09P0ldp7oATVqSJfpUOnSfFCAAEEEEBg1wQsVCQjwZW68eMQ3QGSxHHcvmnTloNXrVxTvPUmNX/4mgr3dHshOmnwSxetrN/77h4q7HytJqLhKzrv0jOyNPnOoYceWPj933ubhioPfcjQ+1ChEG1RH5P3Xz5n1g8absxCBBBAAAEEEBgj0Ltu3aStw+5LuvAuTq2qIkk6Nm98YdGqlavb7c7MJLaaCvdMe9Bx4uBVH39uzMaa2RNChZ3zuMHCVkZnX3pmFiT/csgrDyycdtpbnEH4XheBG2xrb98QZukHLps/64dWlhcCCCCAAAIINBb4yJo13elI8AXVUixSp8hQIaJ94/pNh69Zs7bjZzdXQ8VzbWH7iUNXXvBM/V72lFBh573DYGEFonMveY/G5fjWKw85IDrllBPV7BP4mouoWNzW0dG+Rremnnf53J7rrCwvBBBAAIGJK/C+J59dPJK4xRofyS4VYZqm/gFUhVR13Lp66G5DLdazI7JUoxxomUqFulMgSwMbn9GuR1Y+sEGr9QgrbZ/5ERBURNurnMpE5e3U5y+yo/iyGiQhzTIdVoNIWzm7tmnX9pOw42ihP76ts2PohoTyMjsfX1aHy9fZCabqN6kDh/5sNKkdhrZ3K6Nty2U1p/3kBfU9s/JWREdXOU3oODp2vh+/zC8XRJykbRs3bHzVmtVrOn9+y+15TYULnm9rD08c+vyS31jh2teeFCrsvPXZd/6Kzrvkj7LE/eNBBy+M3va2E1VzoT9J5optxRe6urust2qs21JjwZayIIsVRBL9ApQ00EeS6l0DbsWijoU8pPlYPxmVC2K1JcX6UcVJlmnbLE5dUNIdN4lu2x2q7kvLtXPbJrZt9GukWTeY2vZarhFC9TNK/b40XVJPkFi/TcP6PS6FURKXdFOwBhuJC12TSq4UJ9HAcBxHUwc7OufG1157Sex6e/UrxAsBBBBA4LcReO+Tzy7KRtziIEh1EbdrvkJFqsbzQn6h1wIfNCwwWMgI9I90GEU+LOgaYTci+gu3lVNoyENCGAW6tujibNcqhQuV0dU68sFB13K7avuLu+UA7dTKaCc+XNi0IoJlCrvO5UHDBxqV8fN2HraNbay/OnA+6eOBFfGBwrb0W+sC5YOQBQY7rs5fS7QvyzEKG3Z827UtU6DQnGUM/wguO06gi5adf5albevXbnjV2tVru2+79XYX++aPYGUxC08cvmbJcjuf2teeFirs3D1q7YcYbzo695N/LJBvHHjgwvCkk4/3xZQQfe2FJQElU32po6emrbNnPm+dPjWtpGFBJNH6fHk+beOe27LE1iWxX5cvs/JqeLH9a7/qOat1mX4A5TJ+f7XrNe6GlbFEox+SlbXj2Pb2biOZ5dN2rERltVxltbAcLsf71CxHAAEEENiZwJTp09yU6VPzZGCXabvK6rpuVxhdS8vXbF2Rq9d4W5bvNb+eq1weK/xV3dbk6+16X9murozfPt+PHauyH19pYMf1O8jX23Htn3tb5r/KB7Ai1WWVdbZQhf325WW1+7TDai+2of3Nt7d5W27zli3KfxQk/LJ8ey3VOdiCzRs3uZ8rVPg+Fc6tKgbRm4evXvKk30nNtz0xVNjpq1apuVd21y0Phq896dlNm7e8c8uWF4J9Fy7IL9Z2kdeF2ljtGm4XcLta+z9+Ol+my7z/wdp6K2EX+DwA2PL8y29va/Nd2Ba2scraMdSppbxnJUW/L1/QtvVBwUJEvm1+DlbYdpS/2/ZWTjUq1WX5BN8RQAABBFoVmDJtips8bWp58/IFtjpnF1/7Ki/QP7/VaX/xtfnyNr5cebpycfaz+mbrtAu/Lz+laXsvb1PehV+f/wvvN7TVeTlftrx9ubBd7GuP7a87teUqx/PltVc7d1vmy9i2lXm/MF/ng1M+r+/5/u2ErLDfRepWrVjj7vzl3eWOmsHqYrHtpOErL9prQoX/3PZtV17R2Z/877o8f3Xf/eYHx73mGNfe2a7NdVG3Wge1l1jtg9UeqH2iXFNh7SKKFTU1FnkthNVGVMKFylbLa3uVV+uF3ss1Fn6dBQeFg8oyCxM6Tl5DYbUTecDxNRRWRtv4wGJlrJZCyyrb27nk86rb2pUPT1kEEEAAAQReDIEgWFsoFt888oVPPFa/uz21pqLyOVq6rkbnfPIvdWH+igJFS9tXDs47AggggAACE1BgXcG1nTRyzSceqf/sJ/z9tw5Wd8B79L/fSjVQfZHR+SB4Qc0Obx9vRE0VPHW08HZTP5mWzTq92WG6t9t6Bwv+P48/bDtBrA7UAAAAAElFTkSuQmCC"
- /***/ }),
- /***/ "52fe":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Progress_vue_vue_type_template_id_0ed980d1___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ee84");
- /* harmony import */ var _Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("4b85");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _Progress_vue_vue_type_template_id_0ed980d1___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _Progress_vue_vue_type_template_id_0ed980d1___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "5310":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- var _cssElementQueries = __webpack_require__("18e4");
- var _timer = _interopRequireDefault(__webpack_require__("8156"));
- var _thirdService = _interopRequireDefault(__webpack_require__("c51e"));
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var _default = {
- name: 'SmProgress',
- mixins: [_theme.default, _timer.default, _thirdService.default],
- props: {
- percent: {
- type: [Number, String],
- required: true
- },
- type: {
- type: String,
- default: 'line'
- },
- strokeWidth: {
- type: [Number, String],
- default: 6
- },
- status: {
- type: String
- },
- strokeColor: {
- type: String
- },
- trailColor: {
- type: String,
- default: '#f3f3f3'
- },
- size: {
- type: [Number] // fix 其父元素宽高都很大的时候,需要传一个合适的size, 这时候不会自适应, 如需自适应则不传size
- },
- showInfo: {
- type: Boolean,
- default: true
- },
- gapDegree: {
- type: Number,
- default: 0
- },
- gapPosition: {
- type: String,
- default: 'top',
- validator: function validator(gapPosition) {
- var positionList = ['top', 'bottom', 'left', 'right'];
- return positionList.includes(gapPosition);
- }
- },
- strokeLinecap: {
- type: String,
- default: 'round',
- validator: function validator(strokeLinecap) {
- var strokeLinecapList = ['round', 'square'];
- return strokeLinecapList.includes(strokeLinecap);
- }
- }
- },
- data: function data() {
- return {
- colorData: '',
- circleWidth: 0,
- finalValue: this.percent
- };
- },
- computed: {
- calWidth: function calWidth() {
- if (this.size) {
- return this.size;
- }
- return this.circleWidth;
- }
- },
- watch: {
- strokeColor: function strokeColor(val) {
- this.colorData = val;
- },
- trailColor: {
- handler: function handler() {
- if (this.type === 'circle' && this.progressTrailNode) {
- this.progressTrailNode.style.stroke = this.trailColor;
- }
- if (this.type === 'line' && this.progressLineTrailNode) {
- this.progressLineTrailNode.style.backgroundColor = this.trailColor;
- }
- }
- },
- textColorsData: {
- handler: function handler() {
- if (this.progressTextNode) {
- this.progressTextNode.style.color = this.getTextColor;
- }
- }
- },
- percent: function percent(val) {
- this.finalValue = val;
- }
- },
- created: function created() {
- this.colorData = this.strokeColor || this.getColor(0);
- },
- mounted: function mounted() {
- var _this = this;
- this.$on('theme-style-changed', function () {
- _this.colorData = _this.getColor(0);
- });
- this.progressTextNode = this.$el.querySelector('.ant-progress-text');
- this.progressTextNode.style.color = this.getTextColor;
- this.progressTrailNode = this.$el.querySelector('.ant-progress-circle-trail');
- this.progressLineTrailNode = this.$el.querySelector('.ant-progress-inner');
- if (this.type === 'circle' && this.progressTrailNode) {
- this.progressTrailNode.style.stroke = this.trailColor;
- }
- if (this.type === 'line' && this.progressLineTrailNode) {
- this.progressLineTrailNode.style.backgroundColor = this.trailColor;
- }
- this.resizeObsever = new _cssElementQueries.ResizeSensor(this.$el, function () {
- _this.resize();
- });
- },
- beforeDestroy: function beforeDestroy() {
- this.restService && this.restService.remove('getdatasucceeded');
- },
- methods: {
- resize: function resize() {
- this.circleWidth = Math.min(this.$el.offsetWidth, this.$el.offsetHeight);
- },
- timing: function timing() {
- this.getData();
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "5465":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- /*<replacement>*/
- var Buffer = __webpack_require__("0318").Buffer;
- /*</replacement>*/
- var isEncoding = Buffer.isEncoding || function (encoding) {
- encoding = '' + encoding;
- switch (encoding && encoding.toLowerCase()) {
- case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
- return true;
- default:
- return false;
- }
- };
- function _normalizeEncoding(enc) {
- if (!enc) return 'utf8';
- var retried;
- while (true) {
- switch (enc) {
- case 'utf8':
- case 'utf-8':
- return 'utf8';
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return 'utf16le';
- case 'latin1':
- case 'binary':
- return 'latin1';
- case 'base64':
- case 'ascii':
- case 'hex':
- return enc;
- default:
- if (retried) return; // undefined
- enc = ('' + enc).toLowerCase();
- retried = true;
- }
- }
- };
- // Do not cache `Buffer.isEncoding` when checking encoding names as some
- // modules monkey-patch it to support additional encodings
- function normalizeEncoding(enc) {
- var nenc = _normalizeEncoding(enc);
- if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
- return nenc || enc;
- }
- // StringDecoder provides an interface for efficiently splitting a series of
- // buffers into a series of JS strings without breaking apart multi-byte
- // characters.
- exports.StringDecoder = StringDecoder;
- function StringDecoder(encoding) {
- this.encoding = normalizeEncoding(encoding);
- var nb;
- switch (this.encoding) {
- case 'utf16le':
- this.text = utf16Text;
- this.end = utf16End;
- nb = 4;
- break;
- case 'utf8':
- this.fillLast = utf8FillLast;
- nb = 4;
- break;
- case 'base64':
- this.text = base64Text;
- this.end = base64End;
- nb = 3;
- break;
- default:
- this.write = simpleWrite;
- this.end = simpleEnd;
- return;
- }
- this.lastNeed = 0;
- this.lastTotal = 0;
- this.lastChar = Buffer.allocUnsafe(nb);
- }
- StringDecoder.prototype.write = function (buf) {
- if (buf.length === 0) return '';
- var r;
- var i;
- if (this.lastNeed) {
- r = this.fillLast(buf);
- if (r === undefined) return '';
- i = this.lastNeed;
- this.lastNeed = 0;
- } else {
- i = 0;
- }
- if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
- return r || '';
- };
- StringDecoder.prototype.end = utf8End;
- // Returns only complete characters in a Buffer
- StringDecoder.prototype.text = utf8Text;
- // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
- StringDecoder.prototype.fillLast = function (buf) {
- if (this.lastNeed <= buf.length) {
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
- }
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
- this.lastNeed -= buf.length;
- };
- // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
- // continuation byte. If an invalid byte is detected, -2 is returned.
- function utf8CheckByte(byte) {
- if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
- return byte >> 6 === 0x02 ? -1 : -2;
- }
- // Checks at most 3 bytes at the end of a Buffer in order to detect an
- // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
- // needed to complete the UTF-8 character (if applicable) are returned.
- function utf8CheckIncomplete(self, buf, i) {
- var j = buf.length - 1;
- if (j < i) return 0;
- var nb = utf8CheckByte(buf[j]);
- if (nb >= 0) {
- if (nb > 0) self.lastNeed = nb - 1;
- return nb;
- }
- if (--j < i || nb === -2) return 0;
- nb = utf8CheckByte(buf[j]);
- if (nb >= 0) {
- if (nb > 0) self.lastNeed = nb - 2;
- return nb;
- }
- if (--j < i || nb === -2) return 0;
- nb = utf8CheckByte(buf[j]);
- if (nb >= 0) {
- if (nb > 0) {
- if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
- }
- return nb;
- }
- return 0;
- }
- // Validates as many continuation bytes for a multi-byte UTF-8 character as
- // needed or are available. If we see a non-continuation byte where we expect
- // one, we "replace" the validated continuation bytes we've seen so far with
- // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
- // behavior. The continuation byte check is included three times in the case
- // where all of the continuation bytes for a character exist in the same buffer.
- // It is also done this way as a slight performance increase instead of using a
- // loop.
- function utf8CheckExtraBytes(self, buf, p) {
- if ((buf[0] & 0xC0) !== 0x80) {
- self.lastNeed = 0;
- return '\ufffd';
- }
- if (self.lastNeed > 1 && buf.length > 1) {
- if ((buf[1] & 0xC0) !== 0x80) {
- self.lastNeed = 1;
- return '\ufffd';
- }
- if (self.lastNeed > 2 && buf.length > 2) {
- if ((buf[2] & 0xC0) !== 0x80) {
- self.lastNeed = 2;
- return '\ufffd';
- }
- }
- }
- }
- // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
- function utf8FillLast(buf) {
- var p = this.lastTotal - this.lastNeed;
- var r = utf8CheckExtraBytes(this, buf, p);
- if (r !== undefined) return r;
- if (this.lastNeed <= buf.length) {
- buf.copy(this.lastChar, p, 0, this.lastNeed);
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
- }
- buf.copy(this.lastChar, p, 0, buf.length);
- this.lastNeed -= buf.length;
- }
- // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
- // partial character, the character's bytes are buffered until the required
- // number of bytes are available.
- function utf8Text(buf, i) {
- var total = utf8CheckIncomplete(this, buf, i);
- if (!this.lastNeed) return buf.toString('utf8', i);
- this.lastTotal = total;
- var end = buf.length - (total - this.lastNeed);
- buf.copy(this.lastChar, 0, end);
- return buf.toString('utf8', i, end);
- }
- // For UTF-8, a replacement character is added when ending on a partial
- // character.
- function utf8End(buf) {
- var r = buf && buf.length ? this.write(buf) : '';
- if (this.lastNeed) return r + '\ufffd';
- return r;
- }
- // UTF-16LE typically needs two bytes per character, but even if we have an even
- // number of bytes available, we need to check if we end on a leading/high
- // surrogate. In that case, we need to wait for the next two bytes in order to
- // decode the last character properly.
- function utf16Text(buf, i) {
- if ((buf.length - i) % 2 === 0) {
- var r = buf.toString('utf16le', i);
- if (r) {
- var c = r.charCodeAt(r.length - 1);
- if (c >= 0xD800 && c <= 0xDBFF) {
- this.lastNeed = 2;
- this.lastTotal = 4;
- this.lastChar[0] = buf[buf.length - 2];
- this.lastChar[1] = buf[buf.length - 1];
- return r.slice(0, -1);
- }
- }
- return r;
- }
- this.lastNeed = 1;
- this.lastTotal = 2;
- this.lastChar[0] = buf[buf.length - 1];
- return buf.toString('utf16le', i, buf.length - 1);
- }
- // For UTF-16LE we do not explicitly append special replacement characters if we
- // end on a partial character, we simply let v8 handle that.
- function utf16End(buf) {
- var r = buf && buf.length ? this.write(buf) : '';
- if (this.lastNeed) {
- var end = this.lastTotal - this.lastNeed;
- return r + this.lastChar.toString('utf16le', 0, end);
- }
- return r;
- }
- function base64Text(buf, i) {
- var n = (buf.length - i) % 3;
- if (n === 0) return buf.toString('base64', i);
- this.lastNeed = 3 - n;
- this.lastTotal = 3;
- if (n === 1) {
- this.lastChar[0] = buf[buf.length - 1];
- } else {
- this.lastChar[0] = buf[buf.length - 2];
- this.lastChar[1] = buf[buf.length - 1];
- }
- return buf.toString('base64', i, buf.length - n);
- }
- function base64End(buf) {
- var r = buf && buf.length ? this.write(buf) : '';
- if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
- return r;
- }
- // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
- function simpleWrite(buf) {
- return buf.toString(this.encoding);
- }
- function simpleEnd(buf) {
- return buf && buf.length ? this.write(buf) : '';
- }
- /***/ }),
- /***/ "54da":
- /***/ (function(module, exports, __webpack_require__) {
- /* eslint-disable node/no-deprecated-api */
- var buffer = __webpack_require__("3be6")
- var Buffer = buffer.Buffer
- // alternative to using Object.keys for old browsers
- function copyProps (src, dst) {
- for (var key in src) {
- dst[key] = src[key]
- }
- }
- if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
- module.exports = buffer
- } else {
- // Copy properties from require('buffer')
- copyProps(buffer, exports)
- exports.Buffer = SafeBuffer
- }
- function SafeBuffer (arg, encodingOrOffset, length) {
- return Buffer(arg, encodingOrOffset, length)
- }
- // Copy static methods from Buffer
- copyProps(Buffer, SafeBuffer)
- SafeBuffer.from = function (arg, encodingOrOffset, length) {
- if (typeof arg === 'number') {
- throw new TypeError('Argument must not be a number')
- }
- return Buffer(arg, encodingOrOffset, length)
- }
- SafeBuffer.alloc = function (size, fill, encoding) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- var buf = Buffer(size)
- if (fill !== undefined) {
- if (typeof encoding === 'string') {
- buf.fill(fill, encoding)
- } else {
- buf.fill(fill)
- }
- } else {
- buf.fill(0)
- }
- return buf
- }
- SafeBuffer.allocUnsafe = function (size) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- return Buffer(size)
- }
- SafeBuffer.allocUnsafeSlow = function (size) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- return buffer.SlowBuffer(size)
- }
- /***/ }),
- /***/ "550a":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dd34");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "5643":
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__5643__;
- /***/ }),
- /***/ "5648":
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("d711");
- /***/ }),
- /***/ "5993":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/card/Card.vue?vue&type=template&id=0b7b8e8a&
- var render = function () {
- var _obj, _obj$1, _obj$2;
- var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-card"},[(_vm.iconClass)?_c('div',{class:( _obj = {}, _obj['sm-component-card__icon'] = true, _obj['is-' + _vm.position] = true, _obj[("is-click-" + (_vm.isShow ? 'out' : 'in'))] = true, _obj['is-not-header'] = !_vm.headerName, _obj ),style:([_vm.getBackgroundStyle, _vm.getTextColorStyle, _vm.iconStyleObject]),on:{"click":_vm.iconClicked}},[_c('div',{class:( _obj$1 = {}, _obj$1[_vm.iconClass] = true, _obj$1['is-auto-rotate'] = _vm.autoRotate, _obj$1['sm-component-card__component-icon'] = true, _obj$1 ),style:([_vm.iconStyle])})]):_vm._e(),_vm._v(" "),_c('transition',{attrs:{"name":"sm-component-zoom-in"},on:{"after-leave":function($event){return _vm.toggleTransition('leave')},"enter":function($event){return _vm.toggleTransition('enter')}}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"}],class:( _obj$2 = {}, _obj$2['sm-component-card__content'] = true, _obj$2['is-not-header'] = !_vm.headerName, _obj$2['is-' + _vm.position] = true, _obj$2['is-icon'] = _vm.iconClass, _obj$2 ),style:([_vm.getCardStyle])},[(_vm.headerName)?_c('div',{staticClass:"sm-component-card__header",style:([_vm.getBackgroundStyle, _vm.getTextColorStyle])},[_c('span',{staticClass:"sm-component-card__header-name"},[_vm._v(_vm._s(_vm.headerName))])]):_vm._e(),_vm._v(" "),_vm._t("default")],2)])],1)}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/card/Card.vue?vue&type=template&id=0b7b8e8a&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "5a51":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _leafletWrapper = _interopRequireDefault(__webpack_require__("6f27"));
- var ChartViewModel =
- /*#__PURE__*/
- function (_L$Evented) {
- (0, _inherits2.default)(ChartViewModel, _L$Evented);
- function ChartViewModel(map, options) {
- var _this;
- (0, _classCallCheck2.default)(this, ChartViewModel);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ChartViewModel).call(this, null));
- _this.map = map;
- _this.options = options;
- return _this;
- }
- (0, _createClass2.default)(ChartViewModel, [{
- key: "setPopupContent",
- value: function setPopupContent(coordinates, popupContainer, callback) {
- this.clear();
- var fromatCoordinates = _leafletWrapper.default.GeoJSON.coordsToLatLng(coordinates);
- popupContainer.style.display = 'block';
- this.popup = new _leafletWrapper.default.Popup({
- className: 'sm-leaflet-tabel-popup sm-component-chart-result-popup',
- closeOnClick: true,
- maxWidth: 800
- });
- this.marker = new _leafletWrapper.default.Marker();
- this.popup.setLatLng(fromatCoordinates).setContent(popupContainer);
- this.map.on('popupopen', function () {
- callback && callback();
- });
- this.marker.setLatLng(fromatCoordinates).bindPopup(this.popup).addTo(this.map);
- this.map.flyTo(fromatCoordinates);
- }
- }, {
- key: "clear",
- value: function clear() {
- if (this.popup) {
- this.popup.remove();
- this.popup = null;
- }
- if (this.marker) {
- this.marker.remove();
- this.marker = null;
- }
- if (this.map) {
- this.map.off('popupopen', function () {});
- }
- }
- }]);
- return ChartViewModel;
- }(_leafletWrapper.default.Evented);
- exports.default = ChartViewModel;
- /***/ }),
- /***/ "5b56":
- /***/ (function(module, exports) {
- var toString = {}.toString;
- module.exports = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
- };
- /***/ }),
- /***/ "5bb9":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _mapGetter = _interopRequireDefault(__webpack_require__("2ed5"));
- var _SmTileLayerViewModel = _interopRequireDefault(__webpack_require__("5f55"));
- var _propsBinder = __webpack_require__("efee");
- var _TileLayer = _interopRequireDefault(__webpack_require__("cdb0"));
- var _default = {
- name: 'SmTileLayer',
- mixins: [_mapGetter.default, _TileLayer.default],
- props: {
- layersID: {
- type: String
- },
- redirect: {
- type: Boolean,
- default: false
- },
- cacheEnabled: {
- type: Boolean,
- default: true
- },
- clipRegionEnabled: {
- type: Boolean,
- default: false
- },
- prjCoordSys: {
- type: Object
- },
- overlapDisplayed: {
- type: Boolean,
- default: false
- },
- overlapDisplayedOptions: {
- type: String
- },
- tileversion: {
- type: String
- },
- serverType: {
- type: String,
- default: 'iServer'
- },
- tileProxy: {
- type: String
- },
- format: {
- type: String,
- default: 'png',
- validator: function validator(val) {
- return ['png', 'jpg', 'bmp', 'gif'].indexOf(val) !== -1;
- }
- },
- tileSize: {
- type: Number,
- default: 256
- },
- url: {
- type: String
- },
- transparent: {
- type: Boolean,
- default: true
- },
- clipRegion: {
- type: Object
- },
- crs: {
- type: Object
- }
- },
- created: function created() {
- var _this = this;
- var _loop = function _loop(key) {
- var setMethodName = 'set' + (0, _propsBinder.capitalizeFirstLetter)(key);
- if (!_this[setMethodName]) {
- _this[setMethodName] = function (newValue) {
- this.viewModel && this.viewModel[setMethodName](newValue);
- };
- }
- };
- for (var key in this.$props) {
- _loop(key);
- }
- this.viewModel = new _SmTileLayerViewModel.default(this.$props);
- this.layer = this.viewModel.getLayer();
- },
- loaded: function loaded() {
- this.viewModel.addTo(this.map);
- },
- render: function render() {}
- };
- exports.default = _default;
- /***/ }),
- /***/ "5bf3":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _defineProperty2 = _interopRequireDefault(__webpack_require__("279f"));
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _Events2 = __webpack_require__("e3e2");
- var _util = __webpack_require__("1448");
- var _statistics = __webpack_require__("9dde");
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
- var RestService =
- /*#__PURE__*/
- function (_Events) {
- (0, _inherits2.default)(RestService, _Events);
- function RestService(options) {
- var _this;
- (0, _classCallCheck2.default)(this, RestService);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(RestService).call(this));
- _this.eventTypes = ['getdatafailed', 'getdatasucceeded'];
- _this.options = options || {};
- return _this;
- }
- (0, _createClass2.default)(RestService, [{
- key: "setProxy",
- value: function setProxy(proxy) {
- this.options.proxy = proxy;
- }
- /**
- * @function RestService.prototype.getData
- * @description 请求数据。
- */
- }, {
- key: "getData",
- value: function getData(data, queryInfo) {
- var _this2 = this;
- if (!data) {
- return;
- } // 如果是geojson
- if ((0, _typeof2.default)(data) === 'object') {
- this.transfromGeoJSON(_objectSpread({}, data), queryInfo);
- return;
- } // 如果是url, 就发送请求
- var url = data;
- SuperMap.FetchRequest.get(url, null, {
- withoutFormatSuffix: true,
- proxy: this.options.proxy
- }).then(function (response) {
- return response.json();
- }).then(function (data) {
- if (!data) {
- // 请求失败
- _this2.triggerEvent('getdatafailed', {
- data: data
- });
- } else {
- var resData = data.hasOwnProperty('data') ? data.data : data;
- _this2.transfromGeoJSON(resData, queryInfo);
- }
- }).catch(function (error) {
- console.log(error);
- _this2.triggerEvent('getdatafailed', {
- error: error
- });
- });
- }
- }, {
- key: "transfromGeoJSON",
- value: function transfromGeoJSON(resData, queryInfo) {
- var generateData = {
- type: 'FeatureCollection',
- features: []
- };
- var dataType = (0, _util.getDataType)(resData);
- var limitLen = (queryInfo || {}).maxFeatures;
- if (dataType !== '[object Object]' || !resData.type || resData.type !== 'FeatureCollection' || (0, _util.getDataType)(resData.features) !== '[object Array]') {
- generateData.features = this._generateData(resData, limitLen);
- } else {
- generateData = resData;
- generateData.features = this._generateData(resData.features, limitLen, false);
- }
- if (this.transformed) {
- generateData.transformed = this.transformed;
- }
- var triggerData = Object.assign({}, generateData, (0, _statistics.statisticsFeatures)(generateData.features));
- this.triggerEvent('getdatasucceeded', triggerData);
- }
- }, {
- key: "_generateData",
- value: function _generateData(data, limitLen) {
- var generateTransformed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
- var dataType = (0, _util.getDataType)(data);
- var features = [];
- var subData;
- switch (dataType) {
- case '[object Number]':
- case '[object String]':
- var feature = {
- properties: {
- value: data
- }
- };
- features.push(feature);
- break;
- case '[object Array]':
- subData = limitLen && !isNaN(+limitLen) && limitLen < data.length ? data.slice(0, limitLen) : data;
- features = subData.map(function (item) {
- if ((0, _util.getDataType)(item) === '[object Object]' && item.hasOwnProperty('properties') && (0, _util.getDataType)(item.properties) === '[object Object]') {
- return item;
- } else {
- var _feature = {
- properties: (0, _util.getDataType)(item) === '[object Object]' ? item : {
- value: item
- }
- };
- return _feature;
- }
- });
- break;
- case '[object Object]':
- subData = data;
- if (limitLen && !isNaN(+limitLen) && limitLen < Object.keys(data).length) {
- subData = Object.fromEntries(Object.entries(data).slice(0, limitLen));
- }
- if (!subData.hasOwnProperty('properties') || (0, _util.getDataType)(subData.properties) !== '[object Object]') {
- if (generateTransformed) {
- this.transformed = true;
- }
- subData = {
- properties: subData
- };
- }
- features.push(subData);
- break;
- }
- return features;
- }
- }]);
- return RestService;
- }(_Events2.Events);
- exports.default = RestService;
- /***/ }),
- /***/ "5c61":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Icon_vue_vue_type_template_id_076da86b___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c794");
- /* harmony import */ var _Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("383e");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _Icon_vue_vue_type_template_id_076da86b___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _Icon_vue_vue_type_template_id_076da86b___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "5de5":
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
- module.exports = freeGlobal;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d")))
- /***/ }),
- /***/ "5df1":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC"
- /***/ }),
- /***/ "5e45":
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(Buffer) {var js2xml = __webpack_require__("c365");
- module.exports = function (json, options) {
- if (json instanceof Buffer) {
- json = json.toString();
- }
- var js = null;
- if (typeof (json) === 'string') {
- try {
- js = JSON.parse(json);
- } catch (e) {
- throw new Error('The JSON structure is invalid');
- }
- } else {
- js = json;
- }
- return js2xml(js, options);
- };
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("3be6").Buffer))
- /***/ }),
- /***/ "5e4c":
- /***/ (function(module, exports, __webpack_require__) {
- var arrayWithHoles = __webpack_require__("31ff");
- var iterableToArrayLimit = __webpack_require__("34c8");
- var nonIterableRest = __webpack_require__("830f");
- function _slicedToArray(arr, i) {
- return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
- }
- module.exports = _slicedToArray;
- /***/ }),
- /***/ "5e89":
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("0956").EventEmitter;
- /***/ }),
- /***/ "5f3d":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Text_vue_vue_type_template_id_5e2ac717___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9243");
- /* harmony import */ var _Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e736");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _Text_vue_vue_type_template_id_5e2ac717___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _Text_vue_vue_type_template_id_5e2ac717___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "5f55":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _leaflet = _interopRequireDefault(__webpack_require__("73e4"));
- __webpack_require__("751d");
- var _propsBinder = __webpack_require__("efee");
- var RasterTileLayerViewModel =
- /*#__PURE__*/
- function (_L$Evented) {
- (0, _inherits2.default)(RasterTileLayerViewModel, _L$Evented);
- function RasterTileLayerViewModel(options) {
- var _this;
- (0, _classCallCheck2.default)(this, RasterTileLayerViewModel);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(RasterTileLayerViewModel).call(this));
- _this.defaultOptions = {
- minZoom: 0,
- maxZoom: 22,
- opacity: 1,
- tileSize: 256
- };
- var _loop = function _loop(key) {
- var setMethodName = 'set' + (0, _propsBinder.capitalizeFirstLetter)(key);
- _this[setMethodName] = function (newVal) {
- if (this.layer) {
- this.layer._paramsChanged = true;
- if (key === 'url') {
- this.layer.setUrl(newVal);
- } else if (key === 'bounds') {
- this.layer.options[key] = this._setBounds(newVal);
- } else {
- this.layer.options[key] = newVal;
- this.layer.redraw();
- }
- }
- };
- };
- for (var key in options) {
- _loop(key);
- }
- Object.assign(_this.defaultOptions, options);
- _this.defaultOptions.bounds && (_this.defaultOptions.bounds = _this._setBounds(_this.defaultOptions.bounds));
- _this._init();
- return _this;
- }
- (0, _createClass2.default)(RasterTileLayerViewModel, [{
- key: "_setBounds",
- value: function _setBounds(bounds) {
- return _leaflet.default.latLngBounds(_leaflet.default.latLng(bounds[1], bounds[0]), _leaflet.default.latLng(bounds[3], bounds[2]));
- }
- }, {
- key: "_init",
- value: function _init() {
- this._addLayer();
- }
- }, {
- key: "_addLayer",
- value: function _addLayer() {
- this.layer = _leaflet.default.supermap.tiledMapLayer(this.defaultOptions.url, this.defaultOptions);
- }
- }, {
- key: "getLayer",
- value: function getLayer() {
- return this.layer;
- }
- }, {
- key: "addTo",
- value: function addTo(map) {
- this.map = map;
- this.map.addLayer(this.layer);
- }
- }, {
- key: "clear",
- value: function clear() {
- var map = this.map,
- layer = this.layer;
- if (map && layer && map.hasLayer(this.layer)) {
- map.removeLayer(layer);
- }
- }
- }]);
- return RasterTileLayerViewModel;
- }(_leaflet.default.Evented);
- exports.default = RasterTileLayerViewModel;
- /***/ }),
- /***/ "5f9f":
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global, module) {/**
- * Lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright JS Foundation and other contributors <https://js.foundation/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG = 1,
- COMPARE_UNORDERED_FLAG = 2;
- /** Used as references for various `Number` constants. */
- var MAX_SAFE_INTEGER = 9007199254740991;
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- asyncTag = '[object AsyncFunction]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- nullTag = '[object Null]',
- objectTag = '[object Object]',
- promiseTag = '[object Promise]',
- proxyTag = '[object Proxy]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- undefinedTag = '[object Undefined]',
- weakMapTag = '[object WeakMap]';
- var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
- /**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
- /** Used to detect host constructors (Safari). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
- typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
- typedArrayTags[weakMapTag] = false;
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
- /** Detect free variable `exports`. */
- var freeExports = true && exports && !exports.nodeType && exports;
- /** Detect free variable `module`. */
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports;
- /** Detect free variable `process` from Node.js. */
- var freeProcess = moduleExports && freeGlobal.process;
- /** Used to access faster Node.js helpers. */
- var nodeUtil = (function() {
- try {
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
- } catch (e) {}
- }());
- /* Node.js helper references. */
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
- /**
- * A specialized version of `_.filter` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function arrayFilter(array, predicate) {
- var index = -1,
- length = array == null ? 0 : array.length,
- resIndex = 0,
- result = [];
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[resIndex++] = value;
- }
- }
- return result;
- }
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
- }
- /**
- * A specialized version of `_.some` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function arraySome(array, predicate) {
- var index = -1,
- length = array == null ? 0 : array.length;
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
- }
- return false;
- }
- /**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
- function baseTimes(n, iteratee) {
- var index = -1,
- result = Array(n);
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
- }
- /**
- * The base implementation of `_.unary` without support for storing metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
- */
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
- }
- /**
- * Checks if a `cache` value for `key` exists.
- *
- * @private
- * @param {Object} cache The cache to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function cacheHas(cache, key) {
- return cache.has(key);
- }
- /**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function getValue(object, key) {
- return object == null ? undefined : object[key];
- }
- /**
- * Converts `map` to its key-value pairs.
- *
- * @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the key-value pairs.
- */
- function mapToArray(map) {
- var index = -1,
- result = Array(map.size);
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
- }
- /**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
- }
- /**
- * Converts `set` to an array of its values.
- *
- * @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the values.
- */
- function setToArray(set) {
- var index = -1,
- result = Array(set.size);
- set.forEach(function(value) {
- result[++index] = value;
- });
- return result;
- }
- /** Used for built-in method references. */
- var arrayProto = Array.prototype,
- funcProto = Function.prototype,
- objectProto = Object.prototype;
- /** Used to detect overreaching core-js shims. */
- var coreJsData = root['__core-js_shared__'];
- /** Used to resolve the decompiled source of functions. */
- var funcToString = funcProto.toString;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
- /** Used to detect methods masquerading as native. */
- var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
- return uid ? ('Symbol(src)_1.' + uid) : '';
- }());
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = objectProto.toString;
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
- /** Built-in value references. */
- var Buffer = moduleExports ? root.Buffer : undefined,
- Symbol = root.Symbol,
- Uint8Array = root.Uint8Array,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- splice = arrayProto.splice,
- symToStringTag = Symbol ? Symbol.toStringTag : undefined;
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeGetSymbols = Object.getOwnPropertySymbols,
- nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
- nativeKeys = overArg(Object.keys, Object);
- /* Built-in method references that are verified to be native. */
- var DataView = getNative(root, 'DataView'),
- Map = getNative(root, 'Map'),
- Promise = getNative(root, 'Promise'),
- Set = getNative(root, 'Set'),
- WeakMap = getNative(root, 'WeakMap'),
- nativeCreate = getNative(Object, 'create');
- /** Used to detect maps, sets, and weakmaps. */
- var dataViewCtorString = toSource(DataView),
- mapCtorString = toSource(Map),
- promiseCtorString = toSource(Promise),
- setCtorString = toSource(Set),
- weakMapCtorString = toSource(WeakMap);
- /** Used to convert symbols to primitives and strings. */
- var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
- /**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Hash(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the hash.
- *
- * @private
- * @name clear
- * @memberOf Hash
- */
- function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
- this.size = 0;
- }
- /**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @name delete
- * @memberOf Hash
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function hashDelete(key) {
- var result = this.has(key) && delete this.__data__[key];
- this.size -= result ? 1 : 0;
- return result;
- }
- /**
- * Gets the hash value for `key`.
- *
- * @private
- * @name get
- * @memberOf Hash
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate) {
- var result = data[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
- }
- /**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Hash
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function hashHas(key) {
- var data = this.__data__;
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
- }
- /**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Hash
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the hash instance.
- */
- function hashSet(key, value) {
- var data = this.__data__;
- this.size += this.has(key) ? 0 : 1;
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
- return this;
- }
- // Add methods to `Hash`.
- Hash.prototype.clear = hashClear;
- Hash.prototype['delete'] = hashDelete;
- Hash.prototype.get = hashGet;
- Hash.prototype.has = hashHas;
- Hash.prototype.set = hashSet;
- /**
- * Creates an list cache object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function ListCache(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the list cache.
- *
- * @private
- * @name clear
- * @memberOf ListCache
- */
- function listCacheClear() {
- this.__data__ = [];
- this.size = 0;
- }
- /**
- * Removes `key` and its value from the list cache.
- *
- * @private
- * @name delete
- * @memberOf ListCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function listCacheDelete(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- if (index < 0) {
- return false;
- }
- var lastIndex = data.length - 1;
- if (index == lastIndex) {
- data.pop();
- } else {
- splice.call(data, index, 1);
- }
- --this.size;
- return true;
- }
- /**
- * Gets the list cache value for `key`.
- *
- * @private
- * @name get
- * @memberOf ListCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function listCacheGet(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- return index < 0 ? undefined : data[index][1];
- }
- /**
- * Checks if a list cache value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf ListCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function listCacheHas(key) {
- return assocIndexOf(this.__data__, key) > -1;
- }
- /**
- * Sets the list cache `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf ListCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the list cache instance.
- */
- function listCacheSet(key, value) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- if (index < 0) {
- ++this.size;
- data.push([key, value]);
- } else {
- data[index][1] = value;
- }
- return this;
- }
- // Add methods to `ListCache`.
- ListCache.prototype.clear = listCacheClear;
- ListCache.prototype['delete'] = listCacheDelete;
- ListCache.prototype.get = listCacheGet;
- ListCache.prototype.has = listCacheHas;
- ListCache.prototype.set = listCacheSet;
- /**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function MapCache(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
- function mapCacheClear() {
- this.size = 0;
- this.__data__ = {
- 'hash': new Hash,
- 'map': new (Map || ListCache),
- 'string': new Hash
- };
- }
- /**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function mapCacheDelete(key) {
- var result = getMapData(this, key)['delete'](key);
- this.size -= result ? 1 : 0;
- return result;
- }
- /**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function mapCacheGet(key) {
- return getMapData(this, key).get(key);
- }
- /**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapCacheHas(key) {
- return getMapData(this, key).has(key);
- }
- /**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
- function mapCacheSet(key, value) {
- var data = getMapData(this, key),
- size = data.size;
- data.set(key, value);
- this.size += data.size == size ? 0 : 1;
- return this;
- }
- // Add methods to `MapCache`.
- MapCache.prototype.clear = mapCacheClear;
- MapCache.prototype['delete'] = mapCacheDelete;
- MapCache.prototype.get = mapCacheGet;
- MapCache.prototype.has = mapCacheHas;
- MapCache.prototype.set = mapCacheSet;
- /**
- *
- * Creates an array cache object to store unique values.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function SetCache(values) {
- var index = -1,
- length = values == null ? 0 : values.length;
- this.__data__ = new MapCache;
- while (++index < length) {
- this.add(values[index]);
- }
- }
- /**
- * Adds `value` to the array cache.
- *
- * @private
- * @name add
- * @memberOf SetCache
- * @alias push
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache instance.
- */
- function setCacheAdd(value) {
- this.__data__.set(value, HASH_UNDEFINED);
- return this;
- }
- /**
- * Checks if `value` is in the array cache.
- *
- * @private
- * @name has
- * @memberOf SetCache
- * @param {*} value The value to search for.
- * @returns {number} Returns `true` if `value` is found, else `false`.
- */
- function setCacheHas(value) {
- return this.__data__.has(value);
- }
- // Add methods to `SetCache`.
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
- SetCache.prototype.has = setCacheHas;
- /**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Stack(entries) {
- var data = this.__data__ = new ListCache(entries);
- this.size = data.size;
- }
- /**
- * Removes all key-value entries from the stack.
- *
- * @private
- * @name clear
- * @memberOf Stack
- */
- function stackClear() {
- this.__data__ = new ListCache;
- this.size = 0;
- }
- /**
- * Removes `key` and its value from the stack.
- *
- * @private
- * @name delete
- * @memberOf Stack
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function stackDelete(key) {
- var data = this.__data__,
- result = data['delete'](key);
- this.size = data.size;
- return result;
- }
- /**
- * Gets the stack value for `key`.
- *
- * @private
- * @name get
- * @memberOf Stack
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function stackGet(key) {
- return this.__data__.get(key);
- }
- /**
- * Checks if a stack value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Stack
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function stackHas(key) {
- return this.__data__.has(key);
- }
- /**
- * Sets the stack `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Stack
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the stack cache instance.
- */
- function stackSet(key, value) {
- var data = this.__data__;
- if (data instanceof ListCache) {
- var pairs = data.__data__;
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
- pairs.push([key, value]);
- this.size = ++data.size;
- return this;
- }
- data = this.__data__ = new MapCache(pairs);
- }
- data.set(key, value);
- this.size = data.size;
- return this;
- }
- // Add methods to `Stack`.
- Stack.prototype.clear = stackClear;
- Stack.prototype['delete'] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
- /**
- * Creates an array of the enumerable property names of the array-like `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @param {boolean} inherited Specify returning inherited property names.
- * @returns {Array} Returns the array of property names.
- */
- function arrayLikeKeys(value, inherited) {
- var isArr = isArray(value),
- isArg = !isArr && isArguments(value),
- isBuff = !isArr && !isArg && isBuffer(value),
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
- skipIndexes = isArr || isArg || isBuff || isType,
- result = skipIndexes ? baseTimes(value.length, String) : [],
- length = result.length;
- for (var key in value) {
- if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (
- // Safari 9 has enumerable `arguments.length` in strict mode.
- key == 'length' ||
- // Node.js 0.10 has enumerable non-index properties on buffers.
- (isBuff && (key == 'offset' || key == 'parent')) ||
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
- // Skip index properties.
- isIndex(key, length)
- ))) {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
- }
- /**
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
- * symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object);
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
- }
- /**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
- return (symToStringTag && symToStringTag in Object(value))
- ? getRawTag(value)
- : objectToString(value);
- }
- /**
- * The base implementation of `_.isArguments`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- */
- function baseIsArguments(value) {
- return isObjectLike(value) && baseGetTag(value) == argsTag;
- }
- /**
- * The base implementation of `_.isEqual` which supports partial comparisons
- * and tracks traversed objects.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {boolean} bitmask The bitmask flags.
- * 1 - Unordered comparison
- * 2 - Partial comparison
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
- function baseIsEqual(value, other, bitmask, customizer, stack) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
- }
- /**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
- var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = objIsArr ? arrayTag : getTag(object),
- othTag = othIsArr ? arrayTag : getTag(other);
- objTag = objTag == argsTag ? objectTag : objTag;
- othTag = othTag == argsTag ? objectTag : othTag;
- var objIsObj = objTag == objectTag,
- othIsObj = othTag == objectTag,
- isSameTag = objTag == othTag;
- if (isSameTag && isBuffer(object)) {
- if (!isBuffer(other)) {
- return false;
- }
- objIsArr = true;
- objIsObj = false;
- }
- if (isSameTag && !objIsObj) {
- stack || (stack = new Stack);
- return (objIsArr || isTypedArray(object))
- ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
- : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
- }
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
- if (objIsWrapped || othIsWrapped) {
- var objUnwrapped = objIsWrapped ? object.value() : object,
- othUnwrapped = othIsWrapped ? other.value() : other;
- stack || (stack = new Stack);
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
- }
- }
- if (!isSameTag) {
- return false;
- }
- stack || (stack = new Stack);
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
- }
- /**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- */
- function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
- }
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
- }
- /**
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- */
- function baseIsTypedArray(value) {
- return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
- }
- /**
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeys(object) {
- if (!isPrototype(object)) {
- return nativeKeys(object);
- }
- var result = [];
- for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- arrLength = array.length,
- othLength = other.length;
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(array);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var index = -1,
- result = true,
- seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
- stack.set(array, other);
- stack.set(other, array);
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index];
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, arrValue, index, other, array, stack)
- : customizer(arrValue, othValue, index, array, other, stack);
- }
- if (compared !== undefined) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (seen) {
- if (!arraySome(other, function(othValue, othIndex) {
- if (!cacheHas(seen, othIndex) &&
- (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
- return seen.push(othIndex);
- }
- })) {
- result = false;
- break;
- }
- } else if (!(
- arrValue === othValue ||
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
- )) {
- result = false;
- break;
- }
- }
- stack['delete'](array);
- stack['delete'](other);
- return result;
- }
- /**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
- switch (tag) {
- case dataViewTag:
- if ((object.byteLength != other.byteLength) ||
- (object.byteOffset != other.byteOffset)) {
- return false;
- }
- object = object.buffer;
- other = other.buffer;
- case arrayBufferTag:
- if ((object.byteLength != other.byteLength) ||
- !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
- return false;
- }
- return true;
- case boolTag:
- case dateTag:
- case numberTag:
- // Coerce booleans to `1` or `0` and dates to milliseconds.
- // Invalid dates are coerced to `NaN`.
- return eq(+object, +other);
- case errorTag:
- return object.name == other.name && object.message == other.message;
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings, primitives and objects,
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
- // for more details.
- return object == (other + '');
- case mapTag:
- var convert = mapToArray;
- case setTag:
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
- convert || (convert = setToArray);
- if (object.size != other.size && !isPartial) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked) {
- return stacked == other;
- }
- bitmask |= COMPARE_UNORDERED_FLAG;
- // Recursively compare objects (susceptible to call stack limits).
- stack.set(object, other);
- var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
- stack['delete'](object);
- return result;
- case symbolTag:
- if (symbolValueOf) {
- return symbolValueOf.call(object) == symbolValueOf.call(other);
- }
- }
- return false;
- }
- /**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- objProps = getAllKeys(object),
- objLength = objProps.length,
- othProps = getAllKeys(other),
- othLength = othProps.length;
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var result = true;
- stack.set(object, other);
- stack.set(other, object);
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key];
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, objValue, key, other, object, stack)
- : customizer(objValue, othValue, key, object, other, stack);
- }
- // Recursively compare objects (susceptible to call stack limits).
- if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
- : compared
- )) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- result = false;
- }
- }
- stack['delete'](object);
- stack['delete'](other);
- return result;
- }
- /**
- * Creates an array of own enumerable property names and symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function getAllKeys(object) {
- return baseGetAllKeys(object, keys, getSymbols);
- }
- /**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
- function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key)
- ? data[typeof key == 'string' ? 'string' : 'hash']
- : data.map;
- }
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : undefined;
- }
- /**
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the raw `toStringTag`.
- */
- function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag),
- tag = value[symToStringTag];
- try {
- value[symToStringTag] = undefined;
- var unmasked = true;
- } catch (e) {}
- var result = nativeObjectToString.call(value);
- if (unmasked) {
- if (isOwn) {
- value[symToStringTag] = tag;
- } else {
- delete value[symToStringTag];
- }
- }
- return result;
- }
- /**
- * Creates an array of the own enumerable symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
- var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
- if (object == null) {
- return [];
- }
- object = Object(object);
- return arrayFilter(nativeGetSymbols(object), function(symbol) {
- return propertyIsEnumerable.call(object, symbol);
- });
- };
- /**
- * Gets the `toStringTag` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- var getTag = baseGetTag;
- // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
- if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
- (Map && getTag(new Map) != mapTag) ||
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
- (Set && getTag(new Set) != setTag) ||
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
- getTag = function(value) {
- var result = baseGetTag(value),
- Ctor = result == objectTag ? value.constructor : undefined,
- ctorString = Ctor ? toSource(Ctor) : '';
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString: return dataViewTag;
- case mapCtorString: return mapTag;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
- }
- }
- return result;
- };
- }
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- length = length == null ? MAX_SAFE_INTEGER : length;
- return !!length &&
- (typeof value == 'number' || reIsUint.test(value)) &&
- (value > -1 && value % 1 == 0 && value < length);
- }
- /**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
- function isKeyable(value) {
- var type = typeof value;
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
- ? (value !== '__proto__')
- : (value === null);
- }
- /**
- * Checks if `func` has its source masked.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
- */
- function isMasked(func) {
- return !!maskSrcKey && (maskSrcKey in func);
- }
- /**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
- function isPrototype(value) {
- var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
- return value === proto;
- }
- /**
- * Converts `value` to a string using `Object.prototype.toString`.
- *
- * @private
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- */
- function objectToString(value) {
- return nativeObjectToString.call(value);
- }
- /**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to convert.
- * @returns {string} Returns the source code.
- */
- function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
- }
- return '';
- }
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
- /**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
- return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
- !propertyIsEnumerable.call(value, 'callee');
- };
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
- /**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
- function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
- }
- /**
- * Checks if `value` is a buffer.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
- * @example
- *
- * _.isBuffer(new Buffer(2));
- * // => true
- *
- * _.isBuffer(new Uint8Array(2));
- * // => false
- */
- var isBuffer = nativeIsBuffer || stubFalse;
- /**
- * Performs a deep comparison between two values to determine if they are
- * equivalent.
- *
- * **Note:** This method supports comparing arrays, array buffers, booleans,
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
- * by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are compared by strict equality, i.e. `===`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.isEqual(object, other);
- * // => true
- *
- * object === other;
- * // => false
- */
- function isEqual(value, other) {
- return baseIsEqual(value, other);
- }
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- if (!isObject(value)) {
- return false;
- }
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
- var tag = baseGetTag(value);
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
- }
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
- function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return value != null && (type == 'object' || type == 'function');
- }
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return value != null && typeof value == 'object';
- }
- /**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
- }
- /**
- * This method returns a new empty array.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {Array} Returns the new empty array.
- * @example
- *
- * var arrays = _.times(2, _.stubArray);
- *
- * console.log(arrays);
- * // => [[], []]
- *
- * console.log(arrays[0] === arrays[1]);
- * // => false
- */
- function stubArray() {
- return [];
- }
- /**
- * This method returns `false`.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {boolean} Returns `false`.
- * @example
- *
- * _.times(2, _.stubFalse);
- * // => [false, false]
- */
- function stubFalse() {
- return false;
- }
- module.exports = isEqual;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d"), __webpack_require__("f586")(module)))
- /***/ }),
- /***/ "6375":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _lang = __webpack_require__("4e21");
- var AddressMatchParameter = function AddressMatchParameter(options) {
- (0, _classCallCheck2.default)(this, AddressMatchParameter);
- this.url = options.url;
- this.name = options.name || (0, _lang.geti18n)().t('commontypes.addressMatch');
- this.proxy = options.proxy;
- };
- exports.default = AddressMatchParameter;
- /***/ }),
- /***/ "63f3":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.ArrayExt = exports.FunctionExt = exports.NumberExt = exports.StringExt = void 0;
- /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
- * This program are made available under the terms of the Apache License, Version 2.0
- * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */
- var StringExt = {
- startsWith: function startsWith(str, sub) {
- return str.indexOf(sub) === 0;
- },
- contains: function contains(str, sub) {
- return str.indexOf(sub) !== -1;
- },
- trim: function trim(str) {
- return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
- },
- camelize: function camelize(str) {
- var oStringList = str.split('-');
- var camelizedString = oStringList[0];
- for (var i = 1, len = oStringList.length; i < len; i++) {
- var s = oStringList[i];
- camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
- }
- return camelizedString;
- },
- format: function format(template, context, args) {
- if (!context) {
- context = window;
- } // Example matching:
- // str = ${foo.bar}
- // match = foo.bar
- var replacer = function replacer(str, match) {
- var replacement; // Loop through all subs. Example: ${a.b.c}
- // 0 -> replacement = context[a];
- // 1 -> replacement = context[a][b];
- // 2 -> replacement = context[a][b][c];
- var subs = match.split(/\.+/);
- for (var i = 0; i < subs.length; i++) {
- if (i === 0) {
- replacement = context;
- }
- replacement = replacement[subs[i]];
- }
- if (typeof replacement === 'function') {
- replacement = args ? replacement.apply(null, args) : replacement();
- } // If replacement is undefined, return the string 'undefined'.
- // This is a workaround for a bugs in browsers not properly
- // dealing with non-participating groups in regular expressions:
- // http://blog.stevenlevithan.com/archives/npcg-javascript
- if (typeof replacement === 'undefined') {
- return 'undefined';
- } else {
- return replacement;
- }
- };
- return template.replace(String.tokenRegEx, replacer);
- },
- /**
- * @member {RegExp} [String.tokenRegEx]
- * @description 寻找带 token 的字符串,默认为 tokenRegEx=/\$\{([\w.]+?)\}/g。
- * @example
- * Examples: ${a}, ${a.b.c}, ${a-b}, ${5}
- */
- tokenRegEx: /\$\{([\w.]+?)\}/g,
- /**
- * @member {RegExp} [String.numberRegEx]
- * @description 判断一个字符串是否只包含一个数值,默认为 numberRegEx=/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/。
- */
- numberRegEx: /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,
- /**
- * @function String.isNumeric
- * @description 判断一个字符串是否只包含一个数值。
- * @example
- * (code)
- * String.isNumeric("6.02e23") // true
- * String.isNumeric("12 dozen") // false
- * String.isNumeric("4") // true
- * String.isNumeric(" 4 ") // false
- * (end)
- * @returns {boolean} 字符串包含唯一的数值,返回 true;否则返回 false。
- */
- isNumeric: function isNumeric(value) {
- return String.numberRegEx.test(value);
- },
- /**
- * @function String.numericIf
- * @description 把一个看似数值型的字符串转化为一个数值。
- * @returns {(number|string)} 如果能转换为数值则返回数值,否则返回字符串本身。
- */
- numericIf: function numericIf(value) {
- return String.isNumeric(value) ? parseFloat(value) : value;
- }
- };
- /**
- * @name Number
- * @namespace
- * @category BaseTypes Util
- * @description 数值操作的一系列常用扩展函数。
- */
- exports.StringExt = StringExt;
- var NumberExt = {
- decimalSeparator: '.',
- thousandsSeparator: ',',
- limitSigDigs: function limitSigDigs(num, sig) {
- var fig = 0;
- if (sig > 0) {
- fig = parseFloat(num.toPrecision(sig));
- }
- return fig;
- },
- format: function format(num, dec, tsep, dsep) {
- dec = typeof dec !== 'undefined' ? dec : 0;
- tsep = typeof tsep !== 'undefined' ? tsep : Number.thousandsSeparator;
- dsep = typeof dsep !== 'undefined' ? dsep : Number.decimalSeparator;
- if (dec != null) {
- num = parseFloat(num.toFixed(dec));
- }
- var parts = num.toString().split('.');
- if (parts.length === 1 && dec == null) {
- // integer where we do not want to touch the decimals
- dec = 0;
- }
- var integer = parts[0];
- if (tsep) {
- var thousands = /(-?[0-9]+)([0-9]{3})/;
- while (thousands.test(integer)) {
- integer = integer.replace(thousands, '$1' + tsep + '$2');
- }
- }
- var str;
- if (dec === 0) {
- str = integer;
- } else {
- var rem = parts.length > 1 ? parts[1] : '0';
- if (dec != null) {
- rem = rem + new Array(dec - rem.length + 1).join('0');
- }
- str = integer + dsep + rem;
- }
- return str;
- }
- }; // if (!NumberExt.prototype.limitSigDigs) {
- // /**
- // * APIMethod: Number.limitSigDigs
- // * 限制浮点数的有效数字位数.
- // * @param {integer} sig -有效位数。
- // * @returns {integer} 将数字四舍五入到指定数量的有效位数。
- // * 如果传入值 为 null、0、或者是负数, 返回值 0。
- // */
- // NumberExt.prototype.limitSigDigs = function (sig) {
- // return NumberExt.limitSigDigs(this, sig);
- // };
- // }
- exports.NumberExt = NumberExt;
- var FunctionExt = {
- bind: function bind(func, object) {
- // create a reference to all arguments past the second one
- var args = Array.prototype.slice.apply(arguments, [2]);
- return function () {
- // Push on any additional arguments from the actual function call.
- // These will come after those sent to the bind call.
- var newArgs = args.concat(Array.prototype.slice.apply(arguments, [0]));
- return func.apply(object, newArgs);
- };
- },
- bindAsEventListener: function bindAsEventListener(func, object) {
- return function (event) {
- return func.call(object, event || window.event);
- };
- },
- False: function False() {
- return false;
- },
- True: function True() {
- return true;
- },
- Void: function Void() {}
- };
- exports.FunctionExt = FunctionExt;
- var ArrayExt = {
- /**
- * @function Array.filter
- * @description 过滤数组,提供了 ECMA-262 标准中 Array.prototype.filter 函数的扩展。详见:{@link http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter}
- * @param {Array} array - 要过滤的数组。
- * @param {function} callback - 数组中的每一个元素调用该函数。</br>
- * 如果函数的返回值为 true,该元素将包含在返回的数组中。该函数有三个参数: 数组中的元素,元素的索引,数组自身。</br>
- * 如果设置了可选参数 caller,在调用 callback 时,使用可选参数 caller 设置为 callback 的参数。</br>
- * @param {Object} [caller] - 在调用 callback 时,使用参数 caller 设置为 callback 的参数。
- * @returns {Array} callback 函数返回 true 时的元素将作为返回数组中的元素。
- */
- filter: function filter(array, callback, caller) {
- var selected = [];
- if (Array.prototype.filter) {
- selected = array.filter(callback, caller);
- } else {
- var len = array.length;
- if (typeof callback !== 'function') {
- throw new TypeError();
- }
- for (var i = 0; i < len; i++) {
- if (i in array) {
- var val = array[i];
- if (callback.call(caller, val, i, array)) {
- selected.push(val);
- }
- }
- }
- }
- return selected;
- }
- };
- exports.ArrayExt = ArrayExt;
- /***/ }),
- /***/ "65db":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b757");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "66f6":
- /***/ (function(module, exports) {
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
- module.exports = _createClass;
- /***/ }),
- /***/ "6704":
- /***/ (function(module, exports, __webpack_require__) {
- var Symbol = __webpack_require__("80e6"),
- getRawTag = __webpack_require__("8330"),
- objectToString = __webpack_require__("089f");
- /** `Object#toString` result references. */
- var nullTag = '[object Null]',
- undefinedTag = '[object Undefined]';
- /** Built-in value references. */
- var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
- /**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
- return (symToStringTag && symToStringTag in Object(value))
- ? getRawTag(value)
- : objectToString(value);
- }
- module.exports = baseGetTag;
- /***/ }),
- /***/ "698d":
- /***/ (function(module, exports) {
- var g;
- // This works in non-strict mode
- g = (function() {
- return this;
- })();
- try {
- // This works if eval is allowed (see CSP)
- g = g || new Function("return this")();
- } catch (e) {
- // This works if the window reference is available
- if (typeof window === "object") g = window;
- }
- // g can still be undefined, but nothing to do about it...
- // We return undefined, instead of nothing here, so it's
- // easier to handle this case. if(!global) { ...}
- module.exports = g;
- /***/ }),
- /***/ "6b51":
- /***/ (function(module, exports, __webpack_require__) {
- var setPrototypeOf = __webpack_require__("e1d3");
- function _inherits(subClass, superClass) {
- if (typeof superClass !== "function" && superClass !== null) {
- throw new TypeError("Super expression must either be null or a function");
- }
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- writable: true,
- configurable: true
- }
- });
- if (superClass) setPrototypeOf(subClass, superClass);
- }
- module.exports = _inherits;
- /***/ }),
- /***/ "6b73":
- /***/ (function(module, exports) {
- /*
- Based on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>
- http://www.phpied.com/rgb-color-parser-in-javascript/
- */
- module.exports = function(color_string) {
- this.ok = false;
- this.alpha = 1.0;
- // strip any leading #
- if (color_string.charAt(0) == '#') { // remove # if any
- color_string = color_string.substr(1,6);
- }
- color_string = color_string.replace(/ /g,'');
- color_string = color_string.toLowerCase();
- // before getting into regexps, try simple matches
- // and overwrite the input
- var simple_colors = {
- aliceblue: 'f0f8ff',
- antiquewhite: 'faebd7',
- aqua: '00ffff',
- aquamarine: '7fffd4',
- azure: 'f0ffff',
- beige: 'f5f5dc',
- bisque: 'ffe4c4',
- black: '000000',
- blanchedalmond: 'ffebcd',
- blue: '0000ff',
- blueviolet: '8a2be2',
- brown: 'a52a2a',
- burlywood: 'deb887',
- cadetblue: '5f9ea0',
- chartreuse: '7fff00',
- chocolate: 'd2691e',
- coral: 'ff7f50',
- cornflowerblue: '6495ed',
- cornsilk: 'fff8dc',
- crimson: 'dc143c',
- cyan: '00ffff',
- darkblue: '00008b',
- darkcyan: '008b8b',
- darkgoldenrod: 'b8860b',
- darkgray: 'a9a9a9',
- darkgreen: '006400',
- darkkhaki: 'bdb76b',
- darkmagenta: '8b008b',
- darkolivegreen: '556b2f',
- darkorange: 'ff8c00',
- darkorchid: '9932cc',
- darkred: '8b0000',
- darksalmon: 'e9967a',
- darkseagreen: '8fbc8f',
- darkslateblue: '483d8b',
- darkslategray: '2f4f4f',
- darkturquoise: '00ced1',
- darkviolet: '9400d3',
- deeppink: 'ff1493',
- deepskyblue: '00bfff',
- dimgray: '696969',
- dodgerblue: '1e90ff',
- feldspar: 'd19275',
- firebrick: 'b22222',
- floralwhite: 'fffaf0',
- forestgreen: '228b22',
- fuchsia: 'ff00ff',
- gainsboro: 'dcdcdc',
- ghostwhite: 'f8f8ff',
- gold: 'ffd700',
- goldenrod: 'daa520',
- gray: '808080',
- green: '008000',
- greenyellow: 'adff2f',
- honeydew: 'f0fff0',
- hotpink: 'ff69b4',
- indianred : 'cd5c5c',
- indigo : '4b0082',
- ivory: 'fffff0',
- khaki: 'f0e68c',
- lavender: 'e6e6fa',
- lavenderblush: 'fff0f5',
- lawngreen: '7cfc00',
- lemonchiffon: 'fffacd',
- lightblue: 'add8e6',
- lightcoral: 'f08080',
- lightcyan: 'e0ffff',
- lightgoldenrodyellow: 'fafad2',
- lightgrey: 'd3d3d3',
- lightgreen: '90ee90',
- lightpink: 'ffb6c1',
- lightsalmon: 'ffa07a',
- lightseagreen: '20b2aa',
- lightskyblue: '87cefa',
- lightslateblue: '8470ff',
- lightslategray: '778899',
- lightsteelblue: 'b0c4de',
- lightyellow: 'ffffe0',
- lime: '00ff00',
- limegreen: '32cd32',
- linen: 'faf0e6',
- magenta: 'ff00ff',
- maroon: '800000',
- mediumaquamarine: '66cdaa',
- mediumblue: '0000cd',
- mediumorchid: 'ba55d3',
- mediumpurple: '9370d8',
- mediumseagreen: '3cb371',
- mediumslateblue: '7b68ee',
- mediumspringgreen: '00fa9a',
- mediumturquoise: '48d1cc',
- mediumvioletred: 'c71585',
- midnightblue: '191970',
- mintcream: 'f5fffa',
- mistyrose: 'ffe4e1',
- moccasin: 'ffe4b5',
- navajowhite: 'ffdead',
- navy: '000080',
- oldlace: 'fdf5e6',
- olive: '808000',
- olivedrab: '6b8e23',
- orange: 'ffa500',
- orangered: 'ff4500',
- orchid: 'da70d6',
- palegoldenrod: 'eee8aa',
- palegreen: '98fb98',
- paleturquoise: 'afeeee',
- palevioletred: 'd87093',
- papayawhip: 'ffefd5',
- peachpuff: 'ffdab9',
- peru: 'cd853f',
- pink: 'ffc0cb',
- plum: 'dda0dd',
- powderblue: 'b0e0e6',
- purple: '800080',
- rebeccapurple: '663399',
- red: 'ff0000',
- rosybrown: 'bc8f8f',
- royalblue: '4169e1',
- saddlebrown: '8b4513',
- salmon: 'fa8072',
- sandybrown: 'f4a460',
- seagreen: '2e8b57',
- seashell: 'fff5ee',
- sienna: 'a0522d',
- silver: 'c0c0c0',
- skyblue: '87ceeb',
- slateblue: '6a5acd',
- slategray: '708090',
- snow: 'fffafa',
- springgreen: '00ff7f',
- steelblue: '4682b4',
- tan: 'd2b48c',
- teal: '008080',
- thistle: 'd8bfd8',
- tomato: 'ff6347',
- turquoise: '40e0d0',
- violet: 'ee82ee',
- violetred: 'd02090',
- wheat: 'f5deb3',
- white: 'ffffff',
- whitesmoke: 'f5f5f5',
- yellow: 'ffff00',
- yellowgreen: '9acd32'
- };
- color_string = simple_colors[color_string] || color_string;
- // emd of simple type-in colors
- // array of color definition objects
- var color_defs = [
- {
- re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,
- example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],
- process: function (bits){
- return [
- parseInt(bits[1]),
- parseInt(bits[2]),
- parseInt(bits[3]),
- parseFloat(bits[4])
- ];
- }
- },
- {
- re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
- example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
- process: function (bits){
- return [
- parseInt(bits[1]),
- parseInt(bits[2]),
- parseInt(bits[3])
- ];
- }
- },
- {
- re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
- example: ['#00ff00', '336699'],
- process: function (bits){
- return [
- parseInt(bits[1], 16),
- parseInt(bits[2], 16),
- parseInt(bits[3], 16)
- ];
- }
- },
- {
- re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- example: ['#fb0', 'f0f'],
- process: function (bits){
- return [
- parseInt(bits[1] + bits[1], 16),
- parseInt(bits[2] + bits[2], 16),
- parseInt(bits[3] + bits[3], 16)
- ];
- }
- }
- ];
- // search through the definitions to find a match
- for (var i = 0; i < color_defs.length; i++) {
- var re = color_defs[i].re;
- var processor = color_defs[i].process;
- var bits = re.exec(color_string);
- if (bits) {
- var channels = processor(bits);
- this.r = channels[0];
- this.g = channels[1];
- this.b = channels[2];
- if (channels.length > 3) {
- this.alpha = channels[3];
- }
- this.ok = true;
- }
- }
- // validate/cleanup values
- this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
- this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
- this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
- this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);
- // some getters
- this.toRGB = function () {
- return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
- }
- this.toRGBA = function () {
- return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';
- }
- this.toHex = function () {
- var r = this.r.toString(16);
- var g = this.g.toString(16);
- var b = this.b.toString(16);
- if (r.length == 1) r = '0' + r;
- if (g.length == 1) g = '0' + g;
- if (b.length == 1) b = '0' + b;
- return '#' + r + g + b;
- }
- // help
- this.getHelpXML = function () {
- var examples = new Array();
- // add regexps
- for (var i = 0; i < color_defs.length; i++) {
- var example = color_defs[i].example;
- for (var j = 0; j < example.length; j++) {
- examples[examples.length] = example[j];
- }
- }
- // add type-in colors
- for (var sc in simple_colors) {
- examples[examples.length] = sc;
- }
- var xml = document.createElement('ul');
- xml.setAttribute('id', 'rgbcolor-examples');
- for (var i = 0; i < examples.length; i++) {
- try {
- var list_item = document.createElement('li');
- var list_color = new RGBColor(examples[i]);
- var example_div = document.createElement('div');
- example_div.style.cssText =
- 'margin: 3px; '
- + 'border: 1px solid black; '
- + 'background:' + list_color.toHex() + '; '
- + 'color:' + list_color.toHex()
- ;
- example_div.appendChild(document.createTextNode('test'));
- var list_item_value = document.createTextNode(
- ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
- );
- list_item.appendChild(example_div);
- list_item.appendChild(list_item_value);
- xml.appendChild(list_item);
- } catch(e){}
- }
- return xml;
- }
- }
- /***/ }),
- /***/ "6e0d":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = getFeatures;
- var _iServerRestService = _interopRequireDefault(__webpack_require__("e340"));
- var _iPortalDataService = _interopRequireDefault(__webpack_require__("9d60"));
- var _RestService = _interopRequireDefault(__webpack_require__("5bf3"));
- function getFeatures(dataset) {
- var superMapService;
- var params = [];
- var promise = new Promise(function (resolve, reject) {
- var url = dataset.url,
- type = dataset.type,
- geoJSON = dataset.geoJSON,
- maxFeatures = dataset.maxFeatures,
- attributeFilter = dataset.attributeFilter,
- dataName = dataset.dataName,
- layerName = dataset.layerName,
- withCredentials = dataset.withCredentials,
- preferContent = dataset.preferContent,
- epsgCode = dataset.epsgCode;
- if (dataset && (url || geoJSON) && type) {
- var queryInfo = {
- maxFeatures: maxFeatures,
- attributeFilter: attributeFilter
- };
- if (type === 'iServer') {
- var datasetInfo;
- var options = {};
- if (dataset.proxy) {
- options.proxy = dataset.proxy;
- }
- epsgCode && (options.epsgCode = epsgCode);
- superMapService = new _iServerRestService.default(dataset.url, options);
- if (dataName) {
- var arr = dataName[0].split(':');
- datasetInfo = {
- datasetName: arr[1],
- dataSourceName: arr[0],
- dataUrl: url
- };
- } else {
- datasetInfo = {
- mapName: layerName,
- dataUrl: url
- };
- }
- params = [datasetInfo, queryInfo];
- } else if (type === 'iPortal') {
- queryInfo.withCredentials = withCredentials;
- superMapService = new _iPortalDataService.default(url, withCredentials, {
- epsgCode: epsgCode
- });
- params = [queryInfo, !!preferContent];
- } else if (type === 'rest') {
- superMapService = new _RestService.default({
- proxy: dataset.proxy
- });
- params = [url, queryInfo];
- } else if (type === 'geoJSON' && geoJSON) {
- superMapService = new _RestService.default();
- params = [geoJSON, queryInfo];
- }
- }
- if (superMapService) {
- superMapService.on({
- getdatasucceeded: function getdatasucceeded(data) {
- resolve(data);
- },
- getdatafailed: function getdatafailed(e) {
- reject(e);
- }
- });
- superMapService.getData(params[0], params[1]);
- }
- });
- return promise;
- }
- /***/ }),
- /***/ "6e63":
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global, module) {/**
- * Lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
- var HOT_COUNT = 800,
- HOT_SPAN = 16;
- /** Used as references for various `Number` constants. */
- var MAX_SAFE_INTEGER = 9007199254740991;
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- asyncTag = '[object AsyncFunction]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- nullTag = '[object Null]',
- objectTag = '[object Object]',
- proxyTag = '[object Proxy]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- undefinedTag = '[object Undefined]',
- weakMapTag = '[object WeakMap]';
- var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
- /**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
- /** Used to detect host constructors (Safari). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
- typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
- typedArrayTags[weakMapTag] = false;
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
- /** Detect free variable `exports`. */
- var freeExports = true && exports && !exports.nodeType && exports;
- /** Detect free variable `module`. */
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports;
- /** Detect free variable `process` from Node.js. */
- var freeProcess = moduleExports && freeGlobal.process;
- /** Used to access faster Node.js helpers. */
- var nodeUtil = (function() {
- try {
- // Use `util.types` for Node.js 10+.
- var types = freeModule && freeModule.require && freeModule.require('util').types;
- if (types) {
- return types;
- }
- // Legacy `process.binding('util')` for Node.js < 10.
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
- } catch (e) {}
- }());
- /* Node.js helper references. */
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
- /**
- * A faster alternative to `Function#apply`, this function invokes `func`
- * with the `this` binding of `thisArg` and the arguments of `args`.
- *
- * @private
- * @param {Function} func The function to invoke.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} args The arguments to invoke `func` with.
- * @returns {*} Returns the result of `func`.
- */
- function apply(func, thisArg, args) {
- switch (args.length) {
- case 0: return func.call(thisArg);
- case 1: return func.call(thisArg, args[0]);
- case 2: return func.call(thisArg, args[0], args[1]);
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
- }
- return func.apply(thisArg, args);
- }
- /**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
- function baseTimes(n, iteratee) {
- var index = -1,
- result = Array(n);
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
- }
- /**
- * The base implementation of `_.unary` without support for storing metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
- */
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
- }
- /**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function getValue(object, key) {
- return object == null ? undefined : object[key];
- }
- /**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
- }
- /** Used for built-in method references. */
- var arrayProto = Array.prototype,
- funcProto = Function.prototype,
- objectProto = Object.prototype;
- /** Used to detect overreaching core-js shims. */
- var coreJsData = root['__core-js_shared__'];
- /** Used to resolve the decompiled source of functions. */
- var funcToString = funcProto.toString;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
- /** Used to detect methods masquerading as native. */
- var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
- return uid ? ('Symbol(src)_1.' + uid) : '';
- }());
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = objectProto.toString;
- /** Used to infer the `Object` constructor. */
- var objectCtorString = funcToString.call(Object);
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
- /** Built-in value references. */
- var Buffer = moduleExports ? root.Buffer : undefined,
- Symbol = root.Symbol,
- Uint8Array = root.Uint8Array,
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
- getPrototype = overArg(Object.getPrototypeOf, Object),
- objectCreate = Object.create,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- splice = arrayProto.splice,
- symToStringTag = Symbol ? Symbol.toStringTag : undefined;
- var defineProperty = (function() {
- try {
- var func = getNative(Object, 'defineProperty');
- func({}, '', {});
- return func;
- } catch (e) {}
- }());
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
- nativeMax = Math.max,
- nativeNow = Date.now;
- /* Built-in method references that are verified to be native. */
- var Map = getNative(root, 'Map'),
- nativeCreate = getNative(Object, 'create');
- /**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} proto The object to inherit from.
- * @returns {Object} Returns the new object.
- */
- var baseCreate = (function() {
- function object() {}
- return function(proto) {
- if (!isObject(proto)) {
- return {};
- }
- if (objectCreate) {
- return objectCreate(proto);
- }
- object.prototype = proto;
- var result = new object;
- object.prototype = undefined;
- return result;
- };
- }());
- /**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Hash(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the hash.
- *
- * @private
- * @name clear
- * @memberOf Hash
- */
- function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
- this.size = 0;
- }
- /**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @name delete
- * @memberOf Hash
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function hashDelete(key) {
- var result = this.has(key) && delete this.__data__[key];
- this.size -= result ? 1 : 0;
- return result;
- }
- /**
- * Gets the hash value for `key`.
- *
- * @private
- * @name get
- * @memberOf Hash
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate) {
- var result = data[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
- }
- /**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Hash
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function hashHas(key) {
- var data = this.__data__;
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
- }
- /**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Hash
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the hash instance.
- */
- function hashSet(key, value) {
- var data = this.__data__;
- this.size += this.has(key) ? 0 : 1;
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
- return this;
- }
- // Add methods to `Hash`.
- Hash.prototype.clear = hashClear;
- Hash.prototype['delete'] = hashDelete;
- Hash.prototype.get = hashGet;
- Hash.prototype.has = hashHas;
- Hash.prototype.set = hashSet;
- /**
- * Creates an list cache object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function ListCache(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the list cache.
- *
- * @private
- * @name clear
- * @memberOf ListCache
- */
- function listCacheClear() {
- this.__data__ = [];
- this.size = 0;
- }
- /**
- * Removes `key` and its value from the list cache.
- *
- * @private
- * @name delete
- * @memberOf ListCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function listCacheDelete(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- if (index < 0) {
- return false;
- }
- var lastIndex = data.length - 1;
- if (index == lastIndex) {
- data.pop();
- } else {
- splice.call(data, index, 1);
- }
- --this.size;
- return true;
- }
- /**
- * Gets the list cache value for `key`.
- *
- * @private
- * @name get
- * @memberOf ListCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function listCacheGet(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- return index < 0 ? undefined : data[index][1];
- }
- /**
- * Checks if a list cache value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf ListCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function listCacheHas(key) {
- return assocIndexOf(this.__data__, key) > -1;
- }
- /**
- * Sets the list cache `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf ListCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the list cache instance.
- */
- function listCacheSet(key, value) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- if (index < 0) {
- ++this.size;
- data.push([key, value]);
- } else {
- data[index][1] = value;
- }
- return this;
- }
- // Add methods to `ListCache`.
- ListCache.prototype.clear = listCacheClear;
- ListCache.prototype['delete'] = listCacheDelete;
- ListCache.prototype.get = listCacheGet;
- ListCache.prototype.has = listCacheHas;
- ListCache.prototype.set = listCacheSet;
- /**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function MapCache(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
- function mapCacheClear() {
- this.size = 0;
- this.__data__ = {
- 'hash': new Hash,
- 'map': new (Map || ListCache),
- 'string': new Hash
- };
- }
- /**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function mapCacheDelete(key) {
- var result = getMapData(this, key)['delete'](key);
- this.size -= result ? 1 : 0;
- return result;
- }
- /**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function mapCacheGet(key) {
- return getMapData(this, key).get(key);
- }
- /**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapCacheHas(key) {
- return getMapData(this, key).has(key);
- }
- /**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
- function mapCacheSet(key, value) {
- var data = getMapData(this, key),
- size = data.size;
- data.set(key, value);
- this.size += data.size == size ? 0 : 1;
- return this;
- }
- // Add methods to `MapCache`.
- MapCache.prototype.clear = mapCacheClear;
- MapCache.prototype['delete'] = mapCacheDelete;
- MapCache.prototype.get = mapCacheGet;
- MapCache.prototype.has = mapCacheHas;
- MapCache.prototype.set = mapCacheSet;
- /**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Stack(entries) {
- var data = this.__data__ = new ListCache(entries);
- this.size = data.size;
- }
- /**
- * Removes all key-value entries from the stack.
- *
- * @private
- * @name clear
- * @memberOf Stack
- */
- function stackClear() {
- this.__data__ = new ListCache;
- this.size = 0;
- }
- /**
- * Removes `key` and its value from the stack.
- *
- * @private
- * @name delete
- * @memberOf Stack
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function stackDelete(key) {
- var data = this.__data__,
- result = data['delete'](key);
- this.size = data.size;
- return result;
- }
- /**
- * Gets the stack value for `key`.
- *
- * @private
- * @name get
- * @memberOf Stack
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function stackGet(key) {
- return this.__data__.get(key);
- }
- /**
- * Checks if a stack value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Stack
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function stackHas(key) {
- return this.__data__.has(key);
- }
- /**
- * Sets the stack `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Stack
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the stack cache instance.
- */
- function stackSet(key, value) {
- var data = this.__data__;
- if (data instanceof ListCache) {
- var pairs = data.__data__;
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
- pairs.push([key, value]);
- this.size = ++data.size;
- return this;
- }
- data = this.__data__ = new MapCache(pairs);
- }
- data.set(key, value);
- this.size = data.size;
- return this;
- }
- // Add methods to `Stack`.
- Stack.prototype.clear = stackClear;
- Stack.prototype['delete'] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
- /**
- * Creates an array of the enumerable property names of the array-like `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @param {boolean} inherited Specify returning inherited property names.
- * @returns {Array} Returns the array of property names.
- */
- function arrayLikeKeys(value, inherited) {
- var isArr = isArray(value),
- isArg = !isArr && isArguments(value),
- isBuff = !isArr && !isArg && isBuffer(value),
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
- skipIndexes = isArr || isArg || isBuff || isType,
- result = skipIndexes ? baseTimes(value.length, String) : [],
- length = result.length;
- for (var key in value) {
- if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (
- // Safari 9 has enumerable `arguments.length` in strict mode.
- key == 'length' ||
- // Node.js 0.10 has enumerable non-index properties on buffers.
- (isBuff && (key == 'offset' || key == 'parent')) ||
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
- // Skip index properties.
- isIndex(key, length)
- ))) {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * This function is like `assignValue` except that it doesn't assign
- * `undefined` values.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignMergeValue(object, key, value) {
- if ((value !== undefined && !eq(object[key], value)) ||
- (value === undefined && !(key in object))) {
- baseAssignValue(object, key, value);
- }
- }
- /**
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
- (value === undefined && !(key in object))) {
- baseAssignValue(object, key, value);
- }
- }
- /**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
- }
- /**
- * The base implementation of `assignValue` and `assignMergeValue` without
- * value checks.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function baseAssignValue(object, key, value) {
- if (key == '__proto__' && defineProperty) {
- defineProperty(object, key, {
- 'configurable': true,
- 'enumerable': true,
- 'value': value,
- 'writable': true
- });
- } else {
- object[key] = value;
- }
- }
- /**
- * The base implementation of `baseForOwn` which iterates over `object`
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseFor = createBaseFor();
- /**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
- return (symToStringTag && symToStringTag in Object(value))
- ? getRawTag(value)
- : objectToString(value);
- }
- /**
- * The base implementation of `_.isArguments`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- */
- function baseIsArguments(value) {
- return isObjectLike(value) && baseGetTag(value) == argsTag;
- }
- /**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- */
- function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
- }
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
- }
- /**
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- */
- function baseIsTypedArray(value) {
- return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
- }
- /**
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeysIn(object) {
- if (!isObject(object)) {
- return nativeKeysIn(object);
- }
- var isProto = isPrototype(object),
- result = [];
- for (var key in object) {
- if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * The base implementation of `_.merge` without support for multiple sources.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
- function baseMerge(object, source, srcIndex, customizer, stack) {
- if (object === source) {
- return;
- }
- baseFor(source, function(srcValue, key) {
- stack || (stack = new Stack);
- if (isObject(srcValue)) {
- baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
- }
- else {
- var newValue = customizer
- ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
- : undefined;
- if (newValue === undefined) {
- newValue = srcValue;
- }
- assignMergeValue(object, key, newValue);
- }
- }, keysIn);
- }
- /**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
- function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
- var objValue = safeGet(object, key),
- srcValue = safeGet(source, key),
- stacked = stack.get(srcValue);
- if (stacked) {
- assignMergeValue(object, key, stacked);
- return;
- }
- var newValue = customizer
- ? customizer(objValue, srcValue, (key + ''), object, source, stack)
- : undefined;
- var isCommon = newValue === undefined;
- if (isCommon) {
- var isArr = isArray(srcValue),
- isBuff = !isArr && isBuffer(srcValue),
- isTyped = !isArr && !isBuff && isTypedArray(srcValue);
- newValue = srcValue;
- if (isArr || isBuff || isTyped) {
- if (isArray(objValue)) {
- newValue = objValue;
- }
- else if (isArrayLikeObject(objValue)) {
- newValue = copyArray(objValue);
- }
- else if (isBuff) {
- isCommon = false;
- newValue = cloneBuffer(srcValue, true);
- }
- else if (isTyped) {
- isCommon = false;
- newValue = cloneTypedArray(srcValue, true);
- }
- else {
- newValue = [];
- }
- }
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- newValue = objValue;
- if (isArguments(objValue)) {
- newValue = toPlainObject(objValue);
- }
- else if (!isObject(objValue) || isFunction(objValue)) {
- newValue = initCloneObject(srcValue);
- }
- }
- else {
- isCommon = false;
- }
- }
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- stack.set(srcValue, newValue);
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
- stack['delete'](srcValue);
- }
- assignMergeValue(object, key, newValue);
- }
- /**
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- */
- function baseRest(func, start) {
- return setToString(overRest(func, start, identity), func + '');
- }
- /**
- * The base implementation of `setToString` without support for hot loop shorting.
- *
- * @private
- * @param {Function} func The function to modify.
- * @param {Function} string The `toString` result.
- * @returns {Function} Returns `func`.
- */
- var baseSetToString = !defineProperty ? identity : function(func, string) {
- return defineProperty(func, 'toString', {
- 'configurable': true,
- 'enumerable': false,
- 'value': constant(string),
- 'writable': true
- });
- };
- /**
- * Creates a clone of `buffer`.
- *
- * @private
- * @param {Buffer} buffer The buffer to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Buffer} Returns the cloned buffer.
- */
- function cloneBuffer(buffer, isDeep) {
- if (isDeep) {
- return buffer.slice();
- }
- var length = buffer.length,
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
- buffer.copy(result);
- return result;
- }
- /**
- * Creates a clone of `arrayBuffer`.
- *
- * @private
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
- function cloneArrayBuffer(arrayBuffer) {
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
- return result;
- }
- /**
- * Creates a clone of `typedArray`.
- *
- * @private
- * @param {Object} typedArray The typed array to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned typed array.
- */
- function cloneTypedArray(typedArray, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
- }
- /**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
- function copyArray(source, array) {
- var index = -1,
- length = source.length;
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
- }
- /**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property identifiers to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @param {Function} [customizer] The function to customize copied values.
- * @returns {Object} Returns `object`.
- */
- function copyObject(source, props, object, customizer) {
- var isNew = !object;
- object || (object = {});
- var index = -1,
- length = props.length;
- while (++index < length) {
- var key = props[index];
- var newValue = customizer
- ? customizer(object[key], source[key], key, object, source)
- : undefined;
- if (newValue === undefined) {
- newValue = source[key];
- }
- if (isNew) {
- baseAssignValue(object, key, newValue);
- } else {
- assignValue(object, key, newValue);
- }
- }
- return object;
- }
- /**
- * Creates a function like `_.assign`.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
- function createAssigner(assigner) {
- return baseRest(function(object, sources) {
- var index = -1,
- length = sources.length,
- customizer = length > 1 ? sources[length - 1] : undefined,
- guard = length > 2 ? sources[2] : undefined;
- customizer = (assigner.length > 3 && typeof customizer == 'function')
- ? (length--, customizer)
- : undefined;
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- object = Object(object);
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, index, customizer);
- }
- }
- return object;
- });
- }
- /**
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1,
- iterable = Object(object),
- props = keysFunc(object),
- length = props.length;
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
- }
- /**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
- function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key)
- ? data[typeof key == 'string' ? 'string' : 'hash']
- : data.map;
- }
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : undefined;
- }
- /**
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the raw `toStringTag`.
- */
- function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag),
- tag = value[symToStringTag];
- try {
- value[symToStringTag] = undefined;
- var unmasked = true;
- } catch (e) {}
- var result = nativeObjectToString.call(value);
- if (unmasked) {
- if (isOwn) {
- value[symToStringTag] = tag;
- } else {
- delete value[symToStringTag];
- }
- }
- return result;
- }
- /**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneObject(object) {
- return (typeof object.constructor == 'function' && !isPrototype(object))
- ? baseCreate(getPrototype(object))
- : {};
- }
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- var type = typeof value;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return !!length &&
- (type == 'number' ||
- (type != 'symbol' && reIsUint.test(value))) &&
- (value > -1 && value % 1 == 0 && value < length);
- }
- /**
- * Checks if the given arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
- * else `false`.
- */
- function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)
- ) {
- return eq(object[index], value);
- }
- return false;
- }
- /**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
- function isKeyable(value) {
- var type = typeof value;
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
- ? (value !== '__proto__')
- : (value === null);
- }
- /**
- * Checks if `func` has its source masked.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
- */
- function isMasked(func) {
- return !!maskSrcKey && (maskSrcKey in func);
- }
- /**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
- function isPrototype(value) {
- var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
- return value === proto;
- }
- /**
- * This function is like
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * except that it includes inherited enumerable properties.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function nativeKeysIn(object) {
- var result = [];
- if (object != null) {
- for (var key in Object(object)) {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * Converts `value` to a string using `Object.prototype.toString`.
- *
- * @private
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- */
- function objectToString(value) {
- return nativeObjectToString.call(value);
- }
- /**
- * A specialized version of `baseRest` which transforms the rest array.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @param {Function} transform The rest array transform.
- * @returns {Function} Returns the new function.
- */
- function overRest(func, start, transform) {
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
- while (++index < length) {
- array[index] = args[start + index];
- }
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = transform(array);
- return apply(func, this, otherArgs);
- };
- }
- /**
- * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function safeGet(object, key) {
- if (key === 'constructor' && typeof object[key] === 'function') {
- return;
- }
- if (key == '__proto__') {
- return;
- }
- return object[key];
- }
- /**
- * Sets the `toString` method of `func` to return `string`.
- *
- * @private
- * @param {Function} func The function to modify.
- * @param {Function} string The `toString` result.
- * @returns {Function} Returns `func`.
- */
- var setToString = shortOut(baseSetToString);
- /**
- * Creates a function that'll short out and invoke `identity` instead
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
- * milliseconds.
- *
- * @private
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new shortable function.
- */
- function shortOut(func) {
- var count = 0,
- lastCalled = 0;
- return function() {
- var stamp = nativeNow(),
- remaining = HOT_SPAN - (stamp - lastCalled);
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return arguments[0];
- }
- } else {
- count = 0;
- }
- return func.apply(undefined, arguments);
- };
- }
- /**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to convert.
- * @returns {string} Returns the source code.
- */
- function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
- }
- return '';
- }
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
- /**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
- return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
- !propertyIsEnumerable.call(value, 'callee');
- };
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
- /**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
- function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
- }
- /**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
- function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
- }
- /**
- * Checks if `value` is a buffer.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
- * @example
- *
- * _.isBuffer(new Buffer(2));
- * // => true
- *
- * _.isBuffer(new Uint8Array(2));
- * // => false
- */
- var isBuffer = nativeIsBuffer || stubFalse;
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- if (!isObject(value)) {
- return false;
- }
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
- var tag = baseGetTag(value);
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
- }
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
- function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return value != null && (type == 'object' || type == 'function');
- }
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return value != null && typeof value == 'object';
- }
- /**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * @static
- * @memberOf _
- * @since 0.8.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
- function isPlainObject(value) {
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
- return false;
- }
- var proto = getPrototype(value);
- if (proto === null) {
- return true;
- }
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
- return typeof Ctor == 'function' && Ctor instanceof Ctor &&
- funcToString.call(Ctor) == objectCtorString;
- }
- /**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
- /**
- * Converts `value` to a plain object flattening inherited enumerable string
- * keyed properties of `value` to own properties of the plain object.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
- *
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
- */
- function toPlainObject(value) {
- return copyObject(value, keysIn(value));
- }
- /**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
- function keysIn(object) {
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
- }
- /**
- * This method is like `_.assign` except that it recursively merges own and
- * inherited enumerable string keyed properties of source objects into the
- * destination object. Source properties that resolve to `undefined` are
- * skipped if a destination value exists. Array and plain object properties
- * are merged recursively. Other objects and value types are overridden by
- * assignment. Source objects are applied from left to right. Subsequent
- * sources overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 0.5.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = {
- * 'a': [{ 'b': 2 }, { 'd': 4 }]
- * };
- *
- * var other = {
- * 'a': [{ 'c': 3 }, { 'e': 5 }]
- * };
- *
- * _.merge(object, other);
- * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
- */
- var merge = createAssigner(function(object, source, srcIndex) {
- baseMerge(object, source, srcIndex);
- });
- /**
- * Creates a function that returns `value`.
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Util
- * @param {*} value The value to return from the new function.
- * @returns {Function} Returns the new constant function.
- * @example
- *
- * var objects = _.times(2, _.constant({ 'a': 1 }));
- *
- * console.log(objects);
- * // => [{ 'a': 1 }, { 'a': 1 }]
- *
- * console.log(objects[0] === objects[1]);
- * // => true
- */
- function constant(value) {
- return function() {
- return value;
- };
- }
- /**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
- *
- * console.log(_.identity(object) === object);
- * // => true
- */
- function identity(value) {
- return value;
- }
- /**
- * This method returns `false`.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {boolean} Returns `false`.
- * @example
- *
- * _.times(2, _.stubFalse);
- * // => [false, false]
- */
- function stubFalse() {
- return false;
- }
- module.exports = merge;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d"), __webpack_require__("f586")(module)))
- /***/ }),
- /***/ "6ed2":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f3da");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "6f27":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _leaflet = _interopRequireDefault(__webpack_require__("73e4"));
- // @property lastId: Number
- // Last unique ID used by [`stamp()`](#util-stamp)
- var lastId = 0; // @function stamp(obj: Object): Number
- // Returns the unique ID of an object, assigning it one if it doesn't have it.
- function stamp(obj) {
- /*eslint-disable */
- obj._leaflet_id = obj._leaflet_id || ++lastId;
- return obj._leaflet_id;
- /* eslint-enable */
- }
- _leaflet.default.Map.prototype.addLayer = function (layer, name) {
- if (!layer._layerAdd) {
- throw new Error('The provided object is not a Layer.');
- }
- var id = stamp(layer); // 如果layer已存在,返回this
- if (this._layers[id] || this._layers[name]) {
- return this;
- } // 如果用户没有传入name,就生成一个name
- if (!name) {
- name = 'sm-custom' + id;
- } // 如果该name已存在,就生成新的name
- if (this._layers[name]) {
- this.fire('addLayerFailed', 'layer name重复,请输入唯一的name');
- return this;
- } // 将layer和name添加到layersOnMap
- layer.name = name; // 不要将featureLayer加入layersOnMap
- // let _layersId = {};
- // for (let key in this._layers) {
- // if (this._layers[key]._layers) {
- // _layersId[key] = [];
- // for (let key2 in this._layers[key]._layers) {
- // _layersId[key].push(key2);
- // }
- // }
- // }
- // let layersOnMapFlag = true;
- // for (let key in _layersId) {
- // if (_layersId[key].indexOf(id + '') > -1) {
- // layersOnMapFlag = false;
- // }
- // }
- if (!this.layersOnMap) {
- this.layersOnMap = [];
- }
- this.layersOnMap.push({
- name: name,
- layer: layer
- }); // if (layersOnMapFlag) {
- // this.layersOnMap.push({ name, layer });
- // }
- this._layers[id] = layer;
- layer._mapToAdd = this;
- if (layer.beforeAdd) {
- layer.beforeAdd(this);
- }
- this.whenReady(layer._layerAdd, layer);
- return this;
- };
- _leaflet.default.Map.prototype.removeLayer = function (layer, name) {
- // 重新构造layersOnMap
- this.layersOnMap = this.layersOnMap.filter(function (l) {
- return l.name !== (layer.name || name);
- }); // 如果是传入图层,就用图层id; 如果传入name,通过name去获取图层id
- var id = stamp(layer) || this._layers[name].id;
- if (!this._layers[id]) {
- return this;
- }
- if (this._loaded) {
- layer.onRemove(this);
- }
- if (layer.getAttribution && this.attributionControl) {
- this.attributionControl.removeAttribution(layer.getAttribution());
- }
- delete this._layers[id];
- if (this._loaded) {
- this.fire('layerremove', {
- layer: layer,
- name: name
- });
- layer.fire('remove');
- }
- layer._map = layer._mapToAdd = null;
- return this;
- };
- _leaflet.default.Map.include({
- getLayersOnMap: function getLayersOnMap() {
- return this.layersOnMap;
- },
- getLayerById: function getLayerById(id) {
- return this._layers[id];
- },
- getLayerByName: function getLayerByName(name) {
- for (var key in this._layers) {
- if (name === this._layers[key].name) {
- return this._layers[key];
- }
- }
- },
- getAllLayers: function getAllLayers() {
- return this._layers;
- }
- });
- delete _leaflet.default.Icon.Default.prototype._getIconUrl;
- _leaflet.default.Icon.Default.mergeOptions({
- iconRetinaUrl: __webpack_require__("2411"),
- iconUrl: __webpack_require__("fd74"),
- shadowUrl: __webpack_require__("5df1")
- });
- window.L = _leaflet.default;
- var _default = _leaflet.default;
- exports.default = _default;
- /***/ }),
- /***/ "717b":
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- /***/ }),
- /***/ "7319":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- // CONCATENATED MODULE: ./node_modules/proj4/lib/global.js
- /* harmony default export */ var global = (function(defs) {
- defs('EPSG:4326', "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");
- defs('EPSG:4269', "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees");
- defs('EPSG:3857', "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");
- defs.WGS84 = defs['EPSG:4326'];
- defs['EPSG:3785'] = defs['EPSG:3857']; // maintain backward compat, official code is 3857
- defs.GOOGLE = defs['EPSG:3857'];
- defs['EPSG:900913'] = defs['EPSG:3857'];
- defs['EPSG:102113'] = defs['EPSG:3857'];
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/constants/values.js
- var PJD_3PARAM = 1;
- var PJD_7PARAM = 2;
- var PJD_WGS84 = 4; // WGS84 or equivalent
- var PJD_NODATUM = 5; // WGS84 or equivalent
- var SEC_TO_RAD = 4.84813681109535993589914102357e-6;
- var HALF_PI = Math.PI/2;
- // ellipoid pj_set_ell.c
- var SIXTH = 0.1666666666666666667;
- /* 1/6 */
- var RA4 = 0.04722222222222222222;
- /* 17/360 */
- var RA6 = 0.02215608465608465608;
- var EPSLN = 1.0e-10;
- // you'd think you could use Number.EPSILON above but that makes
- // Mollweide get into an infinate loop.
- var D2R = 0.01745329251994329577;
- var R2D = 57.29577951308232088;
- var FORTPI = Math.PI/4;
- var TWO_PI = Math.PI * 2;
- // SPI is slightly greater than Math.PI, so values that exceed the -180..180
- // degree range by a tiny amount don't get wrapped. This prevents points that
- // have drifted from their original location along the 180th meridian (due to
- // floating point error) from changing their sign.
- var SPI = 3.14159265359;
- // CONCATENATED MODULE: ./node_modules/proj4/lib/constants/PrimeMeridian.js
- var PrimeMeridian_exports = {};
- PrimeMeridian_exports.greenwich = 0.0; //"0dE",
- PrimeMeridian_exports.lisbon = -9.131906111111; //"9d07'54.862\"W",
- PrimeMeridian_exports.paris = 2.337229166667; //"2d20'14.025\"E",
- PrimeMeridian_exports.bogota = -74.080916666667; //"74d04'51.3\"W",
- PrimeMeridian_exports.madrid = -3.687938888889; //"3d41'16.58\"W",
- PrimeMeridian_exports.rome = 12.452333333333; //"12d27'8.4\"E",
- PrimeMeridian_exports.bern = 7.439583333333; //"7d26'22.5\"E",
- PrimeMeridian_exports.jakarta = 106.807719444444; //"106d48'27.79\"E",
- PrimeMeridian_exports.ferro = -17.666666666667; //"17d40'W",
- PrimeMeridian_exports.brussels = 4.367975; //"4d22'4.71\"E",
- PrimeMeridian_exports.stockholm = 18.058277777778; //"18d3'29.8\"E",
- PrimeMeridian_exports.athens = 23.7163375; //"23d42'58.815\"E",
- PrimeMeridian_exports.oslo = 10.722916666667; //"10d43'22.5\"E"
- // CONCATENATED MODULE: ./node_modules/proj4/lib/constants/units.js
- /* harmony default export */ var units = ({
- ft: {to_meter: 0.3048},
- 'us-ft': {to_meter: 1200 / 3937}
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/match.js
- var ignoredChar = /[\s_\-\/\(\)]/g;
- function match(obj, key) {
- if (obj[key]) {
- return obj[key];
- }
- var keys = Object.keys(obj);
- var lkey = key.toLowerCase().replace(ignoredChar, '');
- var i = -1;
- var testkey, processedKey;
- while (++i < keys.length) {
- testkey = keys[i];
- processedKey = testkey.toLowerCase().replace(ignoredChar, '');
- if (processedKey === lkey) {
- return obj[testkey];
- }
- }
- }
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projString.js
- /* harmony default export */ var projString = (function(defData) {
- var self = {};
- var paramObj = defData.split('+').map(function(v) {
- return v.trim();
- }).filter(function(a) {
- return a;
- }).reduce(function(p, a) {
- var split = a.split('=');
- split.push(true);
- p[split[0].toLowerCase()] = split[1];
- return p;
- }, {});
- var paramName, paramVal, paramOutname;
- var params = {
- proj: 'projName',
- datum: 'datumCode',
- rf: function(v) {
- self.rf = parseFloat(v);
- },
- lat_0: function(v) {
- self.lat0 = v * D2R;
- },
- lat_1: function(v) {
- self.lat1 = v * D2R;
- },
- lat_2: function(v) {
- self.lat2 = v * D2R;
- },
- lat_ts: function(v) {
- self.lat_ts = v * D2R;
- },
- lon_0: function(v) {
- self.long0 = v * D2R;
- },
- lon_1: function(v) {
- self.long1 = v * D2R;
- },
- lon_2: function(v) {
- self.long2 = v * D2R;
- },
- alpha: function(v) {
- self.alpha = parseFloat(v) * D2R;
- },
- lonc: function(v) {
- self.longc = v * D2R;
- },
- x_0: function(v) {
- self.x0 = parseFloat(v);
- },
- y_0: function(v) {
- self.y0 = parseFloat(v);
- },
- k_0: function(v) {
- self.k0 = parseFloat(v);
- },
- k: function(v) {
- self.k0 = parseFloat(v);
- },
- a: function(v) {
- self.a = parseFloat(v);
- },
- b: function(v) {
- self.b = parseFloat(v);
- },
- r_a: function() {
- self.R_A = true;
- },
- zone: function(v) {
- self.zone = parseInt(v, 10);
- },
- south: function() {
- self.utmSouth = true;
- },
- towgs84: function(v) {
- self.datum_params = v.split(",").map(function(a) {
- return parseFloat(a);
- });
- },
- to_meter: function(v) {
- self.to_meter = parseFloat(v);
- },
- units: function(v) {
- self.units = v;
- var unit = match(units, v);
- if (unit) {
- self.to_meter = unit.to_meter;
- }
- },
- from_greenwich: function(v) {
- self.from_greenwich = v * D2R;
- },
- pm: function(v) {
- var pm = match(PrimeMeridian_exports, v);
- self.from_greenwich = (pm ? pm : parseFloat(v)) * D2R;
- },
- nadgrids: function(v) {
- if (v === '@null') {
- self.datumCode = 'none';
- }
- else {
- self.nadgrids = v;
- }
- },
- axis: function(v) {
- var legalAxis = "ewnsud";
- if (v.length === 3 && legalAxis.indexOf(v.substr(0, 1)) !== -1 && legalAxis.indexOf(v.substr(1, 1)) !== -1 && legalAxis.indexOf(v.substr(2, 1)) !== -1) {
- self.axis = v;
- }
- }
- };
- for (paramName in paramObj) {
- paramVal = paramObj[paramName];
- if (paramName in params) {
- paramOutname = params[paramName];
- if (typeof paramOutname === 'function') {
- paramOutname(paramVal);
- }
- else {
- self[paramOutname] = paramVal;
- }
- }
- else {
- self[paramName] = paramVal;
- }
- }
- if(typeof self.datumCode === 'string' && self.datumCode !== "WGS84"){
- self.datumCode = self.datumCode.toLowerCase();
- }
- return self;
- });
- // CONCATENATED MODULE: ./node_modules/wkt-parser/parser.js
- /* harmony default export */ var parser = (parseString);
- var NEUTRAL = 1;
- var KEYWORD = 2;
- var NUMBER = 3;
- var QUOTED = 4;
- var AFTERQUOTE = 5;
- var ENDED = -1;
- var whitespace = /\s/;
- var latin = /[A-Za-z]/;
- var keyword = /[A-Za-z84]/;
- var endThings = /[,\]]/;
- var digets = /[\d\.E\-\+]/;
- // const ignoredChar = /[\s_\-\/\(\)]/g;
- function Parser(text) {
- if (typeof text !== 'string') {
- throw new Error('not a string');
- }
- this.text = text.trim();
- this.level = 0;
- this.place = 0;
- this.root = null;
- this.stack = [];
- this.currentObject = null;
- this.state = NEUTRAL;
- }
- Parser.prototype.readCharicter = function() {
- var char = this.text[this.place++];
- if (this.state !== QUOTED) {
- while (whitespace.test(char)) {
- if (this.place >= this.text.length) {
- return;
- }
- char = this.text[this.place++];
- }
- }
- switch (this.state) {
- case NEUTRAL:
- return this.neutral(char);
- case KEYWORD:
- return this.keyword(char)
- case QUOTED:
- return this.quoted(char);
- case AFTERQUOTE:
- return this.afterquote(char);
- case NUMBER:
- return this.number(char);
- case ENDED:
- return;
- }
- };
- Parser.prototype.afterquote = function(char) {
- if (char === '"') {
- this.word += '"';
- this.state = QUOTED;
- return;
- }
- if (endThings.test(char)) {
- this.word = this.word.trim();
- this.afterItem(char);
- return;
- }
- throw new Error('havn\'t handled "' +char + '" in afterquote yet, index ' + this.place);
- };
- Parser.prototype.afterItem = function(char) {
- if (char === ',') {
- if (this.word !== null) {
- this.currentObject.push(this.word);
- }
- this.word = null;
- this.state = NEUTRAL;
- return;
- }
- if (char === ']') {
- this.level--;
- if (this.word !== null) {
- this.currentObject.push(this.word);
- this.word = null;
- }
- this.state = NEUTRAL;
- this.currentObject = this.stack.pop();
- if (!this.currentObject) {
- this.state = ENDED;
- }
- return;
- }
- };
- Parser.prototype.number = function(char) {
- if (digets.test(char)) {
- this.word += char;
- return;
- }
- if (endThings.test(char)) {
- this.word = parseFloat(this.word);
- this.afterItem(char);
- return;
- }
- throw new Error('havn\'t handled "' +char + '" in number yet, index ' + this.place);
- };
- Parser.prototype.quoted = function(char) {
- if (char === '"') {
- this.state = AFTERQUOTE;
- return;
- }
- this.word += char;
- return;
- };
- Parser.prototype.keyword = function(char) {
- if (keyword.test(char)) {
- this.word += char;
- return;
- }
- if (char === '[') {
- var newObjects = [];
- newObjects.push(this.word);
- this.level++;
- if (this.root === null) {
- this.root = newObjects;
- } else {
- this.currentObject.push(newObjects);
- }
- this.stack.push(this.currentObject);
- this.currentObject = newObjects;
- this.state = NEUTRAL;
- return;
- }
- if (endThings.test(char)) {
- this.afterItem(char);
- return;
- }
- throw new Error('havn\'t handled "' +char + '" in keyword yet, index ' + this.place);
- };
- Parser.prototype.neutral = function(char) {
- if (latin.test(char)) {
- this.word = char;
- this.state = KEYWORD;
- return;
- }
- if (char === '"') {
- this.word = '';
- this.state = QUOTED;
- return;
- }
- if (digets.test(char)) {
- this.word = char;
- this.state = NUMBER;
- return;
- }
- if (endThings.test(char)) {
- this.afterItem(char);
- return;
- }
- throw new Error('havn\'t handled "' +char + '" in neutral yet, index ' + this.place);
- };
- Parser.prototype.output = function() {
- while (this.place < this.text.length) {
- this.readCharicter();
- }
- if (this.state === ENDED) {
- return this.root;
- }
- throw new Error('unable to parse string "' +this.text + '". State is ' + this.state);
- };
- function parseString(txt) {
- var parser = new Parser(txt);
- return parser.output();
- }
- // CONCATENATED MODULE: ./node_modules/wkt-parser/process.js
- function mapit(obj, key, value) {
- if (Array.isArray(key)) {
- value.unshift(key);
- key = null;
- }
- var thing = key ? {} : obj;
- var out = value.reduce(function(newObj, item) {
- sExpr(item, newObj);
- return newObj
- }, thing);
- if (key) {
- obj[key] = out;
- }
- }
- function sExpr(v, obj) {
- if (!Array.isArray(v)) {
- obj[v] = true;
- return;
- }
- var key = v.shift();
- if (key === 'PARAMETER') {
- key = v.shift();
- }
- if (v.length === 1) {
- if (Array.isArray(v[0])) {
- obj[key] = {};
- sExpr(v[0], obj[key]);
- return;
- }
- obj[key] = v[0];
- return;
- }
- if (!v.length) {
- obj[key] = true;
- return;
- }
- if (key === 'TOWGS84') {
- obj[key] = v;
- return;
- }
- if (!Array.isArray(key)) {
- obj[key] = {};
- }
- var i;
- switch (key) {
- case 'UNIT':
- case 'PRIMEM':
- case 'VERT_DATUM':
- obj[key] = {
- name: v[0].toLowerCase(),
- convert: v[1]
- };
- if (v.length === 3) {
- sExpr(v[2], obj[key]);
- }
- return;
- case 'SPHEROID':
- case 'ELLIPSOID':
- obj[key] = {
- name: v[0],
- a: v[1],
- rf: v[2]
- };
- if (v.length === 4) {
- sExpr(v[3], obj[key]);
- }
- return;
- case 'PROJECTEDCRS':
- case 'PROJCRS':
- case 'GEOGCS':
- case 'GEOCCS':
- case 'PROJCS':
- case 'LOCAL_CS':
- case 'GEODCRS':
- case 'GEODETICCRS':
- case 'GEODETICDATUM':
- case 'EDATUM':
- case 'ENGINEERINGDATUM':
- case 'VERT_CS':
- case 'VERTCRS':
- case 'VERTICALCRS':
- case 'COMPD_CS':
- case 'COMPOUNDCRS':
- case 'ENGINEERINGCRS':
- case 'ENGCRS':
- case 'FITTED_CS':
- case 'LOCAL_DATUM':
- case 'DATUM':
- v[0] = ['name', v[0]];
- mapit(obj, key, v);
- return;
- default:
- i = -1;
- while (++i < v.length) {
- if (!Array.isArray(v[i])) {
- return sExpr(v, obj[key]);
- }
- }
- return mapit(obj, key, v);
- }
- }
- // CONCATENATED MODULE: ./node_modules/wkt-parser/index.js
- var wkt_parser_D2R = 0.01745329251994329577;
- function rename(obj, params) {
- var outName = params[0];
- var inName = params[1];
- if (!(outName in obj) && (inName in obj)) {
- obj[outName] = obj[inName];
- if (params.length === 3) {
- obj[outName] = params[2](obj[outName]);
- }
- }
- }
- function d2r(input) {
- return input * wkt_parser_D2R;
- }
- function cleanWKT(wkt) {
- if (wkt.type === 'GEOGCS') {
- wkt.projName = 'longlat';
- } else if (wkt.type === 'LOCAL_CS') {
- wkt.projName = 'identity';
- wkt.local = true;
- } else {
- if (typeof wkt.PROJECTION === 'object') {
- wkt.projName = Object.keys(wkt.PROJECTION)[0];
- } else {
- wkt.projName = wkt.PROJECTION;
- }
- }
- if (wkt.UNIT) {
- wkt.units = wkt.UNIT.name.toLowerCase();
- if (wkt.units === 'metre') {
- wkt.units = 'meter';
- }
- if (wkt.UNIT.convert) {
- if (wkt.type === 'GEOGCS') {
- if (wkt.DATUM && wkt.DATUM.SPHEROID) {
- wkt.to_meter = wkt.UNIT.convert*wkt.DATUM.SPHEROID.a;
- }
- } else {
- wkt.to_meter = wkt.UNIT.convert;
- }
- }
- }
- var geogcs = wkt.GEOGCS;
- if (wkt.type === 'GEOGCS') {
- geogcs = wkt;
- }
- if (geogcs) {
- //if(wkt.GEOGCS.PRIMEM&&wkt.GEOGCS.PRIMEM.convert){
- // wkt.from_greenwich=wkt.GEOGCS.PRIMEM.convert*D2R;
- //}
- if (geogcs.DATUM) {
- wkt.datumCode = geogcs.DATUM.name.toLowerCase();
- } else {
- wkt.datumCode = geogcs.name.toLowerCase();
- }
- if (wkt.datumCode.slice(0, 2) === 'd_') {
- wkt.datumCode = wkt.datumCode.slice(2);
- }
- if (wkt.datumCode === 'new_zealand_geodetic_datum_1949' || wkt.datumCode === 'new_zealand_1949') {
- wkt.datumCode = 'nzgd49';
- }
- if (wkt.datumCode === 'wgs_1984') {
- if (wkt.PROJECTION === 'Mercator_Auxiliary_Sphere') {
- wkt.sphere = true;
- }
- wkt.datumCode = 'wgs84';
- }
- if (wkt.datumCode.slice(-6) === '_ferro') {
- wkt.datumCode = wkt.datumCode.slice(0, - 6);
- }
- if (wkt.datumCode.slice(-8) === '_jakarta') {
- wkt.datumCode = wkt.datumCode.slice(0, - 8);
- }
- if (~wkt.datumCode.indexOf('belge')) {
- wkt.datumCode = 'rnb72';
- }
- if (geogcs.DATUM && geogcs.DATUM.SPHEROID) {
- wkt.ellps = geogcs.DATUM.SPHEROID.name.replace('_19', '').replace(/[Cc]larke\_18/, 'clrk');
- if (wkt.ellps.toLowerCase().slice(0, 13) === 'international') {
- wkt.ellps = 'intl';
- }
- wkt.a = geogcs.DATUM.SPHEROID.a;
- wkt.rf = parseFloat(geogcs.DATUM.SPHEROID.rf, 10);
- }
- if (geogcs.DATUM && geogcs.DATUM.TOWGS84) {
- wkt.datum_params = geogcs.DATUM.TOWGS84;
- }
- if (~wkt.datumCode.indexOf('osgb_1936')) {
- wkt.datumCode = 'osgb36';
- }
- if (~wkt.datumCode.indexOf('osni_1952')) {
- wkt.datumCode = 'osni52';
- }
- if (~wkt.datumCode.indexOf('tm65')
- || ~wkt.datumCode.indexOf('geodetic_datum_of_1965')) {
- wkt.datumCode = 'ire65';
- }
- if (wkt.datumCode === 'ch1903+') {
- wkt.datumCode = 'ch1903';
- }
- if (~wkt.datumCode.indexOf('israel')) {
- wkt.datumCode = 'isr93';
- }
- }
- if (wkt.b && !isFinite(wkt.b)) {
- wkt.b = wkt.a;
- }
- function toMeter(input) {
- var ratio = wkt.to_meter || 1;
- return input * ratio;
- }
- var renamer = function(a) {
- return rename(wkt, a);
- };
- var list = [
- ['standard_parallel_1', 'Standard_Parallel_1'],
- ['standard_parallel_2', 'Standard_Parallel_2'],
- ['false_easting', 'False_Easting'],
- ['false_northing', 'False_Northing'],
- ['central_meridian', 'Central_Meridian'],
- ['latitude_of_origin', 'Latitude_Of_Origin'],
- ['latitude_of_origin', 'Central_Parallel'],
- ['scale_factor', 'Scale_Factor'],
- ['k0', 'scale_factor'],
- ['latitude_of_center', 'Latitude_Of_Center'],
- ['latitude_of_center', 'Latitude_of_center'],
- ['lat0', 'latitude_of_center', d2r],
- ['longitude_of_center', 'Longitude_Of_Center'],
- ['longitude_of_center', 'Longitude_of_center'],
- ['longc', 'longitude_of_center', d2r],
- ['x0', 'false_easting', toMeter],
- ['y0', 'false_northing', toMeter],
- ['long0', 'central_meridian', d2r],
- ['lat0', 'latitude_of_origin', d2r],
- ['lat0', 'standard_parallel_1', d2r],
- ['lat1', 'standard_parallel_1', d2r],
- ['lat2', 'standard_parallel_2', d2r],
- ['azimuth', 'Azimuth'],
- ['alpha', 'azimuth', d2r],
- ['srsCode', 'name']
- ];
- list.forEach(renamer);
- if (!wkt.long0 && wkt.longc && (wkt.projName === 'Albers_Conic_Equal_Area' || wkt.projName === 'Lambert_Azimuthal_Equal_Area')) {
- wkt.long0 = wkt.longc;
- }
- if (!wkt.lat_ts && wkt.lat1 && (wkt.projName === 'Stereographic_South_Pole' || wkt.projName === 'Polar Stereographic (variant B)')) {
- wkt.lat0 = d2r(wkt.lat1 > 0 ? 90 : -90);
- wkt.lat_ts = wkt.lat1;
- }
- }
- /* harmony default export */ var wkt_parser = (function(wkt) {
- var lisp = parser(wkt);
- var type = lisp.shift();
- var name = lisp.shift();
- lisp.unshift(['name', name]);
- lisp.unshift(['type', type]);
- var obj = {};
- sExpr(lisp, obj);
- cleanWKT(obj);
- return obj;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/defs.js
- function defs(name) {
- /*global console*/
- var that = this;
- if (arguments.length === 2) {
- var def = arguments[1];
- if (typeof def === 'string') {
- if (def.charAt(0) === '+') {
- defs[name] = projString(arguments[1]);
- }
- else {
- defs[name] = wkt_parser(arguments[1]);
- }
- } else {
- defs[name] = def;
- }
- }
- else if (arguments.length === 1) {
- if (Array.isArray(name)) {
- return name.map(function(v) {
- if (Array.isArray(v)) {
- defs.apply(that, v);
- }
- else {
- defs(v);
- }
- });
- }
- else if (typeof name === 'string') {
- if (name in defs) {
- return defs[name];
- }
- }
- else if ('EPSG' in name) {
- defs['EPSG:' + name.EPSG] = name;
- }
- else if ('ESRI' in name) {
- defs['ESRI:' + name.ESRI] = name;
- }
- else if ('IAU2000' in name) {
- defs['IAU2000:' + name.IAU2000] = name;
- }
- else {
- console.log(name);
- }
- return;
- }
- }
- global(defs);
- /* harmony default export */ var lib_defs = (defs);
- // CONCATENATED MODULE: ./node_modules/proj4/lib/parseCode.js
- function testObj(code){
- return typeof code === 'string';
- }
- function testDef(code){
- return code in lib_defs;
- }
- var codeWords = ['PROJECTEDCRS', 'PROJCRS', 'GEOGCS','GEOCCS','PROJCS','LOCAL_CS', 'GEODCRS', 'GEODETICCRS', 'GEODETICDATUM', 'ENGCRS', 'ENGINEERINGCRS'];
- function testWKT(code){
- return codeWords.some(function (word) {
- return code.indexOf(word) > -1;
- });
- }
- var codes = ['3857', '900913', '3785', '102113'];
- function checkMercator(item) {
- var auth = match(item, 'authority');
- if (!auth) {
- return;
- }
- var code = match(auth, 'epsg');
- return code && codes.indexOf(code) > -1;
- }
- function checkProjStr(item) {
- var ext = match(item, 'extension');
- if (!ext) {
- return;
- }
- return match(ext, 'proj4');
- }
- function testProj(code){
- return code[0] === '+';
- }
- function parse(code){
- if (testObj(code)) {
- //check to see if this is a WKT string
- if (testDef(code)) {
- return lib_defs[code];
- }
- if (testWKT(code)) {
- var out = wkt_parser(code);
- // test of spetial case, due to this being a very common and often malformed
- if (checkMercator(out)) {
- return lib_defs['EPSG:3857'];
- }
- var maybeProjStr = checkProjStr(out);
- if (maybeProjStr) {
- return projString(maybeProjStr);
- }
- return out;
- }
- if (testProj(code)) {
- return projString(code);
- }
- }else{
- return code;
- }
- }
- /* harmony default export */ var parseCode = (parse);
- // CONCATENATED MODULE: ./node_modules/proj4/lib/extend.js
- /* harmony default export */ var extend = (function(destination, source) {
- destination = destination || {};
- var value, property;
- if (!source) {
- return destination;
- }
- for (property in source) {
- value = source[property];
- if (value !== undefined) {
- destination[property] = value;
- }
- }
- return destination;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/msfnz.js
- /* harmony default export */ var msfnz = (function(eccent, sinphi, cosphi) {
- var con = eccent * sinphi;
- return cosphi / (Math.sqrt(1 - con * con));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/sign.js
- /* harmony default export */ var sign = (function(x) {
- return x<0 ? -1 : 1;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/adjust_lon.js
- /* harmony default export */ var adjust_lon = (function(x) {
- return (Math.abs(x) <= SPI) ? x : (x - (sign(x) * TWO_PI));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/tsfnz.js
- /* harmony default export */ var tsfnz = (function(eccent, phi, sinphi) {
- var con = eccent * sinphi;
- var com = 0.5 * eccent;
- con = Math.pow(((1 - con) / (1 + con)), com);
- return (Math.tan(0.5 * (HALF_PI - phi)) / con);
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/phi2z.js
- /* harmony default export */ var phi2z = (function(eccent, ts) {
- var eccnth = 0.5 * eccent;
- var con, dphi;
- var phi = HALF_PI - 2 * Math.atan(ts);
- for (var i = 0; i <= 15; i++) {
- con = eccent * Math.sin(phi);
- dphi = HALF_PI - 2 * Math.atan(ts * (Math.pow(((1 - con) / (1 + con)), eccnth))) - phi;
- phi += dphi;
- if (Math.abs(dphi) <= 0.0000000001) {
- return phi;
- }
- }
- //console.log("phi2z has NoConvergence");
- return -9999;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/merc.js
- function init() {
- var con = this.b / this.a;
- this.es = 1 - con * con;
- if(!('x0' in this)){
- this.x0 = 0;
- }
- if(!('y0' in this)){
- this.y0 = 0;
- }
- this.e = Math.sqrt(this.es);
- if (this.lat_ts) {
- if (this.sphere) {
- this.k0 = Math.cos(this.lat_ts);
- }
- else {
- this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts));
- }
- }
- else {
- if (!this.k0) {
- if (this.k) {
- this.k0 = this.k;
- }
- else {
- this.k0 = 1;
- }
- }
- }
- }
- /* Mercator forward equations--mapping lat,long to x,y
- --------------------------------------------------*/
- function forward(p) {
- var lon = p.x;
- var lat = p.y;
- // convert to radians
- if (lat * R2D > 90 && lat * R2D < -90 && lon * R2D > 180 && lon * R2D < -180) {
- return null;
- }
- var x, y;
- if (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) {
- return null;
- }
- else {
- if (this.sphere) {
- x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0);
- y = this.y0 + this.a * this.k0 * Math.log(Math.tan(FORTPI + 0.5 * lat));
- }
- else {
- var sinphi = Math.sin(lat);
- var ts = tsfnz(this.e, lat, sinphi);
- x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0);
- y = this.y0 - this.a * this.k0 * Math.log(ts);
- }
- p.x = x;
- p.y = y;
- return p;
- }
- }
- /* Mercator inverse equations--mapping x,y to lat/long
- --------------------------------------------------*/
- function inverse(p) {
- var x = p.x - this.x0;
- var y = p.y - this.y0;
- var lon, lat;
- if (this.sphere) {
- lat = HALF_PI - 2 * Math.atan(Math.exp(-y / (this.a * this.k0)));
- }
- else {
- var ts = Math.exp(-y / (this.a * this.k0));
- lat = phi2z(this.e, ts);
- if (lat === -9999) {
- return null;
- }
- }
- lon = adjust_lon(this.long0 + x / (this.a * this.k0));
- p.x = lon;
- p.y = lat;
- return p;
- }
- var names = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"];
- /* harmony default export */ var merc = ({
- init: init,
- forward: forward,
- inverse: inverse,
- names: names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/longlat.js
- function longlat_init() {
- //no-op for longlat
- }
- function identity(pt) {
- return pt;
- }
- var longlat_names = ["longlat", "identity"];
- /* harmony default export */ var longlat = ({
- init: longlat_init,
- forward: identity,
- inverse: identity,
- names: longlat_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections.js
- var projs = [merc, longlat];
- var projections_names = {};
- var projStore = [];
- function add(proj, i) {
- var len = projStore.length;
- if (!proj.names) {
- console.log(i);
- return true;
- }
- projStore[len] = proj;
- proj.names.forEach(function(n) {
- projections_names[n.toLowerCase()] = len;
- });
- return this;
- }
- function get(name) {
- if (!name) {
- return false;
- }
- var n = name.toLowerCase();
- if (typeof projections_names[n] !== 'undefined' && projStore[projections_names[n]]) {
- return projStore[projections_names[n]];
- }
- }
- function start() {
- projs.forEach(add);
- }
- /* harmony default export */ var projections = ({
- start: start,
- add: add,
- get: get
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/constants/Ellipsoid.js
- var Ellipsoid_exports = {};
- Ellipsoid_exports.MERIT = {
- a: 6378137.0,
- rf: 298.257,
- ellipseName: "MERIT 1983"
- };
- Ellipsoid_exports.SGS85 = {
- a: 6378136.0,
- rf: 298.257,
- ellipseName: "Soviet Geodetic System 85"
- };
- Ellipsoid_exports.GRS80 = {
- a: 6378137.0,
- rf: 298.257222101,
- ellipseName: "GRS 1980(IUGG, 1980)"
- };
- Ellipsoid_exports.IAU76 = {
- a: 6378140.0,
- rf: 298.257,
- ellipseName: "IAU 1976"
- };
- Ellipsoid_exports.airy = {
- a: 6377563.396,
- b: 6356256.910,
- ellipseName: "Airy 1830"
- };
- Ellipsoid_exports.APL4 = {
- a: 6378137,
- rf: 298.25,
- ellipseName: "Appl. Physics. 1965"
- };
- Ellipsoid_exports.NWL9D = {
- a: 6378145.0,
- rf: 298.25,
- ellipseName: "Naval Weapons Lab., 1965"
- };
- Ellipsoid_exports.mod_airy = {
- a: 6377340.189,
- b: 6356034.446,
- ellipseName: "Modified Airy"
- };
- Ellipsoid_exports.andrae = {
- a: 6377104.43,
- rf: 300.0,
- ellipseName: "Andrae 1876 (Den., Iclnd.)"
- };
- Ellipsoid_exports.aust_SA = {
- a: 6378160.0,
- rf: 298.25,
- ellipseName: "Australian Natl & S. Amer. 1969"
- };
- Ellipsoid_exports.GRS67 = {
- a: 6378160.0,
- rf: 298.2471674270,
- ellipseName: "GRS 67(IUGG 1967)"
- };
- Ellipsoid_exports.bessel = {
- a: 6377397.155,
- rf: 299.1528128,
- ellipseName: "Bessel 1841"
- };
- Ellipsoid_exports.bess_nam = {
- a: 6377483.865,
- rf: 299.1528128,
- ellipseName: "Bessel 1841 (Namibia)"
- };
- Ellipsoid_exports.clrk66 = {
- a: 6378206.4,
- b: 6356583.8,
- ellipseName: "Clarke 1866"
- };
- Ellipsoid_exports.clrk80 = {
- a: 6378249.145,
- rf: 293.4663,
- ellipseName: "Clarke 1880 mod."
- };
- Ellipsoid_exports.clrk58 = {
- a: 6378293.645208759,
- rf: 294.2606763692654,
- ellipseName: "Clarke 1858"
- };
- Ellipsoid_exports.CPM = {
- a: 6375738.7,
- rf: 334.29,
- ellipseName: "Comm. des Poids et Mesures 1799"
- };
- Ellipsoid_exports.delmbr = {
- a: 6376428.0,
- rf: 311.5,
- ellipseName: "Delambre 1810 (Belgium)"
- };
- Ellipsoid_exports.engelis = {
- a: 6378136.05,
- rf: 298.2566,
- ellipseName: "Engelis 1985"
- };
- Ellipsoid_exports.evrst30 = {
- a: 6377276.345,
- rf: 300.8017,
- ellipseName: "Everest 1830"
- };
- Ellipsoid_exports.evrst48 = {
- a: 6377304.063,
- rf: 300.8017,
- ellipseName: "Everest 1948"
- };
- Ellipsoid_exports.evrst56 = {
- a: 6377301.243,
- rf: 300.8017,
- ellipseName: "Everest 1956"
- };
- Ellipsoid_exports.evrst69 = {
- a: 6377295.664,
- rf: 300.8017,
- ellipseName: "Everest 1969"
- };
- Ellipsoid_exports.evrstSS = {
- a: 6377298.556,
- rf: 300.8017,
- ellipseName: "Everest (Sabah & Sarawak)"
- };
- Ellipsoid_exports.fschr60 = {
- a: 6378166.0,
- rf: 298.3,
- ellipseName: "Fischer (Mercury Datum) 1960"
- };
- Ellipsoid_exports.fschr60m = {
- a: 6378155.0,
- rf: 298.3,
- ellipseName: "Fischer 1960"
- };
- Ellipsoid_exports.fschr68 = {
- a: 6378150.0,
- rf: 298.3,
- ellipseName: "Fischer 1968"
- };
- Ellipsoid_exports.helmert = {
- a: 6378200.0,
- rf: 298.3,
- ellipseName: "Helmert 1906"
- };
- Ellipsoid_exports.hough = {
- a: 6378270.0,
- rf: 297.0,
- ellipseName: "Hough"
- };
- Ellipsoid_exports.intl = {
- a: 6378388.0,
- rf: 297.0,
- ellipseName: "International 1909 (Hayford)"
- };
- Ellipsoid_exports.kaula = {
- a: 6378163.0,
- rf: 298.24,
- ellipseName: "Kaula 1961"
- };
- Ellipsoid_exports.lerch = {
- a: 6378139.0,
- rf: 298.257,
- ellipseName: "Lerch 1979"
- };
- Ellipsoid_exports.mprts = {
- a: 6397300.0,
- rf: 191.0,
- ellipseName: "Maupertius 1738"
- };
- Ellipsoid_exports.new_intl = {
- a: 6378157.5,
- b: 6356772.2,
- ellipseName: "New International 1967"
- };
- Ellipsoid_exports.plessis = {
- a: 6376523.0,
- rf: 6355863.0,
- ellipseName: "Plessis 1817 (France)"
- };
- Ellipsoid_exports.krass = {
- a: 6378245.0,
- rf: 298.3,
- ellipseName: "Krassovsky, 1942"
- };
- Ellipsoid_exports.SEasia = {
- a: 6378155.0,
- b: 6356773.3205,
- ellipseName: "Southeast Asia"
- };
- Ellipsoid_exports.walbeck = {
- a: 6376896.0,
- b: 6355834.8467,
- ellipseName: "Walbeck"
- };
- Ellipsoid_exports.WGS60 = {
- a: 6378165.0,
- rf: 298.3,
- ellipseName: "WGS 60"
- };
- Ellipsoid_exports.WGS66 = {
- a: 6378145.0,
- rf: 298.25,
- ellipseName: "WGS 66"
- };
- Ellipsoid_exports.WGS7 = {
- a: 6378135.0,
- rf: 298.26,
- ellipseName: "WGS 72"
- };
- var WGS84 = Ellipsoid_exports.WGS84 = {
- a: 6378137.0,
- rf: 298.257223563,
- ellipseName: "WGS 84"
- };
- Ellipsoid_exports.sphere = {
- a: 6370997.0,
- b: 6370997.0,
- ellipseName: "Normal Sphere (r=6370997)"
- };
- // CONCATENATED MODULE: ./node_modules/proj4/lib/deriveConstants.js
- function eccentricity(a, b, rf, R_A) {
- var a2 = a * a; // used in geocentric
- var b2 = b * b; // used in geocentric
- var es = (a2 - b2) / a2; // e ^ 2
- var e = 0;
- if (R_A) {
- a *= 1 - es * (SIXTH + es * (RA4 + es * RA6));
- a2 = a * a;
- es = 0;
- } else {
- e = Math.sqrt(es); // eccentricity
- }
- var ep2 = (a2 - b2) / b2; // used in geocentric
- return {
- es: es,
- e: e,
- ep2: ep2
- };
- }
- function deriveConstants_sphere(a, b, rf, ellps, sphere) {
- if (!a) { // do we have an ellipsoid?
- var ellipse = match(Ellipsoid_exports, ellps);
- if (!ellipse) {
- ellipse = WGS84;
- }
- a = ellipse.a;
- b = ellipse.b;
- rf = ellipse.rf;
- }
- if (rf && !b) {
- b = (1.0 - 1.0 / rf) * a;
- }
- if (rf === 0 || Math.abs(a - b) < EPSLN) {
- sphere = true;
- b = a;
- }
- return {
- a: a,
- b: b,
- rf: rf,
- sphere: sphere
- };
- }
- // CONCATENATED MODULE: ./node_modules/proj4/lib/constants/Datum.js
- var Datum_exports = {};
- Datum_exports.wgs84 = {
- towgs84: "0,0,0",
- ellipse: "WGS84",
- datumName: "WGS84"
- };
- Datum_exports.ch1903 = {
- towgs84: "674.374,15.056,405.346",
- ellipse: "bessel",
- datumName: "swiss"
- };
- Datum_exports.ggrs87 = {
- towgs84: "-199.87,74.79,246.62",
- ellipse: "GRS80",
- datumName: "Greek_Geodetic_Reference_System_1987"
- };
- Datum_exports.nad83 = {
- towgs84: "0,0,0",
- ellipse: "GRS80",
- datumName: "North_American_Datum_1983"
- };
- Datum_exports.nad27 = {
- nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
- ellipse: "clrk66",
- datumName: "North_American_Datum_1927"
- };
- Datum_exports.potsdam = {
- towgs84: "606.0,23.0,413.0",
- ellipse: "bessel",
- datumName: "Potsdam Rauenberg 1950 DHDN"
- };
- Datum_exports.carthage = {
- towgs84: "-263.0,6.0,431.0",
- ellipse: "clark80",
- datumName: "Carthage 1934 Tunisia"
- };
- Datum_exports.hermannskogel = {
- towgs84: "653.0,-212.0,449.0",
- ellipse: "bessel",
- datumName: "Hermannskogel"
- };
- Datum_exports.osni52 = {
- towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
- ellipse: "airy",
- datumName: "Irish National"
- };
- Datum_exports.ire65 = {
- towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
- ellipse: "mod_airy",
- datumName: "Ireland 1965"
- };
- Datum_exports.rassadiran = {
- towgs84: "-133.63,-157.5,-158.62",
- ellipse: "intl",
- datumName: "Rassadiran"
- };
- Datum_exports.nzgd49 = {
- towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",
- ellipse: "intl",
- datumName: "New Zealand Geodetic Datum 1949"
- };
- Datum_exports.osgb36 = {
- towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",
- ellipse: "airy",
- datumName: "Airy 1830"
- };
- Datum_exports.s_jtsk = {
- towgs84: "589,76,480",
- ellipse: 'bessel',
- datumName: 'S-JTSK (Ferro)'
- };
- Datum_exports.beduaram = {
- towgs84: '-106,-87,188',
- ellipse: 'clrk80',
- datumName: 'Beduaram'
- };
- Datum_exports.gunung_segara = {
- towgs84: '-403,684,41',
- ellipse: 'bessel',
- datumName: 'Gunung Segara Jakarta'
- };
- Datum_exports.rnb72 = {
- towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",
- ellipse: "intl",
- datumName: "Reseau National Belge 1972"
- };
- // CONCATENATED MODULE: ./node_modules/proj4/lib/datum.js
- function datum(datumCode, datum_params, a, b, es, ep2) {
- var out = {};
- if (datumCode === undefined || datumCode === 'none') {
- out.datum_type = PJD_NODATUM;
- } else {
- out.datum_type = PJD_WGS84;
- }
- if (datum_params) {
- out.datum_params = datum_params.map(parseFloat);
- if (out.datum_params[0] !== 0 || out.datum_params[1] !== 0 || out.datum_params[2] !== 0) {
- out.datum_type = PJD_3PARAM;
- }
- if (out.datum_params.length > 3) {
- if (out.datum_params[3] !== 0 || out.datum_params[4] !== 0 || out.datum_params[5] !== 0 || out.datum_params[6] !== 0) {
- out.datum_type = PJD_7PARAM;
- out.datum_params[3] *= SEC_TO_RAD;
- out.datum_params[4] *= SEC_TO_RAD;
- out.datum_params[5] *= SEC_TO_RAD;
- out.datum_params[6] = (out.datum_params[6] / 1000000.0) + 1.0;
- }
- }
- }
- out.a = a; //datum object also uses these values
- out.b = b;
- out.es = es;
- out.ep2 = ep2;
- return out;
- }
- /* harmony default export */ var lib_datum = (datum);
- // CONCATENATED MODULE: ./node_modules/proj4/lib/Proj.js
- function Projection(srsCode,callback) {
- if (!(this instanceof Projection)) {
- return new Projection(srsCode);
- }
- callback = callback || function(error){
- if(error){
- throw error;
- }
- };
- var json = parseCode(srsCode);
- if(typeof json !== 'object'){
- callback(srsCode);
- return;
- }
- var ourProj = Projection.projections.get(json.projName);
- if(!ourProj){
- callback(srsCode);
- return;
- }
- if (json.datumCode && json.datumCode !== 'none') {
- var datumDef = match(Datum_exports, json.datumCode);
- if (datumDef) {
- json.datum_params = datumDef.towgs84 ? datumDef.towgs84.split(',') : null;
- json.ellps = datumDef.ellipse;
- json.datumName = datumDef.datumName ? datumDef.datumName : json.datumCode;
- }
- }
- json.k0 = json.k0 || 1.0;
- json.axis = json.axis || 'enu';
- json.ellps = json.ellps || 'wgs84';
- var sphere_ = deriveConstants_sphere(json.a, json.b, json.rf, json.ellps, json.sphere);
- var ecc = eccentricity(sphere_.a, sphere_.b, sphere_.rf, json.R_A);
- var datumObj = json.datum || lib_datum(json.datumCode, json.datum_params, sphere_.a, sphere_.b, ecc.es, ecc.ep2);
- extend(this, json); // transfer everything over from the projection because we don't know what we'll need
- extend(this, ourProj); // transfer all the methods from the projection
- // copy the 4 things over we calulated in deriveConstants.sphere
- this.a = sphere_.a;
- this.b = sphere_.b;
- this.rf = sphere_.rf;
- this.sphere = sphere_.sphere;
- // copy the 3 things we calculated in deriveConstants.eccentricity
- this.es = ecc.es;
- this.e = ecc.e;
- this.ep2 = ecc.ep2;
- // add in the datum object
- this.datum = datumObj;
- // init the projection
- this.init();
- // legecy callback from back in the day when it went to spatialreference.org
- callback(null, this);
- }
- Projection.projections = projections;
- Projection.projections.start();
- /* harmony default export */ var Proj = (Projection);
- // CONCATENATED MODULE: ./node_modules/proj4/lib/datumUtils.js
- function compareDatums(source, dest) {
- if (source.datum_type !== dest.datum_type) {
- return false; // false, datums are not equal
- } else if (source.a !== dest.a || Math.abs(source.es - dest.es) > 0.000000000050) {
- // the tolerance for es is to ensure that GRS80 and WGS84
- // are considered identical
- return false;
- } else if (source.datum_type === PJD_3PARAM) {
- return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2]);
- } else if (source.datum_type === PJD_7PARAM) {
- return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2] && source.datum_params[3] === dest.datum_params[3] && source.datum_params[4] === dest.datum_params[4] && source.datum_params[5] === dest.datum_params[5] && source.datum_params[6] === dest.datum_params[6]);
- } else {
- return true; // datums are equal
- }
- } // cs_compare_datums()
- /*
- * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates
- * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),
- * according to the current ellipsoid parameters.
- *
- * Latitude : Geodetic latitude in radians (input)
- * Longitude : Geodetic longitude in radians (input)
- * Height : Geodetic height, in meters (input)
- * X : Calculated Geocentric X coordinate, in meters (output)
- * Y : Calculated Geocentric Y coordinate, in meters (output)
- * Z : Calculated Geocentric Z coordinate, in meters (output)
- *
- */
- function geodeticToGeocentric(p, es, a) {
- var Longitude = p.x;
- var Latitude = p.y;
- var Height = p.z ? p.z : 0; //Z value not always supplied
- var Rn; /* Earth radius at location */
- var Sin_Lat; /* Math.sin(Latitude) */
- var Sin2_Lat; /* Square of Math.sin(Latitude) */
- var Cos_Lat; /* Math.cos(Latitude) */
- /*
- ** Don't blow up if Latitude is just a little out of the value
- ** range as it may just be a rounding issue. Also removed longitude
- ** test, it should be wrapped by Math.cos() and Math.sin(). NFW for PROJ.4, Sep/2001.
- */
- if (Latitude < -HALF_PI && Latitude > -1.001 * HALF_PI) {
- Latitude = -HALF_PI;
- } else if (Latitude > HALF_PI && Latitude < 1.001 * HALF_PI) {
- Latitude = HALF_PI;
- } else if (Latitude < -HALF_PI) {
- /* Latitude out of range */
- //..reportError('geocent:lat out of range:' + Latitude);
- return { x: -Infinity, y: -Infinity, z: p.z };
- } else if (Latitude > HALF_PI) {
- /* Latitude out of range */
- return { x: Infinity, y: Infinity, z: p.z };
- }
- if (Longitude > Math.PI) {
- Longitude -= (2 * Math.PI);
- }
- Sin_Lat = Math.sin(Latitude);
- Cos_Lat = Math.cos(Latitude);
- Sin2_Lat = Sin_Lat * Sin_Lat;
- Rn = a / (Math.sqrt(1.0e0 - es * Sin2_Lat));
- return {
- x: (Rn + Height) * Cos_Lat * Math.cos(Longitude),
- y: (Rn + Height) * Cos_Lat * Math.sin(Longitude),
- z: ((Rn * (1 - es)) + Height) * Sin_Lat
- };
- } // cs_geodetic_to_geocentric()
- function geocentricToGeodetic(p, es, a, b) {
- /* local defintions and variables */
- /* end-criterium of loop, accuracy of sin(Latitude) */
- var genau = 1e-12;
- var genau2 = (genau * genau);
- var maxiter = 30;
- var P; /* distance between semi-minor axis and location */
- var RR; /* distance between center and location */
- var CT; /* sin of geocentric latitude */
- var ST; /* cos of geocentric latitude */
- var RX;
- var RK;
- var RN; /* Earth radius at location */
- var CPHI0; /* cos of start or old geodetic latitude in iterations */
- var SPHI0; /* sin of start or old geodetic latitude in iterations */
- var CPHI; /* cos of searched geodetic latitude */
- var SPHI; /* sin of searched geodetic latitude */
- var SDPHI; /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */
- var iter; /* # of continous iteration, max. 30 is always enough (s.a.) */
- var X = p.x;
- var Y = p.y;
- var Z = p.z ? p.z : 0.0; //Z value not always supplied
- var Longitude;
- var Latitude;
- var Height;
- P = Math.sqrt(X * X + Y * Y);
- RR = Math.sqrt(X * X + Y * Y + Z * Z);
- /* special cases for latitude and longitude */
- if (P / a < genau) {
- /* special case, if P=0. (X=0., Y=0.) */
- Longitude = 0.0;
- /* if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis
- * of ellipsoid (=center of mass), Latitude becomes PI/2 */
- if (RR / a < genau) {
- Latitude = HALF_PI;
- Height = -b;
- return {
- x: p.x,
- y: p.y,
- z: p.z
- };
- }
- } else {
- /* ellipsoidal (geodetic) longitude
- * interval: -PI < Longitude <= +PI */
- Longitude = Math.atan2(Y, X);
- }
- /* --------------------------------------------------------------
- * Following iterative algorithm was developped by
- * "Institut for Erdmessung", University of Hannover, July 1988.
- * Internet: www.ife.uni-hannover.de
- * Iterative computation of CPHI,SPHI and Height.
- * Iteration of CPHI and SPHI to 10**-12 radian resp.
- * 2*10**-7 arcsec.
- * --------------------------------------------------------------
- */
- CT = Z / RR;
- ST = P / RR;
- RX = 1.0 / Math.sqrt(1.0 - es * (2.0 - es) * ST * ST);
- CPHI0 = ST * (1.0 - es) * RX;
- SPHI0 = CT * RX;
- iter = 0;
- /* loop to find sin(Latitude) resp. Latitude
- * until |sin(Latitude(iter)-Latitude(iter-1))| < genau */
- do {
- iter++;
- RN = a / Math.sqrt(1.0 - es * SPHI0 * SPHI0);
- /* ellipsoidal (geodetic) height */
- Height = P * CPHI0 + Z * SPHI0 - RN * (1.0 - es * SPHI0 * SPHI0);
- RK = es * RN / (RN + Height);
- RX = 1.0 / Math.sqrt(1.0 - RK * (2.0 - RK) * ST * ST);
- CPHI = ST * (1.0 - RK) * RX;
- SPHI = CT * RX;
- SDPHI = SPHI * CPHI0 - CPHI * SPHI0;
- CPHI0 = CPHI;
- SPHI0 = SPHI;
- }
- while (SDPHI * SDPHI > genau2 && iter < maxiter);
- /* ellipsoidal (geodetic) latitude */
- Latitude = Math.atan(SPHI / Math.abs(CPHI));
- return {
- x: Longitude,
- y: Latitude,
- z: Height
- };
- } // cs_geocentric_to_geodetic()
- /****************************************************************/
- // pj_geocentic_to_wgs84( p )
- // p = point to transform in geocentric coordinates (x,y,z)
- /** point object, nothing fancy, just allows values to be
- passed back and forth by reference rather than by value.
- Other point classes may be used as long as they have
- x and y properties, which will get modified in the transform method.
- */
- function geocentricToWgs84(p, datum_type, datum_params) {
- if (datum_type === PJD_3PARAM) {
- // if( x[io] === HUGE_VAL )
- // continue;
- return {
- x: p.x + datum_params[0],
- y: p.y + datum_params[1],
- z: p.z + datum_params[2],
- };
- } else if (datum_type === PJD_7PARAM) {
- var Dx_BF = datum_params[0];
- var Dy_BF = datum_params[1];
- var Dz_BF = datum_params[2];
- var Rx_BF = datum_params[3];
- var Ry_BF = datum_params[4];
- var Rz_BF = datum_params[5];
- var M_BF = datum_params[6];
- // if( x[io] === HUGE_VAL )
- // continue;
- return {
- x: M_BF * (p.x - Rz_BF * p.y + Ry_BF * p.z) + Dx_BF,
- y: M_BF * (Rz_BF * p.x + p.y - Rx_BF * p.z) + Dy_BF,
- z: M_BF * (-Ry_BF * p.x + Rx_BF * p.y + p.z) + Dz_BF
- };
- }
- } // cs_geocentric_to_wgs84
- /****************************************************************/
- // pj_geocentic_from_wgs84()
- // coordinate system definition,
- // point to transform in geocentric coordinates (x,y,z)
- function geocentricFromWgs84(p, datum_type, datum_params) {
- if (datum_type === PJD_3PARAM) {
- //if( x[io] === HUGE_VAL )
- // continue;
- return {
- x: p.x - datum_params[0],
- y: p.y - datum_params[1],
- z: p.z - datum_params[2],
- };
- } else if (datum_type === PJD_7PARAM) {
- var Dx_BF = datum_params[0];
- var Dy_BF = datum_params[1];
- var Dz_BF = datum_params[2];
- var Rx_BF = datum_params[3];
- var Ry_BF = datum_params[4];
- var Rz_BF = datum_params[5];
- var M_BF = datum_params[6];
- var x_tmp = (p.x - Dx_BF) / M_BF;
- var y_tmp = (p.y - Dy_BF) / M_BF;
- var z_tmp = (p.z - Dz_BF) / M_BF;
- //if( x[io] === HUGE_VAL )
- // continue;
- return {
- x: x_tmp + Rz_BF * y_tmp - Ry_BF * z_tmp,
- y: -Rz_BF * x_tmp + y_tmp + Rx_BF * z_tmp,
- z: Ry_BF * x_tmp - Rx_BF * y_tmp + z_tmp
- };
- } //cs_geocentric_from_wgs84()
- }
- // CONCATENATED MODULE: ./node_modules/proj4/lib/datum_transform.js
- function checkParams(type) {
- return (type === PJD_3PARAM || type === PJD_7PARAM);
- }
- /* harmony default export */ var datum_transform = (function(source, dest, point) {
- // Short cut if the datums are identical.
- if (compareDatums(source, dest)) {
- return point; // in this case, zero is sucess,
- // whereas cs_compare_datums returns 1 to indicate TRUE
- // confusing, should fix this
- }
- // Explicitly skip datum transform by setting 'datum=none' as parameter for either source or dest
- if (source.datum_type === PJD_NODATUM || dest.datum_type === PJD_NODATUM) {
- return point;
- }
- // If this datum requires grid shifts, then apply it to geodetic coordinates.
- // Do we need to go through geocentric coordinates?
- if (source.es === dest.es && source.a === dest.a && !checkParams(source.datum_type) && !checkParams(dest.datum_type)) {
- return point;
- }
- // Convert to geocentric coordinates.
- point = geodeticToGeocentric(point, source.es, source.a);
- // Convert between datums
- if (checkParams(source.datum_type)) {
- point = geocentricToWgs84(point, source.datum_type, source.datum_params);
- }
- if (checkParams(dest.datum_type)) {
- point = geocentricFromWgs84(point, dest.datum_type, dest.datum_params);
- }
- return geocentricToGeodetic(point, dest.es, dest.a, dest.b);
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/adjust_axis.js
- /* harmony default export */ var adjust_axis = (function(crs, denorm, point) {
- var xin = point.x,
- yin = point.y,
- zin = point.z || 0.0;
- var v, t, i;
- var out = {};
- for (i = 0; i < 3; i++) {
- if (denorm && i === 2 && point.z === undefined) {
- continue;
- }
- if (i === 0) {
- v = xin;
- t = 'x';
- }
- else if (i === 1) {
- v = yin;
- t = 'y';
- }
- else {
- v = zin;
- t = 'z';
- }
- switch (crs.axis[i]) {
- case 'e':
- out[t] = v;
- break;
- case 'w':
- out[t] = -v;
- break;
- case 'n':
- out[t] = v;
- break;
- case 's':
- out[t] = -v;
- break;
- case 'u':
- if (point[t] !== undefined) {
- out.z = v;
- }
- break;
- case 'd':
- if (point[t] !== undefined) {
- out.z = -v;
- }
- break;
- default:
- //console.log("ERROR: unknow axis ("+crs.axis[i]+") - check definition of "+crs.projName);
- return null;
- }
- }
- return out;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/toPoint.js
- /* harmony default export */ var toPoint = (function (array){
- var out = {
- x: array[0],
- y: array[1]
- };
- if (array.length>2) {
- out.z = array[2];
- }
- if (array.length>3) {
- out.m = array[3];
- }
- return out;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/checkSanity.js
- /* harmony default export */ var checkSanity = (function (point) {
- checkCoord(point.x);
- checkCoord(point.y);
- });
- function checkCoord(num) {
- if (typeof Number.isFinite === 'function') {
- if (Number.isFinite(num)) {
- return;
- }
- throw new TypeError('coordinates must be finite numbers');
- }
- if (typeof num !== 'number' || num !== num || !isFinite(num)) {
- throw new TypeError('coordinates must be finite numbers');
- }
- }
- // CONCATENATED MODULE: ./node_modules/proj4/lib/transform.js
- function checkNotWGS(source, dest) {
- return ((source.datum.datum_type === PJD_3PARAM || source.datum.datum_type === PJD_7PARAM) && dest.datumCode !== 'WGS84') || ((dest.datum.datum_type === PJD_3PARAM || dest.datum.datum_type === PJD_7PARAM) && source.datumCode !== 'WGS84');
- }
- function transform(source, dest, point) {
- var wgs84;
- if (Array.isArray(point)) {
- point = toPoint(point);
- }
- checkSanity(point);
- // Workaround for datum shifts towgs84, if either source or destination projection is not wgs84
- if (source.datum && dest.datum && checkNotWGS(source, dest)) {
- wgs84 = new Proj('WGS84');
- point = transform(source, wgs84, point);
- source = wgs84;
- }
- // DGR, 2010/11/12
- if (source.axis !== 'enu') {
- point = adjust_axis(source, false, point);
- }
- // Transform source points to long/lat, if they aren't already.
- if (source.projName === 'longlat') {
- point = {
- x: point.x * D2R,
- y: point.y * D2R,
- z: point.z || 0
- };
- } else {
- if (source.to_meter) {
- point = {
- x: point.x * source.to_meter,
- y: point.y * source.to_meter,
- z: point.z || 0
- };
- }
- point = source.inverse(point); // Convert Cartesian to longlat
- }
- // Adjust for the prime meridian if necessary
- if (source.from_greenwich) {
- point.x += source.from_greenwich;
- }
- // Convert datums if needed, and if possible.
- point = datum_transform(source.datum, dest.datum, point);
- // Adjust for the prime meridian if necessary
- if (dest.from_greenwich) {
- point = {
- x: point.x - dest.from_greenwich,
- y: point.y,
- z: point.z || 0
- };
- }
- if (dest.projName === 'longlat') {
- // convert radians to decimal degrees
- point = {
- x: point.x * R2D,
- y: point.y * R2D,
- z: point.z || 0
- };
- } else { // else project
- point = dest.forward(point);
- if (dest.to_meter) {
- point = {
- x: point.x / dest.to_meter,
- y: point.y / dest.to_meter,
- z: point.z || 0
- };
- }
- }
- // DGR, 2010/11/12
- if (dest.axis !== 'enu') {
- return adjust_axis(dest, true, point);
- }
- return point;
- }
- // CONCATENATED MODULE: ./node_modules/proj4/lib/core.js
- var core_wgs84 = Proj('WGS84');
- function transformer(from, to, coords) {
- var transformedArray, out, keys;
- if (Array.isArray(coords)) {
- transformedArray = transform(from, to, coords) || {x: NaN, y: NaN};
- if (coords.length > 2) {
- if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) {
- if (typeof transformedArray.z === 'number') {
- return [transformedArray.x, transformedArray.y, transformedArray.z].concat(coords.splice(3));
- } else {
- return [transformedArray.x, transformedArray.y, coords[2]].concat(coords.splice(3));
- }
- } else {
- return [transformedArray.x, transformedArray.y].concat(coords.splice(2));
- }
- } else {
- return [transformedArray.x, transformedArray.y];
- }
- } else {
- out = transform(from, to, coords);
- keys = Object.keys(coords);
- if (keys.length === 2) {
- return out;
- }
- keys.forEach(function (key) {
- if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) {
- if (key === 'x' || key === 'y' || key === 'z') {
- return;
- }
- } else {
- if (key === 'x' || key === 'y') {
- return;
- }
- }
- out[key] = coords[key];
- });
- return out;
- }
- }
- function checkProj(item) {
- if (item instanceof Proj) {
- return item;
- }
- if (item.oProj) {
- return item.oProj;
- }
- return Proj(item);
- }
- function core_proj4(fromProj, toProj, coord) {
- fromProj = checkProj(fromProj);
- var single = false;
- var obj;
- if (typeof toProj === 'undefined') {
- toProj = fromProj;
- fromProj = core_wgs84;
- single = true;
- } else if (typeof toProj.x !== 'undefined' || Array.isArray(toProj)) {
- coord = toProj;
- toProj = fromProj;
- fromProj = core_wgs84;
- single = true;
- }
- toProj = checkProj(toProj);
- if (coord) {
- return transformer(fromProj, toProj, coord);
- } else {
- obj = {
- forward: function (coords) {
- return transformer(fromProj, toProj, coords);
- },
- inverse: function (coords) {
- return transformer(toProj, fromProj, coords);
- }
- };
- if (single) {
- obj.oProj = toProj;
- }
- return obj;
- }
- }
- /* harmony default export */ var core = (core_proj4);
- // CONCATENATED MODULE: ./node_modules/mgrs/mgrs.js
- /**
- * UTM zones are grouped, and assigned to one of a group of 6
- * sets.
- *
- * {int} @private
- */
- var NUM_100K_SETS = 6;
- /**
- * The column letters (for easting) of the lower left value, per
- * set.
- *
- * {string} @private
- */
- var SET_ORIGIN_COLUMN_LETTERS = 'AJSAJS';
- /**
- * The row letters (for northing) of the lower left value, per
- * set.
- *
- * {string} @private
- */
- var SET_ORIGIN_ROW_LETTERS = 'AFAFAF';
- var mgrs_A = 65; // A
- var I = 73; // I
- var O = 79; // O
- var mgrs_V = 86; // V
- var mgrs_Z = 90; // Z
- /* harmony default export */ var mgrs = ({
- forward: mgrs_forward,
- inverse: mgrs_inverse,
- toPoint: mgrs_toPoint
- });
- /**
- * Conversion of lat/lon to MGRS.
- *
- * @param {object} ll Object literal with lat and lon properties on a
- * WGS84 ellipsoid.
- * @param {int} accuracy Accuracy in digits (5 for 1 m, 4 for 10 m, 3 for
- * 100 m, 2 for 1000 m or 1 for 10000 m). Optional, default is 5.
- * @return {string} the MGRS string for the given location and accuracy.
- */
- function mgrs_forward(ll, accuracy) {
- accuracy = accuracy || 5; // default accuracy 1m
- return encode(LLtoUTM({
- lat: ll[1],
- lon: ll[0]
- }), accuracy);
- };
- /**
- * Conversion of MGRS to lat/lon.
- *
- * @param {string} mgrs MGRS string.
- * @return {array} An array with left (longitude), bottom (latitude), right
- * (longitude) and top (latitude) values in WGS84, representing the
- * bounding box for the provided MGRS reference.
- */
- function mgrs_inverse(mgrs) {
- var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
- if (bbox.lat && bbox.lon) {
- return [bbox.lon, bbox.lat, bbox.lon, bbox.lat];
- }
- return [bbox.left, bbox.bottom, bbox.right, bbox.top];
- };
- function mgrs_toPoint(mgrs) {
- var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
- if (bbox.lat && bbox.lon) {
- return [bbox.lon, bbox.lat];
- }
- return [(bbox.left + bbox.right) / 2, (bbox.top + bbox.bottom) / 2];
- };
- /**
- * Conversion from degrees to radians.
- *
- * @private
- * @param {number} deg the angle in degrees.
- * @return {number} the angle in radians.
- */
- function degToRad(deg) {
- return (deg * (Math.PI / 180.0));
- }
- /**
- * Conversion from radians to degrees.
- *
- * @private
- * @param {number} rad the angle in radians.
- * @return {number} the angle in degrees.
- */
- function radToDeg(rad) {
- return (180.0 * (rad / Math.PI));
- }
- /**
- * Converts a set of Longitude and Latitude co-ordinates to UTM
- * using the WGS84 ellipsoid.
- *
- * @private
- * @param {object} ll Object literal with lat and lon properties
- * representing the WGS84 coordinate to be converted.
- * @return {object} Object literal containing the UTM value with easting,
- * northing, zoneNumber and zoneLetter properties, and an optional
- * accuracy property in digits. Returns null if the conversion failed.
- */
- function LLtoUTM(ll) {
- var Lat = ll.lat;
- var Long = ll.lon;
- var a = 6378137.0; //ellip.radius;
- var eccSquared = 0.00669438; //ellip.eccsq;
- var k0 = 0.9996;
- var LongOrigin;
- var eccPrimeSquared;
- var N, T, C, A, M;
- var LatRad = degToRad(Lat);
- var LongRad = degToRad(Long);
- var LongOriginRad;
- var ZoneNumber;
- // (int)
- ZoneNumber = Math.floor((Long + 180) / 6) + 1;
- //Make sure the longitude 180.00 is in Zone 60
- if (Long === 180) {
- ZoneNumber = 60;
- }
- // Special zone for Norway
- if (Lat >= 56.0 && Lat < 64.0 && Long >= 3.0 && Long < 12.0) {
- ZoneNumber = 32;
- }
- // Special zones for Svalbard
- if (Lat >= 72.0 && Lat < 84.0) {
- if (Long >= 0.0 && Long < 9.0) {
- ZoneNumber = 31;
- }
- else if (Long >= 9.0 && Long < 21.0) {
- ZoneNumber = 33;
- }
- else if (Long >= 21.0 && Long < 33.0) {
- ZoneNumber = 35;
- }
- else if (Long >= 33.0 && Long < 42.0) {
- ZoneNumber = 37;
- }
- }
- LongOrigin = (ZoneNumber - 1) * 6 - 180 + 3; //+3 puts origin
- // in middle of
- // zone
- LongOriginRad = degToRad(LongOrigin);
- eccPrimeSquared = (eccSquared) / (1 - eccSquared);
- N = a / Math.sqrt(1 - eccSquared * Math.sin(LatRad) * Math.sin(LatRad));
- T = Math.tan(LatRad) * Math.tan(LatRad);
- C = eccPrimeSquared * Math.cos(LatRad) * Math.cos(LatRad);
- A = Math.cos(LatRad) * (LongRad - LongOriginRad);
- M = a * ((1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256) * LatRad - (3 * eccSquared / 8 + 3 * eccSquared * eccSquared / 32 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(2 * LatRad) + (15 * eccSquared * eccSquared / 256 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(4 * LatRad) - (35 * eccSquared * eccSquared * eccSquared / 3072) * Math.sin(6 * LatRad));
- var UTMEasting = (k0 * N * (A + (1 - T + C) * A * A * A / 6.0 + (5 - 18 * T + T * T + 72 * C - 58 * eccPrimeSquared) * A * A * A * A * A / 120.0) + 500000.0);
- var UTMNorthing = (k0 * (M + N * Math.tan(LatRad) * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24.0 + (61 - 58 * T + T * T + 600 * C - 330 * eccPrimeSquared) * A * A * A * A * A * A / 720.0)));
- if (Lat < 0.0) {
- UTMNorthing += 10000000.0; //10000000 meter offset for
- // southern hemisphere
- }
- return {
- northing: Math.round(UTMNorthing),
- easting: Math.round(UTMEasting),
- zoneNumber: ZoneNumber,
- zoneLetter: getLetterDesignator(Lat)
- };
- }
- /**
- * Converts UTM coords to lat/long, using the WGS84 ellipsoid. This is a convenience
- * class where the Zone can be specified as a single string eg."60N" which
- * is then broken down into the ZoneNumber and ZoneLetter.
- *
- * @private
- * @param {object} utm An object literal with northing, easting, zoneNumber
- * and zoneLetter properties. If an optional accuracy property is
- * provided (in meters), a bounding box will be returned instead of
- * latitude and longitude.
- * @return {object} An object literal containing either lat and lon values
- * (if no accuracy was provided), or top, right, bottom and left values
- * for the bounding box calculated according to the provided accuracy.
- * Returns null if the conversion failed.
- */
- function UTMtoLL(utm) {
- var UTMNorthing = utm.northing;
- var UTMEasting = utm.easting;
- var zoneLetter = utm.zoneLetter;
- var zoneNumber = utm.zoneNumber;
- // check the ZoneNummber is valid
- if (zoneNumber < 0 || zoneNumber > 60) {
- return null;
- }
- var k0 = 0.9996;
- var a = 6378137.0; //ellip.radius;
- var eccSquared = 0.00669438; //ellip.eccsq;
- var eccPrimeSquared;
- var e1 = (1 - Math.sqrt(1 - eccSquared)) / (1 + Math.sqrt(1 - eccSquared));
- var N1, T1, C1, R1, D, M;
- var LongOrigin;
- var mu, phi1Rad;
- // remove 500,000 meter offset for longitude
- var x = UTMEasting - 500000.0;
- var y = UTMNorthing;
- // We must know somehow if we are in the Northern or Southern
- // hemisphere, this is the only time we use the letter So even
- // if the Zone letter isn't exactly correct it should indicate
- // the hemisphere correctly
- if (zoneLetter < 'N') {
- y -= 10000000.0; // remove 10,000,000 meter offset used
- // for southern hemisphere
- }
- // There are 60 zones with zone 1 being at West -180 to -174
- LongOrigin = (zoneNumber - 1) * 6 - 180 + 3; // +3 puts origin
- // in middle of
- // zone
- eccPrimeSquared = (eccSquared) / (1 - eccSquared);
- M = y / k0;
- mu = M / (a * (1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256));
- phi1Rad = mu + (3 * e1 / 2 - 27 * e1 * e1 * e1 / 32) * Math.sin(2 * mu) + (21 * e1 * e1 / 16 - 55 * e1 * e1 * e1 * e1 / 32) * Math.sin(4 * mu) + (151 * e1 * e1 * e1 / 96) * Math.sin(6 * mu);
- // double phi1 = ProjMath.radToDeg(phi1Rad);
- N1 = a / Math.sqrt(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad));
- T1 = Math.tan(phi1Rad) * Math.tan(phi1Rad);
- C1 = eccPrimeSquared * Math.cos(phi1Rad) * Math.cos(phi1Rad);
- R1 = a * (1 - eccSquared) / Math.pow(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad), 1.5);
- D = x / (N1 * k0);
- var lat = phi1Rad - (N1 * Math.tan(phi1Rad) / R1) * (D * D / 2 - (5 + 3 * T1 + 10 * C1 - 4 * C1 * C1 - 9 * eccPrimeSquared) * D * D * D * D / 24 + (61 + 90 * T1 + 298 * C1 + 45 * T1 * T1 - 252 * eccPrimeSquared - 3 * C1 * C1) * D * D * D * D * D * D / 720);
- lat = radToDeg(lat);
- var lon = (D - (1 + 2 * T1 + C1) * D * D * D / 6 + (5 - 2 * C1 + 28 * T1 - 3 * C1 * C1 + 8 * eccPrimeSquared + 24 * T1 * T1) * D * D * D * D * D / 120) / Math.cos(phi1Rad);
- lon = LongOrigin + radToDeg(lon);
- var result;
- if (utm.accuracy) {
- var topRight = UTMtoLL({
- northing: utm.northing + utm.accuracy,
- easting: utm.easting + utm.accuracy,
- zoneLetter: utm.zoneLetter,
- zoneNumber: utm.zoneNumber
- });
- result = {
- top: topRight.lat,
- right: topRight.lon,
- bottom: lat,
- left: lon
- };
- }
- else {
- result = {
- lat: lat,
- lon: lon
- };
- }
- return result;
- }
- /**
- * Calculates the MGRS letter designator for the given latitude.
- *
- * @private
- * @param {number} lat The latitude in WGS84 to get the letter designator
- * for.
- * @return {char} The letter designator.
- */
- function getLetterDesignator(lat) {
- //This is here as an error flag to show that the Latitude is
- //outside MGRS limits
- var LetterDesignator = 'Z';
- if ((84 >= lat) && (lat >= 72)) {
- LetterDesignator = 'X';
- }
- else if ((72 > lat) && (lat >= 64)) {
- LetterDesignator = 'W';
- }
- else if ((64 > lat) && (lat >= 56)) {
- LetterDesignator = 'V';
- }
- else if ((56 > lat) && (lat >= 48)) {
- LetterDesignator = 'U';
- }
- else if ((48 > lat) && (lat >= 40)) {
- LetterDesignator = 'T';
- }
- else if ((40 > lat) && (lat >= 32)) {
- LetterDesignator = 'S';
- }
- else if ((32 > lat) && (lat >= 24)) {
- LetterDesignator = 'R';
- }
- else if ((24 > lat) && (lat >= 16)) {
- LetterDesignator = 'Q';
- }
- else if ((16 > lat) && (lat >= 8)) {
- LetterDesignator = 'P';
- }
- else if ((8 > lat) && (lat >= 0)) {
- LetterDesignator = 'N';
- }
- else if ((0 > lat) && (lat >= -8)) {
- LetterDesignator = 'M';
- }
- else if ((-8 > lat) && (lat >= -16)) {
- LetterDesignator = 'L';
- }
- else if ((-16 > lat) && (lat >= -24)) {
- LetterDesignator = 'K';
- }
- else if ((-24 > lat) && (lat >= -32)) {
- LetterDesignator = 'J';
- }
- else if ((-32 > lat) && (lat >= -40)) {
- LetterDesignator = 'H';
- }
- else if ((-40 > lat) && (lat >= -48)) {
- LetterDesignator = 'G';
- }
- else if ((-48 > lat) && (lat >= -56)) {
- LetterDesignator = 'F';
- }
- else if ((-56 > lat) && (lat >= -64)) {
- LetterDesignator = 'E';
- }
- else if ((-64 > lat) && (lat >= -72)) {
- LetterDesignator = 'D';
- }
- else if ((-72 > lat) && (lat >= -80)) {
- LetterDesignator = 'C';
- }
- return LetterDesignator;
- }
- /**
- * Encodes a UTM location as MGRS string.
- *
- * @private
- * @param {object} utm An object literal with easting, northing,
- * zoneLetter, zoneNumber
- * @param {number} accuracy Accuracy in digits (1-5).
- * @return {string} MGRS string for the given UTM location.
- */
- function encode(utm, accuracy) {
- // prepend with leading zeroes
- var seasting = "00000" + utm.easting,
- snorthing = "00000" + utm.northing;
- return utm.zoneNumber + utm.zoneLetter + get100kID(utm.easting, utm.northing, utm.zoneNumber) + seasting.substr(seasting.length - 5, accuracy) + snorthing.substr(snorthing.length - 5, accuracy);
- }
- /**
- * Get the two letter 100k designator for a given UTM easting,
- * northing and zone number value.
- *
- * @private
- * @param {number} easting
- * @param {number} northing
- * @param {number} zoneNumber
- * @return the two letter 100k designator for the given UTM location.
- */
- function get100kID(easting, northing, zoneNumber) {
- var setParm = get100kSetForZone(zoneNumber);
- var setColumn = Math.floor(easting / 100000);
- var setRow = Math.floor(northing / 100000) % 20;
- return getLetter100kID(setColumn, setRow, setParm);
- }
- /**
- * Given a UTM zone number, figure out the MGRS 100K set it is in.
- *
- * @private
- * @param {number} i An UTM zone number.
- * @return {number} the 100k set the UTM zone is in.
- */
- function get100kSetForZone(i) {
- var setParm = i % NUM_100K_SETS;
- if (setParm === 0) {
- setParm = NUM_100K_SETS;
- }
- return setParm;
- }
- /**
- * Get the two-letter MGRS 100k designator given information
- * translated from the UTM northing, easting and zone number.
- *
- * @private
- * @param {number} column the column index as it relates to the MGRS
- * 100k set spreadsheet, created from the UTM easting.
- * Values are 1-8.
- * @param {number} row the row index as it relates to the MGRS 100k set
- * spreadsheet, created from the UTM northing value. Values
- * are from 0-19.
- * @param {number} parm the set block, as it relates to the MGRS 100k set
- * spreadsheet, created from the UTM zone. Values are from
- * 1-60.
- * @return two letter MGRS 100k code.
- */
- function getLetter100kID(column, row, parm) {
- // colOrigin and rowOrigin are the letters at the origin of the set
- var index = parm - 1;
- var colOrigin = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(index);
- var rowOrigin = SET_ORIGIN_ROW_LETTERS.charCodeAt(index);
- // colInt and rowInt are the letters to build to return
- var colInt = colOrigin + column - 1;
- var rowInt = rowOrigin + row;
- var rollover = false;
- if (colInt > mgrs_Z) {
- colInt = colInt - mgrs_Z + mgrs_A - 1;
- rollover = true;
- }
- if (colInt === I || (colOrigin < I && colInt > I) || ((colInt > I || colOrigin < I) && rollover)) {
- colInt++;
- }
- if (colInt === O || (colOrigin < O && colInt > O) || ((colInt > O || colOrigin < O) && rollover)) {
- colInt++;
- if (colInt === I) {
- colInt++;
- }
- }
- if (colInt > mgrs_Z) {
- colInt = colInt - mgrs_Z + mgrs_A - 1;
- }
- if (rowInt > mgrs_V) {
- rowInt = rowInt - mgrs_V + mgrs_A - 1;
- rollover = true;
- }
- else {
- rollover = false;
- }
- if (((rowInt === I) || ((rowOrigin < I) && (rowInt > I))) || (((rowInt > I) || (rowOrigin < I)) && rollover)) {
- rowInt++;
- }
- if (((rowInt === O) || ((rowOrigin < O) && (rowInt > O))) || (((rowInt > O) || (rowOrigin < O)) && rollover)) {
- rowInt++;
- if (rowInt === I) {
- rowInt++;
- }
- }
- if (rowInt > mgrs_V) {
- rowInt = rowInt - mgrs_V + mgrs_A - 1;
- }
- var twoLetter = String.fromCharCode(colInt) + String.fromCharCode(rowInt);
- return twoLetter;
- }
- /**
- * Decode the UTM parameters from a MGRS string.
- *
- * @private
- * @param {string} mgrsString an UPPERCASE coordinate string is expected.
- * @return {object} An object literal with easting, northing, zoneLetter,
- * zoneNumber and accuracy (in meters) properties.
- */
- function decode(mgrsString) {
- if (mgrsString && mgrsString.length === 0) {
- throw ("MGRSPoint coverting from nothing");
- }
- var length = mgrsString.length;
- var hunK = null;
- var sb = "";
- var testChar;
- var i = 0;
- // get Zone number
- while (!(/[A-Z]/).test(testChar = mgrsString.charAt(i))) {
- if (i >= 2) {
- throw ("MGRSPoint bad conversion from: " + mgrsString);
- }
- sb += testChar;
- i++;
- }
- var zoneNumber = parseInt(sb, 10);
- if (i === 0 || i + 3 > length) {
- // A good MGRS string has to be 4-5 digits long,
- // ##AAA/#AAA at least.
- throw ("MGRSPoint bad conversion from: " + mgrsString);
- }
- var zoneLetter = mgrsString.charAt(i++);
- // Should we check the zone letter here? Why not.
- if (zoneLetter <= 'A' || zoneLetter === 'B' || zoneLetter === 'Y' || zoneLetter >= 'Z' || zoneLetter === 'I' || zoneLetter === 'O') {
- throw ("MGRSPoint zone letter " + zoneLetter + " not handled: " + mgrsString);
- }
- hunK = mgrsString.substring(i, i += 2);
- var set = get100kSetForZone(zoneNumber);
- var east100k = getEastingFromChar(hunK.charAt(0), set);
- var north100k = getNorthingFromChar(hunK.charAt(1), set);
- // We have a bug where the northing may be 2000000 too low.
- // How
- // do we know when to roll over?
- while (north100k < getMinNorthing(zoneLetter)) {
- north100k += 2000000;
- }
- // calculate the char index for easting/northing separator
- var remainder = length - i;
- if (remainder % 2 !== 0) {
- throw ("MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters" + mgrsString);
- }
- var sep = remainder / 2;
- var sepEasting = 0.0;
- var sepNorthing = 0.0;
- var accuracyBonus, sepEastingString, sepNorthingString, easting, northing;
- if (sep > 0) {
- accuracyBonus = 100000.0 / Math.pow(10, sep);
- sepEastingString = mgrsString.substring(i, i + sep);
- sepEasting = parseFloat(sepEastingString) * accuracyBonus;
- sepNorthingString = mgrsString.substring(i + sep);
- sepNorthing = parseFloat(sepNorthingString) * accuracyBonus;
- }
- easting = sepEasting + east100k;
- northing = sepNorthing + north100k;
- return {
- easting: easting,
- northing: northing,
- zoneLetter: zoneLetter,
- zoneNumber: zoneNumber,
- accuracy: accuracyBonus
- };
- }
- /**
- * Given the first letter from a two-letter MGRS 100k zone, and given the
- * MGRS table set for the zone number, figure out the easting value that
- * should be added to the other, secondary easting value.
- *
- * @private
- * @param {char} e The first letter from a two-letter MGRS 100´k zone.
- * @param {number} set The MGRS table set for the zone number.
- * @return {number} The easting value for the given letter and set.
- */
- function getEastingFromChar(e, set) {
- // colOrigin is the letter at the origin of the set for the
- // column
- var curCol = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(set - 1);
- var eastingValue = 100000.0;
- var rewindMarker = false;
- while (curCol !== e.charCodeAt(0)) {
- curCol++;
- if (curCol === I) {
- curCol++;
- }
- if (curCol === O) {
- curCol++;
- }
- if (curCol > mgrs_Z) {
- if (rewindMarker) {
- throw ("Bad character: " + e);
- }
- curCol = mgrs_A;
- rewindMarker = true;
- }
- eastingValue += 100000.0;
- }
- return eastingValue;
- }
- /**
- * Given the second letter from a two-letter MGRS 100k zone, and given the
- * MGRS table set for the zone number, figure out the northing value that
- * should be added to the other, secondary northing value. You have to
- * remember that Northings are determined from the equator, and the vertical
- * cycle of letters mean a 2000000 additional northing meters. This happens
- * approx. every 18 degrees of latitude. This method does *NOT* count any
- * additional northings. You have to figure out how many 2000000 meters need
- * to be added for the zone letter of the MGRS coordinate.
- *
- * @private
- * @param {char} n Second letter of the MGRS 100k zone
- * @param {number} set The MGRS table set number, which is dependent on the
- * UTM zone number.
- * @return {number} The northing value for the given letter and set.
- */
- function getNorthingFromChar(n, set) {
- if (n > 'V') {
- throw ("MGRSPoint given invalid Northing " + n);
- }
- // rowOrigin is the letter at the origin of the set for the
- // column
- var curRow = SET_ORIGIN_ROW_LETTERS.charCodeAt(set - 1);
- var northingValue = 0.0;
- var rewindMarker = false;
- while (curRow !== n.charCodeAt(0)) {
- curRow++;
- if (curRow === I) {
- curRow++;
- }
- if (curRow === O) {
- curRow++;
- }
- // fixing a bug making whole application hang in this loop
- // when 'n' is a wrong character
- if (curRow > mgrs_V) {
- if (rewindMarker) { // making sure that this loop ends
- throw ("Bad character: " + n);
- }
- curRow = mgrs_A;
- rewindMarker = true;
- }
- northingValue += 100000.0;
- }
- return northingValue;
- }
- /**
- * The function getMinNorthing returns the minimum northing value of a MGRS
- * zone.
- *
- * Ported from Geotrans' c Lattitude_Band_Value structure table.
- *
- * @private
- * @param {char} zoneLetter The MGRS zone to get the min northing for.
- * @return {number}
- */
- function getMinNorthing(zoneLetter) {
- var northing;
- switch (zoneLetter) {
- case 'C':
- northing = 1100000.0;
- break;
- case 'D':
- northing = 2000000.0;
- break;
- case 'E':
- northing = 2800000.0;
- break;
- case 'F':
- northing = 3700000.0;
- break;
- case 'G':
- northing = 4600000.0;
- break;
- case 'H':
- northing = 5500000.0;
- break;
- case 'J':
- northing = 6400000.0;
- break;
- case 'K':
- northing = 7300000.0;
- break;
- case 'L':
- northing = 8200000.0;
- break;
- case 'M':
- northing = 9100000.0;
- break;
- case 'N':
- northing = 0.0;
- break;
- case 'P':
- northing = 800000.0;
- break;
- case 'Q':
- northing = 1700000.0;
- break;
- case 'R':
- northing = 2600000.0;
- break;
- case 'S':
- northing = 3500000.0;
- break;
- case 'T':
- northing = 4400000.0;
- break;
- case 'U':
- northing = 5300000.0;
- break;
- case 'V':
- northing = 6200000.0;
- break;
- case 'W':
- northing = 7000000.0;
- break;
- case 'X':
- northing = 7900000.0;
- break;
- default:
- northing = -1.0;
- }
- if (northing >= 0.0) {
- return northing;
- }
- else {
- throw ("Invalid zone letter: " + zoneLetter);
- }
- }
- // CONCATENATED MODULE: ./node_modules/proj4/lib/Point.js
- function Point(x, y, z) {
- if (!(this instanceof Point)) {
- return new Point(x, y, z);
- }
- if (Array.isArray(x)) {
- this.x = x[0];
- this.y = x[1];
- this.z = x[2] || 0.0;
- } else if(typeof x === 'object') {
- this.x = x.x;
- this.y = x.y;
- this.z = x.z || 0.0;
- } else if (typeof x === 'string' && typeof y === 'undefined') {
- var coords = x.split(',');
- this.x = parseFloat(coords[0], 10);
- this.y = parseFloat(coords[1], 10);
- this.z = parseFloat(coords[2], 10) || 0.0;
- } else {
- this.x = x;
- this.y = y;
- this.z = z || 0.0;
- }
- console.warn('proj4.Point will be removed in version 3, use proj4.toPoint');
- }
- Point.fromMGRS = function(mgrsStr) {
- return new Point(mgrs_toPoint(mgrsStr));
- };
- Point.prototype.toMGRS = function(accuracy) {
- return mgrs_forward([this.x, this.y], accuracy);
- };
- /* harmony default export */ var lib_Point = (Point);
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/pj_enfn.js
- var C00 = 1;
- var C02 = 0.25;
- var C04 = 0.046875;
- var C06 = 0.01953125;
- var C08 = 0.01068115234375;
- var C22 = 0.75;
- var C44 = 0.46875;
- var C46 = 0.01302083333333333333;
- var C48 = 0.00712076822916666666;
- var C66 = 0.36458333333333333333;
- var C68 = 0.00569661458333333333;
- var C88 = 0.3076171875;
- /* harmony default export */ var pj_enfn = (function(es) {
- var en = [];
- en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08)));
- en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08)));
- var t = es * es;
- en[2] = t * (C44 - es * (C46 + es * C48));
- t *= es;
- en[3] = t * (C66 - es * C68);
- en[4] = t * es * C88;
- return en;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/pj_mlfn.js
- /* harmony default export */ var pj_mlfn = (function(phi, sphi, cphi, en) {
- cphi *= sphi;
- sphi *= sphi;
- return (en[0] * phi - cphi * (en[1] + sphi * (en[2] + sphi * (en[3] + sphi * en[4]))));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/pj_inv_mlfn.js
- var MAX_ITER = 20;
- /* harmony default export */ var pj_inv_mlfn = (function(arg, es, en) {
- var k = 1 / (1 - es);
- var phi = arg;
- for (var i = MAX_ITER; i; --i) { /* rarely goes over 2 iterations */
- var s = Math.sin(phi);
- var t = 1 - es * s * s;
- //t = this.pj_mlfn(phi, s, Math.cos(phi), en) - arg;
- //phi -= t * (t * Math.sqrt(t)) * k;
- t = (pj_mlfn(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k;
- phi -= t;
- if (Math.abs(t) < EPSLN) {
- return phi;
- }
- }
- //..reportError("cass:pj_inv_mlfn: Convergence error");
- return phi;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/tmerc.js
- // Heavily based on this tmerc projection implementation
- // https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/tmerc.js
- function tmerc_init() {
- this.x0 = this.x0 !== undefined ? this.x0 : 0;
- this.y0 = this.y0 !== undefined ? this.y0 : 0;
- this.long0 = this.long0 !== undefined ? this.long0 : 0;
- this.lat0 = this.lat0 !== undefined ? this.lat0 : 0;
- if (this.es) {
- this.en = pj_enfn(this.es);
- this.ml0 = pj_mlfn(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en);
- }
- }
- /**
- Transverse Mercator Forward - long/lat to x/y
- long/lat in radians
- */
- function tmerc_forward(p) {
- var lon = p.x;
- var lat = p.y;
- var delta_lon = adjust_lon(lon - this.long0);
- var con;
- var x, y;
- var sin_phi = Math.sin(lat);
- var cos_phi = Math.cos(lat);
- if (!this.es) {
- var b = cos_phi * Math.sin(delta_lon);
- if ((Math.abs(Math.abs(b) - 1)) < EPSLN) {
- return (93);
- }
- else {
- x = 0.5 * this.a * this.k0 * Math.log((1 + b) / (1 - b)) + this.x0;
- y = cos_phi * Math.cos(delta_lon) / Math.sqrt(1 - Math.pow(b, 2));
- b = Math.abs(y);
- if (b >= 1) {
- if ((b - 1) > EPSLN) {
- return (93);
- }
- else {
- y = 0;
- }
- }
- else {
- y = Math.acos(y);
- }
- if (lat < 0) {
- y = -y;
- }
- y = this.a * this.k0 * (y - this.lat0) + this.y0;
- }
- }
- else {
- var al = cos_phi * delta_lon;
- var als = Math.pow(al, 2);
- var c = this.ep2 * Math.pow(cos_phi, 2);
- var cs = Math.pow(c, 2);
- var tq = Math.abs(cos_phi) > EPSLN ? Math.tan(lat) : 0;
- var t = Math.pow(tq, 2);
- var ts = Math.pow(t, 2);
- con = 1 - this.es * Math.pow(sin_phi, 2);
- al = al / Math.sqrt(con);
- var ml = pj_mlfn(lat, sin_phi, cos_phi, this.en);
- x = this.a * (this.k0 * al * (1 +
- als / 6 * (1 - t + c +
- als / 20 * (5 - 18 * t + ts + 14 * c - 58 * t * c +
- als / 42 * (61 + 179 * ts - ts * t - 479 * t))))) +
- this.x0;
- y = this.a * (this.k0 * (ml - this.ml0 +
- sin_phi * delta_lon * al / 2 * (1 +
- als / 12 * (5 - t + 9 * c + 4 * cs +
- als / 30 * (61 + ts - 58 * t + 270 * c - 330 * t * c +
- als / 56 * (1385 + 543 * ts - ts * t - 3111 * t)))))) +
- this.y0;
- }
- p.x = x;
- p.y = y;
- return p;
- }
- /**
- Transverse Mercator Inverse - x/y to long/lat
- */
- function tmerc_inverse(p) {
- var con, phi;
- var lat, lon;
- var x = (p.x - this.x0) * (1 / this.a);
- var y = (p.y - this.y0) * (1 / this.a);
- if (!this.es) {
- var f = Math.exp(x / this.k0);
- var g = 0.5 * (f - 1 / f);
- var temp = this.lat0 + y / this.k0;
- var h = Math.cos(temp);
- con = Math.sqrt((1 - Math.pow(h, 2)) / (1 + Math.pow(g, 2)));
- lat = Math.asin(con);
- if (y < 0) {
- lat = -lat;
- }
- if ((g === 0) && (h === 0)) {
- lon = 0;
- }
- else {
- lon = adjust_lon(Math.atan2(g, h) + this.long0);
- }
- }
- else { // ellipsoidal form
- con = this.ml0 + y / this.k0;
- phi = pj_inv_mlfn(con, this.es, this.en);
- if (Math.abs(phi) < HALF_PI) {
- var sin_phi = Math.sin(phi);
- var cos_phi = Math.cos(phi);
- var tan_phi = Math.abs(cos_phi) > EPSLN ? Math.tan(phi) : 0;
- var c = this.ep2 * Math.pow(cos_phi, 2);
- var cs = Math.pow(c, 2);
- var t = Math.pow(tan_phi, 2);
- var ts = Math.pow(t, 2);
- con = 1 - this.es * Math.pow(sin_phi, 2);
- var d = x * Math.sqrt(con) / this.k0;
- var ds = Math.pow(d, 2);
- con = con * tan_phi;
- lat = phi - (con * ds / (1 - this.es)) * 0.5 * (1 -
- ds / 12 * (5 + 3 * t - 9 * c * t + c - 4 * cs -
- ds / 30 * (61 + 90 * t - 252 * c * t + 45 * ts + 46 * c -
- ds / 56 * (1385 + 3633 * t + 4095 * ts + 1574 * ts * t))));
- lon = adjust_lon(this.long0 + (d * (1 -
- ds / 6 * (1 + 2 * t + c -
- ds / 20 * (5 + 28 * t + 24 * ts + 8 * c * t + 6 * c -
- ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi));
- }
- else {
- lat = HALF_PI * sign(y);
- lon = 0;
- }
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- var tmerc_names = ["Transverse_Mercator", "Transverse Mercator", "tmerc"];
- /* harmony default export */ var tmerc = ({
- init: tmerc_init,
- forward: tmerc_forward,
- inverse: tmerc_inverse,
- names: tmerc_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/sinh.js
- /* harmony default export */ var sinh = (function(x) {
- var r = Math.exp(x);
- r = (r - 1 / r) / 2;
- return r;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/hypot.js
- /* harmony default export */ var hypot = (function(x, y) {
- x = Math.abs(x);
- y = Math.abs(y);
- var a = Math.max(x, y);
- var b = Math.min(x, y) / (a ? a : 1);
- return a * Math.sqrt(1 + Math.pow(b, 2));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/log1py.js
- /* harmony default export */ var log1py = (function(x) {
- var y = 1 + x;
- var z = y - 1;
- return z === 0 ? x : x * Math.log(y) / z;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/asinhy.js
- /* harmony default export */ var asinhy = (function(x) {
- var y = Math.abs(x);
- y = log1py(y * (1 + y / (hypot(1, y) + 1)));
- return x < 0 ? -y : y;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/gatg.js
- /* harmony default export */ var gatg = (function(pp, B) {
- var cos_2B = 2 * Math.cos(2 * B);
- var i = pp.length - 1;
- var h1 = pp[i];
- var h2 = 0;
- var h;
- while (--i >= 0) {
- h = -h2 + cos_2B * h1 + pp[i];
- h2 = h1;
- h1 = h;
- }
- return (B + h * Math.sin(2 * B));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/clens.js
- /* harmony default export */ var clens = (function(pp, arg_r) {
- var r = 2 * Math.cos(arg_r);
- var i = pp.length - 1;
- var hr1 = pp[i];
- var hr2 = 0;
- var hr;
- while (--i >= 0) {
- hr = -hr2 + r * hr1 + pp[i];
- hr2 = hr1;
- hr1 = hr;
- }
- return Math.sin(arg_r) * hr;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/cosh.js
- /* harmony default export */ var cosh = (function(x) {
- var r = Math.exp(x);
- r = (r + 1 / r) / 2;
- return r;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/clens_cmplx.js
- /* harmony default export */ var clens_cmplx = (function(pp, arg_r, arg_i) {
- var sin_arg_r = Math.sin(arg_r);
- var cos_arg_r = Math.cos(arg_r);
- var sinh_arg_i = sinh(arg_i);
- var cosh_arg_i = cosh(arg_i);
- var r = 2 * cos_arg_r * cosh_arg_i;
- var i = -2 * sin_arg_r * sinh_arg_i;
- var j = pp.length - 1;
- var hr = pp[j];
- var hi1 = 0;
- var hr1 = 0;
- var hi = 0;
- var hr2;
- var hi2;
- while (--j >= 0) {
- hr2 = hr1;
- hi2 = hi1;
- hr1 = hr;
- hi1 = hi;
- hr = -hr2 + r * hr1 - i * hi1 + pp[j];
- hi = -hi2 + i * hr1 + r * hi1;
- }
- r = sin_arg_r * cosh_arg_i;
- i = cos_arg_r * sinh_arg_i;
- return [r * hr - i * hi, r * hi + i * hr];
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/etmerc.js
- // Heavily based on this etmerc projection implementation
- // https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/etmerc.js
- function etmerc_init() {
- if (this.es === undefined || this.es <= 0) {
- throw new Error('incorrect elliptical usage');
- }
- this.x0 = this.x0 !== undefined ? this.x0 : 0;
- this.y0 = this.y0 !== undefined ? this.y0 : 0;
- this.long0 = this.long0 !== undefined ? this.long0 : 0;
- this.lat0 = this.lat0 !== undefined ? this.lat0 : 0;
- this.cgb = [];
- this.cbg = [];
- this.utg = [];
- this.gtu = [];
- var f = this.es / (1 + Math.sqrt(1 - this.es));
- var n = f / (2 - f);
- var np = n;
- this.cgb[0] = n * (2 + n * (-2 / 3 + n * (-2 + n * (116 / 45 + n * (26 / 45 + n * (-2854 / 675 ))))));
- this.cbg[0] = n * (-2 + n * ( 2 / 3 + n * ( 4 / 3 + n * (-82 / 45 + n * (32 / 45 + n * (4642 / 4725))))));
- np = np * n;
- this.cgb[1] = np * (7 / 3 + n * (-8 / 5 + n * (-227 / 45 + n * (2704 / 315 + n * (2323 / 945)))));
- this.cbg[1] = np * (5 / 3 + n * (-16 / 15 + n * ( -13 / 9 + n * (904 / 315 + n * (-1522 / 945)))));
- np = np * n;
- this.cgb[2] = np * (56 / 15 + n * (-136 / 35 + n * (-1262 / 105 + n * (73814 / 2835))));
- this.cbg[2] = np * (-26 / 15 + n * (34 / 21 + n * (8 / 5 + n * (-12686 / 2835))));
- np = np * n;
- this.cgb[3] = np * (4279 / 630 + n * (-332 / 35 + n * (-399572 / 14175)));
- this.cbg[3] = np * (1237 / 630 + n * (-12 / 5 + n * ( -24832 / 14175)));
- np = np * n;
- this.cgb[4] = np * (4174 / 315 + n * (-144838 / 6237));
- this.cbg[4] = np * (-734 / 315 + n * (109598 / 31185));
- np = np * n;
- this.cgb[5] = np * (601676 / 22275);
- this.cbg[5] = np * (444337 / 155925);
- np = Math.pow(n, 2);
- this.Qn = this.k0 / (1 + n) * (1 + np * (1 / 4 + np * (1 / 64 + np / 256)));
- this.utg[0] = n * (-0.5 + n * ( 2 / 3 + n * (-37 / 96 + n * ( 1 / 360 + n * (81 / 512 + n * (-96199 / 604800))))));
- this.gtu[0] = n * (0.5 + n * (-2 / 3 + n * (5 / 16 + n * (41 / 180 + n * (-127 / 288 + n * (7891 / 37800))))));
- this.utg[1] = np * (-1 / 48 + n * (-1 / 15 + n * (437 / 1440 + n * (-46 / 105 + n * (1118711 / 3870720)))));
- this.gtu[1] = np * (13 / 48 + n * (-3 / 5 + n * (557 / 1440 + n * (281 / 630 + n * (-1983433 / 1935360)))));
- np = np * n;
- this.utg[2] = np * (-17 / 480 + n * (37 / 840 + n * (209 / 4480 + n * (-5569 / 90720 ))));
- this.gtu[2] = np * (61 / 240 + n * (-103 / 140 + n * (15061 / 26880 + n * (167603 / 181440))));
- np = np * n;
- this.utg[3] = np * (-4397 / 161280 + n * (11 / 504 + n * (830251 / 7257600)));
- this.gtu[3] = np * (49561 / 161280 + n * (-179 / 168 + n * (6601661 / 7257600)));
- np = np * n;
- this.utg[4] = np * (-4583 / 161280 + n * (108847 / 3991680));
- this.gtu[4] = np * (34729 / 80640 + n * (-3418889 / 1995840));
- np = np * n;
- this.utg[5] = np * (-20648693 / 638668800);
- this.gtu[5] = np * (212378941 / 319334400);
- var Z = gatg(this.cbg, this.lat0);
- this.Zb = -this.Qn * (Z + clens(this.gtu, 2 * Z));
- }
- function etmerc_forward(p) {
- var Ce = adjust_lon(p.x - this.long0);
- var Cn = p.y;
- Cn = gatg(this.cbg, Cn);
- var sin_Cn = Math.sin(Cn);
- var cos_Cn = Math.cos(Cn);
- var sin_Ce = Math.sin(Ce);
- var cos_Ce = Math.cos(Ce);
- Cn = Math.atan2(sin_Cn, cos_Ce * cos_Cn);
- Ce = Math.atan2(sin_Ce * cos_Cn, hypot(sin_Cn, cos_Cn * cos_Ce));
- Ce = asinhy(Math.tan(Ce));
- var tmp = clens_cmplx(this.gtu, 2 * Cn, 2 * Ce);
- Cn = Cn + tmp[0];
- Ce = Ce + tmp[1];
- var x;
- var y;
- if (Math.abs(Ce) <= 2.623395162778) {
- x = this.a * (this.Qn * Ce) + this.x0;
- y = this.a * (this.Qn * Cn + this.Zb) + this.y0;
- }
- else {
- x = Infinity;
- y = Infinity;
- }
- p.x = x;
- p.y = y;
- return p;
- }
- function etmerc_inverse(p) {
- var Ce = (p.x - this.x0) * (1 / this.a);
- var Cn = (p.y - this.y0) * (1 / this.a);
- Cn = (Cn - this.Zb) / this.Qn;
- Ce = Ce / this.Qn;
- var lon;
- var lat;
- if (Math.abs(Ce) <= 2.623395162778) {
- var tmp = clens_cmplx(this.utg, 2 * Cn, 2 * Ce);
- Cn = Cn + tmp[0];
- Ce = Ce + tmp[1];
- Ce = Math.atan(sinh(Ce));
- var sin_Cn = Math.sin(Cn);
- var cos_Cn = Math.cos(Cn);
- var sin_Ce = Math.sin(Ce);
- var cos_Ce = Math.cos(Ce);
- Cn = Math.atan2(sin_Cn * cos_Ce, hypot(sin_Ce, cos_Ce * cos_Cn));
- Ce = Math.atan2(sin_Ce, cos_Ce * cos_Cn);
- lon = adjust_lon(Ce + this.long0);
- lat = gatg(this.cgb, Cn);
- }
- else {
- lon = Infinity;
- lat = Infinity;
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- var etmerc_names = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc"];
- /* harmony default export */ var etmerc = ({
- init: etmerc_init,
- forward: etmerc_forward,
- inverse: etmerc_inverse,
- names: etmerc_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/adjust_zone.js
- /* harmony default export */ var adjust_zone = (function(zone, lon) {
- if (zone === undefined) {
- zone = Math.floor((adjust_lon(lon) + Math.PI) * 30 / Math.PI) + 1;
- if (zone < 0) {
- return 0;
- } else if (zone > 60) {
- return 60;
- }
- }
- return zone;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/utm.js
- var dependsOn = 'etmerc';
- function utm_init() {
- var zone = adjust_zone(this.zone, this.long0);
- if (zone === undefined) {
- throw new Error('unknown utm zone');
- }
- this.lat0 = 0;
- this.long0 = ((6 * Math.abs(zone)) - 183) * D2R;
- this.x0 = 500000;
- this.y0 = this.utmSouth ? 10000000 : 0;
- this.k0 = 0.9996;
- etmerc.init.apply(this);
- this.forward = etmerc.forward;
- this.inverse = etmerc.inverse;
- }
- var utm_names = ["Universal Transverse Mercator System", "utm"];
- /* harmony default export */ var utm = ({
- init: utm_init,
- names: utm_names,
- dependsOn: dependsOn
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/srat.js
- /* harmony default export */ var srat = (function(esinp, exp) {
- return (Math.pow((1 - esinp) / (1 + esinp), exp));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/gauss.js
- var gauss_MAX_ITER = 20;
- function gauss_init() {
- var sphi = Math.sin(this.lat0);
- var cphi = Math.cos(this.lat0);
- cphi *= cphi;
- this.rc = Math.sqrt(1 - this.es) / (1 - this.es * sphi * sphi);
- this.C = Math.sqrt(1 + this.es * cphi * cphi / (1 - this.es));
- this.phic0 = Math.asin(sphi / this.C);
- this.ratexp = 0.5 * this.C * this.e;
- this.K = Math.tan(0.5 * this.phic0 + FORTPI) / (Math.pow(Math.tan(0.5 * this.lat0 + FORTPI), this.C) * srat(this.e * sphi, this.ratexp));
- }
- function gauss_forward(p) {
- var lon = p.x;
- var lat = p.y;
- p.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * lat + FORTPI), this.C) * srat(this.e * Math.sin(lat), this.ratexp)) - HALF_PI;
- p.x = this.C * lon;
- return p;
- }
- function gauss_inverse(p) {
- var DEL_TOL = 1e-14;
- var lon = p.x / this.C;
- var lat = p.y;
- var num = Math.pow(Math.tan(0.5 * lat + FORTPI) / this.K, 1 / this.C);
- for (var i = gauss_MAX_ITER; i > 0; --i) {
- lat = 2 * Math.atan(num * srat(this.e * Math.sin(p.y), - 0.5 * this.e)) - HALF_PI;
- if (Math.abs(lat - p.y) < DEL_TOL) {
- break;
- }
- p.y = lat;
- }
- /* convergence failed */
- if (!i) {
- return null;
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- var gauss_names = ["gauss"];
- /* harmony default export */ var gauss = ({
- init: gauss_init,
- forward: gauss_forward,
- inverse: gauss_inverse,
- names: gauss_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/sterea.js
- function sterea_init() {
- gauss.init.apply(this);
- if (!this.rc) {
- return;
- }
- this.sinc0 = Math.sin(this.phic0);
- this.cosc0 = Math.cos(this.phic0);
- this.R2 = 2 * this.rc;
- if (!this.title) {
- this.title = "Oblique Stereographic Alternative";
- }
- }
- function sterea_forward(p) {
- var sinc, cosc, cosl, k;
- p.x = adjust_lon(p.x - this.long0);
- gauss.forward.apply(this, [p]);
- sinc = Math.sin(p.y);
- cosc = Math.cos(p.y);
- cosl = Math.cos(p.x);
- k = this.k0 * this.R2 / (1 + this.sinc0 * sinc + this.cosc0 * cosc * cosl);
- p.x = k * cosc * Math.sin(p.x);
- p.y = k * (this.cosc0 * sinc - this.sinc0 * cosc * cosl);
- p.x = this.a * p.x + this.x0;
- p.y = this.a * p.y + this.y0;
- return p;
- }
- function sterea_inverse(p) {
- var sinc, cosc, lon, lat, rho;
- p.x = (p.x - this.x0) / this.a;
- p.y = (p.y - this.y0) / this.a;
- p.x /= this.k0;
- p.y /= this.k0;
- if ((rho = Math.sqrt(p.x * p.x + p.y * p.y))) {
- var c = 2 * Math.atan2(rho, this.R2);
- sinc = Math.sin(c);
- cosc = Math.cos(c);
- lat = Math.asin(cosc * this.sinc0 + p.y * sinc * this.cosc0 / rho);
- lon = Math.atan2(p.x * sinc, rho * this.cosc0 * cosc - p.y * this.sinc0 * sinc);
- }
- else {
- lat = this.phic0;
- lon = 0;
- }
- p.x = lon;
- p.y = lat;
- gauss.inverse.apply(this, [p]);
- p.x = adjust_lon(p.x + this.long0);
- return p;
- }
- var sterea_names = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea","Oblique Stereographic Alternative","Double_Stereographic"];
- /* harmony default export */ var sterea = ({
- init: sterea_init,
- forward: sterea_forward,
- inverse: sterea_inverse,
- names: sterea_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/stere.js
- function ssfn_(phit, sinphi, eccen) {
- sinphi *= eccen;
- return (Math.tan(0.5 * (HALF_PI + phit)) * Math.pow((1 - sinphi) / (1 + sinphi), 0.5 * eccen));
- }
- function stere_init() {
- this.coslat0 = Math.cos(this.lat0);
- this.sinlat0 = Math.sin(this.lat0);
- if (this.sphere) {
- if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) {
- this.k0 = 0.5 * (1 + sign(this.lat0) * Math.sin(this.lat_ts));
- }
- }
- else {
- if (Math.abs(this.coslat0) <= EPSLN) {
- if (this.lat0 > 0) {
- //North pole
- //trace('stere:north pole');
- this.con = 1;
- }
- else {
- //South pole
- //trace('stere:south pole');
- this.con = -1;
- }
- }
- this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e));
- if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) {
- this.k0 = 0.5 * this.cons * msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / tsfnz(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts));
- }
- this.ms1 = msfnz(this.e, this.sinlat0, this.coslat0);
- this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - HALF_PI;
- this.cosX0 = Math.cos(this.X0);
- this.sinX0 = Math.sin(this.X0);
- }
- }
- // Stereographic forward equations--mapping lat,long to x,y
- function stere_forward(p) {
- var lon = p.x;
- var lat = p.y;
- var sinlat = Math.sin(lat);
- var coslat = Math.cos(lat);
- var A, X, sinX, cosX, ts, rh;
- var dlon = adjust_lon(lon - this.long0);
- if (Math.abs(Math.abs(lon - this.long0) - Math.PI) <= EPSLN && Math.abs(lat + this.lat0) <= EPSLN) {
- //case of the origine point
- //trace('stere:this is the origin point');
- p.x = NaN;
- p.y = NaN;
- return p;
- }
- if (this.sphere) {
- //trace('stere:sphere case');
- A = 2 * this.k0 / (1 + this.sinlat0 * sinlat + this.coslat0 * coslat * Math.cos(dlon));
- p.x = this.a * A * coslat * Math.sin(dlon) + this.x0;
- p.y = this.a * A * (this.coslat0 * sinlat - this.sinlat0 * coslat * Math.cos(dlon)) + this.y0;
- return p;
- }
- else {
- X = 2 * Math.atan(this.ssfn_(lat, sinlat, this.e)) - HALF_PI;
- cosX = Math.cos(X);
- sinX = Math.sin(X);
- if (Math.abs(this.coslat0) <= EPSLN) {
- ts = tsfnz(this.e, lat * this.con, this.con * sinlat);
- rh = 2 * this.a * this.k0 * ts / this.cons;
- p.x = this.x0 + rh * Math.sin(lon - this.long0);
- p.y = this.y0 - this.con * rh * Math.cos(lon - this.long0);
- //trace(p.toString());
- return p;
- }
- else if (Math.abs(this.sinlat0) < EPSLN) {
- //Eq
- //trace('stere:equateur');
- A = 2 * this.a * this.k0 / (1 + cosX * Math.cos(dlon));
- p.y = A * sinX;
- }
- else {
- //other case
- //trace('stere:normal case');
- A = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * sinX + this.cosX0 * cosX * Math.cos(dlon)));
- p.y = A * (this.cosX0 * sinX - this.sinX0 * cosX * Math.cos(dlon)) + this.y0;
- }
- p.x = A * cosX * Math.sin(dlon) + this.x0;
- }
- //trace(p.toString());
- return p;
- }
- //* Stereographic inverse equations--mapping x,y to lat/long
- function stere_inverse(p) {
- p.x -= this.x0;
- p.y -= this.y0;
- var lon, lat, ts, ce, Chi;
- var rh = Math.sqrt(p.x * p.x + p.y * p.y);
- if (this.sphere) {
- var c = 2 * Math.atan(rh / (2 * this.a * this.k0));
- lon = this.long0;
- lat = this.lat0;
- if (rh <= EPSLN) {
- p.x = lon;
- p.y = lat;
- return p;
- }
- lat = Math.asin(Math.cos(c) * this.sinlat0 + p.y * Math.sin(c) * this.coslat0 / rh);
- if (Math.abs(this.coslat0) < EPSLN) {
- if (this.lat0 > 0) {
- lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y));
- }
- else {
- lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));
- }
- }
- else {
- lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c)));
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- else {
- if (Math.abs(this.coslat0) <= EPSLN) {
- if (rh <= EPSLN) {
- lat = this.lat0;
- lon = this.long0;
- p.x = lon;
- p.y = lat;
- //trace(p.toString());
- return p;
- }
- p.x *= this.con;
- p.y *= this.con;
- ts = rh * this.cons / (2 * this.a * this.k0);
- lat = this.con * phi2z(this.e, ts);
- lon = this.con * adjust_lon(this.con * this.long0 + Math.atan2(p.x, - 1 * p.y));
- }
- else {
- ce = 2 * Math.atan(rh * this.cosX0 / (2 * this.a * this.k0 * this.ms1));
- lon = this.long0;
- if (rh <= EPSLN) {
- Chi = this.X0;
- }
- else {
- Chi = Math.asin(Math.cos(ce) * this.sinX0 + p.y * Math.sin(ce) * this.cosX0 / rh);
- lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce)));
- }
- lat = -1 * phi2z(this.e, Math.tan(0.5 * (HALF_PI + Chi)));
- }
- }
- p.x = lon;
- p.y = lat;
- //trace(p.toString());
- return p;
- }
- var stere_names = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"];
- /* harmony default export */ var stere = ({
- init: stere_init,
- forward: stere_forward,
- inverse: stere_inverse,
- names: stere_names,
- ssfn_: ssfn_
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/somerc.js
- /*
- references:
- Formules et constantes pour le Calcul pour la
- projection cylindrique conforme à axe oblique et pour la transformation entre
- des systèmes de référence.
- http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/topics/survey/sys/refsys/switzerland.parsysrelated1.31216.downloadList.77004.DownloadFile.tmp/swissprojectionfr.pdf
- */
- function somerc_init() {
- var phy0 = this.lat0;
- this.lambda0 = this.long0;
- var sinPhy0 = Math.sin(phy0);
- var semiMajorAxis = this.a;
- var invF = this.rf;
- var flattening = 1 / invF;
- var e2 = 2 * flattening - Math.pow(flattening, 2);
- var e = this.e = Math.sqrt(e2);
- this.R = this.k0 * semiMajorAxis * Math.sqrt(1 - e2) / (1 - e2 * Math.pow(sinPhy0, 2));
- this.alpha = Math.sqrt(1 + e2 / (1 - e2) * Math.pow(Math.cos(phy0), 4));
- this.b0 = Math.asin(sinPhy0 / this.alpha);
- var k1 = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2));
- var k2 = Math.log(Math.tan(Math.PI / 4 + phy0 / 2));
- var k3 = Math.log((1 + e * sinPhy0) / (1 - e * sinPhy0));
- this.K = k1 - this.alpha * k2 + this.alpha * e / 2 * k3;
- }
- function somerc_forward(p) {
- var Sa1 = Math.log(Math.tan(Math.PI / 4 - p.y / 2));
- var Sa2 = this.e / 2 * Math.log((1 + this.e * Math.sin(p.y)) / (1 - this.e * Math.sin(p.y)));
- var S = -this.alpha * (Sa1 + Sa2) + this.K;
- // spheric latitude
- var b = 2 * (Math.atan(Math.exp(S)) - Math.PI / 4);
- // spheric longitude
- var I = this.alpha * (p.x - this.lambda0);
- // psoeudo equatorial rotation
- var rotI = Math.atan(Math.sin(I) / (Math.sin(this.b0) * Math.tan(b) + Math.cos(this.b0) * Math.cos(I)));
- var rotB = Math.asin(Math.cos(this.b0) * Math.sin(b) - Math.sin(this.b0) * Math.cos(b) * Math.cos(I));
- p.y = this.R / 2 * Math.log((1 + Math.sin(rotB)) / (1 - Math.sin(rotB))) + this.y0;
- p.x = this.R * rotI + this.x0;
- return p;
- }
- function somerc_inverse(p) {
- var Y = p.x - this.x0;
- var X = p.y - this.y0;
- var rotI = Y / this.R;
- var rotB = 2 * (Math.atan(Math.exp(X / this.R)) - Math.PI / 4);
- var b = Math.asin(Math.cos(this.b0) * Math.sin(rotB) + Math.sin(this.b0) * Math.cos(rotB) * Math.cos(rotI));
- var I = Math.atan(Math.sin(rotI) / (Math.cos(this.b0) * Math.cos(rotI) - Math.sin(this.b0) * Math.tan(rotB)));
- var lambda = this.lambda0 + I / this.alpha;
- var S = 0;
- var phy = b;
- var prevPhy = -1000;
- var iteration = 0;
- while (Math.abs(phy - prevPhy) > 0.0000001) {
- if (++iteration > 20) {
- //...reportError("omercFwdInfinity");
- return;
- }
- //S = Math.log(Math.tan(Math.PI / 4 + phy / 2));
- S = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + b / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(phy)) / 2));
- prevPhy = phy;
- phy = 2 * Math.atan(Math.exp(S)) - Math.PI / 2;
- }
- p.x = lambda;
- p.y = phy;
- return p;
- }
- var somerc_names = ["somerc"];
- /* harmony default export */ var somerc = ({
- init: somerc_init,
- forward: somerc_forward,
- inverse: somerc_inverse,
- names: somerc_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/omerc.js
- /* Initialize the Oblique Mercator projection
- ------------------------------------------*/
- function omerc_init() {
- this.no_off = this.no_off || false;
- this.no_rot = this.no_rot || false;
- if (isNaN(this.k0)) {
- this.k0 = 1;
- }
- var sinlat = Math.sin(this.lat0);
- var coslat = Math.cos(this.lat0);
- var con = this.e * sinlat;
- this.bl = Math.sqrt(1 + this.es / (1 - this.es) * Math.pow(coslat, 4));
- this.al = this.a * this.bl * this.k0 * Math.sqrt(1 - this.es) / (1 - con * con);
- var t0 = tsfnz(this.e, this.lat0, sinlat);
- var dl = this.bl / coslat * Math.sqrt((1 - this.es) / (1 - con * con));
- if (dl * dl < 1) {
- dl = 1;
- }
- var fl;
- var gl;
- if (!isNaN(this.longc)) {
- //Central point and azimuth method
- if (this.lat0 >= 0) {
- fl = dl + Math.sqrt(dl * dl - 1);
- }
- else {
- fl = dl - Math.sqrt(dl * dl - 1);
- }
- this.el = fl * Math.pow(t0, this.bl);
- gl = 0.5 * (fl - 1 / fl);
- this.gamma0 = Math.asin(Math.sin(this.alpha) / dl);
- this.long0 = this.longc - Math.asin(gl * Math.tan(this.gamma0)) / this.bl;
- }
- else {
- //2 points method
- var t1 = tsfnz(this.e, this.lat1, Math.sin(this.lat1));
- var t2 = tsfnz(this.e, this.lat2, Math.sin(this.lat2));
- if (this.lat0 >= 0) {
- this.el = (dl + Math.sqrt(dl * dl - 1)) * Math.pow(t0, this.bl);
- }
- else {
- this.el = (dl - Math.sqrt(dl * dl - 1)) * Math.pow(t0, this.bl);
- }
- var hl = Math.pow(t1, this.bl);
- var ll = Math.pow(t2, this.bl);
- fl = this.el / hl;
- gl = 0.5 * (fl - 1 / fl);
- var jl = (this.el * this.el - ll * hl) / (this.el * this.el + ll * hl);
- var pl = (ll - hl) / (ll + hl);
- var dlon12 = adjust_lon(this.long1 - this.long2);
- this.long0 = 0.5 * (this.long1 + this.long2) - Math.atan(jl * Math.tan(0.5 * this.bl * (dlon12)) / pl) / this.bl;
- this.long0 = adjust_lon(this.long0);
- var dlon10 = adjust_lon(this.long1 - this.long0);
- this.gamma0 = Math.atan(Math.sin(this.bl * (dlon10)) / gl);
- this.alpha = Math.asin(dl * Math.sin(this.gamma0));
- }
- if (this.no_off) {
- this.uc = 0;
- }
- else {
- if (this.lat0 >= 0) {
- this.uc = this.al / this.bl * Math.atan2(Math.sqrt(dl * dl - 1), Math.cos(this.alpha));
- }
- else {
- this.uc = -1 * this.al / this.bl * Math.atan2(Math.sqrt(dl * dl - 1), Math.cos(this.alpha));
- }
- }
- }
- /* Oblique Mercator forward equations--mapping lat,long to x,y
- ----------------------------------------------------------*/
- function omerc_forward(p) {
- var lon = p.x;
- var lat = p.y;
- var dlon = adjust_lon(lon - this.long0);
- var us, vs;
- var con;
- if (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) {
- if (lat > 0) {
- con = -1;
- }
- else {
- con = 1;
- }
- vs = this.al / this.bl * Math.log(Math.tan(FORTPI + con * this.gamma0 * 0.5));
- us = -1 * con * HALF_PI * this.al / this.bl;
- }
- else {
- var t = tsfnz(this.e, lat, Math.sin(lat));
- var ql = this.el / Math.pow(t, this.bl);
- var sl = 0.5 * (ql - 1 / ql);
- var tl = 0.5 * (ql + 1 / ql);
- var vl = Math.sin(this.bl * (dlon));
- var ul = (sl * Math.sin(this.gamma0) - vl * Math.cos(this.gamma0)) / tl;
- if (Math.abs(Math.abs(ul) - 1) <= EPSLN) {
- vs = Number.POSITIVE_INFINITY;
- }
- else {
- vs = 0.5 * this.al * Math.log((1 - ul) / (1 + ul)) / this.bl;
- }
- if (Math.abs(Math.cos(this.bl * (dlon))) <= EPSLN) {
- us = this.al * this.bl * (dlon);
- }
- else {
- us = this.al * Math.atan2(sl * Math.cos(this.gamma0) + vl * Math.sin(this.gamma0), Math.cos(this.bl * dlon)) / this.bl;
- }
- }
- if (this.no_rot) {
- p.x = this.x0 + us;
- p.y = this.y0 + vs;
- }
- else {
- us -= this.uc;
- p.x = this.x0 + vs * Math.cos(this.alpha) + us * Math.sin(this.alpha);
- p.y = this.y0 + us * Math.cos(this.alpha) - vs * Math.sin(this.alpha);
- }
- return p;
- }
- function omerc_inverse(p) {
- var us, vs;
- if (this.no_rot) {
- vs = p.y - this.y0;
- us = p.x - this.x0;
- }
- else {
- vs = (p.x - this.x0) * Math.cos(this.alpha) - (p.y - this.y0) * Math.sin(this.alpha);
- us = (p.y - this.y0) * Math.cos(this.alpha) + (p.x - this.x0) * Math.sin(this.alpha);
- us += this.uc;
- }
- var qp = Math.exp(-1 * this.bl * vs / this.al);
- var sp = 0.5 * (qp - 1 / qp);
- var tp = 0.5 * (qp + 1 / qp);
- var vp = Math.sin(this.bl * us / this.al);
- var up = (vp * Math.cos(this.gamma0) + sp * Math.sin(this.gamma0)) / tp;
- var ts = Math.pow(this.el / Math.sqrt((1 + up) / (1 - up)), 1 / this.bl);
- if (Math.abs(up - 1) < EPSLN) {
- p.x = this.long0;
- p.y = HALF_PI;
- }
- else if (Math.abs(up + 1) < EPSLN) {
- p.x = this.long0;
- p.y = -1 * HALF_PI;
- }
- else {
- p.y = phi2z(this.e, ts);
- p.x = adjust_lon(this.long0 - Math.atan2(sp * Math.cos(this.gamma0) - vp * Math.sin(this.gamma0), Math.cos(this.bl * us / this.al)) / this.bl);
- }
- return p;
- }
- var omerc_names = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "omerc"];
- /* harmony default export */ var omerc = ({
- init: omerc_init,
- forward: omerc_forward,
- inverse: omerc_inverse,
- names: omerc_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/lcc.js
- function lcc_init() {
- // array of: r_maj,r_min,lat1,lat2,c_lon,c_lat,false_east,false_north
- //double c_lat; /* center latitude */
- //double c_lon; /* center longitude */
- //double lat1; /* first standard parallel */
- //double lat2; /* second standard parallel */
- //double r_maj; /* major axis */
- //double r_min; /* minor axis */
- //double false_east; /* x offset in meters */
- //double false_north; /* y offset in meters */
- if (!this.lat2) {
- this.lat2 = this.lat1;
- } //if lat2 is not defined
- if (!this.k0) {
- this.k0 = 1;
- }
- this.x0 = this.x0 || 0;
- this.y0 = this.y0 || 0;
- // Standard Parallels cannot be equal and on opposite sides of the equator
- if (Math.abs(this.lat1 + this.lat2) < EPSLN) {
- return;
- }
- var temp = this.b / this.a;
- this.e = Math.sqrt(1 - temp * temp);
- var sin1 = Math.sin(this.lat1);
- var cos1 = Math.cos(this.lat1);
- var ms1 = msfnz(this.e, sin1, cos1);
- var ts1 = tsfnz(this.e, this.lat1, sin1);
- var sin2 = Math.sin(this.lat2);
- var cos2 = Math.cos(this.lat2);
- var ms2 = msfnz(this.e, sin2, cos2);
- var ts2 = tsfnz(this.e, this.lat2, sin2);
- var ts0 = tsfnz(this.e, this.lat0, Math.sin(this.lat0));
- if (Math.abs(this.lat1 - this.lat2) > EPSLN) {
- this.ns = Math.log(ms1 / ms2) / Math.log(ts1 / ts2);
- }
- else {
- this.ns = sin1;
- }
- if (isNaN(this.ns)) {
- this.ns = sin1;
- }
- this.f0 = ms1 / (this.ns * Math.pow(ts1, this.ns));
- this.rh = this.a * this.f0 * Math.pow(ts0, this.ns);
- if (!this.title) {
- this.title = "Lambert Conformal Conic";
- }
- }
- // Lambert Conformal conic forward equations--mapping lat,long to x,y
- // -----------------------------------------------------------------
- function lcc_forward(p) {
- var lon = p.x;
- var lat = p.y;
- // singular cases :
- if (Math.abs(2 * Math.abs(lat) - Math.PI) <= EPSLN) {
- lat = sign(lat) * (HALF_PI - 2 * EPSLN);
- }
- var con = Math.abs(Math.abs(lat) - HALF_PI);
- var ts, rh1;
- if (con > EPSLN) {
- ts = tsfnz(this.e, lat, Math.sin(lat));
- rh1 = this.a * this.f0 * Math.pow(ts, this.ns);
- }
- else {
- con = lat * this.ns;
- if (con <= 0) {
- return null;
- }
- rh1 = 0;
- }
- var theta = this.ns * adjust_lon(lon - this.long0);
- p.x = this.k0 * (rh1 * Math.sin(theta)) + this.x0;
- p.y = this.k0 * (this.rh - rh1 * Math.cos(theta)) + this.y0;
- return p;
- }
- // Lambert Conformal Conic inverse equations--mapping x,y to lat/long
- // -----------------------------------------------------------------
- function lcc_inverse(p) {
- var rh1, con, ts;
- var lat, lon;
- var x = (p.x - this.x0) / this.k0;
- var y = (this.rh - (p.y - this.y0) / this.k0);
- if (this.ns > 0) {
- rh1 = Math.sqrt(x * x + y * y);
- con = 1;
- }
- else {
- rh1 = -Math.sqrt(x * x + y * y);
- con = -1;
- }
- var theta = 0;
- if (rh1 !== 0) {
- theta = Math.atan2((con * x), (con * y));
- }
- if ((rh1 !== 0) || (this.ns > 0)) {
- con = 1 / this.ns;
- ts = Math.pow((rh1 / (this.a * this.f0)), con);
- lat = phi2z(this.e, ts);
- if (lat === -9999) {
- return null;
- }
- }
- else {
- lat = -HALF_PI;
- }
- lon = adjust_lon(theta / this.ns + this.long0);
- p.x = lon;
- p.y = lat;
- return p;
- }
- var lcc_names = ["Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_2SP", "lcc"];
- /* harmony default export */ var lcc = ({
- init: lcc_init,
- forward: lcc_forward,
- inverse: lcc_inverse,
- names: lcc_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/krovak.js
- function krovak_init() {
- this.a = 6377397.155;
- this.es = 0.006674372230614;
- this.e = Math.sqrt(this.es);
- if (!this.lat0) {
- this.lat0 = 0.863937979737193;
- }
- if (!this.long0) {
- this.long0 = 0.7417649320975901 - 0.308341501185665;
- }
- /* if scale not set default to 0.9999 */
- if (!this.k0) {
- this.k0 = 0.9999;
- }
- this.s45 = 0.785398163397448; /* 45 */
- this.s90 = 2 * this.s45;
- this.fi0 = this.lat0;
- this.e2 = this.es;
- this.e = Math.sqrt(this.e2);
- this.alfa = Math.sqrt(1 + (this.e2 * Math.pow(Math.cos(this.fi0), 4)) / (1 - this.e2));
- this.uq = 1.04216856380474;
- this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa);
- this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2);
- this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g;
- this.k1 = this.k0;
- this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2));
- this.s0 = 1.37008346281555;
- this.n = Math.sin(this.s0);
- this.ro0 = this.k1 * this.n0 / Math.tan(this.s0);
- this.ad = this.s90 - this.uq;
- }
- /* ellipsoid */
- /* calculate xy from lat/lon */
- /* Constants, identical to inverse transform function */
- function krovak_forward(p) {
- var gfi, u, deltav, s, d, eps, ro;
- var lon = p.x;
- var lat = p.y;
- var delta_lon = adjust_lon(lon - this.long0);
- /* Transformation */
- gfi = Math.pow(((1 + this.e * Math.sin(lat)) / (1 - this.e * Math.sin(lat))), (this.alfa * this.e / 2));
- u = 2 * (Math.atan(this.k * Math.pow(Math.tan(lat / 2 + this.s45), this.alfa) / gfi) - this.s45);
- deltav = -delta_lon * this.alfa;
- s = Math.asin(Math.cos(this.ad) * Math.sin(u) + Math.sin(this.ad) * Math.cos(u) * Math.cos(deltav));
- d = Math.asin(Math.cos(u) * Math.sin(deltav) / Math.cos(s));
- eps = this.n * d;
- ro = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n);
- p.y = ro * Math.cos(eps) / 1;
- p.x = ro * Math.sin(eps) / 1;
- if (!this.czech) {
- p.y *= -1;
- p.x *= -1;
- }
- return (p);
- }
- /* calculate lat/lon from xy */
- function krovak_inverse(p) {
- var u, deltav, s, d, eps, ro, fi1;
- var ok;
- /* Transformation */
- /* revert y, x*/
- var tmp = p.x;
- p.x = p.y;
- p.y = tmp;
- if (!this.czech) {
- p.y *= -1;
- p.x *= -1;
- }
- ro = Math.sqrt(p.x * p.x + p.y * p.y);
- eps = Math.atan2(p.y, p.x);
- d = eps / Math.sin(this.s0);
- s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);
- u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));
- deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));
- p.x = this.long0 - deltav / this.alfa;
- fi1 = u;
- ok = 0;
- var iter = 0;
- do {
- p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);
- if (Math.abs(fi1 - p.y) < 0.0000000001) {
- ok = 1;
- }
- fi1 = p.y;
- iter += 1;
- } while (ok === 0 && iter < 15);
- if (iter >= 15) {
- return null;
- }
- return (p);
- }
- var krovak_names = ["Krovak", "krovak"];
- /* harmony default export */ var krovak = ({
- init: krovak_init,
- forward: krovak_forward,
- inverse: krovak_inverse,
- names: krovak_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/mlfn.js
- /* harmony default export */ var mlfn = (function(e0, e1, e2, e3, phi) {
- return (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/e0fn.js
- /* harmony default export */ var e0fn = (function(x) {
- return (1 - 0.25 * x * (1 + x / 16 * (3 + 1.25 * x)));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/e1fn.js
- /* harmony default export */ var e1fn = (function(x) {
- return (0.375 * x * (1 + 0.25 * x * (1 + 0.46875 * x)));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/e2fn.js
- /* harmony default export */ var e2fn = (function(x) {
- return (0.05859375 * x * x * (1 + 0.75 * x));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/e3fn.js
- /* harmony default export */ var e3fn = (function(x) {
- return (x * x * x * (35 / 3072));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/gN.js
- /* harmony default export */ var gN = (function(a, e, sinphi) {
- var temp = e * sinphi;
- return a / Math.sqrt(1 - temp * temp);
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/adjust_lat.js
- /* harmony default export */ var adjust_lat = (function(x) {
- return (Math.abs(x) < HALF_PI) ? x : (x - (sign(x) * Math.PI));
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/imlfn.js
- /* harmony default export */ var imlfn = (function(ml, e0, e1, e2, e3) {
- var phi;
- var dphi;
- phi = ml / e0;
- for (var i = 0; i < 15; i++) {
- dphi = (ml - (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi))) / (e0 - 2 * e1 * Math.cos(2 * phi) + 4 * e2 * Math.cos(4 * phi) - 6 * e3 * Math.cos(6 * phi));
- phi += dphi;
- if (Math.abs(dphi) <= 0.0000000001) {
- return phi;
- }
- }
- //..reportError("IMLFN-CONV:Latitude failed to converge after 15 iterations");
- return NaN;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/cass.js
- function cass_init() {
- if (!this.sphere) {
- this.e0 = e0fn(this.es);
- this.e1 = e1fn(this.es);
- this.e2 = e2fn(this.es);
- this.e3 = e3fn(this.es);
- this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0);
- }
- }
- /* Cassini forward equations--mapping lat,long to x,y
- -----------------------------------------------------------------------*/
- function cass_forward(p) {
- /* Forward equations
- -----------------*/
- var x, y;
- var lam = p.x;
- var phi = p.y;
- lam = adjust_lon(lam - this.long0);
- if (this.sphere) {
- x = this.a * Math.asin(Math.cos(phi) * Math.sin(lam));
- y = this.a * (Math.atan2(Math.tan(phi), Math.cos(lam)) - this.lat0);
- }
- else {
- //ellipsoid
- var sinphi = Math.sin(phi);
- var cosphi = Math.cos(phi);
- var nl = gN(this.a, this.e, sinphi);
- var tl = Math.tan(phi) * Math.tan(phi);
- var al = lam * Math.cos(phi);
- var asq = al * al;
- var cl = this.es * cosphi * cosphi / (1 - this.es);
- var ml = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi);
- x = nl * al * (1 - asq * tl * (1 / 6 - (8 - tl + 8 * cl) * asq / 120));
- y = ml - this.ml0 + nl * sinphi / cosphi * asq * (0.5 + (5 - tl + 6 * cl) * asq / 24);
- }
- p.x = x + this.x0;
- p.y = y + this.y0;
- return p;
- }
- /* Inverse equations
- -----------------*/
- function cass_inverse(p) {
- p.x -= this.x0;
- p.y -= this.y0;
- var x = p.x / this.a;
- var y = p.y / this.a;
- var phi, lam;
- if (this.sphere) {
- var dd = y + this.lat0;
- phi = Math.asin(Math.sin(dd) * Math.cos(x));
- lam = Math.atan2(Math.tan(x), Math.cos(dd));
- }
- else {
- /* ellipsoid */
- var ml1 = this.ml0 / this.a + y;
- var phi1 = imlfn(ml1, this.e0, this.e1, this.e2, this.e3);
- if (Math.abs(Math.abs(phi1) - HALF_PI) <= EPSLN) {
- p.x = this.long0;
- p.y = HALF_PI;
- if (y < 0) {
- p.y *= -1;
- }
- return p;
- }
- var nl1 = gN(this.a, this.e, Math.sin(phi1));
- var rl1 = nl1 * nl1 * nl1 / this.a / this.a * (1 - this.es);
- var tl1 = Math.pow(Math.tan(phi1), 2);
- var dl = x * this.a / nl1;
- var dsq = dl * dl;
- phi = phi1 - nl1 * Math.tan(phi1) / rl1 * dl * dl * (0.5 - (1 + 3 * tl1) * dl * dl / 24);
- lam = dl * (1 - dsq * (tl1 / 3 + (1 + 3 * tl1) * tl1 * dsq / 15)) / Math.cos(phi1);
- }
- p.x = adjust_lon(lam + this.long0);
- p.y = adjust_lat(phi);
- return p;
- }
- var cass_names = ["Cassini", "Cassini_Soldner", "cass"];
- /* harmony default export */ var cass = ({
- init: cass_init,
- forward: cass_forward,
- inverse: cass_inverse,
- names: cass_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/qsfnz.js
- /* harmony default export */ var qsfnz = (function(eccent, sinphi) {
- var con;
- if (eccent > 1.0e-7) {
- con = eccent * sinphi;
- return ((1 - eccent * eccent) * (sinphi / (1 - con * con) - (0.5 / eccent) * Math.log((1 - con) / (1 + con))));
- }
- else {
- return (2 * sinphi);
- }
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/laea.js
- /*
- reference
- "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder,
- The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355.
- */
- var S_POLE = 1;
- var N_POLE = 2;
- var EQUIT = 3;
- var OBLIQ = 4;
- /* Initialize the Lambert Azimuthal Equal Area projection
- ------------------------------------------------------*/
- function laea_init() {
- var t = Math.abs(this.lat0);
- if (Math.abs(t - HALF_PI) < EPSLN) {
- this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE;
- }
- else if (Math.abs(t) < EPSLN) {
- this.mode = this.EQUIT;
- }
- else {
- this.mode = this.OBLIQ;
- }
- if (this.es > 0) {
- var sinphi;
- this.qp = qsfnz(this.e, 1);
- this.mmf = 0.5 / (1 - this.es);
- this.apa = authset(this.es);
- switch (this.mode) {
- case this.N_POLE:
- this.dd = 1;
- break;
- case this.S_POLE:
- this.dd = 1;
- break;
- case this.EQUIT:
- this.rq = Math.sqrt(0.5 * this.qp);
- this.dd = 1 / this.rq;
- this.xmf = 1;
- this.ymf = 0.5 * this.qp;
- break;
- case this.OBLIQ:
- this.rq = Math.sqrt(0.5 * this.qp);
- sinphi = Math.sin(this.lat0);
- this.sinb1 = qsfnz(this.e, sinphi) / this.qp;
- this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1);
- this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * sinphi * sinphi) * this.rq * this.cosb1);
- this.ymf = (this.xmf = this.rq) / this.dd;
- this.xmf *= this.dd;
- break;
- }
- }
- else {
- if (this.mode === this.OBLIQ) {
- this.sinph0 = Math.sin(this.lat0);
- this.cosph0 = Math.cos(this.lat0);
- }
- }
- }
- /* Lambert Azimuthal Equal Area forward equations--mapping lat,long to x,y
- -----------------------------------------------------------------------*/
- function laea_forward(p) {
- /* Forward equations
- -----------------*/
- var x, y, coslam, sinlam, sinphi, q, sinb, cosb, b, cosphi;
- var lam = p.x;
- var phi = p.y;
- lam = adjust_lon(lam - this.long0);
- if (this.sphere) {
- sinphi = Math.sin(phi);
- cosphi = Math.cos(phi);
- coslam = Math.cos(lam);
- if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
- y = (this.mode === this.EQUIT) ? 1 + cosphi * coslam : 1 + this.sinph0 * sinphi + this.cosph0 * cosphi * coslam;
- if (y <= EPSLN) {
- return null;
- }
- y = Math.sqrt(2 / y);
- x = y * cosphi * Math.sin(lam);
- y *= (this.mode === this.EQUIT) ? sinphi : this.cosph0 * sinphi - this.sinph0 * cosphi * coslam;
- }
- else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
- if (this.mode === this.N_POLE) {
- coslam = -coslam;
- }
- if (Math.abs(phi + this.phi0) < EPSLN) {
- return null;
- }
- y = FORTPI - phi * 0.5;
- y = 2 * ((this.mode === this.S_POLE) ? Math.cos(y) : Math.sin(y));
- x = y * Math.sin(lam);
- y *= coslam;
- }
- }
- else {
- sinb = 0;
- cosb = 0;
- b = 0;
- coslam = Math.cos(lam);
- sinlam = Math.sin(lam);
- sinphi = Math.sin(phi);
- q = qsfnz(this.e, sinphi);
- if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
- sinb = q / this.qp;
- cosb = Math.sqrt(1 - sinb * sinb);
- }
- switch (this.mode) {
- case this.OBLIQ:
- b = 1 + this.sinb1 * sinb + this.cosb1 * cosb * coslam;
- break;
- case this.EQUIT:
- b = 1 + cosb * coslam;
- break;
- case this.N_POLE:
- b = HALF_PI + phi;
- q = this.qp - q;
- break;
- case this.S_POLE:
- b = phi - HALF_PI;
- q = this.qp + q;
- break;
- }
- if (Math.abs(b) < EPSLN) {
- return null;
- }
- switch (this.mode) {
- case this.OBLIQ:
- case this.EQUIT:
- b = Math.sqrt(2 / b);
- if (this.mode === this.OBLIQ) {
- y = this.ymf * b * (this.cosb1 * sinb - this.sinb1 * cosb * coslam);
- }
- else {
- y = (b = Math.sqrt(2 / (1 + cosb * coslam))) * sinb * this.ymf;
- }
- x = this.xmf * b * cosb * sinlam;
- break;
- case this.N_POLE:
- case this.S_POLE:
- if (q >= 0) {
- x = (b = Math.sqrt(q)) * sinlam;
- y = coslam * ((this.mode === this.S_POLE) ? b : -b);
- }
- else {
- x = y = 0;
- }
- break;
- }
- }
- p.x = this.a * x + this.x0;
- p.y = this.a * y + this.y0;
- return p;
- }
- /* Inverse equations
- -----------------*/
- function laea_inverse(p) {
- p.x -= this.x0;
- p.y -= this.y0;
- var x = p.x / this.a;
- var y = p.y / this.a;
- var lam, phi, cCe, sCe, q, rho, ab;
- if (this.sphere) {
- var cosz = 0,
- rh, sinz = 0;
- rh = Math.sqrt(x * x + y * y);
- phi = rh * 0.5;
- if (phi > 1) {
- return null;
- }
- phi = 2 * Math.asin(phi);
- if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
- sinz = Math.sin(phi);
- cosz = Math.cos(phi);
- }
- switch (this.mode) {
- case this.EQUIT:
- phi = (Math.abs(rh) <= EPSLN) ? 0 : Math.asin(y * sinz / rh);
- x *= sinz;
- y = cosz * rh;
- break;
- case this.OBLIQ:
- phi = (Math.abs(rh) <= EPSLN) ? this.phi0 : Math.asin(cosz * this.sinph0 + y * sinz * this.cosph0 / rh);
- x *= sinz * this.cosph0;
- y = (cosz - Math.sin(phi) * this.sinph0) * rh;
- break;
- case this.N_POLE:
- y = -y;
- phi = HALF_PI - phi;
- break;
- case this.S_POLE:
- phi -= HALF_PI;
- break;
- }
- lam = (y === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ)) ? 0 : Math.atan2(x, y);
- }
- else {
- ab = 0;
- if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
- x /= this.dd;
- y *= this.dd;
- rho = Math.sqrt(x * x + y * y);
- if (rho < EPSLN) {
- p.x = 0;
- p.y = this.phi0;
- return p;
- }
- sCe = 2 * Math.asin(0.5 * rho / this.rq);
- cCe = Math.cos(sCe);
- x *= (sCe = Math.sin(sCe));
- if (this.mode === this.OBLIQ) {
- ab = cCe * this.sinb1 + y * sCe * this.cosb1 / rho;
- q = this.qp * ab;
- y = rho * this.cosb1 * cCe - y * this.sinb1 * sCe;
- }
- else {
- ab = y * sCe / rho;
- q = this.qp * ab;
- y = rho * cCe;
- }
- }
- else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
- if (this.mode === this.N_POLE) {
- y = -y;
- }
- q = (x * x + y * y);
- if (!q) {
- p.x = 0;
- p.y = this.phi0;
- return p;
- }
- ab = 1 - q / this.qp;
- if (this.mode === this.S_POLE) {
- ab = -ab;
- }
- }
- lam = Math.atan2(x, y);
- phi = authlat(Math.asin(ab), this.apa);
- }
- p.x = adjust_lon(this.long0 + lam);
- p.y = phi;
- return p;
- }
- /* determine latitude from authalic latitude */
- var P00 = 0.33333333333333333333;
- var P01 = 0.17222222222222222222;
- var P02 = 0.10257936507936507936;
- var P10 = 0.06388888888888888888;
- var P11 = 0.06640211640211640211;
- var P20 = 0.01641501294219154443;
- function authset(es) {
- var t;
- var APA = [];
- APA[0] = es * P00;
- t = es * es;
- APA[0] += t * P01;
- APA[1] = t * P10;
- t *= es;
- APA[0] += t * P02;
- APA[1] += t * P11;
- APA[2] = t * P20;
- return APA;
- }
- function authlat(beta, APA) {
- var t = beta + beta;
- return (beta + APA[0] * Math.sin(t) + APA[1] * Math.sin(t + t) + APA[2] * Math.sin(t + t + t));
- }
- var laea_names = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"];
- /* harmony default export */ var laea = ({
- init: laea_init,
- forward: laea_forward,
- inverse: laea_inverse,
- names: laea_names,
- S_POLE: S_POLE,
- N_POLE: N_POLE,
- EQUIT: EQUIT,
- OBLIQ: OBLIQ
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/asinz.js
- /* harmony default export */ var asinz = (function(x) {
- if (Math.abs(x) > 1) {
- x = (x > 1) ? 1 : -1;
- }
- return Math.asin(x);
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/aea.js
- function aea_init() {
- if (Math.abs(this.lat1 + this.lat2) < EPSLN) {
- return;
- }
- this.temp = this.b / this.a;
- this.es = 1 - Math.pow(this.temp, 2);
- this.e3 = Math.sqrt(this.es);
- this.sin_po = Math.sin(this.lat1);
- this.cos_po = Math.cos(this.lat1);
- this.t1 = this.sin_po;
- this.con = this.sin_po;
- this.ms1 = msfnz(this.e3, this.sin_po, this.cos_po);
- this.qs1 = qsfnz(this.e3, this.sin_po, this.cos_po);
- this.sin_po = Math.sin(this.lat2);
- this.cos_po = Math.cos(this.lat2);
- this.t2 = this.sin_po;
- this.ms2 = msfnz(this.e3, this.sin_po, this.cos_po);
- this.qs2 = qsfnz(this.e3, this.sin_po, this.cos_po);
- this.sin_po = Math.sin(this.lat0);
- this.cos_po = Math.cos(this.lat0);
- this.t3 = this.sin_po;
- this.qs0 = qsfnz(this.e3, this.sin_po, this.cos_po);
- if (Math.abs(this.lat1 - this.lat2) > EPSLN) {
- this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1);
- }
- else {
- this.ns0 = this.con;
- }
- this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1;
- this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0;
- }
- /* Albers Conical Equal Area forward equations--mapping lat,long to x,y
- -------------------------------------------------------------------*/
- function aea_forward(p) {
- var lon = p.x;
- var lat = p.y;
- this.sin_phi = Math.sin(lat);
- this.cos_phi = Math.cos(lat);
- var qs = qsfnz(this.e3, this.sin_phi, this.cos_phi);
- var rh1 = this.a * Math.sqrt(this.c - this.ns0 * qs) / this.ns0;
- var theta = this.ns0 * adjust_lon(lon - this.long0);
- var x = rh1 * Math.sin(theta) + this.x0;
- var y = this.rh - rh1 * Math.cos(theta) + this.y0;
- p.x = x;
- p.y = y;
- return p;
- }
- function aea_inverse(p) {
- var rh1, qs, con, theta, lon, lat;
- p.x -= this.x0;
- p.y = this.rh - p.y + this.y0;
- if (this.ns0 >= 0) {
- rh1 = Math.sqrt(p.x * p.x + p.y * p.y);
- con = 1;
- }
- else {
- rh1 = -Math.sqrt(p.x * p.x + p.y * p.y);
- con = -1;
- }
- theta = 0;
- if (rh1 !== 0) {
- theta = Math.atan2(con * p.x, con * p.y);
- }
- con = rh1 * this.ns0 / this.a;
- if (this.sphere) {
- lat = Math.asin((this.c - con * con) / (2 * this.ns0));
- }
- else {
- qs = (this.c - con * con) / this.ns0;
- lat = this.phi1z(this.e3, qs);
- }
- lon = adjust_lon(theta / this.ns0 + this.long0);
- p.x = lon;
- p.y = lat;
- return p;
- }
- /* Function to compute phi1, the latitude for the inverse of the
- Albers Conical Equal-Area projection.
- -------------------------------------------*/
- function phi1z(eccent, qs) {
- var sinphi, cosphi, con, com, dphi;
- var phi = asinz(0.5 * qs);
- if (eccent < EPSLN) {
- return phi;
- }
- var eccnts = eccent * eccent;
- for (var i = 1; i <= 25; i++) {
- sinphi = Math.sin(phi);
- cosphi = Math.cos(phi);
- con = eccent * sinphi;
- com = 1 - con * con;
- dphi = 0.5 * com * com / cosphi * (qs / (1 - eccnts) - sinphi / com + 0.5 / eccent * Math.log((1 - con) / (1 + con)));
- phi = phi + dphi;
- if (Math.abs(dphi) <= 1e-7) {
- return phi;
- }
- }
- return null;
- }
- var aea_names = ["Albers_Conic_Equal_Area", "Albers", "aea"];
- /* harmony default export */ var aea = ({
- init: aea_init,
- forward: aea_forward,
- inverse: aea_inverse,
- names: aea_names,
- phi1z: phi1z
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/gnom.js
- /*
- reference:
- Wolfram Mathworld "Gnomonic Projection"
- http://mathworld.wolfram.com/GnomonicProjection.html
- Accessed: 12th November 2009
- */
- function gnom_init() {
- /* Place parameters in static storage for common use
- -------------------------------------------------*/
- this.sin_p14 = Math.sin(this.lat0);
- this.cos_p14 = Math.cos(this.lat0);
- // Approximation for projecting points to the horizon (infinity)
- this.infinity_dist = 1000 * this.a;
- this.rc = 1;
- }
- /* Gnomonic forward equations--mapping lat,long to x,y
- ---------------------------------------------------*/
- function gnom_forward(p) {
- var sinphi, cosphi; /* sin and cos value */
- var dlon; /* delta longitude value */
- var coslon; /* cos of longitude */
- var ksp; /* scale factor */
- var g;
- var x, y;
- var lon = p.x;
- var lat = p.y;
- /* Forward equations
- -----------------*/
- dlon = adjust_lon(lon - this.long0);
- sinphi = Math.sin(lat);
- cosphi = Math.cos(lat);
- coslon = Math.cos(dlon);
- g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon;
- ksp = 1;
- if ((g > 0) || (Math.abs(g) <= EPSLN)) {
- x = this.x0 + this.a * ksp * cosphi * Math.sin(dlon) / g;
- y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon) / g;
- }
- else {
- // Point is in the opposing hemisphere and is unprojectable
- // We still need to return a reasonable point, so we project
- // to infinity, on a bearing
- // equivalent to the northern hemisphere equivalent
- // This is a reasonable approximation for short shapes and lines that
- // straddle the horizon.
- x = this.x0 + this.infinity_dist * cosphi * Math.sin(dlon);
- y = this.y0 + this.infinity_dist * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);
- }
- p.x = x;
- p.y = y;
- return p;
- }
- function gnom_inverse(p) {
- var rh; /* Rho */
- var sinc, cosc;
- var c;
- var lon, lat;
- /* Inverse equations
- -----------------*/
- p.x = (p.x - this.x0) / this.a;
- p.y = (p.y - this.y0) / this.a;
- p.x /= this.k0;
- p.y /= this.k0;
- if ((rh = Math.sqrt(p.x * p.x + p.y * p.y))) {
- c = Math.atan2(rh, this.rc);
- sinc = Math.sin(c);
- cosc = Math.cos(c);
- lat = asinz(cosc * this.sin_p14 + (p.y * sinc * this.cos_p14) / rh);
- lon = Math.atan2(p.x * sinc, rh * this.cos_p14 * cosc - p.y * this.sin_p14 * sinc);
- lon = adjust_lon(this.long0 + lon);
- }
- else {
- lat = this.phic0;
- lon = 0;
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- var gnom_names = ["gnom"];
- /* harmony default export */ var gnom = ({
- init: gnom_init,
- forward: gnom_forward,
- inverse: gnom_inverse,
- names: gnom_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/common/iqsfnz.js
- /* harmony default export */ var iqsfnz = (function(eccent, q) {
- var temp = 1 - (1 - eccent * eccent) / (2 * eccent) * Math.log((1 - eccent) / (1 + eccent));
- if (Math.abs(Math.abs(q) - temp) < 1.0E-6) {
- if (q < 0) {
- return (-1 * HALF_PI);
- }
- else {
- return HALF_PI;
- }
- }
- //var phi = 0.5* q/(1-eccent*eccent);
- var phi = Math.asin(0.5 * q);
- var dphi;
- var sin_phi;
- var cos_phi;
- var con;
- for (var i = 0; i < 30; i++) {
- sin_phi = Math.sin(phi);
- cos_phi = Math.cos(phi);
- con = eccent * sin_phi;
- dphi = Math.pow(1 - con * con, 2) / (2 * cos_phi) * (q / (1 - eccent * eccent) - sin_phi / (1 - con * con) + 0.5 / eccent * Math.log((1 - con) / (1 + con)));
- phi += dphi;
- if (Math.abs(dphi) <= 0.0000000001) {
- return phi;
- }
- }
- //console.log("IQSFN-CONV:Latitude failed to converge after 30 iterations");
- return NaN;
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/cea.js
- /*
- reference:
- "Cartographic Projection Procedures for the UNIX Environment-
- A User's Manual" by Gerald I. Evenden,
- USGS Open File Report 90-284and Release 4 Interim Reports (2003)
- */
- function cea_init() {
- //no-op
- if (!this.sphere) {
- this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts));
- }
- }
- /* Cylindrical Equal Area forward equations--mapping lat,long to x,y
- ------------------------------------------------------------*/
- function cea_forward(p) {
- var lon = p.x;
- var lat = p.y;
- var x, y;
- /* Forward equations
- -----------------*/
- var dlon = adjust_lon(lon - this.long0);
- if (this.sphere) {
- x = this.x0 + this.a * dlon * Math.cos(this.lat_ts);
- y = this.y0 + this.a * Math.sin(lat) / Math.cos(this.lat_ts);
- }
- else {
- var qs = qsfnz(this.e, Math.sin(lat));
- x = this.x0 + this.a * this.k0 * dlon;
- y = this.y0 + this.a * qs * 0.5 / this.k0;
- }
- p.x = x;
- p.y = y;
- return p;
- }
- /* Cylindrical Equal Area inverse equations--mapping x,y to lat/long
- ------------------------------------------------------------*/
- function cea_inverse(p) {
- p.x -= this.x0;
- p.y -= this.y0;
- var lon, lat;
- if (this.sphere) {
- lon = adjust_lon(this.long0 + (p.x / this.a) / Math.cos(this.lat_ts));
- lat = Math.asin((p.y / this.a) * Math.cos(this.lat_ts));
- }
- else {
- lat = iqsfnz(this.e, 2 * p.y * this.k0 / this.a);
- lon = adjust_lon(this.long0 + p.x / (this.a * this.k0));
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- var cea_names = ["cea"];
- /* harmony default export */ var cea = ({
- init: cea_init,
- forward: cea_forward,
- inverse: cea_inverse,
- names: cea_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/eqc.js
- function eqc_init() {
- this.x0 = this.x0 || 0;
- this.y0 = this.y0 || 0;
- this.lat0 = this.lat0 || 0;
- this.long0 = this.long0 || 0;
- this.lat_ts = this.lat_ts || 0;
- this.title = this.title || "Equidistant Cylindrical (Plate Carre)";
- this.rc = Math.cos(this.lat_ts);
- }
- // forward equations--mapping lat,long to x,y
- // -----------------------------------------------------------------
- function eqc_forward(p) {
- var lon = p.x;
- var lat = p.y;
- var dlon = adjust_lon(lon - this.long0);
- var dlat = adjust_lat(lat - this.lat0);
- p.x = this.x0 + (this.a * dlon * this.rc);
- p.y = this.y0 + (this.a * dlat);
- return p;
- }
- // inverse equations--mapping x,y to lat/long
- // -----------------------------------------------------------------
- function eqc_inverse(p) {
- var x = p.x;
- var y = p.y;
- p.x = adjust_lon(this.long0 + ((x - this.x0) / (this.a * this.rc)));
- p.y = adjust_lat(this.lat0 + ((y - this.y0) / (this.a)));
- return p;
- }
- var eqc_names = ["Equirectangular", "Equidistant_Cylindrical", "eqc"];
- /* harmony default export */ var eqc = ({
- init: eqc_init,
- forward: eqc_forward,
- inverse: eqc_inverse,
- names: eqc_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/poly.js
- var poly_MAX_ITER = 20;
- function poly_init() {
- /* Place parameters in static storage for common use
- -------------------------------------------------*/
- this.temp = this.b / this.a;
- this.es = 1 - Math.pow(this.temp, 2); // devait etre dans tmerc.js mais n y est pas donc je commente sinon retour de valeurs nulles
- this.e = Math.sqrt(this.es);
- this.e0 = e0fn(this.es);
- this.e1 = e1fn(this.es);
- this.e2 = e2fn(this.es);
- this.e3 = e3fn(this.es);
- this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0); //si que des zeros le calcul ne se fait pas
- }
- /* Polyconic forward equations--mapping lat,long to x,y
- ---------------------------------------------------*/
- function poly_forward(p) {
- var lon = p.x;
- var lat = p.y;
- var x, y, el;
- var dlon = adjust_lon(lon - this.long0);
- el = dlon * Math.sin(lat);
- if (this.sphere) {
- if (Math.abs(lat) <= EPSLN) {
- x = this.a * dlon;
- y = -1 * this.a * this.lat0;
- }
- else {
- x = this.a * Math.sin(el) / Math.tan(lat);
- y = this.a * (adjust_lat(lat - this.lat0) + (1 - Math.cos(el)) / Math.tan(lat));
- }
- }
- else {
- if (Math.abs(lat) <= EPSLN) {
- x = this.a * dlon;
- y = -1 * this.ml0;
- }
- else {
- var nl = gN(this.a, this.e, Math.sin(lat)) / Math.tan(lat);
- x = nl * Math.sin(el);
- y = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, lat) - this.ml0 + nl * (1 - Math.cos(el));
- }
- }
- p.x = x + this.x0;
- p.y = y + this.y0;
- return p;
- }
- /* Inverse equations
- -----------------*/
- function poly_inverse(p) {
- var lon, lat, x, y, i;
- var al, bl;
- var phi, dphi;
- x = p.x - this.x0;
- y = p.y - this.y0;
- if (this.sphere) {
- if (Math.abs(y + this.a * this.lat0) <= EPSLN) {
- lon = adjust_lon(x / this.a + this.long0);
- lat = 0;
- }
- else {
- al = this.lat0 + y / this.a;
- bl = x * x / this.a / this.a + al * al;
- phi = al;
- var tanphi;
- for (i = poly_MAX_ITER; i; --i) {
- tanphi = Math.tan(phi);
- dphi = -1 * (al * (phi * tanphi + 1) - phi - 0.5 * (phi * phi + bl) * tanphi) / ((phi - al) / tanphi - 1);
- phi += dphi;
- if (Math.abs(dphi) <= EPSLN) {
- lat = phi;
- break;
- }
- }
- lon = adjust_lon(this.long0 + (Math.asin(x * Math.tan(phi) / this.a)) / Math.sin(lat));
- }
- }
- else {
- if (Math.abs(y + this.ml0) <= EPSLN) {
- lat = 0;
- lon = adjust_lon(this.long0 + x / this.a);
- }
- else {
- al = (this.ml0 + y) / this.a;
- bl = x * x / this.a / this.a + al * al;
- phi = al;
- var cl, mln, mlnp, ma;
- var con;
- for (i = poly_MAX_ITER; i; --i) {
- con = this.e * Math.sin(phi);
- cl = Math.sqrt(1 - con * con) * Math.tan(phi);
- mln = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi);
- mlnp = this.e0 - 2 * this.e1 * Math.cos(2 * phi) + 4 * this.e2 * Math.cos(4 * phi) - 6 * this.e3 * Math.cos(6 * phi);
- ma = mln / this.a;
- dphi = (al * (cl * ma + 1) - ma - 0.5 * cl * (ma * ma + bl)) / (this.es * Math.sin(2 * phi) * (ma * ma + bl - 2 * al * ma) / (4 * cl) + (al - ma) * (cl * mlnp - 2 / Math.sin(2 * phi)) - mlnp);
- phi -= dphi;
- if (Math.abs(dphi) <= EPSLN) {
- lat = phi;
- break;
- }
- }
- //lat=phi4z(this.e,this.e0,this.e1,this.e2,this.e3,al,bl,0,0);
- cl = Math.sqrt(1 - this.es * Math.pow(Math.sin(lat), 2)) * Math.tan(lat);
- lon = adjust_lon(this.long0 + Math.asin(x * cl / this.a) / Math.sin(lat));
- }
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- var poly_names = ["Polyconic", "poly"];
- /* harmony default export */ var poly = ({
- init: poly_init,
- forward: poly_forward,
- inverse: poly_inverse,
- names: poly_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/nzmg.js
- /*
- reference
- Department of Land and Survey Technical Circular 1973/32
- http://www.linz.govt.nz/docs/miscellaneous/nz-map-definition.pdf
- OSG Technical Report 4.1
- http://www.linz.govt.nz/docs/miscellaneous/nzmg.pdf
- */
- /**
- * iterations: Number of iterations to refine inverse transform.
- * 0 -> km accuracy
- * 1 -> m accuracy -- suitable for most mapping applications
- * 2 -> mm accuracy
- */
- var iterations = 1;
- function nzmg_init() {
- this.A = [];
- this.A[1] = 0.6399175073;
- this.A[2] = -0.1358797613;
- this.A[3] = 0.063294409;
- this.A[4] = -0.02526853;
- this.A[5] = 0.0117879;
- this.A[6] = -0.0055161;
- this.A[7] = 0.0026906;
- this.A[8] = -0.001333;
- this.A[9] = 0.00067;
- this.A[10] = -0.00034;
- this.B_re = [];
- this.B_im = [];
- this.B_re[1] = 0.7557853228;
- this.B_im[1] = 0;
- this.B_re[2] = 0.249204646;
- this.B_im[2] = 0.003371507;
- this.B_re[3] = -0.001541739;
- this.B_im[3] = 0.041058560;
- this.B_re[4] = -0.10162907;
- this.B_im[4] = 0.01727609;
- this.B_re[5] = -0.26623489;
- this.B_im[5] = -0.36249218;
- this.B_re[6] = -0.6870983;
- this.B_im[6] = -1.1651967;
- this.C_re = [];
- this.C_im = [];
- this.C_re[1] = 1.3231270439;
- this.C_im[1] = 0;
- this.C_re[2] = -0.577245789;
- this.C_im[2] = -0.007809598;
- this.C_re[3] = 0.508307513;
- this.C_im[3] = -0.112208952;
- this.C_re[4] = -0.15094762;
- this.C_im[4] = 0.18200602;
- this.C_re[5] = 1.01418179;
- this.C_im[5] = 1.64497696;
- this.C_re[6] = 1.9660549;
- this.C_im[6] = 2.5127645;
- this.D = [];
- this.D[1] = 1.5627014243;
- this.D[2] = 0.5185406398;
- this.D[3] = -0.03333098;
- this.D[4] = -0.1052906;
- this.D[5] = -0.0368594;
- this.D[6] = 0.007317;
- this.D[7] = 0.01220;
- this.D[8] = 0.00394;
- this.D[9] = -0.0013;
- }
- /**
- New Zealand Map Grid Forward - long/lat to x/y
- long/lat in radians
- */
- function nzmg_forward(p) {
- var n;
- var lon = p.x;
- var lat = p.y;
- var delta_lat = lat - this.lat0;
- var delta_lon = lon - this.long0;
- // 1. Calculate d_phi and d_psi ... // and d_lambda
- // For this algorithm, delta_latitude is in seconds of arc x 10-5, so we need to scale to those units. Longitude is radians.
- var d_phi = delta_lat / SEC_TO_RAD * 1E-5;
- var d_lambda = delta_lon;
- var d_phi_n = 1; // d_phi^0
- var d_psi = 0;
- for (n = 1; n <= 10; n++) {
- d_phi_n = d_phi_n * d_phi;
- d_psi = d_psi + this.A[n] * d_phi_n;
- }
- // 2. Calculate theta
- var th_re = d_psi;
- var th_im = d_lambda;
- // 3. Calculate z
- var th_n_re = 1;
- var th_n_im = 0; // theta^0
- var th_n_re1;
- var th_n_im1;
- var z_re = 0;
- var z_im = 0;
- for (n = 1; n <= 6; n++) {
- th_n_re1 = th_n_re * th_re - th_n_im * th_im;
- th_n_im1 = th_n_im * th_re + th_n_re * th_im;
- th_n_re = th_n_re1;
- th_n_im = th_n_im1;
- z_re = z_re + this.B_re[n] * th_n_re - this.B_im[n] * th_n_im;
- z_im = z_im + this.B_im[n] * th_n_re + this.B_re[n] * th_n_im;
- }
- // 4. Calculate easting and northing
- p.x = (z_im * this.a) + this.x0;
- p.y = (z_re * this.a) + this.y0;
- return p;
- }
- /**
- New Zealand Map Grid Inverse - x/y to long/lat
- */
- function nzmg_inverse(p) {
- var n;
- var x = p.x;
- var y = p.y;
- var delta_x = x - this.x0;
- var delta_y = y - this.y0;
- // 1. Calculate z
- var z_re = delta_y / this.a;
- var z_im = delta_x / this.a;
- // 2a. Calculate theta - first approximation gives km accuracy
- var z_n_re = 1;
- var z_n_im = 0; // z^0
- var z_n_re1;
- var z_n_im1;
- var th_re = 0;
- var th_im = 0;
- for (n = 1; n <= 6; n++) {
- z_n_re1 = z_n_re * z_re - z_n_im * z_im;
- z_n_im1 = z_n_im * z_re + z_n_re * z_im;
- z_n_re = z_n_re1;
- z_n_im = z_n_im1;
- th_re = th_re + this.C_re[n] * z_n_re - this.C_im[n] * z_n_im;
- th_im = th_im + this.C_im[n] * z_n_re + this.C_re[n] * z_n_im;
- }
- // 2b. Iterate to refine the accuracy of the calculation
- // 0 iterations gives km accuracy
- // 1 iteration gives m accuracy -- good enough for most mapping applications
- // 2 iterations bives mm accuracy
- for (var i = 0; i < this.iterations; i++) {
- var th_n_re = th_re;
- var th_n_im = th_im;
- var th_n_re1;
- var th_n_im1;
- var num_re = z_re;
- var num_im = z_im;
- for (n = 2; n <= 6; n++) {
- th_n_re1 = th_n_re * th_re - th_n_im * th_im;
- th_n_im1 = th_n_im * th_re + th_n_re * th_im;
- th_n_re = th_n_re1;
- th_n_im = th_n_im1;
- num_re = num_re + (n - 1) * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im);
- num_im = num_im + (n - 1) * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im);
- }
- th_n_re = 1;
- th_n_im = 0;
- var den_re = this.B_re[1];
- var den_im = this.B_im[1];
- for (n = 2; n <= 6; n++) {
- th_n_re1 = th_n_re * th_re - th_n_im * th_im;
- th_n_im1 = th_n_im * th_re + th_n_re * th_im;
- th_n_re = th_n_re1;
- th_n_im = th_n_im1;
- den_re = den_re + n * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im);
- den_im = den_im + n * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im);
- }
- // Complex division
- var den2 = den_re * den_re + den_im * den_im;
- th_re = (num_re * den_re + num_im * den_im) / den2;
- th_im = (num_im * den_re - num_re * den_im) / den2;
- }
- // 3. Calculate d_phi ... // and d_lambda
- var d_psi = th_re;
- var d_lambda = th_im;
- var d_psi_n = 1; // d_psi^0
- var d_phi = 0;
- for (n = 1; n <= 9; n++) {
- d_psi_n = d_psi_n * d_psi;
- d_phi = d_phi + this.D[n] * d_psi_n;
- }
- // 4. Calculate latitude and longitude
- // d_phi is calcuated in second of arc * 10^-5, so we need to scale back to radians. d_lambda is in radians.
- var lat = this.lat0 + (d_phi * SEC_TO_RAD * 1E5);
- var lon = this.long0 + d_lambda;
- p.x = lon;
- p.y = lat;
- return p;
- }
- var nzmg_names = ["New_Zealand_Map_Grid", "nzmg"];
- /* harmony default export */ var nzmg = ({
- init: nzmg_init,
- forward: nzmg_forward,
- inverse: nzmg_inverse,
- names: nzmg_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/mill.js
- /*
- reference
- "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder,
- The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355.
- */
- /* Initialize the Miller Cylindrical projection
- -------------------------------------------*/
- function mill_init() {
- //no-op
- }
- /* Miller Cylindrical forward equations--mapping lat,long to x,y
- ------------------------------------------------------------*/
- function mill_forward(p) {
- var lon = p.x;
- var lat = p.y;
- /* Forward equations
- -----------------*/
- var dlon = adjust_lon(lon - this.long0);
- var x = this.x0 + this.a * dlon;
- var y = this.y0 + this.a * Math.log(Math.tan((Math.PI / 4) + (lat / 2.5))) * 1.25;
- p.x = x;
- p.y = y;
- return p;
- }
- /* Miller Cylindrical inverse equations--mapping x,y to lat/long
- ------------------------------------------------------------*/
- function mill_inverse(p) {
- p.x -= this.x0;
- p.y -= this.y0;
- var lon = adjust_lon(this.long0 + p.x / this.a);
- var lat = 2.5 * (Math.atan(Math.exp(0.8 * p.y / this.a)) - Math.PI / 4);
- p.x = lon;
- p.y = lat;
- return p;
- }
- var mill_names = ["Miller_Cylindrical", "mill"];
- /* harmony default export */ var mill = ({
- init: mill_init,
- forward: mill_forward,
- inverse: mill_inverse,
- names: mill_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/sinu.js
- var sinu_MAX_ITER = 20;
- function sinu_init() {
- /* Place parameters in static storage for common use
- -------------------------------------------------*/
- if (!this.sphere) {
- this.en = pj_enfn(this.es);
- }
- else {
- this.n = 1;
- this.m = 0;
- this.es = 0;
- this.C_y = Math.sqrt((this.m + 1) / this.n);
- this.C_x = this.C_y / (this.m + 1);
- }
- }
- /* Sinusoidal forward equations--mapping lat,long to x,y
- -----------------------------------------------------*/
- function sinu_forward(p) {
- var x, y;
- var lon = p.x;
- var lat = p.y;
- /* Forward equations
- -----------------*/
- lon = adjust_lon(lon - this.long0);
- if (this.sphere) {
- if (!this.m) {
- lat = this.n !== 1 ? Math.asin(this.n * Math.sin(lat)) : lat;
- }
- else {
- var k = this.n * Math.sin(lat);
- for (var i = sinu_MAX_ITER; i; --i) {
- var V = (this.m * lat + Math.sin(lat) - k) / (this.m + Math.cos(lat));
- lat -= V;
- if (Math.abs(V) < EPSLN) {
- break;
- }
- }
- }
- x = this.a * this.C_x * lon * (this.m + Math.cos(lat));
- y = this.a * this.C_y * lat;
- }
- else {
- var s = Math.sin(lat);
- var c = Math.cos(lat);
- y = this.a * pj_mlfn(lat, s, c, this.en);
- x = this.a * lon * c / Math.sqrt(1 - this.es * s * s);
- }
- p.x = x;
- p.y = y;
- return p;
- }
- function sinu_inverse(p) {
- var lat, temp, lon, s;
- p.x -= this.x0;
- lon = p.x / this.a;
- p.y -= this.y0;
- lat = p.y / this.a;
- if (this.sphere) {
- lat /= this.C_y;
- lon = lon / (this.C_x * (this.m + Math.cos(lat)));
- if (this.m) {
- lat = asinz((this.m * lat + Math.sin(lat)) / this.n);
- }
- else if (this.n !== 1) {
- lat = asinz(Math.sin(lat) / this.n);
- }
- lon = adjust_lon(lon + this.long0);
- lat = adjust_lat(lat);
- }
- else {
- lat = pj_inv_mlfn(p.y / this.a, this.es, this.en);
- s = Math.abs(lat);
- if (s < HALF_PI) {
- s = Math.sin(lat);
- temp = this.long0 + p.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(lat));
- //temp = this.long0 + p.x / (this.a * Math.cos(lat));
- lon = adjust_lon(temp);
- }
- else if ((s - EPSLN) < HALF_PI) {
- lon = this.long0;
- }
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- var sinu_names = ["Sinusoidal", "sinu"];
- /* harmony default export */ var sinu = ({
- init: sinu_init,
- forward: sinu_forward,
- inverse: sinu_inverse,
- names: sinu_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/moll.js
- function moll_init() {}
- /* Mollweide forward equations--mapping lat,long to x,y
- ----------------------------------------------------*/
- function moll_forward(p) {
- /* Forward equations
- -----------------*/
- var lon = p.x;
- var lat = p.y;
- var delta_lon = adjust_lon(lon - this.long0);
- var theta = lat;
- var con = Math.PI * Math.sin(lat);
- /* Iterate using the Newton-Raphson method to find theta
- -----------------------------------------------------*/
- while (true) {
- var delta_theta = -(theta + Math.sin(theta) - con) / (1 + Math.cos(theta));
- theta += delta_theta;
- if (Math.abs(delta_theta) < EPSLN) {
- break;
- }
- }
- theta /= 2;
- /* If the latitude is 90 deg, force the x coordinate to be "0 + false easting"
- this is done here because of precision problems with "cos(theta)"
- --------------------------------------------------------------------------*/
- if (Math.PI / 2 - Math.abs(lat) < EPSLN) {
- delta_lon = 0;
- }
- var x = 0.900316316158 * this.a * delta_lon * Math.cos(theta) + this.x0;
- var y = 1.4142135623731 * this.a * Math.sin(theta) + this.y0;
- p.x = x;
- p.y = y;
- return p;
- }
- function moll_inverse(p) {
- var theta;
- var arg;
- /* Inverse equations
- -----------------*/
- p.x -= this.x0;
- p.y -= this.y0;
- arg = p.y / (1.4142135623731 * this.a);
- /* Because of division by zero problems, 'arg' can not be 1. Therefore
- a number very close to one is used instead.
- -------------------------------------------------------------------*/
- if (Math.abs(arg) > 0.999999999999) {
- arg = 0.999999999999;
- }
- theta = Math.asin(arg);
- var lon = adjust_lon(this.long0 + (p.x / (0.900316316158 * this.a * Math.cos(theta))));
- if (lon < (-Math.PI)) {
- lon = -Math.PI;
- }
- if (lon > Math.PI) {
- lon = Math.PI;
- }
- arg = (2 * theta + Math.sin(2 * theta)) / Math.PI;
- if (Math.abs(arg) > 1) {
- arg = 1;
- }
- var lat = Math.asin(arg);
- p.x = lon;
- p.y = lat;
- return p;
- }
- var moll_names = ["Mollweide", "moll"];
- /* harmony default export */ var moll = ({
- init: moll_init,
- forward: moll_forward,
- inverse: moll_inverse,
- names: moll_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/eqdc.js
- function eqdc_init() {
- /* Place parameters in static storage for common use
- -------------------------------------------------*/
- // Standard Parallels cannot be equal and on opposite sides of the equator
- if (Math.abs(this.lat1 + this.lat2) < EPSLN) {
- return;
- }
- this.lat2 = this.lat2 || this.lat1;
- this.temp = this.b / this.a;
- this.es = 1 - Math.pow(this.temp, 2);
- this.e = Math.sqrt(this.es);
- this.e0 = e0fn(this.es);
- this.e1 = e1fn(this.es);
- this.e2 = e2fn(this.es);
- this.e3 = e3fn(this.es);
- this.sinphi = Math.sin(this.lat1);
- this.cosphi = Math.cos(this.lat1);
- this.ms1 = msfnz(this.e, this.sinphi, this.cosphi);
- this.ml1 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat1);
- if (Math.abs(this.lat1 - this.lat2) < EPSLN) {
- this.ns = this.sinphi;
- }
- else {
- this.sinphi = Math.sin(this.lat2);
- this.cosphi = Math.cos(this.lat2);
- this.ms2 = msfnz(this.e, this.sinphi, this.cosphi);
- this.ml2 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat2);
- this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1);
- }
- this.g = this.ml1 + this.ms1 / this.ns;
- this.ml0 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0);
- this.rh = this.a * (this.g - this.ml0);
- }
- /* Equidistant Conic forward equations--mapping lat,long to x,y
- -----------------------------------------------------------*/
- function eqdc_forward(p) {
- var lon = p.x;
- var lat = p.y;
- var rh1;
- /* Forward equations
- -----------------*/
- if (this.sphere) {
- rh1 = this.a * (this.g - lat);
- }
- else {
- var ml = mlfn(this.e0, this.e1, this.e2, this.e3, lat);
- rh1 = this.a * (this.g - ml);
- }
- var theta = this.ns * adjust_lon(lon - this.long0);
- var x = this.x0 + rh1 * Math.sin(theta);
- var y = this.y0 + this.rh - rh1 * Math.cos(theta);
- p.x = x;
- p.y = y;
- return p;
- }
- /* Inverse equations
- -----------------*/
- function eqdc_inverse(p) {
- p.x -= this.x0;
- p.y = this.rh - p.y + this.y0;
- var con, rh1, lat, lon;
- if (this.ns >= 0) {
- rh1 = Math.sqrt(p.x * p.x + p.y * p.y);
- con = 1;
- }
- else {
- rh1 = -Math.sqrt(p.x * p.x + p.y * p.y);
- con = -1;
- }
- var theta = 0;
- if (rh1 !== 0) {
- theta = Math.atan2(con * p.x, con * p.y);
- }
- if (this.sphere) {
- lon = adjust_lon(this.long0 + theta / this.ns);
- lat = adjust_lat(this.g - rh1 / this.a);
- p.x = lon;
- p.y = lat;
- return p;
- }
- else {
- var ml = this.g - rh1 / this.a;
- lat = imlfn(ml, this.e0, this.e1, this.e2, this.e3);
- lon = adjust_lon(this.long0 + theta / this.ns);
- p.x = lon;
- p.y = lat;
- return p;
- }
- }
- var eqdc_names = ["Equidistant_Conic", "eqdc"];
- /* harmony default export */ var eqdc = ({
- init: eqdc_init,
- forward: eqdc_forward,
- inverse: eqdc_inverse,
- names: eqdc_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/vandg.js
- /* Initialize the Van Der Grinten projection
- ----------------------------------------*/
- function vandg_init() {
- //this.R = 6370997; //Radius of earth
- this.R = this.a;
- }
- function vandg_forward(p) {
- var lon = p.x;
- var lat = p.y;
- /* Forward equations
- -----------------*/
- var dlon = adjust_lon(lon - this.long0);
- var x, y;
- if (Math.abs(lat) <= EPSLN) {
- x = this.x0 + this.R * dlon;
- y = this.y0;
- }
- var theta = asinz(2 * Math.abs(lat / Math.PI));
- if ((Math.abs(dlon) <= EPSLN) || (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN)) {
- x = this.x0;
- if (lat >= 0) {
- y = this.y0 + Math.PI * this.R * Math.tan(0.5 * theta);
- }
- else {
- y = this.y0 + Math.PI * this.R * -Math.tan(0.5 * theta);
- }
- // return(OK);
- }
- var al = 0.5 * Math.abs((Math.PI / dlon) - (dlon / Math.PI));
- var asq = al * al;
- var sinth = Math.sin(theta);
- var costh = Math.cos(theta);
- var g = costh / (sinth + costh - 1);
- var gsq = g * g;
- var m = g * (2 / sinth - 1);
- var msq = m * m;
- var con = Math.PI * this.R * (al * (g - msq) + Math.sqrt(asq * (g - msq) * (g - msq) - (msq + asq) * (gsq - msq))) / (msq + asq);
- if (dlon < 0) {
- con = -con;
- }
- x = this.x0 + con;
- //con = Math.abs(con / (Math.PI * this.R));
- var q = asq + g;
- con = Math.PI * this.R * (m * q - al * Math.sqrt((msq + asq) * (asq + 1) - q * q)) / (msq + asq);
- if (lat >= 0) {
- //y = this.y0 + Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con);
- y = this.y0 + con;
- }
- else {
- //y = this.y0 - Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con);
- y = this.y0 - con;
- }
- p.x = x;
- p.y = y;
- return p;
- }
- /* Van Der Grinten inverse equations--mapping x,y to lat/long
- ---------------------------------------------------------*/
- function vandg_inverse(p) {
- var lon, lat;
- var xx, yy, xys, c1, c2, c3;
- var a1;
- var m1;
- var con;
- var th1;
- var d;
- /* inverse equations
- -----------------*/
- p.x -= this.x0;
- p.y -= this.y0;
- con = Math.PI * this.R;
- xx = p.x / con;
- yy = p.y / con;
- xys = xx * xx + yy * yy;
- c1 = -Math.abs(yy) * (1 + xys);
- c2 = c1 - 2 * yy * yy + xx * xx;
- c3 = -2 * c1 + 1 + 2 * yy * yy + xys * xys;
- d = yy * yy / c3 + (2 * c2 * c2 * c2 / c3 / c3 / c3 - 9 * c1 * c2 / c3 / c3) / 27;
- a1 = (c1 - c2 * c2 / 3 / c3) / c3;
- m1 = 2 * Math.sqrt(-a1 / 3);
- con = ((3 * d) / a1) / m1;
- if (Math.abs(con) > 1) {
- if (con >= 0) {
- con = 1;
- }
- else {
- con = -1;
- }
- }
- th1 = Math.acos(con) / 3;
- if (p.y >= 0) {
- lat = (-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI;
- }
- else {
- lat = -(-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI;
- }
- if (Math.abs(xx) < EPSLN) {
- lon = this.long0;
- }
- else {
- lon = adjust_lon(this.long0 + Math.PI * (xys - 1 + Math.sqrt(1 + 2 * (xx * xx - yy * yy) + xys * xys)) / 2 / xx);
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- var vandg_names = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"];
- /* harmony default export */ var vandg = ({
- init: vandg_init,
- forward: vandg_forward,
- inverse: vandg_inverse,
- names: vandg_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/aeqd.js
- function aeqd_init() {
- this.sin_p12 = Math.sin(this.lat0);
- this.cos_p12 = Math.cos(this.lat0);
- }
- function aeqd_forward(p) {
- var lon = p.x;
- var lat = p.y;
- var sinphi = Math.sin(p.y);
- var cosphi = Math.cos(p.y);
- var dlon = adjust_lon(lon - this.long0);
- var e0, e1, e2, e3, Mlp, Ml, tanphi, Nl1, Nl, psi, Az, G, H, GH, Hs, c, kp, cos_c, s, s2, s3, s4, s5;
- if (this.sphere) {
- if (Math.abs(this.sin_p12 - 1) <= EPSLN) {
- //North Pole case
- p.x = this.x0 + this.a * (HALF_PI - lat) * Math.sin(dlon);
- p.y = this.y0 - this.a * (HALF_PI - lat) * Math.cos(dlon);
- return p;
- }
- else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {
- //South Pole case
- p.x = this.x0 + this.a * (HALF_PI + lat) * Math.sin(dlon);
- p.y = this.y0 + this.a * (HALF_PI + lat) * Math.cos(dlon);
- return p;
- }
- else {
- //default case
- cos_c = this.sin_p12 * sinphi + this.cos_p12 * cosphi * Math.cos(dlon);
- c = Math.acos(cos_c);
- kp = c / Math.sin(c);
- p.x = this.x0 + this.a * kp * cosphi * Math.sin(dlon);
- p.y = this.y0 + this.a * kp * (this.cos_p12 * sinphi - this.sin_p12 * cosphi * Math.cos(dlon));
- return p;
- }
- }
- else {
- e0 = e0fn(this.es);
- e1 = e1fn(this.es);
- e2 = e2fn(this.es);
- e3 = e3fn(this.es);
- if (Math.abs(this.sin_p12 - 1) <= EPSLN) {
- //North Pole case
- Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
- Ml = this.a * mlfn(e0, e1, e2, e3, lat);
- p.x = this.x0 + (Mlp - Ml) * Math.sin(dlon);
- p.y = this.y0 - (Mlp - Ml) * Math.cos(dlon);
- return p;
- }
- else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {
- //South Pole case
- Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
- Ml = this.a * mlfn(e0, e1, e2, e3, lat);
- p.x = this.x0 + (Mlp + Ml) * Math.sin(dlon);
- p.y = this.y0 + (Mlp + Ml) * Math.cos(dlon);
- return p;
- }
- else {
- //Default case
- tanphi = sinphi / cosphi;
- Nl1 = gN(this.a, this.e, this.sin_p12);
- Nl = gN(this.a, this.e, sinphi);
- psi = Math.atan((1 - this.es) * tanphi + this.es * Nl1 * this.sin_p12 / (Nl * cosphi));
- Az = Math.atan2(Math.sin(dlon), this.cos_p12 * Math.tan(psi) - this.sin_p12 * Math.cos(dlon));
- if (Az === 0) {
- s = Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi));
- }
- else if (Math.abs(Math.abs(Az) - Math.PI) <= EPSLN) {
- s = -Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi));
- }
- else {
- s = Math.asin(Math.sin(dlon) * Math.cos(psi) / Math.sin(Az));
- }
- G = this.e * this.sin_p12 / Math.sqrt(1 - this.es);
- H = this.e * this.cos_p12 * Math.cos(Az) / Math.sqrt(1 - this.es);
- GH = G * H;
- Hs = H * H;
- s2 = s * s;
- s3 = s2 * s;
- s4 = s3 * s;
- s5 = s4 * s;
- c = Nl1 * s * (1 - s2 * Hs * (1 - Hs) / 6 + s3 / 8 * GH * (1 - 2 * Hs) + s4 / 120 * (Hs * (4 - 7 * Hs) - 3 * G * G * (1 - 7 * Hs)) - s5 / 48 * GH);
- p.x = this.x0 + c * Math.sin(Az);
- p.y = this.y0 + c * Math.cos(Az);
- return p;
- }
- }
- }
- function aeqd_inverse(p) {
- p.x -= this.x0;
- p.y -= this.y0;
- var rh, z, sinz, cosz, lon, lat, con, e0, e1, e2, e3, Mlp, M, N1, psi, Az, cosAz, tmp, A, B, D, Ee, F;
- if (this.sphere) {
- rh = Math.sqrt(p.x * p.x + p.y * p.y);
- if (rh > (2 * HALF_PI * this.a)) {
- return;
- }
- z = rh / this.a;
- sinz = Math.sin(z);
- cosz = Math.cos(z);
- lon = this.long0;
- if (Math.abs(rh) <= EPSLN) {
- lat = this.lat0;
- }
- else {
- lat = asinz(cosz * this.sin_p12 + (p.y * sinz * this.cos_p12) / rh);
- con = Math.abs(this.lat0) - HALF_PI;
- if (Math.abs(con) <= EPSLN) {
- if (this.lat0 >= 0) {
- lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y));
- }
- else {
- lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y));
- }
- }
- else {
- /*con = cosz - this.sin_p12 * Math.sin(lat);
- if ((Math.abs(con) < EPSLN) && (Math.abs(p.x) < EPSLN)) {
- //no-op, just keep the lon value as is
- } else {
- var temp = Math.atan2((p.x * sinz * this.cos_p12), (con * rh));
- lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz * this.cos_p12), (con * rh)));
- }*/
- lon = adjust_lon(this.long0 + Math.atan2(p.x * sinz, rh * this.cos_p12 * cosz - p.y * this.sin_p12 * sinz));
- }
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- else {
- e0 = e0fn(this.es);
- e1 = e1fn(this.es);
- e2 = e2fn(this.es);
- e3 = e3fn(this.es);
- if (Math.abs(this.sin_p12 - 1) <= EPSLN) {
- //North pole case
- Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
- rh = Math.sqrt(p.x * p.x + p.y * p.y);
- M = Mlp - rh;
- lat = imlfn(M / this.a, e0, e1, e2, e3);
- lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y));
- p.x = lon;
- p.y = lat;
- return p;
- }
- else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {
- //South pole case
- Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
- rh = Math.sqrt(p.x * p.x + p.y * p.y);
- M = rh - Mlp;
- lat = imlfn(M / this.a, e0, e1, e2, e3);
- lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));
- p.x = lon;
- p.y = lat;
- return p;
- }
- else {
- //default case
- rh = Math.sqrt(p.x * p.x + p.y * p.y);
- Az = Math.atan2(p.x, p.y);
- N1 = gN(this.a, this.e, this.sin_p12);
- cosAz = Math.cos(Az);
- tmp = this.e * this.cos_p12 * cosAz;
- A = -tmp * tmp / (1 - this.es);
- B = 3 * this.es * (1 - A) * this.sin_p12 * this.cos_p12 * cosAz / (1 - this.es);
- D = rh / N1;
- Ee = D - A * (1 + A) * Math.pow(D, 3) / 6 - B * (1 + 3 * A) * Math.pow(D, 4) / 24;
- F = 1 - A * Ee * Ee / 2 - D * Ee * Ee * Ee / 6;
- psi = Math.asin(this.sin_p12 * Math.cos(Ee) + this.cos_p12 * Math.sin(Ee) * cosAz);
- lon = adjust_lon(this.long0 + Math.asin(Math.sin(Az) * Math.sin(Ee) / Math.cos(psi)));
- lat = Math.atan((1 - this.es * F * this.sin_p12 / Math.sin(psi)) * Math.tan(psi) / (1 - this.es));
- p.x = lon;
- p.y = lat;
- return p;
- }
- }
- }
- var aeqd_names = ["Azimuthal_Equidistant", "aeqd"];
- /* harmony default export */ var aeqd = ({
- init: aeqd_init,
- forward: aeqd_forward,
- inverse: aeqd_inverse,
- names: aeqd_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/ortho.js
- function ortho_init() {
- //double temp; /* temporary variable */
- /* Place parameters in static storage for common use
- -------------------------------------------------*/
- this.sin_p14 = Math.sin(this.lat0);
- this.cos_p14 = Math.cos(this.lat0);
- }
- /* Orthographic forward equations--mapping lat,long to x,y
- ---------------------------------------------------*/
- function ortho_forward(p) {
- var sinphi, cosphi; /* sin and cos value */
- var dlon; /* delta longitude value */
- var coslon; /* cos of longitude */
- var ksp; /* scale factor */
- var g, x, y;
- var lon = p.x;
- var lat = p.y;
- /* Forward equations
- -----------------*/
- dlon = adjust_lon(lon - this.long0);
- sinphi = Math.sin(lat);
- cosphi = Math.cos(lat);
- coslon = Math.cos(dlon);
- g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon;
- ksp = 1;
- if ((g > 0) || (Math.abs(g) <= EPSLN)) {
- x = this.a * ksp * cosphi * Math.sin(dlon);
- y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);
- }
- p.x = x;
- p.y = y;
- return p;
- }
- function ortho_inverse(p) {
- var rh; /* height above ellipsoid */
- var z; /* angle */
- var sinz, cosz; /* sin of z and cos of z */
- var con;
- var lon, lat;
- /* Inverse equations
- -----------------*/
- p.x -= this.x0;
- p.y -= this.y0;
- rh = Math.sqrt(p.x * p.x + p.y * p.y);
- z = asinz(rh / this.a);
- sinz = Math.sin(z);
- cosz = Math.cos(z);
- lon = this.long0;
- if (Math.abs(rh) <= EPSLN) {
- lat = this.lat0;
- p.x = lon;
- p.y = lat;
- return p;
- }
- lat = asinz(cosz * this.sin_p14 + (p.y * sinz * this.cos_p14) / rh);
- con = Math.abs(this.lat0) - HALF_PI;
- if (Math.abs(con) <= EPSLN) {
- if (this.lat0 >= 0) {
- lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y));
- }
- else {
- lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y));
- }
- p.x = lon;
- p.y = lat;
- return p;
- }
- lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz), rh * this.cos_p14 * cosz - p.y * this.sin_p14 * sinz));
- p.x = lon;
- p.y = lat;
- return p;
- }
- var ortho_names = ["ortho"];
- /* harmony default export */ var ortho = ({
- init: ortho_init,
- forward: ortho_forward,
- inverse: ortho_inverse,
- names: ortho_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/qsc.js
- // QSC projection rewritten from the original PROJ4
- // https://github.com/OSGeo/proj.4/blob/master/src/PJ_qsc.c
- /* constants */
- var FACE_ENUM = {
- FRONT: 1,
- RIGHT: 2,
- BACK: 3,
- LEFT: 4,
- TOP: 5,
- BOTTOM: 6
- };
- var AREA_ENUM = {
- AREA_0: 1,
- AREA_1: 2,
- AREA_2: 3,
- AREA_3: 4
- };
- function qsc_init() {
- this.x0 = this.x0 || 0;
- this.y0 = this.y0 || 0;
- this.lat0 = this.lat0 || 0;
- this.long0 = this.long0 || 0;
- this.lat_ts = this.lat_ts || 0;
- this.title = this.title || "Quadrilateralized Spherical Cube";
- /* Determine the cube face from the center of projection. */
- if (this.lat0 >= HALF_PI - FORTPI / 2.0) {
- this.face = FACE_ENUM.TOP;
- } else if (this.lat0 <= -(HALF_PI - FORTPI / 2.0)) {
- this.face = FACE_ENUM.BOTTOM;
- } else if (Math.abs(this.long0) <= FORTPI) {
- this.face = FACE_ENUM.FRONT;
- } else if (Math.abs(this.long0) <= HALF_PI + FORTPI) {
- this.face = this.long0 > 0.0 ? FACE_ENUM.RIGHT : FACE_ENUM.LEFT;
- } else {
- this.face = FACE_ENUM.BACK;
- }
- /* Fill in useful values for the ellipsoid <-> sphere shift
- * described in [LK12]. */
- if (this.es !== 0) {
- this.one_minus_f = 1 - (this.a - this.b) / this.a;
- this.one_minus_f_squared = this.one_minus_f * this.one_minus_f;
- }
- }
- // QSC forward equations--mapping lat,long to x,y
- // -----------------------------------------------------------------
- function qsc_forward(p) {
- var xy = {x: 0, y: 0};
- var lat, lon;
- var theta, phi;
- var t, mu;
- /* nu; */
- var area = {value: 0};
- // move lon according to projection's lon
- p.x -= this.long0;
- /* Convert the geodetic latitude to a geocentric latitude.
- * This corresponds to the shift from the ellipsoid to the sphere
- * described in [LK12]. */
- if (this.es !== 0) {//if (P->es != 0) {
- lat = Math.atan(this.one_minus_f_squared * Math.tan(p.y));
- } else {
- lat = p.y;
- }
- /* Convert the input lat, lon into theta, phi as used by QSC.
- * This depends on the cube face and the area on it.
- * For the top and bottom face, we can compute theta and phi
- * directly from phi, lam. For the other faces, we must use
- * unit sphere cartesian coordinates as an intermediate step. */
- lon = p.x; //lon = lp.lam;
- if (this.face === FACE_ENUM.TOP) {
- phi = HALF_PI - lat;
- if (lon >= FORTPI && lon <= HALF_PI + FORTPI) {
- area.value = AREA_ENUM.AREA_0;
- theta = lon - HALF_PI;
- } else if (lon > HALF_PI + FORTPI || lon <= -(HALF_PI + FORTPI)) {
- area.value = AREA_ENUM.AREA_1;
- theta = (lon > 0.0 ? lon - SPI : lon + SPI);
- } else if (lon > -(HALF_PI + FORTPI) && lon <= -FORTPI) {
- area.value = AREA_ENUM.AREA_2;
- theta = lon + HALF_PI;
- } else {
- area.value = AREA_ENUM.AREA_3;
- theta = lon;
- }
- } else if (this.face === FACE_ENUM.BOTTOM) {
- phi = HALF_PI + lat;
- if (lon >= FORTPI && lon <= HALF_PI + FORTPI) {
- area.value = AREA_ENUM.AREA_0;
- theta = -lon + HALF_PI;
- } else if (lon < FORTPI && lon >= -FORTPI) {
- area.value = AREA_ENUM.AREA_1;
- theta = -lon;
- } else if (lon < -FORTPI && lon >= -(HALF_PI + FORTPI)) {
- area.value = AREA_ENUM.AREA_2;
- theta = -lon - HALF_PI;
- } else {
- area.value = AREA_ENUM.AREA_3;
- theta = (lon > 0.0 ? -lon + SPI : -lon - SPI);
- }
- } else {
- var q, r, s;
- var sinlat, coslat;
- var sinlon, coslon;
- if (this.face === FACE_ENUM.RIGHT) {
- lon = qsc_shift_lon_origin(lon, +HALF_PI);
- } else if (this.face === FACE_ENUM.BACK) {
- lon = qsc_shift_lon_origin(lon, +SPI);
- } else if (this.face === FACE_ENUM.LEFT) {
- lon = qsc_shift_lon_origin(lon, -HALF_PI);
- }
- sinlat = Math.sin(lat);
- coslat = Math.cos(lat);
- sinlon = Math.sin(lon);
- coslon = Math.cos(lon);
- q = coslat * coslon;
- r = coslat * sinlon;
- s = sinlat;
- if (this.face === FACE_ENUM.FRONT) {
- phi = Math.acos(q);
- theta = qsc_fwd_equat_face_theta(phi, s, r, area);
- } else if (this.face === FACE_ENUM.RIGHT) {
- phi = Math.acos(r);
- theta = qsc_fwd_equat_face_theta(phi, s, -q, area);
- } else if (this.face === FACE_ENUM.BACK) {
- phi = Math.acos(-q);
- theta = qsc_fwd_equat_face_theta(phi, s, -r, area);
- } else if (this.face === FACE_ENUM.LEFT) {
- phi = Math.acos(-r);
- theta = qsc_fwd_equat_face_theta(phi, s, q, area);
- } else {
- /* Impossible */
- phi = theta = 0;
- area.value = AREA_ENUM.AREA_0;
- }
- }
- /* Compute mu and nu for the area of definition.
- * For mu, see Eq. (3-21) in [OL76], but note the typos:
- * compare with Eq. (3-14). For nu, see Eq. (3-38). */
- mu = Math.atan((12 / SPI) * (theta + Math.acos(Math.sin(theta) * Math.cos(FORTPI)) - HALF_PI));
- t = Math.sqrt((1 - Math.cos(phi)) / (Math.cos(mu) * Math.cos(mu)) / (1 - Math.cos(Math.atan(1 / Math.cos(theta)))));
- /* Apply the result to the real area. */
- if (area.value === AREA_ENUM.AREA_1) {
- mu += HALF_PI;
- } else if (area.value === AREA_ENUM.AREA_2) {
- mu += SPI;
- } else if (area.value === AREA_ENUM.AREA_3) {
- mu += 1.5 * SPI;
- }
- /* Now compute x, y from mu and nu */
- xy.x = t * Math.cos(mu);
- xy.y = t * Math.sin(mu);
- xy.x = xy.x * this.a + this.x0;
- xy.y = xy.y * this.a + this.y0;
- p.x = xy.x;
- p.y = xy.y;
- return p;
- }
- // QSC inverse equations--mapping x,y to lat/long
- // -----------------------------------------------------------------
- function qsc_inverse(p) {
- var lp = {lam: 0, phi: 0};
- var mu, nu, cosmu, tannu;
- var tantheta, theta, cosphi, phi;
- var t;
- var area = {value: 0};
- /* de-offset */
- p.x = (p.x - this.x0) / this.a;
- p.y = (p.y - this.y0) / this.a;
- /* Convert the input x, y to the mu and nu angles as used by QSC.
- * This depends on the area of the cube face. */
- nu = Math.atan(Math.sqrt(p.x * p.x + p.y * p.y));
- mu = Math.atan2(p.y, p.x);
- if (p.x >= 0.0 && p.x >= Math.abs(p.y)) {
- area.value = AREA_ENUM.AREA_0;
- } else if (p.y >= 0.0 && p.y >= Math.abs(p.x)) {
- area.value = AREA_ENUM.AREA_1;
- mu -= HALF_PI;
- } else if (p.x < 0.0 && -p.x >= Math.abs(p.y)) {
- area.value = AREA_ENUM.AREA_2;
- mu = (mu < 0.0 ? mu + SPI : mu - SPI);
- } else {
- area.value = AREA_ENUM.AREA_3;
- mu += HALF_PI;
- }
- /* Compute phi and theta for the area of definition.
- * The inverse projection is not described in the original paper, but some
- * good hints can be found here (as of 2011-12-14):
- * http://fits.gsfc.nasa.gov/fitsbits/saf.93/saf.9302
- * (search for "Message-Id: <9302181759.AA25477 at fits.cv.nrao.edu>") */
- t = (SPI / 12) * Math.tan(mu);
- tantheta = Math.sin(t) / (Math.cos(t) - (1 / Math.sqrt(2)));
- theta = Math.atan(tantheta);
- cosmu = Math.cos(mu);
- tannu = Math.tan(nu);
- cosphi = 1 - cosmu * cosmu * tannu * tannu * (1 - Math.cos(Math.atan(1 / Math.cos(theta))));
- if (cosphi < -1) {
- cosphi = -1;
- } else if (cosphi > +1) {
- cosphi = +1;
- }
- /* Apply the result to the real area on the cube face.
- * For the top and bottom face, we can compute phi and lam directly.
- * For the other faces, we must use unit sphere cartesian coordinates
- * as an intermediate step. */
- if (this.face === FACE_ENUM.TOP) {
- phi = Math.acos(cosphi);
- lp.phi = HALF_PI - phi;
- if (area.value === AREA_ENUM.AREA_0) {
- lp.lam = theta + HALF_PI;
- } else if (area.value === AREA_ENUM.AREA_1) {
- lp.lam = (theta < 0.0 ? theta + SPI : theta - SPI);
- } else if (area.value === AREA_ENUM.AREA_2) {
- lp.lam = theta - HALF_PI;
- } else /* area.value == AREA_ENUM.AREA_3 */ {
- lp.lam = theta;
- }
- } else if (this.face === FACE_ENUM.BOTTOM) {
- phi = Math.acos(cosphi);
- lp.phi = phi - HALF_PI;
- if (area.value === AREA_ENUM.AREA_0) {
- lp.lam = -theta + HALF_PI;
- } else if (area.value === AREA_ENUM.AREA_1) {
- lp.lam = -theta;
- } else if (area.value === AREA_ENUM.AREA_2) {
- lp.lam = -theta - HALF_PI;
- } else /* area.value == AREA_ENUM.AREA_3 */ {
- lp.lam = (theta < 0.0 ? -theta - SPI : -theta + SPI);
- }
- } else {
- /* Compute phi and lam via cartesian unit sphere coordinates. */
- var q, r, s;
- q = cosphi;
- t = q * q;
- if (t >= 1) {
- s = 0;
- } else {
- s = Math.sqrt(1 - t) * Math.sin(theta);
- }
- t += s * s;
- if (t >= 1) {
- r = 0;
- } else {
- r = Math.sqrt(1 - t);
- }
- /* Rotate q,r,s into the correct area. */
- if (area.value === AREA_ENUM.AREA_1) {
- t = r;
- r = -s;
- s = t;
- } else if (area.value === AREA_ENUM.AREA_2) {
- r = -r;
- s = -s;
- } else if (area.value === AREA_ENUM.AREA_3) {
- t = r;
- r = s;
- s = -t;
- }
- /* Rotate q,r,s into the correct cube face. */
- if (this.face === FACE_ENUM.RIGHT) {
- t = q;
- q = -r;
- r = t;
- } else if (this.face === FACE_ENUM.BACK) {
- q = -q;
- r = -r;
- } else if (this.face === FACE_ENUM.LEFT) {
- t = q;
- q = r;
- r = -t;
- }
- /* Now compute phi and lam from the unit sphere coordinates. */
- lp.phi = Math.acos(-s) - HALF_PI;
- lp.lam = Math.atan2(r, q);
- if (this.face === FACE_ENUM.RIGHT) {
- lp.lam = qsc_shift_lon_origin(lp.lam, -HALF_PI);
- } else if (this.face === FACE_ENUM.BACK) {
- lp.lam = qsc_shift_lon_origin(lp.lam, -SPI);
- } else if (this.face === FACE_ENUM.LEFT) {
- lp.lam = qsc_shift_lon_origin(lp.lam, +HALF_PI);
- }
- }
- /* Apply the shift from the sphere to the ellipsoid as described
- * in [LK12]. */
- if (this.es !== 0) {
- var invert_sign;
- var tanphi, xa;
- invert_sign = (lp.phi < 0 ? 1 : 0);
- tanphi = Math.tan(lp.phi);
- xa = this.b / Math.sqrt(tanphi * tanphi + this.one_minus_f_squared);
- lp.phi = Math.atan(Math.sqrt(this.a * this.a - xa * xa) / (this.one_minus_f * xa));
- if (invert_sign) {
- lp.phi = -lp.phi;
- }
- }
- lp.lam += this.long0;
- p.x = lp.lam;
- p.y = lp.phi;
- return p;
- }
- /* Helper function for forward projection: compute the theta angle
- * and determine the area number. */
- function qsc_fwd_equat_face_theta(phi, y, x, area) {
- var theta;
- if (phi < EPSLN) {
- area.value = AREA_ENUM.AREA_0;
- theta = 0.0;
- } else {
- theta = Math.atan2(y, x);
- if (Math.abs(theta) <= FORTPI) {
- area.value = AREA_ENUM.AREA_0;
- } else if (theta > FORTPI && theta <= HALF_PI + FORTPI) {
- area.value = AREA_ENUM.AREA_1;
- theta -= HALF_PI;
- } else if (theta > HALF_PI + FORTPI || theta <= -(HALF_PI + FORTPI)) {
- area.value = AREA_ENUM.AREA_2;
- theta = (theta >= 0.0 ? theta - SPI : theta + SPI);
- } else {
- area.value = AREA_ENUM.AREA_3;
- theta += HALF_PI;
- }
- }
- return theta;
- }
- /* Helper function: shift the longitude. */
- function qsc_shift_lon_origin(lon, offset) {
- var slon = lon + offset;
- if (slon < -SPI) {
- slon += TWO_PI;
- } else if (slon > +SPI) {
- slon -= TWO_PI;
- }
- return slon;
- }
- var qsc_names = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"];
- /* harmony default export */ var qsc = ({
- init: qsc_init,
- forward: qsc_forward,
- inverse: qsc_inverse,
- names: qsc_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/robin.js
- // Robinson projection
- // Based on https://github.com/OSGeo/proj.4/blob/master/src/PJ_robin.c
- // Polynomial coeficients from http://article.gmane.org/gmane.comp.gis.proj-4.devel/6039
- var COEFS_X = [
- [1.0000, 2.2199e-17, -7.15515e-05, 3.1103e-06],
- [0.9986, -0.000482243, -2.4897e-05, -1.3309e-06],
- [0.9954, -0.00083103, -4.48605e-05, -9.86701e-07],
- [0.9900, -0.00135364, -5.9661e-05, 3.6777e-06],
- [0.9822, -0.00167442, -4.49547e-06, -5.72411e-06],
- [0.9730, -0.00214868, -9.03571e-05, 1.8736e-08],
- [0.9600, -0.00305085, -9.00761e-05, 1.64917e-06],
- [0.9427, -0.00382792, -6.53386e-05, -2.6154e-06],
- [0.9216, -0.00467746, -0.00010457, 4.81243e-06],
- [0.8962, -0.00536223, -3.23831e-05, -5.43432e-06],
- [0.8679, -0.00609363, -0.000113898, 3.32484e-06],
- [0.8350, -0.00698325, -6.40253e-05, 9.34959e-07],
- [0.7986, -0.00755338, -5.00009e-05, 9.35324e-07],
- [0.7597, -0.00798324, -3.5971e-05, -2.27626e-06],
- [0.7186, -0.00851367, -7.01149e-05, -8.6303e-06],
- [0.6732, -0.00986209, -0.000199569, 1.91974e-05],
- [0.6213, -0.010418, 8.83923e-05, 6.24051e-06],
- [0.5722, -0.00906601, 0.000182, 6.24051e-06],
- [0.5322, -0.00677797, 0.000275608, 6.24051e-06]
- ];
- var COEFS_Y = [
- [-5.20417e-18, 0.0124, 1.21431e-18, -8.45284e-11],
- [0.0620, 0.0124, -1.26793e-09, 4.22642e-10],
- [0.1240, 0.0124, 5.07171e-09, -1.60604e-09],
- [0.1860, 0.0123999, -1.90189e-08, 6.00152e-09],
- [0.2480, 0.0124002, 7.10039e-08, -2.24e-08],
- [0.3100, 0.0123992, -2.64997e-07, 8.35986e-08],
- [0.3720, 0.0124029, 9.88983e-07, -3.11994e-07],
- [0.4340, 0.0123893, -3.69093e-06, -4.35621e-07],
- [0.4958, 0.0123198, -1.02252e-05, -3.45523e-07],
- [0.5571, 0.0121916, -1.54081e-05, -5.82288e-07],
- [0.6176, 0.0119938, -2.41424e-05, -5.25327e-07],
- [0.6769, 0.011713, -3.20223e-05, -5.16405e-07],
- [0.7346, 0.0113541, -3.97684e-05, -6.09052e-07],
- [0.7903, 0.0109107, -4.89042e-05, -1.04739e-06],
- [0.8435, 0.0103431, -6.4615e-05, -1.40374e-09],
- [0.8936, 0.00969686, -6.4636e-05, -8.547e-06],
- [0.9394, 0.00840947, -0.000192841, -4.2106e-06],
- [0.9761, 0.00616527, -0.000256, -4.2106e-06],
- [1.0000, 0.00328947, -0.000319159, -4.2106e-06]
- ];
- var FXC = 0.8487;
- var FYC = 1.3523;
- var C1 = R2D/5; // rad to 5-degree interval
- var RC1 = 1/C1;
- var NODES = 18;
- var poly3_val = function(coefs, x) {
- return coefs[0] + x * (coefs[1] + x * (coefs[2] + x * coefs[3]));
- };
- var poly3_der = function(coefs, x) {
- return coefs[1] + x * (2 * coefs[2] + x * 3 * coefs[3]);
- };
- function newton_rapshon(f_df, start, max_err, iters) {
- var x = start;
- for (; iters; --iters) {
- var upd = f_df(x);
- x -= upd;
- if (Math.abs(upd) < max_err) {
- break;
- }
- }
- return x;
- }
- function robin_init() {
- this.x0 = this.x0 || 0;
- this.y0 = this.y0 || 0;
- this.long0 = this.long0 || 0;
- this.es = 0;
- this.title = this.title || "Robinson";
- }
- function robin_forward(ll) {
- var lon = adjust_lon(ll.x - this.long0);
- var dphi = Math.abs(ll.y);
- var i = Math.floor(dphi * C1);
- if (i < 0) {
- i = 0;
- } else if (i >= NODES) {
- i = NODES - 1;
- }
- dphi = R2D * (dphi - RC1 * i);
- var xy = {
- x: poly3_val(COEFS_X[i], dphi) * lon,
- y: poly3_val(COEFS_Y[i], dphi)
- };
- if (ll.y < 0) {
- xy.y = -xy.y;
- }
- xy.x = xy.x * this.a * FXC + this.x0;
- xy.y = xy.y * this.a * FYC + this.y0;
- return xy;
- }
- function robin_inverse(xy) {
- var ll = {
- x: (xy.x - this.x0) / (this.a * FXC),
- y: Math.abs(xy.y - this.y0) / (this.a * FYC)
- };
- if (ll.y >= 1) { // pathologic case
- ll.x /= COEFS_X[NODES][0];
- ll.y = xy.y < 0 ? -HALF_PI : HALF_PI;
- } else {
- // find table interval
- var i = Math.floor(ll.y * NODES);
- if (i < 0) {
- i = 0;
- } else if (i >= NODES) {
- i = NODES - 1;
- }
- for (;;) {
- if (COEFS_Y[i][0] > ll.y) {
- --i;
- } else if (COEFS_Y[i+1][0] <= ll.y) {
- ++i;
- } else {
- break;
- }
- }
- // linear interpolation in 5 degree interval
- var coefs = COEFS_Y[i];
- var t = 5 * (ll.y - coefs[0]) / (COEFS_Y[i+1][0] - coefs[0]);
- // find t so that poly3_val(coefs, t) = ll.y
- t = newton_rapshon(function(x) {
- return (poly3_val(coefs, x) - ll.y) / poly3_der(coefs, x);
- }, t, EPSLN, 100);
- ll.x /= poly3_val(COEFS_X[i], t);
- ll.y = (5 * i + t) * D2R;
- if (xy.y < 0) {
- ll.y = -ll.y;
- }
- }
- ll.x = adjust_lon(ll.x + this.long0);
- return ll;
- }
- var robin_names = ["Robinson", "robin"];
- /* harmony default export */ var robin = ({
- init: robin_init,
- forward: robin_forward,
- inverse: robin_inverse,
- names: robin_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/geocent.js
- function geocent_init() {
- this.name = 'geocent';
- }
- function geocent_forward(p) {
- var point = geodeticToGeocentric(p, this.es, this.a);
- return point;
- }
- function geocent_inverse(p) {
- var point = geocentricToGeodetic(p, this.es, this.a, this.b);
- return point;
- }
- var geocent_names = ["Geocentric", 'geocentric', "geocent", "Geocent"];
- /* harmony default export */ var geocent = ({
- init: geocent_init,
- forward: geocent_forward,
- inverse: geocent_inverse,
- names: geocent_names
- });
- // CONCATENATED MODULE: ./node_modules/proj4/projs.js
- /* harmony default export */ var proj4_projs = (function(proj4){
- proj4.Proj.projections.add(tmerc);
- proj4.Proj.projections.add(etmerc);
- proj4.Proj.projections.add(utm);
- proj4.Proj.projections.add(sterea);
- proj4.Proj.projections.add(stere);
- proj4.Proj.projections.add(somerc);
- proj4.Proj.projections.add(omerc);
- proj4.Proj.projections.add(lcc);
- proj4.Proj.projections.add(krovak);
- proj4.Proj.projections.add(cass);
- proj4.Proj.projections.add(laea);
- proj4.Proj.projections.add(aea);
- proj4.Proj.projections.add(gnom);
- proj4.Proj.projections.add(cea);
- proj4.Proj.projections.add(eqc);
- proj4.Proj.projections.add(poly);
- proj4.Proj.projections.add(nzmg);
- proj4.Proj.projections.add(mill);
- proj4.Proj.projections.add(sinu);
- proj4.Proj.projections.add(moll);
- proj4.Proj.projections.add(eqdc);
- proj4.Proj.projections.add(vandg);
- proj4.Proj.projections.add(aeqd);
- proj4.Proj.projections.add(ortho);
- proj4.Proj.projections.add(qsc);
- proj4.Proj.projections.add(robin);
- proj4.Proj.projections.add(geocent);
- });
- // CONCATENATED MODULE: ./node_modules/proj4/lib/index.js
- core.defaultDatum = 'WGS84'; //default datum
- core.Proj = Proj;
- core.WGS84 = new core.Proj('WGS84');
- core.Point = lib_Point;
- core.toPoint = toPoint;
- core.defs = lib_defs;
- core.transform = transform;
- core.mgrs = mgrs;
- core.version = '__VERSION__';
- proj4_projs(core);
- /* harmony default export */ var lib = __webpack_exports__["default"] = (core);
- /***/ }),
- /***/ "73e4":
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__73e4__;
- /***/ }),
- /***/ "743a":
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- /***/ }),
- /***/ "74c0":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /*<replacement>*/
- var pna = __webpack_require__("3e48");
- /*</replacement>*/
- // undocumented cb() API, needed for core, not for public API
- function destroy(err, cb) {
- var _this = this;
- var readableDestroyed = this._readableState && this._readableState.destroyed;
- var writableDestroyed = this._writableState && this._writableState.destroyed;
- if (readableDestroyed || writableDestroyed) {
- if (cb) {
- cb(err);
- } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
- pna.nextTick(emitErrorNT, this, err);
- }
- return this;
- }
- // we set destroyed to true before firing error callbacks in order
- // to make it re-entrance safe in case destroy() is called within callbacks
- if (this._readableState) {
- this._readableState.destroyed = true;
- }
- // if this is a duplex stream mark the writable part as destroyed as well
- if (this._writableState) {
- this._writableState.destroyed = true;
- }
- this._destroy(err || null, function (err) {
- if (!cb && err) {
- pna.nextTick(emitErrorNT, _this, err);
- if (_this._writableState) {
- _this._writableState.errorEmitted = true;
- }
- } else if (cb) {
- cb(err);
- }
- });
- return this;
- }
- function undestroy() {
- if (this._readableState) {
- this._readableState.destroyed = false;
- this._readableState.reading = false;
- this._readableState.ended = false;
- this._readableState.endEmitted = false;
- }
- if (this._writableState) {
- this._writableState.destroyed = false;
- this._writableState.ended = false;
- this._writableState.ending = false;
- this._writableState.finished = false;
- this._writableState.errorEmitted = false;
- }
- }
- function emitErrorNT(self, err) {
- self.emit('error', err);
- }
- module.exports = {
- destroy: destroy,
- undestroy: undestroy
- };
- /***/ }),
- /***/ "751d":
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__751d__;
- /***/ }),
- /***/ "76b8":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
- /**
- * Copyright Marc J. Schmidt. See the LICENSE file at the top-level
- * directory of this distribution and at
- * https://github.com/marcj/css-element-queries/blob/master/LICENSE.
- */
- (function (root, factory) {
- if (true) {
- !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
- __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
- }(typeof window !== 'undefined' ? window : this, function () {
- // Make sure it does not throw in a SSR (Server Side Rendering) situation
- if (typeof window === "undefined") {
- return null;
- }
- // https://github.com/Semantic-Org/Semantic-UI/issues/3855
- // https://github.com/marcj/css-element-queries/issues/257
- var globalWindow = typeof window != 'undefined' && window.Math == Math
- ? window
- : typeof self != 'undefined' && self.Math == Math
- ? self
- : Function('return this')();
- // Only used for the dirty checking, so the event callback count is limited to max 1 call per fps per sensor.
- // In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and
- // would generate too many unnecessary events.
- var requestAnimationFrame = globalWindow.requestAnimationFrame ||
- globalWindow.mozRequestAnimationFrame ||
- globalWindow.webkitRequestAnimationFrame ||
- function (fn) {
- return globalWindow.setTimeout(fn, 20);
- };
- var cancelAnimationFrame = globalWindow.cancelAnimationFrame ||
- globalWindow.mozCancelAnimationFrame ||
- globalWindow.webkitCancelAnimationFrame ||
- function (timer) {
- globalWindow.clearTimeout(timer);
- };
- /**
- * Iterate over each of the provided element(s).
- *
- * @param {HTMLElement|HTMLElement[]} elements
- * @param {Function} callback
- */
- function forEachElement(elements, callback){
- var elementsType = Object.prototype.toString.call(elements);
- var isCollectionTyped = ('[object Array]' === elementsType
- || ('[object NodeList]' === elementsType)
- || ('[object HTMLCollection]' === elementsType)
- || ('[object Object]' === elementsType)
- || ('undefined' !== typeof jQuery && elements instanceof jQuery) //jquery
- || ('undefined' !== typeof Elements && elements instanceof Elements) //mootools
- );
- var i = 0, j = elements.length;
- if (isCollectionTyped) {
- for (; i < j; i++) {
- callback(elements[i]);
- }
- } else {
- callback(elements);
- }
- }
- /**
- * Get element size
- * @param {HTMLElement} element
- * @returns {Object} {width, height}
- */
- function getElementSize(element) {
- if (!element.getBoundingClientRect) {
- return {
- width: element.offsetWidth,
- height: element.offsetHeight
- }
- }
- var rect = element.getBoundingClientRect();
- return {
- width: Math.round(rect.width),
- height: Math.round(rect.height)
- }
- }
- /**
- * Apply CSS styles to element.
- *
- * @param {HTMLElement} element
- * @param {Object} style
- */
- function setStyle(element, style) {
- Object.keys(style).forEach(function(key) {
- element.style[key] = style[key];
- });
- }
- /**
- * Class for dimension change detection.
- *
- * @param {Element|Element[]|Elements|jQuery} element
- * @param {Function} callback
- *
- * @constructor
- */
- var ResizeSensor = function(element, callback) {
- //Is used when checking in reset() only for invisible elements
- var lastAnimationFrameForInvisibleCheck = 0;
- /**
- *
- * @constructor
- */
- function EventQueue() {
- var q = [];
- this.add = function(ev) {
- q.push(ev);
- };
- var i, j;
- this.call = function(sizeInfo) {
- for (i = 0, j = q.length; i < j; i++) {
- q[i].call(this, sizeInfo);
- }
- };
- this.remove = function(ev) {
- var newQueue = [];
- for(i = 0, j = q.length; i < j; i++) {
- if(q[i] !== ev) newQueue.push(q[i]);
- }
- q = newQueue;
- };
- this.length = function() {
- return q.length;
- }
- }
- /**
- *
- * @param {HTMLElement} element
- * @param {Function} resized
- */
- function attachResizeEvent(element, resized) {
- if (!element) return;
- if (element.resizedAttached) {
- element.resizedAttached.add(resized);
- return;
- }
- element.resizedAttached = new EventQueue();
- element.resizedAttached.add(resized);
- element.resizeSensor = document.createElement('div');
- element.resizeSensor.dir = 'ltr';
- element.resizeSensor.className = 'resize-sensor';
- var style = {
- pointerEvents: 'none',
- position: 'absolute',
- left: '0px',
- top: '0px',
- right: '0px',
- bottom: '0px',
- overflow: 'hidden',
- zIndex: '-1',
- visibility: 'hidden',
- maxWidth: '100%'
- };
- var styleChild = {
- position: 'absolute',
- left: '0px',
- top: '0px',
- transition: '0s',
- };
- setStyle(element.resizeSensor, style);
- var expand = document.createElement('div');
- expand.className = 'resize-sensor-expand';
- setStyle(expand, style);
- var expandChild = document.createElement('div');
- setStyle(expandChild, styleChild);
- expand.appendChild(expandChild);
- var shrink = document.createElement('div');
- shrink.className = 'resize-sensor-shrink';
- setStyle(shrink, style);
- var shrinkChild = document.createElement('div');
- setStyle(shrinkChild, styleChild);
- setStyle(shrinkChild, { width: '200%', height: '200%' });
- shrink.appendChild(shrinkChild);
- element.resizeSensor.appendChild(expand);
- element.resizeSensor.appendChild(shrink);
- element.appendChild(element.resizeSensor);
- var computedStyle = window.getComputedStyle(element);
- var position = computedStyle ? computedStyle.getPropertyValue('position') : null;
- if ('absolute' !== position && 'relative' !== position && 'fixed' !== position && 'sticky' !== position) {
- element.style.position = 'relative';
- }
- var dirty = false;
- //last request animation frame id used in onscroll event
- var rafId = 0;
- var size = getElementSize(element);
- var lastWidth = 0;
- var lastHeight = 0;
- var initialHiddenCheck = true;
- lastAnimationFrameForInvisibleCheck = 0;
- var resetExpandShrink = function () {
- var width = element.offsetWidth;
- var height = element.offsetHeight;
- expandChild.style.width = (width + 10) + 'px';
- expandChild.style.height = (height + 10) + 'px';
- expand.scrollLeft = width + 10;
- expand.scrollTop = height + 10;
- shrink.scrollLeft = width + 10;
- shrink.scrollTop = height + 10;
- };
- var reset = function() {
- // Check if element is hidden
- if (initialHiddenCheck) {
- var invisible = element.offsetWidth === 0 && element.offsetHeight === 0;
- if (invisible) {
- // Check in next frame
- if (!lastAnimationFrameForInvisibleCheck){
- lastAnimationFrameForInvisibleCheck = requestAnimationFrame(function(){
- lastAnimationFrameForInvisibleCheck = 0;
- reset();
- });
- }
- return;
- } else {
- // Stop checking
- initialHiddenCheck = false;
- }
- }
- resetExpandShrink();
- };
- element.resizeSensor.resetSensor = reset;
- var onResized = function() {
- rafId = 0;
- if (!dirty) return;
- lastWidth = size.width;
- lastHeight = size.height;
- if (element.resizedAttached) {
- element.resizedAttached.call(size);
- }
- };
- var onScroll = function() {
- size = getElementSize(element);
- dirty = size.width !== lastWidth || size.height !== lastHeight;
- if (dirty && !rafId) {
- rafId = requestAnimationFrame(onResized);
- }
- reset();
- };
- var addEvent = function(el, name, cb) {
- if (el.attachEvent) {
- el.attachEvent('on' + name, cb);
- } else {
- el.addEventListener(name, cb);
- }
- };
- addEvent(expand, 'scroll', onScroll);
- addEvent(shrink, 'scroll', onScroll);
- // Fix for custom Elements and invisible elements
- lastAnimationFrameForInvisibleCheck = requestAnimationFrame(function(){
- lastAnimationFrameForInvisibleCheck = 0;
- reset();
- });
- }
- forEachElement(element, function(elem){
- attachResizeEvent(elem, callback);
- });
- this.detach = function(ev) {
- // clean up the unfinished animation frame to prevent a potential endless requestAnimationFrame of reset
- if (!lastAnimationFrameForInvisibleCheck) {
- cancelAnimationFrame(lastAnimationFrameForInvisibleCheck);
- lastAnimationFrameForInvisibleCheck = 0;
- }
- ResizeSensor.detach(element, ev);
- };
- this.reset = function() {
- element.resizeSensor.resetSensor();
- };
- };
- ResizeSensor.reset = function(element) {
- forEachElement(element, function(elem){
- elem.resizeSensor.resetSensor();
- });
- };
- ResizeSensor.detach = function(element, ev) {
- forEachElement(element, function(elem){
- if (!elem) return;
- if(elem.resizedAttached && typeof ev === "function"){
- elem.resizedAttached.remove(ev);
- if(elem.resizedAttached.length()) return;
- }
- if (elem.resizeSensor) {
- if (elem.contains(elem.resizeSensor)) {
- elem.removeChild(elem.resizeSensor);
- }
- delete elem.resizeSensor;
- delete elem.resizedAttached;
- }
- });
- };
- if (typeof MutationObserver !== "undefined") {
- var observer = new MutationObserver(function (mutations) {
- for (var i in mutations) {
- if (mutations.hasOwnProperty(i)) {
- var items = mutations[i].addedNodes;
- for (var j = 0; j < items.length; j++) {
- if (items[j].resizeSensor) {
- ResizeSensor.reset(items[j]);
- }
- }
- }
- }
- });
- document.addEventListener("DOMContentLoaded", function (event) {
- observer.observe(document.body, {
- childList: true,
- subtree: true,
- });
- });
- }
- return ResizeSensor;
- }));
- /***/ }),
- /***/ "77c4":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/indicator/CountTo.vue?vue&type=template&id=c61b74f4&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',_vm._l((_vm.numDataList),function(numVale,index){return _c('div',{key:index,staticClass:"sm-component-count-to__numItem",style:([_vm.calNumBackground(numVale),_vm.numInterval,_vm.numStyle])},[_c('span',[_vm._v(_vm._s(numVale))])])}),0)}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/indicator/CountTo.vue?vue&type=template&id=c61b74f4&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "7ae5":
- /***/ (function(module, exports) {
- function _typeof(obj) {
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
- module.exports = _typeof = function _typeof(obj) {
- return typeof obj;
- };
- } else {
- module.exports = _typeof = function _typeof(obj) {
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
- };
- }
- return _typeof(obj);
- }
- module.exports = _typeof;
- /***/ }),
- /***/ "7cfc":
- /***/ (function(module, exports, __webpack_require__) {
- /**
- * Copyright (c) 2014-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var runtime = (function (exports) {
- "use strict";
- var Op = Object.prototype;
- var hasOwn = Op.hasOwnProperty;
- var undefined; // More compressible than void 0.
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
- function wrap(innerFn, outerFn, self, tryLocsList) {
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
- var generator = Object.create(protoGenerator.prototype);
- var context = new Context(tryLocsList || []);
- // The ._invoke method unifies the implementations of the .next,
- // .throw, and .return methods.
- generator._invoke = makeInvokeMethod(innerFn, self, context);
- return generator;
- }
- exports.wrap = wrap;
- // Try/catch helper to minimize deoptimizations. Returns a completion
- // record like context.tryEntries[i].completion. This interface could
- // have been (and was previously) designed to take a closure to be
- // invoked without arguments, but in all the cases we care about we
- // already have an existing method we want to call, so there's no need
- // to create a new function object. We can even get away with assuming
- // the method takes exactly one argument, since that happens to be true
- // in every case, so we don't have to touch the arguments object. The
- // only additional allocation required is the completion record, which
- // has a stable shape and so hopefully should be cheap to allocate.
- function tryCatch(fn, obj, arg) {
- try {
- return { type: "normal", arg: fn.call(obj, arg) };
- } catch (err) {
- return { type: "throw", arg: err };
- }
- }
- var GenStateSuspendedStart = "suspendedStart";
- var GenStateSuspendedYield = "suspendedYield";
- var GenStateExecuting = "executing";
- var GenStateCompleted = "completed";
- // Returning this object from the innerFn has the same effect as
- // breaking out of the dispatch switch statement.
- var ContinueSentinel = {};
- // Dummy constructor functions that we use as the .constructor and
- // .constructor.prototype properties for functions that return Generator
- // objects. For full spec compliance, you may wish to configure your
- // minifier not to mangle the names of these two functions.
- function Generator() {}
- function GeneratorFunction() {}
- function GeneratorFunctionPrototype() {}
- // This is a polyfill for %IteratorPrototype% for environments that
- // don't natively support it.
- var IteratorPrototype = {};
- IteratorPrototype[iteratorSymbol] = function () {
- return this;
- };
- var getProto = Object.getPrototypeOf;
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
- if (NativeIteratorPrototype &&
- NativeIteratorPrototype !== Op &&
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
- // This environment has a native %IteratorPrototype%; use it instead
- // of the polyfill.
- IteratorPrototype = NativeIteratorPrototype;
- }
- var Gp = GeneratorFunctionPrototype.prototype =
- Generator.prototype = Object.create(IteratorPrototype);
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
- GeneratorFunctionPrototype[toStringTagSymbol] =
- GeneratorFunction.displayName = "GeneratorFunction";
- // Helper for defining the .next, .throw, and .return methods of the
- // Iterator interface in terms of a single ._invoke method.
- function defineIteratorMethods(prototype) {
- ["next", "throw", "return"].forEach(function(method) {
- prototype[method] = function(arg) {
- return this._invoke(method, arg);
- };
- });
- }
- exports.isGeneratorFunction = function(genFun) {
- var ctor = typeof genFun === "function" && genFun.constructor;
- return ctor
- ? ctor === GeneratorFunction ||
- // For the native GeneratorFunction constructor, the best we can
- // do is to check its .name property.
- (ctor.displayName || ctor.name) === "GeneratorFunction"
- : false;
- };
- exports.mark = function(genFun) {
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
- } else {
- genFun.__proto__ = GeneratorFunctionPrototype;
- if (!(toStringTagSymbol in genFun)) {
- genFun[toStringTagSymbol] = "GeneratorFunction";
- }
- }
- genFun.prototype = Object.create(Gp);
- return genFun;
- };
- // Within the body of any async function, `await x` is transformed to
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
- // meant to be awaited.
- exports.awrap = function(arg) {
- return { __await: arg };
- };
- function AsyncIterator(generator) {
- function invoke(method, arg, resolve, reject) {
- var record = tryCatch(generator[method], generator, arg);
- if (record.type === "throw") {
- reject(record.arg);
- } else {
- var result = record.arg;
- var value = result.value;
- if (value &&
- typeof value === "object" &&
- hasOwn.call(value, "__await")) {
- return Promise.resolve(value.__await).then(function(value) {
- invoke("next", value, resolve, reject);
- }, function(err) {
- invoke("throw", err, resolve, reject);
- });
- }
- return Promise.resolve(value).then(function(unwrapped) {
- // When a yielded Promise is resolved, its final value becomes
- // the .value of the Promise<{value,done}> result for the
- // current iteration.
- result.value = unwrapped;
- resolve(result);
- }, function(error) {
- // If a rejected Promise was yielded, throw the rejection back
- // into the async generator function so it can be handled there.
- return invoke("throw", error, resolve, reject);
- });
- }
- }
- var previousPromise;
- function enqueue(method, arg) {
- function callInvokeWithMethodAndArg() {
- return new Promise(function(resolve, reject) {
- invoke(method, arg, resolve, reject);
- });
- }
- return previousPromise =
- // If enqueue has been called before, then we want to wait until
- // all previous Promises have been resolved before calling invoke,
- // so that results are always delivered in the correct order. If
- // enqueue has not been called before, then it is important to
- // call invoke immediately, without waiting on a callback to fire,
- // so that the async generator function has the opportunity to do
- // any necessary setup in a predictable way. This predictability
- // is why the Promise constructor synchronously invokes its
- // executor callback, and why async functions synchronously
- // execute code before the first await. Since we implement simple
- // async functions in terms of async generators, it is especially
- // important to get this right, even though it requires care.
- previousPromise ? previousPromise.then(
- callInvokeWithMethodAndArg,
- // Avoid propagating failures to Promises returned by later
- // invocations of the iterator.
- callInvokeWithMethodAndArg
- ) : callInvokeWithMethodAndArg();
- }
- // Define the unified helper method that is used to implement .next,
- // .throw, and .return (see defineIteratorMethods).
- this._invoke = enqueue;
- }
- defineIteratorMethods(AsyncIterator.prototype);
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
- return this;
- };
- exports.AsyncIterator = AsyncIterator;
- // Note that simple async functions are implemented on top of
- // AsyncIterator objects; they just return a Promise for the value of
- // the final result produced by the iterator.
- exports.async = function(innerFn, outerFn, self, tryLocsList) {
- var iter = new AsyncIterator(
- wrap(innerFn, outerFn, self, tryLocsList)
- );
- return exports.isGeneratorFunction(outerFn)
- ? iter // If outerFn is a generator, return the full iterator.
- : iter.next().then(function(result) {
- return result.done ? result.value : iter.next();
- });
- };
- function makeInvokeMethod(innerFn, self, context) {
- var state = GenStateSuspendedStart;
- return function invoke(method, arg) {
- if (state === GenStateExecuting) {
- throw new Error("Generator is already running");
- }
- if (state === GenStateCompleted) {
- if (method === "throw") {
- throw arg;
- }
- // Be forgiving, per 25.3.3.3.3 of the spec:
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
- return doneResult();
- }
- context.method = method;
- context.arg = arg;
- while (true) {
- var delegate = context.delegate;
- if (delegate) {
- var delegateResult = maybeInvokeDelegate(delegate, context);
- if (delegateResult) {
- if (delegateResult === ContinueSentinel) continue;
- return delegateResult;
- }
- }
- if (context.method === "next") {
- // Setting context._sent for legacy support of Babel's
- // function.sent implementation.
- context.sent = context._sent = context.arg;
- } else if (context.method === "throw") {
- if (state === GenStateSuspendedStart) {
- state = GenStateCompleted;
- throw context.arg;
- }
- context.dispatchException(context.arg);
- } else if (context.method === "return") {
- context.abrupt("return", context.arg);
- }
- state = GenStateExecuting;
- var record = tryCatch(innerFn, self, context);
- if (record.type === "normal") {
- // If an exception is thrown from innerFn, we leave state ===
- // GenStateExecuting and loop back for another invocation.
- state = context.done
- ? GenStateCompleted
- : GenStateSuspendedYield;
- if (record.arg === ContinueSentinel) {
- continue;
- }
- return {
- value: record.arg,
- done: context.done
- };
- } else if (record.type === "throw") {
- state = GenStateCompleted;
- // Dispatch the exception by looping back around to the
- // context.dispatchException(context.arg) call above.
- context.method = "throw";
- context.arg = record.arg;
- }
- }
- };
- }
- // Call delegate.iterator[context.method](context.arg) and handle the
- // result, either by returning a { value, done } result from the
- // delegate iterator, or by modifying context.method and context.arg,
- // setting context.delegate to null, and returning the ContinueSentinel.
- function maybeInvokeDelegate(delegate, context) {
- var method = delegate.iterator[context.method];
- if (method === undefined) {
- // A .throw or .return when the delegate iterator has no .throw
- // method always terminates the yield* loop.
- context.delegate = null;
- if (context.method === "throw") {
- // Note: ["return"] must be used for ES3 parsing compatibility.
- if (delegate.iterator["return"]) {
- // If the delegate iterator has a return method, give it a
- // chance to clean up.
- context.method = "return";
- context.arg = undefined;
- maybeInvokeDelegate(delegate, context);
- if (context.method === "throw") {
- // If maybeInvokeDelegate(context) changed context.method from
- // "return" to "throw", let that override the TypeError below.
- return ContinueSentinel;
- }
- }
- context.method = "throw";
- context.arg = new TypeError(
- "The iterator does not provide a 'throw' method");
- }
- return ContinueSentinel;
- }
- var record = tryCatch(method, delegate.iterator, context.arg);
- if (record.type === "throw") {
- context.method = "throw";
- context.arg = record.arg;
- context.delegate = null;
- return ContinueSentinel;
- }
- var info = record.arg;
- if (! info) {
- context.method = "throw";
- context.arg = new TypeError("iterator result is not an object");
- context.delegate = null;
- return ContinueSentinel;
- }
- if (info.done) {
- // Assign the result of the finished delegate to the temporary
- // variable specified by delegate.resultName (see delegateYield).
- context[delegate.resultName] = info.value;
- // Resume execution at the desired location (see delegateYield).
- context.next = delegate.nextLoc;
- // If context.method was "throw" but the delegate handled the
- // exception, let the outer generator proceed normally. If
- // context.method was "next", forget context.arg since it has been
- // "consumed" by the delegate iterator. If context.method was
- // "return", allow the original .return call to continue in the
- // outer generator.
- if (context.method !== "return") {
- context.method = "next";
- context.arg = undefined;
- }
- } else {
- // Re-yield the result returned by the delegate method.
- return info;
- }
- // The delegate iterator is finished, so forget it and continue with
- // the outer generator.
- context.delegate = null;
- return ContinueSentinel;
- }
- // Define Generator.prototype.{next,throw,return} in terms of the
- // unified ._invoke helper method.
- defineIteratorMethods(Gp);
- Gp[toStringTagSymbol] = "Generator";
- // A Generator should always return itself as the iterator object when the
- // @@iterator function is called on it. Some browsers' implementations of the
- // iterator prototype chain incorrectly implement this, causing the Generator
- // object to not be returned from this call. This ensures that doesn't happen.
- // See https://github.com/facebook/regenerator/issues/274 for more details.
- Gp[iteratorSymbol] = function() {
- return this;
- };
- Gp.toString = function() {
- return "[object Generator]";
- };
- function pushTryEntry(locs) {
- var entry = { tryLoc: locs[0] };
- if (1 in locs) {
- entry.catchLoc = locs[1];
- }
- if (2 in locs) {
- entry.finallyLoc = locs[2];
- entry.afterLoc = locs[3];
- }
- this.tryEntries.push(entry);
- }
- function resetTryEntry(entry) {
- var record = entry.completion || {};
- record.type = "normal";
- delete record.arg;
- entry.completion = record;
- }
- function Context(tryLocsList) {
- // The root entry object (effectively a try statement without a catch
- // or a finally block) gives us a place to store values thrown from
- // locations where there is no enclosing try statement.
- this.tryEntries = [{ tryLoc: "root" }];
- tryLocsList.forEach(pushTryEntry, this);
- this.reset(true);
- }
- exports.keys = function(object) {
- var keys = [];
- for (var key in object) {
- keys.push(key);
- }
- keys.reverse();
- // Rather than returning an object with a next method, we keep
- // things simple and return the next function itself.
- return function next() {
- while (keys.length) {
- var key = keys.pop();
- if (key in object) {
- next.value = key;
- next.done = false;
- return next;
- }
- }
- // To avoid creating an additional object, we just hang the .value
- // and .done properties off the next function object itself. This
- // also ensures that the minifier will not anonymize the function.
- next.done = true;
- return next;
- };
- };
- function values(iterable) {
- if (iterable) {
- var iteratorMethod = iterable[iteratorSymbol];
- if (iteratorMethod) {
- return iteratorMethod.call(iterable);
- }
- if (typeof iterable.next === "function") {
- return iterable;
- }
- if (!isNaN(iterable.length)) {
- var i = -1, next = function next() {
- while (++i < iterable.length) {
- if (hasOwn.call(iterable, i)) {
- next.value = iterable[i];
- next.done = false;
- return next;
- }
- }
- next.value = undefined;
- next.done = true;
- return next;
- };
- return next.next = next;
- }
- }
- // Return an iterator with no values.
- return { next: doneResult };
- }
- exports.values = values;
- function doneResult() {
- return { value: undefined, done: true };
- }
- Context.prototype = {
- constructor: Context,
- reset: function(skipTempReset) {
- this.prev = 0;
- this.next = 0;
- // Resetting context._sent for legacy support of Babel's
- // function.sent implementation.
- this.sent = this._sent = undefined;
- this.done = false;
- this.delegate = null;
- this.method = "next";
- this.arg = undefined;
- this.tryEntries.forEach(resetTryEntry);
- if (!skipTempReset) {
- for (var name in this) {
- // Not sure about the optimal order of these conditions:
- if (name.charAt(0) === "t" &&
- hasOwn.call(this, name) &&
- !isNaN(+name.slice(1))) {
- this[name] = undefined;
- }
- }
- }
- },
- stop: function() {
- this.done = true;
- var rootEntry = this.tryEntries[0];
- var rootRecord = rootEntry.completion;
- if (rootRecord.type === "throw") {
- throw rootRecord.arg;
- }
- return this.rval;
- },
- dispatchException: function(exception) {
- if (this.done) {
- throw exception;
- }
- var context = this;
- function handle(loc, caught) {
- record.type = "throw";
- record.arg = exception;
- context.next = loc;
- if (caught) {
- // If the dispatched exception was caught by a catch block,
- // then let that catch block handle the exception normally.
- context.method = "next";
- context.arg = undefined;
- }
- return !! caught;
- }
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- var record = entry.completion;
- if (entry.tryLoc === "root") {
- // Exception thrown outside of any try block that could handle
- // it, so set the completion value of the entire function to
- // throw the exception.
- return handle("end");
- }
- if (entry.tryLoc <= this.prev) {
- var hasCatch = hasOwn.call(entry, "catchLoc");
- var hasFinally = hasOwn.call(entry, "finallyLoc");
- if (hasCatch && hasFinally) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- } else if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
- } else if (hasCatch) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- }
- } else if (hasFinally) {
- if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
- } else {
- throw new Error("try statement without catch or finally");
- }
- }
- }
- },
- abrupt: function(type, arg) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc <= this.prev &&
- hasOwn.call(entry, "finallyLoc") &&
- this.prev < entry.finallyLoc) {
- var finallyEntry = entry;
- break;
- }
- }
- if (finallyEntry &&
- (type === "break" ||
- type === "continue") &&
- finallyEntry.tryLoc <= arg &&
- arg <= finallyEntry.finallyLoc) {
- // Ignore the finally entry if control is not jumping to a
- // location outside the try/catch block.
- finallyEntry = null;
- }
- var record = finallyEntry ? finallyEntry.completion : {};
- record.type = type;
- record.arg = arg;
- if (finallyEntry) {
- this.method = "next";
- this.next = finallyEntry.finallyLoc;
- return ContinueSentinel;
- }
- return this.complete(record);
- },
- complete: function(record, afterLoc) {
- if (record.type === "throw") {
- throw record.arg;
- }
- if (record.type === "break" ||
- record.type === "continue") {
- this.next = record.arg;
- } else if (record.type === "return") {
- this.rval = this.arg = record.arg;
- this.method = "return";
- this.next = "end";
- } else if (record.type === "normal" && afterLoc) {
- this.next = afterLoc;
- }
- return ContinueSentinel;
- },
- finish: function(finallyLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.finallyLoc === finallyLoc) {
- this.complete(entry.completion, entry.afterLoc);
- resetTryEntry(entry);
- return ContinueSentinel;
- }
- }
- },
- "catch": function(tryLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc === tryLoc) {
- var record = entry.completion;
- if (record.type === "throw") {
- var thrown = record.arg;
- resetTryEntry(entry);
- }
- return thrown;
- }
- }
- // The context.catch method must only be called with a location
- // argument that corresponds to a known catch block.
- throw new Error("illegal catch attempt");
- },
- delegateYield: function(iterable, resultName, nextLoc) {
- this.delegate = {
- iterator: values(iterable),
- resultName: resultName,
- nextLoc: nextLoc
- };
- if (this.method === "next") {
- // Deliberately forget the last sent value so that we don't
- // accidentally pass it on to the delegate.
- this.arg = undefined;
- }
- return ContinueSentinel;
- }
- };
- // Regardless of whether this script is executing as a CommonJS module
- // or not, return the runtime object so that we can declare the variable
- // regeneratorRuntime in the outer scope, which allows this module to be
- // injected easily by `bin/regenerator --include-runtime script.js`.
- return exports;
- }(
- // If this script is executing as a CommonJS module, use module.exports
- // as the regeneratorRuntime namespace. Otherwise create a new empty
- // object. Either way, the resulting object will be used to initialize
- // the regeneratorRuntime variable at the top of this file.
- true ? module.exports : undefined
- ));
- try {
- regeneratorRuntime = runtime;
- } catch (accidentalStrictMode) {
- // This module should not be running in strict mode, so the above
- // assignment should always work unless something is misconfigured. Just
- // in case runtime.js accidentally runs in strict mode, we can escape
- // strict mode using a global Function call. This could conceivably fail
- // if a Content Security Policy forbids using Function, but in that case
- // the proper solution is to fix the accidental strict mode problem. If
- // you've misconfigured your bundler to force strict mode and applied a
- // CSP to forbid Function, and you're not willing to fix either of those
- // problems, please detail your unique predicament in a GitHub issue.
- Function("r", "regeneratorRuntime = r")(runtime);
- }
- /***/ }),
- /***/ "7de9":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAADVFJREFUeAHt2zFuEwEARFGCOExuRoGoEF3KtFSIIpyC43AbUIpIabzJSpaYT16aWNn1ZvzGxcgr33z9+evPOz8ECBAgQIAAgWsIGBbXUHQNAgQIECBA4HFTvMdAgAABAgQIELiWgGFxLUnXIUCAAAECBN4ZFt4EBAgQIECAwNUEDIurUboQAQIECBAgYFh4DxAgQIAAAQJXE/hwdKVvt598FfUIyDECBAgQIPAGBb78/nFz6WUfDovHJx09+dJF/Z0AAQIECBD4PwVe+tDBrZD/s3evigABAgQI/BOBFz+xeEr1+f7BbZEnDL8JECBAgMAbE/h+9/Hi7Y/nFK8eFo9Peu1Fn/8DjwkQIECAAIG2wJkPF9wKaXctPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpgQ9n0ny+f/hz5nznEiBAgAABAm9L4NXD4vvdx5u3RePVEiBAgAABAmcF3Ao5K+Z8AgQIECBA4KLAi59YfLv95PbHRT4HCBAgQIAAgecCh8Piy+8fbn881/KYAAECBAgQOBRwK+SQx0ECBAgQIEDgjIBhcUbLuQQIECBAgMChgGFxyOMgAQIECBAgcEbAsDij5VwCBAgQIEDgUMCwOORxkAABAgQIEDgjcPP15y9fJz0j5lwCBAgQIEDgosBfCPklARb6dIIAAAAASUVORK5CYII="
- /***/ }),
- /***/ "7fd4":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _default = {
- dateTimeFormat: {
- date: {
- year: 'numeric',
- month: 'short',
- day: 'numeric'
- },
- date_second: {
- year: 'numeric',
- month: 'short',
- day: 'numeric',
- hour: 'numeric',
- minute: 'numeric',
- second: 'numeric'
- },
- date_second_week: {
- year: 'numeric',
- month: 'short',
- day: 'numeric',
- weekday: 'long',
- hour: 'numeric',
- minute: 'numeric',
- second: 'numeric'
- }
- },
- // messageTemplate
- warning: {
- unsupportedVideoAddress: 'The video address is illegal',
- unavailableVideo: 'This video is temporarily unavailable, please try again later',
- mapNotLoaded: 'The associated map has not been loaded yet, please wait for a second',
- unassociatedMap: 'You need to configure the associated map!'
- },
- success: {},
- info: {
- loading: 'Loading...',
- pressEscToExit: 'Press the ESC key or click the close button to exit'
- },
- unit: {
- kilometers: 'km',
- miles: 'mi',
- meters: 'm',
- yards: 'yd',
- feet: 'ft',
- squarekilometers: 'sq km',
- squaremiles: 'sq mi',
- squaremeters: 'sq m',
- squareyards: 'sq yd',
- squarefeet: 'sq ft'
- },
- error: {},
- commontypes: {
- restData: 'SuperMap Rest Data Service',
- restMap: 'SuperMap Rest Map Service',
- addressMatch: 'SuperMap Address Matching Service',
- iportalData: 'SuperMap iPortal Data',
- onlineLocalSearch: 'SuperMap Online Local Search'
- },
- // 微件
- timeText: {
- Year: 'year',
- Month: 'month',
- Day: 'd',
- hour: 'h',
- minute: 'min',
- second: 's'
- },
- zoom: {},
- chart: {
- unSupportedData: 'The current data does not support linkage with the map'
- },
- layerList: {
- title: 'Layer'
- },
- miniMap: {},
- pan: {},
- scale: {},
- webmap: {
- loadingTip: 'Map is loading...',
- crsNotSupport: 'The coordinate system of the current map is not supported!',
- TileMatrixSetNotSuppport: 'Incoming TileMatrixSet is not supported!',
- getLayerInfoFailed: 'Failed to get layer information!',
- getThemeInfoFailed: 'Failed to get theme information!',
- crsnotsupport: 'Unsupported coordinate system!',
- baiduMapNotSupport: 'Baidu maps is not supported yet!',
- sampleDataNotSupport: 'Sample datas is not supported yet!',
- mvtNotSupport: 'Vector tile layers is not supported yet!'
- },
- legend: {
- themeField: 'Thematic Field',
- title: 'Legend',
- top: 'Highest',
- bottom: 'Lowest',
- noMatchLayer: 'No matching layer'
- },
- measure: {
- mapMeasure: 'Measure',
- measureResult: 'Measurement Result',
- distance: 'Distance',
- area: 'Area',
- delete: 'Empty',
- selectPlaceholder: 'Please Select',
- startingPoint: 'Starting Point'
- },
- search: {
- noResult: 'The query result is empty!',
- noKey: 'The search keyword cannot be empty. Please enter the search condition.',
- inputPlaceHolder: 'Find an address or location',
- attribute: 'Attribute',
- attributeValue: 'Attribute Value',
- setSearchSource: 'Please set the search source!',
- address: 'Address',
- null: 'Null',
- illegalFeature: 'Features must contain legal coordinates!'
- },
- query: {
- query: 'Query',
- queryJob: 'Task',
- queryResult: 'Result',
- attributeCondition: 'Attribute Condition',
- spatialFilter: 'Spatial Filter',
- mapBounds: 'Query within the whole map extent',
- currentMapBounds: 'Query within current viewbound',
- applicate: 'Apply',
- noResult: 'No Result',
- resultAlreadyExists: 'The current query result already exists!',
- querying: 'Querying...',
- attribute: 'Attribute',
- attributeValue: 'Attribute Value',
- noResults: 'The query result is empty!',
- queryFailed: 'Query failed!',
- seviceNotSupport: 'This service does not support queries!'
- },
- identify: {
- layerNotExit: "The layer '{layer}' does not exist in the map's style",
- noData: 'no Data'
- },
- openFile: {
- fileSizeExceeded: "The file size is too big! The file size can't exceed 10M!",
- fileTypeUnsupported: 'This file format is not supported!',
- openFileFail: 'File open failed!',
- openFileSuccess: 'File open succeeded!',
- selectFile: 'Select File',
- openEmptyFile: 'The opened file is empty!',
- openFile: 'Open File'
- },
- draw: {
- draw: 'Draw'
- },
- indicator: {
- title: 'Indicator Title',
- unit: 'Unit'
- },
- layerManager: {
- title: 'Layer Manager'
- },
- tdtResults: {
- on: 'on ',
- station: ' station',
- total: 'total',
- about: 'about ',
- // pagination
- homePage: 'Home',
- prevPage: 'Previous',
- nextPage: 'Next',
- // nothingResult
- searchNoResult: 'No related results were found',
- youCanTry: 'You can try',
- enterCorrect: 'Check if the input is correct',
- enterOtherKeyWords: 'Enter another keyword to search',
- onTdtMap: 'On the map of the sky',
- addThisAddress: 'Add this address',
- uWantTo: 'Are you looking for',
- // pointResults
- totalFind: 'found',
- piecesResults: 'result',
- phone: 'Tell',
- address: 'Address',
- setStartPonint: 'Set as starting point',
- setEndPonint: 'Set as end point',
- // routePlan
- totalMiles: 'total mileage',
- distance: 'About {distance} km',
- showDetails: 'Show full details',
- switchTimes: 'Transfer {switchTimes} times',
- noSwitch: 'No transfer',
- walk: 'Walk to',
- getOff: 'get off',
- getOn: 'boarding',
- take: 'take ',
- noSearchResults: 'No line information was found',
- fastRoute: 'Fastest line',
- shortRoute: 'Shortest line',
- walkRoute: 'Less high speed',
- fast: 'Faster',
- noSubway: 'No subway',
- lessSwitch: 'Less transfer',
- lessWalk: 'Less walking',
- // staticResult
- cityHadResults: 'The following cities have results, please choose',
- moreCity: 'More cities',
- // LineResult
- allFound: 'Found for you',
- piecesBusRoute: 'bus route',
- showDetail: 'Expand details',
- busEndTime: 'First and last bus time',
- relateAdress: 'Click here to see the location of "{keyWord}"',
- // areaResult
- switchTo: 'Switched to'
- },
- tdtRoute: {
- title: 'Route',
- clearRoute: 'Clear route',
- pleaseEnterStartPoint: 'Please enter the starting address',
- pleaseEnterEndPoint: 'Please enter the destination address',
- search: 'Search',
- startPoint: 'Starting address',
- endPoint: 'Destination address',
- mapLoadedFiled: 'Map failed to load',
- busEndTime: 'First and last bus time',
- about: 'about ',
- station: ' station',
- total: 'total',
- hour: ' hour',
- minutes: ' minutes'
- },
- tdtSearch: {
- phone: 'Tell',
- address: 'Address',
- noData: 'No data',
- transport: 'traffic'
- },
- tdtMapSwitcher: {
- title: 'Map Switcher',
- image: 'image',
- vector: 'vector',
- terrain: 'terrain',
- placeName: 'placeName',
- TiandituVec: 'TiandituVecLayer',
- TiandituTer: 'TiandituTerLayer',
- TiandituImg: 'TiandituImgLayer',
- TiandituCva: 'TiandituCvaLabel',
- TiandituCta: 'TiandituCtaLabel',
- TiandituCia: 'TiandituCiaLabel'
- },
- // layer
- dataFlow: {
- dataSubscriptionFailed: 'Data subscription failed!'
- },
- animateMarkerlayer: {
- unsupportedData: 'The data is not supported, please reset the data!'
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "80e6":
- /***/ (function(module, exports, __webpack_require__) {
- var root = __webpack_require__("18ca");
- /** Built-in value references. */
- var Symbol = root.Symbol;
- module.exports = Symbol;
- /***/ }),
- /***/ "8156":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _vue = _interopRequireDefault(__webpack_require__("5643"));
- var _vuePropertyDecorator = __webpack_require__("e22c");
- var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
- var c = arguments.length,
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
- d;
- if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- }
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- var Timer =
- /*#__PURE__*/
- function (_Vue) {
- (0, _inherits2.default)(Timer, _Vue);
- function Timer() {
- var _this;
- (0, _classCallCheck2.default)(this, Timer);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Timer).apply(this, arguments));
- _this.timer = null;
- return _this;
- }
- (0, _createClass2.default)(Timer, [{
- key: "onStartTimingChange",
- value: function onStartTimingChange(newValue) {
- if (newValue) {
- this._start();
- } else {
- this._close();
- }
- }
- }, {
- key: "onFrequencyChange",
- value: function onFrequencyChange() {
- if (this.startTiming) {
- this.resetTimer();
- }
- }
- }, {
- key: "_start",
- value: function _start() {
- var _this2 = this;
- var time = 1000 * this.frequency || 3000;
- this.startTimer();
- this.timer = setInterval(function () {
- _this2.timing();
- }, time);
- }
- }, {
- key: "_close",
- value: function _close() {
- if (this.timer) {
- clearInterval(this.timer);
- this.timer = null;
- }
- this.closeTimer();
- }
- }, {
- key: "startTimer",
- value: function startTimer() {}
- }, {
- key: "timing",
- value: function timing() {}
- }, {
- key: "closeTimer",
- value: function closeTimer() {}
- }, {
- key: "resetTimer",
- value: function resetTimer() {
- this._close();
- this._start();
- }
- }, {
- key: "beforeDestroy",
- value: function beforeDestroy() {
- this.startTiming && this._close();
- }
- }]);
- return Timer;
- }(_vue.default);
- __decorate([(0, _vuePropertyDecorator.Prop)({
- default: false
- })], Timer.prototype, "startTiming", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)({
- default: 3
- })], Timer.prototype, "frequency", void 0);
- __decorate([(0, _vuePropertyDecorator.Watch)('startTiming', {
- immediate: true
- })], Timer.prototype, "onStartTimingChange", null);
- __decorate([(0, _vuePropertyDecorator.Watch)('frequency')], Timer.prototype, "onFrequencyChange", null);
- Timer = __decorate([_vuePropertyDecorator.Component], Timer);
- var _default = Timer;
- exports.default = _default;
- /***/ }),
- /***/ "8232":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2322");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "8275":
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__8275__;
- /***/ }),
- /***/ "827d":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/time-text/TimeText.vue?vue&type=template&id=6da009bc&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-time-text",style:([_vm.fontStyle, _vm.getBackgroundStyle, _vm.getTextColorStyle])},[_c('span',[_vm._v(_vm._s(_vm.time))])])}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/time-text/TimeText.vue?vue&type=template&id=6da009bc&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "830f":
- /***/ (function(module, exports) {
- function _nonIterableRest() {
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
- }
- module.exports = _nonIterableRest;
- /***/ }),
- /***/ "8330":
- /***/ (function(module, exports, __webpack_require__) {
- var Symbol = __webpack_require__("80e6");
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = objectProto.toString;
- /** Built-in value references. */
- var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
- /**
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the raw `toStringTag`.
- */
- function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag),
- tag = value[symToStringTag];
- try {
- value[symToStringTag] = undefined;
- var unmasked = true;
- } catch (e) {}
- var result = nativeObjectToString.call(value);
- if (unmasked) {
- if (isOwn) {
- value[symToStringTag] = tag;
- } else {
- delete value[symToStringTag];
- }
- }
- return result;
- }
- module.exports = getRawTag;
- /***/ }),
- /***/ "8377":
- /***/ (function(module, exports, __webpack_require__) {
- var _typeof = __webpack_require__("7ae5");
- var assertThisInitialized = __webpack_require__("27f6");
- function _possibleConstructorReturn(self, call) {
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
- return call;
- }
- return assertThisInitialized(self);
- }
- module.exports = _possibleConstructorReturn;
- /***/ }),
- /***/ "849c":
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("7cfc");
- /***/ }),
- /***/ "8537":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _vue = _interopRequireDefault(__webpack_require__("5643"));
- var _vuePropertyDecorator = __webpack_require__("e22c");
- __webpack_require__("717b");
- var _vueVideoPlayer = __webpack_require__("dfae");
- var _lodash = _interopRequireDefault(__webpack_require__("25a2"));
- var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
- var c = arguments.length,
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
- d;
- if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- }
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- var SmVideoPlayer =
- /*#__PURE__*/
- function (_Vue) {
- (0, _inherits2.default)(SmVideoPlayer, _Vue);
- function SmVideoPlayer() {
- var _this;
- (0, _classCallCheck2.default)(this, SmVideoPlayer);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SmVideoPlayer).apply(this, arguments));
- _this.isFirst = true;
- _this.modalVisible = false;
- _this.playerOptions = {};
- _this.modalPlayerOptions = {};
- return _this;
- }
- (0, _createClass2.default)(SmVideoPlayer, [{
- key: "modalVisibleChanged",
- value: function modalVisibleChanged() {
- if (this.modalVisible && this.modalVideoPlayer) {
- this.modalVideoPlayer.currentTime(0);
- this.modalVideoPlayer.play();
- }
- }
- }, {
- key: "urlChanged",
- value: function urlChanged() {
- this.handlePlayerOptions();
- }
- }, {
- key: "optionsChanged",
- value: function optionsChanged() {
- this.handlePlayerOptions();
- }
- }, {
- key: "created",
- value: function created() {
- this.handlePlayerOptions();
- }
- }, {
- key: "handlePlayerOptions",
- value: function handlePlayerOptions() {
- if (!this.url) {
- return;
- }
- if (!this.checkUrl(this.url)) {
- this.$message.warning(this.$t('warning.unsupportedVideoAddress'), 1);
- if (this.playerOptions.sources) {
- this.playerOptions.sources[0].src = '';
- this.modalPlayerOptions.sources[0].src = '';
- }
- return;
- }
- var sourcesType = this.url.split('.');
- var commonOptions = {
- height: '100%',
- autoplay: this.options.autoplay !== null ? this.options.autoplay : false,
- muted: this.options.muted !== null ? this.options.muted : true,
- loop: this.options.loop !== null ? this.options.loop : false,
- fluid: false,
- language: 'zh-CN',
- playbackRates: [0.7, 1.0, 1.5, 2.0],
- sources: [{
- type: "video/".concat(sourcesType[sourcesType.length - 1]),
- src: "".concat(this.options.autoplay && !this.options.popupToPlay ? this.url : this.url + '#t=0.8')
- }],
- preload: 'metadata',
- poster: '',
- controlBar: {
- timeDivider: false,
- durationDisplay: false,
- remainingTimeDisplay: false,
- fullscreenToggle: true
- },
- notSupportedMessage: this.$t('warning.unavailableVideo')
- };
- this.playerOptions = (0, _lodash.default)(commonOptions);
- this.modalPlayerOptions = (0, _lodash.default)(commonOptions);
- this.modalPlayerOptions.sources[0].src = this.url;
- this.modalPlayerOptions.autoplay = true;
- this.modalPlayerOptions.preload = 'none';
- this.modalPlayerOptions.height = '600';
- }
- }, {
- key: "onPlayerPlay",
- value: function onPlayerPlay(player) {
- if (!this.checkUrl(this.url)) {
- return;
- }
- if (this.isFirst && this.options.popupToPlay) {
- this.$message.info(this.$t('info.pressEscToExit'), 3);
- }
- if (this.isFirst && !this.options.popupToPlay && !this.options.autoplay) {
- player.currentTime(0);
- this.isFirst = false;
- }
- if (this.options.popupToPlay) {
- player.pause();
- player.currentTime(1);
- player.controlBar.el_.style.visibility = 'hidden';
- this.modalVisible = true;
- } else {
- this.handleControlBar(player);
- }
- }
- }, {
- key: "onModalPlayerPlay",
- value: function onModalPlayerPlay(player) {
- this.handleControlBar(player);
- }
- }, {
- key: "onModalPlayerLoadeddata",
- value: function onModalPlayerLoadeddata(player) {
- this.modalVideoPlayer = player;
- player.play();
- this.handleControlBar(player);
- }
- }, {
- key: "onPlayerEnded",
- value: function onPlayerEnded(player) {
- if (!this.options.autoplay && !this.options.popupToPlay) {
- player.currentTime(1);
- this.isFirst = true;
- }
- }
- }, {
- key: "onPlayerLoadeddata",
- value: function onPlayerLoadeddata(player) {
- if (!this.checkUrl(this.url)) {
- return;
- }
- this.options.popupToPlay && player.pause();
- !this.options.popupToPlay && this.options.autoplay && player.play();
- }
- }, {
- key: "handleControlBar",
- value: function handleControlBar(player) {
- var isControlBarShow = this.options.controlBar === null ? true : this.options.controlBar;
- if (isControlBarShow) {
- player.controlBar.el_.style.visibility = 'visible';
- } else {
- player.controlBar.el_.style.visibility = 'hidden';
- }
- }
- }, {
- key: "checkUrl",
- value: function checkUrl(url) {
- var match;
- if (url === '' || !this.isMatchUrl(url) || url.indexOf('ogg') < 0 && url.indexOf('mp4') < 0 && url.indexOf('webm') < 0) {
- match = false;
- } else {
- match = true;
- }
- return match;
- }
- }, {
- key: "isMatchUrl",
- value: function isMatchUrl(str) {
- var reg = new RegExp('(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
- return reg.test(str);
- }
- }, {
- key: "player",
- get: function get() {
- return this.$refs.videoPlayer.player;
- }
- }]);
- return SmVideoPlayer;
- }(_vue.default);
- __decorate([(0, _vuePropertyDecorator.Prop)()], SmVideoPlayer.prototype, "url", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)({
- default: function _default() {
- return {
- muted: true,
- loop: false,
- popupToPlay: false,
- autoplay: false,
- controlBar: true
- };
- }
- })], SmVideoPlayer.prototype, "options", void 0);
- __decorate([(0, _vuePropertyDecorator.Watch)('modalVisible')], SmVideoPlayer.prototype, "modalVisibleChanged", null);
- __decorate([(0, _vuePropertyDecorator.Watch)('url')], SmVideoPlayer.prototype, "urlChanged", null);
- __decorate([(0, _vuePropertyDecorator.Watch)('options')], SmVideoPlayer.prototype, "optionsChanged", null);
- SmVideoPlayer = __decorate([(0, _vuePropertyDecorator.Component)({
- name: 'SmVideoPlayer',
- components: {
- videoPlayer: _vueVideoPlayer.videoPlayer
- }
- })], SmVideoPlayer);
- var _default2 = SmVideoPlayer;
- exports.default = _default2;
- /***/ }),
- /***/ "85c3":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _Layer = _interopRequireDefault(__webpack_require__("0fb2"));
- var _default = {
- mixins: [_Layer.default],
- props: {
- pane: {
- type: String,
- default: 'tilePane'
- },
- opacity: {
- type: Number,
- default: 1,
- validator: function validator(opacity) {
- return opacity >= 0 && opacity <= 1;
- }
- },
- bounds: {
- type: Array
- },
- zIndex: {
- type: Number,
- default: 1
- },
- tileSize: {
- type: Number,
- default: 256
- },
- noWrap: {
- type: Boolean,
- default: false
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "8607":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- Object.defineProperty(exports, "AddressMatchParameter", {
- enumerable: true,
- get: function get() {
- return _AddressMatchParameter.default;
- }
- });
- Object.defineProperty(exports, "iPortalDataParameter", {
- enumerable: true,
- get: function get() {
- return _iPortalDataParameter.default;
- }
- });
- Object.defineProperty(exports, "RestDataParameter", {
- enumerable: true,
- get: function get() {
- return _RestDataParameter.default;
- }
- });
- Object.defineProperty(exports, "RestMapParameter", {
- enumerable: true,
- get: function get() {
- return _RestMapParameter.default;
- }
- });
- Object.defineProperty(exports, "RestParameter", {
- enumerable: true,
- get: function get() {
- return _RestParameter.default;
- }
- });
- var _AddressMatchParameter = _interopRequireDefault(__webpack_require__("6375"));
- var _iPortalDataParameter = _interopRequireDefault(__webpack_require__("c486"));
- var _RestDataParameter = _interopRequireDefault(__webpack_require__("ff4e"));
- var _RestMapParameter = _interopRequireDefault(__webpack_require__("9c55"));
- var _RestParameter = _interopRequireDefault(__webpack_require__("2f66"));
- /***/ }),
- /***/ "88e1":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("cce2");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("b429");
- var render, staticRenderFns
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(
- _SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"],
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "8afa":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- module.exports = {
- "aliceblue": [240, 248, 255],
- "antiquewhite": [250, 235, 215],
- "aqua": [0, 255, 255],
- "aquamarine": [127, 255, 212],
- "azure": [240, 255, 255],
- "beige": [245, 245, 220],
- "bisque": [255, 228, 196],
- "black": [0, 0, 0],
- "blanchedalmond": [255, 235, 205],
- "blue": [0, 0, 255],
- "blueviolet": [138, 43, 226],
- "brown": [165, 42, 42],
- "burlywood": [222, 184, 135],
- "cadetblue": [95, 158, 160],
- "chartreuse": [127, 255, 0],
- "chocolate": [210, 105, 30],
- "coral": [255, 127, 80],
- "cornflowerblue": [100, 149, 237],
- "cornsilk": [255, 248, 220],
- "crimson": [220, 20, 60],
- "cyan": [0, 255, 255],
- "darkblue": [0, 0, 139],
- "darkcyan": [0, 139, 139],
- "darkgoldenrod": [184, 134, 11],
- "darkgray": [169, 169, 169],
- "darkgreen": [0, 100, 0],
- "darkgrey": [169, 169, 169],
- "darkkhaki": [189, 183, 107],
- "darkmagenta": [139, 0, 139],
- "darkolivegreen": [85, 107, 47],
- "darkorange": [255, 140, 0],
- "darkorchid": [153, 50, 204],
- "darkred": [139, 0, 0],
- "darksalmon": [233, 150, 122],
- "darkseagreen": [143, 188, 143],
- "darkslateblue": [72, 61, 139],
- "darkslategray": [47, 79, 79],
- "darkslategrey": [47, 79, 79],
- "darkturquoise": [0, 206, 209],
- "darkviolet": [148, 0, 211],
- "deeppink": [255, 20, 147],
- "deepskyblue": [0, 191, 255],
- "dimgray": [105, 105, 105],
- "dimgrey": [105, 105, 105],
- "dodgerblue": [30, 144, 255],
- "firebrick": [178, 34, 34],
- "floralwhite": [255, 250, 240],
- "forestgreen": [34, 139, 34],
- "fuchsia": [255, 0, 255],
- "gainsboro": [220, 220, 220],
- "ghostwhite": [248, 248, 255],
- "gold": [255, 215, 0],
- "goldenrod": [218, 165, 32],
- "gray": [128, 128, 128],
- "green": [0, 128, 0],
- "greenyellow": [173, 255, 47],
- "grey": [128, 128, 128],
- "honeydew": [240, 255, 240],
- "hotpink": [255, 105, 180],
- "indianred": [205, 92, 92],
- "indigo": [75, 0, 130],
- "ivory": [255, 255, 240],
- "khaki": [240, 230, 140],
- "lavender": [230, 230, 250],
- "lavenderblush": [255, 240, 245],
- "lawngreen": [124, 252, 0],
- "lemonchiffon": [255, 250, 205],
- "lightblue": [173, 216, 230],
- "lightcoral": [240, 128, 128],
- "lightcyan": [224, 255, 255],
- "lightgoldenrodyellow": [250, 250, 210],
- "lightgray": [211, 211, 211],
- "lightgreen": [144, 238, 144],
- "lightgrey": [211, 211, 211],
- "lightpink": [255, 182, 193],
- "lightsalmon": [255, 160, 122],
- "lightseagreen": [32, 178, 170],
- "lightskyblue": [135, 206, 250],
- "lightslategray": [119, 136, 153],
- "lightslategrey": [119, 136, 153],
- "lightsteelblue": [176, 196, 222],
- "lightyellow": [255, 255, 224],
- "lime": [0, 255, 0],
- "limegreen": [50, 205, 50],
- "linen": [250, 240, 230],
- "magenta": [255, 0, 255],
- "maroon": [128, 0, 0],
- "mediumaquamarine": [102, 205, 170],
- "mediumblue": [0, 0, 205],
- "mediumorchid": [186, 85, 211],
- "mediumpurple": [147, 112, 219],
- "mediumseagreen": [60, 179, 113],
- "mediumslateblue": [123, 104, 238],
- "mediumspringgreen": [0, 250, 154],
- "mediumturquoise": [72, 209, 204],
- "mediumvioletred": [199, 21, 133],
- "midnightblue": [25, 25, 112],
- "mintcream": [245, 255, 250],
- "mistyrose": [255, 228, 225],
- "moccasin": [255, 228, 181],
- "navajowhite": [255, 222, 173],
- "navy": [0, 0, 128],
- "oldlace": [253, 245, 230],
- "olive": [128, 128, 0],
- "olivedrab": [107, 142, 35],
- "orange": [255, 165, 0],
- "orangered": [255, 69, 0],
- "orchid": [218, 112, 214],
- "palegoldenrod": [238, 232, 170],
- "palegreen": [152, 251, 152],
- "paleturquoise": [175, 238, 238],
- "palevioletred": [219, 112, 147],
- "papayawhip": [255, 239, 213],
- "peachpuff": [255, 218, 185],
- "peru": [205, 133, 63],
- "pink": [255, 192, 203],
- "plum": [221, 160, 221],
- "powderblue": [176, 224, 230],
- "purple": [128, 0, 128],
- "rebeccapurple": [102, 51, 153],
- "red": [255, 0, 0],
- "rosybrown": [188, 143, 143],
- "royalblue": [65, 105, 225],
- "saddlebrown": [139, 69, 19],
- "salmon": [250, 128, 114],
- "sandybrown": [244, 164, 96],
- "seagreen": [46, 139, 87],
- "seashell": [255, 245, 238],
- "sienna": [160, 82, 45],
- "silver": [192, 192, 192],
- "skyblue": [135, 206, 235],
- "slateblue": [106, 90, 205],
- "slategray": [112, 128, 144],
- "slategrey": [112, 128, 144],
- "snow": [255, 250, 250],
- "springgreen": [0, 255, 127],
- "steelblue": [70, 130, 180],
- "tan": [210, 180, 140],
- "teal": [0, 128, 128],
- "thistle": [216, 191, 216],
- "tomato": [255, 99, 71],
- "turquoise": [64, 224, 208],
- "violet": [238, 130, 238],
- "wheat": [245, 222, 179],
- "white": [255, 255, 255],
- "whitesmoke": [245, 245, 245],
- "yellow": [255, 255, 0],
- "yellowgreen": [154, 205, 50]
- };
- /***/ }),
- /***/ "8b18":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _vueCountTo = _interopRequireDefault(__webpack_require__("4849"));
- var _util = __webpack_require__("1448");
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var _default2 = {
- name: 'SmCountTo',
- extends: _vueCountTo.default,
- props: {
- fontSize: {
- type: [String, Number]
- },
- numBackground: {
- type: Object,
- default: function _default() {
- return {
- color: 'rgba(0, 0, 0, 0)',
- image: '',
- padding: 0
- };
- }
- },
- numSpacing: {
- type: Number,
- default: 0
- },
- separatorBackground: {
- type: Boolean,
- default: false
- }
- },
- computed: {
- calNumBackground: function calNumBackground() {
- var _this = this;
- return function (value) {
- if (!_this.numBackground) {
- return {};
- }
- if (value && !_this.separatorBackground && (value === _this.separator || value === _this.decimal)) {
- return {};
- }
- var reg = /\d+(\.\d+)?([a-z]+)/gi;
- var fontUnit = _this.fontSize ? _this.fontSize.replace(reg, '$2') : '';
- var styleObj = {
- backgroundColor: _this.numBackground.color,
- padding: _this.numBackground.padding
- };
- if (_this.numBackground.image) {
- styleObj = Object.assign(styleObj, {
- backgroundImage: "url(".concat(_this.numBackground.image, ")"),
- backgroundSize: '100% 100%'
- });
- }
- if (_this.numBackground.image || !(0, _util.isTransparent)(_this.numBackground.color)) {
- styleObj = Object.assign(styleObj, {
- textIndent: "".concat(parseFloat(_this.fontSize) * 0.16).concat(fontUnit),
- letterSpacing: "".concat(parseFloat(_this.fontSize) * 0.16).concat(fontUnit)
- });
- } else {
- styleObj = Object.assign(styleObj, {
- textIndent: "".concat(parseFloat(_this.fontSize) * 0.06).concat(fontUnit),
- letterSpacing: "".concat(parseFloat(_this.fontSize) * 0.06).concat(fontUnit)
- });
- }
- return styleObj;
- };
- },
- numInterval: function numInterval() {
- return {
- marginRight: "".concat(this.numSpacing, "px")
- };
- },
- numStyle: function numStyle() {
- return {
- fontSize: this.fontSize
- };
- },
- numDataList: function numDataList() {
- return this.displayValue.split('').map(function (num) {
- return num;
- });
- }
- },
- watch: {
- separator: function separator() {
- this.start();
- },
- decimals: function decimals() {
- this.start();
- }
- }
- };
- exports.default = _default2;
- /***/ }),
- /***/ "8d32":
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {
- /**
- * Module exports.
- */
- module.exports = deprecate;
- /**
- * Mark that a method should not be used.
- * Returns a modified function which warns once by default.
- *
- * If `localStorage.noDeprecation = true` is set, then it is a no-op.
- *
- * If `localStorage.throwDeprecation = true` is set, then deprecated functions
- * will throw an Error when invoked.
- *
- * If `localStorage.traceDeprecation = true` is set, then deprecated functions
- * will invoke `console.trace()` instead of `console.error()`.
- *
- * @param {Function} fn - the function to deprecate
- * @param {String} msg - the string to print to the console when `fn` is invoked
- * @returns {Function} a new "deprecated" version of `fn`
- * @api public
- */
- function deprecate (fn, msg) {
- if (config('noDeprecation')) {
- return fn;
- }
- var warned = false;
- function deprecated() {
- if (!warned) {
- if (config('throwDeprecation')) {
- throw new Error(msg);
- } else if (config('traceDeprecation')) {
- console.trace(msg);
- } else {
- console.warn(msg);
- }
- warned = true;
- }
- return fn.apply(this, arguments);
- }
- return deprecated;
- }
- /**
- * Checks `localStorage` for boolean values for the given `name`.
- *
- * @param {String} name
- * @returns {Boolean}
- * @api private
- */
- function config (name) {
- // accessing global.localStorage can trigger a DOMException in sandboxed iframes
- try {
- if (!global.localStorage) return false;
- } catch (_) {
- return false;
- }
- var val = global.localStorage[name];
- if (null == val) return false;
- return String(val).toLowerCase() === 'true';
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d")))
- /***/ }),
- /***/ "8e6d":
- /***/ (function(module, exports) {
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- "default": obj
- };
- }
- module.exports = _interopRequireDefault;
- /***/ }),
- /***/ "908c":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _LiquidFill_vue_vue_type_template_id_8aedaae4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("238e");
- /* harmony import */ var _LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2bec");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _LiquidFill_vue_vue_type_template_id_8aedaae4___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _LiquidFill_vue_vue_type_template_id_8aedaae4___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "9106":
- /***/ (function(module, exports) {
- /*
- StackBlur - a fast almost Gaussian Blur For Canvas
- Version: 0.5
- Author: Mario Klingemann
- Contact: mario@quasimondo.com
- Website: http://www.quasimondo.com/StackBlurForCanvas
- Twitter: @quasimondo
- In case you find this class useful - especially in commercial projects -
- I am not totally unhappy for a small donation to my PayPal account
- mario@quasimondo.de
- Or support me on flattr:
- https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript
- Copyright (c) 2010 Mario Klingemann
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
- */
- var mul_table = [
- 512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,
- 454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,
- 482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,
- 437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,
- 497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,
- 320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,
- 446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,
- 329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,
- 505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,
- 399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,
- 324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,
- 268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,
- 451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,
- 385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,
- 332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,
- 289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];
- var shg_table = [
- 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17,
- 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 ];
- function processImage(img, canvas, radius, blurAlphaChannel)
- {
- if (typeof(img) == 'string') {
- var img = document.getElementById(img);
- }
- else if (typeof HTMLImageElement !== 'undefined' && !img instanceof HTMLImageElement) {
- return;
- }
- var w = img.naturalWidth;
- var h = img.naturalHeight;
- if (typeof(canvas) == 'string') {
- var canvas = document.getElementById(canvas);
- }
- else if (typeof HTMLCanvasElement !== 'undefined' && !canvas instanceof HTMLCanvasElement) {
- return;
- }
- canvas.style.width = w + 'px';
- canvas.style.height = h + 'px';
- canvas.width = w;
- canvas.height = h;
- var context = canvas.getContext('2d');
- context.clearRect(0, 0, w, h);
- context.drawImage(img, 0, 0);
- if (isNaN(radius) || radius < 1) return;
- if (blurAlphaChannel)
- processCanvasRGBA(canvas, 0, 0, w, h, radius);
- else
- processCanvasRGB(canvas, 0, 0, w, h, radius);
- }
- function getImageDataFromCanvas(canvas, top_x, top_y, width, height)
- {
- if (typeof(canvas) == 'string')
- var canvas = document.getElementById(canvas);
- else if (typeof HTMLCanvasElement !== 'undefined' && !canvas instanceof HTMLCanvasElement)
- return;
- var context = canvas.getContext('2d');
- var imageData;
- try {
- try {
- imageData = context.getImageData(top_x, top_y, width, height);
- } catch(e) {
- throw new Error("unable to access local image data: " + e);
- return;
- }
- } catch(e) {
- throw new Error("unable to access image data: " + e);
- }
- return imageData;
- }
- function processCanvasRGBA(canvas, top_x, top_y, width, height, radius)
- {
- if (isNaN(radius) || radius < 1) return;
- radius |= 0;
- var imageData = getImageDataFromCanvas(canvas, top_x, top_y, width, height);
- imageData = processImageDataRGBA(imageData, top_x, top_y, width, height, radius);
- canvas.getContext('2d').putImageData(imageData, top_x, top_y);
- }
- function processImageDataRGBA(imageData, top_x, top_y, width, height, radius)
- {
- var pixels = imageData.data;
- var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum,
- r_out_sum, g_out_sum, b_out_sum, a_out_sum,
- r_in_sum, g_in_sum, b_in_sum, a_in_sum,
- pr, pg, pb, pa, rbs;
- var div = radius + radius + 1;
- var w4 = width << 2;
- var widthMinus1 = width - 1;
- var heightMinus1 = height - 1;
- var radiusPlus1 = radius + 1;
- var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
- var stackStart = new BlurStack();
- var stack = stackStart;
- for (i = 1; i < div; i++)
- {
- stack = stack.next = new BlurStack();
- if (i == radiusPlus1) var stackEnd = stack;
- }
- stack.next = stackStart;
- var stackIn = null;
- var stackOut = null;
- yw = yi = 0;
- var mul_sum = mul_table[radius];
- var shg_sum = shg_table[radius];
- for (y = 0; y < height; y++)
- {
- r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;
- r_out_sum = radiusPlus1 * (pr = pixels[yi]);
- g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
- b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
- a_out_sum = radiusPlus1 * (pa = pixels[yi+3]);
- r_sum += sumFactor * pr;
- g_sum += sumFactor * pg;
- b_sum += sumFactor * pb;
- a_sum += sumFactor * pa;
- stack = stackStart;
- for (i = 0; i < radiusPlus1; i++)
- {
- stack.r = pr;
- stack.g = pg;
- stack.b = pb;
- stack.a = pa;
- stack = stack.next;
- }
- for (i = 1; i < radiusPlus1; i++)
- {
- p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);
- r_sum += (stack.r = (pr = pixels[p])) * (rbs = radiusPlus1 - i);
- g_sum += (stack.g = (pg = pixels[p+1])) * rbs;
- b_sum += (stack.b = (pb = pixels[p+2])) * rbs;
- a_sum += (stack.a = (pa = pixels[p+3])) * rbs;
- r_in_sum += pr;
- g_in_sum += pg;
- b_in_sum += pb;
- a_in_sum += pa;
- stack = stack.next;
- }
- stackIn = stackStart;
- stackOut = stackEnd;
- for (x = 0; x < width; x++)
- {
- pixels[yi+3] = pa = (a_sum * mul_sum) >> shg_sum;
- if (pa != 0)
- {
- pa = 255 / pa;
- pixels[yi] = ((r_sum * mul_sum) >> shg_sum) * pa;
- pixels[yi+1] = ((g_sum * mul_sum) >> shg_sum) * pa;
- pixels[yi+2] = ((b_sum * mul_sum) >> shg_sum) * pa;
- } else {
- pixels[yi] = pixels[yi+1] = pixels[yi+2] = 0;
- }
- r_sum -= r_out_sum;
- g_sum -= g_out_sum;
- b_sum -= b_out_sum;
- a_sum -= a_out_sum;
- r_out_sum -= stackIn.r;
- g_out_sum -= stackIn.g;
- b_out_sum -= stackIn.b;
- a_out_sum -= stackIn.a;
- p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;
- r_in_sum += (stackIn.r = pixels[p]);
- g_in_sum += (stackIn.g = pixels[p+1]);
- b_in_sum += (stackIn.b = pixels[p+2]);
- a_in_sum += (stackIn.a = pixels[p+3]);
- r_sum += r_in_sum;
- g_sum += g_in_sum;
- b_sum += b_in_sum;
- a_sum += a_in_sum;
- stackIn = stackIn.next;
- r_out_sum += (pr = stackOut.r);
- g_out_sum += (pg = stackOut.g);
- b_out_sum += (pb = stackOut.b);
- a_out_sum += (pa = stackOut.a);
- r_in_sum -= pr;
- g_in_sum -= pg;
- b_in_sum -= pb;
- a_in_sum -= pa;
- stackOut = stackOut.next;
- yi += 4;
- }
- yw += width;
- }
- for (x = 0; x < width; x++)
- {
- g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;
- yi = x << 2;
- r_out_sum = radiusPlus1 * (pr = pixels[yi]);
- g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
- b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
- a_out_sum = radiusPlus1 * (pa = pixels[yi+3]);
- r_sum += sumFactor * pr;
- g_sum += sumFactor * pg;
- b_sum += sumFactor * pb;
- a_sum += sumFactor * pa;
- stack = stackStart;
- for (i = 0; i < radiusPlus1; i++)
- {
- stack.r = pr;
- stack.g = pg;
- stack.b = pb;
- stack.a = pa;
- stack = stack.next;
- }
- yp = width;
- for (i = 1; i <= radius; i++)
- {
- yi = (yp + x) << 2;
- r_sum += (stack.r = (pr = pixels[yi])) * (rbs = radiusPlus1 - i);
- g_sum += (stack.g = (pg = pixels[yi+1])) * rbs;
- b_sum += (stack.b = (pb = pixels[yi+2])) * rbs;
- a_sum += (stack.a = (pa = pixels[yi+3])) * rbs;
- r_in_sum += pr;
- g_in_sum += pg;
- b_in_sum += pb;
- a_in_sum += pa;
- stack = stack.next;
- if(i < heightMinus1)
- {
- yp += width;
- }
- }
- yi = x;
- stackIn = stackStart;
- stackOut = stackEnd;
- for (y = 0; y < height; y++)
- {
- p = yi << 2;
- pixels[p+3] = pa = (a_sum * mul_sum) >> shg_sum;
- if (pa > 0)
- {
- pa = 255 / pa;
- pixels[p] = ((r_sum * mul_sum) >> shg_sum) * pa;
- pixels[p+1] = ((g_sum * mul_sum) >> shg_sum) * pa;
- pixels[p+2] = ((b_sum * mul_sum) >> shg_sum) * pa;
- } else {
- pixels[p] = pixels[p+1] = pixels[p+2] = 0;
- }
- r_sum -= r_out_sum;
- g_sum -= g_out_sum;
- b_sum -= b_out_sum;
- a_sum -= a_out_sum;
- r_out_sum -= stackIn.r;
- g_out_sum -= stackIn.g;
- b_out_sum -= stackIn.b;
- a_out_sum -= stackIn.a;
- p = (x + (((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width)) << 2;
- r_sum += (r_in_sum += (stackIn.r = pixels[p]));
- g_sum += (g_in_sum += (stackIn.g = pixels[p+1]));
- b_sum += (b_in_sum += (stackIn.b = pixels[p+2]));
- a_sum += (a_in_sum += (stackIn.a = pixels[p+3]));
- stackIn = stackIn.next;
- r_out_sum += (pr = stackOut.r);
- g_out_sum += (pg = stackOut.g);
- b_out_sum += (pb = stackOut.b);
- a_out_sum += (pa = stackOut.a);
- r_in_sum -= pr;
- g_in_sum -= pg;
- b_in_sum -= pb;
- a_in_sum -= pa;
- stackOut = stackOut.next;
- yi += width;
- }
- }
- return imageData;
- }
- function processCanvasRGB(canvas, top_x, top_y, width, height, radius)
- {
- if (isNaN(radius) || radius < 1) return;
- radius |= 0;
- var imageData = getImageDataFromCanvas(canvas, top_x, top_y, width, height);
- imageData = processImageDataRGB(imageData, top_x, top_y, width, height, radius);
- canvas.getContext('2d').putImageData(imageData, top_x, top_y);
- }
- function processImageDataRGB(imageData, top_x, top_y, width, height, radius)
- {
- var pixels = imageData.data;
- var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum,
- r_out_sum, g_out_sum, b_out_sum,
- r_in_sum, g_in_sum, b_in_sum,
- pr, pg, pb, rbs;
- var div = radius + radius + 1;
- var w4 = width << 2;
- var widthMinus1 = width - 1;
- var heightMinus1 = height - 1;
- var radiusPlus1 = radius + 1;
- var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
- var stackStart = new BlurStack();
- var stack = stackStart;
- for (i = 1; i < div; i++)
- {
- stack = stack.next = new BlurStack();
- if (i == radiusPlus1) var stackEnd = stack;
- }
- stack.next = stackStart;
- var stackIn = null;
- var stackOut = null;
- yw = yi = 0;
- var mul_sum = mul_table[radius];
- var shg_sum = shg_table[radius];
- for (y = 0; y < height; y++)
- {
- r_in_sum = g_in_sum = b_in_sum = r_sum = g_sum = b_sum = 0;
- r_out_sum = radiusPlus1 * (pr = pixels[yi]);
- g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
- b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
- r_sum += sumFactor * pr;
- g_sum += sumFactor * pg;
- b_sum += sumFactor * pb;
- stack = stackStart;
- for (i = 0; i < radiusPlus1; i++)
- {
- stack.r = pr;
- stack.g = pg;
- stack.b = pb;
- stack = stack.next;
- }
- for (i = 1; i < radiusPlus1; i++)
- {
- p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);
- r_sum += (stack.r = (pr = pixels[p])) * (rbs = radiusPlus1 - i);
- g_sum += (stack.g = (pg = pixels[p+1])) * rbs;
- b_sum += (stack.b = (pb = pixels[p+2])) * rbs;
- r_in_sum += pr;
- g_in_sum += pg;
- b_in_sum += pb;
- stack = stack.next;
- }
- stackIn = stackStart;
- stackOut = stackEnd;
- for (x = 0; x < width; x++)
- {
- pixels[yi] = (r_sum * mul_sum) >> shg_sum;
- pixels[yi+1] = (g_sum * mul_sum) >> shg_sum;
- pixels[yi+2] = (b_sum * mul_sum) >> shg_sum;
- r_sum -= r_out_sum;
- g_sum -= g_out_sum;
- b_sum -= b_out_sum;
- r_out_sum -= stackIn.r;
- g_out_sum -= stackIn.g;
- b_out_sum -= stackIn.b;
- p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;
- r_in_sum += (stackIn.r = pixels[p]);
- g_in_sum += (stackIn.g = pixels[p+1]);
- b_in_sum += (stackIn.b = pixels[p+2]);
- r_sum += r_in_sum;
- g_sum += g_in_sum;
- b_sum += b_in_sum;
- stackIn = stackIn.next;
- r_out_sum += (pr = stackOut.r);
- g_out_sum += (pg = stackOut.g);
- b_out_sum += (pb = stackOut.b);
- r_in_sum -= pr;
- g_in_sum -= pg;
- b_in_sum -= pb;
- stackOut = stackOut.next;
- yi += 4;
- }
- yw += width;
- }
- for (x = 0; x < width; x++)
- {
- g_in_sum = b_in_sum = r_in_sum = g_sum = b_sum = r_sum = 0;
- yi = x << 2;
- r_out_sum = radiusPlus1 * (pr = pixels[yi]);
- g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
- b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
- r_sum += sumFactor * pr;
- g_sum += sumFactor * pg;
- b_sum += sumFactor * pb;
- stack = stackStart;
- for (i = 0; i < radiusPlus1; i++)
- {
- stack.r = pr;
- stack.g = pg;
- stack.b = pb;
- stack = stack.next;
- }
- yp = width;
- for (i = 1; i <= radius; i++)
- {
- yi = (yp + x) << 2;
- r_sum += (stack.r = (pr = pixels[yi])) * (rbs = radiusPlus1 - i);
- g_sum += (stack.g = (pg = pixels[yi+1])) * rbs;
- b_sum += (stack.b = (pb = pixels[yi+2])) * rbs;
- r_in_sum += pr;
- g_in_sum += pg;
- b_in_sum += pb;
- stack = stack.next;
- if(i < heightMinus1)
- {
- yp += width;
- }
- }
- yi = x;
- stackIn = stackStart;
- stackOut = stackEnd;
- for (y = 0; y < height; y++)
- {
- p = yi << 2;
- pixels[p] = (r_sum * mul_sum) >> shg_sum;
- pixels[p+1] = (g_sum * mul_sum) >> shg_sum;
- pixels[p+2] = (b_sum * mul_sum) >> shg_sum;
- r_sum -= r_out_sum;
- g_sum -= g_out_sum;
- b_sum -= b_out_sum;
- r_out_sum -= stackIn.r;
- g_out_sum -= stackIn.g;
- b_out_sum -= stackIn.b;
- p = (x + (((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width)) << 2;
- r_sum += (r_in_sum += (stackIn.r = pixels[p]));
- g_sum += (g_in_sum += (stackIn.g = pixels[p+1]));
- b_sum += (b_in_sum += (stackIn.b = pixels[p+2]));
- stackIn = stackIn.next;
- r_out_sum += (pr = stackOut.r);
- g_out_sum += (pg = stackOut.g);
- b_out_sum += (pb = stackOut.b);
- r_in_sum -= pr;
- g_in_sum -= pg;
- b_in_sum -= pb;
- stackOut = stackOut.next;
- yi += width;
- }
- }
- return imageData;
- }
- function BlurStack()
- {
- this.r = 0;
- this.g = 0;
- this.b = 0;
- this.a = 0;
- this.next = null;
- }
- module.exports = {
- image: processImage,
- canvasRGBA: processCanvasRGBA,
- canvasRGB: processCanvasRGB,
- imageDataRGBA: processImageDataRGBA,
- imageDataRGB: processImageDataRGB
- };
- /***/ }),
- /***/ "9107":
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- // NOTE: These type checking functions intentionally don't use `instanceof`
- // because it is fragile and can be easily faked with `Object.create()`.
- function isArray(arg) {
- if (Array.isArray) {
- return Array.isArray(arg);
- }
- return objectToString(arg) === '[object Array]';
- }
- exports.isArray = isArray;
- function isBoolean(arg) {
- return typeof arg === 'boolean';
- }
- exports.isBoolean = isBoolean;
- function isNull(arg) {
- return arg === null;
- }
- exports.isNull = isNull;
- function isNullOrUndefined(arg) {
- return arg == null;
- }
- exports.isNullOrUndefined = isNullOrUndefined;
- function isNumber(arg) {
- return typeof arg === 'number';
- }
- exports.isNumber = isNumber;
- function isString(arg) {
- return typeof arg === 'string';
- }
- exports.isString = isString;
- function isSymbol(arg) {
- return typeof arg === 'symbol';
- }
- exports.isSymbol = isSymbol;
- function isUndefined(arg) {
- return arg === void 0;
- }
- exports.isUndefined = isUndefined;
- function isRegExp(re) {
- return objectToString(re) === '[object RegExp]';
- }
- exports.isRegExp = isRegExp;
- function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
- }
- exports.isObject = isObject;
- function isDate(d) {
- return objectToString(d) === '[object Date]';
- }
- exports.isDate = isDate;
- function isError(e) {
- return (objectToString(e) === '[object Error]' || e instanceof Error);
- }
- exports.isError = isError;
- function isFunction(arg) {
- return typeof arg === 'function';
- }
- exports.isFunction = isFunction;
- function isPrimitive(arg) {
- return arg === null ||
- typeof arg === 'boolean' ||
- typeof arg === 'number' ||
- typeof arg === 'string' ||
- typeof arg === 'symbol' || // ES6 symbol
- typeof arg === 'undefined';
- }
- exports.isPrimitive = isPrimitive;
- exports.isBuffer = Buffer.isBuffer;
- function objectToString(o) {
- return Object.prototype.toString.call(o);
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("3be6").Buffer))
- /***/ }),
- /***/ "9153":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _leafletWrapper = _interopRequireDefault(__webpack_require__("6f27"));
- __webpack_require__("751d");
- var _lodash = _interopRequireDefault(__webpack_require__("25a2"));
- /**
- * @class IdentifyViewModel
- * @description 点选 viewModel.
- * @param {Object} map - map 对象。
- * @param {String} [options.layerName] - 图层名。
- * @param {Object} [options.layerStyle] - 查询结果图层样式配置。
- * @extends L.Evented
- */
- var IdentifyViewModel =
- /*#__PURE__*/
- function (_L$Evented) {
- (0, _inherits2.default)(IdentifyViewModel, _L$Evented);
- function IdentifyViewModel(map, options) {
- var _this;
- (0, _classCallCheck2.default)(this, IdentifyViewModel);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(IdentifyViewModel).call(this));
- _this.map = map;
- _this.layerNames = options.layerNames;
- _this.layerStyle = options.layerStyle || {};
- _this.popup = null;
- _this.lastLayerName = '';
- return _this;
- }
- /**
- * @function IdentifyViewModel.prototype.getLayerByName
- * @desc 获取。
- * @param {Array} name - 图层名。
- */
- (0, _createClass2.default)(IdentifyViewModel, [{
- key: "getLayerByName",
- value: function getLayerByName(name) {
- return this.map.getLayerByName(name);
- }
- /**
- * @function IdentifyViewModel.prototype.getLayerById
- * @desc 获取。
- * @param {Array} id - 图层名。
- */
- }, {
- key: "getLayerById",
- value: function getLayerById(id) {
- return this.map.getLayerById(id);
- }
- /**
- * @function IdentifyViewModel.prototype.getLayerType
- * @desc 判断是否是geojson
- * @param {Array} layer - 图层名。
- */
- }, {
- key: "getLayerType",
- value: function getLayerType(layer) {
- return layer instanceof _leafletWrapper.default.GeoJSON;
- }
- /**
- * @function IdentifyViewModel.prototype.addOverlayToMap
- * @desc 添加高亮图层。
- * @param {Object} layer - layer。
- * @param {Object} feature - geojson
- * @param {Object} customStyle - 用户自定义样式
- */
- }, {
- key: "addOverlayToMap",
- value: function addOverlayToMap(layer, feature) {
- var customStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.layerStyle;
- // 高亮前,清除之前的高亮
- this.lastLayerName && this.removed(this.lastLayerName); // 默认样式
- var defaultStyle = {
- color: '#409eff',
- fillColor: '#409eff',
- fillOpacity: 1,
- opacity: 0.6,
- renderer: _leafletWrapper.default.svg()
- }; // new layer
- var styleOptions = Object.assign((0, _lodash.default)(layer.options), defaultStyle, customStyle);
- var overlayer;
- var type = feature.geometry.type;
- if (type === 'Point' || type === 'MultiPoint') {
- var geoCoordinates = (0, _lodash.default)(feature.geometry.coordinates);
- overlayer = _leafletWrapper.default.circleMarker(geoCoordinates.reverse(), styleOptions);
- } else {
- overlayer = _leafletWrapper.default.geoJSON(feature, {
- style: function style() {
- return styleOptions;
- }
- });
- } // 上图,记录图层名
- this.map.addLayer(overlayer, layer.name + '-SM-highlighted');
- this.lastLayerName = layer.name;
- }
- /**
- * @function IdentifyViewModel.prototype.removed
- * @desc 将客户端专题图的矢量要素转换成geojson。
- * @param {Object} themeFeature - themeFeature。
- */
- }, {
- key: "formatGeoJSON",
- value: function formatGeoJSON(themeFeature) {
- var formatObj = new SuperMap.Format.GeoJSON();
- var serverGeometry = SuperMap.ServerGeometry.fromGeometry(themeFeature.geometry);
- var geojson = formatObj.toGeoJSON(serverGeometry);
- geojson.properties = themeFeature.attributes;
- return geojson;
- }
- /**
- * @function IdentifyViewModel.prototype.removed
- * @desc 清除高亮图层。
- * @param {String} lastLayerName - 图层名。
- */
- }, {
- key: "removed",
- value: function removed() {
- var lastLayerName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.lastLayerName;
- // 移除高亮图层
- if (lastLayerName && this.getLayerByName(lastLayerName + '-SM-highlighted')) {
- this.map.removeLayer(this.getLayerByName(lastLayerName + '-SM-highlighted'));
- this.lastLayerName = '';
- }
- }
- }]);
- return IdentifyViewModel;
- }(_leafletWrapper.default.Evented);
- exports.default = IdentifyViewModel;
- /***/ }),
- /***/ "9243":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/text/Text.vue?vue&type=template&id=5e2ac717&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-text",style:([_vm.customStyle, _vm.getBackgroundStyle, _vm.getTextColorStyle])},[(_vm.href)?_c('span',[_c('a',{staticClass:"sm-component-text__href",style:([_vm.getTextColorStyle]),attrs:{"target":_vm.target,"href":_vm.href}},[_vm._v(_vm._s(_vm.finalValue))])]):_c('span',{staticClass:"sm-component-text__span"},[_vm._v(_vm._s(_vm.finalValue))])])}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/text/Text.vue?vue&type=template&id=5e2ac717&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "9259":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _vue = _interopRequireDefault(__webpack_require__("5643"));
- var _vuePropertyDecorator = __webpack_require__("e22c");
- var _globalEvent = _interopRequireDefault(__webpack_require__("fb6a"));
- var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
- var c = arguments.length,
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
- d;
- if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- }
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- var Theme =
- /*#__PURE__*/
- function (_Vue) {
- (0, _inherits2.default)(Theme, _Vue);
- function Theme() {
- var _this;
- (0, _classCallCheck2.default)(this, Theme);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Theme).apply(this, arguments));
- _this.backgroundData = '';
- _this.textColorsData = '';
- _this.colorGroupsData = [];
- return _this;
- }
- (0, _createClass2.default)(Theme, [{
- key: "backgroundChanged",
- value: function backgroundChanged(newValue) {
- this.backgroundData = newValue;
- }
- }, {
- key: "textColorChanged",
- value: function textColorChanged(newValue) {
- this.textColorsData = newValue;
- }
- }, {
- key: "colorGroupChanged",
- value: function colorGroupChanged(newValue) {
- this.colorGroupsData = newValue;
- }
- }, {
- key: "created",
- value: function created() {
- var theme = _globalEvent.default.$options.theme;
- this.backgroundData = this.background || theme && theme.background;
- this.textColorsData = this.textColor || theme && theme.textColor;
- this.colorGroupsData = this.colorGroup || theme && theme.colorGroup;
- }
- }, {
- key: "themeStyleChanged",
- value: function themeStyleChanged(value) {
- return value;
- }
- }, {
- key: "mounted",
- value: function mounted() {
- var _this2 = this;
- _globalEvent.default.$on('change-theme', function (themeStyle) {
- _this2.backgroundData = themeStyle.background;
- _this2.textColorsData = themeStyle.textColor;
- _this2.colorGroupsData = themeStyle.colorGroup;
- _this2.themeStyleChanged();
- });
- }
- }, {
- key: "getBackgroundStyle",
- get: function get() {
- return {
- background: this.backgroundData
- };
- }
- }, {
- key: "getTextColorStyle",
- get: function get() {
- return {
- color: this.textColorsData
- };
- }
- }, {
- key: "getBackground",
- get: function get() {
- return this.backgroundData;
- }
- }, {
- key: "getTextColor",
- get: function get() {
- return this.textColorsData;
- }
- }, {
- key: "getColorStyle",
- get: function get() {
- return function (index) {
- return {
- color: this.colorGroupsData[index]
- };
- };
- }
- }, {
- key: "getColor",
- get: function get() {
- return function (index) {
- return this.colorGroupsData[index];
- };
- }
- }]);
- return Theme;
- }(_vue.default);
- __decorate([(0, _vuePropertyDecorator.Prop)()], Theme.prototype, "background", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)()], Theme.prototype, "textColor", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)()], Theme.prototype, "colorGroup", void 0);
- __decorate([(0, _vuePropertyDecorator.Watch)('background')], Theme.prototype, "backgroundChanged", null);
- __decorate([(0, _vuePropertyDecorator.Watch)('textColor')], Theme.prototype, "textColorChanged", null);
- __decorate([(0, _vuePropertyDecorator.Watch)('colorGroup')], Theme.prototype, "colorGroupChanged", null);
- __decorate([(0, _vuePropertyDecorator.Emit)()], Theme.prototype, "themeStyleChanged", null);
- Theme = __decorate([_vuePropertyDecorator.Component], Theme);
- var _default = Theme;
- exports.default = _default;
- /***/ }),
- /***/ "9270":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.Pixel = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
- * This program are made available under the terms of the Apache License, Version 2.0
- * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */
- /**
- * @class Pixel
- * @category BaseTypes Geometry
- * @classdesc 此类用 x,y 坐标描绘屏幕坐标(像素点)。
- * @param {number} [x=0.0] - x 坐标。
- * @param {number} [y=0.0] - y 坐标。
- * @param {Pixel.Mode} [mode=Pixel.Mode.LeftTop] - 坐标模式。
- *
- * @example
- * //单独创建一个对象
- * var pixcel = new Pixel(100,50);
- *
- * //依据 size 创建
- * var size = new Size(21,25);
- * var offset = new Pixel(-(size.w/2), -size.h);
- */
- var Pixel =
- /*#__PURE__*/
- function () {
- function Pixel(x, y, mode) {
- (0, _classCallCheck2.default)(this, Pixel);
- /**
- * @member {number} [Pixel.prototype.x=0.0]
- * @description x 坐标。
- */
- this.x = x ? parseFloat(x) : 0.0;
- /**
- * @member {number} [Pixel.prototype.y=0.0]
- * @description y 坐标。
- */
- this.y = y ? parseFloat(y) : 0.0;
- /**
- * @member {Pixel.Mode} [Pixel.prototype.mode=Pixel.Mode.LeftTop]
- * @description 坐标模式,有左上、右上、右下、左下这几种模式,分别表示相对于左上角、右上角、右下角、左下角的坐标。
- */
- this.mode = mode;
- this.CLASS_NAME = 'Pixel';
- /**
- * @enum Pixel.Mode
- * @readonly
- * @description 模式。
- * @type {string}
- */
- Pixel.Mode = {
- /** 左上模式。 */
- LeftTop: 'lefttop',
- /** 右上模式。 */
- RightTop: 'righttop',
- /** 右下模式。 */
- RightBottom: 'rightbottom',
- /** 左下模式。 */
- LeftBottom: 'leftbottom'
- };
- }
- /**
- * @function Pixel.prototype.toString
- * @description 返回此对象的字符串形式。
- * @example
- *
- * var pixcel = new Pixel(100,50);
- * var str = pixcel.toString();
- *
- * @returns {string} 例如: "x=200.4,y=242.2"
- */
- (0, _createClass2.default)(Pixel, [{
- key: "toString",
- value: function toString() {
- return 'x=' + this.x + ',y=' + this.y;
- }
- /**
- * @function Pixel.prototype.clone
- * @description 克隆当前的 pixel 对象。
- * @example
- * var pixcel = new Pixel(100,50);
- * var pixcel2 = pixcel.clone();
- * @returns {Pixel} 返回一个新的与当前 pixel 对象有相同 x、y 坐标的 pixel 对象。
- */
- }, {
- key: "clone",
- value: function clone() {
- return new Pixel(this.x, this.y, this.mode);
- }
- /**
- * @function Pixel.prototype.equals
- * @description 比较两 pixel 是否相等。
- * @example
- * var pixcel = new Pixel(100,50);
- * var pixcel2 = new Pixel(100,50);
- * var isEquals = pixcel.equals(pixcel2);
- *
- * @param {Pixel} px - 用于比较相等的 pixel 对象。
- * @returns {boolean} 如果传入的像素点和当前像素点相同返回 true,如果不同或传入参数为 NULL 则返回 false。
- */
- }, {
- key: "equals",
- value: function equals(px) {
- var equals = false;
- if (px != null) {
- equals = this.x === px.x && this.y === px.y || isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y);
- }
- return equals;
- }
- /**
- * @function Pixel.prototype.distanceTo
- * @description 返回两个 pixel 的距离。
- * @example
- * var pixcel = new Pixel(100,50);
- * var pixcel2 = new Pixel(110,30);
- * var distance = pixcel.distanceTo(pixcel2);
- *
- * @param {Pixel} px - 用于计算的一个 pixel。
- * @returns {float} 作为参数传入的像素与当前像素点的距离。
- */
- }, {
- key: "distanceTo",
- value: function distanceTo(px) {
- return Math.sqrt(Math.pow(this.x - px.x, 2) + Math.pow(this.y - px.y, 2));
- }
- /**
- * @function Pixel.prototype.add
- * @description 在原来像素坐标基础上,x 值加上传入的 x 参数,y 值加上传入的 y 参数。
- * @example
- * var pixcel = new Pixel(100,50);
- * //pixcel2是新的对象
- * var pixcel2 = pixcel.add(20,30);
- *
- * @param {number} x - 传入的 x 值。
- * @param {number} y - 传入的 y 值。
- * @returns {Pixel} 返回一个新的 pixel 对象,该 pixel 是由当前的 pixel 与传入的 x,y 相加得到。
- */
- }, {
- key: "add",
- value: function add(x, y) {
- if (x == null || y == null) {
- throw new TypeError('Pixel.add cannot receive null values');
- }
- return new Pixel(this.x + x, this.y + y);
- }
- /**
- * @function Pixel.prototype.offset
- * @description 通过传入的 {@link Pixel} 参数对原屏幕坐标进行偏移。
- * @example
- * var pixcel = new Pixel(100,50);
- * var pixcel2 = new Pixel(130,20);
- * //pixcel3 是新的对象
- * var pixcel3 = pixcel.offset(pixcel2);
- *
- * @param {Pixel} px - 传入的 <Pixel> 对象。
- * @returns {Pixel} 返回一个新的 pixel,该 pixel 是由当前的 pixel 对象的 x,y 值与传入的 Pixel 对象的 x,y 值相加得到。
- */
- }, {
- key: "offset",
- value: function offset(px) {
- var newPx = this.clone();
- if (px) {
- newPx = this.add(px.x, px.y);
- }
- return newPx;
- }
- /**
- *
- * @function Pixel.prototype.destroy
- * @description 销毁此对象。销毁后此对象的所有属性为 null,而不是初始值。
- * @example
- * var pixcel = new Pixel(100,50);
- * pixcel.destroy();
- */
- }, {
- key: "destroy",
- value: function destroy() {
- this.x = null;
- this.y = null;
- this.mode = null;
- }
- }]);
- return Pixel;
- }();
- exports.Pixel = Pixel;
- /***/ }),
- /***/ "92a1":
- /***/ (function(module, exports, __webpack_require__) {
- // Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- module.exports = Stream;
- var EE = __webpack_require__("0956").EventEmitter;
- var inherits = __webpack_require__("fe04");
- inherits(Stream, EE);
- Stream.Readable = __webpack_require__("bbe9");
- Stream.Writable = __webpack_require__("f29e");
- Stream.Duplex = __webpack_require__("5648");
- Stream.Transform = __webpack_require__("4366");
- Stream.PassThrough = __webpack_require__("0640");
- // Backwards-compat with node 0.4.x
- Stream.Stream = Stream;
- // old-style streams. Note that the pipe method (the only relevant
- // part of this class) is overridden in the Readable class.
- function Stream() {
- EE.call(this);
- }
- Stream.prototype.pipe = function(dest, options) {
- var source = this;
- function ondata(chunk) {
- if (dest.writable) {
- if (false === dest.write(chunk) && source.pause) {
- source.pause();
- }
- }
- }
- source.on('data', ondata);
- function ondrain() {
- if (source.readable && source.resume) {
- source.resume();
- }
- }
- dest.on('drain', ondrain);
- // If the 'end' option is not supplied, dest.end() will be called when
- // source gets the 'end' or 'close' events. Only dest.end() once.
- if (!dest._isStdio && (!options || options.end !== false)) {
- source.on('end', onend);
- source.on('close', onclose);
- }
- var didOnEnd = false;
- function onend() {
- if (didOnEnd) return;
- didOnEnd = true;
- dest.end();
- }
- function onclose() {
- if (didOnEnd) return;
- didOnEnd = true;
- if (typeof dest.destroy === 'function') dest.destroy();
- }
- // don't leave dangling pipes when there are errors.
- function onerror(er) {
- cleanup();
- if (EE.listenerCount(this, 'error') === 0) {
- throw er; // Unhandled stream error in pipe.
- }
- }
- source.on('error', onerror);
- dest.on('error', onerror);
- // remove all the event listeners that were added.
- function cleanup() {
- source.removeListener('data', ondata);
- dest.removeListener('drain', ondrain);
- source.removeListener('end', onend);
- source.removeListener('close', onclose);
- source.removeListener('error', onerror);
- dest.removeListener('error', onerror);
- source.removeListener('end', cleanup);
- source.removeListener('close', cleanup);
- dest.removeListener('close', cleanup);
- }
- source.on('end', cleanup);
- source.on('close', cleanup);
- dest.on('close', cleanup);
- dest.emit('pipe', source);
- // Allow for unix-like usage: A.pipe(B).pipe(C)
- return dest;
- };
- /***/ }),
- /***/ "9711":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- exports.byteLength = byteLength
- exports.toByteArray = toByteArray
- exports.fromByteArray = fromByteArray
- var lookup = []
- var revLookup = []
- var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
- var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
- for (var i = 0, len = code.length; i < len; ++i) {
- lookup[i] = code[i]
- revLookup[code.charCodeAt(i)] = i
- }
- // Support decoding URL-safe base64 strings, as Node.js does.
- // See: https://en.wikipedia.org/wiki/Base64#URL_applications
- revLookup['-'.charCodeAt(0)] = 62
- revLookup['_'.charCodeAt(0)] = 63
- function getLens (b64) {
- var len = b64.length
- if (len % 4 > 0) {
- throw new Error('Invalid string. Length must be a multiple of 4')
- }
- // Trim off extra bytes after placeholder bytes are found
- // See: https://github.com/beatgammit/base64-js/issues/42
- var validLen = b64.indexOf('=')
- if (validLen === -1) validLen = len
- var placeHoldersLen = validLen === len
- ? 0
- : 4 - (validLen % 4)
- return [validLen, placeHoldersLen]
- }
- // base64 is 4/3 + up to two characters of the original data
- function byteLength (b64) {
- var lens = getLens(b64)
- var validLen = lens[0]
- var placeHoldersLen = lens[1]
- return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
- }
- function _byteLength (b64, validLen, placeHoldersLen) {
- return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
- }
- function toByteArray (b64) {
- var tmp
- var lens = getLens(b64)
- var validLen = lens[0]
- var placeHoldersLen = lens[1]
- var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
- var curByte = 0
- // if there are placeholders, only get up to the last complete 4 chars
- var len = placeHoldersLen > 0
- ? validLen - 4
- : validLen
- var i
- for (i = 0; i < len; i += 4) {
- tmp =
- (revLookup[b64.charCodeAt(i)] << 18) |
- (revLookup[b64.charCodeAt(i + 1)] << 12) |
- (revLookup[b64.charCodeAt(i + 2)] << 6) |
- revLookup[b64.charCodeAt(i + 3)]
- arr[curByte++] = (tmp >> 16) & 0xFF
- arr[curByte++] = (tmp >> 8) & 0xFF
- arr[curByte++] = tmp & 0xFF
- }
- if (placeHoldersLen === 2) {
- tmp =
- (revLookup[b64.charCodeAt(i)] << 2) |
- (revLookup[b64.charCodeAt(i + 1)] >> 4)
- arr[curByte++] = tmp & 0xFF
- }
- if (placeHoldersLen === 1) {
- tmp =
- (revLookup[b64.charCodeAt(i)] << 10) |
- (revLookup[b64.charCodeAt(i + 1)] << 4) |
- (revLookup[b64.charCodeAt(i + 2)] >> 2)
- arr[curByte++] = (tmp >> 8) & 0xFF
- arr[curByte++] = tmp & 0xFF
- }
- return arr
- }
- function tripletToBase64 (num) {
- return lookup[num >> 18 & 0x3F] +
- lookup[num >> 12 & 0x3F] +
- lookup[num >> 6 & 0x3F] +
- lookup[num & 0x3F]
- }
- function encodeChunk (uint8, start, end) {
- var tmp
- var output = []
- for (var i = start; i < end; i += 3) {
- tmp =
- ((uint8[i] << 16) & 0xFF0000) +
- ((uint8[i + 1] << 8) & 0xFF00) +
- (uint8[i + 2] & 0xFF)
- output.push(tripletToBase64(tmp))
- }
- return output.join('')
- }
- function fromByteArray (uint8) {
- var tmp
- var len = uint8.length
- var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
- var parts = []
- var maxChunkLength = 16383 // must be multiple of 3
- // go through the array every three bytes, we'll deal with trailing stuff later
- for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
- parts.push(encodeChunk(
- uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
- ))
- }
- // pad the end with zeros, but make sure to not forget the extra bytes
- if (extraBytes === 1) {
- tmp = uint8[len - 1]
- parts.push(
- lookup[tmp >> 2] +
- lookup[(tmp << 4) & 0x3F] +
- '=='
- )
- } else if (extraBytes === 2) {
- tmp = (uint8[len - 2] << 8) + uint8[len - 1]
- parts.push(
- lookup[tmp >> 10] +
- lookup[(tmp >> 4) & 0x3F] +
- lookup[(tmp << 2) & 0x3F] +
- '='
- )
- }
- return parts.join('')
- }
- /***/ }),
- /***/ "98c2":
- /***/ (function(module, exports, __webpack_require__) {
- var sax = __webpack_require__("ea23");
- var expat /*= require('node-expat');*/ = { on: function () { }, parse: function () { } };
- var helper = __webpack_require__("cabd");
- var isArray = __webpack_require__("df2e").isArray;
- var options;
- var pureJsParser = true;
- var currentElement;
- function validateOptions(userOptions) {
- options = helper.copyOptions(userOptions);
- helper.ensureFlagExists('ignoreDeclaration', options);
- helper.ensureFlagExists('ignoreInstruction', options);
- helper.ensureFlagExists('ignoreAttributes', options);
- helper.ensureFlagExists('ignoreText', options);
- helper.ensureFlagExists('ignoreComment', options);
- helper.ensureFlagExists('ignoreCdata', options);
- helper.ensureFlagExists('ignoreDoctype', options);
- helper.ensureFlagExists('compact', options);
- helper.ensureFlagExists('alwaysChildren', options);
- helper.ensureFlagExists('addParent', options);
- helper.ensureFlagExists('trim', options);
- helper.ensureFlagExists('nativeType', options);
- helper.ensureFlagExists('nativeTypeAttributes', options);
- helper.ensureFlagExists('sanitize', options);
- helper.ensureFlagExists('instructionHasAttributes', options);
- helper.ensureFlagExists('captureSpacesBetweenElements', options);
- helper.ensureAlwaysArrayExists(options);
- helper.ensureKeyExists('declaration', options);
- helper.ensureKeyExists('instruction', options);
- helper.ensureKeyExists('attributes', options);
- helper.ensureKeyExists('text', options);
- helper.ensureKeyExists('comment', options);
- helper.ensureKeyExists('cdata', options);
- helper.ensureKeyExists('doctype', options);
- helper.ensureKeyExists('type', options);
- helper.ensureKeyExists('name', options);
- helper.ensureKeyExists('elements', options);
- helper.ensureKeyExists('parent', options);
- helper.checkFnExists('doctype', options);
- helper.checkFnExists('instruction', options);
- helper.checkFnExists('cdata', options);
- helper.checkFnExists('comment', options);
- helper.checkFnExists('text', options);
- helper.checkFnExists('instructionName', options);
- helper.checkFnExists('elementName', options);
- helper.checkFnExists('attributeName', options);
- helper.checkFnExists('attributeValue', options);
- helper.checkFnExists('attributes', options);
- return options;
- }
- function nativeType(value) {
- var nValue = Number(value);
- if (!isNaN(nValue)) {
- return nValue;
- }
- var bValue = value.toLowerCase();
- if (bValue === 'true') {
- return true;
- } else if (bValue === 'false') {
- return false;
- }
- return value;
- }
- function addField(type, value) {
- var key;
- if (options.compact) {
- if (
- !currentElement[options[type + 'Key']] &&
- (isArray(options.alwaysArray) ? options.alwaysArray.indexOf(options[type + 'Key']) !== -1 : options.alwaysArray)
- ) {
- currentElement[options[type + 'Key']] = [];
- }
- if (currentElement[options[type + 'Key']] && !isArray(currentElement[options[type + 'Key']])) {
- currentElement[options[type + 'Key']] = [currentElement[options[type + 'Key']]];
- }
- if (type + 'Fn' in options && typeof value === 'string') {
- value = options[type + 'Fn'](value, currentElement);
- }
- if (type === 'instruction' && ('instructionFn' in options || 'instructionNameFn' in options)) {
- for (key in value) {
- if (value.hasOwnProperty(key)) {
- if ('instructionFn' in options) {
- value[key] = options.instructionFn(value[key], key, currentElement);
- } else {
- var temp = value[key];
- delete value[key];
- value[options.instructionNameFn(key, temp, currentElement)] = temp;
- }
- }
- }
- }
- if (isArray(currentElement[options[type + 'Key']])) {
- currentElement[options[type + 'Key']].push(value);
- } else {
- currentElement[options[type + 'Key']] = value;
- }
- } else {
- if (!currentElement[options.elementsKey]) {
- currentElement[options.elementsKey] = [];
- }
- var element = {};
- element[options.typeKey] = type;
- if (type === 'instruction') {
- for (key in value) {
- if (value.hasOwnProperty(key)) {
- break;
- }
- }
- element[options.nameKey] = 'instructionNameFn' in options ? options.instructionNameFn(key, value, currentElement) : key;
- if (options.instructionHasAttributes) {
- element[options.attributesKey] = value[key][options.attributesKey];
- if ('instructionFn' in options) {
- element[options.attributesKey] = options.instructionFn(element[options.attributesKey], key, currentElement);
- }
- } else {
- if ('instructionFn' in options) {
- value[key] = options.instructionFn(value[key], key, currentElement);
- }
- element[options.instructionKey] = value[key];
- }
- } else {
- if (type + 'Fn' in options) {
- value = options[type + 'Fn'](value, currentElement);
- }
- element[options[type + 'Key']] = value;
- }
- if (options.addParent) {
- element[options.parentKey] = currentElement;
- }
- currentElement[options.elementsKey].push(element);
- }
- }
- function manipulateAttributes(attributes) {
- if ('attributesFn' in options && attributes) {
- attributes = options.attributesFn(attributes, currentElement);
- }
- if ((options.trim || 'attributeValueFn' in options || 'attributeNameFn' in options || options.nativeTypeAttributes) && attributes) {
- var key;
- for (key in attributes) {
- if (attributes.hasOwnProperty(key)) {
- if (options.trim) attributes[key] = attributes[key].trim();
- if (options.nativeTypeAttributes) {
- attributes[key] = nativeType(attributes[key]);
- }
- if ('attributeValueFn' in options) attributes[key] = options.attributeValueFn(attributes[key], key, currentElement);
- if ('attributeNameFn' in options) {
- var temp = attributes[key];
- delete attributes[key];
- attributes[options.attributeNameFn(key, attributes[key], currentElement)] = temp;
- }
- }
- }
- }
- return attributes;
- }
- function onInstruction(instruction) {
- var attributes = {};
- if (instruction.body && (instruction.name.toLowerCase() === 'xml' || options.instructionHasAttributes)) {
- var attrsRegExp = /([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;
- var match;
- while ((match = attrsRegExp.exec(instruction.body)) !== null) {
- attributes[match[1]] = match[2] || match[3] || match[4];
- }
- attributes = manipulateAttributes(attributes);
- }
- if (instruction.name.toLowerCase() === 'xml') {
- if (options.ignoreDeclaration) {
- return;
- }
- currentElement[options.declarationKey] = {};
- if (Object.keys(attributes).length) {
- currentElement[options.declarationKey][options.attributesKey] = attributes;
- }
- if (options.addParent) {
- currentElement[options.declarationKey][options.parentKey] = currentElement;
- }
- } else {
- if (options.ignoreInstruction) {
- return;
- }
- if (options.trim) {
- instruction.body = instruction.body.trim();
- }
- var value = {};
- if (options.instructionHasAttributes && Object.keys(attributes).length) {
- value[instruction.name] = {};
- value[instruction.name][options.attributesKey] = attributes;
- } else {
- value[instruction.name] = instruction.body;
- }
- addField('instruction', value);
- }
- }
- function onStartElement(name, attributes) {
- var element;
- if (typeof name === 'object') {
- attributes = name.attributes;
- name = name.name;
- }
- attributes = manipulateAttributes(attributes);
- if ('elementNameFn' in options) {
- name = options.elementNameFn(name, currentElement);
- }
- if (options.compact) {
- element = {};
- if (!options.ignoreAttributes && attributes && Object.keys(attributes).length) {
- element[options.attributesKey] = {};
- var key;
- for (key in attributes) {
- if (attributes.hasOwnProperty(key)) {
- element[options.attributesKey][key] = attributes[key];
- }
- }
- }
- if (
- !(name in currentElement) &&
- (isArray(options.alwaysArray) ? options.alwaysArray.indexOf(name) !== -1 : options.alwaysArray)
- ) {
- currentElement[name] = [];
- }
- if (currentElement[name] && !isArray(currentElement[name])) {
- currentElement[name] = [currentElement[name]];
- }
- if (isArray(currentElement[name])) {
- currentElement[name].push(element);
- } else {
- currentElement[name] = element;
- }
- } else {
- if (!currentElement[options.elementsKey]) {
- currentElement[options.elementsKey] = [];
- }
- element = {};
- element[options.typeKey] = 'element';
- element[options.nameKey] = name;
- if (!options.ignoreAttributes && attributes && Object.keys(attributes).length) {
- element[options.attributesKey] = attributes;
- }
- if (options.alwaysChildren) {
- element[options.elementsKey] = [];
- }
- currentElement[options.elementsKey].push(element);
- }
- element[options.parentKey] = currentElement; // will be deleted in onEndElement() if !options.addParent
- currentElement = element;
- }
- function onText(text) {
- if (options.ignoreText) {
- return;
- }
- if (!text.trim() && !options.captureSpacesBetweenElements) {
- return;
- }
- if (options.trim) {
- text = text.trim();
- }
- if (options.nativeType) {
- text = nativeType(text);
- }
- if (options.sanitize) {
- text = text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
- }
- addField('text', text);
- }
- function onComment(comment) {
- if (options.ignoreComment) {
- return;
- }
- if (options.trim) {
- comment = comment.trim();
- }
- addField('comment', comment);
- }
- function onEndElement(name) {
- var parentElement = currentElement[options.parentKey];
- if (!options.addParent) {
- delete currentElement[options.parentKey];
- }
- currentElement = parentElement;
- }
- function onCdata(cdata) {
- if (options.ignoreCdata) {
- return;
- }
- if (options.trim) {
- cdata = cdata.trim();
- }
- addField('cdata', cdata);
- }
- function onDoctype(doctype) {
- if (options.ignoreDoctype) {
- return;
- }
- doctype = doctype.replace(/^ /, '');
- if (options.trim) {
- doctype = doctype.trim();
- }
- addField('doctype', doctype);
- }
- function onError(error) {
- error.note = error; //console.error(error);
- }
- module.exports = function (xml, userOptions) {
- var parser = pureJsParser ? sax.parser(true, {}) : parser = new expat.Parser('UTF-8');
- var result = {};
- currentElement = result;
- options = validateOptions(userOptions);
- if (pureJsParser) {
- parser.opt = {strictEntities: true};
- parser.onopentag = onStartElement;
- parser.ontext = onText;
- parser.oncomment = onComment;
- parser.onclosetag = onEndElement;
- parser.onerror = onError;
- parser.oncdata = onCdata;
- parser.ondoctype = onDoctype;
- parser.onprocessinginstruction = onInstruction;
- } else {
- parser.on('startElement', onStartElement);
- parser.on('text', onText);
- parser.on('comment', onComment);
- parser.on('endElement', onEndElement);
- parser.on('error', onError);
- //parser.on('startCdata', onStartCdata);
- //parser.on('endCdata', onEndCdata);
- //parser.on('entityDecl', onEntityDecl);
- }
- if (pureJsParser) {
- parser.write(xml).close();
- } else {
- if (!parser.parse(xml)) {
- throw new Error('XML parsing error: ' + parser.getError());
- }
- }
- if (result[options.elementsKey]) {
- var temp = result[options.elementsKey];
- delete result[options.elementsKey];
- result[options.elementsKey] = temp;
- delete result.text;
- }
- return result;
- };
- /***/ }),
- /***/ "9903":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- Object.defineProperty(exports, "Icon", {
- enumerable: true,
- get: function get() {
- return _Icon.default;
- }
- });
- Object.defineProperty(exports, "Indicator", {
- enumerable: true,
- get: function get() {
- return _Indicator.default;
- }
- });
- Object.defineProperty(exports, "LiquidFill", {
- enumerable: true,
- get: function get() {
- return _LiquidFill.default;
- }
- });
- Object.defineProperty(exports, "Progress", {
- enumerable: true,
- get: function get() {
- return _Progress.default;
- }
- });
- Object.defineProperty(exports, "Text", {
- enumerable: true,
- get: function get() {
- return _Text.default;
- }
- });
- Object.defineProperty(exports, "TimeText", {
- enumerable: true,
- get: function get() {
- return _TimeText.default;
- }
- });
- Object.defineProperty(exports, "Border", {
- enumerable: true,
- get: function get() {
- return _Border.default;
- }
- });
- Object.defineProperty(exports, "Image", {
- enumerable: true,
- get: function get() {
- return _Image.default;
- }
- });
- Object.defineProperty(exports, "VideoPlayer", {
- enumerable: true,
- get: function get() {
- return _VideoPlayer.default;
- }
- });
- Object.defineProperty(exports, "Iframe", {
- enumerable: true,
- get: function get() {
- return _Iframe.default;
- }
- });
- Object.defineProperty(exports, "TablePopup", {
- enumerable: true,
- get: function get() {
- return _TablePopup.default;
- }
- });
- Object.defineProperty(exports, "Identify", {
- enumerable: true,
- get: function get() {
- return _Identify.default;
- }
- });
- Object.defineProperty(exports, "Popup", {
- enumerable: true,
- get: function get() {
- return _Popup.default;
- }
- });
- Object.defineProperty(exports, "Chart", {
- enumerable: true,
- get: function get() {
- return _Chart.default;
- }
- });
- Object.defineProperty(exports, "WebMap", {
- enumerable: true,
- get: function get() {
- return _WebMap.default;
- }
- });
- Object.defineProperty(exports, "SmTileLayer", {
- enumerable: true,
- get: function get() {
- return _SmTileLayer.default;
- }
- });
- var _Icon = _interopRequireDefault(__webpack_require__("5c61"));
- var _Indicator = _interopRequireDefault(__webpack_require__("08d1"));
- var _LiquidFill = _interopRequireDefault(__webpack_require__("908c"));
- var _Progress = _interopRequireDefault(__webpack_require__("52fe"));
- var _Text = _interopRequireDefault(__webpack_require__("5f3d"));
- var _TimeText = _interopRequireDefault(__webpack_require__("0b0f"));
- var _Border = _interopRequireDefault(__webpack_require__("38cf"));
- var _Image = _interopRequireDefault(__webpack_require__("2389"));
- var _VideoPlayer = _interopRequireDefault(__webpack_require__("b1eb"));
- var _Iframe = _interopRequireDefault(__webpack_require__("e7f3"));
- var _TablePopup = _interopRequireDefault(__webpack_require__("b397"));
- var _Identify = _interopRequireDefault(__webpack_require__("d1f6"));
- var _Popup = _interopRequireDefault(__webpack_require__("9a20"));
- var _Chart = _interopRequireDefault(__webpack_require__("c7a6"));
- var _WebMap = _interopRequireDefault(__webpack_require__("49f9"));
- var _SmTileLayer = _interopRequireDefault(__webpack_require__("88e1"));
- /***/ }),
- /***/ "99ae":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _default = {
- dateTimeFormat: {
- date: {
- year: 'numeric',
- month: 'short',
- day: 'numeric'
- },
- date_second: {
- year: 'numeric',
- month: 'short',
- day: 'numeric',
- hour: 'numeric',
- minute: 'numeric',
- second: 'numeric'
- },
- date_second_week: {
- year: 'numeric',
- month: 'short',
- day: 'numeric',
- weekday: 'long',
- hour: 'numeric',
- minute: 'numeric',
- second: 'numeric'
- }
- },
- // messageTemplate
- warning: {
- unsupportedVideoAddress: '视频地址不合法',
- unavailableVideo: '此视频暂无法播放,请稍后再试',
- mapNotLoaded: '关联的地图尚未加载完整,请稍后',
- unassociatedMap: '您需要配置关联地图!'
- },
- success: {},
- info: {
- loading: '加载中',
- pressEscToExit: '按下 ESC 键或点击关闭按钮退出'
- },
- unit: {
- kilometers: '千米',
- miles: '英里',
- meters: '米',
- yards: '码',
- feet: '英尺',
- squarekilometers: '平方千米',
- squaremiles: '平方英里',
- squaremeters: '平方米',
- squareyards: '平方码',
- squarefeet: '平方英尺'
- },
- error: {},
- commontypes: {
- restData: 'SuperMap Rest 数据服务',
- restMap: 'SuperMap Rest 地图服务',
- addressMatch: 'SuperMap 地址匹配服务',
- iportalData: 'SuperMap iPortal 数据',
- onlineLocalSearch: 'SuperMap Online 本地搜索'
- },
- // 组件
- timeText: {
- Year: '年',
- Month: '月',
- Day: '日',
- hour: '时',
- minute: '分',
- second: '秒'
- },
- zoom: {},
- chart: {
- unSupportedData: '当前数据不支持与地图联动'
- },
- layerList: {
- title: '图层'
- },
- miniMap: {},
- pan: {},
- scale: {},
- webmap: {
- loadingTip: '地图加载中...',
- crsNotSupport: '不支持当前地图的坐标系!',
- TileMatrixSetNotSuppport: '不支持传入的 TileMatrixSet!',
- getLayerInfoFailed: '获取图层信息失败!',
- getThemeInfoFailed: '获取图层样式信息失败!',
- crsnotsupport: '不支持的坐标系!',
- baiduMapNotSupport: '暂不支持加载百度地图!',
- sampleDataNotSupport: '暂不支持加载示例数据!',
- mvtNotSupport: '暂不支持加载矢量瓦片图层!'
- },
- legend: {
- themeField: '专题字段',
- title: '图例',
- top: '最高',
- bottom: '最低',
- noMatchLayer: '没有匹配的图层'
- },
- measure: {
- mapMeasure: '量算',
- measureResult: '测量结果',
- distance: '距离',
- area: '面积',
- delete: '清空',
- selectPlaceholder: '请选择',
- startingPoint: '起点'
- },
- search: {
- noResult: '查询结果为空!',
- noKey: '搜索关键字不能为空,请输入搜索条件。',
- inputPlaceHolder: '查找地址或地点',
- attribute: '属性',
- attributeValue: '属性值',
- setSearchSource: '请设置搜索源!',
- address: '地址',
- null: '空',
- illegalFeature: '要素必须包含合法的坐标!'
- },
- query: {
- query: '查询',
- queryJob: '任务',
- queryResult: '结果',
- attributeCondition: '属性条件',
- spatialFilter: '空间过滤器',
- mapBounds: '返回地图全图范围的要素',
- currentMapBounds: '返回当前地图范围内的要素',
- applicate: '应用',
- noResult: '无结果',
- resultAlreadyExists: '当前查询结果已经存在!',
- querying: '查询中',
- attribute: '属性',
- attributeValue: '属性值',
- noResults: '查询结果为空!',
- queryFailed: '查询失败!',
- seviceNotSupport: '此服务不支持查询!'
- },
- identify: {
- layerNotExit: "地图上不存在该图层: '{layer}'",
- noData: '无数据'
- },
- openFile: {
- fileSizeExceeded: '文件大小超限!文件大小不得超过 10M!',
- fileTypeUnsupported: '不支持该文件格式!',
- openFileFail: '打开文件失败!',
- openFileSuccess: '打开文件成功!',
- selectFile: '选择文件',
- openEmptyFile: '打开文件为空!',
- openFile: '打开文件'
- },
- draw: {
- draw: '绘制'
- },
- indicator: {
- title: '指标标题',
- unit: '单位'
- },
- layerManager: {
- title: '图层管理'
- },
- tdtResults: {
- on: '在',
- station: '站',
- total: '共',
- about: '约',
- // pagination
- homePage: '首页',
- prevPage: '上一页',
- nextPage: '下一页',
- // nothingResult
- searchNoResult: '没有查询到相关结果',
- youCanTry: '您可以尝试',
- enterCorrect: '检查输入是否正确',
- enterOtherKeyWords: '输入其他关键字进行搜索',
- onTdtMap: '在天地图上',
- addThisAddress: '添加该地点',
- uWantTo: '您是否要找',
- // pointResults
- totalFind: '共找到',
- piecesResults: '条结果',
- phone: '电话',
- address: '地址',
- setStartPonint: '设为起点',
- setEndPonint: '设为终点',
- // routePlan
- totalMiles: '总里程',
- distance: '约{distance}公里',
- showDetails: '显示全部详情',
- switchTimes: '换乘{switchTimes}次',
- noSwitch: '无换乘',
- walk: '步行至',
- getOff: '下车',
- getOn: '上车',
- take: '乘坐',
- noSearchResults: '没有查询到线路信息',
- fastRoute: '最快线路',
- shortRoute: '最短线路',
- walkRoute: '少走高速',
- fast: '较快捷',
- noSubway: '不坐地铁',
- lessSwitch: '少换乘',
- lessWalk: '少步行',
- // staticResult
- cityHadResults: '以下城市有结果,请您选择',
- moreCity: '更多城市',
- // LineResult
- allFound: '共为您找到',
- piecesBusRoute: '条公交线路',
- showDetail: '展开详情',
- busEndTime: '首末车时间',
- relateAdress: '点击此处查看 "{keyWord}" 的相关地点',
- // areaResult
- switchTo: '已切换到'
- },
- tdtRoute: {
- title: '路线',
- clearRoute: '清除路线',
- pleaseEnterStartPoint: '请输入起点',
- pleaseEnterEndPoint: '请输入终点',
- search: '搜索',
- startPoint: '起点',
- endPoint: '终点',
- mapLoadedFiled: '地图加载失败',
- busEndTime: '首末车时间',
- about: '约',
- station: '站',
- total: '共',
- hour: '小时',
- minutes: '分钟'
- },
- tdtSearch: {
- phone: '电话',
- address: '地址',
- noData: '暂无',
- transport: '交通'
- },
- tdtMapSwitcher: {
- title: '地图切换',
- image: '影像',
- vector: '矢量',
- terrain: '地形',
- placeName: '地名',
- TiandituVec: '天地图矢量底图',
- TiandituTer: '天地图地形底图',
- TiandituImg: '天地图影像底图',
- TiandituCva: '天地图矢量注记',
- TiandituCta: '天地图地形注记',
- TiandituCia: '天地图影像注记'
- },
- // layer
- dataFlow: {
- dataSubscriptionFailed: '数据订阅失败!'
- },
- animateMarkerlayer: {
- unsupportedData: '当前图层不支持该数据,请重新传入数据!'
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "9a20":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("15ad");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("b429");
- var render, staticRenderFns
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(
- _Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"],
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "9bd6":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- var Buffer = __webpack_require__("54da").Buffer;
- var util = __webpack_require__(2);
- function copyBuffer(src, target, offset) {
- src.copy(target, offset);
- }
- module.exports = function () {
- function BufferList() {
- _classCallCheck(this, BufferList);
- this.head = null;
- this.tail = null;
- this.length = 0;
- }
- BufferList.prototype.push = function push(v) {
- var entry = { data: v, next: null };
- if (this.length > 0) this.tail.next = entry;else this.head = entry;
- this.tail = entry;
- ++this.length;
- };
- BufferList.prototype.unshift = function unshift(v) {
- var entry = { data: v, next: this.head };
- if (this.length === 0) this.tail = entry;
- this.head = entry;
- ++this.length;
- };
- BufferList.prototype.shift = function shift() {
- if (this.length === 0) return;
- var ret = this.head.data;
- if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
- --this.length;
- return ret;
- };
- BufferList.prototype.clear = function clear() {
- this.head = this.tail = null;
- this.length = 0;
- };
- BufferList.prototype.join = function join(s) {
- if (this.length === 0) return '';
- var p = this.head;
- var ret = '' + p.data;
- while (p = p.next) {
- ret += s + p.data;
- }return ret;
- };
- BufferList.prototype.concat = function concat(n) {
- if (this.length === 0) return Buffer.alloc(0);
- if (this.length === 1) return this.head.data;
- var ret = Buffer.allocUnsafe(n >>> 0);
- var p = this.head;
- var i = 0;
- while (p) {
- copyBuffer(p.data, ret, i);
- i += p.data.length;
- p = p.next;
- }
- return ret;
- };
- return BufferList;
- }();
- if (util && util.inspect && util.inspect.custom) {
- module.exports.prototype[util.inspect.custom] = function () {
- var obj = util.inspect({ length: this.length });
- return this.constructor.name + ' ' + obj;
- };
- }
- /***/ }),
- /***/ "9c55":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _lang = __webpack_require__("4e21");
- var RestMapParameter = function RestMapParameter(options) {
- (0, _classCallCheck2.default)(this, RestMapParameter);
- this.type = 'iServer';
- this.url = options.url;
- this.layerName = options.layerName;
- this.attributeFilter = options.attributeFilter || null;
- this.maxFeatures = options.maxFeatures || 20;
- this.name = options.name || (0, _lang.geti18n)().t('commontypes.restMap');
- this.proxy = options.proxy;
- };
- exports.default = RestMapParameter;
- /***/ }),
- /***/ "9c77":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process, global) {// Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- // A bit simpler than readable streams.
- // Implement an async ._write(chunk, encoding, cb), and it'll handle all
- // the drain event emission and buffering.
- /*<replacement>*/
- var pna = __webpack_require__("3e48");
- /*</replacement>*/
- module.exports = Writable;
- /* <replacement> */
- function WriteReq(chunk, encoding, cb) {
- this.chunk = chunk;
- this.encoding = encoding;
- this.callback = cb;
- this.next = null;
- }
- // It seems a linked list but it is not
- // there will be only 2 of these for each stream
- function CorkedRequest(state) {
- var _this = this;
- this.next = null;
- this.entry = null;
- this.finish = function () {
- onCorkedFinish(_this, state);
- };
- }
- /* </replacement> */
- /*<replacement>*/
- var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
- /*</replacement>*/
- /*<replacement>*/
- var Duplex;
- /*</replacement>*/
- Writable.WritableState = WritableState;
- /*<replacement>*/
- var util = __webpack_require__("9107");
- util.inherits = __webpack_require__("fe04");
- /*</replacement>*/
- /*<replacement>*/
- var internalUtil = {
- deprecate: __webpack_require__("8d32")
- };
- /*</replacement>*/
- /*<replacement>*/
- var Stream = __webpack_require__("5e89");
- /*</replacement>*/
- /*<replacement>*/
- var Buffer = __webpack_require__("54da").Buffer;
- var OurUint8Array = global.Uint8Array || function () {};
- function _uint8ArrayToBuffer(chunk) {
- return Buffer.from(chunk);
- }
- function _isUint8Array(obj) {
- return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
- }
- /*</replacement>*/
- var destroyImpl = __webpack_require__("74c0");
- util.inherits(Writable, Stream);
- function nop() {}
- function WritableState(options, stream) {
- Duplex = Duplex || __webpack_require__("d711");
- options = options || {};
- // Duplex streams are both readable and writable, but share
- // the same options object.
- // However, some cases require setting options to different
- // values for the readable and the writable sides of the duplex stream.
- // These options can be provided separately as readableXXX and writableXXX.
- var isDuplex = stream instanceof Duplex;
- // object stream flag to indicate whether or not this stream
- // contains buffers or objects.
- this.objectMode = !!options.objectMode;
- if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
- // the point at which write() starts returning false
- // Note: 0 is a valid value, means that we always return false if
- // the entire buffer is not flushed immediately on write()
- var hwm = options.highWaterMark;
- var writableHwm = options.writableHighWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
- if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
- // cast to ints.
- this.highWaterMark = Math.floor(this.highWaterMark);
- // if _final has been called
- this.finalCalled = false;
- // drain event flag.
- this.needDrain = false;
- // at the start of calling end()
- this.ending = false;
- // when end() has been called, and returned
- this.ended = false;
- // when 'finish' is emitted
- this.finished = false;
- // has it been destroyed
- this.destroyed = false;
- // should we decode strings into buffers before passing to _write?
- // this is here so that some node-core streams can optimize string
- // handling at a lower level.
- var noDecode = options.decodeStrings === false;
- this.decodeStrings = !noDecode;
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
- // not an actual buffer we keep track of, but a measurement
- // of how much we're waiting to get pushed to some underlying
- // socket or file.
- this.length = 0;
- // a flag to see when we're in the middle of a write.
- this.writing = false;
- // when true all writes will be buffered until .uncork() call
- this.corked = 0;
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, because any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
- // a flag to know if we're processing previously buffered items, which
- // may call the _write() callback in the same tick, so that we don't
- // end up in an overlapped onwrite situation.
- this.bufferProcessing = false;
- // the callback that's passed to _write(chunk,cb)
- this.onwrite = function (er) {
- onwrite(stream, er);
- };
- // the callback that the user supplies to write(chunk,encoding,cb)
- this.writecb = null;
- // the amount that is being written when _write is called.
- this.writelen = 0;
- this.bufferedRequest = null;
- this.lastBufferedRequest = null;
- // number of pending user-supplied write callbacks
- // this must be 0 before 'finish' can be emitted
- this.pendingcb = 0;
- // emit prefinish if the only thing we're waiting for is _write cbs
- // This is relevant for synchronous Transform streams
- this.prefinished = false;
- // True if the error was already emitted and should not be thrown again
- this.errorEmitted = false;
- // count buffered requests
- this.bufferedRequestCount = 0;
- // allocate the first CorkedRequest, there is always
- // one allocated and free to use, and we maintain at most two
- this.corkedRequestsFree = new CorkedRequest(this);
- }
- WritableState.prototype.getBuffer = function getBuffer() {
- var current = this.bufferedRequest;
- var out = [];
- while (current) {
- out.push(current);
- current = current.next;
- }
- return out;
- };
- (function () {
- try {
- Object.defineProperty(WritableState.prototype, 'buffer', {
- get: internalUtil.deprecate(function () {
- return this.getBuffer();
- }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
- });
- } catch (_) {}
- })();
- // Test _writableState for inheritance to account for Duplex streams,
- // whose prototype chain only points to Readable.
- var realHasInstance;
- if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
- realHasInstance = Function.prototype[Symbol.hasInstance];
- Object.defineProperty(Writable, Symbol.hasInstance, {
- value: function (object) {
- if (realHasInstance.call(this, object)) return true;
- if (this !== Writable) return false;
- return object && object._writableState instanceof WritableState;
- }
- });
- } else {
- realHasInstance = function (object) {
- return object instanceof this;
- };
- }
- function Writable(options) {
- Duplex = Duplex || __webpack_require__("d711");
- // Writable ctor is applied to Duplexes, too.
- // `realHasInstance` is necessary because using plain `instanceof`
- // would return false, as no `_writableState` property is attached.
- // Trying to use the custom `instanceof` for Writable here will also break the
- // Node.js LazyTransform implementation, which has a non-trivial getter for
- // `_writableState` that would lead to infinite recursion.
- if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
- return new Writable(options);
- }
- this._writableState = new WritableState(options, this);
- // legacy.
- this.writable = true;
- if (options) {
- if (typeof options.write === 'function') this._write = options.write;
- if (typeof options.writev === 'function') this._writev = options.writev;
- if (typeof options.destroy === 'function') this._destroy = options.destroy;
- if (typeof options.final === 'function') this._final = options.final;
- }
- Stream.call(this);
- }
- // Otherwise people can pipe Writable streams, which is just wrong.
- Writable.prototype.pipe = function () {
- this.emit('error', new Error('Cannot pipe, not readable'));
- };
- function writeAfterEnd(stream, cb) {
- var er = new Error('write after end');
- // TODO: defer error events consistently everywhere, not just the cb
- stream.emit('error', er);
- pna.nextTick(cb, er);
- }
- // Checks that a user-supplied chunk is valid, especially for the particular
- // mode the stream is in. Currently this means that `null` is never accepted
- // and undefined/non-string values are only allowed in object mode.
- function validChunk(stream, state, chunk, cb) {
- var valid = true;
- var er = false;
- if (chunk === null) {
- er = new TypeError('May not write null values to stream');
- } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- if (er) {
- stream.emit('error', er);
- pna.nextTick(cb, er);
- valid = false;
- }
- return valid;
- }
- Writable.prototype.write = function (chunk, encoding, cb) {
- var state = this._writableState;
- var ret = false;
- var isBuf = !state.objectMode && _isUint8Array(chunk);
- if (isBuf && !Buffer.isBuffer(chunk)) {
- chunk = _uint8ArrayToBuffer(chunk);
- }
- if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
- if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
- if (typeof cb !== 'function') cb = nop;
- if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
- state.pendingcb++;
- ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
- }
- return ret;
- };
- Writable.prototype.cork = function () {
- var state = this._writableState;
- state.corked++;
- };
- Writable.prototype.uncork = function () {
- var state = this._writableState;
- if (state.corked) {
- state.corked--;
- if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
- }
- };
- Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
- // node::ParseEncoding() requires lower case.
- if (typeof encoding === 'string') encoding = encoding.toLowerCase();
- if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
- this._writableState.defaultEncoding = encoding;
- return this;
- };
- function decodeChunk(state, chunk, encoding) {
- if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
- chunk = Buffer.from(chunk, encoding);
- }
- return chunk;
- }
- Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
- // making it explicit this property is not enumerable
- // because otherwise some prototype manipulation in
- // userland will fail
- enumerable: false,
- get: function () {
- return this._writableState.highWaterMark;
- }
- });
- // if we're already writing something, then just put this
- // in the queue, and wait our turn. Otherwise, call _write
- // If we return false, then we need a drain event, so set that flag.
- function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
- if (!isBuf) {
- var newChunk = decodeChunk(state, chunk, encoding);
- if (chunk !== newChunk) {
- isBuf = true;
- encoding = 'buffer';
- chunk = newChunk;
- }
- }
- var len = state.objectMode ? 1 : chunk.length;
- state.length += len;
- var ret = state.length < state.highWaterMark;
- // we must ensure that previous needDrain will not be reset to false.
- if (!ret) state.needDrain = true;
- if (state.writing || state.corked) {
- var last = state.lastBufferedRequest;
- state.lastBufferedRequest = {
- chunk: chunk,
- encoding: encoding,
- isBuf: isBuf,
- callback: cb,
- next: null
- };
- if (last) {
- last.next = state.lastBufferedRequest;
- } else {
- state.bufferedRequest = state.lastBufferedRequest;
- }
- state.bufferedRequestCount += 1;
- } else {
- doWrite(stream, state, false, len, chunk, encoding, cb);
- }
- return ret;
- }
- function doWrite(stream, state, writev, len, chunk, encoding, cb) {
- state.writelen = len;
- state.writecb = cb;
- state.writing = true;
- state.sync = true;
- if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
- state.sync = false;
- }
- function onwriteError(stream, state, sync, er, cb) {
- --state.pendingcb;
- if (sync) {
- // defer the callback if we are being called synchronously
- // to avoid piling up things on the stack
- pna.nextTick(cb, er);
- // this can emit finish, and it will always happen
- // after error
- pna.nextTick(finishMaybe, stream, state);
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
- } else {
- // the caller expect this to happen before if
- // it is async
- cb(er);
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
- // this can emit finish, but finish must
- // always follow error
- finishMaybe(stream, state);
- }
- }
- function onwriteStateUpdate(state) {
- state.writing = false;
- state.writecb = null;
- state.length -= state.writelen;
- state.writelen = 0;
- }
- function onwrite(stream, er) {
- var state = stream._writableState;
- var sync = state.sync;
- var cb = state.writecb;
- onwriteStateUpdate(state);
- if (er) onwriteError(stream, state, sync, er, cb);else {
- // Check if we're actually ready to finish, but don't emit yet
- var finished = needFinish(state);
- if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
- clearBuffer(stream, state);
- }
- if (sync) {
- /*<replacement>*/
- asyncWrite(afterWrite, stream, state, finished, cb);
- /*</replacement>*/
- } else {
- afterWrite(stream, state, finished, cb);
- }
- }
- }
- function afterWrite(stream, state, finished, cb) {
- if (!finished) onwriteDrain(stream, state);
- state.pendingcb--;
- cb();
- finishMaybe(stream, state);
- }
- // Must force callback to be called on nextTick, so that we don't
- // emit 'drain' before the write() consumer gets the 'false' return
- // value, and has a chance to attach a 'drain' listener.
- function onwriteDrain(stream, state) {
- if (state.length === 0 && state.needDrain) {
- state.needDrain = false;
- stream.emit('drain');
- }
- }
- // if there's something in the buffer waiting, then process it
- function clearBuffer(stream, state) {
- state.bufferProcessing = true;
- var entry = state.bufferedRequest;
- if (stream._writev && entry && entry.next) {
- // Fast case, write everything using _writev()
- var l = state.bufferedRequestCount;
- var buffer = new Array(l);
- var holder = state.corkedRequestsFree;
- holder.entry = entry;
- var count = 0;
- var allBuffers = true;
- while (entry) {
- buffer[count] = entry;
- if (!entry.isBuf) allBuffers = false;
- entry = entry.next;
- count += 1;
- }
- buffer.allBuffers = allBuffers;
- doWrite(stream, state, true, state.length, buffer, '', holder.finish);
- // doWrite is almost always async, defer these to save a bit of time
- // as the hot path ends with doWrite
- state.pendingcb++;
- state.lastBufferedRequest = null;
- if (holder.next) {
- state.corkedRequestsFree = holder.next;
- holder.next = null;
- } else {
- state.corkedRequestsFree = new CorkedRequest(state);
- }
- state.bufferedRequestCount = 0;
- } else {
- // Slow case, write chunks one-by-one
- while (entry) {
- var chunk = entry.chunk;
- var encoding = entry.encoding;
- var cb = entry.callback;
- var len = state.objectMode ? 1 : chunk.length;
- doWrite(stream, state, false, len, chunk, encoding, cb);
- entry = entry.next;
- state.bufferedRequestCount--;
- // if we didn't call the onwrite immediately, then
- // it means that we need to wait until it does.
- // also, that means that the chunk and cb are currently
- // being processed, so move the buffer counter past them.
- if (state.writing) {
- break;
- }
- }
- if (entry === null) state.lastBufferedRequest = null;
- }
- state.bufferedRequest = entry;
- state.bufferProcessing = false;
- }
- Writable.prototype._write = function (chunk, encoding, cb) {
- cb(new Error('_write() is not implemented'));
- };
- Writable.prototype._writev = null;
- Writable.prototype.end = function (chunk, encoding, cb) {
- var state = this._writableState;
- if (typeof chunk === 'function') {
- cb = chunk;
- chunk = null;
- encoding = null;
- } else if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
- if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
- // .end() fully uncorks
- if (state.corked) {
- state.corked = 1;
- this.uncork();
- }
- // ignore unnecessary end() calls.
- if (!state.ending && !state.finished) endWritable(this, state, cb);
- };
- function needFinish(state) {
- return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
- }
- function callFinal(stream, state) {
- stream._final(function (err) {
- state.pendingcb--;
- if (err) {
- stream.emit('error', err);
- }
- state.prefinished = true;
- stream.emit('prefinish');
- finishMaybe(stream, state);
- });
- }
- function prefinish(stream, state) {
- if (!state.prefinished && !state.finalCalled) {
- if (typeof stream._final === 'function') {
- state.pendingcb++;
- state.finalCalled = true;
- pna.nextTick(callFinal, stream, state);
- } else {
- state.prefinished = true;
- stream.emit('prefinish');
- }
- }
- }
- function finishMaybe(stream, state) {
- var need = needFinish(state);
- if (need) {
- prefinish(stream, state);
- if (state.pendingcb === 0) {
- state.finished = true;
- stream.emit('finish');
- }
- }
- return need;
- }
- function endWritable(stream, state, cb) {
- state.ending = true;
- finishMaybe(stream, state);
- if (cb) {
- if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
- }
- state.ended = true;
- stream.writable = false;
- }
- function onCorkedFinish(corkReq, state, err) {
- var entry = corkReq.entry;
- corkReq.entry = null;
- while (entry) {
- var cb = entry.callback;
- state.pendingcb--;
- cb(err);
- entry = entry.next;
- }
- if (state.corkedRequestsFree) {
- state.corkedRequestsFree.next = corkReq;
- } else {
- state.corkedRequestsFree = corkReq;
- }
- }
- Object.defineProperty(Writable.prototype, 'destroyed', {
- get: function () {
- if (this._writableState === undefined) {
- return false;
- }
- return this._writableState.destroyed;
- },
- set: function (value) {
- // we ignore the value if the stream
- // has not been initialized yet
- if (!this._writableState) {
- return;
- }
- // backward compatibility, the user is explicitly
- // managing destroyed
- this._writableState.destroyed = value;
- }
- });
- Writable.prototype.destroy = destroyImpl.destroy;
- Writable.prototype._undestroy = destroyImpl.undestroy;
- Writable.prototype._destroy = function (err, cb) {
- this.end();
- cb(err);
- };
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("f2ac"), __webpack_require__("698d")))
- /***/ }),
- /***/ "9d60":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireWildcard = __webpack_require__("16ed");
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _iServerRestService = _interopRequireWildcard(__webpack_require__("e340"));
- var _util = __webpack_require__("1448");
- var _Events2 = __webpack_require__("e3e2");
- /**
- * @class iPortalDataService
- * @classdesc iPortal 数据请求类。
- * @category BaseTypes Util
- * @param {string} url - iPortal 数据地址。
- * @param {Boolean} [withCredentials=false] - 请求是否携带 cookie。
- * @fires iPortalDataService#getdatasucceeded
- * @fires iPortalDataService#getdatafailed
- * @fires iPortalDataService#featureisempty
- */
- var iPortalDataService =
- /*#__PURE__*/
- function (_Events) {
- (0, _inherits2.default)(iPortalDataService, _Events);
- function iPortalDataService(url, withCredentials) {
- var _this;
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- (0, _classCallCheck2.default)(this, iPortalDataService);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(iPortalDataService).call(this));
- _this.url = url;
- _this.withCredentials = withCredentials || false;
- _this.epsgCode = options.epsgCode;
- _this.iportalServiceProxyUrl = options.iportalServiceProxyUrl;
- _this.eventTypes = ['getdatasucceeded', 'getdatafailed', 'featureisempty'];
- _this.initSerivce(url);
- return _this;
- }
- (0, _createClass2.default)(iPortalDataService, [{
- key: "initSerivce",
- value: function initSerivce(url) {
- var _this2 = this;
- this.iserverService = new _iServerRestService.default(url, {
- epsgCode: this.epsgCode
- });
- this.iserverService.on({
- getdatasucceeded: function getdatasucceeded(e) {
- /**
- * @event iPortalDataService#getdatasucceeded
- * @description 请求数据成功后触发。
- * @property {Object} e - 事件对象。
- */
- _this2.triggerEvent('getdatasucceeded', e);
- },
- getdatafailed: function getdatafailed(e) {
- /**
- * @event iPortalDataService#getdatafailed
- * @description 请求数据失败后触发。
- * @property {Object} e - 事件对象。
- */
- _this2.triggerEvent('getdatafailed', e);
- },
- featureisempty: function featureisempty(e) {
- /**
- * @event iPortalDataService#featureisempty
- * @description 请求数据为空后触发。
- * @property {Object} e - 事件对象。
- */
- _this2.triggerEvent('featureisempty', e);
- }
- });
- }
- /**
- * @function iPortalDataService.prototype.getData
- * @description 请求数据。
- * @param {Object} queryInfo - 可选参数。
- * @param {Object} [queryInfo.maxFeatures] - 最多可返回的要素数量。
- * @param {Object} [queryInfo.attributeFilter] - 属性过滤条件。
- * @param {Object} [queryInfo.keyWord] - 筛选关键字。
- */
- }, {
- key: "getData",
- value: function getData(queryInfo) {
- var _this3 = this;
- var preferContent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- if (!this.url) {
- return;
- }
- var datasetUrl = this.url;
- if (preferContent) {
- this._getDatafromContent(datasetUrl, queryInfo);
- return;
- }
- SuperMap.FetchRequest.get(datasetUrl, null, {
- withCredentials: this.withCredentials
- }).then(function (response) {
- return response.json();
- }).then(function (data) {
- if (data.succeed === false) {
- // 请求失败
- _this3.triggerEvent('getdatafailed', {
- data: data
- });
- return;
- } // 是否有rest服务
- if (data.dataItemServices && data.dataItemServices.length > 0) {
- var dataItemServices = data.dataItemServices;
- var resultData = dataItemServices.find(function (item) {
- return (item.serviceType === 'RESTDATA' || item.serviceType === 'RESTMAP') && item.serviceStatus === 'PUBLISHED';
- }); // 有rest服务并且address不为空(online的address服务为'')
- if (resultData && resultData.address) {
- // 如果有服务,获取数据源和数据集, 然后请求rest服务
- _this3._getDatafromRest(resultData.serviceType, resultData.address, queryInfo);
- } else {
- _this3._getDatafromContent(datasetUrl, queryInfo);
- }
- } else {
- _this3._getDatafromContent(datasetUrl, queryInfo);
- }
- }).catch(function (error) {
- console.log(error);
- _this3.triggerEvent('getdatafailed', {
- error: error
- });
- });
- }
- }, {
- key: "_getDatafromRest",
- value: function _getDatafromRest(serviceType, address, queryInfo) {
- var _this4 = this;
- if (serviceType === 'RESTDATA') {
- var url = "".concat(address, "/data/datasources");
- var dataSourceName;
- var datasetName; // 请求获取数据源名
- SuperMap.FetchRequest.get(url, null, {
- withCredentials: (0, _util.handleWithCredentials)(url, this.iportalServiceProxyUrl, this.withCredentials)
- }).then(function (response) {
- return response.json();
- }).then(function (data) {
- dataSourceName = data.datasourceNames[0];
- url = "".concat(address, "/data/datasources/").concat(dataSourceName, "/datasets"); // 请求获取数据集名
- SuperMap.FetchRequest.get(url, null, {
- withCredentials: (0, _util.handleWithCredentials)(url, _this4.iportalServiceProxyUrl, _this4.withCredentials)
- }).then(function (response) {
- return response.json();
- }).then(function (data) {
- datasetName = data.datasetNames[0]; // 请求restdata服务
- _this4.iserverService.getDataFeatures({
- datasetName: datasetName,
- dataSourceName: dataSourceName,
- dataUrl: url.split('/datasources')[0]
- }, Object.assign({}, queryInfo, {
- withCredentials: (0, _util.handleWithCredentials)(url, _this4.iportalServiceProxyUrl, _this4.withCredentials)
- }));
- }).catch(function (error) {
- console.log(error);
- _this4.triggerEvent('getdatafailed', {
- error: error
- });
- });
- });
- } else {
- // 如果是地图服务
- var _url = "".concat(address, "/maps");
- var mapName;
- var layerName;
- var path; // 请求获取地图名
- SuperMap.FetchRequest.get(_url, null, {
- withCredentials: (0, _util.handleWithCredentials)(_url, this.iportalServiceProxyUrl, this.withCredentials)
- }).then(function (response) {
- return response.json();
- }).then(function (data) {
- mapName = data[0].name;
- path = data[0].path;
- _url = _url = "".concat(address, "/maps/").concat(mapName, "/layers"); // 请求获取图层名
- SuperMap.FetchRequest.get(_url, null, {
- withCredentials: (0, _util.handleWithCredentials)(_url, _this4.iportalServiceProxyUrl, _this4.withCredentials)
- }).then(function (response) {
- return response.json();
- }).then(function (data) {
- layerName = data[0].subLayers.layers[0].caption; // 请求restmap服务
- _this4.iserverService.getMapFeatures({
- mapName: layerName,
- dataUrl: path
- }, Object.assign({}, queryInfo, {
- withCredentials: (0, _util.handleWithCredentials)(_url, _this4.iportalServiceProxyUrl, _this4.withCredentials)
- }));
- return layerName;
- }).catch(function (error) {
- console.log(error);
- _this4.triggerEvent('getdatafailed', {
- error: error
- });
- });
- }).catch(function (error) {
- console.log(error);
- _this4.triggerEvent('getdatafailed', {
- error: error
- });
- });
- }
- }
- }, {
- key: "_getDatafromContent",
- value: function _getDatafromContent(datasetUrl, queryInfo) {
- var _this5 = this;
- var result = {};
- datasetUrl += '/content.json?pageSize=9999999¤tPage=1'; // 获取图层数据
- SuperMap.FetchRequest.get(datasetUrl, null, {
- withCredentials: this.withCredentials
- }).then(function (response) {
- return response.json();
- }).then(function (data) {
- if (data.succeed === false) {
- // 请求失败
- _this5.triggerEvent('getdatafailed', {
- data: data
- });
- return;
- }
- if (data.type) {
- var features;
- var type = 'FeatureCollection';
- if (data.type === 'JSON' || data.type === 'GEOJSON') {
- data.content = JSON.parse(data.content.trim()); // 如果是json文件 data.content = {type:'fco', features},格式不固定
- if (!data.content.features) {
- features = _this5._json2Feature(data.content, queryInfo);
- }
- features = _this5._formatGeoJSON(features || data.content, queryInfo);
- type = data.content.type;
- } else if (data.type === 'EXCEL' || data.type === 'CSV') {
- features = _this5._excelData2Feature(data.content, queryInfo);
- }
- features = _this5._transformContentFeatures(features);
- result.features = {
- type: type,
- features: features
- };
- _this5.vertified && (result.vertified = _this5.vertified);
- _this5.iserverService._getFeaturesSucceed({
- result: result
- });
- }
- }).catch(function (error) {
- console.log(error);
- _this5.triggerEvent('getdatafailed', {
- error: error
- });
- });
- }
- }, {
- key: "_formatGeoJSON",
- value: function _formatGeoJSON(data, queryInfo) {
- var features = data.features;
- if (queryInfo && queryInfo.maxFeatures > 0) {
- features = features.slice(0, queryInfo.maxFeatures);
- }
- features.forEach(function (row, index) {
- row.properties['index'] = index;
- });
- return features;
- }
- }, {
- key: "_excelData2Feature",
- value: function _excelData2Feature(dataContent, queryInfo) {
- var fieldCaptions = dataContent.colTitles; // 位置属性处理
- var xfieldIndex = -1;
- var yfieldIndex = -1;
- for (var i = 0, _len = fieldCaptions.length; i < _len; i++) {
- if ((0, _util.isXField)(fieldCaptions[i])) {
- xfieldIndex = i;
- }
- if ((0, _util.isYField)(fieldCaptions[i])) {
- yfieldIndex = i;
- }
- } // feature 构建后期支持坐标系 4326/3857
- var features = [];
- var len = dataContent.rows.length;
- if (queryInfo && queryInfo.maxFeatures > 0 && len > queryInfo.maxFeatures) {
- len = queryInfo.maxFeatures;
- }
- for (var _i = 0; _i < len; _i++) {
- var row = dataContent.rows[_i];
- var x = xfieldIndex !== -1 && Number(row[xfieldIndex]);
- var y = yfieldIndex !== -1 && Number(row[yfieldIndex]); // 属性信息
- var attributes = {};
- for (var index in dataContent.colTitles) {
- var key = dataContent.colTitles[index];
- attributes[key] = dataContent.rows[_i][index];
- }
- var feature = {
- type: 'Feature',
- properties: attributes
- };
- if (x && y) {
- attributes['index'] = _i + '';
- feature.geometry = {
- type: 'Point',
- coordinates: [x, y]
- };
- } // 目前csv 只支持处理点,所以先生成点类型的 geojson
- features.push(feature);
- }
- return features;
- }
- }, {
- key: "_json2Feature",
- value: function _json2Feature(dataContent) {
- var content = typeof dataContent === 'string' ? JSON.parse(dataContent) : dataContent;
- var features = [];
- if (content instanceof Array) {
- content.map(function (val) {
- if (val.hasOwnProperty('geometry')) {
- features.push({
- properties: val.properties || val,
- geometry: val.geometry
- });
- } else {
- features.push({
- properties: val
- });
- }
- });
- } else if (content) {
- features = [{
- properties: content
- }];
- }
- return {
- features: features
- };
- } // 转坐标系
- }, {
- key: "_transformContentFeatures",
- value: function _transformContentFeatures(features) {
- var transformedFeatures = features;
- if (features && !!features.length) {
- var epsgCode = (0, _iServerRestService.vertifyEpsgCode)(features[0]);
- transformedFeatures = (0, _iServerRestService.transformFeatures)(epsgCode, features);
- this.vertified = true;
- }
- return transformedFeatures;
- }
- }]);
- return iPortalDataService;
- }(_Events2.Events);
- exports.default = iPortalDataService;
- /***/ }),
- /***/ "9dde":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.statisticsFeatures = statisticsFeatures;
- function statisticsFeatures(features, fields, fieldCaptions, fieldTypes) {
- var data = {
- features: features,
- fields: fields || [],
- fieldCaptions: fieldCaptions || [],
- fieldValues: [],
- fieldTypes: fieldTypes
- };
- if (features && !!features.length && !fieldCaptions && !fields) {
- var properties = Object.assign({}, features[0].properties, features[features.length - 1].properties); // 获取每个字段的名字和类型
- for (var attr in properties) {
- data.fieldCaptions.push(attr);
- data.fields.push(attr);
- }
- }
- for (var m in data.fields) {
- var fieldValue = [];
- for (var j in features) {
- var feature = features[j];
- var field = data.fields[m];
- var value = feature.properties[field];
- fieldValue.push(value);
- } // fieldValues [[每个字段的所有要素值],[],[]]
- data.fieldValues.push(fieldValue);
- }
- return data;
- }
- /***/ }),
- /***/ "a00e":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAFVhJREFUeAHt3VdzG0cWBlBx7V3nnHM5r+Pu0z77p+9PWEfZco4KDrItOQfuvTZAkyAlEdMTu89UtUiAmJ7u06jSV3dmgJ3d3d2nThze/nP4Kc8QIECAAAECDQl80mWuV+dOOzs7p/bvHGHj/v2P/U6AAAECBAg0JfBg19n+ESwutXMEjv9e6m+eJ0CAAAECBOoTiOLCTszqyc2iw5VmGvu9lK/525Ve6O8ECBAgQIAAgeMKCBbHlfI6AgQIECDQhkBWLHa7TlWw6CpnPwIECBAgQOCQgGBxiMQTBAgQIECAQFcBwaKrnP0IECBAgACBQwKCxSESTxAgQIAAAQJdBS57u2nXTqfY7xIf9DXFUByTAAECBAjMQmDbW0b7GLSKRR+K+iBAgAABAvUIuCuknrU0EwIECBAgsGwBFYtlr5/REyBAgACBWQkIFrNaDoMhQIAAAQLLFhAslr1+Rk+AAAECBGYlUM1dIVNc+TqrlTQYAgQIECDQj4CLN/tx1AsBAgQIECBQKuBUSKmg/QkQIECAAIE9AcFij8IvBAgQIECAQKnAoNdY+DTM0uWxPwECBAgQ6C4wxfWHKhbd18ueBAgQIECgRoGiizcHrVhMkZRqXGFzIkCAAAECSxFQsVjKShknAQIECBBYgIBgsYBFMkQCBAgQILAUAcFiKStlnAQIECBAYAECgsUCFskQCRAgQIDAiAJFF28KFiOulEMRIECAAIHaBQSL2lfY/AgQIECAwIgCgsWI2A5FgAABAgRqFxAsal9h8yNAgAABAiMKCBYjYjsUAQIECBBYgICLNxewSIZIgAABAgSaEFCxaGKZTZIAAQIECIwjIFiM4+woBAgQIECgCQHBoollNkkCBAgQIDCOgGAxjrOjECBAgACBpQi4eHMpK2WcBAgQIECgdgEVi9pX2PwIECBAgMCIAoLFiNgORYAAAQIEahcQLGpfYfMjQIAAAQIjCggWI2I7FAECBAgQWICAizcXsEiGSIAAAQIEmhBQsWhimU2SAAECBAiMIyBYjOPsKAQIECBAoAkBwaKJZTZJAgQIECAwjoBgMY6zoxAgQIAAgaUIuHhzKStlnAQIECBAoHYBFYvaV9j8CBAgQIDAiAKCxYjYDkWAAAECBGoXECxqX2HzI0CAAAECIwoIFiNiOxQBAgQIEKhdQLCofYXNjwABAgQIbCfgrpDtvLyaAAECBAgQGEpAxWIoWf0SIECAAIEGBQSLBhfdlAkQIECAwFACgsVQsvolQIAAAQLLFHCNxTLXzagJECBAgEB9AioW9a2pGREgQIAAgckEBIvJ6B2YAAECBAjUJyBY1LemZkSAAAECBCYTECwmo3dgAgQIECBQn4BgUd+amhEBAgQIECgRcFdIiZ59CRAgQIAAgf4EVCz6s9QTAQIECBBoXkCwaP4tAIAAAQIECPQnIFj0Z6knAgQIECDQvIBg0fxbAAABAgQIEDgg4OLNAxweECBAgAABApMJqFhMRu/ABAgQIECgPgHBor41NSMCBAgQIDCZgGAxGb0DEyBAgACB+gQEi/rW1IwIECBAgECJgIs3S/TsS4AAAQIECPQnoGLRn6WeCBAgQIBA8wKCRfNvAQAECBAgQKA/AcGiP0s9ESBAgACB5gUEi+bfAgAIECBAgMABARdvHuDwgAABAgQIEJhMQMViMnoHJkCAAAEC9QkIFvWtqRkRIECAAIHJBASLyegdmAABAgQI1CcgWNS3pmZEgAABAgRKBFy8WaJnXwIECBAgQKA/ARWL/iz1RIAAAQIEmhcQLJp/CwAgQIAAAQL9CQgW/VnqiQABAgQINC8gWDT/FgBAgAABAgT6ExAs+rPUEwECBAgQqEHAXSE1rKI5ECBAgACBGgRULGpYRXMgQIAAAQIzERAsZrIQhkGAAAECBGoQECxqWEVzIECAAAEC/Qm4xqI/Sz0RIECAAAECJQIqFiV69iVAgAABAgQOCAgWBzg8IECAAAECBEoEBIsSPfsSIECAAAECBwQEiwMcHhAgQIAAgeYFXLzZ/FsAAAECBAgQmImAisVMFsIwCBAgQIBADQKCRQ2raA4ECBAgQGAmAoLFTBbCMAgQIECAQA0CgkUNq2gOBAgQIEBgJgKCxUwWwjAIECBAgMBMBNwVMpOFMAwCBAgQINC8gIpF828BAAQIECBAoD8BwaI/Sz0RIECAAIHmBQSL5t8CAAgQIECAwAEB11gc4PCAAAECBAgQmExAxWIyegcmQIAAAQL1CQgW9a2pGREgQIAAgckEBIvJ6B2YAAECBAjUJyBY1LemZkSAAAECBCYTECwmo3dgAgQIECAwSwF3hcxyWQyKAAECBAg0KKBi0eCimzIBAgQIEBhKQLAYSla/BAgQIECgQQHBosFFN2UCBAgQIDCUgGAxlKx+CRAgQIDAMgVcvLnMdTNqAgQIECBQn4CKRX1rakYECBAgQGAyAcFiMnoHJkCAAAEC9QkIFvWtqRkRIECAAIHJBASLyegdmAABAgQIzFLAxZuzXBaDIkCAAAECDQqoWDS46KZMgAABAgSGEhAshpLVLwECBAgQaFBAsGhw0U2ZAAECBAgMJSBYDCWrXwIECBAgsEwBF28uc92MmgABAgQI1CegYlHfmpoRAQIECBCYTECwmIzegQkQIECAQH0CgkV9a2pGBAgQIEBgMgHBYjJ6ByZAgAABArMUcPHmLJfFoAgQIECAQIMCKhYNLropEyBAgACBoQQEi6Fk9UuAAAECBBoUECwaXHRTJkCAAAECQwkIFkPJ6pcAAQIECDQoIFg0uOimTIAAAQIELiPgrpDL4PgTAQIECBAgMKKAisWI2A5FgAABAgRqFxAsal9h8yNAgAABAiMKCBYjYjsUAQIECBBYgIBrLBawSIZIgAABAgSaEFCxaGKZTZIAAQIECIwjIFiM4+woBAgQIECgCQHBoollNkkCBAgQIDCOgGAxjrOjECBAgACBJgQEiyaW2SQJECBAgMCxBdwVcmwqLyRAgAABAgQGFVCxGJRX5wQIECBAoC0BwaKt9TZbAgQIECAwqIBgMSivzgkQIECAQFsCgkVb6222BAgQIEDgSgIu3rySkL8TIECAAAEC4wioWIzj7CgECBAgQKAJAcGiiWU2SQIECBAgMI6AYDGOs6MQIECAAIEmBASLJpbZJAkQIECAwLEFXLx5bCovJECAAAECBAYVULEYlFfnBAgQIECgfoHd3d1H17MULNYSfhIgQIAAAQJbC6xCxSOrHU9evXUPdiBAgAABAgQIhECEisfix8P5a7STOzs75wSLkLARIECAAAECewLHungzQsXjscdD0fZCRfYgWKSCjQABAgQIEDi2wEaoeCMqFZ+vdxYs1hJ+EiBAgAABAlcUiFDxRLzowWhZqXg9QsUX+3cSLPZr+J0AAQIECBC4pECEiifjjw9EOzJU5I6CRSrYCBAgQIAAgcsKbISK16JS8eVROwgWR6l4jgABAgQItCtw4OLNCBT5OCsV90fLSsUlQ0X8TcUiEWwECBAgQIDAYYGNUPF7vCJDxVeHX/nXMyoWf1n4jQABAgQIEFgJrELFU/HwvmjHChW5q2CRCjYCBAgQIEBgU+DpeOLeaBkqXo1KxfnNFxz1WLA4SsVzBAgQIECgbYEMFXdG2ypUJJlgkQo2AgQIECBAID+iOy/UfCLar6v2SlQqvt6GxpeQbaPltQQIECBAoFKBVah4Jqa3rlRsHSqSRrCo9A1iWgQIECBA4LgC+0LF3bHPb9E6hYo8nlMhqWAjQIAAAQKNCkSoyCJDViruipah4s1o30brtKlYdGKzEwECBAgQWL7AEaHi5ZjVxZKZCRYlevYlQIAAAQILFViFimdj+FmpyIs1X44LNbNSceCTN+PxVptgsRWXFxMgQIAAgeUL7AsVeaFmhoq8pqLz6Y/9Iq6x2K/hdwIECBAgULnAKlQ8F9O8I9q6UnGhr2mrWPQlqR8CBAgQIDBzgaFDRU5fxWLmbwLDI0CAAAECfQisQsXz0dft0X6JltdUFF2oedS4BIujVDxHgAABAgQqEohQcVVMJ0PFbdGuFCqKLt4ULCp645gKAQIECBDYFDgiVPwvKhXfbb6ur8eCRV+S+iFAgAABAjMTWIWKF2JYt0bLSsWgoSKnL1ikgo0AAQIECFQmsBEqfo7p5TUVg1Uq1nyCxVrCTwIECBAgUInAKlS8GNO5JVqGiqxUfD/G9ASLMZQdgwABAgQIjCQQoSL/b8/TH6OHipyiYJEKNgIECBAgUIHAKlRkpeLmaD9Fy0rFD1tOreiuEB+QtaW2lxMgQIAAgTkK9BQqiqcmWBQT6oAAAQIECEwrMJdQkQpOhUz7XnB0AgQIECBQJLAKFf+KTm6K9mO0PP2RPyfZBItJ2B2UAAECBAiUC0So+Hv0ktdU9BoqIpjsdh2dYNFVzn4ECBAgQGBCgVWoyErFjdHyAs38nIqiSkX0mV+jnrendt4Ei850diRAgAABAtMIHBEq8vRH3gXSeYs+74qdr4/2cedOYkfBokTPvgQIECBAYGSBCAD/iENmpeKGaFmp6DNUfBIB5bfos/MmWHSmsyMBAgQIEBhXYCNU5Cdp5umP0krF3dHPddGKQ0VqCBapYCNAgAABAjMXOCJUZKWi6HqI6DNDxbXRegkVSShYpIKNAAECBAjMWGAVKv4dQ8xrILJS0UeouCf6uSbap6WnP6KPvU2w2KPwCwECBAgQmJ9AhIr8zz+vqchQkd9Omqc/SisV90Y/eatqVip+j5+9bYJFb5Q6IkCAAAEC/QqsQkVWKvIaiOJQEf3l94BkpSJDRVYqeg0V0adTIYlgI0CAAAECcxPYCBUXY3xZqfil6zhXoSIrFVlUGCRU5NhULFLBRoAAAQIEZiQQISAvqMzTH1mp6DNUXBX9DRYqom/BIhFsBAgQIEBgLgKrUJGnPzJcXIj2Sg+VivuinzwN8tkQpz+i371NxWKPwi8ECBAgQGBagRFCRefvADmujGBxXCmvI0CAAAECAwpEqMjTHlmpyLtAslKR11T8Gj87bdFfVijuj5ZhIisVg4eKHKhgkQo2AgQIECAwocBGqPg2hpKnP/oKFafHChVJKFhM+EZyaAIECBAgMECo+FuoZqUiv/PjzJihIldTsEgFGwECBAgQmEAgQkV+6FWe/sgvFvsm2quFlYoMFQ9Ey2rH6KEijilYJIKNAAECBAiMLXBEqMjTH52/WTT6W4eK/KyLs2NXKtZ+KhZrCT8JECBAgMBIAhEC8ivP83MqslLxdbSsVCw+VMQ8TmS6sREgQIAAAQIjCQwUKh6M4ef3h0xWqVjzqVisJfwkQIAAAQIDC6xCRV5Tkd/VcT7aa4WVivwkzbym4qdo56Y6/RHH3tsEiz0KvxAgQIAAgeEEIlTcGL3n6Y8+Q0VWKn6IQHFuuJFv17NgsZ2XVxMgQIAAga0FNkLFV9FBVio6f7No9JeVigwV30c/n289oAF3ECwGxNU1AQIECBCIEHBTKGSlIv/PrTpU5GoLFqlgI0CAAAECAwhshIov4xCvF1Yq8v/trFRcjH6+GGDIxV0KFsWEOiBAgAABAocFNkJFhoA3egoVF6KfDCmz3NxuOstlMSgCBAgQWLJAhIqbY/zr0x99hYqHos9Zh4pcMxWLVLARIECAAIGeBPaFirzAMi+sPFlYqci7SPL0xzfRT16jMetNsJj18hgcAQIECCxJIELFLTHeF6P1HSq+jlBxfgkWgsUSVskYCRAgQGD2AhuhIj9XIisVu10HHv1lpSJPf5xfSqjIuQoWqWAjQIAAAQIFAhECbo3dX4iWlYo+QkV+h0ie/vgqQkV+l8hiNsFiMUtloAQIECAwR4FVqMjTH3lDxNlobxZWKhYbKnJ9BItUsBEgQIAAgQ4CESpui92yUpGh4ky0t3oKFV9GP99Ef4vbBIvFLZkBEyBAgMAcBAYIFdfEvPL0x+cRKr6dwxy7jEGw6KJmHwIECBBoWiBCxe0B8Hy0rFScjnaqsFJRRagIB6dCEsFGgAABAgSOKzBAqLg2jp1ffZ5fe37huOOY6+tULOa6MsZFgAABArMTiFBxRwwqKxU70T6L9nZhpaKqUBEew1YsYgGeyoPYCBAgQIBAXwLxH/mpvvrapp+NUPFpjOPtbfbffG30tw4VZ6Ovi5t/X+pjFYulrpxxEyBAgMBoAhEC7oyDPRctKxV9hIrrop/7o1UVKmI+w1YspkqVOTEbAQIECBDoQ2AjVHwS/7e9U9Jv9LcOFWeir+9K+prjvioWc1wVYyJAgACBWQhECLgrBvJstKxUfBxB4N2SgUV/18f+90WrMlSkjWCRCjYCBAgQILAhMGCoOB0B5fuNw1XzULCoZilNhAABAgT6EohQcXf09Uy0rFR8FEHgvZK+o78bYv97o1UdKtJo0GARkO4KSWUbAQIECPQmEP/JD3pXSPzfdU8MNkNFbh/G8d7/89du/+4LFZ9FXz9062U5ew0aLJbDYKQECBAgQODEiQFCxY3hmkGliVCR7yHBIhVsBAgQINC8QISKPFXxzxXEB1Fd+KAEJfpbh4q8PfXHkr6WtK9gsaTVMlYCBAgQGERgI1S8H0Hgw5IDRX83xf55nUZToSLNBItUsBEgQIBAswIRAvL2z6dXAEJF4TtBsCgEtDsBAgQILFcgQkV++uX6RoP3olLxUclsor+bY//87Iv8IK2fSvpa6r6DBotAHfTK3aWiGzcBAgQITC+wESrejf+zPi4ZlVDxp96gwaJkgexLgAABAgSGEogQkF9T/uSq/z5CxS3RV37zaX4658+rfpv8IVg0uewmTYAAgXYFNkLFOxEEPinRiP7WoSJPfzQdKtJRsCh5N9mXAAECBBYlECHgwRjwE6tBvx1B4NOSCUR/t8b+t0cTKlaQgkXJO8q+BAgQILAYgQgBD8VgH18NuI9QcVv0lS1Pf/yy6rf5H4JF828BAAQIEKhfYCNUnIog8FnJrKO/DBRZrRAqNiAFiw0QDwkQIECgLoEIAQ/HjB5bzeqtCBWnS2YY/eWpj7yuIk9/qFRsYAoWGyAeEiBAgEA9AhECHonZPLqaUR+hIu/8yM+qyErFr6t+/dgnIFjsw/ArAQIECNQjsBEq3owgcKZkdtFfhor8qG6h4jKQfwSLwFp/6tj6pXnVbH7L2+bz67/7SYAAAQIE5iyQn1ORLbf3ot0c/6dlpaFky1tJ8/SHSsVlFHeO+lvgv3TU854jQIAAAQILEzgZQeDswsa86OE6FbLo5TN4AgQIELiEwG48n6Hi3CX+7umBBP4PbSiG3RVuKeMAAAAASUVORK5CYII="
- /***/ }),
- /***/ "a142":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- var _timer = _interopRequireDefault(__webpack_require__("8156"));
- var _RestService = _interopRequireDefault(__webpack_require__("5bf3"));
- var _CountTo = _interopRequireDefault(__webpack_require__("4156"));
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var _default2 = {
- name: 'SmIndicator',
- components: {
- countTo: _CountTo.default
- },
- mixins: [_theme.default, _timer.default],
- props: {
- title: {
- type: String,
- default: function _default() {
- return this.$t('indicator.title');
- }
- },
- unit: {
- type: String,
- default: function _default() {
- return this.$t('indicator.unit');
- }
- },
- indicatorColor: {
- type: String
- },
- // title/unit
- textFontSize: {
- type: [String, Number]
- },
- fontSize: {
- type: [String, Number]
- },
- fontWeight: {
- type: [String, Number],
- default: 'border'
- },
- num: {
- type: [Number, String],
- default: 0
- },
- url: {
- type: String
- },
- proxy: {
- type: String
- },
- animated: {
- type: Boolean,
- default: false
- },
- duration: {
- type: [Number, String],
- default: 1000
- },
- decimals: {
- type: Number,
- default: -1
- },
- mode: {
- type: String,
- default: 'vertical',
- validator: function validator(val) {
- return ['vertical', 'horizontal'];
- }
- },
- separator: {
- type: String,
- default: ','
- },
- numSpacing: {
- type: Number,
- default: 0
- },
- numBackground: {
- type: Object,
- default: function _default() {
- return {
- color: 'rgba(0, 0, 0, 0)',
- image: '',
- padding: 0
- };
- }
- },
- separatorBackground: {
- type: Boolean,
- default: false
- },
- showTitleUnit: {
- type: Boolean,
- default: true
- },
- titleField: String,
- numField: String,
- unitField: String,
- thresholdsStyle: Array
- },
- data: function data() {
- return {
- indicatorColorData: '',
- titleData: this.title,
- unitData: this.unit,
- numData: 0,
- startData: 0,
- indicatorNum: 0
- };
- },
- computed: {
- unit_titleStyle: function unit_titleStyle() {
- return {
- fontSize: this.textFontSize || parseFloat(this.fontSize) * 0.66 + this.fontUnit,
- fontWeight: this.fontWeight
- };
- },
- fontUnit: function fontUnit() {
- var reg = /\d+(\.\d+)?([a-z]+)/gi;
- var fontUnit = this.fontSize ? this.fontSize.replace(reg, '$2') : '';
- return fontUnit;
- },
- indicatorStyle: function indicatorStyle() {
- var _this = this;
- var color = this.indicatorColorData;
- if (!isNaN(this.indicatorNum) && this.thresholdsStyle) {
- var matchStyle = this.thresholdsStyle.find(function (item) {
- var status;
- if (item.min) {
- status = +_this.indicatorNum >= +item.min;
- }
- if (item.max) {
- status = status === void 0 ? true : status;
- status = status && +_this.indicatorNum <= +item.max;
- }
- return status;
- });
- if (matchStyle) {
- color = matchStyle.color;
- }
- }
- var style = {
- color: color
- };
- typeof this.indicatorNum === 'string' && (style.fontSize = parseFloat(this.fontSize) + this.fontUnit);
- return style;
- },
- direction: function direction() {
- return {
- vertical: 'column',
- horizontal: 'row'
- }[this.mode];
- },
- calDecimals: function calDecimals() {
- if (this.decimals > 0) {
- return this.decimals;
- }
- if (this.numData.toString().split('.')[1]) {
- return this.numData.toString().split('.')[1].length;
- }
- return 0;
- }
- },
- watch: {
- url: {
- handler: function handler(val) {
- if (val) {
- this.getData();
- } else {
- this.unitData = this.unit;
- this.changeNumData(this.num);
- this.titleData = this.title;
- this.fetchProperties = null;
- }
- },
- immediate: true
- },
- indicatorColor: function indicatorColor(val) {
- this.indicatorColorData = val;
- },
- proxy: function proxy() {
- this.restService && this.restService.setProxy(this.proxy);
- if (this.url) {
- this.getData();
- }
- }
- },
- mounted: function mounted() {
- var _this2 = this;
- this.$on('theme-style-changed', function () {
- _this2.indicatorColorData = _this2.getColor(0);
- });
- this.indicatorColorData = this.indicatorColor || this.getColor(0);
- this.partsOfPropsWatcher();
- },
- beforeDestroy: function beforeDestroy() {
- this.restService && this.restService.remove('getdatasucceeded');
- },
- methods: {
- partsOfPropsWatcher: function partsOfPropsWatcher() {
- var _this3 = this;
- var propsFields = ['title', 'unit', 'num', 'titleField', 'unitField', 'numField'];
- propsFields.forEach(function (props) {
- _this3.$watch(props, function (next) {
- switch (props) {
- case 'title':
- this.titleData = next;
- break;
- case 'titleField':
- if (this.fetchProperties && this.fetchProperties.hasOwnProperty(next)) {
- this.titleData = this.fetchProperties[this.titleField];
- } else {
- this.titleData = this.title;
- }
- break;
- case 'unit':
- this.unitData = next;
- break;
- case 'unitField':
- if (this.fetchProperties && this.fetchProperties.hasOwnProperty(next)) {
- this.unitData = this.fetchProperties[this.unitField];
- } else {
- this.unitData = this.unit;
- }
- break;
- case 'num':
- this.changeNumData(next);
- break;
- case 'numField':
- if (this.fetchProperties && this.fetchProperties.hasOwnProperty(next)) {
- this.changeNumData(this.fetchProperties[this.numField]);
- } else {
- this.changeNumData(this.num);
- }
- break;
- }
- });
- });
- },
- isNumber: function isNumber(str) {
- return /^\d+$/.test(str);
- },
- timing: function timing() {
- this.getData();
- },
- fetchData: function fetchData(_ref) {
- var features = _ref.features;
- if (features && !!features.length) {
- var properties = features[0].properties;
- this.fetchProperties = properties;
- this.unitData = properties.hasOwnProperty(this.unitField) ? properties[this.unitField] : this.unit;
- properties.hasOwnProperty(this.numField) ? this.changeNumData(properties[this.numField]) : this.changeNumData(this.num);
- this.titleData = properties.hasOwnProperty(this.titleField) ? properties[this.titleField] : this.title;
- }
- },
- getData: function getData() {
- this.getRestService().getData(this.url);
- },
- changeNumData: function changeNumData(newData) {
- var startData = this.animated ? +this.numData : +newData;
- this.startData = isNaN(startData) ? 0 : startData;
- this.numData = +newData;
- this.indicatorNum = newData;
- },
- getRestService: function getRestService() {
- if (!this.restService) {
- this.restService = new _RestService.default({
- proxy: this.proxy
- });
- this.restService.on({
- getdatasucceeded: this.fetchData
- });
- }
- return this.restService;
- }
- }
- };
- exports.default = _default2;
- /***/ }),
- /***/ "a2ee":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- var _timer = _interopRequireDefault(__webpack_require__("8156"));
- var _thirdService = _interopRequireDefault(__webpack_require__("c51e"));
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var _default = {
- name: 'SmText',
- mixins: [_theme.default, _timer.default, _thirdService.default],
- props: {
- fontStyle: {
- type: Object
- },
- title: {
- type: String
- },
- href: {
- type: String,
- default: ''
- },
- target: {
- type: String,
- default: '_self'
- }
- },
- data: function data() {
- return {
- finalValue: this.title
- };
- },
- computed: {
- customStyle: function customStyle() {
- var style = Object.assign({}, this.fontStyle);
- if (style.textAlign && !style.justifyContent) {
- var textAlign = style.textAlign;
- style.justifyContent = textAlign === 'left' ? 'flex-start' : textAlign === 'right' ? 'flex-end' : 'center';
- delete style.textAlign;
- }
- return style;
- }
- },
- watch: {
- title: function title(val) {
- this.finalValue = val;
- }
- },
- beforeDestroy: function beforeDestroy() {
- this.restService && this.restService.remove('getdatasucceeded');
- },
- methods: {
- timing: function timing() {
- this.getData();
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "a3cf":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/leaflet/web-map/WebMap.vue?vue&type=template&id=d25de088&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-web-map",attrs:{"id":_vm.target}},[(_vm.ready)?_vm._t("default"):_vm._e(),_vm._v(" "),(_vm.spinning)?_c('a-spin',{attrs:{"size":"large","tip":_vm.$t('webmap.loadingTip'),"spinning":_vm.spinning}}):_vm._e()],2)}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/leaflet/web-map/WebMap.vue?vue&type=template&id=d25de088&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "a51f":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/image/Image.vue?vue&type=template&id=3aa6b84a&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-image",style:([_vm.getBackgroundStyle, _vm.getTextColorStyle])},[_c('a',{class:['sm-component-image__link', _vm.realHref ? '': 'sm-component-image__noLink'],attrs:{"href":_vm.realHref,"target":_vm.target}},[(_vm.src)?_c('div',{staticClass:"sm-component-image__content",style:([_vm.repeatStyle,_vm.imgUrl])}):_c('i',{staticClass:"sm-components-icons-x-bmp sm-component-image__defaultImg"})])])}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/image/Image.vue?vue&type=template&id=3aa6b84a&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "a587":
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE_a587__;
- /***/ }),
- /***/ "a759":
- /***/ (function(module) {
- module.exports = JSON.parse("{\"border1\":{\"type\":\"1\",\"borderWidth\":[12,12,12,12],\"borderEdge\":{\"top\":12,\"left\":12,\"right\":12,\"bottom\":12}},\"border2\":{\"type\":\"2\",\"borderWidth\":[12,12,12,12],\"borderEdge\":{\"top\":12,\"left\":12,\"right\":12,\"bottom\":12}},\"border3\":{\"type\":\"3\",\"borderWidth\":[19,19,19,19],\"borderEdge\":{\"top\":19,\"left\":19,\"right\":19,\"bottom\":19}},\"border4\":{\"type\":\"4\",\"borderWidth\":[20,40,20,40],\"borderEdge\":{\"top\":20,\"left\":20,\"right\":20,\"bottom\":20}},\"border5\":{\"type\":\"5\",\"borderWidth\":[12,135,12,160],\"borderEdge\":{\"top\":12,\"left\":12,\"right\":12,\"bottom\":12}},\"border6\":{\"type\":\"6\",\"borderWidth\":[12,12,12,12],\"borderEdge\":{\"top\":12,\"left\":12,\"right\":12,\"bottom\":12}},\"border7\":{\"type\":\"7\",\"borderWidth\":[88,138,134,130],\"borderEdge\":{\"top\":30,\"left\":30,\"right\":32,\"bottom\":32}},\"border8\":{\"type\":\"8\",\"borderWidth\":[24,100,24,100],\"borderEdge\":{\"top\":17,\"left\":17,\"right\":17,\"bottom\":17}},\"border9\":{\"type\":\"9\",\"borderWidth\":[100,90,70,75],\"borderEdge\":{\"top\":32,\"left\":32,\"right\":32,\"bottom\":32}},\"border10\":{\"type\":\"10\",\"borderWidth\":[27,104,100,52],\"borderEdge\":{\"top\":27,\"left\":23,\"right\":60,\"bottom\":44}},\"border11\":{\"type\":\"11\",\"borderWidth\":[26,52,26,52],\"borderEdge\":{\"top\":12,\"left\":12,\"right\":12,\"bottom\":12}},\"border12\":{\"type\":\"12\",\"borderWidth\":[109,271,100,180],\"borderEdge\":{\"top\":30,\"left\":12,\"right\":12,\"bottom\":25}},\"border13\":{\"type\":\"13\",\"borderWidth\":[20,24,20,24],\"borderEdge\":{\"top\":20,\"left\":22,\"right\":24,\"bottom\":20}}}");
- /***/ }),
- /***/ "aa59":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _Popper = _interopRequireDefault(__webpack_require__("0e27"));
- var _Options = _interopRequireDefault(__webpack_require__("dcc9"));
- var _vmUpdater = _interopRequireDefault(__webpack_require__("3a49"));
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- var _mapGetter = _interopRequireDefault(__webpack_require__("2ed5"));
- var _PopupViewModel = _interopRequireDefault(__webpack_require__("b6b0"));
- var _default2 = {
- name: 'SmPopup',
- mixins: [_Popper.default, _Options.default, _vmUpdater.default, _mapGetter.default, _theme.default],
- viewModelProps: ['latLng', 'content'],
- props: {
- latLng: {
- type: [Object, Array],
- default: function _default() {
- return [];
- }
- }
- },
- watch: {
- backgroundData: function backgroundData() {
- this.changePopupStyle();
- },
- options: function options() {
- this.loaded();
- }
- },
- loaded: function loaded() {
- var _this = this;
- this.setViewModel();
- this.mapObject = this.viewModel.getPopup();
- this.parentContainer = this.$parent; // 如果有父组件有mapObject,则可以绑定在上面(默认绑定在map上面)
- var parentContainerObject = this.parentContainer && this.parentContainer.mapObject || this.map;
- if (parentContainerObject) {
- // 如果有bindpopup方法的就绑定
- if (parentContainerObject.bindPopup) {
- parentContainerObject.bindPopup(this.mapObject);
- this.$nextTick(function () {
- _this.$emit('ready', _this.mapObject);
- });
- return;
- } // 如果是地图,则openOn(this.map)
- this.isMap = this.viewModel.isMap(parentContainerObject);
- if (this.isMap) {
- parentContainerObject.on('click', function (e) {
- var latLng = _this.map.layerPointToLatLng(e.layerPoint);
- _this.viewModel.setLatLng(latLng); // 通过slot进来的content
- if (_this.$el && _this.$el.style) {
- _this.$el.style.display = 'block';
- }
- _this.$nextTick(function () {
- _this.$emit('ready', _this.mapObject);
- });
- _this.$on('ready', _this.viewModel.openOnMap);
- });
- }
- }
- },
- beforeDestroy: function beforeDestroy() {
- if (this.parentContainer) {
- if (this.parentContainer.unbindPopup) {
- this.parentContainer.unbindPopup();
- } else if (this.parentContainer.mapObject && this.parentContainer.mapObject.unbindPopup) {
- this.parentContainer.mapObject.unbindPopup();
- }
- }
- },
- methods: {
- setViewModel: function setViewModel() {
- this.viewModel = new _PopupViewModel.default(this.map, {
- latLng: this.latLng,
- content: this.content || this.$el,
- options: this.options
- });
- },
- changePopupStyle: function changePopupStyle() {
- var popupContent = document.querySelector('.leaflet-popup-content-wrapper');
- var popupTip = document.querySelector('.leaflet-popup-tip');
- var popupCloseBtn = document.querySelector('.leaflet-container a.leaflet-popup-close-button:hover');
- if (popupContent) {
- popupContent.style.background = this.backgroundData;
- }
- if (popupTip) {
- popupTip.style.background = this.backgroundData;
- }
- if (popupCloseBtn) {
- popupTip.style.color = this.textColorsData;
- }
- }
- }
- };
- exports.default = _default2;
- /***/ }),
- /***/ "acbb":
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE_acbb__;
- /***/ }),
- /***/ "ae5c":
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global, module) {/**
- * lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
- /** Used as the `TypeError` message for "Functions" methods. */
- var FUNC_ERROR_TEXT = 'Expected a function';
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
- /** Used to compose bitmasks for comparison styles. */
- var UNORDERED_COMPARE_FLAG = 1,
- PARTIAL_COMPARE_FLAG = 2;
- /** Used as references for various `Number` constants. */
- var INFINITY = 1 / 0,
- MAX_SAFE_INTEGER = 9007199254740991;
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- promiseTag = '[object Promise]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- weakMapTag = '[object WeakMap]';
- var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
- /** Used to match property names within property paths. */
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
- reIsPlainProp = /^\w*$/,
- reLeadingDot = /^\./,
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
- /**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
- /** Used to match backslashes in property paths. */
- var reEscapeChar = /\\(\\)?/g;
- /** Used to detect host constructors (Safari). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
- typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
- typedArrayTags[weakMapTag] = false;
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
- /** Detect free variable `exports`. */
- var freeExports = true && exports && !exports.nodeType && exports;
- /** Detect free variable `module`. */
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports;
- /** Detect free variable `process` from Node.js. */
- var freeProcess = moduleExports && freeGlobal.process;
- /** Used to access faster Node.js helpers. */
- var nodeUtil = (function() {
- try {
- return freeProcess && freeProcess.binding('util');
- } catch (e) {}
- }());
- /* Node.js helper references. */
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
- /**
- * A specialized version of `_.map` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function arrayMap(array, iteratee) {
- var index = -1,
- length = array ? array.length : 0,
- result = Array(length);
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
- }
- return result;
- }
- /**
- * A specialized version of `_.some` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function arraySome(array, predicate) {
- var index = -1,
- length = array ? array.length : 0;
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
- }
- return false;
- }
- /**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
- function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
- }
- /**
- * The base implementation of `_.sortBy` which uses `comparer` to define the
- * sort order of `array` and replaces criteria objects with their corresponding
- * values.
- *
- * @private
- * @param {Array} array The array to sort.
- * @param {Function} comparer The function to define sort order.
- * @returns {Array} Returns `array`.
- */
- function baseSortBy(array, comparer) {
- var length = array.length;
- array.sort(comparer);
- while (length--) {
- array[length] = array[length].value;
- }
- return array;
- }
- /**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
- function baseTimes(n, iteratee) {
- var index = -1,
- result = Array(n);
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
- }
- /**
- * The base implementation of `_.unary` without support for storing metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
- */
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
- }
- /**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function getValue(object, key) {
- return object == null ? undefined : object[key];
- }
- /**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
- function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
- }
- /**
- * Converts `map` to its key-value pairs.
- *
- * @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the key-value pairs.
- */
- function mapToArray(map) {
- var index = -1,
- result = Array(map.size);
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
- }
- /**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
- }
- /**
- * Converts `set` to an array of its values.
- *
- * @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the values.
- */
- function setToArray(set) {
- var index = -1,
- result = Array(set.size);
- set.forEach(function(value) {
- result[++index] = value;
- });
- return result;
- }
- /** Used for built-in method references. */
- var arrayProto = Array.prototype,
- funcProto = Function.prototype,
- objectProto = Object.prototype;
- /** Used to detect overreaching core-js shims. */
- var coreJsData = root['__core-js_shared__'];
- /** Used to detect methods masquerading as native. */
- var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
- return uid ? ('Symbol(src)_1.' + uid) : '';
- }());
- /** Used to resolve the decompiled source of functions. */
- var funcToString = funcProto.toString;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objectToString = objectProto.toString;
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
- /** Built-in value references. */
- var Symbol = root.Symbol,
- Uint8Array = root.Uint8Array,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- splice = arrayProto.splice;
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeKeys = overArg(Object.keys, Object);
- /* Built-in method references that are verified to be native. */
- var DataView = getNative(root, 'DataView'),
- Map = getNative(root, 'Map'),
- Promise = getNative(root, 'Promise'),
- Set = getNative(root, 'Set'),
- WeakMap = getNative(root, 'WeakMap'),
- nativeCreate = getNative(Object, 'create');
- /** Used to detect maps, sets, and weakmaps. */
- var dataViewCtorString = toSource(DataView),
- mapCtorString = toSource(Map),
- promiseCtorString = toSource(Promise),
- setCtorString = toSource(Set),
- weakMapCtorString = toSource(WeakMap);
- /** Used to convert symbols to primitives and strings. */
- var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
- /**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Hash(entries) {
- var index = -1,
- length = entries ? entries.length : 0;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the hash.
- *
- * @private
- * @name clear
- * @memberOf Hash
- */
- function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
- }
- /**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @name delete
- * @memberOf Hash
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function hashDelete(key) {
- return this.has(key) && delete this.__data__[key];
- }
- /**
- * Gets the hash value for `key`.
- *
- * @private
- * @name get
- * @memberOf Hash
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate) {
- var result = data[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
- }
- /**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Hash
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function hashHas(key) {
- var data = this.__data__;
- return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
- }
- /**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Hash
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the hash instance.
- */
- function hashSet(key, value) {
- var data = this.__data__;
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
- return this;
- }
- // Add methods to `Hash`.
- Hash.prototype.clear = hashClear;
- Hash.prototype['delete'] = hashDelete;
- Hash.prototype.get = hashGet;
- Hash.prototype.has = hashHas;
- Hash.prototype.set = hashSet;
- /**
- * Creates an list cache object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function ListCache(entries) {
- var index = -1,
- length = entries ? entries.length : 0;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the list cache.
- *
- * @private
- * @name clear
- * @memberOf ListCache
- */
- function listCacheClear() {
- this.__data__ = [];
- }
- /**
- * Removes `key` and its value from the list cache.
- *
- * @private
- * @name delete
- * @memberOf ListCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function listCacheDelete(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- if (index < 0) {
- return false;
- }
- var lastIndex = data.length - 1;
- if (index == lastIndex) {
- data.pop();
- } else {
- splice.call(data, index, 1);
- }
- return true;
- }
- /**
- * Gets the list cache value for `key`.
- *
- * @private
- * @name get
- * @memberOf ListCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function listCacheGet(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- return index < 0 ? undefined : data[index][1];
- }
- /**
- * Checks if a list cache value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf ListCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function listCacheHas(key) {
- return assocIndexOf(this.__data__, key) > -1;
- }
- /**
- * Sets the list cache `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf ListCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the list cache instance.
- */
- function listCacheSet(key, value) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
- if (index < 0) {
- data.push([key, value]);
- } else {
- data[index][1] = value;
- }
- return this;
- }
- // Add methods to `ListCache`.
- ListCache.prototype.clear = listCacheClear;
- ListCache.prototype['delete'] = listCacheDelete;
- ListCache.prototype.get = listCacheGet;
- ListCache.prototype.has = listCacheHas;
- ListCache.prototype.set = listCacheSet;
- /**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function MapCache(entries) {
- var index = -1,
- length = entries ? entries.length : 0;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- /**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
- function mapCacheClear() {
- this.__data__ = {
- 'hash': new Hash,
- 'map': new (Map || ListCache),
- 'string': new Hash
- };
- }
- /**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function mapCacheDelete(key) {
- return getMapData(this, key)['delete'](key);
- }
- /**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function mapCacheGet(key) {
- return getMapData(this, key).get(key);
- }
- /**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapCacheHas(key) {
- return getMapData(this, key).has(key);
- }
- /**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
- function mapCacheSet(key, value) {
- getMapData(this, key).set(key, value);
- return this;
- }
- // Add methods to `MapCache`.
- MapCache.prototype.clear = mapCacheClear;
- MapCache.prototype['delete'] = mapCacheDelete;
- MapCache.prototype.get = mapCacheGet;
- MapCache.prototype.has = mapCacheHas;
- MapCache.prototype.set = mapCacheSet;
- /**
- *
- * Creates an array cache object to store unique values.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function SetCache(values) {
- var index = -1,
- length = values ? values.length : 0;
- this.__data__ = new MapCache;
- while (++index < length) {
- this.add(values[index]);
- }
- }
- /**
- * Adds `value` to the array cache.
- *
- * @private
- * @name add
- * @memberOf SetCache
- * @alias push
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache instance.
- */
- function setCacheAdd(value) {
- this.__data__.set(value, HASH_UNDEFINED);
- return this;
- }
- /**
- * Checks if `value` is in the array cache.
- *
- * @private
- * @name has
- * @memberOf SetCache
- * @param {*} value The value to search for.
- * @returns {number} Returns `true` if `value` is found, else `false`.
- */
- function setCacheHas(value) {
- return this.__data__.has(value);
- }
- // Add methods to `SetCache`.
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
- SetCache.prototype.has = setCacheHas;
- /**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Stack(entries) {
- this.__data__ = new ListCache(entries);
- }
- /**
- * Removes all key-value entries from the stack.
- *
- * @private
- * @name clear
- * @memberOf Stack
- */
- function stackClear() {
- this.__data__ = new ListCache;
- }
- /**
- * Removes `key` and its value from the stack.
- *
- * @private
- * @name delete
- * @memberOf Stack
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function stackDelete(key) {
- return this.__data__['delete'](key);
- }
- /**
- * Gets the stack value for `key`.
- *
- * @private
- * @name get
- * @memberOf Stack
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function stackGet(key) {
- return this.__data__.get(key);
- }
- /**
- * Checks if a stack value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Stack
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function stackHas(key) {
- return this.__data__.has(key);
- }
- /**
- * Sets the stack `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Stack
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the stack cache instance.
- */
- function stackSet(key, value) {
- var cache = this.__data__;
- if (cache instanceof ListCache) {
- var pairs = cache.__data__;
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
- pairs.push([key, value]);
- return this;
- }
- cache = this.__data__ = new MapCache(pairs);
- }
- cache.set(key, value);
- return this;
- }
- // Add methods to `Stack`.
- Stack.prototype.clear = stackClear;
- Stack.prototype['delete'] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
- /**
- * Creates an array of the enumerable property names of the array-like `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @param {boolean} inherited Specify returning inherited property names.
- * @returns {Array} Returns the array of property names.
- */
- function arrayLikeKeys(value, inherited) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- // Safari 9 makes `arguments.length` enumerable in strict mode.
- var result = (isArray(value) || isArguments(value))
- ? baseTimes(value.length, String)
- : [];
- var length = result.length,
- skipIndexes = !!length;
- for (var key in value) {
- if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
- }
- /**
- * The base implementation of `_.forEach` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- */
- var baseEach = createBaseEach(baseForOwn);
- /**
- * The base implementation of `baseForOwn` which iterates over `object`
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseFor = createBaseFor();
- /**
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwn(object, iteratee) {
- return object && baseFor(object, iteratee, keys);
- }
- /**
- * The base implementation of `_.get` without support for default values.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @returns {*} Returns the resolved value.
- */
- function baseGet(object, path) {
- path = isKey(path, object) ? [path] : castPath(path);
- var index = 0,
- length = path.length;
- while (object != null && index < length) {
- object = object[toKey(path[index++])];
- }
- return (index && index == length) ? object : undefined;
- }
- /**
- * The base implementation of `getTag`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- return objectToString.call(value);
- }
- /**
- * The base implementation of `_.hasIn` without support for deep paths.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
- function baseHasIn(object, key) {
- return object != null && key in Object(object);
- }
- /**
- * The base implementation of `_.isEqual` which supports partial comparisons
- * and tracks traversed objects.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {boolean} [bitmask] The bitmask of comparison flags.
- * The bitmask may be composed of the following flags:
- * 1 - Unordered comparison
- * 2 - Partial comparison
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
- function baseIsEqual(value, other, customizer, bitmask, stack) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
- }
- /**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
- var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = arrayTag,
- othTag = arrayTag;
- if (!objIsArr) {
- objTag = getTag(object);
- objTag = objTag == argsTag ? objectTag : objTag;
- }
- if (!othIsArr) {
- othTag = getTag(other);
- othTag = othTag == argsTag ? objectTag : othTag;
- }
- var objIsObj = objTag == objectTag && !isHostObject(object),
- othIsObj = othTag == objectTag && !isHostObject(other),
- isSameTag = objTag == othTag;
- if (isSameTag && !objIsObj) {
- stack || (stack = new Stack);
- return (objIsArr || isTypedArray(object))
- ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
- : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
- }
- if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
- if (objIsWrapped || othIsWrapped) {
- var objUnwrapped = objIsWrapped ? object.value() : object,
- othUnwrapped = othIsWrapped ? other.value() : other;
- stack || (stack = new Stack);
- return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
- }
- }
- if (!isSameTag) {
- return false;
- }
- stack || (stack = new Stack);
- return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
- }
- /**
- * The base implementation of `_.isMatch` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Array} matchData The property names, values, and compare flags to match.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
- function baseIsMatch(object, source, matchData, customizer) {
- var index = matchData.length,
- length = index,
- noCustomizer = !customizer;
- if (object == null) {
- return !length;
- }
- object = Object(object);
- while (index--) {
- var data = matchData[index];
- if ((noCustomizer && data[2])
- ? data[1] !== object[data[0]]
- : !(data[0] in object)
- ) {
- return false;
- }
- }
- while (++index < length) {
- data = matchData[index];
- var key = data[0],
- objValue = object[key],
- srcValue = data[1];
- if (noCustomizer && data[2]) {
- if (objValue === undefined && !(key in object)) {
- return false;
- }
- } else {
- var stack = new Stack;
- if (customizer) {
- var result = customizer(objValue, srcValue, key, object, source, stack);
- }
- if (!(result === undefined
- ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
- : result
- )) {
- return false;
- }
- }
- }
- return true;
- }
- /**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- */
- function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
- }
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
- }
- /**
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- */
- function baseIsTypedArray(value) {
- return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
- }
- /**
- * The base implementation of `_.iteratee`.
- *
- * @private
- * @param {*} [value=_.identity] The value to convert to an iteratee.
- * @returns {Function} Returns the iteratee.
- */
- function baseIteratee(value) {
- // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
- // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
- if (typeof value == 'function') {
- return value;
- }
- if (value == null) {
- return identity;
- }
- if (typeof value == 'object') {
- return isArray(value)
- ? baseMatchesProperty(value[0], value[1])
- : baseMatches(value);
- }
- return property(value);
- }
- /**
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeys(object) {
- if (!isPrototype(object)) {
- return nativeKeys(object);
- }
- var result = [];
- for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * The base implementation of `_.map` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function baseMap(collection, iteratee) {
- var index = -1,
- result = isArrayLike(collection) ? Array(collection.length) : [];
- baseEach(collection, function(value, key, collection) {
- result[++index] = iteratee(value, key, collection);
- });
- return result;
- }
- /**
- * The base implementation of `_.matches` which doesn't clone `source`.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new spec function.
- */
- function baseMatches(source) {
- var matchData = getMatchData(source);
- if (matchData.length == 1 && matchData[0][2]) {
- return matchesStrictComparable(matchData[0][0], matchData[0][1]);
- }
- return function(object) {
- return object === source || baseIsMatch(object, source, matchData);
- };
- }
- /**
- * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
- *
- * @private
- * @param {string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new spec function.
- */
- function baseMatchesProperty(path, srcValue) {
- if (isKey(path) && isStrictComparable(srcValue)) {
- return matchesStrictComparable(toKey(path), srcValue);
- }
- return function(object) {
- var objValue = get(object, path);
- return (objValue === undefined && objValue === srcValue)
- ? hasIn(object, path)
- : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
- };
- }
- /**
- * The base implementation of `_.orderBy` without param guards.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {string[]} orders The sort orders of `iteratees`.
- * @returns {Array} Returns the new sorted array.
- */
- function baseOrderBy(collection, iteratees, orders) {
- var index = -1;
- iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
- var result = baseMap(collection, function(value, key, collection) {
- var criteria = arrayMap(iteratees, function(iteratee) {
- return iteratee(value);
- });
- return { 'criteria': criteria, 'index': ++index, 'value': value };
- });
- return baseSortBy(result, function(object, other) {
- return compareMultiple(object, other, orders);
- });
- }
- /**
- * A specialized version of `baseProperty` which supports deep paths.
- *
- * @private
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
- function basePropertyDeep(path) {
- return function(object) {
- return baseGet(object, path);
- };
- }
- /**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
- function baseToString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
- }
- /**
- * Casts `value` to a path array if it's not one.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {Array} Returns the cast property path array.
- */
- function castPath(value) {
- return isArray(value) ? value : stringToPath(value);
- }
- /**
- * Compares values to sort them in ascending order.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {number} Returns the sort order indicator for `value`.
- */
- function compareAscending(value, other) {
- if (value !== other) {
- var valIsDefined = value !== undefined,
- valIsNull = value === null,
- valIsReflexive = value === value,
- valIsSymbol = isSymbol(value);
- var othIsDefined = other !== undefined,
- othIsNull = other === null,
- othIsReflexive = other === other,
- othIsSymbol = isSymbol(other);
- if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
- (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
- (valIsNull && othIsDefined && othIsReflexive) ||
- (!valIsDefined && othIsReflexive) ||
- !valIsReflexive) {
- return 1;
- }
- if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
- (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
- (othIsNull && valIsDefined && valIsReflexive) ||
- (!othIsDefined && valIsReflexive) ||
- !othIsReflexive) {
- return -1;
- }
- }
- return 0;
- }
- /**
- * Used by `_.orderBy` to compare multiple properties of a value to another
- * and stable sort them.
- *
- * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
- * specify an order of "desc" for descending or "asc" for ascending sort order
- * of corresponding values.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {boolean[]|string[]} orders The order to sort by for each property.
- * @returns {number} Returns the sort order indicator for `object`.
- */
- function compareMultiple(object, other, orders) {
- var index = -1,
- objCriteria = object.criteria,
- othCriteria = other.criteria,
- length = objCriteria.length,
- ordersLength = orders.length;
- while (++index < length) {
- var result = compareAscending(objCriteria[index], othCriteria[index]);
- if (result) {
- if (index >= ordersLength) {
- return result;
- }
- var order = orders[index];
- return result * (order == 'desc' ? -1 : 1);
- }
- }
- // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
- // that causes it, under certain circumstances, to provide the same value for
- // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
- // for more details.
- //
- // This also ensures a stable sort in V8 and other engines.
- // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
- return object.index - other.index;
- }
- /**
- * Creates a `baseEach` or `baseEachRight` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseEach(eachFunc, fromRight) {
- return function(collection, iteratee) {
- if (collection == null) {
- return collection;
- }
- if (!isArrayLike(collection)) {
- return eachFunc(collection, iteratee);
- }
- var length = collection.length,
- index = fromRight ? length : -1,
- iterable = Object(collection);
- while ((fromRight ? index-- : ++index < length)) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
- return collection;
- };
- }
- /**
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1,
- iterable = Object(object),
- props = keysFunc(object),
- length = props.length;
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
- }
- /**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} stack Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
- function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
- arrLength = array.length,
- othLength = other.length;
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(array);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var index = -1,
- result = true,
- seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
- stack.set(array, other);
- stack.set(other, array);
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index];
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, arrValue, index, other, array, stack)
- : customizer(arrValue, othValue, index, array, other, stack);
- }
- if (compared !== undefined) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (seen) {
- if (!arraySome(other, function(othValue, othIndex) {
- if (!seen.has(othIndex) &&
- (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
- return seen.add(othIndex);
- }
- })) {
- result = false;
- break;
- }
- } else if (!(
- arrValue === othValue ||
- equalFunc(arrValue, othValue, customizer, bitmask, stack)
- )) {
- result = false;
- break;
- }
- }
- stack['delete'](array);
- stack['delete'](other);
- return result;
- }
- /**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
- switch (tag) {
- case dataViewTag:
- if ((object.byteLength != other.byteLength) ||
- (object.byteOffset != other.byteOffset)) {
- return false;
- }
- object = object.buffer;
- other = other.buffer;
- case arrayBufferTag:
- if ((object.byteLength != other.byteLength) ||
- !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
- return false;
- }
- return true;
- case boolTag:
- case dateTag:
- case numberTag:
- // Coerce booleans to `1` or `0` and dates to milliseconds.
- // Invalid dates are coerced to `NaN`.
- return eq(+object, +other);
- case errorTag:
- return object.name == other.name && object.message == other.message;
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings, primitives and objects,
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
- // for more details.
- return object == (other + '');
- case mapTag:
- var convert = mapToArray;
- case setTag:
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
- convert || (convert = setToArray);
- if (object.size != other.size && !isPartial) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked) {
- return stacked == other;
- }
- bitmask |= UNORDERED_COMPARE_FLAG;
- // Recursively compare objects (susceptible to call stack limits).
- stack.set(object, other);
- var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
- stack['delete'](object);
- return result;
- case symbolTag:
- if (symbolValueOf) {
- return symbolValueOf.call(object) == symbolValueOf.call(other);
- }
- }
- return false;
- }
- /**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
- objProps = keys(object),
- objLength = objProps.length,
- othProps = keys(other),
- othLength = othProps.length;
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var result = true;
- stack.set(object, other);
- stack.set(other, object);
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key];
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, objValue, key, other, object, stack)
- : customizer(objValue, othValue, key, object, other, stack);
- }
- // Recursively compare objects (susceptible to call stack limits).
- if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
- : compared
- )) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- result = false;
- }
- }
- stack['delete'](object);
- stack['delete'](other);
- return result;
- }
- /**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
- function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key)
- ? data[typeof key == 'string' ? 'string' : 'hash']
- : data.map;
- }
- /**
- * Gets the property names, values, and compare flags of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the match data of `object`.
- */
- function getMatchData(object) {
- var result = keys(object),
- length = result.length;
- while (length--) {
- var key = result[length],
- value = object[key];
- result[length] = [key, value, isStrictComparable(value)];
- }
- return result;
- }
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : undefined;
- }
- /**
- * Gets the `toStringTag` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- var getTag = baseGetTag;
- // Fallback for data views, maps, sets, and weak maps in IE 11,
- // for data views in Edge < 14, and promises in Node.js.
- if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
- (Map && getTag(new Map) != mapTag) ||
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
- (Set && getTag(new Set) != setTag) ||
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
- getTag = function(value) {
- var result = objectToString.call(value),
- Ctor = result == objectTag ? value.constructor : undefined,
- ctorString = Ctor ? toSource(Ctor) : undefined;
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString: return dataViewTag;
- case mapCtorString: return mapTag;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
- }
- }
- return result;
- };
- }
- /**
- * Checks if `path` exists on `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @param {Function} hasFunc The function to check properties.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- */
- function hasPath(object, path, hasFunc) {
- path = isKey(path, object) ? [path] : castPath(path);
- var result,
- index = -1,
- length = path.length;
- while (++index < length) {
- var key = toKey(path[index]);
- if (!(result = object != null && hasFunc(object, key))) {
- break;
- }
- object = object[key];
- }
- if (result) {
- return result;
- }
- var length = object ? object.length : 0;
- return !!length && isLength(length) && isIndex(key, length) &&
- (isArray(object) || isArguments(object));
- }
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- length = length == null ? MAX_SAFE_INTEGER : length;
- return !!length &&
- (typeof value == 'number' || reIsUint.test(value)) &&
- (value > -1 && value % 1 == 0 && value < length);
- }
- /**
- * Checks if `value` is a property name and not a property path.
- *
- * @private
- * @param {*} value The value to check.
- * @param {Object} [object] The object to query keys on.
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
- */
- function isKey(value, object) {
- if (isArray(value)) {
- return false;
- }
- var type = typeof value;
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
- value == null || isSymbol(value)) {
- return true;
- }
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
- (object != null && value in Object(object));
- }
- /**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
- function isKeyable(value) {
- var type = typeof value;
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
- ? (value !== '__proto__')
- : (value === null);
- }
- /**
- * Checks if `func` has its source masked.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
- */
- function isMasked(func) {
- return !!maskSrcKey && (maskSrcKey in func);
- }
- /**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
- function isPrototype(value) {
- var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
- return value === proto;
- }
- /**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
- function isStrictComparable(value) {
- return value === value && !isObject(value);
- }
- /**
- * A specialized version of `matchesProperty` for source values suitable
- * for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new spec function.
- */
- function matchesStrictComparable(key, srcValue) {
- return function(object) {
- if (object == null) {
- return false;
- }
- return object[key] === srcValue &&
- (srcValue !== undefined || (key in Object(object)));
- };
- }
- /**
- * Converts `string` to a property path array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the property path array.
- */
- var stringToPath = memoize(function(string) {
- string = toString(string);
- var result = [];
- if (reLeadingDot.test(string)) {
- result.push('');
- }
- string.replace(rePropName, function(match, number, quote, string) {
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
- });
- return result;
- });
- /**
- * Converts `value` to a string key if it's not a string or symbol.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {string|symbol} Returns the key.
- */
- function toKey(value) {
- if (typeof value == 'string' || isSymbol(value)) {
- return value;
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
- }
- /**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to process.
- * @returns {string} Returns the source code.
- */
- function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
- }
- return '';
- }
- /**
- * This method is like `_.sortBy` except that it allows specifying the sort
- * orders of the iteratees to sort by. If `orders` is unspecified, all values
- * are sorted in ascending order. Otherwise, specify an order of "desc" for
- * descending or "asc" for ascending sort order of corresponding values.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
- * The iteratees to sort by.
- * @param {string[]} [orders] The sort orders of `iteratees`.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 34 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 36 }
- * ];
- *
- * // Sort by `user` in ascending order and by `age` in descending order.
- * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
- */
- function orderBy(collection, iteratees, orders, guard) {
- if (collection == null) {
- return [];
- }
- if (!isArray(iteratees)) {
- iteratees = iteratees == null ? [] : [iteratees];
- }
- orders = guard ? undefined : orders;
- if (!isArray(orders)) {
- orders = orders == null ? [] : [orders];
- }
- return baseOrderBy(collection, iteratees, orders);
- }
- /**
- * Creates a function that memoizes the result of `func`. If `resolver` is
- * provided, it determines the cache key for storing the result based on the
- * arguments provided to the memoized function. By default, the first argument
- * provided to the memoized function is used as the map cache key. The `func`
- * is invoked with the `this` binding of the memoized function.
- *
- * **Note:** The cache is exposed as the `cache` property on the memoized
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
- * constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
- * method interface of `delete`, `get`, `has`, and `set`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to have its output memoized.
- * @param {Function} [resolver] The function to resolve the cache key.
- * @returns {Function} Returns the new memoized function.
- * @example
- *
- * var object = { 'a': 1, 'b': 2 };
- * var other = { 'c': 3, 'd': 4 };
- *
- * var values = _.memoize(_.values);
- * values(object);
- * // => [1, 2]
- *
- * values(other);
- * // => [3, 4]
- *
- * object.a = 2;
- * values(object);
- * // => [1, 2]
- *
- * // Modify the result cache.
- * values.cache.set(object, ['a', 'b']);
- * values(object);
- * // => ['a', 'b']
- *
- * // Replace `_.memoize.Cache`.
- * _.memoize.Cache = WeakMap;
- */
- function memoize(func, resolver) {
- if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var memoized = function() {
- var args = arguments,
- key = resolver ? resolver.apply(this, args) : args[0],
- cache = memoized.cache;
- if (cache.has(key)) {
- return cache.get(key);
- }
- var result = func.apply(this, args);
- memoized.cache = cache.set(key, result);
- return result;
- };
- memoized.cache = new (memoize.Cache || MapCache);
- return memoized;
- }
- // Assign cache to `_.memoize`.
- memoize.Cache = MapCache;
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
- /**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- function isArguments(value) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
- }
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
- /**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
- function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
- }
- /**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
- function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
- }
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
- }
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
- function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
- }
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
- }
- /**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
- /**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
- function toString(value) {
- return value == null ? '' : baseToString(value);
- }
- /**
- * Gets the value at `path` of `object`. If the resolved value is
- * `undefined`, the `defaultValue` is returned in its place.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.get(object, 'a[0].b.c');
- * // => 3
- *
- * _.get(object, ['a', '0', 'b', 'c']);
- * // => 3
- *
- * _.get(object, 'a.b.c', 'default');
- * // => 'default'
- */
- function get(object, path, defaultValue) {
- var result = object == null ? undefined : baseGet(object, path);
- return result === undefined ? defaultValue : result;
- }
- /**
- * Checks if `path` is a direct or inherited property of `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = _.create({ 'a': _.create({ 'b': 2 }) });
- *
- * _.hasIn(object, 'a');
- * // => true
- *
- * _.hasIn(object, 'a.b');
- * // => true
- *
- * _.hasIn(object, ['a', 'b']);
- * // => true
- *
- * _.hasIn(object, 'b');
- * // => false
- */
- function hasIn(object, path) {
- return object != null && hasPath(object, path, baseHasIn);
- }
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
- }
- /**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
- *
- * console.log(_.identity(object) === object);
- * // => true
- */
- function identity(value) {
- return value;
- }
- /**
- * Creates a function that returns the value at `path` of a given object.
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Util
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new accessor function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': 2 } },
- * { 'a': { 'b': 1 } }
- * ];
- *
- * _.map(objects, _.property('a.b'));
- * // => [2, 1]
- *
- * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
- * // => [1, 2]
- */
- function property(path) {
- return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
- }
- module.exports = orderBy;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d"), __webpack_require__("f586")(module)))
- /***/ }),
- /***/ "b1eb":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _VideoPlayer_vue_vue_type_template_id_4df6cab8___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c363");
- /* harmony import */ var _VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("14f6");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__["default"],
- _VideoPlayer_vue_vue_type_template_id_4df6cab8___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _VideoPlayer_vue_vue_type_template_id_4df6cab8___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "b397":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _TablePopup_vue_vue_type_template_id_1c51b447___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3e59");
- /* harmony import */ var _TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e4fa");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _TablePopup_vue_vue_type_template_id_1c51b447___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _TablePopup_vue_vue_type_template_id_1c51b447___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "b429":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
- /* globals __VUE_SSR_CONTEXT__ */
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
- // This module is a runtime utility for cleaner component module output and will
- // be included in the final webpack user bundle.
- function normalizeComponent (
- scriptExports,
- render,
- staticRenderFns,
- functionalTemplate,
- injectStyles,
- scopeId,
- moduleIdentifier, /* server only */
- shadowMode /* vue-cli only */
- ) {
- // Vue.extend constructor export interop
- var options = typeof scriptExports === 'function'
- ? scriptExports.options
- : scriptExports
- // render functions
- if (render) {
- options.render = render
- options.staticRenderFns = staticRenderFns
- options._compiled = true
- }
- // functional template
- if (functionalTemplate) {
- options.functional = true
- }
- // scopedId
- if (scopeId) {
- options._scopeId = 'data-v-' + scopeId
- }
- var hook
- if (moduleIdentifier) { // server build
- hook = function (context) {
- // 2.3 injection
- context =
- context || // cached call
- (this.$vnode && this.$vnode.ssrContext) || // stateful
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
- // 2.2 with runInNewContext: true
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
- context = __VUE_SSR_CONTEXT__
- }
- // inject component styles
- if (injectStyles) {
- injectStyles.call(this, context)
- }
- // register component module identifier for async chunk inferrence
- if (context && context._registeredComponents) {
- context._registeredComponents.add(moduleIdentifier)
- }
- }
- // used by ssr in case component is cached and beforeCreate
- // never gets called
- options._ssrRegister = hook
- } else if (injectStyles) {
- hook = shadowMode
- ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
- : injectStyles
- }
- if (hook) {
- if (options.functional) {
- // for template-only hot-reload because in that case the render fn doesn't
- // go through the normalizer
- options._injectStyles = hook
- // register for functioal component in vue file
- var originalRender = options.render
- options.render = function renderWithStyleInjection (h, context) {
- hook.call(context)
- return originalRender(h, context)
- }
- } else {
- // inject component registration as beforeCreate hook
- var existing = options.beforeCreate
- options.beforeCreate = existing
- ? [].concat(existing, hook)
- : [hook]
- }
- }
- return {
- exports: scriptExports,
- options: options
- }
- }
- /***/ }),
- /***/ "b556":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- // a transform stream is a readable/writable stream where you do
- // something with the data. Sometimes it's called a "filter",
- // but that's not a great name for it, since that implies a thing where
- // some bits pass through, and others are simply ignored. (That would
- // be a valid example of a transform, of course.)
- //
- // While the output is causally related to the input, it's not a
- // necessarily symmetric or synchronous transformation. For example,
- // a zlib stream might take multiple plain-text writes(), and then
- // emit a single compressed chunk some time in the future.
- //
- // Here's how this works:
- //
- // The Transform stream has all the aspects of the readable and writable
- // stream classes. When you write(chunk), that calls _write(chunk,cb)
- // internally, and returns false if there's a lot of pending writes
- // buffered up. When you call read(), that calls _read(n) until
- // there's enough pending readable data buffered up.
- //
- // In a transform stream, the written data is placed in a buffer. When
- // _read(n) is called, it transforms the queued up data, calling the
- // buffered _write cb's as it consumes chunks. If consuming a single
- // written chunk would result in multiple output chunks, then the first
- // outputted bit calls the readcb, and subsequent chunks just go into
- // the read buffer, and will cause it to emit 'readable' if necessary.
- //
- // This way, back-pressure is actually determined by the reading side,
- // since _read has to be called to start processing a new chunk. However,
- // a pathological inflate type of transform can cause excessive buffering
- // here. For example, imagine a stream where every byte of input is
- // interpreted as an integer from 0-255, and then results in that many
- // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
- // 1kb of data being output. In this case, you could write a very small
- // amount of input, and end up with a very large amount of output. In
- // such a pathological inflating mechanism, there'd be no way to tell
- // the system to stop doing the transform. A single 4MB write could
- // cause the system to run out of memory.
- //
- // However, even in such a pathological case, only a single written chunk
- // would be consumed, and then the rest would wait (un-transformed) until
- // the results of the previous transformed chunk were consumed.
- module.exports = Transform;
- var Duplex = __webpack_require__("d711");
- /*<replacement>*/
- var util = __webpack_require__("9107");
- util.inherits = __webpack_require__("fe04");
- /*</replacement>*/
- util.inherits(Transform, Duplex);
- function afterTransform(er, data) {
- var ts = this._transformState;
- ts.transforming = false;
- var cb = ts.writecb;
- if (!cb) {
- return this.emit('error', new Error('write callback called multiple times'));
- }
- ts.writechunk = null;
- ts.writecb = null;
- if (data != null) // single equals check for both `null` and `undefined`
- this.push(data);
- cb(er);
- var rs = this._readableState;
- rs.reading = false;
- if (rs.needReadable || rs.length < rs.highWaterMark) {
- this._read(rs.highWaterMark);
- }
- }
- function Transform(options) {
- if (!(this instanceof Transform)) return new Transform(options);
- Duplex.call(this, options);
- this._transformState = {
- afterTransform: afterTransform.bind(this),
- needTransform: false,
- transforming: false,
- writecb: null,
- writechunk: null,
- writeencoding: null
- };
- // start out asking for a readable event once data is transformed.
- this._readableState.needReadable = true;
- // we have implemented the _read method, and done the other things
- // that Readable wants before the first _read call, so unset the
- // sync guard flag.
- this._readableState.sync = false;
- if (options) {
- if (typeof options.transform === 'function') this._transform = options.transform;
- if (typeof options.flush === 'function') this._flush = options.flush;
- }
- // When the writable side finishes, then flush out anything remaining.
- this.on('prefinish', prefinish);
- }
- function prefinish() {
- var _this = this;
- if (typeof this._flush === 'function') {
- this._flush(function (er, data) {
- done(_this, er, data);
- });
- } else {
- done(this, null, null);
- }
- }
- Transform.prototype.push = function (chunk, encoding) {
- this._transformState.needTransform = false;
- return Duplex.prototype.push.call(this, chunk, encoding);
- };
- // This is the part where you do stuff!
- // override this function in implementation classes.
- // 'chunk' is an input chunk.
- //
- // Call `push(newChunk)` to pass along transformed output
- // to the readable side. You may call 'push' zero or more times.
- //
- // Call `cb(err)` when you are done with this chunk. If you pass
- // an error, then that'll put the hurt on the whole operation. If you
- // never call cb(), then you'll never get another chunk.
- Transform.prototype._transform = function (chunk, encoding, cb) {
- throw new Error('_transform() is not implemented');
- };
- Transform.prototype._write = function (chunk, encoding, cb) {
- var ts = this._transformState;
- ts.writecb = cb;
- ts.writechunk = chunk;
- ts.writeencoding = encoding;
- if (!ts.transforming) {
- var rs = this._readableState;
- if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
- }
- };
- // Doesn't matter what the args are here.
- // _transform does all the work.
- // That we got here means that the readable side wants more data.
- Transform.prototype._read = function (n) {
- var ts = this._transformState;
- if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
- ts.transforming = true;
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
- } else {
- // mark that we need a transform, so that any data that comes in
- // will get processed, now that we've asked for it.
- ts.needTransform = true;
- }
- };
- Transform.prototype._destroy = function (err, cb) {
- var _this2 = this;
- Duplex.prototype._destroy.call(this, err, function (err2) {
- cb(err2);
- _this2.emit('close');
- });
- };
- function done(stream, er, data) {
- if (er) return stream.emit('error', er);
- if (data != null) // single equals check for both `null` and `undefined`
- stream.push(data);
- // if there's nothing in the write buffer, then that means
- // that nothing more will ever be provided
- if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
- if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
- return stream.push(null);
- }
- /***/ }),
- /***/ "b557":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAADXRJREFUeAHt3DFulAcYRVEcsRiW4X2wAAqUiobCVHFBQ4UosgD24WWwGyIKSxTDs681lsb5T5pE8z5PPMdIXM0Irj5/v/v56sL/+fj2+urCv0XfHgECBAgQeHaBl/B79l/PruB/QIAAAQIECBxG4Oq+frwrcJifuRdKgAABAgTOLnDfE96xODutJyRAgAABAscVEBbH/dl75QQIECBA4OwCwuLspJ6QAAECBAgcV0BYHPdn75UTIECAAIGzCwiLs5N6QgIECBAgcFyB1w+99C9v3l/833Px0GuwEyBAgAABAucR+PDj2/y7pR4Mi1/fxkNPcp5v1bMQIECAAAEClyzwmDcbfBRyyT9B3xsBAgQIEHhhAo96x+L+Nf19+6+PRe4x/JsAAQIECBxE4OvNu/nxx+8MKSx+feHdzT/Xvz+B/yZAgAABAgT+vwLXt5/uyqvzUUjRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBR4PdcT4/Xtp7sTD3uIAAECBAgQIPAqhcXXm3dXzAgQIECAAAECfxLwUcifZDxOgAABAgQIZIFHvWPx5c37n/mZfQEBAgQIECBwOIEHw+LDj28+/jjcLwsvmAABAgQIPE3ARyFPc/NVBAgQIECAwAkBYXECxUMECBAgQIDA0wSExdPcfBUBAgQIECBwQkBYnEDxEAECBAgQIPA0AWHxNDdfRYAAAQIECJwQuPr8/e7i/yjpx7fX/mTKiR+ehwgQIEDgWAIv4fds71gc69ekV0uAAAECBJ5V4D9D2y5GdTuSHwAAAABJRU5ErkJggg=="
- /***/ }),
- /***/ "b6b0":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _leafletWrapper = _interopRequireDefault(__webpack_require__("6f27"));
- /**
- * @class PopupViewModel
- * @description popup viewModel.
- * @extends leaflet.Evented
- */
- var PopupViewModel =
- /*#__PURE__*/
- function (_L$Evented) {
- (0, _inherits2.default)(PopupViewModel, _L$Evented);
- function PopupViewModel(map, options) {
- var _this;
- (0, _classCallCheck2.default)(this, PopupViewModel);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(PopupViewModel).call(this));
- _this.map = map;
- _this.mapObject = null;
- _this.options = options.options || {};
- _this.latLng = options.latLng;
- _this.content = options.content;
- _this.createPopup();
- return _this;
- }
- /**
- * @function PopupViewModel.prototype.createPopup
- * @desc 创建popup
- */
- (0, _createClass2.default)(PopupViewModel, [{
- key: "createPopup",
- value: function createPopup() {
- this.mapObject = _leafletWrapper.default.popup(this.options);
- this.setLatLng();
- this.setContent();
- }
- /**
- * @function PopupViewModel.prototype.setContent
- * @desc 设置popup内容
- * @param {Array} content - 内容。
- */
- }, {
- key: "setContent",
- value: function setContent() {
- var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.content;
- if (this.mapObject && content) {
- this.mapObject.setContent(content);
- }
- }
- /**
- * @function PopupViewModel.prototype.setLatLng
- * @desc 设置latlng
- * @param {Array} latLng - 坐标
- */
- }, {
- key: "setLatLng",
- value: function setLatLng() {
- var latLng = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.latLng;
- if (this.mapObject && latLng) {
- this.mapObject.setLatLng(latLng);
- }
- }
- /**
- * @function PopupViewModel.prototype.getPopup
- * @desc 获取popup
- */
- }, {
- key: "getPopup",
- value: function getPopup() {
- return this.mapObject;
- }
- /**
- * @function PopupViewModel.prototype.openOnMap
- * @desc openOn MAP
- */
- }, {
- key: "openOnMap",
- value: function openOnMap() {
- this.mapObject.openOn(this.map);
- }
- /**
- * @function PopupViewModel.prototype.openOnMap
- * @desc openOn MAP
- */
- }, {
- key: "isMap",
- value: function isMap(mapObject) {
- return mapObject instanceof _leafletWrapper.default.Map;
- }
- }]);
- return PopupViewModel;
- }(_leafletWrapper.default.Evented);
- exports.default = PopupViewModel;
- /***/ }),
- /***/ "b757":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- var _default = {
- name: 'SmCard',
- mixins: [_theme.default],
- props: {
- iconPosition: {
- type: String,
- default: 'top-left'
- },
- iconClass: {
- type: String
- },
- autoRotate: {
- type: Boolean,
- default: false
- },
- headerName: {
- type: String
- },
- collapsed: {
- type: Boolean,
- default: false
- }
- },
- data: function data() {
- return {
- isShow: true,
- transform: null
- };
- },
- computed: {
- getCardStyle: function getCardStyle() {
- var style = {
- background: 'transparent'
- };
- return !this.iconClass && !this.headerName ? style : this.getBackgroundStyle;
- },
- iconStyleObject: function iconStyleObject() {
- return {
- '--icon-color--hover': this.colorGroupsData[0]
- };
- },
- iconStyle: function iconStyle() {
- return {
- transform: this.transform
- };
- },
- position: function position() {
- return this.iconPosition;
- },
- rotateDeg: function rotateDeg() {
- return {
- 'top-right': ['rotate(-45deg)', 'rotate(135deg)'],
- 'top-left': ['rotate(-135deg)', 'rotate(45deg)'],
- 'bottom-left': ['rotate(135deg)', 'rotate(-45deg)'],
- 'bottom-right': ['rotate(45deg)', 'rotate(-135deg)']
- };
- },
- hasHeaderRotateDeg: function hasHeaderRotateDeg() {
- return {
- 'top-right': ['rotate(-45deg)', 'rotate(135deg)'],
- 'top-left': ['rotate(-135deg)', 'rotate(45deg)'],
- 'bottom-left': ['rotate(-135deg)', 'rotate(45deg)'],
- 'bottom-right': ['rotate(-45deg)', 'rotate(135deg)']
- };
- }
- },
- watch: {
- iconClass: function iconClass(newVal, oldVal) {
- if (newVal && !oldVal) {
- this.isShow = !this.collapsed;
- this.toggleTransition(this.collapsed ? 'leave' : 'enter');
- } else if (!newVal) {
- // 如果iconClass 为空 则默认显示内容
- this.isShow = true;
- }
- },
- iconPosition: function iconPosition() {
- this.resetIconTransform();
- }
- },
- created: function created() {
- this.iconClass && (this.isShow = !this.collapsed);
- this.resetIconTransform();
- },
- mounted: function mounted() {
- this.toggleTransition(this.collapsed ? 'leave' : 'enter');
- },
- methods: {
- iconClicked: function iconClicked() {
- this.isShow = !this.isShow;
- this.resetIconTransform();
- this.$emit('content-show-state', this.isShow);
- },
- toggleTransition: function toggleTransition(type) {
- var _this = this;
- this.$nextTick(function () {
- var iconDom = _this.$el.querySelector('.sm-component-card__icon');
- if (iconDom) {
- iconDom.style.position = type === 'leave' ? 'relative' : 'absolute';
- }
- });
- },
- resetIconTransform: function resetIconTransform() {
- var rotateDeg = this.headerName ? this.hasHeaderRotateDeg : this.rotateDeg;
- this.autoRotate && (this.transform = rotateDeg[this.position][this.isShow ? 1 : 0]);
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "b7bd":
- /***/ (function(module) {
- module.exports = JSON.parse("[{\"name\":\"克拉玛依市\",\"coord\":[85.01486759299489,45.406422237230046]},{\"name\":\"昌吉回族自治州\",\"coord\":[88.7154624754753,44.26991024636568]},{\"name\":\"石河子市\",\"coord\":[86.0208600035924,44.239045558096805]},{\"name\":\"霍林郭勒市\",\"coord\":[114.73479243733115,44.16058374713977]},{\"name\":\"本溪市\",\"coord\":[124.64357865201586,41.177197783134275]},{\"name\":\"嘉峪关市\",\"coord\":[98.16891560537093,39.76279786284264]},{\"name\":\"莱芜市\",\"coord\":[117.65723565456207,36.27916499211527]},{\"name\":\"神农架林区\",\"coord\":[110.48296222218153,31.581260143666697]},{\"name\":\"天门市\",\"coord\":[113.00615321481195,30.64105781887143]},{\"name\":\"鄂州市\",\"coord\":[114.94764081970385,30.325634953844585]},{\"name\":\"潜江市\",\"coord\":[112.70703817700621,30.349210666019893]},{\"name\":\"仙桃市\",\"coord\":[113.34688900729822,30.315951161935402]},{\"name\":\"萍乡市\",\"coord\":[113.88072263074415,27.47193090553213]},{\"name\":\"台湾省\",\"coord\":[120.14338943402045,23.596002465926095]},{\"name\":\"东莞市\",\"coord\":[113.89443658529342,22.897826158636448]},{\"name\":\"中山市\",\"coord\":[113.37118387764659,22.501478858616522]},{\"name\":\"珠海市\",\"coord\":[113.21799258934986,22.23782602992192]},{\"name\":\"北海市\",\"coord\":[109.18248083043899,21.695773689750148]},{\"name\":\"香港\",\"coord\":[114.20689279508653,22.36016760139811]},{\"name\":\"舟山市\",\"coord\":[122.22514712841459,30.338633120695956]},{\"name\":\"克孜勒苏柯尔克孜\",\"coord\":[74.62910472637343,39.59886016069875]},{\"name\":\"喀什地区\",\"coord\":[77.19899922143753,37.85462871211595]},{\"name\":\"阿克苏地区\",\"coord\":[81.43930290016381,41.067304799230456]},{\"name\":\"和田地区\",\"coord\":[80.69780509160952,36.95287032287055]},{\"name\":\"阿里地区\",\"coord\":[82.536487505389,32.69566569631762]},{\"name\":\"日喀则地区\",\"coord\":[86.5996831353606,29.54861754814263]},{\"name\":\"那曲地区\",\"coord\":[88.32523292667608,33.20600450932715]},{\"name\":\"玉树藏族自治州\",\"coord\":[95.2107128446203,33.90320387919257]},{\"name\":\"迪庆藏族自治州\",\"coord\":[99.42465312188943,28.052797714348895]},{\"name\":\"怒江傈傈族自治州\",\"coord\":[98.85737910439825,26.98345757528851]},{\"name\":\"大理白族自治州\",\"coord\":[99.93934374816013,25.684737357453045]},{\"name\":\"德宏傣族景颇族自\",\"coord\":[98.13830877778075,24.593421919561205]},{\"name\":\"保山市\",\"coord\":[99.19031013453166,24.979380341662]},{\"name\":\"临沧市\",\"coord\":[99.62483778975081,24.058807858948214]},{\"name\":\"普洱市\",\"coord\":[100.94440267992684,23.44121660743221]},{\"name\":\"西双版纳傣族自治\",\"coord\":[100.86105801845994,21.882475641324206]},{\"name\":\"拉萨市\",\"coord\":[91.3684790613129,30.14176592960237]},{\"name\":\"山南地区\",\"coord\":[92.11665242621062,28.33000201578789]},{\"name\":\"林芝地区\",\"coord\":[94.9307847458166,29.125110156601963]},{\"name\":\"昌都地区\",\"coord\":[97.33912235873476,30.48520825551814]},{\"name\":\"丽江市\",\"coord\":[100.65713436205135,26.96190318191959]},{\"name\":\"攀枝花市\",\"coord\":[101.73355913301131,26.714486678752795]},{\"name\":\"凉山彝族自治州\",\"coord\":[102.08678551422615,27.683020519860396]},{\"name\":\"楚雄彝族自治州\",\"coord\":[101.68264761198458,25.369603845264024]},{\"name\":\"红河哈尼族彝族自\",\"coord\":[102.95101719613119,23.624860095239875]},{\"name\":\"文山壮族苗族自治\",\"coord\":[104.8708359910614,23.579587266862504]},{\"name\":\"百色市\",\"coord\":[106.69546907589859,23.98220841166522]},{\"name\":\"崇左市\",\"coord\":[107.3277087317123,22.49769755349952]},{\"name\":\"防城港市\",\"coord\":[107.88939931155171,21.94550204069006]},{\"name\":\"南宁市\",\"coord\":[108.67078983716917,23.12207641861882]},{\"name\":\"钦州市\",\"coord\":[108.8532307305186,22.157690108421384]},{\"name\":\"玉林市\",\"coord\":[110.26918466489103,22.391823643610415]},{\"name\":\"湛江市\",\"coord\":[109.93033457863683,21.086751055633457]},{\"name\":\"茂名市\",\"coord\":[110.80336192333934,22.069184739040775]},{\"name\":\"阳江市\",\"coord\":[111.70471342186183,22.108751366417575]},{\"name\":\"江门市\",\"coord\":[112.53715618649149,22.297368082806777]},{\"name\":\"广州市\",\"coord\":[113.4949302208309,23.28359314707863]},{\"name\":\"清远市\",\"coord\":[113.10957368131268,24.334444053233856]},{\"name\":\"肇庆市\",\"coord\":[112.11117530204233,23.60241158796112]},{\"name\":\"梧州市\",\"coord\":[111.01709510772797,23.518132876753846]},{\"name\":\"贺州市\",\"coord\":[111.50423061842756,24.4095096817199]},{\"name\":\"桂林市\",\"coord\":[110.44046163393094,25.353966673735407]},{\"name\":\"柳州市\",\"coord\":[109.34854449214147,24.972408051485047]},{\"name\":\"河池市\",\"coord\":[107.81191841865586,24.649291651298164]},{\"name\":\"黔东南苗族侗族自\",\"coord\":[108.39952601614591,26.429286420465576]},{\"name\":\"贵阳市\",\"coord\":[106.59784062851153,26.797907456479816]},{\"name\":\"安顺市\",\"coord\":[105.76161265300635,25.988644902171018]},{\"name\":\"黔西南布依族苗族\",\"coord\":[105.5954078788574,25.404850939549405]},{\"name\":\"曲靖市\",\"coord\":[103.9164335632742,25.697243690315265]},{\"name\":\"六盘水市\",\"coord\":[104.77723228072432,26.15402255629164]},{\"name\":\"毕节地区\",\"coord\":[105.03867422931839,27.077913968069666]},{\"name\":\"昭通市\",\"coord\":[104.29730513046874,27.62418247971078]},{\"name\":\"宜宾市\",\"coord\":[104.76748901448207,28.553501804266475]},{\"name\":\"乐山市\",\"coord\":[103.56027669102787,29.160754519210577]},{\"name\":\"自贡市\",\"coord\":[104.63272827056402,29.273152614922402]},{\"name\":\"内江市\",\"coord\":[104.82644562304716,29.61272653799929]},{\"name\":\"遵义市\",\"coord\":[106.82413636302059,28.191847588570702]},{\"name\":\"达州市\",\"coord\":[107.59704170009518,31.32138258839703]},{\"name\":\"遂宁市\",\"coord\":[105.48979445433736,30.677687821242678]},{\"name\":\"广安市\",\"coord\":[106.56708164098042,30.43500706741521]},{\"name\":\"泸州市\",\"coord\":[105.42591761727707,28.50277238478137]},{\"name\":\"资阳市\",\"coord\":[104.97995126874034,30.154251886139654]},{\"name\":\"雅安市\",\"coord\":[102.69931299964517,29.892630706195035]},{\"name\":\"眉山市\",\"coord\":[104.07052881858888,29.894202166560405]},{\"name\":\"甘孜藏族自治州\",\"coord\":[100.50721042614238,30.975216556269658]},{\"name\":\"果洛藏族自治州\",\"coord\":[99.30775565051923,34.03539865224808]},{\"name\":\"海南藏族自治州\",\"coord\":[100.39969108016373,35.90048272566899]},{\"name\":\"黄南藏族自治州\",\"coord\":[101.5360706381689,35.10286360841902]},{\"name\":\"赣南藏族自治州\",\"coord\":[102.97083885806067,34.326752803339026]},{\"name\":\"陇南市\",\"coord\":[105.24780098912132,33.57031117443431]},{\"name\":\"天水市\",\"coord\":[105.53503634660417,34.62320421368087]},{\"name\":\"定西市\",\"coord\":[104.58787768541339,35.08900966621695]},{\"name\":\"临夏回族自治州\",\"coord\":[103.2612870434902,35.591577124455235]},{\"name\":\"西宁市\",\"coord\":[101.57680657999033,36.84800271717157]},{\"name\":\"海东地区\",\"coord\":[102.30909850729282,36.287400615025646]},{\"name\":\"海北藏族自治州\",\"coord\":[100.27122484450717,37.892557516083826]},{\"name\":\"金昌市\",\"coord\":[102.02244049169511,38.497330414886164]},{\"name\":\"酒泉市\",\"coord\":[95.94486678270127,40.56891536586272]},{\"name\":\"海西蒙古族藏族自\",\"coord\":[94.67143298050689,36.022725148503724]},{\"name\":\"巴音郭楞蒙古自治\",\"coord\":[88.18116214759745,39.556478810319916]},{\"name\":\"哈密地区\",\"coord\":[93.84302392518026,42.95015211178875]},{\"name\":\"叶鲁番地区\",\"coord\":[89.82035217277885,42.399368632283505]},{\"name\":\"乌鲁木齐市\",\"coord\":[88.00048109561487,43.549986370786]},{\"name\":\"阿勒泰地区\",\"coord\":[88.11213933257655,47.05593413019629]},{\"name\":\"博尔塔拉蒙古自治\",\"coord\":[82.26402238163408,44.671135542630864]},{\"name\":\"伊犁哈萨克自治州\",\"coord\":[82.80778717477179,43.53783381365267]},{\"name\":\"阿拉善盟\",\"coord\":[103.29923966842289,40.10955801781495]},{\"name\":\"武威市\",\"coord\":[102.73362058791429,37.94211141321436]},{\"name\":\"兰州市\",\"coord\":[103.73793563506032,36.27379827886003]},{\"name\":\"中卫市\",\"coord\":[105.6943786030716,37.20654236148948]},{\"name\":\"银川市\",\"coord\":[106.20022174140034,38.52103167597483]},{\"name\":\"石嘴山市\",\"coord\":[106.41544011793628,38.84054137571417]},{\"name\":\"乌海市\",\"coord\":[106.8984175998405,39.54616572239788]},{\"name\":\"鄂尔多斯市\",\"coord\":[108.43285571424619,39.24036799350715]},{\"name\":\"巴彦淖尔市\",\"coord\":[107.45840392808307,41.30159860424196]},{\"name\":\"包头市\",\"coord\":[110.46472193224272,41.48017783644221]},{\"name\":\"呼和浩特市\",\"coord\":[111.48365173603975,40.498363056149884]},{\"name\":\"乌兰察布市\",\"coord\":[112.61568977597707,41.75789561273154]},{\"name\":\"大同市\",\"coord\":[113.7107192749083,39.898956799744184]},{\"name\":\"朔州市\",\"coord\":[112.65428748167508,39.681772914701924]},{\"name\":\"忻州市\",\"coord\":[112.36127575589583,38.88990233614568]},{\"name\":\"榆林市\",\"coord\":[109.68473112169593,38.19921027134876]},{\"name\":\"延安市\",\"coord\":[109.52425222161318,36.406522726136814]},{\"name\":\"庆阳市\",\"coord\":[107.73052193155061,36.183821532624464]},{\"name\":\"固原市\",\"coord\":[106.20191575442442,36.11634909496382]},{\"name\":\"白银市\",\"coord\":[104.68634478137065,36.51582865625868]},{\"name\":\"宝鸡市\",\"coord\":[107.33534779230747,34.3387216485855]},{\"name\":\"汉中市\",\"coord\":[107.03534754266246,33.00142998064871]},{\"name\":\"广元市\",\"coord\":[105.92928137563939,32.21872447205537]},{\"name\":\"巴中市\",\"coord\":[107.03422410306194,31.99874720836291]},{\"name\":\"南充市\",\"coord\":[106.32964805032347,31.156657700184095]},{\"name\":\"绵阳市\",\"coord\":[104.58949560201106,31.88628780630976]},{\"name\":\"德阳市\",\"coord\":[104.41542984932845,31.110558133718676]},{\"name\":\"成都市\",\"coord\":[103.8852290010473,30.777258040348634]},{\"name\":\"阿坝藏族羌族自治\",\"coord\":[102.26209319552814,32.45725845387284]},{\"name\":\"安康市\",\"coord\":[109.14236501848015,32.77467694678074]},{\"name\":\"十堰市\",\"coord\":[110.39934083416314,32.376209039347906]},{\"name\":\"襄阳市\",\"coord\":[111.97539147094662,31.93399822417465]},{\"name\":\"宜昌市\",\"coord\":[111.22204852395754,30.772457669035354]},{\"name\":\"恩施市\",\"coord\":[109.42158366502872,30.260366574390105]},{\"name\":\"张家界市\",\"coord\":[110.59760006538717,29.330107409240718]},{\"name\":\"吉首市\",\"coord\":[109.72176899848378,28.681903937242495]},{\"name\":\"铜仁地区\",\"coord\":[108.54247523485463,28.11736237519646]},{\"name\":\"重庆市\",\"coord\":[107.86007108564992,30.186253395053196]},{\"name\":\"怀化市\",\"coord\":[109.94325166787243,27.43919084801186]},{\"name\":\"益阳市\",\"coord\":[112.43060358108062,28.75127294553697]},{\"name\":\"娄底市\",\"coord\":[111.41891416951897,27.696312460064604]},{\"name\":\"常德市\",\"coord\":[111.72571610131646,29.27189463838195]},{\"name\":\"荆州市\",\"coord\":[112.65896596965268,30.05161542755362]},{\"name\":\"荆门市\",\"coord\":[112.6586855902184,31.01267124474617]},{\"name\":\"岳阳市\",\"coord\":[113.2595036144316,29.106247116930163]},{\"name\":\"长沙市\",\"coord\":[113.15415586456598,28.222934680488425]},{\"name\":\"湘潭市\",\"coord\":[112.51092596317824,27.69881544105668]},{\"name\":\"株州市\",\"coord\":[113.49665538546823,27.03993794610501]},{\"name\":\"衡阳市\",\"coord\":[112.48849636578527,26.783613569970782]},{\"name\":\"邵阳市\",\"coord\":[110.6723832117475,26.81652287086792]},{\"name\":\"永州市\",\"coord\":[111.8565364154186,25.768488267811968]},{\"name\":\"韶关市\",\"coord\":[113.53420325850979,24.69848878771937]},{\"name\":\"惠州市\",\"coord\":[114.32029589634925,23.25504544231892]},{\"name\":\"佛山市\",\"coord\":[112.95925897403649,23.10116677189257]},{\"name\":\"云浮市\",\"coord\":[111.78042514904234,22.840400494105687]},{\"name\":\"深圳市\",\"coord\":[114.13138648919008,22.649563063468342]},{\"name\":\"汕尾市\",\"coord\":[115.57412892884373,23.06989642104901]},{\"name\":\"河源市\",\"coord\":[114.89746229844398,23.97971937124767]},{\"name\":\"揭阳市\",\"coord\":[116.04290004239446,23.304802704715357]},{\"name\":\"汕头市\",\"coord\":[116.7008461897183,23.35898625947344]},{\"name\":\"潮州市\",\"coord\":[116.75405548481658,23.854381508863064]},{\"name\":\"梅州市\",\"coord\":[116.13719397345734,24.15633544812716]},{\"name\":\"漳州市\",\"coord\":[117.38279760543345,24.41111215459575]},{\"name\":\"厦门市\",\"coord\":[118.04275971554665,24.675908246507944]},{\"name\":\"龙岩市\",\"coord\":[116.69341144552507,25.20284542644492]},{\"name\":\"泉州市\",\"coord\":[118.12035864630246,25.22984144365049]},{\"name\":\"莆田市\",\"coord\":[118.82439690138142,25.439653480972687]},{\"name\":\"福州市\",\"coord\":[119.1608285845262,25.99117532466728]},{\"name\":\"三明市\",\"coord\":[117.51188176216434,26.318292906961602]},{\"name\":\"南平市\",\"coord\":[118.16153136678187,27.306303151805437]},{\"name\":\"抚州市\",\"coord\":[116.3455359885574,27.487043655935366]},{\"name\":\"鹰潭市\",\"coord\":[117.01082360702333,28.241253742969946]},{\"name\":\"吉安市\",\"coord\":[114.91377151807418,26.957486660664525]},{\"name\":\"赣州市\",\"coord\":[115.046455717572,25.81565075681663]},{\"name\":\"郴州市\",\"coord\":[113.1544526703492,25.871927095452524]},{\"name\":\"新余市\",\"coord\":[114.94161795877827,27.79044654578371]},{\"name\":\"宜春市\",\"coord\":[115.04574494880995,28.306428044943356]},{\"name\":\"南昌市\",\"coord\":[115.9963824234495,28.664803351584705]},{\"name\":\"九江市\",\"coord\":[115.53225905704193,29.362905920276297]},{\"name\":\"上饶市\",\"coord\":[117.8595355766598,28.765755150094634]},{\"name\":\"景德镇市\",\"coord\":[117.25387030721845,29.33426823662448]},{\"name\":\"黄山市\",\"coord\":[117.85476357809696,29.969632034273722]},{\"name\":\"池州市\",\"coord\":[117.34517113140791,30.208089337922335]},{\"name\":\"铜陵市\",\"coord\":[117.93160431300694,30.926442655001676]},{\"name\":\"安庆市\",\"coord\":[116.54307680610799,30.524265461641296]},{\"name\":\"黄石市\",\"coord\":[115.02354597728443,29.924060229331015]},{\"name\":\"咸宁市\",\"coord\":[114.26967602231792,29.652174021136048]},{\"name\":\"黄冈市\",\"coord\":[115.2859016705373,30.65856897065683]},{\"name\":\"武汉市\",\"coord\":[114.34552076948799,30.68836237966767]},{\"name\":\"随州市\",\"coord\":[113.3850627838818,31.87891659924412]},{\"name\":\"信阳市\",\"coord\":[114.81374730587638,32.0309685135914]},{\"name\":\"驻马店市\",\"coord\":[114.07756451509235,32.896720987266114]},{\"name\":\"商洛市\",\"coord\":[109.82044421310393,33.77403373563189]},{\"name\":\"西安市\",\"coord\":[109.11839808451401,34.225257215515896]},{\"name\":\"渭南市\",\"coord\":[109.75732444226935,35.025913644359306]},{\"name\":\"铜川市\",\"coord\":[108.98695328111377,35.19235092947735]},{\"name\":\"咸阳市\",\"coord\":[108.36398776446165,34.84311348287181]},{\"name\":\"三门峡市\",\"coord\":[110.80049688104964,34.31818709571671]},{\"name\":\"运城市\",\"coord\":[111.1736679525165,35.19010372283576]},{\"name\":\"洛阳市\",\"coord\":[111.87577573098216,34.33379926109848]},{\"name\":\"平顶山市\",\"coord\":[112.80931281928427,33.759895800153096]},{\"name\":\"漯河市\",\"coord\":[113.83505724178012,33.70034266174508]},{\"name\":\"许昌市\",\"coord\":[113.78762484088509,34.051835688452435]},{\"name\":\"郑州市\",\"coord\":[113.49619951867594,34.61181797865449]},{\"name\":\"焦作市\",\"coord\":[113.13404280173008,35.134167097471625]},{\"name\":\"晋城市\",\"coord\":[112.7495732073233,35.63186423091449]},{\"name\":\"长治市\",\"coord\":[112.85900842873183,36.45872910742828]},{\"name\":\"临汾市\",\"coord\":[111.49379787924448,36.22810800777857]},{\"name\":\"太原市\",\"coord\":[112.15628804033796,37.91704444063036]},{\"name\":\"吕梁市\",\"coord\":[111.31901105774872,37.712740463356496]},{\"name\":\"晋中市\",\"coord\":[113.08199599739676,37.36532613794343]},{\"name\":\"邯郸市\",\"coord\":[114.41824047234618,36.530119932543315]},{\"name\":\"安阳市\",\"coord\":[113.88883283163116,35.7797611183252]},{\"name\":\"鹤壁市\",\"coord\":[114.3654094911545,35.75770487428472]},{\"name\":\"新乡市\",\"coord\":[113.9184107718167,35.348471214026716]},{\"name\":\"开封市\",\"coord\":[114.52801677500626,34.61371216679872]},{\"name\":\"周口市\",\"coord\":[114.88509782391864,33.69999759722657]},{\"name\":\"阜阳市\",\"coord\":[115.44595951398213,32.98060371610532]},{\"name\":\"淮南市\",\"coord\":[116.68941991880993,32.79972275772595]},{\"name\":\"蚌埠市\",\"coord\":[117.38594715783302,33.106729536033896]},{\"name\":\"淮北市\",\"coord\":[116.69651711889378,33.69527529383458]},{\"name\":\"宿州市\",\"coord\":[117.30175405886838,33.943330421260015]},{\"name\":\"亳州市\",\"coord\":[116.12410804185097,33.46769392946132]},{\"name\":\"商丘市\",\"coord\":[115.59575176872548,34.28339840831147]},{\"name\":\"菏泽市\",\"coord\":[115.53631974831816,35.197319393220624]},{\"name\":\"濮阳市\",\"coord\":[115.3070485514902,35.775883510964334]},{\"name\":\"聊城市\",\"coord\":[115.8870069012884,36.40529594548765]},{\"name\":\"邢台市\",\"coord\":[114.74259008644859,37.251396750084155]},{\"name\":\"石家庄市\",\"coord\":[114.56923838363613,38.13141710980106]},{\"name\":\"阳泉市\",\"coord\":[113.39216149668508,38.09075470547468]},{\"name\":\"保定市\",\"coord\":[115.261524468934,39.09118520781398]},{\"name\":\"衡水市\",\"coord\":[115.8182936677897,37.715661598187154]},{\"name\":\"德州市\",\"coord\":[116.4582273790399,37.19372347888644]},{\"name\":\"沧州市\",\"coord\":[116.76192710911863,38.20240042039232]},{\"name\":\"廊坊市\",\"coord\":[116.50410772133856,39.27896741763884]},{\"name\":\"天津市\",\"coord\":[117.31988934444873,39.37154482470619]},{\"name\":\"北京市\",\"coord\":[116.59734730757869,40.237112944270976]},{\"name\":\"张家口市\",\"coord\":[115.1823606483226,40.83732566607167]},{\"name\":\"唐山市\",\"coord\":[117.8693184261954,39.71862889477249]},{\"name\":\"秦皇岛市\",\"coord\":[119.30467355367742,39.990574652162564]},{\"name\":\"承德市\",\"coord\":[117.16275671911026,41.36623845548547]},{\"name\":\"葫芦岛市\",\"coord\":[119.9342336210531,40.5628822626519]},{\"name\":\"朝阳市\",\"coord\":[120.11853493535794,41.471852354885755]},{\"name\":\"赤峰市\",\"coord\":[118.50943546234379,43.25452976059767]},{\"name\":\"锦州市\",\"coord\":[121.5167549323861,41.45933087433065]},{\"name\":\"营口市\",\"coord\":[122.58571915054674,40.42093503997384]},{\"name\":\"丹东市\",\"coord\":[124.33549382902183,40.46369290272115]},{\"name\":\"辽阳市\",\"coord\":[123.34064798039414,41.152331397771356]},{\"name\":\"盘锦市\",\"coord\":[122.06718005354679,41.05573599862555]},{\"name\":\"阜新市\",\"coord\":[121.93889757908204,42.27641773244204]},{\"name\":\"鞍山市\",\"coord\":[122.78904432242356,40.77781183142038]},{\"name\":\"沈阳市\",\"coord\":[122.99508899709724,42.1162195010079]},{\"name\":\"铁岭市\",\"coord\":[124.23100515588399,42.72666083611828]},{\"name\":\"扶顺市\",\"coord\":[124.46027188217573,41.82955407638859]},{\"name\":\"通辽市\",\"coord\":[122.0729370657937,43.90889130864869]},{\"name\":\"兴安盟\",\"coord\":[120.79456431092532,45.92003249442161]},{\"name\":\"白城市\",\"coord\":[123.10619907715235,45.25475749267784]},{\"name\":\"齐齐哈尔市\",\"coord\":[124.5462214659102,47.55395009317394]},{\"name\":\"大兴安岭地区\",\"coord\":[124.50992855161529,52.18438447846694]},{\"name\":\"黑河市\",\"coord\":[127.14721400335922,49.25080134026901]},{\"name\":\"大庆市\",\"coord\":[124.40329830095243,46.401048760966745]},{\"name\":\"绥化市\",\"coord\":[126.5214484055605,46.76992452194825]},{\"name\":\"松原市\",\"coord\":[124.21244334807682,44.75779381338502]},{\"name\":\"四平市\",\"coord\":[124.27839350328821,43.52139065090318]},{\"name\":\"通化市\",\"coord\":[125.67392830706305,41.91771808663852]},{\"name\":\"辽源市\",\"coord\":[125.33529527643432,42.758340204944986]},{\"name\":\"吉林市\",\"coord\":[126.83350281902375,43.60730120049175]},{\"name\":\"长春市\",\"coord\":[125.53597875970374,44.24624314701737]},{\"name\":\"白山市\",\"coord\":[127.16780160322108,42.093893880305075]},{\"name\":\"哈尔滨市\",\"coord\":[127.39125008786029,45.36200668820575]},{\"name\":\"鹤岗市\",\"coord\":[130.4703811258197,47.66520688940109]},{\"name\":\"伊春市\",\"coord\":[128.91240831703635,47.93833794565277]},{\"name\":\"七台河市\",\"coord\":[131.2677920224311,45.945099776108584]},{\"name\":\"鸡西市\",\"coord\":[132.38059153660274,45.722934218318535]},{\"name\":\"双鸭山市\",\"coord\":[132.3184817002743,46.65813679030265]},{\"name\":\"佳木斯市\",\"coord\":[132.26174446608726,47.17569713691394]},{\"name\":\"呼伦贝尔市\",\"coord\":[122.3210739998419,50.18176996070858]},{\"name\":\"孝感市\",\"coord\":[113.83749892135485,31.11757234692128]},{\"name\":\"贵港市\",\"coord\":[110.07354588052804,23.380735604767374]},{\"name\":\"黔南布依族苗族自\",\"coord\":[107.30931767543106,26.2976919432269]},{\"name\":\"宁德市\",\"coord\":[119.52482556634342,27.013151692716413]},{\"name\":\"温州市\",\"coord\":[120.30037042732202,27.8699145504001]},{\"name\":\"台州市\",\"coord\":[120.88886782713843,28.670799172772313]},{\"name\":\"丽水市\",\"coord\":[119.56796851966463,28.170268394477755]},{\"name\":\"衢州市\",\"coord\":[118.79479802644406,28.865874397158763]},{\"name\":\"金华市\",\"coord\":[119.99381920686633,29.093455548185744]},{\"name\":\"绍兴市\",\"coord\":[120.46546691682343,29.69382513836818]},{\"name\":\"宁波市\",\"coord\":[121.42142987830871,29.70001162878972]},{\"name\":\"杭州市\",\"coord\":[119.4405685790891,29.87218307296989]},{\"name\":\"宣城市\",\"coord\":[118.68748382914703,30.628143499626418]},{\"name\":\"湖州市\",\"coord\":[119.98261306633574,30.7945175862809]},{\"name\":\"嘉兴市\",\"coord\":[120.83889215988998,30.67538495499343]},{\"name\":\"上海市\",\"coord\":[121.37534147322967,31.25628247908459]},{\"name\":\"苏州市\",\"coord\":[120.6906182622391,31.381280695137775]},{\"name\":\"无锡市\",\"coord\":[120.32182300914366,31.54113306724517]},{\"name\":\"常州市\",\"coord\":[119.61953292830165,31.611878565375576]},{\"name\":\"南京市\",\"coord\":[118.71890548838064,31.910863187910323]},{\"name\":\"镇江市\",\"coord\":[119.42349332902813,31.97942313430778]},{\"name\":\"合肥市\",\"coord\":[117.30651975617157,31.79407863049138]},{\"name\":\"六安市\",\"coord\":[116.24668220575353,31.820846193819513]},{\"name\":\"滁州市\",\"coord\":[117.88422385307969,32.51792621904418]},{\"name\":\"泰州市\",\"coord\":[120.03124303305091,32.56503102346783]},{\"name\":\"南通市\",\"coord\":[120.85599446760912,32.18496706099728]},{\"name\":\"盐城市\",\"coord\":[120.01812490612667,33.54219948734023]},{\"name\":\"淮安市\",\"coord\":[119.0749424205415,33.39203631772854]},{\"name\":\"宿迁市\",\"coord\":[118.45404943216346,33.666258719120265]},{\"name\":\"徐州市\",\"coord\":[117.77482249295966,34.30847766157078]},{\"name\":\"济宁市\",\"coord\":[116.74147276546373,35.27488504351119]},{\"name\":\"枣庄市\",\"coord\":[117.43359942491492,34.884162021736]},{\"name\":\"连云港市\",\"coord\":[119.01553213785074,34.54316517587849]},{\"name\":\"临沂市\",\"coord\":[118.31478835349617,35.28173079028279]},{\"name\":\"日照市\",\"coord\":[119.14265350444272,35.54479073199592]},{\"name\":\"青岛市\",\"coord\":[120.27779044405756,36.3464117375903]},{\"name\":\"威海市\",\"coord\":[122.12963327195605,37.13879077904251]},{\"name\":\"烟台市\",\"coord\":[120.7689567423966,37.19772002195597]},{\"name\":\"潍坊市\",\"coord\":[119.02178548592039,36.49292234053931]},{\"name\":\"淄博市\",\"coord\":[117.92936024367185,36.60871347163638]},{\"name\":\"泰安市\",\"coord\":[116.93810893944303,36.0423330118612]},{\"name\":\"济南市\",\"coord\":[117.34560282551296,36.769574973846304]},{\"name\":\"东营市\",\"coord\":[118.4915054457184,37.52194690335787]},{\"name\":\"滨州市\",\"coord\":[117.67610299757533,37.4439597758601]},{\"name\":\"昆明市\",\"coord\":[102.93100245594789,25.481300763922075]},{\"name\":\"玉溪市\",\"coord\":[102.23080854291823,24.156168324611663]},{\"name\":\"塔城地区\",\"coord\":[83.60908162840168,45.3721852373893]},{\"name\":\"张掖市\",\"coord\":[100.47710030600572,38.704239320458385]},{\"name\":\"南阳市\",\"coord\":[112.1400670951149,33.03033276715801]},{\"name\":\"扬州市\",\"coord\":[119.48949608990988,32.80956776339646]},{\"name\":\"延边朝鲜族自治州\",\"coord\":[129.3577692895626,43.24968794080283]},{\"name\":\"牡丹江市\",\"coord\":[129.87240796405672,44.7073040108322]},{\"name\":\"澳门\",\"coord\":[113.56289691515346,22.14602596262204]},{\"name\":\"吴忠市\",\"coord\":[106.76894508116403,37.72566765880316]},{\"name\":\"来宾市\",\"coord\":[109.25592217010114,23.86346274681084]},{\"name\":\"平凉市\",\"coord\":[107.0708132782897,35.30329631658711]},{\"name\":\"马鞍山市\",\"coord\":[118.27245878467022,31.657727937739004]},{\"name\":\"芜湖市\",\"coord\":[118.32992684415504,31.081688223101658]},{\"name\":\"澄迈县\",\"coord\":[110.04198076060266,19.694955078668105]},{\"name\":\"保亭黎族苗族自治\",\"coord\":[109.6055304964257,18.6101488675304]},{\"name\":\"乐东黎族自治县\",\"coord\":[109.04051999525574,18.643137437909203]},{\"name\":\"儋州市\",\"coord\":[109.3431358337404,19.550974957403195]},{\"name\":\"定安县\",\"coord\":[110.38744429685676,19.47557074114284]},{\"name\":\"屯昌县\",\"coord\":[110.00574767630334,19.367175093044388]},{\"name\":\"白沙黎族自治县\",\"coord\":[109.36860737761768,19.214416393082217]},{\"name\":\"琼中黎族苗族自治\",\"coord\":[109.86691465937548,19.073671135862682]},{\"name\":\"东方市\",\"coord\":[108.86903802405428,19.017352815445214]},{\"name\":\"昌江黎族自治县\",\"coord\":[108.9686431884767,19.182594167127824]},{\"name\":\"海口市\",\"coord\":[110.420654296875,19.806565564640795]},{\"name\":\"济源市\",\"coord\":[112.38051465474433,35.07958362422394]},{\"name\":\"五指山市\",\"coord\":[109.53595187364496,18.832908264613966]},{\"name\":\"大连市\",\"coord\":[121.96662235866603,39.444150542439914]},{\"name\":\"文昌市三沙市\",\"coord\":[110.81828537536748,19.756501444162936]},{\"name\":\"三亚市\",\"coord\":[109.38424600793707,18.39186315877128]},{\"name\":\"万宁市\",\"coord\":[110.28485046979574,18.860240588635115]},{\"name\":\"陵水黎族自治县\",\"coord\":[109.95577603229562,18.594712684620465]},{\"name\":\"临高县\",\"coord\":[109.71915395436967,19.79420403032508]},{\"name\":\"琼海市\",\"coord\":[110.41650700703043,19.22315873149372]}]");
- /***/ }),
- /***/ "b982":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/iframe/Iframe.vue?vue&type=template&id=37ec6382&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('iframe',{staticClass:"sm-component-iframe",attrs:{"src":_vm.src,"scrolling":"auto"}})}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/iframe/Iframe.vue?vue&type=template&id=37ec6382&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "b9e2":
- /***/ (function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__("d3a8"),
- isSymbol = __webpack_require__("f885");
- /** Used as references for various `Number` constants. */
- var NAN = 0 / 0;
- /** Used to match leading and trailing whitespace. */
- var reTrim = /^\s+|\s+$/g;
- /** Used to detect bad signed hexadecimal string values. */
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
- /** Used to detect binary string values. */
- var reIsBinary = /^0b[01]+$/i;
- /** Used to detect octal string values. */
- var reIsOctal = /^0o[0-7]+$/i;
- /** Built-in method references without a dependency on `root`. */
- var freeParseInt = parseInt;
- /**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3.2);
- * // => 3.2
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3.2');
- * // => 3.2
- */
- function toNumber(value) {
- if (typeof value == 'number') {
- return value;
- }
- if (isSymbol(value)) {
- return NAN;
- }
- if (isObject(value)) {
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
- value = isObject(other) ? (other + '') : other;
- }
- if (typeof value != 'string') {
- return value === 0 ? value : +value;
- }
- value = value.replace(reTrim, '');
- var isBinary = reIsBinary.test(value);
- return (isBinary || reIsOctal.test(value))
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
- : (reIsBadHex.test(value) ? NAN : +value);
- }
- module.exports = toNumber;
- /***/ }),
- /***/ "bb52":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAADWBJREFUeAHt3VFqkwkUhmFbstfBBYyL8MJbcS3euqySam+knZgOxeSD5n0GBpx2zOE8R/DlD9G7D99/PH7wDwECBAgQIEDgIgLC4iKMXoQAAQIECOQFfjXFfR4BAAECBAgQIHAxgcPzV7r//PVNb4scP328e/7z/ZgAAQIECBB4/wJ/0wMvwuKJ4vjvP6+L3N2LideFfJcAAQIECLxrgecPDg4Px1cfOhy/fHuxq7dCXnD4DwIECBAgQOBvBE6eWPx+MU8mflP4AQECBAgQqAo8HP78TsW5JxmeWFR/pdibAAECBAhcQUBYXAHVSxIgQIAAgaqAsKhe3t4ECBAgQOAKAsLiCqhekgABAgQIVAWERfXy9iZAgAABAlcQOA2Lp0+D+ETIFai9JAECBAgQuB2Bp0+L/OkTI6dhcTs724QAAQIECBAYCwiLMbhxBAgQIEDgtgX87aa3fV/bESBAgACBlYC/3XQlbQ4BAgQIEGgIeCukcWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAi/C4v7z18fG2rYkQIAAAQIELiHw33Z4ERaXGOA1CBAgQIAAga6AsOje3uYECBAgQODiAidhcXg4Pj79e/FJXpAAAQIECBC4GYFzvXASFjezsUUIECBAgACBuYCwmJMbSIAAAQIEbldAWNzubW1GgAABAgTmAsJiTm4gAQIECBC4XQFhcbu3tRkBAgQIEJgLHM5NPPfJkIfD/d25n+PrBAgQIECAwG0JnOuBc1t6YnFOxtcJECBAgACBNwucPLE4fvn26os8/6M7j58+enrxqpZvEiBAgACB9yfw4vf6/+mC0+2+//CHYZ2q+AoBAgQIECDwVoFfTeGtkLei+f8JECBAgACBswJ3HzyxOIvjGwQIECBAgMDbBH4C+z9OgLhU6J4AAAAASUVORK5CYII="
- /***/ }),
- /***/ "bbe9":
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__("c66c");
- exports.Stream = exports;
- exports.Readable = exports;
- exports.Writable = __webpack_require__("9c77");
- exports.Duplex = __webpack_require__("d711");
- exports.Transform = __webpack_require__("b556");
- exports.PassThrough = __webpack_require__("e525");
- /***/ }),
- /***/ "be3f":
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE_be3f__;
- /***/ }),
- /***/ "c031":
- /***/ (function(module, exports) {
- function _getPrototypeOf(o) {
- module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
- return o.__proto__ || Object.getPrototypeOf(o);
- };
- return _getPrototypeOf(o);
- }
- module.exports = _getPrototypeOf;
- /***/ }),
- /***/ "c0cb":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAF+xJREFUeAHt3W+oZOddB/DnzN6VNNgXxq1CpakKBSFKIqXYImmb1oJB+qJbG2PxT5aCL0qQNApNFiQblE0CGheNikK5qUqMqU1fREihtan1hS9KbbQGqYFiEyykia0Qkywme4/PubNz93r3nGeec+fcM+fM+Qxc7tzzPPOc5/d5Zme+e+bMTBFcjkxg9ugL5ZENPoGBd06eKCZQphIJECCwUQJbR1rNnY+8IZx/+YlQltcc6X4MvpkCt20LZpu5sqoqiqfCFVfeEO656flDYXyzPBvKcGfjbYtwOry5uKexfdHQxTgdjFFed8fZsFM21xOK08W/3JusZzBjlOUdkffWBXHN7/uKovjDmu17m8qBjLE3oZZXZi3753cXKvKt9CRAYFoC1X+2qv90VY+Th7m8uTgdZuGBxpuW4Wz4jzL15Da/aRfjdDBG8eS9p0NRNNcTyrPltXck6xnMGEVxb8R9sHFtQvh4DA6nEu2RYhhjpOaYajuaQ837Q8WqyTw1+4G3eSlktQXyUshqfm49UIGuHh/LsgjPhO145OJXaystYksIp+KRi0/Wti82djFOB2PEJ9siXHvndghlfT2xIcxmp4on72msZ1BjhPD7kfjnF8w1vz8WA8SnarbvbtqtZQBjNM0vtb37YNHVP5rUrCfeNrTAIgBM/A6p/PYCXT1OluWxGC4ejk+59U9gRbgQJ3dzDBd/k5xkF+N0MEb5oUeOha9/5eE41+Z6ZrObi6/e01jPYMaoPEL44/jzcw32O3H7R2O4+NuG9ngWwTDGaJpf0/ZuXwrp6h9L02xtJ0CAwCYIVOdWVOdYVEd0V3lZpCguhKvDhyPJ47UsZTgWQ8dD4dnyxtr2xcYuxulgjOJTN10Ix380Xc/OzkPlT55urGcwY1Qe83MtnlgwH/hdPf8+EMPDew5s3/szho5BjLE3ocwr3R2xECoyyXUjQIDARYGuHjefLV8Xj01U4eJdtbZFeCWek3FjeFPx97Xti41djNPBGOU77n9deOnbsZ4yUc/sxnjkorGewYxRxrUJ4S/iz9sXzAd+n49//3IMEf94YPvenzF8DGKMvQktudJNsMj5x3H79pmwE+5aMh/NBAgQGKbALNwd7j91pvPJ5Tx+5uz0+fL14eXwd/EIxdsaur8Yw8V7w9XFlxva55u7GKeDMcqfvu/14X++G+spE/UU740nbTbWM5gxyvJ7I+5fx59rG+xfitt/IYaLJxvaq5dFBjFG0/z2b189WHT1j2L/rFwnQIDAlAS6ehx9trwq/gfuizFc/EQtXxG+E8PFu+ORi6/Vti82djFOB2OU7zhzVXjplS/GadXXE2I9x8O7i6/c11jPYMYoy++LdVQna/5Y/Km7/Hfc+KEYLv6trrHaFsPFIMZomt9i+2rBoqt/DIvZ+E2AAIGpCnT1ePpc+YPhfPiHGC7e0kD5XDzz4voYLp5uaJ9v7mKcDsYof+p0rOdCop7iuTDbur548nca6xnMGGVZvb340fjzIw32L8TtJ2O4+EZDexUuBjFG0/yq7YcPFl39I0jNThsBAgSmJNDV4+q3yqvD/8ZwEeKpnfWXZ8L3xHDxxuKZ+uaLW7sYp4Mxyrd+/Orw6pJ6jofr45GLxnoGM0ZZ/lDU/Uz8eWOD/bfi9g/EcPGfDe1VuBjEGE3zmzU1JLd3dedP7kQjAQIEJibQ1btFqsBwLPxM1HuuQbB6ov58qI4opC5djNPBGLuBYXY81hOPTtRfrg6vhc/vHpmobw+DGWMeGG6O06yOTtRdqsDx8MUjE3Xt1QdoVaFj7WPUTi5ubB8shIomS9sJECCwukBX4aJ6qeNYeF88Lv2d2klVL5WcD5+Lb0W9qrZ9sbGLcToYY/eljuPl++K0mut55cLnds+pWMz9wO/BjDF/qeMX4/Sq8yrqLtVLJX918ZyKuvYqXFQvl6x9jLrJtQsWQkWdoW0ECBDoVqC7cPG1GCx+Nk7uxdoJVid57oTPhupdHKlLdbLnquN0MMbuSZqzorme6iTPl89/dvfdIA31DGaM+UmavxSnWb0jpO5SneT5lzFcVO8Gqb3EcFGd6Ln2MQ5OLj9YCBUH7fxNgACBoxPoKlxUby89Ft4fg8ErtZOt3p76UngsHrmoPiuh+dLFOB2Msfv20mOzRD3x7akvfvex3c+xaKhmMGPM3156S5xm9VkWdZfq7akPxnDRuDYxXFRvUb0l/qx1jLj/vUtesBAq9sBcIUCAQG8CXYWL6oOxZuGDcd6vNsz9XfEDtj4dzwo83tA+39zFOB2MsfvBWLNjH4xhqaGe+MFaLz336fKtf9pYz2DGmH8w1q9F4Nca7N8et/9ZDBfNtQxkjMX8lwcLoWJh5TcBAgT6F+guXDwen4g/HH+qj4muu9wYv3fkoRguqu+4aL68qVh9nA7GKL569vH4pWTpel79xkO73x3SUM1gxiiKL8Qp3hp/dhqmekPcXn38d+PaxCMXgxijmn86WAgVDWtsMwECBHoU6CpczL+M7CMxXJS1s6++zOyZ8IkYLtIfRdDFOB2MsftlZMXsI7GW+nqqLzP7+j99Ij4hN9YzmDHmX0b2G7XrMt9YfZnZ7yVrGcgYzcFCqEisryYCBAj0LNBduPhkfBr+9cbZV1/D/mz4g8b2RUP1deyrjtPBGLtfo14UzfVUX8N+3Z3JegYzxvxr1H9rQVzzu/rW19+u2b63KR65qD7dc61j1AcLoWJvkVwhQIDAYAS6Chc/XDwQj1qcbqxrJx6W/2Z5trF90dDFOB2MUfzzvQ/Ez7horqcsby2vuyNZz2DGKIrtyHvfgrjm9y3xqMUdNdv3NsVwsdYxLj88JFTsLY4rBAgQGKSAx+lBLotJzQX+f7BwZ3W/IECAwDgEPF6PY50mOMtLwcKddILLr2QCBEYtkPO4ffv2mfheg7tGXafJj0Pg3KndTHEpWHzswX+NZwJfEz8n9KlwxZU3hOq1PBcCBAgQGLbAb/75D4QLO1/w+D3sZZrS7C6dvFmFiuoiVExp/dVKgMDYBX73V769+7hd/aewehw///IToTqS4UJgTQKXjljctj1/H/DFQxlrmo/dEiBAgMBhBPa/LHKY27sNgVUFLuaHS0csVh3Q7QkQIEBgfQLVy9fHZu/ZfTl7fbOwZwJhiwEBAgQIbIhA9bJICD++IdUoYywCi1c8Ls7XEYuxLJx5EiBAgACBEQgIFiNYJFMkQIAAAQJjERAsxrJS5kmAAAECBEYgIFiMYJFMkQABAgQIjEVAsBjLSpknAQIECBAYgYBgMYJFMkUCBAgQIDAWAcFiLCtlngQIECBAYAQCgsUIFskUCRAgQIDAWAQEi7GslHkSIECAAIERCAgWI1gkUyRAgAABAmMRECzGslLmSYAAAQIERiAgWIxgkUyRAAECBAiMRUCwGMtKmScBAgQIEBiBgGAxgkUyRQIECBAgMBYBwWIsK2WeBAgQIEBgBAKCxQgWyRQJECBAgMBYBASLsayUeRIgQIAAgREICBYjWCRTJECAAAECYxEQLMayUuZJgAABAgRGICBYjGCRTJEAAQIECIxFQLAYy0qZJwECBAgQGIGAYDGCRTJFAgQIECAwFgHBYiwrZZ4ECBAgQGAEAoLFCBbJFAkQIECAwFgEBIuxrJR5EiBAgACBEQgIFiNYJFMkQIAAAQJjERAsxrJS5kmAAAECBEYgIFiMYJFMkQABAgQIjEVAsBjLSpknAQIECBAYgYBgMYJFMkUCBAgQIDAWga3Zoy+U+ye7c27/X64TIECAAAECBPIFHLHIt9KTAAECBAgQWCIgWCwB0kyAAAECBAjkCwgW+VZ6EiBAgAABAksEBIslQJoJECBAgACBfAHBIt9KTwIECBAgQGCJQHHwXSGL/jsnTxSL634TIECAAAECBPYLHMwPi9zgiMV+JdcJECBAgACBlQQEi5X43JgAAQIECBDYLyBY7NdwnQABAgQIEFhJQLBYic+NCRAgQIAAgf0CgsV+DdcJECBAgACBlQQEi5X43JgAAQIECBDYLyBY7NdwnQABAgQIEFhJQLBYic+NCRAgQIAAgf0CW/v/cJ0AAQIECBAgcBiBxQdmOWJxGD23IUCAAAECBGoFBItaFhsJECBAgACBwwgIFodRcxsCBAgQIECgVkCwqGWxkQABAgQIEDiMgGBxGDW3IUCAAAECBGoFBItaFhsJECBAgACBwwgIFodRcxsCBAgQIECgVuCyz7HYOXmiqO1pIwECBAgQIEBgiYAjFkuANBMgQIAAAQL5AoJFvpWeBAgQIECAwBIBwWIJkGYCBAgQIEAgX0CwyLfSkwABAgQIEFgiIFgsAdJMgAABAgQI5AsIFvlWehIgQIAAAQJLBASLJUCaCRAgQIAAgXwBwSLfSk8CBAgQIEBgiYBgsQRIMwECBAgQIJAvIFjkW+lJgAABAgQILBEQLJYAaSZAgAABAgTyBQSLfCs9CRAgQIAAgSUCgsUSIM0ECBAgQIBAvoBgkW+lJwECBAgQIHBRoPo29LpvRBcs3EUIECBAgACBzgQEi84oDUSAAAECBAgIFu4DBAgQIECAQGcCgkVnlAYiQIAAAQIEBAv3AQIECBAgQKAzga29Mzpv2y47G9VABAgQIECAwCQFHLGY5LIrmgABAgQIHI3A1tEMa1QCBAgQIEBgCgI7X3psXua5U0V1xRGLKay6GgkQIECAQE8CgkVP0HZDgAABAgSmICBYTGGV1UiAAAECBHoSECx6grYbAgQIECAwBQHBYgqrrEYCBAgQINCTgGDRE7TdECBAgACBKQgIFlNYZTUSIECAAIGeBASLnqDthgABAgQITEFAsJjCKquRAAECBAj0JCBY9ARtNwQIECBAYAoCgsUUVlmNBAgQIECgJwHBoidouyFAgAABAlMQECymsMpqJECAAAECPQkIFj1B2w0BAgQIEJiCgGAxhVVWIwECBAgQ6ElAsOgJ2m4IECBAgMAUBASLKayyGgkQIECAQE8CgkVP0HZDgAABAgSmICBYTGGV1UiAAAECBHoSECx6grYbAgQIECAwBQHBYgqrrEYCBAgQINCTgGDRE7TdECBAgACBKQgIFlNYZTUSIECAAIGeBASLnqDthgABAgQITEFAsJjCKquRAAECBAj0JCBY9ARtNwQIECBAYAoCgsUUVlmNBAgQIECgJwHBoidouyFAgAABAlMQECymsMpqJECAAAECPQkIFj1B2w0BAgQIEJiCgGAxhVVWIwECBAgQ6ElAsOgJ2m4IECBAgMAUBASLKayyGgkQIECAQE8CgkVP0HZDgAABAgSmICBYTGGV1UiAAAECBHoSECx6grYbAgQIECAwBQHBYgqrrEYCBAgQINCTgGDRE7TdECBAgACBKQgIFlNYZTUSIECAAIGeBASLnqDthgABAgQITEFAsJjCKquRAAECBAj0JCBY9ARtNwQIECBAYAoCgsUUVlmNBAgQIECgJwHBoidouyFAgAABAlMQECymsMpqJECAAAECPQkIFj1B2w0BAgQIEJiCgGAxhVVWIwECBAgQ6ElAsOgJ2m4IECBAgMAUBASLKayyGgkQIECAQE8CgkVP0HZDgAABAgSmICBYTGGV1UiAAAECBHoSECx6grYbAgQIECAwBQHBYgqrrEYCBAgQINCTgGDRE7TdECBAgACBKQhsLYqcvfP986vvfKGsruycPFEs2vwmQIAAAQIECOQIOGKRo6QPAQIECBAgkCUgWGQx6USAAAECBAjkCAgWOUr6ECBAgAABAlkCW7NH5+dUZPXWiQABAgQIECCQEHDEIoGjiQABAgQIEGgnIFi089KbAAECBAgQSAgIFgkcTQQIECBAgEA7AcGinZfeBAgQIECAQEJAsEjgaCJAgAABAgTaCQgW7bz0JkCAAAECBBICgkUCRxMBAgQIECDQTkCwaOelNwECBAgQIJAQECwSOJoIECBAgACBdgKCRTsvvQkQIECAAIGEgGCRwNFEgAABAgQItBMQLNp56U2AAAECBAgkBASLBI4mAgQIECBAoJ2AYNHOS28CBAgQIEAgISBYJHA0ESBAgAABAu0EBIt2XnoTIECAAAECCQHBIoGjiQABAgQIEGgnIFi089KbAAECBAgQSAgIFgkcTQQIECBAgEA7AcGinZfeBAgQIECAQEJAsEjgaCJAgAABAgTaCQgW7bz0JkCAAAECBBICs52TJ4rqJ9FHEwECBAgQIEAgS8ARiywmnQgQIECAAIEcAcEiR0kfAgQIECBAIEtAsMhi0okAAQIECBDIERAscpT0IUCAAAECBLIEBIssJp0IECBAgACBHAHBIkdJHwIECBAgQCBLQLDIYtKJAAECBAgQyBEQLHKU9CFAgAABAgSyBASLLCadCBAgQIAAgRwBwSJHSR8CBAgQIEAgS0CwyGLSiQABAgQIEMgRECxylPQhQIAAAQIEsgQEiywmnQgQIECAAIEcAcEiR0kfAgQIECBAIEtAsMhi0okAAQIECBDIEdhadNr50mPzq+dOFYttfhMgQIAAAQIE2gg4YtFGS18CBAgQIEAgKSBYJHk0EiBAgAABAm0EBIs2WvoSIECAAAECSQHBIsmjkQABAgQIEGgjIFi00dKXAAECBAgQSAoIFkkejQQIECBAgEAbAcGijZa+BAgQIECAQFJAsEjyaCRAgAABAgTaCAgWbbT0JUCAAAECBJICgkWSRyMBAgQIECDQRkCwaKOlLwECBAgQIJAUECySPBoJECBAgACBNgKCRRstfQkQIECAAIGkgGCR5NFIgAABAgQItBEQLNpo6UuAAAECBAgkBQSLJI9GAgQIECBAoI2AYNFGS18CBAgQIEAgKSBYJHk0EiBAgAABAm0EBIs2WvoSIECAAAECSQHBIsmjkQABAgQIEGgjIFi00dKXAAECBAgQSAoIFkkejQQIECBAgEAbAcGijZa+BAgQIECAQFJAsEjyaCRAgAABAgTaCAgWbbT0JUCAAAECBJICgkWSRyMBAgQIECDQRkCwaKOlLwECBAgQIJAUECySPBoJECBAgACBNgKCRRstfQkQIECAAIGkgGCR5NFIgAABAgQItBEQLNpo6UuAAAECBAgkBbaSrVXj0+WZUIa7lvbTgcC6BIpwd3hLcWZdu7dfAgQIELgksPyIRfWAXT1wuxAYooBQMcRVMScCBCYscPkRi9u2y8s8/ujBEN523fznskYbCKxJQKhYE7zdEiBAoFng8mDR1PfLT85bqoDhQmDdAkLFulfA/gnkC9z5yBvC+ZefCGV5Tf6N9ByrQDHWiR/pvJvOK/FkdqTsBidAYAMFhIoNXNSGks6d2s0UgkWDT+NJq8JFk5jtBLIFZo++UO6cPJH9+LO/f3U9e0c6rkVgVhR3v/aB7z8T9oeKongqXHHlDeGem55fy6TstDeB5Sdv9jaVge2o6aTV6h0y1RENFwIEWgk0BYK221vtVOfeBYSK3skHt0PBIrUkwkVKRxuBzgWaQkbnOzLgkQgIFUfCOrpBBYtlSyZcLBPSTqBRQFBopNm4BqFi45b00AXlvyvk0LvYgBtW4eLp+LLuwQ8Km78sEnw40wassRI6E6jCRJvzJzrbsYHWJpATKrY+819ndspy6YctLu47++9HfVxfG94G7XhxP3DEIndRHbnIldJvggKOTExw0S+WvHgySZ2omRsqpqs4/sr37gexFEcs2qynIxdttPSdkMDif5lVyX1enxDxYEvdqWaWePeHUDHYpetsYvtDRTWoIxZtaR25aCumPwECmywgVGzy6i6t7WCoqG7giMVStpoOqSMX/778NcSaEce7yed6jHftVpy5/4muCDjim+89mQgVI17F1ae+dz84MJRgcQAk+8+mcJE9wAZ0zAkVt2+fCTu+HXcDVntewix+IeH9p84IFRuzoq0L2XsyESpa223SDfbuBzVFZX/yXc1tbaoEmj7+e9N1ckLFphuoj8BUBRKhYqok6r4kIFhcsljftXWGk6MICI5SrO++ZM8jFSj+JJy75aOjmLxQMYplWuckBYt16u/f9zrCxVGEiv01uU6AwGYJCBWbtZ5HVI1gcUSwhxq2z3DRdai4bdsXQx1q0d2IwAgFfKHYCBetvykLFv1Zb/aeBIvNXl/VEVgICBULCb8bBASLBpi1bj7KIxddH6lYK5SdEyBAgMDQBP4P0C0DtozKDvkAAAAASUVORK5CYII="
- /***/ }),
- /***/ "c363":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/video-player/VideoPlayer.vue?vue&type=template&id=4df6cab8&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-video-player"},[_c('video-player',{ref:"videoPlayer",staticClass:"sm-component-video-player__player sm-component-video-player__player--main",attrs:{"options":_vm.playerOptions,"playsinline":true},on:{"play":function($event){return _vm.onPlayerPlay($event)},"ended":function($event){return _vm.onPlayerEnded($event)},"loadeddata":function($event){return _vm.onPlayerLoadeddata($event)}}}),_vm._v(" "),(_vm.url)?_c('a-modal',{attrs:{"wrapClassName":"sm-component-video-player-modal","footer":null,"width":"60%","maskClosable":false},model:{value:(_vm.modalVisible),callback:function ($$v) {_vm.modalVisible=$$v},expression:"modalVisible"}},[_c('video-player',{ref:"modalVideoPlayer",staticClass:"sm-component-video-player__player",attrs:{"options":_vm.modalPlayerOptions,"playsinline":true},on:{"play":function($event){return _vm.onModalPlayerPlay($event)},"loadeddata":function($event){return _vm.onModalPlayerLoadeddata($event)}}})],1):_vm._e()],1)}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/video-player/VideoPlayer.vue?vue&type=template&id=4df6cab8&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "c365":
- /***/ (function(module, exports, __webpack_require__) {
- var helper = __webpack_require__("cabd");
- var isArray = __webpack_require__("df2e").isArray;
- var currentElement, currentElementName;
- function validateOptions(userOptions) {
- var options = helper.copyOptions(userOptions);
- helper.ensureFlagExists('ignoreDeclaration', options);
- helper.ensureFlagExists('ignoreInstruction', options);
- helper.ensureFlagExists('ignoreAttributes', options);
- helper.ensureFlagExists('ignoreText', options);
- helper.ensureFlagExists('ignoreComment', options);
- helper.ensureFlagExists('ignoreCdata', options);
- helper.ensureFlagExists('ignoreDoctype', options);
- helper.ensureFlagExists('compact', options);
- helper.ensureFlagExists('indentText', options);
- helper.ensureFlagExists('indentCdata', options);
- helper.ensureFlagExists('indentAttributes', options);
- helper.ensureFlagExists('indentInstruction', options);
- helper.ensureFlagExists('fullTagEmptyElement', options);
- helper.ensureFlagExists('noQuotesForNativeAttributes', options);
- helper.ensureSpacesExists(options);
- if (typeof options.spaces === 'number') {
- options.spaces = Array(options.spaces + 1).join(' ');
- }
- helper.ensureKeyExists('declaration', options);
- helper.ensureKeyExists('instruction', options);
- helper.ensureKeyExists('attributes', options);
- helper.ensureKeyExists('text', options);
- helper.ensureKeyExists('comment', options);
- helper.ensureKeyExists('cdata', options);
- helper.ensureKeyExists('doctype', options);
- helper.ensureKeyExists('type', options);
- helper.ensureKeyExists('name', options);
- helper.ensureKeyExists('elements', options);
- helper.checkFnExists('doctype', options);
- helper.checkFnExists('instruction', options);
- helper.checkFnExists('cdata', options);
- helper.checkFnExists('comment', options);
- helper.checkFnExists('text', options);
- helper.checkFnExists('instructionName', options);
- helper.checkFnExists('elementName', options);
- helper.checkFnExists('attributeName', options);
- helper.checkFnExists('attributeValue', options);
- helper.checkFnExists('attributes', options);
- helper.checkFnExists('fullTagEmptyElement', options);
- return options;
- }
- function writeIndentation(options, depth, firstLine) {
- return (!firstLine && options.spaces ? '\n' : '') + Array(depth + 1).join(options.spaces);
- }
- function writeAttributes(attributes, options, depth) {
- if (options.ignoreAttributes) {
- return '';
- }
- if ('attributesFn' in options) {
- attributes = options.attributesFn(attributes, currentElementName, currentElement);
- }
- var key, attr, attrName, quote, result = [];
- for (key in attributes) {
- if (attributes.hasOwnProperty(key) && attributes[key] !== null && attributes[key] !== undefined) {
- quote = options.noQuotesForNativeAttributes && typeof attributes[key] !== 'string' ? '' : '"';
- attr = '' + attributes[key]; // ensure number and boolean are converted to String
- attr = attr.replace(/"/g, '"');
- attrName = 'attributeNameFn' in options ? options.attributeNameFn(key, attr, currentElementName, currentElement) : key;
- result.push((options.spaces && options.indentAttributes? writeIndentation(options, depth+1, false) : ' '));
- result.push(attrName + '=' + quote + ('attributeValueFn' in options ? options.attributeValueFn(attr, key, currentElementName, currentElement) : attr) + quote);
- }
- }
- if (attributes && Object.keys(attributes).length && options.spaces && options.indentAttributes) {
- result.push(writeIndentation(options, depth, false));
- }
- return result.join('');
- }
- function writeDeclaration(declaration, options, depth) {
- currentElement = declaration;
- currentElementName = 'xml';
- return options.ignoreDeclaration ? '' : '<?' + 'xml' + writeAttributes(declaration[options.attributesKey], options, depth) + '?>';
- }
- function writeInstruction(instruction, options, depth) {
- if (options.ignoreInstruction) {
- return '';
- }
- var key;
- for (key in instruction) {
- if (instruction.hasOwnProperty(key)) {
- break;
- }
- }
- var instructionName = 'instructionNameFn' in options ? options.instructionNameFn(key, instruction[key], currentElementName, currentElement) : key;
- if (typeof instruction[key] === 'object') {
- currentElement = instruction;
- currentElementName = instructionName;
- return '<?' + instructionName + writeAttributes(instruction[key][options.attributesKey], options, depth) + '?>';
- } else {
- var instructionValue = instruction[key] ? instruction[key] : '';
- if ('instructionFn' in options) instructionValue = options.instructionFn(instructionValue, key, currentElementName, currentElement);
- return '<?' + instructionName + (instructionValue ? ' ' + instructionValue : '') + '?>';
- }
- }
- function writeComment(comment, options) {
- return options.ignoreComment ? '' : '<!--' + ('commentFn' in options ? options.commentFn(comment, currentElementName, currentElement) : comment) + '-->';
- }
- function writeCdata(cdata, options) {
- return options.ignoreCdata ? '' : '<![CDATA[' + ('cdataFn' in options ? options.cdataFn(cdata, currentElementName, currentElement) : cdata) + ']]>';
- }
- function writeDoctype(doctype, options) {
- return options.ignoreDoctype ? '' : '<!DOCTYPE ' + ('doctypeFn' in options ? options.doctypeFn(doctype, currentElementName, currentElement) : doctype) + '>';
- }
- function writeText(text, options) {
- if (options.ignoreText) return '';
- text = '' + text; // ensure Number and Boolean are converted to String
- text = text.replace(/&/g, '&'); // desanitize to avoid double sanitization
- text = text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
- return 'textFn' in options ? options.textFn(text, currentElementName, currentElement) : text;
- }
- function hasContent(element, options) {
- var i;
- if (element.elements && element.elements.length) {
- for (i = 0; i < element.elements.length; ++i) {
- switch (element.elements[i][options.typeKey]) {
- case 'text':
- if (options.indentText) {
- return true;
- }
- break; // skip to next key
- case 'cdata':
- if (options.indentCdata) {
- return true;
- }
- break; // skip to next key
- case 'instruction':
- if (options.indentInstruction) {
- return true;
- }
- break; // skip to next key
- case 'doctype':
- case 'comment':
- case 'element':
- return true;
- default:
- return true;
- }
- }
- }
- return false;
- }
- function writeElement(element, options, depth) {
- currentElement = element;
- currentElementName = element.name;
- var xml = [], elementName = 'elementNameFn' in options ? options.elementNameFn(element.name, element) : element.name;
- xml.push('<' + elementName);
- if (element[options.attributesKey]) {
- xml.push(writeAttributes(element[options.attributesKey], options, depth));
- }
- var withClosingTag = element[options.elementsKey] && element[options.elementsKey].length || element[options.attributesKey] && element[options.attributesKey]['xml:space'] === 'preserve';
- if (!withClosingTag) {
- if ('fullTagEmptyElementFn' in options) {
- withClosingTag = options.fullTagEmptyElementFn(element.name, element);
- } else {
- withClosingTag = options.fullTagEmptyElement;
- }
- }
- if (withClosingTag) {
- xml.push('>');
- if (element[options.elementsKey] && element[options.elementsKey].length) {
- xml.push(writeElements(element[options.elementsKey], options, depth + 1));
- currentElement = element;
- currentElementName = element.name;
- }
- xml.push(options.spaces && hasContent(element, options) ? '\n' + Array(depth + 1).join(options.spaces) : '');
- xml.push('</' + elementName + '>');
- } else {
- xml.push('/>');
- }
- return xml.join('');
- }
- function writeElements(elements, options, depth, firstLine) {
- return elements.reduce(function (xml, element) {
- var indent = writeIndentation(options, depth, firstLine && !xml);
- switch (element.type) {
- case 'element': return xml + indent + writeElement(element, options, depth);
- case 'comment': return xml + indent + writeComment(element[options.commentKey], options);
- case 'doctype': return xml + indent + writeDoctype(element[options.doctypeKey], options);
- case 'cdata': return xml + (options.indentCdata ? indent : '') + writeCdata(element[options.cdataKey], options);
- case 'text': return xml + (options.indentText ? indent : '') + writeText(element[options.textKey], options);
- case 'instruction':
- var instruction = {};
- instruction[element[options.nameKey]] = element[options.attributesKey] ? element : element[options.instructionKey];
- return xml + (options.indentInstruction ? indent : '') + writeInstruction(instruction, options, depth);
- }
- }, '');
- }
- function hasContentCompact(element, options, anyContent) {
- var key;
- for (key in element) {
- if (element.hasOwnProperty(key)) {
- switch (key) {
- case options.parentKey:
- case options.attributesKey:
- break; // skip to next key
- case options.textKey:
- if (options.indentText || anyContent) {
- return true;
- }
- break; // skip to next key
- case options.cdataKey:
- if (options.indentCdata || anyContent) {
- return true;
- }
- break; // skip to next key
- case options.instructionKey:
- if (options.indentInstruction || anyContent) {
- return true;
- }
- break; // skip to next key
- case options.doctypeKey:
- case options.commentKey:
- return true;
- default:
- return true;
- }
- }
- }
- return false;
- }
- function writeElementCompact(element, name, options, depth, indent) {
- currentElement = element;
- currentElementName = name;
- var elementName = 'elementNameFn' in options ? options.elementNameFn(name, element) : name;
- if (typeof element === 'undefined' || element === null) {
- return 'fullTagEmptyElementFn' in options && options.fullTagEmptyElementFn(name, element) || options.fullTagEmptyElement ? '<' + elementName + '></' + elementName + '>' : '<' + elementName + '/>';
- }
- var xml = [];
- if (name) {
- xml.push('<' + elementName);
- if (typeof element !== 'object') {
- xml.push('>' + writeText(element,options) + '</' + elementName + '>');
- return xml.join('');
- }
- if (element[options.attributesKey]) {
- xml.push(writeAttributes(element[options.attributesKey], options, depth));
- }
- var withClosingTag = hasContentCompact(element, options, true) || element[options.attributesKey] && element[options.attributesKey]['xml:space'] === 'preserve';
- if (!withClosingTag) {
- if ('fullTagEmptyElementFn' in options) {
- withClosingTag = options.fullTagEmptyElementFn(name, element);
- } else {
- withClosingTag = options.fullTagEmptyElement;
- }
- }
- if (withClosingTag) {
- xml.push('>');
- } else {
- xml.push('/>');
- return xml.join('');
- }
- }
- xml.push(writeElementsCompact(element, options, depth + 1, false));
- currentElement = element;
- currentElementName = name;
- if (name) {
- xml.push((indent ? writeIndentation(options, depth, false) : '') + '</' + elementName + '>');
- }
- return xml.join('');
- }
- function writeElementsCompact(element, options, depth, firstLine) {
- var i, key, nodes, xml = [];
- for (key in element) {
- if (element.hasOwnProperty(key)) {
- nodes = isArray(element[key]) ? element[key] : [element[key]];
- for (i = 0; i < nodes.length; ++i) {
- switch (key) {
- case options.declarationKey: xml.push(writeDeclaration(nodes[i], options, depth)); break;
- case options.instructionKey: xml.push((options.indentInstruction ? writeIndentation(options, depth, firstLine) : '') + writeInstruction(nodes[i], options, depth)); break;
- case options.attributesKey: case options.parentKey: break; // skip
- case options.textKey: xml.push((options.indentText ? writeIndentation(options, depth, firstLine) : '') + writeText(nodes[i], options)); break;
- case options.cdataKey: xml.push((options.indentCdata ? writeIndentation(options, depth, firstLine) : '') + writeCdata(nodes[i], options)); break;
- case options.doctypeKey: xml.push(writeIndentation(options, depth, firstLine) + writeDoctype(nodes[i], options)); break;
- case options.commentKey: xml.push(writeIndentation(options, depth, firstLine) + writeComment(nodes[i], options)); break;
- default: xml.push(writeIndentation(options, depth, firstLine) + writeElementCompact(nodes[i], key, options, depth, hasContentCompact(nodes[i], options)));
- }
- firstLine = firstLine && !xml.length;
- }
- }
- }
- return xml.join('');
- }
- module.exports = function (js, options) {
- options = validateOptions(options);
- var xml = [];
- currentElement = js;
- currentElementName = '_root_';
- if (options.compact) {
- xml.push(writeElementsCompact(js, options, 0, true));
- } else {
- if (js[options.declarationKey]) {
- xml.push(writeDeclaration(js[options.declarationKey], options, 0));
- }
- if (js[options.elementsKey] && js[options.elementsKey].length) {
- xml.push(writeElements(js[options.elementsKey], options, 0, !xml.length));
- }
- }
- return xml.join('');
- };
- /***/ }),
- /***/ "c486":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _lang = __webpack_require__("4e21");
- var iPortalDataParameter = function iPortalDataParameter(options) {
- (0, _classCallCheck2.default)(this, iPortalDataParameter);
- this.type = 'iPortal';
- this.url = options.url;
- this.attributeFilter = options.attributeFilter || null;
- this.maxFeatures = options.maxFeatures || 20;
- this.name = options.name || (0, _lang.geti18n)().t('commontypes.iportalData');
- this.withCredentials = options.withCredentials || false;
- };
- exports.default = iPortalDataParameter;
- /***/ }),
- /***/ "c492":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/border/Border.vue?vue&type=template&id=531a677a&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:_vm.borderId,staticClass:"sm-component-border",style:(_vm.borderStyle)},[_c('div',{staticClass:"sm-component-border__content",style:(_vm.contentStyle)},[_vm._t("default")],2)])}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/border/Border.vue?vue&type=template&id=531a677a&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "c51e":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _vue = _interopRequireDefault(__webpack_require__("5643"));
- var _vuePropertyDecorator = __webpack_require__("e22c");
- var _RestService = _interopRequireDefault(__webpack_require__("5bf3"));
- var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
- var c = arguments.length,
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
- d;
- if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- }
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- var ThirdService =
- /*#__PURE__*/
- function (_Vue) {
- (0, _inherits2.default)(ThirdService, _Vue);
- function ThirdService() {
- var _this;
- (0, _classCallCheck2.default)(this, ThirdService);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ThirdService).apply(this, arguments));
- _this.features = null;
- _this.restService = null;
- return _this;
- }
- (0, _createClass2.default)(ThirdService, [{
- key: "onUrlChange",
- value: function onUrlChange(newValue) {
- if (newValue) {
- this.getData();
- }
- }
- }, {
- key: "onFieldChange",
- value: function onFieldChange(newValue) {
- if (this.url) {
- this.setValue(this.features);
- }
- }
- }, {
- key: "onProxyChange",
- value: function onProxyChange(newValue) {
- this.restService && this.restService.setProxy(this.proxy);
- if (this.url) {
- this.getData();
- }
- }
- }, {
- key: "getData",
- value: function getData() {
- if (!this.restService) {
- this.restService = new _RestService.default({
- proxy: this.proxy
- });
- this.restService.on({
- getdatasucceeded: this.fetchData
- });
- }
- this.restService.getData(this.url);
- }
- }, {
- key: "fetchData",
- value: function fetchData(_ref) {
- var features = _ref.features;
- this.features = features;
- this.setValue(features);
- }
- }, {
- key: "setValue",
- value: function setValue(features) {
- if (features && !!features.length) {
- var field = this.field;
- this.finalValue = features[0].properties[field];
- }
- }
- }]);
- return ThirdService;
- }(_vue.default);
- __decorate([(0, _vuePropertyDecorator.Prop)({
- default: ''
- })], ThirdService.prototype, "url", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)({
- default: ''
- })], ThirdService.prototype, "field", void 0);
- __decorate([(0, _vuePropertyDecorator.Prop)({
- default: ''
- })], ThirdService.prototype, "proxy", void 0);
- __decorate([(0, _vuePropertyDecorator.Watch)('url', {
- immediate: true
- })], ThirdService.prototype, "onUrlChange", null);
- __decorate([(0, _vuePropertyDecorator.Watch)('field')], ThirdService.prototype, "onFieldChange", null);
- __decorate([(0, _vuePropertyDecorator.Watch)('proxy')], ThirdService.prototype, "onProxyChange", null);
- ThirdService = __decorate([_vuePropertyDecorator.Component], ThirdService);
- var _default = ThirdService;
- exports.default = _default;
- /***/ }),
- /***/ "c66c":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- /*<replacement>*/
- var pna = __webpack_require__("3e48");
- /*</replacement>*/
- module.exports = Readable;
- /*<replacement>*/
- var isArray = __webpack_require__("5b56");
- /*</replacement>*/
- /*<replacement>*/
- var Duplex;
- /*</replacement>*/
- Readable.ReadableState = ReadableState;
- /*<replacement>*/
- var EE = __webpack_require__("0956").EventEmitter;
- var EElistenerCount = function (emitter, type) {
- return emitter.listeners(type).length;
- };
- /*</replacement>*/
- /*<replacement>*/
- var Stream = __webpack_require__("5e89");
- /*</replacement>*/
- /*<replacement>*/
- var Buffer = __webpack_require__("54da").Buffer;
- var OurUint8Array = global.Uint8Array || function () {};
- function _uint8ArrayToBuffer(chunk) {
- return Buffer.from(chunk);
- }
- function _isUint8Array(obj) {
- return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
- }
- /*</replacement>*/
- /*<replacement>*/
- var util = __webpack_require__("9107");
- util.inherits = __webpack_require__("fe04");
- /*</replacement>*/
- /*<replacement>*/
- var debugUtil = __webpack_require__(1);
- var debug = void 0;
- if (debugUtil && debugUtil.debuglog) {
- debug = debugUtil.debuglog('stream');
- } else {
- debug = function () {};
- }
- /*</replacement>*/
- var BufferList = __webpack_require__("9bd6");
- var destroyImpl = __webpack_require__("74c0");
- var StringDecoder;
- util.inherits(Readable, Stream);
- var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
- function prependListener(emitter, event, fn) {
- // Sadly this is not cacheable as some libraries bundle their own
- // event emitter implementation with them.
- if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
- // This is a hack to make sure that our error handler is attached before any
- // userland ones. NEVER DO THIS. This is here only because this code needs
- // to continue to work with older versions of Node.js that do not include
- // the prependListener() method. The goal is to eventually remove this hack.
- if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
- }
- function ReadableState(options, stream) {
- Duplex = Duplex || __webpack_require__("d711");
- options = options || {};
- // Duplex streams are both readable and writable, but share
- // the same options object.
- // However, some cases require setting options to different
- // values for the readable and the writable sides of the duplex stream.
- // These options can be provided separately as readableXXX and writableXXX.
- var isDuplex = stream instanceof Duplex;
- // object stream flag. Used to make read(n) ignore n and to
- // make all the buffer merging and length checks go away
- this.objectMode = !!options.objectMode;
- if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
- // the point at which it stops calling _read() to fill the buffer
- // Note: 0 is a valid value, means "don't call _read preemptively ever"
- var hwm = options.highWaterMark;
- var readableHwm = options.readableHighWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
- if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
- // cast to ints.
- this.highWaterMark = Math.floor(this.highWaterMark);
- // A linked list is used to store data chunks instead of an array because the
- // linked list can remove elements from the beginning faster than
- // array.shift()
- this.buffer = new BufferList();
- this.length = 0;
- this.pipes = null;
- this.pipesCount = 0;
- this.flowing = null;
- this.ended = false;
- this.endEmitted = false;
- this.reading = false;
- // a flag to be able to tell if the event 'readable'/'data' is emitted
- // immediately, or on a later tick. We set this to true at first, because
- // any actions that shouldn't happen until "later" should generally also
- // not happen before the first read call.
- this.sync = true;
- // whenever we return null, then we set a flag to say
- // that we're awaiting a 'readable' event emission.
- this.needReadable = false;
- this.emittedReadable = false;
- this.readableListening = false;
- this.resumeScheduled = false;
- // has it been destroyed
- this.destroyed = false;
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
- // the number of writers that are awaiting a drain event in .pipe()s
- this.awaitDrain = 0;
- // if true, a maybeReadMore has been scheduled
- this.readingMore = false;
- this.decoder = null;
- this.encoding = null;
- if (options.encoding) {
- if (!StringDecoder) StringDecoder = __webpack_require__("5465").StringDecoder;
- this.decoder = new StringDecoder(options.encoding);
- this.encoding = options.encoding;
- }
- }
- function Readable(options) {
- Duplex = Duplex || __webpack_require__("d711");
- if (!(this instanceof Readable)) return new Readable(options);
- this._readableState = new ReadableState(options, this);
- // legacy
- this.readable = true;
- if (options) {
- if (typeof options.read === 'function') this._read = options.read;
- if (typeof options.destroy === 'function') this._destroy = options.destroy;
- }
- Stream.call(this);
- }
- Object.defineProperty(Readable.prototype, 'destroyed', {
- get: function () {
- if (this._readableState === undefined) {
- return false;
- }
- return this._readableState.destroyed;
- },
- set: function (value) {
- // we ignore the value if the stream
- // has not been initialized yet
- if (!this._readableState) {
- return;
- }
- // backward compatibility, the user is explicitly
- // managing destroyed
- this._readableState.destroyed = value;
- }
- });
- Readable.prototype.destroy = destroyImpl.destroy;
- Readable.prototype._undestroy = destroyImpl.undestroy;
- Readable.prototype._destroy = function (err, cb) {
- this.push(null);
- cb(err);
- };
- // Manually shove something into the read() buffer.
- // This returns true if the highWaterMark has not been hit yet,
- // similar to how Writable.write() returns true if you should
- // write() some more.
- Readable.prototype.push = function (chunk, encoding) {
- var state = this._readableState;
- var skipChunkCheck;
- if (!state.objectMode) {
- if (typeof chunk === 'string') {
- encoding = encoding || state.defaultEncoding;
- if (encoding !== state.encoding) {
- chunk = Buffer.from(chunk, encoding);
- encoding = '';
- }
- skipChunkCheck = true;
- }
- } else {
- skipChunkCheck = true;
- }
- return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
- };
- // Unshift should *always* be something directly out of read()
- Readable.prototype.unshift = function (chunk) {
- return readableAddChunk(this, chunk, null, true, false);
- };
- function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
- var state = stream._readableState;
- if (chunk === null) {
- state.reading = false;
- onEofChunk(stream, state);
- } else {
- var er;
- if (!skipChunkCheck) er = chunkInvalid(state, chunk);
- if (er) {
- stream.emit('error', er);
- } else if (state.objectMode || chunk && chunk.length > 0) {
- if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
- chunk = _uint8ArrayToBuffer(chunk);
- }
- if (addToFront) {
- if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
- } else if (state.ended) {
- stream.emit('error', new Error('stream.push() after EOF'));
- } else {
- state.reading = false;
- if (state.decoder && !encoding) {
- chunk = state.decoder.write(chunk);
- if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
- } else {
- addChunk(stream, state, chunk, false);
- }
- }
- } else if (!addToFront) {
- state.reading = false;
- }
- }
- return needMoreData(state);
- }
- function addChunk(stream, state, chunk, addToFront) {
- if (state.flowing && state.length === 0 && !state.sync) {
- stream.emit('data', chunk);
- stream.read(0);
- } else {
- // update the buffer info.
- state.length += state.objectMode ? 1 : chunk.length;
- if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
- if (state.needReadable) emitReadable(stream);
- }
- maybeReadMore(stream, state);
- }
- function chunkInvalid(state, chunk) {
- var er;
- if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- return er;
- }
- // if it's past the high water mark, we can push in some more.
- // Also, if we have no data yet, we can stand some
- // more bytes. This is to work around cases where hwm=0,
- // such as the repl. Also, if the push() triggered a
- // readable event, and the user called read(largeNumber) such that
- // needReadable was set, then we ought to push more, so that another
- // 'readable' event will be triggered.
- function needMoreData(state) {
- return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
- }
- Readable.prototype.isPaused = function () {
- return this._readableState.flowing === false;
- };
- // backwards compatibility.
- Readable.prototype.setEncoding = function (enc) {
- if (!StringDecoder) StringDecoder = __webpack_require__("5465").StringDecoder;
- this._readableState.decoder = new StringDecoder(enc);
- this._readableState.encoding = enc;
- return this;
- };
- // Don't raise the hwm > 8MB
- var MAX_HWM = 0x800000;
- function computeNewHighWaterMark(n) {
- if (n >= MAX_HWM) {
- n = MAX_HWM;
- } else {
- // Get the next highest power of 2 to prevent increasing hwm excessively in
- // tiny amounts
- n--;
- n |= n >>> 1;
- n |= n >>> 2;
- n |= n >>> 4;
- n |= n >>> 8;
- n |= n >>> 16;
- n++;
- }
- return n;
- }
- // This function is designed to be inlinable, so please take care when making
- // changes to the function body.
- function howMuchToRead(n, state) {
- if (n <= 0 || state.length === 0 && state.ended) return 0;
- if (state.objectMode) return 1;
- if (n !== n) {
- // Only flow one buffer at a time
- if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
- }
- // If we're asking for more than the current hwm, then raise the hwm.
- if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
- if (n <= state.length) return n;
- // Don't have enough
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- }
- return state.length;
- }
- // you can override either this method, or the async _read(n) below.
- Readable.prototype.read = function (n) {
- debug('read', n);
- n = parseInt(n, 10);
- var state = this._readableState;
- var nOrig = n;
- if (n !== 0) state.emittedReadable = false;
- // if we're doing read(0) to trigger a readable event, but we
- // already have a bunch of data in the buffer, then just trigger
- // the 'readable' event and move on.
- if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
- debug('read: emitReadable', state.length, state.ended);
- if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
- return null;
- }
- n = howMuchToRead(n, state);
- // if we've ended, and we're now clear, then finish it up.
- if (n === 0 && state.ended) {
- if (state.length === 0) endReadable(this);
- return null;
- }
- // All the actual chunk generation logic needs to be
- // *below* the call to _read. The reason is that in certain
- // synthetic stream cases, such as passthrough streams, _read
- // may be a completely synchronous operation which may change
- // the state of the read buffer, providing enough data when
- // before there was *not* enough.
- //
- // So, the steps are:
- // 1. Figure out what the state of things will be after we do
- // a read from the buffer.
- //
- // 2. If that resulting state will trigger a _read, then call _read.
- // Note that this may be asynchronous, or synchronous. Yes, it is
- // deeply ugly to write APIs this way, but that still doesn't mean
- // that the Readable class should behave improperly, as streams are
- // designed to be sync/async agnostic.
- // Take note if the _read call is sync or async (ie, if the read call
- // has returned yet), so that we know whether or not it's safe to emit
- // 'readable' etc.
- //
- // 3. Actually pull the requested chunks out of the buffer and return.
- // if we need a readable event, then we need to do some reading.
- var doRead = state.needReadable;
- debug('need readable', doRead);
- // if we currently have less than the highWaterMark, then also read some
- if (state.length === 0 || state.length - n < state.highWaterMark) {
- doRead = true;
- debug('length less than watermark', doRead);
- }
- // however, if we've ended, then there's no point, and if we're already
- // reading, then it's unnecessary.
- if (state.ended || state.reading) {
- doRead = false;
- debug('reading or ended', doRead);
- } else if (doRead) {
- debug('do read');
- state.reading = true;
- state.sync = true;
- // if the length is currently zero, then we *need* a readable event.
- if (state.length === 0) state.needReadable = true;
- // call internal read method
- this._read(state.highWaterMark);
- state.sync = false;
- // If _read pushed data synchronously, then `reading` will be false,
- // and we need to re-evaluate how much data we can return to the user.
- if (!state.reading) n = howMuchToRead(nOrig, state);
- }
- var ret;
- if (n > 0) ret = fromList(n, state);else ret = null;
- if (ret === null) {
- state.needReadable = true;
- n = 0;
- } else {
- state.length -= n;
- }
- if (state.length === 0) {
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (!state.ended) state.needReadable = true;
- // If we tried to read() past the EOF, then emit end on the next tick.
- if (nOrig !== n && state.ended) endReadable(this);
- }
- if (ret !== null) this.emit('data', ret);
- return ret;
- };
- function onEofChunk(stream, state) {
- if (state.ended) return;
- if (state.decoder) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) {
- state.buffer.push(chunk);
- state.length += state.objectMode ? 1 : chunk.length;
- }
- }
- state.ended = true;
- // emit 'readable' now to make sure it gets picked up.
- emitReadable(stream);
- }
- // Don't emit readable right away in sync mode, because this can trigger
- // another read() call => stack overflow. This way, it might trigger
- // a nextTick recursion warning, but that's not so bad.
- function emitReadable(stream) {
- var state = stream._readableState;
- state.needReadable = false;
- if (!state.emittedReadable) {
- debug('emitReadable', state.flowing);
- state.emittedReadable = true;
- if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
- }
- }
- function emitReadable_(stream) {
- debug('emit readable');
- stream.emit('readable');
- flow(stream);
- }
- // at this point, the user has presumably seen the 'readable' event,
- // and called read() to consume some data. that may have triggered
- // in turn another _read(n) call, in which case reading = true if
- // it's in progress.
- // However, if we're not ended, or reading, and the length < hwm,
- // then go ahead and try to read some more preemptively.
- function maybeReadMore(stream, state) {
- if (!state.readingMore) {
- state.readingMore = true;
- pna.nextTick(maybeReadMore_, stream, state);
- }
- }
- function maybeReadMore_(stream, state) {
- var len = state.length;
- while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
- debug('maybeReadMore read 0');
- stream.read(0);
- if (len === state.length)
- // didn't get any data, stop spinning.
- break;else len = state.length;
- }
- state.readingMore = false;
- }
- // abstract method. to be overridden in specific implementation classes.
- // call cb(er, data) where data is <= n in length.
- // for virtual (non-string, non-buffer) streams, "length" is somewhat
- // arbitrary, and perhaps not very meaningful.
- Readable.prototype._read = function (n) {
- this.emit('error', new Error('_read() is not implemented'));
- };
- Readable.prototype.pipe = function (dest, pipeOpts) {
- var src = this;
- var state = this._readableState;
- switch (state.pipesCount) {
- case 0:
- state.pipes = dest;
- break;
- case 1:
- state.pipes = [state.pipes, dest];
- break;
- default:
- state.pipes.push(dest);
- break;
- }
- state.pipesCount += 1;
- debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
- var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
- var endFn = doEnd ? onend : unpipe;
- if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
- dest.on('unpipe', onunpipe);
- function onunpipe(readable, unpipeInfo) {
- debug('onunpipe');
- if (readable === src) {
- if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
- unpipeInfo.hasUnpiped = true;
- cleanup();
- }
- }
- }
- function onend() {
- debug('onend');
- dest.end();
- }
- // when the dest drains, it reduces the awaitDrain counter
- // on the source. This would be more elegant with a .once()
- // handler in flow(), but adding and removing repeatedly is
- // too slow.
- var ondrain = pipeOnDrain(src);
- dest.on('drain', ondrain);
- var cleanedUp = false;
- function cleanup() {
- debug('cleanup');
- // cleanup event handlers once the pipe is broken
- dest.removeListener('close', onclose);
- dest.removeListener('finish', onfinish);
- dest.removeListener('drain', ondrain);
- dest.removeListener('error', onerror);
- dest.removeListener('unpipe', onunpipe);
- src.removeListener('end', onend);
- src.removeListener('end', unpipe);
- src.removeListener('data', ondata);
- cleanedUp = true;
- // if the reader is waiting for a drain event from this
- // specific writer, then it would cause it to never start
- // flowing again.
- // So, if this is awaiting a drain, then we just call it now.
- // If we don't know, then assume that we are waiting for one.
- if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
- }
- // If the user pushes more data while we're writing to dest then we'll end up
- // in ondata again. However, we only want to increase awaitDrain once because
- // dest will only emit one 'drain' event for the multiple writes.
- // => Introduce a guard on increasing awaitDrain.
- var increasedAwaitDrain = false;
- src.on('data', ondata);
- function ondata(chunk) {
- debug('ondata');
- increasedAwaitDrain = false;
- var ret = dest.write(chunk);
- if (false === ret && !increasedAwaitDrain) {
- // If the user unpiped during `dest.write()`, it is possible
- // to get stuck in a permanently paused state if that write
- // also returned false.
- // => Check whether `dest` is still a piping destination.
- if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
- debug('false write response, pause', src._readableState.awaitDrain);
- src._readableState.awaitDrain++;
- increasedAwaitDrain = true;
- }
- src.pause();
- }
- }
- // if the dest has an error, then stop piping into it.
- // however, don't suppress the throwing behavior for this.
- function onerror(er) {
- debug('onerror', er);
- unpipe();
- dest.removeListener('error', onerror);
- if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
- }
- // Make sure our error handler is attached before userland ones.
- prependListener(dest, 'error', onerror);
- // Both close and finish should trigger unpipe, but only once.
- function onclose() {
- dest.removeListener('finish', onfinish);
- unpipe();
- }
- dest.once('close', onclose);
- function onfinish() {
- debug('onfinish');
- dest.removeListener('close', onclose);
- unpipe();
- }
- dest.once('finish', onfinish);
- function unpipe() {
- debug('unpipe');
- src.unpipe(dest);
- }
- // tell the dest that it's being piped to
- dest.emit('pipe', src);
- // start the flow if it hasn't been started already.
- if (!state.flowing) {
- debug('pipe resume');
- src.resume();
- }
- return dest;
- };
- function pipeOnDrain(src) {
- return function () {
- var state = src._readableState;
- debug('pipeOnDrain', state.awaitDrain);
- if (state.awaitDrain) state.awaitDrain--;
- if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
- state.flowing = true;
- flow(src);
- }
- };
- }
- Readable.prototype.unpipe = function (dest) {
- var state = this._readableState;
- var unpipeInfo = { hasUnpiped: false };
- // if we're not piping anywhere, then do nothing.
- if (state.pipesCount === 0) return this;
- // just one destination. most common case.
- if (state.pipesCount === 1) {
- // passed in one, but it's not the right one.
- if (dest && dest !== state.pipes) return this;
- if (!dest) dest = state.pipes;
- // got a match.
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
- if (dest) dest.emit('unpipe', this, unpipeInfo);
- return this;
- }
- // slow case. multiple pipe destinations.
- if (!dest) {
- // remove all.
- var dests = state.pipes;
- var len = state.pipesCount;
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
- for (var i = 0; i < len; i++) {
- dests[i].emit('unpipe', this, unpipeInfo);
- }return this;
- }
- // try to find the right one.
- var index = indexOf(state.pipes, dest);
- if (index === -1) return this;
- state.pipes.splice(index, 1);
- state.pipesCount -= 1;
- if (state.pipesCount === 1) state.pipes = state.pipes[0];
- dest.emit('unpipe', this, unpipeInfo);
- return this;
- };
- // set up data events if they are asked for
- // Ensure readable listeners eventually get something
- Readable.prototype.on = function (ev, fn) {
- var res = Stream.prototype.on.call(this, ev, fn);
- if (ev === 'data') {
- // Start flowing on next tick if stream isn't explicitly paused
- if (this._readableState.flowing !== false) this.resume();
- } else if (ev === 'readable') {
- var state = this._readableState;
- if (!state.endEmitted && !state.readableListening) {
- state.readableListening = state.needReadable = true;
- state.emittedReadable = false;
- if (!state.reading) {
- pna.nextTick(nReadingNextTick, this);
- } else if (state.length) {
- emitReadable(this);
- }
- }
- }
- return res;
- };
- Readable.prototype.addListener = Readable.prototype.on;
- function nReadingNextTick(self) {
- debug('readable nexttick read 0');
- self.read(0);
- }
- // pause() and resume() are remnants of the legacy readable stream API
- // If the user uses them, then switch into old mode.
- Readable.prototype.resume = function () {
- var state = this._readableState;
- if (!state.flowing) {
- debug('resume');
- state.flowing = true;
- resume(this, state);
- }
- return this;
- };
- function resume(stream, state) {
- if (!state.resumeScheduled) {
- state.resumeScheduled = true;
- pna.nextTick(resume_, stream, state);
- }
- }
- function resume_(stream, state) {
- if (!state.reading) {
- debug('resume read 0');
- stream.read(0);
- }
- state.resumeScheduled = false;
- state.awaitDrain = 0;
- stream.emit('resume');
- flow(stream);
- if (state.flowing && !state.reading) stream.read(0);
- }
- Readable.prototype.pause = function () {
- debug('call pause flowing=%j', this._readableState.flowing);
- if (false !== this._readableState.flowing) {
- debug('pause');
- this._readableState.flowing = false;
- this.emit('pause');
- }
- return this;
- };
- function flow(stream) {
- var state = stream._readableState;
- debug('flow', state.flowing);
- while (state.flowing && stream.read() !== null) {}
- }
- // wrap an old-style stream as the async data source.
- // This is *not* part of the readable stream interface.
- // It is an ugly unfortunate mess of history.
- Readable.prototype.wrap = function (stream) {
- var _this = this;
- var state = this._readableState;
- var paused = false;
- stream.on('end', function () {
- debug('wrapped end');
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) _this.push(chunk);
- }
- _this.push(null);
- });
- stream.on('data', function (chunk) {
- debug('wrapped data');
- if (state.decoder) chunk = state.decoder.write(chunk);
- // don't skip over falsy values in objectMode
- if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
- var ret = _this.push(chunk);
- if (!ret) {
- paused = true;
- stream.pause();
- }
- });
- // proxy all the other methods.
- // important when wrapping filters and duplexes.
- for (var i in stream) {
- if (this[i] === undefined && typeof stream[i] === 'function') {
- this[i] = function (method) {
- return function () {
- return stream[method].apply(stream, arguments);
- };
- }(i);
- }
- }
- // proxy certain important events.
- for (var n = 0; n < kProxyEvents.length; n++) {
- stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
- }
- // when we try to consume some more bytes, simply unpause the
- // underlying stream.
- this._read = function (n) {
- debug('wrapped _read', n);
- if (paused) {
- paused = false;
- stream.resume();
- }
- };
- return this;
- };
- Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
- // making it explicit this property is not enumerable
- // because otherwise some prototype manipulation in
- // userland will fail
- enumerable: false,
- get: function () {
- return this._readableState.highWaterMark;
- }
- });
- // exposed for testing purposes only.
- Readable._fromList = fromList;
- // Pluck off n bytes from an array of buffers.
- // Length is the combined lengths of all the buffers in the list.
- // This function is designed to be inlinable, so please take care when making
- // changes to the function body.
- function fromList(n, state) {
- // nothing buffered
- if (state.length === 0) return null;
- var ret;
- if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
- // read it all, truncate the list
- if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
- state.buffer.clear();
- } else {
- // read part of list
- ret = fromListPartial(n, state.buffer, state.decoder);
- }
- return ret;
- }
- // Extracts only enough buffered data to satisfy the amount requested.
- // This function is designed to be inlinable, so please take care when making
- // changes to the function body.
- function fromListPartial(n, list, hasStrings) {
- var ret;
- if (n < list.head.data.length) {
- // slice is the same for buffers and strings
- ret = list.head.data.slice(0, n);
- list.head.data = list.head.data.slice(n);
- } else if (n === list.head.data.length) {
- // first chunk is a perfect match
- ret = list.shift();
- } else {
- // result spans more than one buffer
- ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
- }
- return ret;
- }
- // Copies a specified amount of characters from the list of buffered data
- // chunks.
- // This function is designed to be inlinable, so please take care when making
- // changes to the function body.
- function copyFromBufferString(n, list) {
- var p = list.head;
- var c = 1;
- var ret = p.data;
- n -= ret.length;
- while (p = p.next) {
- var str = p.data;
- var nb = n > str.length ? str.length : n;
- if (nb === str.length) ret += str;else ret += str.slice(0, n);
- n -= nb;
- if (n === 0) {
- if (nb === str.length) {
- ++c;
- if (p.next) list.head = p.next;else list.head = list.tail = null;
- } else {
- list.head = p;
- p.data = str.slice(nb);
- }
- break;
- }
- ++c;
- }
- list.length -= c;
- return ret;
- }
- // Copies a specified amount of bytes from the list of buffered data chunks.
- // This function is designed to be inlinable, so please take care when making
- // changes to the function body.
- function copyFromBuffer(n, list) {
- var ret = Buffer.allocUnsafe(n);
- var p = list.head;
- var c = 1;
- p.data.copy(ret);
- n -= p.data.length;
- while (p = p.next) {
- var buf = p.data;
- var nb = n > buf.length ? buf.length : n;
- buf.copy(ret, ret.length - n, 0, nb);
- n -= nb;
- if (n === 0) {
- if (nb === buf.length) {
- ++c;
- if (p.next) list.head = p.next;else list.head = list.tail = null;
- } else {
- list.head = p;
- p.data = buf.slice(nb);
- }
- break;
- }
- ++c;
- }
- list.length -= c;
- return ret;
- }
- function endReadable(stream) {
- var state = stream._readableState;
- // If we get here before consuming all the bytes, then that is a
- // bug in node. Should never happen.
- if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
- if (!state.endEmitted) {
- state.ended = true;
- pna.nextTick(endReadableNT, state, stream);
- }
- }
- function endReadableNT(state, stream) {
- // Check that we didn't get one last unshift.
- if (!state.endEmitted && state.length === 0) {
- state.endEmitted = true;
- stream.readable = false;
- stream.emit('end');
- }
- }
- function indexOf(xs, x) {
- for (var i = 0, l = xs.length; i < l; i++) {
- if (xs[i] === x) return i;
- }
- return -1;
- }
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d"), __webpack_require__("f2ac")))
- /***/ }),
- /***/ "c794":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/icon/Icon.vue?vue&type=template&id=076da86b&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-icon"},[(!!_vm.iconClass)?_c('i',{class:_vm.customIconClass,style:([_vm.iconStyle, _vm.colorStyle]),attrs:{"theme":_vm.theme,"twoToneColor":_vm.twoToneColor,"component":_vm.component}}):_c('a-icon',{style:([_vm.iconStyle, _vm.colorStyle]),attrs:{"type":_vm.type,"theme":_vm.theme,"twoToneColor":_vm.twoToneColor,"component":_vm.component}})],1)}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/icon/Icon.vue?vue&type=template&id=076da86b&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "c7a6":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("550a");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("b429");
- var render, staticRenderFns
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(
- _Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"],
- render,
- staticRenderFns,
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "c978":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /*
- * JsonSQL
- * By: Trent Richardson [http://trentrichardson.com]
- * Version 0.1
- * Last Modified: 1/1/2008
- *
- * Copyright 2008 Trent Richardson
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- window.jsonsql = {
- query: function query(sql, json) {
- var returnfields = sql.match(/^(select)\s+([a-z0-9_\,\.\s\*]+)\s+from\s+([a-z0-9_\.]+)(?: where\s+\((.+)\))?\s*(?:order\sby\s+([a-z0-9_\,]+))?\s*(asc|desc|ascnum|descnum)?\s*(?:limit\s+([0-9_\,]+))?/i);
- var ops = {
- fields: returnfields[2].replace(' ', '').split(','),
- from: returnfields[3].replace(' ', ''),
- where: returnfields[4] == undefined ? 'true' : returnfields[4],
- orderby: returnfields[5] == undefined ? [] : returnfields[5].replace(' ', '').split(','),
- order: returnfields[6] == undefined ? 'asc' : returnfields[6],
- limit: returnfields[7] == undefined ? [] : returnfields[7].replace(' ', '').split(',')
- };
- return this.parse(json, ops);
- },
- parse: function parse(json, ops) {
- var o = {
- fields: ['*'],
- from: 'json',
- where: '',
- orderby: [],
- order: 'asc',
- limit: []
- };
- for (var i in ops) {
- o[i] = ops[i];
- }
- var result = [];
- result = this.returnFilter(json, o);
- result = this.returnOrderBy(result, o.orderby, o.order);
- result = this.returnLimit(result, o.limit);
- return result;
- },
- returnFilter: function returnFilter(json, jsonsql_o) {
- var jsonsql_scope = eval(jsonsql_o.from);
- var jsonsql_result = [];
- var jsonsql_rc = 0;
- if (jsonsql_o.where == '') jsonsql_o.where = 'true';
- for (var jsonsql_i in jsonsql_scope) {
- // with(jsonsql_scope[jsonsql_i]){
- // if(eval(jsonsql_o.where)){
- // jsonsql_result[jsonsql_rc++] = this.returnFields(jsonsql_scope[jsonsql_i],jsonsql_o.fields);
- // }
- // }
- // fix with -- stric mode
- if (this.functionWith(jsonsql_scope[jsonsql_i], jsonsql_o.where)) {
- jsonsql_result[jsonsql_rc++] = this.returnFields(jsonsql_scope[jsonsql_i], jsonsql_o.fields);
- }
- }
- return jsonsql_result;
- },
- functionWith: function functionWith(scope, exp) {
- if (!scope) return;
- var resetArgs = '';
- for (var key in scope) {
- resetArgs = resetArgs + 'var ' + key + ' = _$_$_functionWith["' + key + '"];';
- }
- var nf = new Function('_$_$_functionWith', resetArgs + 'return ' + exp);
- return nf(scope);
- },
- returnFields: function returnFields(scope, fields) {
- if (fields.length == 0) fields = ['*'];
- if (fields[0] == '*') return scope;
- var returnobj = {};
- for (var i in fields) {
- returnobj[fields[i]] = scope[fields[i]];
- }
- return returnobj;
- },
- returnOrderBy: function returnOrderBy(result, orderby, order) {
- if (orderby.length == 0) return result;
- result.sort(function (a, b) {
- switch (order.toLowerCase()) {
- case 'desc':
- return eval('a.' + orderby[0] + ' < b.' + orderby[0]) ? 1 : -1;
- case 'asc':
- return eval('a.' + orderby[0] + ' > b.' + orderby[0]) ? 1 : -1;
- case 'descnum':
- return eval('a.' + orderby[0] + ' - b.' + orderby[0]);
- case 'ascnum':
- return eval('b.' + orderby[0] + ' - a.' + orderby[0]);
- }
- });
- return result;
- },
- returnLimit: function returnLimit(result, limit) {
- switch (limit.length) {
- case 0:
- return result;
- case 1:
- return result.splice(0, limit[0]);
- case 2:
- return result.splice(limit[0] - 1, limit[1]);
- }
- }
- };
- /***/ }),
- /***/ "ca6a":
- /***/ (function(module, exports) {
- /**
- * lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- /** Used as references for various `Number` constants. */
- var NAN = 0 / 0;
- /** `Object#toString` result references. */
- var symbolTag = '[object Symbol]';
- /** Used to match leading and trailing whitespace. */
- var reTrim = /^\s+|\s+$/g;
- /** Used to detect bad signed hexadecimal string values. */
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
- /** Used to detect binary string values. */
- var reIsBinary = /^0b[01]+$/i;
- /** Used to detect octal string values. */
- var reIsOctal = /^0o[0-7]+$/i;
- /** Built-in method references without a dependency on `root`. */
- var freeParseInt = parseInt;
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objectToString = objectProto.toString;
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
- }
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
- }
- /**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3.2);
- * // => 3.2
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3.2');
- * // => 3.2
- */
- function toNumber(value) {
- if (typeof value == 'number') {
- return value;
- }
- if (isSymbol(value)) {
- return NAN;
- }
- if (isObject(value)) {
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
- value = isObject(other) ? (other + '') : other;
- }
- if (typeof value != 'string') {
- return value === 0 ? value : +value;
- }
- value = value.replace(reTrim, '');
- var isBinary = reIsBinary.test(value);
- return (isBinary || reIsOctal.test(value))
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
- : (reIsBadHex.test(value) ? NAN : +value);
- }
- module.exports = toNumber;
- /***/ }),
- /***/ "cabd":
- /***/ (function(module, exports, __webpack_require__) {
- var isArray = __webpack_require__("df2e").isArray;
- module.exports = {
- copyOptions: function (options) {
- var key, copy = {};
- for (key in options) {
- if (options.hasOwnProperty(key)) {
- copy[key] = options[key];
- }
- }
- return copy;
- },
- ensureFlagExists: function (item, options) {
- if (!(item in options) || typeof options[item] !== 'boolean') {
- options[item] = false;
- }
- },
- ensureSpacesExists: function (options) {
- if (!('spaces' in options) || (typeof options.spaces !== 'number' && typeof options.spaces !== 'string')) {
- options.spaces = 0;
- }
- },
- ensureAlwaysArrayExists: function (options) {
- if (!('alwaysArray' in options) || (typeof options.alwaysArray !== 'boolean' && !isArray(options.alwaysArray))) {
- options.alwaysArray = false;
- }
- },
- ensureKeyExists: function (key, options) {
- if (!(key + 'Key' in options) || typeof options[key + 'Key'] !== 'string') {
- options[key + 'Key'] = options.compact ? '_' + key : key;
- }
- },
- checkFnExists: function (key, options) {
- return key + 'Fn' in options;
- }
- };
- /***/ }),
- /***/ "cadc":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f5a9");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "cce2":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5bb9");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "cdb0":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _GridLayer = _interopRequireDefault(__webpack_require__("85c3"));
- var _default = {
- mixins: [_GridLayer.default],
- props: {
- tms: {
- type: Boolean,
- default: false
- },
- detectRetina: {
- type: Boolean,
- default: false
- }
- },
- render: function render() {
- return null;
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "cf46":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var bbox_1 = __webpack_require__("1164");
- var helpers_1 = __webpack_require__("38ce");
- /**
- * Takes a {@link Feature} or {@link FeatureCollection} and returns the absolute center point of all features.
- *
- * @name center
- * @param {GeoJSON} geojson GeoJSON to be centered
- * @param {Object} [options={}] Optional parameters
- * @param {Object} [options.properties={}] Translate GeoJSON Properties to Point
- * @param {Object} [options.bbox={}] Translate GeoJSON BBox to Point
- * @param {Object} [options.id={}] Translate GeoJSON Id to Point
- * @returns {Feature<Point>} a Point feature at the absolute center point of all input features
- * @example
- * var features = turf.points([
- * [-97.522259, 35.4691],
- * [-97.502754, 35.463455],
- * [-97.508269, 35.463245]
- * ]);
- *
- * var center = turf.center(features);
- *
- * //addToMap
- * var addToMap = [features, center]
- * center.properties['marker-size'] = 'large';
- * center.properties['marker-color'] = '#000';
- */
- function center(geojson, options) {
- if (options === void 0) { options = {}; }
- var ext = bbox_1.default(geojson);
- var x = (ext[0] + ext[2]) / 2;
- var y = (ext[1] + ext[3]) / 2;
- return helpers_1.point([x, y], options.properties, options);
- }
- exports.default = center;
- /***/ }),
- /***/ "d073":
- /***/ (function(module, exports, __webpack_require__) {
- var map = {
- "./dark.scss": "743a",
- "./light.scss": "f2e5"
- };
- function webpackContext(req) {
- var id = webpackContextResolve(req);
- return __webpack_require__(id);
- }
- function webpackContextResolve(req) {
- if(!__webpack_require__.o(map, req)) {
- var e = new Error("Cannot find module '" + req + "'");
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- }
- return map[req];
- }
- webpackContext.keys = function webpackContextKeys() {
- return Object.keys(map);
- };
- webpackContext.resolve = webpackContextResolve;
- module.exports = webpackContext;
- webpackContext.id = "d073";
- /***/ }),
- /***/ "d1f6":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Identify_vue_vue_type_template_id_44a6aa12___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d865");
- /* harmony import */ var _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("14c7");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _Identify_vue_vue_type_template_id_44a6aa12___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _Identify_vue_vue_type_template_id_44a6aa12___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "d201":
- /***/ (function(module, exports, __webpack_require__) {
- var root = __webpack_require__("18ca");
- /**
- * Gets the timestamp of the number of milliseconds that have elapsed since
- * the Unix epoch (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Date
- * @returns {number} Returns the timestamp.
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => Logs the number of milliseconds it took for the deferred invocation.
- */
- var now = function() {
- return root.Date.now();
- };
- module.exports = now;
- /***/ }),
- /***/ "d372":
- /***/ (function(module, exports) {
- function _arrayWithoutHoles(arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
- arr2[i] = arr[i];
- }
- return arr2;
- }
- }
- module.exports = _arrayWithoutHoles;
- /***/ }),
- /***/ "d3a8":
- /***/ (function(module, exports) {
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return value != null && (type == 'object' || type == 'function');
- }
- module.exports = isObject;
- /***/ }),
- /***/ "d5f4":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("32bc");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "d6a7":
- /***/ (function(module, exports, __webpack_require__) {
- !function(t,e){ true?module.exports=e(__webpack_require__("6b73"),__webpack_require__("9106")):undefined}(this,function(m,d){"use strict";var t;return m=m&&m.hasOwnProperty("default")?m.default:m,d=d&&d.hasOwnProperty("default")?d.default:d,function(t){var u;t.exports;(u=window).DOMParser=window.DOMParser;function p(){return document.createElement("canvas")}var f,c=function(t,e,i){if(null!=t||null!=e||null!=i){var n=function(s){var A={opts:s,FRAMERATE:30,MAX_VIRTUAL_PIXELS:3e4,rootEmSize:12,emSize:12,log:function(t){}};1==A.opts.log&&"undefined"!=typeof console&&(A.log=function(t){console.log(t)});A.init=function(t){var e=0;A.UniqueId=function(){return"canvg"+ ++e},A.Definitions={},A.Styles={},A.StylesSpecificity={},A.Animations=[],A.Images=[],A.ctx=t,A.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(t,e){this.viewPorts.push({width:t,height:e})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(t){return null!=t&&"number"==typeof t?t:"x"==t?this.width():"y"==t?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},A.init(),A.ImagesLoaded=function(){for(var t=0;t<A.Images.length;t++)if(!A.Images[t].loaded)return!1;return!0},A.trim=function(t){return t.replace(/^\s+|\s+$/g,"")},A.compressSpaces=function(t){return t.replace(/(?!\u3000)\s+/gm," ")},A.ajax=function(t){var e;return(e=u.XMLHttpRequest?new u.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"))?(e.open("GET",t,!1),e.send(null),e.responseText):null},A.parseXml=function(e){if("undefined"!=typeof Windows&&void 0!==Windows.Data&&void 0!==Windows.Data.Xml){var t=new Windows.Data.Xml.Dom.XmlDocument,i=new Windows.Data.Xml.Dom.XmlLoadSettings;return i.prohibitDtd=!1,t.loadXml(e,i),t}if(!u.DOMParser){e=e.replace(/<!DOCTYPE svg[^>]*>/,"");var t=new ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(e),t}try{var n=s.xmldom?new u.DOMParser(s.xmldom):new u.DOMParser;return n.parseFromString(e,"image/svg+xml")}catch(t){return(n=s.xmldom?new u.DOMParser(s.xmldom):new u.DOMParser).parseFromString(e,"text/xml")}},A.Property=function(t,e){this.name=t,this.value=e},A.Property.prototype.getValue=function(){return this.value},A.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},A.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var t=parseFloat(this.value);return(this.value+"").match(/%$/)&&(t/=100),t},A.Property.prototype.valueOrDefault=function(t){return this.hasValue()?this.value:t},A.Property.prototype.numValueOrDefault=function(t){return this.hasValue()?this.numValue():t},A.Property.prototype.addOpacity=function(t){var e=this.value;if(null!=t.value&&""!=t.value&&"string"==typeof this.value){var i=new m(this.value);i.ok&&(e="rgba("+i.r+", "+i.g+", "+i.b+", "+t.numValue()+")")}return new A.Property(this.name,e)},A.Property.prototype.getDefinition=function(){var t=this.value.match(/#([^\)'"]+)/);return t&&(t=t[1]),t||(t=this.value),A.Definitions[t]},A.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},A.Property.prototype.getFillStyleDefinition=function(t,e){var i=this.getDefinition();if(null!=i&&i.createGradient)return i.createGradient(A.ctx,t,e);if(null!=i&&i.createPattern){if(i.getHrefAttribute().hasValue()){var n=i.attribute("patternTransform");i=i.getHrefAttribute().getDefinition(),n.hasValue()&&(i.attribute("patternTransform",!0).value=n.value)}return i.createPattern(A.ctx,t)}return null},A.Property.prototype.getDPI=function(t){return 96},A.Property.prototype.getREM=function(t){return A.rootEmSize},A.Property.prototype.getEM=function(t){return A.emSize},A.Property.prototype.getUnits=function(){var t=this.value+"";return t.replace(/[0-9\.\-]/g,"")},A.Property.prototype.isPixels=function(){if(!this.hasValue())return!1;var t=this.value+"";return!!t.match(/px$/)||!!t.match(/^[0-9]+$/)},A.Property.prototype.toPixels=function(t,e){if(!this.hasValue())return 0;var i=this.value+"";if(i.match(/rem$/))return this.numValue()*this.getREM(t);if(i.match(/em$/))return this.numValue()*this.getEM(t);if(i.match(/ex$/))return this.numValue()*this.getEM(t)/2;if(i.match(/px$/))return this.numValue();if(i.match(/pt$/))return this.numValue()*this.getDPI(t)*(1/72);if(i.match(/pc$/))return 15*this.numValue();if(i.match(/cm$/))return this.numValue()*this.getDPI(t)/2.54;if(i.match(/mm$/))return this.numValue()*this.getDPI(t)/25.4;if(i.match(/in$/))return this.numValue()*this.getDPI(t);if(i.match(/%$/))return this.numValue()*A.ViewPort.ComputeSize(t);var n=this.numValue();return e&&n<1?n*A.ViewPort.ComputeSize(t):n},A.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/s$/)?1e3*this.numValue():(t.match(/ms$/),this.numValue())},A.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/deg$/)?this.numValue()*(Math.PI/180):t.match(/grad$/)?this.numValue()*(Math.PI/200):t.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var t={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return A.Property.prototype.toTextBaseline=function(){return this.hasValue()?t[this.value]:null},A.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(t,e,i,n,s,a){var r=null!=a?this.Parse(a):this.CreateFont("","","","","",A.ctx.font);return{fontFamily:s=s||r.fontFamily,fontSize:n||r.fontSize,fontStyle:t||r.fontStyle,fontWeight:i||r.fontWeight,fontVariant:e||r.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var r=this;this.Parse=function(t){for(var e={},i=A.trim(A.compressSpaces(t||"")).split(" "),n={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},s="",a=0;a<i.length;a++)n.fontStyle||-1==r.Styles.indexOf(i[a])?n.fontVariant||-1==r.Variants.indexOf(i[a])?n.fontWeight||-1==r.Weights.indexOf(i[a])?n.fontSize?"inherit"!=i[a]&&(s+=i[a]):("inherit"!=i[a]&&(e.fontSize=i[a].split("/")[0]),n.fontStyle=n.fontVariant=n.fontWeight=n.fontSize=!0):("inherit"!=i[a]&&(e.fontWeight=i[a]),n.fontStyle=n.fontVariant=n.fontWeight=!0):("inherit"!=i[a]&&(e.fontVariant=i[a]),n.fontStyle=n.fontVariant=!0):("inherit"!=i[a]&&(e.fontStyle=i[a]),n.fontStyle=!0);return""!=s&&(e.fontFamily=s),e}},A.ToNumberArray=function(t){for(var e=A.trim(A.compressSpaces((t||"").replace(/,/g," "))).split(" "),i=0;i<e.length;i++)e[i]=parseFloat(e[i]);return e},A.Point=function(t,e){this.x=t,this.y=e},A.Point.prototype.angleTo=function(t){return Math.atan2(t.y-this.y,t.x-this.x)},A.Point.prototype.applyTransform=function(t){var e=this.x*t[0]+this.y*t[2]+t[4],i=this.x*t[1]+this.y*t[3]+t[5];this.x=e,this.y=i},A.CreatePoint=function(t){var e=A.ToNumberArray(t);return new A.Point(e[0],e[1])},A.CreatePath=function(t){for(var e=A.ToNumberArray(t),i=[],n=0;n<e.length;n+=2)i.push(new A.Point(e[n],e[n+1]));return i},A.BoundingBox=function(t,e,i,n){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(t,e){null!=t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))},this.addX=function(t){this.addPoint(t,null)},this.addY=function(t){this.addPoint(null,t)},this.addBoundingBox=function(t){this.addPoint(t.x1,t.y1),this.addPoint(t.x2,t.y2)},this.addQuadraticCurve=function(t,e,i,n,s,a){var r=t+2/3*(i-t),o=e+2/3*(n-e),l=r+1/3*(s-t),h=o+1/3*(a-e);this.addBezierCurve(t,e,r,l,o,h,s,a)},this.addBezierCurve=function(t,e,i,n,s,a,r,o){var l=[t,e],h=[i,n],u=[s,a],c=[r,o];this.addPoint(l[0],l[1]),this.addPoint(c[0],c[1]);for(var f=0;f<=1;f++){var m=function(t){return Math.pow(1-t,3)*l[f]+3*Math.pow(1-t,2)*t*h[f]+3*(1-t)*Math.pow(t,2)*u[f]+Math.pow(t,3)*c[f]},p=6*l[f]-12*h[f]+6*u[f],d=-3*l[f]+9*h[f]-9*u[f]+3*c[f],y=3*h[f]-3*l[f];if(0!=d){var v=Math.pow(p,2)-4*y*d;if(!(v<0)){var g=(-p+Math.sqrt(v))/(2*d);0<g&&g<1&&(0==f&&this.addX(m(g)),1==f&&this.addY(m(g)));var x=(-p-Math.sqrt(v))/(2*d);0<x&&x<1&&(0==f&&this.addX(m(x)),1==f&&this.addY(m(x)))}}else{if(0==p)continue;var b=-y/p;0<b&&b<1&&(0==f&&this.addX(m(b)),1==f&&this.addY(m(b)))}}},this.isPointInBox=function(t,e){return this.x1<=t&&t<=this.x2&&this.y1<=e&&e<=this.y2},this.addPoint(t,e),this.addPoint(i,n)},A.Transform=function(t){var e=this;this.Type={},this.Type.translate=function(t){this.p=A.CreatePoint(t),this.apply=function(t){t.translate(this.p.x||0,this.p.y||0)},this.unapply=function(t){t.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(t){t.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(t){var e=A.ToNumberArray(t);this.angle=new A.Property("angle",e[0]),this.cx=e[1]||0,this.cy=e[2]||0,this.apply=function(t){t.translate(this.cx,this.cy),t.rotate(this.angle.toRadians()),t.translate(-this.cx,-this.cy)},this.unapply=function(t){t.translate(this.cx,this.cy),t.rotate(-1*this.angle.toRadians()),t.translate(-this.cx,-this.cy)},this.applyToPoint=function(t){var e=this.angle.toRadians();t.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),t.applyTransform([Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]),t.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(t){this.p=A.CreatePoint(t),this.apply=function(t){t.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(t){t.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(t){t.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(t){this.m=A.ToNumberArray(t),this.apply=function(t){t.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(t){var e=this.m[0],i=this.m[2],n=this.m[4],s=this.m[1],a=this.m[3],r=this.m[5],o=1/(e*(1*a-0*r)-i*(1*s-0*r)+n*(0*s-0*a));t.transform(o*(1*a-0*r),o*(0*r-1*s),o*(0*n-1*i),o*(1*e-0*n),o*(i*r-n*a),o*(n*s-e*r))},this.applyToPoint=function(t){t.applyTransform(this.m)}},this.Type.SkewBase=function(t){this.base=e.Type.matrix,this.base(t),this.angle=new A.Property("angle",t)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(t){this.base=e.Type.SkewBase,this.base(t),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(t){this.base=e.Type.SkewBase,this.base(t),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(t){for(var e=0;e<this.transforms.length;e++)this.transforms[e].apply(t)},this.unapply=function(t){for(var e=this.transforms.length-1;0<=e;e--)this.transforms[e].unapply(t)},this.applyToPoint=function(t){for(var e=0;e<this.transforms.length;e++)this.transforms[e].applyToPoint(t)};for(var i=A.trim(A.compressSpaces(t)).replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/),n=0;n<i.length;n++)if("none"!==i[n]){var s=A.trim(i[n].split("(")[0]),a=i[n].split("(")[1].replace(")",""),r=this.Type[s];if(void 0!==r){var o=new r(a);o.type=s,this.transforms.push(o)}}},A.AspectRatio=function(t,e,i,n,s,a,r,o,l,h){var u=(e=(e=A.compressSpaces(e)).replace(/^defer\s/,"")).split(" ")[0]||"xMidYMid",c=e.split(" ")[1]||"meet",f=i/n,m=s/a,p=Math.min(f,m),d=Math.max(f,m);"meet"==c&&(n*=p,a*=p),"slice"==c&&(n*=d,a*=d),l=new A.Property("refX",l),h=new A.Property("refY",h),l.hasValue()&&h.hasValue()?t.translate(-p*l.toPixels("x"),-p*h.toPixels("y")):(u.match(/^xMid/)&&("meet"==c&&p==m||"slice"==c&&d==m)&&t.translate(i/2-n/2,0),u.match(/YMid$/)&&("meet"==c&&p==f||"slice"==c&&d==f)&&t.translate(0,s/2-a/2),u.match(/^xMax/)&&("meet"==c&&p==m||"slice"==c&&d==m)&&t.translate(i-n,0),u.match(/YMax$/)&&("meet"==c&&p==f||"slice"==c&&d==f)&&t.translate(0,s-a)),"none"==u?t.scale(f,m):"meet"==c?t.scale(p,p):"slice"==c&&t.scale(d,d),t.translate(null==r?0:-r,null==o?0:-o)},A.Element={},A.EmptyProperty=new A.Property("EMPTY",""),A.Element.ElementBase=function(a){this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(t,e){var i=this.attributes[t];return null!=i?i:(1==e&&(i=new A.Property(t,""),this.attributes[t]=i),i||A.EmptyProperty)},this.getHrefAttribute=function(){for(var t in this.attributes)if("href"==t||t.match(/:href$/))return this.attributes[t];return A.EmptyProperty},this.style=function(t,e,i){var n=this.styles[t];if(null!=n)return n;var s=this.attribute(t);if(null!=s&&s.hasValue())return this.styles[t]=s;if(1!=i){var a=this.parent;if(null!=a){var r=a.style(t);if(null!=r&&r.hasValue())return r}}return 1==e&&(n=new A.Property(t,""),this.styles[t]=n),n||A.EmptyProperty},this.render=function(t){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(t.save(),this.style("mask").hasValue()){var e=this.style("mask").getDefinition();null!=e&&e.apply(t,this)}else if(this.style("filter").hasValue()){var i=this.style("filter").getDefinition();null!=i&&i.apply(t,this)}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}},this.setContext=function(t){},this.clearContext=function(t){},this.renderChildren=function(t){for(var e=0;e<this.children.length;e++)this.children[e].render(t)},this.addChild=function(t,e){var i=t;e&&(i=A.CreateElement(t)),i.parent=this,"title"!=i.type&&this.children.push(i)},this.addStylesFromStyleDefinition=function(){for(var t in A.Styles)if("@"!=t[0]&&f(a,t)){var e=A.Styles[t],i=A.StylesSpecificity[t];if(null!=e)for(var n in e){var s=this.stylesSpecificity[n];void 0===s&&(s="000"),s<i&&(this.styles[n]=e[n],this.stylesSpecificity[n]=i)}}};var t,e=new RegExp("^[A-Z-]+$");if(null!=a&&1==a.nodeType){for(var i=0;i<a.attributes.length;i++){var n=a.attributes[i],s=(t=n.nodeName,e.test(t)?t.toLowerCase():t);this.attributes[s]=new A.Property(s,n.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue()){var r=this.attribute("style").value.split(";");for(i=0;i<r.length;i++)if(""!=A.trim(r[i])){var o=r[i].split(":"),l=A.trim(o[0]),h=A.trim(o[1]);this.styles[l]=new A.Property(l,h)}}for(this.attribute("id").hasValue()&&null==A.Definitions[this.attribute("id").value]&&(A.Definitions[this.attribute("id").value]=this),i=0;i<a.childNodes.length;i++){var u=a.childNodes[i];if(1==u.nodeType&&this.addChild(u,!0),this.captureTextNodes&&(3==u.nodeType||4==u.nodeType)){var c=u.value||u.text||u.textContent||"";""!=A.compressSpaces(c)&&this.addChild(new A.Element.tspan(u),!1)}}}},A.Element.RenderedElementBase=function(t){this.base=A.Element.ElementBase,this.base(t),this.calculateOpacity=function(){for(var t=1,e=this;null!=e;){var i=e.style("opacity",!1,!0);i.hasValue()&&(t*=i.numValue()),e=e.parent}return t},this.setContext=function(t,e){if(!e){var i;if(this.style("fill").isUrlDefinition())null!=(i=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity")))&&(t.fillStyle=i);else if(this.style("fill").hasValue()){var n;"currentColor"==(n=this.style("fill")).value&&(n.value=this.style("color").value),"inherit"!=n.value&&(t.fillStyle="none"==n.value?"rgba(0,0,0,0)":n.value)}if(this.style("fill-opacity").hasValue()&&(n=(n=new A.Property("fill",t.fillStyle)).addOpacity(this.style("fill-opacity")),t.fillStyle=n.value),this.style("stroke").isUrlDefinition())null!=(i=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity")))&&(t.strokeStyle=i);else if(this.style("stroke").hasValue()){var s;"currentColor"==(s=this.style("stroke")).value&&(s.value=this.style("color").value),"inherit"!=s.value&&(t.strokeStyle="none"==s.value?"rgba(0,0,0,0)":s.value)}if(this.style("stroke-opacity").hasValue()&&(s=(s=new A.Property("stroke",t.strokeStyle)).addOpacity(this.style("stroke-opacity")),t.strokeStyle=s.value),this.style("stroke-width").hasValue()){var a=this.style("stroke-width").toPixels();t.lineWidth=0==a?.001:a}if(this.style("stroke-linecap").hasValue()&&(t.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(t.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(t.miterLimit=this.style("stroke-miterlimit").value),this.style("paint-order").hasValue()&&(t.paintOrder=this.style("paint-order").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var r=A.ToNumberArray(this.style("stroke-dasharray").value);void 0!==t.setLineDash?t.setLineDash(r):void 0!==t.webkitLineDash?t.webkitLineDash=r:void 0===t.mozDash||1==r.length&&0==r[0]||(t.mozDash=r);var o=this.style("stroke-dashoffset").toPixels();void 0!==t.lineDashOffset?t.lineDashOffset=o:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=o:void 0!==t.mozDashOffset&&(t.mozDashOffset=o)}}if(void 0!==t.font){t.font=A.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString();var l=this.style("font-size",!1,!1);l.isPixels()&&(A.emSize=l.toPixels())}if(this.style("transform",!1,!0).hasValue()&&new A.Transform(this.style("transform",!1,!0).value).apply(t),this.style("clip-path",!1,!0).hasValue()){var h=this.style("clip-path",!1,!0).getDefinition();null!=h&&h.apply(t)}t.globalAlpha=this.calculateOpacity()}},A.Element.RenderedElementBase.prototype=new A.Element.ElementBase,A.Element.PathElementBase=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.path=function(t){return null!=t&&t.beginPath(),new A.BoundingBox},this.renderChildren=function(t){this.path(t),A.Mouse.checkPath(this,t),""!=t.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?t.fill(this.style("fill-rule").value):t.fill()),""!=t.strokeStyle&&t.stroke();var e=this.getMarkers();if(null!=e){if(this.style("marker-start").isUrlDefinition()&&(i=this.style("marker-start").getDefinition()).render(t,e[0][0],e[0][1]),this.style("marker-mid").isUrlDefinition())for(var i=this.style("marker-mid").getDefinition(),n=1;n<e.length-1;n++)i.render(t,e[n][0],e[n][1]);this.style("marker-end").isUrlDefinition()&&(i=this.style("marker-end").getDefinition()).render(t,e[e.length-1][0],e[e.length-1][1])}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},A.Element.PathElementBase.prototype=new A.Element.RenderedElementBase,A.Element.svg=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.baseClearContext=this.clearContext,this.clearContext=function(t){this.baseClearContext(t),A.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(t){if(t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4,t.canvas.style&&void 0!==t.font&&void 0!==u.getComputedStyle){t.font=u.getComputedStyle(t.canvas).getPropertyValue("font");var e=new A.Property("fontSize",A.Font.Parse(t.font).fontSize);e.hasValue()&&(A.rootEmSize=A.emSize=e.toPixels("y"))}this.baseSetContext(t),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),t.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var i=A.ViewPort.width(),n=A.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),void 0===this.root){i=this.attribute("width").toPixels("x"),n=this.attribute("height").toPixels("y");var s=0,a=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(s=-this.attribute("refX").toPixels("x"),a=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(t.beginPath(),t.moveTo(s,a),t.lineTo(i,a),t.lineTo(i,n),t.lineTo(s,n),t.closePath(),t.clip())}if(A.ViewPort.SetCurrent(i,n),this.attribute("viewBox").hasValue()){var r=A.ToNumberArray(this.attribute("viewBox").value),o=r[0],l=r[1];i=r[2],n=r[3],A.AspectRatio(t,this.attribute("preserveAspectRatio").value,A.ViewPort.width(),i,A.ViewPort.height(),n,o,l,this.attribute("refX").value,this.attribute("refY").value),A.ViewPort.RemoveCurrent(),A.ViewPort.SetCurrent(r[2],r[3])}}},A.Element.svg.prototype=new A.Element.RenderedElementBase,A.Element.rect=function(t){this.base=A.Element.PathElementBase,this.base(t),this.path=function(t){var e=this.attribute("x").toPixels("x"),i=this.attribute("y").toPixels("y"),n=this.attribute("width").toPixels("x"),s=this.attribute("height").toPixels("y"),a=this.attribute("rx").toPixels("x"),r=this.attribute("ry").toPixels("y");if(this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(r=a),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(a=r),a=Math.min(a,n/2),r=Math.min(r,s/2),null!=t){var o=(Math.sqrt(2)-1)/3*4;t.beginPath(),t.moveTo(e+a,i),t.lineTo(e+n-a,i),t.bezierCurveTo(e+n-a+o*a,i,e+n,i+r-o*r,e+n,i+r),t.lineTo(e+n,i+s-r),t.bezierCurveTo(e+n,i+s-r+o*r,e+n-a+o*a,i+s,e+n-a,i+s),t.lineTo(e+a,i+s),t.bezierCurveTo(e+a-o*a,i+s,e,i+s-r+o*r,e,i+s-r),t.lineTo(e,i+r),t.bezierCurveTo(e,i+r-o*r,e+a-o*a,i,e+a,i),t.closePath()}return new A.BoundingBox(e,i,e+n,i+s)}},A.Element.rect.prototype=new A.Element.PathElementBase,A.Element.circle=function(t){this.base=A.Element.PathElementBase,this.base(t),this.path=function(t){var e=this.attribute("cx").toPixels("x"),i=this.attribute("cy").toPixels("y"),n=this.attribute("r").toPixels();return null!=t&&(t.beginPath(),t.arc(e,i,n,0,2*Math.PI,!1),t.closePath()),new A.BoundingBox(e-n,i-n,e+n,i+n)}},A.Element.circle.prototype=new A.Element.PathElementBase,A.Element.ellipse=function(t){this.base=A.Element.PathElementBase,this.base(t),this.path=function(t){var e=(Math.sqrt(2)-1)/3*4,i=this.attribute("rx").toPixels("x"),n=this.attribute("ry").toPixels("y"),s=this.attribute("cx").toPixels("x"),a=this.attribute("cy").toPixels("y");return null!=t&&(t.beginPath(),t.moveTo(s+i,a),t.bezierCurveTo(s+i,a+e*n,s+e*i,a+n,s,a+n),t.bezierCurveTo(s-e*i,a+n,s-i,a+e*n,s-i,a),t.bezierCurveTo(s-i,a-e*n,s-e*i,a-n,s,a-n),t.bezierCurveTo(s+e*i,a-n,s+i,a-e*n,s+i,a),t.closePath()),new A.BoundingBox(s-i,a-n,s+i,a+n)}},A.Element.ellipse.prototype=new A.Element.PathElementBase,A.Element.line=function(t){this.base=A.Element.PathElementBase,this.base(t),this.getPoints=function(){return[new A.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new A.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(t){var e=this.getPoints();return null!=t&&(t.beginPath(),t.moveTo(e[0].x,e[0].y),t.lineTo(e[1].x,e[1].y)),new A.BoundingBox(e[0].x,e[0].y,e[1].x,e[1].y)},this.getMarkers=function(){var t=this.getPoints(),e=t[0].angleTo(t[1]);return[[t[0],e],[t[1],e]]}},A.Element.line.prototype=new A.Element.PathElementBase,A.Element.polyline=function(t){this.base=A.Element.PathElementBase,this.base(t),this.points=A.CreatePath(this.attribute("points").value),this.path=function(t){var e=new A.BoundingBox(this.points[0].x,this.points[0].y);null!=t&&(t.beginPath(),t.moveTo(this.points[0].x,this.points[0].y));for(var i=1;i<this.points.length;i++)e.addPoint(this.points[i].x,this.points[i].y),null!=t&&t.lineTo(this.points[i].x,this.points[i].y);return e},this.getMarkers=function(){for(var t=[],e=0;e<this.points.length-1;e++)t.push([this.points[e],this.points[e].angleTo(this.points[e+1])]);return 0<t.length&&t.push([this.points[this.points.length-1],t[t.length-1][1]]),t}},A.Element.polyline.prototype=new A.Element.PathElementBase,A.Element.polygon=function(t){this.base=A.Element.polyline,this.base(t),this.basePath=this.path,this.path=function(t){var e=this.basePath(t);return null!=t&&(t.lineTo(this.points[0].x,this.points[0].y),t.closePath()),e}},A.Element.polygon.prototype=new A.Element.polyline,A.Element.path=function(t){this.base=A.Element.PathElementBase,this.base(t);var e=this.attribute("d").value;e=e.replace(/,/gm," ");for(var i=0;i<2;i++)e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2");for(e=(e=e.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2")).replace(/([0-9])([+\-])/gm,"$1 $2"),i=0;i<2;i++)e=e.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");e=e.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 "),e=A.compressSpaces(e),e=A.trim(e),this.PathParser=new function(t){this.tokens=t.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new A.Point(0,0),this.control=new A.Point(0,0),this.current=new A.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var t=new A.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(t)},this.getAsControlPoint=function(){var t=this.getPoint();return this.control=t},this.getAsCurrentPoint=function(){var t=this.getPoint();return this.current=t},this.getReflectedControlPoint=function(){return"c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase()?this.current:new A.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)},this.makeAbsolute=function(t){return this.isRelativeCommand()&&(t.x+=this.current.x,t.y+=this.current.y),t},this.addMarker=function(t,e,i){null!=i&&0<this.angles.length&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(i)),this.addMarkerAngle(t,null==e?null:e.angleTo(t))},this.addMarkerAngle=function(t,e){this.points.push(t),this.angles.push(e)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var t=0;t<this.angles.length;t++)if(null==this.angles[t])for(var e=t+1;e<this.angles.length;e++)if(null!=this.angles[e]){this.angles[t]=this.angles[e];break}return this.angles}}(e),this.path=function(t){var e=this.PathParser;e.reset();var i=new A.BoundingBox;for(null!=t&&t.beginPath();!e.isEnd();)switch(e.nextCommand(),e.command){case"M":case"m":var n=e.getAsCurrentPoint();for(e.addMarker(n),i.addPoint(n.x,n.y),null!=t&&t.moveTo(n.x,n.y),e.start=e.current;!e.isCommandOrEnd();)n=e.getAsCurrentPoint(),e.addMarker(n,e.start),i.addPoint(n.x,n.y),null!=t&&t.lineTo(n.x,n.y);break;case"L":case"l":for(;!e.isCommandOrEnd();){var s=e.current;n=e.getAsCurrentPoint(),e.addMarker(n,s),i.addPoint(n.x,n.y),null!=t&&t.lineTo(n.x,n.y)}break;case"H":case"h":for(;!e.isCommandOrEnd();){var a=new A.Point((e.isRelativeCommand()?e.current.x:0)+e.getScalar(),e.current.y);e.addMarker(a,e.current),e.current=a,i.addPoint(e.current.x,e.current.y),null!=t&&t.lineTo(e.current.x,e.current.y)}break;case"V":case"v":for(;!e.isCommandOrEnd();)a=new A.Point(e.current.x,(e.isRelativeCommand()?e.current.y:0)+e.getScalar()),e.addMarker(a,e.current),e.current=a,i.addPoint(e.current.x,e.current.y),null!=t&&t.lineTo(e.current.x,e.current.y);break;case"C":case"c":for(;!e.isCommandOrEnd();){var r=e.current,o=e.getPoint(),l=e.getAsControlPoint(),h=e.getAsCurrentPoint();e.addMarker(h,l,o),i.addBezierCurve(r.x,r.y,o.x,o.y,l.x,l.y,h.x,h.y),null!=t&&t.bezierCurveTo(o.x,o.y,l.x,l.y,h.x,h.y)}break;case"S":case"s":for(;!e.isCommandOrEnd();)r=e.current,o=e.getReflectedControlPoint(),l=e.getAsControlPoint(),h=e.getAsCurrentPoint(),e.addMarker(h,l,o),i.addBezierCurve(r.x,r.y,o.x,o.y,l.x,l.y,h.x,h.y),null!=t&&t.bezierCurveTo(o.x,o.y,l.x,l.y,h.x,h.y);break;case"Q":case"q":for(;!e.isCommandOrEnd();)r=e.current,l=e.getAsControlPoint(),h=e.getAsCurrentPoint(),e.addMarker(h,l,l),i.addQuadraticCurve(r.x,r.y,l.x,l.y,h.x,h.y),null!=t&&t.quadraticCurveTo(l.x,l.y,h.x,h.y);break;case"T":case"t":for(;!e.isCommandOrEnd();)r=e.current,l=e.getReflectedControlPoint(),e.control=l,h=e.getAsCurrentPoint(),e.addMarker(h,l,l),i.addQuadraticCurve(r.x,r.y,l.x,l.y,h.x,h.y),null!=t&&t.quadraticCurveTo(l.x,l.y,h.x,h.y);break;case"A":case"a":for(;!e.isCommandOrEnd();){r=e.current;var u=e.getScalar(),c=e.getScalar(),f=e.getScalar()*(Math.PI/180),m=e.getScalar(),p=e.getScalar(),d=(h=e.getAsCurrentPoint(),new A.Point(Math.cos(f)*(r.x-h.x)/2+Math.sin(f)*(r.y-h.y)/2,-Math.sin(f)*(r.x-h.x)/2+Math.cos(f)*(r.y-h.y)/2)),y=Math.pow(d.x,2)/Math.pow(u,2)+Math.pow(d.y,2)/Math.pow(c,2);1<y&&(u*=Math.sqrt(y),c*=Math.sqrt(y));var v=(m==p?-1:1)*Math.sqrt((Math.pow(u,2)*Math.pow(c,2)-Math.pow(u,2)*Math.pow(d.y,2)-Math.pow(c,2)*Math.pow(d.x,2))/(Math.pow(u,2)*Math.pow(d.y,2)+Math.pow(c,2)*Math.pow(d.x,2)));isNaN(v)&&(v=0);var g=new A.Point(v*u*d.y/c,v*-c*d.x/u),x=new A.Point((r.x+h.x)/2+Math.cos(f)*g.x-Math.sin(f)*g.y,(r.y+h.y)/2+Math.sin(f)*g.x+Math.cos(f)*g.y),b=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))},P=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(b(t)*b(e))},E=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(P(t,e))},w=E([1,0],[(d.x-g.x)/u,(d.y-g.y)/c]),B=[(d.x-g.x)/u,(d.y-g.y)/c],C=[(-d.x-g.x)/u,(-d.y-g.y)/c],T=E(B,C);P(B,C)<=-1&&(T=Math.PI),1<=P(B,C)&&(T=0);var V=1-p?1:-1,M=w+V*(T/2),S=new A.Point(x.x+u*Math.cos(M),x.y+c*Math.sin(M));if(e.addMarkerAngle(S,M-V*Math.PI/2),e.addMarkerAngle(h,M-V*Math.PI),i.addPoint(h.x,h.y),null!=t){P=c<u?u:c;var k=c<u?1:u/c,D=c<u?c/u:1;t.translate(x.x,x.y),t.rotate(f),t.scale(k,D),t.arc(0,0,P,w,w+T,1-p),t.scale(1/k,1/D),t.rotate(-f),t.translate(-x.x,-x.y)}}break;case"Z":case"z":null!=t&&i.x1!==i.x2&&i.y1!==i.y2&&t.closePath(),e.current=e.start}return i},this.getMarkers=function(){for(var t=this.PathParser.getMarkerPoints(),e=this.PathParser.getMarkerAngles(),i=[],n=0;n<t.length;n++)i.push([t[n],e[n]]);return i}},A.Element.path.prototype=new A.Element.PathElementBase,A.Element.pattern=function(t){this.base=A.Element.ElementBase,this.base(t),this.createPattern=function(t,e){var i=this.attribute("width").toPixels("x",!0),n=this.attribute("height").toPixels("y",!0),s=new A.Element.svg;s.attributes.viewBox=new A.Property("viewBox",this.attribute("viewBox").value),s.attributes.width=new A.Property("width",i+"px"),s.attributes.height=new A.Property("height",n+"px"),s.attributes.transform=new A.Property("transform",this.attribute("patternTransform").value),s.children=this.children;var a=p();a.width=i,a.height=n;var r=a.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&r.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var o=-1;o<=1;o++)for(var l=-1;l<=1;l++)r.save(),s.attributes.x=new A.Property("x",o*a.width),s.attributes.y=new A.Property("y",l*a.height),s.render(r),r.restore();return t.createPattern(a,"repeat")}},A.Element.pattern.prototype=new A.Element.ElementBase,A.Element.marker=function(t){this.base=A.Element.ElementBase,this.base(t),this.baseRender=this.render,this.render=function(t,e,i){if(e){t.translate(e.x,e.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&t.rotate(i),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&t.scale(t.lineWidth,t.lineWidth),t.save();var n=new A.Element.svg;n.attributes.viewBox=new A.Property("viewBox",this.attribute("viewBox").value),n.attributes.refX=new A.Property("refX",this.attribute("refX").value),n.attributes.refY=new A.Property("refY",this.attribute("refY").value),n.attributes.width=new A.Property("width",this.attribute("markerWidth").value),n.attributes.height=new A.Property("height",this.attribute("markerHeight").value),n.attributes.fill=new A.Property("fill",this.attribute("fill").valueOrDefault("black")),n.attributes.stroke=new A.Property("stroke",this.attribute("stroke").valueOrDefault("none")),n.children=this.children,n.render(t),t.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&t.rotate(-i),t.translate(-e.x,-e.y)}}},A.Element.marker.prototype=new A.Element.ElementBase,A.Element.defs=function(t){this.base=A.Element.ElementBase,this.base(t),this.render=function(t){}},A.Element.defs.prototype=new A.Element.ElementBase,A.Element.GradientBase=function(t){this.base=A.Element.ElementBase,this.base(t),this.stops=[];for(var e=0;e<this.children.length;e++){var i=this.children[e];"stop"==i.type&&this.stops.push(i)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(t){for(var e=0;e<this.attributesToInherit.length;e++){var i=this.attributesToInherit[e];!this.attribute(i).hasValue()&&t.attribute(i).hasValue()&&(this.attribute(i,!0).value=t.attribute(i).value)}},this.createGradient=function(t,e,i){var n=this;this.getHrefAttribute().hasValue()&&(n=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(n));var s=function(t){return i.hasValue()?new A.Property("color",t).addOpacity(i).value:t},a=this.getGradient(t,e);if(null==a)return s(n.stops[n.stops.length-1].color);for(var r=0;r<n.stops.length;r++)a.addColorStop(n.stops[r].offset,s(n.stops[r].color));if(this.attribute("gradientTransform").hasValue()){var o=A.ViewPort.viewPorts[0],l=new A.Element.rect;l.attributes.x=new A.Property("x",-A.MAX_VIRTUAL_PIXELS/3),l.attributes.y=new A.Property("y",-A.MAX_VIRTUAL_PIXELS/3),l.attributes.width=new A.Property("width",A.MAX_VIRTUAL_PIXELS),l.attributes.height=new A.Property("height",A.MAX_VIRTUAL_PIXELS);var h=new A.Element.g;h.attributes.transform=new A.Property("transform",this.attribute("gradientTransform").value),h.children=[l];var u=new A.Element.svg;u.attributes.x=new A.Property("x",0),u.attributes.y=new A.Property("y",0),u.attributes.width=new A.Property("width",o.width),u.attributes.height=new A.Property("height",o.height),u.children=[h];var c=p();c.width=o.width,c.height=o.height;var f=c.getContext("2d");return f.fillStyle=a,u.render(f),f.createPattern(c,"no-repeat")}return a}},A.Element.GradientBase.prototype=new A.Element.ElementBase,A.Element.linearGradient=function(t){this.base=A.Element.GradientBase,this.base(t),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(t,e){var i="objectBoundingBox"==this.gradientUnits()?e.getBoundingBox(t):null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var n="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),s="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),a="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),r="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return n==a&&s==r?null:t.createLinearGradient(n,s,a,r)}},A.Element.linearGradient.prototype=new A.Element.GradientBase,A.Element.radialGradient=function(t){this.base=A.Element.GradientBase,this.base(t),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(t,e){var i=e.getBoundingBox(t);this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var n="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),s="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),a=n,r=s;this.attribute("fx").hasValue()&&(a="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(r="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var o="objectBoundingBox"==this.gradientUnits()?(i.width()+i.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return t.createRadialGradient(a,r,0,n,s,o)}},A.Element.radialGradient.prototype=new A.Element.GradientBase,A.Element.stop=function(t){this.base=A.Element.ElementBase,this.base(t),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),1<this.offset&&(this.offset=1);var e=this.style("stop-color",!0);""===e.value&&(e.value="#000"),this.style("stop-opacity").hasValue()&&(e=e.addOpacity(this.style("stop-opacity"))),this.color=e.value},A.Element.stop.prototype=new A.Element.ElementBase,A.Element.AnimateBase=function(t){this.base=A.Element.ElementBase,this.base(t),A.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var t=this.attribute("attributeType").value,e=this.attribute("attributeName").value;return"CSS"==t?this.parent.style(e,!0):this.parent.attribute(e,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(t){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+t;var e=!1;if(this.begin<this.duration){var i=this.calcValue();this.attribute("type").hasValue()&&(i=this.attribute("type").value+"("+i+")"),this.getProperty().value=i,e=!0}return e},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var t={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var e=t.progress*(this.values.value.length-1),i=Math.floor(e),n=Math.ceil(e);t.from=new A.Property("from",parseFloat(this.values.value[i])),t.to=new A.Property("to",parseFloat(this.values.value[n])),t.progress=(e-i)/(n-i)}else t.from=this.from,t.to=this.to;return t}},A.Element.AnimateBase.prototype=new A.Element.ElementBase,A.Element.animate=function(t){this.base=A.Element.AnimateBase,this.base(t),this.calcValue=function(){var t=this.progress();return t.from.numValue()+(t.to.numValue()-t.from.numValue())*t.progress+this.initialUnits}},A.Element.animate.prototype=new A.Element.AnimateBase,A.Element.animateColor=function(t){this.base=A.Element.AnimateBase,this.base(t),this.calcValue=function(){var t=this.progress(),e=new m(t.from.value),i=new m(t.to.value);if(e.ok&&i.ok){var n=e.r+(i.r-e.r)*t.progress,s=e.g+(i.g-e.g)*t.progress,a=e.b+(i.b-e.b)*t.progress;return"rgb("+parseInt(n,10)+","+parseInt(s,10)+","+parseInt(a,10)+")"}return this.attribute("from").value}},A.Element.animateColor.prototype=new A.Element.AnimateBase,A.Element.animateTransform=function(t){this.base=A.Element.AnimateBase,this.base(t),this.calcValue=function(){for(var t=this.progress(),e=A.ToNumberArray(t.from.value),i=A.ToNumberArray(t.to.value),n="",s=0;s<e.length;s++)n+=e[s]+(i[s]-e[s])*t.progress+" ";return n}},A.Element.animateTransform.prototype=new A.Element.animate,A.Element.font=function(t){this.base=A.Element.ElementBase,this.base(t),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var e=0;e<this.children.length;e++){var i=this.children[e];"font-face"==i.type?(this.fontFace=i).style("font-family").hasValue()&&(A.Definitions[i.style("font-family").value]=this):"missing-glyph"==i.type?this.missingGlyph=i:"glyph"==i.type&&(""!=i.arabicForm?(this.isRTL=!0,this.isArabic=!0,void 0===this.glyphs[i.unicode]&&(this.glyphs[i.unicode]=[]),this.glyphs[i.unicode][i.arabicForm]=i):this.glyphs[i.unicode]=i)}},A.Element.font.prototype=new A.Element.ElementBase,A.Element.fontface=function(t){this.base=A.Element.ElementBase,this.base(t),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},A.Element.fontface.prototype=new A.Element.ElementBase,A.Element.missingglyph=function(t){this.base=A.Element.path,this.base(t),this.horizAdvX=0},A.Element.missingglyph.prototype=new A.Element.path,A.Element.glyph=function(t){this.base=A.Element.path,this.base(t),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},A.Element.glyph.prototype=new A.Element.path,A.Element.text=function(t){this.captureTextNodes=!0,this.base=A.Element.RenderedElementBase,this.base(t),this.baseSetContext=this.setContext,this.setContext=function(t){this.baseSetContext(t);var e=this.style("dominant-baseline").toTextBaseline();null==e&&(e=this.style("alignment-baseline").toTextBaseline()),null!=e&&(t.textBaseline=e)},this.initializeCoordinates=function(t){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(t,this,0)},this.getBoundingBox=function(t){this.initializeCoordinates(t);for(var e=null,i=0;i<this.children.length;i++){var n=this.getChildBoundingBox(t,this,this,i);null==e?e=n:e.addBoundingBox(n)}return e},this.renderChildren=function(t){this.initializeCoordinates(t);for(var e=0;e<this.children.length;e++)this.renderChild(t,this,this,e)},this.getAnchorDelta=function(t,e,i){var n=this.style("text-anchor").valueOrDefault("start");if("start"!=n){for(var s=0,a=i;a<e.children.length;a++){var r=e.children[a];if(i<a&&r.attribute("x").hasValue())break;s+=r.measureTextRecursive(t)}return-1*("end"==n?s:s/2)}return 0},this.adjustChildCoordinates=function(t,e,i,n){var s=i.children[n];return s.attribute("x").hasValue()?(s.x=s.attribute("x").toPixels("x")+e.getAnchorDelta(t,i,n),s.attribute("dx").hasValue()&&(s.x+=s.attribute("dx").toPixels("x"))):(s.attribute("dx").hasValue()&&(e.x+=s.attribute("dx").toPixels("x")),s.x=e.x),e.x=s.x+s.measureText(t),s.attribute("y").hasValue()?(s.y=s.attribute("y").toPixels("y"),s.attribute("dy").hasValue()&&(s.y+=s.attribute("dy").toPixels("y"))):(s.attribute("dy").hasValue()&&(e.y+=s.attribute("dy").toPixels("y")),s.y=e.y),e.y=s.y,s},this.getChildBoundingBox=function(t,e,i,n){var s=this.adjustChildCoordinates(t,e,i,n),a=s.getBoundingBox(t);for(n=0;n<s.children.length;n++){var r=e.getChildBoundingBox(t,e,s,n);a.addBoundingBox(r)}return a},this.renderChild=function(t,e,i,n){var s=this.adjustChildCoordinates(t,e,i,n);for(s.render(t),n=0;n<s.children.length;n++)e.renderChild(t,e,s,n)}},A.Element.text.prototype=new A.Element.RenderedElementBase,A.Element.TextElementBase=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.getGlyph=function(t,e,i){var n=e[i],s=null;if(t.isArabic){var a="isolated";(0==i||" "==e[i-1])&&i<e.length-2&&" "!=e[i+1]&&(a="terminal"),0<i&&" "!=e[i-1]&&i<e.length-2&&" "!=e[i+1]&&(a="medial"),0<i&&" "!=e[i-1]&&(i==e.length-1||" "==e[i+1])&&(a="initial"),void 0!==t.glyphs[n]&&null==(s=t.glyphs[n][a])&&"glyph"==t.glyphs[n].type&&(s=t.glyphs[n])}else s=t.glyphs[n];return null==s&&(s=t.missingGlyph),s},this.renderChildren=function(t){var e=this.parent.style("font-family").getDefinition();if(null==e)"stroke"==t.paintOrder?(""!=t.strokeStyle&&t.strokeText(A.compressSpaces(this.getText()),this.x,this.y),""!=t.fillStyle&&t.fillText(A.compressSpaces(this.getText()),this.x,this.y)):(""!=t.fillStyle&&t.fillText(A.compressSpaces(this.getText()),this.x,this.y),""!=t.strokeStyle&&t.strokeText(A.compressSpaces(this.getText()),this.x,this.y));else{var i=this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize),n=this.parent.style("font-style").valueOrDefault(A.Font.Parse(A.ctx.font).fontStyle),s=this.getText();e.isRTL&&(s=s.split("").reverse().join(""));for(var a=A.ToNumberArray(this.parent.attribute("dx").value),r=0;r<s.length;r++){var o=this.getGlyph(e,s,r),l=i/e.fontFace.unitsPerEm;t.translate(this.x,this.y),t.scale(l,-l);var h=t.lineWidth;t.lineWidth=t.lineWidth*e.fontFace.unitsPerEm/i,"italic"==n&&t.transform(1,0,.4,1,0,0),o.render(t),"italic"==n&&t.transform(1,0,-.4,1,0,0),t.lineWidth=h,t.scale(1/l,-1/l),t.translate(-this.x,-this.y),this.x+=i*(o.horizAdvX||e.horizAdvX)/e.fontFace.unitsPerEm,void 0===a[r]||isNaN(a[r])||(this.x+=a[r])}}},this.getText=function(){},this.measureTextRecursive=function(t){for(var e=this.measureText(t),i=0;i<this.children.length;i++)e+=this.children[i].measureTextRecursive(t);return e},this.measureText=function(t){var e=this.parent.style("font-family").getDefinition();if(null!=e){var i=this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize),n=0,s=this.getText();e.isRTL&&(s=s.split("").reverse().join(""));for(var a=A.ToNumberArray(this.parent.attribute("dx").value),r=0;r<s.length;r++)n+=(this.getGlyph(e,s,r).horizAdvX||e.horizAdvX)*i/e.fontFace.unitsPerEm,void 0===a[r]||isNaN(a[r])||(n+=a[r]);return n}var o=A.compressSpaces(this.getText());if(!t.measureText)return 10*o.length;t.save(),this.setContext(t,!0);var l=t.measureText(o).width;return t.restore(),l},this.getBoundingBox=function(t){var e=this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize);return new A.BoundingBox(this.x,this.y-e,this.x+this.measureText(t),this.y)}},A.Element.TextElementBase.prototype=new A.Element.RenderedElementBase,A.Element.tspan=function(t){this.captureTextNodes=!0,this.base=A.Element.TextElementBase,this.base(t),this.text=A.compressSpaces(t.value||t.text||t.textContent||""),this.getText=function(){return 0<this.children.length?"":this.text}},A.Element.tspan.prototype=new A.Element.TextElementBase,A.Element.tref=function(t){this.base=A.Element.TextElementBase,this.base(t),this.getText=function(){var t=this.getHrefAttribute().getDefinition();if(null!=t)return t.children[0].getText()}},A.Element.tref.prototype=new A.Element.TextElementBase,A.Element.a=function(t){this.base=A.Element.TextElementBase,this.base(t),this.hasText=0<t.childNodes.length;for(var e=0;e<t.childNodes.length;e++)3!=t.childNodes[e].nodeType&&(this.hasText=!1);this.text=this.hasText?t.childNodes[0].value||t.childNodes[0].data:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(t){if(this.hasText){this.baseRenderChildren(t);var e=new A.Property("fontSize",A.Font.Parse(A.ctx.font).fontSize);A.Mouse.checkBoundingBox(this,new A.BoundingBox(this.x,this.y-e.toPixels("y"),this.x+this.measureText(t),this.y))}else if(0<this.children.length){var i=new A.Element.g;i.children=this.children,i.parent=this,i.render(t)}},this.onclick=function(){u.open(this.getHrefAttribute().value)},this.onmousemove=function(){A.ctx.canvas.style.cursor="pointer"}},A.Element.a.prototype=new A.Element.TextElementBase,A.Element.image=function(t){this.base=A.Element.RenderedElementBase,this.base(t);var e=this.getHrefAttribute().value;if(""!=e){var a=e.match(/\.svg$/);if(A.Images.push(this),this.loaded=!1,a)this.img=A.ajax(e),this.loaded=!0;else{this.img=document.createElement("img"),1==A.opts.useCORS&&(this.img.crossOrigin="Anonymous");var r=this;this.img.onload=function(){r.loaded=!0},this.img.onerror=function(){A.log('ERROR: image "'+e+'" not found'),r.loaded=!0},this.img.src=e}this.renderChildren=function(t){var e=this.attribute("x").toPixels("x"),i=this.attribute("y").toPixels("y"),n=this.attribute("width").toPixels("x"),s=this.attribute("height").toPixels("y");0!=n&&0!=s&&(t.save(),a?t.drawSvg(this.img,e,i,n,s):(t.translate(e,i),A.AspectRatio(t,this.attribute("preserveAspectRatio").value,n,this.img.width,s,this.img.height,0,0),r.loaded&&(void 0===this.img.complete||this.img.complete)&&t.drawImage(this.img,0,0)),t.restore())},this.getBoundingBox=function(){var t=this.attribute("x").toPixels("x"),e=this.attribute("y").toPixels("y"),i=this.attribute("width").toPixels("x"),n=this.attribute("height").toPixels("y");return new A.BoundingBox(t,e,t+i,e+n)}}},A.Element.image.prototype=new A.Element.RenderedElementBase,A.Element.g=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.getBoundingBox=function(t){for(var e=new A.BoundingBox,i=0;i<this.children.length;i++)e.addBoundingBox(this.children[i].getBoundingBox(t));return e}},A.Element.g.prototype=new A.Element.RenderedElementBase,A.Element.symbol=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.render=function(t){}},A.Element.symbol.prototype=new A.Element.RenderedElementBase,A.Element.style=function(t){this.base=A.Element.ElementBase,this.base(t);for(var e="",i=0;i<t.childNodes.length;i++)e+=t.childNodes[i].data;e=e.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"");var n=(e=A.compressSpaces(e)).split("}");for(i=0;i<n.length;i++)if(""!=A.trim(n[i]))for(var s=n[i].split("{"),a=s[0].split(","),r=s[1].split(";"),o=0;o<a.length;o++){var l=A.trim(a[o]);if(""!=l){for(var h=A.Styles[l]||{},u=0;u<r.length;u++){var c=r[u].indexOf(":"),f=r[u].substr(0,c),m=r[u].substr(c+1,r[u].length-c);null!=f&&null!=m&&(h[A.trim(f)]=new A.Property(A.trim(f),A.trim(m)))}if(A.Styles[l]=h,A.StylesSpecificity[l]=w(l),"@font-face"==l)for(var p=h["font-family"].value.replace(/"/g,""),d=h.src.value.split(","),y=0;y<d.length;y++)if(0<d[y].indexOf('format("svg")'))for(var v=d[y].indexOf("url"),g=d[y].indexOf(")",v),x=d[y].substr(v+5,g-v-6),b=A.parseXml(A.ajax(x)).getElementsByTagName("font"),P=0;P<b.length;P++){var E=A.CreateElement(b[P]);A.Definitions[p]=E}}}},A.Element.style.prototype=new A.Element.ElementBase,A.Element.use=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.baseSetContext=this.setContext,this.setContext=function(t){this.baseSetContext(t),this.attribute("x").hasValue()&&t.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&t.translate(0,this.attribute("y").toPixels("y"))};var n=this.getHrefAttribute().getDefinition();this.path=function(t){null!=n&&n.path(t)},this.elementTransform=function(){if(null!=n&&n.style("transform",!1,!0).hasValue())return new A.Transform(n.style("transform",!1,!0).value)},this.getBoundingBox=function(t){if(null!=n)return n.getBoundingBox(t)},this.renderChildren=function(t){if(null!=n){var e=n;"symbol"==n.type&&((e=new A.Element.svg).type="svg",e.attributes.viewBox=new A.Property("viewBox",n.attribute("viewBox").value),e.attributes.preserveAspectRatio=new A.Property("preserveAspectRatio",n.attribute("preserveAspectRatio").value),e.attributes.overflow=new A.Property("overflow",n.attribute("overflow").value),e.children=n.children),"svg"==e.type&&(this.attribute("width").hasValue()&&(e.attributes.width=new A.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(e.attributes.height=new A.Property("height",this.attribute("height").value)));var i=e.parent;e.parent=null,e.render(t),e.parent=i}}},A.Element.use.prototype=new A.Element.RenderedElementBase,A.Element.mask=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e){var i=this.attribute("x").toPixels("x"),n=this.attribute("y").toPixels("y"),s=this.attribute("width").toPixels("x"),a=this.attribute("height").toPixels("y");if(0==s&&0==a){for(var r=new A.BoundingBox,o=0;o<this.children.length;o++)r.addBoundingBox(this.children[o].getBoundingBox(t));i=Math.floor(r.x1),n=Math.floor(r.y1),s=Math.floor(r.width()),a=Math.floor(r.height())}var l=e.attribute("mask").value;e.attribute("mask").value="";var h=p();h.width=i+s,h.height=n+a;var u=h.getContext("2d");this.renderChildren(u);var c=p();c.width=i+s,c.height=n+a;var f=c.getContext("2d");e.render(f),f.globalCompositeOperation="destination-in",f.fillStyle=u.createPattern(h,"no-repeat"),f.fillRect(0,0,i+s,n+a),t.fillStyle=f.createPattern(c,"no-repeat"),t.fillRect(0,0,i+s,n+a),e.attribute("mask").value=l},this.render=function(t){}},A.Element.mask.prototype=new A.Element.ElementBase,A.Element.clipPath=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t){var e="undefined"!=typeof CanvasRenderingContext2D,i=t.beginPath,n=t.closePath;e&&(CanvasRenderingContext2D.prototype.beginPath=function(){},CanvasRenderingContext2D.prototype.closePath=function(){}),i.call(t);for(var s=0;s<this.children.length;s++){var a=this.children[s];if(void 0!==a.path){var r=void 0!==a.elementTransform&&a.elementTransform();!r&&a.style("transform",!1,!0).hasValue()&&(r=new A.Transform(a.style("transform",!1,!0).value)),r&&r.apply(t),a.path(t),e&&(CanvasRenderingContext2D.prototype.closePath=n),r&&r.unapply(t)}}n.call(t),t.clip(),e&&(CanvasRenderingContext2D.prototype.beginPath=i,CanvasRenderingContext2D.prototype.closePath=n)},this.render=function(t){}},A.Element.clipPath.prototype=new A.Element.ElementBase,A.Element.filter=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e){var i=e.getBoundingBox(t),n=Math.floor(i.x1),s=Math.floor(i.y1),a=Math.floor(i.width()),r=Math.floor(i.height()),o=e.style("filter").value;e.style("filter").value="";for(var l=0,h=0,u=0;u<this.children.length;u++){var c=this.children[u].extraFilterDistance||0;l=Math.max(l,c),h=Math.max(h,c)}var f=p();f.width=a+2*l,f.height=r+2*h;var m=f.getContext("2d");for(m.translate(-n+l,-s+h),e.render(m),u=0;u<this.children.length;u++)"function"==typeof this.children[u].apply&&this.children[u].apply(m,0,0,a+2*l,r+2*h);t.drawImage(f,0,0,a+2*l,r+2*h,n-l,s-h,a+2*l,r+2*h),e.style("filter",!0).value=o},this.render=function(t){}},A.Element.filter.prototype=new A.Element.ElementBase,A.Element.feMorphology=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e,i,n,s){}},A.Element.feMorphology.prototype=new A.Element.ElementBase,A.Element.feComposite=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e,i,n,s){}},A.Element.feComposite.prototype=new A.Element.ElementBase,A.Element.feColorMatrix=function(t){this.base=A.Element.ElementBase,this.base(t);var n=A.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var e=n[0];n=[.213+.787*e,.715-.715*e,.072-.072*e,0,0,.213-.213*e,.715+.285*e,.072-.072*e,0,0,.213-.213*e,.715-.715*e,.072+.928*e,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var s=n[0]*Math.PI/180,i=function(t,e,i){return t+Math.cos(s)*e+Math.sin(s)*i};n=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}function u(t,e,i,n,s,a){return t[i*n*4+4*e+a]}function c(t,e,i,n,s,a,r){t[i*n*4+4*e+a]=r}function f(t,e){var i=n[t];return i*(i<0?e-255:e)}this.apply=function(t,e,i,n,s){var a=t.getImageData(0,0,n,s);for(i=0;i<s;i++)for(e=0;e<n;e++){var r=u(a.data,e,i,n,0,0),o=u(a.data,e,i,n,0,1),l=u(a.data,e,i,n,0,2),h=u(a.data,e,i,n,0,3);c(a.data,e,i,n,0,0,f(0,r)+f(1,o)+f(2,l)+f(3,h)+f(4,1)),c(a.data,e,i,n,0,1,f(5,r)+f(6,o)+f(7,l)+f(8,h)+f(9,1)),c(a.data,e,i,n,0,2,f(10,r)+f(11,o)+f(12,l)+f(13,h)+f(14,1)),c(a.data,e,i,n,0,3,f(15,r)+f(16,o)+f(17,l)+f(18,h)+f(19,1))}t.clearRect(0,0,n,s),t.putImageData(a,0,0)}},A.Element.feColorMatrix.prototype=new A.Element.ElementBase,A.Element.feGaussianBlur=function(t){this.base=A.Element.ElementBase,this.base(t),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(t,e,i,n,s){d&&void 0!==d.canvasRGBA?(t.canvas.id=A.UniqueId(),t.canvas.style.display="none",document.body.appendChild(t.canvas),d.canvasRGBA(t.canvas,e,i,n,s,this.blurRadius),document.body.removeChild(t.canvas)):A.log("ERROR: StackBlur.js must be included for blur to work")}},A.Element.feGaussianBlur.prototype=new A.Element.ElementBase,A.Element.title=function(t){},A.Element.title.prototype=new A.Element.ElementBase,A.Element.desc=function(t){},A.Element.desc.prototype=new A.Element.ElementBase,A.Element.MISSING=function(t){A.log("ERROR: Element '"+t.nodeName+"' not yet implemented.")},A.Element.MISSING.prototype=new A.Element.ElementBase,A.CreateElement=function(t){var e=t.nodeName.replace(/^[^:]+:/,"");e=e.replace(/\-/g,"");var i=null;return(i=void 0!==A.Element[e]?new A.Element[e](t):new A.Element.MISSING(t)).type=t.nodeName,i},A.load=function(t,e){A.loadXml(t,A.ajax(e))},A.loadXml=function(t,e){A.loadXmlDoc(t,A.parseXml(e))},A.loadXmlDoc=function(a,r){A.init(a);var i=function(t){for(var e=a.canvas;e;)t.x-=e.offsetLeft,t.y-=e.offsetTop,e=e.offsetParent;return u.scrollX&&(t.x+=u.scrollX),u.scrollY&&(t.y+=u.scrollY),t};1!=A.opts.ignoreMouse&&(a.canvas.onclick=function(t){var e=i(new A.Point(null!=t?t.clientX:event.clientX,null!=t?t.clientY:event.clientY));A.Mouse.onclick(e.x,e.y)},a.canvas.onmousemove=function(t){var e=i(new A.Point(null!=t?t.clientX:event.clientX,null!=t?t.clientY:event.clientY));A.Mouse.onmousemove(e.x,e.y)});var o=A.CreateElement(r.documentElement);o.root=!0,o.addStylesFromStyleDefinition();var l=!0,n=function(){A.ViewPort.Clear(),a.canvas.parentNode?A.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight):A.ViewPort.SetCurrent(800,600),1!=A.opts.ignoreDimensions&&(o.style("width").hasValue()&&(a.canvas.width=o.style("width").toPixels("x"),a.canvas.style&&(a.canvas.style.width=a.canvas.width+"px")),o.style("height").hasValue()&&(a.canvas.height=o.style("height").toPixels("y"),a.canvas.style&&(a.canvas.style.height=a.canvas.height+"px")));var t=a.canvas.clientWidth||a.canvas.width,e=a.canvas.clientHeight||a.canvas.height;if(1==A.opts.ignoreDimensions&&o.style("width").hasValue()&&o.style("height").hasValue()&&(t=o.style("width").toPixels("x"),e=o.style("height").toPixels("y")),A.ViewPort.SetCurrent(t,e),null!=A.opts.offsetX&&(o.attribute("x",!0).value=A.opts.offsetX),null!=A.opts.offsetY&&(o.attribute("y",!0).value=A.opts.offsetY),null!=A.opts.scaleWidth||null!=A.opts.scaleHeight){var i=null,n=null,s=A.ToNumberArray(o.attribute("viewBox").value);null!=A.opts.scaleWidth&&(o.attribute("width").hasValue()?i=o.attribute("width").toPixels("x")/A.opts.scaleWidth:isNaN(s[2])||(i=s[2]/A.opts.scaleWidth)),null!=A.opts.scaleHeight&&(o.attribute("height").hasValue()?n=o.attribute("height").toPixels("y")/A.opts.scaleHeight:isNaN(s[3])||(n=s[3]/A.opts.scaleHeight)),null==i&&(i=n),null==n&&(n=i),o.attribute("width",!0).value=A.opts.scaleWidth,o.attribute("height",!0).value=A.opts.scaleHeight,o.style("transform",!0,!0).value+=" scale("+1/i+","+1/n+")"}1!=A.opts.ignoreClear&&a.clearRect(0,0,t,e),o.render(a),l&&(l=!1,"function"==typeof A.opts.renderCallback&&A.opts.renderCallback(r))},s=!0;A.ImagesLoaded()&&(s=!1,n()),A.intervalID=setInterval(function(){var t=!1;if(s&&A.ImagesLoaded()&&(t=!(s=!1)),1!=A.opts.ignoreMouse&&(t|=A.Mouse.hasEvents()),1!=A.opts.ignoreAnimation)for(var e=0;e<A.Animations.length;e++)t|=A.Animations[e].update(1e3/A.FRAMERATE);"function"==typeof A.opts.forceRedraw&&1==A.opts.forceRedraw()&&(t=!0),t&&(n(),A.Mouse.runEvents())},1e3/A.FRAMERATE)},A.stop=function(){A.intervalID&&clearInterval(A.intervalID)},A.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(t,e){this.events.push({type:"onclick",x:t,y:e,run:function(t){t.onclick&&t.onclick()}})},this.onmousemove=function(t,e){this.events.push({type:"onmousemove",x:t,y:e,run:function(t){t.onmousemove&&t.onmousemove()}})},this.eventElements=[],this.checkPath=function(t,e){for(var i=0;i<this.events.length;i++){var n=this.events[i];e.isPointInPath&&e.isPointInPath(n.x,n.y)&&(this.eventElements[i]=t)}},this.checkBoundingBox=function(t,e){for(var i=0;i<this.events.length;i++){var n=this.events[i];e.isPointInBox(n.x,n.y)&&(this.eventElements[i]=t)}},this.runEvents=function(){A.ctx.canvas.style.cursor="";for(var t=0;t<this.events.length;t++)for(var e=this.events[t],i=this.eventElements[t];i;)e.run(i),i=i.parent;this.events=[],this.eventElements=[]}},A}(i||{});"string"==typeof t&&(t=document.getElementById(t)),null!=t.svg&&t.svg.stop(),t.childNodes&&1==t.childNodes.length&&"OBJECT"==t.childNodes[0].nodeName||(t.svg=n);var s=t.getContext("2d");void 0!==e.documentElement?n.loadXmlDoc(s,e):"<"==e.substr(0,1)?n.loadXml(s,e):n.load(s,e)}else for(var a=document.querySelectorAll("svg"),r=0;r<a.length;r++){var o=a[r],l=document.createElement("canvas");l.width=o.clientWidth,l.height=o.clientHeight,o.parentNode.insertBefore(l,o),o.parentNode.removeChild(o);var h=document.createElement("div");h.appendChild(o),c(l,h.innerHTML)}};"undefined"==typeof Element||(void 0!==Element.prototype.matches?f=function(t,e){return t.matches(e)}:void 0!==Element.prototype.webkitMatchesSelector?f=function(t,e){return t.webkitMatchesSelector(e)}:void 0!==Element.prototype.mozMatchesSelector?f=function(t,e){return t.mozMatchesSelector(e)}:void 0!==Element.prototype.msMatchesSelector?f=function(t,e){return t.msMatchesSelector(e)}:void 0!==Element.prototype.oMatchesSelector?f=function(t,e){return t.oMatchesSelector(e)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(f=function(t,e){return $(t).is(e)}),void 0===f&&"undefined"!=typeof Sizzle&&(f=Sizzle.matchesSelector)));var e=/(\[[^\]]+\])/g,i=/(#[^\s\+>~\.\[:]+)/g,a=/(\.[^\s\+>~\.\[:]+)/g,r=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,o=/(:[\w-]+\([^\)]*\))/gi,l=/(:[^\s\+>~\.\[:]+)/g,h=/([^\s\+>~\.\[:]+)/g;function w(n){var s=[0,0,0],t=function(t,e){var i=n.match(t);null!=i&&(s[e]+=i.length,n=n.replace(t," "))};return n=(n=n.replace(/:not\(([^\)]*)\)/g," $1 ")).replace(/{[\s\S]*/gm," "),t(e,1),t(i,0),t(a,1),t(r,2),t(o,1),t(l,1),n=(n=n.replace(/[\*\s\+>~]/g," ")).replace(/[#\.]/g," "),t(h,2),s.join("")}"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(t,e,i,n,s,a){var r={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:e,offsetY:i,scaleWidth:n,scaleHeight:s};for(var o in a)a.hasOwnProperty(o)&&(r[o]=a[o]);c(this.canvas,t,r)}),t.exports=c}(t={exports:{}},t.exports),t.exports});
- /***/ }),
- /***/ "d6e6":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _Events2 = __webpack_require__("e3e2");
- var _MunicipalCenter = _interopRequireDefault(__webpack_require__("b7bd"));
- var _ProvinceCenter = _interopRequireDefault(__webpack_require__("2c06"));
- __webpack_require__("3ef3");
- __webpack_require__("c978");
- var _lodash = _interopRequireDefault(__webpack_require__("30f7"));
- var _canvg = _interopRequireDefault(__webpack_require__("d6a7"));
- var _WebMapService = _interopRequireDefault(__webpack_require__("f875"));
- var _util = __webpack_require__("1448");
- var MAX_MIGRATION_ANIMATION_COUNT = 1000;
- var WebMapBase =
- /*#__PURE__*/
- function (_Events) {
- (0, _inherits2.default)(WebMapBase, _Events);
- function WebMapBase(id, options, mapOptions) {
- var _this;
- (0, _classCallCheck2.default)(this, WebMapBase);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(WebMapBase).call(this));
- _this.echartslayer = [];
- _this._layers = [];
- _this.serverUrl = options.serverUrl || 'https://www.supermapol.com';
- _this.accessToken = options.accessToken;
- _this.accessKey = options.accessKey;
- _this.tiandituKey = options.tiandituKey || '';
- _this.withCredentials = options.withCredentials || false;
- _this.proxy = options.proxy;
- _this.target = options.target || 'map';
- _this.excludePortalProxyUrl = options.excludePortalProxyUrl;
- _this.isSuperMapOnline = options.isSuperMapOnline;
- _this.ignoreBaseProjection = options.ignoreBaseProjection;
- _this.echartslayer = [];
- _this.webMapService = new _WebMapService.default(id, options);
- _this.mapOptions = mapOptions;
- _this.eventTypes = ['getmapinfofailed', 'crsnotsupport', 'getlayerdatasourcefailed', 'addlayerssucceeded', 'notsupportmvt', 'notsupportbaidumap', 'projectionIsNotMatch', 'beforeremovemap'];
- _this.mapId = id;
- return _this;
- }
- (0, _createClass2.default)(WebMapBase, [{
- key: "echartsLayerResize",
- value: function echartsLayerResize() {
- this.echartslayer.forEach(function (echartslayer) {
- echartslayer.chart.resize();
- });
- }
- }, {
- key: "setMapId",
- value: function setMapId(mapId) {
- var _this2 = this;
- this.mapId = mapId;
- this.webMapService.setMapId(mapId);
- setTimeout(function () {
- _this2._initWebMap();
- }, 0);
- }
- }, {
- key: "setServerUrl",
- value: function setServerUrl(serverUrl) {
- this.serverUrl = serverUrl;
- this.webMapService.setServerUrl(serverUrl);
- }
- }, {
- key: "setWithCredentials",
- value: function setWithCredentials(withCredentials) {
- this.withCredentials = withCredentials;
- this.webMapService.setWithCredentials(withCredentials);
- }
- }, {
- key: "setProxy",
- value: function setProxy(proxy) {
- this.proxy = proxy;
- this.webMapService.setProxy(proxy);
- }
- }, {
- key: "setZoom",
- value: function setZoom(zoom) {
- if (this.map) {
- this.mapOptions.zoom = zoom;
- (zoom || zoom === 0) && this.map.setZoom(zoom, {
- from: 'setZoom'
- });
- }
- }
- }, {
- key: "setMaxBounds",
- value: function setMaxBounds(maxBounds) {
- if (this.map) {
- this.mapOptions.maxBounds = maxBounds;
- maxBounds && this.map.setMaxBounds(maxBounds);
- }
- }
- }, {
- key: "setMinZoom",
- value: function setMinZoom(minZoom) {
- if (this.map) {
- this.mapOptions.minZoom = minZoom;
- (minZoom || minZoom === 0) && this.map.setMinZoom(minZoom);
- }
- }
- }, {
- key: "setMaxZoom",
- value: function setMaxZoom(maxZoom) {
- if (this.map) {
- this.mapOptions.maxZoom = maxZoom;
- (maxZoom || maxZoom === 0) && this.map.setMinZoom(maxZoom);
- }
- }
- }, {
- key: "initWebMap",
- value: function initWebMap() {
- this.cleanWebMap();
- if (this.webMapInfo) {
- var mapInfo = this.webMapInfo;
- mapInfo.mapParams = {
- title: this.webMapInfo.title,
- description: this.webMapInfo.description
- };
- this.mapParams = mapInfo.mapParams;
- this._getMapInfo(mapInfo, null);
- return;
- } else if (!this.mapId || !this.serverUrl) {
- this._createMap();
- return;
- }
- this._taskID = new Date();
- this.getMapInfo(this._taskID);
- }
- }, {
- key: "getMapInfo",
- value: function getMapInfo(_taskID) {
- var _this3 = this;
- this.serverUrl = this.webMapService.handleServerUrl(this.serverUrl);
- this.webMapService.getMapInfo().then(function (mapInfo) {
- if (_this3._taskID !== _taskID) {
- return;
- }
- _this3.mapParams = mapInfo.mapParams;
- _this3._getMapInfo(mapInfo, _taskID);
- }, function (error) {
- throw error;
- }).catch(function (error) {
- _this3.triggerEvent('getmapinfofailed', {
- error: error
- });
- console.log(error);
- });
- }
- }, {
- key: "getBaseLayerType",
- value: function getBaseLayerType(layerInfo) {
- var layerType = layerInfo.layerType;
- if (layerType.indexOf('TIANDITU_VEC') > -1 || layerType.indexOf('TIANDITU_IMG') > -1 || layerType.indexOf('TIANDITU_TER') > -1) {
- layerType = 'TIANDITU';
- }
- switch (layerType) {
- case 'TILE':
- case 'SUPERMAP_REST':
- return 'TILE';
- case 'CLOUD':
- case 'CLOUD_BLACK':
- return 'CLOUD';
- case 'OSM':
- case 'JAPAN_ORT':
- case 'JAPAN_RELIEF':
- case 'JAPAN_PALE':
- case 'JAPAN_STD':
- case 'GOOGLE_CN':
- case 'GOOGLE':
- return 'XYZ';
- default:
- return layerType;
- }
- }
- }, {
- key: "getMapurls",
- value: function getMapurls() {
- var mapurl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- var mapUrls = {
- CLOUD: mapurl.CLOUD || 'http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}',
- CLOUD_BLACK: mapurl.CLOUD_BLACK || 'http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}',
- OSM: mapurl.OSM || 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png',
- GOOGLE: 'https://www.google.cn/maps/vt/pb=!1m4!1m3!1i{z}!2i{x}!3i{y}!2m3!1e0!2sm!3i380072576!3m8!2szh-CN!3scn!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0!5m1!1e0',
- GOOGLE_CN: 'https://mt{0-3}.google.cn/vt/lyrs=m&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}',
- JAPAN_STD: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
- JAPAN_PALE: 'https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png',
- JAPAN_RELIEF: 'https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png',
- JAPAN_ORT: 'https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg'
- };
- return mapUrls;
- }
- }, {
- key: "getLayerFeatures",
- value: function getLayerFeatures(layer, _taskID, type) {
- var _this4 = this;
- var getLayerFunc = this.webMapService.getLayerFeatures(type, layer, this.baseProjection);
- getLayerFunc && getLayerFunc.then(function (result) {
- if (_this4.mapId && _this4._taskID !== _taskID) {
- return;
- }
- _this4._getLayerFeaturesSucceeded(result, layer);
- }, function (error) {
- throw new Error(error);
- }).catch(function (error) {
- _this4._addLayerSucceeded();
- _this4.triggerEvent('getlayerdatasourcefailed', {
- error: error,
- layer: layer,
- map: _this4.map
- });
- console.log(error);
- });
- }
- }, {
- key: "setFeatureInfo",
- value: function setFeatureInfo(feature) {
- var featureInfo;
- var info = feature.dv_v5_markerInfo;
- if (info && info.dataViz_title) {
- featureInfo = info;
- } else {
- return info;
- }
- var properties = feature.properties;
- for (var key in featureInfo) {
- if (properties[key]) {
- featureInfo[key] = properties[key];
- delete properties[key];
- }
- }
- return featureInfo;
- }
- }, {
- key: "getRankStyleGroup",
- value: function getRankStyleGroup(themeField, features, parameters) {
- var values = [],
- segements = [],
- style = parameters.style,
- themeSetting = parameters.themeSetting,
- segmentMethod = themeSetting.segmentMethod,
- segmentCount = themeSetting.segmentCount,
- customSettings = themeSetting.customSettings,
- minR = parameters.themeSetting.minRadius,
- maxR = parameters.themeSetting.maxRadius,
- colors = themeSetting.colors,
- fillColor = style.fillColor;
- features.forEach(function (feature) {
- var properties = feature.properties,
- value = properties[themeField];
- if (value == null || !(0, _lodash.default)(+value)) {
- return;
- }
- values.push(Number(value));
- });
- try {
- segements = SuperMap.ArrayStatistic.getArraySegments(values, segmentMethod, segmentCount);
- } catch (error) {
- console.log(error);
- }
- for (var i = 0; i < segmentCount; i++) {
- if (i in customSettings) {
- var startValue = customSettings[i]['segment']['start'],
- endValue = customSettings[i]['segment']['end'];
- startValue != null && (segements[i] = startValue);
- endValue != null && (segements[i + 1] = endValue);
- }
- }
- var styleGroup = [];
- if (segements && segements.length) {
- var len = segements.length,
- incrementR = (maxR - minR) / (len - 1),
- start,
- end,
- radius = Number(((maxR + minR) / 2).toFixed(2)),
- color = '';
- var rangeColors = colors ? SuperMap.ColorsPickerUtil.getGradientColors(colors, len, 'RANGE') : [];
- for (var _i = 0; _i < len - 1; _i++) {
- start = Number(segements[_i].toFixed(2));
- end = Number(segements[_i + 1].toFixed(2));
- radius = start === end ? radius : minR + Math.round(incrementR * _i);
- end = _i === len - 2 ? end + 0.01 : end;
- radius = customSettings[_i] && customSettings[_i].radius ? customSettings[_i].radius : radius;
- style.radius = radius;
- if (colors && colors.length > 0) {
- color = customSettings[_i] && customSettings[_i].color ? customSettings[_i].color : rangeColors[_i] || fillColor;
- style.fillColor = color;
- }
- styleGroup.push({
- radius: radius,
- color: color,
- start: start,
- end: end,
- style: style
- });
- }
- return styleGroup;
- } else {
- return false;
- }
- }
- }, {
- key: "createRankStyleSource",
- value: function createRankStyleSource(parameters, features) {
- var themeSetting = parameters.themeSetting,
- themeField = themeSetting.themeField;
- var styleGroups = this.getRankStyleGroup(themeField, features, parameters);
- return styleGroups ? {
- parameters: parameters,
- styleGroups: styleGroups
- } : false;
- }
- }, {
- key: "isMatchAdministrativeName",
- value: function isMatchAdministrativeName(featureName, fieldName) {
- var isString = typeof fieldName === 'string' && fieldName.constructor === String;
- if (isString) {
- var shortName = featureName.substr(0, 2);
- if (shortName === '张家') {
- shortName = featureName.substr(0, 3);
- }
- return !!fieldName.match(new RegExp(shortName));
- }
- return false;
- }
- }, {
- key: "getRestMapLayerInfo",
- value: function getRestMapLayerInfo(restMapInfo, layer) {
- var bounds = restMapInfo.bounds,
- coordUnit = restMapInfo.coordUnit,
- visibleScales = restMapInfo.visibleScales,
- url = restMapInfo.url;
- layer.layerType = 'TILE';
- layer.orginEpsgCode = this.baseProjection;
- layer.units = coordUnit && coordUnit.toLowerCase();
- layer.extent = [bounds.left, bounds.bottom, bounds.right, bounds.top];
- layer.visibleScales = visibleScales;
- layer.url = url;
- layer.sourceType = 'TILE';
- return layer;
- }
- }, {
- key: "handleLayerFeatures",
- value: function handleLayerFeatures(features, layerInfo) {
- var layerType = layerInfo.layerType,
- style = layerInfo.style,
- themeSetting = layerInfo.themeSetting,
- filterCondition = layerInfo.filterCondition;
- if ((style || themeSetting) && filterCondition) {
- if (layerType !== 'RANGE' && layerType !== 'UNIQUE' && layerType !== 'RANK_SYMBOL') {
- features = this.getFilterFeatures(filterCondition, features);
- }
- }
- return features;
- }
- }, {
- key: "mergeFeatures",
- value: function mergeFeatures(layerId, features, mergeByField) {
- features = features.map(function (feature, index) {
- if (!feature.properties.hasOwnProperty('index')) {
- feature.properties.index = index;
- }
- return feature;
- });
- if (!mergeByField) {
- return features;
- }
- var source = this.map.getSource(layerId);
- if (!source || !source._data.features) {
- return features;
- }
- var prevFeatures = source._data.features;
- var nextFeatures = [];
- features.forEach(function (feature) {
- var prevFeature = prevFeatures.find(function (item) {
- if (isNaN(+item.properties[mergeByField]) && isNaN(+feature.properties[mergeByField])) {
- return JSON.stringify(item.properties[mergeByField] || '') === JSON.stringify(feature.properties[mergeByField] || '');
- } else {
- return +item.properties[mergeByField] === +feature.properties[mergeByField];
- }
- });
- if (prevFeature) {
- nextFeatures.push(Object.assign(Object.assign({}, prevFeature), feature));
- } else if (feature.geometry) {
- nextFeatures.push(feature);
- }
- });
- return nextFeatures;
- }
- }, {
- key: "getFilterFeatures",
- value: function getFilterFeatures(filterCondition, allFeatures) {
- if (!filterCondition) {
- return allFeatures;
- }
- var condition = this.replaceFilterCharacter(filterCondition);
- var sql = 'select * from json where (' + condition + ')';
- var filterFeatures = [];
- for (var i = 0; i < allFeatures.length; i++) {
- var feature = allFeatures[i];
- var filterResult = void 0;
- try {
- filterResult = window['jsonsql'].query(sql, {
- properties: feature.properties
- });
- } catch (err) {
- continue;
- }
- if (filterResult && filterResult.length > 0) {
- filterFeatures.push(feature);
- }
- }
- return filterFeatures;
- }
- }, {
- key: "replaceFilterCharacter",
- value: function replaceFilterCharacter(filterString) {
- filterString = filterString.replace(/=/g, '==').replace(/AND|and/g, '&&').replace(/or|OR/g, '||').replace(/<==/g, '<=').replace(/>==/g, '>=');
- return filterString;
- }
- }, {
- key: "getEchartsLayerOptions",
- value: function getEchartsLayerOptions(layerInfo, features, coordinateSystem) {
- var properties = this.webMapService.getFeatureProperties(features);
- var lineData = this._createLinesData(layerInfo, properties);
- var pointData = this._createPointsData(lineData, layerInfo, properties);
- var options = this._createOptions(layerInfo, lineData, pointData, coordinateSystem);
- return options;
- }
- }, {
- key: "getDashStyle",
- value: function getDashStyle(str) {
- var strokeWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
- var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'array';
- if (!str) {
- return type === 'array' ? [] : '';
- }
- var w = strokeWidth;
- var dashArr;
- switch (str) {
- case 'solid':
- dashArr = [];
- break;
- case 'dot':
- dashArr = [1, 4 * w];
- break;
- case 'dash':
- dashArr = [4 * w, 4 * w];
- break;
- case 'dashrailway':
- dashArr = [8 * w, 12 * w];
- break;
- case 'dashdot':
- dashArr = [4 * w, 4 * w, 1 * w, 4 * w];
- break;
- case 'longdash':
- dashArr = [8 * w, 4 * w];
- break;
- case 'longdashdot':
- dashArr = [8 * w, 4 * w, 1, 4 * w];
- break;
- default:
- if (SuperMap.Util.isArray(str)) {
- dashArr = str;
- }
- str = SuperMap.String.trim(str).replace(/\s+/g, ',');
- dashArr = str.replace(/\[|\]/gi, '').split(',');
- break;
- }
- dashArr = type === 'array' ? dashArr : dashArr.join(',');
- return dashArr;
- }
- }, {
- key: "getCanvasFromSVG",
- value: function getCanvasFromSVG(svgUrl, divDom, callBack) {
- var canvas = document.createElement('canvas');
- canvas.id = "dataviz-canvas-".concat(new Date().getTime());
- canvas.style.display = 'none';
- divDom.appendChild(canvas);
- var canvgs = window.canvg ? window.canvg : _canvg.default;
- canvgs(canvas.id, svgUrl, {
- ignoreMouse: true,
- ignoreAnimation: true,
- renderCallback: function renderCallback() {
- if (canvas.width > 300 || canvas.height > 300) {
- return;
- }
- callBack(canvas);
- },
- forceRedraw: function forceRedraw() {
- return false;
- }
- });
- }
- }, {
- key: "getRangeStyleGroup",
- value: function getRangeStyleGroup(layerInfo, features) {
- var featureType = layerInfo.featureType,
- style = layerInfo.style,
- themeSetting = layerInfo.themeSetting;
- var customSettings = themeSetting.customSettings,
- themeField = themeSetting.themeField,
- segmentCount = themeSetting.segmentCount,
- segmentMethod = themeSetting.segmentMethod,
- colors = themeSetting.colors;
- var values = [];
- var attributes;
- features.forEach(function (feature) {
- attributes = feature.properties;
- if (attributes) {
- var val = attributes[themeField];
- (val || val === 0) && (0, _lodash.default)(+val) && values.push(parseFloat(val));
- }
- }, this);
- var segements = SuperMap.ArrayStatistic.getArraySegments(values, segmentMethod, segmentCount);
- if (segements) {
- var itemNum = segmentCount;
- if (attributes && segements[0] === segements[attributes.length - 1]) {
- itemNum = 1;
- segements.length = 2;
- }
- for (var i = 0; i < segements.length; i++) {
- var value = segements[i];
- value = i === 0 ? Math.floor(value * 100) / 100 : Math.ceil(value * 100) / 100 + 0.1;
- segements[i] = Number(value.toFixed(2));
- }
- var curentColors = colors;
- curentColors = SuperMap.ColorsPickerUtil.getGradientColors(curentColors, itemNum, 'RANGE');
- for (var index = 0; index < itemNum; index++) {
- if (index in customSettings) {
- if (customSettings[index]['segment']['start']) {
- segements[index] = customSettings[index]['segment']['start'];
- }
- if (customSettings[index]['segment']['end']) {
- segements[index + 1] = customSettings[index]['segment']['end'];
- }
- }
- }
- var styleGroups = [];
- for (var _i2 = 0; _i2 < itemNum; _i2++) {
- var color = curentColors[_i2];
- if (_i2 in customSettings) {
- if (customSettings[_i2].color) {
- color = customSettings[_i2].color;
- }
- }
- if (featureType === 'LINE') {
- style.strokeColor = color;
- } else {
- style.fillColor = color;
- }
- var start = segements[_i2];
- var end = segements[_i2 + 1];
- var styleObj = JSON.parse(JSON.stringify(style));
- styleGroups.push({
- style: styleObj,
- color: color,
- start: start,
- end: end
- });
- }
- return styleGroups;
- }
- }
- }, {
- key: "getUniqueStyleGroup",
- value: function getUniqueStyleGroup(parameters, features) {
- var featureType = parameters.featureType,
- style = parameters.style,
- themeSetting = parameters.themeSetting;
- var themeField = themeSetting.themeField,
- colors = themeSetting.colors,
- customSettings = themeSetting.customSettings;
- Object.keys(features[0].properties).forEach(function (key) {
- key.toLocaleUpperCase() === themeField.toLocaleUpperCase() && (themeField = key);
- });
- var names = [];
- for (var i in features) {
- var properties = features[i].properties;
- var name = properties[themeField];
- var isSaved = false;
- for (var j in names) {
- if (names[j] === name) {
- isSaved = true;
- break;
- }
- }
- if (!isSaved) {
- names.push(name || '0');
- }
- }
- var curentColors = colors;
- curentColors = SuperMap.ColorsPickerUtil.getGradientColors(curentColors, names.length);
- var styleGroup = [];
- names.forEach(function (name, index) {
- var color = curentColors[index];
- if (name in customSettings) {
- color = customSettings[name];
- }
- if (featureType === 'LINE') {
- style.strokeColor = color;
- } else {
- style.fillColor = color;
- }
- styleGroup.push({
- color: color,
- style: Object.assign({}, style),
- value: name
- });
- }, this);
- return styleGroup;
- }
- }, {
- key: "transformFeatures",
- value: function transformFeatures(features) {
- var _this5 = this;
- features && features.forEach(function (feature, index) {
- var geometryType = feature.geometry.type;
- var coordinates = feature.geometry.coordinates;
- if (coordinates.length === 0) {
- return;
- }
- if (geometryType === 'LineString') {
- coordinates.forEach(function (coordinate, index) {
- coordinate = _this5._unproject(coordinate);
- coordinates[index] = coordinate;
- }, _this5);
- } else if (geometryType === 'Point') {
- coordinates = _this5._unproject(coordinates);
- feature.geometry.coordinates = coordinates;
- } else if (geometryType === 'MultiPolygon' || geometryType === 'Polygon') {
- coordinates.forEach(function (coordinate, index) {
- var coords = geometryType === 'MultiPolygon' ? coordinate[0] : coordinate;
- coords.forEach(function (latlng, i) {
- latlng = _this5._unproject(latlng);
- coords[i] = latlng;
- });
- coordinates[index] = coordinate;
- });
- }
- features[index] = feature;
- });
- return features;
- }
- }, {
- key: "handleSvgColor",
- value: function handleSvgColor(style, canvas) {
- var fillColor = style.fillColor,
- fillOpacity = style.fillOpacity,
- strokeColor = style.strokeColor,
- strokeOpacity = style.strokeOpacity,
- strokeWidth = style.strokeWidth;
- var context = canvas.getContext('2d');
- if (fillColor) {
- context.fillStyle = (0, _util.getColorWithOpacity)(fillColor, fillOpacity);
- context.fill();
- }
- if (strokeColor || strokeWidth) {
- context.strokeStyle = (0, _util.getColorWithOpacity)(strokeColor, strokeOpacity);
- context.lineWidth = strokeWidth;
- context.stroke();
- }
- }
- }, {
- key: "_createLinesData",
- value: function _createLinesData(layerInfo, properties) {
- var _this6 = this;
- var data = [];
- if (properties && properties.length) {
- var from = layerInfo.from,
- to = layerInfo.to,
- fromCoord,
- toCoord;
- if (from.type === 'XY_FIELD' && from['xField'] && from['yField'] && to['xField'] && to['yField']) {
- properties.forEach(function (property) {
- var fromX = property[from['xField']],
- fromY = property[from['yField']],
- toX = property[to['xField']],
- toY = property[to['yField']];
- if (!fromX || !fromY || !toX || !toY) {
- return;
- }
- fromCoord = [property[from['xField']], property[from['yField']]];
- toCoord = [property[to['xField']], property[to['yField']]];
- data.push({
- coords: [fromCoord, toCoord]
- });
- });
- } else if (from.type === 'PLACE_FIELD' && from['field'] && to['field']) {
- var centerDatas = _ProvinceCenter.default.concat(_MunicipalCenter.default);
- properties.forEach(function (property) {
- var fromField = property[from['field']],
- toField = property[to['field']];
- fromCoord = centerDatas.find(function (item) {
- return _this6.isMatchAdministrativeName(item.name, fromField);
- });
- toCoord = centerDatas.find(function (item) {
- return _this6.isMatchAdministrativeName(item.name, toField);
- });
- if (!fromCoord || !toCoord) {
- return;
- }
- data.push({
- coords: [fromCoord.coord, toCoord.coord]
- });
- });
- }
- }
- return data;
- }
- }, {
- key: "_createPointsData",
- value: function _createPointsData(lineData, layerInfo, properties) {
- var data = [],
- labelSetting = layerInfo.labelSetting;
- if (!labelSetting.show || !lineData.length) {
- return data;
- }
- var fromData = [],
- toData = [];
- lineData.forEach(function (item, idx) {
- var coords = item.coords,
- fromCoord = coords[0],
- toCoord = coords[1],
- fromProperty = properties[idx][labelSetting.from],
- toProperty = properties[idx][labelSetting.to];
- var f = fromData.find(function (d) {
- return d.value[0] === fromCoord[0] && d.value[1] === fromCoord[1];
- });
- !f && fromData.push({
- name: fromProperty,
- value: fromCoord
- });
- var t = toData.find(function (d) {
- return d.value[0] === toCoord[0] && d.value[1] === toCoord[1];
- });
- !t && toData.push({
- name: toProperty,
- value: toCoord
- });
- });
- data = fromData.concat(toData);
- return data;
- }
- }, {
- key: "_createOptions",
- value: function _createOptions(layerInfo, lineData, pointData, coordinateSystem) {
- var series;
- var lineSeries = this._createLineSeries(layerInfo, lineData, coordinateSystem);
- if (pointData && pointData.length) {
- var pointSeries = this._createPointSeries(layerInfo, pointData, coordinateSystem);
- series = lineSeries.concat(pointSeries);
- } else {
- series = lineSeries.slice();
- }
- return {
- series: series
- };
- }
- }, {
- key: "_createPointSeries",
- value: function _createPointSeries(layerInfo, pointData, coordinateSystem) {
- var lineSetting = layerInfo.lineSetting;
- var animationSetting = layerInfo.animationSetting;
- var labelSetting = layerInfo.labelSetting;
- var pointSeries = [{
- name: 'point-series',
- coordinateSystem: coordinateSystem,
- zlevel: 2,
- label: {
- normal: {
- show: labelSetting.show,
- position: 'right',
- formatter: '{b}',
- color: labelSetting.color,
- fontFamily: labelSetting.fontFamily
- }
- },
- itemStyle: {
- normal: {
- color: lineSetting.color || labelSetting.color
- }
- },
- data: pointData
- }];
- if (animationSetting.show) {
- pointSeries[0].type = 'effectScatter';
- pointSeries[0].rippleEffect = {
- brushType: 'stroke'
- };
- } else {
- pointSeries[0].type = 'scatter';
- }
- return pointSeries;
- }
- }, {
- key: "_createLineSeries",
- value: function _createLineSeries(layerInfo, lineData, coordinateSystem) {
- var lineSetting = layerInfo.lineSetting;
- var animationSetting = layerInfo.animationSetting;
- var linesSeries = [{
- name: 'line-series',
- coordinateSystem: coordinateSystem,
- type: 'lines',
- zlevel: 1,
- effect: {
- show: animationSetting.show,
- constantSpeed: animationSetting.constantSpeed,
- trailLength: 0,
- symbol: animationSetting.symbol,
- symbolSize: animationSetting.symbolSize
- },
- lineStyle: {
- normal: {
- color: lineSetting.color,
- type: lineSetting.type,
- width: lineSetting.width,
- opacity: lineSetting.opacity,
- curveness: lineSetting.curveness
- }
- },
- data: lineData
- }];
- if (lineData.length >= MAX_MIGRATION_ANIMATION_COUNT) {
- linesSeries[0].large = true;
- linesSeries[0].largeThreshold = 100;
- linesSeries[0].blendMode = 'lighter';
- }
- return linesSeries;
- }
- }, {
- key: "_getLayerFeaturesSucceeded",
- value: function _getLayerFeaturesSucceeded(result, layer) {
- switch (result.type) {
- case 'feature':
- this._initOverlayLayer(layer, result.features);
- break;
- case 'restMap':
- layer.layerType = 'restMap';
- this._initOverlayLayer(layer, result.restMaps);
- break;
- case 'mvt':
- layer.layerType = 'mvt';
- this._initOverlayLayer(layer, result);
- break;
- case 'dataflow':
- case 'noServerId':
- this._initOverlayLayer(layer);
- break;
- }
- }
- }]);
- return WebMapBase;
- }(_Events2.Events);
- exports.default = WebMapBase;
- /***/ }),
- /***/ "d711":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- // a duplex stream is just a stream that is both readable and writable.
- // Since JS doesn't have multiple prototypal inheritance, this class
- // prototypally inherits from Readable, and then parasitically from
- // Writable.
- /*<replacement>*/
- var pna = __webpack_require__("3e48");
- /*</replacement>*/
- /*<replacement>*/
- var objectKeys = Object.keys || function (obj) {
- var keys = [];
- for (var key in obj) {
- keys.push(key);
- }return keys;
- };
- /*</replacement>*/
- module.exports = Duplex;
- /*<replacement>*/
- var util = __webpack_require__("9107");
- util.inherits = __webpack_require__("fe04");
- /*</replacement>*/
- var Readable = __webpack_require__("c66c");
- var Writable = __webpack_require__("9c77");
- util.inherits(Duplex, Readable);
- {
- // avoid scope creep, the keys array can then be collected
- var keys = objectKeys(Writable.prototype);
- for (var v = 0; v < keys.length; v++) {
- var method = keys[v];
- if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
- }
- }
- function Duplex(options) {
- if (!(this instanceof Duplex)) return new Duplex(options);
- Readable.call(this, options);
- Writable.call(this, options);
- if (options && options.readable === false) this.readable = false;
- if (options && options.writable === false) this.writable = false;
- this.allowHalfOpen = true;
- if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
- this.once('end', onend);
- }
- Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
- // making it explicit this property is not enumerable
- // because otherwise some prototype manipulation in
- // userland will fail
- enumerable: false,
- get: function () {
- return this._writableState.highWaterMark;
- }
- });
- // the no-half-open enforcer
- function onend() {
- // if we allow half-open state, or if the writable side ended,
- // then we're ok.
- if (this.allowHalfOpen || this._writableState.ended) return;
- // no more data can be written.
- // But allow more writes to happen in this tick.
- pna.nextTick(onEndNT, this);
- }
- function onEndNT(self) {
- self.end();
- }
- Object.defineProperty(Duplex.prototype, 'destroyed', {
- get: function () {
- if (this._readableState === undefined || this._writableState === undefined) {
- return false;
- }
- return this._readableState.destroyed && this._writableState.destroyed;
- },
- set: function (value) {
- // we ignore the value if the stream
- // has not been initialized yet
- if (this._readableState === undefined || this._writableState === undefined) {
- return;
- }
- // backward compatibility, the user is explicitly
- // managing destroyed
- this._readableState.destroyed = value;
- this._writableState.destroyed = value;
- }
- });
- Duplex.prototype._destroy = function (err, cb) {
- this.push(null);
- this.end();
- pna.nextTick(cb, err);
- };
- /***/ }),
- /***/ "d83d":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0f9e");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "d865":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/leaflet/identify/Identify.vue?vue&type=template&id=44a6aa12&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"Popup",class:['sm-component-identify'],style:([_vm.getTextColorStyle])},_vm._l((_vm.popupProps),function(value,key,index){return _c('li',{key:index,staticClass:"sm-component-identify__body"},[_c('div',{staticClass:"sm-component-identify__left",attrs:{"title":key}},[_vm._v(_vm._s(key))]),_vm._v(" "),_c('div',{staticClass:"sm-component-identify__right",attrs:{"title":value}},[_vm._v(_vm._s(value))])])}),0)}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/leaflet/identify/Identify.vue?vue&type=template&id=44a6aa12&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "dafd":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAACzdJREFUeAHt3VFu2jAcwGEHcZTugRtUPdZ6jl2r6g3yQO+S5Q9TMRSLJpbWOPnyFIjdOl+Y+ht0WZeO/e/U0tal9/R0eGtpydZKgAABAgRmCXz0L2lIz7Pm/tCk3Q993/nfNoAD2kaAAAECBNYs0GBUxOVoLyxi1eIiFGwECBAgsFaBRqMiLkebYRErFxehYCNAgACBtQk0HBVxKdoNi1i9uAgFGwECBAisRaDxqIjL0HZYxBmIi1CwESBAgEDrAiuIirgE+9vr0KX05/a5xT8exhUe+8Uv0wIJECBAgEBRIH6WNbiNy37Nl/0lLOLg8Osw9oWNAAECBAgQIFAW6I79dQ6Nt4Ro/6OQ8vk6QoAAAQIECPwvgX/3mdql2LERIECAAAECBOYKZDev3J3uYiku5lKaR4AAAQIEti2QRUVAnD8KiVtki4ttvzCcPQECBAgQmCNw899sXH7HQlzM4TSHAAECBAgQyAQuYRFP3lRHNs4uAQIECBAgQOChwHVYPBxuAAECBAgQIECgLCAsyjaOECBAgAABAhMFhMVEMMMJECBAgACBsoCwKNs4QoAAAQIECEwUEBYTwQwnQIAAAQIEygLComzjCAECBAgQIDBRQFhMBDOcAAECBAgQKAsIi7KNIwQIECBAgMBEAWExEcxwAgQIECBAoCwgLMo2jhAgQIAAAQITBYTFRDDDCRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQKbEOiO/bCJE3WSBAgQIECAQJXAvWbYVX1FkwkQIECAAAECmYCwyDDsEiBAgAABAnUCwqLOz2wCBAgQIEAgExAWGYZdAgQIECBAoE5AWNT5mU2AAAECBAhkAsIiw7BLgAABAgQI1AkIizo/swkQIECAAIFMQFhkGHYJECBAgACBOgFhUednNgECBAgQIJAJCIsMwy4BAgQIECBQJyAs6vzMJkCAAAECBDIBYZFh2CVAgAABAgTqBK7D4qN/qftyZhMgQIAAAQJbFriERUTFkJ63jOHcCRAgQIAAgYkCN29KnMNCVExUNJwAAQIECBA4CcSbEllc7E4PvFPh1UGAAAECBAjMFcjiYu/jj7mK5hEgQIAAAQKfAue4SPvPJ7Kd7tgP2UO7BAgQIECAAIHHAmNcfAmLsSheH89c2Iguvaenw9vCVmU5BAgQIEDg+wIr+X3Hy78K+f6pL2ukqFjW9bAaAgQIEJgnEH9Bjp9pjW9th4WoaPzlZ/kECBAgcCWwgrhoNyxExdVr0QMCBAgQWIlA43HRZliIipX86XEaBAgQIHBXoOG4aC8sRMXd16AnCRAgQGBlAo3GxV/c4HmOBfV/nAAAAABJRU5ErkJggg=="
- /***/ }),
- /***/ "db36":
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- /***/ }),
- /***/ "dcc9":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _default2 = {
- props: {
- options: {
- type: Object,
- default: function _default() {
- return null;
- }
- }
- }
- };
- exports.default = _default2;
- /***/ }),
- /***/ "dd34":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _mapGetter = _interopRequireDefault(__webpack_require__("2ed5"));
- var _ChartMixin = _interopRequireDefault(__webpack_require__("3605"));
- var _ChartViewModel = _interopRequireDefault(__webpack_require__("5a51"));
- __webpack_require__("751d");
- var _default = {
- name: 'SmChart',
- mixins: [_ChartMixin.default, _mapGetter.default],
- loaded: function loaded() {
- this.viewModel = new _ChartViewModel.default(this.map);
- },
- beforeDestroy: function beforeDestroy() {
- this.$options.removed.call(this);
- },
- removed: function removed() {
- this.clearPopup();
- },
- methods: {
- clearPopup: function clearPopup() {
- this.viewModel && this.viewModel.clear();
- },
- changePopupArrowStyle: function changePopupArrowStyle() {
- var popupArrow = document.querySelector('.sm-component-chart-result-popup .leaflet-popup-tip');
- if (popupArrow) {
- popupArrow.style.background = this.popupBackground;
- }
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "ded2":
- /***/ (function(module, exports, __webpack_require__) {
- var map = {
- "./border1.png": "dfc8",
- "./border10.png": "a00e",
- "./border11.png": "dafd",
- "./border12.png": "c0cb",
- "./border13.png": "f11d",
- "./border2.png": "bb52",
- "./border3.png": "7de9",
- "./border4.png": "b557",
- "./border5.png": "29e0",
- "./border6.png": "05d2",
- "./border7.png": "5106",
- "./border8.png": "f1a1",
- "./border9.png": "df8c"
- };
- function webpackContext(req) {
- var id = webpackContextResolve(req);
- return __webpack_require__(id);
- }
- function webpackContextResolve(req) {
- if(!__webpack_require__.o(map, req)) {
- var e = new Error("Cannot find module '" + req + "'");
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- }
- return map[req];
- }
- webpackContext.keys = function webpackContextKeys() {
- return Object.keys(map);
- };
- webpackContext.resolve = webpackContextResolve;
- module.exports = webpackContext;
- webpackContext.id = "ded2";
- /***/ }),
- /***/ "df2e":
- /***/ (function(module, exports) {
- module.exports = {
- isArray: function(value) {
- if (Array.isArray) {
- return Array.isArray(value);
- }
- // fallback for older browsers like IE 8
- return Object.prototype.toString.call( value ) === '[object Array]';
- }
- };
- /***/ }),
- /***/ "df8c":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAHF1JREFUeAHt3W2wXHV9B/A9e5ckvuxUVGoghGdQA6gw2E4fXhdtaRmfxxmn05d2MIankISnJCQQAmrfd9pplVYmSq362um0yoCApApokECAqjg6tm/Mvc3d09/vf3ZDBO5ms3tIcrOfQ+7uvXvO/797Pp6Z/fp/OlXnJNlW/NN3bq3efvrtdb+uqrru1PG5ynO/3+n04+/4qfLV/Bf74yH29+P1ODCfF5v9dfxeZeEoV2WJLD84fvg8fC3rL3VHpcPy/WeeOUlEfAwCBAgQILD8BHonw0de8aXv3hah4rb4LFVVRQ7IDxWBIL/3O1U3fiIkxFMnM0KkhjikyQiDfXFAsz+OrzrdKB8HlopKTXF0bKVQlsvyGVHiv+HuLDfY3xzskQABAgQIEJhE4IQHiwgVt1e/945bo+UgGiAiEHTjaz++6OsICE2LxeDbP17PLTJG8xxBo14c/DFIDcOc0ASHOCzripDRtGrk35kvsmCEi34EkGFlTZUeCRAgQIAAgSkFsh3ghG0rvvzwHdXqM24t7RQZAroRJsqniccMEtmMkC/E65E0IgjE7/ETnSVlXzUXr+e+PIssG6/nT9mfr8XWtHpkwcHv5bmJIKV5pOyJh+aQ4V+eCRAgQIAAgQkETliLxYoHHrmzWv2OzfHNH0kgvugzLEQjQv3fv7hj4ZMfuGOCc1GEAAECBAgQOM4C3c98cdhhUN75hASLFQ88vLV75hmbopUgx1+W8REx9qGuX/7ZnULFcb4ivB0BAgQIEGhR4LgHi1X//Oi2zpp33hIDH2IIRYx1aAZg1vWBn26NUHF7i+emKgIECBAgQOA4CxzXYLHqKxEqzj4zQkVOKY1BEGXmR8SLF3+2beETV912nM/d2xEgQIAAAQItCxy3YLFqz2Pbq7NWbyxDMHOAZU7o6HYjVBzYvvDxq25t+bxUR4AAAQIECJwAgeMSLFbt+d5d1dqzbo6VI6KlIqJFLGaVczT6z79818LHrtpyAs7bWxIgQIAAAQJvgsCbHixWPfT4jursNTflmIpmDYkcrRmTR/e/vGPhY1dsHnVOb9/8t2vnDx1aM+oY+wgQIECAAIE3X+DXO9d/e5x3Gaz2MM6hx35MhIqd3XPX3pSzP15dGjPaLA68tOPgR6/YNKpGoWKUjn0ECBAgQODkFHjTgsXKrz1xd/f8c26MTo9oqIjFq5oFsOp6/ws7D177PqHi5LwefCoCBAgQIDCVwJvSFbLyoSfumbv43OvLDcXy4zULYNX9Z5+/++C1779l1CfWUjFKxz4CBAgQIHByC7QeLFZ+/cldcxeesyFGUcSK2bmaZoypyNt17HvunoPXvDdmhSy9CRVL29hDgAABAgSWg0CrXSErv/Hkrt67zt8QXR9lnGY0VeRS3fXij/fvilBx8ygQoWKUjn0ECBAgQGB5CLTWYrHym9/f3bvkgvWlpSLjStw9tBPLVBx6at+9839x+U2jOISKUTr2ESBAgACB5SPQSrBY+c29u3vvvnB9zPeIf7nyVd5hNJarePrZ3fPXXH7jKA6hYpSOfQQIECBAYHkJTN0VEqHivtPWXby+M9es0l3uUpprYD297775P7v0hlEcQsUoHfsIECBAgMDyE5iqxeIt39p7/9y6S67LVSqqaKjI239EV0h96Oln7p//0GXXj+IQKkbp2EeAAAECBJanwMTBYmWGisvedV2cdlWXPpC8B3qn/r8fRKi4+rINoziEilE69hEgQIAAgeUrMFFXSOn+uDRaKsriV2VZzZz/US/uffrz81evEyqW7/XgkxMgQIAAgakEjrnF4i0xULN76UWfjXeNRSpiy8WvoqWiv/epL/zm6nWfK68t8aClYgkYLxMgQIAAgVNE4JiCRU4p7b7nwvVx7lWnXxbrLi0VhyJUzP/punx9yU2oWJLGDgIECBAgcMoIjB0sVv7bk/f2Lo51KvoxkTS2fMwxFYea7g8tFafMJeFECBAgQIDA5AJjBYuyTPcl53+uWUczHgdLVTQDNY2pmJxfSQIECBAgcGoJHHXwZrmhWN77I1oqqhxPkVs/VtT8wdMx+0OoaEA8EiBAgAABAikwssUib30+d9F51+c6FTE8M/5FDonuj7L4lXUqXEEECBAgQIDAawSWbLFY9dDjO+cuWHtDpIkyULNMKq3revGpfbvnP3Spxa9eA+lPAgQIECBAIG4T9kYIq776+I7q3LU3lnkfOfsjukDqut/cUMwy3W9E5jUCBAgQIEAgBF7XFbJqz/fuqs5Zc1OMp4jujziiiukfMaZi8ZnndrlLqWuGAAECBAgQGCXwW8FixZ7HtkeouDm7P8p4ikwWVdz7/Cf775n/i/fePKoi61SM0rGPAAECBAjMhsDhrpAVX3l029xZqzeWMRVlUc1+WaciQsXdB68RKmbjcnCWBAgQIEBgOoESLFY8+MjW7tozbynLXpUlumOhipwE8uz+nREqNo56Cy0Vo3TsI0CAAAECsyXQW/HAw1u7Z67elOtUxEoVnc5incMq6vrAizsOXvv+TaM4hIpROvYRIECAAIHZE+h212SoiCmlpaWiCRWL+w/cdfDa9wkVs3c9OGMCBAgQIDCVQDcCRbOgZj+6PyJcLD5/YPvCR67YPKpWLRWjdOwjQIAAAQKzK9CN5SnKUM0ytTTCxcKHr9wyikOoGKVjHwECBAgQmG2BbmmuKK0V2WCRC1csvQkVS9vYQ4AAAQIECMTKm9liUQJF3Atk1CZUjNKxjwABAgQIEEiBZoGsXLY7Jp5WI7LF/KFDa5ARIECAAAECBEYJ9GJGSCSK6AbJO5fGs40AAQIECBAgMKlAzArJPFGSRZkVMmlFyhEgQIAAAQIEetFUkTNOI1TEz6i+EFYECBAgQIAAgaMIRLCIJovFPCrHWRy+dchRitlNgAABAgQIEHi9QJkVUsJFBoujzAx5fXGvECBAgAABAgReFejGPULir5xyGo9HWcfi1WJ+I0CAAAECBAi8XqDXjNss9whpGi5ef4xXCBAgQIAAAQJjCfRy5c3SWlFFk0Xe3dRGgAABAgQIEJhQoBljMVjSu7kb2YQ1KUaAAAECBAjMvECZbprjNnOhrHyyESBAgAABAgQmFeh1FrMLZNLiyhEgQIAAAQIEXhWIe4XEGItc1TvDhYDxqozfCBAgQIAAgWMW6OXdTTNUZDdIjt+0ESBAgAABAgQmFTg8K6SKRTctYzEpo3IECBAgQIBACkSLRXOv9Drvmy5ZuCoIECBAgACBKQTi7qbR/5HjN0uo0BcyhaWiBAgQIEBg5gV6uYx3WSSrLME58x4ACBAgQIAAgSkEelW5V0jU0PSITFGVogQIECBAgMCsC5TbpmcHSM40NcRi1i8H50+AAAECBKYTKMEiB1nk4E3LWEyHqTQBAgQIEJh1gTIrpCqrYxm4OesXg/MnQIAAAQLTCpR1LHJhrH5ZHUubxbSgyhMgQIAAgVkW6HVi8Gb+V3XLKItZtnDuBAgQIECAwJQCgzEWUUuZFaLFYkpPxQkQIECAwEwLlJuQRYPFYDv8y/AFzwQIECBAgACBsQWam5BlnogVvW0ECBAgQIAAgWkEmgWysgcku0L0hExjqSwBAgQIEJh5gWaBrLIyVjUYwDnzJgAIECBAgACBCQW6eXfTMtM073I6XN57wsoUI0CAAAECBGZboKxjUW5EFt0gw1uozzaJsydAgAABAgQmFSh3N83Cg96QSetRjgABAgQIECDQadaxGA7aNNvUJUGAAAECBAhMIdAEi2GgGAaMKSpUlAABAgQIEJhdgVjSOwZtlpuQBYL7ps/uleDMCRAgQIBACwKHp5tmY8Ww4aKFelVBgAABAgQIzKBA0xUSJ56NFcOGixl0cMoECBAgQIBACwJlVkgZWqG5ogVOVRAgQIAAgdkW6HUWmzEWdaaLXNbbRoAAAQIECBCYUCC6QvoxtmJwBzKtFhMyKkaAAAECBAikQKy8meMrcoCFVOGSIECAAAECBKYT6NbRYlH6QGSL6SSVJkCAAAECBGLlzbzxWPaERKuFNgtXBAECBAgQIDCNQK+sXmHQ5jSGyhIgQIAAAQIDgW5nMVoq+ovxZ7RXWHnThUGAAAECBAhMIdDNDpAygDOX9s5uERsBAgQIECBAYEKBmBWSYSLCRQy0MMpiQkXFCBAgQIAAgSLQq7OlIrduPGuwaCw8EiBAgAABAhMJlHuFlCW9Y6xFp1t+m6gihQgQIECAAAECZbppWc47LcwOcUUQIECAAAECUwiU6aZl8OYUlShKgAABAgQIEEiBQYtFDq6IbpCyCicYAgQIECBAgMBkAtFiMRy0aeTmZIRKESBAgAABAkOBbp1rV2SmyGmnssXQxTMBAgQIECAwgcDhdSwyV1SSxQSEihAgQIAAAQJDgTLdNPNETjTVYDFk8UyAAAECBAhMItAEiyhZWixy/OYktShDgAABAgQIEAiBXmex36njtunV4cUsuBAgQIAAAQIEJhPo1TErpOoP7xOivWIyRqUIECBAgACBFGi6QqoIF/FHuR8ZFwIECBAgQIDAhAK96uDBw0UN4DxM4RcCBAgQIEBgAoEYXWEjQIAAAQIECLQjIFi046gWAgQIECBAIAQEC5cBAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQm0GutJhURIECAAAECMydQnX56p1PHvzoeYhMsZu4ScMIECBAgQKA9gbqKzo+qqa+q+4JFe7RqIkCAAAECsyhQdaoIFtleUXe6gsUsXgLOmQABAgQItCVQzWVzRYSLeKz7/YgWNgIECBAgQIDAxALdTl26QiJcdLVYTMyoIAECBAgQIBAC3ewKqWLwZrRb9A3edE0QIECAAAEC0wiUwZt10xnSNXhzGkplCRAgQIAAgbkcVZHzTeNf9IkYY+GSIECAAAECBCYXyGARXSFV6RIxxmJySCUJECBAgACBEIiRmzFos6yPFYMsLJDloiBAgAABAgQmF8iWiqYnpNOJ1gtdIZNTKkmAAAECBGZeIKeY1tkVUsZaVFosZv6KAECAAAECBKYRyFARM0Oi0aJ0iWixmAZTWQIECBAgMOMCdbRYlLUswiEHcAoWM35BOH0CBAgQIDCNQIaJSBSdujzrCpnGUlkCBAgQIEAg+0ByAGc/2ioiY5gV4pIgQIAAAQIEJhYogzezdK7nHSFDsJiYUkECBAgQIECgdIEkQ7RYxDhOwcIlQYAAAQIECEwjkLNC4iZkcZ+Q7BXRYjGNpbIECBAgQGDGBZr1K7InJKec1oLFjF8PTp8AAQIECEwnkK0VZQBnM8zCdNPpOJUmQIAAAQKzLZALZA1W3czZIYLFbF8Ozp4AAQIECEwnkAtkDcJFHfNNBYvpOJUmQIAAAQKzLZALY+UW4SJbLAzebDg8EiBAgAABAhMI1LHqZhUzQpp40RUsJjBUhAABAgQIEBgKRCtFXceMkBjAWcUiWbpChjCeCRAgQIAAgWMWyDub5joW2WRRxyBOXSHHTKgAAQIECBCYLYGVvd4LS57xXLRYLMbMkDhgMOt0yUPtIECAAAECBGZcIEPFz7f9zf4lGYYzQgatFloslpSygwABAgQIzLbAUUNF8mQzxSBcdPpW3pztK8bZEyBAgACBJQTGChVZNqebZrjILX41eLOh8EiAAAECBAgMBMYNFb2/+/bGTi6QlWkiV9+MlgtdIS4jAgQIECBA4LDAuKFixd//+8bO7/zuthi5WW6ZXvf7GSziVmQ2AgQIECBAgEAIjB8q/nNT561v3dapYgGLaLGoszukO9ev/ud/bxEsXEoECBAgQIDA+KHiH/5jS/X20++M1oluBopmYay5fv3rX21e+Os/vltXiIuJAAECBAjMuMDYLRX/+J0t1emn3153oscjQkXp+Oh2+p1f/mLzob/6kx3JqMVixi8mp0+AAAECsy0wdqj40ndvq8542x2duUF2yHUrunGTkF/+6taFT/9RCRUpKVjM9vXk7AkQIEBghgXGDhUPlFBxW9xtLJopSqDInpB+5+ev3Lbw6T/YfiShrpAjNfxOgAABAgRmRGDsUPHlR+6o3vm2LZ3FerBud9wbJFbCqn/6yu0Ln/7Dba/l0mLxWhF/EyBAgACBU1xg7FDxwCN3ds86Y0u0TlRlIaxwqWO4Zv3zX9yx8Knf3/pGTILFG6l4jQABAgQInKICY4eKBx/Z2j37nZtLO0X2gORCWHNV3Xn5lTsXPvmBO5bi0RWylIzXCRAgQIDAKSYwbqhY9ZVHt3XOWn1LtE9UVSSLwZzSun7xla0Ln/rA7aNYBItROvYRIECAAIFTRGDsULHnse3VmtUb47SrejFW08yluhfrun/g5W0Ln7jytqNx6Ao5mpD9BAgQIEBgmQuMHSq++viO6pw1G2Phq+jziGQRoaKKX/svv7x94eNX3joOgxaLcZQcQ4AAAQIElqnAMYSKndW5a26Mjo+Y9BHtDlW0VsTkj8XnX7pr4SNXbhn39LVYjCvlOAIECBAgsMwExg0VK7/2xN3dC8+5MQZolpaKMgOk260XD7y0Y+EjV2w+ltMWLI5Fy7EECBAgQGCZCIwdKh564p7eJefdULo/hrM/crjmc8/vXLj2fZuO9XR1hRyrmOMJECBAgMBJLjB2qPj6k7vmLj53Qx2LX5XppHHbj9jqet8L9xy89v0xK+TYNy0Wx26mBAECBAgQOGkFxg4V33jy3t57LtiQi19VczmlNE4pVr9afGb/roN/+d6bJz1BLRaTyilHgAABAgROMoHxQ8Xe+3rvvuCz8fFjRc3IEzlYM+58vvij5+6dv/bym6Y5LS0W0+gpS4AAAQIEThKBYwgV9592+cWfzYGa+dHLtNJ4Wvzhvt3zf375jdOejhaLaQWVJ0CAAAECJ1hg7FDxrR/cf9plF10XH7e0VJSHmFN66Kkf3zd/zeU3tHEaWizaUFQHAQIECBA4QQLjhoq3fGvv/addGqHiiJaKvKHYoR8+c//8By+9vq2PL1i0JakeAgQIECBwnAXGDRUrv7l3d3fdxddFO8VvdX/09/7o8/NXX7ahzY+tK6RNTXURIECAAIHjJDB+qPj+7t57LlqfK2rW/TqSRYyqyBU1v//0F37zwXWfa/vjChZti6qPAAECBAi8yQJjh4pvPLmrd/EF6yNIxIqazTDNOsdUPPl0dH+sa7WlYnjKgsVQwjMBAgQIEFgGAmOHiq8/sat30fkb6n6/Kv0fOa80Q8V/xZiKlrs/jmQTLI7U8DsBAgQIEDiJBcYOFf/6xN1zF5y3IW52HhM/IlZEF0gJFTn744OXtTZQ842oxg4Wv965/ttvVIHXCBAgQIAAgZNHYOWeCBXnrb0hVr2qOotx2/P4aHVsi8/8ZHfM/mhlSumoszUrZJSOfQQIECBAYBkJrPrq4zvmLjj7hjrHaOZWD259/tS+e49HqMi3FCxSwUaAAAECBJa5wKo9j22v1p51U6eMqSiBosz+OPTUs7ti8aupV9Qcl2fsrpBxK3QcAQIECBAgcHwFVj346Pbq7DM3RjtFmVJa3r0bc0r3PX/P/BQ3FJvkLLRYTKKmDAECBAgQOEkEVjz4yNZqzeqNsUZFFa0VzaeKTBGh4u5p7lI66ekJFpPKKUeAAAECBE6wwIp/eXhrd/XqTRkqoqki7iSWi1/FXUqfe2FHhIqNJ+LjVd3PfDHnoNgIECBAgMApJxD/Hz62+P/QOeUyV3OoYpZE/B5fw/FnvD431+wbHlOOi2Nif91tnpuy3abM8PgsG8fGHUIH9R55/LDcEe+bx8VPPTeoO98/fh9+nvxs5TPla4PP8Fv1H/Fa+R/p8HvH8XNxXrk/v827sQ7WCy/tOPjhKzaV407AQ3wiGwECBAgQOEUF8ss2vmtzi6/y8hwzJkrGyFdjnYdmjYd8jq2KJJJHNSXKS3FM80J89zezLPKFPD6eo8Ph8MG5e/iTgabsyyKlsjwupmpEV0VZVjtfzLUlyt/5WlNf6crIVofyuZrXc1+WaV6L5/I+EURK3fn542cxy8d/L7y4/USGivxsgkUq2AgQIEDglBTIL/ryzZ7fy/FT/s6HQYDIb+fyxV9eiy/w+EIvX/JHaJTWiwwn8S/L5ZaP5bf4wi/hpASFLJ9/H/E+eVypO0sNXm9+LY9ZZam3HNR8lsOvxTs07xOPGR6ODBfxd5V/Z/F8jjEV/QMHIlRcuaW8eAIfBIsTiO+tCRAgQOA4COT3b37bZ2iIn+Z7vvlSzu/zwXd67M89sZUD8ss6WwEiKERrwLC1o7R+ZFX5k4eWIvHw6h/xe4aTwUHxfGRrRNNaMdwf9WZFWTiDQqk0WjWi/OHPm+XLZx60UOTnG9Sf9ZZwEZX2D/x068JHrzrhoSI/3v8DkctWrrwevwcAAAAASUVORK5CYII="
- /***/ }),
- /***/ "dfae":
- /***/ (function(module, exports, __webpack_require__) {
- !function(e,t){ true?module.exports=t(__webpack_require__("be3f")):undefined}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=3)}([function(t,n){t.exports=e},function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r),s=window.videojs||o.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i<arguments.length;i++){var r=arguments[i];if(null!=r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n},writable:!0,configurable:!0});var a=["loadeddata","canplay","canplaythrough","play","pause","waiting","playing","ended","error"];t.default={name:"video-player",props:{start:{type:Number,default:0},crossOrigin:{type:String,default:""},playsinline:{type:Boolean,default:!1},customEventName:{type:String,default:"statechanged"},options:{type:Object,required:!0},events:{type:Array,default:function(){return[]}},globalOptions:{type:Object,default:function(){return{controls:!0,controlBar:{remainingTimeDisplay:!1,playToggle:{},progressControl:{},fullscreenToggle:{},volumeMenuButton:{inline:!1,vertical:!0}},techOrder:["html5"],plugins:{}}}},globalEvents:{type:Array,default:function(){return[]}}},data:function(){return{player:null,reseted:!0}},mounted:function(){this.player||this.initialize()},beforeDestroy:function(){this.player&&this.dispose()},methods:{initialize:function(){var e=this,t=Object.assign({},this.globalOptions,this.options);this.playsinline&&(this.$refs.video.setAttribute("playsinline",this.playsinline),this.$refs.video.setAttribute("webkit-playsinline",this.playsinline),this.$refs.video.setAttribute("x5-playsinline",this.playsinline),this.$refs.video.setAttribute("x5-video-player-type","h5"),this.$refs.video.setAttribute("x5-video-player-fullscreen",!1)),""!==this.crossOrigin&&(this.$refs.video.crossOrigin=this.crossOrigin,this.$refs.video.setAttribute("crossOrigin",this.crossOrigin));var n=function(t,n){t&&e.$emit(t,e.player),n&&e.$emit(e.customEventName,i({},t,n))};t.plugins&&delete t.plugins.__ob__;var r=this;this.player=s(this.$refs.video,t,function(){for(var e=this,t=a.concat(r.events).concat(r.globalEvents),i={},o=0;o<t.length;o++)"string"==typeof t[o]&&void 0===i[t[o]]&&function(t){i[t]=null,e.on(t,function(){n(t,!0)})}(t[o]);this.on("timeupdate",function(){n("timeupdate",this.currentTime())}),r.$emit("ready",this)})},dispose:function(e){var t=this;this.player&&this.player.dispose&&("Flash"!==this.player.techName_&&this.player.pause&&this.player.pause(),this.player.dispose(),this.player=null,this.$nextTick(function(){t.reseted=!1,t.$nextTick(function(){t.reseted=!0,t.$nextTick(function(){e&&e()})})}))}},watch:{options:{deep:!0,handler:function(e,t){var n=this;this.dispose(function(){e&&e.sources&&e.sources.length&&n.initialize()})}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=n.n(i);for(var o in i)["default","default"].indexOf(o)<0&&function(e){n.d(t,e,function(){return i[e]})}(o);var s=n(5),a=n(4),l=a(r.a,s.a,!1,null,null,null);t.default=l.exports},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.install=t.videoPlayer=t.videojs=void 0;var r=n(0),o=i(r),s=n(2),a=i(s),l=window.videojs||o.default,u=function(e,t){t&&(t.options&&(a.default.props.globalOptions.default=function(){return t.options}),t.events&&(a.default.props.globalEvents.default=function(){return t.events})),e.component(a.default.name,a.default)},d={videojs:l,videoPlayer:a.default,install:u};t.default=d,t.videojs=l,t.videoPlayer=a.default,t.install=u},function(e,t){e.exports=function(e,t,n,i,r,o){var s,a=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(s=e,a=e.default);var u="function"==typeof a?a.options:a;t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),r&&(u._scopeId=r);var d;if(o?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):i&&(d=i),d){var c=u.functional,f=c?u.render:u.beforeCreate;c?(u._injectStyles=d,u.render=function(e,t){return d.call(t),f(e,t)}):u.beforeCreate=f?[].concat(f,d):[d]}return{esModule:s,exports:a,options:u}}},function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.reseted?n("div",{staticClass:"video-player"},[n("video",{ref:"video",staticClass:"video-js"})]):e._e()},r=[],o={render:i,staticRenderFns:r};t.a=o}])});
- /***/ }),
- /***/ "dfc8":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAFxJJREFUeAHt3U9u68qVB2CS8n2byH6ykgA9DLrTQAcBMsqk0YN+AXqUSe8g+8ooC7i2yJxTpGzpXYkiLRJ4cn3EtfivWDI/CfAPp0q6bfP3fw7NnaX92893WjhNgAABAgQIfGWB4d/+/e7tZV54udsqGnw7/uN/mqGPABL/+i4fyr/y0LZ3g8mS59CGAAECBAgQ+JUIDEPbNF35N6779nvT/NeS3649VSy+/f9ffm6G45A/7TFCRJ/bQ9mPHBH7ESZyv4SKDBO5n08R60a4WIKtDQECBAgQ+PULTKEiosUYKk77bdt0JWy0TXuIn9w/tMOha19/95c/ZOvLikWGimOEiqxMHI8RJWK/z2ARP/1b5IfTdgaJ3M4usoqRq/LogQABAgQIEHh2gcgO49JFeIit4xQoMkgM+fMyNO0xQkVuR7yY6hqnqz6GQs5DxfEtKxRjteKYwWKqXmSQyMpFhoxME+1hDBaSxcnTmgABAgQIPLfAcUoWw+s0HJIBIo9l0IjtLioYUbBo+kPTRMZojpch4D1YfFQqIlQMQ9/kcMhYvRhDRoaLMp8iAkWZbxHr4zGeKAOGoZDnfhf57QkQIECAwCTwMb8iUkOEiCHmVuaf+yGrFJkocmhkGgrJoHF4e69xZA/vwWKsSkR4eItAUUJFbB9f+/F4BIches3jbVYwpspF+R1yv2x4IECAAAECBJ5doMSECAwZJnJOxRCVihwCKduRB44RMIY+AkXM7oyZEiV4nN3zR7AocykiJJwmbGaoeMsqRQaH1+l4CR1RpIjjuWTAGNdl5YEAAQIECBB4coEMEBEXIki0ZSplF9WDLqoWWcnoY9ZFnn8rqWOIcJEFjDELTLd9FiwiJJRwkZWK+ClDHxEq3nJoJPezSnFa5/DHqVKhXDFZWhEgQIAAgecXKNMcslIRf/PHSsUYMrpIERkyMk10ER/6yAcxKPLL6RBt+9s/D+V7KvKTIMeoTLy+xTo/FRKzNPvvU8iYQkWGjHEoJKdWREKJJyi54jKtPL+qOyBAgAABArUKRGWiFC3ioZsqFBkwXl7GORZZyTh8y4mcXdPF+nDomm8vXR57/ek3fxwrFpFJ3j/tcapa5JyKsn0WKnK/fMdFpolSsRjDRa327psAAQIECHw9gcgEGSpiLkWWJPJPfhn+iAkVp3GOLodC4pOhfawPMUySnxZtY95FLFOTKURkcMgBlfyUx+lTITn8UYZDMkhkyMh1HMslP3oaCWNa57aFAAECBAgQeGaBMsciQ0IGhvjJj5dmusjj+b1WuWTwiO/GynGQ8knRzA8lQ5yCRfma7tcxKJSwEB3kkEeMiJQwMW5PoSKGQ8Y2sc4sk2FjfB6PBAgQIECAwLML5FyHCA5jqWIMGKUOEX/sS7go2SCHQiJFxBdZ9BFC2jiWEzljmSoW2SiTR1YjMnVkWMifMlkzDpdOok2eL9s5NXTczl5Onw7JbQsBAgQIECDwxAL5lZrxNz7CRflerPwkSO6Xw3FbGSgyD3QlE2TAiE+H5Hb8xDIGi8gK0SoHNaZlChK5V6oVeSYvyIb9lVBROpiutSJAgAABAgSeVqAULPKjptPf9sgX8bc/9vNrNmMpqxwqKd++ncdiOCRPjO0/KhbjwXiME6ecUKoW2TiWfKJSrcjtqUGpVJy1Lw09ECBAgAABAk8rkB8pncJFjHBkVSFLFHE7WbWIb9zMzbaMWkxDIHE6z03LGCxOX9WdB8v//xHzLT4qFNG+dJhnx2pFbl2Eio8O85SFAAECBAgQeFKBPqoV7+GiDHxEuChzLiJURIjIzdOEitwc/9+wqWpxGgrJEzHmUVJIPmTQeM8S07lcfVQsziobfRmCydMWAgQIECBA4LkF4kusIgNM4SJTROaBfCifFsn5mKcKxvsUiTh0muw55Y68xEKAAAECBAgQeFSgFDQe7cT1BAgQIECAQK0Cl1Hicq9WE/dNgAABAgQIbCIgWGzCqBMCBAgQIEAgBQQL7wMCBAgQIEBgMwHBYjNKHREgQIAAAQKChfcAAQIECBAgMC+wIi2saDr/nM4SIECAAAECBAQL7wECBAgQIEBgMwHBYjNKHREgQIAAAQKChfcAAQIECBAgsJmAYLEZpY4IECBAgAABwcJ7gAABAgQIENhMQLDYjFJHBAgQIECAgGDhPUCAAAECBAhsJiBYbEapIwIECBAgQECw8B4gQIAAAQIENhMQLDaj1BEBAgQIEPiCAjeTQtte/l+mY8Obzb8gjVsiQIAAAQIEdhYQLHYG1j0BAgQIEPh6Arfjw+0zX0/BHREgQIAAAQI7CwgWOwPrngABAgQI1CQgWNT0artXAgQIECCwWOBzEeFzVy3+pTQkQIAAAQIEahIQLGp6td0rAQIECBDYWUCw2BlY9wQIECBAoCYBwaKmV9u9EiBAgACBnQUEi52BdU+AAAECBGoSECxqerXdKwECBAgQ2FlAsNgZWPcECBAgQKAmAcGiplfbvRIgQIAAgYcEhviPx+YXwWLex1kCBAgQIEBghYBgsQJLUwIECBAgQGBeQLCY93GWAAECBAgQWCEgWKzA0pQAAQIECBCYFxAs5n2cJUCAAAECBFYICBYrsDQlQIAAAQIE5gUEi3kfZwkQIECAAIElAtMHUQWLJVjaECBAgAABAosEBItFTBoRIECAAAECSwQEiyVK2hAgQIAAAQKLBASLRUwaESBAgAABAksEBIslStoQIECAAAEC1wWG48X/HyJYXGdylAABAgQIEPiEgGDxCTSXECBAgAABAtcFBIvrLo4SIECAAAECnxAQLD6B5hICBAgQIEDguoBgcd3FUQIECBAgQOATAoLFJ9BcQoAAAQIE6hJYHheWt6xL0N0SIECAAAECnxAQLD6B5hICBAgQIEDguoBgcd3FUQIECBAgUJ1Av8EdCxYbIOqCAAECBAjUIzAfHebP1qPkTgkQIECAAIENBASLDRB1QYAAAQIE6hbo3v+/EMGi7neCuydAgAABApsKCBabcuqMAAECBAjULSBY1P36u3sCBAgQILCpgGCxKafOCBAgQIBA3QKCRd2vv7snQIAAAQKbCggWm3LqjAABAgQI1C0gWNT9+rt7AgQIECCwqYBgsSmnzggQIECAwBcWWJAaFjT5wkBujQABAgQIENhUQLDYlFNnBAgQIECgbgHBou7X390TIECAAIFNBQSLTTl1RoAAAQIE6hYQLOp+/d09AQIECBDYVECw2JRTZwQIECBAoG4BwaLu19/dEyBAgACBTQUEi005dUaAAAECBOoWECzqfv3dPQECBAgQ2FRAsNiUU2cECBAgQKBuAcGi7tff3RMgQIAAgU0FBItNOXVGgAABAgTqFhAs6n793T0BAgQIENhUQLDYlFNnBAgQIECgVoExUggWtb7+7psAAQIECOwgIFjsgKpLAgQIECBQq4BgUesr774JECBAgMAOAoLFDqi6JECAAAECtQoIFrW+8u6bAAECBAjsICBY7ICqSwIECBAgUIXAlRRx5VAVFG6SAAECBAgQ2EFAsNgBVZcECBAgQKAegcsocblXj4I7JUCAAAECBHYQECx2QNUlAQIECBCoVUCwqPWVd98ECBAgQGAHAcFiB1RdEiBAgACBWgUEi1pfefdNgAABAgR2EBAsdkDVJQECBAgQqFVAsKj1lXffBAgQIEBgBwHBYgdUXRIgQIAAgVoFBItaX3n3TYAAAQIEVgvcjw33W6x+UhcQIECAAAECVQm0H3crWHxY2CJAgAABAgQeFBAsHgR0OQECBAgQqE+gO6tRXN69YHHpYY8AAQIECBB4QECweADPpQQIECBAgMClgGBx6WGPAAECBAgQeEBAsHgAz6UECBAgQIDApYBgcelhjwABAgQIEHhAQLB4AM+lBAgQIECAwKWAYHHpYY8AAQIECBB4QECweADPpQQIECBAoG6BH2PEj0fqFnL3BAgQIECAwAMCgsUDeC4lQIAAAQIELgUEi0sPewQIECBAgMADAoLFA3guJUCAAAECX1LggXTwwKVfktJNESBAgAABAlcFpshwJzncOX21ZwcJECBAgAABAlcFBIurLA4SIECAAAECswLd9Qhx/ehsT04SIECAAAECBK4LCBbXXRwlQIAAAQIEPiEgWHwCzSUECBAgQIDAdQHB4rqLowQIECBAgMAnBASLT6C5hAABAgQIELguIFhcd3GUAAECBAgQCIGhado1EILFGi1tCRAgQIAAgVkBwWKWx0kCBAgQIEBgjYBgsUZLWwIECBAgQGBWQLCY5XGSAAECBAgQWCMgWKzR0pYAAQIECBBompn0MHOKHAECBAgQIEBgnYBgsc5LawIECBAgQGBGQLCYwXGKAAECBAgQWCcgWKzz0poAAQIECBCYERAsZnCcIkCAAAECBNYJCBbrvLQmQIAAAQIEZgQEixkcpwgQIECAAIF1AoLFOi+tCRAgQIAAgRkBwWIGxykCBAgQIEBgnYBgsc5LawIECBAgUKPA4v86XbCo8e3hngkQIECAwE4CgsVOsLolQIAAAQL1CLRt0w2lqiFY1POqu1MCBAgQILC7gGCxO7EnIECAAAEC9QgIFvW81u6UAAECBAjsLiBY7E7sCQgQIECAQD0CgkU9r7U7JUCAAAECuwsIFrsTewICBAgQIFCPgGBRz2vtTgkQIECAwO4CgsXuxJ6AAAECBAjUIyBY1PNau1MCBAgQILC7gGCxO7EnIECAAAEC9QgIFvW81u6UAAECBAjsLiBY7E7sCQgQIECAwBcW+EWS+MXuF75xt0aAAAECBAh8XqBrFv3X6YLF54ldSYAAAQIEahf4IWwIFrW/Jdw/AQIECBDYUECw2BBTVwQIECBAoHYBwaL2d4D7J0CAAAECGwoIFhti6ooAAQIECNQuIFjU/g5w/wQIECBAYBOBMVIIFptg6oQAAQIECBBIAcHC+4AAAQIECBDYTECw2IxSRwQIECBAgIBg4T1AgAABAgQIbCYgWGxGqSMCBAgQIEBAsPAeIECAAAECBDYTECw2o9QRAQIECBAgIFh4DxAgQIAAAQKbCQgWm1HqiAABAgQIEBAsvAcIECBAgACBzQQEi80odUSAAAECBAgIFt4DBAgQIECAwHKBoW3nGgsWczrOESBAgACB6gXWRYV1ravHBUCAAAECBAjMCQgWczrOESBAgAABAncELodGBIs7XE4TIECAAAECywUEi+VWWhIgQIAAAQJ3BASLO0BOEyBAgACBugS62U993LMQLO4JOU+AAAECBAgsFhAsFlNpSIAAAQIECNwTECzuCTlPgAABAgQILBYQLBZTaUiAAAECBAjcExAs7gk5T4AAAQIECCwWECwWU2lIgAABAgQI3BMQLO4JOU+AAAECBAgsFhAsFlNpSIAAAQIECNwTECzuCTlPgAABAgQILBYQLBZTaUiAAAECBAicCVz9hk7B4kzIJgECBAgQIPCYgGDxmJ+rCRAgQIAAgTMBweIMwyYBAgQIECDwmIBg8ZifqwkQIECAAIEzAcHiDMMmAQIECBAg8JiAYPGYn6sJECBAgACBMwHB4gzDJgECBAgQIPCYgGDxmJ+rCRAgQIAAgTMBweIMwyYBAgQIECDwmIBg8ZifqwkQIECAAIEzAcHiDMMmAQIECBAgsEKg+zFG/HhkRX+aEiBAgAABAgTOBQSLcw3bBAgQIECAwHqBs8qFYLGezxUECBAgQIDADQHB4gaMwwQIECBAgMB6AcFivZkrCBAgQIAAgRsCgsUNGIcJECBAgACBWwK348PtM7f6cpwAAQIECBAgcENAsLgB4zABAgQIECCwXkCwWG/mCgIECBAgQOCGgGBxA8ZhAgQIECBAYL2AYLHezBUECBAgQIDADQHB4gaMwwQIECBAgMCcwPUIcf3oXD/OESBAgAABAgRuCAgWN2AcJkCAAAECBNYLCBbrzVxBgAABAgQI3BAQLG7AOEyAAAECBAisFxAs1pu5ggABAgQIELghIFjcgHGYAAECBAgQWC8gWKw3cwUBAgQIECBwQ0CwuAHjMAECBAgQILBeQLBYb+YKAgQIECBA4IaAYHEDxmECBAgQIEBgvYBgsd7MFQQIECBAgMANAcHiBozDBAgQIECAwCTQLY8Ly1vSJUCAAAECBAjcERAs7gA5TYAAAQIECCwXePloOrRNxoxjPAzTdtnPFrEfD00phfSx2bVNn/ux3Xdt3/RDtrIQIECAAAECzywQf99LySEeutzO9el+yvZ4Po+dH88m03DJGCwySDTdGA6G47TdTus4nBeX7NC3kSaaSBUZMi7CRfZpIUCAAAECBJ5YoISFeMi/8bFEAsgsMN5Ql1nhENu5HxlhKDlhOl0KEKXdVLGIRqWL7CgCRneMykVeG/vDcYjqRF44npt2mj4OnoeL0p0HAgQIECBA4HkFPkJF/I3Pv/Pj3/oSNHI772wMHeUex2JEZIg4UYJG04zBIhvmEEgJF+WisbM+0kU2zPN9nsyqRhdVi9JHBI6zcJGXWQgQIECAAIHnFZgqFRkoosqQBYUpGZQsMFYpStEigkEZ+sjsUNrF/njbHxWLLHEc88L4GaJR/nRxdRfDHsM0HFLmWpQhkxIuspcyLPL+xM9r6TcnQIAAAQLVC0Q4KIGihITMAbHRvWQ2iHVsZ2WiHCvn2hgRiROZHcqUisI3VSyiHHHMIZC4YIifHAYplYpyrG3eSmUiDuaYSF7yVioXuR8XTcdjZSFAgAABAgSeVyBzQCSFkgdyawwVuT9VKzJQHMbt8vc/2pdrcl2GNqahkJyM0caBkjzy4pjAWUJGJJCsWpQs8TZdnOEiOh3LGBEw4rrxF8lfwUKAAAECBAg8tUCGhJwcUUYx8m//mA9KyIi//2U/s0JkhMPpXAaSuKQ8/v2fOWWi+en//vO/m+Pr0LxGeeJ4jFJETKDovw+xnXMp4ifWb1GpaGNcJOdWZLEiKxiZM+JgPloIECBAgACBZxbIgkL+/lO4KEWGDBgxHPJSQkXUFg5d0/0UYSMaHb7lT/v9P/76p7yq/dvPp4pF9hEXDi9Dc4hOM4X0WbWIUkUGh/Iksc7KRYaKaNpE0/gOizg3Jos4YyFAgAABAgSeWiCrDiVUjFMick5FViVy+KNUKnIdIaPNAPJtOp6h4GPJqDAuOauzNIyhjwwXOcTxFpMtXk7hIjrPINHH8axeZM2jzS+3iPYZNiwECBAgQIDAcwucpjZkiMhlDBSxPg15RKjIOZiHCBjlZ9o+u+uzYBEns2oRuaFp84JSp4jhkAgX3U8RHt4iSMSQx0tM6BwDxviEOddCrjgjtUmAAAECBJ5UIOoH47BErDJkZKDIIJHFhxzFyAJECRQxBJJZoRyP82fLR7AoszyjCpFDHDmJM+ZqjuEig0RUJtpDhIpsHskjKxWHSBMlUMTDizkWZ6Y2CRAgQIDAcwqM38QdgSJ//SlY5DqPlxARASODRYaKnHOReSG3z5b3YDHEBW1WKY4RF9q3mIwRgWLIL7CI0NDG0EcX+/lV3hkmsnKRsz9fImyUJcscFgIECBAgQOC5BUqiiCBR/nuPsdBQhkdOQyERIg5TBSNDxWlI5Oym34NFnhxi1KOEi6xF5Nd6l8mZmSfi4j5CRgaN+C/HYg5GbGcvOcciV9MvUnY8ECBAgAABAk8p8P7nPCdo5h3E3/8MFhkicrpEGQ6Ztsu0icgO7WlixnjHbTN93HQOoHwUNSdolgpGrPP/IsvSxRgu8onHgDHXiXMECBAgQIDAr1wgP7yRQSJ/zVifvlEzgsX33//vH+/98pcfN51rXT6zmuEhnrD/lvMrYp0XxEMZFhl/hbkunCNAgAABAgSeQOCHeRblUx2Lf/G2/e2fVRsWc2lIgAABAgQIzAn8C5DdL0rYAs4xAAAAAElFTkSuQmCC"
- /***/ }),
- /***/ "e0f2":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.addListener = addListener;
- exports.removeListener = removeListener;
- var raf = null;
- function requestAnimationFrame(callback) {
- if (!raf) {
- raf = (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
- return setTimeout(callback, 16);
- }).bind(window);
- }
- return raf(callback);
- }
- var caf = null;
- function cancelAnimationFrame(id) {
- if (!caf) {
- caf = (window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function (id) {
- clearTimeout(id);
- }).bind(window);
- }
- caf(id);
- }
- function createStyles(styleText) {
- var style = document.createElement('style');
- style.type = 'text/css';
- if (style.styleSheet) {
- style.styleSheet.cssText = styleText;
- } else {
- style.appendChild(document.createTextNode(styleText));
- }
- (document.querySelector('head') || document.body).appendChild(style);
- return style;
- }
- function createElement(tagName) {
- var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var elem = document.createElement(tagName);
- Object.keys(props).forEach(function (key) {
- elem[key] = props[key];
- });
- return elem;
- }
- function getComputedStyle(elem, prop, pseudo) {
- // for older versions of Firefox, `getComputedStyle` required
- // the second argument and may return `null` for some elements
- // when `display: none`
- var computedStyle = window.getComputedStyle(elem, pseudo || null) || {
- display: 'none'
- };
- return computedStyle[prop];
- }
- function getRenderInfo(elem) {
- if (!document.documentElement.contains(elem)) {
- return {
- detached: true,
- rendered: false
- };
- }
- var current = elem;
- while (current !== document) {
- if (getComputedStyle(current, 'display') === 'none') {
- return {
- detached: false,
- rendered: false
- };
- }
- current = current.parentNode;
- }
- return {
- detached: false,
- rendered: true
- };
- }
- var css = ".resize-triggers{visibility:hidden;opacity:0}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:\"\";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}";
- var total = 0;
- var style = null;
- function addListener(elem, callback) {
- if (!elem.__resize_mutation_handler__) {
- elem.__resize_mutation_handler__ = handleMutation.bind(elem);
- }
- var listeners = elem.__resize_listeners__;
- if (!listeners) {
- elem.__resize_listeners__ = [];
- if (window.ResizeObserver) {
- var offsetWidth = elem.offsetWidth,
- offsetHeight = elem.offsetHeight;
- var ro = new ResizeObserver(function () {
- if (!elem.__resize_observer_triggered__) {
- elem.__resize_observer_triggered__ = true;
- if (elem.offsetWidth === offsetWidth && elem.offsetHeight === offsetHeight) {
- return;
- }
- }
- runCallbacks(elem);
- }); // initially display none won't trigger ResizeObserver callback
- var _getRenderInfo = getRenderInfo(elem),
- detached = _getRenderInfo.detached,
- rendered = _getRenderInfo.rendered;
- elem.__resize_observer_triggered__ = detached === false && rendered === false;
- elem.__resize_observer__ = ro;
- ro.observe(elem);
- } else if (elem.attachEvent && elem.addEventListener) {
- // targeting IE9/10
- elem.__resize_legacy_resize_handler__ = function handleLegacyResize() {
- runCallbacks(elem);
- };
- elem.attachEvent('onresize', elem.__resize_legacy_resize_handler__);
- document.addEventListener('DOMSubtreeModified', elem.__resize_mutation_handler__);
- } else {
- if (!total) {
- style = createStyles(css);
- }
- initTriggers(elem);
- elem.__resize_rendered__ = getRenderInfo(elem).rendered;
- if (window.MutationObserver) {
- var mo = new MutationObserver(elem.__resize_mutation_handler__);
- mo.observe(document, {
- attributes: true,
- childList: true,
- characterData: true,
- subtree: true
- });
- elem.__resize_mutation_observer__ = mo;
- }
- }
- }
- elem.__resize_listeners__.push(callback);
- total++;
- }
- function removeListener(elem, callback) {
- var listeners = elem.__resize_listeners__;
- if (!listeners) {
- return;
- }
- if (callback) {
- listeners.splice(listeners.indexOf(callback), 1);
- } // no listeners exist, or removing all listeners
- if (!listeners.length || !callback) {
- // targeting IE9/10
- if (elem.detachEvent && elem.removeEventListener) {
- elem.detachEvent('onresize', elem.__resize_legacy_resize_handler__);
- document.removeEventListener('DOMSubtreeModified', elem.__resize_mutation_handler__);
- return;
- }
- if (elem.__resize_observer__) {
- elem.__resize_observer__.unobserve(elem);
- elem.__resize_observer__.disconnect();
- elem.__resize_observer__ = null;
- } else {
- if (elem.__resize_mutation_observer__) {
- elem.__resize_mutation_observer__.disconnect();
- elem.__resize_mutation_observer__ = null;
- }
- elem.removeEventListener('scroll', handleScroll);
- elem.removeChild(elem.__resize_triggers__.triggers);
- elem.__resize_triggers__ = null;
- }
- elem.__resize_listeners__ = null;
- }
- if (! --total && style) {
- style.parentNode.removeChild(style);
- }
- }
- function getUpdatedSize(elem) {
- var _elem$__resize_last__ = elem.__resize_last__,
- width = _elem$__resize_last__.width,
- height = _elem$__resize_last__.height;
- var offsetWidth = elem.offsetWidth,
- offsetHeight = elem.offsetHeight;
- if (offsetWidth !== width || offsetHeight !== height) {
- return {
- width: offsetWidth,
- height: offsetHeight
- };
- }
- return null;
- }
- function handleMutation() {
- // `this` denotes the scrolling element
- var _getRenderInfo2 = getRenderInfo(this),
- rendered = _getRenderInfo2.rendered,
- detached = _getRenderInfo2.detached;
- if (rendered !== this.__resize_rendered__) {
- if (!detached && this.__resize_triggers__) {
- resetTriggers(this);
- this.addEventListener('scroll', handleScroll, true);
- }
- this.__resize_rendered__ = rendered;
- runCallbacks(this);
- }
- }
- function handleScroll() {
- var _this = this;
- // `this` denotes the scrolling element
- resetTriggers(this);
- if (this.__resize_raf__) {
- cancelAnimationFrame(this.__resize_raf__);
- }
- this.__resize_raf__ = requestAnimationFrame(function () {
- var updated = getUpdatedSize(_this);
- if (updated) {
- _this.__resize_last__ = updated;
- runCallbacks(_this);
- }
- });
- }
- function runCallbacks(elem) {
- if (!elem || !elem.__resize_listeners__) {
- return;
- }
- elem.__resize_listeners__.forEach(function (callback) {
- callback.call(elem);
- });
- }
- function initTriggers(elem) {
- var position = getComputedStyle(elem, 'position');
- if (!position || position === 'static') {
- elem.style.position = 'relative';
- }
- elem.__resize_old_position__ = position;
- elem.__resize_last__ = {};
- var triggers = createElement('div', {
- className: 'resize-triggers'
- });
- var expand = createElement('div', {
- className: 'resize-expand-trigger'
- });
- var expandChild = createElement('div');
- var contract = createElement('div', {
- className: 'resize-contract-trigger'
- });
- expand.appendChild(expandChild);
- triggers.appendChild(expand);
- triggers.appendChild(contract);
- elem.appendChild(triggers);
- elem.__resize_triggers__ = {
- triggers: triggers,
- expand: expand,
- expandChild: expandChild,
- contract: contract
- };
- resetTriggers(elem);
- elem.addEventListener('scroll', handleScroll, true);
- elem.__resize_last__ = {
- width: elem.offsetWidth,
- height: elem.offsetHeight
- };
- }
- function resetTriggers(elem) {
- var _elem$__resize_trigge = elem.__resize_triggers__,
- expand = _elem$__resize_trigge.expand,
- expandChild = _elem$__resize_trigge.expandChild,
- contract = _elem$__resize_trigge.contract; // batch read
- var csw = contract.scrollWidth,
- csh = contract.scrollHeight;
- var eow = expand.offsetWidth,
- eoh = expand.offsetHeight,
- esw = expand.scrollWidth,
- esh = expand.scrollHeight; // batch write
- contract.scrollLeft = csw;
- contract.scrollTop = csh;
- expandChild.style.width = eow + 1 + 'px';
- expandChild.style.height = eoh + 1 + 'px';
- expand.scrollLeft = esw;
- expand.scrollTop = esh;
- }
- /***/ }),
- /***/ "e1d3":
- /***/ (function(module, exports) {
- function _setPrototypeOf(o, p) {
- module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
- o.__proto__ = p;
- return o;
- };
- return _setPrototypeOf(o, p);
- }
- module.exports = _setPrototypeOf;
- /***/ }),
- /***/ "e22c":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- // EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
- var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__("5643");
- var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default = /*#__PURE__*/__webpack_require__.n(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_);
- // CONCATENATED MODULE: ./node_modules/vue-class-component/dist/vue-class-component.esm.js
- /**
- * vue-class-component v7.1.0
- * (c) 2015-present Evan You
- * @license MIT
- */
- // The rational behind the verbose Reflect-feature check below is the fact that there are polyfills
- // which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.
- // Without this check consumers will encounter hard to track down runtime errors.
- var reflectionIsSupported = typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;
- function copyReflectionMetadata(to, from) {
- forwardMetadata(to, from);
- Object.getOwnPropertyNames(from.prototype).forEach(function (key) {
- forwardMetadata(to.prototype, from.prototype, key);
- });
- Object.getOwnPropertyNames(from).forEach(function (key) {
- forwardMetadata(to, from, key);
- });
- }
- function forwardMetadata(to, from, propertyKey) {
- var metaKeys = propertyKey
- ? Reflect.getOwnMetadataKeys(from, propertyKey)
- : Reflect.getOwnMetadataKeys(from);
- metaKeys.forEach(function (metaKey) {
- var metadata = propertyKey
- ? Reflect.getOwnMetadata(metaKey, from, propertyKey)
- : Reflect.getOwnMetadata(metaKey, from);
- if (propertyKey) {
- Reflect.defineMetadata(metaKey, metadata, to, propertyKey);
- }
- else {
- Reflect.defineMetadata(metaKey, metadata, to);
- }
- });
- }
- var fakeArray = { __proto__: [] };
- var hasProto = fakeArray instanceof Array;
- function createDecorator(factory) {
- return function (target, key, index) {
- var Ctor = typeof target === 'function'
- ? target
- : target.constructor;
- if (!Ctor.__decorators__) {
- Ctor.__decorators__ = [];
- }
- if (typeof index !== 'number') {
- index = undefined;
- }
- Ctor.__decorators__.push(function (options) { return factory(options, key, index); });
- };
- }
- function mixins() {
- var Ctors = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- Ctors[_i] = arguments[_i];
- }
- return external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default.a.extend({ mixins: Ctors });
- }
- function isPrimitive(value) {
- var type = typeof value;
- return value == null || (type !== 'object' && type !== 'function');
- }
- function warn(message) {
- if (typeof console !== 'undefined') {
- console.warn('[vue-class-component] ' + message);
- }
- }
- function collectDataFromConstructor(vm, Component) {
- // override _init to prevent to init as Vue instance
- var originalInit = Component.prototype._init;
- Component.prototype._init = function () {
- var _this = this;
- // proxy to actual vm
- var keys = Object.getOwnPropertyNames(vm);
- // 2.2.0 compat (props are no longer exposed as self properties)
- if (vm.$options.props) {
- for (var key in vm.$options.props) {
- if (!vm.hasOwnProperty(key)) {
- keys.push(key);
- }
- }
- }
- keys.forEach(function (key) {
- if (key.charAt(0) !== '_') {
- Object.defineProperty(_this, key, {
- get: function () { return vm[key]; },
- set: function (value) { vm[key] = value; },
- configurable: true
- });
- }
- });
- };
- // should be acquired class property values
- var data = new Component();
- // restore original _init to avoid memory leak (#209)
- Component.prototype._init = originalInit;
- // create plain data object
- var plainData = {};
- Object.keys(data).forEach(function (key) {
- if (data[key] !== undefined) {
- plainData[key] = data[key];
- }
- });
- if (false) {}
- return plainData;
- }
- var $internalHooks = [
- 'data',
- 'beforeCreate',
- 'created',
- 'beforeMount',
- 'mounted',
- 'beforeDestroy',
- 'destroyed',
- 'beforeUpdate',
- 'updated',
- 'activated',
- 'deactivated',
- 'render',
- 'errorCaptured',
- 'serverPrefetch' // 2.6
- ];
- function componentFactory(Component, options) {
- if (options === void 0) { options = {}; }
- options.name = options.name || Component._componentTag || Component.name;
- // prototype props.
- var proto = Component.prototype;
- Object.getOwnPropertyNames(proto).forEach(function (key) {
- if (key === 'constructor') {
- return;
- }
- // hooks
- if ($internalHooks.indexOf(key) > -1) {
- options[key] = proto[key];
- return;
- }
- var descriptor = Object.getOwnPropertyDescriptor(proto, key);
- if (descriptor.value !== void 0) {
- // methods
- if (typeof descriptor.value === 'function') {
- (options.methods || (options.methods = {}))[key] = descriptor.value;
- }
- else {
- // typescript decorated data
- (options.mixins || (options.mixins = [])).push({
- data: function () {
- var _a;
- return _a = {}, _a[key] = descriptor.value, _a;
- }
- });
- }
- }
- else if (descriptor.get || descriptor.set) {
- // computed properties
- (options.computed || (options.computed = {}))[key] = {
- get: descriptor.get,
- set: descriptor.set
- };
- }
- });
- (options.mixins || (options.mixins = [])).push({
- data: function () {
- return collectDataFromConstructor(this, Component);
- }
- });
- // decorate options
- var decorators = Component.__decorators__;
- if (decorators) {
- decorators.forEach(function (fn) { return fn(options); });
- delete Component.__decorators__;
- }
- // find super
- var superProto = Object.getPrototypeOf(Component.prototype);
- var Super = superProto instanceof external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default.a
- ? superProto.constructor
- : external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default.a;
- var Extended = Super.extend(options);
- forwardStaticMembers(Extended, Component, Super);
- if (reflectionIsSupported) {
- copyReflectionMetadata(Extended, Component);
- }
- return Extended;
- }
- var reservedPropertyNames = [
- // Unique id
- 'cid',
- // Super Vue constructor
- 'super',
- // Component options that will be used by the component
- 'options',
- 'superOptions',
- 'extendOptions',
- 'sealedOptions',
- // Private assets
- 'component',
- 'directive',
- 'filter'
- ];
- var shouldIgnore = {
- prototype: true,
- arguments: true,
- callee: true,
- caller: true
- };
- function forwardStaticMembers(Extended, Original, Super) {
- // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable
- Object.getOwnPropertyNames(Original).forEach(function (key) {
- // Skip the properties that should not be overwritten
- if (shouldIgnore[key]) {
- return;
- }
- // Some browsers does not allow reconfigure built-in properties
- var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);
- if (extendedDescriptor && !extendedDescriptor.configurable) {
- return;
- }
- var descriptor = Object.getOwnPropertyDescriptor(Original, key);
- // If the user agent does not support `__proto__` or its family (IE <= 10),
- // the sub class properties may be inherited properties from the super class in TypeScript.
- // We need to exclude such properties to prevent to overwrite
- // the component options object which stored on the extended constructor (See #192).
- // If the value is a referenced value (object or function),
- // we can check equality of them and exclude it if they have the same reference.
- // If it is a primitive value, it will be forwarded for safety.
- if (!hasProto) {
- // Only `cid` is explicitly exluded from property forwarding
- // because we cannot detect whether it is a inherited property or not
- // on the no `__proto__` environment even though the property is reserved.
- if (key === 'cid') {
- return;
- }
- var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);
- if (!isPrimitive(descriptor.value) &&
- superDescriptor &&
- superDescriptor.value === descriptor.value) {
- return;
- }
- }
- // Warn if the users manually declare reserved properties
- if (false) {}
- Object.defineProperty(Extended, key, descriptor);
- });
- }
- function vue_class_component_esm_Component(options) {
- if (typeof options === 'function') {
- return componentFactory(options);
- }
- return function (Component) {
- return componentFactory(Component, options);
- };
- }
- vue_class_component_esm_Component.registerHooks = function registerHooks(keys) {
- $internalHooks.push.apply($internalHooks, keys);
- };
- /* harmony default export */ var vue_class_component_esm = (vue_class_component_esm_Component);
- // CONCATENATED MODULE: ./node_modules/vue-property-decorator/lib/vue-property-decorator.js
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Inject", function() { return Inject; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InjectReactive", function() { return InjectReactive; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Provide", function() { return Provide; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProvideReactive", function() { return ProvideReactive; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Model", function() { return Model; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Prop", function() { return Prop; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropSync", function() { return PropSync; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Watch", function() { return Watch; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Emit", function() { return Emit; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ref", function() { return Ref; });
- /* concated harmony reexport Component */__webpack_require__.d(__webpack_exports__, "Component", function() { return vue_class_component_esm; });
- /* concated harmony reexport Vue */__webpack_require__.d(__webpack_exports__, "Vue", function() { return external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default.a; });
- /* concated harmony reexport Mixins */__webpack_require__.d(__webpack_exports__, "Mixins", function() { return mixins; });
- /** vue-property-decorator verson 8.2.2 MIT LICENSE copyright 2019 kaorun343 */
- /// <reference types='reflect-metadata'/>
- /** Used for keying reactive provide/inject properties */
- var reactiveInjectKey = '__reactiveInject__';
- /**
- * decorator of an inject
- * @param from key
- * @return PropertyDecorator
- */
- function Inject(options) {
- return createDecorator(function (componentOptions, key) {
- if (typeof componentOptions.inject === 'undefined') {
- componentOptions.inject = {};
- }
- if (!Array.isArray(componentOptions.inject)) {
- componentOptions.inject[key] = options || key;
- }
- });
- }
- /**
- * decorator of a reactive inject
- * @param from key
- * @return PropertyDecorator
- */
- function InjectReactive(options) {
- return createDecorator(function (componentOptions, key) {
- if (typeof componentOptions.inject === 'undefined') {
- componentOptions.inject = {};
- }
- if (!Array.isArray(componentOptions.inject)) {
- var fromKey_1 = !!options ? options.from || options : key;
- var defaultVal_1 = (!!options && options.default) || undefined;
- if (!componentOptions.computed)
- componentOptions.computed = {};
- componentOptions.computed[key] = function () {
- var obj = this[reactiveInjectKey];
- return obj ? obj[fromKey_1] : defaultVal_1;
- };
- componentOptions.inject[reactiveInjectKey] = reactiveInjectKey;
- }
- });
- }
- /**
- * decorator of a provide
- * @param key key
- * @return PropertyDecorator | void
- */
- function Provide(key) {
- return createDecorator(function (componentOptions, k) {
- var provide = componentOptions.provide;
- if (typeof provide !== 'function' || !provide.managed) {
- var original_1 = componentOptions.provide;
- provide = componentOptions.provide = function () {
- var rv = Object.create((typeof original_1 === 'function' ? original_1.call(this) : original_1) ||
- null);
- for (var i in provide.managed)
- rv[provide.managed[i]] = this[i];
- return rv;
- };
- provide.managed = {};
- }
- provide.managed[k] = key || k;
- });
- }
- /**
- * decorator of a reactive provide
- * @param key key
- * @return PropertyDecorator | void
- */
- function ProvideReactive(key) {
- return createDecorator(function (componentOptions, k) {
- var provide = componentOptions.provide;
- // inject parent reactive services (if any)
- if (!Array.isArray(componentOptions.inject)) {
- componentOptions.inject = componentOptions.inject || {};
- componentOptions.inject[reactiveInjectKey] = { from: reactiveInjectKey, default: {} };
- }
- if (typeof provide !== 'function' || !provide.managedReactive) {
- var original_2 = componentOptions.provide;
- provide = componentOptions.provide = function () {
- var _this = this;
- var rv = typeof original_2 === 'function'
- ? original_2.call(this)
- : original_2;
- rv = Object.create(rv || null);
- // set reactive services (propagates previous services if necessary)
- rv[reactiveInjectKey] = this[reactiveInjectKey] || {};
- var _loop_1 = function (i) {
- rv[provide.managedReactive[i]] = this_1[i]; // Duplicates the behavior of `@Provide`
- Object.defineProperty(rv[reactiveInjectKey], provide.managedReactive[i], {
- enumerable: true,
- get: function () { return _this[i]; },
- });
- };
- var this_1 = this;
- for (var i in provide.managedReactive) {
- _loop_1(i);
- }
- return rv;
- };
- provide.managedReactive = {};
- }
- provide.managedReactive[k] = key || k;
- });
- }
- /** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */
- var reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';
- function applyMetadata(options, target, key) {
- if (reflectMetadataIsSupported) {
- if (!Array.isArray(options) &&
- typeof options !== 'function' &&
- typeof options.type === 'undefined') {
- options.type = Reflect.getMetadata('design:type', target, key);
- }
- }
- }
- /**
- * decorator of model
- * @param event event name
- * @param options options
- * @return PropertyDecorator
- */
- function Model(event, options) {
- if (options === void 0) { options = {}; }
- return function (target, key) {
- applyMetadata(options, target, key);
- createDecorator(function (componentOptions, k) {
- ;
- (componentOptions.props || (componentOptions.props = {}))[k] = options;
- componentOptions.model = { prop: k, event: event || k };
- })(target, key);
- };
- }
- /**
- * decorator of a prop
- * @param options the options for the prop
- * @return PropertyDecorator | void
- */
- function Prop(options) {
- if (options === void 0) { options = {}; }
- return function (target, key) {
- applyMetadata(options, target, key);
- createDecorator(function (componentOptions, k) {
- ;
- (componentOptions.props || (componentOptions.props = {}))[k] = options;
- })(target, key);
- };
- }
- /**
- * decorator of a synced prop
- * @param propName the name to interface with from outside, must be different from decorated property
- * @param options the options for the synced prop
- * @return PropertyDecorator | void
- */
- function PropSync(propName, options) {
- if (options === void 0) { options = {}; }
- // @ts-ignore
- return function (target, key) {
- applyMetadata(options, target, key);
- createDecorator(function (componentOptions, k) {
- ;
- (componentOptions.props || (componentOptions.props = {}))[propName] = options;
- (componentOptions.computed || (componentOptions.computed = {}))[k] = {
- get: function () {
- return this[propName];
- },
- set: function (value) {
- // @ts-ignore
- this.$emit("update:" + propName, value);
- },
- };
- })(target, key);
- };
- }
- /**
- * decorator of a watch function
- * @param path the path or the expression to observe
- * @param WatchOption
- * @return MethodDecorator
- */
- function Watch(path, options) {
- if (options === void 0) { options = {}; }
- var _a = options.deep, deep = _a === void 0 ? false : _a, _b = options.immediate, immediate = _b === void 0 ? false : _b;
- return createDecorator(function (componentOptions, handler) {
- if (typeof componentOptions.watch !== 'object') {
- componentOptions.watch = Object.create(null);
- }
- var watch = componentOptions.watch;
- if (typeof watch[path] === 'object' && !Array.isArray(watch[path])) {
- watch[path] = [watch[path]];
- }
- else if (typeof watch[path] === 'undefined') {
- watch[path] = [];
- }
- watch[path].push({ handler: handler, deep: deep, immediate: immediate });
- });
- }
- // Code copied from Vue/src/shared/util.js
- var hyphenateRE = /\B([A-Z])/g;
- var hyphenate = function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase(); };
- /**
- * decorator of an event-emitter function
- * @param event The name of the event
- * @return MethodDecorator
- */
- function Emit(event) {
- return function (_target, key, descriptor) {
- key = hyphenate(key);
- var original = descriptor.value;
- descriptor.value = function emitter() {
- var _this = this;
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- var emit = function (returnValue) {
- if (returnValue !== undefined)
- args.unshift(returnValue);
- _this.$emit.apply(_this, [event || key].concat(args));
- };
- var returnValue = original.apply(this, args);
- if (isPromise(returnValue)) {
- returnValue.then(function (returnValue) {
- emit(returnValue);
- });
- }
- else {
- emit(returnValue);
- }
- return returnValue;
- };
- };
- }
- /**
- * decorator of a ref prop
- * @param refKey the ref key defined in template
- */
- function Ref(refKey) {
- return createDecorator(function (options, key) {
- options.computed = options.computed || {};
- options.computed[key] = {
- cache: false,
- get: function () {
- return this.$refs[refKey || key];
- },
- };
- });
- }
- function isPromise(obj) {
- return obj instanceof Promise || (obj && typeof obj.then === 'function');
- }
- /***/ }),
- /***/ "e340":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports._getValueOfEpsgCode = _getValueOfEpsgCode;
- exports.vertifyEpsgCode = vertifyEpsgCode;
- exports.transformFeatures = transformFeatures;
- exports.getServerEpsgCode = getServerEpsgCode;
- exports.checkAndRectifyFeatures = checkAndRectifyFeatures;
- exports.default = void 0;
- var _regenerator = _interopRequireDefault(__webpack_require__("849c"));
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("1d96"));
- var _Events2 = __webpack_require__("e3e2");
- var _epsgDefine = __webpack_require__("1a91");
- var _proj = _interopRequireDefault(__webpack_require__("7319"));
- var _util = __webpack_require__("1448");
- var _statistics = __webpack_require__("9dde");
- var _lodash = _interopRequireDefault(__webpack_require__("25a2"));
- function _getValueOfEpsgCode(epsgCode) {
- var defName = "EPSG:".concat(epsgCode);
- var defValue = (0, _epsgDefine.getProjection)(defName);
- if (!defValue) {
- console.error("".concat(defName, " not define"));
- } else {
- !_proj.default.defs(defName) && _proj.default.defs(defName, defValue);
- }
- return {
- name: defName,
- value: defValue
- };
- }
- function _transformCoordinates(coordinates, projName) {
- if (coordinates[0] instanceof Array) {
- coordinates.forEach(function (item, index) {
- if (item instanceof Array) {
- coordinates[index] = _transformCoordinates(item, projName);
- }
- });
- } else if (coordinates.length > 0) {
- return projName !== 'EPSG:4326' ? (0, _proj.default)(projName, 'EPSG:4326', coordinates) : coordinates;
- }
- return coordinates;
- }
- function vertifyEpsgCode(firstFeature) {
- var epsgCode = 4326;
- var firstCoord = (firstFeature.geometry || {}).coordinates || [];
- if (firstCoord[0] instanceof Array) {
- if (firstCoord[0][0] instanceof Array) {
- // type: Polygon
- firstCoord = firstCoord[0][0];
- if (firstCoord[0] instanceof Array) {
- // type: MultiPolygon
- firstCoord = firstCoord[0];
- }
- } else {
- // type: LineString
- firstCoord = firstCoord[0];
- }
- } // 以防经纬度交换,判断错误的问题,都改成180
- var acceptRange = firstCoord[0] > -180 && firstCoord[0] < 180 && firstCoord[1] > -180 && firstCoord[1] < 180;
- if (!acceptRange) {
- epsgCode = 3857;
- }
- return epsgCode;
- }
- function transformFeatures(epsgCode, features) {
- var projName = _getValueOfEpsgCode(epsgCode).name;
- var transformedFeatures = features.map(function (feature) {
- if (_proj.default.defs(projName) && feature.geometry && feature.geometry.coordinates) {
- var coordinates = feature.geometry.coordinates;
- feature.geometry.coordinates = _transformCoordinates(coordinates, projName);
- }
- return feature;
- });
- return transformedFeatures;
- } // 获取iServer restdata restmap 的 epsgcode
- function getServerEpsgCode(projectionUrl, options) {
- if (!projectionUrl) {
- return;
- }
- return SuperMap.FetchRequest.get(projectionUrl, null, options).then(function (response) {
- return response.json();
- }).then(function (results) {
- var epsgCode = results.epsgCode;
- if (results.datasetInfo) {
- var prjCoordSys = results.datasetInfo.prjCoordSys;
- epsgCode = prjCoordSys ? prjCoordSys.epsgCode : null;
- }
- return epsgCode;
- }).catch(function (error) {
- console.log(error);
- });
- } // 关系型存储发布成服务后坐标一定是4326,但真实数据可能不是4326,判断一下暂时按照3857处理
- function checkAndRectifyFeatures(_x) {
- return _checkAndRectifyFeatures.apply(this, arguments);
- }
- /**
- * @class iServerRestService
- * @classdesc iServer 数据请求类。
- * @category BaseTypes Util
- * @param {string} url - iServer 数据服务或地图服务地址。
- * @fires iServerRestService#getdatasucceeded
- * @fires iServerRestService#getdatafailed
- * @fires iServerRestService#featureisempty
- */
- function _checkAndRectifyFeatures() {
- _checkAndRectifyFeatures = (0, _asyncToGenerator2.default)(
- /*#__PURE__*/
- _regenerator.default.mark(function _callee2(_ref) {
- var features, epsgCode, projectionUrl, options, currentEpsgCode, copyFeatures, epsgValue, vertifyCode;
- return _regenerator.default.wrap(function _callee2$(_context2) {
- while (1) {
- switch (_context2.prev = _context2.next) {
- case 0:
- features = _ref.features, epsgCode = _ref.epsgCode, projectionUrl = _ref.projectionUrl, options = _ref.options;
- currentEpsgCode = epsgCode;
- copyFeatures = features;
- if (epsgCode) {
- _context2.next = 7;
- break;
- }
- _context2.next = 6;
- return getServerEpsgCode(projectionUrl, options);
- case 6:
- currentEpsgCode = _context2.sent;
- case 7:
- epsgValue = (0, _epsgDefine.getProjection)("EPSG:".concat(currentEpsgCode));
- if (epsgValue === void 0) {
- currentEpsgCode = 4326;
- }
- if (currentEpsgCode && features && !!features.length) {
- if (currentEpsgCode === 4326) {
- vertifyCode = vertifyEpsgCode(features[0]);
- currentEpsgCode = vertifyCode;
- }
- copyFeatures = transformFeatures(currentEpsgCode, (0, _lodash.default)(features));
- }
- return _context2.abrupt("return", copyFeatures);
- case 11:
- case "end":
- return _context2.stop();
- }
- }
- }, _callee2);
- }));
- return _checkAndRectifyFeatures.apply(this, arguments);
- }
- var iServerRestService =
- /*#__PURE__*/
- function (_Events) {
- (0, _inherits2.default)(iServerRestService, _Events);
- function iServerRestService(url, options) {
- var _this;
- (0, _classCallCheck2.default)(this, iServerRestService);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(iServerRestService).call(this));
- _this.url = url;
- _this.options = options || {};
- _this.eventTypes = ['getdatasucceeded', 'getdatafailed', 'featureisempty'];
- return _this;
- }
- (0, _createClass2.default)(iServerRestService, [{
- key: "getData",
- value: function getData(datasetInfo, queryInfo) {
- if (!this._checkUrl(this.url)) {
- return null;
- }
- this._getDatasetInfoSucceed(datasetInfo, queryInfo);
- }
- /**
- * @function iServerRestService.prototype.getData
- * @description 请求数据。
- * @param {Object} queryInfo - 可选参数。
- * @param {Object} [queryInfo.maxFeatures] - 最多可返回的要素数量。
- * @param {Object} [queryInfo.attributeFilter] - 属性过滤条件。
- * @param {Object} [queryInfo.keyWord] - 筛选关键字。
- */
- }, {
- key: "_getDatasetInfoSucceed",
- value: function _getDatasetInfoSucceed(datasetInfo, queryInfo) {
- datasetInfo.dataUrl = this.url; // 判断服务为地图服务 或者 数据服务
- this.url.indexOf('/rest/maps') > -1 && this.getMapFeatures(datasetInfo, queryInfo);
- this.url.indexOf('/rest/data') > -1 && this.getDataFeatures(datasetInfo, queryInfo);
- }
- /**
- * @function iServerRestService.prototype.getMapFeatures
- * @description 请求地图服务数据。
- * @param {Object} datasetInfo - 数据集参数。
- * @param {Object} datasetInfo.dataUrl - 地图服务地址。
- * @param {Object} datasetInfo.mapName - 图层名。
- * @param {Object} queryInfo - 可选参数。
- * @param {Object} [queryInfo.maxFeatures] - 最多可返回的要素数量。
- * @param {Object} [queryInfo.attributeFilter] - 属性过滤条件。
- * @param {Object} [queryInfo.keyWord] - 筛选关键字。
- */
- }, {
- key: "getMapFeatures",
- value: function getMapFeatures(datasetInfo, queryInfo) {
- var _this2 = this;
- var dataUrl = datasetInfo.dataUrl,
- mapName = datasetInfo.mapName;
- queryInfo.name = mapName;
- this.projectionUrl = "".concat(dataUrl, "/prjCoordSys");
- if (queryInfo.keyWord) {
- this._getRestMapFields(dataUrl, mapName, function (fields) {
- queryInfo.attributeFilter = _this2._getAttributeFilterByKeywords(fields, queryInfo.keyWord);
- _this2._getMapFeatureBySql(dataUrl, queryInfo);
- }, queryInfo.withCredentials);
- } else {
- this._getMapFeatureBySql(dataUrl, queryInfo);
- }
- }
- /**
- * @function iServerRestService.prototype.getDataFeatures
- * @description 请求数据服务数据。
- * @param {Object} datasetInfo - 数据集参数。
- * @param {Object} datasetInfo.datasetName - 数据集名。
- * @param {Object} datasetInfo.dataSourceName - 数据源名。
- * @param {Object} datasetInfo.dataUrl - 数据服务地址。
- * @param {Object} queryInfo - 可选参数。
- * @param {Object} [queryInfo.maxFeatures] - 最多可返回的要素数量。
- * @param {Object} [queryInfo.attributeFilter] - 属性过滤条件。
- * @param {Object} [queryInfo.keyWord] - 筛选关键字。
- */
- }, {
- key: "getDataFeatures",
- value: function getDataFeatures(datasetInfo, queryInfo) {
- var _this3 = this;
- var datasetName = datasetInfo.datasetName,
- dataSourceName = datasetInfo.dataSourceName,
- dataUrl = datasetInfo.dataUrl;
- queryInfo.name = datasetName + '@' + dataSourceName;
- queryInfo.datasetNames = [dataSourceName + ':' + datasetName];
- this.projectionUrl = "".concat(dataUrl, "/datasources/").concat(dataSourceName, "/datasets/").concat(datasetName);
- if (queryInfo.keyWord) {
- var fieldsUrl = dataUrl + "/datasources/".concat(dataSourceName, "/datasets/").concat(datasetName, "/fields.rjson?returnAll=true");
- this._getRestDataFields(fieldsUrl, queryInfo, function (fields) {
- queryInfo.attributeFilter = _this3._getAttributeFilterByKeywords(fields, queryInfo.keyWord);
- _this3._getDataFeaturesBySql(dataUrl, queryInfo);
- });
- } else {
- this._getDataFeaturesBySql(dataUrl, queryInfo);
- }
- }
- }, {
- key: "_getMapFeatureBySql",
- value: function _getMapFeatureBySql(url, queryInfo) {
- var _this4 = this;
- var queryBySQLParams, queryBySQLService;
- queryBySQLParams = new SuperMap.QueryBySQLParameters({
- queryParams: [{
- name: queryInfo.name,
- attributeFilter: queryInfo.attributeFilter
- }],
- expectCount: queryInfo.maxFeatures
- });
- queryBySQLService = new SuperMap.QueryBySQLService(url, {
- proxy: this.options.proxy,
- withCredentials: queryInfo.withCredentials,
- eventListeners: {
- processCompleted: this._getFeaturesSucceed.bind(this),
- processFailed: function processFailed(serviceResult) {
- console.error(serviceResult.error);
- _this4.fetchFailed(serviceResult.error);
- }
- }
- });
- queryBySQLService.processAsync(queryBySQLParams);
- }
- }, {
- key: "_getDataFeaturesBySql",
- value: function _getDataFeaturesBySql(url, queryInfo) {
- var getFeatureBySQLParams, getFeatureBySQLService;
- getFeatureBySQLParams = new SuperMap.GetFeaturesBySQLParameters({
- queryParameter: {
- name: queryInfo.name,
- attributeFilter: queryInfo.attributeFilter
- },
- datasetNames: queryInfo.datasetNames,
- fromIndex: 0,
- toIndex: queryInfo.maxFeatures >= 1000 ? -1 : queryInfo.maxFeatures - 1,
- maxFeatures: -1
- });
- getFeatureBySQLService = new SuperMap.GetFeaturesBySQLService(url, {
- proxy: this.options.proxy,
- withCredentials: queryInfo.withCredentials,
- eventListeners: {
- processCompleted: this._getFeaturesSucceed.bind(this),
- processFailed: function processFailed() {}
- }
- });
- getFeatureBySQLService.processAsync(getFeatureBySQLParams);
- }
- }, {
- key: "_getFeaturesSucceed",
- value: function () {
- var _getFeaturesSucceed2 = (0, _asyncToGenerator2.default)(
- /*#__PURE__*/
- _regenerator.default.mark(function _callee(results) {
- var features, data, recordsets;
- return _regenerator.default.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- if (!(results.result && results.result.recordsets)) {
- _context.next = 12;
- break;
- }
- // 数据来自restmap
- recordsets = results.result.recordsets[0] || {};
- this.features = recordsets.features || {};
- features = this.features.features;
- if (!(features && features.length > 0)) {
- _context.next = 8;
- break;
- }
- data = (0, _statistics.statisticsFeatures)(features, recordsets.fields, recordsets.fieldCaptions, recordsets.fieldTypes);
- _context.next = 10;
- break;
- case 8:
- /**
- * @event iServerRestService#featureisempty
- * @description 请求数据为空后触发。
- * @property {Object} e - 事件对象。
- */
- this.triggerEvent('featureisempty', {
- results: results
- });
- return _context.abrupt("return");
- case 10:
- _context.next = 25;
- break;
- case 12:
- if (!(results.result && results.result.features)) {
- _context.next = 23;
- break;
- }
- // 数据来自restdata---results.result.features
- this.features = results.result.features;
- features = this.features.features;
- if (!(features && features.length > 0)) {
- _context.next = 19;
- break;
- }
- data = (0, _statistics.statisticsFeatures)(features);
- _context.next = 21;
- break;
- case 19:
- this.triggerEvent('featureisempty', {
- results: results
- });
- return _context.abrupt("return");
- case 21:
- _context.next = 25;
- break;
- case 23:
- this.triggerEvent('getdatafailed', {
- results: results
- });
- return _context.abrupt("return");
- case 25:
- if (results.result.vertified) {
- _context.next = 29;
- break;
- }
- _context.next = 28;
- return checkAndRectifyFeatures({
- features: data.features,
- epsgCode: this.options.epsgCode,
- projectionUrl: this.projectionUrl,
- options: {
- proxy: this.options.proxy
- }
- });
- case 28:
- data.features = _context.sent;
- case 29:
- /**
- * @event iServerRestService#getdatasucceeded
- * @description 请求数据成功后触发。
- * @property {Object} e - 事件对象。
- */
- this.triggerEvent('getdatasucceeded', data);
- case 30:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this);
- }));
- function _getFeaturesSucceed(_x2) {
- return _getFeaturesSucceed2.apply(this, arguments);
- }
- return _getFeaturesSucceed;
- }()
- }, {
- key: "_getRestDataFields",
- value: function _getRestDataFields(fieldsUrl, queryInfo, callBack) {
- var _this5 = this;
- SuperMap.FetchRequest.get(fieldsUrl, null, {
- proxy: this.options.proxy,
- withCredentials: queryInfo.withCredentials
- }).then(function (response) {
- return response.json();
- }).then(function (results) {
- var fields = _this5._getFiledsByType(['CHAR', 'TEXT', 'WTEXT'], results);
- callBack(fields, results);
- }).catch(function (error) {
- console.log(error);
- _this5.fetchFailed(error);
- });
- }
- }, {
- key: "_getRestMapFields",
- value: function _getRestMapFields(url, layerName, callBack) {
- var _this6 = this;
- var withCredentials = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
- var param = new SuperMap.QueryBySQLParameters({
- queryParams: [new SuperMap.FilterParameter({
- name: layerName,
- attributeFilter: 'SMID=0'
- })]
- });
- var queryBySQLSerice = new SuperMap.QueryBySQLService(url, {
- proxy: this.options.proxy,
- withCredentials: withCredentials,
- eventListeners: {
- processCompleted: function processCompleted(serviceResult) {
- var fields;
- if (serviceResult.result) {
- var result = serviceResult.result.recordsets[0];
- fields = _this6._getFiledsByType(['CHAR', 'TEXT', 'WTEXT'], result.fieldCaptions, result.fieldTypes);
- }
- fields && callBack(fields, serviceResult.result.recordsets[0]);
- },
- processFailed: function processFailed(serviceResult) {
- console.error(serviceResult.error);
- _this6.fetchFailed(serviceResult.error);
- }
- }
- });
- queryBySQLSerice.processAsync(param);
- }
- }, {
- key: "_getAttributeFilterByKeywords",
- value: function _getAttributeFilterByKeywords(fields, keyWord) {
- var attributeFilter = '';
- fields && fields.forEach(function (field, index) {
- attributeFilter += index !== fields.length - 1 ? "".concat(field, " LIKE '%").concat(keyWord, "%' ") + 'OR ' : "".concat(field, " LIKE '%").concat(keyWord, "%'");
- }, this);
- return attributeFilter;
- }
- /**
- * @function iServerRestService.prototype._checkUrl
- * @description 检查url是否符合要求
- * @private
- * @param {string} url
- */
- }, {
- key: "_checkUrl",
- value: function _checkUrl(url) {
- var match;
- if (url === '' || !(0, _util.isMatchUrl)(url)) {
- match = false;
- } else {
- match = true;
- } // else if (/^http[s]?:\/\/localhost/.test(url) || /^http[s]?:\/\/127.0.0.1/.test(url)) {
- // //不是实际域名
- // match = false;
- // }
- return match;
- } // types => []string
- }, {
- key: "_getFiledsByType",
- value: function _getFiledsByType(types, fields, fieldTypes) {
- var resultFileds = [];
- fields.forEach(function (field, index) {
- types.includes(fieldTypes && fieldTypes[index] || field.type) && resultFileds.push(fieldTypes ? field : field.name);
- });
- return resultFileds;
- }
- }, {
- key: "fetchFailed",
- value: function fetchFailed(error) {
- this.triggerEvent('getdatafailed', {
- error: error
- });
- }
- }]);
- return iServerRestService;
- }(_Events2.Events);
- exports.default = iServerRestService;
- /***/ }),
- /***/ "e3e2":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.Events = void 0;
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _Pixel = __webpack_require__("9270");
- var _Event = __webpack_require__("fe5a");
- var _BaseTypes = __webpack_require__("63f3");
- var _Util = __webpack_require__("1a9e");
- /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
- * This program are made available under the terms of the Apache License, Version 2.0
- * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */
- /**
- * @class Events
- * @classdesc 事件类。
- * @param {Object} object - 当前事件对象被添加到的 JS 对象。
- * @param {HTMLElement} element - 响应浏览器事件的 DOM 元素。
- * @param {Array.<string>} eventTypes - 自定义应用事件的数组。
- * @param {boolean} [fallThrough=false] - 是否允许事件处理之后向上传递(冒泡),为 false 的时候阻止事件冒泡。
- * @param {Object} options - 事件对象选项。
- */
- var Events =
- /*#__PURE__*/
- function () {
- function Events(object, element, eventTypes, fallThrough, options) {
- (0, _classCallCheck2.default)(this, Events);
- /**
- * @member {Array.<string>} Events.prototype.BROWSER_EVENTS
- * @description 支持的事件。
- * @constant
- * @default [
- "mouseover", "mouseout","mousedown", "mouseup", "mousemove",
- "click", "dblclick", "rightclick", "dblrightclick","resize",
- "focus", "blur","touchstart", "touchmove", "touchend","keydown",
- "MSPointerDown", "MSPointerUp", "pointerdown", "pointerup",
- "MSGestureStart", "MSGestureChange", "MSGestureEnd","contextmenu"
- ]
- */
- this.BROWSER_EVENTS = ['mouseover', 'mouseout', 'mousedown', 'mouseup', 'mousemove', 'click', 'dblclick', 'rightclick', 'dblrightclick', 'resize', 'focus', 'blur', 'touchstart', 'touchmove', 'touchend', 'keydown', 'MSPointerDown', 'MSPointerUp', 'pointerdown', 'pointerup', 'MSGestureStart', 'MSGestureChange', 'MSGestureEnd', 'contextmenu'];
- this.listeners = {};
- this.object = object;
- this.element = null;
- this.eventTypes = [];
- this.eventHandler = null;
- this.fallThrough = fallThrough;
- this.includeXY = false;
- this.extensions = {};
- this.extensionCount = {};
- this.clearMouseListener = null;
- _Util.Util.extend(this, options);
- if (eventTypes != null) {
- for (var i = 0, len = eventTypes.length; i < len; i++) {
- this.addEventType(eventTypes[i]);
- }
- }
- if (element != null) {
- this.attachToElement(element);
- }
- this.CLASS_NAME = 'Events';
- }
- /**
- * @function Events.prototype.destroy
- * @description 移除当前要素 element 上的所有事件监听和处理。
- */
- (0, _createClass2.default)(Events, [{
- key: "destroy",
- value: function destroy() {
- for (var e in this.extensions) {
- if (typeof this.extensions[e] !== 'boolean') {
- this.extensions[e].destroy();
- }
- }
- this.extensions = null;
- if (this.element) {
- _Event.Event.stopObservingElement(this.element);
- if (this.element.hasScrollEvent) {
- _Event.Event.stopObserving(window, 'scroll', this.clearMouseListener);
- }
- }
- this.element = null;
- this.listeners = null;
- this.object = null;
- this.eventTypes = null;
- this.fallThrough = null;
- this.eventHandler = null;
- }
- /**
- * @function Events.prototype.addEventType
- * @description 在此事件对象中添加新的事件类型,如果这个事件类型已经添加过了,则不做任何事情。
- * @param {string} eventName - 事件名。
- */
- }, {
- key: "addEventType",
- value: function addEventType(eventName) {
- if (!this.listeners[eventName]) {
- this.eventTypes.push(eventName);
- this.listeners[eventName] = [];
- }
- }
- /**
- * @function Events.prototype.attachToElement
- * @description 给 DOM 元素绑定浏览器事件。
- * @param {HTMLDOMElement} element - 绑定浏览器事件的 DOM 元素。
- */
- }, {
- key: "attachToElement",
- value: function attachToElement(element) {
- if (this.element) {
- _Event.Event.stopObservingElement(this.element);
- } else {
- // keep a bound copy of handleBrowserEvent() so that we can
- // pass the same function to both Event.observe() and .stopObserving()
- this.eventHandler = _BaseTypes.FunctionExt.bindAsEventListener(this.handleBrowserEvent, this); // to be used with observe and stopObserving
- this.clearMouseListener = _BaseTypes.FunctionExt.bind(this.clearMouseCache, this);
- }
- this.element = element;
- for (var i = 0, len = this.BROWSER_EVENTS.length; i < len; i++) {
- var eventType = this.BROWSER_EVENTS[i]; // every browser event has a corresponding application event
- // (whether it's listened for or not).
- this.addEventType(eventType); // use Prototype to register the event cross-browser
- _Event.Event.observe(element, eventType, this.eventHandler);
- } // disable dragstart in IE so that mousedown/move/up works normally
- _Event.Event.observe(element, 'dragstart', _Event.Event.stop);
- }
- }, {
- key: "on",
- value: function on(object) {
- for (var type in object) {
- if (type !== 'scope' && object.hasOwnProperty(type)) {
- this.register(type, object.scope, object[type]);
- }
- }
- }
- }, {
- key: "register",
- value: function register(type, obj, func, priority) {
- if (type in Events && !this.extensions[type]) {
- this.extensions[type] = new Events[type](this);
- }
- if (func != null && _Util.Util.indexOf(this.eventTypes, type) !== -1) {
- if (obj == null) {
- obj = this.object;
- }
- var listeners = this.listeners[type];
- if (!listeners) {
- listeners = [];
- this.listeners[type] = listeners;
- this.extensionCount[type] = 0;
- }
- var listener = {
- obj: obj,
- func: func
- };
- if (priority) {
- listeners.splice(this.extensionCount[type], 0, listener);
- if ((0, _typeof2.default)(priority) === 'object' && priority.extension) {
- this.extensionCount[type]++;
- }
- } else {
- listeners.push(listener);
- }
- }
- }
- }, {
- key: "registerPriority",
- value: function registerPriority(type, obj, func) {
- this.register(type, obj, func, true);
- }
- }, {
- key: "un",
- value: function un(object) {
- for (var type in object) {
- if (type !== 'scope' && object.hasOwnProperty(type)) {
- this.unregister(type, object.scope, object[type]);
- }
- }
- }
- }, {
- key: "unregister",
- value: function unregister(type, obj, func) {
- if (obj == null) {
- obj = this.object;
- }
- var listeners = this.listeners[type];
- if (listeners != null) {
- for (var i = 0, len = listeners.length; i < len; i++) {
- if (listeners[i].obj === obj && listeners[i].func === func) {
- listeners.splice(i, 1);
- break;
- }
- }
- }
- }
- /**
- * @function Events.prototype.remove
- * @description 删除某个事件类型的所有监听,如果该事件类型没有注册,则不做任何操作。
- * @param {string} type - 事件类型。
- */
- }, {
- key: "remove",
- value: function remove(type) {
- if (this.listeners[type] != null) {
- this.listeners[type] = [];
- }
- }
- }, {
- key: "triggerEvent",
- value: function triggerEvent(type, evt) {
- var listeners = this.listeners[type]; // fast path
- if (!listeners || listeners.length === 0) {
- return undefined;
- } // prep evt object with object & div references
- if (evt == null) {
- evt = {};
- }
- evt.object = this.object;
- evt.element = this.element;
- if (!evt.type) {
- evt.type = type;
- } // execute all callbacks registered for specified type
- // get a clone of the listeners array to
- // allow for splicing during callbacks
- listeners = listeners.slice();
- var continueChain;
- for (var i = 0, len = listeners.length; i < len; i++) {
- var callback = listeners[i]; // bind the context to callback.obj
- continueChain = callback.func.apply(callback.obj, [evt]);
- if (continueChain !== undefined && continueChain === false) {
- // if callback returns false, execute no more callbacks.
- break;
- }
- } // don't fall through to other DOM elements
- if (!this.fallThrough) {
- _Event.Event.stop(evt, true);
- }
- return continueChain;
- }
- }, {
- key: "handleBrowserEvent",
- value: function handleBrowserEvent(evt) {
- var type = evt.type;
- var listeners = this.listeners[type];
- if (!listeners || listeners.length === 0) {
- // noone's listening, bail out
- return;
- } // add clientX & clientY to all events - corresponds to average x, y
- var touches = evt.touches;
- if (touches && touches[0]) {
- var x = 0;
- var y = 0;
- var num = touches.length;
- var touch;
- for (var i = 0; i < num; ++i) {
- touch = touches[i];
- x += touch.clientX;
- y += touch.clientY;
- }
- evt.clientX = x / num;
- evt.clientY = y / num;
- }
- if (this.includeXY) {
- evt.xy = this.getMousePosition(evt);
- }
- this.triggerEvent(type, evt);
- }
- /**
- * @function Events.prototype.clearMouseCache
- * @description 清除鼠标缓存。
- */
- }, {
- key: "clearMouseCache",
- value: function clearMouseCache() {
- this.element.scrolls = null;
- this.element.lefttop = null;
- var body = document.body;
- if (body && !((body.scrollTop !== 0 || body.scrollLeft !== 0) && navigator.userAgent.match(/iPhone/i))) {
- this.element.offsets = null;
- }
- }
- /**
- * @function Events.prototype.getMousePosition
- * @returns {Pixel} 当前的鼠标的 xy 坐标点。
- */
- }, {
- key: "getMousePosition",
- value: function getMousePosition(evt) {
- if (!this.includeXY) {
- this.clearMouseCache();
- } else if (!this.element.hasScrollEvent) {
- _Event.Event.observe(window, 'scroll', this.clearMouseListener);
- this.element.hasScrollEvent = true;
- }
- if (!this.element.scrolls) {
- var viewportElement = _Util.Util.getViewportElement();
- this.element.scrolls = [viewportElement.scrollLeft, viewportElement.scrollTop];
- }
- if (!this.element.lefttop) {
- this.element.lefttop = [document.documentElement.clientLeft || 0, document.documentElement.clientTop || 0];
- }
- if (!this.element.offsets) {
- this.element.offsets = _Util.Util.pagePosition(this.element);
- }
- return new _Pixel.Pixel(evt.clientX + this.element.scrolls[0] - this.element.offsets[0] - this.element.lefttop[0], evt.clientY + this.element.scrolls[1] - this.element.offsets[1] - this.element.lefttop[1]);
- }
- }]);
- return Events;
- }();
- exports.Events = Events;
- Events.prototype.BROWSER_EVENTS = ['mouseover', 'mouseout', 'mousedown', 'mouseup', 'mousemove', 'click', 'dblclick', 'rightclick', 'dblrightclick', 'resize', 'focus', 'blur', 'touchstart', 'touchmove', 'touchend', 'keydown', 'MSPointerDown', 'MSPointerUp', 'pointerdown', 'pointerup', 'MSGestureStart', 'MSGestureChange', 'MSGestureEnd', 'contextmenu'];
- /***/ }),
- /***/ "e4fa":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("10ba");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "e525":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- // a passthrough stream.
- // basically just the most minimal sort of Transform stream.
- // Every written chunk gets output as-is.
- module.exports = PassThrough;
- var Transform = __webpack_require__("b556");
- /*<replacement>*/
- var util = __webpack_require__("9107");
- util.inherits = __webpack_require__("fe04");
- /*</replacement>*/
- util.inherits(PassThrough, Transform);
- function PassThrough(options) {
- if (!(this instanceof PassThrough)) return new PassThrough(options);
- Transform.call(this, options);
- }
- PassThrough.prototype._transform = function (chunk, encoding, cb) {
- cb(null, chunk);
- };
- /***/ }),
- /***/ "e736":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a2ee");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "e7f3":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Iframe_vue_vue_type_template_id_37ec6382___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b982");
- /* harmony import */ var _Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6ed2");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _Iframe_vue_vue_type_template_id_37ec6382___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _Iframe_vue_vue_type_template_id_37ec6382___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "ea23":
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(Buffer) {;(function (sax) { // wrapper for non-node envs
- sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }
- sax.SAXParser = SAXParser
- sax.SAXStream = SAXStream
- sax.createStream = createStream
- // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
- // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
- // since that's the earliest that a buffer overrun could occur. This way, checks are
- // as rare as required, but as often as necessary to ensure never crossing this bound.
- // Furthermore, buffers are only tested at most once per write(), so passing a very
- // large string into write() might have undesirable effects, but this is manageable by
- // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme
- // edge case, result in creating at most one complete copy of the string passed in.
- // Set to Infinity to have unlimited buffers.
- sax.MAX_BUFFER_LENGTH = 64 * 1024
- var buffers = [
- 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',
- 'procInstName', 'procInstBody', 'entity', 'attribName',
- 'attribValue', 'cdata', 'script'
- ]
- sax.EVENTS = [
- 'text',
- 'processinginstruction',
- 'sgmldeclaration',
- 'doctype',
- 'comment',
- 'opentagstart',
- 'attribute',
- 'opentag',
- 'closetag',
- 'opencdata',
- 'cdata',
- 'closecdata',
- 'error',
- 'end',
- 'ready',
- 'script',
- 'opennamespace',
- 'closenamespace'
- ]
- function SAXParser (strict, opt) {
- if (!(this instanceof SAXParser)) {
- return new SAXParser(strict, opt)
- }
- var parser = this
- clearBuffers(parser)
- parser.q = parser.c = ''
- parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH
- parser.opt = opt || {}
- parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags
- parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'
- parser.tags = []
- parser.closed = parser.closedRoot = parser.sawRoot = false
- parser.tag = parser.error = null
- parser.strict = !!strict
- parser.noscript = !!(strict || parser.opt.noscript)
- parser.state = S.BEGIN
- parser.strictEntities = parser.opt.strictEntities
- parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)
- parser.attribList = []
- // namespaces form a prototype chain.
- // it always points at the current tag,
- // which protos to its parent tag.
- if (parser.opt.xmlns) {
- parser.ns = Object.create(rootNS)
- }
- // mostly just for error reporting
- parser.trackPosition = parser.opt.position !== false
- if (parser.trackPosition) {
- parser.position = parser.line = parser.column = 0
- }
- emit(parser, 'onready')
- }
- if (!Object.create) {
- Object.create = function (o) {
- function F () {}
- F.prototype = o
- var newf = new F()
- return newf
- }
- }
- if (!Object.keys) {
- Object.keys = function (o) {
- var a = []
- for (var i in o) if (o.hasOwnProperty(i)) a.push(i)
- return a
- }
- }
- function checkBufferLength (parser) {
- var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)
- var maxActual = 0
- for (var i = 0, l = buffers.length; i < l; i++) {
- var len = parser[buffers[i]].length
- if (len > maxAllowed) {
- // Text/cdata nodes can get big, and since they're buffered,
- // we can get here under normal conditions.
- // Avoid issues by emitting the text node now,
- // so at least it won't get any bigger.
- switch (buffers[i]) {
- case 'textNode':
- closeText(parser)
- break
- case 'cdata':
- emitNode(parser, 'oncdata', parser.cdata)
- parser.cdata = ''
- break
- case 'script':
- emitNode(parser, 'onscript', parser.script)
- parser.script = ''
- break
- default:
- error(parser, 'Max buffer length exceeded: ' + buffers[i])
- }
- }
- maxActual = Math.max(maxActual, len)
- }
- // schedule the next check for the earliest possible buffer overrun.
- var m = sax.MAX_BUFFER_LENGTH - maxActual
- parser.bufferCheckPosition = m + parser.position
- }
- function clearBuffers (parser) {
- for (var i = 0, l = buffers.length; i < l; i++) {
- parser[buffers[i]] = ''
- }
- }
- function flushBuffers (parser) {
- closeText(parser)
- if (parser.cdata !== '') {
- emitNode(parser, 'oncdata', parser.cdata)
- parser.cdata = ''
- }
- if (parser.script !== '') {
- emitNode(parser, 'onscript', parser.script)
- parser.script = ''
- }
- }
- SAXParser.prototype = {
- end: function () { end(this) },
- write: write,
- resume: function () { this.error = null; return this },
- close: function () { return this.write(null) },
- flush: function () { flushBuffers(this) }
- }
- var Stream
- try {
- Stream = __webpack_require__("92a1").Stream
- } catch (ex) {
- Stream = function () {}
- }
- var streamWraps = sax.EVENTS.filter(function (ev) {
- return ev !== 'error' && ev !== 'end'
- })
- function createStream (strict, opt) {
- return new SAXStream(strict, opt)
- }
- function SAXStream (strict, opt) {
- if (!(this instanceof SAXStream)) {
- return new SAXStream(strict, opt)
- }
- Stream.apply(this)
- this._parser = new SAXParser(strict, opt)
- this.writable = true
- this.readable = true
- var me = this
- this._parser.onend = function () {
- me.emit('end')
- }
- this._parser.onerror = function (er) {
- me.emit('error', er)
- // if didn't throw, then means error was handled.
- // go ahead and clear error, so we can write again.
- me._parser.error = null
- }
- this._decoder = null
- streamWraps.forEach(function (ev) {
- Object.defineProperty(me, 'on' + ev, {
- get: function () {
- return me._parser['on' + ev]
- },
- set: function (h) {
- if (!h) {
- me.removeAllListeners(ev)
- me._parser['on' + ev] = h
- return h
- }
- me.on(ev, h)
- },
- enumerable: true,
- configurable: false
- })
- })
- }
- SAXStream.prototype = Object.create(Stream.prototype, {
- constructor: {
- value: SAXStream
- }
- })
- SAXStream.prototype.write = function (data) {
- if (typeof Buffer === 'function' &&
- typeof Buffer.isBuffer === 'function' &&
- Buffer.isBuffer(data)) {
- if (!this._decoder) {
- var SD = __webpack_require__("5465").StringDecoder
- this._decoder = new SD('utf8')
- }
- data = this._decoder.write(data)
- }
- this._parser.write(data.toString())
- this.emit('data', data)
- return true
- }
- SAXStream.prototype.end = function (chunk) {
- if (chunk && chunk.length) {
- this.write(chunk)
- }
- this._parser.end()
- return true
- }
- SAXStream.prototype.on = function (ev, handler) {
- var me = this
- if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {
- me._parser['on' + ev] = function () {
- var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)
- args.splice(0, 0, ev)
- me.emit.apply(me, args)
- }
- }
- return Stream.prototype.on.call(me, ev, handler)
- }
- // this really needs to be replaced with character classes.
- // XML allows all manner of ridiculous numbers and digits.
- var CDATA = '[CDATA['
- var DOCTYPE = 'DOCTYPE'
- var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'
- var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
- var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }
- // http://www.w3.org/TR/REC-xml/#NT-NameStartChar
- // This implementation works on strings, a single character at a time
- // as such, it cannot ever support astral-plane characters (10000-EFFFF)
- // without a significant breaking change to either this parser, or the
- // JavaScript language. Implementation of an emoji-capable xml parser
- // is left as an exercise for the reader.
- var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
- var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
- var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
- var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
- function isWhitespace (c) {
- return c === ' ' || c === '\n' || c === '\r' || c === '\t'
- }
- function isQuote (c) {
- return c === '"' || c === '\''
- }
- function isAttribEnd (c) {
- return c === '>' || isWhitespace(c)
- }
- function isMatch (regex, c) {
- return regex.test(c)
- }
- function notMatch (regex, c) {
- return !isMatch(regex, c)
- }
- var S = 0
- sax.STATE = {
- BEGIN: S++, // leading byte order mark or whitespace
- BEGIN_WHITESPACE: S++, // leading whitespace
- TEXT: S++, // general stuff
- TEXT_ENTITY: S++, // & and such.
- OPEN_WAKA: S++, // <
- SGML_DECL: S++, // <!BLARG
- SGML_DECL_QUOTED: S++, // <!BLARG foo "bar
- DOCTYPE: S++, // <!DOCTYPE
- DOCTYPE_QUOTED: S++, // <!DOCTYPE "//blah
- DOCTYPE_DTD: S++, // <!DOCTYPE "//blah" [ ...
- DOCTYPE_DTD_QUOTED: S++, // <!DOCTYPE "//blah" [ "foo
- COMMENT_STARTING: S++, // <!-
- COMMENT: S++, // <!--
- COMMENT_ENDING: S++, // <!-- blah -
- COMMENT_ENDED: S++, // <!-- blah --
- CDATA: S++, // <![CDATA[ something
- CDATA_ENDING: S++, // ]
- CDATA_ENDING_2: S++, // ]]
- PROC_INST: S++, // <?hi
- PROC_INST_BODY: S++, // <?hi there
- PROC_INST_ENDING: S++, // <?hi "there" ?
- OPEN_TAG: S++, // <strong
- OPEN_TAG_SLASH: S++, // <strong /
- ATTRIB: S++, // <a
- ATTRIB_NAME: S++, // <a foo
- ATTRIB_NAME_SAW_WHITE: S++, // <a foo _
- ATTRIB_VALUE: S++, // <a foo=
- ATTRIB_VALUE_QUOTED: S++, // <a foo="bar
- ATTRIB_VALUE_CLOSED: S++, // <a foo="bar"
- ATTRIB_VALUE_UNQUOTED: S++, // <a foo=bar
- ATTRIB_VALUE_ENTITY_Q: S++, // <foo bar="""
- ATTRIB_VALUE_ENTITY_U: S++, // <foo bar="
- CLOSE_TAG: S++, // </a
- CLOSE_TAG_SAW_WHITE: S++, // </a >
- SCRIPT: S++, // <script> ...
- SCRIPT_ENDING: S++ // <script> ... <
- }
- sax.XML_ENTITIES = {
- 'amp': '&',
- 'gt': '>',
- 'lt': '<',
- 'quot': '"',
- 'apos': "'"
- }
- sax.ENTITIES = {
- 'amp': '&',
- 'gt': '>',
- 'lt': '<',
- 'quot': '"',
- 'apos': "'",
- 'AElig': 198,
- 'Aacute': 193,
- 'Acirc': 194,
- 'Agrave': 192,
- 'Aring': 197,
- 'Atilde': 195,
- 'Auml': 196,
- 'Ccedil': 199,
- 'ETH': 208,
- 'Eacute': 201,
- 'Ecirc': 202,
- 'Egrave': 200,
- 'Euml': 203,
- 'Iacute': 205,
- 'Icirc': 206,
- 'Igrave': 204,
- 'Iuml': 207,
- 'Ntilde': 209,
- 'Oacute': 211,
- 'Ocirc': 212,
- 'Ograve': 210,
- 'Oslash': 216,
- 'Otilde': 213,
- 'Ouml': 214,
- 'THORN': 222,
- 'Uacute': 218,
- 'Ucirc': 219,
- 'Ugrave': 217,
- 'Uuml': 220,
- 'Yacute': 221,
- 'aacute': 225,
- 'acirc': 226,
- 'aelig': 230,
- 'agrave': 224,
- 'aring': 229,
- 'atilde': 227,
- 'auml': 228,
- 'ccedil': 231,
- 'eacute': 233,
- 'ecirc': 234,
- 'egrave': 232,
- 'eth': 240,
- 'euml': 235,
- 'iacute': 237,
- 'icirc': 238,
- 'igrave': 236,
- 'iuml': 239,
- 'ntilde': 241,
- 'oacute': 243,
- 'ocirc': 244,
- 'ograve': 242,
- 'oslash': 248,
- 'otilde': 245,
- 'ouml': 246,
- 'szlig': 223,
- 'thorn': 254,
- 'uacute': 250,
- 'ucirc': 251,
- 'ugrave': 249,
- 'uuml': 252,
- 'yacute': 253,
- 'yuml': 255,
- 'copy': 169,
- 'reg': 174,
- 'nbsp': 160,
- 'iexcl': 161,
- 'cent': 162,
- 'pound': 163,
- 'curren': 164,
- 'yen': 165,
- 'brvbar': 166,
- 'sect': 167,
- 'uml': 168,
- 'ordf': 170,
- 'laquo': 171,
- 'not': 172,
- 'shy': 173,
- 'macr': 175,
- 'deg': 176,
- 'plusmn': 177,
- 'sup1': 185,
- 'sup2': 178,
- 'sup3': 179,
- 'acute': 180,
- 'micro': 181,
- 'para': 182,
- 'middot': 183,
- 'cedil': 184,
- 'ordm': 186,
- 'raquo': 187,
- 'frac14': 188,
- 'frac12': 189,
- 'frac34': 190,
- 'iquest': 191,
- 'times': 215,
- 'divide': 247,
- 'OElig': 338,
- 'oelig': 339,
- 'Scaron': 352,
- 'scaron': 353,
- 'Yuml': 376,
- 'fnof': 402,
- 'circ': 710,
- 'tilde': 732,
- 'Alpha': 913,
- 'Beta': 914,
- 'Gamma': 915,
- 'Delta': 916,
- 'Epsilon': 917,
- 'Zeta': 918,
- 'Eta': 919,
- 'Theta': 920,
- 'Iota': 921,
- 'Kappa': 922,
- 'Lambda': 923,
- 'Mu': 924,
- 'Nu': 925,
- 'Xi': 926,
- 'Omicron': 927,
- 'Pi': 928,
- 'Rho': 929,
- 'Sigma': 931,
- 'Tau': 932,
- 'Upsilon': 933,
- 'Phi': 934,
- 'Chi': 935,
- 'Psi': 936,
- 'Omega': 937,
- 'alpha': 945,
- 'beta': 946,
- 'gamma': 947,
- 'delta': 948,
- 'epsilon': 949,
- 'zeta': 950,
- 'eta': 951,
- 'theta': 952,
- 'iota': 953,
- 'kappa': 954,
- 'lambda': 955,
- 'mu': 956,
- 'nu': 957,
- 'xi': 958,
- 'omicron': 959,
- 'pi': 960,
- 'rho': 961,
- 'sigmaf': 962,
- 'sigma': 963,
- 'tau': 964,
- 'upsilon': 965,
- 'phi': 966,
- 'chi': 967,
- 'psi': 968,
- 'omega': 969,
- 'thetasym': 977,
- 'upsih': 978,
- 'piv': 982,
- 'ensp': 8194,
- 'emsp': 8195,
- 'thinsp': 8201,
- 'zwnj': 8204,
- 'zwj': 8205,
- 'lrm': 8206,
- 'rlm': 8207,
- 'ndash': 8211,
- 'mdash': 8212,
- 'lsquo': 8216,
- 'rsquo': 8217,
- 'sbquo': 8218,
- 'ldquo': 8220,
- 'rdquo': 8221,
- 'bdquo': 8222,
- 'dagger': 8224,
- 'Dagger': 8225,
- 'bull': 8226,
- 'hellip': 8230,
- 'permil': 8240,
- 'prime': 8242,
- 'Prime': 8243,
- 'lsaquo': 8249,
- 'rsaquo': 8250,
- 'oline': 8254,
- 'frasl': 8260,
- 'euro': 8364,
- 'image': 8465,
- 'weierp': 8472,
- 'real': 8476,
- 'trade': 8482,
- 'alefsym': 8501,
- 'larr': 8592,
- 'uarr': 8593,
- 'rarr': 8594,
- 'darr': 8595,
- 'harr': 8596,
- 'crarr': 8629,
- 'lArr': 8656,
- 'uArr': 8657,
- 'rArr': 8658,
- 'dArr': 8659,
- 'hArr': 8660,
- 'forall': 8704,
- 'part': 8706,
- 'exist': 8707,
- 'empty': 8709,
- 'nabla': 8711,
- 'isin': 8712,
- 'notin': 8713,
- 'ni': 8715,
- 'prod': 8719,
- 'sum': 8721,
- 'minus': 8722,
- 'lowast': 8727,
- 'radic': 8730,
- 'prop': 8733,
- 'infin': 8734,
- 'ang': 8736,
- 'and': 8743,
- 'or': 8744,
- 'cap': 8745,
- 'cup': 8746,
- 'int': 8747,
- 'there4': 8756,
- 'sim': 8764,
- 'cong': 8773,
- 'asymp': 8776,
- 'ne': 8800,
- 'equiv': 8801,
- 'le': 8804,
- 'ge': 8805,
- 'sub': 8834,
- 'sup': 8835,
- 'nsub': 8836,
- 'sube': 8838,
- 'supe': 8839,
- 'oplus': 8853,
- 'otimes': 8855,
- 'perp': 8869,
- 'sdot': 8901,
- 'lceil': 8968,
- 'rceil': 8969,
- 'lfloor': 8970,
- 'rfloor': 8971,
- 'lang': 9001,
- 'rang': 9002,
- 'loz': 9674,
- 'spades': 9824,
- 'clubs': 9827,
- 'hearts': 9829,
- 'diams': 9830
- }
- Object.keys(sax.ENTITIES).forEach(function (key) {
- var e = sax.ENTITIES[key]
- var s = typeof e === 'number' ? String.fromCharCode(e) : e
- sax.ENTITIES[key] = s
- })
- for (var s in sax.STATE) {
- sax.STATE[sax.STATE[s]] = s
- }
- // shorthand
- S = sax.STATE
- function emit (parser, event, data) {
- parser[event] && parser[event](data)
- }
- function emitNode (parser, nodeType, data) {
- if (parser.textNode) closeText(parser)
- emit(parser, nodeType, data)
- }
- function closeText (parser) {
- parser.textNode = textopts(parser.opt, parser.textNode)
- if (parser.textNode) emit(parser, 'ontext', parser.textNode)
- parser.textNode = ''
- }
- function textopts (opt, text) {
- if (opt.trim) text = text.trim()
- if (opt.normalize) text = text.replace(/\s+/g, ' ')
- return text
- }
- function error (parser, er) {
- closeText(parser)
- if (parser.trackPosition) {
- er += '\nLine: ' + parser.line +
- '\nColumn: ' + parser.column +
- '\nChar: ' + parser.c
- }
- er = new Error(er)
- parser.error = er
- emit(parser, 'onerror', er)
- return parser
- }
- function end (parser) {
- if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag')
- if ((parser.state !== S.BEGIN) &&
- (parser.state !== S.BEGIN_WHITESPACE) &&
- (parser.state !== S.TEXT)) {
- error(parser, 'Unexpected end')
- }
- closeText(parser)
- parser.c = ''
- parser.closed = true
- emit(parser, 'onend')
- SAXParser.call(parser, parser.strict, parser.opt)
- return parser
- }
- function strictFail (parser, message) {
- if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {
- throw new Error('bad call to strictFail')
- }
- if (parser.strict) {
- error(parser, message)
- }
- }
- function newTag (parser) {
- if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]()
- var parent = parser.tags[parser.tags.length - 1] || parser
- var tag = parser.tag = { name: parser.tagName, attributes: {} }
- // will be overridden if tag contails an xmlns="foo" or xmlns:foo="bar"
- if (parser.opt.xmlns) {
- tag.ns = parent.ns
- }
- parser.attribList.length = 0
- emitNode(parser, 'onopentagstart', tag)
- }
- function qname (name, attribute) {
- var i = name.indexOf(':')
- var qualName = i < 0 ? [ '', name ] : name.split(':')
- var prefix = qualName[0]
- var local = qualName[1]
- // <x "xmlns"="http://foo">
- if (attribute && name === 'xmlns') {
- prefix = 'xmlns'
- local = ''
- }
- return { prefix: prefix, local: local }
- }
- function attrib (parser) {
- if (!parser.strict) {
- parser.attribName = parser.attribName[parser.looseCase]()
- }
- if (parser.attribList.indexOf(parser.attribName) !== -1 ||
- parser.tag.attributes.hasOwnProperty(parser.attribName)) {
- parser.attribName = parser.attribValue = ''
- return
- }
- if (parser.opt.xmlns) {
- var qn = qname(parser.attribName, true)
- var prefix = qn.prefix
- var local = qn.local
- if (prefix === 'xmlns') {
- // namespace binding attribute. push the binding into scope
- if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {
- strictFail(parser,
- 'xml: prefix must be bound to ' + XML_NAMESPACE + '\n' +
- 'Actual: ' + parser.attribValue)
- } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {
- strictFail(parser,
- 'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\n' +
- 'Actual: ' + parser.attribValue)
- } else {
- var tag = parser.tag
- var parent = parser.tags[parser.tags.length - 1] || parser
- if (tag.ns === parent.ns) {
- tag.ns = Object.create(parent.ns)
- }
- tag.ns[local] = parser.attribValue
- }
- }
- // defer onattribute events until all attributes have been seen
- // so any new bindings can take effect. preserve attribute order
- // so deferred events can be emitted in document order
- parser.attribList.push([parser.attribName, parser.attribValue])
- } else {
- // in non-xmlns mode, we can emit the event right away
- parser.tag.attributes[parser.attribName] = parser.attribValue
- emitNode(parser, 'onattribute', {
- name: parser.attribName,
- value: parser.attribValue
- })
- }
- parser.attribName = parser.attribValue = ''
- }
- function openTag (parser, selfClosing) {
- if (parser.opt.xmlns) {
- // emit namespace binding events
- var tag = parser.tag
- // add namespace info to tag
- var qn = qname(parser.tagName)
- tag.prefix = qn.prefix
- tag.local = qn.local
- tag.uri = tag.ns[qn.prefix] || ''
- if (tag.prefix && !tag.uri) {
- strictFail(parser, 'Unbound namespace prefix: ' +
- JSON.stringify(parser.tagName))
- tag.uri = qn.prefix
- }
- var parent = parser.tags[parser.tags.length - 1] || parser
- if (tag.ns && parent.ns !== tag.ns) {
- Object.keys(tag.ns).forEach(function (p) {
- emitNode(parser, 'onopennamespace', {
- prefix: p,
- uri: tag.ns[p]
- })
- })
- }
- // handle deferred onattribute events
- // Note: do not apply default ns to attributes:
- // http://www.w3.org/TR/REC-xml-names/#defaulting
- for (var i = 0, l = parser.attribList.length; i < l; i++) {
- var nv = parser.attribList[i]
- var name = nv[0]
- var value = nv[1]
- var qualName = qname(name, true)
- var prefix = qualName.prefix
- var local = qualName.local
- var uri = prefix === '' ? '' : (tag.ns[prefix] || '')
- var a = {
- name: name,
- value: value,
- prefix: prefix,
- local: local,
- uri: uri
- }
- // if there's any attributes with an undefined namespace,
- // then fail on them now.
- if (prefix && prefix !== 'xmlns' && !uri) {
- strictFail(parser, 'Unbound namespace prefix: ' +
- JSON.stringify(prefix))
- a.uri = prefix
- }
- parser.tag.attributes[name] = a
- emitNode(parser, 'onattribute', a)
- }
- parser.attribList.length = 0
- }
- parser.tag.isSelfClosing = !!selfClosing
- // process the tag
- parser.sawRoot = true
- parser.tags.push(parser.tag)
- emitNode(parser, 'onopentag', parser.tag)
- if (!selfClosing) {
- // special case for <script> in non-strict mode.
- if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {
- parser.state = S.SCRIPT
- } else {
- parser.state = S.TEXT
- }
- parser.tag = null
- parser.tagName = ''
- }
- parser.attribName = parser.attribValue = ''
- parser.attribList.length = 0
- }
- function closeTag (parser) {
- if (!parser.tagName) {
- strictFail(parser, 'Weird empty close tag.')
- parser.textNode += '</>'
- parser.state = S.TEXT
- return
- }
- if (parser.script) {
- if (parser.tagName !== 'script') {
- parser.script += '</' + parser.tagName + '>'
- parser.tagName = ''
- parser.state = S.SCRIPT
- return
- }
- emitNode(parser, 'onscript', parser.script)
- parser.script = ''
- }
- // first make sure that the closing tag actually exists.
- // <a><b></c></b></a> will close everything, otherwise.
- var t = parser.tags.length
- var tagName = parser.tagName
- if (!parser.strict) {
- tagName = tagName[parser.looseCase]()
- }
- var closeTo = tagName
- while (t--) {
- var close = parser.tags[t]
- if (close.name !== closeTo) {
- // fail the first time in strict mode
- strictFail(parser, 'Unexpected close tag')
- } else {
- break
- }
- }
- // didn't find it. we already failed for strict, so just abort.
- if (t < 0) {
- strictFail(parser, 'Unmatched closing tag: ' + parser.tagName)
- parser.textNode += '</' + parser.tagName + '>'
- parser.state = S.TEXT
- return
- }
- parser.tagName = tagName
- var s = parser.tags.length
- while (s-- > t) {
- var tag = parser.tag = parser.tags.pop()
- parser.tagName = parser.tag.name
- emitNode(parser, 'onclosetag', parser.tagName)
- var x = {}
- for (var i in tag.ns) {
- x[i] = tag.ns[i]
- }
- var parent = parser.tags[parser.tags.length - 1] || parser
- if (parser.opt.xmlns && tag.ns !== parent.ns) {
- // remove namespace bindings introduced by tag
- Object.keys(tag.ns).forEach(function (p) {
- var n = tag.ns[p]
- emitNode(parser, 'onclosenamespace', { prefix: p, uri: n })
- })
- }
- }
- if (t === 0) parser.closedRoot = true
- parser.tagName = parser.attribValue = parser.attribName = ''
- parser.attribList.length = 0
- parser.state = S.TEXT
- }
- function parseEntity (parser) {
- var entity = parser.entity
- var entityLC = entity.toLowerCase()
- var num
- var numStr = ''
- if (parser.ENTITIES[entity]) {
- return parser.ENTITIES[entity]
- }
- if (parser.ENTITIES[entityLC]) {
- return parser.ENTITIES[entityLC]
- }
- entity = entityLC
- if (entity.charAt(0) === '#') {
- if (entity.charAt(1) === 'x') {
- entity = entity.slice(2)
- num = parseInt(entity, 16)
- numStr = num.toString(16)
- } else {
- entity = entity.slice(1)
- num = parseInt(entity, 10)
- numStr = num.toString(10)
- }
- }
- entity = entity.replace(/^0+/, '')
- if (isNaN(num) || numStr.toLowerCase() !== entity) {
- strictFail(parser, 'Invalid character entity')
- return '&' + parser.entity + ';'
- }
- return String.fromCodePoint(num)
- }
- function beginWhiteSpace (parser, c) {
- if (c === '<') {
- parser.state = S.OPEN_WAKA
- parser.startTagPosition = parser.position
- } else if (!isWhitespace(c)) {
- // have to process this as a text node.
- // weird, but happens.
- strictFail(parser, 'Non-whitespace before first tag.')
- parser.textNode = c
- parser.state = S.TEXT
- }
- }
- function charAt (chunk, i) {
- var result = ''
- if (i < chunk.length) {
- result = chunk.charAt(i)
- }
- return result
- }
- function write (chunk) {
- var parser = this
- if (this.error) {
- throw this.error
- }
- if (parser.closed) {
- return error(parser,
- 'Cannot write after close. Assign an onready handler.')
- }
- if (chunk === null) {
- return end(parser)
- }
- if (typeof chunk === 'object') {
- chunk = chunk.toString()
- }
- var i = 0
- var c = ''
- while (true) {
- c = charAt(chunk, i++)
- parser.c = c
- if (!c) {
- break
- }
- if (parser.trackPosition) {
- parser.position++
- if (c === '\n') {
- parser.line++
- parser.column = 0
- } else {
- parser.column++
- }
- }
- switch (parser.state) {
- case S.BEGIN:
- parser.state = S.BEGIN_WHITESPACE
- if (c === '\uFEFF') {
- continue
- }
- beginWhiteSpace(parser, c)
- continue
- case S.BEGIN_WHITESPACE:
- beginWhiteSpace(parser, c)
- continue
- case S.TEXT:
- if (parser.sawRoot && !parser.closedRoot) {
- var starti = i - 1
- while (c && c !== '<' && c !== '&') {
- c = charAt(chunk, i++)
- if (c && parser.trackPosition) {
- parser.position++
- if (c === '\n') {
- parser.line++
- parser.column = 0
- } else {
- parser.column++
- }
- }
- }
- parser.textNode += chunk.substring(starti, i - 1)
- }
- if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {
- parser.state = S.OPEN_WAKA
- parser.startTagPosition = parser.position
- } else {
- if (!isWhitespace(c) && (!parser.sawRoot || parser.closedRoot)) {
- strictFail(parser, 'Text data outside of root node.')
- }
- if (c === '&') {
- parser.state = S.TEXT_ENTITY
- } else {
- parser.textNode += c
- }
- }
- continue
- case S.SCRIPT:
- // only non-strict
- if (c === '<') {
- parser.state = S.SCRIPT_ENDING
- } else {
- parser.script += c
- }
- continue
- case S.SCRIPT_ENDING:
- if (c === '/') {
- parser.state = S.CLOSE_TAG
- } else {
- parser.script += '<' + c
- parser.state = S.SCRIPT
- }
- continue
- case S.OPEN_WAKA:
- // either a /, ?, !, or text is coming next.
- if (c === '!') {
- parser.state = S.SGML_DECL
- parser.sgmlDecl = ''
- } else if (isWhitespace(c)) {
- // wait for it...
- } else if (isMatch(nameStart, c)) {
- parser.state = S.OPEN_TAG
- parser.tagName = c
- } else if (c === '/') {
- parser.state = S.CLOSE_TAG
- parser.tagName = ''
- } else if (c === '?') {
- parser.state = S.PROC_INST
- parser.procInstName = parser.procInstBody = ''
- } else {
- strictFail(parser, 'Unencoded <')
- // if there was some whitespace, then add that in.
- if (parser.startTagPosition + 1 < parser.position) {
- var pad = parser.position - parser.startTagPosition
- c = new Array(pad).join(' ') + c
- }
- parser.textNode += '<' + c
- parser.state = S.TEXT
- }
- continue
- case S.SGML_DECL:
- if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
- emitNode(parser, 'onopencdata')
- parser.state = S.CDATA
- parser.sgmlDecl = ''
- parser.cdata = ''
- } else if (parser.sgmlDecl + c === '--') {
- parser.state = S.COMMENT
- parser.comment = ''
- parser.sgmlDecl = ''
- } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
- parser.state = S.DOCTYPE
- if (parser.doctype || parser.sawRoot) {
- strictFail(parser,
- 'Inappropriately located doctype declaration')
- }
- parser.doctype = ''
- parser.sgmlDecl = ''
- } else if (c === '>') {
- emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl)
- parser.sgmlDecl = ''
- parser.state = S.TEXT
- } else if (isQuote(c)) {
- parser.state = S.SGML_DECL_QUOTED
- parser.sgmlDecl += c
- } else {
- parser.sgmlDecl += c
- }
- continue
- case S.SGML_DECL_QUOTED:
- if (c === parser.q) {
- parser.state = S.SGML_DECL
- parser.q = ''
- }
- parser.sgmlDecl += c
- continue
- case S.DOCTYPE:
- if (c === '>') {
- parser.state = S.TEXT
- emitNode(parser, 'ondoctype', parser.doctype)
- parser.doctype = true // just remember that we saw it.
- } else {
- parser.doctype += c
- if (c === '[') {
- parser.state = S.DOCTYPE_DTD
- } else if (isQuote(c)) {
- parser.state = S.DOCTYPE_QUOTED
- parser.q = c
- }
- }
- continue
- case S.DOCTYPE_QUOTED:
- parser.doctype += c
- if (c === parser.q) {
- parser.q = ''
- parser.state = S.DOCTYPE
- }
- continue
- case S.DOCTYPE_DTD:
- parser.doctype += c
- if (c === ']') {
- parser.state = S.DOCTYPE
- } else if (isQuote(c)) {
- parser.state = S.DOCTYPE_DTD_QUOTED
- parser.q = c
- }
- continue
- case S.DOCTYPE_DTD_QUOTED:
- parser.doctype += c
- if (c === parser.q) {
- parser.state = S.DOCTYPE_DTD
- parser.q = ''
- }
- continue
- case S.COMMENT:
- if (c === '-') {
- parser.state = S.COMMENT_ENDING
- } else {
- parser.comment += c
- }
- continue
- case S.COMMENT_ENDING:
- if (c === '-') {
- parser.state = S.COMMENT_ENDED
- parser.comment = textopts(parser.opt, parser.comment)
- if (parser.comment) {
- emitNode(parser, 'oncomment', parser.comment)
- }
- parser.comment = ''
- } else {
- parser.comment += '-' + c
- parser.state = S.COMMENT
- }
- continue
- case S.COMMENT_ENDED:
- if (c !== '>') {
- strictFail(parser, 'Malformed comment')
- // allow <!-- blah -- bloo --> in non-strict mode,
- // which is a comment of " blah -- bloo "
- parser.comment += '--' + c
- parser.state = S.COMMENT
- } else {
- parser.state = S.TEXT
- }
- continue
- case S.CDATA:
- if (c === ']') {
- parser.state = S.CDATA_ENDING
- } else {
- parser.cdata += c
- }
- continue
- case S.CDATA_ENDING:
- if (c === ']') {
- parser.state = S.CDATA_ENDING_2
- } else {
- parser.cdata += ']' + c
- parser.state = S.CDATA
- }
- continue
- case S.CDATA_ENDING_2:
- if (c === '>') {
- if (parser.cdata) {
- emitNode(parser, 'oncdata', parser.cdata)
- }
- emitNode(parser, 'onclosecdata')
- parser.cdata = ''
- parser.state = S.TEXT
- } else if (c === ']') {
- parser.cdata += ']'
- } else {
- parser.cdata += ']]' + c
- parser.state = S.CDATA
- }
- continue
- case S.PROC_INST:
- if (c === '?') {
- parser.state = S.PROC_INST_ENDING
- } else if (isWhitespace(c)) {
- parser.state = S.PROC_INST_BODY
- } else {
- parser.procInstName += c
- }
- continue
- case S.PROC_INST_BODY:
- if (!parser.procInstBody && isWhitespace(c)) {
- continue
- } else if (c === '?') {
- parser.state = S.PROC_INST_ENDING
- } else {
- parser.procInstBody += c
- }
- continue
- case S.PROC_INST_ENDING:
- if (c === '>') {
- emitNode(parser, 'onprocessinginstruction', {
- name: parser.procInstName,
- body: parser.procInstBody
- })
- parser.procInstName = parser.procInstBody = ''
- parser.state = S.TEXT
- } else {
- parser.procInstBody += '?' + c
- parser.state = S.PROC_INST_BODY
- }
- continue
- case S.OPEN_TAG:
- if (isMatch(nameBody, c)) {
- parser.tagName += c
- } else {
- newTag(parser)
- if (c === '>') {
- openTag(parser)
- } else if (c === '/') {
- parser.state = S.OPEN_TAG_SLASH
- } else {
- if (!isWhitespace(c)) {
- strictFail(parser, 'Invalid character in tag name')
- }
- parser.state = S.ATTRIB
- }
- }
- continue
- case S.OPEN_TAG_SLASH:
- if (c === '>') {
- openTag(parser, true)
- closeTag(parser)
- } else {
- strictFail(parser, 'Forward-slash in opening tag not followed by >')
- parser.state = S.ATTRIB
- }
- continue
- case S.ATTRIB:
- // haven't read the attribute name yet.
- if (isWhitespace(c)) {
- continue
- } else if (c === '>') {
- openTag(parser)
- } else if (c === '/') {
- parser.state = S.OPEN_TAG_SLASH
- } else if (isMatch(nameStart, c)) {
- parser.attribName = c
- parser.attribValue = ''
- parser.state = S.ATTRIB_NAME
- } else {
- strictFail(parser, 'Invalid attribute name')
- }
- continue
- case S.ATTRIB_NAME:
- if (c === '=') {
- parser.state = S.ATTRIB_VALUE
- } else if (c === '>') {
- strictFail(parser, 'Attribute without value')
- parser.attribValue = parser.attribName
- attrib(parser)
- openTag(parser)
- } else if (isWhitespace(c)) {
- parser.state = S.ATTRIB_NAME_SAW_WHITE
- } else if (isMatch(nameBody, c)) {
- parser.attribName += c
- } else {
- strictFail(parser, 'Invalid attribute name')
- }
- continue
- case S.ATTRIB_NAME_SAW_WHITE:
- if (c === '=') {
- parser.state = S.ATTRIB_VALUE
- } else if (isWhitespace(c)) {
- continue
- } else {
- strictFail(parser, 'Attribute without value')
- parser.tag.attributes[parser.attribName] = ''
- parser.attribValue = ''
- emitNode(parser, 'onattribute', {
- name: parser.attribName,
- value: ''
- })
- parser.attribName = ''
- if (c === '>') {
- openTag(parser)
- } else if (isMatch(nameStart, c)) {
- parser.attribName = c
- parser.state = S.ATTRIB_NAME
- } else {
- strictFail(parser, 'Invalid attribute name')
- parser.state = S.ATTRIB
- }
- }
- continue
- case S.ATTRIB_VALUE:
- if (isWhitespace(c)) {
- continue
- } else if (isQuote(c)) {
- parser.q = c
- parser.state = S.ATTRIB_VALUE_QUOTED
- } else {
- strictFail(parser, 'Unquoted attribute value')
- parser.state = S.ATTRIB_VALUE_UNQUOTED
- parser.attribValue = c
- }
- continue
- case S.ATTRIB_VALUE_QUOTED:
- if (c !== parser.q) {
- if (c === '&') {
- parser.state = S.ATTRIB_VALUE_ENTITY_Q
- } else {
- parser.attribValue += c
- }
- continue
- }
- attrib(parser)
- parser.q = ''
- parser.state = S.ATTRIB_VALUE_CLOSED
- continue
- case S.ATTRIB_VALUE_CLOSED:
- if (isWhitespace(c)) {
- parser.state = S.ATTRIB
- } else if (c === '>') {
- openTag(parser)
- } else if (c === '/') {
- parser.state = S.OPEN_TAG_SLASH
- } else if (isMatch(nameStart, c)) {
- strictFail(parser, 'No whitespace between attributes')
- parser.attribName = c
- parser.attribValue = ''
- parser.state = S.ATTRIB_NAME
- } else {
- strictFail(parser, 'Invalid attribute name')
- }
- continue
- case S.ATTRIB_VALUE_UNQUOTED:
- if (!isAttribEnd(c)) {
- if (c === '&') {
- parser.state = S.ATTRIB_VALUE_ENTITY_U
- } else {
- parser.attribValue += c
- }
- continue
- }
- attrib(parser)
- if (c === '>') {
- openTag(parser)
- } else {
- parser.state = S.ATTRIB
- }
- continue
- case S.CLOSE_TAG:
- if (!parser.tagName) {
- if (isWhitespace(c)) {
- continue
- } else if (notMatch(nameStart, c)) {
- if (parser.script) {
- parser.script += '</' + c
- parser.state = S.SCRIPT
- } else {
- strictFail(parser, 'Invalid tagname in closing tag.')
- }
- } else {
- parser.tagName = c
- }
- } else if (c === '>') {
- closeTag(parser)
- } else if (isMatch(nameBody, c)) {
- parser.tagName += c
- } else if (parser.script) {
- parser.script += '</' + parser.tagName
- parser.tagName = ''
- parser.state = S.SCRIPT
- } else {
- if (!isWhitespace(c)) {
- strictFail(parser, 'Invalid tagname in closing tag')
- }
- parser.state = S.CLOSE_TAG_SAW_WHITE
- }
- continue
- case S.CLOSE_TAG_SAW_WHITE:
- if (isWhitespace(c)) {
- continue
- }
- if (c === '>') {
- closeTag(parser)
- } else {
- strictFail(parser, 'Invalid characters in closing tag')
- }
- continue
- case S.TEXT_ENTITY:
- case S.ATTRIB_VALUE_ENTITY_Q:
- case S.ATTRIB_VALUE_ENTITY_U:
- var returnState
- var buffer
- switch (parser.state) {
- case S.TEXT_ENTITY:
- returnState = S.TEXT
- buffer = 'textNode'
- break
- case S.ATTRIB_VALUE_ENTITY_Q:
- returnState = S.ATTRIB_VALUE_QUOTED
- buffer = 'attribValue'
- break
- case S.ATTRIB_VALUE_ENTITY_U:
- returnState = S.ATTRIB_VALUE_UNQUOTED
- buffer = 'attribValue'
- break
- }
- if (c === ';') {
- parser[buffer] += parseEntity(parser)
- parser.entity = ''
- parser.state = returnState
- } else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
- parser.entity += c
- } else {
- strictFail(parser, 'Invalid character in entity name')
- parser[buffer] += '&' + parser.entity + c
- parser.entity = ''
- parser.state = returnState
- }
- continue
- default:
- throw new Error(parser, 'Unknown state: ' + parser.state)
- }
- } // while
- if (parser.position >= parser.bufferCheckPosition) {
- checkBufferLength(parser)
- }
- return parser
- }
- /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
- /* istanbul ignore next */
- if (!String.fromCodePoint) {
- (function () {
- var stringFromCharCode = String.fromCharCode
- var floor = Math.floor
- var fromCodePoint = function () {
- var MAX_SIZE = 0x4000
- var codeUnits = []
- var highSurrogate
- var lowSurrogate
- var index = -1
- var length = arguments.length
- if (!length) {
- return ''
- }
- var result = ''
- while (++index < length) {
- var codePoint = Number(arguments[index])
- if (
- !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
- codePoint < 0 || // not a valid Unicode code point
- codePoint > 0x10FFFF || // not a valid Unicode code point
- floor(codePoint) !== codePoint // not an integer
- ) {
- throw RangeError('Invalid code point: ' + codePoint)
- }
- if (codePoint <= 0xFFFF) { // BMP code point
- codeUnits.push(codePoint)
- } else { // Astral code point; split in surrogate halves
- // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
- codePoint -= 0x10000
- highSurrogate = (codePoint >> 10) + 0xD800
- lowSurrogate = (codePoint % 0x400) + 0xDC00
- codeUnits.push(highSurrogate, lowSurrogate)
- }
- if (index + 1 === length || codeUnits.length > MAX_SIZE) {
- result += stringFromCharCode.apply(null, codeUnits)
- codeUnits.length = 0
- }
- }
- return result
- }
- /* istanbul ignore next */
- if (Object.defineProperty) {
- Object.defineProperty(String, 'fromCodePoint', {
- value: fromCodePoint,
- configurable: true,
- writable: true
- })
- } else {
- String.fromCodePoint = fromCodePoint
- }
- }())
- }
- })( false ? undefined : exports)
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("3be6").Buffer))
- /***/ }),
- /***/ "eb1b":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1587");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "ee84":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/progress/Progress.vue?vue&type=template&id=0ed980d1&
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-progress",style:([_vm.background && _vm.getBackgroundStyle])},[_c('a-progress',{attrs:{"percent":parseFloat(_vm.finalValue),"type":_vm.type,"stroke-width":parseFloat(_vm.strokeWidth),"show-info":_vm.showInfo,"width":_vm.calWidth,"stroke-color":_vm.colorData,"status":_vm.status,"gap-degree":_vm.type === 'circle' ? _vm.gapDegree : null,"gap-position":_vm.gapPosition,"stroke-linecap":_vm.strokeLinecap}})],1)}
- var staticRenderFns = []
- // CONCATENATED MODULE: ./src/common/progress/Progress.vue?vue&type=template&id=0ed980d1&
- /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
- /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
- /***/ }),
- /***/ "efee":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.propsBinder = exports.capitalizeFirstLetter = void 0;
- var capitalizeFirstLetter = function capitalizeFirstLetter(string) {
- if (!string || typeof string.charAt !== 'function') {
- return string;
- }
- return string.charAt(0).toUpperCase() + string.slice(1);
- };
- exports.capitalizeFirstLetter = capitalizeFirstLetter;
- var propsBinder = function propsBinder(vueElement, props) {
- var _loop = function _loop(key) {
- var setMethodName = 'set' + capitalizeFirstLetter(key);
- if (vueElement[setMethodName]) {
- vueElement.$watch(key, function (newVal) {
- vueElement[setMethodName](newVal);
- }, {
- deep: true
- });
- }
- };
- for (var key in props) {
- _loop(key);
- }
- };
- exports.propsBinder = propsBinder;
- /***/ }),
- /***/ "f11d":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAADf1JREFUeAHt3N1tnIUahdFxRA2UkAboIog2aMJI5IJUhJLyPGcGGJ+J5QTHCG/xeHHjfP5hs9cbKVseh5ub20/Hg38IECBAgAABAo8IHD+8u3nk3V9815svfsQHCBAgQIAAAQLfKPDd5fO/dZFcvs5bAgQIECBAoCfw3Fc0fMei93tBIwIECBAgMBMwLGb0ggkQIECAQE/AsOjdVCMCBAgQIDATuP8Zi4f/BTe3H39/+D7PBAgQIECAwCsROP75l0Yf7oHjhx9/+prAF4fF+Yv+7ou/9i/2MQIECBAgQOC/K3D54c3TX+64HxIPR8Zj7bwU8piK9xEgQIAAAQLPEjAsnsXmiwgQIECAAIHHBL76Usj1F7z55eP762e/JkCAAAECBLoCx79+xuL6z//j3eHt9fO5/d1vP76/VnjysHjsi6//RX5NgAABAgQIdAROP2Px67nN3W/v3l9anX7G4ofrIfFwZJw/z0shFy1vCRAgQIAAgX8s8E3fsfgs7fbT/U+JfvZ+DwQIECBAgMB/XuCvV0IOh6s/74+H4/fXz3fH49vr53Pp5w+L81d/eOf/dXF28A8BAgQIEIgJnF4K+aPR6a+b3v9Zf3op5Ofr59NLIaeXRv7/8fPI8FJI7DeCOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYwHeXPje3n46XX//x9ng8XL/v+Ofzr5fPOT2eP3559JYAAQIECBAgcPAdC78JCBAgQIAAgX9f4Ob24+/XKW9++fj++vlw++mnz549ECBAgAABAmmBp2wD37FI/xZQjgABAgQIvKzA/c9YPBZ7vUyOd4e3p+cfLp93PBy/Pz3/fHn2lgABAgQIECDwZAEvhTyZyicSIECAAIFXIfDYNvBSyKs4vZIECBAgQOBlBAyLl3GWQoAAAQIEXoXAV3/G4qHA9bc87o7Ht6fn+5+5ePi5ngkQIECAAAECTxfw102fbuUzCRAgQIDAaxA4bQMvhbyGQ+tIgAABAgReSMCweCFoMQQIECBA4DUI3Dy7pJdCnk3nCwkQIECAQFXgf58egNySoaJ8AAAAAElFTkSuQmCC"
- /***/ }),
- /***/ "f14a":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8b18");
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ "f1a1":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAG6VJREFUeAHt3XuwXmV9L/BnvZd9yYUUZEqwGEASSRCOLUJFLgZbUoFIpVWjE7zM1On0j17m/NWZetrpae3Y6eWPTm9qO/SiklOjnhZDBEusoAhSwBt4FEOQ62lQBBKS7Oz32t+z3r3TvWEDIXmsQj5v9s673met57fW+uSZeb55L+ut0mHejr36pqW79u5623A4fGOV0unDYVqe0nDxYZbVnQABAgQIEPiBClR7qyrtHKZ0V1VV1yxbvOxjj77p/CcPd5eRBQ791r5qy7vigP44DdNxh15FTwIECBAgQOCHLlClRyIU/Gb3iss+fDjHcsjBonXV1t9Ow8H72s1GWv3jx6aTj/mxdOySyTQ5NpbajUYaxFMX8ZP6w0F9nx8PZpa7g1iX/wwGaRBHHw9H62K518/bj/rmbXK/fmxQ18vbzvTJ2+T26Pr0tty/7hvPncTyaN+jbePhaF+5PfoOZ2vkY4vHuWa+5f3U93X/3GfUXh/bTO18Yrl5dl/1Mc5ul1tjefa4636jEgfacv3c7kaAAAECBH5kBKrG7/SuWP8Hh3o8hxQsxjZtfX9MvL+15rhj03kvX5GWtFspxfMpVZ5w80Qdy6NJNk/Uowk7T6D9AxPtzGQfc3ee3vNcXq+rJ/mZGnFGuVYOJnmOz9Pv7MSda/VyEKjbR7Xy/FyHmJnt6uOol6NvfQx5u1wn/5k5ruiU++UIkWvOHvMoDOR1o/ASq+ftPz+Yu03ebpjPvg4nuU5ejo1CdxRUYvlpfbJWNLoRIECAAIEfMYFGo/GHnY3r33soh/W8gkVMltXYpmv+IubMXz1rxUvTOSf+RL3POIB+YzDoDvv9iBR5vhxUMfHGPBs/eSHP8nlF3GKizX/lW6yOB3VDfuIgokXePv8VFXrdXvydu0ZLLpJ/o6Hf680sjNrz1rEy9Tu9On/EMeQpfTjI93llP+8slvMtasSjXC+aIobk9fFXTi55mygdG/Rn9pv7R51o7PfzseSd93OgiDPtRcfoX5fop3yycbxRIrfH7uOc8n7SMLYPlcFgtr2f+r2oG0/L1NvmAqPkcSj/dvoQIECAAIFDFmi0mo3hjx29qLFq5fHVmtWnpomJJXOLxYT+V52Nb/z1eP/F8/pf8EEHi7duHjb/pbP1ypgt3/2aCBRnnnB8asRem81qqtHNs3Q/nrbI+45nK/KMHUv1xB7TdizF3Jtn4Tp05Al5FB9irh5N8HWESP241TNz3NXzbWxV14rGPAEP8sQfU3vdP0/xB9q7de36cV6Z+9V3/SifJ/g80dcb1zVibWwSvzMZIhpjwo+Gevczd/l4c1aI5iqvqrePor3eaDlq5EOIPeTdDYcRLPoRIOoziRyRg8rMtjm15FAyOpfcP7JRivV52whKz+sfbO4/umUCBAgQIFBCoNFuN6o3rDuzWrFi5dx68VrEP14+tv49H99Q9ee2P9vyQQWLV99+e/tr39q5KQLCW849+WXplfESSBXvoxhvNndX3W5j7+NPdL5x05e23/3vt333if//yFS3282vLrgRIECAAAECLyCB1uvXvjKtWXPG/EOuPvGq1cs33nHWWd357Qs/es5gccLmmyd3dr//ydjwkvNPXpFO/fGX5P9op8l2e/dwen9131fveujaD155Z2e6I0wsbKyVAAECBAi8YARaF649PZ225vR5B1yla5e3X/LmhzacOzWvfYEHzxos6mtU7HnimkgSr3vdqpPSyUcvS41Glcaq5q5qen/jrhtv2v65j3zs2wvU1USAAAECBAi8QAUWChfx7ocbly05+rLnutbFMwaLozZfd8xUp3tdvI/i7AtXnpSOX7a0DhXjVbW7mppK37zplu2f++jm7S9QM4dNgAABAgQIPIvAguEipdsmx9oX795w8WPP1HXBYLF407bjOsP91zer6owLV56YjlsabxSNLceGwyebne7gm1+4efuNmz5+zzMV1U6AAAECBAi88AUWDBdVdedYNbFu78aLHlnoDJ8WLCY3X7+i153eFhe5WrV21YnpmEWT8emPRmr3u3siVHTv/uKXdnz+/3xSqFhIUxsBAgQIEHiRCTxDuNjeao9fNLVh3QNPPd15wWL8qi2r4oOQ28ZarRVr45mKoybG6o+UtvuDPc3909N333zrvV/c/H93PLWIxwQIECBAgMCLV2DBcJHSA/G2y4umr7hs3tsiDgSLsY9uPSMua3X9ZKt13PlxNc2lE+O10Fi3u7fd7Uzd/cVb7735E1ff++Jlc2YECBAgQIDAMwksFC7ibRKPNIaNdZ13rL9ztl8dLNr/dO3ZcQGn6xa328ecd/IJaVF830dcaSu1utN72tOdfdtvufW+Wz65RaiYVXNPgAABAgSOQIGFw0X1WNVsXtx9+yW3ZZKqtenTa+MqkFviGYqlrz3phHzRq7j4VZXanQgVU/v3bL/1tvtv/eet3zkC/ZwyAQIECBAg8BSBBcNFSk+mRvOy3sZLb6xaV23Zt2xiYvLsl/1EGm836qtytzudJ8en9+/dfstt9/37pz5931NqekiAAAECBAgcwQILhosqTTWHzTe3jp6YnDzzZctTfBdJfPVFSq39U7ubU1N7vn37l++/7VPX3n8Euzl1AgQIECBAYAGB3g033hVfEJbmXaEzLsodX715deunTlhef/IjvpgrtaciVOzdt3v77V958MtbPyNULICpiQABAgQIEEhpwXCRhu1W/obS+O7NNL5valdr/77dO2778oNf+fT1T/tcKkQCBAgQIECAwFyBhcJFK4eK9tS+Jxp79+zaccfXHvrqddsenNvJMgECBAgQIEDgmQSeGi5azX17H2/u3v3EvV/5+sNf/9d/e+iZOmonQIAAAQIECCwkMDdctCJUPL7jjq88/I1tNz680MbaCBAgQIAAAQLPJTAbLprtVae/5Ruf/bxQ8Vxi1hMgQIAAAQLPKjC47/7vNr/XG/+5Z93KSgIECBAgQIDAQQrEFbHcCBAgQIAAAQJlBASLMo6qECBAgAABAiEgWBgGBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAQCNV6ToMBAgQIECAAIHDFfipS9etaKR1Z38kVY07DreY/gQIECBAgMCRK3Dm+jeceMrZr17RTDfcMEynnPvlNJh6VXAcfeSSOHMCBAgQIEDgUATOuuySE1e+5tUn9hYvXtoYu2rL/043/MP+VA3/JFXV9w+loD4ECBAgQIDAkSnw0z9/6UmrzjnrpP7iJUsHk5NHNQbD9Lt1uLhp6+Op2fyjlKqpI5PGWRMgQIAAAQLPR+A1l68/+RXn/vRJ/UWLlvbGx5c2qirVnwo5EC4+f/WDqdn4s3jmYvB8CtuWAAECBAgQOLIEzvnFnz959QWvPbm3aNGSwcTkkmajSoNIDwc+bnogXHzhU19Pw+rKI4vH2RIgQIAAAQIHK/Dat7zp5avPO+fl3bHxxcOJ8SXxREUaDofp9gcf/q9gkYsdCBc3b/m31Bh+6mB3YDsCBAgQIEDgyBA4b8MvnrLm/HNP6U+MLx6MR7AYptTrD9PN33koPbJnbydfx2LeeyoOhIsvbP2n1Ki+dGQwOUsCBAgQIEDguQTOf/svrFxz3mtOiUCxKP/Gqx+p3x+kL957f3p0376p5rB5eQSL5iVR6Mm5xepwsema303HT34ggsf2uessEyBAgAABAkeewNqNb1152gXnrxyMT0z2x9qT8eJH6vQG6YZ77kuPTe1/MueJ6Xdcem2jt/HSG6tW62fjDZuPzWWqw8Xl73pv6g3+ND4p8t256ywTIECAAAECR47AhVdsWLXmgnNXDcfbE8Ox1mQ8UZGmu9302W/vSLumO4/lHJHzRBbJ6+rb2Ee3njGoBtdHADluti3fx9Mcv9f54N9/KA2m3xfrFs9dZ5kAAQIECBB4cQu8/p1ve0UOFb1GY6zXao3nZyp2T02n6791b9rb6z7SGDbWdd6x/s5ZhQPBIjeMX7VlVTxTsS3eh7FidoN8X4eLD33wY6mf/lfUa85dZ5kAAQIECBB4cQr8zLve/orT155/ar/RaHciWAwjBDy2Zyr9azxTMd3tPxD54KLpKy6b95aJecEis0xuvn5Frzu9LT42smouUx0uPvA32+JDqr86t90yAQIECBAg8OITuOjdG0995esjVKTU6jdbY4P4+Mf39uxLn/nmPakzGGxvtccvmtqw7oGnnvnTgkXeYPGmbcd1hvuvj3BxxtwOdbj467+N61z03zq33TIBAgQIECDw4hH4uV965+ozLjxvda+qmvHbHsTLGf+xa0/6zN07Um84vHOsmli3d+NFjyx0xgsGi7zhUZuvO2aq070uXhY5e27HOlz81QdzsdfNbbdMgAABAgQIvPAF3vCed6454/UXnDpoNFr9VLX6cTnNBx5/IkLFd+JFi8Ftk2Pti3dvuHjeBz7mnvUzBou80bFX37R0157Ht8SzH2vndmqk4e93PvChXrzUctrcdssECBAgQIDAC1fgkl9+92n/42cuWB3Xu2r24vOj8eRC2v6976dtESqG1fDGZUuOvuzRN50/7xIVTz3bZw0WeeMTNt88ubP7/U9GiMjXuzhwa/S77+986O8m4t2hLz3QaIEAAQIECBB4wQmMTUw0Lv+fv3LmyjN/8qR4T0WVg8VgOEj/b+ej6bPbI1SkdO3y9kve/NCGc+ddVHOhE33OYJE7vfr229tf+9bOTREi3jK3SGN6+k86V/79smg7am67ZQIECBAgQOBHW2BsfKxxzEuXLzrt3HOO/8mfXXvqxNLFk/EKRYSKYSN/E+lXH9qZbthxfyxVn3jV6uUb7zjrrO7BnNFBBYtc6K2bh81/6Wy9Mj5q8u65hav9+z/e/+imzqDT8THUuTCWCRAgQOAHJtCIN/zFhR2rqtGMn1a8xTA/iuV2Xo77vEFe3WqN7uNxozXq1Gy1okurGsZ3fDdyn2Z8hVZeyn2azRR9Gnl5GL/N6FNvGPUbsWFcfyGuBdXK5eMAomZ8pWddIK/K/eu2vE07b1H3qfcTj3LNaMjH3WjmwnHt6ziQ6BEHkOvnNXHsM0eTa8cuo099i61Gy/ECRT6/ul6+ena9nB/ns5n5qe+bzXa01Yc1UyHu8vnV2+Z++UjiMPJW8Zu/86M/HNT3X7r/4XTTvQ/Exa6qf7x8bP17Pr6hiicyDu520MEil4tPiVRjm7b+edz/2rzy/f7O4dfvfHiw/Z7/qJ54fN+gFxcOdyNAgAABAj9AgTpQNIYxAccEmr+zO8+b4+MxS8bcGRNoPMwzfEycsS7PuTlY5G3qST0CSPzEdB0zekyvOTTEf4+bMXs3WmPRFLc8A+eJN37jKzvjfmYSz/3r+T/W54m6Dhej7etpOib+Vp0i8rTezDkg9htdYvP8OI4v2mKDvNjIE330GoWGel95t3WqGN3VbbE4Oo7RCdThIOebOsjkw8znH3Xj4OM3b51JcuH6Z6Ytb9gIirpI9Mn9ZnYch9Lv96v8noov7Hgg3RLBIkr8ZWfj+t+I+9x80LfnFSxmq0a4eH+8M/S3Zh+7J0CAAAEC/60C+b/XMRnGpFfvNqbM/LC+nPSoLebs/Dg3jjatH8c7ECM8REqYOdjcL/eq+9bLES5Gc3T99d+z7blOvW3Uirm6Xs49D+x3dn3dVk/eo/1Fe2wdy8N627yjOk/kpyuiQCSD+hhznbpW7j+z/5wb6vV1fJhZX9cbHW8Eh6hVH330mTmWvLd4UMVJRwyKcxmda66d9xv5pt7P7P5G+x8dw5PTnfS5e+6P91V8L9f4wwgV743Ded637HJIt9ZVW387DQfvO6TOOhEgQIAAgcMQyP+FzpN9nsTyJJpn6fpPnqxn2vOaPEmPtsrtox3Ors/3o21y+8xyHQDypB+P4ydPy/Vi/JUn4fwgt40m8tGknSfr/H/6OnzU+4twEtvV+43Heb+5ejx3UN/Xr3nEUjy3MJro67Kj/cw9thwKDjyu6+RtRvVyxbxu3jZ5Xd6u3le999Hjuk8j5aASi3W/3LcbHyOd6nTSY3v3p3sefSx967uPpk5+waFq/E7vivV/EGUO6ZbP9ZBv7au2vCss/zj+Ted9v8ghF9SRAAECBAgQ+OEIVOmRCAW/2b3isg8fzgEcVrDIO66vdbF319vifRdvjGKnx7NTy+N5J19Wdjj/KvoSIECAAIEfuEC1N5642BlPENwVz4Rcs2zxso891zUqDuaQ/hOJLHziXn7NhAAAAABJRU5ErkJggg=="
- /***/ }),
- /***/ "f29e":
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("9c77");
- /***/ }),
- /***/ "f2ac":
- /***/ (function(module, exports) {
- // shim for using process in browser
- var process = module.exports = {};
- // cached from whatever global is present so that test runners that stub it
- // don't break things. But we need to wrap it in a try catch in case it is
- // wrapped in strict mode code which doesn't define any globals. It's inside a
- // function because try/catches deoptimize in certain engines.
- var cachedSetTimeout;
- var cachedClearTimeout;
- function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
- }
- function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
- }
- (function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
- } ())
- function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
- }
- function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
- }
- var queue = [];
- var draining = false;
- var currentQueue;
- var queueIndex = -1;
- function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
- }
- function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
- }
- process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
- };
- // v8 likes predictible objects
- function Item(fun, array) {
- this.fun = fun;
- this.array = array;
- }
- Item.prototype.run = function () {
- this.fun.apply(null, this.array);
- };
- process.title = 'browser';
- process.browser = true;
- process.env = {};
- process.argv = [];
- process.version = ''; // empty string to avoid regexp issues
- process.versions = {};
- function noop() {}
- process.on = noop;
- process.addListener = noop;
- process.once = noop;
- process.off = noop;
- process.removeListener = noop;
- process.removeAllListeners = noop;
- process.emit = noop;
- process.prependListener = noop;
- process.prependOnceListener = noop;
- process.listeners = function (name) { return [] }
- process.binding = function (name) {
- throw new Error('process.binding is not supported');
- };
- process.cwd = function () { return '/' };
- process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
- };
- process.umask = function() { return 0; };
- /***/ }),
- /***/ "f2e5":
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- /***/ }),
- /***/ "f344":
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {/**
- * lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- /** Used as references for various `Number` constants. */
- var INFINITY = 1 / 0;
- /** `Object#toString` result references. */
- var symbolTag = '[object Symbol]';
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
- /** Used to generate unique IDs. */
- var idCounter = 0;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objectToString = objectProto.toString;
- /** Built-in value references. */
- var Symbol = root.Symbol;
- /** Used to convert symbols to primitives and strings. */
- var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
- /**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
- function baseToString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
- }
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
- }
- /**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
- function toString(value) {
- return value == null ? '' : baseToString(value);
- }
- /**
- * Generates a unique ID. If `prefix` is given, the ID is appended to it.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {string} [prefix=''] The value to prefix the ID with.
- * @returns {string} Returns the unique ID.
- * @example
- *
- * _.uniqueId('contact_');
- * // => 'contact_104'
- *
- * _.uniqueId();
- * // => '105'
- */
- function uniqueId(prefix) {
- var id = ++idCounter;
- return toString(prefix) + id;
- }
- module.exports = uniqueId;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d")))
- /***/ }),
- /***/ "f3da":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- //
- //
- //
- //
- var _default = {
- name: 'SmIframe',
- mixins: [_theme.default],
- props: {
- src: {
- type: String
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "f53a":
- /***/ (function(module, exports, __webpack_require__) {
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
- * JavaScript Cookie v2.2.1
- * https://github.com/js-cookie/js-cookie
- *
- * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
- * Released under the MIT license
- */
- ;(function (factory) {
- var registeredInModuleLoader;
- if (true) {
- !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
- __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- registeredInModuleLoader = true;
- }
- if (true) {
- module.exports = factory();
- registeredInModuleLoader = true;
- }
- if (!registeredInModuleLoader) {
- var OldCookies = window.Cookies;
- var api = window.Cookies = factory();
- api.noConflict = function () {
- window.Cookies = OldCookies;
- return api;
- };
- }
- }(function () {
- function extend () {
- var i = 0;
- var result = {};
- for (; i < arguments.length; i++) {
- var attributes = arguments[ i ];
- for (var key in attributes) {
- result[key] = attributes[key];
- }
- }
- return result;
- }
- function decode (s) {
- return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
- }
- function init (converter) {
- function api() {}
- function set (key, value, attributes) {
- if (typeof document === 'undefined') {
- return;
- }
- attributes = extend({
- path: '/'
- }, api.defaults, attributes);
- if (typeof attributes.expires === 'number') {
- attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
- }
- // We're using "expires" because "max-age" is not supported by IE
- attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
- try {
- var result = JSON.stringify(value);
- if (/^[\{\[]/.test(result)) {
- value = result;
- }
- } catch (e) {}
- value = converter.write ?
- converter.write(value, key) :
- encodeURIComponent(String(value))
- .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
- key = encodeURIComponent(String(key))
- .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
- .replace(/[\(\)]/g, escape);
- var stringifiedAttributes = '';
- for (var attributeName in attributes) {
- if (!attributes[attributeName]) {
- continue;
- }
- stringifiedAttributes += '; ' + attributeName;
- if (attributes[attributeName] === true) {
- continue;
- }
- // Considers RFC 6265 section 5.2:
- // ...
- // 3. If the remaining unparsed-attributes contains a %x3B (";")
- // character:
- // Consume the characters of the unparsed-attributes up to,
- // not including, the first %x3B (";") character.
- // ...
- stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
- }
- return (document.cookie = key + '=' + value + stringifiedAttributes);
- }
- function get (key, json) {
- if (typeof document === 'undefined') {
- return;
- }
- var jar = {};
- // To prevent the for loop in the first place assign an empty array
- // in case there are no cookies at all.
- var cookies = document.cookie ? document.cookie.split('; ') : [];
- var i = 0;
- for (; i < cookies.length; i++) {
- var parts = cookies[i].split('=');
- var cookie = parts.slice(1).join('=');
- if (!json && cookie.charAt(0) === '"') {
- cookie = cookie.slice(1, -1);
- }
- try {
- var name = decode(parts[0]);
- cookie = (converter.read || converter)(cookie, name) ||
- decode(cookie);
- if (json) {
- try {
- cookie = JSON.parse(cookie);
- } catch (e) {}
- }
- jar[name] = cookie;
- if (key === name) {
- break;
- }
- } catch (e) {}
- }
- return key ? jar[key] : jar;
- }
- api.set = set;
- api.get = function (key) {
- return get(key, false /* read as raw */);
- };
- api.getJSON = function (key) {
- return get(key, true /* read as json */);
- };
- api.remove = function (key, attributes) {
- set(key, '', extend(attributes, {
- expires: -1
- }));
- };
- api.defaults = {};
- api.withConverter = init;
- return api;
- }
- return init(function () {});
- }));
- /***/ }),
- /***/ "f586":
- /***/ (function(module, exports) {
- module.exports = function(module) {
- if (!module.webpackPolyfill) {
- module.deprecate = function() {};
- module.paths = [];
- // module.parent = undefined by default
- if (!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function() {
- return module.i;
- }
- });
- module.webpackPolyfill = 1;
- }
- return module;
- };
- /***/ }),
- /***/ "f5a9":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _theme = _interopRequireDefault(__webpack_require__("9259"));
- var _borderConfig = _interopRequireDefault(__webpack_require__("a759"));
- var _lodash = _interopRequireDefault(__webpack_require__("f344"));
- var _resizeDetector = __webpack_require__("e0f2");
- var _debounce = _interopRequireDefault(__webpack_require__("331f"));
- //
- //
- //
- //
- //
- //
- //
- //
- var _default = {
- name: 'SmBorder',
- mixins: [_theme.default],
- props: {
- // border的类型
- type: {
- type: [String],
- default: 'border1'
- },
- customBorder: {
- type: Object
- }
- },
- data: function data() {
- return {
- borderId: (0, _lodash.default)("".concat(this.$options.name.toLowerCase(), "-")),
- // content的位置大小
- position: {
- top: 0,
- left: 0,
- width: 0,
- height: 0
- },
- // 上右下左的边距
- borderEdge: [],
- // border的宽度
- borderWidth: [],
- // border组件的宽高
- width: 0,
- height: 0
- };
- },
- computed: {
- borderConfig: function borderConfig() {
- if (!this.customBorder && this.type) {
- return _borderConfig.default[this.type];
- } else {
- return this.customBorder;
- }
- },
- borderImage: function borderImage() {
- if ((!this.customBorder || !this.customBorder.src) && this.type) {
- return __webpack_require__("ded2")("./".concat(this.type, ".png"));
- } else {
- return "".concat(this.customBorder.src);
- }
- },
- borderStyle: function borderStyle() {
- var borderImageSlice = this.borderWidth.join(' ') + ' fill';
- var borderWidth = this.borderWidth.join('px ') + 'px';
- return {
- borderWidth: borderWidth,
- // 当图片大小超过8KB, webpack就不会转换成base64, 直接引入时路径出错(此时的图片路径在index.html下?)
- borderImage: 'url(' + this.borderImage + ') ' + borderImageSlice + ' / 1 / 0 stretch'
- };
- },
- contentStyle: function contentStyle() {
- var contentStyle = Object.assign({}, this.position);
- for (var key in contentStyle) {
- contentStyle[key] = contentStyle[key] + 'px';
- }
- return contentStyle;
- }
- },
- watch: {
- // type变化了,需要读取对应的配置,重新计算位置大小
- type: function type() {
- this.setPosition();
- }
- },
- mounted: function mounted() {
- this.setPosition();
- this.resizeHanlder = (0, _debounce.default)(this.calcPosition.bind(this), 500);
- (0, _resizeDetector.addListener)(this.$el, this.resizeHanlder);
- },
- updated: function updated() {
- // 避免style.width< borderWidth,引起的dom重绘, 宽高会改变, 需要重新计算组件的位置大小
- this.calcPosition();
- },
- beforeDestroy: function beforeDestroy() {
- (0, _resizeDetector.removeListener)(this.$el, this.resizeHandler);
- },
- methods: {
- // 设置content的位置大小
- setPosition: function setPosition() {
- var borderConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.borderConfig;
- this.borderEdge = borderConfig.borderEdge;
- this.borderWidth = borderConfig.borderWidth;
- this.calcPosition();
- },
- // 计算content的top,left,width,height
- calcPosition: function calcPosition() {
- // 设置总宽高
- this.setWidthHeight();
- var _this$borderEdge = this.borderEdge,
- top = _this$borderEdge.top,
- left = _this$borderEdge.left,
- bottom = _this$borderEdge.bottom,
- right = _this$borderEdge.right; // 由于定位是相当于content-width来定位, 所以要减去border的宽度(left和 top)
- this.position.left = left - this.borderWidth[3];
- this.position.top = top - this.borderWidth[0]; // 内容的宽度 = 总的宽度 - 总的边距
- this.position.width = this.width - left - right;
- this.position.height = this.height - top - bottom;
- },
- // 设置宽高
- setWidthHeight: function setWidthHeight() {
- if (this.$refs[this.borderId]) {
- this.width = this.$refs[this.borderId].offsetWidth;
- this.height = this.$refs[this.borderId].offsetHeight;
- }
- }
- }
- };
- exports.default = _default;
- /***/ }),
- /***/ "f7bd":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _Card_vue_vue_type_template_id_0b7b8e8a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5993");
- /* harmony import */ var _Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("65db");
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
- /* normalize component */
- var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
- _Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _Card_vue_vue_type_template_id_0b7b8e8a___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
- _Card_vue_vue_type_template_id_0b7b8e8a___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
- false,
- null,
- null,
- null
-
- )
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ "f840":
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE_f840__;
- /***/ }),
- /***/ "f875":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireWildcard = __webpack_require__("16ed");
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _regenerator = _interopRequireDefault(__webpack_require__("849c"));
- var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _Events2 = __webpack_require__("e3e2");
- var _util = __webpack_require__("1448");
- var convert = _interopRequireWildcard(__webpack_require__("fc3a"));
- var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
- function adopt(value) {
- return value instanceof P ? value : new P(function (resolve) {
- resolve(value);
- });
- }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) {
- try {
- step(generator.next(value));
- } catch (e) {
- reject(e);
- }
- }
- function rejected(value) {
- try {
- step(generator["throw"](value));
- } catch (e) {
- reject(e);
- }
- }
- function step(result) {
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
- }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- var DEFAULT_WELLKNOWNSCALESET = ['GoogleCRS84Quad', 'GoogleMapsCompatible', 'urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible', 'urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad'];
- var MB_SCALEDENOMINATOR_3857 = ['559082264.0287178', '279541132.0143589', '139770566.0071794', '69885283.00358972', '34942641.50179486', '17471320.75089743', '8735660.375448715', '4367830.1877224357', '2183915.093862179', '1091957.546931089', '545978.7734655447', '272989.3867327723', '136494.6933663862', '68247.34668319309', '34123.67334159654', '17061.83667079827', '8530.918335399136', '4265.459167699568', '2132.729583849784'];
- var MB_SCALEDENOMINATOR_4326 = ['5.590822640287176E8', '2.795411320143588E8', '1.397705660071794E8', '6.98852830035897E7', '3.494264150179485E7', '1.7471320750897426E7', '8735660.375448713', '4367830.187724357', '2183915.0938621783', '1091957.5469310891', '545978.7734655446', '272989.3867327723', '136494.69336638614', '68247.34668319307', '34123.673341596535', '17061.836670798268', '8530.918335399134'];
- var WebMapService =
- /*#__PURE__*/
- function (_Events) {
- (0, _inherits2.default)(WebMapService, _Events);
- function WebMapService(mapId) {
- var _this;
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- (0, _classCallCheck2.default)(this, WebMapService);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(WebMapService).call(this));
- _this.proxyOptions = {
- data: 'apps/viewer/getUrlResource.json?url=',
- image: 'apps/viewer/getUrlResource.png?url='
- };
- if (typeof mapId === 'string' || typeof mapId === 'number') {
- _this.mapId = mapId;
- } else if (mapId !== null && (0, _typeof2.default)(mapId) === 'object') {
- _this.mapInfo = mapId;
- }
- _this.serverUrl = options.serverUrl || 'https://www.supermapol.com';
- _this.accessToken = options.accessToken;
- _this.accessKey = options.accessKey;
- _this.tiandituKey = options.tiandituKey || '';
- _this.withCredentials = options.withCredentials || false;
- _this.excludePortalProxyUrl = options.excludePortalProxyUrl;
- _this.iportalServiceProxyUrl = options.iportalServiceProxyUrlPrefix;
- _this.proxy = options.proxy;
- return _this;
- }
- (0, _createClass2.default)(WebMapService, [{
- key: "setMapId",
- value: function setMapId(mapId) {
- this.mapId = mapId;
- }
- }, {
- key: "setServerUrl",
- value: function setServerUrl(serverUrl) {
- this.serverUrl = serverUrl;
- }
- }, {
- key: "setWithCredentials",
- value: function setWithCredentials(withCredentials) {
- this.withCredentials = withCredentials;
- }
- }, {
- key: "setProxy",
- value: function setProxy(proxy) {
- this.proxy = proxy;
- }
- }, {
- key: "handleServerUrl",
- value: function handleServerUrl(serverUrl) {
- var urlArr = serverUrl.split('');
- if (urlArr[urlArr.length - 1] !== '/') {
- serverUrl += '/';
- }
- this.serverUrl = serverUrl;
- return serverUrl;
- }
- }, {
- key: "getMapInfo",
- value: function getMapInfo() {
- var _this2 = this;
- if (!this.mapId && this.mapInfo) {
- return new Promise(function (resolve) {
- resolve(_this2.mapInfo);
- });
- }
- var mapUrl = this._handleMapUrl();
- return new Promise(function (resolve, reject) {
- return __awaiter(_this2, void 0, void 0,
- /*#__PURE__*/
- _regenerator.default.mark(function _callee() {
- return _regenerator.default.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _context.prev = 0;
- _context.next = 3;
- return this.getiPortalServiceProxy();
- case 3:
- SuperMap.FetchRequest.get(mapUrl, null, {
- withCredentials: this.withCredentials
- }).then(function (response) {
- return response.json();
- }).then(function (mapInfo) {
- if (mapInfo && mapInfo.succeed === false) {
- var error = {
- message: mapInfo && mapInfo.error && mapInfo.error.errorMsg
- };
- reject(error);
- return;
- }
- mapInfo.mapParams = {
- title: mapInfo.title,
- description: mapInfo.description
- };
- resolve(mapInfo);
- }).catch(function (error) {
- reject(error);
- });
- _context.next = 9;
- break;
- case 6:
- _context.prev = 6;
- _context.t0 = _context["catch"](0);
- reject(_context.t0);
- case 9:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this, [[0, 6]]);
- }));
- });
- }
- }, {
- key: "getiPortalServiceProxy",
- value: function getiPortalServiceProxy() {
- var _this3 = this;
- return new Promise(function (resolve, reject) {
- SuperMap.FetchRequest.get("".concat(_this3.serverUrl, "web/config/portal.json"), {
- scope: ['serviceProxy']
- }).then(function (response) {
- return response.json();
- }).then(function (serviceProxyInfo) {
- if (!serviceProxyInfo || !serviceProxyInfo.serviceProxy) {
- reject('serviceProxyFailed');
- return;
- }
- var serviceProxy = serviceProxyInfo.serviceProxy;
- if (serviceProxy.enable) {
- if (serviceProxy.proxyServerRootUrl) {
- _this3.iportalServiceProxyUrl = serviceProxy.proxyServerRootUrl;
- } else if (serviceProxy.port && serviceProxy.rootUrlPostfix) {
- _this3.iportalServiceProxyUrl = "".concat(serviceProxy.port, "/").concat(serviceProxy.rootUrlPostfix);
- }
- if (_this3.serverUrl.indexOf(_this3.iportalServiceProxyUrl) > -1) {
- _this3.iportalServiceProxyUrl = '';
- }
- }
- resolve(serviceProxy);
- }).catch(function (error) {
- reject(error);
- });
- });
- }
- }, {
- key: "getLayerFeatures",
- value: function getLayerFeatures(type, layer, baseProjection) {
- var pro;
- switch (type) {
- case 'hosted':
- pro = this._getFeaturesFromHosted(layer, baseProjection);
- break;
- case 'rest_data':
- pro = this._getFeaturesFromRestData(layer);
- break;
- case 'rest_map':
- pro = this._getFeaturesFromRestMap(layer);
- break;
- case 'dataflow':
- pro = this._getFeaturesFromDataflow(layer);
- break;
- case 'user_data':
- pro = this._getFeaturesFromUserData(layer);
- break;
- }
- return pro;
- }
- }, {
- key: "getWmtsInfo",
- value: function getWmtsInfo(layerInfo, mapCRS) {
- var _this4 = this;
- return new Promise(function (resolve, reject) {
- var isMatched = false;
- var matchMaxZoom = 22;
- var style = '';
- var bounds;
- var restResourceURL = '';
- var kvpResourceUrl = '';
- var proxy = _this4.handleProxy();
- SuperMap.FetchRequest.get("".concat(layerInfo.url.split('?')[0], "?REQUEST=GetCapabilities&SERVICE=WMTS&VERSION=1.0.0"), null, {
- withCredentials: _this4.handleWithCredentials(proxy, layerInfo.url, false),
- withoutFormatSuffix: true,
- proxy: proxy
- }).then(function (response) {
- return response.text();
- }).then(function (capabilitiesText) {
- var converts = convert || window.convert;
- var capabilities = JSON.parse(converts.xml2json(capabilitiesText, {
- compact: true,
- spaces: 4
- })).Capabilities;
- var content = capabilities.Contents;
- var metaData = capabilities['ows:OperationsMetadata'];
- if (metaData) {
- var operations = metaData['ows:Operation'];
- if (!Array.isArray(operations)) {
- operations = [operations];
- }
- var operation = operations.find(function (item) {
- return item._attributes.name === 'GetTile';
- });
- if (operation) {
- var getConstraints = operation['ows:DCP']['ows:HTTP']['ows:Get'];
- if (!Array.isArray(getConstraints)) {
- getConstraints = [getConstraints];
- }
- var getConstraint = getConstraints.find(function (item) {
- return item['ows:Constraint']['ows:AllowedValues']['ows:Value']['_text'] === 'KVP';
- });
- if (getConstraint) {
- kvpResourceUrl = getConstraint['_attributes']['xlink:href'];
- }
- }
- }
- var tileMatrixSet = content.TileMatrixSet;
- for (var i = 0; i < tileMatrixSet.length; i++) {
- if (tileMatrixSet[i]['ows:Identifier'] && tileMatrixSet[i]['ows:Identifier']['_text'] === layerInfo.tileMatrixSet) {
- if (tileMatrixSet[i]['WellKnownScaleSet'] && DEFAULT_WELLKNOWNSCALESET.includes(tileMatrixSet[i]['WellKnownScaleSet']['_text'])) {
- isMatched = true;
- } else {
- var matchedScaleDenominator = [];
- var defaultCRSScaleDenominators = mapCRS === 'EPSG:3857' ? MB_SCALEDENOMINATOR_3857 : MB_SCALEDENOMINATOR_4326;
- for (var j = 0, len = defaultCRSScaleDenominators.length; j < len; j++) {
- if (!tileMatrixSet[i].TileMatrix[j]) {
- break;
- }
- if (parseFloat(defaultCRSScaleDenominators[j]) !== parseFloat(tileMatrixSet[i].TileMatrix[j]['ScaleDenominator']['_text'])) {
- break;
- }
- matchedScaleDenominator.push(defaultCRSScaleDenominators[j]);
- }
- matchMaxZoom = matchedScaleDenominator.length - 1;
- if (matchedScaleDenominator.length !== 0) {
- isMatched = true;
- } else {
- throw Error('TileMatrixSetNotSuppport');
- }
- }
- break;
- }
- }
- var layer = content.Layer.find(function (item) {
- return item['ows:Identifier']['_text'] === layerInfo.layer;
- });
- if (layer) {
- var styles = layer.Style;
- if (Array.isArray(layer.Style)) {
- style = styles[0]['ows:Identifier'] ? styles[0]['ows:Identifier']['_text'] : '';
- } else {
- style = styles['ows:Identifier'] ? styles['ows:Identifier']['_text'] : '';
- }
- if (layer['ows:WGS84BoundingBox']) {
- var lowerCorner = layer['ows:WGS84BoundingBox']['ows:LowerCorner']['_text'].split(' ');
- var upperCorner = layer['ows:WGS84BoundingBox']['ows:UpperCorner']['_text'].split(' ');
- bounds = [parseFloat(lowerCorner[0]), parseFloat(lowerCorner[1]), parseFloat(upperCorner[0]), parseFloat(upperCorner[1])];
- }
- var resourceUrls = layer.ResourceURL;
- if (!Array.isArray(resourceUrls)) {
- resourceUrls = [resourceUrls];
- }
- var resourceUrl = resourceUrls.find(function (item) {
- return item._attributes.resourceType === 'tile';
- });
- if (resourceUrl) {
- restResourceURL = resourceUrl._attributes.template;
- }
- }
- resolve({
- isMatched: isMatched,
- matchMaxZoom: matchMaxZoom,
- style: style,
- bounds: bounds,
- restResourceURL: restResourceURL,
- kvpResourceUrl: kvpResourceUrl
- });
- }).catch(function (error) {
- reject(error);
- });
- });
- }
- }, {
- key: "_getFeaturesFromHosted",
- value: function _getFeaturesFromHosted(layer, baseProjection) {
- var dataSource = layer.dataSource,
- layerType = layer.layerType;
- var serverId = dataSource ? dataSource.serverId : layer.serverId;
- if (!serverId) {
- return new Promise(function (resolve, reject) {
- resolve({
- type: 'noServerId'
- });
- });
- }
- var getDataFromIportal = layerType === 'MARKER' || dataSource && (!dataSource.accessType || dataSource.accessType === 'DIRECT');
- if (getDataFromIportal) {
- return this._getDataFromIportal(serverId, layer);
- } else {
- return this._getDataFromHosted({
- layer: layer,
- serverId: serverId,
- baseProjection: baseProjection
- });
- }
- }
- }, {
- key: "_getFeaturesFromRestData",
- value: function _getFeaturesFromRestData(layer) {
- var _this5 = this;
- var features;
- var dataSource = layer.dataSource;
- return new Promise(function (resolve, reject) {
- _this5._getFeatureBySQL(dataSource.url, [dataSource.dataSourceName || layer.name], function (result) {
- features = _this5.parseGeoJsonData2Feature({
- allDatas: {
- features: result.result.features.features
- }
- });
- resolve({
- type: 'feature',
- features: features
- });
- }, function (err) {
- reject(err);
- });
- });
- }
- }, {
- key: "_getFeaturesFromRestMap",
- value: function _getFeaturesFromRestMap(layer) {
- var _this6 = this;
- return new Promise(function (resolve, reject) {
- _this6._queryFeatureBySQL(layer.dataSource.url, layer.dataSource.layerName, function (result) {
- var recordsets = result && result.result.recordsets;
- var recordset = recordsets && recordsets[0];
- var attributes = recordset.fields;
- if (recordset && attributes) {
- var fileterAttrs = [];
- for (var i in attributes) {
- var value = attributes[i];
- if (value.indexOf('Sm') !== 0 || value === 'SmID') {
- fileterAttrs.push(value);
- }
- }
- _this6._getFeatures(fileterAttrs, layer, function (features) {
- resolve({
- type: 'feature',
- features: features
- });
- }, function (err) {
- reject(err);
- });
- }
- }, function (err) {
- reject(err);
- }, 'smid=1');
- });
- }
- }, {
- key: "_getFeaturesFromUserData",
- value: function _getFeaturesFromUserData(layer) {
- var _this7 = this;
- var dataSource = layer.dataSource;
- return new Promise(function (resolve, reject) {
- var proxy = _this7.handleProxy();
- SuperMap.FetchRequest.get(dataSource.url, null, {
- withCredentials: _this7.handleWithCredentials(proxy, dataSource.url, _this7.withCredentials),
- proxy: proxy
- }).then(function (response) {
- return response.json();
- }).then(function (data) {
- var features;
- if (data && data instanceof Object && data.type === 'FeatureCollection') {
- features = data.features;
- } else {
- features = data;
- }
- features = _this7.parseGeoJsonData2Feature({
- allDatas: {
- features: features
- }
- });
- resolve({
- type: 'feature',
- features: features
- });
- }).catch(function (err) {
- reject(err);
- });
- });
- }
- }, {
- key: "_queryFeatureBySQL",
- value: function _queryFeatureBySQL(url, layerName, _processCompleted, processFaild, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute) {
- var queryBySQLParams = this._getQueryFeaturesParam(layerName, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute);
- var proxy = this.handleProxy();
- var queryBySQLService = new SuperMap.QueryBySQLService(url, {
- proxy: proxy,
- withCredentials: this.handleWithCredentials(proxy, url, false),
- eventListeners: {
- processCompleted: function processCompleted(data) {
- _processCompleted && _processCompleted(data);
- },
- processFailed: function processFailed(data) {
- processFaild && processFaild(data);
- }
- }
- });
- queryBySQLService.processAsync(queryBySQLParams);
- }
- }, {
- key: "_getFeatures",
- value: function _getFeatures(fields, layerInfo, resolve, reject) {
- var _this8 = this;
- var source = layerInfo.dataSource;
- this._queryFeatureBySQL(source.url, source.layerName, function (result) {
- var recordsets = result.result.recordsets[0];
- var features = recordsets.features.features;
- var featuresObj = _this8.parseGeoJsonData2Feature({
- allDatas: {
- features: features
- }
- });
- resolve(featuresObj);
- }, function (err) {
- reject(err);
- }, null, fields);
- }
- }, {
- key: "_getQueryFeaturesParam",
- value: function _getQueryFeaturesParam(layerName, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute) {
- var queryParam = new SuperMap.FilterParameter({
- name: layerName,
- attributeFilter: attributeFilter
- });
- if (fields) {
- queryParam.fields = fields;
- }
- var params = {
- queryParams: [queryParam]
- };
- if (onlyAttribute) {
- params.queryOption = SuperMap.QueryOption.ATTRIBUTE;
- }
- startRecord && (params.startRecord = startRecord);
- recordLength && (params.expectCount = recordLength);
- if (epsgCode) {
- params.prjCoordSys = {
- epsgCode: epsgCode
- };
- }
- var queryBySQLParams = new SuperMap.QueryBySQLParameters(params);
- return queryBySQLParams;
- }
- }, {
- key: "_getFeaturesFromDataflow",
- value: function _getFeaturesFromDataflow(layer) {
- var _this9 = this;
- return new Promise(function (resolve, reject) {
- _this9._getDataflowInfo(layer, function () {
- resolve({
- type: 'dataflow'
- });
- }, function (e) {
- reject(e);
- });
- });
- }
- }, {
- key: "_getDataflowInfo",
- value: function _getDataflowInfo(layerInfo, success, faild) {
- var url = layerInfo.url,
- token;
- var requestUrl = "".concat(url, ".json");
- if (layerInfo.credential && layerInfo.credential.token) {
- token = layerInfo.credential.token;
- requestUrl += "?token=".concat(token);
- }
- var proxy = this.handleProxy();
- SuperMap.FetchRequest.get(requestUrl, null, {
- proxy: proxy,
- withCredentials: this.handleWithCredentials(proxy, requestUrl, false)
- }).then(function (response) {
- return response.json();
- }).then(function (result) {
- if (!result) {
- faild();
- return;
- }
- if (result.featureMetaData) {
- layerInfo.featureType = result.featureMetaData.featureType.toUpperCase();
- layerInfo.dataSource = {
- dataTypes: {}
- };
- if (result.featureMetaData.fieldInfos && result.featureMetaData.fieldInfos.length > 0) {
- result.featureMetaData.fieldInfos.forEach(function (data) {
- var name = data.name.trim();
- if (data.type === 'TEXT') {
- layerInfo.dataSource.dataTypes[name] = 'STRING';
- } else if (['DOUBLE', 'INT', 'FLOAT', 'LONG', 'SHORT'].includes(data.type)) {
- layerInfo.dataSource.dataTypes[name] = 'NUMBER';
- } else {
- layerInfo.dataSource.dataTypes[name] = 'UNKNOWN';
- }
- });
- }
- }
- layerInfo.wsUrl = result.urls[0].url;
- layerInfo.name = result.urls[0].url.split('iserver/services/')[1].split('/dataflow')[0];
- success();
- }).catch(function () {
- faild();
- });
- }
- }, {
- key: "getDatasourceType",
- value: function getDatasourceType(layer) {
- var dataSource = layer.dataSource,
- layerType = layer.layerType;
- if (dataSource && dataSource.type === 'SAMPLE_DATA') {
- return dataSource.type;
- }
- var type;
- var isHosted = dataSource && dataSource.serverId || layerType === 'MARKER' || layerType === 'HOSTED_TILE';
- var isTile = layerType === 'SUPERMAP_REST' || layerType === 'TILE' || layerType === 'WMS' || layerType === 'WMTS' || layerType === 'MAPBOXSTYLE';
- if (isHosted) {
- type = 'hosted';
- } else if (isTile) {
- type = 'tile';
- } else if (dataSource && dataSource.type === 'REST_DATA') {
- type = 'rest_data';
- } else if (dataSource && dataSource.type === 'REST_MAP' && dataSource.url) {
- type = 'rest_map';
- } else if (layerType === 'DATAFLOW_POINT_TRACK' || layerType === 'DATAFLOW_HEAT') {
- type = 'dataflow';
- } else if (dataSource && dataSource.type === 'USER_DATA') {
- type = 'user_data';
- }
- return type;
- }
- }, {
- key: "getFeatureProperties",
- value: function getFeatureProperties(features) {
- var properties = [];
- if (features && features.length) {
- features.forEach(function (feature) {
- var property = feature.properties;
- property && properties.push(property);
- });
- }
- return properties;
- }
- }, {
- key: "parseGeoJsonData2Feature",
- value: function parseGeoJsonData2Feature(metaData) {
- var allFeatures = metaData.allDatas.features;
- var features = [];
- for (var i = 0, len = allFeatures.length; i < len; i++) {
- var feature = allFeatures[i];
- var coordinate = feature.geometry.coordinates;
- if (allFeatures[i].geometry.type === 'Point') {
- if (allFeatures[i].properties) {
- allFeatures[i].properties.lon = coordinate[0];
- allFeatures[i].properties.lat = coordinate[1];
- }
- }
- feature.properties['index'] = i + '';
- features.push(feature);
- }
- return features;
- }
- }, {
- key: "_getDataFromIportal",
- value: function _getDataFromIportal(serverId, layerInfo) {
- var _this10 = this;
- var features;
- var url = "".concat(this.serverUrl, "web/datas/").concat(serverId, "/content.json?pageSize=9999999¤tPage=1");
- if (this.accessToken) {
- url = "".concat(url, "&").concat(this.accessKey, "=").concat(this.accessToken);
- }
- return new Promise(function (resolve, reject) {
- var proxy = _this10.handleProxy();
- SuperMap.FetchRequest.get(url, null, {
- withCredentials: _this10.handleWithCredentials(proxy, url, _this10.withCredentials),
- proxy: proxy
- }).then(function (response) {
- return response.json();
- }).then(function (data) {
- return __awaiter(_this10, void 0, void 0,
- /*#__PURE__*/
- _regenerator.default.mark(function _callee2() {
- var _layerInfo$dataSource, divisionType, divisionField, geojson;
- return _regenerator.default.wrap(function _callee2$(_context2) {
- while (1) {
- switch (_context2.prev = _context2.next) {
- case 0:
- if (data.succeed === false) {
- reject(data.error);
- }
- if (!(data && data.type)) {
- _context2.next = 19;
- break;
- }
- if (!(data.type === 'JSON' || data.type === 'GEOJSON')) {
- _context2.next = 7;
- break;
- }
- data.content = JSON.parse(data.content.trim());
- features = this._formatGeoJSON(data.content);
- _context2.next = 18;
- break;
- case 7:
- if (!(data.type === 'EXCEL' || data.type === 'CSV')) {
- _context2.next = 18;
- break;
- }
- if (!(layerInfo.dataSource && layerInfo.dataSource.administrativeInfo)) {
- _context2.next = 17;
- break;
- }
- data.content.rows.unshift(data.content.colTitles);
- _layerInfo$dataSource = layerInfo.dataSource.administrativeInfo, divisionType = _layerInfo$dataSource.divisionType, divisionField = _layerInfo$dataSource.divisionField;
- _context2.next = 13;
- return this._excelData2FeatureByDivision(data.content, divisionType, divisionField);
- case 13:
- geojson = _context2.sent;
- features = this._formatGeoJSON(geojson);
- _context2.next = 18;
- break;
- case 17:
- features = this._excelData2Feature(data.content, layerInfo && layerInfo.xyField || {});
- case 18:
- resolve({
- type: 'feature',
- features: features
- });
- case 19:
- case "end":
- return _context2.stop();
- }
- }
- }, _callee2, this);
- }));
- }).catch(function (error) {
- reject(error);
- });
- });
- }
- }, {
- key: "_getDataFromHosted",
- value: function _getDataFromHosted(_ref) {
- var _this11 = this;
- var layer = _ref.layer,
- serverId = _ref.serverId,
- baseProjection = _ref.baseProjection;
- var isMapService = layer.layerType === 'HOSTED_TILE';
- return new Promise(function (resolve, reject) {
- _this11._checkUploadToRelationship(serverId).then(function (result) {
- if (result && result.length > 0) {
- var datasetName = result[0].name,
- featureType = result[0].type.toUpperCase();
- _this11._getDataService(serverId, datasetName).then(function (data) {
- var dataItemServices = data.dataItemServices;
- if (dataItemServices.length === 0) {
- reject('noDataServices');
- }
- var param = {
- layer: layer,
- dataItemServices: dataItemServices,
- datasetName: datasetName,
- featureType: featureType,
- resolve: resolve,
- reject: reject,
- baseProjection: baseProjection
- };
- if (isMapService) {
- var dataService = dataItemServices.filter(function (info) {
- return info && info.serviceType === 'RESTDATA';
- })[0];
- _this11._isMvt(dataService.address, datasetName, baseProjection).then(function (info) {
- _this11._getServiceInfoFromLayer(param, info);
- }).catch(function () {
- _this11._getServiceInfoFromLayer(param);
- });
- } else {
- _this11._getServiceInfoFromLayer(param);
- }
- });
- } else {
- reject('resultIsEmpty');
- }
- }).catch(function (error) {
- reject(error);
- });
- });
- }
- }, {
- key: "_isMvt",
- value: function _isMvt(serviceUrl, datasetName, baseProjection) {
- return this._getDatasetsInfo(serviceUrl, datasetName).then(function (info) {
- if (info.epsgCode == baseProjection.split('EPSG:')[1]) {
- return SuperMap.FetchRequest.get("".concat(info.url, "/tilefeature.mvt")).then(function (response) {
- return response.json();
- }).then(function (result) {
- info.isMvt = result.error && result.error.code === 400;
- return info;
- }).catch(function () {
- return info;
- });
- }
- return info;
- });
- }
- }, {
- key: "_getServiceInfoFromLayer",
- value: function _getServiceInfoFromLayer(_ref2, info) {
- var _this12 = this;
- var layer = _ref2.layer,
- dataItemServices = _ref2.dataItemServices,
- datasetName = _ref2.datasetName,
- featureType = _ref2.featureType,
- resolve = _ref2.resolve,
- reject = _ref2.reject,
- baseProjection = _ref2.baseProjection;
- var isMapService = info ? !info.isMvt : layer.layerType === 'HOSTED_TILE',
- isAdded = false;
- dataItemServices.forEach(function (service, index) {
- if (isAdded) {
- return;
- }
- if (service && isMapService && service.serviceType === 'RESTMAP') {
- isAdded = true;
- _this12._getTileLayerInfo(service.address, baseProjection).then(function (restMaps) {
- resolve({
- type: 'restMap',
- restMaps: restMaps
- });
- });
- } else if (service && !isMapService && service.serviceType === 'RESTDATA') {
- if (info && info.isMvt) {
- resolve({
- type: 'mvt',
- info: info,
- featureType: featureType
- });
- } else {
- isAdded = true;
- _this12._getDatasources(service.address).then(function (datasourceName) {
- layer.dataSource.dataSourceName = datasourceName + ':' + datasetName;
- layer.dataSource.url = "".concat(service.address, "/data");
- _this12._getFeatureBySQL(layer.dataSource.url, [layer.dataSource.dataSourceName || layer.name], function (result) {
- var features = _this12.parseGeoJsonData2Feature({
- allDatas: {
- features: result.result.features.features
- }
- });
- resolve({
- type: 'feature',
- features: features
- });
- }, function (err) {
- reject(err);
- });
- }, function (err) {
- reject(err);
- });
- }
- }
- }, this);
- if (!isAdded) {
- reject('noService');
- }
- }
- }, {
- key: "_getDatasetsInfo",
- value: function _getDatasetsInfo(serviceUrl, datasetName) {
- var _this13 = this;
- return this._getDatasources(serviceUrl).then(function (datasourceName) {
- var url = "".concat(serviceUrl, "/data/datasources/").concat(datasourceName, "/datasets/").concat(datasetName);
- var proxy = _this13.handleProxy();
- return SuperMap.FetchRequest.get(url, null, {
- withCredentials: _this13.handleWithCredentials(proxy, url, false),
- proxy: proxy
- }).then(function (response) {
- return response.json();
- }).then(function (datasetsInfo) {
- return {
- epsgCode: datasetsInfo.datasetInfo.prjCoordSys.epsgCode,
- bounds: datasetsInfo.datasetInfo.bounds,
- datasourceName: datasourceName,
- datasetName: datasetName,
- url: url
- };
- });
- });
- }
- }, {
- key: "_getDatasources",
- value: function _getDatasources(url) {
- var proxy = this.handleProxy();
- var serviceUrl = "".concat(url, "/data/datasources.json");
- return SuperMap.FetchRequest.get(serviceUrl, null, {
- withCredentials: this.handleWithCredentials(proxy, serviceUrl, false),
- proxy: proxy
- }).then(function (response) {
- return response.json();
- }).then(function (datasource) {
- if (datasource.code === 401) {
- throw Error(datasource.errorMsg);
- }
- var datasourceNames = datasource.datasourceNames;
- return datasourceNames[0];
- });
- }
- }, {
- key: "_getDataService",
- value: function _getDataService(fileId, datasetName) {
- var proxy = this.handleProxy();
- var serviceUrl = "".concat(this.serverUrl, "web/datas/").concat(fileId, ".json");
- return SuperMap.FetchRequest.get(serviceUrl, null, {
- withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
- proxy: proxy
- }).then(function (response) {
- return response.json();
- }).then(function (result) {
- result.fileId = fileId;
- result.datasetName = datasetName;
- return result;
- });
- }
- }, {
- key: "_checkUploadToRelationship",
- value: function _checkUploadToRelationship(fileId) {
- var proxy = this.handleProxy();
- var serviceUrl = "".concat(this.serverUrl, "web/datas/").concat(fileId, "/datasets.json");
- return SuperMap.FetchRequest.get(serviceUrl, null, {
- withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
- proxy: proxy
- }).then(function (response) {
- return response.json();
- }).then(function (result) {
- return result;
- });
- }
- }, {
- key: "_handleMapUrl",
- value: function _handleMapUrl() {
- var mapUrl = this.serverUrl + 'web/maps/' + this.mapId + '/map';
- if (this.accessToken || this.accessKey) {
- mapUrl += true ? 'token=' + this.accessToken : undefined;
- }
- var filter = 'getUrlResource.json?url=';
- if (this.excludePortalProxyUrl && this.serverUrl.indexOf(filter) > -1) {
- var urlArray = this.serverUrl.split(filter);
- if (urlArray.length > 1) {
- mapUrl = urlArray[0] + filter + this.serverUrl + 'web/maps/' + this.mapId + '/map.json';
- }
- }
- mapUrl = mapUrl.indexOf('.json') === -1 ? "".concat(mapUrl, ".json") : mapUrl;
- return mapUrl;
- }
- }, {
- key: "handleProxy",
- value: function handleProxy(type) {
- if (!this.proxy) {
- return null;
- }
- var proxySuffix = this.proxyOptions[type || 'data'];
- var proxy = this.serverUrl + proxySuffix;
- if (typeof this.proxy === 'string') {
- proxy = this.proxy;
- }
- return proxy;
- }
- }, {
- key: "handleWithCredentials",
- value: function handleWithCredentials(proxyUrl, serviceUrl) {
- var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.withCredentials;
- if (proxyUrl && proxyUrl.startsWith(this.serverUrl) && (!serviceUrl || serviceUrl.startsWith(proxyUrl))) {
- return true;
- }
- if (serviceUrl && this.iportalServiceProxyUrl && serviceUrl.indexOf(this.iportalServiceProxyUrl) >= 0) {
- return true;
- }
- return defaultValue;
- }
- }, {
- key: "_formatGeoJSON",
- value: function _formatGeoJSON(data) {
- var features = data.features;
- features.forEach(function (row, index) {
- row.properties['index'] = index;
- });
- return features;
- }
- }, {
- key: "_excelData2Feature",
- value: function _excelData2Feature(dataContent) {
- var xyField = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var fieldCaptions = dataContent.colTitles;
- var xfieldIndex = fieldCaptions.indexOf(xyField.xField);
- var yfieldIndex = fieldCaptions.indexOf(xyField.yField);
- if (yfieldIndex < 0 || xfieldIndex < 0) {
- for (var i = 0, len = fieldCaptions.length; i < len; i++) {
- if ((0, _util.isXField)(fieldCaptions[i])) {
- xfieldIndex = i;
- }
- if ((0, _util.isYField)(fieldCaptions[i])) {
- yfieldIndex = i;
- }
- }
- }
- var features = [];
- for (var _i = 0, _len = dataContent.rows.length; _i < _len; _i++) {
- var row = dataContent.rows[_i];
- var x = Number(row[xfieldIndex]);
- var y = Number(row[yfieldIndex]);
- var attributes = {};
- for (var index in dataContent.colTitles) {
- var key = dataContent.colTitles[index];
- attributes[key] = dataContent.rows[_i][index];
- }
- attributes['index'] = _i + '';
- var feature = {
- type: 'Feature',
- geometry: {
- type: 'Point',
- coordinates: [x, y]
- },
- properties: attributes
- };
- features.push(feature);
- }
- return features;
- }
- }, {
- key: "_excelData2FeatureByDivision",
- value: function _excelData2FeatureByDivision(content, divisionType, divisionField) {
- var _this14 = this;
- var dataName = ['城市', 'City'].includes(divisionType) ? 'MunicipalData' : 'ProvinceData';
- if (window[dataName] && window[dataName].features) {
- return new Promise(function (resolve) {
- resolve(_this14._combineFeature(content, window[dataName], divisionField));
- });
- }
- var dataFileName = ['城市', 'City'].includes(divisionType) ? 'MunicipalData.js' : 'ProvincialData.js';
- var proxy = this.handleProxy();
- var dataUrl = "".concat(this.serverUrl, "apps/dataviz/libs/administrative_data/").concat(dataFileName);
- return SuperMap.FetchRequest.get(dataUrl, null, {
- withCredentials: this.handleWithCredentials(proxy, dataUrl, this.withCredentials),
- proxy: proxy,
- withoutFormatSuffix: true
- }).then(function (response) {
- return response.text();
- }).then(function (result) {
- new Function(result)();
- return _this14._combineFeature(content, window[dataName], divisionField);
- });
- }
- }, {
- key: "_combineFeature",
- value: function _combineFeature(properties, geoData, divisionField) {
- var _this15 = this;
- var geojson = {
- type: 'FeatureCollection',
- features: []
- };
- if (properties.length < 2) {
- return geojson;
- }
- var titles = properties.colTitles,
- rows = properties.rows,
- fieldIndex = titles.findIndex(function (title) {
- return title === divisionField;
- });
- rows.forEach(function (row) {
- var feature = geoData.features.find(function (item, index) {
- return _this15._isMatchAdministrativeName(item.properties.Name, row[fieldIndex]);
- });
- if (feature) {
- var combineFeature = {
- properties: {},
- geometry: feature.geometry,
- type: 'Feature'
- };
- row.forEach(function (item, idx) {
- combineFeature.properties[titles[idx]] = item;
- });
- geojson.features.push(combineFeature);
- }
- });
- return geojson;
- }
- }, {
- key: "_isMatchAdministrativeName",
- value: function _isMatchAdministrativeName(featureName, fieldName) {
- if (featureName && typeof fieldName === 'string' && fieldName.constructor === String) {
- var shortName = featureName.substr(0, 2);
- if (shortName === '张家') {
- shortName = featureName.substr(0, 3);
- }
- if (shortName === '阿拉') {
- shortName = featureName.substr(0, 3);
- }
- return !!fieldName.startsWith(shortName);
- }
- return false;
- }
- }, {
- key: "_getTileLayerInfo",
- value: function _getTileLayerInfo(url, baseProjection) {
- var _this16 = this;
- var proxy = this.handleProxy();
- var epsgCode = baseProjection.split('EPSG:')[1];
- var serviceUrl = "".concat(url, "/maps.json");
- return SuperMap.FetchRequest.get(serviceUrl, null, {
- withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
- proxy: proxy
- }).then(function (response) {
- return response.json();
- }).then(function (mapInfo) {
- var promises = [];
- if (mapInfo) {
- mapInfo.forEach(function (info) {
- var promise = SuperMap.FetchRequest.get("".concat(info.path, ".json?prjCoordSys=").concat(JSON.stringify({
- epsgCode: epsgCode
- })), null, {
- withCredentials: _this16.withCredentials,
- proxy: proxy
- }).then(function (response) {
- return response.json();
- }).then(function (restMapInfo) {
- restMapInfo.url = info.path;
- return restMapInfo;
- });
- promises.push(promise);
- });
- }
- return Promise.all(promises).then(function (allRestMaps) {
- return allRestMaps;
- });
- });
- }
- }, {
- key: "_getFeatureBySQL",
- value: function _getFeatureBySQL(url, datasetNames, _processCompleted2, processFaild) {
- var getFeatureParam, getFeatureBySQLService, getFeatureBySQLParams;
- getFeatureParam = new SuperMap.FilterParameter({
- name: datasetNames.join().replace(':', '@'),
- attributeFilter: null
- });
- getFeatureBySQLParams = new SuperMap.GetFeaturesBySQLParameters({
- queryParameter: getFeatureParam,
- datasetNames: datasetNames,
- fromIndex: 0,
- toIndex: -1,
- maxFeatures: -1,
- returnContent: true
- });
- var proxy = this.handleProxy();
- var options = {
- proxy: proxy,
- withCredentials: this.handleWithCredentials(proxy, url, false),
- eventListeners: {
- processCompleted: function processCompleted(getFeaturesEventArgs) {
- _processCompleted2 && _processCompleted2(getFeaturesEventArgs);
- },
- processFailed: function processFailed(e) {
- processFaild && processFaild(e);
- }
- }
- };
- getFeatureBySQLService = new SuperMap.GetFeaturesBySQLService(url, options);
- getFeatureBySQLService.processAsync(getFeatureBySQLParams);
- }
- }]);
- return WebMapService;
- }(_Events2.Events);
- exports.default = WebMapService;
- /***/ }),
- /***/ "f885":
- /***/ (function(module, exports, __webpack_require__) {
- var baseGetTag = __webpack_require__("6704"),
- isObjectLike = __webpack_require__("4b93");
- /** `Object#toString` result references. */
- var symbolTag = '[object Symbol]';
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && baseGetTag(value) == symbolTag);
- }
- module.exports = isSymbol;
- /***/ }),
- /***/ "f8a6":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireWildcard = __webpack_require__("16ed");
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _globalEvent = _interopRequireDefault(__webpack_require__("fb6a"));
- var _epsgDefine = __webpack_require__("1a91");
- var _antDesignVue = __webpack_require__("a587");
- var _lang = __webpack_require__("4e21");
- var _theme = _interopRequireDefault(__webpack_require__("3853"));
- var components = _interopRequireWildcard(__webpack_require__("9903"));
- __webpack_require__("1969");
- var commontypes = _interopRequireWildcard(__webpack_require__("8607"));
- var setTheme = function setTheme() {
- var themeStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- if (typeof themeStyle === 'string') {
- themeStyle = _theme.default.filter(function (item) {
- return item.label === themeStyle;
- })[0] || {};
- }
- _globalEvent.default.$options.theme = themeStyle;
- _globalEvent.default.$emit('change-theme', themeStyle);
- };
- var install = function install(Vue) {
- var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var theme = opts.theme || 'light';
- __webpack_require__("d073")("./".concat(theme, ".scss"));
- __webpack_require__("db36");
- setTheme(theme);
- (0, _epsgDefine.registerProjection)(opts.projections);
- Vue.use(_antDesignVue.Button);
- Vue.use(_antDesignVue.Checkbox);
- Vue.use(_antDesignVue.Card);
- Vue.use(_antDesignVue.Slider);
- Vue.use(_antDesignVue.Select);
- Vue.use(_antDesignVue.Collapse);
- Vue.use(_antDesignVue.Input);
- Vue.use(_antDesignVue.Table);
- Vue.use(_antDesignVue.Progress);
- Vue.use(_antDesignVue.Icon);
- Vue.use(_antDesignVue.Spin);
- Vue.use(_antDesignVue.Modal);
- Vue.use(_antDesignVue.Tree);
- Vue.use(_antDesignVue.Tabs);
- Vue.prototype.$message = _antDesignVue.message;
- (0, _lang.initi18n)(Vue, opts);
- for (var component in components) {
- var com = components[component];
- Vue.component(com.options ? com.options.name : com.name, com);
- }
- };
- if (typeof window !== 'undefined' && window['Vue']) {
- install(window['Vue'], {
- theme: 'light'
- });
- }
- var _default = {
- setTheme: setTheme,
- commontypes: commontypes,
- lang: _lang.lang,
- locale: _lang.setLocale,
- install: install
- };
- exports.default = _default;
- /***/ }),
- /***/ "fb6a":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _vue = _interopRequireDefault(__webpack_require__("5643"));
- var _theme = _interopRequireDefault(__webpack_require__("3853"));
- var _default = new _vue.default({
- theme: _theme.default[1]
- });
- exports.default = _default;
- /***/ }),
- /***/ "fb97":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _regenerator = _interopRequireDefault(__webpack_require__("849c"));
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
- var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
- var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
- var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
- var _leafletWrapper = _interopRequireDefault(__webpack_require__("6f27"));
- __webpack_require__("751d");
- __webpack_require__("3ef3");
- var _center = _interopRequireDefault(__webpack_require__("cf46"));
- var _WebMapBase2 = _interopRequireDefault(__webpack_require__("d6e6"));
- var _epsgDefine = __webpack_require__("1a91");
- var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
- function adopt(value) {
- return value instanceof P ? value : new P(function (resolve) {
- resolve(value);
- });
- }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) {
- try {
- step(generator.next(value));
- } catch (e) {
- reject(e);
- }
- }
- function rejected(value) {
- try {
- step(generator["throw"](value));
- } catch (e) {
- reject(e);
- }
- }
- function step(result) {
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
- }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- var WebMapViewModel =
- /*#__PURE__*/
- function (_WebMapBase) {
- (0, _inherits2.default)(WebMapViewModel, _WebMapBase);
- function WebMapViewModel(id) {
- var _this;
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var mapOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- (0, _classCallCheck2.default)(this, WebMapViewModel);
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(WebMapViewModel).call(this, id, options, mapOptions));
- _this.layers = {};
- _this._dataflowPathIdCache = {};
- _this._dataflowLabelIdCache = {};
- _this._dataflowLineFeatureCache = {};
- _this.center = mapOptions.center;
- _this.zoom = mapOptions.zoom;
- _this._initWebMap();
- return _this;
- }
- (0, _createClass2.default)(WebMapViewModel, [{
- key: "resize",
- value: function resize() {
- this.map && this.map.invalidateSize();
- this.echartsLayerResize();
- }
- }, {
- key: "setCenter",
- value: function setCenter(center) {
- if (this.map) {
- this.mapOptions.center = center;
- center && center.length > 0 && this.map.setView(center, this.zoom);
- }
- }
- }, {
- key: "_initWebMap",
- value: function _initWebMap() {
- this.initWebMap();
- }
- }, {
- key: "_getMapInfo",
- value: function _getMapInfo(mapInfo, _taskID) {
- var layers = mapInfo.layers;
- this._layers = [];
- this._createMap(mapInfo);
- this._initBaseLayer(mapInfo, false);
- if (!layers || layers.length === 0) {
- this._sendMapToUser(0, 0);
- } else {
- this._initOverlayLayers(layers, _taskID);
- }
- }
- }, {
- key: "_createMap",
- value: function _createMap(mapInfo) {
- var _this2 = this;
- if (!mapInfo) {
- this.map = _leafletWrapper.default.map(this.target, {
- center: this.center && this.center.length ? _leafletWrapper.default.latLng(this.center[0], this.center[1]) : [0, 0],
- zoom: this.zoom || 0,
- crs: this.mapOptions.crs || _leafletWrapper.default.CRS.EPSG3857,
- maxZoom: this.mapOptions.maxZoom || 30,
- minZoom: this.mapOptions.minZoom || 0,
- preferCanvas: this.mapOptions.preferCanvas || true
- });
- setTimeout(function () {
- _this2.triggerEvent('addlayerssucceeded', {
- map: _this2.map,
- mapparams: {},
- layers: []
- });
- }, 0);
- return;
- }
- var level = mapInfo.level,
- maxZoom = mapInfo.maxZoom,
- minZoom = mapInfo.minZoom;
- var zoom = level ? level : 0;
- zoom = zoom === 0 ? 0 : zoom;
- var crs = this._handleMapCrs(mapInfo);
- var center = this._getMapCenter(mapInfo);
- this.map = _leafletWrapper.default.map(this.target, {
- center: this.center || center,
- zoom: this.zoom || zoom,
- crs: crs,
- maxZoom: maxZoom || 30,
- minZoom: minZoom || 0,
- preferCanvas: true
- });
- this.triggerEvent('mapinitialized', {
- map: this.map
- });
- }
- }, {
- key: "_initBaseLayer",
- value: function _initBaseLayer(mapInfo) {
- var sendToMap = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
- var layerInfo = mapInfo.baseLayer || mapInfo;
- var layerType = this.getBaseLayerType(layerInfo);
- var mapUrls = this.getMapurls({
- CLOUD: 'http://t2.dituhui.com/FileService/image',
- CLOUD_BLACK: 'http://t3.dituhui.com/MapService/getGdp',
- OSM: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
- });
- var url;
- var layer;
- switch (layerType) {
- case 'TIANDITU':
- layer = this._createTiandituLayer(layerInfo);
- break;
- case 'BING':
- layer = this._createBingLayer();
- break;
- case 'WMS':
- layer = this._createWMSLayer(layerInfo);
- break;
- case 'WMTS':
- layer = this._createWMTSLayer(layerInfo);
- break;
- case 'TILE':
- layer = this._createDynamicTiledLayer(layerInfo);
- break;
- case 'CLOUD':
- url = mapUrls[layerInfo.layerType];
- layer = this._createCLOUDLayer(layerType, url);
- break;
- case 'XYZ':
- url = mapUrls[layerInfo.layerType];
- layer = this._createXYZLayer(url);
- break;
- case 'BAIDU':
- layer = this._createBaiduTileLayer();
- break;
- case 'MAPBOXSTYLE':
- this.triggerEvent('notsupportmvt', {});
- break;
- default:
- break;
- }
- layer && this._addLayerToMap({
- layer: layer,
- type: 'baseLayers',
- layerInfo: layerInfo,
- sendToMap: sendToMap
- });
- }
- }, {
- key: "_initOverlayLayers",
- value: function _initOverlayLayers(layers, _taskID) {
- var _this3 = this;
- this._layers = layers;
- this.layerAdded = 0;
- this.expectLayerLen = layers.length;
- if (this.expectLayerLen > 0) {
- layers.forEach(function (layer, index) {
- var type = _this3.webMapService.getDatasourceType(layer);
- if (type === 'SAMPLE_DATA') {
- _this3._addLayerSucceeded();
- _this3.triggerEvent('getlayerdatasourcefailed', {
- error: 'SAMPLE DATA is not supported',
- layer: layer,
- map: _this3.map
- });
- return;
- }
- layer.layerID = layer.name + '-' + index;
- layer.index = index;
- if (type === 'tile') {
- _this3._initBaseLayer(layer);
- } else {
- _this3.getLayerFeatures(layer, _taskID, type);
- }
- }, this);
- }
- }
- }, {
- key: "_createMvtLayer",
- value: function _createMvtLayer(info, layer, featureType) {
- this._addLayerSucceeded();
- return;
- }
- }, {
- key: "_createRestMapLayer",
- value: function _createRestMapLayer(restMaps, layer) {
- var _this4 = this;
- restMaps.forEach(function (restMapInfo, index) {
- layer = _this4.getRestMapLayerInfo(restMapInfo, layer);
- _this4._initBaseLayer(layer, index === restMaps.length - 1);
- });
- }
- }, {
- key: "_initOverlayLayer",
- value: function _initOverlayLayer(layerInfo, features) {
- return __awaiter(this, void 0, void 0,
- /*#__PURE__*/
- _regenerator.default.mark(function _callee() {
- var layerType, style, filterCondition, featureType, labelStyle, projection, epsgCode, layer, labelLayerInfo, labelLayer;
- return _regenerator.default.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _context.prev = 0;
- layerType = layerInfo.layerType, style = layerInfo.style, filterCondition = layerInfo.filterCondition, featureType = layerInfo.featureType, labelStyle = layerInfo.labelStyle, projection = layerInfo.projection;
- if (!(layerType === 'restMap')) {
- _context.next = 5;
- break;
- }
- this._createRestMapLayer(features, layerInfo);
- return _context.abrupt("return");
- case 5:
- if (!(layerType === 'mvt')) {
- _context.next = 8;
- break;
- }
- this._createMvtLayer(features.info, layerInfo, features.featureType);
- return _context.abrupt("return");
- case 8:
- if (!(features && projection && projection !== 'EPSG:4326')) {
- _context.next = 14;
- break;
- }
- epsgCode = projection.split(':')[1];
- if (epsgCode) {
- _context.next = 12;
- break;
- }
- return _context.abrupt("return");
- case 12:
- this._unprojectCrs = this.getTransformCoodinatesCRS(projection.split(":")[1]);
- features = this.transformFeatures(features);
- case 14:
- features = this.handleLayerFeatures(features, layerInfo);
- _context.t0 = layerType;
- _context.next = _context.t0 === 'VECTOR' ? 18 : _context.t0 === 'UNIQUE' ? 34 : _context.t0 === 'RANGE' ? 38 : _context.t0 === 'HEAT' ? 42 : _context.t0 === 'MARKER' ? 46 : _context.t0 === 'RANK_SYMBOL' ? 50 : _context.t0 === 'MIGRATION' ? 54 : _context.t0 === 'DATAFLOW_POINT_TRACK' ? 58 : _context.t0 === 'DATAFLOW_HEAT' ? 58 : 62;
- break;
- case 18:
- if (!(featureType === 'POINT')) {
- _context.next = 30;
- break;
- }
- if (!(style.type === 'SYMBOL_POINT')) {
- _context.next = 25;
- break;
- }
- _context.next = 22;
- return this._createSymbolLayer(layerInfo, features);
- case 22:
- layer = _context.sent;
- _context.next = 28;
- break;
- case 25:
- _context.next = 27;
- return this._createGraphicLayer(layerInfo, features);
- case 27:
- layer = _context.sent;
- case 28:
- _context.next = 33;
- break;
- case 30:
- _context.next = 32;
- return this._createVectorLayer(layerInfo, features);
- case 32:
- layer = _context.sent;
- case 33:
- return _context.abrupt("break", 62);
- case 34:
- _context.next = 36;
- return this._createUniqueLayer(layerInfo, features);
- case 36:
- layer = _context.sent;
- return _context.abrupt("break", 62);
- case 38:
- _context.next = 40;
- return this._createRangeLayer(layerInfo, features);
- case 40:
- layer = _context.sent;
- return _context.abrupt("break", 62);
- case 42:
- _context.next = 44;
- return this._createHeatLayer(layerInfo, features);
- case 44:
- layer = _context.sent;
- return _context.abrupt("break", 62);
- case 46:
- _context.next = 48;
- return this._createMarkerLayer(features);
- case 48:
- layer = _context.sent;
- return _context.abrupt("break", 62);
- case 50:
- _context.next = 52;
- return this._createRankSymbolLayer(layerInfo, features);
- case 52:
- layer = _context.sent;
- return _context.abrupt("break", 62);
- case 54:
- _context.next = 56;
- return this._createMigrationLayer(layerInfo, features);
- case 56:
- layer = _context.sent;
- return _context.abrupt("break", 62);
- case 58:
- _context.next = 60;
- return this._createDataflowLayer(layerInfo);
- case 60:
- layer = _context.sent;
- return _context.abrupt("break", 62);
- case 62:
- if (labelStyle && labelStyle.labelField && layerType !== 'DATAFLOW_POINT_TRACK') {
- features = this.getFilterFeatures(filterCondition, features);
- labelLayerInfo = JSON.parse(JSON.stringify(layerInfo));
- labelLayer = this._addLabelLayer(labelLayerInfo, features);
- this._addLayerToMap({
- layer: _leafletWrapper.default.layerGroup([layer, labelLayer]),
- layerInfo: layerInfo
- });
- } else {
- layer && this._addLayerToMap({
- layer: layer,
- layerInfo: layerInfo
- });
- }
- _context.next = 70;
- break;
- case 65:
- _context.prev = 65;
- _context.t1 = _context["catch"](0);
- console.error(_context.t1);
- this._addLayerSucceeded();
- this.triggerEvent('getlayerdatasourcefailed', {
- error: _context.t1,
- layer: layerInfo,
- map: this.map
- });
- case 70:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this, [[0, 65]]);
- }));
- }
- }, {
- key: "_createBingLayer",
- value: function _createBingLayer() {
- var url = 'https://dynamic.t0.tiles.ditu.live.com/comp/ch/{quadKey}?it=G,TW,L,LA&mkt=zh-cn&og=109&cstl=w4c&ur=CN&n=z';
- _leafletWrapper.default.TileLayer.BingLayer = _leafletWrapper.default.TileLayer.extend({
- getTileUrl: function getTileUrl(coordinates) {
- var z = coordinates.z,
- x = coordinates.x,
- y = coordinates.y;
- var index = '';
- for (var i = z; i > 0; i--) {
- var b = 0;
- var mask = 1 << i - 1;
- if ((x & mask) !== 0) {
- b++;
- }
- if ((y & mask) !== 0) {
- b += 2;
- }
- index += b.toString();
- }
- return url.replace('{quadKey}', index);
- }
- });
- _leafletWrapper.default.tileLayer.bingLayer = function (url, options) {
- return new _leafletWrapper.default.TileLayer.BingLayer(url, options);
- };
- return _leafletWrapper.default.tileLayer.bingLayer(url, {
- noWrap: true
- });
- }
- }, {
- key: "_createDynamicTiledLayer",
- value: function _createDynamicTiledLayer(layerInfo) {
- var url = layerInfo.url;
- var layer = _leafletWrapper.default.supermap.tiledMapLayer(url, {
- noWrap: true,
- prjCoordSys: {
- epsgCode: this.baseProjection.split(':')[1]
- }
- });
- return layer;
- }
- }, {
- key: "_createWMSLayer",
- value: function _createWMSLayer(layerInfo) {
- var url = layerInfo.url,
- layers = layerInfo.layers;
- if (!layers || layers === 'undefined' || layers === 'null') {
- layers = '0';
- } else if (layers.length > 0) {
- layers = layers[0];
- }
- return _leafletWrapper.default.tileLayer.wms(url, {
- layers: layers,
- format: 'image/png',
- transparent: true,
- noWrap: true
- });
- }
- }, {
- key: "_createWMTSLayer",
- value: function _createWMTSLayer(layerInfo) {
- var url = layerInfo.url,
- tileMatrixSet = layerInfo.tileMatrixSet,
- name = layerInfo.name;
- return _leafletWrapper.default.supermap.wmtsLayer(url, {
- layer: name,
- style: 'default',
- tilematrixSet: tileMatrixSet,
- format: 'image/png',
- noWrap: true
- });
- }
- }, {
- key: "_createTiandituLayer",
- value: function _createTiandituLayer(layerInfo) {
- this.map.getZoom() < 1 && this.map.setZoom(1);
- this.map.setMinZoom(1);
- var layerType = layerInfo.layerType.split('_')[1].toLowerCase();
- var isLabel = Boolean(layerInfo.labelLayerVisible);
- var tiandituLayer = _leafletWrapper.default.supermap.tiandituTileLayer({
- layerType: layerType,
- key: this.tiandituKey
- });
- var tiandituLabelLayer = _leafletWrapper.default.supermap.tiandituTileLayer({
- layerType: layerType,
- isLabel: true,
- key: this.tiandituKey
- });
- var layers = [tiandituLayer];
- isLabel && layers.push(tiandituLabelLayer);
- return _leafletWrapper.default.layerGroup(layers);
- }
- }, {
- key: "_createCLOUDLayer",
- value: function _createCLOUDLayer(layerType, url) {
- if (layerType === 'CLOUD') {
- this.map.getZoom() < 3 && this.map.setZoom(3);
- this.map.setMinZoom(3);
- }
- return _leafletWrapper.default.supermap.cloudTileLayer(url, {
- noWrap: true
- });
- }
- }, {
- key: "_createXYZLayer",
- value: function _createXYZLayer(url) {
- return _leafletWrapper.default.tileLayer(url, {
- noWrap: true
- });
- }
- }, {
- key: "_createBaiduTileLayer",
- value: function _createBaiduTileLayer() {
- this.map.getZoom() < 3 && this.map.setZoom(3);
- this.map.setMinZoom(3);
- return _leafletWrapper.default.supermap.baiduTileLayer('', {
- noWrap: true
- });
- }
- }, {
- key: "_createUniqueLayer",
- value: function _createUniqueLayer(layerInfo, features) {
- return this._createThemeLayer('unique', layerInfo, features);
- }
- }, {
- key: "_createRangeLayer",
- value: function _createRangeLayer(layerInfo, features) {
- return this._createThemeLayer('range', layerInfo, features);
- }
- }, {
- key: "_createMarkerLayer",
- value: function _createMarkerLayer(features) {
- var _this5 = this;
- return new Promise(function (resolve, reject) {
- var layerGroupPromises = features && features.map(function (feature) {
- return new Promise(function (resolve, reject) {
- var geomType = feature.geometry.type.toUpperCase();
- var defaultStyle = feature.dv_v5_markerStyle;
- if (geomType === 'POINT' && defaultStyle.text) {
- geomType = 'TEXT';
- }
- var featureInfo = _this5.setFeatureInfo(feature);
- feature.properties['useStyle'] = defaultStyle;
- feature.properties['featureInfo'] = featureInfo;
- if (geomType === 'POINT' && defaultStyle.src && defaultStyle.src.indexOf('http://') === -1 && defaultStyle.src.indexOf('https://') === -1) {
- defaultStyle.src = _this5.serverUrl + defaultStyle.src;
- }
- var imgWidth = (defaultStyle.imgWidth || 48) * defaultStyle.scale;
- var imgHeight = (defaultStyle.imgHeight || 43) * defaultStyle.scale;
- if (geomType === 'POINT' && defaultStyle.src && defaultStyle.src.indexOf('svg') <= -1) {
- resolve(_leafletWrapper.default.marker([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], {
- icon: _leafletWrapper.default.icon({
- iconUrl: defaultStyle.src,
- iconSize: [imgWidth, imgHeight],
- iconAnchor: [imgWidth * defaultStyle.anchor[0], imgHeight * defaultStyle.anchor[1]]
- })
- }));
- }
- if (geomType === 'POINT' && defaultStyle.src && defaultStyle.src.indexOf('svg') > -1) {
- if (!_this5._svgDiv) {
- _this5._svgDiv = document.createElement('div');
- document.body.appendChild(_this5._svgDiv);
- }
- _this5.getCanvasFromSVG(defaultStyle.src, _this5._svgDiv, function (canvas) {
- resolve(_this5._getSvgLayer(canvas, defaultStyle, [feature]));
- });
- }
- if (!defaultStyle.src) {
- if (geomType === 'LINESTRING' && defaultStyle.lineCap || geomType === 'POLYGON') {
- resolve(_this5._createGeojsonLayer([feature], _this5._getVectorLayerStyle(defaultStyle)));
- } else if (geomType === 'TEXT') {
- var text = new _leafletWrapper.default.supermap.labelThemeLayer(defaultStyle.text + '-text');
- text.style = {
- fontSize: defaultStyle.font.split(' ')[0],
- labelRect: true,
- fontColor: defaultStyle.fillColor,
- fill: true,
- fillColor: defaultStyle.backgroundFill,
- stroke: false
- };
- text.themeField = 'text';
- feature.properties.text = defaultStyle.text;
- var geoTextFeature = new _leafletWrapper.default.supermap.themeFeature([feature.geometry.coordinates[1], feature.geometry.coordinates[0], defaultStyle.text], feature.properties);
- text.addFeatures([geoTextFeature]);
- resolve(text);
- } else {
- resolve(_leafletWrapper.default.circleMarker([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], Object.assign({}, _this5._getVectorLayerStyle(defaultStyle))));
- }
- }
- });
- });
- layerGroupPromises && Promise.all(layerGroupPromises).then(function (layerGroup) {
- layerGroup && resolve(_leafletWrapper.default.layerGroup(layerGroup));
- }).catch(function (error) {
- console.error(error);
- });
- });
- }
- }, {
- key: "_createRankSymbolLayer",
- value: function _createRankSymbolLayer(layerInfo, features) {
- var _this6 = this;
- var fieldName = layerInfo.themeSetting.themeField;
- var style = layerInfo.style;
- var styleSource = this.createRankStyleSource(layerInfo, features);
- var styleGroups = styleSource.styleGroups;
- features = this.getFilterFeatures(layerInfo.filterCondition, features);
- var radiusList = [];
- features.forEach(function (row) {
- var target = parseFloat(row.properties[fieldName]);
- if (styleGroups) {
- for (var i = 0; i < styleGroups.length; i++) {
- if (styleGroups[i].start <= target && target < styleGroups[i].end) {
- var radius = style.type === 'SYMBOL_POINT' || style.type === 'IMAGE_POINT' ? style.type === 'SYMBOL_POINT' ? styleGroups[i].radius * 2 : styleGroups[i].radius : styleGroups[i].radius;
- radiusList.push(radius);
- }
- }
- }
- }, this);
- if (style.type === 'SYMBOL_POINT') {
- return this._createSymbolLayer(layerInfo, features, radiusList);
- } else if (style.type === 'IMAGE_POINT' || style.type === 'SVG_POINT') {
- return this._createGraphicLayer(layerInfo, features, radiusList);
- } else {
- var layerGroup = [];
- features.forEach(function (feature, index) {
- var newStyle = Object.assign({}, style, {
- radius: radiusList[index]
- });
- layerGroup.push(_leafletWrapper.default.circleMarker([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], _this6._getVectorLayerStyle(newStyle)));
- });
- return _leafletWrapper.default.layerGroup(layerGroup);
- }
- }
- }, {
- key: "_addLabelLayer",
- value: function _addLabelLayer(layerInfo, features) {
- var labelStyle = layerInfo.labelStyle,
- layerID = layerInfo.layerID,
- featureType = layerInfo.featureType;
- var label = new _leafletWrapper.default.supermap.labelThemeLayer(layerID + '-label');
- labelStyle.fontSize = 14;
- labelStyle.labelRect = true;
- labelStyle.fontColor = labelStyle.fill;
- labelStyle.fill = true;
- labelStyle.fillColor = '#FFFFFF';
- labelStyle.stroke = false;
- labelStyle.strokeColor = '#8B7B8B';
- label.style = labelStyle;
- label.themeField = labelStyle.labelField;
- var labelFeatures = this._convertLabelFeatures(label, features, layerInfo, featureType);
- label.addFeatures(labelFeatures);
- return label;
- }
- }, {
- key: "_createHeatLayer",
- value: function _createHeatLayer(layerInfo, features) {
- var themeSetting = layerInfo.themeSetting,
- layerID = layerInfo.layerID;
- var colors = themeSetting.colors,
- radius = themeSetting.radius,
- customSettings = themeSetting.customSettings,
- weight = themeSetting.weight;
- var heatColors = colors.slice();
- for (var i in customSettings) {
- heatColors[i] = customSettings[i];
- }
- var heatMapLayer = _leafletWrapper.default.supermap.heatMapLayer(layerID, {
- colors: heatColors,
- map: this.map,
- radius: radius * 2,
- featureWeight: weight,
- blur: radius * 1.5
- });
- heatMapLayer.addFeatures({
- type: 'FeatureCollection',
- features: features
- });
- return heatMapLayer;
- }
- }, {
- key: "_createSymbolLayer",
- value: function _createSymbolLayer(layerInfo, features, textSize) {
- var style = layerInfo.style;
- var unicode = style.unicode;
- var pointToLayer;
- if (unicode) {
- pointToLayer = this._getSymbolPointLayer(style, textSize);
- }
- return pointToLayer && this._createGeojsonLayer(features, null, pointToLayer);
- }
- }, {
- key: "_createGraphicLayer",
- value: function _createGraphicLayer(layerInfo, features, textSize) {
- var _this7 = this;
- return new Promise(function (resolve, reject) {
- var style = layerInfo.style;
- var type = style.type,
- imageInfo = style.imageInfo,
- radius = style.radius,
- url = style.url;
- var pointToLayer;
- if (type === 'IMAGE_POINT' && imageInfo.url) {
- var resolution = imageInfo.size.w / imageInfo.size.h;
- pointToLayer = function pointToLayer(geojson, latlng) {
- var iconSize = textSize && textSize[geojson.id - 1 || geojson.properties.index] * 2;
- return _leafletWrapper.default.marker(latlng, {
- icon: _leafletWrapper.default.icon({
- iconUrl: imageInfo.url,
- iconSize: textSize ? [iconSize, iconSize / resolution] : [radius * 2, radius * 2 / resolution]
- })
- });
- };
- } else if (type === 'SVG_POINT') {
- if (!_this7._svgDiv) {
- _this7._svgDiv = document.createElement('div');
- document.body.appendChild(_this7._svgDiv);
- }
- _this7.getCanvasFromSVG(url, _this7._svgDiv, function (canvas) {
- resolve(_this7._getSvgLayer(canvas, style, features, textSize));
- });
- } else {
- pointToLayer = function pointToLayer(geojson, latlng) {
- return _leafletWrapper.default.circleMarker(latlng, _this7._getVectorLayerStyle(style));
- };
- }
- pointToLayer && resolve(_this7._createGeojsonLayer(features, null, pointToLayer));
- });
- }
- }, {
- key: "_createVectorLayer",
- value: function _createVectorLayer(layerInfo, features) {
- var style = layerInfo.style;
- return this._createGeojsonLayer(features, this._getVectorLayerStyle(style));
- }
- }, {
- key: "_createMigrationLayer",
- value: function _createMigrationLayer(layerInfo, features) {
- var options = this.getEchartsLayerOptions(layerInfo, features, 'leaflet');
- var layer = _leafletWrapper.default.supermap.echartsLayer(options);
- this.echartslayer.push(layer);
- return layer;
- }
- }, {
- key: "_createDataflowLayer",
- value: function _createDataflowLayer(layerInfo) {
- var _this8 = this;
- this._dataflowFeatureCache = {};
- return new Promise(function (resolve, reject) {
- _this8._getDataflowPointLayer(layerInfo).then(function (pointToLayer) {
- var dataFlowLayer = _leafletWrapper.default.supermap.dataFlowLayer(layerInfo.wsUrl, {
- pointToLayer: pointToLayer
- });
- _this8._updateDataFlowFeaturesCallback = _this8._updateDataFlowFeature.bind(_this8, layerInfo);
- dataFlowLayer.on('dataupdated', _this8._updateDataFlowFeaturesCallback);
- _this8._dataFlowLayer = dataFlowLayer;
- resolve(dataFlowLayer);
- });
- });
- }
- }, {
- key: "_createGeojsonLayer",
- value: function _createGeojsonLayer(features, style, pointToLayer) {
- return _leafletWrapper.default.geoJSON({
- type: 'FeatureCollection',
- features: features
- }, {
- pointToLayer: pointToLayer,
- style: style
- });
- }
- }, {
- key: "_getVectorLayerStyle",
- value: function _getVectorLayerStyle(style) {
- var fillColor = style.fillColor,
- fillOpacity = style.fillOpacity,
- strokeColor = style.strokeColor,
- strokeOpacity = style.strokeOpacity,
- strokeWidth = style.strokeWidth,
- radius = style.radius,
- lineDash = style.lineDash;
- var commonStyle = {
- color: strokeColor,
- weight: strokeWidth,
- opacity: strokeOpacity,
- fillColor: fillColor,
- fillOpacity: fillOpacity
- };
- var dashArray;
- if (lineDash) {
- dashArray = this.getDashStyle(lineDash, strokeWidth, 'string');
- }
- radius && (commonStyle['radius'] = radius);
- lineDash && (commonStyle['dashArray'] = dashArray);
- return commonStyle;
- }
- }, {
- key: "_getMapCenter",
- value: function _getMapCenter(mapInfo) {
- var center;
- center = mapInfo.center && [mapInfo.center.x, mapInfo.center.y];
- if (!center) {
- center = [0, 0];
- }
- center = this.baseProjection === 'EPSG:3857' ? this.crs.unproject(_leafletWrapper.default.point(center[0], center[1])) : _leafletWrapper.default.latLng(center[1], center[0]);
- return center;
- }
- }, {
- key: "_sendMapToUser",
- value: function _sendMapToUser(count, layersLen) {
- if (count === layersLen) {
- this.triggerEvent('addlayerssucceeded', {
- map: this.map,
- mapparams: this.mapParams,
- layers: this._layers
- });
- }
- }
- }, {
- key: "_addLayerToMap",
- value: function _addLayerToMap(_ref) {
- var layer = _ref.layer,
- _ref$type = _ref.type,
- type = _ref$type === void 0 ? 'overlays' : _ref$type,
- layerInfo = _ref.layerInfo,
- _ref$sendToMap = _ref.sendToMap,
- sendToMap = _ref$sendToMap === void 0 ? true : _ref$sendToMap;
- var visible = layerInfo.visible,
- layerID = layerInfo.layerID,
- name = layerInfo.name,
- index = layerInfo.index;
- sendToMap && (type = 'overlays');
- type === 'overlays' && layer.setZIndex && layer.setZIndex(index + 1);
- if (visible === undefined || visible) {
- this.map.addLayer(layer, layerInfo.name);
- }
- !this.layers[type] && (this.layers[type] = {});
- this.layers[type][layerID || name] = layer;
- this._addLayerSucceeded(sendToMap);
- }
- }, {
- key: "_convertLabelFeatures",
- value: function _convertLabelFeatures(layer, features, layerInfo, featureType) {
- var _this9 = this;
- if (!features) {
- return [];
- }
- var themeField = layer.themeField,
- style = layer.style;
- var labelFeatures = [];
- var layerStyle = layerInfo.style || {};
- features.forEach(function (feature) {
- var coordinate = _this9._getLabelLngLat(featureType, feature);
- _this9._setLabelOffset(featureType, layerStyle, style);
- var properties = feature.properties;
- var geoTextFeature = new _leafletWrapper.default.supermap.themeFeature([coordinate[1], coordinate[0], properties[themeField]], properties);
- labelFeatures.push(geoTextFeature);
- });
- return labelFeatures;
- }
- }, {
- key: "_getLabelLngLat",
- value: function _getLabelLngLat(featureType, feature) {
- var coordinate;
- var coordinates = feature.geometry.coordinates;
- if (featureType === 'POINT') {
- coordinate = coordinates;
- } else if (featureType === 'LINE') {
- var length = coordinates.length;
- coordinate = coordinates[Math.round(length / 2)];
- } else {
- coordinate = (0, _center.default)(feature).geometry.coordinates;
- }
- return coordinate;
- }
- }, {
- key: "_setLabelOffset",
- value: function _setLabelOffset(featureType, layerStyle, style) {
- if (featureType === 'POINT') {
- var pointRadius = layerStyle.pointRadius || 0;
- var strokeWidth = layerStyle.strokeWidth || 0;
- var fontSize = parseInt(layerStyle.fontSize) || 0;
- style.labelXOffset = 0;
- style.labelYOffset = layerStyle.unicode ? 20 + fontSize : 25 + (pointRadius + strokeWidth);
- } else {
- return;
- }
- }
- }, {
- key: "_addLayerSucceeded",
- value: function _addLayerSucceeded() {
- var sendMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
- if (sendMap) {
- this.layerAdded++;
- this._sendMapToUser(this.layerAdded, this.expectLayerLen);
- }
- }
- }, {
- key: "_unproject",
- value: function _unproject(coordinate) {
- var crs = this._unprojectCrs || _leafletWrapper.default.CRS.EPSG3857;
- return this._latlngToCoordinate(crs.unproject(_leafletWrapper.default.point(coordinate[0], coordinate[1])));
- }
- }, {
- key: "_latlngToCoordinate",
- value: function _latlngToCoordinate(latlng) {
- if (!latlng) {
- return null;
- }
- return [latlng.lng, latlng.lat];
- }
- }, {
- key: "_getSvgLayer",
- value: function _getSvgLayer(canvas, style, features, textSize) {
- var svgPointToLayer = this._getSvgPointLayer(canvas, style, textSize);
- return this._createGeojsonLayer(features, null, svgPointToLayer);
- }
- }, {
- key: "_createThemeLayer",
- value: function _createThemeLayer(type, layerInfo, features) {
- var filterCondition = layerInfo.filterCondition,
- style = layerInfo.style,
- themeSetting = layerInfo.themeSetting,
- featureType = layerInfo.featureType,
- layerID = layerInfo.layerID;
- var layerStyle = JSON.parse(JSON.stringify(style));
- featureType === 'POINT' && (layerStyle.pointRadius = style.radius);
- delete layerStyle.radius;
- if (featureType === 'LINE') {
- layerStyle.fill = false;
- layerStyle.strokeDashstyle = style.lineDash;
- delete layerStyle.lineDash;
- }
- var styleGroup;
- if (type === 'unique') {
- styleGroup = this.getUniqueStyleGroup(layerInfo, features);
- } else if (type === 'range') {
- styleGroup = this.getRangeStyleGroup(layerInfo, features);
- }
- filterCondition && (features = this.getFilterFeatures(filterCondition, features));
- var themeField = themeSetting.themeField;
- Object.keys(features[0].properties).forEach(function (key) {
- key.toLocaleUpperCase() === themeField.toLocaleUpperCase() && (themeField = key);
- });
- var layer = _leafletWrapper.default.supermap["".concat(type, "ThemeLayer")](layerID);
- layerStyle.stroke = true;
- layer.style = layerStyle;
- layer.themeField = themeField;
- layer.styleGroups = styleGroup;
- layer.addFeatures({
- type: 'FeatureCollection',
- features: features
- });
- return layer;
- }
- }, {
- key: "_handleMapCrs",
- value: function _handleMapCrs(mapInfo) {
- var projection = mapInfo.projection,
- baseLayer = mapInfo.baseLayer,
- extent = mapInfo.extent;
- this.baseProjection = projection;
- if (projection === 'EPSG:910111' || projection === 'EPSG:910112') {
- this.baseProjection = 'EPSG:3857';
- } else if (projection === 'EPSG:910101' || projection === 'EPSG:910102') {
- this.baseProjection = 'EPSG:4326';
- }
- if (baseLayer.layerType === 'BAIDU') {
- this.crs = _leafletWrapper.default.CRS.Baidu;
- return this.crs;
- }
- if (baseLayer.layerType.indexOf('TIANDITU') > -1) {
- this.crs = this.baseProjection === 'EPSG:3857' ? _leafletWrapper.default.CRS.TianDiTu_Mercator : _leafletWrapper.default.CRS.TianDiTu_WGS84;
- return this.crs;
- }
- var epsgCode = this.baseProjection.split(':')[1];
- var bounds = _leafletWrapper.default.bounds([extent.leftBottom.x, extent.leftBottom.y], [extent.rightTop.x, extent.rightTop.y]);
- if (['4326', '3857', '3395'].includes(epsgCode)) {
- this.crs = _leafletWrapper.default.Proj.CRS("EPSG:".concat(epsgCode), {
- bounds: bounds
- });
- } else if (parseFloat(epsgCode) < 0) {
- this.crs = new _leafletWrapper.default.CRS.NonEarthCRS({
- bounds: bounds
- });
- } else if (!epsgCode) {
- this.baseProjection = (0, _epsgDefine.toEpsgCode)(this.baseProjection);
- if (this.baseProjection) {
- this.crs = _leafletWrapper.default.Proj.CRS(this.baseProjection, {
- bounds: bounds,
- def: mapInfo.projection
- });
- }
- }
- return this.crs;
- }
- }, {
- key: "_updateDataFlowFeature",
- value: function _updateDataFlowFeature(layerInfo, e) {
- if (layerInfo.visible) {
- var feature = e.data;
- var lineStyle = layerInfo.lineStyle,
- labelStyle = layerInfo.labelStyle;
- lineStyle && this._updateDataflowPathLayer(feature, layerInfo);
- labelStyle && labelStyle.labelField !== '未设置' && this._updateDataflowLabelLayer(feature, layerInfo);
- }
- }
- }, {
- key: "_getSymbolPointLayer",
- value: function _getSymbolPointLayer(style, textSize) {
- var symbolStyle = JSON.parse(JSON.stringify(style));
- symbolStyle.fontColor = style.fillColor;
- symbolStyle.label = style.unicode;
- symbolStyle.fontFamily = 'supermapol-icons';
- var pointToLayer = function pointToLayer(geojson, latlng) {
- textSize && (symbolStyle.fontSize = textSize[geojson.id - 1 || geojson.properties.index] + 'px');
- return new _leafletWrapper.default.supermap.unicodeMarker(latlng, symbolStyle);
- };
- return pointToLayer;
- }
- }, {
- key: "_getSvgPointLayer",
- value: function _getSvgPointLayer(canvas, style, textSize) {
- var radius = style.radius;
- this.handleSvgColor(style, canvas);
- var imgUrl = canvas.toDataURL('img/png');
- var resolution = canvas.width / canvas.height;
- var svgPointToLayer = function svgPointToLayer(geojson, latlng) {
- var iconSize = textSize && textSize[geojson.id - 1 || geojson.properties.index];
- return _leafletWrapper.default.marker(latlng, {
- icon: _leafletWrapper.default.icon({
- iconUrl: imgUrl,
- iconSize: textSize ? [iconSize, iconSize / resolution] : [radius, radius / resolution]
- })
- });
- };
- return svgPointToLayer;
- }
- }, {
- key: "_getDataflowPointLayer",
- value: function _getDataflowPointLayer(layerInfo) {
- var _this10 = this;
- var layerType = layerInfo.layerType,
- pointStyle = layerInfo.pointStyle,
- layerID = layerInfo.layerID,
- themeSetting = layerInfo.themeSetting;
- return new Promise(function (resolve, reject) {
- if (layerType === 'DATAFLOW_HEAT') {
- var colors = themeSetting.colors,
- radius = themeSetting.radius,
- customSettings = themeSetting.customSettings,
- weight = themeSetting.weight;
- var heatLayerInfo = {
- layerID: layerID,
- themeSetting: {
- colors: colors,
- radius: radius,
- customSettings: customSettings,
- weight: weight
- }
- };
- var pointToLayer = function pointToLayer(geojson, latlng) {
- return _this10._createHeatLayer(heatLayerInfo, [geojson]);
- };
- resolve(pointToLayer);
- } else if ('SYMBOL_POINT' === pointStyle.type) {
- resolve(_this10._getSymbolPointLayer(pointStyle, null));
- } else if ('SVG_POINT' === pointStyle.type) {
- if (!_this10._svgDiv) {
- _this10._svgDiv = document.createElement('div');
- document.body.appendChild(_this10._svgDiv);
- }
- _this10.getCanvasFromSVG(pointStyle.url, _this10._svgDiv, function (canvas) {
- resolve(_this10._getSvgPointLayer(canvas, pointStyle, null));
- });
- } else {
- var _pointToLayer = function _pointToLayer(geojson, latlng) {
- return _leafletWrapper.default.circleMarker(latlng, _this10._getVectorLayerStyle(pointStyle));
- };
- resolve(_pointToLayer);
- }
- });
- }
- }, {
- key: "_handleDataflowFeature",
- value: function _handleDataflowFeature(feature, layerInfo) {
- var identifyField = layerInfo.identifyField,
- maxPointCount = layerInfo.maxPointCount,
- lineStyle = layerInfo.lineStyle;
- var geoID = feature.properties[identifyField];
- if (lineStyle) {
- if (this._dataflowLineFeatureCache[geoID]) {
- var coordinates = this._dataflowLineFeatureCache[geoID].geometry.coordinates;
- coordinates.push(feature.geometry.coordinates);
- if (maxPointCount && coordinates.length > maxPointCount) {
- coordinates.splice(0, coordinates.length - maxPointCount);
- }
- this._dataflowLineFeatureCache[geoID].geometry.coordinates = coordinates;
- } else {
- this._dataflowLineFeatureCache[geoID] = {
- type: 'Feature',
- properties: feature.properties,
- geometry: {
- type: 'LineString',
- coordinates: [feature.geometry.coordinates]
- }
- };
- }
- }
- this._dataflowFeatureCache[geoID] = feature;
- }
- }, {
- key: "_updateDataflowLabelLayer",
- value: function _updateDataflowLabelLayer(feature, layerInfo) {
- this._handleDataflowFeature(feature, layerInfo);
- var geoID = feature.properties[layerInfo.identifyField];
- var layer;
- if (this._dataflowLabelIdCache[geoID]) {
- layer = this._dataFlowLayer.getLayer(this._dataflowLabelIdCache[geoID]);
- var _feature = this._dataflowFeatureCache[geoID];
- var geoTextFeature = new _leafletWrapper.default.supermap.themeFeature([_feature.geometry.coordinates[1], _feature.geometry.coordinates[0], geoID], _feature.properties);
- layer.removeAllFeatures();
- layer.addFeatures([geoTextFeature]);
- } else {
- var _feature2 = this._dataflowFeatureCache[geoID];
- layer = this._addLabelLayer(layerInfo, [_feature2]);
- this._dataFlowLayer.addLayer(layer);
- this._dataflowLabelIdCache[geoID] = this._dataFlowLayer.getLayerId(layer);
- }
- }
- }, {
- key: "_updateDataflowPathLayer",
- value: function _updateDataflowPathLayer(feature, layerInfo) {
- this._handleDataflowFeature(feature, layerInfo);
- var geoID = feature.properties[layerInfo.identifyField];
- var layer;
- var coordinates = this._dataflowLineFeatureCache[geoID].geometry.coordinates;
- var latlngs = _leafletWrapper.default.GeoJSON.coordsToLatLngs(coordinates, 0);
- if (this._dataflowPathIdCache[geoID]) {
- layer = this._dataFlowLayer.getLayer(this._dataflowPathIdCache[geoID]);
- layer.setLatLngs(latlngs);
- } else {
- layer = _leafletWrapper.default.polyline(latlngs, Object.assign({}, this._getVectorLayerStyle(layerInfo.lineStyle)));
- this._dataFlowLayer.addLayer(layer);
- this._dataflowPathIdCache[geoID] = this._dataFlowLayer.getLayerId(layer);
- }
- }
- }, {
- key: "getTransformCoodinatesCRS",
- value: function getTransformCoodinatesCRS(epsgCode) {
- var defName = "EPSG:".concat(epsgCode);
- var defValue = (0, _epsgDefine.getProjection)(defName);
- return _leafletWrapper.default.Proj.CRS((0, _epsgDefine.toEpsgCode)(defValue), {
- def: defValue
- });
- }
- }, {
- key: "cleanWebMap",
- value: function cleanWebMap() {
- if (this.map) {
- this.map.remove();
- this.center = null;
- this.zoom = null;
- this._dataFlowLayer.off('dataupdated', this._updateDataFlowFeaturesCallback);
- this._unprojectCrs = null;
- }
- }
- }]);
- return WebMapViewModel;
- }(_WebMapBase2.default);
- exports.default = WebMapViewModel;
- /***/ }),
- /***/ "fc3a":
- /***/ (function(module, exports, __webpack_require__) {
- /*jslint node:true */
- var xml2js = __webpack_require__("98c2");
- var xml2json = __webpack_require__("2f96");
- var js2xml = __webpack_require__("c365");
- var json2xml = __webpack_require__("5e45");
- module.exports = {
- xml2js: xml2js,
- xml2json: xml2json,
- js2xml: js2xml,
- json2xml: json2xml
- };
- /***/ }),
- /***/ "fd74":
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII="
- /***/ }),
- /***/ "fe04":
- /***/ (function(module, exports) {
- if (typeof Object.create === 'function') {
- // implementation from standard node.js 'util' module
- module.exports = function inherits(ctor, superCtor) {
- if (superCtor) {
- ctor.super_ = superCtor
- ctor.prototype = Object.create(superCtor.prototype, {
- constructor: {
- value: ctor,
- enumerable: false,
- writable: true,
- configurable: true
- }
- })
- }
- };
- } else {
- // old school shim for old browsers
- module.exports = function inherits(ctor, superCtor) {
- if (superCtor) {
- ctor.super_ = superCtor
- var TempCtor = function () {}
- TempCtor.prototype = superCtor.prototype
- ctor.prototype = new TempCtor()
- ctor.prototype.constructor = ctor
- }
- }
- }
- /***/ }),
- /***/ "fe5a":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.Event = void 0;
- var _Util = __webpack_require__("1a9e");
- /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
- * This program are made available under the terms of the Apache License, Version 2.0
- * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */
- var Event = {
- /**
- * @description A hash table cache of the event observers. Keyed by element._eventCacheID
- * @type {boolean}
- * @default false
- */
- observers: false,
- /**
- * @description KEY_SPACE
- * @type {number}
- * @default 32
- */
- KEY_SPACE: 32,
- /**
- * @description KEY_BACKSPACE
- * @type {number}
- * @default 8
- */
- KEY_BACKSPACE: 8,
- /**
- * @description KEY_TAB
- * @type {number}
- * @default 9
- */
- KEY_TAB: 9,
- /**
- * @description KEY_RETURN
- * @type {number}
- * @default 13
- */
- KEY_RETURN: 13,
- /**
- * @description KEY_ESC
- * @type {number}
- * @default 27
- */
- KEY_ESC: 27,
- /**
- * @description KEY_LEFT
- * @type {number}
- * @default 37
- */
- KEY_LEFT: 37,
- /**
- * @description KEY_UP
- * @type {number}
- * @default 38
- */
- KEY_UP: 38,
- /**
- * @description KEY_RIGHT
- * @type {number}
- * @default 39
- */
- KEY_RIGHT: 39,
- /**
- * @description KEY_DOWN
- * @type {number}
- * @default 40
- */
- KEY_DOWN: 40,
- /**
- * @description KEY_DELETE
- * @type {number}
- * @default 46
- */
- KEY_DELETE: 46,
- /**
- * @description Cross browser event element detection.
- * @param {Event} event - The event
- * @returns {HTMLElement} The element that caused the event
- */
- element: function element(event) {
- return event.target || event.srcElement;
- },
- /**
- * @description Determine whether event was caused by a single touch
- * @param {Event} event - The event
- * @returns {boolean}
- */
- isSingleTouch: function isSingleTouch(event) {
- return event.touches && event.touches.length === 1;
- },
- /**
- * @description Determine whether event was caused by a multi touch
- * @param {Event} event - The event
- * @returns {boolean}
- */
- isMultiTouch: function isMultiTouch(event) {
- return event.touches && event.touches.length > 1;
- },
- /**
- * @description Determine whether event was caused by a left click.
- * @param {Event} event - The event
- * @returns {boolean}
- */
- isLeftClick: function isLeftClick(event) {
- return event.which && event.which === 1 || event.button && event.button === 1;
- },
- /**
- * @description Determine whether event was caused by a right mouse click.
- * @param {Event} event - The event
- * @returns {boolean}
- */
- isRightClick: function isRightClick(event) {
- return event.which && event.which === 3 || event.button && event.button === 2;
- },
- /**
- * @description Stops an event from propagating.
- * @param {boolean} allowDefault - If true, we stop the event chain but still allow the default browser behaviour (text selection, radio-button clicking, etc) Default false
- */
- stop: function stop(event, allowDefault) {
- if (!allowDefault) {
- if (event.preventDefault) {
- event.preventDefault();
- } else {
- event.returnValue = false;
- }
- }
- if (event.stopPropagation) {
- event.stopPropagation();
- } else {
- event.cancelBubble = true;
- }
- },
- /**
- * @param {string} tagName - html 标签名。
- * @returns {HTMLElement} The first node with the given tagName, starting from the node the event was triggered on and traversing the DOM upwards
- */
- findElement: function findElement(event, tagName) {
- var element = Event.element(event);
- while (element.parentNode && (!element.tagName || element.tagName.toUpperCase() !== tagName.toUpperCase())) {
- element = element.parentNode;
- }
- return element;
- },
- /**
- * @description 监听事件,注册事件处理方法。
- * @param {(HTMLElement|string)} elementParam - 待监听的 DOM 对象或者其 ID 标识。
- * @param {string} name - 监听事件的类别名称。
- * @param {function} observer - 注册的事件处理方法。
- * @param {boolean} [useCapture=false] - 是否捕获。
- */
- observe: function observe(elementParam, name, observer, useCapture) {
- var element = _Util.Util.getElement(elementParam);
- useCapture = useCapture || false;
- if (name === 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.attachEvent)) {
- name = 'keydown';
- }
- if (!this.observers) {
- this.observers = {};
- }
- if (!element._eventCacheID) {
- var idPrefix = 'eventCacheID_';
- if (element.id) {
- idPrefix = element.id + '_' + idPrefix;
- }
- element._eventCacheID = _Util.Util.createUniqueID(idPrefix);
- }
- var cacheID = element._eventCacheID;
- if (!this.observers[cacheID]) {
- this.observers[cacheID] = [];
- }
- this.observers[cacheID].push({
- element: element,
- name: name,
- observer: observer,
- useCapture: useCapture
- });
- if (element.addEventListener) {
- if (name === 'mousewheel') {
- // https://www.chromestatus.com/features/6662647093133312
- element.addEventListener(name, observer, {
- useCapture: useCapture,
- passive: false
- });
- } else {
- element.addEventListener(name, observer, useCapture);
- }
- } else if (element.attachEvent) {
- element.attachEvent('on' + name, observer);
- }
- },
- /**
- * @description Given the id of an element to stop observing, cycle through the
- * element's cached observers, calling stopObserving on each one,
- * skipping those entries which can no longer be removed.
- *
- * @param {(HTMLElement|string)} elementParam -
- */
- stopObservingElement: function stopObservingElement(elementParam) {
- var element = _Util.Util.getElement(elementParam);
- var cacheID = element._eventCacheID;
- this._removeElementObservers(Event.observers[cacheID]);
- },
- /**
- * @param {Array.<Object>} elementObservers - Array of (element, name,
- * observer, usecapture) objects,
- * taken directly from hashtable
- */
- _removeElementObservers: function _removeElementObservers(elementObservers) {
- if (elementObservers) {
- for (var i = elementObservers.length - 1; i >= 0; i--) {
- var entry = elementObservers[i];
- var args = [entry.element, entry.name, entry.observer, entry.useCapture];
- Event.stopObserving.apply(this, args);
- }
- }
- },
- /**
- * @description 移除事件监听和注册的事件处理方法。注意:事件的移除和监听相对应,移除时的各属性信息必须监听时
- * 保持一致才能确保事件移除成功。
- * @param {(HTMLElement|string)} elementParam - 被监听的 DOM 元素或者其 ID。
- * @param {string} name - 需要移除的被监听事件名称。
- * @param {function} observer - 需要移除的事件处理方法。
- * @param {boolean} [useCapture=false] - 是否捕获。
- * @returns {boolean} Whether or not the event observer was removed
- */
- stopObserving: function stopObserving(elementParam, name, observer, useCapture) {
- useCapture = useCapture || false;
- var element = _Util.Util.getElement(elementParam);
- var cacheID = element._eventCacheID;
- if (name === 'keypress') {
- if (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.detachEvent) {
- name = 'keydown';
- }
- } // find element's entry in this.observers cache and remove it
- var foundEntry = false;
- var elementObservers = Event.observers[cacheID];
- if (elementObservers) {
- // find the specific event type in the element's list
- var i = 0;
- while (!foundEntry && i < elementObservers.length) {
- var cacheEntry = elementObservers[i];
- if (cacheEntry.name === name && cacheEntry.observer === observer && cacheEntry.useCapture === useCapture) {
- elementObservers.splice(i, 1);
- if (elementObservers.length === 0) {
- delete Event.observers[cacheID];
- }
- foundEntry = true;
- break;
- }
- i++;
- }
- } // actually remove the event listener from browser
- if (foundEntry) {
- if (element.removeEventListener) {
- element.removeEventListener(name, observer, useCapture);
- } else if (element && element.detachEvent) {
- element.detachEvent('on' + name, observer);
- }
- }
- return foundEntry;
- },
- /**
- * @description Cycle through all the element entries in the events cache and call
- * stopObservingElement on each.
- */
- unloadCache: function unloadCache() {
- // created
- if (Event && Event.observers) {
- for (var cacheID in Event.observers) {
- var elementObservers = Event.observers[cacheID];
- Event._removeElementObservers.apply(this, [elementObservers]);
- }
- Event.observers = false;
- }
- },
- CLASS_NAME: 'Event'
- };
- /* prevent memory leaks in IE */
- exports.Event = Event;
- Event.observe(window, 'unload', Event.unloadCache, false);
- /***/ }),
- /***/ "ff4e":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _interopRequireDefault = __webpack_require__("8e6d");
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
- var _lang = __webpack_require__("4e21");
- var RestDataParameter = function RestDataParameter(options) {
- (0, _classCallCheck2.default)(this, RestDataParameter);
- this.type = 'iServer';
- this.url = options.url;
- this.dataName = options.dataName;
- this.attributeFilter = options.attributeFilter || null;
- this.maxFeatures = options.maxFeatures || 20;
- this.name = options.name || (0, _lang.geti18n)().t('commontypes.restData');
- this.proxy = options.proxy;
- };
- exports.default = RestDataParameter;
- /***/ })
- /******/ })["default"];
- });
|