text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[29],{"/Gwn":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("KSwd"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},"2SDg":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderMarkerComponent=t.getPropValue=t.MarkerAllProps=t.MarkerConfigurableProps=void 0;var o=n("7LDH"),r=n("q1tI"),i=s(r),a=n("i8i4"),u=n("eB3W"),l=s(u);function s(e){return e&&e.__esModule?e:{default:e}}var c=t.MarkerConfigurableProps=["position","offset","icon","content","draggable","visible","zIndex","angle","animation","shadow","title","clickable","extData","label"],f=t.MarkerAllProps=c.concat(["topWhenClick","bubble","raiseOnDrag","cursor","autoRotation","shape"]);t.getPropValue=function(e,t){return-1===f.indexOf(e)?null:"position"===e?(0,o.toLnglat)(t):"offset"===e?(0,o.toPixel)(t):t},t.renderMarkerComponent=function(e,t){var n=e;if((0,l.default)(e)){var o=t.getExtData();n=e(o)}n&&(0,a.render)(i.default.createElement("div",null,n),t.getContent())}},"6NGk":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("q1tI"),i=c(r),a=n("79gr"),u=c(a),l=n("pLQl"),s=c(l);function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function d(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(e){f(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return"undefined"!==typeof window&&(e.__map__?(n.map=e.__map__,n.loadToolInstance().then((function(){n.props.onInstanceCreated&&n.props.onInstanceCreated()}))):s.default.warning("MAP_INSTANCE_REQUIRED")),n}return d(t,e),o(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"loadToolInstance",value:function(){var e=this;return new Promise((function(t){e.map.plugin(["AMap.MouseTool"],(function(){e.tool=new window.AMap.MouseTool(e.map),t()}))}))}},{key:"render",value:function(){return null}},{key:"instance",get:function(){return this.tool}}]),t}(i.default.Component);t.default=(0,u.default)(h)},"6VVw":function(e,t,n){},"79gr":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n("q1tI"),a=s(i),u=n("rk/D"),l=s(u);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function p(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function d(e){return function(t){function n(e){c(this,n);var t=f(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.instanceCreated=!1,t.myMapComponent=null,t.registeredEvents=[],t.onInstanceCreated=t.onInstanceCreated.bind(t),t}return p(n,t),r(n,[{key:"onInstanceCreated",value:function(){if(this.instanceCreated=!0,"events"in this.props){var e=this.myMapComponent.instance;this.props.events.created&&this.props.events.created(e)}this.reactivePropChange(this.props,!1)}},{key:"createEventsProxy",value:function(e){var t=this,n=this.myMapComponent.instance,o=Object.keys(e.events||{});o.length&&o.forEach((function(e){-1===t.registeredEvents.indexOf(e)&&(t.registeredEvents.push(e),n.on(e,function(e){return function(){if(t.props.events&&e in t.props.events){for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];t.props.events[e].apply(null,o)}}}(e)))}))}},{key:"componentWillReceiveProps",value:function(e){this.reactivePropChange(e,!0)}},{key:"reactivePropChange",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.instanceCreated)return!1;var o=this.myMapComponent,r=o.setterMap,i=void 0===r?{}:r,a=o.converterMap,u=void 0===a?{}:a,s=o.instance,c=void 0===s?{}:s,f=Object.keys(e);f.length&&f.forEach((function(o){if("events"===o)return t.createEventsProxy(e);var r=!0;if(n&&(r=t.detectPropChange(o,e,t.props)),!r)return!1;var a=e[o];if(o in u&&(a=u[o](e[o])),o in i)i[o](a);else{var s="set"+(0,l.default)(o);s in c&&c[s](a)}}))}},{key:"detectPropChange",value:function(e,t,n){return t[e]!==n[e]}},{key:"render",value:function(){var t=this;return a.default.createElement(e,o({onInstanceCreated:this.onInstanceCreated,ref:function(e){t.myMapComponent=e}},this.props))}},{key:"componentWillUnmount",value:function(){var e=this.myMapComponent.instance;e&&("destroy"in e&&setTimeout((function(){e.destroy()}),10),"hide"in e&&e.hide(),"__map__"in this.props&&"setMap"in e&&e.setMap(null))}}]),n}(a.default.Component)}t.default=d},"7DBZ":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MouseTool=t.Marker=t.GroundImage=t.InfoWindow=t.PolyEditor=t.Polyline=t.Polygon=t.CircleEditor=t.Circle=t.Markers=t.Map=void 0;var o=n("IENb"),r=P(o),i=n("VAeg"),a=P(i),u=n("YEbH"),l=P(u),s=n("g4Dz"),c=P(s),f=n("mHyM"),p=P(f),d=n("sC/+"),h=P(d),v=n("ooyC"),m=P(v),y=n("EnLi"),_=P(y),g=n("fqIc"),b=P(g),w=n("ZCYf"),k=P(w),M=n("6NGk"),C=P(M);function P(e){return e&&e.__esModule?e:{default:e}}t.Map=r.default,t.Markers=l.default,t.Circle=c.default,t.CircleEditor=b.default,t.Polygon=p.default,t.Polyline=h.default,t.PolyEditor=k.default,t.InfoWindow=m.default,t.GroundImage=_.default,t.Marker=a.default,t.MouseTool=C.default,t.default={Map:r.default,Markers:l.default,Circle:c.default,CircleEditor:b.default,Polygon:p.default,Polyline:h.default,PolyEditor:k.default,InfoWindow:m.default,GroundImage:_.default,Marker:a.default,MouseTool:C.default}},"7LDH":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="undefined"!==typeof window,r=t.toLnglat=function(e){if(!e)return e;if("getLng"in e&&"getLat"in e)return e;var t=0,n=0;return"[object Array]"==={}.toString.call(e)?(t=e[0],n=e[1]):"lng"in e&&"lat"in e?(t=e.lng,n=e.lat):"longitude"in e&&"latitude"in e&&(t=e.longitude,n=e.latitude),o?new window.AMap.LngLat(t,n):null},i=t.toPixel=function(e){if(!e)return e;if("getX"in e&&"getY"in e)return e;var t=0,n=0;return"[object Array]"==={}.toString.call(e)?(t=e[0],n=e[1]):"x"in e&&"y"in e&&(t=e.x,n=e.y),o?new window.AMap.Pixel(t,n):null},a=t.toSize=function(e){return e?"getWidth"in e?e:o?new window.AMap.Size(e.width,e.height):null:e};t.default={toLnglat:r,toPixel:i,toSize:a}},EnLi:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("q1tI"),i=c(r),a=n("79gr"),u=c(a),l=n("pLQl"),s=c(l);function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function d(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h={clickable:!1,opacity:1,visible:!0},v=function(e){function t(e){f(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){e?o.image&&o.image.show():o.image&&o.image.hide()},src:function(e){o.image.setImageUrl(e)}},n.converterMap={bounds:function(e){return o.buildBounds(e)}},n.map=e.__map__,n.element=n.map.getContainer(),setTimeout((function(){n.createGroundImage(e)}),13)}else s.default.warning("MAP_INSTANCE_REQUIRED");return n}return d(t,e),o(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"checkPropsChanged",value:function(e,t){return this.props[t]!==e[t]}},{key:"createGroundImage",value:function(e){var t=void 0,n=void 0,o=void 0,r=void 0;"src"in e?t=e.src:s.default.warning("SRC_REQUIRED",!0),"bounds"in e?n=this.buildBounds(e.bounds):s.default.warning("BOUNDS_REQUIRED",!0),r="clickable"in e?e.clickable:h.clickable,o="opacity"in e?e.opacity:h.opacity,this.image=new window.AMap.GroundImage(t,n,{map:this.map,clickable:r,opacity:o}),this.props.onInstanceCreated&&this.props.onInstanceCreated()}},{key:"buildBounds",value:function(e){if(!e)return e;if("getSouthWest"in e)return e;var t=new window.AMap.Bounds(new window.AMap.LngLat(e.sw.longitude,e.sw.latitude),new window.AMap.LngLat(e.ne.longitude,e.ne.latitude));return t}},{key:"render",value:function(){return null}},{key:"instance",get:function(){return this.image}}]),t}(i.default.Component);t.default=(0,u.default)(v)},Fb8p:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("pSd8"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},GGQb:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("QbLZ"),r=f(o),i=n("qw8e"),a=f(i),u=n("pwzk"),l=f(u),s=n("WK0O"),c=f(s);function f(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)({Base:a.default},l.default,{Wrapper:c.default}),e.exports=t["default"]},IENb:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n("q1tI"),a=m(i),u=n("M0Q7"),l=m(u),s=n("eB3W"),c=m(s),f=n("pLQl"),p=m(f),d=n("7LDH"),h=n("79gr"),v=m(h);function m(e){return e&&e.__esModule?e:{default:e}}function y(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function b(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var w=a.default.Component,k=a.default.Children,M={width:"100%",height:"100%"},C={width:"100%",height:"100%",position:"relative"},P=["layers","zoom","center","labelzIndex","mapStyle","features","cursor","pitch"],O=["animateEnable","doubleClickZoom","dragEnable","isHotspot","jogEnable","keyboardEnable","resizeEnable","rotateEnable","scrollWheel","touchZoom","zoomEnable"],E=["view","zooms","showIndoorMap","indoorMap","expandZoomRange","showBuildingBlock","viewMode","pitchEnable","buildingAnimation","skyColor"],I=P.concat(O,E),j={MapType:{showRoad:!1,showTraffic:!1,defaultType:0},ToolBar:{position:"RB",noIpLocate:!0,locate:!0,liteStyle:!0,autoPosition:!1},OverView:{},ControlBar:{}},N=function(e){function t(e){_(this,t);var n=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.state={mapLoaded:!1};var o=n;return n.setterMap={zoom:function(e){o.map.setZoom(e)},cursor:function(e){o.map.setDefaultCursor(e)},labelzIndex:function(e){o.map.setlabelzIndex(e)}},n.converterMap={center:d.toLnglat},"undefined"!==typeof window&&(n.pluginMap={},new l.default({key:e.amapkey,useAMapUI:e.useAMapUI,version:e.version,protocol:e.protocol}).load().then((function(){n.createInstance(),n.state.mapLoaded||n.setState({mapLoaded:!0})}))),n}return b(t,e),r(t,[{key:"componentWillReceiveProps",value:function(e){this.state.mapLoaded&&this.updateMapProps(this.props,e)}},{key:"renderChildren",value:function(){var e=this;return k.map(this.props.children,(function(t){if(t){var n=t.type;return n.preventAmap||"string"===typeof n?t:a.default.cloneElement(t,{__map__:e.map})}return t}))}},{key:"createInstance",value:function(){if(!this.map){var e=this.buildCreateOptions();this.map=new window.AMap.Map(this.mapWrapper,e),this.setPlugins(this.props),this.props.onInstanceCreated&&this.props.onInstanceCreated()}}},{key:"buildCreateOptions",value:function(){var e=this,t=this.props,n={};return I.forEach((function(o){o in t&&(n[o]=e.getSetterValue(o,t))})),n}},{key:"updateMapProps",value:function(e,t){var n=this,o={},r=!1,i=!1;O.forEach((function(a){a in t&&(i=!0,n.detectPropChanged(a,e,t)&&(r=!0,o[a]=t[a]))})),r&&this.map.setStatus(o),i&&"status"in t&&p.default.warning("\u4ee5\u4e0b\u8fd9\u4e9b\u5c5e\u6027\u53ef\u4ee5\u5355\u72ec\u63d0\u4f9b\u8fdb\u884c\u914d\u7f6e\uff0c\u4e5f\u53ef\u4ee5\u7edf\u4e00\u4f5c\u4e3a\u2018status\u2019\u5c5e\u6027\u914d\u7f6e\uff1b\u4f46\u662f\u8bf7\u4e0d\u8981\u540c\u65f6\u4f7f\u7528\u8fd9\u4e24\u79cd\u65b9\u5f0f\u3002\n\uff08"+O.join(", ")+"\uff09"),E.forEach((function(o){o in t&&n.detectPropChanged(o,e,t)&&p.default.warning("'"+o+"' \u662f\u4e00\u4e2a\u9759\u6001\u5c5e\u6027\uff0c\u5730\u56fe\u5b9e\u4f8b\u521b\u5efa\u6210\u529f\u540e\u65e0\u6cd5\u4fee\u6539")})),this.setPlugins(t)}},{key:"getSetterValue",value:function(e,t){return e in this.converterMap?this.converterMap[e](t[e]):t[e]}},{key:"detectPropChanged",value:function(e,t,n){return t[e]!==n[e]}},{key:"setPlugins",value:function(e){var t=this,n=["Scale","ToolBar","MapType","OverView","ControlBar"];if("plugins"in e){var o=e.plugins;o&&o.length&&o.forEach((function(e){var o=void 0,r=void 0,i=void 0;"string"===typeof e?(o=e,r=null,i=!0):(o=e.name,r=e.options||{},i=!("visible"in r)||"boolean"!==typeof r.visible||r.visible,delete r.visible);var a=n.indexOf(o);-1===a?p.default.warning("\u6ca1\u6709 \u2018"+o+"\u2019 \u8fd9\u4e2a\u63d2\u4ef6\uff0c\u8bf7\u68c0\u67e5\u662f\u5426\u62fc\u5199\u9519\u8bef"):i&&(n.splice(a,1),t.installPlugin(o,r))}))}this.removeOrDisablePlugins(n)}},{key:"removeOrDisablePlugins",value:function(e){var t=this;e&&e.length&&e.forEach((function(e){e in t.pluginMap&&("ControlBar"===e?(t.map.removeControl(t.pluginMap[e]),delete t.pluginMap[e]):t.pluginMap[e].hide())}))}},{key:"installPlugin",value:function(e,t){switch(t=t||{},e){case"Scale":case"ToolBar":case"OverView":case"MapType":this.setMapPlugin(e,t);break;case"ControlBar":this.setControlBar(t);break;default:}}},{key:"setMapPlugin",value:function(e,t){var n=this;if(this.pluginMap[e])this.pluginMap[e].show();else{var r=t.onCreated,i=y(t,["onCreated"]),a=o({},j[e],i);this.map.plugin(["AMap."+e],(function(){n.pluginMap[e]=new window.AMap[e](a),n.map.addControl(n.pluginMap[e]),(0,c.default)(r)&&r(n.pluginMap[e])}))}}},{key:"setControlBar",value:function(e){var t=this;if(this.pluginMap.ControlBar);else{var n=e.onCreated,r=y(e,["onCreated"]),i=o({},j.ControlBar,r);this.map.plugin(["AMap.ControlBar"],(function(){t.pluginMap.ControlBar=new window.AMap.ControlBar(i),t.map.addControl(t.pluginMap.ControlBar),(0,c.default)(n)&&n(t.pluginMap.ControlBar)}))}}},{key:"render",value:function(){var e=this;return a.default.createElement("div",{style:C},a.default.createElement("div",{ref:function(t){e.mapWrapper=t},style:M},this.state.mapLoaded?null:this.props.loading||null),a.default.createElement("div",null,this.state.mapLoaded?this.renderChildren():null))}},{key:"instance",get:function(){return this.map}}]),t}(w);t.default=(0,v.default)(N)},KSwd:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("iCc5"),r=h(o),i=n("V7oC"),a=h(i),u=n("FYw3"),l=h(u),s=n("mRg0"),c=h(s),f=n("q1tI"),p=(h(f),n("qw8e")),d=h(p);function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){return(0,r.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"componentWillMount",value:function(){this.instanceName="poiPicker"}},{key:"initialInstance",value:function(){var e=this;this.props.eventSupport;return this[this.instanceName]?new Promise((function(t){t(e[e.instanceName])})):new Promise((function(t){e.amapui.load(["ui/misc/PoiPicker","lib/$"],(function(n,o){e.initPage(n,o);var r=e.exposeInstance(e.props);r&&e.bindEvents(r),t(e[e.instanceName])}))}))}},{key:"initPage",value:function(e,t){this[this.instanceName]=new e({input:"pickerInput"})}}]),t}(d.default);t.default=v,e.exports=t["default"]},M0Q7:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a={v:"1.4.0",hostAndPath:"webapi.amap.com/maps",key:"f97efc35164149d0c0f299e7a8adb3d2",callback:"__amap_init_callback",useAMapUI:!1},u=null,l=null,s=!1,c=function(){function e(t){var n=t.key,r=t.useAMapUI,u=t.version,l=t.protocol;i(this,e),this.config=o({},a,{useAMapUI:r,protocol:l}),"undefined"!==typeof window&&(n?this.config.key=n:"amapkey"in window&&(this.config.key=window.amapkey)),u&&(this.config.v=u),this.protocol=l||window.location.protocol,-1===this.protocol.indexOf(":")&&(this.protocol+=":")}return r(e,[{key:"getScriptSrc",value:function(e){return this.protocol+"//"+e.hostAndPath+"?v="+e.v+"&key="+e.key+"&callback="+e.callback}},{key:"buildScriptTag",value:function(e){var t=document.createElement("script");return t.type="text/javascript",t.async=!0,t.defer=!0,t.src=e,t}},{key:"getAmapuiPromise",value:function(){var e=this.buildScriptTag(this.protocol+"//webapi.amap.com/ui/1.0/main-async.js"),t=new Promise((function(t){e.onload=function(){t()}}));return document.body.appendChild(e),t}},{key:"getMainPromise",value:function(){var e=this,t=this.buildScriptTag(this.getScriptSrc(this.config)),n=new Promise((function(t){window[e.config.callback]=function(){t(),delete window[e.config.callback]}}));return document.body.appendChild(t),n}},{key:"load",value:function(){if("undefined"===typeof window)return null;var e=this.config.useAMapUI;return u=u||this.getMainPromise(),e&&(l=l||this.getAmapuiPromise()),new Promise((function(t){u.then((function(){e&&l?l.then((function(){window.initAMapUI&&!s&&(window.initAMapUI(),"function"===typeof e&&e(),s=!0),t()})):t()}))}))}}]),e}();t.default=c},Nz1C:function(e,t,n){!function(t,o){e.exports=o(n("q1tI"))}("undefined"!=typeof self&&self,(function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},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=0)}([function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(u),s=function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onSelect=n.onSelect.bind(n),n}return i(t,e),a(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentDidMount",value:function(){this.loadWithOptions(this.props)}},{key:"loadWithOptions",value:function(e){var t=this;return this.map=e.__map__,this.map?e.options?"function"!=typeof e.onSelect?void console.log("\u5fc5\u987b\u6307\u5b9aonSelect\u56de\u8c03\u51fd\u6570"):void this.map.plugin(["AMap.Autocomplete","AMap.Geocoder"],(function(){var n={input:"autoinput"};Object.assign(n,e.options),console.log("init with options:",n);var o=new window.AMap.Autocomplete(n);t.map.addControl(o),window.AMap.event.addListener(o,"select",t.onSelect);var r=new window.AMap.Geocoder({});console.log(r),t.map.addControl(r),t.geoloc=r,t.auto=o})):void console.log("\u5fc5\u987b\u6307\u5b9aAutocomplete\u63d2\u4ef6\u7684\u914d\u7f6e\u53c2\u6570"):void console.log("\u7ec4\u4ef6\u5fc5\u987b\u4f5c\u4e3a Map \u7684\u5b50\u7ec4\u4ef6\u4f7f\u7528")}},{key:"onSelect",value:function(e){var t=this;if(e.poi.location)this.props.onSelect(e);else{var n=e.poi;this.geoloc&&this.geoloc.getLocation(n.district+n.address,(function(n,o){console.log("getLocation",n,o),o&&"OK"===o.info&&(e.poi.location=o.geocodes[0].location),t.props.onSelect(e)}))}}},{key:"render",value:function(){return this.props.options&&this.props.options.input?null:l.default.createElement("input",{id:"autoinput",placeholder:this.props.placeholder,style:this.props.style})}}]),t}(u.Component);e.exports=s},function(t,n){t.exports=e}])}))},VAeg:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n("q1tI"),a=h(i),u=n("i8i4"),l=n("pLQl"),s=h(l),c=n("79gr"),f=h(c),p=n("2SDg"),d=n("7LDH");function h(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function y(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _=function(e){function t(e){v(this,t);var n=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){e?o.marker&&o.marker.show():o.marker&&o.marker.hide()},zIndex:function(e){o.marker&&o.marker.setzIndex(e)}},n.converterMap={position:d.toLnglat,offset:d.toPixel},n.map=e.__map__,n.element=n.map.getContainer(),setTimeout((function(){n.createMarker(e)}),13)}else s.default.warning("MAP_INSTANCE_REQUIRED");return n}return y(t,e),r(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillReceiveProps",value:function(e){this.map&&this.refreshMarkerLayout(e)}},{key:"createMarker",value:function(e){var t=this.buildCreateOptions(e);this.marker=new window.AMap.Marker(t),this.marker.render=function(e){return function(t){(0,p.renderMarkerComponent)(t,e)}}(this.marker),this.props.onInstanceCreated&&this.props.onInstanceCreated(),this.setMarkerLayout(e),this.setChildComponent(e)}},{key:"buildCreateOptions",value:function(e){var t=this,n={};return p.MarkerAllProps.forEach((function(o){o in e&&(n[o]=t.getSetterParam(o,e[o]))})),n.map=this.map,n}},{key:"setMarkerLayout",value:function(e){("render"in e||"children"in e&&e.children)&&(this.createContentWrapper(),"className"in e&&e.className&&(this.contentWrapper.className=e.className))}},{key:"createContentWrapper",value:function(){this.contentWrapper=document.createElement("div"),this.marker.setContent(this.contentWrapper)}},{key:"setChildComponent",value:function(e){if(this.contentWrapper)if("className"in e&&e.className&&(this.contentWrapper.className=e.className),"render"in e)(0,p.renderMarkerComponent)(e.render,this.marker);else if("children"in e){var t=e.children,n="undefined"===typeof t?"undefined":o(t);"undefined"!==n&&this.contentWrapper&&(0,u.render)(a.default.createElement("div",null,t),this.contentWrapper)}}},{key:"refreshMarkerLayout",value:function(e){this.setChildComponent(e)}},{key:"getSetterParam",value:function(e,t){return e in this.converterMap?this.converterMap[e](t):t}},{key:"render",value:function(){return null}},{key:"instance",get:function(){return this.marker}}]),t}(a.default.Component);t.default=(0,f.default)(_)},VPv4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("iCc5"),r=h(o),i=n("V7oC"),a=h(i),u=n("FYw3"),l=h(u),s=n("mRg0"),c=h(s),f=n("q1tI"),p=(h(f),n("iaKP")),d=h(p);function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(e){(0,r.default)(this,t);var n=(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window){if(!e.__map__&&!e.__amapui__)throw new Error("this component has to be a child of Map and AMapUI component");if(void 0==e.instanceName)throw new Error("the component has to have a instanceName");n.map=e.__map__,n.amapui=e.__amapui__,n.element=e.__ele__,n.instanceName=e.instanceName,n.initialInstance()}return n}return(0,c.default)(t,e),(0,a.default)(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillReceiveProps",value:function(e){var t=this.props;this[this.instanceName]&&this.updateMapProps(t,e)}},{key:"updateMapProps",value:function(e,t){}},{key:"componentWillMount",value:function(){console.log("mount "+this.instanceName)}},{key:"bindEvents",value:function(e,t){var n=this,o=Object.keys(e);o.length&&o.forEach((function(t){n[n.instanceName].on(t,e[t])}))}},{key:"exposeInstance",value:function(){if("events"in this.props){var e=this.props.events||{};return(0,d.default)(e.created)&&(e.created(this[this.instanceName],this.instanceName),delete e.created),e}return!1}},{key:"render",value:function(){return null}},{key:"initialInstance",value:function(){}}]),t}(f.Component);t.default=v,e.exports=t["default"]},WK0O:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("pZRB"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},YDKi:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("q2yG"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},YEbH:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("q1tI"),i=p(r),a=n("i8i4"),u=n("eB3W"),l=p(u),s=n("pLQl"),c=p(s),f=n("2SDg");function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function v(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}if("undefined"!==typeof window){var m=".amap_markers_pop_window{\n    padding: 10px;\n    border: 1px solid #ddd;\n    border-radius: 8px;\n    background: #fff;\n    position: relative;\n    display: flex;\n    flex-wrap: wrap;\n    justify-content: flex-start;\n}\n.amap_markers_pop_window::before{\n    content: ' ';\n    display: block;\n    position: absolute;\n    bottom: -12px;\n    left: 50%;\n    margin-left: -7px;\n    width: 0;\n    height: 0;\n    border-top: 12px solid #ddd;\n    border-left: 7px solid transparent;\n    border-right: 7px solid transparent;\n}\n.amap_markers_pop_window::after{\n    content: ' ';\n    display: block;\n    position: absolute;\n    bottom: -11px;\n    left: 50%;\n    margin-left: -6px;\n    width: 0;\n    height: 0;\n    border-top: 11px solid #fff;\n    border-left: 6px solid transparent;\n    border-right: 6px solid transparent;\n}\n.amap_markers_pop_window_item{\n    cursor:pointer;\n    width: 40px;\n    height: 50px;\n    display: flex;\n    align-items: flex-end;\n    justify-content: center;\n}\n.amap_markers_pop_window_item span{\n    pointer-events: none;\n}\n.amap_markers_window_overflow_warning{\n    text-align: center;\n    width: 100%;\n    margin: 5px 0;\n    color: #666;\n}",y=document.head||document.getElementsByTagName("head")[0],_=document.createElement("style");_.type="text/css",_.textContent=m,y.appendChild(_)}var g=i.default.Component,b=.8,w=32*b,k=46*b-2,M=46*b,C=66*b-2,P=42,O={useCluster:!1,markersCache:[],markerIDCache:[]},E=["gridSize","minClusterSize","maxZoom","averageCenter","styles","zoomOnClick","renderCluserMarker"],I="__react_amap__",j=function(e){function t(e){d(this,t);var n=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return"undefined"!==typeof window&&(e.__map__?(n.map=e.__map__,n.element=n.map.getContainer(),n.markersCache=O.markersCache,n.useCluster=null,n.markerIDCache=O.markerIDCache,n.resetOffset=new window.AMap.Pixel(-w/2,-k),n.hoverOffset=new window.AMap.Pixel(-M/2,-C),n.createMarkers(e)):c.default.warning("MAP_INSTANCE_REQUIRED")),n}return v(t,e),o(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"createMarkers",value:function(e){var t=this,n=e.markers||[],o=[],r={};n.length&&n.forEach((function(n,i){var a=t.buildCreateOptions(e,n,i);a.map=t.map;var u=null;if((0,l.default)(e.render)){var s=e.render(n);if(!1!==s){var c=document.createElement("div");c.setAttribute(I,"1"),u=c,r[i]=s}}if(!u){u=document.createElement("div");var p=document.createElement("img");p.src="//webapi.amap.com/theme/v1.3/markers/n/mark_bs.png",u.appendChild(p)}a.content=u;var d=new window.AMap.Marker(a);d.on("click",(function(e){t.onMarkerClick(e)})),d.on("mouseover",(function(e){t.onMarkerHover(e)})),d.on("mouseout",(function(e){t.onMarkerHoverOut(e)})),d.render=function(e){return function(t){return(0,f.renderMarkerComponent)(t,e)}}(d),t.bindMarkerEvents(d),o.push(d)})),this.markersCache=o,this.markerReactChildDOM=r,this.exposeMarkerInstance(),this.checkClusterSettings(e)}},{key:"checkClusterSettings",value:function(e){var t=this;if(e.useCluster)this.loadClusterPlugin(e.useCluster).then((function(e){e.setMarkers(t.markersCache)}));else if(this.mapCluster){var n=this.mapCluster.getMarkers();this.mapCluster.clearMarkers(),n.forEach((function(e){e.setMap(t.map)}))}}},{key:"componentDidMount",value:function(){this.map&&this.setMarkerChild()}},{key:"setMarkerChild",value:function(){var e=this;Object.keys(this.markerReactChildDOM).forEach((function(t){var n=e.markersCache[t].getContent(),o=e.markerReactChildDOM[t];e.renderMarkerChild(n,o)}))}},{key:"renderMarkerChild",value:function(e,t){(0,a.render)(i.default.createElement("div",null,t),e)}},{key:"buildCreateOptions",value:function(e,t,n){var o={},r=["extData"];return f.MarkerAllProps.forEach((function(i){if(i in t&&-1===r.indexOf(i))o[i]=(0,f.getPropValue)(i,t[i]);else if(i in e)if((0,l.default)(e[i])){var a=e[i].call(null,t,n);o[i]=(0,f.getPropValue)(i,a)}else o[i]=(0,f.getPropValue)(i,e[i])})),o.extData=t,o}},{key:"componentWillReceiveProps",value:function(e){this.map&&this.refreshMarkersLayout(e)}},{key:"refreshMarkersLayout",value:function(e){var t=e.markers!==this.props.markers,n=!!this.props.useCluster!==!!e.useCluster;t&&(this.markersCache.length&&this.markersCache.forEach((function(e){e&&(e.setMap(null),e=null)})),this.markersCache=O.markersCache,this.createMarkers(e),this.setMarkerChild()),(t||n)&&this.markersWindow&&this.markersWindow.close(),n&&this.checkClusterSettings(e)}},{key:"loadClusterPlugin",value:function(e){var t=this;if(this.mapCluster)return Promise.resolve(this.mapCluster);var n="boolean"===typeof e?{}:e;return new Promise((function(e){t.map.plugin(["AMap.MarkerClusterer"],(function(){e(t.createClusterPlugin(n))}))}))}},{key:"createClusterPlugin",value:function(e){var t={},n={minClusterSize:2,zoomOnClick:!1,maxZoom:18,gridSize:60,averageCenter:!0};E.forEach((function(o){t[o]=o in e?e[o]:n[o]})),this.mapCluster=new window.AMap.MarkerClusterer(this.map,[],t);var o={};return"events"in e&&(o=e.events,"created"in o&&o.created(this.mapCluster)),this.initClusterMarkerWindow(),this.bindClusterEvent(o),this.mapCluster}},{key:"onMarkerClick",value:function(e){var t=e.target;this.triggerMarkerClick(e,t)}},{key:"onMarkerHover",value:function(e){e.target.setTop(!0),this.setMarkerHovered(e,e.target)}},{key:"onMarkerHoverOut",value:function(e){e.target.setTop(!1),this.setMarkerHoverOut(e,e.target)}},{key:"onWindowMarkerClick",value:function(e){var t=e.markerRef;this.triggerMarkerClick(null,t)}},{key:"onWindowMarkerHover",value:function(e){var t=e.markerRef;this.setMarkerHovered(null,t)}},{key:"onWindowMarkerHoverOut",value:function(e){var t=e.markerRef;this.setMarkerHoverOut(null,t)}},{key:"setMarkerHovered",value:function(e,t){this.triggerMarkerHover(e,t)}},{key:"setMarkerHoverOut",value:function(e,t){this.triggerMarkerHoverOut(e,t)}},{key:"triggerMarkerClick",value:function(e,t){var n=this.props.events||{};(0,l.default)(n.click)&&n.click(e,t)}},{key:"triggerMarkerHover",value:function(e,t){var n=this.props.events||{};(0,l.default)(n.mouseover)&&n.mouseover(e,t)}},{key:"triggerMarkerHoverOut",value:function(e,t){var n=this.props.events||{};(0,l.default)(n.mouseout)&&n.mouseout(e,t)}},{key:"initClusterMarkerWindow",value:function(){this.markersWindow=new window.AMap.InfoWindow({isCustom:!0,autoMove:!0,closeWhenClickMap:!0,content:"<span>loading...</span>",showShadow:!1,offset:new window.AMap.Pixel(0,-20)}),this.markersDOM=document.createElement("div"),this.markersDOM.className="amap_markers_pop_window",this.markersWindow.setContent(this.markersDOM)}},{key:"bindClusterEvent",value:function(e){var t=this;this.mapCluster.on("click",(function(n){if(t.props.useCluster&&t.props.useCluster.zoomOnClick);else{var o=!0;(0,l.default)(e.click)&&(o=e.click(n)),!1!==o&&t.showMarkersInfoWindow(n)}}))}},{key:"showMarkersInfoWindow",value:function(e){var t=this,n=e.lnglat,o=e.markers;if(this.markersDOM.innerHTML="",o&&o.length){var r=o.length;if(r>P&&(o=o.slice(0,P)),o.forEach((function(e){var n=e.getContent(),o=document.createElement("div");o.className="window_marker_item",o.appendChild(n),o.markerRef=e,o.addEventListener("click",t.onWindowMarkerClick.bind(t,o),!0),o.addEventListener("mouseover",t.onWindowMarkerHover.bind(t,o),!0),o.addEventListener("mouseout",t.onWindowMarkerHoverOut.bind(t,o),!0),t.markersDOM.appendChild(o)})),r>P){var i=document.createElement("div");i.className="amap_markers_window_overflow_warning",i.innerText="\u66f4\u591a\u5750\u6807\u8bf7\u653e\u5927\u5730\u56fe\u67e5\u770b",this.markersDOM.appendChild(i)}}this.markersWindow.open(this.map,n)}},{key:"exposeMarkerInstance",value:function(){if("events"in this.props){var e=this.props.events||{};(0,l.default)(e.created)&&e.created(this.markersCache)}}},{key:"bindMarkerEvents",value:function(e){var t=this.props.events||{},n=Object.keys(t),o=["click","mouseover","mouseout","created"];n.length&&n.forEach((function(n){-1===o.indexOf(n)&&e.on(n,t[n])}))}},{key:"render",value:function(){return null}}]),t}(g);t.default=j},ZCYf:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("q1tI"),i=c(r),a=n("79gr"),u=c(a),l=n("pLQl"),s=c(l);function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function d(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(e){f(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__&&e.__poly__){var o=n;n.setterMap={active:function(e){o.toggleActive(e)}},n.map=e.__map__,n.poly=e.__poly__,n.editorActive=!1,n.createEditorInstance().then((function(){n.props.onInstanceCreated&&n.props.onInstanceCreated()}))}else s.default.warning("MAP_INSTANCE_REQUIRED");return n}return d(t,e),o(t,[{key:"toggleActive",value:function(e){e?this.editorActive||this.activeEditor():this.editorActive&&this.inactiveEditor()}},{key:"activeEditor",value:function(){this.polyEditor&&(this.editorActive=!0,this.polyEditor.open())}},{key:"inactiveEditor",value:function(){this.editorActive=!1,this.polyEditor&&this.polyEditor.close()}},{key:"createEditorInstance",value:function(){var e=this;return this.polyEditor?Promise.resolve(this.polyEditor):new Promise((function(t){e.map.plugin(["AMap.PolyEditor"],(function(){e.polyEditor=new window.AMap.PolyEditor(e.map,e.poly),t(e.polyEditor)}))}))}},{key:"render",value:function(){return null}},{key:"instance",get:function(){return this.polyEditor}}]),t}(i.default.Component);t.default=(0,u.default)(h)},c28g:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("iCc5"),r=h(o),i=n("V7oC"),a=h(i),u=n("FYw3"),l=h(u),s=n("mRg0"),c=h(s),f=n("q1tI"),p=(h(f),n("qw8e")),d=h(p);function h(e){return e&&e.__esModule?e:{default:e}}n("urOQ");var v=function(e){function t(){return(0,r.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"componentWillMount",value:function(){this.instanceName="simpleMarker"}},{key:"initialInstance",value:function(){var e=this;this.props.eventSupport;return this[this.instanceName]?new Promise((function(t){t(e[e.instanceName])})):new Promise((function(t){e.amapui.load(["ui/overlay/SimpleMarker"],(function(n){e.initPage(n);var o=e.exposeInstance(e.props);o&&e.bindEvents(o),t(e[e.instanceName])}))}))}},{key:"initPage",value:function(e){this[this.instanceName]=new e({iconLabel:"circleMar",iconStyle:'<div className="circleMar"></div>',containerClassNames:"circleMar",map:this.map,position:[116.405285,39.904989]})}},{key:"componentWillUnmount",value:function(){console.log(this.instanceName+" unmount"),this[this.instanceName].setMap(null),delete this[this.instanceName]}}]),t}(d.default);t.default=v,e.exports=t["default"]},eB3W:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return!!e&&"function"===typeof e};t.default=o},fqIc:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("q1tI"),i=c(r),a=n("pLQl"),u=c(a),l=n("eB3W"),s=c(l);function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function d(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(e){f(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return"undefined"!==typeof window&&(e.__map__&&e.__circle__?(n.map=e.__map__,n.element=n.map.getContainer(),n.circle=e.__circle__,n.editorActive=!1,n.onPropsUpdate(e)):u.default.warning("CIRCLE_INSTANCE_REQUIRED")),n}return d(t,e),o(t,[{key:"componentWillReceiveProps",value:function(e){this.map&&this.onPropsUpdate(e)}},{key:"onPropsUpdate",value:function(e){"active"in e&&!1===e.active?this.toggleActive(!1,e):this.toggleActive(!0,e)}},{key:"toggleActive",value:function(e,t){e?this.editorActive||this.activeEditor(t):this.editorActive&&this.inactiveEditor()}},{key:"activeEditor",value:function(e){var t=this;this.loadCircleEditor(e).then((function(e){t.editorActive=!0,e.open()}))}},{key:"inactiveEditor",value:function(){this.editorActive=!1,this.circleEditor&&this.circleEditor.close()}},{key:"loadCircleEditor",value:function(e){var t=this;return this.circleEditor?Promise.resolve(this.circleEditor):new Promise((function(n){t.map.plugin(["AMap.CircleEditor"],(function(){n(t.createEditorInstance(e))}))}))}},{key:"createEditorInstance",value:function(e){this.circleEditor=new window.AMap.CircleEditor(this.map,this.circle);var t=this.exposeEditorInstance(e);return t&&this.bindEditorEvents(t),this.circleEditor}},{key:"exposeEditorInstance",value:function(e){if("events"in e){var t=e.events||{};return(0,s.default)(t.created)&&t.created(this.circleEditor),delete t.created,t}return!1}},{key:"bindEditorEvents",value:function(e){var t=this,n=Object.keys(e);n.length&&n.forEach((function(n){t.circleEditor.on(n,e[n])}))}},{key:"render",value:function(){return null}}]),t}(i.default.Component);t.default=h},g4Dz:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("q1tI"),i=f(r),a=n("79gr"),u=f(a),l=n("pLQl"),s=f(l),c=n("7LDH");function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function h(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=["center","radius","draggable","extData","visible","style"],m=v.concat(["zIndex","bubble"]),y=function(e){function t(e){p(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){o.mapCircle&&(e?o.mapCircle.show():o.mapCircle.hide())},style:function(e){o.mapCircle&&o.mapCircle.setOptions(e)}},n.converterMap={center:c.toLnglat},n.state={loaded:!1},n.map=e.__map__,n.element=n.map.getContainer(),n.createInstance(e).then((function(){n.setState({loaded:!0}),n.props.onInstanceCreated&&n.props.onInstanceCreated()}))}else s.default.warning("MAP_INSTANCE_REQUIRED");return n}return h(t,e),o(t,[{key:"createInstance",value:function(e){var t=this.buildCreateOptions(e);return t.map=this.map,this.mapCircle=new window.AMap.Circle(t),Promise.resolve(this.mapCircle)}},{key:"buildCreateOptions",value:function(e){var t=this,n={};return m.forEach((function(o){if(o in e)if("style"===o&&void 0!==e.style){var r=Object.keys(e.style);r.forEach((function(t){n[t]=e.style[t]}))}else n[o]=t.getSetterValue(o,e)})),n}},{key:"getSetterValue",value:function(e,t){return e in this.converterMap?this.converterMap[e](t[e]):t[e]}},{key:"renderEditor",value:function(e){return e?1!==i.default.Children.count(e)?null:i.default.cloneElement(i.default.Children.only(e),{__circle__:this.mapCircle,__map__:this.map,__ele__:this.element}):null}},{key:"render",value:function(){return this.state.loaded?this.renderEditor(this.props.children):null}},{key:"instance",get:function(){return this.mapCircle}}]),t}(i.default.Component);t.default=(0,u.default)(y)},gln8:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("oJCH"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},iaKP:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return!!e&&"function"===typeof e};t.default=o,e.exports=t["default"]},lQ2k:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("qeRR"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},mHyM:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("q1tI"),i=d(r),a=n("79gr"),u=d(a),l=n("pLQl"),s=d(l),c=n("ZCYf"),f=d(c),p=n("7LDH");function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function m(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y=["path","draggable","extData","style","visible"],_=y.concat(["zIndex","bubble"]),g=function(e){function t(e){h(this,t);var n=v(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){e?o.polygon&&o.polygon.show():o.polygon&&o.polygon.hide()},style:function(e){o.polygon.setOptions(e)}},n.converterMap={path:function(e){return o.buildPathValue(e)}},n.state={loaded:!1},n.map=e.__map__,n.element=n.map.getContainer(),setTimeout((function(){n.initMapPolygon(e)}),13)}else s.default.warning("MAP_INSTANCE_REQUIRED");return n}return m(t,e),o(t,[{key:"initMapPolygon",value:function(e){var t=this.buildCreateOptions(e);t.map=this.map,this.polygon=new window.AMap.Polygon(t),this.setState({loaded:!0}),this.props.onInstanceCreated&&this.props.onInstanceCreated()}},{key:"buildCreateOptions",value:function(e){var t=this,n={};return _.forEach((function(o){if(o in e)if("style"===o&&e.style){var r=Object.keys(e.style);r.forEach((function(t){n[t]=e.style[t]}))}else"visible"!==o&&(n[o]=t.getSetterValue(o,e[o]))})),n}},{key:"detectPropChanged",value:function(e,t){return this.props[e]!==t[e]}},{key:"getSetterValue",value:function(e,t){return e in this.converterMap?this.converterMap[e](t):t}},{key:"buildPathValue",value:function(e){var t=this;if(e.length){var n=e[0];if("number"===typeof n[0])return e.map((function(e){return(0,p.toLnglat)(e)}));if("getLng"in n)return e;if("longitude"in n||"lng"in n)return e.map((function(e){return(0,p.toLnglat)(e)}));if("length"in n&&n.length)return e.map((function(e){return t.buildPathValue(e)}))}return[]}},{key:"renderEditor",value:function(e){if(!e)return null;if(1!==i.default.Children.count(e))return null;var t=i.default.Children.only(e);return t.type===f.default?i.default.cloneElement(t,{__poly__:this.polygon,__map__:this.map}):null}},{key:"render",value:function(){return this.state.loaded?this.renderEditor(this.props.children):null}},{key:"instance",get:function(){return this.polygon}}]),t}(r.Component);t.default=(0,u.default)(g)},mRLa:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("sYbN"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},oJCH:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("iCc5"),r=h(o),i=n("V7oC"),a=h(i),u=n("FYw3"),l=h(u),s=n("mRg0"),c=h(s),f=n("q1tI"),p=(h(f),n("qw8e")),d=h(p);function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){return(0,r.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"componentWillMount",value:function(){this.instanceName="positionPicker"}},{key:"initialInstance",value:function(){var e=this;this.props.eventSupport;return this[this.instanceName]?new Promise((function(t){t(e[e.instanceName])})):new Promise((function(t){e.amapui.load(["ui/misc/PositionPicker","lib/$"],(function(n,o){e.initPage(n,o);var r=e.exposeInstance(e.props);r&&e.bindEvents(r),t(e[e.instanceName])}))}))}},{key:"initPage",value:function(e,t){console.log(t),this[this.instanceName]=new e({eventSupport:!0,mode:"dragMap",map:this.map,iconStyle:{url:"//webapi.amap.com/ui/1.0/assets/position-picker2.png",size:[48,48],ancher:[24,40]}}),this.positionPicker.start(this.map.getBounds().getSouthWest())}}]),t}(d.default);t.default=v,e.exports=t["default"]},ooyC:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("q1tI"),i=p(r),a=n("i8i4"),u=n("79gr"),l=p(u),s=n("pLQl"),c=p(s),f=n("7LDH");function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function v(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var m=i.default.Component,y=["content","position","size","visible","offset"],_=y.concat(["isCustom","autoMove","closeWhenClickMap","showShadow"]),g=function(e){function t(e){d(this,t);var n=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){e?(o.showWindow(),o.setClassName(o.props),o.setChild(o.props)):o.closeWindow()}},n.converterMap={size:f.toSize,offset:f.toPixel,position:f.toLnglat},n.map=e.__map__,n.isCustom=!0,setTimeout((function(){n.createInfoWindow(e)}),13)}else c.default.warning("MAP_INSTANCE_REQUIRED");return n}return v(t,e),o(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillReceiveProps",value:function(e){this.map&&this.refreshWindowLayout(e)}},{key:"createInfoWindow",value:function(e){var t=this.buildCreateOptions(e);this.infoWindow=new window.AMap.InfoWindow(t),this.props.onInstanceCreated&&this.props.onInstanceCreated()}},{key:"refreshWindowLayout",value:function(e){this.setChild(e),this.setClassName(e)}},{key:"checkPropChanged",value:function(e,t){return this.props[e]!==t[e]}},{key:"showWindow",value:function(){this.infoWindow.open(this.map,this.infoWindow.getPosition())}},{key:"closeWindow",value:function(){this.infoWindow.close()}},{key:"buildCreateOptions",value:function(e){var t=this,n={};return n.isCustom="isCustom"in e&&!!e.isCustom,"content"in e?n.content=e.content:(this.infoDOM=document.createElement("div"),n.content=this.infoDOM),_.forEach((function(o){o in e&&-1===["visible","isCustom","content"].indexOf(o)&&(n[o]=t.getSetterValue(o,e[o]))})),n}},{key:"getSetterValue",value:function(e,t){return e in this.converterMap?this.converterMap[e](t):t}},{key:"setChild",value:function(e){var t=e.children;this.infoDOM&&t?(0,a.render)(i.default.createElement("div",null,t),this.infoDOM):e.children&&console.warn("\u56e0\u4e3a\u4f60\u8bbe\u7f6e isCustom \u4e3a true\uff0cInfoWindow \u7684 Children \u88ab\u5ffd\u7565")}},{key:"setClassName",value:function(e){if(this.infoDOM){var t="";"className"in e&&e.className?t+=e.className:!0===e.isCustom&&(t+="amap_markers_pop_window"),this.infoDOM.className=t}}},{key:"render",value:function(){return null}},{key:"instance",get:function(){return this.infoWindow}}]),t}(m);t.default=(0,l.default)(g)},pLQl:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={MARKER_ID_CONFLICT:"Marker \u7684 id \u5c5e\u6027\u91cd\u590d",MARKER_ID_REQUIRED:"\u6bcf\u4e00\u4e2a Marker \u5fc5\u9700\u6709\u4e00\u4e2a id \u5c5e\u6027",MAP_INSTANCE_REQUIRED:"\u6ca1\u6709\u5730\u56fe\u5b9e\u4f8b\uff1b\u7ec4\u4ef6\u5fc5\u987b\u4f5c\u4e3a Map \u7684\u5b50\u7ec4\u4ef6\u4f7f\u7528",CIRCLE_INSTANCE_REQUIRED:"",CIRCLE_CENTER_REQUIRED:"Circle \u7ec4\u4ef6\u5fc5\u9700\u8bbe\u7f6e center \u5c5e\u6027",CIRCLE_RADIUS_REQUIRED:"Circle \u7ec4\u4ef6\u5fc5\u9700\u8bbe\u7f6e radius \u5c5e\u6027",SRC_REQUIRED:"GroundImage \u7ec4\u4ef6\u5fc5\u9700\u8bbe\u7f6e src \u5c5e\u6027",BOUNDS_REQUIRED:"GroundImage \u7ec4\u4ef6\u5fc5\u9700\u8bbe\u7f6e bounds \u5c5e\u6027",WINDOW_POSITION_REQUIRED:"InfoWindow \u7ec4\u4ef6\u5fc5\u9700\u8bbe\u7f6e position \u5c5e\u6027",INVALID_AMAP_PLUGIN:"plugins \u5c5e\u6027\u4e0d\u6b63\u786e\uff1b\u76ee\u524d\u652f\u6301\u7684\u63d2\u4ef6\u6709'Scale', 'ToolBar', 'MapType', 'OverView'"},r=function(e){return e in o?o[e]:e},i={error:function(e){throw new Error(r(e))},warning:function(e){console.warn(r(e))},optimize:function(e){console.log("%c"+r(e),"color:#d4d483;border-left: 2px solid #d4d483;padding-left: 4px;")}};t.default=i},pSd8:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("iCc5"),r=h(o),i=n("V7oC"),a=h(i),u=n("FYw3"),l=h(u),s=n("mRg0"),c=h(s),f=n("q1tI"),p=(h(f),n("qw8e")),d=h(p);function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){return(0,r.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"componentWillMount",value:function(){this.instanceName="awesomeMarker"}},{key:"initialInstance",value:function(){var e=this;this.props.eventSupport;return this[this.instanceName]?new Promise((function(t){t(e[e.instanceName])})):new Promise((function(t){e.amapui.load(["ui/overlay/AwesomeMarker"],(function(n){e.initPage(n);var o=e.exposeInstance(e.props);o&&e.bindEvents(o),t(e[e.instanceName])}))}))}},{key:"initPage",value:function(e){this[this.instanceName]=new e({awesomeIcon:"arrows",iconLabel:{style:{color:"#333"}},iconStyle:"orange",map:this.map,position:this.map.getCenter()})}},{key:"componentWillUnmount",value:function(){console.log(this.instanceName+" unmount"),this[this.instanceName].setMap(null),delete this[this.instanceName]}}]),t}(d.default);t.default=v,e.exports=t["default"]},pZRB:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("QbLZ"),r=v(o),i=n("iCc5"),a=v(i),u=n("V7oC"),l=v(u),s=n("FYw3"),c=v(s),f=n("mRg0"),p=v(f),d=n("q1tI"),h=v(d);function v(e){return e&&e.__esModule?e:{default:e}}var m=function(e){function t(e){(0,a.default)(this,t);var n=(0,c.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.map=e.__map__,n.state={mapUILoaded:!1},n}return(0,p.default)(t,e),(0,l.default)(t,[{key:"componentDidMount",value:function(){this.loadMap()}},{key:"componentDidUpdate",value:function(){}},{key:"loadMap",value:function(){this.AMapUI=window.AMapUI,void 0!=this.AMapUI?(console.log("Loading AMapUI finished..."),this.setState({mapUILoaded:!0})):console.error("Load AMapUI first plz..")}},{key:"renderChildren",value:function(){var e=this,t=d.Children.map(this.props.children,(function(t){return null!=t?h.default.cloneElement(t,(0,r.default)({},e.props,{__amapui__:e.AMapUI})):null}));return t}},{key:"render",value:function(){return h.default.createElement("div",null,this.state.mapUILoaded?this.renderChildren():null)}}]),t}(d.Component);t.default=m,e.exports=t["default"]},pfL4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("sIA0"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},pwzk:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("Fb8p"),r=w(o),i=n("YDKi"),a=w(i),u=n("pfL4"),l=w(u),s=n("wbFH"),c=w(s),f=n("mRLa"),p=w(f),d=n("/Gwn"),h=w(d),v=n("gln8"),m=w(v),y=n("sXfF"),_=w(y),g=n("lQ2k"),b=w(g);function w(e){return e&&e.__esModule?e:{default:e}}t.default={AwesomeMarker:r.default,DistrictCluster:a.default,DistrictExplorer:l.default,PathSimplifier:c.default,PointSimplifier:p.default,PoiPicker:h.default,PositionPicker:m.default,SimpleMarker:_.default,SimpleInfoWindow:b.default},e.exports=t["default"]},q2yG:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("iCc5"),r=h(o),i=n("V7oC"),a=h(i),u=n("FYw3"),l=h(u),s=n("mRg0"),c=h(s),f=n("q1tI"),p=(h(f),n("qw8e")),d=h(p);function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){return(0,r.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"componentWillMount",value:function(){this.instanceName="districtCluster"}},{key:"initialInstance",value:function(){var e=this;this.props.eventSupport;return this[this.instanceName]?new Promise((function(t){t(e[e.instanceName])})):new Promise((function(t){e.amapui.load(["ui/geo/DistrictCluster"],(function(n){e[e.instanceName]=new n({map:e.map,getPosition:function(e){return e.position}});var o=e.exposeInstance(e.props);o&&e.bindEvents(o),e.initPage(n),t(e[e.instanceName])}))}))}},{key:"initPage",value:function(e){var t=this.createPoints(this.map.getCenter(),1e5);this[this.instanceName].setData(t)}},{key:"createPoints",value:function(e,t){for(var n=[],o=0,r=t;o<r;o++)n.push({position:[e.getLng()+(Math.random()>.5?1:-1)*Math.random()*30,e.getLat()+(Math.random()>.5?1:-1)*Math.random()*20]});return n}},{key:"componentWillUnmount",value:function(){console.log(this.instanceName+" unmount"),this[this.instanceName].hide(),delete this[this.instanceName]}}]),t}(d.default);t.default=v,e.exports=t["default"]},qeRR:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("iCc5"),r=h(o),i=n("V7oC"),a=h(i),u=n("FYw3"),l=h(u),s=n("mRg0"),c=h(s),f=n("q1tI"),p=(h(f),n("qw8e")),d=h(p);function h(e){return e&&e.__esModule?e:{default:e}}n("6VVw");var v=function(e){function t(){return(0,r.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"componentWillMount",value:function(){this.instanceName="simpleInfoWindow"}},{key:"initialInstance",value:function(){var e=this;this.props.eventSupport;return this[this.instanceName]?new Promise((function(t){t(e[e.instanceName])})):new Promise((function(t){e.amapui.load(["ui/overlay/SimpleInfoWindow","lib/$"],(function(n,o){e.initPage(n,o);var r=e.exposeInstance(e.props);r&&e.bindEvents(r),t(e[e.instanceName])}))}))}},{key:"initPage",value:function(e,t){this[this.instanceName]=new e({eventSupport:!0,map:this.map,infoTitle:"<strong>\u8fd9\u91cc\u662f\u6807\u9898</strong>",infoBody:"<p>\u8fd9\u91cc\u662f\u5185\u5bb9\u3002</p>",isCustom:!0});var n='<div class="infoWin"><div class="infoWin-top">sgsgsgsgsg<br/>sgsg<br/>sgsg<br/>sgsg<br/></div>';this.simpleInfoWindow.setContent(n),this[this.instanceName].open(this.map,this.map.getCenter())}},{key:"componentWillUnmount",value:function(){this.close(),console.log(this.instanceName+" unmount"),delete this[this.instanceName]}}]),t}(d.default);t.default=v,e.exports=t["default"]},qw8e:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("VPv4"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},"rk/D":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e[0].toUpperCase()+e.slice(1,e.length)};t.default=o},"sC/+":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("q1tI"),i=d(r),a=n("79gr"),u=d(a),l=n("pLQl"),s=d(l),c=n("ZCYf"),f=d(c),p=n("7LDH");function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function m(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y=i.default.Component,_=["path","extData","draggable","visible","style"],g=_.concat(["zIndex","bubble","showDir"]),b=function(e){function t(e){h(this,t);var n=v(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){e?o.polyline&&o.polyline.show():o.polyline&&o.polyline.hide()},style:function(e){o.polyline.setOptions(e)}},n.converterMap={path:function(e){return o.buildPathValue(e)}},n.state={loaded:!1},n.map=e.__map__,n.element=n.map.getContainer(),setTimeout((function(){n.createMapPolyline(e)}),13)}else s.default.warning("MAP_INSTANCE_REQUIRED");return n}return m(t,e),o(t,[{key:"createMapPolyline",value:function(e){var t=this.buildCreateOptions(e);t.map=this.map,this.polyline=new window.AMap.Polyline(t),this.setState({loaded:!0}),this.props.onInstanceCreated&&this.props.onInstanceCreated()}},{key:"buildCreateOptions",value:function(e){var t=this,n={};return g.forEach((function(o){if(o in e)if("style"===o&&e.style){var r=Object.keys(e.style);r.forEach((function(t){n[t]=e.style[t]}))}else"visible"!==o&&(n[o]=t.getSetterValue(o,e[o]))})),n}},{key:"detectPropChanged",value:function(e,t){return this.props[e]!==t[e]}},{key:"getSetterValue",value:function(e,t){return e in this.converterMap?this.converterMap[e](t):t}},{key:"buildPathValue",value:function(e){return e.length?"getLng"in e[0]?e:e.map((function(e){return(0,p.toLnglat)(e)})):e}},{key:"renderEditor",value:function(e){if(!e)return null;if(1!==i.default.Children.count(e))return null;var t=i.default.Children.only(e);return t.type===f.default?i.default.cloneElement(t,{__poly__:this.polyline,__map__:this.map}):null}},{key:"render",value:function(){return this.state.loaded?this.renderEditor(this.props.children):null}},{key:"instance",get:function(){return this.polyline}}]),t}(y);t.default=(0,u.default)(b)},sIA0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("iCc5"),r=h(o),i=n("V7oC"),a=h(i),u=n("FYw3"),l=h(u),s=n("mRg0"),c=h(s),f=n("q1tI"),p=(h(f),n("qw8e")),d=h(p);function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){return(0,r.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"componentWillMount",value:function(){this.instanceName="districtExplorer"}},{key:"componentWillUnmount",value:function(){this[this.instanceName].clearAreaNodeCache(),console.log(this.instanceName+" Unmount"),delete this[this.instanceName]}},{key:"updateProps",value:function(e,t){}},{key:"initialInstance",value:function(){var e=this,t=this.props.eventSupport,n=void 0!==t&&t;return this[this.instanceName]?new Promise((function(t){t(e[e.instanceName])})):new Promise((function(t){e.amapui.load(["ui/geo/DistrictExplorer"],(function(o){e[e.instanceName]=new o({eventSupport:n,map:e.map});var r=e.exposeInstance(e.props);r&&e.bindEvents(r),e.initPage(),t(e[e.instanceName])}))}))}},{key:"initPage",value:function(){var e=this,t="110000";this.currentAreaNode=t,this[this.instanceName].loadAreaNode(this.props.initialAdcode,(function(t,n){t?console.error(t):e.renderAreaNode(e[e.instanceName],n)}))}},{key:"renderAreaNode",value:function(e,t,n,o){this[this.instanceName].clearFeaturePolygons();var r=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00"];this[this.instanceName].renderSubFeatures(t,(function(e,t){var n=r[t%r.length],o=r[r.length-1-t%r.length];return{cursor:"default",bubble:!0,strokeColor:o,strokeOpacity:1,strokeWeight:1,fillColor:n,fillOpacity:.35}})),this[this.instanceName].renderParentFeature(t,{cursor:"default",bubble:!0,strokeColor:"black",fillColor:null,strokeWeight:3}),this.map.setFitView(this[this.instanceName].getAllFeaturePolygons())}},{key:"loadAreaNode",value:function(e,t){this[this.instanceName].loadAreaNode(e,(function(e,n){if(e)return t&&t(e),void console.error(e);t&&t(null,n)}))}}]),t}(d.default);t.default=v,e.exports=t["default"]},sXfF:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("c28g"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},sYbN:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("iCc5"),r=h(o),i=n("V7oC"),a=h(i),u=n("FYw3"),l=h(u),s=n("mRg0"),c=h(s),f=n("q1tI"),p=(h(f),n("qw8e")),d=h(p);function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){return(0,r.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"componentWillMount",value:function(){this.instanceName="pointSimplifier"}},{key:"initialInstance",value:function(){var e=this;this.props.eventSupport;return this[this.instanceName]?new Promise((function(t){t(e[e.instanceName])})):new Promise((function(t){e.amapui.load(["ui/misc/PointSimplifier"],(function(n){var o=e.exposeInstance(e.props);o&&e.bindEvents(o),e.initPage(),t(e[e.instanceName])}))}))}},{key:"initPage",value:function(){var e=this.createPoints(this.map.getCenter(),1e5);this[this.instanceName]=new t({map:this.map,compareDataItem:function(e,t,n,o){return n>o?-1:1},getPosition:function(e){return e.position},getHoverTitle:function(e,t){return"\u5e8f\u53f7: "+t},renderOptions:{pointStyle:{fillStyle:"blue"}}}),this.pointSimplifier.setData(e)}},{key:"createPoints",value:function(e,t){for(var n=[],o=0,r=t;o<r;o++)n.push({position:[e.getLng()+(Math.random()>.5?1:-1)*Math.random(),e.getLat()+(Math.random()>.5?1:-1)*Math.random()]});return n}}]),t}(d.default);t.default=v,e.exports=t["default"]},urOQ:function(e,t,n){},wbFH:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("x2EK"),r=i(o);function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,e.exports=t["default"]},x2EK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("iCc5"),r=h(o),i=n("V7oC"),a=h(i),u=n("FYw3"),l=h(u),s=n("mRg0"),c=h(s),f=n("q1tI"),p=(h(f),n("qw8e")),d=h(p);function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){return(0,r.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"componentWillMount",value:function(){this.instanceName="pathSimplifier"}},{key:"initialInstance",value:function(){var e=this;this.props.eventSupport;return this[this.instanceName]?new Promise((function(t){t(e[e.instanceName])})):new Promise((function(t){e.amapui.load(["ui/misc/PathSimplifier"],(function(n){e[e.instanceName]=new n({zIndex:100,map:e.map,getPath:function(e,t){return e.path},getHoverTitle:function(e,t,n){return n>=0?e.name+"\uff0c\u70b9:"+n+"/"+e.path.length:e.name+"\uff0c\u70b9\u6570\u91cf"+e.path.length},renderOptions:{pathLineStyle:{strokeStyle:"red",lineWidth:6,dirArrowStyle:!0}}});var o=e.exposeInstance(e.props);o&&e.bindEvents(o),e.initPage(n),t(e[e.instanceName])}))}))}},{key:"initPage",value:function(e){this.pathSimplifier.setData([{name:"\u8f68\u8ff90",path:[[100.340417,27.376994],[108.426354,37.827452],[113.392174,31.208439],[124.905846,42.232876]]},{name:"\u5927\u5730\u7ebf",path:e.getGeodesicPath([116.405289,39.904987],[87.61792,43.793308],500)}]);var t=this.pathSimplifier.createPathNavigator(0,{loop:!0,speed:1e6});t.start()}},{key:"componentWillUnmount",value:function(){console.log(this.instanceName+" unmount"),this[this.instanceName].hide(),delete this[this.instanceName]}}]),t}(d.default);t.default=v,e.exports=t["default"]}}]);