text: /*!
   * 
   *          iclient-mapboxgl.(http://iclient.supermap.io)
   *          Copyright© 2000 - 2019 SuperMap Software Co.Ltd
   *          license: Apache-2.0
   *          version: v10.0.0
   *         
   */!function(e){var t={};function r(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:s})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=18)}([function(e,t){e.exports=mapboxgl},function(e,t){e.exports=function(){try{return mapv}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return THREE}catch(e){return{}}}()},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){e.exports=function(){try{return convert}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return XLSX}catch(e){return{}}}()},function(e,t,r){var s,i,a;i=[t,e],void 0===(a="function"==typeof(s=function(e,t){"use strict";var r={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function s(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e){var t=document.getElementById(e);document.getElementsByTagName("head")[0].removeChild(t)}t.exports=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=e,n=t.timeout||r.timeout,o=t.jsonpCallback||r.jsonpCallback,l=void 0;return new Promise(function(r,h){var u=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),c=o+"_"+u;window[u]=function(e){r({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),i(c),s(u)},a+=-1===a.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+a+o+"="+u),d.id=c,document.getElementsByTagName("head")[0].appendChild(d),l=setTimeout(function(){h(new Error("JSONP request to "+e+" timed out")),s(u),i(c)},n)})}})?s.apply(t,i):s)||(e.exports=a)},function(e,t){e.exports=function(){try{return canvg}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return echarts}catch(e){return{}}}()},function(e,t,r){(function(t){var r=9007199254740991,s="[object Arguments]",i="[object Function]",a="[object GeneratorFunction]",n="[object Map]",o="[object Set]",l=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,u="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,d=u||c||Function("return this")();function p(e,t){return function(e,t){for(var r=-1,s=e?e.length:0,i=Array(s);++r<s;)i[r]=t(e[r],r,e);return i}(t,function(t){return[t,e[t]]})}var m,f,y,g=Function.prototype,v=Object.prototype,S=d["__core-js_shared__"],b=(m=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",x=g.toString,C=v.hasOwnProperty,_=v.toString,T=RegExp("^"+x.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=v.propertyIsEnumerable,w=(f=Object.keys,y=Object,function(e){return f(y(e))}),A=U(d,"DataView"),L=U(d,"Map"),P=U(d,"Promise"),N=U(d,"Set"),M=U(d,"WeakMap"),O=J(A),I=J(L),F=J(P),R=J(N),D=J(M);function k(e,t){var r=V(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&z(e)}(e)&&C.call(e,"callee")&&(!E.call(e,"callee")||_.call(e)==s)}(e)?function(e,t){for(var r=-1,s=Array(e);++r<e;)s[r]=t(r);return s}(e.length,String):[],i=r.length,a=!!i;for(var n in e)!t&&!C.call(e,n)||a&&("length"==n||H(n,i))||r.push(n);return r}function B(e){return!(!q(e)||b&&b in e)&&(W(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?T:l).test(J(e))}function G(e){if(r=(t=e)&&t.constructor,s="function"==typeof r&&r.prototype||v,t!==s)return w(e);var t,r,s,i=[];for(var a in Object(e))C.call(e,a)&&"constructor"!=a&&i.push(a);return i}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return B(r)?r:void 0}var j=function(e){return _.call(e)};function H(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e<t}function J(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(A&&"[object DataView]"!=j(new A(new ArrayBuffer(1)))||L&&j(new L)!=n||P&&"[object Promise]"!=j(P.resolve())||N&&j(new N)!=o||M&&"[object WeakMap]"!=j(new M))&&(j=function(e){var t=_.call(e),r="[object Object]"==t?e.constructor:void 0,s=r?J(r):void 0;if(s)switch(s){case O:return"[object DataView]";case I:return n;case F:return"[object Promise]";case R:return o;case D:return"[object WeakMap]"}return t});var V=Array.isArray;function z(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!W(e)}function W(e){var t=q(e)?_.call(e):"";return t==i||t==a}function q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var Y,Q=(Y=function(e){return z(e)?k(e):G(e)},function(e){var t,r,s,i=j(e);return i==n?(t=e,r=-1,s=Array(t.size),t.forEach(function(e,t){s[++r]=[t,e]}),s):i==o?function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}(e):p(e,Y(e))});e.exports=Q}).call(this,r(3))},function(e,t){e.exports=function(){try{return elasticsearch}catch(e){return{}}}()},function(e,t,r){(function(t){!function(r){var s=setTimeout;function i(){}function a(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function n(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn(function(){var r=1===e._state?t.onFulfilled:t.onRejected;if(null!==r){var s;try{s=r(e._value)}catch(e){return void l(t.promise,e)}o(t.promise,s)}else(1===e._state?o:l)(t.promise,e._value)})):e._deferreds.push(t)}function o(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var r=t.then;if(t instanceof a)return e._state=3,e._value=t,void h(e);if("function"==typeof r)return void u((s=r,i=t,function(){s.apply(i,arguments)}),e)}e._state=1,e._value=t,h(e)}catch(t){l(e,t)}var s,i}function l(e,t){e._state=2,e._value=t,h(e)}function h(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,r=e._deferreds.length;t<r;t++)n(e,e._deferreds[t]);e._deferreds=null}function u(e,t){var r=!1;try{e(function(e){r||(r=!0,o(t,e))},function(e){r||(r=!0,l(t,e))})}catch(e){if(r)return;r=!0,l(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var r=new this.constructor(i);return n(this,new function(e,t,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=r}(e,t,r)),r},a.all=function(e){var t=Array.prototype.slice.call(e);return new a(function(e,r){if(0===t.length)return e([]);var s=t.length;function i(a,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if("function"==typeof o)return void o.call(n,function(e){i(a,e)},r)}t[a]=n,0==--s&&e(t)}catch(e){r(e)}}for(var a=0;a<t.length;a++)i(a,t[a])})},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a(function(t){t(e)})},a.reject=function(e){return new a(function(t,r){r(e)})},a.race=function(e){return new a(function(t,r){for(var s=0,i=e.length;s<i;s++)e[s].then(t,r)})},a._immediateFn="function"==typeof t&&function(e){t(e)}||function(e){s(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},a._setImmediateFn=function(e){a._immediateFn=e},a._setUnhandledRejectionFn=function(e){a._unhandledRejectionFn=e},void 0!==e&&e.exports?e.exports=a:r.Promise||(r.Promise=a)}(this)}).call(this,r(17).setImmediate)},function(e,t,r){"use strict";r.r(t);
  /* Copyright© 2000 - 2019 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 s=window.SuperMap=window.SuperMap||{};s.Components=window.SuperMap.Components||{};
  /* Copyright© 2000 - 2019 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 i=s.DataFormat={GEOJSON:"GEOJSON",ISERVER:"ISERVER"},a=s.ServerType={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},n=s.GeometryType={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN"},o=s.QueryOption={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},l=s.JoinType={INNERJOIN:"INNERJOIN",LEFTJOIN:"LEFTJOIN"},h=s.SpatialQueryMode={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"},u=s.SpatialRelationType={CONTAIN:"CONTAIN",INTERSECT:"INTERSECT",WITHIN:"WITHIN"},c=s.MeasureMode={DISTANCE:"DISTANCE",AREA:"AREA"},d=s.Unit={METER:"METER",KILOMETER:"KILOMETER",MILE:"MILE",YARD:"YARD",DEGREE:"DEGREE",MILLIMETER:"MILLIMETER",CENTIMETER:"CENTIMETER",INCH:"INCH",DECIMETER:"DECIMETER",FOOT:"FOOT",SECOND:"SECOND",MINUTE:"MINUTE",RADIAN:"RADIAN"},p=s.BufferRadiusUnit={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},m=s.EngineType={IMAGEPLUGINS:"IMAGEPLUGINS",OGC:"OGC",ORACLEPLUS:"ORACLEPLUS",SDBPLUS:"SDBPLUS",SQLPLUS:"SQLPLUS",UDB:"UDB"},f=s.ThemeGraphTextFormat={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"},y=s.ThemeGraphType={AREA:"AREA",BAR:"BAR",BAR3D:"BAR3D",LINE:"LINE",PIE:"PIE",PIE3D:"PIE3D",POINT:"POINT",RING:"RING",ROSE:"ROSE",ROSE3D:"ROSE3D",STACK_BAR:"STACK_BAR",STACK_BAR3D:"STACK_BAR3D",STEP:"STEP"},g=s.GraphAxesTextDisplayMode={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},v=s.GraduatedMode={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},S=s.RangeMode={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"},b=s.ThemeType={DOTDENSITY:"DOTDENSITY",GRADUATEDSYMBOL:"GRADUATEDSYMBOL",GRAPH:"GRAPH",LABEL:"LABEL",RANGE:"RANGE",UNIQUE:"UNIQUE"},x=s.ColorGradientType={BLACK_WHITE:"BLACKWHITE",BLUE_BLACK:"BLUEBLACK",BLUE_RED:"BLUERED",BLUE_WHITE:"BLUEWHITE",CYAN_BLACK:"CYANBLACK",CYAN_BLUE:"CYANBLUE",CYAN_GREEN:"CYANGREEN",CYAN_WHITE:"CYANWHITE",GREEN_BLACK:"GREENBLACK",GREEN_BLUE:"GREENBLUE",GREEN_ORANGE_VIOLET:"GREENORANGEVIOLET",GREEN_RED:"GREENRED",GREEN_WHITE:"GREENWHITE",PINK_BLACK:"PINKBLACK",PINK_BLUE:"PINKBLUE",PINK_RED:"PINKRED",PINK_WHITE:"PINKWHITE",RAIN_BOW:"RAINBOW",RED_BLACK:"REDBLACK",RED_WHITE:"REDWHITE",SPECTRUM:"SPECTRUM",TERRAIN:"TERRAIN",YELLOW_BLACK:"YELLOWBLACK",YELLOW_BLUE:"YELLOWBLUE",YELLOW_GREEN:"YELLOWGREEN",YELLOW_RED:"YELLOWRED",YELLOW_WHITE:"YELLOWWHITE"},C=s.TextAlignment={TOPLEFT:"TOPLEFT",TOPCENTER:"TOPCENTER",TOPRIGHT:"TOPRIGHT",BASELINELEFT:"BASELINELEFT",BASELINECENTER:"BASELINECENTER",BASELINERIGHT:"BASELINERIGHT",BOTTOMLEFT:"BOTTOMLEFT",BOTTOMCENTER:"BOTTOMCENTER",BOTTOMRIGHT:"BOTTOMRIGHT",MIDDLELEFT:"MIDDLELEFT",MIDDLECENTER:"MIDDLECENTER",MIDDLERIGHT:"MIDDLERIGHT"},_=s.FillGradientMode={NONE:"NONE",LINEAR:"LINEAR",RADIAL:"RADIAL",CONICAL:"CONICAL",SQUARE:"SQUARE"},T=s.AlongLineDirection={NORMAL:"ALONG_LINE_NORMAL",LB_TO_RT:"LEFT_BOTTOM_TO_RIGHT_TOP",LT_TO_RB:"LEFT_TOP_TO_RIGHT_BOTTOM",RB_TO_LT:"RIGHT_BOTTOM_TO_LEFT_TOP",RT_TO_LB:"RIGHT_TOP_TO_LEFT_BOTTOM"},E=s.LabelBackShape={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},w=s.LabelOverLengthMode={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},A=s.DirectionType={EAST:"EAST",NONE:"NONE",NORTH:"NORTH",SOURTH:"SOURTH",WEST:"WEST"},L=s.SideType={LEFT:"LEFT",MIDDLE:"MIDDLE",NONE:"NONE",RIGHT:"RIGHT"},P=s.SupplyCenterType={FIXEDCENTER:"FIXEDCENTER",NULL:"NULL",OPTIONALCENTER:"OPTIONALCENTER"},N=s.TurnType={AHEAD:"AHEAD",BACK:"BACK",END:"END",LEFT:"LEFT",NONE:"NONE",RIGHT:"RIGHT"},M=s.BufferEndType={FLAT:"FLAT",ROUND:"ROUND"},O=s.OverlayOperationType={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},I=s.OutputType={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"},F=s.SmoothMethod={BSPLINE:"BSPLINE",POLISH:"POLISH"},R=s.SurfaceAnalystMethod={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},D=s.DataReturnMode={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},k=s.EditType={ADD:"add",UPDATE:"update",DELETE:"delete"},B=s.TransferTactic={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},G=s.TransferPreference={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},U=s.GridType={CROSS:"CROSS",GRID:"GRID",POINT:"POINT"},j=s.ColorSpaceType={CMYK:"CMYK",RGB:"RGB"},H=s.LayerType={UGC:"UGC",WMS:"WMS",WFS:"WFS",CUSTOM:"CUSTOM"},J=s.UGCLayerType={THEME:"THEME",VECTOR:"VECTOR",GRID:"GRID",IMAGE:"IMAGE"},V=s.StatisticMode={AVERAGE:"AVERAGE",MAX:"MAX",MIN:"MIN",STDDEVIATION:"STDDEVIATION",SUM:"SUM",VARIANCE:"VARIANCE"},z=s.PixelFormat={BIT16:"BIT16",BIT32:"BIT32",BIT64:"BIT64",SINGLE:"SINGLE",DOUBLE:"DOUBLE",UBIT1:"UBIT1",UBIT4:"UBIT4",UBIT8:"UBIT8",UBIT24:"UBIT24",UBIT32:"UBIT32"},W=s.SearchMode={KDTREE_FIXED_COUNT:"KDTREE_FIXED_COUNT",KDTREE_FIXED_RADIUS:"KDTREE_FIXED_RADIUS",NONE:"NONE",QUADTREE:"QUADTREE"},q=s.InterpolationAlgorithmType={KRIGING:"KRIGING",SimpleKriging:"SimpleKriging",UniversalKriging:"UniversalKriging"},Y=s.VariogramMode={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"},Q=s.Exponent={EXP1:"EXP1",EXP2:"EXP2"},X=s.ClientType={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},K=s.ChartType={BAR:"Bar",BAR3D:"Bar3D",CIRCLE:"Circle",PIE:"Pie",POINT:"Point",LINE:"Line",RING:"Ring"},Z=s.ClipAnalystMode={CLIP:"clip",INTERSECT:"intersect"},$=s.AnalystAreaUnit={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},ee=s.AnalystSizeUnit={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},te=s.StatisticAnalystMode={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},re=s.SummaryType={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},se=s.TopologyValidatorRule={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"},ie=s.AggregationType={GEOHASH_GRID:"geohash_grid",FILTER:"filter"},ae=s.AggregationQueryBuilderType={GEO_BOUNDING_BOX:"geo_bounding_box"},ne=s.GetFeatureMode={BOUNDS:"BOUNDS",BUFFER:"BUFFER",ID:"ID",SPATIAL:"SPATIAL",SQL:"SQL"},oe=s.RasterFunctionType={NDVI:"NDVI",HILLSHADE:"HILLSHADE"};
  /* Copyright© 2000 - 2019 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 le{constructor(e,t){this.w=e?parseFloat(e):0,this.h=e?parseFloat(t):0,this.CLASS_NAME="SuperMap.Size"}toString(){return"w="+this.w+",h="+this.h}clone(){return new le(this.w,this.h)}equals(e){var t=!1;return null!=e&&(t=this.w===e.w&&this.h===e.h||isNaN(this.w)&&isNaN(this.h)&&isNaN(e.w)&&isNaN(e.h)),t}destroy(){this.w=null,this.h=null}}s.Size=le;
  /* Copyright© 2000 - 2019 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 he{constructor(e,t,r){this.x=e?parseFloat(e):0,this.y=t?parseFloat(t):0,this.mode=r,this.CLASS_NAME="SuperMap.Pixel",s.Pixel.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"}}toString(){return"x="+this.x+",y="+this.y}clone(){return new he(this.x,this.y,this.mode)}equals(e){var t=!1;return null!=e&&(t=this.x==e.x&&this.y==e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}add(e,t){if(null==e||null==t)throw new TypeError("Pixel.add cannot receive null values");return new he(this.x+e,this.y+t)}offset(e){var t=this.clone();return e&&(t=this.add(e.x,e.y)),t}destroy(){this.x=null,this.y=null,this.mode=null}}s.Pixel=he,
  /* Copyright© 2000 - 2019 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.*/
  s.inherit=function(e,t){var r,i,a,n=function(){};for(n.prototype=t.prototype,e.prototype=new n,r=2,i=arguments.length;r<i;r++)"function"==typeof(a=arguments[r])&&(a=a.prototype),s.Util.extend(e.prototype,a)},s.mixin=function(...e){class t{constructor(t){for(var r=0;r<e.length;r++)i(this,new e[r](t))}}for(var r=0;r<e.length;r++){var s=e[r];i(t,s),i(t.prototype,s.prototype),i(t.prototype,new s)}return t;function i(e,t){var r=Object.getOwnPropertyNames(t);Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t)));for(var s=0;s<r.length;s++){var i=r[s];if("constructor"!==i&&"prototype"!==i&&"name"!==i&&"length"!==i){let r=Object.getOwnPropertyDescriptor(t,i);window.ActiveXObject?Object.defineProperty(e,i,r||{}):Object.defineProperty(e,i,r)}}}};var ue=s.String={startsWith:function(e,t){return 0==e.indexOf(t)},contains:function(e,t){return-1!=e.indexOf(t)},trim:function(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(e){for(var t=e.split("-"),r=t[0],s=1,i=t.length;s<i;s++){var a=t[s];r+=a.charAt(0).toUpperCase()+a.substring(1)}return r},format:function(e,t,r){t||(t=window);return e.replace(s.String.tokenRegEx,function(e,s){for(var i,a=s.split(/\.+/),n=0;n<a.length;n++)0==n&&(i=t),i=i[a[n]];return"function"==typeof i&&(i=r?i.apply(null,r):i()),void 0===i?"undefined":i})},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(e){return s.String.numberRegEx.test(e)},numericIf:function(e){return s.String.isNumeric(e)?parseFloat(e):e}},ce=s.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(e,t){var r=0;return t>0&&(r=parseFloat(e.toPrecision(t))),r},format:function(e,t,r,i){t=void 0!==t?t:0,r=void 0!==r?r:s.Number.thousandsSeparator,i=void 0!==i?i:s.Number.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var a=e.toString().split(".");1===a.length&&null==t&&(t=0);var n,o=a[0];if(r)for(var l=/(-?[0-9]+)([0-9]{3})/;l.test(o);)o=o.replace(l,"$1"+r+"$2");if(0==t)n=o;else{var h=a.length>1?a[1]:"0";null!=t&&(h+=new Array(t-h.length+1).join("0")),n=o+i+h}return n}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return ce.limitSigDigs(this,e)});var de,pe,me,fe=s.Function={bind:function(e,t){var r=Array.prototype.slice.apply(arguments,[2]);return function(){var s=r.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,s)}},bindAsEventListener:function(e,t){return function(r){return e.call(t,r||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},ye=(s.Array={filter:function(e,t,r){var s=[];if(Array.prototype.filter)s=e.filter(t,r);else{var i=e.length;if("function"!=typeof t)throw new TypeError;for(var a=0;a<i;a++)if(a in e){var n=e[a];t.call(r,n,a,e)&&s.push(n)}}return s}},s.Util=s.Util||{});s.Util.extend=function(e,t){if(e=e||{},t){for(var r in t){var s=t[r];void 0!==s&&(e[r]=s)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},s.Util.copy=function(e,t){var r;if(e=e||{},t)for(var s in e)void 0!==(r=t[s])&&(e[s]=r)},s.Util.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"==typeof e[t]&&e[t]instanceof Array){for(var r in e[t])e[t][r].destroy&&e[t][r].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},s.Util.getElement=function(){for(var e=[],t=0,r=arguments.length;t<r;t++){var s=arguments[t];if("string"==typeof s&&(s=document.getElementById(s)),1===arguments.length)return s;e.push(s)}return e},s.Util.isElement=function(e){return!(!e||1!==e.nodeType)},s.Util.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.Util.removeItem=function(e,t){for(var r=e.length-1;r>=0;r--)e[r]===t&&e.splice(r,1);return e},s.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var r=0,s=e.length;r<s;r++)if(e[r]===t)return r;return-1},s.Util.modifyDOMElement=function(e,t,r,s,i,a,n,o){t&&(e.id=t),r&&(e.style.left=r.x+"px",e.style.top=r.y+"px"),s&&(e.style.width=s.w+"px",e.style.height=s.h+"px"),i&&(e.style.position=i),a&&(e.style.border=a),n&&(e.style.overflow=n),parseFloat(o)>=0&&parseFloat(o)<1?(e.style.filter="alpha(opacity="+100*o+")",e.style.opacity=o):1===parseFloat(o)&&(e.style.filter="",e.style.opacity="")},s.Util.applyDefaults=function(e,t){e=e||{};var r="function"==typeof window.Event&&t instanceof window.Event;for(var s in t)(void 0===e[s]||!r&&t.hasOwnProperty&&t.hasOwnProperty(s)&&!e.hasOwnProperty(s))&&(e[s]=t[s]);return!r&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},s.Util.getParameterString=function(e){var t=[];for(var r in e){var s=e[r];if(null!=s&&"function"!=typeof s){var i;if("object"==typeof s&&s.constructor===Array){for(var a,n=[],o=0,l=s.length;o<l;o++)a=s[o],n.push(encodeURIComponent(null===a||void 0===a?"":a));i=n.join(",")}else i=encodeURIComponent(s);t.push(encodeURIComponent(r)+"="+i)}}return t.join("&")},s.Util.urlAppend=function(e,t){var r=e;if(t){var s=(e+" ").split(/[?&]/);r+=" "===s.pop()?t:s.length?"&"+t:"?"+t}return r},s.Util.DEFAULT_PRECISION=14,s.Util.toFloat=function(e,t){return null==t&&(t=s.Util.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},s.Util.rad=function(e){return e*Math.PI/180},s.Util.getParameters=function(e){e=null===e||void 0===e?window.location.href:e;var t="";if(s.String.contains(e,"?")){var r=e.indexOf("?")+1,i=s.String.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(r,i)}for(var a={},n=t.split(/[&;]/),o=0,l=n.length;o<l;++o){var h=n[o].split("=");if(h[0]){var u=h[0];try{u=decodeURIComponent(u)}catch(e){u=unescape(u)}var c=(h[1]||"").replace(/\+/g," ");try{c=decodeURIComponent(c)}catch(e){c=unescape(c)}1==(c=c.split(",")).length&&(c=c[0]),a[u]=c}}return a},s.Util.lastSeqID=0,s.Util.createUniqueID=function(e){return null==e&&(e="id_"),s.Util.lastSeqID+=1,e+s.Util.lastSeqID},s.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36},s.INCHES_PER_UNIT.in=s.INCHES_PER_UNIT.inches,s.INCHES_PER_UNIT.degrees=s.INCHES_PER_UNIT.dd,s.INCHES_PER_UNIT.nmi=1852*s.INCHES_PER_UNIT.m,s.METERS_PER_INCH=.0254000508001016,s.Util.extend(s.INCHES_PER_UNIT,{Inch:s.INCHES_PER_UNIT.inches,Meter:1/s.METERS_PER_INCH,Foot:.3048006096012192/s.METERS_PER_INCH,IFoot:.3048/s.METERS_PER_INCH,ClarkeFoot:.3047972651151/s.METERS_PER_INCH,SearsFoot:.30479947153867626/s.METERS_PER_INCH,GoldCoastFoot:.3047997101815088/s.METERS_PER_INCH,IInch:.0254/s.METERS_PER_INCH,MicroInch:254e-7/s.METERS_PER_INCH,Mil:2.54e-8/s.METERS_PER_INCH,Centimeter:.01/s.METERS_PER_INCH,Kilometer:1e3/s.METERS_PER_INCH,Yard:.9144018288036576/s.METERS_PER_INCH,SearsYard:.914398414616029/s.METERS_PER_INCH,IndianYard:.9143985307444408/s.METERS_PER_INCH,IndianYd37:.91439523/s.METERS_PER_INCH,IndianYd62:.9143988/s.METERS_PER_INCH,IndianYd75:.9143985/s.METERS_PER_INCH,IndianFoot:.30479951/s.METERS_PER_INCH,IndianFt37:.30479841/s.METERS_PER_INCH,IndianFt62:.3047996/s.METERS_PER_INCH,IndianFt75:.3047995/s.METERS_PER_INCH,Mile:1609.3472186944373/s.METERS_PER_INCH,IYard:.9144/s.METERS_PER_INCH,IMile:1609.344/s.METERS_PER_INCH,NautM:1852/s.METERS_PER_INCH,"Lat-66":110943.31648893273/s.METERS_PER_INCH,"Lat-83":110946.25736872235/s.METERS_PER_INCH,Decimeter:.1/s.METERS_PER_INCH,Millimeter:.001/s.METERS_PER_INCH,Dekameter:10/s.METERS_PER_INCH,Decameter:10/s.METERS_PER_INCH,Hectometer:100/s.METERS_PER_INCH,GermanMeter:1.0000135965/s.METERS_PER_INCH,CaGrid:.999738/s.METERS_PER_INCH,ClarkeChain:20.1166194976/s.METERS_PER_INCH,GunterChain:20.11684023368047/s.METERS_PER_INCH,BenoitChain:20.116782494375872/s.METERS_PER_INCH,SearsChain:20.11676512155/s.METERS_PER_INCH,ClarkeLink:.201166194976/s.METERS_PER_INCH,GunterLink:.2011684023368047/s.METERS_PER_INCH,BenoitLink:.20116782494375873/s.METERS_PER_INCH,SearsLink:.2011676512155/s.METERS_PER_INCH,Rod:5.02921005842012/s.METERS_PER_INCH,IntnlChain:20.1168/s.METERS_PER_INCH,IntnlLink:.201168/s.METERS_PER_INCH,Perch:5.02921005842012/s.METERS_PER_INCH,Pole:5.02921005842012/s.METERS_PER_INCH,Furlong:201.1684023368046/s.METERS_PER_INCH,Rood:3.778266898/s.METERS_PER_INCH,CapeFoot:.3047972615/s.METERS_PER_INCH,Brealey:375/s.METERS_PER_INCH,ModAmFt:.304812252984506/s.METERS_PER_INCH,Fathom:1.8288/s.METERS_PER_INCH,"NautM-UK":1853.184/s.METERS_PER_INCH,"50kilometers":5e4/s.METERS_PER_INCH,"150kilometers":15e4/s.METERS_PER_INCH}),s.Util.extend(s.INCHES_PER_UNIT,{mm:s.INCHES_PER_UNIT.Meter/1e3,cm:s.INCHES_PER_UNIT.Meter/100,dm:100*s.INCHES_PER_UNIT.Meter,km:1e3*s.INCHES_PER_UNIT.Meter,kmi:s.INCHES_PER_UNIT.nmi,fath:s.INCHES_PER_UNIT.Fathom,ch:s.INCHES_PER_UNIT.IntnlChain,link:s.INCHES_PER_UNIT.IntnlLink,"us-in":s.INCHES_PER_UNIT.inches,"us-ft":s.INCHES_PER_UNIT.Foot,"us-yd":s.INCHES_PER_UNIT.Yard,"us-ch":s.INCHES_PER_UNIT.GunterChain,"us-mi":s.INCHES_PER_UNIT.Mile,"ind-yd":s.INCHES_PER_UNIT.IndianYd37,"ind-ft":s.INCHES_PER_UNIT.IndianFt37,"ind-ch":20.11669506/s.METERS_PER_INCH}),s.DOTS_PER_INCH=96,s.Util.normalizeScale=function(e){return e>1?1/e:e},s.Util.getResolutionFromScale=function(e,t){var r;e&&(null==t&&(t="degrees"),r=1/(s.Util.normalizeScale(e)*s.INCHES_PER_UNIT[t]*s.DOTS_PER_INCH));return r},s.Util.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*s.INCHES_PER_UNIT[t]*s.DOTS_PER_INCH},s.IS_GECKO=-1===(de=navigator.userAgent.toLowerCase()).indexOf("webkit")&&-1!==de.indexOf("gecko"),s.Browser=function(){var e,t="",r="",s="pc",i=navigator.userAgent.toLowerCase();return i.indexOf("msie")>-1||i.indexOf("trident")>-1&&i.indexOf("rv")>-1?(t="msie",e=i.match(/msie ([\d.]+)/)||i.match(/rv:([\d.]+)/)):i.indexOf("chrome")>-1?(t="chrome",e=i.match(/chrome\/([\d.]+)/)):i.indexOf("firefox")>-1?(t="firefox",e=i.match(/firefox\/([\d.]+)/)):i.indexOf("opera")>-1?(t="opera",e=i.match(/version\/([\d.]+)/)):i.indexOf("safari")>-1&&(t="safari",e=i.match(/version\/([\d.]+)/)),r=e?e[1]:"",i.indexOf("ipad")>-1||i.indexOf("ipod")>-1||i.indexOf("iphone")>-1?s="apple":i.indexOf("android")>-1&&(r=(e=i.match(/version\/([\d.]+)/))?e[1]:"",s="android"),{name:t,version:r,device:s}}(),s.Util.getBrowser=function(){return s.Browser},s.Util.isSupportCanvas=(pe=!0,me=s.Util.getBrowser(),document.createElement("canvas").getContext?("firefox"===me.name&&parseFloat(me.version)<5&&(pe=!1),"safari"===me.name&&parseFloat(me.version)<4&&(pe=!1),"opera"===me.name&&parseFloat(me.version)<10&&(pe=!1),"msie"===me.name&&parseFloat(me.version)<9&&(pe=!1)):pe=!1,pe),s.Util.supportCanvas=function(){return s.Util.isSupportCanvas},s.INCHES_PER_UNIT.degree=s.INCHES_PER_UNIT.dd,s.INCHES_PER_UNIT.meter=s.INCHES_PER_UNIT.m,s.INCHES_PER_UNIT.foot=s.INCHES_PER_UNIT.ft,s.INCHES_PER_UNIT.inch=s.INCHES_PER_UNIT.inches,s.INCHES_PER_UNIT.mile=s.INCHES_PER_UNIT.mi,s.INCHES_PER_UNIT.kilometer=s.INCHES_PER_UNIT.km,s.INCHES_PER_UNIT.yard=s.INCHES_PER_UNIT.yd,s.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),r=document.location.toString(),s=r.indexOf("//");if(-1===t)return!0;var i,a=i=e.substring(0,t),n=r.substring(s+2);s=n.indexOf("/");var o=n.indexOf(":"),l=n.substring(0,s),h=document.location.protocol;if(-1!==o||(l+=":"+("http:"===h.toLowerCase()?80:443)),h.toLowerCase()!==a.toLowerCase())return!1;var u=(a=e.substring(t+2)).indexOf(":");t=a.indexOf("/");var c,d=a.substring(0,t);return-1!==u?c=a.substring(0,u):(c=a.substring(0,t),d+=":"+("http:"===i.toLowerCase()?80:443)),c===document.domain&&d===l},s.Util.calculateDpi=function(e,t,r,s,i){if(e&&t&&r){var a,n=e.getWidth(),o=e.getHeight(),l=t.w,h=t.h;if(i=i||6378137,"degree"===(s=s||"degrees").toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()){let e=n/l,t=o/h;a=254/(e>t?e:t)/r/(2*Math.PI*i/360)/1e4}else{a=254/(n/l)/r/1e4}return a}},s.Util.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","&lt;")).replace(">","&gt;")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var r=[],i=0,a=t.length;i<a;i++)r.push(s.Util.toJSON(t[i]));return"["+r.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){let e=[];for(let r=0,i=t.length;r<i;r++)e.push(s.Util.toJSON(t[r]));return"["+e.join(",")+"]"}let e=[];for(let r in t)"function"!=typeof t[r]&&"CLASS_NAME"!==r&&"parent"!==r&&e.push("'"+r+"':"+s.Util.toJSON(t[r]));return e.length>0?"{"+e.join(",")+"}":"{}"}return t.toString()}},s.Util.getResolutionFromScaleDpi=function(e,t,r,i){return i=i||6378137,r=r||"",e>0&&t>0?(e=s.Util.normalizeScale(e),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*i/360)/1e4:254/t/e/1e4):-1},s.Util.getScaleFromResolutionDpi=function(e,t,r,s){return s=s||6378137,r=r||"",e>0&&t>0?"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*s/360)/1e4:254/t/e/1e4:-1},s.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},s.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var r in t){var s=t[r];void 0!==s&&"CLASS_NAME"!==r&&"function"!=typeof s&&(e[r]=s)}return e},s.Util.copyAttributesWithClip=function(e,t,r){if(e=e||{},t)for(var s in t){var i=!1;if(r&&r.length)for(var a=0,n=r.length;a<n;a++)if(s===r[a]){i=!0;break}if(!0!==i){var o=t[s];void 0!==o&&"CLASS_NAME"!==s&&"function"!=typeof o&&(e[s]=o)}}return e},s.Util.cloneObject=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date){let t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array){return e.slice(0)}if(e instanceof Object){let r={};for(var t in e)e.hasOwnProperty(t)&&(r[t]=s.Util.cloneObject(e[t]));return r}throw new Error("Unable to copy obj! Its type isn't supported.")},s.Util.lineIntersection=function(e,t,r,i){var a,n,o=null,l=(i.x-r.x)*(e.y-r.y)-(i.y-r.y)*(e.x-r.x),h=(t.x-e.x)*(e.y-r.y)-(t.y-e.y)*(e.x-r.x),u=(i.y-r.y)*(t.x-e.x)-(i.x-r.x)*(t.y-e.y);if(0!=u)n=h/u,o=(a=l/u)>=0&&n<=1&&a<=1&&n>=0?new s.Geometry.Point(e.x+a*(t.x-e.x),e.y+a*(t.y-e.y)):"No Intersection";else if(0==l&&0==h){var c=Math.max(e.y,t.y),d=Math.min(e.y,t.y),p=Math.max(e.x,t.x),m=Math.min(e.x,t.x);o=(r.y>=d&&r.y<=c||i.y>=d&&i.y<=c)&&r.x>=m&&r.x<=p||i.x>=m&&i.x<=p?"Coincident":"Parallel"}else o="Parallel";return o},s.Util.getTextBounds=function(e,t,r){document.body.appendChild(r),r.style.width="auto",r.style.height="auto",e.fontSize&&(r.style.fontSize=e.fontSize),e.fontFamily&&(r.style.fontFamily=e.fontFamily),e.fontWeight&&(r.style.fontWeight=e.fontWeight),r.style.position="relative",r.style.visibility="hidden",r.style.display="inline-block",r.innerHTML=t;var s=r.clientWidth,i=r.clientHeight;return document.body.removeChild(r),{textWidth:s,textHeight:i}};
  /* Copyright© 2000 - 2019 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 ge{constructor(e,t){ye.isArray(e)&&(t=e[1],e=e[0]),this.lon=e?ye.toFloat(e):0,this.lat=t?ye.toFloat(t):0,this.CLASS_NAME="SuperMap.LonLat"}toString(){return"lon="+this.lon+",lat="+this.lat}toShortString(){return this.lon+","+this.lat}clone(){return new ge(this.lon,this.lat)}add(e,t){if(null==e||null==t)throw new TypeError("LonLat.add cannot receive null values");return new ge(this.lon+ye.toFloat(e),this.lat+ye.toFloat(t))}equals(e){var t=!1;return null!=e&&(t=this.lon===e.lon&&this.lat===e.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(e.lon)&&isNaN(e.lat)),t}wrapDateLine(e){var t=this.clone();if(e){for(;t.lon<e.left;)t.lon+=e.getWidth();for(;t.lon>e.right;)t.lon-=e.getWidth()}return t}destroy(){this.lon=null,this.lat=null}static fromString(e){var t=e.split(",");return new ge(t[0],t[1])}static fromArray(e){var t=ye.isArray(e),r=t&&e[0],s=t&&e[1];return new ge(r,s)}}
  /* Copyright© 2000 - 2019 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 ve{constructor(e,t,r,s){ye.isArray(e)&&(s=e[3],r=e[2],t=e[1],e=e[0]),this.left=null!=e?ye.toFloat(e):this.left,this.bottom=null!=t?ye.toFloat(t):this.bottom,this.right=null!=r?ye.toFloat(r):this.right,this.top=null!=s?ye.toFloat(s):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new ve(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var r=Math.pow(10,e),s=Math.round(this.left*r)/r,i=Math.round(this.bottom*r)/r,a=Math.round(this.right*r)/r,n=Math.round(this.top*r)/r;return!0===t?i+","+s+","+n+","+a:s+","+i+","+a+","+n}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new le(this.getWidth(),this.getHeight())}getCenterPixel(){return new he((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new ge((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var r,s;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(r=t.lon,s=t.lat):(r=t.x,s=t.y);var i=(this.left-r)*e+r,a=(this.bottom-s)*e+s,n=(this.right-r)*e+r,o=(this.top-s)*e+s;return new ve(i,a,n,o)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new ve(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new ve(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new ve(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var r=this.contains(e.lon,e.lat,t.inclusive),s=t.worldBounds;if(s&&!r){var i=s.getWidth(),a=(s.left+s.right)/2,n=Math.round((e.lon-a)/i);r=this.containsLonLat({lon:e.lon-n*i,lat:e.lat},{inclusive:t.inclusive})}return r}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,r){if(null==r&&(r=!0),null==e||null==t)return!1;return r?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var r=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else r=this;null==t.inclusive&&(t.inclusive=!0);var s=!1,i=r.left===e.right||r.right===e.left||r.top===e.bottom||r.bottom===e.top;if(t.inclusive||!i){var a=e.bottom>=r.bottom&&e.bottom<=r.top||r.bottom>=e.bottom&&r.bottom<=e.top,n=e.top>=r.bottom&&e.top<=r.top||r.top>e.bottom&&r.top<e.top,o=e.left>=r.left&&e.left<=r.right||r.left>=e.left&&r.left<=e.right,l=e.right>=r.left&&e.right<=r.right||r.right>=e.left&&r.right<=e.right;s=(a||n)&&(o||l)}if(t.worldBounds&&!s){var h=t.worldBounds,u=h.getWidth(),c=!h.containsBounds(r),d=!h.containsBounds(e);c&&!d?(e=e.add(-u,0),s=r.intersectsBounds(e,{inclusive:t.inclusive})):d&&!c&&(r=r.add(-u,0),s=e.intersectsBounds(r,{inclusive:t.inclusive}))}return s}containsBounds(e,t,r){null==t&&(t=!1),null==r&&(r=!0);var s=this.contains(e.left,e.bottom,r),i=this.contains(e.right,e.bottom,r),a=this.contains(e.left,e.top,r),n=this.contains(e.right,e.top,r);return t?s||i||a||n:s&&i&&a&&n}determineQuadrant(e){var t="",r=this.getCenterLonLat();return t+=e.lat<r.lat?"b":"t",t+=e.lon<r.lon?"l":"r"}wrapDateLine(e,t){var r=(t=t||{}).leftTolerance||0,s=t.rightTolerance||0,i=this.clone();if(e){for(var a=e.getWidth();i.left<e.left&&i.right-s<=e.left;)i=i.add(a,0);for(;i.left+r>=e.right&&i.right>e.right;)i=i.add(-a,0);var n=i.left+r;n<e.right&&n>e.left&&i.right-s>e.right&&(i=i.add(-a,0))}return i}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var r=e.split(",");return ve.fromArray(r,t)}static fromArray(e,t){return!0===t?new ve(e[1],e[0],e[3],e[2]):new ve(e[0],e[1],e[2],e[3])}static fromSize(e){return new ve(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}s.Bounds=ve;
  /* Copyright© 2000 - 2019 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 Se{constructor(){this.CLASS_NAME="SuperMap.Geometry",this.id=ye.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null}destroy(){this.id=null,this.bounds=null,this.SRID=null}clone(){return new Se}setBounds(e){e&&(this.bounds=e.clone())}clearBounds(){this.bounds=null,this.parent&&this.parent.clearBounds()}extendBounds(e){this.getBounds()?this.bounds.extend(e):this.setBounds(e)}getBounds(){return null==this.bounds&&this.calculateBounds(),this.bounds}calculateBounds(){}getVertices(e){}getArea(){return 0}}s.Geometry=Se;
  /* Copyright© 2000 - 2019 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 be extends Se{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new be,t=0,r=this.components.length;t<r;t++)e.addComponent(this.components[t].clone());return ye.applyDefaults(e,this),e}getComponentsString(){for(var e=[],t=0,r=this.components.length;t<r;t++)e.push(this.components[t].toShortString());return e.join(",")}calculateBounds(){this.bounds=null;var e=new ve,t=this.components;if(t)for(var r=0,s=t.length;r<s;r++)e.extend(t[r].getBounds());null!=e.left&&null!=e.bottom&&null!=e.right&&null!=e.top&&this.setBounds(e)}addComponents(e){ye.isArray(e)||(e=[e]);for(var t=0,r=e.length;t<r;t++)this.addComponent(e[t])}addComponent(e,t){var r=!1;if(e&&(null==this.componentTypes||ye.indexOf(this.componentTypes,e.CLASS_NAME)>-1)){if(null!=t&&t<this.components.length){var s=this.components.slice(0,t),i=this.components.slice(t,this.components.length);s.push(e),this.components=s.concat(i)}else this.components.push(e);e.parent=this,this.clearBounds(),r=!0}return r}removeComponents(e){var t=!1;ye.isArray(e)||(e=[e]);for(var r=e.length-1;r>=0;--r)t=this.removeComponent(e[r])||t;return t}removeComponent(e){return ye.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,r=this.components.length;t<r;t++)e+=this.components[t].getArea();return e}equals(e){var t=!0;if(e&&e.CLASS_NAME&&this.CLASS_NAME===e.CLASS_NAME)if(ye.isArray(e.components)&&e.components.length===this.components.length){for(var r=0,s=this.components.length;r<s;++r)if(!this.components[r].equals(e.components[r])){t=!1;break}}else t=!1;else t=!1;return t}getVertices(e){for(var t=[],r=0,s=this.components.length;r<s;++r)Array.prototype.push.apply(t,this.components[r].getVertices(e));return t}}s.Geometry.Collection=be;
  /* Copyright© 2000 - 2019 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 xe extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.MultiPoint",this.geometryType="MultiPoint"}addPoint(e,t){this.addComponent(e,t)}removePoint(e){this.removeComponent(e)}}s.Geometry.MultiPoint=xe;
  /* Copyright© 2000 - 2019 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 Ce extends xe{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],this.CLASS_NAME="SuperMap.Geometry.Curve",this.geometryType="Curve"}}s.Geometry.Curve=Ce;
  /* Copyright© 2000 - 2019 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 _e extends Se{constructor(e,t,r,s){super(e,t,r,s),this.x=parseFloat(e),this.y=parseFloat(t),this.tag=s||0==s?parseFloat(s):null,this.type=r||"Point",this.CLASS_NAME="SuperMap.Geometry.Point",this.geometryType="Point"}clone(e){return null==e&&(e=new _e(this.x,this.y)),ye.applyDefaults(e,this),e}calculateBounds(){this.bounds=new ve(this.x,this.y,this.x,this.y)}equals(e){var t=!1;return null!=e&&(t=this.x===e.x&&this.y===e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}move(e,t){this.x=this.x+e,this.y=this.y+t,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(e){return[this]}}s.Geometry.Point=_e;
  /* Copyright© 2000 - 2019 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 Te extends Ce{constructor(e){super(e),this.CLASS_NAME="SuperMap.Geometry.LineString",this.geometryType="LineString"}removeComponent(e){var t=this.components&&this.components.length>2;return t&&super.removeComponent.apply(this,arguments),t}getSortedSegments(){for(var e,t,r=this.components.length-1,s=new Array(r),i=0;i<r;++i)e=this.components[i],t=this.components[i+1],e.x<t.x?s[i]={x1:e.x,y1:e.y,x2:t.x,y2:t.y}:s[i]={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return s.sort(function(e,t){return e.x1-t.x1})}getVertices(e){return!0===e?[this.components[0],this.components[this.components.length-1]]:!1===e?this.components.slice(1,this.components.length-1):this.components.slice()}static calculateCircle(e){if(e.length<3)return e;var t={},r=e[0],s=e[1],i=e[2],a=0,n=0,o=!0,l=0,h=0,u=0,c=[],d=(i.y-r.y)/(i.x-r.x),p=i.y-d*i.x;if(i.x!=r.x&&i.y!=r.y&&s.y==d*s.x+p||i.x==r.x&&s.x==r.x||i.y==r.y&&s.y==r.y||i.x==r.x&&i.y==r.y||i.x==s.x&&i.y==s.y||r.x==s.x&&r.y==s.y)c.push(r),c.push(s),c.push(i);else{var m=(s.x*s.x+s.y*s.y-(r.x*r.x+r.y*r.y))*(2*(i.y-r.y))-(i.x*i.x+i.y*i.y-(r.x*r.x+r.y*r.y))*(2*(s.y-r.y)),f=2*(s.x-r.x)*(i.x*i.x+i.y*i.y-(r.x*r.x+r.y*r.y))-2*(i.x-r.x)*(s.x*s.x+s.y*s.y-(r.x*r.x+r.y*r.y)),y=4*((s.x-r.x)*(i.y-r.y)-(i.x-r.x)*(s.y-r.y));t.x=m/y,t.y=f/y;var g=(2*(a=Math.sqrt((r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y)))*a-((r.x-i.x)*(r.x-i.x)+(r.y-i.y)*(r.y-i.y)))/(2*a*a);g=(g=g>=1?1:g)<=-1?-1:g,u=180*Math.acos(g)/Math.PI,n=(u=i.x==r.x?t.x>r.x&&s.x>r.x||t.x<r.x&&s.x<r.x?360-u:u:t.y>d*t.x+p&&s.y>d*s.x+p||t.y<d*t.x+p&&s.y<d*s.x+p?360-u:u)/72,i.y!=r.y?i.x==r.x?i.y>r.y?s.x<r.x&&(o=!1):s.x>r.x&&(o=!1):i.x<r.x?s.y<d*s.x+p&&(o=!1):s.y>d*s.x+p&&(o=!1):i.x>r.x?s.y>r.y&&(o=!1):s.y<r.y&&(o=!1);var v=(r.y-t.y)/(r.x-t.x),S=v>=0?180*Math.atan(v)/Math.PI:Math.abs(180*Math.atan(v)/Math.PI)+90,b=Math.abs(t.y);r.y==b&&b==i.y&&r.x<i.x&&(S+=180);var x=r.y-t.y;c.push(r);for(var C=1;C<72;C++){l=n*C,h=S,o?x>=0?v>=0?h+=l:h=180-(h-90)+l:h=v>0?h-180+l:90-h+l:x>=0?v>=0?h-=l:h=180-(h-90)-l:h=v>=0?h-180-l:90-h-l,h=h*Math.PI/180;var _=t.x+a*Math.cos(h),T=t.y+a*Math.sin(h);c.push(new _e(_,T))}c.push(i)}return c}static createLineEPS(e){var t=[],r=e.length;if(r<2)return e;for(var s=0;s<r;){if("LTypeArc"==e[s].type){var i=Te.createLineArc(t,s,r,e);t=i[0],s=i[1]}else t.push(e[s]),s++}return t}static createLineArc(e,t,r,s){if(0==t){let i=Te.addPointEPS(s,t,r,"LTypeArc");Array.prototype.push.apply(e,i[0]),t=i[1]+1}else if(t==r-1){var i=[s[t-1],s[t]],a=Te.calculateCircle(i);Array.prototype.push.apply(e,a),t++}else{let i=Te.addPointEPS(s,t,r,"LTypeArc");e.pop(),Array.prototype.push.apply(e,i[0]),t=i[1]+1}return[e,t]}static addPointEPS(e,t,r,s){var i,a=[],n=t+1;return 0==t?Array.prototype.push.apply(a,[e[t],e[t+1]]):t==r-1?Array.prototype.push.apply(a,[e[t-1],e[t]]):Array.prototype.push.apply(a,[e[t-1],e[t],e[t+1]]),"LTypeCurve"==s?i=Te.calculatePointsFBZN(a):"LTypeArc"==s&&(i=Te.calculateCircle(a)),[i,n]}}s.Geometry.LineString=Te;
  /* Copyright© 2000 - 2019 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 Ee extends Se{constructor(e,t,r){super(e,t,r),this.x=parseFloat(e),this.y=parseFloat(t),this.text=r.toString(),this.bsInfo={h:null,w:null},this.element=document.createElement("span"),this.CLASS_NAME="SuperMap.Geometry.GeoText",this.geometryType="GeoText"}destroy(){super.destroy(),this.x=null,this.y=null,this.text=null}getCentroid(){return new _e(this.x,this.y)}clone(e){return null==e&&(e=new Ee(this.x,this.y,this.text)),ye.applyDefaults(e,this),e}calculateBounds(){this.bounds=new ve(this.x,this.y,this.x,this.y)}getLabelPxBoundsByLabel(e,t,r,s){var i,a,n,o,l=ye.cloneObject(e),h=(s.label||this.text).split("\n").length;if(t=parseFloat(t),r=parseFloat(r),h>1&&(r=parseFloat(r)*h),s.labelAlign&&"cm"!==s.labelAlign)switch(s.labelAlign){case"lt":l.x+=t/2,l.y+=r/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=r/2;break;case"ct":l.y+=r/2;break;case"cb":l.y-=r/2;break;case"rt":l.x-=t/2,l.y+=r/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=r/2}return this.bsInfo.h=r,this.bsInfo.w=t,i=l.x-parseFloat(t)/2,a=l.y+parseFloat(r)/2,o=l.x+parseFloat(t)/2,n=l.y-parseFloat(r)/2,new ve(i,a,o,n)}getLabelPxBoundsByText(e,t){var r,s,i,a,n=this.getLabelPxSize(t),o=ye.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":o.x+=n.w/2,o.y+=n.h/2;break;case"lm":o.x+=n.w/2;break;case"lb":o.x+=n.w/2,o.y-=n.h/2;break;case"ct":o.y+=n.h/2;break;case"cb":o.y-=n.h/2;break;case"rt":o.x-=n.w/2,o.y+=n.h/2;break;case"rm":o.x-=n.w/2;break;case"rb":o.x-=n.w/2,o.y-=n.h/2}return this.bsInfo.h=n.h,this.bsInfo.w=n.w,r=o.x-n.w/2,s=o.y+n.h/2,a=t.fontStyle&&"italic"===t.fontStyle?o.x+n.w/2+parseInt(parseFloat(t.fontSize)/2):o.x+n.w/2,i=o.y-n.h/2,new ve(r,s,a,i)}getLabelPxSize(e){var t,r,s,i,a=parseFloat(e.strokeWidth);t=e.label||this.text,r=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var n=t.split("\n"),o=n.length;i=o>1?r*o+o+a+.2*r:r+a+.2*r+1,s=0,this.labelWTmp&&s<this.labelWTmp&&(s=this.labelWTmp);for(var l=0;l<o;l++){var h=this.getTextCount(n[l]),u=this.labelWTmp=ye.getTextBounds(e,n[l],this.element).textWidth+1*h.textC+a;s<u&&(s=u)}var c=new Object;return c.h=i,c.w=s,c}getTextCount(e){for(var t={},r=0,s=0,i=0;i<e.length;i++)e.charCodeAt(i)>255?r++:s++;return t.cnC=r,t.enC=s,t.textC=e.length,t}}s.Geometry.GeoText=Ee;
  /* Copyright© 2000 - 2019 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 we extends Te{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var r=!1,s=this.components.pop();null==t&&e.equals(s)||(r=super.addComponent.apply(this,arguments));var i=this.components[0];return super.addComponent.apply(this,[i]),r}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),super.removeComponent.apply(this,arguments);var r=this.components[0];super.addComponent.apply(this,[r])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,r=0,s=this.components.length;r<s-1;r++){var i=this.components[r],a=this.components[r+1];t+=(i.x+a.x)*(a.y-i.y)}e=-t/2}return e}getVertices(e){return!0===e?[]:this.components.slice(0,this.components.length-1)}}s.Geometry.LinearRing=we;
  /* Copyright© 2000 - 2019 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 Ae extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Geometry.MultiLineString",this.geometryType="MultiLineString"}}s.Geometry.MultiLineString=Ae;
  /* Copyright© 2000 - 2019 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 Le extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Polygon"],this.CLASS_NAME="SuperMap.Geometry.MultiPolygon",this.geometryType="MultiPolygon"}}s.Geometry.MultiPolygon=Le;
  /* Copyright© 2000 - 2019 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 Pe extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LinearRing"],this.CLASS_NAME="SuperMap.Geometry.Polygon",this.geometryType="Polygon"}getArea(){var e=0;if(this.components&&this.components.length>0){e+=Math.abs(this.components[0].getArea());for(var t=1,r=this.components.length;t<r;t++)e-=Math.abs(this.components[t].getArea())}return e}}s.Geometry.Polygon=Pe;
  /* Copyright© 2000 - 2019 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 Ne extends Se{constructor(e,t,r,s){super(e,t,r,s),this.x=e,this.y=t,this.width=r,this.height=s,this.CLASS_NAME="SuperMap.Geometry.Rectangle",this.geometryType="Rectangle"}calculateBounds(){this.bounds=new ve(this.x,this.y,this.x+this.width,this.y+this.height)}getArea(){return this.width*this.height}}s.Geometry.Rectangle=Ne;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 Me{constructor(e,t){this.value=e||"",this.name=t||"token",this.CLASS_NAME="SuperMap.Credential"}getUrlParameters(){return this.name+"="+this.value}getValue(){return this.value}destroy(){this.value=null,this.name=null}}Me.CREDENTIAL=null,s.Credential=Me;
  /* Copyright© 2000 - 2019 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.*/
  s.Date={toISOString:function(){if("toISOString"in Date.prototype)return function(e){return e.toISOString()};{function e(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r}return function(t){return isNaN(t.getTime())?"Invalid Date":t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1,2)+"-"+e(t.getUTCDate(),2)+"T"+e(t.getUTCHours(),2)+":"+e(t.getUTCMinutes(),2)+":"+e(t.getUTCSeconds(),2)+"."+e(t.getUTCMilliseconds(),3)+"Z"}}}(),parse:function(e){var t,r=e.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/);if(r&&(r[1]||r[7])){var s=parseInt(r[1],10)||0,i=parseInt(r[2],10)-1||0,a=parseInt(r[3],10)||1;t=new Date(Date.UTC(s,i,a));var n=r[7];if(n){var o=parseInt(r[4],10),l=parseInt(r[5],10),h=parseFloat(r[6]),u=0|h,c=Math.round(1e3*(h-u));if(t.setUTCHours(o,l,u,c),"Z"!==n){var d=-1e3*(60*parseInt(n,10)*60+60*(parseInt(r[8],10)||0));t=new Date(t.getTime()+d)}}}else t=new Date("invalid");return t}};
  /* Copyright© 2000 - 2019 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 Oe=s.Event={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var r=s.Event.element(e);r.parentNode&&(!r.tagName||r.tagName.toUpperCase()!=t.toUpperCase());)r=r.parentNode;return r},observe:function(e,t,r,s){var i=ye.getElement(e);if(s=s||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!i._eventCacheID){var a="eventCacheID_";i.id&&(a=i.id+"_"+a),i._eventCacheID=ye.createUniqueID(a)}var n=i._eventCacheID;this.observers[n]||(this.observers[n]=[]),this.observers[n].push({element:i,name:t,observer:r,useCapture:s}),i.addEventListener?"mousewheel"===t?i.addEventListener(t,r,{useCapture:s,passive:!1}):i.addEventListener(t,r,s):i.attachEvent&&i.attachEvent("on"+t,r)},stopObservingElement:function(e){var t=ye.getElement(e)._eventCacheID;this._removeElementObservers(s.Event.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var r=e[t],i=new Array(r.element,r.name,r.observer,r.useCapture);s.Event.stopObserving.apply(this,i)}},stopObserving:function(e,t,r,i){i=i||!1;var a=ye.getElement(e),n=a._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.detachEvent)&&(t="keydown");var o=!1,l=s.Event.observers[n];if(l)for(var h=0;!o&&h<l.length;){var u=l[h];if(u.name===t&&u.observer===r&&u.useCapture===i){l.splice(h,1),0==l.length&&delete s.Event.observers[n],o=!0;break}h++}return o&&(a.removeEventListener?a.removeEventListener(t,r,i):a&&a.detachEvent&&a.detachEvent("on"+t,r)),o},unloadCache:function(){if(s.Event&&s.Event.observers){for(var e in s.Event.observers){var t=s.Event.observers[e];s.Event._removeElementObservers.apply(this,[t])}s.Event.observers=!1}},CLASS_NAME:"SuperMap.Event"};s.Event=Oe,s.Event.observe(window,"unload",s.Event.unloadCache,!1);
  /* Copyright© 2000 - 2019 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 Ie{constructor(e,t,r,s,i){if(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=e,this.element=null,this.eventTypes=[],this.eventHandler=null,this.fallThrough=s,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,ye.extend(this,i),null!=r)for(var a=0,n=r.length;a<n;a++)this.addEventType(r[a]);null!=t&&this.attachToElement(t),this.CLASS_NAME="SuperMap.Events"}destroy(){for(var e in this.extensions)"boolean"!=typeof this.extensions[e]&&this.extensions[e].destroy();this.extensions=null,this.element&&(Oe.stopObservingElement(this.element),this.element.hasScrollEvent&&Oe.stopObserving(window,"scroll",this.clearMouseListener)),this.element=null,this.listeners=null,this.object=null,this.eventTypes=null,this.fallThrough=null,this.eventHandler=null}addEventType(e){this.listeners[e]||(this.eventTypes.push(e),this.listeners[e]=[])}attachToElement(e){this.element?Oe.stopObservingElement(this.element):(this.eventHandler=fe.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=fe.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,r=this.BROWSER_EVENTS.length;t<r;t++){var s=this.BROWSER_EVENTS[t];this.addEventType(s),Oe.observe(e,s,this.eventHandler)}Oe.observe(e,"dragstart",Oe.stop)}on(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.register(t,e.scope,e[t])}register(e,t,r,s){if(e in Ie&&!this.extensions[e]&&(this.extensions[e]=new Ie[e](this)),null!=r&&-1!==ye.indexOf(this.eventTypes,e)){null==t&&(t=this.object);var i=this.listeners[e];i||(i=[],this.listeners[e]=i,this.extensionCount[e]=0);var a={obj:t,func:r};s?(i.splice(this.extensionCount[e],0,a),"object"==typeof s&&s.extension&&this.extensionCount[e]++):i.push(a)}}registerPriority(e,t,r){this.register(e,t,r,!0)}un(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.unregister(t,e.scope,e[t])}unregister(e,t,r){null==t&&(t=this.object);var s=this.listeners[e];if(null!=s)for(var i=0,a=s.length;i<a;i++)if(s[i].obj===t&&s[i].func===r){s.splice(i,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var r=this.listeners[e];if(r&&0!=r.length){var s;null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var i=0,a=(r=r.slice()).length;i<a;i++){var n=r[i];if(void 0!=(s=n.func.apply(n.obj,[t]))&&0==s)break}return this.fallThrough||Oe.stop(t,!0),s}}handleBrowserEvent(e){var t=e.type,r=this.listeners[t];if(r&&0!=r.length){var s=e.touches;if(s&&s[0]){for(var i,a=0,n=0,o=s.length,l=0;l<o;++l)a+=(i=s[l]).clientX,n+=i.clientY;e.clientX=a/o,e.clientY=n/o}this.includeXY&&(e.xy=this.getMousePosition(e)),this.triggerEvent(t,e)}}clearMouseCache(){this.element.scrolls=null,this.element.lefttop=null;var e=document.body;e&&(0==e.scrollTop&&0==e.scrollLeft||!navigator.userAgent.match(/iPhone/i))&&(this.element.offsets=null)}getMousePosition(e){if(this.includeXY?this.element.hasScrollEvent||(Oe.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var t=ye.getViewportElement();this.element.scrolls=[t.scrollLeft,t.scrollTop]}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=ye.pagePosition(this.element)),new he(e.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],e.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])}}s.Events=Ie,s.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"];
  /* Copyright© 2000 - 2019 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 Fe{constructor(e,t,r){this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=ye.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=t,this.data=null!=r?r:{}}destroy(){this.id=null,this.lonlat=null,this.data=null}}s.Feature=Fe;
  /* Copyright© 2000 - 2019 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 Re extends Fe{constructor(e,t,r){super(null,null,t),this.fid=null,this.geometry=e||null,this.attributes={},t&&(this.attributes=ye.extend(this.attributes,t)),this.bounds=null,this.state=null,this.style=r||null,this.url=null,this.lonlat=null,this.CLASS_NAME="SuperMap.Feature.Vector",s.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"},Re.style={default:{fillColor:"#ee9900",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:.2,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"default",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},delete:{display:"none"}}}destroy(){this.layer&&(this.layer.removeFeatures(this),this.layer=null),this.geometry=null,super.destroy()}clone(){return new Re(this.geometry?this.geometry.clone():null,this.attributes,this.style)}toState(e){if(e===s.State.UPDATE)switch(this.state){case s.State.UNKNOWN:case s.State.DELETE:this.state=e;break;case s.State.UPDATE:case s.State.INSERT:}else if(e===s.State.INSERT)switch(this.state){case s.State.UNKNOWN:break;default:this.state=e}else if(e===s.State.DELETE)switch(this.state){case s.State.INSERT:case s.State.DELETE:break;case s.State.UNKNOWN:case s.State.UPDATE:this.state=e}else e===s.State.UNKNOWN&&(this.state=e)}}s.Feature.Vector=Re;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 De{constructor(e){this.data=null,this.keepData=!1,ye.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}s.Format=De;
  /* Copyright© 2000 - 2019 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 ke extends De{constructor(e){super(e),this.indent="    ",this.space=" ",this.newline="\n",this.level=0,this.pretty=!1,this.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),this.CLASS_NAME="SuperMap.Format.JSON",this.serialize={object:function(e){if(null==e)return"null";if(e.constructor===Date)return this.serialize.date.apply(this,[e]);if(e.constructor===Array)return this.serialize.array.apply(this,[e]);var t,r,s,i=["{"];this.level+=1;var a=!1;for(t in e)e.hasOwnProperty(t)&&(r=this.write.apply(this,[t,this.pretty]),s=this.write.apply(this,[e[t],this.pretty]),null!=r&&null!=s&&(a&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),r,":",this.writeSpace(),s),a=!0));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"}"),i.join("")},array:function(e){var t,r=["["];this.level+=1;for(var s=0,i=e.length;s<i;++s)null!=(t=this.write.apply(this,[e[s],this.pretty]))&&(s>0&&r.push(","),r.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,r.push(this.writeNewline(),this.writeIndent(),"]"),r.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,function(e,r){var s=t[r];return s||(s=r.charCodeAt(),"\\u00"+Math.floor(s/16).toString(16)+(s%16).toString(16))})+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var r;if(this.nativeJSON)try{r=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=r),r}write(e,t){this.pretty=!!t;var r=null,s=typeof e;if(this.serialize[s])try{r=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[s].apply(this,[e])}catch(e){}return r}writeIndent(){var e=[];if(this.pretty)for(var t=0;t<this.level;++t)e.push(this.indent);return e.join("")}writeNewline(){return this.pretty?this.newline:""}writeSpace(){return this.pretty?this.space:""}}s.Format.JSON=ke;
  /* Copyright© 2000 - 2019 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 Be{constructor(e,t,r){this.red=e||0==e?e:255,this.green=t||0,this.blue=r||0,this.CLASS_NAME="SuperMap.ServerColor"}destroy(){this.red=null,this.green=null,this.blue=null}static fromJson(e){if(e){var t=new Be,r=255;null!==e.red&&(r=Number(e.red)),t.red=r;var s=0;null!==e.green&&(s=Number(e.green)),t.green=s;var i=0;return null!==e.blue&&(i=Number(e.blue)),t.blue=i,t}}}s.ServerColor=Be;
  /* Copyright© 2000 - 2019 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 Ge{constructor(e){this.fillBackColor=new Be(255,255,255),this.fillBackOpaque=!1,this.fillForeColor=new Be(255,0,0),this.fillGradientMode=null,this.fillGradientAngle=0,this.fillGradientOffsetRatioX=0,this.fillGradientOffsetRatioY=0,this.fillOpaqueRate=100,this.fillSymbolID=0,this.lineColor=new Be(0,0,0),this.lineSymbolID=0,this.lineWidth=1,this.markerAngle=0,this.markerSize=1,this.markerSymbolID=-1,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerStyle"}destroy(){var e=this;e.fillBackColor&&(e.fillBackColor.destroy(),e.fillBackColor=null),e.fillBackOpaque=null,e.fillForeColor&&(e.fillForeColor.destroy(),e.fillForeColor=null),e.fillGradientMode=null,e.fillGradientAngle=null,e.fillGradientOffsetRatioX=null,e.fillGradientOffsetRatioY=null,e.fillOpaqueRate=null,e.fillSymbolID=null,e.lineColor&&(e.lineColor.destroy(),e.lineColor=null),e.lineSymbolID=null,e.lineWidth=null,e.markerAngle=null,e.markerSize=null,e.markerSymbolID=null}toServerJSONObject(){var e={};return e=ye.copyAttributes(e,this)}static fromJson(e){if(e)return new Ge({fillBackColor:Be.fromJson(e.fillBackColor),fillBackOpaque:e.fillBackOpaque,fillForeColor:Be.fromJson(e.fillForeColor),fillGradientMode:e.fillGradientMode,fillGradientAngle:e.fillGradientAngle,fillGradientOffsetRatioX:e.fillGradientOffsetRatioX,fillGradientOffsetRatioY:e.fillGradientOffsetRatioY,fillOpaqueRate:e.fillOpaqueRate,fillSymbolID:e.fillSymbolID,lineColor:Be.fromJson(e.lineColor),lineSymbolID:e.lineSymbolID,lineWidth:e.lineWidth,markerAngle:e.markerAngle,markerSize:e.markerSize,markerSymbolID:e.markerSymbolID})}}s.ServerStyle=Ge;
  /* Copyright© 2000 - 2019 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 Ue extends _e{constructor(e){super(e),this.measure=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.PointWithMeasure"}equals(e){var t=!1;if(null!=e){var r=this.x===e.x&&this.y===e.y&&this.measure===e.measure,s=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),i=isNaN(e.x)&&isNaN(e.y)&&isNaN(e.measure);t=r||s&&i}return t}toJson(){var e="{";return null!=this.measure&&void 0!=this.measure&&(e+='"measure":'+this.measure+","),e+='"x":'+this.x+",",e+='"y":'+this.y,e+="}"}destroy(){this.measure=null,this.x=null,this.y=null}static fromJson(e){if(e)return new Ue({x:e.x,y:e.y,measure:e.measure})}}s.PointWithMeasure=Ue;
  /* Copyright© 2000 - 2019 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 je extends be{constructor(e,t){super(e,t),this.id=null,this.center=null,this.style=null,this.length=null,this.maxM=null,this.minM=null,this.parts=null,this.points=null,this.type=null,this.componentTypes=["SuperMap.Geometry.LinearRing","SuperMap.Geometry.LineString"],t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.Route",this.geometryType="LINEM"}toJson(){var e="{";if(null!=this.id&&void 0!=this.id&&(e+='"id":'+this.id+","),null!=this.center&&void 0!=this.center&&(e+='"center":'+this.center+","),null!=this.style&&void 0!=this.style&&(e+='"style":'+this.style+","),null!=this.length&&void 0!=this.length&&(e+='"length":'+this.length+","),null!=this.maxM&&void 0!=this.maxM&&(e+='"maxM":'+this.maxM+","),null!=this.minM&&void 0!=this.minM&&(e+='"minM":'+this.minM+","),null!=this.type&&void 0!=this.type&&(e+='"type":"'+this.type+'",'),null!=this.parts&&void 0!=this.parts){e+='"parts":['+this.parts[0];for(var t=1;t<this.parts.length;t++)e+=","+this.parts[t];e+="],"}if(null!=this.components&&this.components.length>0){e+='"points":[';for(var r=0,s=this.components.length;r<s;r++)for(var i=0,a=this.components[r].components.length;i<a;i++)e+=this.components[r].components[i].toJson()+",";e=e.replace(/,$/g,""),e+="]"}return e=e.replace(/,$/g,""),e+="}"}destroy(){var e=this;e.id=null,e.center=null,e.style=null,e.length=null,e.maxM=null,e.minM=null,e.type=null,e.parts=null,e.components.length=0,e.components=null,e.componentTypes=null}static fromJson(e){if(e){var t=e.parts||[],r=e.points||[],s=t.length,i=[];if(!(s>0))return null;for(var a=0,n=0,o=[];a<s;a++){for(var l=0;l<t[a];l++)o.push(Ue.fromJson(r[n+l]));n+=t[a],o[0].equals(o[t[a]-1])?i.push(new we(o)):i.push(new Te(o)),o=[]}return new je(i,{id:e.id,center:e.center,style:e.style,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type,parts:e.parts})}}}s.Route=je;
  /* Copyright© 2000 - 2019 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 He{constructor(e){this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerGeometry"}destroy(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}toGeometry(){var e=this;switch(e.type.toUpperCase()){case n.POINT:return e.toGeoPoint();case n.LINE:return e.toGeoLine();case n.LINEM:return e.toGeoLinem();case n.REGION:return e.toGeoRegion();case n.POINTEPS:return e.toGeoPoint();case n.LINEEPS:return e.toGeoLineEPS();case n.REGIONEPS:return e.toGeoRegionEPS()}}toGeoPoint(){var e=this.parts||[],t=this.points||[],r=e.length;if(r>0){if(1===r)return new _e(t[0].x,t[0].y);var s=[];for(let e=0;e<r;e++)s.push(new _e(t[e].x,t[e].y));return new xe(s)}return null}toGeoLine(){var e=this.parts||[],t=this.points||[],r=e.length;if(r>0){if(1===r){let r=[];for(let s=0;s<e[0];s++)r.push(new _e(t[s].x,t[s].y));return r[0].equals(r[e[0]-1])?new we(r):new Te(r)}{let s=[];for(let i=0;i<r;i++){let r=[];for(let s=0;s<e[i];s++)r.push(new _e(t[s].x,t[s].y));s.push(new Te(r)),t.splice(0,e[i])}return new Ae(s)}}return null}toGeoLineEPS(){var e,t,r,s,i,a=this.parts||[],n=this.points||[],o=a.length;if(o>0){if(1===o){for(e=0,r=[];e<a[0];e++)r.push(new _e(n[e].x,n[e].y,n[e].type));return r[0].equals(r[a[0]-1])?(i=Te.createLineEPS(r),new we(i)):(i=Te.createLineEPS(r),new Te(i))}for(e=0,s=[];e<o;e++){for(t=0,r=[];t<a[e];t++)r.push(new _e(n[t].x,n[t].y));i=Te.createLineEPS(r),s.push(new Te(i)),n.splice(0,a[e])}return new Ae(s)}return null}toGeoLinem(){return je.fromJson(this)}toGeoRegion(){var e=this.parts||[],t=this.partTopo||[],r=this.points||[],s=e.length;if(s<=0)return null;var i=[],a=[];if(1==s){for(let e=0;e<r.length;e++)a.push(new _e(r[e].x,r[e].y));return i.push(new Pe([new we(a)])),new Le(i)}var n=[],o=[],l=[],h=[],u=[];for(let i=0,n=0;i<s;i++){for(let t=0;t<e[i];t++)a.push(new _e(r[n+t].x,r[n+t].y));n+=e[i];var c=new Pe([new we(a)]);a=[],l.push(c),0===t.length&&h.push(c.getBounds()),u.push(1),o.push(c.getArea())}if(He.bubbleSort(o,l,t,h),0===t.length){var d=[];for(let e=1;e<l.length;e++)for(let t=e-1;t>=0;t--)if(d[e]=-1,h[t].containsBounds(h[e])){u[e]=-1*u[t],u[e]<0&&(d[e]=t);break}for(let e=0;e<l.length;e++)u[e]>0?i.push(l[e]):(i[d[e]].components=i[d[e]].components.concat(l[e].components),i.push(""))}else{i=new Array;for(let e=0;e<l.length;e++)if(t[e]&&-1==t[e]?n=n.concat(l[e].components):(n.length>0&&i.length>0&&(i[i.length-1].components=i[i.length-1].components.concat(n),n=[]),i.push(l[e])),e==s-1){var p=i.length;if(p)i[p-1].components=i[p-1].components.concat(n);else for(let e=0,t=n.length;e<t;e++)i.push(new Pe(n))}}return new Le(i)}toGeoRegionEPS(){var e=this.parts||[],t=this.partTopo||[],r=this.points||[],s=e.length;if(s<=0)return null;var i,a=[],n=[];if(1==s){for(var o=0;o<r.length;o++)n.push(new _e(r[o].x,r[o].y));return i=Te.createLineEPS(n),a.push(new Pe([new we(i)])),new Le(a)}var l=[],h=[],u=[],c=[],d=[];for(let a=0,o=0;a<s;a++){for(let t=0;t<e[a];t++)n.push(new _e(r[o+t].x,r[o+t].y));o+=e[a],i=Te.createLineEPS(n);var p=new Pe([new we(i)]);n=[],u.push(p),0===t.length&&c.push(p.getBounds()),d.push(1),h.push(p.getArea())}if(He.bubbleSort(h,u,t,c),0===t.length){var m=[];for(let e=1;e<u.length;e++)for(let t=e-1;t>=0;t--)if(m[e]=-1,c[t].containsBounds(c[e])){d[e]=-1*d[t],d[e]<0&&(m[e]=t);break}for(let e=0;e<u.length;e++)d[e]>0?a.push(u[e]):(a[m[e]].components=a[m[e]].components.concat(u[e].components),a.push(""))}else{a=new Array;for(let e=0;e<u.length;e++)if(t[e]&&-1==t[e]?l=l.concat(u[e].components):(l.length>0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(l),l=[]),a.push(u[e])),e==s-1){var f=a.length;if(f)a[f-1].components=a[f-1].components.concat(l);else for(let e=0,t=l.length;e<t;e++)a.push(new Pe(l))}}return new Le(a)}static fromJson(e){if(e)return new He({id:e.id,style:Ge.fromJson(e.style),parts:e.parts,partTopo:e.partTopo,points:e.points,center:e.center,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type})}static fromGeometry(e){if(e){var t=0,r=[],s=[],i=null,a=e.components,o=e.CLASS_NAME,l={epsgCode:e.SRID};if(isNaN(e.id)||(t=e.id),"SuperMap.Geometry.LinearRing"!=o&&"SuperMap.Geometry.LineString"!=o&&(e instanceof xe||e instanceof Ae)){let e=a.length;for(let t=0;t<e;t++){let e=a[t].getVertices().length;r.push(e);for(let r=0;r<e;r++)s.push(new _e(a[t].getVertices()[r].x,a[t].getVertices()[r].y))}i="SuperMap.Geometry.MultiPoint"==o?n.POINT:n.LINE}else if(e instanceof Le){let e=a.length;for(let t=0;t<e;t++){let e=a[t].components,i=e.length;for(let t=0;t<i;t++){let i=e[t].getVertices().length+1;r.push(i);for(let r=0;r<i-1;r++)s.push(new _e(e[t].getVertices()[r].x,e[t].getVertices()[r].y));s.push(new _e(e[t].getVertices()[0].x,e[t].getVertices()[0].y))}}i=n.REGION}else if(e instanceof Pe){let e=a.length;for(let t=0;t<e;t++){let e=a[t].getVertices().length+1;r.push(e);for(let r=0;r<e-1;r++)s.push(new _e(a[t].getVertices()[r].x,a[t].getVertices()[r].y));s.push(new _e(a[t].getVertices()[0].x,a[t].getVertices()[0].y))}i=n.REGION}else{let t=e.getVertices().length;for(let r=0;r<t;r++)s.push(new _e(e.getVertices()[r].x,e.getVertices()[r].y));e instanceof we&&(s.push(new _e(e.getVertices()[0].x,e.getVertices()[0].y)),t++),r.push(t),i=e instanceof _e?n.POINT:n.LINE}return new He({id:t,style:null,parts:r,points:s,type:i,prjCoordSys:l})}}static IsClockWise(e){var t=e.length;if(t<3)return 0;var r=e[0].y*(e[t-1].x-e[1].x);e.push(e[0]);for(var s=1;s<t;s++)r+=e[s].y*(e[s-1].x-e[s+1].x);return.5*r}static bubbleSort(e,t,r,s){for(var i=0;i<e.length;i++)for(var a=0;a<e.length;a++)if(e[i]>e[a]){var n=e[a];e[a]=e[i],e[i]=n;var o=t[a];if(t[a]=t[i],t[i]=o,r&&r.length>0){var l=r[a];r[a]=r[i],r[i]=l}if(s&&s.length>0){var h=s[a];s[a]=s[i],s[i]=h}}}}s.ServerGeometry=He;
  /* Copyright© 2000 - 2019 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 Je extends ke{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(0==this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new _e(e[0],e[1])},multipoint:function(e){for(var t=[],r=null,s=0,i=e.length;s<i;++s){try{r=this.parseCoords.point.apply(this,[e[s]])}catch(e){throw e}t.push(r)}return new xe(t)},linestring:function(e){for(var t=[],r=null,s=0,i=e.length;s<i;++s){try{r=this.parseCoords.point.apply(this,[e[s]])}catch(e){throw e}t.push(r)}return new Te(t)},multilinestring:function(e){for(var t=[],r=null,s=0,i=e.length;s<i;++s){try{r=this.parseCoords.linestring.apply(this,[e[s]])}catch(e){throw e}t.push(r)}return new Ae(t)},polygon:function(e){for(var t,r,s=[],i=0,a=e.length;i<a;++i){try{r=this.parseCoords.linestring.apply(this,[e[i]])}catch(e){throw e}t=new we(r.components),s.push(t)}return new Pe(s)},multipolygon:function(e){for(var t=[],r=null,s=0,i=e.length;s<i;++s){try{r=this.parseCoords.polygon.apply(this,[e[s]])}catch(e){throw e}t.push(r)}return new Le(t)},box:function(e){if(2!=e.length)throw"GeoJSON box coordinates must have 2 elements";return new Pe([new we([new _e(e[0][0],e[0][1]),new _e(e[1][0],e[0][1]),new _e(e[1][0],e[1][1]),new _e(e[0][0],e[1][1]),new _e(e[0][0],e[0][1])])])}},this.extract={feature:function(e){var t=this.extract.geometry.apply(this,[e.geometry]),r={type:"Feature",properties:this.createAttributes(e),geometry:t};return e.geometry&&"TEXT"===e.geometry.type&&(r.properties.texts=e.geometry.texts,r.properties.textStyle=e.geometry.textStyle),e.fid&&(r.id=e.fid),e.ID&&(r.id=e.ID),r},geometry:function(e){if(null==e)return null;!e.parts&&e.points&&(e.parts=[e.points.length]);var t,r=new He(e).toGeometry()||e,s=r.geometryType||r.type;return"LinearRing"===s&&(s="LineString"),"LINEM"===s&&(s="MultiLineString"),t=this.extract[s.toLowerCase()].apply(this,[r]),"Collection"===(s="TEXT"===s?"Point":s)?{type:"GeometryCollection",geometries:t}:{type:s,coordinates:t}},point:function(e){var t=[e.x,e.y];for(var r in e)"x"===r||"y"===r||null===e[r]||isNaN(e[r])||t.push(e[r]);return t},text:function(e){return[e.points[0].x,e.points[0].y]},multipoint:function(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push(this.extract.point.apply(this,[e.components[r]]));return t},linestring:function(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push(this.extract.point.apply(this,[e.components[r]]));return t},multilinestring:function(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push(this.extract.linestring.apply(this,[e.components[r]]));return t},polygon:function(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push(this.extract.linestring.apply(this,[e.components[r]]));return t},multipolygon:function(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push(this.extract.polygon.apply(this,[e.components[r]]));return t},collection:function(e){for(var t=e.components.length,r=new Array(t),s=0;s<t;++s)r[s]=this.extract.geometry.apply(this,[e.components[s]]);return r}}}read(e,t,r){t=t||"FeatureCollection";var s=null,i=null;if(i="string"==typeof e?super.read(e,r):e){if("string"!=typeof i.type);else if(this.isValidType(i,t))switch(t){case"Geometry":try{s=this.parseGeometry(i)}catch(e){}break;case"Feature":try{(s=this.parseFeature(i)).type="Feature"}catch(e){}break;case"FeatureCollection":switch(s=[],i.type){case"Feature":try{s.push(this.parseFeature(i))}catch(e){s=null}break;case"FeatureCollection":for(var a=0,n=i.features.length;a<n;++a)try{s.push(this.parseFeature(i.features[a]))}catch(e){s=null}break;default:try{var o=this.parseGeometry(i);s.push(new Re(o))}catch(e){s=null}}}}else;return s}write(e,t){return super.write(this.toGeoJSON(e),t)}fromGeoJSON(e,t,r){let s=this.read(e,t,r);return ye.isArray(s)?s.map(e=>this._toiSevrerFeature(e)):this._toiSevrerFeature(s)}toGeoJSON(e){var t={type:null};if(ye.isArray(e)){t.type="FeatureCollection";var r=e.length;t.features=new Array(r);for(var s=0;s<r;++s){var i=e[s];if(a(i)){let e={};e.geometry=i,t.features[s]=this.extract.feature.apply(this,[e])}else t.features[s]=this.extract.feature.apply(this,[i])}}else if(a(e)){let r={};r.geometry=e,t=this.extract.feature.apply(this,[r])}else t=this.extract.feature.apply(this,[e]);function a(e){return e.hasOwnProperty("parts")&&e.hasOwnProperty("points")}return t}isValidType(e,t){var r=!1;switch(t){case"Geometry":-1==ye.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],e.type)||(r=!0);break;case"FeatureCollection":r=!0;break;default:e.type==t&&(r=!0)}return r}parseFeature(e){var t,r,s,i;s=e.properties?e.properties:{},i=e.geometry&&e.geometry.bbox||e.bbox;try{r=this.parseGeometry(e.geometry)}catch(e){throw e}return t=new Re(r,s),i&&(t.bounds=ve.fromArray(i)),e.id&&(t.fid=e.id),t}parseGeometry(e){if(null==e)return null;var t;if("GeometryCollection"==e.type){if(!ye.isArray(e.geometries))throw"GeometryCollection must have geometries array: "+e;for(var r=e.geometries.length,s=new Array(r),i=0;i<r;++i)s[i]=this.parseGeometry.apply(this,[e.geometries[i]]);t=new be(s)}else{if(!ye.isArray(e.coordinates))throw"Geometry must have coordinates array: "+e;if(!this.parseCoords[e.type.toLowerCase()])throw"Unsupported geometry type: "+e.type;try{t=this.parseCoords[e.type.toLowerCase()].apply(this,[e.coordinates])}catch(e){throw e}}return t}createCRSObject(e){var t=e.layer.projection.toString(),r={};if(t.match(/epsg:/i)){var s=parseInt(t.substring(t.indexOf(":")+1));r=4326==s?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+s}}}return r}_toiSevrerFeature(e){const t=e.attributes,r=[],s=[];for(var i in t)r.push(i),s.push(t[i]);const a={fieldNames:r,fieldValues:s,geometry:He.fromGeometry(e.geometry)};return a.geometry.id=e.fid,a}createAttributes(e){if(!e)return null;var t={};!function(e,t){if(!e.hasOwnProperty("fieldNames")||!e.hasOwnProperty("fieldValues"))return;var r=e.fieldNames,s=e.fieldValues;for(var i in r)t[r[i]]=s[i]}(e,t);var r=["fieldNames","fieldValues","geometry","stringID","ID"];for(var s in e)r.indexOf(s)>-1||(t[s]=e[s]);return t}}s.Format.GeoJSON=Je;s.Format.WKT=
  /* Copyright© 2000 - 2019 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 extends De{constructor(e){super(e),this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},this.CLASS_NAME="SuperMap.Format.WKT",this.extract={point:function(e){return e.x+" "+e.y},multipoint(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push("("+this.extract.point.apply(this,[e.components[r]])+")");return t.join(",")},linestring(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push(this.extract.point.apply(this,[e.components[r]]));return t.join(",")},multilinestring(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push("("+this.extract.linestring.apply(this,[e.components[r]])+")");return t.join(",")},polygon(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push("("+this.extract.linestring.apply(this,[e.components[r]])+")");return t.join(",")},multipolygon(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push("("+this.extract.polygon.apply(this,[e.components[r]])+")");return t.join(",")},collection(e){for(var t=[],r=0,s=e.components.length;r<s;++r)t.push(this.extractGeometry.apply(this,[e.components[r]]));return t.join(",")}},this.parse={point:function(e){var t=ue.trim(e).split(this.regExes.spaces);return new Re(new _e(t[0],t[1]))},multipoint:function(e){for(var t,r=ue.trim(e).split(","),s=[],i=0,a=r.length;i<a;++i)t=r[i].replace(this.regExes.trimParens,"$1"),s.push(this.parse.point.apply(this,[t]).geometry);return new Re(new xe(s))},linestring:function(e){for(var t=ue.trim(e).split(","),r=[],s=0,i=t.length;s<i;++s)r.push(this.parse.point.apply(this,[t[s]]).geometry);return new Re(new Te(r))},multilinestring:function(e){for(var t,r=ue.trim(e).split(this.regExes.parenComma),s=[],i=0,a=r.length;i<a;++i)t=r[i].replace(this.regExes.trimParens,"$1"),s.push(this.parse.linestring.apply(this,[t]).geometry);return new Re(new Ae(s))},polygon:function(e){for(var t,r,s,i=ue.trim(e).split(this.regExes.parenComma),a=[],n=0,o=i.length;n<o;++n)t=i[n].replace(this.regExes.trimParens,"$1"),r=this.parse.linestring.apply(this,[t]).geometry,s=new we(r.components),a.push(s);return new Re(new Pe(a))},multipolygon:function(e){for(var t,r=ue.trim(e).split(this.regExes.doubleParenComma),s=[],i=0,a=r.length;i<a;++i)t=r[i].replace(this.regExes.trimParens,"$1"),s.push(this.parse.polygon.apply(this,[t]).geometry);return new Re(new Le(s))},geometrycollection:function(e){e=e.replace(/,\s*([A-Za-z])/g,"|$1");for(var t=ue.trim(e).split("|"),r=[],s=0,i=t.length;s<i;++s)r.push(this.read(t[s]));return r}}}read(e){var t,r,s;e=e.replace(/[\n\r]/g," ");var i=this.regExes.typeStr.exec(e);return i&&(r=i[1].toLowerCase(),s=i[2],this.parse[r]&&(t=this.parse[r].apply(this,[s]))),t}write(e){var t,r,s;e.constructor===Array?(t=e,s=!0):(t=[e],s=!1);var i=[];s&&i.push("GEOMETRYCOLLECTION(");for(var a=0,n=t.length;a<n;++a)s&&a>0&&i.push(","),r=t[a].geometry,i.push(this.extractGeometry(r));return s&&i.push(")"),i.join("")}extractGeometry(e){var t=e.CLASS_NAME.split(".")[2].toLowerCase();return this.extract[t]?("collection"===t?"GEOMETRYCOLLECTION":t.toUpperCase())+"("+this.extract[t].apply(this,[e])+")":null}};
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 Ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAAAdCAYAAAAjHtusAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDozYWZlOGIwMi01MWE3LTRiZjYtYWVkYS05MGQ2ZTQ4YjZiMmUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODg0NkFBQUE3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODg0NkFBQTk3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4MWI3NzdhNC1lZmEyLTQ1MzUtOGQzNi03MmRjNDkyODMzN2UiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpjYTYzODVjMi1jNDQ1LTExN2EtYTc0ZC1lM2I5MzJlMGE4Y2QiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5q1HM0AAAF/ElEQVR42tSabYhUVRjHZ7W01C1uaCRW4F3oi9SXCUnwQ9gsGUFvOEtQH1bLu5VS9sbYh5KicjYt29qiGQwVg2xWWKgocob91AvC+CWsoJqB3qHMSdTMpZyeU/+Df07n3pk7997Z6cBv99z7nHvOvf/z/pxJNZvNVI/jCKXmv6EquAmVkxPSlvtp2GItr0/96fFQForChJAWDiVYTkMYMu4XBFcYjLOwWS3sNwmn8NGzZ0h4Flv/zwIdchAnh/slCGmmKUNIBzYPaXOUr0vPuEjD71JAPh7l61embzinhV3V8nnCGmGT8LwlzSL8/yUh4Tfjo9T/CgnCIYNKycA2Qq21AcHU/VHE80Idoo3Qs0W6p0UtUnkZvEMDeVcCyqxEafF7hL8Qf0oYsIj+lfC9cH1CwhchWAGCtZO+AooQOkdC1Km1VtCb63StW73uFSzgKFUkNwBbmZGGmqowhvg8ZNpH9oXChcIcYRdeNomgxLkaH+S1SGubAxyIpFv+Zp+0DYjrAS00j/dem2VGEl6FJ4Qa4quEu8j2hTCJ+GJhe4JjfQMf6JCYPPbysMPxBlp0BUKOogEF9Rg9/heNvNKYfM0KsZUZaYxX4STGrzJa+zbhPeFH2DcK10KItcI+pI0rVElwXl1ULaKnIJhDw0oRQpTQc1zcbwRU8ATy4DR6yMlTzwkqMziEWHvubJ4Nk4ZtHdnqwvwY17xq3Z4FjrG+z2Kdrdf2ZSGD+xlLPh6t1R0jP9fI22ZzKI92yvQl7EbmBxI4S7Y+vIAOL87QZqsc5uNnssxZIcfYjXT9snCR7jjobidp+FkxA2v+Cq1QervMDmp4P7Xs3YZtE9kOC3P/By6JGaETl8ElwueYTNTDq4UDsKnd7YfCNbT239LF1udS72xYJt1UWxNfN4IIP4bWuTpEja01JtMFZFsm/AHbtHBlDE6yasA4moYTrUbvdBTXHqUrAH4uSadbyzF+vbBM2IsNkS3MNa5305JxqfA02T4TnkX8XOH1mPw8ruVejpxbI9hZD2Cz1U7LdrrUvjP/WfZinNZhr6V27hP+FPZh9aLvLxVO4DllX0G2OcKnlO/DCblxaz6uXBtmi+8mBaP3/SP8IuEIiTRoPPQm2TaEmEyXo0JU+F0YiPFD0hhOsiE/vqeEVwyTgF8L51OilcIZ2I4Ll5NttvAJPfukUeB2sk0ZPSbKIUUJpCII7+DasWy08uhNNazT0wGHI7mAtB7KqMKm38HhDdAUibTVKGicbB8YAqrJ9DRsp43JdB4qUof1HQrPE6XTQWu3Ce/inVzjXhXpMiTwUYugNVQ+p80jrUsV5EH0POKeuXO9QjhFq5GryNYvfEMCDhsftYVsB9ETtG0V9ZjfhCURhbcJFpfwVZ9jvhxsLHwTYtp2svlWQw3vXL8UnqHVSIG8l8ex+tHhBXgjddgqHEZ8ufAA2aaEnYgrF/KrPXrEmMUqZ9THLW06xhoBaVueQpkug+ewOUphE3Qv2Q5gGamXYa+QbVq4O+DQ5FHyZqrjxNt7UHh9uuRa0F7HjCF8o9PCTOGnscM7g2u1Hl9C9oeEnxC/1ajZg8JLiM9Hj9GHJseMShwL2DO0G5yEWn3Zh1QUods5CPkIoqlwAZxhXMsb6HrcEPBxchhdJ6wj29vCW4hfLOzo8J3rltYX50nXQAATSf/K4DEaGlTLvplsk/QCpoD60EQ7gLYZc8H9wq+I3yncEOEcNhuz6HWf3XEiwU/4Y8YEqVp2P10rt+8REvBGw026i4aDcbL9jF8r8Blmf4fCOzhViiscskygXRdehf3CO4hfigmTBXyQrl8TFtD1IzQX3CbcQrY3hPcRv4z8OmHPXwchVNln2MmE7BX6VwIFi/he6uxvb6JM3m0fdqvx/ATidxg2JeC7VDErAw5NzGfvwRJVheEIQ8Mg/pdwIM+UOmi9Q8ivCsrIy0tF+wVbEcLrd3Pb2XisEb4Tdlhsi4WP4RBbaLGrHfC3PrvMIezy9rTpGm5lz9LOMG15xvFxD/j5gjzjjDbMOzk+9zzt3v5bgAEAibzFeFHVgYkAAAAASUVORK5CYII=";
  /* Copyright© 2000 - 2019 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 ze{constructor(e){var t=this;e=e||{},this.speed=e.speed&&e.speed>=0?e.speed:1,this.frequency=e.speed&&e.frequency>=0?e.frequency:1e3,this.startTime=e.startTime&&null!=e.startTime?e.startTime:0,this.endTime=e.endTime&&null!=e.endTime&&e.endTime>=t.startTime?e.endTime:+new Date,this.repeat=void 0===e.repeat||e.repeat,this.reverse=void 0!==e.reverse&&e.reverse,this.currentTime=null,this.oldTime=null,this.running=!1,this.EVENT_TYPES=["start","pause","stop"],t.events=new Ie(this,null,this.EVENT_TYPES),t.speed=Number(t.speed),t.frequency=Number(t.frequency),t.startTime=Number(t.startTime),t.endTime=Number(t.endTime),t.startTime=Date.parse(new Date(t.startTime)),t.endTime=Date.parse(new Date(t.endTime)),t.currentTime=t.startTime,this.CLASS_NAME="SuperMap.TimeControlBase"}updateOptions(e){var t=this;(e=e||{}).speed&&e.speed>=0&&(t.speed=e.speed,t.speed=Number(t.speed)),e.speed&&e.frequency>=0&&(t.frequency=e.frequency,t.frequency=Number(t.frequency)),e.startTime&&null!=e.startTime&&(t.startTime=e.startTime,t.startTime=Date.parse(new Date(t.startTime))),e.endTime&&null!=e.endTime&&e.endTime>=t.startTime&&(t.endTime=e.endTime,t.endTime=Date.parse(new Date(t.endTime))),null!=e.repeat&&(t.repeat=e.repeat),null!=e.reverse&&(t.reverse=e.reverse)}start(){var e=this;e.running||(e.running=!0,e.tick(),e.events.triggerEvent("start",e.currentTime))}pause(){this.running=!1,this.events.triggerEvent("pause",this.currentTime)}stop(){var e=this;e.currentTime=e.startTime,e.running&&(e.running=!1),e.events.triggerEvent("stop",e.currentTime)}toggle(){this.running?this.pause():this.start()}setSpeed(e){return e>=0&&(this.speed=e,!0)}getSpeed(){return this.speed}setFrequency(e){return e>=0&&(this.frequency=e,!0)}getFrequency(){return this.frequency}setStartTime(e){var t=this;return!((e=Date.parse(new Date(e)))>t.endTime)&&(t.startTime=e,t.currentTime<t.startTime&&(t.currentTime=t.startTime,t.tick()),!0)}getStartTime(){return this.startTime}setEndTime(e){var t=this;return t.endTime=Date.parse(new Date(t.endTime)),!(e<t.startTime)&&(t.endTime=e,t.currentTime>=t.endTime&&(t.currentTime=t.startTime,t.tick()),!0)}getEndTime(){return this.endTime}setCurrentTime(e){var t=this;return t.currentTime=Date.parse(new Date(t.currentTime)),e>=t.startTime&&e<=t.endTime&&(t.currentTime=e,t.startTime=t.currentTime,t.tick(),!0)}getCurrentTime(){return this.currentTime}setRepeat(e){this.repeat=e}getRepeat(){return this.repeat}setReverse(e){this.reverse=e}getReverse(){return this.reverse}getRunning(){return this.running}destroy(){var e=this;e.speed=null,e.frequency=null,e.startTime=null,e.endTime=null,e.currentTime=null,e.repeat=null,e.running=!1,e.reverse=null}tick(){}}s.TimeControlBase=ze;
  /* Copyright© 2000 - 2019 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 We extends ze{constructor(e,t){super(t);var r=this;r.callback=e,Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),r=this,s=function(){},i=function(){return r.apply(this instanceof s&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return s.prototype=this.prototype,i.prototype=new s,i}),r.update=r.update.bind(r),r.oldTime=r.currentTime,r.CLASS_NAME="SuperMap.TimeFlowControl"}updateOptions(e){e=e||{},super.updateOptions(e)}start(){var e=this;e.running||(e.running=!0,e.reverse?e.currentTime===e.startTime&&(e.oldTime=e.endTime,e.currentTime=e.oldTime):e.oldTime===e.endTime&&(e.currentTime=e.startTime,e.oldTime=e.currentTime),e.tick())}stop(){super.stop();var e=this;e.oldTime=e.currentTime,e.running&&(e.running=!1),e.intervalId&&window.clearTimeout(e.intervalId)}destroy(){super.destroy();this.oldTime=null,this.callback=null}tick(){var e=this;e.intervalId&&window.clearInterval(e.intervalId),e.intervalId=null,e.update(),e.intervalId=window.setInterval(e.update,e.frequency)}update(){var e=this;if(e.running)if(e.callback&&e.callback(e.currentTime),e.reverse){if(e.currentTime===e.startTime){if(!e.repeat)return e.running=!1,null;e.oldTime=e.endTime,e.currentTime=e.oldTime}else e.currentTime=e.oldTime,e.oldTime-=e.speed;e.oldTime<=e.startTime&&(e.oldTime=e.startTime)}else{if(e.currentTime===e.endTime){if(!e.repeat)return e.running=!1,e.stop(),null;e.stop(),e.currentTime=e.startTime,e.oldTime=e.currentTime,e.start()}else e.oldTime=e.currentTime,e.currentTime+=e.speed;e.currentTime>=e.endTime&&(e.currentTime=e.endTime)}}}s.TimeFlowControl=We;
  /* Copyright© 2000 - 2019 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 qe=r(11),Ye=r.n(qe);
  /* Copyright© 2000 - 2019 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.*/
  window.Promise=Ye.a;r(14);var Qe=r(6),Xe=r.n(Qe);
  /* Copyright© 2000 - 2019 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.*/
  const Ke=window.fetch;s.setCORS=function(e){s.CORS=e};var Ze=s.isCORS=function(){return void 0!=s.CORS?s.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},$e=(s.setRequestTimeout=function(e){return s.RequestTimeout=e},s.getRequestTimeout=function(){return s.RequestTimeout||45e3}),et=s.FetchRequest={commit:function(e,t,r,s){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,r,s);case"POST":return this.post(t,r,s);case"PUT":return this.put(t,r,s);case"DELETE":return this.delete(t,r,s);default:return this.get(t,r,s)}},supportDirectRequest:function(e,t){return!!ye.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:Ze()||t.proxy)},get:function(e,t,r){r=r||{};if(e=this._processUrl(e,r),e=ye.urlAppend(e,this._getParameterString(t||{})),!this.supportDirectRequest(e,r)){var i={url:e=e.replace(".json",".jsonp"),data:t};return s.Util.RequestJSONPPromise.GET(i)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,r):this._fetch(e,t,r,"GET")},delete:function(e,t,r){r=r||{};if(e=this._processUrl(e,r),e=ye.urlAppend(e,this._getParameterString(t||{})),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var i={url:e+="&_method=DELETE",data:t};return s.Util.RequestJSONPPromise.DELETE(i)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")-1),t,r):this._fetch(e,t,r,"DELETE")},post:function(e,t,r){if(r=r||{},!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var i={url:e+="&_method=POST",data:t};return s.Util.RequestJSONPPromise.POST(i)}return this._fetch(this._processUrl(e,r),t,r,"POST")},put:function(e,t,r){if(r=r||{},e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var i={url:e+="&_method=PUT",data:t};return s.Util.RequestJSONPPromise.PUT(i)}return this._fetch(e,t,r,"PUT")},urlIsLong:function(e){for(var t=0,r=null,s=0,i=e.length;s<i;s++)(r=e.charCodeAt(s))<127?t++:128<=r&&r<=2047?t+=2:2048<=r&&r<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,r,s){return t+=(t.indexOf("?")>-1?"&":"?")+"_method="+e,"string"!=typeof r&&(r=JSON.stringify(r)),this.post(t,r,s)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var r=e.split("?");2===r.length&&(e=r[0]+".json?"+r[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,r,s){return(r=r||{}).headers=r.headers||{},r.headers["Content-Type"]||(r.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),r.timeout?this._timeout(r.timeout,Ke(e,{method:s,headers:r.headers,body:"PUT"===s||"POST"===s?t:void 0,credentials:r.withCredentials?"include":"omit",mode:"cors",timeout:$e()}).then(function(e){return e})):Ke(e,{method:s,body:"PUT"===s||"POST"===s?t:void 0,headers:r.headers,credentials:r.withCredentials?"include":"omit",mode:"cors",timeout:$e()}).then(function(e){return e})},_fetchJsonp:function(e,t){return t=t||{},Xe()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(r,s){setTimeout(function(){s(new Error("timeout"))},e),t.then(r,s)})},_getParameterString:function(e){var t=[];for(var r in e){var s=e[r];if(null!=s&&"function"!=typeof s){var i;if("object"==typeof s&&s.constructor===Array){for(var a,n=[],o=0,l=s.length;o<l;o++)a=s[o],n.push(encodeURIComponent(null===a||void 0===a?"":a));i="["+n.join(",")+"]"}else i=encodeURIComponent(s);t.push(encodeURIComponent(r)+"="+i)}}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};s.Util.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=s.Util.toJSON(e[t]));var r=encodeURIComponent(e[t]);this.queryValues.push(r)}},issue:function(e){for(var t=this,r=t.getUid(),s=e.url,i=[],a=new Promise(function(e){t.supermap_callbacks[r]=function(s){delete t.supermap_callbacks[r],e(s)}}),n=s,o=0,l=t.queryKeys?t.queryKeys.length:0,h=0;h<l;h++)if(n.length+t.queryKeys[h].length+2>=t.limitLength){if(0==o)return!1;i.push(n),n=s,o=0,h--}else if(n.length+t.queryKeys[h].length+2+t.queryValues[h].length>t.limitLength)for(var u=t.queryValues[h];u.length>0;){var c=t.limitLength-n.length-t.queryKeys[h].length-2;n.indexOf("?")>-1?n+="&":n+="?";var d=u.substring(0,c);"%"===d.substring(c-1,c)?(c-=1,d=u.substring(0,c)):"%"===d.substring(c-2,c-1)&&(c-=2,d=u.substring(0,c)),n+=t.queryKeys[h]+"="+d,u=u.substring(c),d.length>0&&(i.push(n),n=s,o=0)}else o++,n.indexOf("?")>-1?n+="&":n+="?",n+=t.queryKeys[h]+"="+t.queryValues[h];return i.push(n),t.send(i,"SuperMap.Util.RequestJSONPPromise.supermap_callbacks["+r+"]",e&&e.proxy),a},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,r){var s=e.length;if(s>0)for(var i=(new Date).getTime(),a=0;a<s;a++){var n=e[a];n.indexOf("?")>-1?n+="&":n+="?",n+="sectionCount="+s,n+="&sectionIndex="+a,n+="&jsonpUserID="+i,r&&(n=decodeURIComponent(n),n=r+encodeURIComponent(n)),Xe()(n,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings(e.params),this.issue(e)},POST:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},PUT:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},DELETE:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)}};
  /* Copyright© 2000 - 2019 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 tt{static generateToken(e,t){var r=this.servers[e];if(r)return et.post(r.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}static registerServers(e){this.servers=this.servers||{},ye.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++){var r=e[t];this.servers[r.server]=r}}static registerToken(e,t){if(this.tokens=this.tokens||{},e&&t){var r=this._getTokenStorageKey(e);this.tokens[r]=t}}static registerKey(e,t){if(this.keys=this.keys||{},e&&!(e.length<1)&&t){e=ye.isArray(e)?e:[e];for(var r=0;r<e.length;r++){var s=this._getUrlRestString(e[0])||e[0];this.keys[s]=t}}}static getServerInfo(e){return this.servers=this.servers||{},this.servers[e]}static getToken(e){if(e){this.tokens=this.tokens||{};var t=this._getTokenStorageKey(e);return this.tokens[t]}}static getKey(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;return this.keys[t]}static loginiServer(e,t,r,s){e+="/"===e.substr(e.length-1,1)?"services/security/login.json":"/services/security/login.json";var i={username:t&&t.toString(),password:r&&r.toString(),rememberme:s};i=JSON.stringify(i);return et.post(e,i,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(e){return e.json()})}static logoutiServer(e){e+="/"===e.substr(e.length-1,1)?"services/security/logout":"/services/security/logout";return et.get(e,"",{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withoutFormatSuffix:!0}).then(function(){return!0}).catch(function(){return!1})}static loginOnline(e,t){var r=tt.SSO+"/login?service="+e;this._open(r,t)}static loginiPortal(e,t,r){e+="/"===e.substr(e.length-1,1)?"web/login.json":"/web/login.json";var s={username:t&&t.toString(),password:r&&r.toString()};s=JSON.stringify(s);return et.post(e,s,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0}).then(function(e){return e.json()})}static logoutiPortal(e){e+="/"===e.substr(e.length-1,1)?"services/security/logout":"/services/security/logout";return et.get(e,"",{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0,withoutFormatSuffix:!0}).then(function(){return!0}).catch(function(){return!1})}static loginManager(e,t,r){if(ye.isInTheSameDomain(e)){var s="/"===e.substr(e.length-1,1)?e+"icloud/security/tokens.json":e+"/icloud/security/tokens.json",i=t||{},a={username:i.userName&&i.userName.toString(),password:i.password&&i.password.toString()};a=JSON.stringify(a);var n=this;return et.post(s,a,{headers:{Accept:"*/*","Content-Type":"application/json"}}).then(function(e){e.text().then(function(e){return n.imanagerToken=e,e})})}var o=!r||r.isNewTab;this._open(e,o)}static destroyAllCredentials(){this.keys=null,this.tokens=null,this.servers=null}static destroyToken(e){if(e){var t=this._getTokenStorageKey(e);this.tokens=this.tokens||{},this.tokens[t]&&delete this.tokens[t]}}static destroyKey(e){if(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;this.keys[t]&&delete this.keys[t]}}static _open(e,t){t=null==t||t;var r=window.screen.availWidth/2-this.INNER_WINDOW_WIDTH/2,s=window.screen.availHeight/2-this.INNER_WINDOW_HEIGHT/2,i="height="+this.INNER_WINDOW_HEIGHT+", width="+this.INNER_WINDOW_WIDTH+",top="+s+", left="+r+",toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no";t?window.open(e,"login"):window.open(e,"login",i)}static _getTokenStorageKey(e){var t=e.match(/(.*?):\/\/([^\/]+)/i);return t?t[0]:e}static _getUrlRestString(e){if(!e)return e;var t=e.match(/http:\/\/(.*\/rest)/i);return t?t[0]:e}}tt.INNER_WINDOW_WIDTH=600,tt.INNER_WINDOW_HEIGHT=600,tt.SSO="https://sso.supermap.com",tt.ONLINE="http://www.supermapol.com",s.SecurityManager=tt;
  /* Copyright© 2000 - 2019 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 rt{constructor(e,t){if(e){var r=e.substr(e.length-1,1);this.serviceUrl="/"===r?e.substr(0,e.length-2):e}this.options=t||{},this.CLASS_NAME="SuperMap.iManagerServiceBase"}request(e,t,r,s){(s=s||{headers:{Accept:"*/*","Content-Type":"application/json"}}).hasOwnProperty("withCredentials")||(s.withCredentials=!0),s.crossOrigin=this.options.crossOrigin,s.headers=this.options.headers;var i=tt.imanagerToken;return i&&(s.headers||(s.headers=[]),s.headers["X-Auth-Token"]=i),r&&(r=JSON.stringify(r)),et.commit(e,t,r,s).then(function(e){return e.json()})}}s.iManagerServiceBase=rt;
  /* Copyright© 2000 - 2019 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 st{constructor(e){e=e||{},this.nodeSpec="SMALL",this.nodeCount=1,this.nodeName="",this.password="",this.description="",this.physicalMachineName="",this.ips=[],this.userName="",ye.extend(this,e)}}s.iManagerCreateNodeParam=st;
  /* Copyright© 2000 - 2019 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 it extends rt{constructor(e){super(e)}load(){return this.request("GET",this.serviceUrl+"/web/api/service.json")}createIServer(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/server.json",new st(e))}createIPortal(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/portal.json",new st(e))}iServerList(){return this.request("GET",this.serviceUrl+"/icloud/web/nodes/server.json")}iPortalList(){return this.request("GET",this.serviceUrl+"/icloud/web/nodes/portal.json")}startNodes(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/started.json",e)}stopNodes(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/stopped.json",e)}}s.iManager=it;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 at{constructor(e){e=e||{},this.tags=[],this.userNames="",this.types=[],this.checkStatus="",this.offline=!1,this.orderBy="",this.orderType="",this.keywords=[],this.currentPage=0,this.pageSize=0,this.isBatch=!1,this.dirIds=[],this.isNotInDir=!1,this.filterFields=[],this.authorizedOnly=!1,ye.extend(this,e)}}s.iPortalServicesQueryParam=at;
  /* Copyright© 2000 - 2019 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 nt{constructor(e){e=e||{},this.userNames=null,this.tags=null,this.suggest=!1,this.sourceTypes=null,this.keywords=null,this.epsgCode=null,this.orderBy=null,this.currentPage=null,this.pageSize=null,this.dirIds=null,this.isNotInDir=!1,this.updateStart=null,this.updateEnd=null,this.visitStart=null,this.visitEnd=null,this.filterFields=null,ye.extend(this,e)}}s.iPortalMapsQueryParam=nt;
  /* Copyright© 2000 - 2019 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 ot{constructor(e,t){t=t||{},this.serviceUrl=e,this.serverType=a.iPortal,this.CLASS_NAME="SuperMap.iPortalServiceBase",this.withCredentials=t.withCredentials||!1,this.crossOrigin=t.crossOrigin,this.headers=t.headers}request(e,t,r,s={headers:this.headers,crossOrigin:this.crossOrigin,withCredentials:this.withCredentials}){return t=this.createCredentialUrl(t),et.commit(e,t,r,s).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,r=this.getCredential();if(r){var s=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===s?t+=r.getUrlParameters():t.indexOf("?")>-1&&"?"!==s?t+="&"+r.getUrlParameters():t+="?"+r.getUrlParameters()}return t}getCredential(){var e,t=tt.getToken(this.serviceUrl);return(e=t?new Me(t,"token"):null)||(e=(t=this.getKey())?new Me(t,"key"):null),e}getKey(){}}s.iPortalServiceBase=ot;
  /* Copyright© 2000 - 2019 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 lt extends ot{constructor(e,t){super(e,t),t=t||{},this.addedMapNames=null,this.addedSceneNames=null,this.authorizeSetting=[],this.checkStatus="",this.createTime=0,this.description="",this.enable=!0,this.id=0,this.isBatch=!1,this.isDataItemService=!1,this.linkPage=null,this.mapInfos=[],this.metadata=null,this.nickname="",this.offline=!1,this.proxiedUrl=null,this.resTitle="",this.scenes=[],this.serviceRootUrlId=null,this.tags=[],this.thumbnail=null,this.type="",this.updateTime=0,this.userName="",this.verifyReason=null,this.version=null,this.visitCount=0,ye.extend(this,t),this.serviceUrl=e,this.id&&(this.serviceUrl=e+"/"+this.id)}load(){var e=this;return e.request("GET",e.serviceUrl+".json").then(function(t){if(t.error)return t;for(var r in t)e[r]=t[r]})}update(){var e={authorizeSetting:this.authorizeSetting,metadata:this.metadata,tags:this.tags,thumbnail:this.thumbnail},t={headers:Object.assign({"Content-Type":"application/x-www-form-urlencoded"},this.headers||{})};return this.request("PUT",this.serviceUrl,JSON.stringify(e),t)}}s.iPortalService=lt;
  /* Copyright© 2000 - 2019 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 ht extends ot{constructor(e,t){super(e),t=t||{},this.authorizeSetting=[],this.center="",this.controls=null,this.checkStatus="",this.createTime=0,this.description="",this.epsgCode=0,this.extent="",this.id=0,this.isDefaultBottomMap=!1,this.layers=[],this.level=null,this.nickname="",this.sourceType="",this.status=null,this.tags=[],this.thumbnail="",this.title="",this.units=null,this.updateTime=0,this.userName="",this.visitCount=0,ye.extend(this,t),this.mapUrl=e}load(){var e=this;return e.request("GET",e.mapUrl+".json").then(function(t){if(t.error)return t;for(var r in t)e[r]=t[r]})}update(){var e={units:this.units,level:this.level,center:this.center,controls:this.controls,description:this.description,epsgCode:this.epsgCode,extent:this.extent,status:this.status,tags:this.tags,layers:this.layers,title:this.title,thumbnail:this.thumbnail,sourceType:this.sourceType,authorizeSetting:this.authorizeSetting};return this.request("PUT",this.mapUrl,JSON.stringify(e),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}}s.iPortalMap=ht;
  /* Copyright© 2000 - 2019 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 ut extends ot{constructor(e,t){super(e,t),this.iportalUrl=e,t=t||{},this.withCredentials=t.withCredentials||!1}load(){return et.get(this.iportalUrl+"/web")}queryServices(e){if(!(e instanceof at))return null;var t=this.iportalUrl+"/web/services";return this.request("GET",t,e).then(function(e){var r=[];return e.content.map(function(e){return r.push(new lt(t,e)),e}),r})}deleteServices(e){var t=this.iportalUrl+"/web/services";return this.request("DELETE",t,{ids:e})}queryMaps(e){if(!(e instanceof nt))return null;let t;return t=this.withCredentials?this.iportalUrl+"/web/mycontent/maps":this.iportalUrl+"/web/maps",this.request("GET",t,e).then(function(e){var r={content:[]},s=[];return e.content&&e.content.length>0&&(e.content.map(function(e){return s.push(new ht(t+"/"+e.id,e)),e}),r.content=s,r.currentPage=e.currentPage,r.pageSize=e.pageSize,r.total=e.total,r.totalPage=e.totalPage),r})}}s.iPortal=ut;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 ct{constructor(e,t){let r=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.serverType=null,this.index=null,this.length=null,this.options=null,this.totalTimes=null,this.POLLING_TIMES=3,this._processSuccess=null,this._processFailed=null,this.isInTheSameDomain=null,this.withCredentials=!1,ye.isArray(e)?(r.urls=e,r.length=e.length,r.totalTimes=r.length,1===r.length?r.url=e[0]:(r.index=parseInt(Math.random()*r.length),r.url=e[r.index])):(r.totalTimes=1,r.url=e),ye.isArray(e)&&!r.isServiceSupportPolling()&&(r.url=e[0],r.totalTimes=1),r.serverType=r.serverType||a.ISERVER,t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,ye.extend(this,t),r.isInTheSameDomain=ye.isInTheSameDomain(r.url),r.events=new Ie(r,null,r.EVENT_TYPES,!0),r.eventListeners instanceof Object&&r.events.on(r.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){let e=this;ye.isArray(e.urls)&&(e.urls=null,e.index=null,e.length=null,e.totalTimes=null),e.url=null,e.options=null,e._processSuccess=null,e._processFailed=null,e.isInTheSameDomain=null,e.EVENT_TYPES=null,e.events&&(e.events.destroy(),e.events=null),e.eventListeners&&(e.eventListeners=null)}request(e){let t=this;e.url=e.url||t.url,e.proxy=e.proxy||t.proxy,e.withCredentials=void 0!=e.withCredentials?e.withCredentials:t.withCredentials,e.crossOrigin=void 0!=e.crossOrigin?e.crossOrigin:t.crossOrigin,e.headers=e.headers||t.headers,e.isInTheSameDomain=t.isInTheSameDomain;let r=this.getCredential(e.url);if(r){let t=e.url.substring(e.url.length-1,e.url.length);e.url.indexOf("?")>-1&&"?"===t?e.url+=r.getUrlParameters():e.url.indexOf("?")>-1&&"?"!==t?e.url+="&"+r.getUrlParameters():e.url+="?"+r.getUrlParameters()}t.calculatePollingTimes(),t._processSuccess=e.success,t._processFailed=e.failure,e.scope=t,e.success=t.getUrlCompleted,e.failure=t.getUrlFailed,t.options=e,t._commit(t.options)}getCredential(e){let t,r,s=e;switch(this.serverType){case a.IPORTAL:(t=(r=tt.getToken(s))?new Me(r,"token"):null)||(t=(r=tt.getKey(s))?new Me(r,"key"):null);break;case a.ONLINE:t=(r=tt.getKey(s))?new Me(r,"key"):null;break;default:t=(r=tt.getToken(s))?new Me(r,"token"):null}return t}getUrlCompleted(e){this._processSuccess(e)}getUrlFailed(e){let t=this;t.totalTimes>0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){let e=this,t=e.options.url,r=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(r,r.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=ye.isInTheSameDomain(t),e._commit(e.options)}calculatePollingTimes(){let e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.times<e.totalTimes&&(e.totalTimes=e.times):e.totalTimes>e.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}isServiceSupportPolling(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}serviceProcessCompleted(e){e=ye.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){let t=(e=ye.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){"POST"!==e.method&&"PUT"!==e.method||(e.params&&(e.url=ye.urlAppend(e.url,ye.getParameterString(e.params||{}))),e.params=e.data),et.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then(function(e){return e.text?e.text():e.json?e.json():e}).then(function(t){var r=t;("string"==typeof t&&(r=(new ke).read(t)),(!r||r.error||r.code>=300&&304!==r.code)&&(r=r&&r.error?{error:r.error}:{error:r}),r.error)?(e.scope?fe.bind(e.failure,e.scope):e.failure)(r):(r.succeed=void 0==r.succeed||r.succeed,(e.scope?fe.bind(e.success,e.scope):e.success)(r))}).catch(function(t){(e.scope?fe.bind(e.failure,e.scope):e.failure)(t)})}}s.CommonServiceBase=ct;
  /* Copyright© 2000 - 2019 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 dt{constructor(e){if(e.filters){let t=[];e.filters.split(",").map(function(e){return t.push('"'+e+'"'),e}),e.filters=t}this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,ye.extend(this,e)}destroy(){this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null}}s.GeoCodingParameter=dt;
  /* Copyright© 2000 - 2019 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 pt{constructor(e){if(e.filters){let t=[];e.filters.split(",").map(function(e){return t.push('"'+e+'"'),e}),e.filters=t}this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null,ye.extend(this,e)}destroy(){this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null}}s.GeoDecodingParameter=pt;
  /* Copyright© 2000 - 2019 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 mt extends ct{constructor(e,t){super(e,t),this.options=t||{},this.CLASS_NAME="SuperMap.AddressMatchService"}destroy(){super.destroy()}code(e,t){t instanceof dt&&this.processAsync(e,t)}decode(e,t){t instanceof pt&&this.processAsync(e,t)}processAsync(e,t){var r=this;let{headers:s,crossOrigin:i,proxy:a}=this;et.get(e,t,{headers:s,crossOrigin:i,proxy:a}).then(function(e){return e.json()}).then(function(e){e?r.serviceProcessCompleted(e):r.serviceProcessFailed(e)}).catch(function(e){r.eventListeners.processFailed({error:e})})}serviceProcessCompleted(e){super.serviceProcessCompleted(e)}serviceProcessFailed(e){super.serviceProcessFailed(e)}}s.AddressMatchService=mt;
  /* Copyright© 2000 - 2019 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 ft{constructor(e){this.name=null,this.queryType=null,this.CLASS_NAME="SuperMap.AggQueryBuilderParameter",ye.extend(this,e)}destroy(){this.name=null,this.queryType=null}}s.AggQueryBuilderParameter=ft;
  /* Copyright© 2000 - 2019 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 yt{constructor(e){this.aggName=null,this.aggType=null,this.aggFieldName=null,this.subAgg=null,this.CLASS_NAME="SuperMap.AggregationParameter",ye.extend(this,e)}destroy(){var e=this;e.aggName=null,e.aggFieldName=null,e.aggType=null,e.subAgg&&(e.subAgg=null)}}s.AggregationParameter=yt;
  /* Copyright© 2000 - 2019 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 gt{constructor(e){this.dataset=null,this.targetDatasourceName=null,this.totalGridName=null,this.diffuseDatasetGridName=null,this.durationDatasetGridName=null,this.directDatasetGridName=null,this.latitude=null,this.timeMode="MULTIDAYS",this.dayStart=null,this.dayEnd=null,this.hourStart=null,this.hourEnd=null,this.transmittance=null,this.hourInterval=null,this.dayInterval=null,this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.AreaSolarRadiationParameters"}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){var r={};for(var s in e){if("dataset"!==s)"latitude"===s||"timeMode"===s||"dayStart"===s||("dayEnd"===s||"hourStart"===s||"hourEnd"===s)||("transmittance"===s||"hourInterval"===s||"dayInterval"===s)?r[s]=e[s]:t[s]=e[s]}t.parameter=r}}s.AreaSolarRadiationParameters=gt;
  /* Copyright© 2000 - 2019 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 vt extends ct{constructor(e,t){super(e,t),this.format=i.GEOJSON,this.CLASS_NAME="SuperMap.SpatialAnalystBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t,r=this;if((e=ye.transformResult(e))&&r.format===i.GEOJSON&&"function"==typeof r.toGeoJSONResult)if(ye.isArray(e)){for(var s=0;s<e.length;s++)e[s]=r.toGeoJSONResult(e[s]);t=e}else t=r.toGeoJSONResult(e);t||(t=e),r.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){if(!e)return null;e.result&&e.result.resultGeometry&&(e=e.result);var t=new Je;if(e.recordsets)for(var r=0,s=e.recordsets,i=s.length;r<i;r++)s[r].features&&(s[r].features=t.toGeoJSON(s[r].features));else e.recordset&&e.recordset.features&&(e.recordset.features=t.toGeoJSON(e.recordset.features));return e.resultGeometry&&(e.resultGeometry=t.toGeoJSON(e.resultGeometry)),e.regions&&(e.regions=t.toGeoJSON(e.regions)),e}}s.SpatialAnalystBase=vt;
  /* Copyright© 2000 - 2019 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 St extends vt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.AreaSolarRadiationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof gt){var t=this;"/"!==t.url.substr(t.url.length-1,1)&&(t.url+="/");var r={};e instanceof gt&&(t.url+="datasets/"+e.dataset+"/solarradiation"),gt.toObject(e,r);var s=ye.toJSON(r);t.url+=".json?returnContent=true",t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}s.AreaSolarRadiationService=St;
  /* Copyright© 2000 - 2019 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 bt{constructor(e){this.exp=null,this.value=100,ye.extend(this,e),this.CLASS_NAME="SuperMap.BufferDistance"}destroy(){this.exp=null,this.value=null}}s.BufferDistance=bt;
  /* Copyright© 2000 - 2019 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 xt{constructor(e){this.endType=M.FLAT,this.leftDistance=new bt,this.rightDistance=new bt,this.semicircleLineSegment=4,this.radiusUnit=p.METER,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.BufferSetting"}destroy(){let e=this;e.endType=null,e.leftDistance&&(e.leftDistance.destroy(),e.leftDistance=null),e.rightDistance&&(e.rightDistance.destroy(),e.rightDistance=null),e.semicircleLineSegment=null,e.radiusUnit=null}}s.BufferSetting=xt;
  /* Copyright© 2000 - 2019 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 Ct{constructor(e){this.bufferSetting=new xt,ye.extend(this,e),this.CLASS_NAME="SuperMap.BufferAnalystParameters"}destroy(){this.bufferSetting&&(this.bufferSetting.destroy(),this.bufferSetting=null)}}s.BufferAnalystParameters=Ct;
  /* Copyright© 2000 - 2019 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 _t{constructor(e){this.expectCount=1e3,this.dataset=null,this.dataReturnMode=D.RECORDSET_ONLY,this.deleteExistResultDataset=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.DataReturnOption"}destroy(){this.expectCount=null,this.dataset=null,this.dataReturnMode=null,this.deleteExistResultDataset=null}}s.DataReturnOption=_t;
  /* Copyright© 2000 - 2019 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 Tt{constructor(e){this.foreignTableName=null,this.joinFilter=null,this.joinType=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.JoinItem"}destroy(){this.foreignTableName=null,this.joinFilter=null,this.joinType=null}toServerJSONObject(){var e={};return e=ye.copyAttributes(e,this)}}s.JoinItem=Tt;
  /* Copyright© 2000 - 2019 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 Et{constructor(e){this.alias=null,this.connect=null,this.dataBase=null,this.driver=null,this.engineType=null,this.exclusive=null,this.OpenLinkTable=null,this.password=null,this.readOnly=null,this.server=null,this.user=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasourceConnectionInfo"}destroy(){var e=this;e.alias=null,e.connect=null,e.dataBase=null,e.driver=null,e.engineType=null,e.exclusive=null,e.OpenLinkTable=null,e.password=null,e.readOnly=null,e.server=null,e.user=null}}s.DatasourceConnectionInfo=Et;
  /* Copyright© 2000 - 2019 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 wt{constructor(e){this.datasourceConnectionInfo=null,this.foreignKeys=null,this.foreignTable=null,this.linkFields=null,this.linkFilter=null,this.name=null,this.primaryKeys=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LinkItem"}destroy(){var e=this;e.datasourceConnectionInfo instanceof Et&&(e.datasourceConnectionInfo.destroy(),e.datasourceConnectionInfo=null),e.foreignKeys=null,e.foreignTable=null,e.linkFields=null,e.linkFilter=null,e.name=null,e.primaryKeys=null}}s.LinkItem=wt;
  /* Copyright© 2000 - 2019 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 At{constructor(e){this.attributeFilter=null,this.name=null,this.joinItems=null,this.linkItems=null,this.ids=null,this.orderBy=null,this.groupBy=null,this.fields=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.FilterParameter"}destroy(){var e=this;if(e.attributeFilter=null,e.name=null,e.joinItems){for(let t=0,r=e.joinItems,s=r.length;t<s;t++)r[t].destroy();e.joinItems=null}if(e.linkItems){for(let t=0,r=e.linkItems,s=r.length;t<s;t++)r[t].destroy();e.linkItems=null}e.ids=null,e.orderBy=null,e.groupBy=null,e.fields=null}}s.FilterParameter=At;
  /* Copyright© 2000 - 2019 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 Lt extends Ct{constructor(e){super(e),this.dataset=null,this.filterQueryParameter=new At,this.resultSetting=new _t,this.isAttributeRetained=!0,this.isUnion=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetBufferAnalystParameters"}destroy(){super.destroy();var e=this;e.dataset=null,e.filterQueryParameter&&(e.filterQueryParameter.destroy(),e.filterQueryParameter=null),e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.isAttributeRetained=null,e.isUnion=null}static toObject(e,t){for(var r in e)if("bufferSetting"===r)e.bufferSetting.radiusUnit=e.bufferSetting.radiusUnit.toUpperCase(),t.bufferAnalystParameter=e.bufferSetting;else if("resultSetting"===r)t.dataReturnOption=e.resultSetting;else{if("dataset"===r)continue;t[r]=e[r]}}}s.DatasetBufferAnalystParameters=Lt;
  /* Copyright© 2000 - 2019 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 Pt extends Ct{constructor(e){super(e),this.sourceGeometry=null,this.sourceGeometrySRID=null,e&&ye.extend(this,e),this.CLASS_NAME=" SuperMap.GeometryBufferAnalystParameters"}destroy(){super.destroy();this.sourceGeometry&&(this.sourceGeometry.destroy(),this.sourceGeometry=null)}static toObject(e,t){for(var r in e)if("bufferSetting"===r){var s={};for(var i in e.bufferSetting)s[i]=e.bufferSetting[i];t.analystParameter=s}else"sourceGeometry"===r?t.sourceGeometry=He.fromGeometry(e.sourceGeometry):t[r]=e[r]}}s.GeometryBufferAnalystParameters=Pt;
  /* Copyright© 2000 - 2019 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 Nt extends vt{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.BufferAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},r=this;"/"!==r.url.substr(r.url.length-1,1)&&(r.url+="/"),e instanceof Lt?(r.mode="datasets",r.url+="datasets/"+e.dataset+"/buffer",Lt.toObject(e,t)):e instanceof Pt&&(r.mode="geometry",r.url+="geometry/buffer",Pt.toObject(e,t));var s=ye.toJSON(t);r.url+=".json?returnContent=true",r.request({method:"POST",data:s,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}s.BufferAnalystService=Nt;
  /* Copyright© 2000 - 2019 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 Mt{constructor(e){this.type=I.UDB,this.datasetName="analystResult",this.datasourceInfo=null,this.outputPath="",ye.extend(this,e),this.CLASS_NAME="SuperMap.OutputSetting"}destroy(){var e=this;e.type=null,e.datasetName=null,e.outputPath=null,e.datasourceInfo instanceof Et&&(e.datasourceInfo.destroy(),e.datasourceInfo=null)}}s.OutputSetting=Mt;
  /* Copyright© 2000 - 2019 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 Ot{constructor(e){this.items=null,this.numericPrecision=1,this.rangeMode=S.EQUALINTERVAL,this.rangeCount="",this.colorGradientType=x.YELLOW_RED,ye.extend(this,e),this.CLASS_NAME="SuperMap.MappingParameters"}destroy(){var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.numericPrecision=null,e.rangeMode=null,e.rangeCount=null,e.colorGradientType=null}}s.MappingParameters=Ot;
  /* Copyright© 2000 - 2019 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 It{constructor(e){if(this.datasetName="",this.bounds="",this.distance="",this.distanceField="",this.distanceUnit=ee.METER,this.dissolveField="",this.output=null,this.mappingParameters=null,!e)return this;ye.extend(this,e),this.CLASS_NAME="SuperMap.BuffersAnalystJobsParameter"}destroy(){this.datasetName=null,this.bounds=null,this.distance=null,this.distanceField=null,this.distanceUnit=null,this.dissolveField=null,this.output instanceof Mt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},"bounds"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}s.BuffersAnalystJobsParameter=It;
  /* Copyright© 2000 - 2019 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 Ft extends ct{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.ProcessingServiceBase"}destroy(){super.destroy()}getJobs(e){var t=this;et.get(t._processUrl(e),null,{proxy:t.proxy}).then(function(e){return e.json()}).then(function(e){t.events.triggerEvent("processCompleted",{result:e})}).catch(function(e){t.eventListeners.processFailed({error:e})})}addJob(e,t,r,s){var i=this,a=null;t&&t instanceof r&&(a=new Object,r.toObject(t,a));let n=Object.assign({"Content-Type":"application/x-www-form-urlencoded"},i.headers||{});var o={proxy:i.proxy,headers:n,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,isInTheSameDomain:i.isInTheSameDomain};et.post(i._processUrl(e),JSON.stringify(a),o).then(function(e){return e.json()}).then(function(e){e.succeed?i.serviceProcessCompleted(e,s):i.serviceProcessFailed(e)}).catch(function(e){i.serviceProcessFailed({error:e})})}serviceProcessCompleted(e,t){e=ye.transformResult(e),t=t||1e3;var r=this;if(e)var s=setInterval(function(){et.get(r._processUrl(e.newResourceLocation),{_t:(new Date).getTime()}).then(function(e){return e.json()}).then(function(e){r.events.triggerEvent("processRunning",{id:e.id,state:e.state}),"LOST"!==e.state.runState&&"KILLED"!==e.state.runState&&"FAILED"!==e.state.runState||(clearInterval(s),r.events.triggerEvent("processFailed",{error:e.state.errorMsg,state:e.state.runState})),"FINISHED"===e.state.runState&&e.setting.serviceInfo&&(clearInterval(s),r.events.triggerEvent("processCompleted",{result:e}))}).catch(function(e){clearInterval(s),r.events.triggerEvent("processFailed",{error:e})})},t)}serviceProcessFailed(e){super.serviceProcessFailed(e)}_processUrl(e){return-1===e.indexOf(".json")&&(e+=".json"),tt.getToken(e)&&(e+="?token="+tt.getToken(e)),e}}s.ProcessingServiceBase=Ft;
  /* Copyright© 2000 - 2019 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 Rt extends Ft{constructor(e,t){super(e,t),this.url+="/spatialanalyst/buffers",this.CLASS_NAME="SuperMap.BuffersAnalystJobsService"}destroy(){super.destroy()}getBuffersJobs(){super.getJobs(this.url)}getBuffersJob(e){super.getJobs(this.url+"/"+e)}addBuffersJob(e,t){super.addJob(this.url,e,It,t)}}s.BuffersAnalystJobsService=Rt;
  /* Copyright© 2000 - 2019 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 Dt{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.BurstPipelineAnalystParameters"}destroy(){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=null}}s.BurstPipelineAnalystParameters=Dt;
  /* Copyright© 2000 - 2019 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 kt extends ct{constructor(e,t){super(e,t),this.format=i.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t;(e=ye.transformResult(e))&&this.format===i.GEOJSON&&"function"==typeof this.toGeoJSONResult&&(t=this.toGeoJSONResult(e)),t||(t=e),this.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){return null}}s.NetworkAnalystServiceBase=kt;
  /* Copyright© 2000 - 2019 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 Bt extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof Dt))return null;var t,r=this,s=r.url.substr(r.url.length-1,1);if(r.url=r.url+("/"===s?"burstAnalyse":"/burstAnalyse")+".json?",t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}s.BurstPipelineAnalystService=Bt;
  /* Copyright© 2000 - 2019 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 Gt extends ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ChartFeatureInfoSpecsService"}destroy(){super.destroy(),ye.reset(this)}processAsync(){var e=this,t=e.url.substr(e.url.length-1,1);e.isTempLayers?e.url+=".json?":(e.url+="/"===t?"":"/",e.url+="chartFeatureInfoSpecs.json?"),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}s.ChartFeatureInfoSpecsService=Gt;
  /* Copyright© 2000 - 2019 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 Ut{constructor(e){this.isQueryPoint=null,this.isQueryLine=null,this.isQueryRegion=null,this.attributeFilter=null,this.chartFeatureInfoSpecCode=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryFilterParameter"}destroy(){var e=this;e.isQueryPoint=null,e.isQueryLine=null,e.isQueryRegion=null,e.attributeFilter=null,e.chartFeatureInfoSpecCode=null}toJson(){var e="";return e+='"isQueryPoint":'+this.isQueryPoint+",",e+='"isQueryLine":'+this.isQueryLine+",",e+='"isQueryRegion":'+this.isQueryRegion+",",this.attributeFilter&&(e+='"attributeFilter": "'+this.attributeFilter+'",'),e="{"+(e+='"chartFeatureInfoSpecCode":'+this.chartFeatureInfoSpecCode)+"}"}}s.ChartQueryFilterParameter=Ut;
  /* Copyright© 2000 - 2019 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 jt{constructor(e){this.queryMode=null,this.bounds=null,this.chartLayerNames=null,this.chartQueryFilterParameters=null,this.returnContent=!0,this.startRecord=0,this.expectCount=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryParameters"}destroy(){var e=this;e.queryMode=null,e.bounds=null,e.chartLayerNames=null,e.chartQueryFilterParameters=null,e.returnContent=!0,e.startRecord=0,e.expectCount=null}getVariablesJson(){var e="";if(e+='"queryMode":"'+this.queryMode+'",',this.chartLayerNames&&this.chartLayerNames.length){for(var t=[],r=this.chartLayerNames.length,s=0;s<r;s++)t.push('"'+this.chartLayerNames[s]+'"');e+='"chartLayerNames":'+("["+t.join(",")+"]")+","}if("ChartBoundsQuery"===this.queryMode&&this.bounds&&(e+='"bounds":{"leftBottom":{"x":'+this.bounds.left+',"y":'+this.bounds.bottom+'},"rightTop":{"x":'+this.bounds.right+',"y":'+this.bounds.top+"}},"),this.chartQueryFilterParameters&&this.chartQueryFilterParameters.length){for(var i=[],a=this.chartQueryFilterParameters.length,n=0;n<a;n++){var o=this.chartQueryFilterParameters[n];o instanceof Ut&&i.push(o.toJson())}var l="["+i.join(",")+"]";l='"chartQueryParams":'+l+",",l+='"startRecord":'+this.startRecord+",",e+='"chartQueryParameters":'+(l="{"+(l+='"expectCount":'+this.expectCount)+"}")}return e="{"+e+"}"}}s.ChartQueryParameters=jt;
  /* Copyright© 2000 - 2019 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 Ht{constructor(e){e&&(this.customParams=null,this.prjCoordSys=null,this.expectCount=1e5,this.networkType=n.LINE,this.queryOption=o.ATTRIBUTEANDGEOMETRY,this.queryParams=null,this.startRecord=0,this.holdTime=10,this.returnCustomResult=!1,this.returnFeatureWithFieldCaption=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryParameters")}destroy(){var e=this;if(e.customParams=null,e.expectCount=null,e.networkType=null,e.queryOption=null,e.queryParams){for(var t=0,r=e.queryParams,s=r.length;t<s;t++)r[t].destroy();e.queryParams=null}e.startRecord=null,e.holdTime=null,e.returnCustomResult=null,e.prjCoordSys=null}}s.QueryParameters=Ht;
  /* Copyright© 2000 - 2019 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 Jt extends ct{constructor(e,t){super(e,t),t=t||{},this.returnContent=null,this.format=i.GEOJSON,ye.extend(this,t);var r,s=this;t.format&&(s.format=t.format.toUpperCase()),s.url&&(r=s.url.substr(s.url.length-1,1),s.url+="/"===r?"queryResults.json?":"/queryResults.json?",this.CLASS_NAME="SuperMap.ChartQueryService")}destroy(){ct.prototype.destroy.apply(this,arguments),this.returnContent=null,this.format=null}processAsync(e){if(e instanceof jt){var t,r=this;r.returnContent=e.returnContent,t=e.getVariablesJson(),r.returnContent&&(r.url+="returnContent="+r.returnContent),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}serviceProcessCompleted(e){if((e=ye.transformResult(e))&&e.recordsets&&this.format===i.GEOJSON)for(var t=0,r=e.recordsets,s=r.length;t<s;t++)if(r[t].features){var a=new Je;r[t].features=a.toGeoJSON(r[t].features)}this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new Ht({queryMode:e.queryMode,bounds:e.bounds,chartLayerNames:e.chartLayerNames,chartQueryFilterParameters:e.chartQueryFilterParameters,returnContent:e.returnContent})}}s.ChartQueryService=Jt;
  /* Copyright© 2000 - 2019 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 Vt{constructor(e){this.clipDatasetName=null,this.clipDatasourceName=null,this.clipRegion=null,this.isClipInRegion=!0,this.isExactClip=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ClipParameter"}destroy(){var e=this;e.clipDatasetName=null,e.clipDatasourceName=null,e.clipRegion=null,e.isClipInRegion=null,e.isExactClip=null}toJSON(){return ye.toJSON({isClipInRegion:this.isClipInRegion,clipDatasetName:this.clipDatasetName,clipDatasourceName:this.clipDatasourceName,isExactClip:this.isExactClip,clipRegion:He.fromGeometry(this.clipRegion)})}}s.ClipParameter=Vt;
  /* Copyright© 2000 - 2019 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 zt{constructor(e){e=e||{},this.elevation=null,this.color=null,ye.extend(this,e);var t=this.color;t&&(this.color=new Be(t.red,t.green,t.blue)),this.CLASS_NAME="SuperMap.ColorDictionary"}destroy(){ye.reset(this)}toServerJSONObject(){var e={};return e=ye.copyAttributes(e,this)}}s.ColorDictionary=zt;
  /* Copyright© 2000 - 2019 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 Wt{constructor(e){e&&(this.returnEdgeFeatures=!1,this.returnEdgeGeometry=!1,this.returnEdgeIDs=!1,this.returnNodeFeatures=!1,this.returnNodeGeometry=!1,this.returnNodeIDs=!1,this.returnPathGuides=!1,this.returnRoutes=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystResultSetting")}destroy(){var e=this;e.returnEdgeFeatures=null,e.returnEdgeGeometry=null,e.returnEdgeIDs=null,e.returnNodeFeatures=null,e.returnNodeGeometry=null,e.returnNodeIDs=null,e.returnPathGuides=null,e.returnRoutes=null}}s.TransportationAnalystResultSetting=Wt;
  /* Copyright© 2000 - 2019 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 qt{constructor(e){e&&(this.barrierEdgeIDs=null,this.barrierNodeIDs=null,this.barrierPoints=null,this.weightFieldName=null,this.turnWeightField=null,this.resultSetting=new Wt,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystParameter")}destroy(){var e=this;if(e.barrierEdgeIDs=null,e.barrierNodeIDs=null,e.weightFieldName=null,e.turnWeightField=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.barrierPoints&&e.barrierPoints.length)for(var t in e.barrierPoints)e.barrierPoints[t].destroy();e.barrierPoints=null}}s.TransportationAnalystParameter=qt;
  /* Copyright© 2000 - 2019 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 Yt{constructor(e){this.isAnalyzeById=!1,this.nodes=null,this.parameter=new qt,ye.extend(this,e),this.CLASS_NAME="SuperMap.ComputeWeightMatrixParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.ComputeWeightMatrixParameters=Yt;
  /* Copyright© 2000 - 2019 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 Qt extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ComputeWeightMatrixService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Yt){var t,r=this,s=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===s?"weightmatrix":"/weightmatrix")+".json?",t={parameter:ye.toJSON(e.parameter),nodes:r.getJson(e.isAnalyzeById,e.nodes)},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJson(e,t){var r="[",s=t?t.length:0;if(!1===e)for(let e=0;e<s;e++)e>0&&(r+=","),r+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(1==e)for(let e=0;e<s;e++)e>0&&(r+=","),r+=t[e];return r+="]"}}s.ComputeWeightMatrixService=Qt;
  /* Copyright© 2000 - 2019 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 Xt extends ct{constructor(e,t){(t=t||{}).EVENT_TYPES=["broadcastSocketConnected","broadcastSocketError","broadcastFailed","broadcastSucceeded","subscribeSocketConnected","subscribeSocketError","messageSucceeded","setFilterParamSucceeded"],super(e,t),this.geometry=null,this.prjCoordSys=null,this.excludeField=null;"/"!==this.url.substr(this.url.length-1,1)&&(this.url+="/"),ye.extend(this,t),this.CLASS_NAME="SuperMap.DataFlowService"}initBroadcast(){var e=this;return this.broadcastWebSocket=this._connect(e.url+"broadcast"),this.broadcastWebSocket.onopen=function(t){e.broadcastWebSocket.isOpen=!0,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onclose=function(t){e.broadcastWebSocket.isOpen=!1,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onerror=function(t){t.eventType="broadcastSocketError",e.events.triggerEvent("broadcastSocketError",t)},this}broadcast(e){this.broadcastWebSocket&&this.broadcastWebSocket.isOpen?(this.broadcastWebSocket.send(JSON.stringify(e)),this.events.triggerEvent("broadcastSucceeded")):this.events.triggerEvent("broadcastFailed")}initSubscribe(){var e=this;return this.subscribeWebSocket=this._connect(this.url+"subscribe"),this.subscribeWebSocket.onopen=function(t){e.subscribeWebSocket.send(e._getFilterParams()),t.eventType="subscribeSocketConnected",e.events.triggerEvent("subscribeSocketConnected",t)},this.subscribeWebSocket.onerror=function(t){t.eventType="subscribeSocketError",e.events.triggerEvent("subscribeSocketError",t)},this.subscribeWebSocket.onmessage=function(t){e._onMessage(t)},this}setExcludeField(e){return this.excludeField=e,this.subscribeWebSocket.send(this._getFilterParams()),this}setGeometry(e){return this.geometry=e,this.subscribeWebSocket.send(this._getFilterParams()),this}unSubscribe(){this.subscribeWebSocket&&(this.subscribeWebSocket.close(),this.subscribeWebSocket=null)}unBroadcast(){this.broadcastWebSocket&&(this.broadcastWebSocket.close(),this.broadcastWebSocket=null)}destroy(){ct.prototype.destroy.apply(this,arguments);this.geometry=null,this.prjCoordSys=null,this.excludeField=null,this.unBroadcast(),this.unSubscribe()}_getFilterParams(){var e={filterParam:{prjCoordSys:this.prjCoordSys,excludeField:this.excludeField,geometry:this.geometry}};return ye.toJSON(e)}_onMessage(e){if(e.data&&e.data.indexOf("filterParam")>=0){var t=JSON.parse(e.data);return e.filterParam=t,e.eventType="setFilterParamSucceeded",void this.events.triggerEvent("setFilterParamSucceeded",e)}var r=JSON.parse(e.data);e.featureResult=r,e.eventType="messageSucceeded",this.events.triggerEvent("messageSucceeded",e)}_connect(e){return e=this._appendCredentials(e),"WebSocket"in window?new WebSocket(e):"MozWebSocket"in window?new(0,window.MozWebSocket)(e):(console.log("no WebSocket"),null)}_appendCredentials(e){var t=tt.getToken(e);return t&&(e+="?token="+t),e}}s.DataFlowService=Xt;
  /* Copyright© 2000 - 2019 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 Kt{constructor(e){e=e||{},this.bounds=null,this.dataSourceName=null,this.description=null,this.encodeType=null,this.isReadOnly=null,this.name=null,this.prjCoordSys=null,this.tableName=null,this.type=null,ye.extend(this,e);var t=this.bounds;t&&(this.bounds=new ve(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y)),this.CLASS_NAME="SuperMap.DatasetInfo"}destroy(){ye.reset(this)}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}s.DatasetInfo=Kt;
  /* Copyright© 2000 - 2019 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 Zt{constructor(e){this.operation=O.UNION,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.OverlayAnalystParameters"}destroy(){this.operation=null}}s.OverlayAnalystParameters=Zt;
  /* Copyright© 2000 - 2019 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 $t extends Zt{constructor(e){super(e),this.operateDataset=null,this.operateDatasetFields=[],this.operateDatasetFilter=new At,this.operateRegions=[],this.sourceDataset=null,this.sourceDatasetFields=[],this.sourceDatasetFilter=new At,this.tolerance=0,this.resultSetting=new _t,ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetOverlayAnalystParameters"}destroy(){super.destroy();var e=this;if(e.operateDataset=null,e.operateDatasetFields=null,e.operateDatasetFilter&&(e.operateDatasetFilter.destroy(),e.operateDatasetFilter=null),e.operateRegions){for(var t=0,r=e.operateRegions,s=r.length;t<s;t++)r[t].destroy();e.operateRegions=null}e.sourceDataset=null,e.sourceDatasetFields=null,e.sourceDatasetFilter&&(e.sourceDatasetFilter.destroy(),e.sourceDatasetFilter=null),e.tolerance=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null)}static toObject(e,t){for(var r in e)if("sourceDataset"!==r)if("operateRegions"===r){t.operateRegions=[];var s=e.operateRegions;for(var i in s)s.hasOwnProperty(i)&&(t.operateRegions[i]=He.fromGeometry(s[i]))}else"resultSetting"===r?t.dataReturnOption=e.resultSetting:t[r]=e[r]}}s.DatasetOverlayAnalystParameters=$t;
  /* Copyright© 2000 - 2019 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 er{constructor(e){this.clipRegion=null,this.datumValue=0,this.expectedZValues=null,this.interval=0,this.resampleTolerance=0,this.smoothMethod=F.BSPLINE,this.smoothness=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.SurfaceAnalystParametersSetting"}destroy(){var e=this;e.clipRegion&&(e.clipRegion.destroy(),e.clipRegion=null),e.datumValue=null,e.expectedZValues=null,e.interval=null,e.resampleTolerance=null,e.smoothMethod=null,e.smoothness=null}toJSON(){let e="'datumValue':"+ye.toJSON(this.datumValue);if(e+=",'interval':"+ye.toJSON(this.interval),e+=",'resampleTolerance':"+ye.toJSON(this.resampleTolerance),e+=",'smoothMethod':"+ye.toJSON(this.smoothMethod),e+=",'smoothness':"+ye.toJSON(this.smoothness),null!=this.expectedZValues&&(e+=",'expectedZValues':"+ye.toJSON(this.expectedZValues)),null!=this.clipRegion){var t=this.clipRegion;this.clipRegion instanceof Se&&this.clipRegion.components&&(t=He.fromGeometry(this.clipRegion)),e+=",'clipRegion':"+ye.toJSON(t)}return"{"+e+"}"}}s.SurfaceAnalystParametersSetting=er;
  /* Copyright© 2000 - 2019 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 tr{constructor(e){this.resolution=0,this.extractParameter=new er,this.resultSetting=new _t,this.surfaceAnalystMethod=R.ISOLINE,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.SurfaceAnalystParameters"}destroy(){var e=this;e.resolution=null,e.extractParameter&&(e.extractParameter.destroy(),e.extractParameter=null),e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.surfaceAnalystMethod=null}}s.SurfaceAnalystParameters=tr;
  /* Copyright© 2000 - 2019 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 rr extends tr{constructor(e){super(e),this.dataset=null,this.filterQueryParameter=new At,this.zValueFieldName=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetSurfaceAnalystParameters"}destroy(){super.destroy();var e=this;e.dataset=null,e.filterQueryParameter&&(e.filterQueryParameter.destroy(),e.filterQueryParameter=null),e.zValueFieldName=null}static toObject(e,t){for(var r in e)if("filterQueryParameter"===r&&(t.filterQueryParameter=e.filterQueryParameter),"extractParameter"===r)e.extractParameter.clipRegion instanceof Se&&e.extractParameter.clipRegion.components&&(e.extractParameter.clipRegion=He.fromGeometry(e.extractParameter.clipRegion)),t.extractParameter=e.extractParameter;else{if("dataset"===r)continue;if("surfaceAnalystMethod"===r)continue;t[r]=e[r]}}}s.DatasetSurfaceAnalystParameters=rr;
  /* Copyright© 2000 - 2019 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 sr{constructor(e){e&&(this.clipRegion=null,this.createResultDataset=!1,this.resultDatasetName=null,this.resultDatasourceName=null,this.returnResultRegion=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.ThiessenAnalystParameters")}destroy(){var e=this;e.clipRegion&&(e.clipRegion.destroy(),e.clipRegion=null),e.createResultDataset=null,e.resultDatasetName=null,e.resultDatasourceName=null,e.returnResultRegion=null}}s.ThiessenAnalystParameters=sr;
  /* Copyright© 2000 - 2019 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 ir extends sr{constructor(e){super(e),this.filterQueryParameter=null,this.dataset=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetThiessenAnalystParameters"}destroy(){super.destroy();this.filterQueryParameter&&(this.filterQueryParameter.destroy(),this.filterQueryParameter=null)}static toObject(e,t){for(var r in e)"clipRegion"===r?t.clipRegion=He.fromGeometry(e.clipRegion):t[r]=e[r]}}s.DatasetThiessenAnalystParameters=ir;
  /* Copyright© 2000 - 2019 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 ar{constructor(e){this.dataset=null,this.bounds=null,this.fieldName=null,this.resultGridDatasetResolution=null,this.searchRadius=null,this.targetDatasource=null,this.resultGridName=null,this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.DensityKernelAnalystParameters"}destroy(){var e=this;e.dataset=null,e.bounds=null,e.fieldName=null,e.resultGridDatasetResolution=null,e.searchRadius=null,e.targetDatasource=null,e.resultGridName=null,e.deleteExistResultDataset=null}static toObject(e,t){for(var r in e)"dataset"!==r&&(t[r]=e[r])}}s.DensityKernelAnalystParameters=ar;
  /* Copyright© 2000 - 2019 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 nr extends vt{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.DensityAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t=this;"/"!==t.url.substr(t.url.length-1,1)&&(t.url+="/");var r=new Object;e instanceof ar&&(t.url+="datasets/"+e.dataset+"/densityanalyst/kernel",t.mode="kernel"),ar.toObject(e,r);var s=ye.toJSON(r);t.url+=".json?returnContent=true",t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}s.DensityAnalystService=nr;
  /* Copyright© 2000 - 2019 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 or{constructor(e){this.dataSourceName=null,this.dataSetName=null,this.features=null,this.editType=k.ADD,this.IDs=null,this.returnContent=!1,this.isUseBatch=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.EditFeaturesParameters"}destroy(){var e=this;e.dataSourceName=null,e.dataSetName=null,e.features=null,e.editType=null,e.IDs=null,e.returnContent=null}static toJsonParameters(e){var t,r,s;if(e.editType===k.DELETE){if(null===e.IDs)return;s={ids:e.IDs}}else if(s=[],e.features){r=e.features.length;for(var i=0;i<r;i++)(t=e.features[i]).geometry=He.fromGeometry(t.geometry),s.push(t)}return ye.toJSON(s)}}s.EditFeaturesParameters=or;
  /* Copyright© 2000 - 2019 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 lr extends ct{constructor(e,t){super(e,t),this.returnContent=!1,this.isUseBatch=!1,t&&ye.extend(this,t);var r;r=this.url.substr(this.url.length-1,1),this.url+="/"==r?"features.json?":"/features.json?",this.CLASS_NAME="SuperMap.EditFeaturesService"}destroy(){super.destroy();this.returnContent=null,this.isUseBatch=null,this.fromIndex=null,this.toIndex=null}processAsync(e){if(e instanceof or){var t=this,r="POST",s="",i=e.editType,a=null;t.returnContent=e.returnContent,t.isUseBatch=e.isUseBatch,a=or.toJsonParameters(e),i===k.DELETE?(s=ye.toJSON(e.IDs),t.url+="ids="+s,r="DELETE",a=s):i===k.UPDATE?r="PUT":(t.isUseBatch&&(t.url+="isUseBatch="+t.isUseBatch,t.returnContent=!1),t.returnContent&&(t.url+="returnContent="+t.returnContent,r="POST")),t.request({method:r,data:a,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}s.EditFeaturesService=lr;
  /* Copyright© 2000 - 2019 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 hr{constructor(e){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalyst3DParameters"}destroy(){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=null}}s.FacilityAnalyst3DParameters=hr;
  /* Copyright© 2000 - 2019 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 ur extends hr{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystSinks3DParameters"}destroy(){super.destroy()}}s.FacilityAnalystSinks3DParameters=ur;
  /* Copyright© 2000 - 2019 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 cr extends ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystSinks3DService"}destroy(){ct.prototype.destroy.apply(this,arguments)}processAsync(e){if(e instanceof ur){var t,r=this,s=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===s?"sinks":"/sinks")+".json?",t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}s.FacilityAnalystSinks3DService=cr;
  /* Copyright© 2000 - 2019 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 dr extends hr{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystSources3DParameters"}destroy(){super.destroy()}}s.FacilityAnalystSources3DParameters=dr;
  /* Copyright© 2000 - 2019 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 pr extends ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystSources3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof dr){var t,r=this,s=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===s?"sources":"/sources")+".json?",t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}s.FacilityAnalystSources3DService=pr;
  /* Copyright© 2000 - 2019 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 mr{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,this.queryType=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystStreamParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null,e.type=null}}s.FacilityAnalystStreamParameters=mr;
  /* Copyright© 2000 - 2019 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 fr extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystStreamService"}destroy(){super.destroy()}processAsync(e){if(e instanceof mr){var t,r=this,s=r.url.substr(r.url.length-1,1);if(0===e.queryType)r.url=r.url+("/"===s?"upstreamcirticalfaclilities":"/upstreamcirticalfaclilities")+".json?";else{if(1!==e.queryType)return;r.url=r.url+("/"===s?"downstreamcirticalfaclilities":"/downstreamcirticalfaclilities")+".json?"}t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID||null===e.edgeID&&null===e.nodeID||(null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed}))}}}s.FacilityAnalystStreamService=fr;
  /* Copyright© 2000 - 2019 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 yr extends hr{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DParameters"}destroy(){super.destroy()}}s.FacilityAnalystTracedown3DParameters=yr;
  /* Copyright© 2000 - 2019 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 gr extends ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof yr){var t,r=this,s=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===s?"tracedownresult":"/tracedownresult")+".json?",t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}s.FacilityAnalystTracedown3DService=gr;
  /* Copyright© 2000 - 2019 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 vr extends hr{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DParameters"}destroy(){super.destroy()}}s.FacilityAnalystTraceup3DParameters=vr;
  /* Copyright© 2000 - 2019 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 Sr extends ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof vr){var t,r=this,s=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===s?"traceupresult":"/traceupresult")+".json?",t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}s.FacilityAnalystTraceup3DService=Sr;
  /* Copyright© 2000 - 2019 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 br extends hr{constructor(e){super(e),e=e||{},this.sourceNodeIDs=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystUpstream3DParameters"}destroy(){super.destroy(),this.sourceNodeIDs=null}}s.FacilityAnalystUpstream3DParameters=br;
  /* Copyright© 2000 - 2019 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 xr extends ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystUpstream3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof br){var t,r=this,s=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===s?"upstreamcirticalfaclilities":"/upstreamcirticalfaclilities")+".json?",t={sourceNodeIDs:e.sourceNodeIDs,edgeID:e.edgeID,nodeID:e.nodeID,isUncertainDirectionValid:e.isUncertainDirectionValid},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}s.FacilityAnalystUpstream3DService=xr;
  /* Copyright© 2000 - 2019 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 Cr extends yt{constructor(e){super(e),this.filterParam=null,this.aggType=ie.FILTER,this.CLASS_NAME="SuperMap.FilterAggParameter",ye.extend(this,e)}destroy(){super.destroy();this.filterParam&&(this.filterParam=null)}}s.FilterAggParameter=Cr;
  /* Copyright© 2000 - 2019 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 _r{constructor(e){this.datasource=null,this.dataset=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.FieldParameters"}destroy(){this.datasource=null,this.dataset=null}}s.FieldParameters=_r;
  /* Copyright© 2000 - 2019 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 Tr extends _r{constructor(e){super(e),this.fieldName=null,this.statisticMode=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.FieldStatisticsParameters"}destroy(){this.fieldName=null,this.statisticMode=null}}s.FieldStatisticsParameters=Tr;
  /* Copyright© 2000 - 2019 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 Er extends ct{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,this.field=null,this.statisticMode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.FieldStatisticService"}destroy(){super.destroy();this.datasource=null,this.dataset=null,this.field=null,this.statisticMode=null}processAsync(){var e=this,t=e.url.substr(e.url.length-1,1),r="datasources/"+e.datasource+"/datasets/"+e.dataset+"/fields/"+e.field+"/"+e.statisticMode;e.url+="/"==t?r+".json?":"/"+r+".json?",e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}s.FieldStatisticService=Er;
  /* Copyright© 2000 - 2019 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 wr{constructor(e){this.event=null,this.expectFacilityCount=1,this.facilities=null,this.fromEvent=!1,this.isAnalyzeById=!1,this.maxWeight=0,this.parameter=new qt,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindClosestFacilitiesParameters"}destroy(){var e=this;e.event=null,e.expectFacilityCount=null,e.facilities=null,e.fromEvent=null,e.isAnalyzeById=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.FindClosestFacilitiesParameters=wr;
  /* Copyright© 2000 - 2019 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 Ar extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindClosestFacilitiesService"}destroy(){super.destroy()}processAsync(e){if(e instanceof wr){var t,r=this,s=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===s?"closestfacility":"/closestfacility")+".json?",t={expectFacilityCount:e.expectFacilityCount,fromEvent:e.fromEvent,maxWeight:e.maxWeight,parameter:ye.toJSON(e.parameter),event:ye.toJSON(e.event),facilities:r.getJson(e.isAnalyzeById,e.facilities)},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJson(e,t){var r="[",s=t?t.length:0;if(!1===e)for(let e=0;e<s;e++)e>0&&(r+=","),r+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(1==e)for(let e=0;e<s;e++)e>0&&(r+=","),r+=t[e];return r+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new Je;return e.facilityPathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}s.FindClosestFacilitiesService=Ar;
  /* Copyright© 2000 - 2019 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 Lr{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,r=e.supplyCenters,s=r.length;t<s;t++)r[t].destroy();e.supplyCenters=null}}}s.FindLocationParameters=Lr;
  /* Copyright© 2000 - 2019 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 Pr extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindLocationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Lr){var t,r=this,s=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===s?"location":"/location")+".json?",t={isFromCenter:e.isFromCenter,expectedSupplyCenterCount:e.expectedSupplyCenterCount,weightName:e.weightName,turnWeightField:e.turnWeightField,returnEdgeFeature:!0,returnEdgeGeometry:!0,returnNodeFeature:!0,mapParameter:ye.toJSON(e.mapParameter),supplyCenters:r.getCentersJson(e.supplyCenters)},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getCentersJson(e){for(var t="[",r=e?e.length:0,s=0;s<r;s++)s>0&&(t+=","),t+=ye.toJSON(e[s]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new Je;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}s.FindLocationService=Pr;
  /* Copyright© 2000 - 2019 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 Nr{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new qt,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.FindMTSPPathsParameters=Nr;
  /* Copyright© 2000 - 2019 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 Mr extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Nr){var t,r=this,s=r.getJson(e.isAnalyzeById,e.centers),i=r.getJson(e.isAnalyzeById,e.nodes);r.url=r.url+"/mtsppath.json?",t={centers:s,nodes:i,parameter:ye.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJson(e,t){var r="[",s=t?t.length:0;if(!1===e)for(let e=0;e<s;e++)e>0&&(r+=","),r+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(1==e)for(let e=0;e<s;e++)e>0&&(r+=","),r+=t[e];return r+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new Je;return e.pathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}s.FindMTSPPathsService=Mr;
  /* Copyright© 2000 - 2019 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 Or{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new qt,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.FindPathParameters=Or;
  /* Copyright© 2000 - 2019 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 Ir extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Or){var t,r=this,s=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===s?"path":"/path")+".json?",t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:ye.toJSON(e.parameter),nodes:r.getJson(e.isAnalyzeById,e.nodes)},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJson(e,t){var r="[",s=t?t.length:0;if(!1===e)for(let e=0;e<s;e++)e>0&&(r+=","),r+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(1==e)for(let e=0;e<s;e++)e>0&&(r+=","),r+=t[e];return r+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new Je;return e.pathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}s.FindPathService=Ir;
  /* Copyright© 2000 - 2019 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 Fr{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new qt,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.FindServiceAreasParameters=Fr;
  /* Copyright© 2000 - 2019 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 Rr extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Fr){var t,r=this,s=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===s?"servicearea":"/servicearea")+".json?",t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:ye.toJSON(e.parameter),centers:r.getJson(e.isAnalyzeById,e.centers),weights:r.getJson(!0,e.weights)},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJson(e,t){var r="[",s=t?t.length:0;if(!1===e)for(let e=0;e<s;e++)e>0&&(r+=","),r+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(1==e)for(let e=0;e<s;e++)e>0&&(r+=","),r+=t[e];return r+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new Je;return e.serviceAreaList.map(function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e}),e}}s.FindServiceAreasService=Rr;
  /* Copyright© 2000 - 2019 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 Dr{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new qt,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.FindTSPPathsParameters=Dr;
  /* Copyright© 2000 - 2019 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 kr extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Dr){var t,r=this,i=r.url.substr(r.url.length-1,1);r.url=r.url+("/"===i?"tsppath":"/tsppath")+".json?",t={parameter:s.Util.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:r.getNodesJson(e)},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getNodesJson(e){var t,r,s,i,a="";if(!1===e.isAnalyzeById){for(t="[",r=0,s=(i=e.nodes).length;r<s;r++)r>0&&(t+=","),t+='{"x":'+i[r].x+',"y":'+i[r].y+"}";a+=t+="]"}else if(1==e.isAnalyzeById){let t="[",r=e.nodes,s=r.length;for(let e=0;e<s;e++)e>0&&(t+=","),t+=r[e];a+=t+="]"}return a}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new Je;return e.tspPathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}s.FindTSPPathsService=kr;
  /* Copyright© 2000 - 2019 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 Br{constructor(e){this.routeTable=null,this.routeIDField=null,this.attributeFilter=null,this.eventTable=null,this.eventRouteIDField=null,this.measureField=null,this.measureStartField=null,this.measureEndField=null,this.measureOffsetField=null,this.errorInfoField=null,this.retainedFields=null,this.dataReturnOption=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GenerateSpatialDataParameters"}destroy(){var e=this;e.routeTable&&(e.routeTable=null),e.routeIDField=null,e.attributeFilter=null,e.eventTable=null,e.eventRouteIDField=null,e.measureField=null,e.measureStartField=null,e.measureEndField=null,e.measureOffsetField=null,e.errorInfoField=null,e.dataReturnOption&&(e.dataReturnOption.destroy(),e.dataReturnOption=null)}}s.GenerateSpatialDataParameters=Br;
  /* Copyright© 2000 - 2019 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 Gr extends vt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GenerateSpatialDataService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Br){var t,r=this;t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJsonParameters(e){var t,r="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata";return t=this.url.substr(this.url.length-1,1),this.url+="/"===t?r+".json":"/"+r+".json",this.url+="?returnContent=true",ye.toJSON(e)}}s.GenerateSpatialDataService=Gr;
  /* Copyright© 2000 - 2019 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 Ur extends ft{constructor(e){super(e),this.bounds=null,this.queryType=ae.GEO_BOUNDING_BOX,this.CLASS_NAME="SuperMap.GeoBoundingBoxQueryBuilderParameter",ye.extend(this,e)}destroy(){super.destroy(),this.bounds=null,this.queryType=null}}s.GeoBoundingBoxQueryBuilderParameter=Ur;
  /* Copyright© 2000 - 2019 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 jr extends yt{constructor(e){super(e),this.precision=5,this.aggType=ie.GEOHASH_GRID,ye.extend(this,e),this.CLASS_NAME="SuperMap.GeoHashGridAggParameter"}destroy(){super.destroy(),this.aggType=null}static toJsonParameters(e){var t={aggName:e.aggName,aggFieldName:e.aggFieldName,aggType:e.aggType,precision:e.precision};return e.subAgg&&(t.subAgg=e.subAgg),ye.toJson(t)}}s.GeoHashGridAggParameter=jr;
  /* Copyright© 2000 - 2019 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 Hr extends Zt{constructor(e){super(e),e&&e.operateGeometry&&(this.operateGeometry=e.operateGeometry),e&&e.sourceGeometry&&(this.sourceGeometry=e.sourceGeometry),e&&e.operateGeometries&&(this.operateGeometries=e.operateGeometries),e&&e.sourceGeometries&&(this.sourceGeometries=e.sourceGeometries),e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeometryOverlayAnalystParameters"}destroy(){super.destroy();var e=this;e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.sourceGeometries&&(e.sourceGeometries.destroy(),e.sourceGeometries=null),e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.operateGeometries&&(e.operateGeometries.destroy(),e.operateGeometries=null)}static toObject(e,t){for(var r in e)if("sourceGeometry"===r)t.sourceGeometry=He.fromGeometry(e.sourceGeometry);else if("sourceGeometries"===r){for(var s=[],i=0;i<e.sourceGeometries.length;i++)s.push(He.fromGeometry(e.sourceGeometries[i]));t.sourceGeometries=s}else if("operateGeometry"===r)t.operateGeometry=He.fromGeometry(e.operateGeometry);else if("operateGeometries"===r){for(var a=[],n=0;n<e.operateGeometries.length;n++)a.push(He.fromGeometry(e.operateGeometries[n]));t.operateGeometries=a}else t[r]=e[r]}}s.GeometryOverlayAnalystParameters=Hr;
  /* Copyright© 2000 - 2019 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 Jr extends tr{constructor(e){super(e),this.points=null,this.zValues=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeometrySurfaceAnalystParameters"}destroy(){super.destroy();if(this.points){for(var e=0,t=this.points,r=t.length;e<r;e++)t[e].destroy();this.points=null}this.zValues=null}}s.GeometrySurfaceAnalystParameters=Jr;
  /* Copyright© 2000 - 2019 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 Vr extends sr{constructor(e){super(e),this.points=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeometryThiessenAnalystParameters"}destroy(){super.destroy();if(this.points){for(var e=this.points.length-1;e>=0;e--)this.points[e].destroy();this.points=null}}static toObject(e,t){for(var r in e)"clipRegion"===r?t.clipRegion=He.fromGeometry(e.clipRegion):t[r]=e[r]}}s.GeometryThiessenAnalystParameters=Vr;
  /* Copyright© 2000 - 2019 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 zr{constructor(e){this.dataset=null,this.sourceFilter=null,this.referenceFilter=null,this.spatialRelationType=null,this.isBorderInside=null,this.returnFeature=null,this.returnGeoRelatedOnly=null,this.startRecord=0,this.expectCount=500,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeoRelationAnalystParameters"}destroy(){var e=this;e.sourceFilter&&e.sourceFilter.destroy(),e.sourceFilter=null,e.referenceFilter&&e.referenceFilter.destroy(),e.referenceFilter=null,e.dataset=null,e.spatialRelationType=null,e.isBorderInside=null,e.returnFeature=null,e.returnGeoRelatedOnly=null,e.startRecord=null,e.expectCount=null}}s.GeoRelationAnalystParameters=zr;
  /* Copyright© 2000 - 2019 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 Wr extends vt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GeoRelationAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof zr){var t=this,r=t.url.substr(t.url.length-1,1);t.url+="/"===r?"datasets/"+e.dataset+"/georelation":"/datasets/"+e.dataset+"/georelation";var i=s.Util.toJSON(e);t.url+=".json?returnContent=true",t.request({method:"POST",data:i,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}s.GeoRelationAnalystService=Wr;
  /* Copyright© 2000 - 2019 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 qr{constructor(e){this.datasetNames=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.aggregations=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.aggregation&&(e.aggregation=null)}}s.GetFeaturesParametersBase=qr;
  /* Copyright© 2000 - 2019 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 Yr extends qr{constructor(e){super(e),this.getFeatureMode=Yr.getFeatureMode.BOUNDS,this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=h.CONTAIN,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,r,s;return r={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},s={datasetNames:e.datasetNames,getFeatureMode:Yr.getFeatureMode.BOUNDS,bounds:r,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new At).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode=Yr.getFeatureMode.BOUNDS_ATTRIBUTEFILTER),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),ye.toJSON(s)}}Yr.getFeatureMode={BOUNDS:"BOUNDS",BOUNDS_ATTRIBUTEFILTER:"BOUNDS_ATTRIBUTEFILTER"},s.GetFeaturesByBoundsParameters=Yr;
  /* Copyright© 2000 - 2019 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 Qr extends ct{constructor(e,t){super(e,t),t=t||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.maxFeatures=null,this.format=i.GEOJSON,ye.extend(this,t);var r;t.format&&(this.format=t.format.toUpperCase()),r=this.url.substr(this.url.length-1,1),this.url+="/"==r?"featureResults.json?":"/featureResults.json?",this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null}processAsync(e){if(e){var t,r=this,s=!0;r.returnContent=e.returnContent,r.fromIndex=e.fromIndex,r.toIndex=e.toIndex,r.maxFeatures=e.maxFeatures,r.returnContent&&(r.url+="returnContent="+r.returnContent,s=!1),null!=r.fromIndex&&null!=r.toIndex&&!isNaN(r.fromIndex)&&!isNaN(r.toIndex)&&r.fromIndex>=0&&r.toIndex>=0&&!s&&(r.url+="&fromIndex="+r.fromIndex+"&toIndex="+r.toIndex),e.returnCountOnly&&(r.url+="&returnCountOnly="+e.returnContent),t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}serviceProcessCompleted(e){if(e=ye.transformResult(e),this.format===i.GEOJSON&&e.features){var t=new Je;e.features=t.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}s.GetFeaturesServiceBase=Qr;
  /* Copyright© 2000 - 2019 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 Xr extends Qr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return Yr.toJsonParameters(e)}}s.GetFeaturesByBoundsService=Xr;
  /* Copyright© 2000 - 2019 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 Kr extends qr{constructor(e){super(e),this.bufferDistance=null,this.attributeFilter=null,this.geometry=null,this.fields=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBufferParameters"}destroy(){super.destroy();var e=this;if(e.bufferDistance=null,e.attributeFilter=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}static toJsonParameters(e){var t,r,s;return s=He.fromGeometry(e.geometry),r={datasetNames:e.datasetNames,getFeatureMode:"BUFFER",bufferDistance:e.bufferDistance,geometry:s},e.fields&&((t=new At).name=e.datasetNames,t.fields=e.fields,r.queryParameter=t),e.attributeFilter&&(r.attributeFilter=e.attributeFilter,r.getFeatureMode="BUFFER_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(r.maxFeatures=e.maxFeatures),ye.toJSON(r)}}s.GetFeaturesByBufferParameters=Kr;
  /* Copyright© 2000 - 2019 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 Zr extends Qr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBufferService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Kr)return s.GetFeaturesByBufferParameters.toJsonParameters(e)}}s.GetFeaturesByBufferService=Zr;
  /* Copyright© 2000 - 2019 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 $r extends qr{constructor(e){super(e),this.getFeatureMode="SPATIAL",this.geometry=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=h.CONTAIN,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryParameters"}destroy(){super.destroy();var e=this;if(e.geometry&&(e.geometry.destroy(),e.geometry=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,r,s;return r=He.fromGeometry(e.geometry),s={datasetNames:e.datasetNames,getFeatureMode:"SPATIAL",geometry:r,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new At).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode="SPATIAL_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),ye.toJSON(s)}}s.GetFeaturesByGeometryParameters=$r;
  /* Copyright© 2000 - 2019 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 es extends Qr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){return $r.toJsonParameters(e)}}s.GetFeaturesByGeometryService=es;
  /* Copyright© 2000 - 2019 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 ts extends qr{constructor(e){super(e),this.getFeatureMode="ID",this.IDs=null,this.fields=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByIDsParameters"}destroy(){super.destroy();var e=this;if(e.IDs=null,e.getFeatureMode=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}}static toJsonParameters(e){var t,r;return t={datasetNames:e.datasetNames,getFeatureMode:"ID",ids:e.IDs},e.fields&&((r=new At).name=e.datasetNames,r.fields=e.fields,t.queryParameter=r),ye.toJSON(t)}}s.GetFeaturesByIDsParameters=ts;
  /* Copyright© 2000 - 2019 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 rs extends Qr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByIDsService"}destroy(){super.destroy()}getJsonParameters(e){return ts.toJsonParameters(e)}}s.GetFeaturesByIDsService=rs;
  /* Copyright© 2000 - 2019 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 ss extends qr{constructor(e){super(e),this.getFeatureMode="SQL",this.queryParameter=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesBySQLParameters"}destroy(){super.destroy();this.getFeatureMode=null,this.queryParameter&&(this.queryParameter.destroy(),this.queryParameter=null)}static toJsonParameters(e){var t={datasetNames:e.datasetNames,getFeatureMode:"SQL",queryParameter:e.queryParameter};return e.maxFeatures&&!isNaN(e.maxFeatures)&&(t.maxFeatures=e.maxFeatures),e.aggregations&&(t.aggregations=e.aggregations),ye.toJSON(t)}}s.GetFeaturesBySQLParameters=ss;
  /* Copyright© 2000 - 2019 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 is extends Qr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesBySQLService"}destroy(){super.destroy()}getJsonParameters(e){return ss.toJsonParameters(e)}}s.GetFeaturesBySQLService=is;
  /* Copyright© 2000 - 2019 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 as extends ct{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GetFieldsService"}destroy(){super.destroy();this.datasource=null,this.dataset=null}processAsync(){var e=this,t=e.url.substr(e.url.length-1,1),r="datasources/"+e.datasource+"/datasets/"+e.dataset;e.url+="/"==t?r+"/fields.json?":"/"+r+"/fields.json?",e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}s.GetFieldsService=as;
  /* Copyright© 2000 - 2019 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 ns{constructor(e){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetGridCellInfosParameters"}destroy(){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null}}s.GetGridCellInfosParameters=ns;
  /* Copyright© 2000 - 2019 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 os extends ct{constructor(e,t){super(e,t),this.datasetName=null,this.dataSourceName=null,this.datasetType=null,this.X=null,this.Y=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GetGridCellInfosService"}destroy(){super.destroy();var e=this;e.X=null,e.Y=null,e.datasetName=null,e.dataSourceName=null,e.datasetType=null}processAsync(e){if(e instanceof ns){ye.extend(this,e);var t=this,r=t.url.substr(t.url.length-1,1);t.url+="/"==r?"datasources/"+t.dataSourceName+"/datasets/"+t.datasetName+".json":"/datasources/"+t.dataSourceName+"/datasets/"+t.datasetName+".json",t.queryRequest(t.getDatasetInfoCompleted,t.getDatasetInfoFailed)}}queryRequest(e,t){this.request({method:"GET",data:null,scope:this,success:e,failure:t})}getDatasetInfoCompleted(e){e=ye.transformResult(e),this.datasetType=e.datasetInfo.type,this.queryGridInfos()}queryGridInfos(){var e=this,t=/\.json/.exec(e.url).index,r=e.url.substring(t),s=e.url.substring(0,e.url.length-r.length);"GRID"==e.datasetType?e.url=s+"/gridValue"+r:e.url=s+"/imageValue"+r,null!=e.X&&null!=e.Y&&(e.url+="?x="+e.X+"&y="+e.Y),e.queryRequest(e.serviceProcessCompleted,e.serviceProcessFailed)}getDatasetInfoFailed(e){this.serviceProcessFailed(e)}}s.GetGridCellInfosService=os;
  /* Copyright© 2000 - 2019 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 ls{constructor(e,t){this.srcData=e,this.targetData=t,this.CLASS_NAME="SuperMap.ThemeMemoryData"}destroy(){this.srcData=null,this.targetData=null}toJSON(){if(this.srcData&&this.targetData){for(var e="",t=Math.min(this.srcData.length,this.targetData.length),r=0;r<t;r++)e+="'"+this.srcData[r]+"':'"+this.targetData[r]+"',";return r>0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}}s.ThemeMemoryData=ls;
  /* Copyright© 2000 - 2019 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 hs{constructor(e,t){if(!e)return this;this.memoryData=null,this.type=e,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.Theme"}destroy(){this.memoryData&&(this.memoryData.destroy(),this.memoryData=null),this.type=null}toServerJSONObject(){}}s.Theme=hs;
  /* Copyright© 2000 - 2019 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 us{constructor(e){this.align=C.BASELINECENTER,this.backColor=new Be(255,255,255),this.foreColor=new Be(0,0,0),this.backOpaque=!1,this.sizeFixed=!0,this.fontHeight=6,this.fontWidth=0,this.fontWeight=400,this.fontName="Times New Roman",this.bold=!1,this.italic=!1,this.italicAngle=0,this.shadow=!1,this.strikeout=!1,this.outline=!1,this.opaqueRate=0,this.underline=!1,this.rotation=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerTextStyle"}destroy(){var e=this;e.align=null,e.backColor&&(e.backColor.destroy(),e.backColor=null),e.foreColor&&(e.foreColor.destroy(),e.foreColor=null),e.backOpaque=null,e.sizeFixed=null,e.fontHeight=null,e.fontWidth=null,e.fontWeight=null,e.fontName=null,e.bold=null,e.italic=null,e.italicAngle=null,e.shadow=null,e.strikeout=null,e.outline=null,e.opaqueRate=null,e.underline=null,e.rotation=null}static fromObj(e){var t=new us(e);return ye.copy(t,e),t.backColor=Be.fromJson(e.backColor),t.foreColor=Be.fromJson(e.foreColor),t}}s.ServerTextStyle=us;
  /* Copyright© 2000 - 2019 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 cs{constructor(e){this.caption=null,this.end=0,this.start=0,this.visible=!0,this.style=new us,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}static fromObj(e){if(e){var t=new cs;return ye.copy(t,e),t}}}s.ThemeLabelItem=cs;
  /* Copyright© 2000 - 2019 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 ds{constructor(e){this.caption=null,this.style=new Ge,this.unique=null,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeUniqueItem"}destroy(){var e=this;e.caption=null,e.unique=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){var t=new ds;return ye.copy(t,e),t.style=Ge.fromJson(e.style),t}}s.ThemeUniqueItem=ds;
  /* Copyright© 2000 - 2019 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 ps{constructor(e){this.flowEnabled=!1,this.leaderLineDisplayed=!1,this.leaderLineStyle=new Ge,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeFlow"}destroy(){var e=this;e.flowEnabled=null,e.leaderLineDisplayed=null,e.leaderLineStyle&&(e.leaderLineStyle.destroy(),e.leaderLineStyle=null)}static fromObj(e){if(e){var t=new ps;return ye.copy(t,e),t.leaderLineStyle=Ge.fromJson(e.leaderLineStyle),t}}}s.ThemeFlow=ps;
  /* Copyright© 2000 - 2019 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 ms{constructor(e){this.offsetFixed=!1,this.offsetX="0.0",this.offsetY="0.0",e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeOffset"}destroy(){this.offsetFixed=null,this.offsetX=null,this.offsetY=null}static fromObj(e){if(e){var t=new ms;return ye.copy(t,e),t}}}s.ThemeOffset=ms;
  /* Copyright© 2000 - 2019 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 fs{constructor(e){this.defaultStyle=null,this.separator=null,this.separatorEnabled=!1,this.splitIndexes=null,this.styles=new us,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LabelMixedTextStyle"}destroy(){var e=this;if(e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null),e.separator=null,e.separatorEnabled=null,e.splitIndexes&&(e.splitIndexes=null),e.styles){for(var t=0,r=e.styles,s=r.length;t<s;t++)r[t].destroy();e.styles=null}}static fromObj(e){if(e){var t=new fs,r=e.styles;if(ye.copy(t,e),t.defaultStyle=new us(e.defaultStyle),r){t.styles=[];for(var s=0,i=r.length;s<i;s++)t.styles.push(new us(r[s]))}return t}}}s.LabelMixedTextStyle=fs;
  /* Copyright© 2000 - 2019 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 ys{constructor(e){this.maxTextHeight=0,this.maxTextWidth=0,this.minTextHeight=0,this.minTextWidth=0,this.uniformStyle=new us,this.uniformMixedStyle=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelText"}destroy(){var e=this;e.maxTextHeight=null,e.maxTextWidth=null,e.minTextHeight=null,e.minTextWidth=null,e.uniformStyle&&(e.uniformStyle.destroy(),e.uniformStyle=null),e.uniformMixedStyle&&(e.uniformMixedStyle.destroy(),e.uniformMixedStyle=null)}static fromObj(e){if(e){var t=new ys;return ye.copy(t,e),t.uniformStyle=us.fromObj(e.uniformStyle),t.uniformMixedStyle=fs.fromObj(e.uniformMixedStyle),t}}}s.ThemeLabelText=ys;
  /* Copyright© 2000 - 2019 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 gs{constructor(e){this.isAlongLine=!0,this.alongLineDirection=T.LB_TO_RT,this.angleFixed=!1,this.repeatedLabelAvoided=!1,this.repeatIntervalFixed=!1,this.labelRepeatInterval=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelAlongLine"}destroy(){var e=this;e.isAlongLine=null,e.alongLineDirection=null,e.angleFixed=null,e.repeatedLabelAvoided=null,e.repeatIntervalFixed=null,e.labelRepeatInterval=null}static fromObj(e){if(e){var t=new gs;return ye.copy(t,e),t}}}s.ThemeLabelAlongLine=gs;
  /* Copyright© 2000 - 2019 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 vs{constructor(e){this.labelBackShape=E.NONE,this.backStyle=new Ge,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelBackground"}destroy(){this.labelBackShape=null,this.backStyle&&(this.backStyle.destroy(),this.backStyle=null)}static fromObj(e){if(e){var t=new vs;return t.labelBackShape=e.labelBackShape,t.backStyle=Ge.fromJson(e.backStyle),t}}}s.ThemeLabelBackground=vs;
  /* Copyright© 2000 - 2019 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 Ss extends hs{constructor(e){super("LABEL",e),this.alongLine=new gs,this.background=new vs,this.flow=new ps,this.items=null,this.uniqueItems=null,this.labelExpression=null,this.labelOverLengthMode=w.NONE,this.matrixCells=null,this.maxLabelLength=256,this.numericPrecision=0,this.offset=new ms,this.overlapAvoided=!0,this.rangeExpression=null,this.uniqueExpression=null,this.smallGeometryLabeled=!1,this.text=new ys,this.textSpace=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabel"}destroy(){super.destroy();var e=this;if(e.alongLine=null,e.background&&(e.background.destroy(),e.background=null),e.flow=null,e.items){for(var t=0,r=e.items,s=r.length;t<s;t++)r[t].destroy();e.items=null}if(e.uniqueItems){for(var i=0,a=e.uniqueItems,n=a.length;i<n;i++)a[i].destory();e.uniqueItems=null}e.labelExpression=null,e.labelOverLengthMode=null,e.matrixCells=null,e.maxLabelLength=null,e.numericPrecision=null,e.overlapAvoided=null,e.rangeExpression=null,e.uniqueExpression=null,e.offset&&(e.offset.destroy(),e.offset=null),e.overlapAvoided=null,e.smallGeometryLabeled=null,e.text&&(e.text.destroy(),e.text=null),e.textSpace=null}toJSON(){return ye.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,e.memoryData=this.memoryData,this.alongLine&&(e.alongLine=this.alongLine.isAlongLine,e.alongLineDirection=this.alongLine.alongLineDirection,e.angleFixed=this.alongLine.angleFixed,e.isLabelRepeated=this.alongLine.isLabelRepeated,e.labelRepeatInterval=this.alongLine.labelRepeatInterval,e.repeatedLabelAvoided=this.alongLine.repeatedLabelAvoided,e.repeatIntervalFixed=this.alongLine.repeatIntervalFixed),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.text&&(e.maxTextHeight=this.text.maxTextHeight,e.maxTextWidth=this.text.maxTextWidth,e.minTextHeight=this.text.minTextHeight,e.minTextWidth=this.text.minTextWidth,e.uniformStyle=this.text.uniformStyle,e.uniformMixedStyle=this.text.uniformMixedStyle),this.background&&(e.labelBackShape=this.background.labelBackShape,e.backStyle=this.background.backStyle),e.labelOverLengthMode=this.labelOverLengthMode,e.maxLabelLength=this.maxLabelLength,e.smallGeometryLabeled=this.smallGeometryLabeled,e.rangeExpression=this.rangeExpression,e.uniqueExpression=this.uniqueExpression,e.numericPrecision=this.numericPrecision,e.items=this.items,e.uniqueItems=this.uniqueItems,e.labelExpression=this.labelExpression,e.overlapAvoided=this.overlapAvoided,e.matrixCells=this.matrixCells,e.textSpace=this.textSpace,e}static fromObj(e){if(e){var t=new Ss,r=e.items,s=e.uniqueItems,i=e.matrixCells;if(e.matrixCells=null,ye.copy(t,e),t.alongLine=gs.fromObj(e),t.background=vs.fromObj(e),t.flow=new ps({flowEnabled:e.flowEnabled,leaderLineDisplayed:e.leaderLineDisplayed,leaderLineStyle:e.leaderLineStyle}),r){t.items=[];for(var a=0,n=r.length;a<n;a++)t.items.push(cs.fromObj(r[a]))}if(s){t.uniqueItems=[];for(let e=0,r=s.length;e<r;e++)t.uniqueItems.push(ds.fromObj(s[e]))}if(i){t.matrixCells=[];for(let e=0,t=i.length;e<t;e++);}return t.offset=ms.fromObj(e),t.text=ys.fromObj(e),t}}}s.ThemeLabel=Ss;
  /* Copyright© 2000 - 2019 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 bs extends hs{constructor(e){super("UNIQUE",e),this.defaultStyle=new Ge,this.items=null,this.uniqueExpression=null,this.colorGradientType=x.YELLOW_RED,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeUnique"}destroy(){super.destroy();var e=this;if(e.uniqueExpression=null,e.colorGradientType=null,e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null)}toServerJSONObject(){var e={};if((e=ye.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,s=0;s<r;s++)t.push(e.items[s].toServerJSONObject());e.items=t}return e}static fromObj(e){var t=new bs,r=e.items,s=r?r.length:0;ye.extend(t,e),t.items=[],t.defaultStyle=Ge.fromJson(e.defaultStyle);for(var i=0;i<s;i++)t.items.push(ds.fromObj(r[i]));return t}}s.ThemeUnique=bs;
  /* Copyright© 2000 - 2019 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 xs{constructor(e){this.axesColor=new Be(0,0,0),this.axesDisplayed=!1,this.axesGridDisplayed=!1,this.axesTextDisplayed=!1,this.axesTextStyle=new us,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphAxes"}destroy(){var e=this;e.axesColor&&(e.axesColor.destroy(),e.axesColor=null),e.axesDisplayed=null,e.axesGridDisplayed=null,e.axesTextDisplayed=null,e.axesTextStyle&&(e.axesTextStyle.destroy(),e.axesTextStyle=null)}static fromObj(e){if(e){var t=new xs;return ye.copy(t,e),t.axesColor=Be.fromJson(e.axesColor),t.axesTextStyle=us.fromObj(e.axesTextStyle),t}}}s.ThemeGraphAxes=xs;
  /* Copyright© 2000 - 2019 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 Cs{constructor(e){this.maxGraphSize=0,this.minGraphSize=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphSize"}destroy(){this.maxGraphSize=null,this.minGraphSize=null}static fromObj(e){var t=new Cs;return ye.copy(t,e),t}}s.ThemeGraphSize=Cs;
  /* Copyright© 2000 - 2019 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 _s{constructor(e){this.graphTextDisplayed=!1,this.graphTextFormat=f.CAPTION,this.graphTextStyle=new us,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphText"}destroy(){var e=this;e.graphTextDisplayed=null,e.graphTextFormat=null,e.graphTextStyle&&(e.graphTextStyle.destroy(),e.graphTextStyle=null)}static fromObj(e){var t=new _s;return ye.copy(t,e),t.graphTextStyle=us.fromObj(e.graphTextStyle),t}}s.ThemeGraphText=_s;
  /* Copyright© 2000 - 2019 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 Ts{constructor(e){this.caption=null,this.graphExpression=null,this.memoryDoubleValues=null,this.uniformStyle=new Ge,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphItem"}destroy(){this.caption=null,this.graphExpression=null,this.memoryDoubleValues=null,this.uniformStyle=null}static fromObj(e){if(e){var t=new Ts;return ye.copy(t,e),t.uniformStyle=Ge.fromJson(e.uniformStyle),t}}}s.ThemeGraphItem=Ts;
  /* Copyright© 2000 - 2019 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 Es extends hs{constructor(e){super("GRAPH",e),this.barWidth=0,this.flow=new ps,this.graduatedMode=v.CONSTANT,this.graphAxes=new xs,this.graphSize=new Cs,this.graphSizeFixed=!1,this.graphText=new _s,this.graphType=y.AREA,this.graphAxesTextDisplayMode=g.NONE,this.items=null,this.memoryKeys=null,this.negativeDisplayed=!1,this.offset=new ms,this.overlapAvoided=!0,this.roseAngle=0,this.startAngle=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraph"}destroy(){super.destroy();var e=this;if(e.barWidth=null,e.flow&&(e.flow.destroy(),e.flow=null),e.graduatedMode=null,e.graphAxes&&(e.graphAxes.destroy(),e.graphAxes=null),e.graphSize&&(e.graphSize.destroy(),e.graphSize=null),e.graphSizeFixed=null,e.graphText&&(e.graphText.destroy(),e.graphText=null),e.graphType=null,e.items){for(var t=0,r=e.items,s=r.length;t<s;t++)r[t].destroy();e.items=null}e.memoryKeys=null,e.negativeDisplayed=null,e.offset&&(e.offset.destroy(),e.offset=null),e.overlapAvoided=null,e.roseAngle=null,e.startAngle=null,e.graphAxesTextDisplayMode=null}toJSON(){return ye.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,this.graphText&&(e.graphTextDisplayed=this.graphText.graphTextDisplayed,e.graphTextFormat=this.graphText.graphTextFormat,e.graphTextStyle=this.graphText.graphTextStyle),this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.graphAxes&&(e.axesColor=this.graphAxes.axesColor,e.axesDisplayed=this.graphAxes.axesDisplayed,e.axesGridDisplayed=this.graphAxes.axesGridDisplayed,e.axesTextDisplayed=this.graphAxes.axesTextDisplayed,e.axesTextStyle=this.graphAxes.axesTextStyle),this.graphSize&&(e.maxGraphSize=this.graphSize.maxGraphSize,e.minGraphSize=this.graphSize.minGraphSize),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),e.barWidth=this.barWidth,e.graduatedMode=this.graduatedMode,e.graphSizeFixed=this.graphSizeFixed,e.graphType=this.graphType,e.graphAxesTextDisplayMode=this.graphAxesTextDisplayMode,e.items=this.items,e.memoryKeys=this.memoryKeys,e.negativeDisplayed=this.negativeDisplayed,e.overlapAvoided=this.overlapAvoided,e.roseAngle=this.roseAngle,e.startAngle=this.startAngle,e}static fromObj(e){var t=new Es,r=e.items,s=r?r.length:0;ye.copy(t,e),t.items=[],t.flow=ps.fromObj(e),t.graphAxes=xs.fromObj(e),t.graphSize=Cs.fromObj(e),t.graphText=_s.fromObj(e),t.offset=ms.fromObj(e);for(var i=0;i<s;i++)t.items.push(Ts.fromObj(r[i]));return t}}s.ThemeGraph=Es;
  /* Copyright© 2000 - 2019 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 ws extends hs{constructor(e){super("DOTDENSITY",e),this.dotExpression=null,this.style=new Ge,this.value=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeDotDensity"}destroy(){var e=this;e.dotExpression=null,e.value=null,e.style&&(e.style.destroy(),e.style=null)}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){if(e){var t=new ws;return ye.copy(t,e),t.style=Ge.fromJson(e.style),t}}}s.ThemeDotDensity=ws;
  /* Copyright© 2000 - 2019 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 As{constructor(e){this.negativeDisplayed=!1,this.negativeStyle=new Ge,this.positiveStyle=new Ge,this.zeroDisplayed=!1,this.zeroStyle=new Ge,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraduatedSymbolStyle"}destroy(){var e=this;e.negativeDisplayed=null,e.negativeStyle=null,e.positiveStyle=null,e.zeroDisplayed=null,e.zeroStyle=null}static fromObj(e){if(e){var t=new As;return ye.copy(t,e),t.negativeStyle=Ge.fromJson(e.negativeStyle),t.positiveStyle=Ge.fromJson(e.positiveStyle),t.zeroStyle=Ge.fromJson(e.zeroStyle),t}}}s.ThemeGraduatedSymbolStyle=As;
  /* Copyright© 2000 - 2019 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 Ls extends hs{constructor(e){super("GRADUATEDSYMBOL",e),this.baseValue=0,this.expression=null,this.flow=new ps,this.graduatedMode=s.GraduatedMode.CONSTAN,this.offset=new ms,this.style=new As,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraduatedSymbol"}destroy(){super.destroy();var e=this;e.expression=null,e.flow&&(e.flow.destroy(),e.flow=null),e.graduatedMode=v.CONSTANT,e.offset&&(e.offset.destroy(),e.offset=null),e.style&&(e.style.destroy(),e.style=null)}toJSON(){return ye.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,e.memoryData=this.memoryData,e.baseValue=this.baseValue,e.expression=this.expression,e.graduatedMode=this.graduatedMode,this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),this.style&&(e.negativeStyle=this.style.negativeStyle,e.negativeDisplayed=this.style.negativeDisplayed,e.positiveStyle=this.style.positiveStyle,e.zeroDisplayed=this.style.zeroDisplayed,e.zeroStyle=this.style.zeroStyle),e}static fromObj(e){if(e){var t=new s.ThemeGraduatedSymbol;return ye.copy(t,e),t.flow=ps.fromObj(e),t.offset=ms.fromObj(e),t.style=As.fromObj(e),t}}}s.ThemeGraduatedSymbol=Ls;
  /* Copyright© 2000 - 2019 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 Ps{constructor(e){this.caption=null,this.end=0,this.start=0,this.style=new Ge,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeRangeItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){if(e){var t=new Ps;return ye.copy(t,e),t.style=Ge.fromJson(e.style),t}}}s.ThemeRangeItem=Ps;
  /* Copyright© 2000 - 2019 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 Ns extends hs{constructor(e){super("RANGE",e),this.precision="1.0E-12",this.items=null,this.rangeExpression=null,this.rangeMode=S.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=x.YELLOW_RED,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeRange"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.rangeExpression=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new Ns;ye.copy(t,e);var r=e.items,s=r?r.length:0;t.items=[];for(var i=0;i<s;i++)t.items.push(Ps.fromObj(r[i]));return t}}}s.ThemeRange=Ns;
  /* Copyright© 2000 - 2019 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 Ms{constructor(e){e=e||{},this.bounds=null,this.caption=null,this.description=null,this.name=null,this.queryable=null,this.subLayers=null,this.type=null,this.visible=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.UGCLayer"}destroy(){ye.reset(this)}fromJson(e){e=e||{},ye.extend(this,e);var t=this.bounds;t&&(this.bounds=new ve(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y))}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}s.UGCLayer=Ms;
  /* Copyright© 2000 - 2019 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 Os{constructor(e){e=e||{},this.allowPointOverlap=!0,this.allowPointWithTextDisplay=!0,this.allowTextOverlap=!1,this.allowTextAndPointOverlap=!0,this.allowThemeGraduatedSymbolOverlap=!1,this.allowThemeGraphOverlap=!1,this.horizontalOverlappedSpaceSize=0,this.verticalOverlappedSpaceSize=0,ye.extend(this,e),this.ugcLayer=new Ms(e),this.CLASS_NAME="SuperMap.OverlapDisplayedOptions"}destroy(){ye.reset(this)}fromJson(e){this.ugcLayer.fromJson.apply(this,[e])}toServerJSONObject(){return this.ugcLayer.toServerJSONObject.apply(this,arguments)}toString(){var e=this.ugcLayer.toServerJSONObject.apply(this,arguments),t="{";for(var r in e)e.hasOwnProperty(r)&&(t+="'"+r+"':"+e[r]+",");return t=t.substr(0,t.length-1),t+="}"}}s.OverlapDisplayedOptions=Os;
  /* Copyright© 2000 - 2019 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 Is extends Ms{constructor(e){super(e=e||{}),this.completeLineSymbolDisplayed=null,this.maxScale=null,this.minScale=null,this.minVisibleGeometrySize=null,this.opaqueRate=null,this.symbolScalable=null,this.symbolScale=null,this.overlapDisplayed=null,this.overlapDisplayedOptions=null,this.CLASS_NAME="SuperMap.UGCMapLayer"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e)}toServerJSONObject(){return super.toServerJSONObject()}}s.UGCMapLayer=Is;
  /* Copyright© 2000 - 2019 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 Fs extends Is{constructor(e){super(e=e||{}),this.datasetInfo=null,this.displayFilter=null,this.joinItems=null,this.representationField=null,this.ugcLayerType=null,this.CLASS_NAME="SuperMap.UGCSubLayer"}fromJson(e){if(super.fromJson(e),this.datasetInfo&&(this.datasetInfo=new Kt(this.datasetInfo)),this.joinItems&&this.joinItems.length){for(var t=[],r=0;r<this.joinItems.length;r++)t[r]=new Tt(this.joinItems[r]);this.joinItems=t}}destroy(){super.destroy(),ye.reset(this)}toServerJSONObject(){var e=super.toServerJSONObject();if(e.joinItems){for(var t=[],r=0;r<e.joinItems.length;r++)e.joinItems[r].toServerJSONObject&&(t[r]=e.joinItems[r].toServerJSONObject());e.joinItems=t}return e.datasetInfo&&e.datasetInfo.toServerJSONObject&&(e.datasetInfo=e.datasetInfo.toServerJSONObject()),e}}s.UGCSubLayer=Fs;
  /* Copyright© 2000 - 2019 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 Rs extends Fs{constructor(e){super(e=e||{}),this.theme=null,this.themeElementPosition=null,this.CLASS_NAME="SuperMap.ServerTheme"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e);var t=this.theme;switch(t&&t.type){case"LABEL":this.theme=Ss.fromObj(t);break;case"UNIQUE":this.theme=bs.fromObj(t);break;case"GRAPH":this.theme=Es.fromObj(t);break;case"DOTDENSITY":this.theme=ws.fromObj(t);break;case"GRADUATEDSYMBOL":this.theme=Ls.fromObj(t);break;case"RANGE":this.theme=Ns.fromObj(t)}this.themeElementPosition&&(this.themeElementPosition=new ge(this.themeElementPosition.x,this.themeElementPosition.y))}toServerJSONObject(){var e=super.toServerJSONObject();return e.themeElementPosition&&e.themeElementPosition.toServerJSONObject&&(e.themeElementPosition=e.themeElementPosition.toServerJSONObject()),e.theme&&e.theme.toServerJSONObject&&(e.theme=e.theme.toServerJSONObject()),e}}s.ServerTheme=Rs;
  /* Copyright© 2000 - 2019 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 Ds extends Fs{constructor(e){super(e=e||{}),this.colorDictionarys=null,this.brightness=null,this.colorGradientType=null,this.colors=null,this.contrast=null,this.dashStyle=null,this.gridType=null,this.horizontalSpacing=null,this.sizeFixed=null,this.solidStyle=null,this.specialColor=null,this.specialValue=null,this.specialValueTransparent=null,this.verticalSpacing=null,this.CLASS_NAME="SuperMap.Grid"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){if(super.fromJson(e),this.specialColor&&(this.specialColor=new Be(this.specialColor.red,this.specialColor.green,this.specialColor.blue)),this.colors){var t,r=[];for(var s in this.colors)t=this.colors[s],r.push(new Be(t.red,t.green,t.blue));this.colors=r}if(this.dashStyle&&(this.dashStyle=new Ge(this.dashStyle)),this.solidStyle&&(this.solidStyle=new Ge(this.solidStyle)),this.colorDictionary){var i,a=[];for(var n in this.colorDictionary)i=this.colorDictionary[n],a.push(new zt({elevation:n,color:i}));this.colorDictionarys=a}delete this.colorDictionary}toServerJSONObject(){var e=super.toServerJSONObject();return e.dashStyle&&e.dashStyle.toServerJSONObject&&(e.dashStyle=e.dashStyle.toServerJSONObject()),e.solidStyle&&e.solidStyle.toServerJSONObject&&(e.solidStyle=e.solidStyle.toServerJSONObject()),e}}s.Grid=Ds;
  /* Copyright© 2000 - 2019 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 ks extends Fs{constructor(e){super(e=e||{}),this.brightness=null,this.colorSpaceType=null,this.contrast=null,this.displayBandIndexes=null,this.transparent=null,this.transparentColor=null,this.transparentColorTolerance=null,this.CLASS_NAME="SuperMap.Image"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e),this.transparentColor&&(this.transparentColor=new Be(this.transparentColor.red,this.transparentColor.green,this.transparentColor.blue))}toServerJSONObject(){return super.toServerJSONObject()}}s.Image=ks;
  /* Copyright© 2000 - 2019 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 Bs extends Fs{constructor(e){super(e=e||{}),this.style=null,this.CLASS_NAME="SuperMap.Vector"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e);var t=this.style;t&&(this.style=new Ge(t))}toServerJSONObject(){var e=s.toServerJSONObject();return e.style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}}s.Vector=Bs;
  /* Copyright© 2000 - 2019 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 Gs extends ct{constructor(e,t){super(e,t),this.isTempLayers=!1,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GetLayersInfoService"}destroy(){super.destroy(),ye.reset(this)}processAsync(){var e=this,t=e.url.substr(e.url.length-1,1);e.isTempLayers?e.url+=".json?":(e.url+="/"===t?"":"/",e.url+="layers.json?"),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}serviceProcessCompleted(e){var t,r;r=(t=!!(e=ye.transformResult(e))&&e.length>0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(r,t),this.events.triggerEvent("processCompleted",{result:e[0]})}handleLayers(e,t){var r;if(e)for(var s=0;s<e;s++){if(t[s].subLayers&&t[s].subLayers.layers&&t[s].subLayers.layers.length>0)this.handleLayers(t[s].subLayers.layers.length,t[s].subLayers.layers);else switch(t[s].ugcLayerType){case"THEME":(r=new Rs).fromJson(t[s]),t[s]=r;break;case"GRID":(r=new Ds).fromJson(t[s]),t[s]=r;break;case"IMAGE":(r=new ks).fromJson(t[s]),t[s]=r;break;case"VECTOR":(r=new Bs).fromJson(t[s]),t[s]=r}}}}s.GetLayersInfoService=Gs;
  /* Copyright© 2000 - 2019 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 Us{constructor(e){e&&(this.bounds=null,this.searchRadius=0,this.zValueFieldName=null,this.zValueScale=1,this.resolution=null,this.filterQueryParameter=null,this.outputDatasetName=null,this.outputDatasourceName=null,this.pixelFormat=null,this.dataset=null,this.inputPoints=null,this.InterpolationAnalystType="dataset",this.clipParam=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationAnalystParameters")}destroy(){var e=this;e.bounds=null,e.searchRadius=null,e.zValueFieldName=null,e.zValueScale=null,e.resolution=null,e.filterQueryParameter=null,e.outputDatasetName=null,e.pixelFormat=null}static toObject(e,t){for(var r in e)if("inputPoints"===r&&"geometry"===e.InterpolationAnalystType){for(var s=[],i=0;i<e.inputPoints.length;i++){var a=e.inputPoints[i],n={x:a.x,y:a.y,z:a.tag};s.push(n)}t[r]=s}else t[r]=e[r]}}s.InterpolationAnalystParameters=Us;
  /* Copyright© 2000 - 2019 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 js extends Us{constructor(e){super(e),this.smooth=.1,this.tension=40,this.searchMode=null,this.expectedCount=12,this.maxPointCountForInterpolation=200,this.maxPointCountInNode=50,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationRBFAnalystParameters"}destroy(){super.destroy();var e=this;e.smooth=null,e.tension=null,e.searchMode=null,e.expectedCount=null,e.maxPointCountForInterpolation=null,e.maxPointCountInNode=null}static toObject(e,t){for(var r in e)t[r]=e[r]}}s.InterpolationRBFAnalystParameters=js;
  /* Copyright© 2000 - 2019 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 Hs extends Us{constructor(e){super(e),e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationDensityAnalystParameters"}destroy(){super.destroy()}}s.InterpolationDensityAnalystParameters=Hs;
  /* Copyright© 2000 - 2019 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 Js extends Us{constructor(e){super(e),this.power=2,this.searchMode=null,this.expectedCount=12,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationIDWAnalystParameters"}destroy(){super.destroy();this.power=null,this.searchMode=null,this.expectedCount=null}}s.InterpolationIDWAnalystParameters=Js;
  /* Copyright© 2000 - 2019 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 Vs extends Us{constructor(e){super(e),this.type=null,this.mean=null,this.angle=0,this.nugget=0,this.range=0,this.sill=0,this.variogramMode=Y.SPHERICAL,this.exponent=Q.EXP1,this.searchMode=null,this.expectedCount=12,this.maxPointCountForInterpolation=200,this.maxPointCountInNode=50,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationKrigingAnalystParameters"}destroy(){super.destroy();var e=this;e.type=null,e.mean=null,e.angle=null,e.nugget=null,e.range=null,e.sill=null,e.variogramMode=null,e.exponent=null,e.searchMode=null,e.expectedCount=null,e.maxPointCountForInterpolation=null,e.maxPointCountInNode=null}}s.InterpolationKrigingAnalystParameters=Vs;
  /* Copyright© 2000 - 2019 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 zs extends vt{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t)}destroy(){super.destroy(),this.mode=null,this.CLASS_NAME="SuperMap.InterpolationAnalystService"}processAsync(e){var t={},r=this;"/"!==r.url.substr(r.url.length-1,1)&&(r.url+="/"),e instanceof Hs?(r.mode="Density","geometry"===e.InterpolationAnalystType?r.url+="geometry/interpolation/density":r.url+="datasets/"+e.dataset+"/interpolation/density"):e instanceof Js?(r.mode="IDW","geometry"===e.InterpolationAnalystType?r.url+="geometry/interpolation/idw":r.url+="datasets/"+e.dataset+"/interpolation/idw"):e instanceof js?(r.mode="RBF","geometry"===e.InterpolationAnalystType?r.url+="geometry/interpolation/rbf":r.url+="datasets/"+e.dataset+"/interpolation/rbf"):e instanceof Vs&&(r.mode="Kriging","geometry"===e.InterpolationAnalystType?r.url+="geometry/interpolation/kriging":r.url+="datasets/"+e.dataset+"/interpolation/kriging"),Us.toObject(e,t);var s=ye.toJSON(t);r.url+=".json?returnContent=true",r.request({method:"POST",data:s,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}s.InterpolationAnalystService=zs;
  /* Copyright© 2000 - 2019 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 Ws{constructor(e){e&&(this.datasetName="",this.query="",this.resolution=80,this.method=0,this.meshType=0,this.fields="",this.radius=300,this.meshSizeUnit=ee.METER,this.radiusUnit=ee.METER,this.areaUnit=$.SQUAREMILE,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.KernelDensityJobParameter")}destroy(){this.datasetName=null,this.query=null,this.resolution=null,this.method=null,this.radius=null,this.meshType=null,this.fields=null,this.meshSizeUnit=null,this.radiusUnit=null,this.areaUnit=null,this.output instanceof Mt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},"query"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}s.KernelDensityJobParameter=Ws;
  /* Copyright© 2000 - 2019 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 qs extends Ft{constructor(e,t){super(e,t),this.url+="/spatialanalyst/density",this.CLASS_NAME="SuperMap.KernelDensityJobsService"}destroy(){super.destroy()}getKernelDensityJobs(){super.getJobs(this.url)}getKernelDensityJob(e){super.getJobs(this.url+"/"+e)}addKernelDensityJob(e,t){super.addJob(this.url,e,Ws,t)}}s.KernelDensityJobsService=qs;
  /* Copyright© 2000 - 2019 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 Ys{constructor(){this.CLASS_NAME="LabelMatrixCell"}}s.LabelMatrixCell=Ys;
  /* Copyright© 2000 - 2019 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 Qs extends Ys{constructor(e){super(e),this.height=0,this.pathField=null,this.rotation=0,this.width=0,this.sizeFixed=!1,this.type="IMAGE",e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LabelImageCell"}destroy(){var e=this;e.height=null,e.pathField=null,e.rotation=null,e.width=null,e.sizeFixed=null}}s.LabelImageCell=Qs;
  /* Copyright© 2000 - 2019 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 Xs extends Ys{constructor(e){super(e),this.style=new Ge,this.symbolIDField=null,this.type="SYMBOL",e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LabelSymbolCell"}destroy(){this.style&&(this.style.destroy(),this.style=null),this.symbolIDField=null}}s.LabelSymbolCell=Xs;
  /* Copyright© 2000 - 2019 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 Ks extends Ys{constructor(e){super(e),this.themeLabel=new Ss,this.type="THEME",e&&ye.extend(this,e),this.CLASS_NAME=" SuperMap.LabelThemeCell"}destroy(){this.themeLabel&&(this.themeLabel.destroy(),this.themeLabel=null)}}s.LabelThemeCell=Ks;
  /* Copyright© 2000 - 2019 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 Zs{constructor(e){this.layerName=null,this.isVisible=null,this.displayFilter=null,this.fieldValuesDisplayFilter=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LayerStatus"}destroy(){this.layerName=null,this.isVisible=null,this.displayFilter=null}toJSON(){var e="{";e+='"type":"UGC",';var t=[];return this.layerName&&(t.push('"name":"'+this.layerName+'"'),t.push('"visible":'+this.isVisible)),this.displayFilter&&t.push('"displayFilter":"'+this.displayFilter+'"'),(this.minScale||0==this.minScale)&&t.push('"minScale":'+this.minScale),(this.maxScale||0==this.maxScale)&&t.push('"maxScale":'+this.maxScale),this.fieldValuesDisplayFilter&&t.push('"fieldValuesDisplayFilter":'+ye.toJSON(this.fieldValuesDisplayFilter)),e+=t,e+="}"}}s.LayerStatus=Zs;
  /* Copyright© 2000 - 2019 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 $s extends ct{constructor(e,t){super(e,t),this.projection=null,this.CLASS_NAME="SuperMap.MapService",t&&ye.extend(this,t);if(this.projection){var r=this.projection.split(":");r instanceof Array&&(2===r.length&&(this.url+='?prjCoordSys={"epsgCode":'+r[1]+"}"),1===r.length&&(this.url+='?prjCoordSys={"epsgCode":'+r[0]+"}"))}}destroy(){super.destroy();var e=this;e.events&&(e.events.un(e.eventListeners),e.events.listeners=null,e.events.destroy(),e.events=null,e.eventListeners=null)}processAsync(){this.request({method:"GET",scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}serviceProcessCompleted(e){var t=(e=ye.transformResult(e)).code>=200&&e.code<300||0==e.code||304===e.code,r=e.code&&t;!e.code||r?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}}s.MapService=$s;
  /* Copyright© 2000 - 2019 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 ei{constructor(e){e&&(this.dataset=null,this.extractRegion=null,this.expression=null,this.isZip=!1,this.ignoreNoValue=!1,this.targetDatasource=null,this.resultGridName=null,this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.MathExpressionAnalysisParameters")}destroy(){var e=this;e.dataset=null,e.bounds=null,e.expression=null,e.isZip=!0,e.ignoreNoValue=!0,e.targetDatasource=null,e.resultGridName=null,e.deleteExistResultDataset=null}static toObject(e,t){for(var r in e)if("dataset"!==r&&(t[r]=e[r]),"extractRegion"===r&&e[r]){for(var s=e[r].components[0].components,i={},a=[],n=s.length,o=0;o<n-1;o++){var l={};l.x=s[o].x,l.y=s[o].y,a.push(l)}i.points=a,i.type="REGION",t[r]=i}}}s.MathExpressionAnalysisParameters=ei;
  /* Copyright© 2000 - 2019 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 ti extends vt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.MathExpressionAnalysisService"}destroy(){super.destroy()}processAsync(e){var t=this;"/"!==t.url.substr(t.url.length-1,1)&&(t.url+="/");var r={};e instanceof ei&&(t.url+="datasets/"+e.dataset+"/mathanalyst"),ei.toObject(e,r);var s=ye.toJSON(r);t.url+=".json?returnContent=true",t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}s.MathExpressionAnalysisService=ti;
  /* Copyright© 2000 - 2019 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 ri{constructor(e,t){e&&(this.geometry=e,this.unit=d.METER,this.prjCoordSys=null,this.distanceMode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.MeasureParameters")}destroy(){this.geometry=null,this.unit=null,this.prjCoordSys=null}}s.MeasureParameters=ri;
  /* Copyright© 2000 - 2019 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 si extends ct{constructor(e,t){super(e,t),this.measureMode=c.DISTANCE,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.MeasureService"}destroy(){super.destroy();this.measureMode=null}processAsync(e){if(e instanceof ri){var t,r,s,i=this,a=e.geometry;if(a){s=i.url.substr(i.url.length-1,1),i.measureMode===c.AREA?i.url+="/"===s?"area.json?":"/area.json?":i.url+="/"===s?"distance.json?":"/distance.json?";var n,o,l,h=He.fromGeometry(a);if(h)t=h.parts[0],r=h.points.splice(0,t),e.prjCoordSys?("object"==typeof e.prjCoordSys?n='{"epsgCode"'+(o=e.prjCoordSys.projCode).substring(o.indexOf(":"),o.length)+"}":"string"==typeof e.prjCoordSys&&(n='{"epsgCode"'+e.prjCoordSys.substring(e.prjCoordSys.indexOf(":"),e.prjCoordSys.length)+"}"),l={point2Ds:ye.toJSON(r),unit:e.unit,prjCoordSys:n}):l={point2Ds:ye.toJSON(r),unit:e.unit},i.request({method:"GET",params:l,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}}s.MeasureService=si;
  /* Copyright© 2000 - 2019 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 ii extends vt{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.OverlayAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},r=this;"/"!==r.url.substr(r.url.length-1,1)&&(r.url+="/"),e instanceof $t?(r.mode="datasets",r.url+="datasets/"+e.sourceDataset+"/overlay.json?returnContent=true",$t.toObject(e,t)):e instanceof Hr&&(r.mode="geometry",e.operateGeometries&&e.sourceGeometries?r.url+="geometry/overlay/batch.json?returnContent=true&ignoreAnalystParam=true":r.url+="geometry/overlay.json?returnContent=true",Hr.toObject(e,t));var s=ye.toJSON(t);r.request({method:"POST",data:s,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}s.OverlayAnalystService=ii;
  /* Copyright© 2000 - 2019 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 ai{constructor(e){e&&(this.datasetName="",this.datasetOverlay="",this.mode="",this.srcFields="",this.overlayFields="",this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.OverlayGeoJobParameter")}destroy(){this.datasetName=null,this.datasetOverlay=null,this.mode=null,this.srcFields=null,this.overlayFields=null,this.output instanceof Mt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!=r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}s.OverlayGeoJobParameter=ai;
  /* Copyright© 2000 - 2019 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 ni extends Ft{constructor(e,t){super(e,t),this.url+="/spatialanalyst/overlay",this.CLASS_NAME="SuperMap.OverlayGeoJobsService"}destroy(){super.destroy()}getOverlayGeoJobs(){super.getJobs(this.url)}getOverlayGeoJob(e){super.getJobs(this.url+"/"+e)}addOverlayGeoJob(e,t){super.addJob(this.url,e,ai,t)}}s.OverlayGeoJobsService=ni;
  /* Copyright© 2000 - 2019 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 oi extends Ht{constructor(e){e&&(super(e),this.returnContent=!0,this.bounds=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryByBoundsParameters")}destroy(){super.destroy();this.returnContent=null,this.bounds&&(this.bounds=null)}}s.QueryByBoundsParameters=oi;
  /* Copyright© 2000 - 2019 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 li extends ct{constructor(e,t){super(e,t),this.returnContent=!1,this.format=i.GEOJSON,this.returnFeatureWithFieldCaption=!1,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.QueryService";var r,s=this;s.url&&(t&&t.format&&(s.format=t.format.toUpperCase()),r=s.url.substr(s.url.length-1,1),s.url+="/"===r?"queryResults.json?":"/queryResults.json?")}destroy(){super.destroy();this.returnContent=null,this.format=null}processAsync(e){if(e instanceof Ht){var t,r=this,s=null;r.returnContent=e.returnContent,t=r.getJsonParameters(e),r.returnContent?r.url+="returnContent="+r.returnContent:(s=e.returnCustomResult)&&(r.url+="returnCustomResult="+s),r.returnFeatureWithFieldCaption=e.returnFeatureWithFieldCaption,r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}serviceProcessCompleted(e){e=ye.transformResult(e);var t=new Je;if(e&&e.recordsets)for(var r=0,s=e.recordsets,a=s.length;r<a;r++)s[r].features&&(!0===this.returnFeatureWithFieldCaption&&s[r].features.map(e=>(e.fieldNames=s[r].fieldCaptions,e)),this.format===i.GEOJSON&&(s[r].features=t.toGeoJSON(s[r].features)));this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new Ht({customParams:e.customParams,expectCount:e.expectCount,networkType:e.networkType,queryOption:e.queryOption,queryParams:e.queryParams,startRecord:e.startRecord,prjCoordSys:e.prjCoordSys,holdTime:e.holdTime})}}s.QueryService=li;
  /* Copyright© 2000 - 2019 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 hi extends li{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){if(!(e instanceof oi))return null;var t,r="",s=e.bounds;return t=this.getQueryParameters(e),r+="'queryMode':'BoundsQuery','queryParameters':",r+=ye.toJSON(t),r="{"+(r+=",'bounds': {'rightTop':{'y':"+s.top+",'x':"+s.right+"},'leftBottom':{'y':"+s.bottom+",'x':"+s.left+"}}")+"}"}}s.QueryByBoundsService=hi;
  /* Copyright© 2000 - 2019 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 ui extends Ht{constructor(e){e&&(super(e),this.distance=0,this.geometry=null,this.isNearest=null,this.returnContent=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryByDistanceParameters")}destroy(){super.destroy();var e=this;e.returnContent=null,e.distance=null,e.isNearest=null,e.geometry&&(e.geometry.destroy(),e.geometry=null)}}s.QueryByDistanceParameters=ui;
  /* Copyright© 2000 - 2019 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 ci extends li{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByDistanceService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof ui){var t="",r=this.getQueryParameters(e),s=He.fromGeometry(e.geometry);return t+=e.isNearest?"'queryMode':'FindNearest','queryParameters':":"'queryMode':'DistanceQuery','queryParameters':",t+=ye.toJSON(r),t="{"+(t+=",'geometry':"+ye.toJSON(s)+",'distance':"+e.distance)+"}"}}}s.QueryByDistanceService=ci;
  /* Copyright© 2000 - 2019 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 di extends Ht{constructor(e){e&&(super(e),this.returnContent=!0,this.geometry=null,this.spatialQueryMode=h.INTERSECT,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryByGeometryParameters")}destroy(){super.destroy();this.returnContent=null,this.geometry=null,this.spatialQueryMode=null}}s.QueryByGeometryParameters=di;
  /* Copyright© 2000 - 2019 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 pi extends li{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof di){var t,r="",s=e.geometry,i=He.fromGeometry(s);return t=this.getQueryParameters(e),r+="'queryMode':'SpatialQuery','queryParameters':",r="{"+(r+=ye.toJSON(t)+",'geometry':"+ye.toJSON(i)+",'spatialQueryMode':"+ye.toJSON(e.spatialQueryMode))+"}"}}}s.QueryByGeometryService=pi;
  /* Copyright© 2000 - 2019 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 mi extends Ht{constructor(e){e&&(super(e),this.returnContent=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryBySQLParameters")}destroy(){super.destroy();this.returnContent=null}}s.QueryBySQLParameters=mi;
  /* Copyright© 2000 - 2019 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 fi extends li{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryBySQLService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof mi){var t,r="";return t=this.getQueryParameters(e),r+="'queryMode':'SqlQuery','queryParameters':",r="{"+(r+=ye.toJSON(t))+"}"}}}s.QueryBySQLService=fi;
  /* Copyright© 2000 - 2019 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 yi{constructor(e){if(!e)return this;this.sourceRoute=null,this.point=null,this.tolerance=null,this.isIgnoreGap=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.RouteCalculateMeasureParameters"}destroy(){var e=this;e.sourceRoute=null,e.point=null,e.tolerance&&(e.tolerance=null),e.isIgnoreGap&&(e.isIgnoreGap=!1)}}s.RouteCalculateMeasureParameters=yi;
  /* Copyright© 2000 - 2019 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 gi extends vt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteCalculateMeasureService"}destroy(){super.destroy()}processAsync(e){if(e instanceof yi){var t,r=this;t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJsonParameters(e){var t,r="geometry/calculatemeasure";return t=this.url.substr(this.url.length-1,1),this.url+="/"===t?r+".json":"/"+r+".json",this.url+="?returnContent=true",ye.toJSON(e)}}s.RouteCalculateMeasureService=gi;
  /* Copyright© 2000 - 2019 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 vi{constructor(e){if(!e)return this;this.sourceRoute=null,this.dataset=null,this.routeIDField=null,this.routeID=null,this.type=null,this.measure=null,this.offset=0,this.isIgnoreGap=!1,this.startMeasure=null,this.endMeasure=null;var t=e.sourceRoute,r={};if(t&&t instanceof Se&&t.components){r.type=t.type,r.parts=t.parts;for(var s=[],i=0,a=t.components.length;i<a;i++)s=s.concat(t.components[i].components);r.points=s,e.sourceRoute=r}ye.extend(this,e),this.CLASS_NAME="SuperMap.RouteLocatorParameters"}destroy(){var e=this;e.sourceRoute=null,e.type=null,e.measure=null,e.offset=0,e.isIgnoreGap=!1,e.startMeasure=null,e.endMeasure=null,e.dataset=null,e.routeID=null,e.routeIDField=null}}s.RouteLocatorParameters=vi;
  /* Copyright© 2000 - 2019 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 Si extends vt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteLocatorService"}destroy(){super.destroy()}processAsync(e){if(e instanceof vi){var t,r=this;t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJsonParameters(e){var t,r="geometry/routelocator";return t=this.url.substr(this.url.length-1,1),e.dataset&&(r="datasets/"+e.dataset+"/linearreferencing/routelocator",e.sourceRoute=null),this.url+="/"===t?r+".json":"/"+r+".json",this.url+="?returnContent=true",ye.toJSON(e)}}s.RouteLocatorService=Si;
  /* Copyright© 2000 - 2019 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 bi{constructor(e){this.fieldNames=null,this.fieldValues=null,this.geometry=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerFeature"}destroy(){var e=this;e.fieldNames=null,e.fieldValues=null,e.geometry&&(e.geometry.destroy(),e.geometry=null)}toFeature(){var e,t,r,s,i={},a=this;for(var n in e=a.fieldNames,t=a.fieldValues,e)i[e[n]]=t[n];return a.geometry&&(r=a.geometry.toGeometry()),s=new Re(r,i),a.geometry&&a.geometry.id&&(s.fid=a.geometry.id),s}static fromJson(e){var t=null;if(e)return(t=e.geometry)&&(t=He.fromJson(t)),new bi({fieldNames:e.fieldNames,fieldValues:e.fieldValues,geometry:t})}}s.ServerFeature=bi;
  /* Copyright© 2000 - 2019 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 xi{constructor(e){e=e||{},this.resourceID=null,this.tempLayerName=null,this.layerInfo=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SetLayerInfoParameters"}destroy(){this.resourceID=null,this.tempLayerName=null,this.layerInfo=null}}s.SetLayerInfoParameters=xi;
  /* Copyright© 2000 - 2019 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 Ci extends ct{constructor(e,t){super(e,t),t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.SetLayerInfoService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e){var t=this;t.url+=".json";var r=ye.toJSON(e);t.request({method:"PUT",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}s.SetLayerInfoService=Ci;
  /* Copyright© 2000 - 2019 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 _i{constructor(e){e=e||{},this.isTempLayers=null,this.resourceID=null,this.layersInfo=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SetLayersInfoParameters"}destroy(){this.isTempLayers=null,this.resourceID=null,this.layersInfo=null}}s.SetLayersInfoParameters=_i;
  /* Copyright© 2000 - 2019 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 Ti extends ct{constructor(e,t){super(e,t),this.resourceID=null,this.isTempLayers=!1,t&&s.Util.extend(this,t),this.CLASS_NAME="SuperMap.SetLayersInfoService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e){var t,r,s=[],i=this,a="";r=i.url.substr(i.url.length-1,1),i.url+="/"===r?"":"/",i.isTempLayers?(i.url+="tempLayersSet/"+i.resourceID,a="PUT"):(i.url+="tempLayersSet",a="POST"),i.url+=".json?",e.subLayers||(e.subLayers={layers:[]}),e.subLayers.layers||(e.subLayers.layers=[]);var n=e.subLayers.layers,o=n.length;for(let e in n){if("GRID"===n[e].ugcLayerType){var l={},h=n[e].colorDictionarys;for(var u in h){l[h[u].elevation]=h[u].color}}n[e].colorDictionary=l,delete n[e].colorDictionarys}for(let e=0;e<o;e++)n[e].toJsonObject?s.push(n[e].toJsonObject()):s.push(n[e]);(t=ye.extend(t,e)).subLayers={layers:s},t.object=null;var c=ye.toJSON([t]);i.request({method:a,data:c,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}s.SetLayersInfoService=Ti;
  /* Copyright© 2000 - 2019 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 Ei{constructor(e){this.layerStatusList=[],this.holdTime=15,this.resourceID=null,e&&ye.extend(this,e)}destroy(){this.layerStatusList=null,this.holdTime=null,this.resourceID=null}toJSON(){var e="{";e+='"layers":[';for(var t=[],r=0,s=this.layerStatusList.length;r<s;r++)t.push(this.layerStatusList[r].toJSON());return e+=t,e+="]",e+="}"}}s.SetLayerStatusParameters=Ei;
  /* Copyright© 2000 - 2019 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 wi extends ct{constructor(e,t){super(e,t),this.lastparams=null,this.mapUrl=e,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.SetLayerStatusService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e instanceof Ei){var t=this;t.url=t.mapUrl;var r=t.url.substr(t.url.length-1,1);if(t.url+="/"===r?"":"/",null==e.resourceID)t.url+="tempLayersSet",t.url+=".json?",t.lastparams=e,t.request({method:"POST",scope:t,success:t.createTempLayerComplete,failure:t.serviceProcessFailed});else{t.url+="tempLayersSet/"+e.resourceID,t.url+=".json?",t.url+="elementRemain=true&reference="+e.resourceID+"&holdTime="+e.holdTime.toString();var s="[{";s+='"type":"UGC",',null!=e.layerStatusList&&e.layerStatusList.length>0&&(s+='"subLayers":'+e.toJSON()),s+=',"visible":true,',s+='"name":"'+this.getMapName(this.mapUrl)+'"',s+="}]",t.request({method:"PUT",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}createTempLayerComplete(e){(e=ye.transformResult(e)).succeed&&(this.lastparams.resourceID=e.newResourceID),this.processAsync(this.lastparams)}getMapName(e){var t=e;"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1));var r=t.lastIndexOf("/");return t.substring(r+1,t.length)}serviceProcessCompleted(e){null!=(e=ye.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}s.SetLayerStatusService=wi;
  /* Copyright© 2000 - 2019 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 Ai{constructor(e){e&&(this.datasetName="",this.datasetQuery="",this.geometryQuery="",this.mode=h.CONTAIN,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsParameter")}destroy(){this.datasetName=null,this.datasetQuery=null,this.geometryQuery=null,this.mode=null,this.output instanceof Mt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}s.SingleObjectQueryJobsParameter=Ai;
  /* Copyright© 2000 - 2019 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 Li extends Ft{constructor(e,t){super(e,t),this.url+="/spatialanalyst/query",this.CLASS_NAME="SuperMap.SingleObjectQueryJobsService"}destroy(){super.destroy()}getQueryJobs(){super.getJobs(this.url)}getQueryJob(e){super.getJobs(this.url+"/"+e)}addQueryJob(e,t){super.addJob(this.url,e,Ai,t)}}s.SingleObjectQueryJobsService=Li;
  /* Copyright© 2000 - 2019 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 Pi{constructor(e){e=e||{},this.keyWord=null,this.returnPosition=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.StopQueryParameters"}destroy(){ye.reset(this)}}s.StopQueryParameters=Pi;
  /* Copyright© 2000 - 2019 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 Ni extends ct{constructor(e,t){super(e,t),t=t||{},ye.extend(this,t),this.CLASS_NAME="SuperMap.StopQueryService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e instanceof Pi){var t,r=this;t=r.url.substr(r.url.length-1,1),r.url+="/"===t?"":"/",r.url+="stops/keyword/"+e.keyWord,r.url+=".json?",r.request({method:"GET",params:{returnPosition:e.returnPosition},scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}s.StopQueryService=Ni;
  /* Copyright© 2000 - 2019 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 Mi{constructor(e){e&&(this.datasetName="",this.groupField="",this.attributeField="",this.statisticModes="",this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SummaryAttributesJobsParameter")}destroy(){this.datasetName=null,this.groupField=null,this.attributeField=null,this.statisticModes=null,this.output instanceof Mt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}s.SummaryAttributesJobsParameter=Mi;
  /* Copyright© 2000 - 2019 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 Oi extends Ft{constructor(e,t){super(e,t),this.url+="/spatialanalyst/summaryattributes",this.CLASS_NAME="SuperMap.SummaryAttributesJobsService"}destroy(){super.destroy()}getSummaryAttributesJobs(){super.getJobs(this.url)}getSummaryAttributesJob(e){super.getJobs(this.url+"/"+e)}addSummaryAttributesJob(e,t){super.addJob(this.url,e,Mi,t)}}s.SummaryAttributesJobsService=Oi;
  /* Copyright© 2000 - 2019 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 Ii{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.query="",this.resolution=100,this.meshType=0,this.statisticModes=te.AVERAGE,this.fields="",this.type=re.SUMMARYMESH,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SummaryMeshJobParameter")}destroy(){this.datasetName=null,this.query=null,this.resolution=null,this.statisticModes=null,this.meshType=null,this.fields=null,this.regionDataset=null,this.type=null,this.output instanceof Mt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"type"!==r?"output"!==r?("SUMMARYMESH"===e.type&&"regionDataset"!==r||"SUMMARYREGION"===e.type&&!s(["meshType","resolution","query"],r))&&(t.analyst=t.analyst||{},"query"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):t.type=e[r]:(t.input=t.input||{},t.input[r]=e[r]);function s(e,t){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}}}s.SummaryMeshJobParameter=Ii;
  /* Copyright© 2000 - 2019 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 Fi extends Ft{constructor(e,t){super(e,t),this.url+="/spatialanalyst/aggregatepoints",this.CLASS_NAME="SuperMap.SummaryMeshJobsService"}destroy(){super.destroy()}getSummaryMeshJobs(){super.getJobs(this.url)}getSummaryMeshJob(e){super.getJobs(this.url+"/"+e)}addSummaryMeshJob(e,t){super.addJob(this.url,e,Ii,t)}}s.SummaryMeshJobsService=Fi;
  /* Copyright© 2000 - 2019 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 Ri{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.sumShape=!0,this.query="",this.standardSummaryFields=!1,this.standardFields="",this.standardStatisticModes="",this.weightedSummaryFields=!1,this.weightedFields="",this.weightedStatisticModes="",this.meshType=0,this.resolution=100,this.meshSizeUnit=ee.METER,this.type=re.SUMMARYMESH,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SummaryRegionJobParameter")}destroy(){this.datasetName=null,this.sumShape=null,this.regionDataset=null,this.query=null,this.standardSummaryFields=null,this.standardFields=null,this.standardStatisticModes=null,this.weightedSummaryFields=null,this.weightedFields=null,this.weightedStatisticModes=null,this.meshType=null,this.resolution=null,this.meshSizeUnit=null,this.type=null,this.output instanceof Mt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"type"!==r&&"type"!==r?"output"!==r?("SUMMARYREGION"===e.type||"SUMMARYMESH"===e.type&&"regionDataset"!==r)&&(t.analyst=t.analyst||{},"query"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):t.type=e[r]:(t.input=t.input||{},t.input[r]=e[r])}}s.SummaryRegionJobParameter=Ri;
  /* Copyright© 2000 - 2019 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 Di extends Ft{constructor(e,t){super(e,t),this.url+="/spatialanalyst/summaryregion",this.CLASS_NAME="SuperMap.SummaryRegionJobsService"}destroy(){super.destroy()}getSummaryRegionJobs(){super.getJobs(this.url)}getSummaryRegionJob(e){super.getJobs(this.url+"/"+e)}addSummaryRegionJob(e,t){super.addJob(this.url,e,Ri,t)}}s.SummaryRegionJobsService=Di;
  /* Copyright© 2000 - 2019 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 ki{constructor(e){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.SupplyCenter"}destroy(){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null}static fromJson(e){if(e)return new ki({maxWeight:e.maxWeight,nodeID:e.nodeID,resourceValue:e.resourceValue,type:e.type})}}s.SupplyCenter=ki;
  /* Copyright© 2000 - 2019 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 Bi extends vt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.SurfaceAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof tr){var t,r=this;t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJsonParameters(e){var t,r="",s={},i=this;if(e instanceof rr)t=i.url.substr(i.url.length-1,1),i.url+="/"===t?"datasets/"+e.dataset+"/"+e.surfaceAnalystMethod.toLowerCase()+".json?returnContent=true":"/datasets/"+e.dataset+"/"+e.surfaceAnalystMethod.toLowerCase()+".json?returnContent=true",rr.toObject(e,s),r=ye.toJSON(s);else{if(!(e instanceof Jr))return;t=i.url.substr(i.url.length-1,1),i.url+="/"===t?"geometry/"+e.surfaceAnalystMethod.toLowerCase()+".json?returnContent=true":"/geometry/"+e.surfaceAnalystMethod.toLowerCase()+".json?returnContent=true",r=ye.toJSON(e)}return r}}s.SurfaceAnalystService=Bi;
  /* Copyright© 2000 - 2019 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 Gi{constructor(e){e&&(this.dataset=null,this.zFactor=1,this.averageCurvatureName=null,this.profileCurvatureName="",this.planCurvatureName="",this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationParameters")}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){for(var r in e)"dataset"!==r&&(t[r]=e[r])}}s.TerrainCurvatureCalculationParameters=Gi;
  /* Copyright© 2000 - 2019 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 Ui extends vt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationService"}destroy(){super.destroy()}processAsync(e){var t=this;"/"!==t.url.substr(t.url.length-1,1)&&(t.url+="/");var r={};e instanceof Gi&&(t.url+="datasets/"+e.dataset+"/terraincalculation/curvature"),Gi.toObject(e,r);var i=s.Util.toJSON(r);t.url+=".json?returnContent=true",t.request({method:"POST",data:i,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}s.TerrainCurvatureCalculationService=Ui;
  /* Copyright© 2000 - 2019 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 ji{constructor(e){this.caption=null,this.color=new Be,this.end=0,this.start=0,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRangeItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.color&&(e.color.destroy(),e.color=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){if(e){var t=new ji;return ye.copy(t,e),t.color=Be.fromJson(e.color),t}}}s.ThemeGridRangeItem=ji;
  /* Copyright© 2000 - 2019 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 Hi extends hs{constructor(e){super("GRIDRANGE",e),this.items=null,this.rangeMode=S.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=x.YELLOW_RED,this.reverseColor=!1,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRange"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.reverseColor=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new Hi;ye.copy(t,e);var r=e.items,s=r?r.length:0;t.items=[];for(var i=0;i<s;i++)t.items.push(ji.fromObj(r[i]));return t}}}s.ThemeGridRange=Hi;
  /* Copyright© 2000 - 2019 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 Ji{constructor(e){this.caption=null,this.color=new Be,this.unique=null,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridUniqueItem"}destroy(){var e=this;e.caption=null,e.unique=null,e.color&&(e.color.destroy(),e.color=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){var t=new Ji;return ye.copy(t,e),t.color=Be.fromJson(e.color),t}}s.ThemeGridUniqueItem=Ji;
  /* Copyright© 2000 - 2019 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 Vi extends hs{constructor(e){super("GRIDUNIQUE",e),this.defaultcolor=new Be,this.items=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridUnique"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultcolor&&(e.defaultcolor.destroy(),e.defaultcolor=null)}toServerJSONObject(){var e={};if((e=ye.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,s=0;s<r;s++)t.push(e.items[s].toServerJSONObject());e.items=t}return e}static fromObj(e){var t=new Vi,r=e.items,s=r?r.length:0;ye.extend(t,e),t.items=[],t.defaultcolor=Be.fromJson(e.defaultcolor);for(var i=0;i<s;i++)t.items.push(Ji.fromObj(r[i]));return t}}s.ThemeGridUnique=Vi;
  /* Copyright© 2000 - 2019 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 zi{constructor(e){this.caption=null,this.unique=null,this.offsetX=0,this.offsetY=0,this.visible=!0,this.style=new us,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelUniqueItem"}destroy(){var e=this;e.unique=null,e.caption=null,e.offsetX=null,e.offsetY=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}static fromObj(e){if(e){var t=new zi;return ye.copy(t,e),t}}}s.ThemeLabelUniqueItem=zi;
  /* Copyright© 2000 - 2019 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 Wi{constructor(e){this.datasetNames=null,this.dataSourceNames=null,this.joinItems=null,this.themes=null,this.displayFilters=null,this.displayOrderBys=null,this.fieldValuesDisplayFilter=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeParameters"}destroy(){var e=this;if(e.datasetNames=null,e.dataSourceNames=null,e.joinItems){for(let t=0,r=e.joinItems,s=r.length;t<s;t++)r[t].destroy();e.joinItems=null}if(e.themes){for(let t=0,r=e.themes,s=r.length;t<s;t++)r[t].destroy();e.themes=null}}}s.ThemeParameters=Wi;
  /* Copyright© 2000 - 2019 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 qi extends ct{constructor(e,t){super(e,t),t&&s.Util.extend(this,t);var r;r=this.url.substr(this.url.length-1,1),this.url+="/"===r?"tempLayersSet.json?":"/tempLayersSet.json?",this.CLASS_NAME="SuperMap.ThemeService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Wi){var t,r=this;t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJsonParameters(e){var t,r="",s=null,i=null,a=null;r+="[{'type': 'UGC','subLayers': {'layers': [";for(var n=0;n<e.themes.length;n++){s=e.themes[n];var o=ye.toJSON(s);if(r+="{'theme': "+(o=o.slice(0,-1))+"},'type': 'UGC','ugcLayerType': 'THEME',",(i=e.displayFilters)&&i.length>0&&(1===i.length?r+="'displayFilter':\""+i[0]+'",':r+="'displayFilter':\""+i[n]+'",'),(a=e.displayOrderBy)&&a.length>0&&(1===a.length?r+="'displayOrderBy':'"+a[0]+"',":r+="'displayOrderBy':'"+a[n]+"',"),(t=e.fieldValuesDisplayFilter)&&(r+="'fieldValuesDisplayFilter':"+ye.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[n]&&(r+="'joinItems':["+ye.toJSON(e.joinItems[n])+"],"),e.datasetNames&&e.dataSourceNames){var l=e.datasetNames[n]?n:e.datasetNames.length-1,h=e.dataSourceNames[n]?n:e.dataSourceNames.length-1;r+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[h]+"'}},"}else r+="},"}e.themes&&e.themes.length>0&&(r=r.substring(0,r.length-1)),r+="]},";var u=this.url.split("/");return r+="'name': '"+u[u.length-2]+"'}]"}}s.ThemeService=qi;
  /* Copyright© 2000 - 2019 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 Yi extends vt{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.ThiessenAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},r=this;"/"!==r.url.substr(r.url.length-1,1)&&(r.url+="/"),e instanceof ir?(r.mode="datasets",r.url+="datasets/"+e.dataset+"/thiessenpolygon",ir.toObject(e,t)):e instanceof Vr&&(r.mode="geometry",r.url+="geometry/thiessenpolygon",Vr.toObject(e,t));var s=ye.toJSON(t);r.url+=".json?returnContent=true",r.request({method:"POST",data:s,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}s.ThiessenAnalystService=Yi;
  /* Copyright© 2000 - 2019 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 Qi extends vt{constructor(e,t){super(e,t),t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GeometryBatchAnalystService"}processAsync(e){var t=this;"/"!==t.url.substr(t.url.length-1,1)&&(t.url+="/"),t.url+="geometry/batchanalyst.json?returnContent=true&ignoreAnalystParam=true";var r=t._processParams(e),s=ye.toJSON(r);t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}_processParams(e){var t=this;if(ye.isArray(e)){var r=[];return e.map(function(e){return r.push(t._toJSON(e)),e}),r}}_toJSON(e){var t={};if("buffer"===e.analystName)t.analystName="buffer",t.param={},Pt.toObject(e.param,t.param);else if("overlay"===e.analystName)t.analystName="overlay",t.param={},Hr.toObject(e.param,t.param);else if("interpolationDensity"===e.analystName)t.analystName="interpolationDensity",t.param={},Us.toObject(e.param,t.param);else if("interpolationidw"===e.analystName)t.analystName="interpolationidw",t.param={},Us.toObject(e.param,t.param);else if("interpolationRBF"===e.analystName)t.analystName="interpolationRBF",t.param={},Us.toObject(e.param,t.param);else if("interpolationKriging"===e.analystName)t.analystName="interpolationKriging",t.param={},Us.toObject(e.param,t.param);else{if("thiessenpolygon"!==e.analystName)return e;t.analystName="thiessenpolygon",t.param={},Vr.toObject(e.param,t.param)}return t}destroy(){super.destroy()}}s.GeometryBatchAnalystService=Qi;
  /* Copyright© 2000 - 2019 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 Xi extends ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TilesetsService"}destroy(){super.destroy()}processAsync(){if(this.url){var e=this,t=e.url.substr(e.url.length-1,1);e.url=e.url+("/"===t?"tilesets":"/tilesets")+".json?",e.request({method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}s.TilesetsService=Xi;
  /* Copyright© 2000 - 2019 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 Ki{constructor(e){e&&(this.datasetName="",this.datasetTopology="",this.tolerance="",this.rule=se.REGIONNOOVERLAP,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TopologyValidatorJobsParameter")}destroy(){this.datasetName=null,this.datasetTopology=null,this.tolerance=null,this.rule=null,this.output instanceof Mt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}s.TopologyValidatorJobsParameter=Ki;
  /* Copyright© 2000 - 2019 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 Zi extends Ft{constructor(e,t){super(e,t),this.url+="/spatialanalyst/topologyvalidator",this.CLASS_NAME="SuperMap.TopologyValidatorJobsService"}destroy(){super.destroy()}getTopologyValidatorJobs(){super.getJobs(this.url)}getTopologyValidatorJob(e){super.getJobs(this.url+"/"+e)}addTopologyValidatorJob(e,t){super.addJob(this.url,e,Ki,t)}}s.TopologyValidatorJobsService=Zi;
  /* Copyright© 2000 - 2019 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 $i{constructor(e){e=e||{},this.lineID=null,this.lineName=null,this.lineAliasName=null,this.startStopIndex=null,this.startStopName=null,this.startStopAliasName=null,this.endStopIndex=null,this.endStopName=null,this.endStopAliasName=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransferLine"}destroy(){ye.reset(this)}static fromJson(e){if(e)return new $i({lineID:e.lineID,lineName:e.lineName,lineAliasName:e.lineAliasName,startStopIndex:e.startStopIndex,startStopName:e.startStopName,startStopAliasName:e.startStopAliasName,endStopIndex:e.endStopIndex,endStopName:e.endStopName,endStopAliasName:e.endStopAliasName})}}s.TransferLine=$i;
  /* Copyright© 2000 - 2019 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 ea{constructor(e){e=e||{},this.transferLines=null,this.points=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransferPathParameters"}destroy(){ye.reset(this)}static toJson(e){if(e)return ye.toJSON(e)}}s.TransferPathParameters=ea;
  /* Copyright© 2000 - 2019 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 ta extends ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ea){var t,r,s=this;r=s.url.substr(s.url.length-1,1),s.url+="/"===r?"":"/",s.url+="path.json?",t={points:ye.toJSON(e.points),transferLines:ye.toJSON(e.transferLines)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}s.TransferPathService=ta;
  /* Copyright© 2000 - 2019 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 ra{constructor(e){e=e||{},this.solutionCount=6,this.transferPreference=G.NONE,this.transferTactic=B.LESS_TIME,this.walkingRatio=null,this.points=!1,this.evadeLines=null,this.evadeStops=null,this.priorLines=null,this.priorStops=null,this.travelTime=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransferSolutionParameters"}destroy(){ye.reset(this)}static toJson(e){if(e)return ye.toJSON(e)}}s.TransferSolutionParameters=ra;
  /* Copyright© 2000 - 2019 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 sa extends ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferSolutionService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ra){var t,r,s=this;r=s.url.substr(s.url.length-1,1),s.url+="/"===r?"":"/",s.url+="solutions.json?",t={points:ye.toJSON(e.points),walkingRatio:e.walkingRatio,transferTactic:e.transferTactic,solutionCount:e.solutionCount,transferPreference:e.transferPreference},e.evadeLines&&(t.evadeLines=ye.toJSON(e.evadeLines)),e.evadeStops&&(t.evadeStops=ye.toJSON(e.evadeStops)),e.priorLines&&(t.priorLines=ye.toJSON(e.priorLines)),e.priorStops&&(t.priorStops=ye.toJSON(e.priorStops)),e.travelTime&&(t.travelTime=e.travelTime),s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}s.TransferSolutionService=sa;
  /* Copyright© 2000 - 2019 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 ia{constructor(e){e&&(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",ye.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}s.UpdateEdgeWeightParameters=ia;
  /* Copyright© 2000 - 2019 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 aa extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ia){var t=this,r=t.url.substr(t.url.length-1,1),s=t.parse(e);"/"===r&&t.url.splice(t.url.length-1,1),t.url=t.url+s+".json?";var i=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:i,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var r in e)if(""!==e[r]&&"edgeWeight"!==e[r])switch(r){case"edgeId":t+="/edgeweight/"+e[r];break;case"fromNodeId":t+="/fromnode/"+e[r];break;case"toNodeId":t+="/tonode/"+e[r];break;case"weightField":t+="/weightfield/"+e[r]}return t}}}s.UpdateEdgeWeightService=aa;
  /* Copyright© 2000 - 2019 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 na{constructor(e){e&&(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",ye.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}s.UpdateTurnNodeWeightParameters=na;
  /* Copyright© 2000 - 2019 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 oa extends kt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof na){var t=this,r=t.url.substr(t.url.length-1,1),s=t.parse(e);"/"===r&&t.url.splice(t.url.length-1,1),t.url=t.url+s+".json?";var i=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:i,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var r in e)if(""!==e[r]&&"turnNodeWeight"!==e[r])switch(r){case"nodeId":t+="/turnnodeweight/"+e[r];break;case"fromEdgeId":t+="/fromedge/"+e[r];break;case"toEdgeId":t+="/toedge/"+e[r];break;case"weightField":t+="/weightfield/"+e[r]}return t}}}s.UpdateTurnNodeWeightService=oa;
  /* Copyright© 2000 - 2019 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 la{constructor(e){e=e||{},this.datasetName="",this.datasetVectorClip="",this.geometryClip="",this.mode=Z.CLIP,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.VectorClipJobsParameter"}destroy(){this.datasetName=null,this.datasetVectorClip=null,this.geometryClip=null,this.mode=null,this.output instanceof Mt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}s.VectorClipJobsParameter=la;
  /* Copyright© 2000 - 2019 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 ha extends Ft{constructor(e,t){super(e,t),this.url+="/spatialanalyst/vectorclip",this.CLASS_NAME="SuperMap.VectorClipJobsService"}destroy(){super.destroy()}getVectorClipJobs(){super.getJobs(this.url)}getVectorClipJob(e){super.getJobs(this.url+"/"+e)}addVectorClipJob(e,t){super.addJob(this.url,e,la,t)}}s.VectorClipJobsService=ha;
  /* Copyright© 2000 - 2019 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 ua{constructor(e){e=e||{},this.type=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.RasterFunctionParameter"}destroy(){this.type=null}}s.RasterFunctionParameter=ua;s.NDVIParameter=
  /* Copyright© 2000 - 2019 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 extends ua{constructor(e){super(e),this.redIndex=0,this.nirIndex=1,this.colorMap="0:ffffe5ff;0.1:f7fcb9ff;0.2:d9f0a3ff;0.3:addd8eff;0.4:78c679ff;0.5:41ab5dff;0.6:238443ff;0.7:006837ff;1:004529ff",this.type=oe.NDVI,ye.extend(this,e),this.CLASS_NAME="SuperMap.NDVIParameter"}destroy(){super.destroy(),this.redIndex=null,this.nirIndex=null,this.colorMap=null}toJSON(){return{redIndex:this.redIndex,nirIndex:this.nirIndex,colorMap:this.colorMap,type:this.type}}};s.HillshadeParameter=
  /* Copyright© 2000 - 2019 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 extends ua{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.zFactor=1,this.type=oe.HILLSHADE,ye.extend(this,e),this.CLASS_NAME="SuperMap.HillshadeParameter"}destroy(){super.destroy(),this.altitude=null,this.azimuth=null,this.zFactor=null}toJSON(){return{altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,type:this.type}}};
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 ca=s.ServiceStatus={DOES_NOT_INVOLVE:"DOES_NOT_INVOLVE",PUBLISH_FAILED:"PUBLISH_FAILED",PUBLISHED:"PUBLISHED",PUBLISHING:"PUBLISHING",UNPUBLISHED:"UNPUBLISHED",UNPUBLISHED_FAILED:"UNPUBLISHED_FAILED"},da=s.DataItemType={AUDIO:"AUDIO",COLOR:"COLOR",COLORSCHEME:"COLORSCHEME",CSV:"CSV",EXCEL:"EXCEL",FILLSYMBOL:"FILLSYMBOL",IMAGE:"IMAGE",LAYERTEMPLATE:"LAYERTEMPLATE",LAYOUTTEMPLATE:"LAYOUTTEMPLATE",LINESYMBOL:"LINESYMBOL",MAPTEMPLATE:"MAPTEMPLATE",MARKERSYMBOL:"MARKERSYMBOL",MBTILES:"MBTILES",PHOTOS:"PHOTOS",SHP:"SHP",SMTILES:"SMTILES",SVTILES:"SVTILES",THEMETEMPLATE:"THEMETEMPLATE",TPK:"TPK",UDB:"UDB",UGCV5:"UGCV5",UNKNOWN:"UNKNOWN",VIDEO:"VIDEO",WORKENVIRONMENT:"WORKENVIRONMENT",WORKSPACE:"WORKSPACE"},pa=s.DataItemOrderBy={FILENAME:"FILENAME",ID:"ID",LASTMODIFIEDTIME:"LASTMODIFIEDTIME",NICKNAME:"NICKNAME",SERVICESTATUS:"SERVICESTATUS",SIZE:"SIZE",STATUS:"STATUS",TYPE:"TYPE",UPDATETIME:"UPDATETIME",USERNAME:"USERNAME"},ma=s.FilterField={LINKPAGE:"LINKPAGE",MAPTITLE:"MAPTITLE",NICKNAME:"NICKNAME",RESTITLE:"RESTITLE",USERNAME:"USERNAME"};
  /* Copyright© 2000 - 2019 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 fa{constructor(e){e=e||{},ye.extend(this,e),this.serverType=a.ONLINE,this.CLASS_NAME="SuperMap.OnlineServiceBase"}request(e,t,r,s={}){return t=this.createCredentialUrl(t),s.crossOrigin=this.options.crossOrigin,s.headers=this.options.headers,et.commit(e,t,r,s).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,r=this.getCredential();if(r){var s="key="+r,i=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===i?t+=s:t.indexOf("?")>-1&&"?"!==i?t+="&"+s:t+="?"+s}return t}getCredential(){}}s.OnlineServiceBase=fa;
  /* Copyright© 2000 - 2019 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 ya extends fa{constructor(e,t){super(e),t=t||{},this.MD5=null,this.type=null,this.userName=null,this.fileName=null,this.size=null,this.serviceStatus=null,this.serviceId=null,this.id=null,this.lastModfiedTime=null,this.status=null,this.storageId=null,this.publishInfo=null,this.authorizeSetting=null,this.nickname=null,this.tags=[],this.description=null,this.dataItemServices=null,this.coordType=null,this.dataCheckResult=null,this.dataMetaInfo=null,this.thumbnail=null,ye.extend(this,t),this.id&&(this.serviceUrl=e+"/"+this.id),this.CLASS_NAME="SuperMap.OnlineData"}load(){if(this.serviceUrl){var e=this;return e.request("GET",this.serviceUrl).then(function(t){ye.extend(e,t)})}}getPublishedServices(){return this.dataItemServices}getAuthorizeSetting(){return this.authorizeSetting}}s.OnlineData=ya;
  /* Copyright© 2000 - 2019 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 ga{constructor(){this.rootUrl="http://www.supermapol.com",this.webUrl=this.rootUrl+"/web";var e=this.webUrl+"/mycontent";this.mDatasUrl=e+"/datas",this.CLASS_NAME="SuperMap.Online"}load(){return et.get(this.rootUrl).then(function(e){return e})}login(){tt.loginOnline(this.rootUrl,!0)}queryDatas(e){var t=this,r=t.mDatasUrl;return e&&(e=e.toJSON()),et.get(r,e).then(function(e){if(e&&e.content&&!(e.content.length<1)){for(var r=[],s=e.content,i=s.length,a=0;a<i;a++){var n=s[a],o=new ya(t.mDatasUrl,n);r.push(o)}return r}})}}s.Online=ga;
  /* Copyright© 2000 - 2019 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 va{constructor(e){e=e||{},this.userNames=null,this.types=null,this.fileName=null,this.serviceStatuses=null,this.serviceId=null,this.ids=null,this.keywords=null,this.orderBy=null,this.tags=null,this.filterFields=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.OnlineQueryDatasParameter"}toJSON(){var e=this,t={types:e.types,fileName:e.fileName,serviceStatuses:e.serviceStatuses,serviceId:e.serviceId,ids:e.ids,keywords:e.keywords,orderBy:e.orderBy,tags:e.tags,filterFields:e.filterFields};for(var r in t)null==t[r]&&delete t[r];return t}}s.OnlineQueryDatasParameter=va;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 Sa{constructor(e){this.name=null,this.serviceIds=null,this.clientType=X.SERVER,this.limitation=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.KeyServiceParameter"}toJSON(){return{name:this.name,serviceIds:this.serviceIds,clientType:this.clientType,limitation:this.limitation}}}s.KeyServiceParameter=Sa;
  /* Copyright© 2000 - 2019 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 ba{constructor(e,t){this.type=e,this.server=null,this.tokenServiceUrl=null,this.keyServiceUrl=null,ye.extend(this,t),this.CLASS_NAME="SuperMap.ServerInfo",this.type=this.type||a.ISERVER,this.server||console.error("server url require is not  undefined");var r="/services/security/tokens.json";this.type===a.ISERVER&&this.server.indexOf("iserver")<0&&(r="/iserver"+r),this.tokenServiceUrl||(this.tokenServiceUrl=this.server+r),this.keyServiceUrl||(this.type===a.IPORTAL?this.keyServiceUrl=this.server+"/web/mycontent/keys/register.json":this.type===a.ONLINE&&(this.keyServiceUrl=this.server+"/web/mycontent/keys.json"))}}s.ServerInfo=ba;
  /* Copyright© 2000 - 2019 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 xa{constructor(e){this.userName=null,this.password=null,this.clientType=X.NONE,this.ip=null,this.referer=null,this.expiration=60,ye.extend(this,e),this.CLASS_NAME="SuperMap.TokenServiceParameter"}toJSON(){return{userName:this.userName,password:this.password,clientType:this.clientType,ip:this.ip,referer:this.referer,expiration:this.expiration}}}s.TokenServiceParameter=xa;
  /* Copyright© 2000 - 2019 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 Ca=r(10),_a=r.n(Ca);
  /* Copyright© 2000 - 2019 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 Ta{constructor(e,t){t=t||{},this.url=e,this.client=new _a.a.Client({host:this.url}),this.change=null,this.openGeoFence=!1,this.outOfGeoFence=null,this.geoFence=null,this.EVENT_TYPES=["change","error","outOfGeoFence"],this.events=new Ie(this,null,this.EVENT_TYPES),this.eventListeners=null,ye.extend(this,t),this.eventListeners instanceof Object&&this.events.on(this.eventListeners)}setGeoFence(e){this.geoFence=e}bulk(e,t){return this.client.bulk(e,t)}clearScroll(e,t){return this.client.clearScroll(e,t)}count(e,t){return this.client.count(e,t)}create(e,t){return this.client.create(e,t)}delete(e,t){return this.client.delete(e,t)}deleteByQuery(e,t){return this.client.deleteByQuery(e,t)}deleteScript(e,t){return this.client.deleteScript(e,t)}deleteTemplate(e,t){return this.client.deleteTemplate(e,t)}exists(e,t){return this.client.exists(e,t)}existsSource(e,t){return this.client.existsSource(e,t)}explain(e,t){return this.client.explain(e,t)}fieldCaps(e,t){return this.client.fieldCaps(e,t)}get(e,t){return this.client.get(e,t)}getScript(e,t){return this.client.getScript(e,t)}getSource(e,t){return this.client.getSource(e,t)}getTemplate(e,t){return this.client.getTemplate(e,t)}index(e,t){return this.client.index(e,t)}info(e,t){return this.client.info(e,t)}mget(e,t){return this.client.mget(e,t)}msearch(e,t){let r=this;return r.client.msearch(e).then(function(e){return r._update(e.responses,t),e},function(e){return t(e),r.events.triggerEvent("error",{error:e}),e})}msearchTemplate(e,t){return this.client.msearchTemplate(e,t)}mtermvectors(e,t){return this.client.mtermvectors(e,t)}ping(e,t){return this.client.ping(e,t)}putScript(e,t){return this.client.putScript(e,t)}putTemplate(e,t){return this.client.putTemplate(e,t)}reindex(e,t){return this.client.reindex(e,t)}reindexRessrottle(e,t){return this.client.reindexRessrottle(e,t)}renderSearchTemplate(e,t){return this.client.renderSearchTemplate(e,t)}scroll(e,t){return this.client.scroll(e,t)}search(e,t){let r=this;return r.client.search(e).then(function(e){return r._update(e.responses,t),e},function(e){return t(e),r.events.triggerEvent("error",{error:e}),e})}searchShards(e,t){return this.client.searchShards(e,t)}searchTemplate(e,t){return this.client.searchTemplate(e,t)}suggest(e,t){return this.client.suggest(e,t)}termvectors(e,t){return this.client.termvectors(e,t)}update(e,t){return this.client.update(e,t)}updateByQuery(e,t){return this.client.updateByQuery(e,t)}_update(e,t){let r=this;e&&(r.data=e,r.openGeoFence&&r.geoFence&&r._validateDatas(e),r.events.triggerEvent("change",{data:r.data}),r.change?r.change&&r.change(e):t&&t(void 0,{responses:e}))}_validateDatas(e){if(e){e instanceof Array||(e=[e]);var t,r=e.length;for(t=0;t<r;t++)this._validateData(e[t])}}_validateData(e){let t=this;e.hits.hits.map(function(r){let s=r._source,i=t._getMeterPerMapUnit(t.geoFence.unit),a=t.geoFence.center[0]*i,n=t.geoFence.center[1]*i,o=s.x*i,l=s.y*i;return t._distance(o,l,a,n)>t.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),r})}_distance(e,t,r,s){return Math.sqrt((e-r)*(e-r)+(t-s)*(t-s))}_getMeterPerMapUnit(e){let t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}}s.ElasticSearch=Ta;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 Ea{constructor(){this.BUILTIN_OBJECT={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},this._ctx=null,this._canvas=null,this._pixelCtx=null,this._width=null,this._height=null,this._offsetX=0,this._offsetY=0,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Util"}clone(e){var t=this.BUILTIN_OBJECT;if("object"==typeof e&&null!==e){var r=e;if(e instanceof Array){r=[];for(var s=0,i=e.length;s<i;s++)r[s]=this.clone(e[s])}else if(!t[Object.prototype.toString.call(e)])for(var a in r={},e)e.hasOwnProperty(a)&&(r[a]=this.clone(e[a]));return r}return e}mergeItem(e,t,r,s){var i=this.BUILTIN_OBJECT;t.hasOwnProperty(r)&&("object"!=typeof e[r]||i[Object.prototype.toString.call(e[r])]?!s&&r in e||(e[r]=t[r]):this.merge(e[r],t[r],s))}merge(e,t,r){for(var s in t)this.mergeItem(e,t,s,r);return e}getContext(){return this._ctx||(this._ctx=document.createElement("canvas").getContext("2d")),this._ctx}getPixelContext(){return this._pixelCtx||(this._canvas=document.createElement("canvas"),this._width=this._canvas.width,this._height=this._canvas.height,this._pixelCtx=this._canvas.getContext("2d")),this._pixelCtx}adjustCanvasSize(e,t){var r,s=this._canvas,i=this._pixelCtx,a=this._width,n=this._height,o=this._offsetX,l=this._offsetY;e+o>a&&(a=e+o+100,s.width=a,r=!0),t+l>n&&(n=t+l+100,s.height=n,r=!0),e<-o&&(a+=o=100*Math.ceil(-e/100),s.width=a,r=!0),t<-l&&(n+=l=100*Math.ceil(-t/100),s.height=n,r=!0),r&&i.translate(o,l)}getPixelOffset(){return{x:this._offsetX,y:this._offsetY}}indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,s=e.length;r<s;r++)if(e[r]===t)return r;return-1}inherits(e,t){var r=e.prototype;function s(){}for(var i in s.prototype=t.prototype,e.prototype=new s,r)e.prototype[i]=r[i];e.constructor=e}}
  /* Copyright© 2000 - 2019 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 wa{constructor(){this.util=new Ea,this._ctx=null,this.palette=["#ff9277"," #dddd00"," #ffc877"," #bbe3ff"," #d5ffbb","#bbbbff"," #ddb000"," #b0dd00"," #e2bbff"," #ffbbe3","#ff7777"," #ff9900"," #83dd00"," #77e3ff"," #778fff","#c877ff"," #ff77ab"," #ff6600"," #aa8800"," #77c7ff","#ad77ff"," #ff77ff"," #dd0083"," #777700"," #00aa00","#0088aa"," #8400dd"," #aa0088"," #dd0000"," #772e00"],this._palette=this.palette,this.highlightColor="rgba(0,0,255,1)",this._highlightColor=this.highlightColor,this.colorRegExp=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,this._nameColors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#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",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",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",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Color"}customPalette(e){this.palette=e}resetPalette(){this.palette=this._palette}getColor(e,t){return e|=0,(t=t||this.palette)[e%t.length]}customHighlight(e){this.highlightColor=e}resetHighlight(){this.highlightColor=this._highlightColor}getHighlightColor(){return this.highlightColor}getRadialGradient(e,t,r,s,i,a,n){var o=this.util;this._ctx||(this._ctx=o.getContext());for(var l=this._ctx.createRadialGradient(e,t,r,s,i,a),h=0,u=n.length;h<u;h++)l.addColorStop(n[h][0],n[h][1]);return l.__nonRecursion=!0,l}getLinearGradient(e,t,r,s,i){var a=this.util;this._ctx||(this._ctx=a.getContext());for(var n=this._ctx.createLinearGradient(e,t,r,s),o=0,l=i.length;o<l;o++)n.addColorStop(i[o][0],i[o][1]);return n.__nonRecursion=!0,n}getStepColors(e,t,r){e=this.toRGBA(e),t=this.toRGBA(t),e=this.getData(e);for(var s=[],i=((t=this.getData(t))[0]-e[0])/r,a=(t[1]-e[1])/r,n=(t[2]-e[2])/r,o=(t[3]-e[3])/r,l=0,h=e[0],u=e[1],c=e[2],d=e[3];l<r;l++)s[l]=this.toColor([this.adjust(Math.floor(h),[0,255]),this.adjust(Math.floor(u),[0,255]),this.adjust(Math.floor(c),[0,255]),d.toFixed(4)-0],"rgba"),h+=i,u+=a,c+=n,d+=o;return h=t[0],u=t[1],c=t[2],d=t[3],s[l]=this.toColor([h,u,c,d],"rgba"),s}getGradientColors(e,t){var r=[],s=e.length;if(void 0===t&&(t=20),1===s)r=this.getStepColors(e[0],e[0],t);else if(s>1)for(var i=0,a=s-1;i<a;i++){var n=this.getStepColors(e[i],e[i+1],t);i<a-1&&n.pop(),r=r.concat(n)}return r}toColor(e,t){if(t=t||"rgb",e&&(3===e.length||4===e.length)){if(e=this.map(e,function(e){return e>1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var r=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=r[0],e[2]=r[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=this.adjust(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}toArray(e){(e=this.trim(e)).indexOf("rgba")<0&&(e=this.toRGBA(e));var t=[],r=0;return e.replace(/[\d.]+/g,function(e){r<3?e|=0:e=+e,t[r++]=e}),t}convert(e,t){if(!this.isCalculableColor(e))return e;var r=this.getData(e),s=r[3];return void 0===s&&(s=1),e.indexOf("hsb")>-1?r=this._HSV_2_RGB(r):e.indexOf("hsl")>-1&&(r=this._HSL_2_RGB(r)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?r=this._RGB_2_HSB(r):t.indexOf("hsl")>-1&&(r=this._RGB_2_HSL(r)),r[3]=s,this.toColor(r,t)}toRGBA(e){return this.convert(e,"rgba")}toRGB(e){return this.convert(e,"rgb")}toHex(e){return this.convert(e,"hex")}toHSVA(e){return this.convert(e,"hsva")}toHSV(e){return this.convert(e,"hsv")}toHSBA(e){return this.convert(e,"hsba")}toHSB(e){return this.convert(e,"hsb")}toHSLA(e){return this.convert(e,"hsla")}toHSL(e){return this.convert(e,"hsl")}toName(e){for(var t in this._nameColors)if(this.toHex(this._nameColors[t])===this.toHex(e))return t;return null}trim(e){return String(e).replace(/\s+/g,"")}normalize(e){if(this._nameColors[e]&&(e=this._nameColors[e]),e=(e=this.trim(e)).replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){var t=(3840&(e=parseInt(e.slice(1),16)))<<8,r=(240&e)<<4,s=15&e;e="#"+((1<<24)+(t<<4)+t+(r<<4)+r+(s<<4)+s).toString(16).slice(1)}return e}lift(e,t){if(!this.isCalculableColor(e))return e;var r=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var s=this.getData(e),i=0;i<3;i++)s[i]=1===r?s[i]*(1-t)|0:(255-s[i])*t+s[i]|0;return"rgb("+s.join(",")+")"}reverse(e){if(!this.isCalculableColor(e))return e;var t=this.getData(this.toRGBA(e));return t=this.map(t,function(e){return 255-e}),this.toColor(t,"rgb")}mix(e,t,r){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===r&&(r=.5);for(var s=2*(r=1-this.adjust(r,[0,1]))-1,i=this.getData(this.toRGBA(e)),a=this.getData(this.toRGBA(t)),n=i[3]-a[3],o=((s*n==-1?s:(s+n)/(1+s*n))+1)/2,l=1-o,h=[],u=0;u<3;u++)h[u]=i[u]*o+a[u]*l;var c=i[3]*r+a[3]*(1-r);return c=Math.max(0,Math.min(1,c)),1===i[3]&&1===a[3]?this.toColor(h,"rgb"):(h[3]=c,this.toColor(h,"rgba"))}random(){return"#"+Math.random().toString(16).slice(2,8)}getData(e){var t,r,s=(e=this.normalize(e)).match(this.colorRegExp);if(null===s)throw new Error("The color format error");var i,a=[];if(s[2])i=[(t=s[2].replace("#","").split(""))[0]+t[1],t[2]+t[3],t[4]+t[5]],a=this.map(i,function(e){return wa.prototype.adjust.call(this,parseInt(e,16),[0,255])});else if(s[4]){var n=s[4].split(",");r=n[3],i=n.slice(0,3),a=this.map(i,function(e){return e=Math.floor(e.indexOf("%")>0?2.55*parseInt(e,0):e),wa.prototype.adjust.call(this,e,[0,255])}),void 0!==r&&a.push(this.adjust(parseFloat(r),[0,1]))}else if(s[5]||s[6]){var o=(s[5]||s[6]).split(","),l=parseInt(o[0],0)/360,h=o[1],u=o[2];r=o[3],(a=this.map([h,u],function(e){return wa.prototype.adjust.call(this,parseFloat(e)/100,[0,1])})).unshift(l),void 0!==r&&a.push(this.adjust(parseFloat(r),[0,1]))}return a}alpha(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var r=this.getData(this.toRGBA(e));return r[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(r,"rgba")}map(e,t){if("function"!=typeof t)throw new TypeError;for(var r=e?e.length:0,s=0;s<r;s++)e[s]=t(e[s]);return e}adjust(e,t){return e<=t[0]?e=t[0]:e>=t[1]&&(e=t[1]),e}isCalculableColor(e){return e instanceof Array||"string"==typeof e}_HSV_2_RGB(e){var t,r,s,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,r=255*n,s=255*n;else{var o=6*i;6===o&&(o=0);var l=0|o,h=n*(1-a),u=n*(1-a*(o-l)),c=n*(1-a*(1-(o-l))),d=0,p=0,m=0;0===l?(d=n,p=c,m=h):1===l?(d=u,p=n,m=h):2===l?(d=h,p=n,m=c):3===l?(d=h,p=u,m=n):4===l?(d=c,p=h,m=n):(d=n,p=h,m=u),t=255*d,r=255*p,s=255*m}return[t,r,s]}_HSL_2_RGB(e){var t,r,s,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,r=255*n,s=255*n;else{var o,l=2*n-(o=n<.5?n*(1+a):n+a-a*n);t=255*this._HUE_2_RGB(l,o,i+1/3),r=255*this._HUE_2_RGB(l,o,i),s=255*this._HUE_2_RGB(l,o,i-1/3)}return[t,r,s]}_HUE_2_RGB(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),6*r<1?e+6*(t-e)*r:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}_RGB_2_HSB(e){var t,r,s=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(s,i,a),o=Math.max(s,i,a),l=o-n,h=o;if(0===l)t=0,r=0;else{r=l/o;var u=((o-s)/6+l/2)/l,c=((o-i)/6+l/2)/l,d=((o-a)/6+l/2)/l;s===o?t=d-c:i===o?t=1/3+u-d:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,h*=100]}_RGB_2_HSL(e){var t,r,s=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(s,i,a),o=Math.max(s,i,a),l=o-n,h=(o+n)/2;if(0===l)t=0,r=0;else{r=h<.5?l/(o+n):l/(2-o-n);var u=((o-s)/6+l/2)/l,c=((o-i)/6+l/2)/l,d=((o-a)/6+l/2)/l;s===o?t=d-c:i===o?t=1/3+u-d:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,h*=100]}}var Aa=new wa;class La{static createCanvas(e,t){var r=document.createElement("canvas");return r.height=e,r.width=t,r.getContext("2d")}static getLinearGradient(e,t,r,s,i){this._ctx||(this._ctx=this.getContext());for(var a=this._ctx.createLinearGradient(e,t,r,s),n=i.length,o=1/(n-1),l=0,h=0;h<n;h++)a.addColorStop(l,i[h]),l+=o;return a.__nonRecursion=!0,a}static getContext(){return this._ctx||(this._ctx=document.createElement("canvas").getContext("2d")),this._ctx}static getStepColors(e,t,r){e=Aa.toRGBA(e),t=Aa.toRGBA(t),e=Aa.getData(e);for(var s=[],i=((t=Aa.getData(t))[0]-e[0])/r,a=(t[1]-e[1])/r,n=(t[2]-e[2])/r,o=(t[3]-e[3])/r,l=0,h=e[0],u=e[1],c=e[2],d=e[3];l<r;l++)s[l]=Aa.toColor([Aa.adjust(Math.floor(h),[0,255]),Aa.adjust(Math.floor(u),[0,255]),Aa.adjust(Math.floor(c),[0,255]),d.toFixed(4)-0],"hex"),h+=i,u+=a,c+=n,d+=o;return h=t[0],u=t[1],c=t[2],d=t[3],s[l]=Aa.toColor([h,u,c,d],"hex"),s}static getGradientColors(e,t,r){var s,i,a,n=[],o=e.length;if(void 0!==t){if(o>=t)if("RANGE"===r)for(i=0;i<t;i++)n.push(e[i]);else for(i=0;i<t;i++){let t=Math.floor(i/2);if(i%2==0)n.push(e[t]);else{let r=e.length-1-t;n.push(e[r])}}else{for(s=Math.ceil(t/(o-1)),i=0,a=o-1;i<a;i++){var l=this.getStepColors(e[i],e[i+1],s);i<a-1&&l.pop(),n=n.concat(l)}for(var h=n.length-t,u=0;u<h;u++)n.splice(2,1)}return n}}}s.ColorsPickerUtil=La;class Pa{static newInstance(){return this.geostatsInstance||(this.geostatsInstance=new window.geostats),this.geostatsInstance}static getInstance(e){let t=this.newInstance();return t.setSerie(e),t}static getArrayStatistic(e,t){return e.length?"Sum"===t||"求和"===t?this.getSum(e):"Maximum"===t||"最大值"===t?this.getMax(e):"Minimum"===t||"最小值"===t?this.getMin(e):"Average"===t||"平均值"===t?this.getMean(e):"Median"===t||"中位数"===t?this.getMedian(e):"times"===t||"计数"===t?this.getTimes(e):void 0:0}static getArraySegments(e,t,r){if("offset"===t)return this.getEqInterval(e,r);if("jenks"===t)return this.getJenks(e,r);if("square"===t){return this.getMin(e)>=0&&this.getSqrtInterval(e,r)}if("logarithm"===t){return this.getMin(e)>0&&this.getGeometricProgression(e,r)}}static getSum(e){return this.getInstance(e).sum()}static getMax(e){return this.getInstance(e).max()}static getMin(e){return this.getInstance(e).min()}static getMean(e){return this.getInstance(e).mean()}static getMedian(e){return this.getInstance(e).median()}static getTimes(e){return e.length}static getEqInterval(e,t){return this.getInstance(e).getClassEqInterval(t)}static getJenks(e,t){return this.getInstance(e).getClassJenks(t)}static getSqrtInterval(e,t){return e=e.map(function(e){return Math.sqrt(e)}),this.getInstance(e).getClassEqInterval(t).map(function(e){return e*e})}static getGeometricProgression(e,t){return this.getInstance(e).getClassGeometricProgression(t)}}s.ArrayStatistic=Pa;
  /* Copyright© 2000 - 2019 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 Na=r(9),Ma=r.n(Na);
  /* Copyright© 2000 - 2019 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 Oa{constructor(e){this.env=null,this.parser=null,this.ruleSet=null,this.cartoStr="",this.shaders=null,"string"==typeof e&&(this.cartoStr=e,this.env={frames:[],errors:[],error:function(e){this.errors.push(e)}},this.parser=this.getParser(this.env),this.parse(e),this.shaders=this.toShaders())}getParser(e){var t,r,i,a,n,o,l,h,u,c=this;function d(){a=l[i],n=r,h=r}function p(){l[i]=a,h=r=n}function m(){r>h&&(l[i]=l[i].slice(r-h),h=r)}function f(e){var s,a,n,o;if(e instanceof Function)return e.call(u.parsers);if("string"==typeof e)s=t.charAt(r)===e?e:null,a=1,m();else{if(m(),!(s=e.exec(l[i])))return null;a=s[0].length}if(s){var c=r+=a;for(o=r+l[i].length-a;r<o&&(32===(n=t.charCodeAt(r))||10===n||9===n);)r++;return l[i]=l[i].slice(a+(r-c)),h=r,0===l[i].length&&i<l.length-1&&i++,"string"==typeof s?s:1===s.length?s[0]:s}}function y(r){var s,i={index:o,filename:e.filename,message:"Parse error.",line:0,column:-1};for(var a in i)0===r[a]&&(r[a]=i[a]);s=r.filename&&c.env.inputs&&c.env.inputs[r.filename]?c.env.inputs[r.filename]:t,r.line=(s.slice(0,r.index).match(/\n/g)||"").length+1;for(var n=r.index;n>=0&&"\n"!==s.charAt(n);n--)r.column++;return new Error([r.filename,r.line,r.column,r.message].join(";"))}return this.env=e=e||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},u={parse:function(a){var n,u=null;if(r=i=h=o=0,l=[],t=a.replace(/\r\n/g,"\n"),e.filename&&(c.env.inputs[e.filename]=t),l=function(e){for(var r,s,i,a,n=0,o=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,h=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,c=0,d=e[0],p=0;p<t.length;)if(o.lastIndex=p,(r=o.exec(t))&&r.index===p&&(p+=r[0].length,d.push(r[0])),i=t.charAt(p),l.lastIndex=h.lastIndex=p,(r=h.exec(t))&&r.index===p)p+=r[0].length,d.push(r[0]);else if(s||"/"!==i||"/"!==(a=t.charAt(p+1))&&"*"!==a||!(r=l.exec(t))||r.index!==p){switch(i){case"{":if(!s){c++,d.push(i);break}case"}":if(!s){c--,d.push(i),e[++n]=d=[];break}case"(":if(!s){s=!0,d.push(i);break}case")":if(s){s=!1,d.push(i);break}default:d.push(i)}p++}else p+=r[0].length,d.push(r[0]);return 0!==c&&(u={index:p-1,type:"Parse",message:c>0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),u)throw y(u);var d=function(e,t){var r=e.specificity,s=t.specificity;return r[0]!=s[0]?s[0]-r[0]:r[1]!=s[1]?s[1]-r[1]:r[2]!=s[2]?s[2]-r[2]:s[3]-r[3]};return(n=new s.CartoCSS.Tree.Ruleset([],f(this.parsers.primary))).root=!0,n.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+y(t).message:e.errors.message=y(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(d),t},n},parsers:{primary:function(){for(var e,t=[];(e=f(this.rule)||f(this.ruleset)||f(this.comment))||f(/^[\s\n]+/)||(e=f(this.invalid));)e&&t.push(e);return t},invalid:function(){var e=f(/^[^;\n]*[;\n]/);if(e)return new s.CartoCSS.Tree.Invalid(e,n)},comment:function(){var e;if("/"===t.charAt(r))return"/"===t.charAt(r+1)?new s.CartoCSS.Tree.Comment(f(/^\/\/.*/),!0):(e=f(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new s.CartoCSS.Tree.Comment(e):void 0},entities:{quoted:function(){if('"'===t.charAt(r)||"'"===t.charAt(r)){var e=f(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return e?new s.CartoCSS.Tree.Quoted(e[1]||e[2]):void 0}},field:function(){if(f("[")){var e=f(/(^[^\]]+)/);if(f("]"))return e?new s.CartoCSS.Tree.Field(e[1]):void 0}},comparison:function(){var e=f(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var e=f(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(e)return new s.CartoCSS.Tree.Keyword(e)},call:function(){var e,t;if(e=/^([\w\-]+|%)\(/.exec(l[i])){if("url"===(e=e[1]))return null;r+=e.length;if(f("("),t=f(this.entities.arguments),f(")"))return e?new s.CartoCSS.Tree.Call(e,t,r):void 0}},arguments:function(){for(var e,t=[];e=f(this.expression);){t.push(e);if(!f(","))break}return t},literal:function(){return f(this.entities.dimension)||f(this.entities.keywordcolor)||f(this.entities.hexcolor)||f(this.entities.quoted)},url:function(){var e;if("u"===t.charAt(r)&&f(/^url\(/)){e=f(this.entities.quoted)||f(this.entities.variable)||f(/^[\-\w%@$\/.&=:;#+?~]+/)||"";return f(")")?new s.CartoCSS.Tree.URL(void 0!==e.value||e instanceof s.CartoCSS.Tree.Variable?e:new s.CartoCSS.Tree.Quoted(e)):new s.CartoCSS.Tree.Invalid(e,n,"Missing closing ) in URL.")}},variable:function(){var i,a=r;if("@"===t.charAt(r)&&(i=f(/^@[\w-]+/)))return new s.CartoCSS.Tree.Variable(i,a,e.filename)},hexcolor:function(){var e;if("#"===t.charAt(r)&&(e=f(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new s.CartoCSS.Tree.Color(e[1])},keywordcolor:function(){var e=l[i].match(/^[a-z]+/);if(e&&e[0]in s.CartoCSS.Tree.Reference.data.colors)return new s.CartoCSS.Tree.Color(s.CartoCSS.Tree.Reference.data.colors[f(/^[a-z]+/)])},dimension:function(){var e=t.charCodeAt(r);if(!(e>57||e<45||47===e)){var i=f(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return i?new s.CartoCSS.Tree.Dimension(i[1],i[2],n):void 0}}},variable:function(){var e;if("@"===t.charAt(r)&&(e=f(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=f(this.entities.call)||f(this.entities.literal),t=f(this.entities.field)||f(this.entities.variable),r=f(this.entities.url)||f(this.entities.keyword);return e||t||r},end:function(){var e;return f(";")||("string"==typeof(e="}")?t.charAt(r)===e:!!e.test(l[i]))},element:function(){var e=f(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(e)return new s.CartoCSS.Tree.Element(e)},attachment:function(){var e=f(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var e,i,a,o,l,h=[],u=new s.CartoCSS.Tree.Filterset,c=[],d=0,p=0;(a=f(this.element))||(l=f(this.zoom))||(o=f(this.filter))||(e=f(this.attachment));){if(d++,a)h.push(a);else if(l)c.push(l),p++;else if(o){var m=u.add(o);if(m)throw y({message:m,index:r-1});p++}else{if(i)throw y({message:"Encountered second attachment name.",index:r-1});i=e}var g=t.charAt(r);if("{"===g||"}"===g||";"===g||","===g)break}if(d)return new s.CartoCSS.Tree.Selector(u,c,h,i,p,n)},filter:function(){d();var t,r,i;if(f("[")&&(t=f(/^[a-zA-Z0-9\-_]+/)||f(this.entities.quoted)||f(this.entities.variable)||f(this.entities.keyword)||f(this.entities.field))&&(t instanceof s.CartoCSS.Tree.Quoted&&(t=new s.CartoCSS.Tree.Field(t.toString())),(r=f(this.entities.comparison))&&(i=f(this.entities.quoted)||f(this.entities.variable)||f(this.entities.dimension)||f(this.entities.keyword)||f(this.entities.field)))){if(!f("]"))throw y({message:"Missing closing ] of filter.",index:n-1});return t.is||(t=new s.CartoCSS.Tree.Field(t)),new s.CartoCSS.Tree.Filter(t,r,i,n,e.filename)}},zoom:function(){d();var e,t;if(f(/^\[\s*zoom/g)&&(e=f(this.entities.comparison))&&(t=f(this.entities.variable)||f(this.entities.dimension))&&f("]"))return new s.CartoCSS.Tree.Zoom(e,t,n);p()},block:function(){var e;if(f("{")&&(e=f(this.primary))&&f("}"))return e},ruleset:function(){var e,t,r=[];for(d();e=f(this.selector);){for(r.push(e);f(this.comment););if(!f(","))break;for(;f(this.comment););}if(e)for(;f(this.comment););if(r.length>0&&(t=f(this.block))){if(1===r.length&&r[0].elements.length&&"Map"===r[0].elements[0].value){var i=new s.CartoCSS.Tree.Ruleset(r,t);return i.isMap=!0,i}return new s.CartoCSS.Tree.Ruleset(r,t)}p()},rule:function(){var i,a,l=t.charAt(r);if(d(),"."!==l&&"#"!==l&&(i=f(this.variable)||f(this.property))){if((a=f(this.value))&&f(this.end))return new s.CartoCSS.Tree.Rule(i,a,n,e.filename);o=r,p()}},font:function(){for(var e,t=[],r=[];e=f(this.entity);)r.push(e);if(t.push(new s.CartoCSS.Tree.Expression(r)),f(","))for(;(e=f(this.expression))&&(t.push(e),f(",")););return new s.CartoCSS.Tree.Value(t)},value:function(){for(var e,t=[];(e=f(this.expression))&&(t.push(e),f(",")););return t.length>1?new s.CartoCSS.Tree.Value(t.map(function(e){return e.value[0]})):1===t.length?new s.CartoCSS.Tree.Value(t):void 0},sub:function(){var e;if(f("(")&&(e=f(this.expression))&&f(")"))return e},multiplication:function(){var e,t,r,i;if(e=f(this.operand)){for(;(r=f("/")||f("*")||f("%"))&&(t=f(this.operand));)i=new s.CartoCSS.Tree.Operation(r,[i||e,t],n);return i||e}},addition:function(){var e,i,a,o;if(e=f(this.multiplication)){for(;(a=f(/^[-+]\s+/)||" "!=t.charAt(r-1)&&(f("+")||f("-")))&&(i=f(this.multiplication));)o=new s.CartoCSS.Tree.Operation(a,[o||e,i],n);return o||e}},operand:function(){return f(this.sub)||f(this.entity)},expression:function(){for(var e,t=[];e=f(this.addition)||f(this.entity);)t.push(e);if(t.length>0)return new s.CartoCSS.Tree.Expression(t)},property:function(){var e=f(/^(([a-z][-a-z_0-9]*\/)?\*?-?[-a-z_0-9]+)\s*:/);if(e)return e[1]}}}}parse(e){var t=this.parser;return this.ruleSet=t.parse(e)}toShaders(){if(this.ruleSet){var e=this.ruleSet;if(e){var t=e.toList(this.env);t.reverse();var r={},s=[];this._toShaders(r,s,t);for(var i=[],a={},n=0,o=t.length;n<o;++n){var l=t[n],h=l.attachment,u=r[s[n]],c=[];if(!a[h]){var d=0;for(var p in u)if("zoom"!==p&&"frames"!==p&&"attachment"!==p&&"elements"!=p)if("layer-index"===p){var m=(u[p].join("\n"),null);Object.defineProperty(c,"layerIndex",{configurable:!0,enumerable:!1,value:m})}else c[d++]=function(e,t){if(!Array.isArray(e))return e;var r=e.join("\n"),s='attributes["FEATUREID"]&&attributes["FEATUREID"]',i=r.indexOf(s);if(i>=0){if(!t.featureFilter){var a=i+s.length,n=r.indexOf(")",a+1),o="featureId&&(featureId"+r.substring(a,n)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!o}})}return{property:p,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+r+";} return _value; ")}}return{property:p,getValue:Function("attributes","zoom","var _value = null;"+r+"; return _value; ")}}(u[p],c);Object.defineProperty(c,"attachment",{configurable:!0,enumerable:!1,value:h}),Object.defineProperty(c,"elements",{configurable:!0,enumerable:!1,value:l.elements}),i.push(c),a[s[n]]=!0}Object.defineProperty(c,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return i}}return null}_toShaders(e,t,r){for(let i=0,a=r.length;i<a;++i){let a=r[i],n=[];for(let e=0,t=a.elements.length;e<t;e++)n.push(a.elements[e]);let o=a.filters.filters,l=[];for(let e in o)l.push(o[e].id);let h=n.join("/")+"::"+a.attachment+"_"+l.join("_");t.push(h);let u=e[h]=e[h]||{};u.zoom=s.CartoCSS.Tree.Zoom.all;let c=a.toJS(this.env);for(let e in c)(u[e]=u[e]||[]).push(c[e].join("\n"))}}getShaders(){return this.shaders}destroy(){this.cartoStr=null,this.env=null,this.ruleSet=null,this.parser=null,this.shaders=null}}s._mapnik_reference_latest={version:"2.1.1",style:{"filter-mode":{type:["all","first"],doc:"Control the processing behavior of Rule filters within a Style. If 'all' is used then all Rules are processed sequentially independent of whether any previous filters matched. If 'first' is used then it means processing ends after the first match (a positive filter evaluation) and no further Rules in the Style are processed ('first' is usually the default for CSS implementations on top of Mapnik to simplify translation from CSS to Mapnik XML)","default-value":"all","default-meaning":"All Rules in a Style are processed whether they have filters or not and whether or not the filter conditions evaluate to true."},"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},layer:{name:{"default-value":"",type:"string",required:!0,"default-meaning":"No layer name has been provided",doc:"The name of a layer. Can be anything you wish and is not strictly validated, but ideally unique  in the map"},srs:{"default-value":"",type:"string","default-meaning":"No srs value is provided and the value will be inherited from the Map's srs",doc:"The spatial reference system definition for the layer, aka the projection. Can either be a proj4 literal string like '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' or, if the proper proj4 epsg/nad/etc identifier files are installed, a string that uses an id like: '+init=epsg:4326'"},status:{"default-value":!0,type:"boolean","default-meaning":"This layer will be marked as active and available for processing",doc:"A property that can be set to false to disable this layer from being processed"},minzoom:{"default-value":"0",type:"float","default-meaning":"The layer will be visible at the minimum possible scale",doc:"The minimum scale denominator that this layer will be visible at. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},maxzoom:{"default-value":"1.79769e+308",type:"float","default-meaning":"The layer will be visible at the maximum possible scale",doc:"The maximum scale denominator that this layer will be visible at. The default is the numeric limit of the C++ double type, which may vary slightly by system, but is likely a massive number like 1.79769e+308 and ensures that this layer will always be visible unless the value is reduced. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},queryable:{"default-value":!1,type:"boolean","default-meaning":"The layer will not be available for the direct querying of data values",doc:"This property was added for GetFeatureInfo/WMS compatibility and is rarely used. It is off by default meaning that in a WMS context the layer will not be able to be queried unless the property is explicitly set to true"},"clear-label-cache":{"default-value":!1,type:"boolean","default-meaning":"The renderer's collision detector cache (used for avoiding duplicate labels and overlapping markers) will not be cleared immediately before processing this layer",doc:"This property, by default off, can be enabled to allow a user to clear the collision detector cache before a given layer is processed. This may be desirable to ensure that a given layers data shows up on the map even if it normally would not because of collisions with previously rendered labels or markers"},"group-by":{"default-value":"",type:"string","default-meaning":"No special layer grouping will be used during rendering",doc:"https://github.com/mapnik/mapnik/wiki/Grouped-rendering"},"buffer-size":{"default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:"Extra tolerance around the Layer extent (in pixels) used to when querying and (potentially) clipping the layer data during rendering"},"maximum-extent":{"default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query this specific layer data during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Layer."}},symbolizers:{"*":{"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},map:{"background-color":{css:"background-color","default-value":"none","default-meaning":"transparent",type:"color",doc:"Map Background color"},"background-image":{css:"background-image",type:"uri","default-value":"","default-meaning":"transparent",doc:"An image that is repeated below all features on a map as a background.",description:"Map Background image"},srs:{css:"srs",type:"string","default-value":"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs","default-meaning":"The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space",doc:"Map spatial reference (proj4 string)"},"buffer-size":{css:"buffer-size","default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:'Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges".'},"maximum-extent":{css:"","default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map."},base:{css:"base","default-value":"","default-meaning":"This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.",type:"string",doc:"Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet."},"paths-from-xml":{css:"","default-value":!0,"default-meaning":"Paths read from XML will be interpreted from the location of the XML",type:"boolean",doc:"value to control whether paths in the XML will be interpreted from the location of the XML or from the working directory of the program that calls load_map()"},"minimum-version":{css:"","default-value":"none","default-meaning":"Mapnik version will not be detected and no error will be thrown about compatibility",type:"string",doc:"The minumum Mapnik version (e.g. 0.7.2) needed to use certain functionality in the stylesheet"},"font-directory":{css:"font-directory",type:"uri","default-value":"none","default-meaning":"No map-specific fonts will be registered",doc:"Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered)."}},polygon:{fill:{css:"polygon-fill",type:"color","default-value":"rgba(128,128,128,1)","default-meaning":"gray and fully opaque (alpha = 1), same as rgb(128,128,128)",doc:"Fill color to assign to a polygon"},"fill-opacity":{css:"polygon-opacity",type:"float",doc:"The opacity of the polygon","default-value":1,"default-meaning":"opaque"},gamma:{css:"polygon-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon edges"},"gamma-method":{css:"polygon-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},clip:{css:"polygon-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},line:{stroke:{css:"line-color","default-value":"rgba(0,0,0,1)",type:"color","default-meaning":"black and fully opaque (alpha = 1), same as rgb(0,0,0)",doc:"The color of a drawn line"},"stroke-width":{css:"line-width","default-value":1,type:"float",doc:"The width of a line in pixels"},"stroke-opacity":{css:"line-opacity","default-value":1,type:"float","default-meaning":"opaque",doc:"The opacity of a line"},"stroke-linejoin":{css:"line-join","default-value":"miter",type:["miter","round","bevel"],doc:"The behavior of lines when joining"},"stroke-linecap":{css:"line-cap","default-value":"butt",type:["butt","round","square"],doc:"The display of line endings"},"stroke-gamma":{css:"line-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of stroke line"},"stroke-gamma-method":{css:"line-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},"stroke-dasharray":{css:"line-dasharray",type:"numbers",doc:"A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns.","default-value":"none","default-meaning":"solid line"},"stroke-dashoffset":{css:"line-dash-offset",type:"numbers",doc:"valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled)","default-value":"none","default-meaning":"solid line"},"stroke-miterlimit":{css:"line-miterlimit",type:"float",doc:"The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts.","default-value":4,"default-meaning":"Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'"},clip:{css:"line-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},offset:{css:"line-offset",type:"float","default-value":0,"default-meaning":"no offset",doc:"Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line)."},rasterizer:{css:"line-rasterizer",type:["full","fast"],"default-value":"full",doc:"Exposes an alternate AGG rendering method that sacrifices some accuracy for speed."},"geometry-transform":{css:"line-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},markers:{file:{css:"marker-file",doc:"An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse.","default-value":"","default-meaning":"An ellipse or circle, if width equals height",type:"uri"},opacity:{css:"marker-opacity",doc:"The overall opacity of the marker, if set, overrides both the opacity of both the fill and stroke","default-value":1,"default-meaning":"The stroke-opacity and fill-opacity will be used",type:"float"},"fill-opacity":{css:"marker-fill-opacity",doc:"The fill opacity of the marker","default-value":1,"default-meaning":"opaque",type:"float"},stroke:{css:"marker-line-color",doc:"The color of the stroke around a marker shape.","default-value":"black",type:"color"},"stroke-width":{css:"marker-line-width",doc:"The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself.",type:"float"},"stroke-opacity":{css:"marker-line-opacity","default-value":1,"default-meaning":"opaque",doc:"The opacity of a line",type:"float"},placement:{css:"marker-placement",type:["point","line","interior"],"default-value":"point","default-meaning":"Place markers at the center point (centroid) of the geometry",doc:"Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior"},"multi-policy":{css:"marker-multi-policy",type:["each","whole","largest"],"default-value":"each","default-meaning":"If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each",doc:"A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default)."},"marker-type":{css:"marker-type",type:["arrow","ellipse"],"default-value":"ellipse",doc:"The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width)"},width:{css:"marker-width","default-value":10,doc:"The width of the marker, if using one of the default types.",type:"expression"},height:{css:"marker-height","default-value":10,doc:"The height of the marker, if using one of the default types.",type:"expression"},fill:{css:"marker-fill","default-value":"blue",doc:"The color of the area of the marker.",type:"color"},"allow-overlap":{css:"marker-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping markers are shown or hidden.","default-meaning":"Do not allow makers to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"marker-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},spacing:{css:"marker-spacing",doc:"Space between repeated labels","default-value":100,type:"float"},"max-error":{css:"marker-max-error",type:"float","default-value":.2,doc:"The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers."},transform:{css:"marker-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},clip:{css:"marker-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"marker-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"marker-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"marker-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},shield:{name:{css:"shield-name",type:"expression",serialization:"content",doc:'Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]'},file:{css:"shield-file",required:!0,type:"uri","default-value":"none",doc:"Image file to render behind the shield text"},"face-name":{css:"shield-face-name",type:"string",validate:"font",doc:"Font name and style to use for the shield text","default-value":"",required:!0},"unlock-image":{css:"shield-unlock-image",type:"boolean",doc:"This parameter should be set to true if you are trying to position text beside rather than on top of the shield image","default-value":!1,"default-meaning":"text alignment relative to the shield image uses the center of the image as the anchor for text positioning."},size:{css:"shield-size",type:"float",doc:"The size of the shield text in pixels"},fill:{css:"shield-fill",type:"color",doc:"The color of the shield text"},placement:{css:"shield-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons."},"avoid-edges":{css:"shield-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.",type:"boolean","default-value":!1},"allow-overlap":{css:"shield-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping shields are shown or hidden.","default-meaning":"Do not allow shields to overlap with other map elements already placed."},"minimum-distance":{css:"shield-min-distance",type:"float","default-value":0,doc:"Minimum distance to the next shield symbol, not necessarily the same shield."},spacing:{css:"shield-spacing",type:"float","default-value":0,doc:"The spacing between repeated occurrences of the same shield on a line"},"minimum-padding":{css:"shield-min-padding","default-value":0,doc:"Determines the minimum amount of padding that a shield gets relative to other shields",type:"float"},"wrap-width":{css:"shield-wrap-width",type:"unsigned","default-value":0,doc:"Length of a chunk of text in characters before wrapping text"},"wrap-before":{css:"shield-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"shield-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long names."},"halo-fill":{css:"shield-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"shield-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},"character-spacing":{css:"shield-character-spacing",type:"unsigned","default-value":0,doc:"Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement."},"line-spacing":{css:"shield-line-spacing",doc:"Vertical spacing between lines of multiline labels (in pixels)",type:"unsigned"},dx:{css:"shield-text-dx",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the X axis.  A positive value will shift the text right","default-value":0},dy:{css:"shield-text-dy",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the Y axis.  A positive value will shift the text down","default-value":0},"shield-dx":{css:"shield-dx",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the X axis.  A positive value will shift the text right","default-value":0},"shield-dy":{css:"shield-dy",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the Y axis.  A positive value will shift the text down","default-value":0},opacity:{css:"shield-opacity",type:"float",doc:"(Default 1.0) - opacity of the image used for the shield","default-value":1},"text-opacity":{css:"shield-text-opacity",type:"float",doc:"(Default 1.0) - opacity of the text placed on top of the shield","default-value":1},"horizontal-alignment":{css:"shield-horizontal-alignment",type:["left","middle","right","auto"],doc:"The shield's horizontal alignment from its centerpoint","default-value":"auto"},"vertical-alignment":{css:"shield-vertical-alignment",type:["top","middle","bottom","auto"],doc:"The shield's vertical alignment from its centerpoint","default-value":"middle"},"text-transform":{css:"shield-text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"justify-alignment":{css:"shield-justify-alignment",type:["left","center","right","auto"],doc:"Define how text in a shield's label is justified","default-value":"auto"},clip:{css:"shield-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"shield-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"line-pattern":{file:{css:"line-pattern-file",type:"uri","default-value":"none",required:!0,doc:"An image file to be repeated and warped along a line"},clip:{css:"line-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"line-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"polygon-pattern":{file:{css:"polygon-pattern-file",type:"uri","default-value":"none",required:!0,doc:"Image to use as a repeated pattern fill within a polygon"},alignment:{css:"polygon-pattern-alignment",type:["local","global"],"default-value":"local",doc:"Specify whether to align pattern fills to the layer or to the map."},gamma:{css:"polygon-pattern-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon pattern edges"},opacity:{css:"polygon-pattern-opacity",type:"float",doc:"(Default 1.0) - Apply an opacity level to the image used for the pattern","default-value":1,"default-meaning":"The image is rendered without modifications"},clip:{css:"polygon-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},raster:{opacity:{css:"raster-opacity","default-value":1,"default-meaning":"opaque",type:"float",doc:"The opacity of the raster symbolizer on top of other symbolizers."},"filter-factor":{css:"raster-filter-factor","default-value":-1,"default-meaning":"Allow the datasource to choose appropriate downscaling.",type:"float",doc:"This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed."},scaling:{css:"raster-scaling",type:["near","fast","bilinear","bilinear8","bicubic","spline16","spline36","hanning","hamming","hermite","kaiser","quadric","catrom","gaussian","bessel","mitchell","sinc","lanczos","blackman"],"default-value":"near",doc:"The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality."},"mesh-size":{css:"raster-mesh-size","default-value":16,"default-meaning":"Reprojection mesh will be 1/16 of the resolution of the source image",type:"unsigned",doc:"A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion."},"comp-op":{css:"raster-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},point:{file:{css:"point-file",type:"uri",required:!1,"default-value":"none",doc:"Image file to represent a point"},"allow-overlap":{css:"point-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping points are shown or hidden.","default-meaning":"Do not allow points to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"point-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},opacity:{css:"point-opacity",type:"float","default-value":1,"default-meaning":"Fully opaque",doc:"A value from 0 to 1 to control the opacity of the point"},placement:{css:"point-placement",type:["centroid","interior"],doc:"How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon.","default-value":"centroid"},transform:{css:"point-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},"comp-op":{css:"point-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},text:{name:{css:"text-name",type:"expression",required:!0,"default-value":"",serialization:"content",doc:"Value to use for a text label. Data columns are specified using brackets like [column_name]"},"face-name":{css:"text-face-name",type:"string",validate:"font",doc:"Font name and style to render a label in",required:!0},size:{css:"text-size",type:"float","default-value":10,doc:"Text size in pixels"},"text-ratio":{css:"text-ratio",doc:"Define the amount of text (of the total) present on successive lines when wrapping occurs","default-value":0,type:"unsigned"},"wrap-width":{css:"text-wrap-width",doc:"Length of a chunk of text in characters before wrapping text","default-value":0,type:"unsigned"},"wrap-before":{css:"text-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"text-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long text."},spacing:{css:"text-spacing",type:"unsigned",doc:"Distance between repeated text labels on a line (aka. label-spacing)"},"character-spacing":{css:"text-character-spacing",type:"float","default-value":0,doc:"Horizontal spacing adjustment between characters in pixels"},"line-spacing":{css:"text-line-spacing","default-value":0,type:"unsigned",doc:"Vertical spacing adjustment between lines in pixels"},"label-position-tolerance":{css:"text-label-position-tolerance","default-value":0,type:"unsigned",doc:"Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line)"},"max-char-angle-delta":{css:"text-max-char-angle-delta",type:"float","default-value":"22.5",doc:"The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners."},fill:{css:"text-fill",doc:"Specifies the color for the text","default-value":"#000000",type:"color"},opacity:{css:"text-opacity",doc:"A number from 0 to 1 specifying the opacity for the text","default-value":1,"default-meaning":"Fully opaque",type:"float"},"halo-fill":{css:"text-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"text-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},dx:{css:"text-dx",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the X axis.  A positive value will shift the text right","default-value":0},dy:{css:"text-dy",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the Y axis.  A positive value will shift the text down","default-value":0},"vertical-alignment":{css:"text-vertical-alignment",type:["top","middle","bottom","auto"],doc:"Position of label relative to point position.","default-value":"auto","default-meaning":'Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.'},"avoid-edges":{css:"text-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.","default-value":!1,type:"boolean"},"minimum-distance":{css:"text-min-distance",doc:"Minimum permitted distance to the next text symbolizer.",type:"float"},"minimum-padding":{css:"text-min-padding",doc:"Determines the minimum amount of padding that a text symbolizer gets relative to other text",type:"float"},"minimum-path-length":{css:"text-min-path-length",type:"float","default-value":0,"default-meaning":"place labels on all paths",doc:"Place labels only on paths longer than this value."},"allow-overlap":{css:"text-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping text is shown or hidden.","default-meaning":"Do not allow text to overlap with other text - overlapping markers will not be shown."},orientation:{css:"text-orientation",type:"expression",doc:"Rotate the text."},placement:{css:"text-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"Control the style of placement of a point versus the geometry it is attached to."},"placement-type":{css:"text-placement-type",doc:'Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off.',type:["dummy","simple"],"default-value":"dummy"},placements:{css:"text-placements",type:"string","default-value":"",doc:'If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` '},"text-transform":{css:"text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"horizontal-alignment":{css:"text-horizontal-alignment",type:["left","middle","right","auto"],doc:"The text's horizontal alignment from its centerpoint","default-value":"auto"},"justify-alignment":{css:"text-align",type:["left","right","center","auto"],doc:"Define how text is justified","default-value":"auto","default-meaning":"Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives"},clip:{css:"text-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"text-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},building:{fill:{css:"building-fill","default-value":"#FFFFFF",doc:"The color of the buildings walls.",type:"color"},"fill-opacity":{css:"building-fill-opacity",type:"float",doc:"The opacity of the building as a whole, including all walls.","default-value":1},height:{css:"building-height",doc:"The height of the building in pixels.",type:"expression","default-value":"0"}}},colors:{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],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],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],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],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],transparent:[0,0,0,0]},filter:{value:["true","false","null","point","linestring","polygon","collection"]}},Oa.mapnik_reference={version:{latest:s._mapnik_reference_latest,"2.1.1":s._mapnik_reference_latest}},s.CartoCSS=Oa,s.CartoCSS.Tree={},s.CartoCSS.Tree.operate=function(e,t,r){switch(e){case"+":return t+r;case"-":return t-r;case"*":return t*r;case"%":return t%r;case"/":return t/r}},s.CartoCSS.Tree.functions={rgb:function(e,t,r){return this.rgba(e,t,r,1)},rgba:function(e,t,r,i){var a=this,n=[e,t,r].map(function(e){return a.number(e)});return i=a.number(i),n.some(isNaN)||isNaN(i)?null:new s.CartoCSS.Tree.Color(n,i)},stop:function(e){var t,r;return arguments.length>1&&(t=arguments[1]),arguments.length>2&&(r=arguments[2]),{is:"tag",val:e,color:t,mode:r,toString:s=>'\n\t<stop value="'+e.ev(s)+'"'+(t?' color="'+t.ev(s)+'" ':"")+(r?' mode="'+r.ev(s)+'" ':"")+"/>"}},hsl:function(e,t,r){return this.hsla(e,t,r,1)},hsla:function(e,t,r,s){if([e=this.number(e)%360/360,t=this.number(t),r=this.number(r),s=this.number(s)].some(isNaN))return null;var i=r<=.5?r*(t+1):r+t-r*t,a=2*r-i;return this.rgba(255*n(e+1/3),255*n(e),255*n(e-1/3),s);function n(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?a+(i-a)*e*6:2*e<1?i:3*e<2?a+(i-a)*(2/3-e)*6:a}},hue:function(e){return"toHSL"in e?new s.CartoCSS.Tree.Dimension(Math.round(e.toHSL().h)):null},saturation:function(e){return"toHSL"in e?new s.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().s),"%"):null},lightness:function(e){return"toHSL"in e?new s.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().l),"%"):null},alpha:function(e){return"toHSL"in e?new s.CartoCSS.Tree.Dimension(e.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s+=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},desaturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s-=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},lighten:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l+=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},darken:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l-=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},fadein:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a+=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},fadeout:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a-=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},spin:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL(),s=(r.h+t.value)%360;return r.h=s<0?360+s:s,this.hsla_simple(r)},replace:function(e,t,r){return"field"===e.is?e.toString+".replace("+t.toString()+", "+r.toString()+")":e.replace(t,r)},mix:function(e,t,r){var i=r.value/100,a=2*i-1,n=e.toHSL().a-t.toHSL().a,o=((a*n==-1?a:(a+n)/(1+a*n))+1)/2,l=1-o,h=[e.rgb[0]*o+t.rgb[0]*l,e.rgb[1]*o+t.rgb[1]*l,e.rgb[2]*o+t.rgb[2]*l],u=e.alpha*i+t.alpha*(1-i);return new s.CartoCSS.Tree.Color(h,u)},greyscale:function(e){return this.desaturate(e,new s.CartoCSS.Tree.Dimension(100))},"%":function(e){for(var t=Array.prototype.slice.call(arguments,1),r=e.value,i=0;i<t.length;i++)r=r.replace(/%s/,t[i].value).replace(/%[da]/,t[i].toString());return r=r.replace(/%%/g,"%"),new s.CartoCSS.Tree.Quoted(r)},hsla_simple:function(e){return this.hsla(e.h,e.s,e.l,e.a)},number:function(e){return e instanceof s.CartoCSS.Tree.Dimension?parseFloat("%"===e.unit?e.value/100:e.value):"number"==typeof e?e:NaN},clamp:function(e){return Math.min(1,Math.max(0,e))}},s.CartoCSS.Tree.Call=class{constructor(e,t,r){this.is="call",this.name=e,this.args=t,this.index=r}ev(e){for(var t=this.args.map(function(t){return t.ev(e)}),r=0;r<t.length;r++)if("undefined"===t[r].is)return{is:"undefined",value:"undefined"};if(this.name in s.CartoCSS.Tree.functions){if(s.CartoCSS.Tree.functions[this.name].length<=t.length){var i=s.CartoCSS.Tree.functions[this.name].apply(s.CartoCSS.Tree.functions,t);return null===i?(e.error({message:"incorrect arguments given to "+this.name+"()",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):i}return e.error({message:"incorrect number of arguments for "+this.name+"(). "+s.CartoCSS.Tree.functions[this.name].length+" expected.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}}var a=s.CartoCSS.Tree.Reference.mapnikFunctions[this.name];if(void 0===a){var n=Ma()(s.CartoCSS.Tree.Reference.mapnikFunctions),o=this.name,l=n.map(function(e){return[e[0],s.CartoCSS.Tree.Reference.editDistance(o,e[0]),e[1]]}).sort(function(e,t){return e[1]-t[1]});return e.error({message:"unknown function "+this.name+"(), did you mean "+l[0][0]+"("+l[0][2]+")",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}}return a!==t.length&&-1!==a?(e.error({message:"function "+this.name+"() takes "+a+" arguments and was given "+t.length,index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):(this.args=t,this)}toString(e,t){return this.args.length?this.name+"("+this.args.join(",")+")":this.name}},s.CartoCSS.Tree.Color=class{constructor(e,t){this.is="color",Array.isArray(e)?this.rgb=e.slice(0,3):6==e.length?this.rgb=e.match(/.{2}/g).map(function(e){return parseInt(e,16)}):this.rgb=e.split("").map(function(e){return parseInt(e+e,16)}),"number"==typeof t?this.alpha=t:4===e.length?this.alpha=e[3]:this.alpha=1}ev(){return this}toString(){return"rgba("+this.rgb.map(function(e){return Math.round(e)}).concat(this.alpha).join(", ")+")"}operate(e,t,r){var i=[];r instanceof s.CartoCSS.Tree.Color||(r=r.toColor());for(var a=0;a<3;a++)i[a]=s.CartoCSS.Tree.operate(t,this.rgb[a],r.rgb[a]);return new s.CartoCSS.Tree.Color(i)}toHSL(){var e,t,r=this.rgb[0]/255,s=this.rgb[1]/255,i=this.rgb[2]/255,a=this.alpha,n=Math.max(r,s,i),o=Math.min(r,s,i),l=(n+o)/2,h=n-o;if(n===o)e=t=0;else{switch(t=l>.5?h/(2-n-o):h/(n+o),n){case r:e=(s-i)/h+(s<i?6:0);break;case s:e=(i-r)/h+2;break;case i:e=(r-s)/h+4}e/=6}return{h:360*e,s:t,l,a}}},s.CartoCSS.Tree.Comment=class{constructor(e,t){this.value=e,this.silent=!!t}toString(e){return"\x3c!--"+this.value+"--\x3e"}ev(){return this}},s.CartoCSS.Tree.Definition=class{constructor(e,t){this.elements=e.elements,this.rules=t,this.ruleIndex={};for(var r=0;r<this.rules.length;r++)"zoom"in this.rules[r]&&(this.rules[r]=this.rules[r].clone()),this.rules[r].zoom=e.zoom,this.ruleIndex[this.rules[r].updateID()]=!0;this.filters=e.filters,this.zoom=e.zoom,this.attachment=e.attachment||"__default__",this.specificity=e.specificity()}toString(){for(var e=this.filters.toString(),t=0;t<this.rules.length;t++)e+="\n    "+this.rules[t];return e}toJS(e){var t={},r=this.zoom,i=this.filters.toJS(e),a=[r];function n(r){if(r instanceof s.CartoCSS.Tree.Rule)t[r.name]=t[r.name]||[],i?t[r.name].push("if("+i+"){"+r.value.toJS(e)+"}"):t[r.name].push(r.value.toJS(e));else if(r instanceof s.CartoCSS.Tree.Ruleset){var a=r.toJS(e);for(var n in a)for(var o in t[n]=t[n]||[],a[n])t[n].push(a[n][o])}}for(var o in i&&a.push(i),i=a.join(" && "),this.rules)n(this.rules[o]);return t}},s.CartoCSS.Tree.Dimension=class{constructor(e,t,r){this.is="float",this.physical_units=["m","cm","in","mm","pt","pc"],this.screen_units=["px","%"],this.all_units=["m","cm","in","mm","pt","pc","px","%"],this.densities={m:.0254,mm:25.4,cm:2.54,pt:72,pc:6},this.value=parseFloat(e),this.unit=t||null,this.index=r}ev(e){if(this.unit&&this.all_units.indexOf(this.unit)<0)return e.error({message:"Invalid unit: '"+this.unit+"'",index:this.index}),{is:"undefined",value:"undefined"};if(this.unit&&this.physical_units.indexOf(this.unit)>=0){if(!e.ppi)return e.error({message:"ppi is not set, so metric units can't be used",index:this.index}),{is:"undefined",value:"undefined"};this.value=this.value/this.densities[this.unit]*e.ppi,this.unit="px"}return this}toColor(){return new s.CartoCSS.Tree.Color([this.value,this.value,this.value])}round(){return this.value=Math.round(this.value),this}toString(){return this.value.toString()}operate(e,t,r){return"%"===this.unit&&"%"!==r.unit?(e.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===r.unit?"*"===t||"/"===t||"%"===t?(e.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new s.CartoCSS.Tree.Dimension(s.CartoCSS.Tree.operate(t,this.value,this.value*r.value*.01),this.unit):new s.CartoCSS.Tree.Dimension(s.CartoCSS.Tree.operate(t,this.value,r.value),this.unit||r.unit)}},s.CartoCSS.Tree.Element=class{constructor(e){this.value=e.trim(),"#"===this.value[0]&&(this.type="id",this.clean=this.value.replace(/^#/,"")),"."===this.value[0]&&(this.type="class",this.clean=this.value.replace(/^\./,"")),-1!==this.value.indexOf("*")&&(this.type="wildcard")}specificity(){return["id"===this.type?1:0,"class"===this.type?1:0]}toString(){return this.value}},s.CartoCSS.Tree.Expression=class{constructor(e){this.is="expression",this.value=e}ev(e){return this.value.length>1?new s.CartoCSS.Tree.Expression(this.value.map(function(t){return t.ev(e)})):this.value[0].ev(e)}toString(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}},s.CartoCSS.Tree.Field=class{constructor(e){this.is="field",this.value=e||""}toString(){return'["'+this.value.toUpperCase()+'"]'}ev(){return this}},s.CartoCSS.Tree.Filter=class{constructor(e,t,r,s,i){this.ops={"<":[" &lt; ","numeric"],">":[" &gt; ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" &lt;= ","numeric"],">=":[" &gt;= ","numeric"],"=~":[".match(","string",")"]},this.key=e,this.op=t,this.val=r,this.index=s,this.filename=i,this.id=this.key+this.op+this.val}ev(e){return this.key=this.key.ev(e),this.val=this.val.ev(e),this}toString(){return"["+this.id+"]"}},s.CartoCSS.Tree.Filterset=class{constructor(){this.filters={}}toJS(e){function t(e){var t=e.op;"="===t&&(t="==");var r=e.val;void 0!==e._val&&(r=e._val.toString(!0)),e.key&&"scale"===e.key.value?r=+r:"string"!=typeof r&&"object"!=typeof r||(r="'"+r+"'");var s="attributes";return s+"&&"+s+e.key+"&&"+s+e.key+" "+t+r}var r=[];for(var s in this.filters)r.push(t(this.filters[s]));return r.join(" && ")}toString(){var e=[];for(var t in this.filters)e.push(this.filters[t].id);return e.sort().join("\t")}ev(e){for(var t in this.filters)this.filters[t].ev(e);return this}clone(){var e=new s.CartoCSS.Tree.Filterset;for(var t in this.filters)e.filters[t]=this.filters[t];return e}cloneWith(e){var t=[];for(var r in e.filters){var i=this.addable(e.filters[r]);if(!1===i)return!1;!0===i&&t.push(e.filters[r])}if(!t.length)return null;var a=new s.CartoCSS.Tree.Filterset;for(r in this.filters)a.filters[r]=this.filters[r];for(;r=t.shift();)a.add(r);return a}addable(e){var t=e.key.toString(),r=e.val.toString();switch(r.match(/^[0-9]+(\.[0-9]*)?$/)&&(r=parseFloat(r)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==r&&null:void 0===this.filters[t+"!="+r]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<r))));case"=~":return!0;case"!=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val!==r&&null:void 0!==this.filters[t+"!="+r]?null:void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<r)||null;case">":return t+"="in this.filters?!(this.filters[t+"="].val<=r)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val<r)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<r)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=r)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<r)||null));case"<=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>r)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)||null))}}conflict(e){var t=e.key.toString(),r=e.val.toString();return isNaN(parseFloat(r))||(r=parseFloat(r)),("="===e.op&&void 0!==this.filters[t+"="]&&r!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&r==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&r===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}add(e,t){var r,s=e.key.toString(),i=e.op,a=this.conflict(e);if(a)return a;if("="===i){for(var n in this.filters)this.filters[n].key===s&&delete this.filters[n];this.filters[s+"="]=e}else if("!="===i)this.filters[s+"!="+e.val]=e;else if("=~"===i)this.filters[s+"=~"+e.val]=e;else if(">"===i){for(var o in this.filters)this.filters[o].key===s&&this.filters[o].val<=e.val&&delete this.filters[o];this.filters[s+">"]=e}else if(">="===i){for(var l in this.filters)r=+this.filters[l].val.toString(),this.filters[l].key===s&&r<e.val&&delete this.filters[l];void 0!==this.filters[s+"!="+e.val]?(delete this.filters[s+"!="+e.val],e.op=">",this.filters[s+">"]=e):this.filters[s+">="]=e}else if("<"===i){for(var h in this.filters)r=+this.filters[h].val.toString(),this.filters[h].key===s&&r>=e.val&&delete this.filters[h];this.filters[s+"<"]=e}else if("<="===i){for(var u in this.filters)r=+this.filters[u].val.toString(),this.filters[u].key===s&&r>e.val&&delete this.filters[u];void 0!==this.filters[s+"!="+e.val]?(delete this.filters[s+"!="+e.val],e.op="<",this.filters[s+"<"]=e):this.filters[s+"<="]=e}}},s.CartoCSS.Tree.Fontset=class{constructor(e,t){this.fonts=t,this.name="fontset-"+e.effects.length}},s.CartoCSS.Tree.Invalid=class{constructor(e,t,r){this.is="invalid",this.chunk=e,this.index=t,this.type="syntax",this.message=r||"Invalid code: "+this.chunk}ev(e){return e.error({chunk:this.chunk,index:this.index,type:"syntax",message:this.message||"Invalid code: "+this.chunk}),{is:"undefined"}}},s.CartoCSS.Tree.Keyword=class{ev(){return this}constructor(e){this.value=e;var t={transparent:"color",true:"boolean",false:"boolean"};this.is=t[e]?t[e]:"keyword"}toString(){return this.value}},s.CartoCSS.Tree.Literal=class{constructor(e){this.value=e||"",this.is="field"}toString(){return this.value}ev(){return this}},s.CartoCSS.Tree.Operation=class{constructor(e,t,r){this.is="operation",this.op=e.trim(),this.operands=t,this.index=r}ev(e){var t,r=this.operands[0].ev(e),i=this.operands[1].ev(e);return"undefined"===r.is||"undefined"===i.is?{is:"undefined",value:"undefined"}:(r instanceof s.CartoCSS.Tree.Dimension&&i instanceof s.CartoCSS.Tree.Color&&("*"===this.op||"+"===this.op?(t=i,i=r,r=t):e.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),r instanceof s.CartoCSS.Tree.Quoted&&i instanceof s.CartoCSS.Tree.Quoted&&"+"!==this.op?(e.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r instanceof s.CartoCSS.Tree.Field||i instanceof s.CartoCSS.Tree.Field||r instanceof s.CartoCSS.Tree.Literal||i instanceof s.CartoCSS.Tree.Literal?"color"===r.is||"color"===i.is?(e.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new s.CartoCSS.Tree.Literal(r.ev(e).toString(!0)+this.op+i.ev(e).toString(!0)):void 0===r.operate?(e.error({message:"Cannot do math with type "+r.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r.operate(e,this.op,i))}},s.CartoCSS.Tree.Quoted=class{constructor(e){this.is="string",this.value=e||""}toString(e){var t=this.value.replace(/&/g,"&amp;"),r=t.replace(/\'/g,"\\'").replace(/\"/g,"&quot;").replace(/</g,"&lt;").replace(/\>/g,"&gt;");return!0===e?"'"+r+"'":t}ev(){return this}operate(e,t,r){return new s.CartoCSS.Tree.Quoted(s.CartoCSS.Tree.operate(t,this.toString(),r.toString(this.contains_field)))}},s.CartoCSS.Tree.Reference={_validateValue:{font:function(e,t){return!e.validation_data||!e.validation_data.fonts||-1!=e.validation_data.fonts.indexOf(t)}},setData:function(e){this.data=e,this.selector_cache=function(e){var t={};for(var r in e.symbolizers)for(var s in e.symbolizers[r])e.symbolizers[r][s].hasOwnProperty("css")&&(t[e.symbolizers[r][s].css]=[e.symbolizers[r][s],r,s]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var r in e.symbolizers)for(var s in e.symbolizers[r])if("functions"===e.symbolizers[r][s].type)for(var i=0;i<e.symbolizers[r][s].functions.length;i++){var a=e.symbolizers[r][s].functions[i];t[a[0]]=a[1]}return t}(e),this.required_cache=function(e){var t={};for(var r in e.symbolizers)for(var s in t[r]=[],e.symbolizers[r])e.symbolizers[r][s].required&&t[r].push(e.symbolizers[r][s].css);return t}(e)},setVersion:function(e){return!!s.CartoCSS.mapnik_reference.version.hasOwnProperty(e)&&(this.setData(s.CartoCSS.mapnik_reference.version[e]),!0)},selectorData:function(e,t){if(this.selector_cache&&this.selector_cache[e])return this.selector_cache[e][t]},validSelector:function(e){return!!this.selector_cache[e]},selectorName:function(e){return this.selectorData(e,2)},selector:function(e){return this.selectorData(e,0)},symbolizer:function(e){return this.selectorData(e,1)},requiredProperties:function(e,t){var r=this.required_cache[e];for(var s in r)if(!(r[s]in t))return"Property "+r[s]+" required for defining "+e+" styles."},isFont:function(e){return"font"===this.selector(e).validate},editDistance:function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;for(var r=[],s=0;s<=t.length;s++)r[s]=[s];for(var i=0;i<=e.length;i++)r[0][i]=i;for(s=1;s<=t.length;s++)for(i=1;i<=e.length;i++)t.charAt(s-1)===e.charAt(i-1)?r[s][i]=r[s-1][i-1]:r[s][i]=Math.min(r[s-1][i-1]+1,Math.min(r[s][i-1]+1,r[s-1][i]+1));return r[t.length][e.length]},validValue:function(e,t,r){var s;if(this.selector(t)){if("keyword"===r.value[0].is)return function(e,t){return"object"==typeof this.selector(t).type?-1!==this.selector(t).type.indexOf(e.value[0].value):"string"===this.selector(t).type}(r,t);if("undefined"===r.value[0].is)return!0;if("numbers"===this.selector(t).type){for(s in r.value)if("float"!==r.value[s].is)return!1;return!0}if("tags"===this.selector(t).type){if(!r.value)return!1;if(!r.value[0].value)return"tag"===r.value[0].is;for(s=0;s<r.value[0].value.length;s++)if("tag"!==r.value[0].value[s].is)return!1;return!0}if("functions"==this.selector(t).type)return function(e,t){if("string"===e.value[0].is)return!0;for(var r in e.value)for(var s in e.value[r].value){if("call"!==e.value[r].value[s].is)return!1;var i=find(this.selector(t).functions,function(t){return t[0]===e.value[r].value[s].name});if(!(i&&-1===i[1]||i&&i[1]===e.value[r].value[s].args.length))return!1}return!0}(r,t);if("expression"===this.selector(t).type)return!0;if("unsigned"===this.selector(t).type)return"float"===r.value[0].is&&(r.value[0].round(),!0);if(this.selector(t).validate){for(s=0;s<r.value.length;s++)if(this.selector(t).type===r.value[s].is&&this._validateValue[this.selector(t).validate](e,r.value[s].value))return!0;return!1}return this.selector(t).type===r.value[0].is}return!1}},s.CartoCSS.Tree.Reference.setVersion("latest"),s.CartoCSS.Tree.Rule=class{constructor(e,t,r,i){this.is="rule";var a=e.split("/");this.name=a.pop(),this.instance=a.length?a[0]:"__default__",this.value=t instanceof s.CartoCSS.Tree.Value?t:new s.CartoCSS.Tree.Value([t]),this.index=r,this.symbolizer=s.CartoCSS.Tree.Reference.symbolizer(this.name),this.filename=i,this.variable="@"===e.charAt(0)}clone(){var e=Object.create(s.CartoCSS.Tree.Rule.prototype);return e.name=this.name,e.value=this.value,e.index=this.index,e.instance=this.instance,e.symbolizer=this.symbolizer,e.filename=this.filename,e.variable=this.variable,e}updateID(){return this.id=this.zoom+"#"+this.instance+"#"+this.name}toString(){return"["+s.CartoCSS.Tree.Zoom.toString(this.zoom)+"] "+this.name+": "+this.value}ev(e){return new s.CartoCSS.Tree.Rule(this.name,this.value.ev(e),this.index,this.filename)}},s.CartoCSS.Tree.Ruleset=class{constructor(e,t){this.is="ruleset",this.selectors=e,this.rules=t,this._lookups={}}ev(e){var t,r,i=new s.CartoCSS.Tree.Ruleset(this.selectors,this.rules.slice(0));for(i.root=this.root,e.frames.unshift(i),t=0;t<i.rules.length;t++)r=i.rules[t],i.rules[t]=r.ev?r.ev(e):r;return e.frames.shift(),i}match(e){return!e||0===e.length}variables(){return this._variables?this._variables:this._variables=this.rules.reduce(function(e,t){return t instanceof s.CartoCSS.Tree.Rule&&!0===t.variable&&(e[t.name]=t),e},{})}variable(e){return this.variables()[e]}rulesets(){return this._rulesets?this._rulesets:this._rulesets=this.rules.filter(function(e){return e instanceof s.CartoCSS.Tree.Ruleset})}find(e,t){t=t||this;var r=[],i=e.toString();return i in this._lookups?this._lookups[i]:(this.rulesets().forEach(function(i){if(i!==t)for(var a=0;a<i.selectors.length;a++)if(e.match(i.selectors[a])){e.elements.length>1?Array.prototype.push.apply(r,i.find(new s.CartoCSS.Tree.Selector(null,null,e.elements.slice(1)),t)):r.push(i);break}}),this._lookups[i]=r)}evZooms(e){for(var t=0;t<this.selectors.length;t++){for(var r=s.CartoCSS.Tree.Zoom.all,i=0;i<this.selectors[t].zoom.length;i++)r=this.selectors[t].zoom[i].ev(e).zoom;this.selectors[t].zoom=r}}flatten(e,t,r){var i,a,n=[];for(0===this.selectors.length&&(r.frames=r.frames.concat(this.rules)),this.evZooms(r),i=0;i<this.selectors.length;i++){var o=this.selectors[i];if(o.filters)if(t.length)for(a=0;a<t.length;a++){var l=t[a],h=l.filters.cloneWith(o.filters);if(null===h){if(l.zoom===o.zoom&&l.attachment===o.attachment&&l.elements.join()===o.elements.join()){n.push(l);continue}h=l.filters}else if(!h)continue;var u=Object.create(s.CartoCSS.Tree.Selector.prototype);u.filters=h,u.zoom=o.zoom,u.elements=l.elements.concat(o.elements),l.attachment&&o.attachment?u.attachment=l.attachment+"/"+o.attachment:u.attachment=o.attachment||l.attachment,u.conditions=l.conditions+o.conditions,u.index=o.index,n.push(u)}else n.push(o)}var c=[];for(i=0;i<this.rules.length;i++){var d=this.rules[i];d instanceof s.CartoCSS.Tree.Ruleset?d.flatten(e,n,r):d instanceof s.CartoCSS.Tree.Rule?c.push(d):d instanceof s.CartoCSS.Tree.Invalid&&r.error(d)}var p=!!c.length&&c[0].index;for(i=0;i<n.length;i++)!1!==p&&(n[i].index=p),e.push(new s.CartoCSS.Tree.Definition(n[i],c.slice()));return e}},s.CartoCSS.Tree.Selector=class{constructor(e,t,r,i,a,n){this.elements=r||[],this.attachment=i,this.filters=e||{},this.zoom=void 0!==t?t:s.CartoCSS.Tree.Zoom.all,this.conditions=a,this.index=n}specificity(){return this.elements.reduce(function(e,t){var r=t.specificity();return e[0]+=r[0],e[1]+=r[1],e},[0,0,this.conditions,this.index])}},s.CartoCSS.Tree.URL=class{constructor(e,t){this.is="uri",this.value=e,this.paths=t}toString(){return this.value.toString()}ev(e){return new s.CartoCSS.Tree.URL(this.value.ev(e),this.paths)}},s.CartoCSS.Tree.Value=class{constructor(e){this.is="value",this.value=e}ev(e){return 1===this.value.length?this.value[0].ev(e):new s.CartoCSS.Tree.Value(this.value.map(function(t){return t.ev(e)}))}toJS(e){var t=this.ev(e),r=t.toString();return"color"===t.is||"uri"===t.is||"string"===t.is||"keyword"===t.is?r="'"+r+"'":"field"===t.is?r=r.replace(/\[(.*)\]/g,"attributes['$1']"):t.value&&"object"==typeof t.value&&(r="["+r+"]"),"_value = "+r+";"}toString(e,t,r,s){return this.value.map(function(t){return t.toString(e,s)}).join(r||", ")}clone(){var e=Object.create(s.CartoCSS.Tree.Value.prototype);return Array.isArray(e)?e.value=this.value.slice():e.value=this.value,e.is=this.is,e}},s.CartoCSS.Tree.Variable=class{constructor(e,t,r){this.is="variable",this.name=e,this.index=t,this.filename=r}toString(){return this.name}ev(e){if(this._css)return this._css;var t=e.frames.filter(function(e){return e.name===this.name}.bind(this));return t.length?t[0].value.ev(e):(e.error({message:"variable "+this.name+" is undefined",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"})}},s.CartoCSS.Tree.Zoom=class{constructor(e,t,r){this.op=e,this.value=t,this.index=r}setZoom(e){return this.zoom=e,this}ev(e){var t=parseInt(this.value.ev(e).toString(),10);switch((t>s.CartoCSS.Tree.Zoom.maxZoom||t<0)&&e.error({message:"Only zoom levels between 0 and "+s.CartoCSS.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+t,this;case">":this.zoom="zoom && zoom > "+t;break;case">=":this.zoom="zoom && zoom >= "+t;break;case"<":this.zoom="zoom && zoom < "+t;break;case"<=":this.zoom="zoom && zoom <= "+t;break;default:return this}return this}toString(){for(var e="",t=0;t<=s.CartoCSS.Tree.Zoom.maxZoom;t++)e+=this.zoom&1<<t?"X":".";return e}},s.CartoCSS.Tree.Zoom.all=23,s.CartoCSS.Tree.Zoom.maxZoom=22,s.CartoCSS.Tree.Zoom.ranges={0:1e9,1:5e8,2:2e8,3:1e8,4:5e7,5:25e6,6:125e5,7:65e5,8:3e6,9:15e5,10:75e4,11:4e5,12:2e5,13:1e5,14:5e4,15:25e3,16:12500,17:5e3,18:2500,19:1500,20:750,21:500,22:250,23:100};s.ThemeStyle=
  /* Copyright© 2000 - 2019 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{constructor(e){e=e||{},this.fill=!0,this.fillColor="#000000",this.fillOpacity=1,this.stroke=!1,this.strokeColor="#000000",this.strokeOpacity=1,this.strokeWidth=1,this.strokeLinecap="butt",this.strokeLineJoin="miter",this.strokeDashstyle="solid",this.pointRadius=6,this.shadowBlur=0,this.shadowColor="#000000",this.shadowOffsetX=0,this.shadowOffsetY=0,this.label="",this.labelRect=!1,this.fontColor="",this.fontSize=12,this.fontStyle="normal",this.fontVariant="normal",this.fontWeight="normal",this.fontFamily="arial,sans-serif",this.labelPosition="top",this.labelAlign="center",this.labelBaseline="middle",this.labelXOffset=0,this.labelYOffset=0,ye.extend(this,e)}};
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 Ia{constructor(){this.refOriginalPosition=[0,0],this.refDataID=null,this.isHoverByRefDataID=!1,this.refDataHoverGroup=null,this.dataInfo=null,this.clickable=!0,this.hoverable=!0,this.style=null,this.highlightStyle={},this.CLASS_NAME="SuperMap.Feature.ShapeParameters"}destroy(){this.refOriginalPosition=null,this.refDataID=null,this.isHoverByRefDataID=null,this.refDataHoverGroup=null,this.dataInfo=null,this.clickable=null,this.hoverable=null,this.style=null,this.highlightStyle=null}}s.Feature=s.Feature||{},s.Feature.ShapeParameters=Ia;
  /* Copyright© 2000 - 2019 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 Fa extends Ia{constructor(e,t){super(e,t),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=6,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Point"}destroy(){this.x=null,this.y=null,this.r=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Point=Fa;
  /* Copyright© 2000 - 2019 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 Ra extends Ia{constructor(e){super(e),this.pointList=e,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Line"}destroy(){this.pointList=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Line=Ra;
  /* Copyright© 2000 - 2019 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 Da extends Ia{constructor(e){super(e),this.pointList=e,this.holePolygonPointLists=null,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Polygon"}destroy(){this.pointList=null,this.holePolygonPointLists=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Polygon=Da;
  /* Copyright© 2000 - 2019 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 ka extends Ia{constructor(e,t,r,s){super(e,t,r,s),this.x=isNaN(e)?0:e,this.y=isNaN(e)?0:t,this.width=isNaN(r)?0:r,this.height=isNaN(s)?0:s,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Rectangle"}destroy(){this.x=null,this.y=null,this.width=null,this.height=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Rectangle=ka;
  /* Copyright© 2000 - 2019 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 Ba extends Ia{constructor(e,t,r,s,i,a,n){super(e,t,r,s,i,a,n),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=isNaN(r)?0:r,this.startAngle=isNaN(s)?0:s,this.endAngle=isNaN(i)?0:i,this.r0=isNaN(a)?0:a,this.clockWise=n,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Sector"}destroy(){this.x=null,this.y=null,this.r=null,this.startAngle=null,this.endAngle=null,this.r0=null,this.clockWise=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Sector=Ba;
  /* Copyright© 2000 - 2019 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 Ga extends Ia{constructor(e,t,r){super(e,t,r),this.x=e,this.y=t,this.text=r,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Label"}destroy(){this.x=null,this.y=null,this.text=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Label=Ga;
  /* Copyright© 2000 - 2019 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 Ua extends Ia{constructor(e,t,r,s,i,a,n,o,l){super(e,t,r,s,i,a,n,o,l),this.x=e,this.y=t,this.image=r,this.width=s,this.height=i,this.sx=a,this.sy=n,this.sWidth=o,this.sHeight=l,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Image"}destroy(){this.x=null,this.y=null,this.image=null,this.width=null,this.height=null,this.sx=null,this.sy=null,this.sWidth=null,this.sHeight=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Image=Ua;
  /* Copyright© 2000 - 2019 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 ja extends Ia{constructor(e,t,r){super(e,t,r),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=isNaN(r)?0:r,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Circle"}destroy(){this.x=null,this.y=null,this.r=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Circle=ja;
  /* Copyright© 2000 - 2019 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 Ha{constructor(){this._handlers={},this.CLASS_NAME="SuperMap.LevelRenderer.Eventful"}destroy(){this._handlers=null}one(e,t,r){var s=this._handlers;return t&&e?(s[e]||(s[e]=[]),s[e].push({h:t,one:!0,ctx:r||this}),this):this}bind(e,t,r){var s=this._handlers;return t&&e?(s[e]||(s[e]=[]),s[e].push({h:t,one:!1,ctx:r||this}),this):this}unbind(e,t){var r=this._handlers;if(!e)return this._handlers={},this;if(t){if(r[e]){for(var s=[],i=0,a=r[e].length;i<a;i++)r[e][i].h!=t&&s.push(r[e][i]);r[e]=s}r[e]&&0===r[e].length&&delete r[e]}else delete r[e];return this}dispatch(e){if(this._handlers[e]){var t=arguments,r=t.length;r>3&&(t=Array.prototype.slice.call(t,1));for(var s=this._handlers[e],i=s.length,a=0;a<i;){switch(r){case 1:s[a].h.call(s[a].ctx);break;case 2:s[a].h.call(s[a].ctx,t[1]);break;case 3:s[a].h.call(s[a].ctx,t[1],t[2]);break;default:s[a].h.apply(s[a].ctx,t)}s[a].one?(s.splice(a,1),i--):a++}}return this}dispatchWithContext(e){if(this._handlers[e]){var t=arguments,r=t.length;r>4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var s=t[t.length-1],i=this._handlers[e],a=i.length,n=0;n<a;){switch(r){case 1:i[n].h.call(s);break;case 2:i[n].h.call(s,t[1]);break;case 3:i[n].h.call(s,t[1],t[2]);break;default:i[n].h.apply(s,t)}i[n].one?(i.splice(n,1),a--):n++}}return this}}
  /* Copyright© 2000 - 2019 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 Ja{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Vector"}create(e,t){var r=new(0,this.ArrayCtor)(2);return r[0]=e||0,r[1]=t||0,r}copy(e,t){return e[0]=t[0],e[1]=t[1],e}set(e,t,r){return e[0]=t,e[1]=r,e}add(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}scaleAndAdd(e,t,r,s){return e[0]=t[0]+r[0]*s,e[1]=t[1]+r[1]*s,e}sub(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}len(e){return Math.sqrt(this.lenSquare(e))}lenSquare(e){return e[0]*e[0]+e[1]*e[1]}mul(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}div(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}dot(e,t){return e[0]*t[0]+e[1]*t[1]}scale(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}normalize(e,t){var r=this.len(t);return 0===r?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}distance(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}distanceSquare(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}negate(e,t){return e[0]=-t[0],e[1]=-t[1],e}lerp(e,t,r,s){return e[0]=t[0]+s*(r[0]-t[0]),e[1]=t[1]+s*(r[1]-t[1]),e}applyTransform(e,t,r){var s=t[0],i=t[1];return e[0]=r[0]*s+r[2]*i+r[4],e[1]=r[1]*s+r[3]*i+r[5],e}min(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}max(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}length(e){return this.len(e)}lengthSquare(e){return this.lenSquare(e)}dist(e,t){return this.distance(e,t)}distSquare(e,t){return this.distanceSquare(e,t)}}
  /* Copyright© 2000 - 2019 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 Va{constructor(){this.vector=new Ja,this.EPSILON=1e-4,this.THREE_SQRT=Math.sqrt(3),this.ONE_THIRD=1/3,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Curve"}isAroundZero(e){return e>-this.EPSILON&&e<this.EPSILON}isNotAroundZero(e){return e>this.EPSILON||e<-this.EPSILON}cubicAt(e,t,r,s,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*s+3*a*r)}cubicDerivativeAt(e,t,r,s,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(s-r)*i*i)}cubicRootAt(e,t,r,s,i,a){var n=s+3*(t-r)-e,o=3*(r-2*t+e),l=3*(t-e),h=e-i,u=o*o-3*n*l,c=o*l-9*n*h,d=l*l-3*o*h,p=0;if(this.isAroundZero(u)&&this.isAroundZero(c))if(this.isAroundZero(o))a[0]=0;else{let e=-l/o;e>=0&&e<=1&&(a[p++]=e)}else{var m=c*c-4*u*d;if(this.isAroundZero(m)){var f=c/u;let e=-o/n+f,t=-f/2;e>=0&&e<=1&&(a[p++]=e),t>=0&&t<=1&&(a[p++]=t)}else if(m>0){let e=Math.sqrt(m),t=u*o+1.5*n*(-c+e),r=u*o+1.5*n*(-c-e),s=(-o-((t=t<0?-Math.pow(-t,this.ONE_THIRD):Math.pow(t,this.ONE_THIRD))+(r=r<0?-Math.pow(-r,this.ONE_THIRD):Math.pow(r,this.ONE_THIRD))))/(3*n);s>=0&&s<=1&&(a[p++]=s)}else{var y=(2*u*o-3*n*c)/(2*Math.sqrt(u*u*u)),g=Math.acos(y)/3,v=Math.sqrt(u),S=Math.cos(g);let e=(-o-2*v*S)/(3*n),t=(-o+v*(S+this.THREE_SQRT*Math.sin(g)))/(3*n),r=(-o+v*(S-this.THREE_SQRT*Math.sin(g)))/(3*n);e>=0&&e<=1&&(a[p++]=e),t>=0&&t<=1&&(a[p++]=t),r>=0&&r<=1&&(a[p++]=r)}}return p}cubicExtrema(e,t,r,s,i){var a=6*r-12*t+6*e,n=9*t+3*s-3*e-9*r,o=3*t-3*e,l=0;if(this.isAroundZero(n)){if(this.isNotAroundZero(a)){let e=-o/a;e>=0&&e<=1&&(i[l++]=e)}}else{var h=a*a-4*n*o;if(this.isAroundZero(h))i[0]=-a/(2*n);else if(h>0){let e=Math.sqrt(h),t=(-a+e)/(2*n),r=(-a-e)/(2*n);t>=0&&t<=1&&(i[l++]=t),r>=0&&r<=1&&(i[l++]=r)}}return l}cubicSubdivide(e,t,r,s,i,a){var n=(t-e)*i+e,o=(r-t)*i+t,l=(s-r)*i+r,h=(o-n)*i+n,u=(l-o)*i+o,c=(u-h)*i+h;a[0]=e,a[1]=n,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=s}cubicProjectPoint(e,t,r,s,i,a,n,o,l,h,u){var c,d=this.vector.create(),p=this.vector.create(),m=this.vector.create(),f=.005,y=1/0;d[0]=l,d[1]=h;for(let l=0;l<1;l+=.05){p[0]=this.cubicAt(e,r,i,n,l),p[1]=this.cubicAt(t,s,a,o,l);let h=this.vector.distSquare(d,p);h<y&&(c=l,y=h)}y=1/0;for(let l=0;l<32&&!(f<this.EPSILON);l++){let l=c-f,h=c+f;p[0]=this.cubicAt(e,r,i,n,l),p[1]=this.cubicAt(t,s,a,o,l);let u=this.vector.distSquare(p,d);if(l>=0&&u<y)c=l,y=u;else{m[0]=this.cubicAt(e,r,i,n,h),m[1]=this.cubicAt(t,s,a,o,h);let l=this.vector.distSquare(m,d);h<=1&&l<y?(c=h,y=l):f*=.5}}return u&&(u[0]=this.cubicAt(e,r,i,n,c),u[1]=this.cubicAt(t,s,a,o,c)),Math.sqrt(y)}quadraticAt(e,t,r,s){var i=1-s;return i*(i*e+2*s*t)+s*s*r}quadraticDerivativeAt(e,t,r,s){return 2*((1-s)*(t-e)+s*(r-t))}quadraticRootAt(e,t,r,s,i){var a=e-2*t+r,n=2*(t-e),o=e-s,l=0;if(this.isAroundZero(a)){if(this.isNotAroundZero(n)){var h=-o/n;h>=0&&h<=1&&(i[l++]=h)}}else{var u=n*n-4*a*o;if(this.isAroundZero(u)){let e=-n/(2*a);e>=0&&e<=1&&(i[l++]=e)}else if(u>0){let e=Math.sqrt(u),t=(-n+e)/(2*a),r=(-n-e)/(2*a);t>=0&&t<=1&&(i[l++]=t),r>=0&&r<=1&&(i[l++]=r)}}return l}quadraticExtremum(e,t,r){var s=e+r-2*t;return 0===s?.5:(e-t)/s}quadraticProjectPoint(e,t,r,s,i,a,n,o,l){var h,u=this.vector.create(),c=this.vector.create(),d=this.vector.create(),p=.005,m=1/0;u[0]=n,u[1]=o;for(let n=0;n<1;n+=.05){c[0]=this.quadraticAt(e,r,i,n),c[1]=this.quadraticAt(t,s,a,n);let o=this.vector.distSquare(u,c);o<m&&(h=n,m=o)}m=1/0;for(let n=0;n<32&&!(p<this.EPSILON);n++){let n=h-p,o=h+p;c[0]=this.quadraticAt(e,r,i,n),c[1]=this.quadraticAt(t,s,a,n);let l=this.vector.distSquare(c,u);if(n>=0&&l<m)h=n,m=l;else{d[0]=this.quadraticAt(e,r,i,o),d[1]=this.quadraticAt(t,s,a,o);let n=this.vector.distSquare(d,u);o<=1&&n<m?(h=o,m=n):p*=.5}}return l&&(l[0]=this.quadraticAt(e,r,i,h),l[1]=this.quadraticAt(t,s,a,h)),Math.sqrt(m)}}
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 za{}za.EVENT={RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",MOUSEWHEEL:"mousewheel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",GLOBALOUT:"globalout",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",touchClickDelay:300},za.catchBrushException=!1,za.debugMode=0;
  /* Copyright© 2000 - 2019 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 Wa{static SUtil_smoothBezier(e,t,r,s,i){i&&2===i||(i=[0,0]);var a,n,o=i,l=[],h=[],u=[],c=[],d=!!s;if(d){a=[1/0,1/0],n=[-1/0,-1/0];let t=e.length;for(let r=0;r<t;r++)Wa.Util_vector.min(a,a,[e[r][0]+o[0],e[r][1]+o[1]]),Wa.Util_vector.max(n,n,[e[r][0]+o[0],e[r][1]+o[1]]);Wa.Util_vector.min(a,a,s[0]),Wa.Util_vector.max(n,n,s[1])}let p=e.length;for(let s=0;s<p;s++){let i,m,f=[e[s][0]+o[0],e[s][1]+o[1]];if(r)i=[e[s?s-1:p-1][0]+o[0],e[s?s-1:p-1][1]+o[1]],m=[e[(s+1)%p][0]+o[0],e[(s+1)%p][1]+o[1]];else{if(0===s||s===p-1){l.push([e[s][0]+o[0],e[s][1]+o[1]]);continue}i=[e[s-1][0]+o[0],e[s-1][1]+o[1]],m=[e[s+1][0]+o[0],e[s+1][1]+o[1]]}Wa.Util_vector.sub(h,m,i),Wa.Util_vector.scale(h,h,t);let y=Wa.Util_vector.distance(f,i),g=Wa.Util_vector.distance(f,m),v=y+g;0!==v&&(y/=v,g/=v),Wa.Util_vector.scale(u,h,-y),Wa.Util_vector.scale(c,h,g);let S=Wa.Util_vector.add([],f,u),b=Wa.Util_vector.add([],f,c);d&&(Wa.Util_vector.max(S,S,a),Wa.Util_vector.min(S,S,n),Wa.Util_vector.max(b,b,a),Wa.Util_vector.min(b,b,n)),l.push(S),l.push(b)}return r&&l.push(l.shift()),l}static SUtil_smoothSpline(e,t,r,s){s&&2===s||(s=[0,0]);var i=s,a=e.length,n=[],o=0;for(let t=1;t<a;t++)o+=Wa.Util_vector.distance([e[t-1][0]+i[0],e[t-1][1]+i[1]],[e[t][0]+i[0],e[t][1]+i[1]]);var l=o/5;l=l<a?a:l;for(let r=0;r<l;r++){let s,o,u,c=r/(l-1)*(t?a:a-1),d=Math.floor(c),p=c-d,m=[e[d%a][0]+i[0],e[d%a][1]+i[1]];t?(s=[e[(d-1+a)%a][0]+i[0],e[(d-1+a)%a][1]+i[1]],o=[e[(d+1)%a][0]+i[0],e[(d+1)%a][1]+i[1]],u=[e[(d+2)%a][0]+i[0],e[(d+2)%a][1]+i[1]]):(s=[e[0===d?d:d-1][0]+i[0],e[0===d?d:d-1][1]+i[1]],o=[e[d>a-2?a-1:d+1][0]+i[0],e[d>a-2?a-1:d+1][1]+i[1]],u=[e[d>a-3?a-1:d+2][0]+i[0],e[d>a-3?a-1:d+2][1]+i[1]]);let f=p*p,y=p*f;n.push([h(s[0],m[0],o[0],u[0],p,f,y),h(s[1],m[1],o[1],u[1],p,f,y)])}return n;function h(e,t,r,s,i,a,n){var o=.5*(r-e),l=.5*(s-t);return(2*(t-r)+o+l)*n+(-3*(t-r)-2*o-l)*a+o*i+t}}static SUtil_dashedLineTo(e,t,r,s,i,a,n){var o=[5,5];if(a="number"!=typeof a?5:a,e.setLineDash)return o[0]=a,o[1]=a,n&&n instanceof Array?e.setLineDash(n):e.setLineDash(o),e.moveTo(t,r),void e.lineTo(s,i);var l=s-t,h=i-r,u=Math.floor(Math.sqrt(l*l+h*h)/a);l/=u,h/=u;for(var c=!0,d=0;d<u;++d)c?e.moveTo(t,r):e.lineTo(t,r),c=!c,t+=l,r+=h;e.lineTo(s,i)}}Wa.Util_area=new class{constructor(){this.util=new Ea,this.curve=new Va,this._ctx=null,this._textWidthCache={},this._textHeightCache={},this._textWidthCacheCounter=0,this._textHeightCacheCounter=0,this.TEXT_CACHE_MAX=5e3,this.PI2=2*Math.PI,this.roots=[-1,-1,-1],this.extrema=[-1,-1],this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Area"}normalizeRadian(e){return(e%=this.PI2)<0&&(e+=this.PI2),e}isInside(e,t,r,s){if(!t||!e)return!1;var i=e.type;this._ctx=this._ctx||this.util.getContext();var a=this._mathMethod(e,t,r,s);if(void 0!==a)return a;if(e.buildPath&&this._ctx.isPointInPath)return this._buildPathMethod(e,this._ctx,t,r,s);switch(i){case"ellipse":case"smicellipse":return!0;case"trochoid":var n="out"==t.location?t.r1+t.r2+t.d:t.r1-t.r2+t.d;return this.isInsideCircle(t,r,s,n);case"rose":return this.isInsideCircle(t,r,s,t.maxr);default:return!1}}_mathMethod(e,t,r,s){switch(e.type){case"bezier-curve":return void 0===t.cpX2?this.isInsideQuadraticStroke(t.xStart,t.yStart,t.cpX1,t.cpY1,t.xEnd,t.yEnd,t.lineWidth,r,s):this.isInsideCubicStroke(t.xStart,t.yStart,t.cpX1,t.cpY1,t.cpX2,t.cpY2,t.xEnd,t.yEnd,t.lineWidth,r,s);case"line":return this.isInsideLine(t.xStart,t.yStart,t.xEnd,t.yEnd,t.lineWidth,r,s);case"broken-line":return this.isInsideBrokenLine(t.pointList,t.lineWidth,r,s);case"smicbroken-line":{let i=r,a=s;return e.refOriginalPosition&&(i=r-e.refOriginalPosition[0],a=s-e.refOriginalPosition[1]),this.isInsideBrokenLine(t.pointList,t.lineWidth,i,a)}case"ring":return this.isInsideRing(t.x,t.y,t.r0,t.r,r,s);case"smicring":{let i=t.x,a=t.y;return e.refOriginalPosition&&(i=t.x+e.refOriginalPosition[0],a=t.y+e.refOriginalPosition[1]),this.isInsideRing(i,a,t.r0,t.r,r,s)}case"circle":return this.isInsideCircle(t.x,t.y,t.r,r,s);case"smicpoint":{let i=r,a=s;return e.refOriginalPosition&&(i=r-e.refOriginalPosition[0],a=s-e.refOriginalPosition[1]),this.isInsideCircle(t.x,t.y,t.r,i,a)}case"sector":{let e=t.startAngle*Math.PI/180,i=t.endAngle*Math.PI/180;return t.clockWise||(e=-e,i=-i),this.isInsideSector(t.x,t.y,t.r0,t.r,e,i,!t.clockWise,r,s)}case"smicsector":{let i=t.startAngle*Math.PI/180,a=t.endAngle*Math.PI/180;t.clockWise||(i=-i,a=-a);let n=t.x,o=t.y;return e.refOriginalPosition&&(n=t.x+e.refOriginalPosition[0],o=t.y+e.refOriginalPosition[1]),this.isInsideSector(n,o,t.r0,t.r,i,a,!t.clockWise,r,s)}case"path":return this.isInsidePath(t.pathArray,Math.max(t.lineWidth,5),t.brushType,r,s);case"polygon":case"star":case"smicstar":case"isogon":case"smicisogon":return this.isInsidePolygon(t.pointList,r,s);case"smicpolygon":{let u=r,c=s;if(e.refOriginalPosition&&(u=r-e.refOriginalPosition[0],c=s-e.refOriginalPosition[1]),e.holePolygonPointLists&&e.holePolygonPointLists.length>0){for(var i=this.isInsidePolygon(t.pointList,u,c),a=e.holePolygonPointLists,n=!1,o=0,l=a.length;o<l;o++){var h=a[o];!0===this.isInsidePolygon(h,u,c)&&(n=!0)}return!0===i&&!1===n}return this.isInsidePolygon(t.pointList,u,c)}case"text":var u=t.__rect||e.getRect(t);return this.isInsideRect(u.x,u.y,u.width,u.height,r,s);case"smictext":var c=e.getTextBackground(t);return this.isInsidePolygon(c,r,s);case"rectangle":case"image":return this.isInsideRect(t.x,t.y,t.width,t.height,r,s);case"smicimage":{let i=t.x,a=t.y;return e.refOriginalPosition&&(i=t.x+e.refOriginalPosition[0],a=t.y+e.refOriginalPosition[1]),this.isInsideRect(i,a,t.width,t.height,r,s)}}}_buildPathMethod(e,t,r,s,i){return t.beginPath(),e.buildPath(t,r),t.closePath(),t.isPointInPath(s,i)}isOutside(e,t,r,s){return!this.isInside(e,t,r,s)}isInsideLine(e,t,r,s,i,a,n){if(0===i)return!1;var o=Math.max(i,5),l=0;if(n>t+o&&n>s+o||n<t-o&&n<s-o||a>e+o&&a>r+o||a<e-o&&a<r-o)return!1;if(e===r)return Math.abs(a-e)<=o/2;var h=(l=(t-s)/(e-r))*a-n+(e*s-r*t)/(e-r);return h*h/(l*l+1)<=o/2*o/2}isInsideCubicStroke(e,t,r,s,i,a,n,o,l,h,u){if(0===l)return!1;var c=Math.max(l,5);return!(u>t+c&&u>s+c&&u>a+c&&u>o+c||u<t-c&&u<s-c&&u<a-c&&u<o-c||h>e+c&&h>r+c&&h>i+c&&h>n+c||h<e-c&&h<r-c&&h<i-c&&h<n-c)&&this.curve.cubicProjectPoint(e,t,r,s,i,a,n,o,h,u,null)<=c/2}isInsideQuadraticStroke(e,t,r,s,i,a,n,o,l){if(0===n)return!1;var h=Math.max(n,5);return!(l>t+h&&l>s+h&&l>a+h||l<t-h&&l<s-h&&l<a-h||o>e+h&&o>r+h&&o>i+h||o<e-h&&o<r-h&&o<i-h)&&this.curve.quadraticProjectPoint(e,t,r,s,i,a,o,l,null)<=h/2}isInsideArcStroke(e,t,r,s,i,a,n,o,l){var h=this.PI2;if(0===n)return!1;var u=Math.max(n,5);o-=e,l-=t;var c=Math.sqrt(o*o+l*l);if(c-u>r||c+u<r)return!1;if(Math.abs(s-i)>=h)return!0;if(a){var d=s;s=this.normalizeRadian(i),i=this.normalizeRadian(d)}else s=this.normalizeRadian(s),i=this.normalizeRadian(i);s>i&&(i+=h);var p=Math.atan2(l,o);return p<0&&(p+=h),p>=s&&p<=i||p+h>=s&&p+h<=i}isInsideBrokenLine(e,t,r,s){for(var i=Math.max(t,10),a=0,n=e.length-1;a<n;a++){var o=e[a][0],l=e[a][1],h=e[a+1][0],u=e[a+1][1];if(this.isInsideLine(o,l,h,u,i,r,s))return!0}return!1}isInsideRing(e,t,r,s,i,a){var n=(i-e)*(i-e)+(a-t)*(a-t);return n<s*s&&n>r*r}isInsideRect(e,t,r,s,i,a){return i>=e&&i<=e+r&&a>=t&&a<=t+s}isInsideCircle(e,t,r,s,i){return(s-e)*(s-e)+(i-t)*(i-t)<r*r}isInsideSector(e,t,r,s,i,a,n,o,l){return this.isInsideArcStroke(e,t,(r+s)/2,i,a,n,s-r,o,l)}isInsidePolygon(e,t,r){for(var s=e.length,i=0,a=0,n=s-1;a<s;a++){var o=e[n][0],l=e[n][1],h=e[a][0],u=e[a][1];i+=this.windingLine(o,l,h,u,t,r),n=a}return 0!==i}windingLine(e,t,r,s,i,a){return a>t&&a>s||a<t&&a<s?0:s==t?0:(a-t)/(s-t)*(r-e)+e>i?s<t?1:-1:0}swapExtrema(){var e=this.extrema[0];this.extrema[0]=this.extrema[1],this.extrema[1]=e}windingCubic(e,t,r,s,i,a,n,o,l,h){var u=this.curve,c=this.roots,d=this.extrema;if(h>t&&h>s&&h>a&&h>o||h<t&&h<s&&h<a&&h<o)return 0;var p=u.cubicRootAt(t,s,a,o,h,c);if(0===p)return 0;for(var m,f,y=0,g=-1,v=0;v<p;v++){var S=c[v];u.cubicAt(e,r,i,n,S)<l||(g<0&&(g=u.cubicExtrema(t,s,a,o,d),d[1]<d[0]&&g>1&&this.swapExtrema(),m=u.cubicAt(t,s,a,o,d[0]),g>1&&(f=u.cubicAt(t,s,a,o,d[1]))),2==g?S<d[0]?y+=m<t?1:-1:S<d[1]?y+=f<m?1:-1:y+=o<f?1:-1:S<d[0]?y+=m<t?1:-1:y+=o<m?1:-1)}return y}windingQuadratic(e,t,r,s,i,a,n,o){var l=this.curve,h=this.roots;if(o>t&&o>s&&o>a||o<t&&o<s&&o<a)return 0;var u=l.quadraticRootAt(t,s,a,o,h);if(0===u)return 0;var c=l.quadraticExtremum(t,s,a);if(c>=0&&c<=1){var d=0,p=l.quadraticAt(t,s,a,c);for(let s=0;s<u;s++)l.quadraticAt(e,r,i,h[s])>n||(h[s]<c?d+=p<t?1:-1:d+=a<p?1:-1);return d}return l.quadraticAt(e,r,i,h[0])>n?0:a<t?1:-1}windingArc(e,t,r,s,i,a,n,o){var l=this.roots,h=this.PI2;if((o-=t)>r||o<-r)return 0;let u=Math.sqrt(r*r-o*o);if(l[0]=-u,l[1]=u,Math.abs(s-i)>=h){s=0,i=h;var c=a?1:-1;return n>=l[0]+e&&n<=l[1]+e?c:0}if(a){let e=s;s=this.normalizeRadian(i),i=this.normalizeRadian(e)}else s=this.normalizeRadian(s),i=this.normalizeRadian(i);s>i&&(i+=h);var d=0;for(let t=0;t<2;t++){var p=l[t];if(p+e>n){let e=Math.atan2(o,p),t=a?1:-1;e<0&&(e=h+e),(e>=s&&e<=i||e+h>=s&&e+h<=i)&&(e>Math.PI/2&&e<1.5*Math.PI&&(t=-t),d+=t)}}return d}isInsidePath(e,t,r,s,i){for(var a=0,n=0,o=0,l=0,h=0,u=!0,c=!0,d="stroke"===(r=r||"fill")||"both"===r,p="fill"===r||"both"===r,m=0;m<e.length;m++){var f=e[m],y=f.points;if(u||"M"===f.command){if(m>0&&(p&&(a+=this.windingLine(n,o,l,h,s,i)),0!==a))return!0;l=y[y.length-2],h=y[y.length-1],u=!1,c&&"A"!==f.command&&(c=!1,n=l,o=h)}switch(f.command){case"M":n=y[0],o=y[1];break;case"L":if(d&&this.isInsideLine(n,o,y[0],y[1],t,s,i))return!0;p&&(a+=this.windingLine(n,o,y[0],y[1],s,i)),n=y[0],o=y[1];break;case"C":if(d&&this.isInsideCubicStroke(n,o,y[0],y[1],y[2],y[3],y[4],y[5],t,s,i))return!0;p&&(a+=this.windingCubic(n,o,y[0],y[1],y[2],y[3],y[4],y[5],s,i)),n=y[4],o=y[5];break;case"Q":if(d&&this.isInsideQuadraticStroke(n,o,y[0],y[1],y[2],y[3],t,s,i))return!0;p&&(a+=this.windingQuadratic(n,o,y[0],y[1],y[2],y[3],s,i)),n=y[2],o=y[3];break;case"A":var g=y[0],v=y[1],S=y[2],b=y[3],x=y[4],C=y[5],_=Math.cos(x)*S+g,T=Math.sin(x)*b+v;c?(c=!1,l=_,h=T):a+=this.windingLine(n,o,_,T);var E=(s-g)*b/S+g;if(d&&this.isInsideArcStroke(g,v,b,x,x+C,1-y[7],t,E,i))return!0;p&&(a+=this.windingArc(g,v,b,x,x+C,1-y[7],E,i)),n=Math.cos(x+C)*S+g,o=Math.sin(x+C)*b+v;break;case"z":if(d&&this.isInsideLine(n,o,l,h,t,s,i))return!0;u=!0}}return p&&(a+=this.windingLine(n,o,l,h,s,i)),0!==a}getTextWidth(e,t){var r=e+":"+t;if(this._textWidthCache[r])return this._textWidthCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var s=0,i=0,a=(e=(e+"").split("\n")).length;i<a;i++)s=Math.max(this._ctx.measureText(e[i]).width,s);return this._ctx.restore(),this._textWidthCache[r]=s,++this._textWidthCacheCounter>this.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),s}getTextHeight(e,t){var r=e+":"+t;if(this._textHeightCache[r])return this._textHeightCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var s=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[r]=s,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),s}}
  /* Copyright© 2000 - 2019 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.*/,Wa.Util_color=new wa,Wa.Util_computeBoundingBox=new class{constructor(){3===arguments.length&&this.computeBoundingBox(arguments),this.CLASS_NAME="SuperMap.LevelRenderer.Tool.ComputeBoundingBox"}computeBoundingBox(e,t,r){if(0!==e.length){for(var s=e[0][0],i=e[0][0],a=e[0][1],n=e[0][1],o=1;o<e.length;o++){var l=e[o];l[0]<s&&(s=l[0]),l[0]>i&&(i=l[0]),l[1]<a&&(a=l[1]),l[1]>n&&(n=l[1])}t[0]=s,t[1]=a,r[0]=i,r[1]=n}}cubeBezier(e,t,r,s,i,a){var n=new Va,o=[];n.cubicExtrema(e[0],t[0],r[0],s[0],o);for(let i=0;i<o.length;i++)o[i]=n.cubicAt(e[0],t[0],r[0],s[0],o[i]);var l=[];n.cubicExtrema(e[1],t[1],r[1],s[1],l);for(let i=0;i<l.length;i++)l[i]=n.cubicAt(e[1],t[1],r[1],s[1],l[i]);o.push(e[0],s[0]),l.push(e[1],s[1]);var h=Math.min.apply(null,o),u=Math.max.apply(null,o),c=Math.min.apply(null,l),d=Math.max.apply(null,l);i[0]=h,i[1]=c,a[0]=u,a[1]=d}quadraticBezier(e,t,r,s,i){var a=new Va,n=a.quadraticExtremum(e[0],t[0],r[0]),o=a.quadraticExtremum(e[1],t[1],r[1]),l=1-(n=Math.max(Math.min(n,1),0)),h=1-(o=Math.max(Math.min(o,1),0)),u=l*l*e[0]+2*l*n*t[0]+n*n*r[0],c=l*l*e[1]+2*l*n*t[1]+n*n*r[1],d=h*h*e[0]+2*h*o*t[0]+o*o*r[0],p=h*h*e[1]+2*h*o*t[1]+o*o*r[1];s[0]=Math.min(e[0],r[0],u,d),s[1]=Math.min(e[1],r[1],c,p),i[0]=Math.max(e[0],r[0],u,d),i[1]=Math.max(e[1],r[1],c,p)}arc(e,t,r,s,i,a,n,o){var l=new Ja,h=l.create(),u=l.create(),c=l.create();if(h[0]=Math.cos(s)*r+e,h[1]=Math.sin(s)*r+t,u[0]=Math.cos(i)*r+e,u[1]=Math.sin(i)*r+t,l.min(n,h,u),l.max(o,h,u),(s%=2*Math.PI)<0&&(s+=2*Math.PI),(i%=2*Math.PI)<0&&(i+=2*Math.PI),s>i&&!a?i+=2*Math.PI:s<i&&a&&(s+=2*Math.PI),a){var d=i;i=s,s=d}for(var p=0;p<i;p+=Math.PI/2)p>s&&(c[0]=Math.cos(p)*r+e,c[1]=Math.sin(p)*r+t,l.min(n,c,n),l.max(o,c,o))}}
  /* Copyright© 2000 - 2019 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.*/,Wa.Util_curve=new Va,Wa.Util_env=new class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Env";var e,t,r,s,i,a,n,o,l,h,u,c,d,p,m,f,y,g,v,S,b,x=this;return e=navigator.userAgent,t=x.os={},r=x.browser={},s=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),a=e.match(/(iPad).*OS\s([\d_]+)/),n=e.match(/(iPod)(.*OS\s([\d_]+))?/),o=!a&&e.match(/(iPhone\sOS)\s([\d_]+)/),l=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&e.match(/TouchPad/),u=e.match(/Kindle\/([\d.]+)/),c=e.match(/Silk\/([\d._]+)/),d=e.match(/(BlackBerry).*Version\/([\d.]+)/),p=e.match(/(BB10).*Version\/([\d.]+)/),m=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),f=e.match(/PlayBook/),y=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),g=e.match(/Firefox\/([\d.]+)/),v=e.match(/MSIE ([\d.]+)/),S=s&&e.match(/Mobile\//)&&!y,b=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!y,(r.webkit=!!s)&&(r.version=s[1]),i&&(t.android=!0,t.version=i[2]),o&&!n&&(t.ios=t.iphone=!0,t.version=o[2].replace(/_/g,".")),a&&(t.ios=t.ipad=!0,t.version=a[2].replace(/_/g,".")),n&&(t.ios=t.ipod=!0,t.version=n[3]?n[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),d&&(t.blackberry=!0,t.version=d[2]),p&&(t.bb10=!0,t.version=p[2]),m&&(t.rimtabletos=!0,t.version=m[2]),f&&(r.playbook=!0),u&&(t.kindle=!0,t.version=u[1]),c&&(r.silk=!0,r.version=c[1]),!c&&t.android&&e.match(/Kindle Fire/)&&(r.silk=!0),y&&(r.chrome=!0,r.version=y[1]),g&&(r.firefox=!0,r.version=g[1]),v&&(r.ie=!0,r.version=v[1]),S&&(e.match(/Safari/)||t.ios)&&(r.safari=!0),b&&(r.webview=!0),v&&(r.ie=!0,r.version=v[1]),t.tablet=!!(a||f||i&&!e.match(/Mobile/)||g&&e.match(/Tablet/)||v&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(i||o||l||d||p||y&&e.match(/Android/)||y&&e.match(/CriOS\/([\d.]+)/)||g&&e.match(/Mobile/)||v&&e.match(/Touch/))),{browser:r,os:t,canvasSupported:!!document.createElement("canvas").getContext}}destory(){return!0}}
  /* Copyright© 2000 - 2019 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.*/,Wa.Util_event=new class{constructor(){this.stop="function"==typeof window.addEventListener?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Event"}getX(e){return void 0!==e.zrenderX&&e.zrenderX||void 0!==e.offsetX&&e.offsetX||void 0!==e.layerX&&e.layerX||void 0!==e.clientX&&e.clientX}getY(e){return void 0!==e.zrenderY&&e.zrenderY||void 0!==e.offsetY&&e.offsetY||void 0!==e.layerY&&e.layerY||void 0!==e.clientY&&e.clientY}getDelta(e){return void 0!==e.zrenderDelta&&e.zrenderDelta||void 0!==e.wheelDelta&&e.wheelDelta||void 0!==e.detail&&-e.detail}}
  /* Copyright© 2000 - 2019 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.*/,Wa.Util_http=new class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Http"}get(e,t,r){if("object"==typeof e){var s=e;e=s.url,t=s.onsuccess,r=s.onerror}var i=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");i.open("GET",e,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status>=200&&i.status<300||304===i.status?t&&t(i.responseText):r&&r(),i.onreadystatechange=new Function,i=null)},i.send(null)}},Wa.Util_log=new
  /* Copyright© 2000 - 2019 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{constructor(){return this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Log",function(){if(0!==za.debugMode)if(1==za.debugMode)for(let e in arguments)throw new Error(arguments[e]);else if(za.debugMode>1)for(let e in arguments)console.log(arguments[e])}}destory(){return!0}}
  /* Copyright© 2000 - 2019 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.*/,Wa.Util_math=new class{constructor(){this._radians=window.Math.PI/180,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Math"}sin(e,t){return window.Math.sin(t?e*this._radians:e)}cos(e,t){return window.Math.cos(t?e*this._radians:e)}degreeToRadian(e){return e*this._radians}radianToDegree(e){return e/this._radians}}
  /* Copyright© 2000 - 2019 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.*/,Wa.Util_matrix=new class{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Matrix"}create(){var e=new(0,this.ArrayCtor)(6);return this.identity(e),e}identity(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}copy(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}mul(e,t,r){return e[0]=t[0]*r[0]+t[2]*r[1],e[1]=t[1]*r[0]+t[3]*r[1],e[2]=t[0]*r[2]+t[2]*r[3],e[3]=t[1]*r[2]+t[3]*r[3],e[4]=t[0]*r[4]+t[2]*r[5]+t[4],e[5]=t[1]*r[4]+t[3]*r[5]+t[5],e}translate(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}rotate(e,t,r){var s=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5],h=Math.sin(r),u=Math.cos(r);return e[0]=s*u+n*h,e[1]=-s*h+n*u,e[2]=i*u+o*h,e[3]=-i*h+u*o,e[4]=u*a+h*l,e[5]=u*l-h*a,e}scale(e,t,r){var s=r[0],i=r[1];return e[0]=t[0]*s,e[1]=t[1]*i,e[2]=t[2]*s,e[3]=t[3]*i,e[4]=t[4]*s,e[5]=t[5]*i,e}invert(e,t){var r=t[0],s=t[2],i=t[4],a=t[1],n=t[3],o=t[5],l=r*n-a*s;return l?(l=1/l,e[0]=n*l,e[1]=-a*l,e[2]=-s*l,e[3]=r*l,e[4]=(s*o-n*i)*l,e[5]=(a*i-r*o)*l,e):null}mulVector(e,t,r){var s=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5];return e[0]=r[0]*s+r[1]*i+a,e[1]=r[0]*n+r[1]*o+l,e}},Wa.Util=new Ea,Wa.Util_vector=new Ja;
  /* Copyright© 2000 - 2019 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 qa{constructor(){var e;this.position=[0,0],this.rotation=[0,0,0],this.scale=[1,1,0,0],this.needLocalTransform=!1,this.needTransform=!1,this.CLASS_NAME="SuperMap.LevelRenderer.Transformable",this.lookAt=(e=Wa.Util_vector.create(),function(t){this.transform||(this.transform=Wa.Util_matrix.create());var r=this.transform;function s(e){return e>-5e-5&&e<5e-5}Wa.Util_vector.sub(e,t,this.position),s(e[0])&&s(e[1])||(Wa.Util_vector.normalize(e,e),r[2]=e[0]*this.scale[1],r[3]=e[1]*this.scale[1],r[0]=e[1]*this.scale[0],r[1]=-e[0]*this.scale[0],r[4]=this.position[0],r[5]=this.position[1],this.decomposeTransform())})}destroy(){this.position=null,this.rotation=null,this.scale=null,this.needLocalTransform=null,this.needTransform=null}updateNeedTransform(){function e(e){return e>5e-5||e<-5e-5}this.needLocalTransform=e(this.rotation[0])||e(this.position[0])||e(this.position[1])||e(this.scale[0]-1)||e(this.scale[1]-1)}updateTransform(){if(this.updateNeedTransform(),this.parent?this.needTransform=this.needLocalTransform||this.parent.needTransform:this.needTransform=this.needLocalTransform,this.needTransform){var e=[0,0],t=this.transform||Wa.Util_matrix.create();if(Wa.Util_matrix.identity(t),this.needLocalTransform){if(r(this.scale[0])||r(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;let s=r(e[0])||r(e[1]);s&&Wa.Util_matrix.translate(t,t,e),Wa.Util_matrix.scale(t,t,this.scale),s&&(e[0]=-e[0],e[1]=-e[1],Wa.Util_matrix.translate(t,t,e))}if(this.rotation instanceof Array){if(0!==this.rotation[0]){e[0]=-this.rotation[1]||0,e[1]=-this.rotation[2]||0;let s=r(e[0])||r(e[1]);s&&Wa.Util_matrix.translate(t,t,e),Wa.Util_matrix.rotate(t,t,this.rotation[0]),s&&(e[0]=-e[0],e[1]=-e[1],Wa.Util_matrix.translate(t,t,e))}}else 0!==this.rotation&&Wa.Util_matrix.rotate(t,t,this.rotation);(r(this.position[0])||r(this.position[1]))&&Wa.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?Wa.Util_matrix.mul(this.transform,this.parent.transform,this.transform):Wa.Util_matrix.copy(this.transform,this.parent.transform))}function r(e){return e>5e-5||e<-5e-5}}setTransform(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}decomposeTransform(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],r=this.position,s=this.scale,i=this.rotation;n(t-1)&&(t=Math.sqrt(t));var a=e[2]*e[2]+e[3]*e[3];n(a-1)&&(a=Math.sqrt(a)),r[0]=e[4],r[1]=e[5],s[0]=t,s[1]=a,s[2]=s[3]=0,i[0]=Math.atan2(-e[1]/a,e[0]/t),i[1]=i[2]=0}function n(e){return e>5e-5||e<-5e-5}}}
  /* Copyright© 2000 - 2019 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 Ya extends(s.mixin(Ha,qa)){constructor(e){var t;super(e),e=e||{},this.id=null,this.style={},this.highlightStyle=null,this.parent=null,this.__dirty=!0,this.__clipShapes=[],this.invisible=!1,this.ignore=!1,this.zlevel=0,this.draggable=!1,this.clickable=!1,this.hoverable=!0,this.z=0,this.refOriginalPosition=[0,0],this.refDataID=null,this.isHoverByRefDataID=!1,this.refDataHoverGroup=null,this.dataInfo=null,ye.extend(this,e),this.id=this.id||ye.createUniqueID("smShape_"),this.CLASS_NAME="SuperMap.LevelRenderer.Shape",this.getTansform=(t=[],function(e,r){var s=[e,r];return this.needTransform&&this.transform&&(Wa.Util_matrix.invert(t,this.transform),Wa.Util_matrix.mulVector(s,t,[e,r,1]),e==s[0]&&r==s[1]&&this.updateNeedTransform()),s})}destroy(){this.id=null,this.style=null,this.highlightStyle=null,this.parent=null,this.__dirty=null,this.__clipShapes=null,this.invisible=null,this.ignore=null,this.zlevel=null,this.draggable=null,this.clickable=null,this.hoverable=null,this.z=null,this.refOriginalPosition=null,this.refDataID=null,this.refDataHoverGroup=null,this.isHoverByRefDataID=null,this.dataInfo=null,super.destroy()}brush(e,t){var r=this.beforeBrush(e,t);switch(e.beginPath(),this.buildPath(e,r),r.brushType){case"both":this.setCtxGlobalAlpha(e,"fill",r),e.fill(),r.lineWidth>0&&(this.setCtxGlobalAlpha(e,"stroke",r),e.stroke()),this.setCtxGlobalAlpha(e,"reset",r);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",r),r.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",r);break;default:this.setCtxGlobalAlpha(e,"fill",r),e.fill(),this.setCtxGlobalAlpha(e,"reset",r)}this.drawText(e,r,this.style),this.afterBrush(e)}beforeBrush(e,t){var r=this.style;return this.brushTypeOnly&&(r.brushType=this.brushTypeOnly),t&&(r=this.getHighlightStyle(r,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(r.strokeColor=r.strokeColor||r.color),e.save(),this.doClip(e),this.setContext(e,r),this.setTransform(e),r}afterBrush(e){e.restore()}setContext(e,t){for(var r=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],s=0,i=r.length;s<i;s++){var a=t[r[s][0]],n=r[s][1];void 0!==a&&(e[n]=a)}}doClip(e){var t=Wa.Util_matrix.create();if(this.__clipShapes)for(var r=0;r<this.__clipShapes.length;r++){var s=this.__clipShapes[r];if(s.needTransform){let r=s.transform;Wa.Util_matrix.invert(t,r),e.transform(r[0],r[1],r[2],r[3],r[4],r[5])}if(e.beginPath(),s.buildPath(e,s.style),e.clip(),s.needTransform){let r=t;e.transform(r[0],r[1],r[2],r[3],r[4],r[5])}}}getHighlightStyle(e,t,r){var s={};for(let t in e)s[t]=e[t];var i=Wa.Util_color.getHighlightColor();"stroke"!=e.brushType?(s.strokeColor=i,s.lineWidth=e.lineWidth||1,s.brushType="both"):"stroke"!=r?(s.strokeColor=i,s.lineWidth=e.lineWidth||1):s.strokeColor=t.strokeColor||Wa.Util_color.mix(e.strokeColor,Wa.Util_color.toRGB(i));for(let e in t)void 0!==t[e]&&(s[e]=t[e]);return s}getHighlightZoom(){return"text"!=this.type?6:2}drift(e,t){this.position[0]+=e,this.position[1]+=t}buildPath(e,t){Wa.Util_log("buildPath not implemented in "+this.type)}getRect(e){Wa.Util_log("getRect not implemented in "+this.type)}isCover(e,t){var r=this.getTansform(e,t);e=r[0],t=r[1];var s=this.style.__rect;return s||(s=this.style.__rect=this.getRect(this.style)),e>=s.x&&e<=s.x+s.width&&t>=s.y&&t<=s.y+s.height&&Wa.Util_area.isInside(this,this.style,e,t)}drawText(e,t,r){if(void 0!==t.text&&!1!==t.text){var s=t.textColor||t.color||t.strokeColor;e.fillStyle=s;var i,a,n,o,l=10,h=t.textPosition||this.textPosition||"top",u=[];switch(u=this.refOriginalPosition&&2===this.refOriginalPosition.length?this.refOriginalPosition:[0,0],h){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var c=(r||t).__rect||this.getRect(r||t);switch(h){case"inside":n=c.x+c.width/2,o=c.y+c.height/2,i="center",a="middle","stroke"!=t.brushType&&s==t.color&&(e.fillStyle="#fff");break;case"left":n=c.x-l,o=c.y+c.height/2,i="end",a="middle";break;case"right":n=c.x+c.width+l,o=c.y+c.height/2,i="start",a="middle";break;case"top":n=c.x+c.width/2,o=c.y-l,i="center",a="bottom";break;case"bottom":n=c.x+c.width/2,o=c.y+c.height+l,i="center",a="top"}}break;case"start":case"end":var d=0,p=0,m=0,f=0;if(void 0!==t.pointList){var y=t.pointList;if(y.length<2)return;var g=y.length;switch(h){case"start":d=y[0][0]+u[0],p=y[1][0]+u[0],m=y[0][1]+u[1],f=y[1][1]+u[1];break;case"end":d=y[g-2][0]+u[0],p=y[g-1][0]+u[0],m=y[g-2][1]+u[1],f=y[g-1][1]+u[1]}}else d=t.xStart+u[0]||0,p=t.xEnd+u[0]||0,m=t.yStart+u[1]||0,f=t.yEnd+u[1]||0;switch(h){case"start":i=d<p?"end":"start",a=m<f?"bottom":"top",n=d,o=m;break;case"end":i=d<p?"start":"end",a=m<f?"top":"bottom",n=p,o=f}l-=4,d&&p&&d!=p?n-="end"==i?l:-l:i="center",m!=f?o-="bottom"==a?l:-l:a="middle";break;case"specific":n=t.textX||0,o=t.textY||0,i="start",a="middle"}t.labelXOffset&&!isNaN(t.labelXOffset)&&(n+=t.labelXOffset),t.labelYOffset&&!isNaN(t.labelYOffset)&&(o+=t.labelYOffset),null!=n&&null!=o&&Ya._fillText(e,t.text,n,o,t.textFont,t.textAlign||i,t.textBaseline||a)}}modSelf(){this.__dirty=!0,this.style&&(this.style.__rect=null),this.highlightStyle&&(this.highlightStyle.__rect=null)}isSilent(){return!(this.hoverable||this.draggable||this.clickable||this.onmousemove||this.onmouseover||this.onmouseout||this.onmousedown||this.onmouseup||this.onclick||this.ondragenter||this.ondragover||this.ondragleave||this.ondrop)}setCtxGlobalAlpha(e,t,r){e.globalAlpha="fill"===t?void 0===r.fillOpacity?void 0===r.opacity?1:r.opacity:r.fillOpacity:"stroke"===t?void 0===r.strokeOpacity?void 0===r.opacity?1:r.opacity:r.strokeOpacity:void 0===r.opacity?1:r.opacity}static _fillText(e,t,r,s,i,a,n){i&&(e.font=i),e.textAlign=a,e.textBaseline=n;var o=Ya._getTextRect(t,r,s,i,a,n);t=(t+"").split("\n");var l=Wa.Util_area.getTextHeight("ZH",i);switch(n){case"top":s=o.y;break;case"bottom":s=o.y+l;break;default:s=o.y+l/2}for(var h=0,u=t.length;h<u;h++)e.fillText(t[h],r,s),s+=l}static _getTextRect(e,t,r,s,i,a){var n=Wa.Util_area.getTextWidth(e,s),o=Wa.Util_area.getTextHeight("ZH",s);switch(e=(e+"").split("\n"),i){case"end":case"right":t-=n;break;case"center":t-=n/2}switch(a){case"top":break;case"bottom":r-=o*e.length;break;default:r-=o*e.length/2}return{x:t,y:r,width:n,height:o*e.length}}}
  /* Copyright© 2000 - 2019 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 Qa extends Ya{constructor(e){super(e),this.type="smicpoint",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicPoint"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;e.arc(t.x+r[0],t.y+r[1],t.r,0,2*Math.PI,!0)}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+r[0]-e.r-t/2),y:Math.round(e.y+r[1]-e.r-t/2),width:2*e.r+t,height:2*e.r+t},e.__rect)}}
  /* Copyright© 2000 - 2019 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 Xa extends Ya{constructor(e){super(e),this.type="smictext",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicText"}destroy(){this.type=null,super.destroy()}brush(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,s=this.style;if(t&&(s=this.getHighlightStyle(s,this.highlightStyle||{})),void 0!==s.text&&!1!==s.text){e.save(),this.doClip(e),this.setContext(e,s),this.setTransform(e),s.textFont&&(e.font=s.textFont),e.textAlign=s.textAlign||"start",e.textBaseline=s.textBaseline||"middle";var i,a=(s.text+"").split("\n"),n=Wa.Util_area.getTextHeight("ZH",s.textFont),o=this.getRectNoRotation(s),l=s.x+r[0];i="top"==s.textBaseline?o.y:"bottom"==s.textBaseline?o.y+n:o.y+n/2;for(var h=s.x+r[0],u=s.y+r[1],c=0,d=a.length;c<d;c++){switch(s.labelRect&&(e.fillRect(o.x-2,o.y,o.width+4,o.height),e.fillStyle=s.strokeColor,e.strokeRect(o.x-2,o.y,o.width+4,o.height),e.fillStyle=s.textColor),s.brushType){case"stroke":this.setCtxGlobalAlpha(e,"stroke",s),s.textRotation&&0!==s.textRotation?(e.save(),e.translate(h,u),e.rotate(s.textRotation*Math.PI/180),"top"==s.textBaseline?s.maxWidth?e.strokeText(a[c],0,n*c,s.maxWidth):e.strokeText(a[c],0,n*c):"bottom"==s.textBaseline?s.maxWidth?e.strokeText(a[c],0,n*(c+1)-o.height,s.maxWidth):e.strokeText(a[c],0,n*(c+1)-o.height):s.maxWidth?e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2,s.maxWidth):e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2),e.restore()):s.maxWidth?e.strokeText(a[c],l,i,s.maxWidth):e.strokeText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",s);break;case"both":s.textRotation&&0!==s.textRotation?(e.save(),e.translate(h,u),e.rotate(s.textRotation*Math.PI/180),"top"==s.textBaseline?s.maxWidth?(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(a[c],0,n*c,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(a[c],0,n*c,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s)):(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(a[c],0,n*c),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(a[c],0,n*c),this.setCtxGlobalAlpha(e,"reset",s)):"bottom"==s.textBaseline?s.maxWidth?(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(a[c],0,n*(c+1)-o.height,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(a[c],0,n*(c+1)-o.height,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s)):(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(a[c],0,n*(c+1)-o.height),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(a[c],0,n*(c+1)-o.height),this.setCtxGlobalAlpha(e,"reset",s)):s.maxWidth?(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(a[c],0,n*(c+1)-o.height/2-n/2,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s)):(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(a[c],0,n*(c+1)-o.height/2-n/2),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2),this.setCtxGlobalAlpha(e,"reset",s)),e.restore()):s.maxWidth?(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(a[c],l,i,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(a[c],l,i,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s)):(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",s));break;default:this.setCtxGlobalAlpha(e,"fill",s),s.textRotation&&0!==s.textRotation?(e.save(),e.translate(h,u),e.rotate(s.textRotation*Math.PI/180),"top"==s.textBaseline?s.maxWidth?e.fillText(a[c],0,n*c,s.maxWidth):e.fillText(a[c],0,n*c):"bottom"==s.textBaseline?s.maxWidth?e.fillText(a[c],0,n*(c+1)-o.height,s.maxWidth):e.fillText(a[c],0,n*(c+1)-o.height):s.maxWidth?e.fillText(a[c],0,n*(c+1)-o.height/2-n/2,s.maxWidth):e.fillText(a[c],0,n*(c+1)-o.height/2-n/2),e.restore()):s.maxWidth?e.fillText(a[c],l,i,s.maxWidth):e.fillText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",s)}i+=n}e.restore()}}getRect(e){if(e.__rect)return e.__rect;for(var t,r,s,i,a=this.getTextBackground(e,!0),n=0,o=a.length;n<o;n++){var l=a[n];0==n?(t=l[0],s=l[0],r=l[1],i=l[1]):(l[0]<t&&(t=l[0]),l[0]>s&&(s=l[0]),l[1]<r&&(r=l[1]),l[1]>i&&(i=l[1]))}return e.__rect={x:t,y:r,width:s-t,height:i-r},e.__rect}getRectNoRotation(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition,s=Wa.Util_area.getTextHeight("ZH",e.textFont),i=Wa.Util_area.getTextWidth(e.text,e.textFont),a=Wa.Util_area.getTextHeight(e.text,e.textFont),n=e.x+r[0];"end"==e.textAlign||"right"==e.textAlign?n-=i:"center"==e.textAlign&&(n-=i/2),t="top"==e.textBaseline?e.y+r[1]:"bottom"==e.textBaseline?e.y+r[1]-a:e.y+r[1]-a/2;var o,l=!1;if(e.maxWidth){var h=parseInt(e.maxWidth);h<i&&(o=i,l=!0,i=h),n=e.x+r[0],"end"==e.textAlign||"right"==e.textAlign?n-=i:"center"==e.textAlign&&(n-=i/2)}e.textFont&&(e.textFont.toLowerCase().indexOf("italic")>-1&&(i+=!0===l?s/3*(i/o):s/3));return{x:n,y:t,width:i,height:a}}getTextBackground(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var s=this.getRectNoRotation(e),i=e.x+r[0],a=e.y+r[1],n=[];if(e.textRotation&&0!==e.textRotation){let t=e.textRotation,r=this.getRotatedLocation(s.x,s.y,i,a,t),o=this.getRotatedLocation(s.x+s.width,s.y,i,a,t),l=this.getRotatedLocation(s.x+s.width,s.y+s.height,i,a,t),h=this.getRotatedLocation(s.x,s.y+s.height,i,a,t);n.push(r),n.push(o),n.push(l),n.push(h)}else{let e=[s.x,s.y],t=[s.x+s.width,s.y],r=[s.x+s.width,s.y+s.height],i=[s.x,s.y+s.height];n.push(e),n.push(t),n.push(r),n.push(i)}return e.__textBackground=n,e.__textBackground}getRotatedLocation(e,t,r,s,i){var a,n,o=new Array;return t=-t,s=-s,i=-i,a=(e-r)*Math.cos(i/180*Math.PI)-(t-s)*Math.sin(i/180*Math.PI)+r,n=(e-r)*Math.sin(i/180*Math.PI)+(t-s)*Math.cos(i/180*Math.PI)+s,o[0]=a,o[1]=-n,o}}
  /* Copyright© 2000 - 2019 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 Ka extends Ya{constructor(e){super(e),this.type="smiccircle",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicCircle"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,s=t.x+r[0],i=t.y+r[1];return e.moveTo(s+t.r,i),e.arc(s,i,t.r,0,2*Math.PI,!0),!0}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition,s=e.x+r[0],i=e.y+r[1],a=e.r;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(s-a-t/2),y:Math.round(i-a-t/2),width:2*a+t,height:2*a+t},e.__rect}}
  /* Copyright© 2000 - 2019 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 Za extends Ya{constructor(e){super(e),this.type="smicpolygon",this.holePolygonPointLists=null,this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicPolygon"}destroy(){this.type=null,this.holePolygonPointLists=null,super.destroy()}brush(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.style;t&&(r=this.getHighlightStyle(r,this.highlightStyle||{})),e.save(),this.setContext(e,r),this.setTransform(e);var s=!1;"fill"!=r.brushType&&"both"!=r.brushType&&void 0!==r.brushType||(e.beginPath(),"dashed"==r.lineType||"dotted"==r.lineType||"dot"==r.lineType||"dash"==r.lineType||"dashdot"==r.lineType||"longdash"==r.lineType||"longdashdot"==r.lineType?this.buildPath(e,{lineType:"solid",lineWidth:r.lineWidth,pointList:r.pointList}):(this.buildPath(e,r),s=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",r),e.fill(),this.setCtxGlobalAlpha(e,"reset",r)),r.lineWidth>0&&("stroke"==r.brushType||"both"==r.brushType)&&(s||(e.beginPath(),this.buildPath(e,r)),this.setCtxGlobalAlpha(e,"stroke",r),e.stroke(),this.setCtxGlobalAlpha(e,"reset",r)),this.drawText(e,r,this.style);var i=ye.cloneObject(r);if(i.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var a=this.holePolygonPointLists,n=a.length,o=0;o<n;o++){var l=a[o];i.pointList=l,e.globalCompositeOperation="destination-out",s=!1,"fill"!=i.brushType&&"both"!=i.brushType&&void 0!==i.brushType||(e.beginPath(),"dashed"==i.lineType||"dotted"==i.lineType||"dot"==i.lineType||"dash"==i.lineType||"dashdot"==i.lineType||"longdash"==i.lineType||"longdashdot"==i.lineType?this.buildPath(e,{lineType:"solid",lineWidth:i.lineWidth,pointList:i.pointList}):(this.buildPath(e,i),s=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",i),e.fill(),this.setCtxGlobalAlpha(e,"reset",i)),i.lineWidth>0&&("stroke"==i.brushType||"both"==i.brushType)?(s||(e.beginPath(),this.buildPath(e,i)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",i),e.stroke(),this.setCtxGlobalAlpha(e,"reset",i)):e.globalCompositeOperation="source-over"}e.restore()}buildPath(e,t){t.showShadow&&(e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY),this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,s=t.pointList;if(!(s.length<2))if(t.smooth&&"spline"!==t.smooth){var i,a,n,o=Wa.SUtil_smoothBezier(s,t.smooth,!0,t.smoothConstraint,r);e.moveTo(s[0][0]+r[0],s[0][1]+r[1]);for(var l=s.length,h=0;h<l;h++)i=o[2*h],a=o[2*h+1],n=[s[(h+1)%l][0]+r[0],s[(h+1)%l][1]+r[1]],e.bezierCurveTo(i[0],i[1],a[0],a[1],n[0],n[1])}else if("spline"===t.smooth&&(s=Wa.SUtil_smoothSpline(s,!0,null,r)),t.lineType&&"solid"!=t.lineType){if("dashed"===t.lineType||"dotted"===t.lineType||"dot"===t.lineType||"dash"===t.lineType||"longdash"===t.lineType){let i=t._dashLength||(t.lineWidth||1)*("dashed"==t.lineType?5:1);t._dashLength=i;let a=t.lineWidth||1,n=a,o=a;"dashed"===t.lineType&&(n*=5,o*=5,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"dotted"===t.lineType&&t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a),"dot"===t.lineType&&(o*=4,t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a)),"dash"===t.lineType&&(n*=4,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"longdash"===t.lineType&&(n*=8,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),e.moveTo(s[0][0]+r[0],s[0][1]+r[1]);for(let t=1;t<s.length;t++)Wa.SUtil_dashedLineTo(e,s[t-1][0]+r[0],s[t-1][1]+r[1],s[t][0]+r[0],s[t][1]+r[1],a,[n,o]);Wa.SUtil_dashedLineTo(e,s[s.length-1][0]+r[0],s[s.length-1][1]+r[1],s[0][0]+r[0],s[0][1]+r[1],a,[n,o])}else if("dashdot"===t.lineType||"longdashdot"===t.lineType){let i=t._dashLength||(t.lineWidth||1)*("dashed"==t.lineType?5:1);t._dashLength=i;let a=t.lineWidth||1,n=a,o=a,l=a,h=a;"dashdot"===t.lineType&&(n*=4,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),"longdashdot"===t.lineType&&(n*=8,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),e.moveTo(s[0][0]+r[0],s[0][1]+r[1]);for(let t=1;t<s.length;t++)Wa.SUtil_dashedLineTo(e,s[t-1][0]+r[0],s[t-1][1]+r[1],s[t][0]+r[0],s[t][1]+r[1],a,[n,o,l,h]);Wa.SUtil_dashedLineTo(e,s[s.length-1][0]+r[0],s[s.length-1][1]+r[1],s[0][0]+r[0],s[0][1]+r[1],a,[n,o,l,h])}}else{e.moveTo(s[0][0]+r[0],s[0][1]+r[1]);for(let t=1;t<s.length;t++)e.lineTo(s[t][0]+r[0],s[t][1]+r[1]);e.lineTo(s[0][0]+r[0],s[0][1]+r[1])}}getRect(e,t){var r;if(t?r=t:(this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),r=this.refOriginalPosition),e.__rect)return e.__rect;for(var s,i=Number.MAX_VALUE,a=Number.MIN_VALUE,n=Number.MAX_VALUE,o=Number.MIN_VALUE,l=e.pointList,h=0,u=l.length;h<u;h++)l[h][0]+r[0]<i&&(i=l[h][0]+r[0]),l[h][0]+r[0]>a&&(a=l[h][0]+r[0]),l[h][1]+r[1]<n&&(n=l[h][1]+r[1]),l[h][1]+r[1]>o&&(o=l[h][1]+r[1]);return s="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(i-s/2),y:Math.round(n-s/2),width:a-i+s,height:o-n+s},e.__rect}}
  /* Copyright© 2000 - 2019 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 $a extends Ya{constructor(e){super(e),this.brushTypeOnly="stroke",this.textPosition="end",this.type="smicbroken-line",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicBrokenLine"}destroy(){this.brushTypeOnly=null,this.textPosition=null,this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,s=t.pointList;if(!(s.length<2)){var i=Math.min(t.pointList.length,Math.round(t.pointListLength||t.pointList.length));if(t.smooth&&"spline"!==t.smooth){var a,n,o,l=Wa.SUtil_smoothBezier(s,t.smooth,!1,t.smoothConstraint,r);e.moveTo(s[0][0]+r[0],s[0][1]+r[1]);for(let t=0;t<i-1;t++)a=l[2*t],n=l[2*t+1],o=[s[t+1][0]+r[0],s[t+1][1]+r[1]],e.bezierCurveTo(a[0],a[1],n[0],n[1],o[0],o[1])}else if("spline"===t.smooth&&(i=(s=Wa.SUtil_smoothSpline(s,null,null,r)).length),t.lineType&&"solid"!==t.lineType){if("dashed"===t.lineType||"dotted"===t.lineType||"dot"===t.lineType||"dash"===t.lineType||"longdash"===t.lineType){let a=t.lineWidth||1,n=a,o=a;"dashed"===t.lineType&&(n*=5,o*=5,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"dotted"===t.lineType&&t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a),"dot"===t.lineType&&(o*=4,t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a)),"dash"===t.lineType&&(n*=4,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"longdash"===t.lineType&&(n*=8,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),e.moveTo(s[0][0]+r[0],s[0][1]+r[1]);for(var h=1;h<i;h++)Wa.SUtil_dashedLineTo(e,s[h-1][0]+r[0],s[h-1][1]+r[1],s[h][0]+r[0],s[h][1]+r[1],a,[n,o])}else if("dashdot"===t.lineType||"longdashdot"===t.lineType){let a=t.lineWidth||1,n=a,o=a,l=a,h=a;"dashdot"===t.lineType&&(n*=4,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),"longdashdot"===t.lineType&&(n*=8,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),a=(t.lineWidth||1)*("dashed"===t.lineType?5:1),e.moveTo(s[0][0]+r[0],s[0][1]+r[1]);for(let t=1;t<i;t++)Wa.SUtil_dashedLineTo(e,s[t-1][0]+r[0],s[t-1][1]+r[1],s[t][0]+r[0],s[t][1]+r[1],a,[n,o,l,h])}}else{e.moveTo(s[0][0]+r[0],s[0][1]+r[1]);for(let t=1;t<i;t++)e.lineTo(s[t][0]+r[0],s[t][1]+r[1])}}}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition;return Za.prototype.getRect.apply(this,[e,t])}}
  /* Copyright© 2000 - 2019 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 en extends Ya{constructor(e){super(e),this.type="smicimage",this._imageCache={},this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicImage"}destroy(){this.type=null,this._imageCache=null,super.destroy()}brush(e,t,r){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,i=this.style||{};t&&(i=this.getHighlightStyle(i,this.highlightStyle||{}));var a=i.image,n=this;if("string"==typeof a){var o=a;this._imageCache[o]?a=this._imageCache[o]:((a=new Image).onload=function(){a.onload=null,clearTimeout(en._refreshTimeout),en._needsRefresh.push(n),en._refreshTimeout=setTimeout(function(){r&&r(en._needsRefresh),en._needsRefresh=[]},10)},a.src=o,this._imageCache[o]=a)}if(a){if("IMG"==a.nodeName.toUpperCase())if(window.ActiveXObject){if("complete"!=a.readyState)return}else if(!a.complete)return;var l=i.width||a.width,h=i.height||a.height,u=i.x+s[0],c=i.y+s[1];if(!a.width||!a.height)return;if(e.save(),this.doClip(e),this.setContext(e,i),this.setTransform(e),i.sWidth&&i.sHeight){let t=i.sx+s[0]||0,r=i.sy+s[1]||0;e.drawImage(a,t,r,i.sWidth,i.sHeight,u,c,l,h)}else if(i.sx&&i.sy){let t=i.sx+s[0],r=i.sy+s[1];var d=l-t,p=h-r;e.drawImage(a,t,r,d,p,u,c,l,h)}else e.drawImage(a,u,c,l,h);i.width||(i.width=l),i.height||(i.height=h),this.style.width||(this.style.width=l),this.style.height||(this.style.height=h),this.drawText(e,i,this.style),e.restore()}}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition;return{x:e.x+t[0],y:e.y+t[1],width:e.width,height:e.height}}clearCache(){this._imageCache={}}}en._needsRefresh=[],en._refreshTimeout=null;
  /* Copyright© 2000 - 2019 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 tn extends Ya{constructor(e){super(e),this.type="smicrectangle",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicRectangle"}destroy(){this.type=null,super.destroy()}_buildRadiusPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r,s,i,a,n,o=this.refOriginalPosition,l=t.x+o[0],h=t.y+o[1],u=t.width,c=t.height,d=t.radius;"number"==typeof d?r=s=i=a=d:d instanceof Array?1===d.length?r=s=i=a=d[0]:2===d.length?(r=i=d[0],s=a=d[1]):3===d.length?(r=d[0],s=a=d[1],i=d[2]):(r=d[0],s=d[1],i=d[2],a=d[3]):r=s=i=a=0,r+s>u&&(r*=u/(n=r+s),s*=u/n),i+a>u&&(i*=u/(n=i+a),a*=u/n),s+i>c&&(s*=c/(n=s+i),i*=c/n),r+a>c&&(r*=c/(n=r+a),a*=c/n),e.moveTo(l+r,h),e.lineTo(l+u-s,h),0!==s&&e.quadraticCurveTo(l+u,h,l+u,h+s),e.lineTo(l+u,h+c-i),0!==i&&e.quadraticCurveTo(l+u,h+c,l+u-i,h+c),e.lineTo(l+a,h+c),0!==a&&e.quadraticCurveTo(l,h+c,l,h+c-a),e.lineTo(l,h+r),0!==r&&e.quadraticCurveTo(l,h,l+r,h)}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+r[0],t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1])),e.closePath()}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+r[0]-t/2),y:Math.round(e.y+r[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}}
  /* Copyright© 2000 - 2019 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 rn extends Ya{constructor(e){super(e),this.type="smicsector",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicSector"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,s=t.x+r[0],i=t.y+r[1],a=t.r0||0,n=t.r,o=t.startAngle,l=t.endAngle,h=t.clockWise||!1;o=Wa.Util_math.degreeToRadian(o),l=Wa.Util_math.degreeToRadian(l),h||(o=-o,l=-l);var u=Wa.Util_math.cos(o),c=Wa.Util_math.sin(o);e.moveTo(u*a+s,c*a+i),e.lineTo(u*n+s,c*n+i),e.arc(s,i,n,o,l,!h),e.lineTo(Wa.Util_math.cos(l)*a+s,Wa.Util_math.sin(l)*a+i),0!==a&&e.arc(s,i,a,l,o,h),e.closePath()}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition,r=Wa.Util_vector.create(),s=Wa.Util_vector.create(),i=Wa.Util_vector.create(),a=Wa.Util_vector.create(),n=e.x+t[0],o=e.y+t[1],l=e.r0||0,h=e.r,u=Wa.Util_math.degreeToRadian(e.startAngle),c=Wa.Util_math.degreeToRadian(e.endAngle),d=e.clockWise;return d||(u=-u,c=-c),l>1?Wa.Util_computeBoundingBox.arc(n,o,l,u,c,!d,r,i):(r[0]=i[0]=n,r[1]=i[1]=o),Wa.Util_computeBoundingBox.arc(n,o,h,u,c,!d,s,a),Wa.Util_vector.min(r,r,s),Wa.Util_vector.max(i,i,a),e.__rect={x:r[0],y:r[1],width:i[0]-r[0],height:i[1]-r[1]},e.__rect}}
  /* Copyright© 2000 - 2019 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 sn{constructor(e){this.shapeParameters=e,this.CLASS_NAME="SuperMap.Feature.ShapeFactory"}destroy(){this.shapeParameters=null}createShape(e){if(e&&(this.shapeParameters=e),!this.shapeParameters)return null;var t=this.shapeParameters;if(t instanceof Fa){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e=ye.copyAttributesWithClip(e,t.style,["x","y"]);let r=new Qa;return r.style=sn.transformStyle(e),r.highlightStyle=sn.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(r,t,["x","y","style","highlightStyle"]),r}if(t instanceof Ra){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=ye.copyAttributesWithClip(e,t.style,["pointList"]);let r=new $a;return r.style=sn.transformStyle(e),r.highlightStyle=sn.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(r,t,["pointList","style","highlightStyle"]),r}if(t instanceof Da){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=ye.copyAttributesWithClip(e,t.style,["pointList"]);let r=new Za;return r.style=sn.transformStyle(e),r.highlightStyle=sn.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(r,t,["pointList","style","highlightStyle"]),r}if(t instanceof ka){if(!t.x&&!t.y&!t.width&!t.height)return null;let e=new Object;e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e=ye.copyAttributesWithClip(e,t.style,["x","y","width","height"]);let r=new tn;return r.style=sn.transformStyle(e),r.highlightStyle=sn.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(r,t,["x","y","width","height","style","highlightStyle"]),r}if(t instanceof Ba){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e.startAngle=t.startAngle,e.endAngle=t.endAngle,t.r0&&(e.r0=t.r0),t.clockWise&&(e.clockWise=t.clockWise),e=ye.copyAttributesWithClip(e,t.style,["x","y","r","startAngle","endAngle","r0","endAngle"]);let r=new rn;return r.style=sn.transformStyle(e),r.highlightStyle=sn.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(r,t,["x","y","r","startAngle","endAngle","r0","endAngle","style","highlightStyle"]),r}if(t instanceof Ga){let e=new Object;e.x=t.x,e.y=t.y,e.text=t.text,e=ye.copyAttributesWithClip(e,t.style,["x","y","text"]);let r=new Xa;return r.style=sn.transformStyle(e),r.highlightStyle=sn.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(r,t,["x","y","text","style","highlightStyle"]),r}if(t instanceof Ua){let e=new Object;e.x=t.x,e.y=t.y,t.image&&(e.image=t.image),t.width&&(e.width=t.width),t.height&&(e.height=t.height),t.sx&&(e.sx=t.sx),t.sy&&(e.sy=t.sy),t.sWidth&&(e.sWidth=t.sWidth),t.sHeight&&(e.sHeight=t.sHeight),e=ye.copyAttributesWithClip(e,t.style,["x","y","image","width","height","sx","sy","sWidth","sHeight"]);let r=new en;return r.style=sn.transformStyle(e),r.highlightStyle=sn.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(r,t,["x","y","image","width","height","style","highlightStyle"]),r}if(t instanceof ja){let e=new Object;e.x=t.x,e.r=t.r,e.y=t.y,e=ye.copyAttributesWithClip(e,t.style,["x","y","r"]);let r=new Ka;return r.style=sn.transformStyle(e),r.highlightStyle=sn.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(r,t,["x","y","r","style","highlightStyle","lineWidth","text","textPosition"]),r}return null}static transformStyle(e){var t={},r=["normal","normal","normal","12","arial,sans-serif"],s=[!0,!1];for(var i in e)switch(i){case"fill":s[0]=e[i];break;case"fillColor":t.color=e[i];break;case"stroke":s[1]=e[i];break;case"strokeWidth":t.lineWidth=e[i];break;case"strokeLinecap":t.lineCap=e[i];break;case"strokeLineJoin":t.lineJoin=e[i];break;case"strokeDashstyle":t.lineType=e[i];break;case"pointRadius":t.r=e[i];break;case"label":t.text=e[i];break;case"labelRect":t.labelRect=e[i];break;case"fontColor":t.textColor=e[i];break;case"fontStyle":r[0]=e[i];break;case"fontVariant":r[1]=e[i];break;case"fontWeight":r[2]=e[i];break;case"fontSize":var a="";e[i]&&e[i].toString().indexOf("px")<0&&(a="px"),r[3]=e[i]+a;break;case"fontFamily":r[4]=e[i];break;case"fontOpacity":t.opacity=e[i];break;case"labelPosition":t.textPosition=e[i];break;case"labelAlign":t.textAlign=e[i];break;case"labelBaseline":t.textBaseline=e[i];break;case"labelRotation":t.textRotation=e[i];break;default:t[i]=e[i]}return t.textFont=r.join(" "),!0===s[0]&&!1===s[1]?t.brushType="fill":!1===s[0]&&!0===s[1]?t.brushType="stroke":!0===s[0]&&!0===s[1]?t.brushType="both":t.brushType="fill",null==t.lineWidth&&(t.lineWidth=1),t}static Background(e,t,r){var s=r||{},i=new ka(t[0],t[3],Math.abs(t[2]-t[0]),Math.abs(t[3]-t[1]));return i.style={fillColor:"#f3f3f3"},s.backgroundStyle&&ye.copyAttributesWithClip(i.style,s.backgroundStyle),s.backgroundRadius&&(i.style.radius=s.backgroundRadius),i.clickable=!1,i.hoverable=!1,e.createShape(i)}static GraphAxis(e,t,r,s){var i=t,a=r||{},n=[],o=[],l=!!a.useXReferenceLine&&a.useXReferenceLine,h=a.axisYTick&&!isNaN(a.axisYTick)?a.axisYTick:0,u=[],c=[];if(0==h){if(c.push([i[0],i[3]-5]),c.push([i[0],i[1]]),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){let e=parseInt(a.axis3DParameter),t=[i[0]-e,i[1]+e];a.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([i[0],i[1]])}c.push([i[2]+5,i[1]])}else{var d=Math.abs(i[1]-i[3])/h,p=i[3];c.push([i[0],p-5]);for(var m=0;m<h;m++){if(c.push([i[0],p]),c.push([i[0]-5,p]),c.push([i[0],p]),l){var f=new Ra([[i[0],p],[i[2],p]]);f.style={strokeColor:"#cfcfcf",strokeLinecap:"butt",strokeLineJoin:"round",strokeWidth:1},f.clickable=!1,f.hoverable=!1,a.xReferenceLineStyle&&ye.copyAttributesWithClip(f.style,a.xReferenceLineStyle),n.push(e.createShape(f))}p+=d}if(c.push([i[0],i[1]]),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){let e=parseInt(a.axis3DParameter),t=[i[0]-e,i[1]+e];a.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([i[0],i[1]])}c.push([i[2]+5,i[1]])}if(a.axisUseArrow){var y=[[i[2]+5,i[1]+4],[i[2]+13,i[1]],[i[2]+5,i[1]-4]],g=[[i[0]-4,i[3]-5],[i[0],i[3]-13],[i[0]+4,i[3]-5]],v=new Da(y);v.style={fillColor:"#008acd"},ye.copyAttributesWithClip(v.style,a.axisStyle),o.push(e.createShape(v));var S=new Da(g);if(S.style={fillColor:"#008acd"},ye.copyAttributesWithClip(S.style,a.axisStyle),o.push(e.createShape(S)),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){var b=new Da(u);b.style={fillColor:"#008acd"},ye.copyAttributesWithClip(b.style,a.axisStyle),o.push(e.createShape(b))}}var x=new Ra(c);x.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},a.axisStyle&&ye.copyAttributesWithClip(x.style,a.axisStyle),x.clickable=!1,x.hoverable=!1;var C=[e.createShape(x)],_=[];if(a.axisYLabels&&a.axisYLabels.length&&a.axisYLabels.length>0){var T=a.axisYLabels;let t=T.length;var E=[0,0];if(a.axisYLabelsOffset&&a.axisYLabelsOffset.length&&(E=a.axisYLabelsOffset),1==t){let t=new Ga(i[0]-5+E[0],i[3]+E[1],T[0]);t.style={labelAlign:"right"},a.axisYLabelsStyle&&ye.copyAttributesWithClip(t.style,a.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,_.push(e.createShape(t))}else for(var w=i[3],A=Math.abs(i[1]-i[3])/(t-1),L=0;L<t;L++){let t=new Ga(i[0]-5+E[0],w+E[1],T[L]);t.style={labelAlign:"right"},a.axisYLabelsStyle&&ye.copyAttributesWithClip(t.style,a.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,_.push(e.createShape(t)),w+=A}}var P=[];if(a.axisXLabels&&a.axisXLabels.length&&a.axisXLabels.length>0){let t=a.axisXLabels,r=t.length,n=[0,0];if(a.axisXLabelsOffset&&a.axisXLabelsOffset.length&&(n=a.axisXLabelsOffset),s&&s.xPositions&&s.xPositions.length&&s.xPositions.length==r){let o=s.xPositions;for(let s=0;s<r;s++){let r=new Ga(o[s]+n[0],i[1]+n[1],t[s]);r.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&ye.copyAttributesWithClip(r.style,a.axisXLabelsStyle),r.clickable=!1,r.hoverable=!1,P.push(e.createShape(r))}}else if(1==r){let r=new Ga(i[0]-5+n[0],i[1]+n[0],t[0]);r.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&ye.copyAttributesWithClip(r.style,a.axisXLabelsStyle),r.clickable=!1,r.hoverable=!1,P.push(e.createShape(r))}else{let s=i[0],o=Math.abs(i[2]-i[0])/(r-1);for(let l=0;l<r;l++){let r=new Ga(s+n[0],i[1]+n[1],t[l]);r.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&ye.copyAttributesWithClip(r.style,a.axisXLabelsStyle),r.clickable=!1,r.hoverable=!1,P.push(e.createShape(r)),s+=o}}}return n.concat(C).concat(_).concat(P).concat(o)}static ShapeStyleTool(e,t,r,s,i,a){var n=e||{};if(t&&ye.copyAttributesWithClip(n,t),r&&r.length&&void 0!==i&&!isNaN(i)&&i>=0&&r[i]&&ye.copyAttributesWithClip(n,r[i]),s&&s.length&&void 0!==a)for(var o=s,l=o.length,h=parseFloat(a),u=0;u<l;u++)if(o[u].start<=h&&h<o[u].end){ye.copyAttributesWithClip(n,o[u].style);break}return n}}s.Feature=s.Feature||{},s.Feature.ShapeFactory=sn;
  /* Copyright© 2000 - 2019 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 an{constructor(e,t){e&&t&&t.map&&t.renderer&&(this.id=ye.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=null,this.location=[],this.data=e,this.shapes=[],this.layer=t,this.CLASS_NAME="SuperMap.Feature.Theme")}destroy(){this.data=null,this.id=null,this.lonlat=null,this.location=null,this.shapes=null,this.layer=null}getLocalXY(e){var t=this.layer.map.getResolution(),r=this.layer.map.getExtent();if(e instanceof _e||e instanceof Ee){return[e.x/t+-r.left/t,r.top/t-e.y/t]}if(e instanceof ge){return[e.lon/t+-r.left/t,r.top/t-e.lat/t]}return null}}s.Feature=s.Feature||{},s.Feature.Theme=an;
  /* Copyright© 2000 - 2019 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 nn extends an{constructor(e,t,r,s,i,a){super(e,t,r,s,i,a),this.shapeFactory=new sn,this.shapeParameters=null,this.RelativeCoordinate=!1,this.setting=null,this.origonPoint=null,this.chartBox=null,this.chartBounds=null,this.width=null,this.height=null,this.XOffset=0,this.YOffset=0,this.DVBParameter=null,this.dataViewBox=null,this.DVBCodomain=null,this.DVBCenterPoint=null,this.DVBUnitValue=null,this.DVBOrigonPoint=null,this.DVBWidth=null,this.DVBHeight=null,this.origonPointOffset=null,this.fields=r||[],this.dataValues=null,this.lonlat=i||this.data.geometry.getBounds().getCenterLonLat(),s&&s.width&&s.height&&s.codomain&&(this.setting=s),this.CLASS_NAME="SuperMap.Feature.Theme.Graph"}destroy(){this.shapeFactory=null,this.shapeParameters=null,this.width=null,this.height=null,this.origonPoint=null,this.chartBox=null,this.dataViewBox=null,this.chartBounds=null,this.DVBParameter=null,this.DVBOrigonPoint=null,this.DVBCenterPoint=null,this.DVBWidth=null,this.DVBHeight=null,this.DVBCodomain=null,this.DVBUnitValue=null,this.origonPointOffset=null,this.XOffset=null,this.YOffset=null,this.fields=null,this.dataValues=null,this.setting=null,super.destroy()}initBaseParameter(){if(!this.setting)return!1;var e=this.setting;if(!(e.width&&e.height&&e.codomain))return!1;var t=void 0===e.decimalNumber||isNaN(e.decimalNumber)?-1:e.decimalNumber,r=an.getDataValues(this.data,this.fields,t);this.dataValues=r||[],this.width=parseFloat(e.width),this.height=parseFloat(e.height),this.DVBCodomain=e.codomain,this.XOffset=e.XOffset?e.XOffset:0,this.YOffset=e.YOffset?e.YOffset:0,this.origonPoint=[],this.chartBox=[],this.dataViewBox=[],this.DVBParameter=e.dataViewBoxParameter?e.dataViewBoxParameter:[0,0,0,0],this.DVBOrigonPoint=[],this.DVBCenterPoint=[],this.origonPointOffset=[],this.resetLocation();var s=this.width,i=this.height,a=this.location;this.origonPoint=[a[0]-s/2,a[1]-i/2];var n=this.origonPoint;this.chartBox=[n[0],n[1]+i,n[0]+s,n[1]];var o=this.chartBox,l=this.DVBParameter;this.dataViewBox=[o[0]+l[0],o[1]-l[1],o[2]-l[2],o[3]+l[3]];var h=this.dataViewBox;return!(h[0]>=h[2]||h[1]<=h[3])&&(this.DVBOrigonPoint=[h[0],h[3]],this.DVBWidth=Math.abs(h[2]-h[0]),this.DVBHeight=Math.abs(h[1]-h[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-n[0],this.DVBOrigonPoint[1]-n[1]],!0)}resetLocation(e){e&&(this.lonlat=e);var t=this.getLocalXY(this.lonlat);t[0]+=this.XOffset,t[1]+=this.YOffset,this.location=t;var r=this.width,s=this.height,i=this.location;return this.chartBounds=new ve(i[0]-r/2,i[1]+s/2,i[0]+r/2,i[1]-s/2),this.resetLinearGradient(),i}resetLinearGradient(){}shapesConvertToRelativeCoordinate(){for(var e=this.shapes,t=this.location,r=0,s=e.length;r<s;r++){e[r].refOriginalPosition=t;var i=e[r].style;for(var a in i)switch(a){case"pointList":for(var n=i[a],o=0,l=n.length;o<l;o++)n[o][0]-=t[0],n[o][1]-=t[1];break;case"x":i[a]-=t[0];break;case"y":i[a]-=t[1]}}this.RelativeCoordinate=!0}assembleShapes(){}getLocalXY(e){return this.layer.getLocalXY(e)}}an.getDataValues=function(e,t,r){if(!e.attributes)return!1;for(var s=[],i=e.attributes,a=0;a<t.length;a++)for(var n in i)if(n===t[a])try{!isNaN(r)&&r>=0?s.push(parseFloat(i[n].toString()).toFixed(r)):s.push(parseFloat(i[n].toString()))}catch(e){throw new Error("not a number")}return s.length===t.length&&s},s.Feature.Theme.Graph=nn;s.Feature.Theme.Bar=
  /* Copyright© 2000 - 2019 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 extends nn{constructor(e,t,r,s,i){super(e,t,r,s,i),this.CLASS_NAME="SuperMap.Feature.Theme.Bar"}destroy(){super.destroy()}assembleShapes(){var e={showShadow:!0,shadowBlur:8,shadowColor:"rgba(100,100,100,0.8)",shadowOffsetX:2,shadowOffsetY:2},t=this.setting;if(t.barLinearGradient||(t.barLinearGradient=[["#00FF00","#00CD00"],["#00CCFF","#5E87A2"],["#00FF66","#669985"],["#CCFF00","#94A25E"],["#FF9900","#A2945E"]]),t.dataViewBoxParameter||(void 0===t.useAxis||t.useAxis?t.dataViewBoxParameter=[45,15,15,15]:t.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var r=this.DVBCodomain;this.DVBUnitValue=(r[1]-r[0])/this.DVBHeight;var s=this.dataViewBox,i=this.dataValues;if(!(i.length<1)){for(let e=0,t=i.length;e<t;e++)if(i[e]<r[0]||i[e]>r[1])return;var a=this.calculateXShapeInfo();if(a){var n=a.xPositions,o=a.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(sn.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(sn.GraphAxis(this.shapeFactory,s,t,a)));for(var l=0;l<i.length;l++){var h=s[1]-(i[l]-r[0])/this.DVBUnitValue,u=[[n[l]-o/2,s[1]-1],[n[l]+o/2,s[1]-1],[n[l]+o/2,h],[n[l]-o/2,h]],c=new Da(u);if(void 0===t.showShadow||t.showShadow){if(t.barShadowStyle){var d=t.barShadowStyle;d.shadowBlur&&(e.shadowBlur=d.shadowBlur),d.shadowColor&&(e.shadowColor=d.shadowColor),d.shadowOffsetX&&(e.shadowOffsetX=d.shadowOffsetX),d.shadowOffsetY&&(e.shadowOffsetY=d.shadowOffsetY)}c.style={},ye.copyAttributesWithClip(c.style,e)}c.refDataID=this.data.id,c.dataInfo={field:this.fields[l],value:i[l]},void 0!==t.barHoverAble&&(c.hoverable=t.barHoverAble),void 0!==t.barClickAble&&(c.clickable=t.barClickAble),this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,r=this.setting,s=this.dataValues.length;if(s<1)return null;var i=[],a=0,n=this.DVBWidth;if(r.xShapeBlank&&r.xShapeBlank.length&&3==r.xShapeBlank.length){var o=n-((e=r.xShapeBlank)[0]+e[2]+(s-1)*e[1]);if(o<=s)return null;a=o/s}else e=[a=n/(2*s+1),a,a];for(var l=0,h=0;h<s;h++)0==h?l=e[0]+a/2:l+=a+e[1],i.push(t[0]+l);return{xPositions:i,width:a}}resetLinearGradient(){if(this.RelativeCoordinate)for(var e=this.shapes.length,t=this.setting.barLinearGradient,r=-1,s=0;s<e;s++){var i=this.shapes[s];if("SuperMap.LevelRenderer.Shape.SmicPolygon"===i.CLASS_NAME){var a=i.style,n=this.location[0]+a.pointList[0][0],o=this.location[0]+a.pointList[1][0];++r>=t.length&&(r%=t.length);var l=t[r][0],h=t[r][1],u=(new wa).getLinearGradient(n,0,o,0,[[0,l],[1,h]]);i.style.color=u}}}};s.Feature.Theme.Bar3D=
  /* Copyright© 2000 - 2019 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 extends nn{constructor(e,t,r,s,i){super(e,t,r,s,i),this.CLASS_NAME="SuperMap.Feature.Theme.Bar3D"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,25,20,20]:e.dataViewBoxParameter=[5,5,5,5]),e.axisUseArrow=void 0===e.axisUseArrow||e.axisUseArrow,e.axisXLabelsOffset=void 0!==e.axisXLabelsOffset?e.axisXLabelsOffset:[-10,10],this.initBaseParameter()){var t=this.DVBCodomain;this.DVBUnitValue=(t[1]-t[0])/this.DVBHeight;var r=this.dataViewBox,s=this.dataValues;if(!(s.length<1)){for(let e=0,r=s.length;e<r;e++)if(s[e]<t[0]||s[e]>t[1])return;var i=this.calculateXShapeInfo();if(i){var a=i.xPositions,n=i.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(sn.Background(this.shapeFactory,this.chartBox,e)),(!e.axis3DParameter||isNaN(e.axis3DParameter)||e.axis3DParameter<15)&&(e.axis3DParameter=20),(void 0===e.useAxis||e.useAxis)&&(this.shapes=this.shapes.concat(sn.GraphAxis(this.shapeFactory,r,e,i)));var o=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10;for(let i=0;i<s.length;i++){var l=r[1]-(s[i]-t[0])/this.DVBUnitValue,h=a[i]-n/2,u=a[i]+n/2,c=[[h,l],[u,l],[u-o,l+o],[h-o,l+o]],d=[[u,l],[u-o,l+o],[u-o,r[1]+o],[u,r[1]]],p=[[h-o,r[1]+o],[u-o,r[1]+o],[u-o,l+o],[h-o,l+o]];o<=0&&(p=[[h,r[1]],[u,r[1]],[u,l],[h,l]]);var m=new Da(c),f=new Da(d),y=new Da(p);e.barSideStyle=e.barSideStyle?e.barSideStyle:e.barFaceStyle,e.barSideStyleByFields=e.barSideStyleByFields?e.barSideStyleByFields:e.barFaceStyleByFields,e.barSideStyleByCodomain=e.barSideStyleByCodomain?e.barSideStyleByCodomain:e.barFaceStyleByCodomain,e.barTopStyle=e.barTopStyle?e.barTopStyle:e.barFaceStyle,e.barTopStyleByFields=e.barTopStyleByFields?e.barTopStyleByFields:e.barFaceStyleByFields,e.barTopStyleByCodomain=e.barTopStyleByCodomain?e.barTopStyleByCodomain:e.barFaceStyleByCodomain,y.style=sn.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barFaceStyle,e.barFaceStyleByFields,e.barFaceStyleByCodomain,i,s[i]),f.style=sn.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barSideStyle,e.barSideStyleByFields,e.barSideStyleByCodomain,i,s[i]),m.style=sn.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barTopStyle,e.barTopStyleByFields,e.barTopStyleByCodomain,i,s[i]),e.barSideHoverStyle=e.barSideHoverStyle?e.barSideHoverStyle:e.barFaceHoverStyle,e.barTopHoverStyle=e.barTopHoverStyle?e.barTopHoverStyle:e.barFaceHoverStyle,y.highlightStyle=sn.ShapeStyleTool({stroke:!0},e.barFaceHoverStyle),f.highlightStyle=sn.ShapeStyleTool({stroke:!0},e.barSideHoverStyle),m.highlightStyle=sn.ShapeStyleTool({stroke:!0},e.barTopHoverStyle),m.refDataID=f.refDataID=y.refDataID=this.data.id,m.isHoverByRefDataID=f.isHoverByRefDataID=y.isHoverByRefDataID=!0,m.refDataHoverGroup=f.refDataHoverGroup=y.refDataHoverGroup=ye.createUniqueID("lr_shg"),m.dataInfo=f.dataInfo=y.dataInfo={field:this.fields[i],value:s[i]},void 0!==e.barHoverAble&&(m.hoverable=f.hoverable=y.hoverable=e.barHoverAble),void 0!==e.barClickAble&&(m.clickable=f.clickable=y.clickable=e.barClickAble),this.shapes.push(this.shapeFactory.createShape(f)),this.shapes.push(this.shapeFactory.createShape(m)),this.shapes.push(this.shapeFactory.createShape(y))}this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,r=this.setting,s=this.dataValues.length;if(s<1)return null;var i=[],a=0,n=this.DVBWidth;if(r.xShapeBlank&&r.xShapeBlank.length&&3==r.xShapeBlank.length){var o=n-((e=r.xShapeBlank)[0]+e[2]+(s-1)*e[1]);if(o<=s)return null;a=o/s}else e=[a=n/(2*s+1),a,a];for(var l=0,h=0;h<s;h++)0==h?l=e[0]+a/2:l+=a+e[1],i.push(t[0]+l);return{xPositions:i,width:a}}};
  /* Copyright© 2000 - 2019 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 on extends nn{constructor(e,t,r,s,i,a){super(e,t,r,s,i,a),this.setting=null,s&&s.codomain&&(this.setting=s,this.DVBCodomain=this.setting.codomain),this.CLASS_NAME="SuperMap.Feature.Theme.RankSymbol"}destroy(){this.setting=null,super.destroy()}initBaseParameter(){if(!this.setting)return!1;var e=this.setting;e.XOffset&&(this.XOffset=e.XOffset),e.YOffset&&(this.YOffset=e.YOffset),this.XOffset=e.XOffset?e.XOffset:0,this.YOffset=e.YOffset?e.YOffset:0,this.origonPoint=[],this.chartBox=[],this.dataViewBox=[],this.DVBParameter=e.dataViewBoxParameter?e.dataViewBoxParameter:[0,0,0,0],this.DVBOrigonPoint=[],this.DVBCenterPoint=[],this.origonPointOffset=[],this.resetLocation();var t=this.width,r=this.height,s=this.location;this.origonPoint=[s[0]-t/2,s[1]-r/2];var i=this.origonPoint;this.chartBox=[i[0],i[1]+r,i[0]+t,i[1]];var a=this.chartBox,n=this.DVBParameter;this.dataViewBox=[a[0]+n[0],a[1]-n[1],a[2]-n[2],a[3]+n[3]];var o=this.dataViewBox;return!(o[0]>=o[2]||o[1]<=o[3])&&(this.DVBOrigonPoint=[o[0],o[3]],this.DVBWidth=Math.abs(o[2]-o[0]),this.DVBHeight=Math.abs(o[1]-o[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-i[0],this.DVBOrigonPoint[1]-i[1]],!0)}}s.Feature.Theme.RankSymbol=on;s.Feature.Theme.Circle=
  /* Copyright© 2000 - 2019 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 extends on{constructor(e,t,r,s,i){super(e,t,r,s,i),this.CLASS_NAME="SuperMap.Feature.Theme.Circle"}destroy(){super.destroy()}assembleShapes(){if(!this.setting)return!1;var e=this.setting;if(!e.codomain)return!1;var t=void 0===e.decimalNumber||isNaN(e.decimalNumber)?-1:e.decimalNumber,r=an.getDataValues(this.data,this.fields,t);this.dataValues=r||[];var s=this.dataValues;e.maxR||(e.maxR=100),e.minR||(e.minR=0);var i=this.DVBCodomain;i&&i[1]-i[0]>0?this.DVBUnitValue=e.maxR/(i[1]-i[0]):this.DVBUnitValue=e.maxR;var a=this.DVBUnitValue,n=s[0]*a+e.minR;if(this.width=2*n,this.height=2*n,this.initBaseParameter()&&(!i||!(s[0]<i[0]||s[0]>i[1]))){var o=this.DVBCenterPoint,l=new ja(o[0],o[1],n);l.style=sn.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=sn.ShapeStyleTool(null,e.circleHoverStyle),void 0!==e.circleHoverAble&&(l.hoverable=e.circleHoverAble),void 0!==e.circleClickAble&&(l.clickable=e.circleClickAble),l.refDataID=this.data.id,l.dataInfo={field:this.fields[0],r:n,value:s[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}};s.Feature.Theme.Line=
  /* Copyright© 2000 - 2019 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 extends nn{constructor(e,t,r,s,i,a){super(e,t,r,s,i,a),this.CLASS_NAME="SuperMap.Feature.Theme.Line"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,r=this.DVBCodomain;this.DVBUnitValue=(r[1]-r[0])/this.DVBHeight;var s=this.DVBUnitValue,i=this.dataValues;if(!(i.length<1)){var a=this.calculateXShapeInfo();if(a){var n,o,l=a.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(sn.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(sn.GraphAxis(this.shapeFactory,t,e,a));for(var h=[],u=[],c=0,d=i.length;c<d;c++){if(i[c]<r[0]||i[c]>r[1])return null;n=l[c],o=t[1]-(i[c]-r[0])/s;var p=new Fa(n,o);p.style=sn.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,c,i[c]),p.highlightStyle=sn.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(p.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(p.clickable=e.pointClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[c],value:i[c]},u.push(this.shapeFactory.createShape(p));var m=[n,o];h.push(m)}var f=new Ra(h);f.style=sn.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),f.clickable=!1,f.hoverable=!1;var y=this.shapeFactory.createShape(f);this.shapes.push(y),this.shapes=this.shapes.concat(u),this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,r=this.setting,s=this.dataValues.length;if(s<1)return null;var i=[],a=this.DVBWidth,n=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var o=a-((e=r.xShapeBlank)[0]+e[1]);if(o<=s)return null;n=o/(s-1)}else e=[n=a/(s+1),n,n];for(var l=0,h=0;h<s;h++)0==h?l=e[0]:l+=n,i.push(t[0]+l);return{xPositions:i,width:0}}};s.Feature.Theme.Pie=
  /* Copyright© 2000 - 2019 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 extends nn{constructor(e,t,r,s,i){super(e,t,r,s,i),this.CLASS_NAME="SuperMap.Feature.Theme.Pie"}destroy(){super.destroy()}assembleShapes(){var e=this.setting,t=[{fillColor:"#ff9277"},{fillColor:"#dddd00"},{fillColor:"#ffc877"},{fillColor:"#bbe3ff"},{fillColor:"#d5ffbb"},{fillColor:"#bbbbff"},{fillColor:"#ddb000"},{fillColor:"#b0dd00"},{fillColor:"#e2bbff"},{fillColor:"#ffbbe3"},{fillColor:"#ff7777"},{fillColor:"#ff9900"},{fillColor:"#83dd00"},{fillColor:"#77e3ff"},{fillColor:"#778fff"},{fillColor:"#c877ff"},{fillColor:"#ff77ab"},{fillColor:"#ff6600"},{fillColor:"#aa8800"},{fillColor:"#77c7ff"},{fillColor:"#ad77ff"},{fillColor:"#ff77ff"},{fillColor:"#dd0083"},{fillColor:"#777700"},{fillColor:"#00aa00"},{fillColor:"#0088aa"},{fillColor:"#8400dd"},{fillColor:"#aa0088"},{fillColor:"#dd0000"},{fillColor:"#772e00"}];if(this.initBaseParameter()){e.useBackground&&this.shapes.push(sn.Background(this.shapeFactory,this.chartBox,e));var r=this.dataValues;if(!(r.length<1)){var s=this.DVBCodomain;for(let e=0;e<r.length;e++)if(r[e]<s[0]||r[e]>s[1])return;var i=0;for(let e=0;e<r.length;e++)i+=Math.abs(r[e]);this.DVBUnitValue=360/i;for(var a=this.DVBUnitValue,n=this.DVBCenterPoint,o=0,l=0,h=o,u=this.DVBHeight<this.DVBWidth?this.DVBHeight/2:this.DVBWidth/2,c=0;c<r.length;c++){var d=Math.abs(r[c]);(l=0===c?o+d*a:c===d.length-1?h:o+d*a)-o>=360&&(l=359.9999999);var p=new Ba(n[0],n[1],u,o,l);if(void 0===e.sectorStyleByFields){var m=c%t.length;p.style=sn.ShapeStyleTool(null,e.sectorStyle,t,null,m)}else p.style=sn.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,c,r[c]);p.highlightStyle=sn.ShapeStyleTool(null,e.sectorHoverStyle),void 0!==e.sectorHoverAble&&(p.hoverable=e.sectorHoverAble),void 0!==e.sectorClickAble&&(p.clickable=e.sectorClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[c],value:r[c]},this.shapes.push(this.shapeFactory.createShape(p)),o=l}this.shapesConvertToRelativeCoordinate()}}}};s.Feature.Theme.Point=
  /* Copyright© 2000 - 2019 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 extends nn{constructor(e,t,r,s,i,a){super(e,t,r,s,i,a),this.CLASS_NAME="SuperMap.Feature.Theme.Point"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,r=this.DVBCodomain;this.DVBUnitValue=(r[1]-r[0])/this.DVBHeight;var s=this.DVBUnitValue,i=this.dataValues,a=this.calculateXShapeInfo();if(a){var n,o,l=a.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(sn.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(sn.GraphAxis(this.shapeFactory,t,e,a));for(var h=0,u=i.length;h<u;h++){if(i[h]<r[0]||i[h]>r[1])return null;n=l[h],o=t[1]-(i[h]-r[0])/s;var c=new Fa(n,o);c.style=sn.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,h,i[h]),c.highlightStyle=sn.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(c.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(c.clickable=e.pointClickAble),c.refDataID=this.data.id,c.dataInfo={field:this.fields[h],value:i[h]},this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}calculateXShapeInfo(){var e,t=this.dataViewBox,r=this.setting,s=this.dataValues.length;if(s<1)return null;var i=[],a=this.DVBWidth,n=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var o=a-((e=r.xShapeBlank)[0]+e[1]);if(o<=s)return null;n=o/(s-1)}else e=[n=a/(s+1),n,n];for(var l=0,h=0;h<s;h++)0==h?l=e[0]:l+=n,i.push(t[0]+l);return{xPositions:i,width:0}}};s.Feature.Theme.Ring=
  /* Copyright© 2000 - 2019 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 extends nn{constructor(e,t,r,s,i){super(e,t,r,s,i),this.CLASS_NAME="SuperMap.Feature.Theme.Ring"}destroy(){super.destroy()}assembleShapes(){if(this.initBaseParameter()){var e=[{fillColor:"#ff9277"},{fillColor:"#dddd00"},{fillColor:"#ffc877"},{fillColor:"#bbe3ff"},{fillColor:"#d5ffbb"},{fillColor:"#bbbbff"},{fillColor:"#ddb000"},{fillColor:"#b0dd00"},{fillColor:"#e2bbff"},{fillColor:"#ffbbe3"},{fillColor:"#ff7777"},{fillColor:"#ff9900"},{fillColor:"#83dd00"},{fillColor:"#77e3ff"},{fillColor:"#778fff"},{fillColor:"#c877ff"},{fillColor:"#ff77ab"},{fillColor:"#ff6600"},{fillColor:"#aa8800"},{fillColor:"#77c7ff"},{fillColor:"#ad77ff"},{fillColor:"#ff77ff"},{fillColor:"#dd0083"},{fillColor:"#777700"},{fillColor:"#00aa00"},{fillColor:"#0088aa"},{fillColor:"#8400dd"},{fillColor:"#aa0088"},{fillColor:"#dd0000"},{fillColor:"#772e00"}],t=this.setting;t.useBackground&&this.shapes.push(sn.Background(this.shapeFactory,this.chartBox,t));var r=this.dataValues;if(!(r.length<1)){var s=this.DVBCodomain;for(let e=0;e<r.length;e++)if(r[e]<s[0]||r[e]>s[1])return;var i=0;for(let e=0;e<r.length;e++)i+=Math.abs(r[e]);this.DVBUnitValue=360/i;for(var a=this.DVBUnitValue,n=this.DVBCenterPoint,o=0,l=0,h=o,u=this.DVBHeight<this.DVBWidth?this.DVBHeight/2:this.DVBWidth/2,c=t.innerRingRadius>=0&&t.innerRingRadius<u,d=void 0!==t.innerRingRadius&&!isNaN(t.innerRingRadius)&&c?t.innerRingRadius:0,p=0;p<r.length;p++){var m=Math.abs(r[p]);l=0===p?o+m*a:p===m.length-1?h:o+m*a;var f=new Ba(n[0],n[1],u,o,l,d);if(void 0===t.sectorStyleByFields){var y=p%e.length;f.style=sn.ShapeStyleTool(null,t.sectorStyle,e,null,y)}else f.style=sn.ShapeStyleTool(null,t.sectorStyle,t.sectorStyleByFields,t.sectorStyleByCodomain,p,r[p]);f.highlightStyle=sn.ShapeStyleTool(null,t.sectorHoverStyle),void 0!==t.sectorHoverAble&&(f.hoverable=t.sectorHoverAble),void 0!==t.sectorClickAble&&(f.clickable=t.sectorClickAble),f.refDataID=this.data.id,f.dataInfo={field:this.fields[p],value:r[p]},this.shapes.push(this.shapeFactory.createShape(f)),o=l}this.shapesConvertToRelativeCoordinate()}}}};
  /* Copyright© 2000 - 2019 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 ln extends an{constructor(e,t,r,s,i){if(super(e,t),e.geometry&&e.geometry instanceof Se){this.dataBounds=e.geometry.getBounds(),this.nodesClipPixel=2,this.isHoverAble=!0,this.isMultiHover=!0,this.isClickAble=!0,this.highlightStyle=null,this.shapeOptions={},this.style=r||{},this.CLASS_NAME="SuperMap.Feature.Theme.Vector",this.style=r||{},s&&ye.copyAttributesWithClip(this,s,["shapeOptions","dataBounds"]),i&&ye.copyAttributesWithClip(this.shapeOptions,i);var a=e.geometry;this.lonlat=this.dataBounds.getCenterLonLat(),this.location=this.getLocalXY(this.lonlat),a instanceof we?this.lineToTF(a):a instanceof Te?this.lineToTF(a):a instanceof Ce||(a instanceof xe?this.multiPointToTF(a):a instanceof Ae?this.multiLineStringToTF(a):a instanceof Le?this.multiPolygonToTF(a):a instanceof Pe?this.polygonToTF(a):a instanceof be||(a instanceof _e?this.pointToTF(a):a instanceof Ne?this.rectangleToTF(a):a instanceof Ee&&this.geoTextToTF(a)))}}destroy(){this.style=null,this.dataBounds=null,this.nodesClipPixel=null,this.isHoverAble=null,this.isMultiHover=null,this.isClickAble=null,this.highlightStyle=null,this.shapeOptions=null,super.destroy()}lineToTF(e){for(var t=e.components,r=[],s=[],i=this.location,a=[],n=this.nodesClipPixel,o=0;o<t.length;o++){var l=t[o];if(s=[],r=this.getLocalXY(l),s[0]=r[0]-i[0],s[1]=r[1]-i[1],a.length>0){var h=a[a.length-1];if(Math.abs(h[0]-s[0])<=n&&Math.abs(h[1]-s[1])<=n)continue}a.push(s)}if(a.length<2)return null;var u=new Object;(u=ye.copyAttributesWithClip(u,this.style,["pointList"])).pointList=a;var c=new $a({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=this.location,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}multiPointToTF(e){for(var t=e.components,r=[],s=[],i=this.location,a=[],n=this.nodesClipPixel,o=0;o<t.length;o++){var l=t[o];if(s=[],r=this.getLocalXY(l),s[0]=r[0]-i[0],s[1]=r[1]-i[1],a.length>0){var h=a[a.length-1];if(Math.abs(h[0]-s[0])<=n&&Math.abs(h[1]-s[1])<=n)continue}a.push(s);var u=new Object;u.r=6,(u=ye.copyAttributesWithClip(u,this.style)).x=s[0],u.y=s[1];var c=new Qa({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=i,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}}multiLineStringToTF(e){for(var t=e.components,r=0;r<t.length;r++){var s=t[r];this.lineToTF(s)}}multiPolygonToTF(e){for(var t=e.components,r=0;r<t.length;r++){var s=t[r];this.polygonToTF(s)}}pointToTF(e){var t=this.location,r=this.getLocalXY(e),s=new Object;s.r=6,(s=ye.copyAttributesWithClip(s,this.style)).x=r[0]-t[0],s.y=r[1]-t[1];var i=new Qa({style:s,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(i.highlightStyle=this.highlightStyle),i.refOriginalPosition=t,i.refDataID=this.data.id,i.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(i,this.shapeOptions),this.shapes.push(i)}polygonToTF(e){for(var t=e.components,r=[],s=[],i=this.location,a=[],n=[],o=[],l=this.nodesClipPixel,h=0;h<t.length;h++){var u=t[h].components;if(0===h){a=[];for(var c=0;c<u.length;c++){if(s=[],r=this.getLocalXY(u[c]),s[0]=r[0]-i[0],s[1]=r[1]-i[1],a.length>0){var d=a[a.length-1];if(Math.abs(d[0]-s[0])<=l&&Math.abs(d[1]-s[1])<=l)continue}a.push(s)}}else{n=[];for(var p=0;p<u.length;p++){if(s=[],r=this.getLocalXY(u[p]),s[0]=r[0]-i[0],s[1]=r[1]-i[1],n.length>0){var m=n[n.length-1];if(Math.abs(m[0]-s[0])<=l&&Math.abs(m[1]-s[1])<=l)continue}n.push(s)}}n.length<2||o.push(n)}if(!(a.length<2)){var f={};(f=ye.copyAttributesWithClip(f,this.style,["pointList"])).pointList=a;var y=new Za({style:f,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(y.highlightStyle=this.highlightStyle),y.refOriginalPosition=this.location,y.refDataID=this.data.id,y.isHoverByRefDataID=this.isMultiHover,o.length>0&&(y.holePolygonPointLists=o),this.shapeOptions&&ye.copyAttributesWithClip(y,this.shapeOptions),this.shapes.push(y)}}rectangleToTF(e){var t=this.location,r=new ge(e.x,e.y),s=this.layer.map.getResolution(),i=this.getLocalXY(r),a=new Object;a.r=6,(a=ye.copyAttributesWithClip(a,this.style)).x=i[0]-t[0],a.y=i[1]-t[1]-2*e.width/s,a.width=e.width/s,a.height=e.height/s;var n=new tn({style:a,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(n.highlightStyle=this.highlightStyle),n.refOriginalPosition=t,n.refDataID=this.data.id,n.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(n,this.shapeOptions),this.shapes.push(n)}geoTextToTF(e){var t=this.location,r=this.getLocalXY(e),s=new Object;s.r=6,(s=ye.copyAttributesWithClip(s,this.style,["x","y","text"])).x=r[0]-t[0],s.y=r[1]-t[1],s.text=e.text;var i=new Xa({style:s,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(i.highlightStyle=this.highlightStyle),i.refOriginalPosition=t,i.refDataID=this.data.id,i.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(i,this.shapeOptions),this.shapes.push(i)}updateAndAddShapes(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,r=0,s=this.shapes.length;r<s;r++){var i=this.shapes[r];i.refOriginalPosition=e,t.addShape(i)}}getShapesCount(){return this.shapes.length}getLocalXY(e){return this.layer.getLocalXY(e)}}s.Feature.Theme.ThemeVector=ln;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 hn extends(s.mixin(Ha,qa)){constructor(e){super(e),e=e||{},this.id=null,this.type="group",this.clipShape=null,this._children=[],this._storage=null,this.__dirty=!0,this.ignore=!1,ye.extend(this,e),this.id=this.id||ye.createUniqueID("smShapeGroup_"),this.CLASS_NAME="SuperMap.LevelRenderer.Group"}destroy(){this.id=null,this.type=null,this.clipShape=null,this._children=null,this._storage=null,this.__dirty=null,this.ignore=null,super.destroy()}children(){return this._children.slice()}childAt(e){return this._children[e]}addChild(e){e!=this&&e.parent!=this&&(e.parent&&e.parent.removeChild(e),this._children.push(e),e.parent=this,this._storage&&this._storage!==e._storage&&(this._storage.addToMap(e),e instanceof hn&&e.addChildrenToStorage(this._storage)))}removeChild(e){var t=ye.indexOf(this._children,e);this._children.splice(t,1),e.parent=null,this._storage&&(this._storage.delFromMap(e.id),e instanceof hn&&e.delChildrenFromStorage(this._storage))}eachChild(e,t){for(var r=!!t,s=0;s<this._children.length;s++){var i=this._children[s];r?e.call(t,i):e(i)}}traverse(e,t){for(var r=!!t,s=0;s<this._children.length;s++){var i=this._children[s];r?e.call(t,i):e(i),"group"===i.type&&i.traverse(e,t)}}addChildrenToStorage(e){for(var t=0;t<this._children.length;t++){var r=this._children[t];e.addToMap(r),"group"===r.type&&r.addChildrenToStorage(e)}}delChildrenFromStorage(e){for(var t=0;t<this._children.length;t++){var r=this._children[t];e.delFromMap(r.id),"group"===r.type&&r.delChildrenFromStorage(e)}}modSelf(){this.__dirty=!0}}
  /* Copyright© 2000 - 2019 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 un{constructor(){this._elements={},this._hoverElements=[],this._roots=[],this._shapeList=[],this._shapeListOffset=0,this.CLASS_NAME="SuperMap.LevelRenderer.Storage"}destroy(){this.dispose(),this._shapeList=null,this._shapeListOffset=null}iterShape(e,t){if(!t){t={hover:!1,normal:"down",update:!1}}if(t.hover)for(var r=0,s=this._hoverElements.length;r<s;r++){var i=this._hoverElements[r];if(i.updateTransform(),e(i))return this}switch(t.update&&this.updateShapeList(),t.normal){case"down":{let t=this._shapeList.length;for(;t--;)if(e(this._shapeList[t]))return this;break}default:for(let t=0,r=this._shapeList.length;t<r;t++)if(e(this._shapeList[t]))return this}return this}getHoverShapes(e){var t=[],r=this._hoverElements.length;for(let e=0;e<r;e++){t.push(this._hoverElements[e]);var s=this._hoverElements[e].hoverConnect;if(s)for(var i,a=0,n=(s=s instanceof Array?s:[s]).length;a<n;a++)(i=s[a].id?s[a]:this.get(s[a]))&&t.push(i)}if(t.sort(un.shapeCompareFunc),e)for(let e=0,r=t.length;e<r;e++)t[e].updateTransform();return t}getShapeList(e){return e&&this.updateShapeList(),this._shapeList}updateShapeList(){this._shapeListOffset=0;var e=this._roots.length;for(let t=0;t<e;t++){let e=this._roots[t];this._updateAndAddShape(e)}this._shapeList.length=this._shapeListOffset;var t=this._shapeList.length;for(let e=0;e<t;e++)this._shapeList[e].__renderidx=e;this._shapeList.sort(un.shapeCompareFunc)}_updateAndAddShape(e,t){if(!e.ignore)if(e.updateTransform(),"group"==e.type){e.clipShape&&(e.clipShape.parent=e,e.clipShape.updateTransform(),t?(t=t.slice()).push(e.clipShape):t=[e.clipShape]);for(var r=0;r<e._children.length;r++){var s=e._children[r];s.__dirty=e.__dirty||s.__dirty,this._updateAndAddShape(s,t)}e.__dirty=!1}else e.__clipShapes=t,this._shapeList[this._shapeListOffset++]=e}mod(e,t){var r=this._elements[e];if(r&&(r.modSelf(),t))if(t.parent||t._storage||t.__startClip){var s={};for(var i in t)"parent"!=i&&"_storage"!=i&&"__startClip"!=i&&t.hasOwnProperty(i)&&(s[i]=t[i]);(new Ea).merge(r,s,!0)}else(new Ea).merge(r,t,!0);return this}drift(e,t,r){var s=this._elements[e];return s&&(s.needTransform=!0,"horizontal"===s.draggable?r=0:"vertical"===s.draggable&&(t=0),(!s.ondrift||s.ondrift&&!s.ondrift(t,r))&&s.drift(t,r)),this}addHover(e){return e.updateNeedTransform(),this._hoverElements.push(e),this}delHover(){return this._hoverElements=[],this}hasHoverShape(){return this._hoverElements.length>0}addRoot(e){e instanceof hn&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}delRoot(e){if(void 0===e){for(var t=0;t<this._roots.length;t++){var r=this._roots[t];r instanceof hn&&r.delChildrenFromStorage(this)}return this._elements={},this._hoverElements=[],void(this._roots=[])}if(e instanceof Array){var s=e.length;for(let t=0;t<s;t++)this.delRoot(e[t])}else{var i;i="string"==typeof e?this._elements[e]:e;var a=(new Ea).indexOf(this._roots,i);a>=0&&(this.delFromMap(i.id),this._roots.splice(a,1),i instanceof hn&&i.delChildrenFromStorage(this))}}addToMap(e){return e instanceof hn&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this}get(e){return this._elements[e]}delFromMap(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof hn&&(t._storage=null)),this}dispose(){this._elements=null,this._roots=null,this._hoverElements=null}static shapeCompareFunc(e,t){return e.zlevel==t.zlevel?e.z==t.z?e.__renderidx-t.__renderidx:e.z-t.z:e.zlevel-t.zlevel}}
  /* Copyright© 2000 - 2019 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 cn{constructor(e,t){this.root=e,this.storage=t,this._domRoot=null,this._layers={},this._zlevelList=[],this._layerConfig={},this._bgDom=null,this.shapeToImage=null,cn.devicePixelRatio=Math.max(window.devicePixelRatio||1,1),this.CLASS_NAME="SuperMap.LevelRenderer.Painter",this.root.innerHTML="",this._width=this._getWidth(),this._height=this._getHeight();var r=document.createElement("div");this._domRoot=r,r.style.position="relative",r.style.overflow="hidden",r.style.width=this._width+"px",r.style.height=this._height+"px",this.root.appendChild(r),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=cn.createDom(ye.createUniqueID("SuperMap.Theme_background_"),"div",this),r.appendChild(this._bgDom),this._bgDom.onselectstart=a,this._bgDom.style["-webkit-user-select"]="none",this._bgDom.style["user-select"]="none",this._bgDom.style["-webkit-touch-callout"]="none";var s=new dn(ye.createUniqueID("_highLightLayer_"),this);this._layers.hover=s,r.appendChild(s.dom),s.initContext(),s.dom.onselectstart=a,s.dom.style["-webkit-user-select"]="none",s.dom.style["user-select"]="none",s.dom.style["-webkit-touch-callout"]="none";var i=this;function a(){return!1}this.updatePainter=function(e,t){i.refreshShapes(e,t)}}destroy(){this.dispose(),this._zlevelList=null,this._layerConfig=null,this._bgDom=null,this.shapeToImage=null}render(e){return this.refresh(e,!0),this}refresh(e,t){var r=this.storage.getShapeList(!0);return this._paintList(r,t),"function"==typeof e&&e(),this}_paintList(e,t){var r,s,i;for(var a in void 0===t&&(t=!1),this._updateLayerStatus(e),this._layers)"hover"!==a&&(this._layers[a].unusedCount++,this._layers[a].updateTransform());for(var n=[],o=0,l=e.length;o<l;o++){var h=e[o];if(s!==h.zlevel&&(r&&r.needTransform&&i.restore(),i=(r=this.getLayer(h.zlevel)).ctx,s=h.zlevel,r.unusedCount=0,(r.dirty||t)&&r.clear(),r.needTransform&&(i.save(),r.setTransform(i))),i&&h.__startClip){var u=h.__startClip;if(i.save(),u.needTransform){let e=u.transform;Wa.Util_matrix.invert(n,e),i.transform(e[0],e[1],e[2],e[3],e[4],e[5])}if(i.beginPath(),u.buildPath(i,u.style),i.clip(),u.needTransform){let e=n;i.transform(e[0],e[1],e[2],e[3],e[4],e[5])}}if((r&&r.dirty||t)&&!h.invisible&&(!h.onbrush||h.onbrush&&!h.onbrush(i,!1)))if(za.catchBrushException)try{h.brush(i,!1,this.updatePainter)}catch(e){Wa.Util_log(e,"brush error of "+h.type,h)}else h.brush(i,!1,this.updatePainter);i&&h.__stopClip&&i.restore(),h.__dirty=!1}i&&r&&r.needTransform&&i.restore();for(let e in this._layers)if("hover"!==e){var c=this._layers[e];c.dirty=!1,1==c.unusedCount&&c.clear()}}getLayer(e){var t=this._layers[e];if(!t){var r=this._zlevelList.length,s=null,i=-1;if(r>0&&e>this._zlevelList[0]){for(i=0;i<r-1&&!(this._zlevelList[i]<e&&this._zlevelList[i+1]>e);i++);s=this._layers[this._zlevelList[i]]}this._zlevelList.splice(i+1,0,e),t=new dn(ye.createUniqueID("_levelLayer_"+e),this);var a=s?s.dom:this._bgDom;a.nextSibling?a.parentNode.insertBefore(t.dom,a.nextSibling):a.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new Ea).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}getLayers(){return this._layers}_updateLayerStatus(e){var t=this._layers,r={};for(let e in t)"hover"!==e&&(r[e]=t[e].elCount,t[e].elCount=0);for(let r=0;r<e.length;r++){var s=e[r],i=t[s.zlevel];if(i){if(i.elCount++,i.dirty)continue;i.dirty=s.__dirty}}for(let e in t)"hover"!==e&&r[e]!==t[e].elCount&&(t[e].dirty=!0)}refreshShapes(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];this.storage.mod(i.id)}return this.refresh(t),this}clear(){for(var e in this._layers)"hover"!=e&&this._layers[e].clear();return this}modLayer(e,t){if(t){this._layerConfig[e]?(new Ea).merge(this._layerConfig[e],t,!0):this._layerConfig[e]=t;var r=this._layers[e];r&&(new Ea).merge(r,this._layerConfig[e],!0)}}delLayer(e){var t=this._layers[e];t&&(this.modLayer(e,{position:t.position,rotation:t.rotation,scale:t.scale}),t.dom.parentNode.removeChild(t.dom),delete this._layers[e],this._zlevelList.splice((new Ea).indexOf(this._zlevelList,e),1))}refreshHover(){this.clearHover();for(var e=this.storage.getHoverShapes(!0),t=0,r=e.length;t<r;t++)this._brushHover(e[t]);return this.storage.delHover(),this}clearHover(){var e=this._layers.hover;return e&&e.clear(),this}resize(){var e=this._domRoot;e.style.display="none";var t=this._getWidth(),r=this._getHeight();if(e.style.display="",this._width!=t||r!=this._height){for(var s in this._width=t,this._height=r,e.style.width=t+"px",e.style.height=r+"px",this._layers)this._layers[s].resize(t,r);this.refresh(null,!0)}return this}clearLayer(e){var t=this._layers[e];t&&t.clear()}dispose(){this.root.innerHTML="",this.root=null,this.storage=null,this._domRoot=null,this._layers=null}getDomHover(){return this._layers.hover.dom}toDataURL(e,t,r){var s=cn.createDom(ye.createUniqueID("SuperMap.Theme.image_"),"canvas",this);this._bgDom.appendChild(s);var i=s.getContext("2d");1!=cn.devicePixelRatio&&i.scale(cn.devicePixelRatio,cn.devicePixelRatio),i.fillStyle=t||"#fff",i.rect(0,0,this._width*cn.devicePixelRatio,this._height*cn.devicePixelRatio),i.fill();var a=this;this.storage.iterShape(function(e){if(!e.invisible&&(!e.onbrush||e.onbrush&&!e.onbrush(i,!1)))if(za.catchBrushException)try{e.brush(i,!1,a.updatePainter)}catch(t){Wa.Util_log(t,"brush error of "+e.type,e)}else e.brush(i,!1,a.updatePainter)},{normal:"up",update:!0});var n=s.toDataURL(e,r);return i=null,this._bgDom.removeChild(s),n}getWidth(){return this._width}getHeight(){return this._height}_getWidth(){var e=this.root,t=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientWidth||parseInt(t.width,10))-parseInt(t.paddingLeft,10)-parseInt(t.paddingRight,10)).toFixed(0)-0}_getHeight(){var e=this.root,t=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientHeight||parseInt(t.height,10))-parseInt(t.paddingTop,10)-parseInt(t.paddingBottom,10)).toFixed(0)-0}_brushHover(e){var t=this._layers.hover.ctx;if(!e.onbrush||e.onbrush&&!e.onbrush(t,!0)){var r=this.getLayer(e.zlevel);if(r.needTransform&&(t.save(),r.setTransform(t)),za.catchBrushException)try{e.brush(t,!0,this.updatePainter)}catch(t){Wa.Util_log(t,"hoverBrush error of "+e.type,e)}else e.brush(t,!0,this.updatePainter);r.needTransform&&t.restore()}}_shapeToImage(e,t,r,s,i){var a=document.createElement("canvas"),n=a.getContext("2d"),o=i||window.devicePixelRatio||1;a.style.width=r+"px",a.style.height=s+"px",a.setAttribute("width",r*o),a.setAttribute("height",s*o),n.clearRect(0,0,r*o,s*o);var l={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[0,0,0],t.rotation=0,t.scale=[1,1],t&&t.brush(n,!1);var h=new en({id:e,style:{x:0,y:0,image:a}});return null!=l.position&&(h.position=t.position=l.position),null!=l.rotation&&(h.rotation=t.rotation=l.rotation),null!=l.scale&&(h.scale=t.scale=l.scale),h}_createShapeToImageProcessor(){var e=this;return function(t,r,s,i){return e._shapeToImage(t,r,s,i,cn.devicePixelRatio)}}updateHoverLayer(e){if(!(e instanceof Array))return this;this.clearHover(),this.storage.delHover();for(var t=0;t<e.length;t++)this.storage.addHover(e[t]),this._brushHover(e[t])}static createDom(e,t,r){var s=document.createElement(t),i=r._width,a=r._height;return s.style.position="absolute",s.style.left=0,s.style.top=0,s.style.width=i+"px",s.style.height=a+"px",s.setAttribute("width",i*cn.devicePixelRatio),s.setAttribute("height",a*cn.devicePixelRatio),s.setAttribute("id",e),s}}class dn extends qa{constructor(e,t){super(e,t),this.dom=null,this.domBack=null,this.ctxBack=null,this.painter=t,this.unusedCount=0,this.config=null,this.dirty=!0,this.elCount=0,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.zoomable=!1,this.panable=!1,this.maxZoom=1/0,this.minZoom=0,this.ctx=null,this.dom=cn.createDom(ye.createUniqueID("SuperMap.Theme"+e),"canvas",t),this.dom.onselectstart=function(){return!1},this.dom.style["-webkit-user-select"]="none",this.dom.style["user-select"]="none",this.dom.style["-webkit-touch-callout"]="none",this.CLASS_NAME="SuperMap.LevelRenderer.Painter.Layer"}destroy(){this.dom=null,this.domBack=null,this.ctxBack=null,this.painter=null,this.unusedCount=null,this.config=null,this.dirty=null,this.elCount=null,this.clearColor=null,this.motionBlur=null,this.lastFrameAlpha=null,this.zoomable=null,this.panable=null,this.maxZoom=null,this.minZoom=null,this.ctx=null,qa.destroy.apply(this,arguments)}initContext(){this.ctx=this.dom.getContext("2d"),1!=cn.devicePixelRatio&&this.ctx.scale(cn.devicePixelRatio,cn.devicePixelRatio)}createBackBuffer(){this.domBack=cn.createDom(ye.createUniqueID("SuperMap.Theme.back-"+this.id),"canvas",this.painter),this.ctxBack=this.domBack.getContext("2d"),1!=cn.devicePixelRatio&&this.ctxBack.scale(cn.devicePixelRatio,cn.devicePixelRatio)}resize(e,t){this.dom.style.width=e+"px",this.dom.style.height=t+"px",this.dom.setAttribute("width",e*cn.devicePixelRatio),this.dom.setAttribute("height",t*cn.devicePixelRatio),1!=cn.devicePixelRatio&&this.ctx.scale(cn.devicePixelRatio,cn.devicePixelRatio),this.domBack&&(this.domBack.setAttribute("width",e*cn.devicePixelRatio),this.domBack.setAttribute("height",t*cn.devicePixelRatio),1!=cn.devicePixelRatio&&this.ctxBack.scale(cn.devicePixelRatio,cn.devicePixelRatio))}clear(){var e=this.dom,t=this.ctx,r=e.width,s=e.height,i=this.clearColor,a=this.motionBlur,n=this.lastFrameAlpha;if(a&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,r/cn.devicePixelRatio,s/cn.devicePixelRatio)),i?(t.save(),t.fillStyle=this.config.clearColor,t.fillRect(0,0,r/cn.devicePixelRatio,s/cn.devicePixelRatio),t.restore()):t.clearRect(0,0,r/cn.devicePixelRatio,s/cn.devicePixelRatio),a){var o=this.domBack;t.save(),t.globalAlpha=n,t.drawImage(o,0,0,r/cn.devicePixelRatio,s/cn.devicePixelRatio),t.restore()}}}
  /* Copyright© 2000 - 2019 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 pn extends Ha{constructor(e,t,r){var s,i;super(e,t,r),this.root=e,this.storage=t,this.painter=r,this._lastX=0,this._lastY=0,this._mouseX=0,this._mouseY=0,this._findHover=null,this._domHover=null,this._findHover=(s=function(e,t,r){var s=this;if(s._draggingTarget&&s._draggingTarget.id==e.id||e.isSilent())return!1;var i=s._event;if(e.isCover(t,r)){if(e.hoverable)if(e.isHoverByRefDataID&&!0===e.isHoverByRefDataID){if(e.refDataID){var a=e.refDataID,n=null;e.refDataHoverGroup&&(n=e.refDataHoverGroup);for(var o=s.storage._shapeList,l=0,h=o.length;l<h;l++){var u=o[l];u.refDataID&&a===u.refDataID&&(n?u.refDataHoverGroup&&n===u.refDataHoverGroup&&s.storage.addHover(u):s.storage.addHover(u))}}}else s.storage.addHover(e);for(var c=e.parent;c;){if(c.clipShape&&!c.clipShape.isCover(s._mouseX,s._mouseY))return!1;c=c.parent}return s._lastHover!=e&&(s._processOutShape(i),s._processDragLeave(i),s._lastHover=e,s._processDragEnter(i)),s._processOverShape(i),s._processDragOver(i),s._hasfound=1,!0}return!1},i=this,function(e,t,r){return s.call(i,e,t,r)}),this._domHover=r.getDomHover(),this.CLASS_NAME="SuperMap.LevelRenderer.Handler";var a={resize:function(e){e=e||window.event,this._lastHover=null,this._isMouseDown=0,this.dispatch(za.EVENT.RESIZE,e)},click:function(e){e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._clickThreshold<10&&this._dispatchAgency(t,za.EVENT.CLICK,e),this._mousemoveHandler(e)},dblclick:function(e){e=e||window.event,e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._clickThreshold<5&&this._dispatchAgency(t,za.EVENT.DBLCLICK,e),this._mousemoveHandler(e)},mousewheel:function(e){var t=((e=this._zrenderEventFixed(e)).wheelDelta||-e.detail)>0?1.1:1/1.1,r=this.painter.getLayers(),s=!1;for(var i in r)if("hover"!==i){var a=r[i],n=a.position;if(a.zoomable){a.__zoom=a.__zoom||1;var o=a.__zoom;o*=t,t=(o=Math.max(Math.min(a.maxZoom,o),a.minZoom))/a.__zoom,a.__zoom=o,n[0]-=(this._mouseX-n[0])*(t-1),n[1]-=(this._mouseY-n[1])*(t-1),a.scale[0]*=t,a.scale[1]*=t,a.dirty=!0,s=!0}}s&&this.painter.refresh(),this._dispatchAgency(this._lastHover,za.EVENT.MOUSEWHEEL,e),this._mousemoveHandler(e)},mousemove:function(e){this._clickThreshold++,e=this._zrenderEventFixed(e),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=Wa.Util_event.getX(e),this._mouseY=Wa.Util_event.getY(e);var t=this._mouseX-this._lastX,r=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(e),this._processDragLeave(e)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var s="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,r),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var i=this.painter.getLayers(),a=!1;for(var n in i)if("hover"!==n){var o=i[n];o.panable&&(s="move",o.position[0]+=t,o.position[1]+=r,a=!0,o.dirty=!0)}a&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?s="move":this._hasfound&&this._lastHover.clickable&&(s="pointer"),this.root.style.cursor=s,this._dispatchAgency(this._lastHover,za.EVENT.MOUSEMOVE,e),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()},mouseout:function(e){var t=(e=this._zrenderEventFixed(e)).toElement||e.relatedTarget;if(t!=this.root)for(;t&&9!=t.nodeType;){if(t==this.root)return void this._mousemoveHandler(e);t=t.parentNode}e.zrenderX=this._lastX,e.zrenderY=this._lastY,this.root.style.cursor="",this._isMouseDown=0,this._processOutShape(e),this._processDrop(e),this._processDragEnd(e),this.painter.refreshHover(),this.dispatch(za.EVENT.GLOBALOUT,e)},mousedown:function(e){if(this._clickThreshold=0,2==this._lastDownButton)return this._lastDownButton=e.button,void(this._mouseDownTarget=null);this._lastMouseDownMoment=new Date,e=this._zrenderEventFixed(e),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,za.EVENT.MOUSEDOWN,e),this._lastDownButton=e.button},mouseup:function(e){e=this._zrenderEventFixed(e),this.root.style.cursor="",this._isMouseDown=0,this._mouseDownTarget=null,this._dispatchAgency(this._lastHover,za.EVENT.MOUSEUP,e),this._processDrop(e),this._processDragEnd(e)},touchstart:function(e){e=this._zrenderEventFixed(e,!0),this._lastTouchMoment=new Date,this._mobildFindFixed(e),this._mousedownHandler(e)},touchmove:function(e){e=this._zrenderEventFixed(e,!0),this._mousemoveHandler(e),this._isDragging&&Wa.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment<za.EVENT.touchClickDelay&&(this._mobildFindFixed(e),this._clickHandler(e),t-this._lastClickMoment<za.EVENT.touchClickDelay/2&&(this._dblclickHandler(e),this._lastHover&&this._lastHover.clickable&&Wa.Util_event.stop(e)),this._lastClickMoment=t),this.painter.clearHover()}};function n(e,t){return function(r){return e.call(t,r)}}!function(e){var t=["resize","click","dblclick","mousewheel","mousemove","mouseout","mouseup","mousedown","touchstart","touchend","touchmove"],r=t.length;for(;r--;){var s=t[r];e["_"+s+"Handler"]=n(a[s],e)}}(this),window.addEventListener?(window.addEventListener("resize",this._resizeHandler),Wa.Util_env.os.tablet||Wa.Util_env.os.phone?(e.addEventListener("touchstart",this._touchstartHandler),e.addEventListener("touchmove",this._touchmoveHandler),e.addEventListener("touchend",this._touchendHandler)):(e.addEventListener("click",this._clickHandler),e.addEventListener("dblclick",this._dblclickHandler),e.addEventListener("mousewheel",this._mousewheelHandler),e.addEventListener("mousemove",this._mousemoveHandler),e.addEventListener("mousedown",this._mousedownHandler),e.addEventListener("mouseup",this._mouseupHandler)),e.addEventListener("DOMMouseScroll",this._mousewheelHandler),e.addEventListener("mouseout",this._mouseoutHandler)):(window.attachEvent("onresize",this._resizeHandler),e.attachEvent("onclick",this._clickHandler),e.ondblclick=this._dblclickHandler,e.attachEvent("onmousewheel",this._mousewheelHandler),e.attachEvent("onmousemove",this._mousemoveHandler),e.attachEvent("onmouseout",this._mouseoutHandler),e.attachEvent("onmousedown",this._mousedownHandler),e.attachEvent("onmouseup",this._mouseupHandler))}destroy(){this.dispose(),this._lastX=null,this._lastY=null,this._mouseX=null,this._mouseY=null,this._findHover=null,Ha.prototype.destroy.apply(this,arguments)}on(e,t){return this.bind(e,t),this}un(e,t){return this.unbind(e,t),this}trigger(e,t){var r=za.EVENT;switch(e){case r.RESIZE:case r.CLICK:case r.DBLCLICK:case r.MOUSEWHEEL:case r.MOUSEMOVE:case r.MOUSEDOWN:case r.MOUSEUP:case r.MOUSEOUT:this["_"+e+"Handler"](t)}}dispose(){var e=this.root;window.removeEventListener?(window.removeEventListener("resize",this._resizeHandler),Wa.Util_env.os.tablet||Wa.Util_env.os.phone?(e.removeEventListener("touchstart",this._touchstartHandler),e.removeEventListener("touchmove",this._touchmoveHandler),e.removeEventListener("touchend",this._touchendHandler)):(e.removeEventListener("click",this._clickHandler),e.removeEventListener("dblclick",this._dblclickHandler),e.removeEventListener("mousewheel",this._mousewheelHandler),e.removeEventListener("mousemove",this._mousemoveHandler),e.removeEventListener("mousedown",this._mousedownHandler),e.removeEventListener("mouseup",this._mouseupHandler)),e.removeEventListener("DOMMouseScroll",this._mousewheelHandler),e.removeEventListener("mouseout",this._mouseoutHandler)):(window.detachEvent("onresize",this._resizeHandler),e.detachEvent("onclick",this._clickHandler),e.detachEvent("dblclick",this._dblclickHandler),e.detachEvent("onmousewheel",this._mousewheelHandler),e.detachEvent("onmousemove",this._mousemoveHandler),e.detachEvent("onmouseout",this._mouseoutHandler),e.detachEvent("onmousedown",this._mousedownHandler),e.detachEvent("onmouseup",this._mouseupHandler)),this.root=null,this._domHover=null,this.storage=null,this.painter=null,this.un()}_processDragStart(e){var t=this._lastHover;if(this._isMouseDown&&t&&t.draggable&&!this._draggingTarget&&this._mouseDownTarget==t){if(t.dragEnableTime&&new Date-this._lastMouseDownMoment<t.dragEnableTime)return;var r=t;this._draggingTarget=r,this._isDragging=1,r.invisible=!0,this.storage.mod(r.id),this._dispatchAgency(r,za.EVENT.DRAGSTART,e),this.painter.refresh()}}_processDragEnter(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,za.EVENT.DRAGENTER,e,this._draggingTarget)}_processDragOver(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,za.EVENT.DRAGOVER,e,this._draggingTarget)}_processDragLeave(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,za.EVENT.DRAGLEAVE,e,this._draggingTarget)}_processDrop(e){this._draggingTarget&&(this._draggingTarget.invisible=!1,this.storage.mod(this._draggingTarget.id),this.painter.refresh(),this._dispatchAgency(this._lastHover,za.EVENT.DROP,e,this._draggingTarget))}_processDragEnd(e){this._draggingTarget&&(this._dispatchAgency(this._draggingTarget,za.EVENT.DRAGEND,e),this._lastHover=null),this._isDragging=0,this._draggingTarget=null}_processOverShape(e){this._dispatchAgency(this._lastHover,za.EVENT.MOUSEOVER,e)}_processOutShape(e){this._dispatchAgency(this._lastHover,za.EVENT.MOUSEOUT,e)}_dispatchAgency(e,t,r,s){var i="on"+t,a={type:t,event:r,target:e,cancelBubble:!1},n=e;for(s&&(a.dragged=s);n&&(n[i]&&(a.cancelBubble=n[i](a)),n.dispatch(t,a),n=n.parent,!a.cancelBubble););e?a.cancelBubble||this.dispatch(t,a):s||this.dispatch(t,{type:t,event:r})}_iterateAndFindHover(){for(var e,t=Wa.Util_matrix.create(),r=this.storage.getShapeList(),s=[0,0],i=r.length-1;i>=0;i--){var a=r[i];if(void 0!==a.zlevel&&(e=this.painter.getLayer(a.zlevel,e),s[0]=this._mouseX,s[1]=this._mouseY,e.needTransform&&(Wa.Util_matrix.invert(t,e.transform),Wa.Util_vector.applyTransform(s,s,t))),this._findHover(a,s[0],s[1]))break}}_mobildFindFixed(e){var t=[{x:10},{x:-20},{x:10,y:10},{y:-20}];this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var r=0;!this._lastHover&&r<t.length;r++){var s=t[r];s.x&&(this._mouseX+=s.x),s.y&&(this._mouseX+=s.y),this._iterateAndFindHover()}this._lastHover&&(e.zrenderX=this._mouseX,e.zrenderY=this._mouseY)}_zrenderEventFixed(e,t){if(e.zrenderFixed)return e;if(t){var r="touchend"!=e.type?e.targetTouches[0]:e.changedTouches[0];if(r){var s=this.root.getBoundingClientRect();e.zrenderX=r.clientX-s.left,e.zrenderY=r.clientY-s.top}}else{var i=(e=e||window.event).toElement||e.relatedTarget||e.srcElement||e.target;i&&i!=this._domHover&&(e.zrenderX=(void 0!==e.offsetX?e.offsetX:e.layerX)+i.offsetLeft,e.zrenderY=(void 0!==e.offsetY?e.offsetY:e.layerY)+i.offsetTop)}return e.zrenderFixed=1,e}getLastHoverOne(){return this._lastHover?this._lastHover:null}}
  /* Copyright© 2000 - 2019 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 mn{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Animation.easing"}destroy(){}Linear(e){return e}QuadraticIn(e){return e*e}QuadraticOut(e){return e*(2-e)}QuadraticInOut(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}CubicIn(e){return e*e*e}CubicOut(e){return--e*e*e+1}CubicInOut(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}QuarticIn(e){return e*e*e*e}QuarticOut(e){return 1- --e*e*e*e}QuarticInOut(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}QuinticIn(e){return e*e*e*e*e}QuinticOut(e){return--e*e*e*e*e+1}QuinticInOut(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}SinusoidalIn(e){return 1-Math.cos(e*Math.PI/2)}SinusoidalOut(e){return Math.sin(e*Math.PI/2)}SinusoidalInOut(e){return.5*(1-Math.cos(Math.PI*e))}ExponentialIn(e){return 0===e?0:Math.pow(1024,e-1)}ExponentialOut(e){return 1===e?1:1-Math.pow(2,-10*e)}ExponentialInOut(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}CircularIn(e){return 1-Math.sqrt(1-e*e)}CircularOut(e){return Math.sqrt(1- --e*e)}CircularInOut(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}ElasticIn(e){var t,r=.1;return 0===e?0:1===e?1:(r<1?(r=1,t=.1):t=.4*Math.asin(1/r)/(2*Math.PI),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))}ElasticOut(e){var t,r=.1;return 0===e?0:1===e?1:(r<1?(r=1,t=.1):t=.4*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)}ElasticInOut(e){var t,r=.1;return 0===e?0:1===e?1:(r<1?(r=1,t=.1):t=.4*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*.5+1)}BackIn(e){var t=1.70158;return e*e*((t+1)*e-t)}BackOut(e){var t=1.70158;return--e*e*((t+1)*e+t)+1}BackInOut(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}BounceIn(e){return 1-this.BounceOut(1-e)}BounceOut(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}BounceInOut(e){return e<.5?.5*this.BounceIn(2*e):.5*this.BounceOut(2*e-1)+.5}}
  /* Copyright© 2000 - 2019 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 fn{constructor(e){this._targetPool=e.target||{},this._targetPool instanceof Array||(this._targetPool=[this._targetPool]),this._life=e.life||1e3,this._delay=e.delay||0,this._startTime=(new Date).getTime()+this._delay,this._endTime=this._startTime+1e3*this._life,this.loop=void 0!==e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this.CLASS_NAME="SuperMap.LevelRenderer.Animation.Clip"}destroy(){}step(e){var t=new mn,r=(e-this._startTime)/this._life;if(!(r<0)){r=Math.min(r,1);var s="string"==typeof this.easing?t[this.easing]:this.easing,i="function"==typeof s?s(r):r;return this.fire("frame",i),1==r?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}}restart(){var e=((new Date).getTime()-this._startTime)%this._life;this._startTime=(new Date).getTime()-e+this.gap}fire(e,t){for(var r=0,s=this._targetPool.length;r<s;r++)this["on"+e]&&this["on"+e](this._targetPool[r],t)}}
  /* Copyright© 2000 - 2019 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 yn extends Ha{constructor(e){super(e),e=e||{},this.stage={},this.onframe=function(){},this._clips=[],this._running=!1,this._time=0,ye.extend(this,e),this.CLASS_NAME="SuperMap.LevelRenderer.Animation"}add(e){this._clips.push(e)}remove(e){var t=(new Ea).indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)}_update(){var e=(new Date).getTime(),t=e-this._time,r=this._clips,s=r.length,i=[],a=[];for(let t=0;t<s;t++){var n=r[t],o=n.step(e);o&&(i.push(o),a.push(n))}this.stage.update&&this.stage.update();for(let e=0;e<s;)r[e]._needsRemove?(r[e]=r[s-1],r.pop(),s--):e++;s=i.length;for(let e=0;e<s;e++)a[e].fire(i[e]);this._time=e,this.onframe(t),this.dispatch("frame",t)}start(){var e=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){setTimeout(e,16)},t=this;this._running=!0,this._time=(new Date).getTime(),e(function r(){t._running&&(t._update(),e(r))})}stop(){this._running=!1}clear(){this._clips=[]}animate(e,t){var r=new gn(e,(t=t||{}).loop,t.getter,t.setter);return r.animation=this,r}static _interpolateNumber(e,t,r){return(t-e)*r+e}static _interpolateArray(e,t,r,s,i){var a=e.length;if(1==i)for(let i=0;i<a;i++)s[i]=yn._interpolateNumber(e[i],t[i],r);else{var n=e[0].length;for(let i=0;i<a;i++)for(let a=0;a<n;a++)s[i][a]=yn._interpolateNumber(e[i][a],t[i][a],r)}}static _isArrayLike(e){switch(typeof e){case"undefined":case"string":return!1}return void 0!==e.length}static _catmullRomInterpolateArray(e,t,r,s,i,a,n,o,l){var h=e.length;if(1==l)for(let l=0;l<h;l++)o[l]=yn._catmullRomInterpolate(e[l],t[l],r[l],s[l],i,a,n);else{var u=e[0].length;for(let l=0;l<h;l++)for(var c=0;c<u;c++)o[l][c]=yn._catmullRomInterpolate(e[l][c],t[l][c],r[l][c],s[l][c],i,a,n)}}static _catmullRomInterpolate(e,t,r,s,i,a,n){var o=.5*(r-e),l=.5*(s-t);return(2*(t-r)+o+l)*n+(-3*(t-r)-2*o-l)*a+o*i+t}static _cloneValue(e){var t=Array.prototype.slice;if(yn._isArrayLike(e)){var r=e.length;if(yn._isArrayLike(e[0])){for(var s=[],i=0;i<r;i++)s.push(t.call(e[i]));return s}return t.call(e)}return e}static rgba2String(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}}class gn{constructor(e,t,r,s){this._tracks={},this._target=e,this._loop=t||!1,this._getter=r||function(e,t){return e[t]},this._setter=s||function(e,t,r){e[t]=r},this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[],this.CLASS_NAME="SuperMap.LevelRenderer.Animation.Animator"}when(e,t){for(var r in t)this._tracks[r]||(this._tracks[r]=[],0!==e&&this._tracks[r].push({time:0,value:yn._cloneValue(this._getter(this._target,r))})),this._tracks[r].push({time:parseInt(e,10),value:t[r]});return this}during(e){return this._onframeList.push(e),this}start(e){var t=this,r=this._setter,s=this._getter,i=t._onframeList.length,a="spline"===e,n=function(){if(t._clipCount--,0===t._clipCount){t._tracks={};for(var e=t._doneList.length,r=0;r<e;r++)t._doneList[r].call(t)}},o=function(o,l){var h=o.length;if(h){var u=o[0].value,c=yn._isArrayLike(u),d=!1,p=c&&yn._isArrayLike(u[0])?2:1;o.sort(function(e,t){return e.time-t.time});var m=o[h-1].time,f=[],y=[];for(let e=0;e<h;e++){f.push(o[e].time/m);var g=o[e].value;"string"==typeof g&&(0===(g=Wa.Util_color.toArray(g)).length&&(g[0]=g[1]=g[2]=0,g[3]=1),d=!0),y.push(g)}var v,S,b,x,C,_,T,E=0,w=0;if(d)var A=[0,0,0,0];var L=new fn({target:t._target,life:m,loop:t._loop,delay:t._delay,onframe:function(e,n){if(n<w){for(v=Math.min(E+1,h-1),S=v;S>=0&&!(f[S]<=n);S--);S=Math.min(S,h-2)}else{for(S=E;S<h&&!(f[S]>n);S++);S=Math.min(S-1,h-2)}E=S,w=n;var o=f[S+1]-f[S];if(0!==o){if(b=(n-f[S])/o,a)if(C=y[S],x=y[0===S?S:S-1],_=y[S>h-2?h-1:S+1],T=y[S>h-3?h-1:S+2],c)yn._catmullRomInterpolateArray(x,C,_,T,b,b*b,b*b*b,s(e,l),p);else{let t;t=d?yn.rgba2String(A):yn._catmullRomInterpolate(x,C,_,T,b,b*b,b*b*b),r(e,l,t)}else if(c)yn._interpolateArray(y[S],y[S+1],b,s(e,l),p);else{let t;d?(yn._interpolateArray(y[S],y[S+1],b,A,1),t=yn.rgba2String(A)):t=yn._interpolateNumber(y[S],y[S+1],b),r(e,l,t)}for(S=0;S<i;S++)t._onframeList[S](e,n)}},ondestroy:n});e&&"spline"!==e&&(L.easing=e),t._clipList.push(L),t._clipCount++,t.animation.add(L)}};for(var l in this._tracks)o(this._tracks[l],l);return this}stop(){for(var e=0;e<this._clipList.length;e++){var t=this._clipList[e];this.animation.remove(t)}this._clipList=[]}delay(e){return this._delay=e,this}done(e){return e&&this._doneList.push(e),this}}
  /* Copyright© 2000 - 2019 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 vn{constructor(e,t){this.id=e,this.storage=new un,this.painter=new cn(t,this.storage),this.handler=new pn(t,this.storage,this.painter),this.animatingElements=[],this.animation=new yn({stage:{update:vn.getFrameCallback(this)}}),this._needsRefreshNextFrame=!1,this.animation.start(),this.CLASS_NAME="SuperMap.LevelRenderer.Render"}destroy(){this.id=null,this.storage=null,this.painter=null,this.handler=null,this.animatingElements=null,this.animation=null,this._needsRefreshNextFrame=null}getId(){return this.id}addShape(e){return this.storage.addRoot(e),this}addGroup(e){return this.storage.addRoot(e),this}delShape(e){return this.storage.delRoot(e),this}delGroup(e){return this.storage.delRoot(e),this}modShape(e,t){return this.storage.mod(e,t),this}modGroup(e,t){return this.storage.mod(e,t),this}modLayer(e,t){return this.painter.modLayer(e,t),this}addHoverShape(e){return this.storage.addHover(e),this}render(e){return this.painter.render(e),this._needsRefreshNextFrame=!1,this}refresh(e){return this.painter.refresh(e),this._needsRefreshNextFrame=!1,this}refreshNextFrame(){return this._needsRefreshNextFrame=!0,this}refreshHover(e){return this.painter.refreshHover(e),this}refreshShapes(e,t){return this.painter.refreshShapes(e,t),this}resize(){return this.painter.resize(),this}animate(e,t,r){if("string"==typeof e&&(e=this.storage.get(e)),e){var s;if(t){for(var i=t.split("."),a=e,n=0,o=i.length;n<o;n++)a&&(a=a[i[n]]);a&&(s=a)}else s=e;if(!s)return void Wa.Util_log('Property "'+t+'" is not existed in element '+e.id);var l=this.animatingElements;return void 0===e.__aniCount&&(e.__aniCount=0),0===e.__aniCount&&l.push(e),e.__aniCount++,this.animation.animate(s,{loop:r}).done(function(){if(e.__aniCount--,0===e.__aniCount){var t=(new Ea).indexOf(l,e);l.splice(t,1)}})}Wa.Util_log("Element not existed")}clearAnimation(){this.animation.clear()}getWidth(){return this.painter.getWidth()}getHeight(){return this.painter.getHeight()}toDataURL(e,t,r){return this.painter.toDataURL(e,t,r)}shapeToImage(e,t,r){var s=ye.createUniqueID("SuperMap.LevelRenderer.ToImage_");return this.painter.shapeToImage(s,e,t,r)}on(e,t){return this.handler.on(e,t),this}un(e,t){return this.handler.un(e,t),this}trigger(e,t){return this.handler.trigger(e,t),this.handler.dispatch(e,t),this}clear(){return this.storage.delRoot(),this.painter.clear(),this}dispose(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=null,this.animatingElements=null,this.storage=null,this.painter=null,this.handler=null}updateHoverShapes(e){return this.painter.updateHoverLayer(e),this}getAllShapes(){return this.storage._shapeList}clearAll(){return this.clear(),this.painter.clearHover(),this}getHoverOne(){return this.handler.getLastHoverOne()}static getFrameCallback(e){return function(){var t=e.animatingElements;if(t instanceof Array){for(var r=0,s=t.length;r<s;r++)e.storage.mod(t[r].id);(t.length||e._needsRefreshNextFrame)&&e.refresh()}}}}
  /* Copyright© 2000 - 2019 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 Sn{constructor(){Sn._instances={},Sn.Tool={},this.version="2.0.4",this.CLASS_NAME="SuperMap.LevelRenderer"}destroy(){this.dispose(),this.version=null}init(e){var t=new vn(ye.createUniqueID("LRenderer_"),e);return Sn._instances[t.id]=t,t}dispose(e){if(e)e.dispose(),this.delInstance(e.id);else{for(var t in Sn._instances)Sn._instances[t].dispose();Sn._instances={}}return this}getInstance(e){return Sn._instances[e]}delInstance(e){return delete Sn._instances[e],this}}s.LevelRenderer=Sn;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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.*/
  const bn={EXCEL:"EXCEL",CSV:"CSV",ISERVER:"ISERVER",GEOJSON:"GEOJSON",JSON:"JSON"},xn={fileMaxSize:10485760};
  /* Copyright© 2000 - 2019 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 Cn{constructor(e){this.FileTypes=bn,this.FileConfig=xn,this.loadFileObject=e&&e.loadFileObject?e.loadFileObject:[]}set(e,t){this[e]=t}get(e){return this[e]}}
  /* Copyright© 2000 - 2019 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 _n{constructor(){this._initView()}_initView(){const e=document.createElement("div");e.hidden=!0,e.setAttribute("class","component-messageboxcontainer component-border-bottom-orange");const t=document.createElement("div");t.setAttribute("class","icon"),this.icon=document.createElement("span"),this.icon.setAttribute("class","supermapol-icons-message-warning"),t.appendChild(this.icon),e.appendChild(t);const r=document.createElement("div");r.setAttribute("class","component-messagebox"),r.innerHTML="",e.appendChild(r),this.messageBox=r;const s=document.createElement("div");s.setAttribute("class","component-messagebox__cancelbtncontainer");const i=document.createElement("button");i.setAttribute("class","component-messagebox__cancelBtn"),i.innerHTML="x",i.onclick=this.closeView.bind(this),s.appendChild(i),e.appendChild(s),this.messageBoxContainer=e,document.body.appendChild(this.messageBoxContainer)}closeView(){this.messageBoxContainer.hidden=!0}showView(e,t="warring"){"success"===t?(this.icon.setAttribute("class","supermapol-icons-message-success"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-green")):"failure"===t?(this.icon.setAttribute("class","supermapol-icons-message-failure"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-red")):"warring"===t&&(this.icon.setAttribute("class","supermapol-icons-message-warning"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-orange")),this.messageBox.innerHTML=e,this.messageBoxContainer.hidden=!1}}s.Components.MessageBox=_n;var Tn=r(8),En=r.n(Tn);
  /* Copyright© 2000 - 2019 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.*/
  let wn={code:null,defaultCode:"en-US",getCode:function(){return s.Lang.code||s.Lang.setCode(),s.Lang.code},setCode:function(){var e=this.getLanguageFromCookie();e?s.Lang.code=e:(e=s.Lang.defaultCode,0===(e="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage).indexOf("zh")&&(e="zh-CN"),0===e.indexOf("en")&&(e="en-US"),s.Lang.code=e)},getLanguageFromCookie(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){for(var r=e[t];" "===r.charAt(0);)r=r.substring(1);if(-1!==r.indexOf("language="))return r.substring("language=".length,r.length)}return""},i18n:function(e){var t=s.Lang[s.Lang.getCode()],r=t&&t[e];return r||(r=e),r}};s.Lang=wn,s.i18n=s.Lang.i18n;var An=r(5),Ln=r.n(An);
  /* Copyright© 2000 - 2019 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.*/
  let Pn={rABS:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsBinaryString,rABF:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsArrayBuffer,rAT:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsText,readFile(e,t,r,s,i){bn.JSON===e||bn.GEOJSON===e?this.readTextFile(t,r,s,i):bn.EXCEL!==e&&bn.CSV!==e||this.readXLSXFile(t,r,s,i)},readTextFile(e,t,r,s){let i=new FileReader;i.onloadend=function(e){t&&t.call(s,e.target.result)},i.onerror=function(e){r&&r.call(s,e)},this.rAT?i.readAsText(e.file,"utf-8"):i.readAsBinaryString(e.file)},readXLSXFile(e,t,r,s){let i=new FileReader;i.onloadend=function(e){let i=new Uint8Array(e.target.result),a=Ln.a.read(i,{type:"array"});try{if(a&&a.SheetNames&&a.SheetNames.length>0){let e=a.SheetNames[0],r=Ln.a.utils.sheet_to_csv(a.Sheets[e]);t&&t.call(s,r)}}catch(e){r&&r.call(s,e)}},i.onerror=function(e){r&&r.call(s,e)},this.rABF&&i.readAsArrayBuffer(e.file)},processDataToGeoJson(e,t,r,s,i){let a=null;if("EXCEL"===e||"CSV"===e)a=this.processExcelDataToGeoJson(t),r&&r.call(i,a);else if("JSON"===e||"GEOJSON"===e){let e=t;"string"==typeof e&&(e=JSON.parse(e)),"ISERVER"===e.type?a=e.data.recordsets[0].features:"FeatureCollection"===e.type?a=e:s&&s.call(i,wn.i18n("msg_dataInWrongGeoJSONFormat")),r&&r.call(i,a)}else s&&s.call(i,wn.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson(e){let t=this.string2Csv(e),r=t.colTitles,s=-1,i=-1;for(let e=0,t=r.length;e<t;e++)this.isXField(r[e])&&(s=e),this.isYField(r[e])&&(i=e);let a=[];for(let e=0,r=t.rows.length;e<r;e++){let r=t.rows[e],n=Number(r[s]),o=Number(r[i]),l={};for(let r in t.colTitles){l[t.colTitles[r]]=t.rows[e][r]}let h={type:"Feature",geometry:{type:"Point",coordinates:[n,o]},properties:l};a.push(h)}return a},isXField(e){var t=e.toLowerCase();return"x"===t||"smx"===t||"jd"===t||"经度"===t||"东经"===t||"longitude"===t||"lot"===t||"lon"===t||"lng"===t||"x坐标"===t},isYField(e){var t=e.toLowerCase();return"y"===t||"smy"===t||"wd"===t||"纬度"===t||"北纬"===t||"latitude"===t||"lat"===t||"y坐标"===t},string2Csv(e,t){let r=e.split("\n"),s={};s.colTitles=t?[]:r[0].split(","),s.rows=[];for(let e=t?0:1;e<r.length;e++)r[e]&&s.rows.push(r[e].split(","));return s}};s.Components.FileReaderUtil=Pn;
  /* Copyright© 2000 - 2019 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 Nn{constructor(e){this.datasets=e,this.EVENT_TYPES=["getdatafailed"],this.events=new Ie(this,null,this.EVENT_TYPES)}getDatasetInfo(e){let t=this.datasets.url,r=this;et.get(t).then(function(e){return e.json()}).then(function(t){if(t.datasetInfo){let s=t.datasetInfo;r.datasetsInfo={dataSourceName:s.dataSourceName,datasetName:s.name,mapName:t.name},e({result:r.datasetsInfo})}}).catch(function(e){console.log(e),r._fireFailedEvent(e)})}getDataFeatures(e,t){let r,i,a,n=e.result,o={name:n.datasetName+"@"+n.dataSourceName};Object.assign(o,this.datasets.queryInfo),r=new s.FilterParameter(o),i=new s.GetFeaturesBySQLParameters({queryParameter:r,datasetNames:[n.dataSourceName+":"+n.datasetName],fromIndex:0,toIndex:1e5}),(a=new s.GetFeaturesBySQLService(n.dataUrl,{eventListeners:{processCompleted:t,processFailed:function(){}}})).processAsync(i)}getLayerFeatures(e,t){let r,i,a,n=e.result,o={name:n.mapName};Object.assign(o,this.datasets.queryInfo),r=new s.FilterParameter(o),i=new s.QueryBySQLParameters({queryParams:[r],expectCount:1e5}),(a=new s.QueryBySQLService(n.dataUrl,{eventListeners:{processCompleted:t,processFailed:function(){}}})).processAsync(i)}getDataInfoByIptl(e){this.getServiceInfo(this.datasets.url,e)}getServiceInfo(e,t){let r=this;et.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(s=>{if(!1!==s.succeed)if(s.dataItemServices&&s.dataItemServices.length>0){let i;s.dataItemServices.forEach(s=>{if("RESTDATA"===s.serviceType&&"PUBLISHED"===s.serviceStatus)i=s;else{if("RESTMAP"!==s.serviceType||"PUBLISHED"!==s.serviceStatus)return void r.getDatafromContent(e,t);i=s}}),i&&r.getDatafromRest(i.serviceType,i.address,t)}else r.getDatafromContent(e,t);else r._fireFailedEvent(s)}).catch(e=>{console.log(e),r._fireFailedEvent(e)})}getDatafromContent(e,t){let r={result:{}},s=this;e+="/content.json?pageSize=9999999&currentPage=1",et.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(e=>{if(!1!==e.succeed){if(e.type){if("JSON"===e.type||"GEOJSON"===e.type){if(e.content=JSON.parse(e.content.trim()),!e.content.features)return void console.log(wn.i18n("msg_jsonResolveFiled"));let t=this._formatGeoJSON(e.content);r.result.features={type:e.content.type,features:t}}else if("EXCEL"===e.type||"CSV"===e.type){let t=this._excelData2Feature(e.content);r.result.features={type:"FeatureCollection",features:t}}t(r,"content")}}else s._fireFailedEvent(e)},this).catch(e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromRest(e,t,r){let s=this,i=this.datasets.withCredentials;if("RESTDATA"===e){let e,a,n=`${t}/data/datasources`;et.get(n,null,{withCredentials:i}).then(e=>e.json()).then(o=>{e=o.datasourceNames[0],n=`${t}/data/datasources/${e}/datasets`,et.get(n,null,{withCredentials:i}).then(e=>e.json()).then(i=>(a=i.datasetNames[0],s.getDatafromRestData(`${t}/data`,[e+":"+a],r),[e+":"+a])).catch(function(e){s._fireFailedEvent(e)})}).catch(function(e){s._fireFailedEvent(e)})}else{let e,a,n,o=`${t}/maps`;et.get(o,null,{withCredentials:i}).then(e=>e.json()).then(l=>{e=l[0].name,n=l[0].path,o=o=`${t}/maps/${e}/layers`,et.get(o,null,{withCredentials:i}).then(e=>e.json()).then(e=>(a=e[0].subLayers.layers[0].caption,s.getDatafromRestMap(a,n,r),a)).catch(function(e){s._fireFailedEvent(e)})}).catch(function(e){s._fireFailedEvent(e)})}}getDatafromRestData(e,t,r){let s=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,e=>{r(e,"RESTDATA")},e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromRestMap(e,t,r){let s=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,e=>{r(e,"RESTMAP")},e=>{console.log(e),s._fireFailedEvent(e)})}_getFeatureBySQL(e,t,r,s,i){let a,n,o,l={name:t.join().replace(":","@")};Object.assign(l,r),a=new At(l),o=new ss({queryParameter:a,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(n=new is(e,{eventListeners:{processCompleted:e=>{s&&s(e)},processFailed:e=>{i&&i(e)}}})).processAsync(o)}_queryFeatureBySQL(e,t,r,s,i,a,n,l,h,u){var c,d,p={name:t};Object.assign(p,r),c=new At(p),s&&(c.fields=s);var m={queryParams:[c]};u&&(m.queryOption=o.ATTRIBUTE),l&&(m.startRecord=l),h&&(m.expectCount=h),i&&(m.prjCoordSys={epsgCode:i}),d=new mi(m),this._queryBySQL(e,d,e=>{"processCompleted"===e.type?a(e):n(e)})}_queryBySQL(e,t,r,s){new fi(e,{eventListeners:{scope:this,processCompleted:r,processFailed:r},format:this._processFormat(s)}).processAsync(t)}_processFormat(e){return e||i.GEOJSON}_formatGeoJSON(e){let t=e.features;return t.forEach((e,t)=>{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,r=-1,s=-1;for(let e=0,i=t.length;e<i;e++)Pn.isXField(t[e])&&(r=e),Pn.isYField(t[e])&&(s=e);let i=[];for(let t=0,a=e.rows.length;t<a;t++){let a=e.rows[t],n=Number(a[r]),o=Number(a[s]),l={};for(let r in e.colTitles){l[e.colTitles[r]]=e.rows[t][r]}l.index=t+"";let h={type:"Feature",geometry:{type:"Point",coordinates:[n,o]},properties:l};i.push(h)}return i}_fireFailedEvent(e){let t=e?{error:e,message:wn.i18n("msg_getdatafailed")}:{message:wn.i18n("msg_getdatafailed")};this.events.triggerEvent("getdatafailed",t)}}
  /* Copyright© 2000 - 2019 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 Mn{constructor(e){this.datasets=e.datasets,this.xField=[],this.yField=[],this.grid={top:"50px",bottom:"50px",left:"50px",right:"60px"},this.chartType=e.type||"bar",this._initXYField(e.chartOptions),this.EVENT_TYPES=["getdatafailed"],this.events=new Ie(this,null,this.EVENT_TYPES)}_initXYField(e){let t=this;e&&e.length>0&&e.forEach(function(e){e.xAxis&&t.xField.push({field:e.xAxis.field,name:e.xAxis.name}),e.yAxis&&t.yField.push({field:e.yAxis.field,name:e.yAxis.name})})}getDatasetInfo(e){this.createChart=e,this.datasets&&this._checkUrl(this.datasets.url)&&(this.chartModel=new Nn(this.datasets),"iServer"===this.datasets.type?this.chartModel.getDatasetInfo(this._getDatasetInfoSuccess.bind(this)):"iPortal"===this.datasets.type&&this.chartModel.getDataInfoByIptl(this._getDataInfoSuccess.bind(this)),this.chartModel.events.on({getdatafailed:e=>{this.events.triggerEvent("getdatafailed",e)}}))}_getDatasetInfoSuccess(e){let t=this.datasets.url,r=t.indexOf("rest");if(r>0){let s=t.indexOf("/",r+5),i=t.substring(r+5,s),a=t.substring(0,r+4)+"/data";if("maps"===i){let i=t.indexOf("/",s+1),n=t.substring(s+1,i);a=t.substring(0,r+4)+"/maps/"+n,e.result.dataUrl=a,this._getLayerFeatures(e)}else"data"===i&&(e.result.dataUrl=a,this._getDataFeatures(e))}}_getDataInfoSuccess(e,t){let r=this;"RESTMAP"===t?r._getChartDatasFromLayer(e):r._getChartDatas(e)}_getDataFeatures(e){this.chartModel.getDataFeatures(e,this._getChartDatas.bind(this))}_getLayerFeatures(e){this.chartModel.getLayerFeatures(e,this._getChartDatasFromLayer.bind(this))}_getChartDatas(e){if(e){this.features=e.result.features;let t=this.features.features,r={};if(t.length){let e=t[0],s=[],i=[];for(let t in e.properties)s.push(t),i.push(this._getDataType(e.properties[t]));r={features:t,fieldCaptions:s,fieldTypes:i,fieldValues:[]};for(let e in i){let s=[];for(let i in t){let a=t[i],n=r.fieldCaptions[e],o=a.properties[n];s.push(o)}r.fieldValues.push(s)}this.createChart(r)}}}_getChartDatasFromLayer(e){if(e.result.recordsets){let t=e.result.recordsets[0],r=t.features.features;this.features=t.features;let s={};if(r.length){s={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]};for(let e in s.fieldCaptions){let t=[];for(let i in r){let a=r[i],n=s.fieldCaptions[e],o=a.properties[n];t.push(o)}s.fieldValues.push(t)}this.createChart(s)}}}_createChartOptions(e){return this.calculatedData=this._createChartDatas(e),this.updateChartOptions(this.chartType)}changeType(e){if(e!==this.chartType)return this.chartType=e,this.updateChartOptions(this.chartType)}updateData(e,t,r){this.updateChart=r,this.xField=[],this.yField=[],this._initXYField(t),e.type=e.type||"iServer",e.withCredentials=e.withCredentials||!1,this.datasets=e,this.getDatasetInfo(this._updateDataSuccess.bind(this))}_updateDataSuccess(e){let t=this._createChartOptions(e);this.updateChart(t)}updateChartOptions(e,t){if(this.calculatedData){let r=this.grid,s=this._createChartSeries(this.calculatedData,e),i=[];for(let e in this.calculatedData.XData)i.push({value:this.calculatedData.XData[e].fieldsData});let a={type:"category",name:this.xField[0].name||"X",data:i,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},n={type:"value",name:this.yFieldName||"Y",data:{},nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},o={formatter:"{b0}: {c0}"},l="#404a59";return t&&(t.grid&&(r=t.grid),t.tooltip&&(o=t.tooltip),t.backgroundColor&&(l=t.backgroundColor)),{backgroundColor:l,grid:r,series:s,xAxis:a,yAxis:n,tooltip:o}}}_createChartDatas(e){let t=0,r=[],s=e.fieldCaptions,i=this;s.forEach(function(e,r){i.xField[0]&&e===i.xField[0].field&&(t=r)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(i.yFieldName=i.yFieldName+","),i.yFieldName=i.yFieldName+e.name,s.forEach(function(t,s){t===e.field&&r.push(s)})});let a=this._getAttrData(e,t),n=[];if(r.length>0)r.forEach(function(t){let r=[];for(let s in e.fieldValues[t])r.push({value:e.fieldValues[t][s]});n.push(r)});else{let e=[],t=[],r=a.length;for(let s=0;s<r;s++){let r=!1;for(let i=0,n=t.length;i<n;i++)if(a[s].fieldsData===t[i].fieldsData){e[i].value++,t[i].recordIndexs.push(s),r=!0;break}r||a[s].fieldsData&&(t.push({fieldsData:a[s].fieldsData,recordIndexs:[s]}),e.push({value:1}))}a=t,n=[e]}return{XData:a,YData:n}}_getAttrData(e,t){0===t&&(this.xField=[{field:e.fieldCaptions[t],name:e.fieldCaptions[t]}]);let r=[];for(let s=0,i=e.fieldValues[t].length;s<i;s++){let i=e.fieldValues[t][s];r.push({recordIndexs:s,fieldsData:i})}return r}_createChartSeries(e,t){let r=[];return e.YData.forEach(function(e){let s=0,i=[];for(let t of e)s=t.value,i.push({value:s});let a={type:t,data:i,name:"y"};r.push(a)}),r}_isDate(e){return/((^((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.test(e)}_isNumber(e){let t=Number(e);return 0===t||!isNaN(t)}_getDataType(e){if(null!==e&&void 0!==e&&""!==e){if(this._isDate(e))return"DATE";if(this._isNumber(e))return"NUMBER"}return"STRING"}_checkUrl(e){let t;return t=!(""===e||!this._isMatchUrl(e))&&(!/^http[s]?:\/\/localhost/.test(e)&&!/^http[s]?:\/\/127.0.0.1/.test(e))}_isMatchUrl(e){return new RegExp("(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]").test(e)}getStyle(){return{grid:this.grid,tooltip:this.tooltip,backgroundColor:this.backgroundColor}}getFeatures(){return this.features}setStyle(e){return this.updateChartOptions(this.chartType,e)}}s.Components.ChartViewModel=Mn;
  /* Copyright© 2000 - 2019 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 On{constructor(e,t){this.domID=e,this.chartType=t.type||"bar",t.datasets.type=t.datasets.type||"iServer",t.datasets.withCredentials=t.datasets.withCredentials||!1,this.viewModel=new Mn(t),this._fillDataToView()}onAdd(e){this.addChart=e}_fillDataToView(){let e=new _n;this.viewModel.getDatasetInfo(this._createChart.bind(this)),this.viewModel.events.on({getdatafailed:t=>{e.showView(t.message)}})}getStyle(){return this.viewModel.getStyle()}getFeatures(){return this.viewModel.getFeatures()}setStyle(e){let t=this.viewModel.setStyle(e);this._updateChart(t)}changeType(e){if(this.chartType!==e){this.chartType=e;let t=this.viewModel.changeType(e);this._updateChart(t)}}updateData(e,t){let r=this;this.viewModel.updateData(e,t,function(e){r._updateChart(e),r.addChart&&r.addChart()})}_createChart(e){this.echart=En.a.init(document.getElementById(this.domID),null,{renderer:"canvas"});let t=this.viewModel._createChartOptions(e);this.echart.setOption(t),this.addChart&&this.addChart()}_updateChart(e){this.echart&&(this.echart.clear(),this.echart.setOption(e))}}s.Components.Chart=On;
  /* Copyright© 2000 - 2019 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/r* http://www.apache.org/licenses/LICENSE-2.0.html.*/
  class In{constructor(e){e=e||{},this.id=e.id?e.id:null,this.rootContainer=null}getElement(){return this.id&&(this.rootContainer.id=this.id),this.rootContainer}_initView(){}showView(){this.rootContainer.hidden=!1}closeView(){this.rootContainer.hidden=!0}}s.Components.TemplateBase=In;
  /* Copyright© 2000 - 2019 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 Fn extends In{constructor(e){super(e);let t=e.title?e.title:"";this._initView(t)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-container");const r=document.createElement("div");r.setAttribute("class","component-title");const s=document.createElement("div");s.innerHTML=e,r.appendChild(s),t.appendChild(r);const i=document.createElement("div");return i.setAttribute("class","component-content"),t.appendChild(i),this.content=i,this.rootContainer=t,t}getContentElement(){return this.content}appendContent(e){this.content.appendChild(e)}}s.Components.CommonContainer=Fn;
  /* Copyright© 2000 - 2019 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 Rn extends In{constructor(e){super(e),this._initView(e)}_initView(e){let t=this._createElement("div","component-selecttool");if(e.labelName){this._createElement("label","component-selecttool__lable--describe",t).innerHTML=e.labelName}let r=this._createElement("div","component-selecttool--chart",t);r.setAttribute("tabindex","1");let s=this._createElement("div","component-selecttool__name",r);s.title=e.optionsArr[0],s.innerHTML=e.optionsArr[0];let i=this._createElement("div","component-selecttool__trianglebtn--chart",r),a=this._createElement("div","component-triangle-down-img",i),n=this._createElement("div","component-selecttool__content",r),o=this._createElement("div","component-selecttool__content--chart",n),l=this._createElement("div","component-selecttool__scrollarea__content",o);l.setAttribute("tabindex","1"),this.createOptions(l,e.optionsArr),this.optionClickEvent(l,s,e.optionsClickCb),this._selectClickEvent(r,n,a),this.rootContainer=t}createOptions(e,t){for(let r in t){let s=this._createElement("div","component-selecttool__option",e);s.title=t[r],s.innerHTML=t[r]}}_selectClickEvent(e,t,r){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",r.className="component-triangle-down-img"):(t.style.display="block",r.className="triangle-up-img"),e.preventDefault(),e.stopPropagation()},e.onmousedown=function(e){e.target!==this&&(this.focus(),e.preventDefault(),e.stopPropagation())},e.onblur=function(){t.style.display="none",r.className="component-triangle-down-img"}}_createElement(e,t,r){let s=document.createElement(e||"div");return t&&(s.className=t),r&&r.appendChild(s),s}optionClickEvent(e,t,r){for(let s=0;s<e.children.length;s++){let i=e.children[s];i.onclick=function(){t.innerHTML=i.innerHTML,t.title=i.title,i.getAttribute("data-value")&&t.setAttribute("data-value",i.getAttribute("data-value")),r&&r(i)}}}}s.Components.Select=Rn;
  /* Copyright© 2000 - 2019 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 Dn extends In{constructor(e){super(e),this._initView(e)}_initView(e){let t=document.createElement("div");t.className="component-dropdownbox--container";let r=document.createElement("div");r.setAttribute("tabindex","1"),r.className="component-dropdownbox",t.appendChild(r);let s=document.createElement("div");r.appendChild(s),this._createDropDownOption(e[0],s);let i=document.createElement("div");i.className="component-dropdownbox__triangle-btn",r.appendChild(i);let a=document.createElement("div");a.className="component-triangle-down-img",i.appendChild(a);let n={parentEle:r,dropDownContent:["component-dropdownbox__content component-dropdownbox__content--chart","dropDownContent"],scrollareaContent:"component-selecttool__scrollarea__content",optionsArr:e,triangleBtn:a,dropDownTopContainer:s};this._createDropDownBox(n),this.rootContainer=t}_createDropDownBox(e){let t=e.parentEle,r=e.dropDownTopContainer,s=document.createElement("div");s.className=e.dropDownContent[0],t.appendChild(s);let i=document.createElement("div");i.className=e.scrollareaContent,s.appendChild(i);let a=e.optionsArr;for(let e=0;e<a.length;e++)this._createDropDownOption(a[e],i);let n=e.triangleBtn;this._dropDownClickEvent(t,s,n),this._eleOnblur(t,s,n);let o=i.children;for(let e=0;e<o.length;e++)o[e].onclick=function(){r.innerHTML=o[e].outerHTML}}_createDropDownOption(e,t){let r=document.createElement("div");r.className="component-dropdownbox__item";let s=e;s.dataValue&&r.setAttribute("data-value",s.dataValue),t.appendChild(r);let i=document.createElement("div");i.className="component-dropdownbox__item__img",r.appendChild(i);let a=document.createElement("div");s.icon.className&&(a.className=s.icon.className),s.icon.background&&(a.style.background=s.icon.background),i.appendChild(a);let n=document.createElement("div");n.className="component-dropdownbox__item__title",n.title=s.title,n.innerHTML=s.title,r.appendChild(n);let o=document.createElement("div");o.className="component-dropdownbox__item__remark",o.title=s.remark,o.innerHTML=s.remark,r.appendChild(o)}_dropDownClickEvent(e,t,r){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",r.className="component-triangle-down-img"):(t.style.display="block",r.className="triangle-up-img"),e.preventDefault(),e.stopPropagation()},e.onmousedown=function(e){e.target!==this&&(this.focus(),e.preventDefault(),e.stopPropagation())}}_eleOnblur(e,t,r){e.onblur=function(){t.style.display="none",r.className="component-triangle-down-img"}}_createElement(e,t,r){let s=document.createElement(e||"div");return t&&(s.className=t),r&&r.appendChild(s),s}}s.Components.DropDownBox=Dn;
  /* Copyright© 2000 - 2019 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 kn extends In{constructor(e){super(e=e||{}),e.title=e.title?e.title:"",this._initView(e.title)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-popcontainer");const r=document.createElement("div");r.setAttribute("class","component-popcontainer__header");const s=document.createElement("label");s.setAttribute("class","component-popcontainer__header__title"),s.innerHTML=e,r.appendChild(s);const i=document.createElement("span");i.setAttribute("class","supermapol-icons-clear component-popcontainer__header__close"),i.onclick=this.closeView.bind(this),t.appendChild(i),t.appendChild(r);const a=document.createElement("div");a.setAttribute("class","component-popcontainer__content"),this.content=a,t.appendChild(a),this.rootContainer=t}appendContent(e){this.content.appendChild(e)}}s.Components.PopContainer=kn;
  /* Copyright© 2000 - 2019 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 Bn extends kn{constructor(e){e.title=e.title?e.title:"属性",super(e),this.rootContainer.firstChild.hidden=!0,e.attributes=e.attributes?e.attributes:[],this._createAttributesTable(e.attributes)}_createAttributesTable(e){const t=document.createElement("table");t.setAttribute("class","component-popcontainer__content__table");const r=document.createElement("tbody");let s=!0;for(let t in e){const i=document.createElement("tr");s&&i.setAttribute("class","component-popcontainer__content__td--color");const a=document.createElement("td"),n=document.createElement("Span");n.innerHTML=t,a.appendChild(n);const o=document.createElement("td");o.innerHTML=e[t],i.appendChild(a),i.appendChild(o),r.appendChild(i),s=!s}t.appendChild(r),this.appendContent(t)}}s.Components.AttributesPopContainer=Bn;
  /* Copyright© 2000 - 2019 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 Gn extends In{constructor(e){super(e),this._initView()}_initView(){const e=document.createElement("div");e.setAttribute("class","component-tabpage");const t=document.createElement("ul");this.header=t;const r=document.createElement("div");r.setAttribute("class","component-tabpage__content"),this.content=r,e.appendChild(t),e.appendChild(r),this.rootContainer=e}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t<e.length;t++){let r=document.createElement("span");r.index=t,r.appendChild(document.createTextNode(e[t].title)),r.onclick=this._changeTabsPage.bind(this);let s=e[t].content;s.index=t,s.hidden=!0,this.header.appendChild(r),this.content.appendChild(s)}this.header.firstChild.setAttribute("class","on"),this.content.firstChild.hidden=!1}removeTab(e){this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}removeAllTabs(){for(let e=this.header.children.length;e>0;e--)this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e<this.header.children.length;e++)this.header.children[e].setAttribute("class",""),this.content.children[e].hidden=!0,e===t&&(this.header.children[e].setAttribute("class","on"),this.content.children[e].hidden=!1)}}s.Components.IndexTabsPageContainer=Gn;
  /* Copyright© 2000 - 2019 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 Un extends Gn{constructor(e){super(e),this.rootContainer.classList.add("component-citytabpage--noneBoxShadow"),this.config=e.config,ye.isArray(this.config)?(this.header.hidden=!0,this._createCityItem("城市",this.config),this.content.style.border="none"):(this._createTabs(),this.header.onclick=(e=>{for(let e=0;e<this.header.children.length;e++)this.header.children[e].setAttribute("class","");e.target.setAttribute("class","on"),this._createCityContent(e.target.innerHTML)}))}_createTabs(){if(ye.isArray(this.config))for(let e=0;e<this.config.length;e++){let t="";for(const r in this.config[e])t+=r;let r=document.createElement("li");r.innerHTML=t,this.header.appendChild(r)}else for(const e in this.config){let t=document.createElement("li");t.innerHTML=e,this.header.appendChild(t)}this.header.firstChild.setAttribute("class","on"),this._createCityContent(this.header.firstChild.innerHTML)}_createCityContent(e){for(let e=this.content.children.length;e>0;e--)this.content.removeChild(this.content.children[e-1]);const t=this.config[e];for(let e in t)this._createCityItem(e,t[e])}_createCityItem(e,t){const r=document.createElement("div"),s=document.createElement("div");s.setAttribute("class","component-citytabpag__py-key"),s.innerHTML=e,r.appendChild(s);const i=document.createElement("div");i.setAttribute("class","component-citytabpag__content");for(let e=0;e<t.length;e++){let r=document.createElement("span");r.innerHTML=t[e],i.appendChild(r)}"HOT"===e&&(i.style.width="428px"),r.appendChild(i),this.content.appendChild(r)}}s.Components.CityTabsPage=Un;
  /* Copyright© 2000 - 2019 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 jn extends In{constructor(e){super(e),this.navTabsTitle=null,this.navTabsContent=null,e.tabs=e.tabs?e.tabs:[],this._initView(e.tabs)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-navtabspage");const r=document.createElement("span");r.setAttribute("class","supermapol-icons-close"),r.onclick=this.closeView.bind(this),t.appendChild(r);const s=document.createElement("div");this.navTabsTitle=s,s.setAttribute("class","component-navtabspage__title"),t.appendChild(s);const i=document.createElement("div");this.navTabsContent=i,i.setAttribute("class","component-navtabspage__content"),t.appendChild(i),e.length>0&&this.appendTabs(e),this.rootContainer=t}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t<e.length;t++){let r=document.createElement("span");r.index=t,r.appendChild(document.createTextNode(e[t].title)),r.onclick=this._changeTabsPage.bind(this);let s=e[t].content;s.index=t,s.hidden=!0,this.navTabsTitle.appendChild(r),this.navTabsContent.appendChild(s)}this.navTabsTitle.firstChild.setAttribute("class","component-navtabspage__tabs--select"),this.navTabsContent.firstChild.hidden=!1}removeTab(e){this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}removeAllTabs(){for(let e=this.navTabsTitle.children.length;e>0;e--)this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e<this.navTabsTitle.children.length;e++)this.navTabsTitle.children[e].setAttribute("class",""),this.navTabsContent.children[e].hidden=!0,e===t&&(this.navTabsTitle.children[e].setAttribute("class","component-navtabspage__tabs--select"),this.navTabsContent.children[e].hidden=!1)}}s.Components.NavTabsPage=jn;
  /* Copyright© 2000 - 2019 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 Hn extends In{constructor(e){super(e=e||{}),this.currentPage=0,this.pageNumberLis=[],this.currentPageNumberLis=[],this.linkageEvent=null,e.contents=e.contents?e.contents:null,e.pageCounts=e.pageCounts?e.pageCounts:0,this._initView(e.contents,e.pageCounts)}setLinkageEvent(e){this.linkageEvent=e}_initView(e,t){const r=document.createElement("div");r.setAttribute("class","component-pagination");const s=document.createElement("div");s.setAttribute("class","component-pagination__content"),r.appendChild(s),this.content=s;const i=document.createElement("ul");i.setAttribute("class","component-pagination__link"),i.onclick=this._changePageEvent.bind(this),r.appendChild(i),this._createLink(i),this.link=i,e&&this.setContent(e),0!==t&&this.setPageLink(t),this.rootContainer=r}setContent(e){this.clearContent(),this.appendContent(e)}appendContent(e){this.content.appendChild(e)}clearContent(){for(let e=this.content.children.length-1;e>=0;e--)this.content.removeChild(this.content.children[e])}setPageLink(e){this.pageNumberLis=[],this.currentPageNumberLis=[],this.clearPageLink(),this._createPageLi(e),this._appendPageLink()}_createPageLi(e){for(let t=0;t<e;t++){const e=document.createElement("li");e.innerHTML=t+1,this.pageNumberLis.push(e)}if(this.pageNumberLis[0].setAttribute("class","active"),this.currentPage=1,e<5)this.currentPageNumberLis=this.pageNumberLis;else for(let e=0;e<5;e++)this.currentPageNumberLis.push(this.pageNumberLis[e])}_appendPageLink(){for(let e=0;e<this.currentPageNumberLis.length;e++)this.link.insertBefore(this.currentPageNumberLis[e],this.link.childNodes[this.link.children.length-2]);for(let e=0;e<this.currentPageNumberLis.length;e++)this.currentPageNumberLis[e].setAttribute("class",""),Number(this.currentPageNumberLis[e].innerHTML)===this.currentPage&&this.currentPageNumberLis[e].setAttribute("class","active");this._changeDisableState(),this.linkageEvent&&this.linkageEvent(this.currentPage)}clearPageLink(){for(let e=this.link.children.length-3;e>1;e--)this.link.removeChild(this.link.children[e])}_createLink(e){for(let t=0;t<4;t++){const r=document.createElement("li");r.setAttribute("class","disable");const s=document.createElement("span");r.appendChild(s),0===t?(s.id="first",s.setAttribute("class","supermapol-icons-first")):1===t?(s.id="prev",s.setAttribute("class","supermapol-icons-prev")):2===t?(s.id="next",s.setAttribute("class","supermapol-icons-next")):3===t&&(s.id="last",s.setAttribute("class","supermapol-icons-last")),e.appendChild(r)}}_changePageEvent(e){const t=e.target;if("disable"===t.parentElement.classList[0])return;let r;if(t.id)r=t.id;else{if(!Number(t.innerHTML))return;r=Number(t.innerHTML)}this._prePageNum(r),this.clearPageLink(),this._appendPageLink()}_changeDisableState(){this.link.children[0].setAttribute("class",""),this.link.children[1].setAttribute("class",""),this.link.children[this.link.children.length-1].setAttribute("class",""),this.link.children[this.link.children.length-2].setAttribute("class",""),1===this.currentPage&&(this.link.children[0].setAttribute("class","disable"),this.link.children[1].setAttribute("class","disable")),this.currentPage===this.pageNumberLis.length&&(this.link.children[this.link.children.length-1].setAttribute("class","disable"),this.link.children[this.link.children.length-2].setAttribute("class","disable"))}_prePageNum(e){const t=[];if(this.currentPage="first"===e?1:"last"===e?this.pageNumberLis.length:"prev"===e?this.currentPage-1:"next"===e?this.currentPage+1:e,this.pageNumberLis.length<=5)for(let e=0;e<this.pageNumberLis.length;e++)t.push(this.pageNumberLis[e]);else if(this.currentPage<=3)for(let e=0;e<5;e++)t.push(this.pageNumberLis[e]);else if(this.currentPage>=this.pageNumberLis.length-3)for(let e=this.pageNumberLis.length-5;e<this.pageNumberLis.length;e++)t.push(this.pageNumberLis[e]);else for(let e=this.currentPage-3;e<=this.currentPage+1;e++)t.push(this.pageNumberLis[e]);t.length>0&&(this.currentPageNumberLis=t)}}s.Components.PaginationContainer=Hn;
  /* Copyright© 2000 - 2019 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.*/
  let Jn={getFileType:e=>/^.*\.(?:xls|xlsx)$/i.test(e)?bn.EXCEL:/^.*\.(?:csv)$/i.test(e)?bn.CSV:/^.*\.(?:geojson|json)$/i.test(e)?bn.GEOJSON:null};
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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.*/s.Lang["en-US"]={title_dataFlowService:"Data Flow Service",title_distributedAnalysis:"Distributed Analysis",title_clientComputing:"Client Computing",title_dataServiceQuery:"Data Service Query",title_searchCity:"Search city",title_searchLayer:" Search layer",text_input_value_inputDataFlowUrl:"Please enter the data stream service address such as: ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"Display feature information",text_subscribe:"subscribe",text_cancelSubscribe:"unsubscribe",text_densityAnalysis:"Density Analysis",text_CalculateTheValuePerUnitArea:"Calculate the value per unit area within the neighborhood shape",text_option_selectDataset:"Please select a dataset",text_label_dataset:"Dataset",text_option_simplePointDensityAnalysis:"Simple point density analysis",text_option_nuclearDensityAnalysis:"Nuclear density analysis",text_label_analyticalMethod:"Analytical method",text_option_quadrilateral:"Quadrilateral",text_option_hexagon:"hexagon",text_label_meshType:"Mesh type",text_option_notSet:"Not set",text_label_weightField:"Weight field",text_label_gridSizeInMeters:"Grid size",text_label_searchRadius:"Search radius",text_label_queryRange:"Scope of analysis",text_label_areaUnit:"Area unit",text_option_equidistantSegmentation:"Equidistant segmentation",text_option_logarithm:"Logarithm",text_option_equalCountingSegment:"Equal counting segment",text_option_squareRootSegmentation:"Square root segmentation",text_label_thematicMapSegmentationMode:"Thematic map segmentation mode",text_label_thematicMapSegmentationParameters:"Thematic map segmentation parameters",text_option_greenOrangePurpleGradient:"Green orange purple gradient",text_option_greenOrangeRedGradient:"Green orange red gradient",text_option_rainbowGradient:"Rainbow gradient",text_option_spectralGradient:"Spectral gradient",text_option_terrainGradient:"Terrain gradient",text_label_thematicMapColorGradientMode:"Thematic map color gradient mode",text_label_resultLayerName:"Result layer name",text_chooseFile:"Open File",text_isoline:"Isoline",text_extractDiscreteValue:"Extract discrete value generation curve",text_buffer:"Buffer",text_specifyTheDistance:"Specify the distance to create the surrounding area",text_label_analysisLayer:"Analysis layer",text_label_extractField:"Extract field",text_label_extractedValue:"Extracted value",text_label_distanceAttenuation:"Distance attenuation",text_label_gridSize:"gridSize",text_label_bufferRadius:"Buffer radius",text_label_defaultkilometers:"Default 10 kilometers",text_label_kilometer:"kilometer",text_label_unit:"unit",text_retainOriginal:"Retain original object field",text_mergeBuffer:"Merge buffer",text_label_color:"Color",text_label_buffer:"[Buffer]",text_label_isolines:"[Isolines]",text_label_queryRangeTips:"The default is the full range of input data. Example: -74.050, 40.650, -73.850, 40.850",text_label_queryModel:"Query mode",text_label_IDArrayOfFeatures:"ID array of features",text_label_maxFeatures:"The maximum number of features that can be returned",text_label_bufferDistance:"Buffer distance",text_label_queryRange1:"Query range",text_label_spatialQueryMode:"Spatial query mode",text_label_featureFilter:"Feature filter",text_label_geometricObject:"Geometric object",text_label_queryMode:"Query mode",text_label_searchTips:"Search for city locations or layer features",text_label_chooseSearchLayers:"Select a query layer",text_loadSearchCriteria:"Load search criteria",text_saveSearchCriteria:"Save search criteria",btn_analyze:"Analyze",btn_analyzing:"Analyzing",btn_emptyTheAnalysisLayer:"Empty the analysis layer",btn_cancelAnalysis:"Cancel",btn_query:"Query",btn_querying:"Querying",btn_emptyTheRresultLayer:"Clear all result layers","msg_dataReturnedIsEmpty.":"The request is successful and the data returned by the query is empty.",msg_dataFlowServiceHasBeenSubscribed:"The data stream service has been subscribed to.",msg_inputDataFlowUrlFirst:"Please enter the data stream service address first.",msg_datasetOrMethodUnsupport:"This dataset does not support this analysis type. Please reselect the dataset.",msg_selectDataset:"Please select a data set!",msg_setTheWeightField:"Please set the weight field!",msg_theFieldNotSupportAnalysis:"The field you currently select does not support analysis!",msg_resultIsEmpty:"The result of the analysis is empty!",msg_openFileFail:"Failed to open file!",msg_fileTypeUnsupported:"File format is not supported!",msg_fileSizeExceeded:"File size exceeded! The file size should not exceed 10M!",msg_dataInWrongGeoJSONFormat:"Wrong data format! Non standard GEOJSON format data!",msg_dataInWrongFormat:"Wrong data format! Non standard EXCEL, CSV or GEOJSON format data!",msg_searchKeywords:"Search keywords cannot be empty. Please enter your search criteria.",msg_searchGeocodeField:"Did not match the address matching service data!",msg_cityGeocodeField:"The address matching service of the current city is not configured.",msg_getFeatureField:"No related vector features found!",msg_dataflowservicesubscribed:"The data stream service has been subscribed to.",msg_subscribesucceeded:"The data stream service subscription was successful.",msg_crsunsupport:"Does not support the coordinate system of the current map",msg_tilematrixsetunsupport:"Incoming TileMatrixSet is not supported",msg_jsonResolveFiled:"JSON format parsing failure！",msg_requestContentFiled:"Failed to request data through iportal!",msg_getdatafailed:"Failed to get data!"};s.Lang["zh-CN"]={title_dataFlowService:"数据流服务",title_distributedAnalysis:"分布式分析",title_clientComputing:"客户端计算",title_dataServiceQuery:"数据服务查询",title_searchCity:"搜索城市",title_searchLayer:"搜索图层",text_input_value_inputDataFlowUrl:"请输入数据流服务地址如:ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"显示要素信息",text_subscribe:"订阅",text_cancelSubscribe:"取消订阅",text_densityAnalysis:"密度分析",text_CalculateTheValuePerUnitArea:"计算点指定邻域形状内的每单位面积量值",text_option_selectDataset:"请选择数据集",text_label_dataset:"数据集",text_option_simplePointDensityAnalysis:"简单点密度分析",text_option_nuclearDensityAnalysis:"核密度分析",text_label_analyticalMethod:"分析方法",text_option_quadrilateral:"四边形",text_option_hexagon:"六边形",text_label_meshType:"网格面类型",text_option_notSet:"未设置",text_label_weightField:"权重字段",text_label_gridSizeInMeters:"网格大小",text_label_searchRadius:"搜索半径",text_label_queryRange:"分析范围",text_label_areaUnit:"面积单位",text_option_equidistantSegmentation:"等距离分段",text_option_logarithm:"对数",text_option_equalCountingSegment:"等计数分段",text_option_squareRootSegmentation:"平方根分段",text_label_thematicMapSegmentationMode:"专题图分段模式",text_label_thematicMapSegmentationParameters:"专题图分段参数",text_option_greenOrangePurpleGradient:"绿橙紫渐变",text_option_greenOrangeRedGradient:"绿橙红渐变",text_option_rainbowGradient:"彩虹渐变",text_option_spectralGradient:"光谱渐变",text_option_terrainGradient:"地形渐变",text_label_thematicMapColorGradientMode:"专题图颜色渐变模式",text_label_resultLayerName:"结果图层名称",text_chooseFile:"选择文件",text_isoline:"等值线",text_extractDiscreteValue:"提取离散值生成曲线",text_buffer:"缓冲区",text_specifyTheDistance:"指定距离创建周边区域",text_label_analysisLayer:"分析图层",text_label_extractField:"提取字段",text_label_extractedValue:"提取值",text_label_distanceAttenuation:"距离衰减",text_label_gridSize:"栅格大小",text_label_bufferRadius:"缓冲半径",text_label_defaultkilometers:"默认10千米",text_option_kilometer:"千米",text_label_unit:"单位",text_retainOriginal:"保留原对象字段属性",text_mergeBuffer:"合并缓冲区",text_label_color:"颜色",text_label_buffer:"[缓冲区]",text_label_isolines:"[等值线]",text_label_queryRangeTips:"默认为输入数据的全幅范围。范例：-74.050,40.650,-73.850,40.850",text_label_IDArrayOfFeatures:"要素 ID 数组",text_label_maxFeatures:"最多可返回的要素数量",text_label_bufferDistance:"缓冲区距离",text_label_queryRange1:"查询范围",text_label_spatialQueryMode:"空间查询模式",text_label_featureFilter:"要素过滤器",text_label_geometricObject:"几何对象",text_label_queryMode:"查询模式",text_label_searchTips:"搜索城市地点或图层要素",text_label_chooseSearchLayers:"选择查询图层",text_loadSearchCriteria:"加载搜索条件",text_saveSearchCriteria:"保存搜索条件",btn_analyze:"分析",btn_analyzing:"分析中",btn_emptyTheAnalysisLayer:"清空分析图层",btn_cancelAnalysis:"取消",btn_query:"查询",btn_querying:"查询中",btn_emptyTheRresultLayer:"清除所有结果图层",msg_dataFlowServiceHasBeenSubscribed:"已订阅该数据流服务。",msg_inputDataFlowUrlFirst:"请先输入数据流服务地址。",msg_datasetOrMethodUnsupport:"该数据集不支持本分析类型，请重新选择数据集",msg_selectDataset:"请选择数据集！",msg_setTheWeightField:"请设置权重字段！",msg_theFieldNotSupportAnalysis:"您当前选择的字段不支持分析！",msg_resultIsEmpty:"分析的结果为空！",msg_dataReturnedIsEmpty:"请求成功，查询返回的数据为空。",msg_openFileFail:"打开文件失败！",msg_fileTypeUnsupported:"不支持该文件格式！",msg_fileSizeExceeded:"文件大小超限！文件大小不得超过 10M！",msg_dataInWrongGeoJSONFormat:"数据格式错误！非标准的 GEOJSON 格式数据！",msg_dataInWrongFormat:"数据格式错误！非标准的 EXCEL, CSV 或 GEOJSON 格式数据！",msg_searchKeywords:"搜索关键字不能为空，请输入搜索条件。",msg_searchGeocodeField:"未匹配到地址匹配服务数据！",msg_cityGeocodeField:"未配置当前城市的地址匹配服务。",msg_getFeatureField:"未查找到相关矢量要素！",msg_dataflowservicesubscribed:"已订阅该数据流服务。",msg_subscribesucceeded:"数据流服务订阅成功。",msg_crsunsupport:"不支持当前地图的坐标系",msg_tilematrixsetunsupport:"不支持传入的TileMatrixSet",msg_jsonResolveFiled:"json格式解析失败！",msg_requestContentFiled:"通过iportal请求数据失败！",msg_getdatafailed:"获取数据失败！"};
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 Vn=r(0),zn=r.n(Vn),Wn=function(){zn.a.Map.prototype.overlayLayersManager={},zn.a.Map.prototype.addLayerBak=zn.a.Map.prototype.addLayer,zn.a.Map.prototype.addLayer=function(e,t){return e.source||"custom"===e.type?(this.addLayerBak(e,t),this):this.overlayLayersManager[e.id]||this.style._layers[e.id]?void this.fire("error",{error:new Error("A layer with this id already exists.")}):(function(e,t){e.onAdd(t)}(e,this),this.overlayLayersManager[e.id]=e,this)},zn.a.Map.prototype.getLayer=function(e){return this.overlayLayersManager[e]?this.overlayLayersManager[e]:this.style.getLayer(e)},zn.a.Map.prototype.moveLayer=function(e,t){return this.overlayLayersManager[e]?(function(e,t){var r=document.getElementById(e);if(t){var s=document.getElementById(t);s||zn.a.Evented.prototype.fire("error",{error:new Error(`Layer with id "${t}" does not exist on this document.`)})}r&&s?s.parentNode.insertBefore(r,s):r.parentNode.appendChild(r)}(e,t),this):this.style._layers[e]?(this.style.moveLayer(e,t),this._update(!0),this):void 0},zn.a.Map.prototype.removeLayer=function(e){return this.overlayLayersManager[e]?(this.overlayLayersManager[e].removeFromMap(),delete this.overlayLayersManager[e],this):(this.style.removeLayer(e),this._update(!0),this)},zn.a.Map.prototype.setLayoutProperty=function(e,t,r){return this.overlayLayersManager[e]?("visibility"===t&&(r="visible"===r,s=this.overlayLayersManager[e],i=r,s.setVisibility(i),this.style.fire("data",{dataType:"style"})),this):(this.style.setLayoutProperty(e,t,r),this._update(!0),this);var s,i},zn.a.Map.prototype.updateTransform=function(e,t,r,s,i,a,n){this.transform.units=e,this.transform.latRange=[this._tileExtent[1],this._tileExtent[3]],this.transform.lngRange=[this._tileExtent[0],this._tileExtent[2]];var o=this.mercatorZfromAltitude;zn.a.MercatorCoordinate.fromLngLat=function(e,s){s=s||0;const i=zn.a.LngLat.convert(e);return new zn.a.MercatorCoordinate((i.lng-t)/a,(r-i.lat)/n,o(s,i.lat))},zn.a.MercatorCoordinate.prototype.toLngLat=function(){return new zn.a.LngLat(this.x*a+t,r-this.y*n)},this.customConvertPoint=window.URL.createObjectURL(new Blob(["customConvertPoint = {projectX:function(x){return (x - "+s+") / "+a+" + 0.5},projectY:function(y){y = 0.5 - ((y - "+i+") / "+n+");return y < 0 ? 0 : y > 1 ? 1 : y;},toY:function(y){return (0.5-y)*"+n+"+"+i+";}}"],{type:"text/javascript"}))}}();
  /* Copyright© 2000 - 2019 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.*/
  zn.a.supermap=zn.a.supermap||{};
  /* Copyright© 2000 - 2019 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 qn{constructor(e){this.imageUrl=null,this.link=null,this.width=null,this.height=null,this.alt="SuperMap iClient",this._extend(this,e)}onAdd(e){this._map=e,this._container=document.createElement("div"),this._container.className="mapboxgl-ctrl iclient-logo",this._container.style.marginTop=0,this._container.style.marginBottom=0,this._container.style.marginLeft=0,this._container.style.marginRight=0;var t=Ve;this.imageUrl&&(t=this.imageUrl);var r=this.alt,s="94px",i="29px",a="width:"+s+";height:"+i+";";this.imageUrl&&(a="width:"+(s=this.width)+";height:"+(i=this.height)+";",s&&i||(a=""));var n=this.link||"http://iclient.supermap.io";return this._container.innerHTML="<a href='"+n+"' target='_blank'><img src="+t+" alt='"+r+"' style='"+a+"margin-bottom: 2px'></a>",this._createStyleSheet(),this._container}_createStyleSheet(){var e=document.createElement("style");e.type="text/css",e.innerHTML=".iclient-logo{margin:0 !important;}.iclient-logo a{border: none;display: block;height:31px;}.iclient-logo img{border: none;white-space: nowrap}",document.getElementsByTagName("head")[0].appendChild(e)}_extend(e){for(var t=0;t<Object.getOwnPropertyNames(arguments).length;t++){var r=Object.getOwnPropertyNames(arguments)[t];if("caller"!=r&&"callee"!=r&&"length"!=r&&"arguments"!=r){var s=arguments[r];if(s)for(var i=0;i<Object.getOwnPropertyNames(s).length;i++){var a=Object.getOwnPropertyNames(s)[i];"caller"!=r&&"callee"!=r&&"length"!=r&&"arguments"!=r&&(e[a]=s[a])}}}return e}}zn.a.supermap.LogoControl=qn;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 Yn{static toSuperMapGeometry(e){if(e&&e.type)return(new Je).read(e,"FeatureCollection")[0].geometry}static toSuperMapBounds(e){return this.isArray(e)?new ve(e[0],e[1],e[2],e[3]):new ve(e.getWest(),e.getSouth(),e.getEast(),e.getNorth())}static toSuperMapPoint(e){return this.isArray(e)?new _e(e[0],e[1]):e.lng&&e.lat?new _e(e.lng,e.lat):new _e(e.geometry.coordinates[0],e.geometry.coordinates[1])}static toSuperMapPolygon(e){const t=e.getWest(),r=e.getEast(),s=e.getSouth(),i=e.getNorth();return new Pe([new we([new _e(t,s),new _e(r,s),new _e(r,i),new _e(t,i)])])}static isArray(e){return"[object Array]"==Object.prototype.toString.call(e)}static toGeoJSON(e){if(e)return(new Je).toGeoJSON(e)}static toProcessingParam(e){var t={};if(e.length<1)t="";else{for(var r=[],s=0;s<e.length;s++){var i={};i.x=e[s][0],i.y=e[s][1],r.push(i)}t.type="REGION",t.points=r}return t}static extend(e){for(var t=0;t<Object.getOwnPropertyNames(arguments).length;t++){var r=Object.getOwnPropertyNames(arguments)[t];if("caller"!=r&&"callee"!=r&&"length"!=r&&"arguments"!=r){var s=arguments[r];if(s)for(var i=0;i<Object.getOwnPropertyNames(s).length;i++){var a=Object.getOwnPropertyNames(s)[i];"caller"!=r&&"callee"!=r&&"length"!=r&&"arguments"!=r&&(e[a]=s[a])}}}return e}static isNumber(e){if(""===e)return!1;let t=Number(e);return 0===t||!isNaN(t)}static isString(e){return"string"==typeof e&&e.constructor===String}static newGuid(e){let t=e||32,r="";for(let e=1;e<t;e++){r+=Math.floor(16*Math.random()).toString(16)}return r}static hexToRgba(e,t){var r=[],s=[];if(3==(e=e.replace(/#/,"")).length){var i=[];for(let t=0;t<3;t++)i.push(e.charAt(t)+e.charAt(t));e=i.join("")}for(let t=0;t<6;t+=2)r[t]="0x"+e.substr(t,2),s.push(parseInt(Number(r[t])));return s.push(t),"rgba("+s.join(",")+")"}static isMatchAdministrativeName(e,t){if(this.isString(t)){let r=e.substr(0,2);return"张家"===r&&(r=e.substr(0,3)),!!t.match(new RegExp(r))}return!1}}zn.a.supermap.Util=Yn;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 Qn{constructor(e,t){this.geometry=e,this.attributes=t}toFeature(){var e=Yn.toSuperMapGeometry(this.geometry),t=[];return this.geometry instanceof zn.a.LngLat?t=[this.geometry.lng,this.geometry.lat]:this.geometry instanceof zn.a.Point?t=[this.geometry.x,this.geometry.y]:3===this.geometry.length&&(e=new Ee(this.geometry[0],this.geometry[1],this.geometry[2])),t.length>1&&(e=new _e(t[0],t[1])),new Re(e,this.attributes)}}zn.a.supermap.ThemeFeature=Qn;
  /* Copyright© 2000 - 2019 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 Xn{constructor(e,t){var r=t||{};this.name=e,this.id=r.id?r.id:ye.createUniqueID("themeLayer_"),this.opacity=r.opacity?r.opacity:1,this.visibility=!0,this.loadWhileAnimating=void 0===r.loadWhileAnimating||r.loadWhileAnimating,this.map=r.map?r.map:null,this.features=[],this.TFEvents=[],this.map&&this.map.addLayer(this)}onAdd(e){this.map=e,this._createCanvasContainer(),this.addTFEvents(),this.map.on("resize",this.resizeEvent.bind(this)),this.map.on("zoomstart",this.zoomStartEvent.bind(this)),this.map.on("zoomend",this.zoomEndEvent.bind(this)),this.map.on("rotatestart",this.rotateStartEvent.bind(this)),this.map.on("rotate",this.rotateEvent.bind(this)),this.map.on("rotateend",this.rotateEndEvent.bind(this)),this.map.on("dragend",this.dragEndEvent.bind(this)),this.map.on("movestart",this.moveStartEvent.bind(this)),this.map.on("move",this.moveEvent.bind(this)),this.map.on("moveend",this.moveEndEvent.bind(this)),this.map.on("remove",this.removeFromMap.bind(this)),this.refresh()}refresh(){0!==this.features.length&&this.map&&this.redrawThematicFeatures(this.map.getBounds())}_createCanvasContainer(){this.movingOffset=[0,0],this.mapContainer=this.map.getCanvasContainer(),this.div=document.createElement("div"),this.div.id=this.id,this.div.style.position="absolute";var e=this.map.getCanvasContainer(),t=this.map.getCanvas();this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px",this.div.style.width=t.style.width,this.div.style.height=t.style.height,this.div.className="themeLayer",this.div.width=parseInt(t.width),this.div.height=parseInt(t.height),e.appendChild(this.div),this.setOpacity(this.opacity),this.levelRenderer=new Sn,this.renderer=this.levelRenderer.init(this.div),this.renderer.clear()}destroyFeatures(e){if(void 0==e&&(e=this.features),e){this.removeFeatures(e);for(var t=e.length-1;t>=0;t--)e[t].destroy()}}setVisibility(e){e!==this.visibility&&(this.visibility=e,this.display(e),this.redrawThematicFeatures(this.map.getBounds()))}display(e){this.div.style.display=e?"block":"none"}setOpacity(e){if(e!==this.opacity){this.opacity=e;var t=this.div;ye.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&zn.a.Evented.prototype.fire("changelayer",{layer:this,property:"opacity"})}}addFeatures(e){}removeFeatures(e){if(e&&0!==e.length){if(e===this.features)return this.removeAllFeatures();ye.isArray(e)||(e=[e]);for(var t=[],r=e.length-1;r>=0;r--){var s=e[r],i=ye.indexOf(this.features,s);-1!==i?this.features.splice(i,1):t.push(s)}for(var a=[],n=0,o=this.features.length;n<o;n++)s=this.features[n],a.push(s);this.features=[],this.addFeatures(a),this.renderer&&this.redrawThematicFeatures(this.map.getBounds());var l=0==t.length;zn.a.Evented.prototype.fire("featuresremoved",{features:t,succeed:l})}}removeAllFeatures(){this.renderer&&this.renderer.clear(),this.features=[],zn.a.Evented.prototype.fire("featuresremoved",{features:[],succeed:!0})}getFeatures(){for(var e=this.features.length,t=new Array(e),r=0;r<e;++r)t[r]=this.features[r];return t}getFeatureBy(e,t){var r=null;for(var s in this.features)if(this.features[s][e]===t){r=this.features[s];break}return r}getFeatureById(e){return this.getFeatureBy("id",e)}getFeaturesByAttribute(e,t){var r,s=[];for(var i in this.features)(r=this.features[i])&&r.attributes&&r.attributes[e]===t&&s.push(r);return s}redrawThematicFeatures(e){}on(e,t,r){return this.renderer?this.renderer.on(e,t):this.map.on(e,t),this}off(e,t,r){return this.renderer?this.renderer.off(e,t):this.map.off(e,t),this}addTFEvents(){for(var e=this.TFEvents,t=e.length,r=0;r<t;r++)this.renderer.on(e[r][0],e[r][1])}getLocalXY(e){var t,r=this.map;if(e instanceof _e||e instanceof Ee){let s=r.project(new zn.a.LngLat(e.x,e.y));t=[s.x,s.y]}if(e instanceof ge){let s=r.project(new zn.a.LngLat(e.lon,e.lat));t=[s.x,s.y]}return t}toiClientFeature(e){ye.isArray(e)||(e=[e]);let t=[];for(let r=0;r<e.length;r++)if(e[r]instanceof Qn)t.push(e[r].toFeature());else if(e[r]instanceof Re)t.push(e[r]);else if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e[r].type)){let s=new Je;t=t.concat(s.read(e[r]))}else{if(!e[r].geometry||!e[r].geometry.parts)throw new Error("features's type is not be supported.");t.push(bi.fromJson(e[r]).toFeature())}return t}toFeature(e){return this.toiClientFeature(e)}moveEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.div.style.transform="",this.redrawThematicFeatures(this.map.getBounds()),this._show())}moveStartEvent(){if(!this.loadWhileAnimating&&this.visibility){this.startPitch=this.map.getPitch(),this.startBearing=this.map.getBearing();var e=this.map.project(new zn.a.LngLat(0,0));this.startMoveX=e.x,this.startMoveY=e.y}}moveEvent(){if(!this.loadWhileAnimating&&this.visibility){if(!this.rotating&&!this.zooming){0!==this.map.getPitch()&&this._hide(),this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing,r=this.map.project(new zn.a.LngLat(0,0)),s=r.x-this.startMoveX,i=r.y-this.startMoveY;this.div.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg) translate3d("+s+"px, "+i+"px, 0px)"}}else this.redrawThematicFeatures(this.map.getBounds())}zoomStartEvent(){!this.loadWhileAnimating&&this.visibility&&(this.zooming=!0,this._hide())}zoomEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.zooming=!1,this._show())}rotateStartEvent(){!this.loadWhileAnimating&&this.visibility&&(this.rotating=!0)}rotateEvent(){if(!this.loadWhileAnimating&&this.visibility){0!==this.map.getPitch()&&this._hide(),this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing;this.div.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg)"}}rotateEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.rotating=!1,this._show())}dragEndEvent(){!this.loadWhileAnimating&&this.visibility&&this._hide()}resizeEvent(){this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getCanvas();this.div.style.width=e.style.width,this.div.style.height=e.style.height,this.div.width=parseInt(e.width),this.div.height=parseInt(e.height),this.renderer.resize()}removeFromMap(){this.mapContainer.removeChild(this.div),this.removeAllFeatures()}moveTo(e,t){const r=document.getElementById(this.div.id);if(t=void 0===t||t){const t=document.getElementById(e);return void(r&&t&&t.parentNode.insertBefore(r,t))}const s=document.getElementById(e);if(r){if(s.nextSibling)return void s.parentNode.insertBefore(r,s.nextSibling);s.parentNode.appendChild(r)}}_hide(){this.renderer.painter.root.style.display="none"}_show(){this.renderer.painter.root.style.display="block"}}zn.a.supermap.ThemeLayer=Xn;
  /* Copyright© 2000 - 2019 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 Kn extends Xn{constructor(e,t,r){super(e,r),this.chartsSetting=r.chartsSetting||{},this.themeFields=r.themeFields||null,this.overlayWeightField=r.overlayWeightField||null,this.isOverLay=void 0===r.isOverLay||r.isOverLay,this.charts=r.charts||[],this.cache=r.cache||{},this.chartsType=t}setChartsType(e){this.chartsType=e,this.redraw()}addFeatures(e){!1!==zn.a.Evented.prototype.fire("beforefeaturesadded",{features:e})&&(this.features=this.toiClientFeature(e),this.renderer&&this.redrawThematicFeatures(this.map.getBounds()))}redrawThematicFeatures(e){this.clearCache(),this.renderer.clearAll();for(var t=this.features,r=0,s=t.length;r<s;r++){var i=t[r],a=this.cache,n=i.id;if(!a[n]){a[n]=n;var o=this.createThematicFeature(i);o&&this.overlayWeightField&&i.attributes[this.overlayWeightField]&&!isNaN(i.attributes[this.overlayWeightField])&&(o.__overlayWeight=i.attributes[this.overlayWeightField]),o&&this.charts.push(o)}}this.drawCharts()}createThematicFeature(e){var t;return an[this.chartsType]&&this.themeFields&&this.chartsSetting&&(t=new an[this.chartsType](e,this,this.themeFields,this.chartsSetting)),!!t&&(t.assembleShapes(),t)}drawCharts(){if(this.renderer){var e=this.charts;if(this.overlayWeightField&&e.sort(function(e,t){return void 0===e.__overlayWeight&&void 0===t.__overlayWeight?0:void 0!==e.__overlayWeight&&void 0===t.__overlayWeight?-1:void 0===e.__overlayWeight&&void 0!==t.__overlayWeight?1:void 0!==e.__overlayWeight&&void 0!==t.__overlayWeight?parseFloat(e.__overlayWeight)<parseFloat(t.__overlayWeight)?1:-1:0}),this.isOverLay){var t=[];for(let l=0,h=e.length;l<h;l++){var r=e[l],s=r.resetLocation(),i=r.chartBounds,a=[{x:i.left,y:i.top},{x:i.left,y:i.bottom},{x:i.right,y:i.bottom},{x:i.right,y:i.top},{x:i.left,y:i.top}],n=!1;if(0!==l)for(let e=0;e<t.length;e++)if(this.isQuadrilateralOverLap(a,t[e])){n=!0;break}if(!n){t.push(a);var o=r.shapes;for(let e=0,t=o.length;e<t;e++)o[e].refOriginalPosition=s,this.renderer.addShape(o[e])}}}else for(var l=0,h=e.length;l<h;l++)for(var u=e[l],c=u.resetLocation(),d=u.shapes,p=0,m=d.length;p<m;p++)d[p].refOriginalPosition=c,this.renderer.addShape(d[p]);this.renderer.render()}}getShapesByFeatureID(e){var t=[],r=this.renderer.getAllShapes();if(!e)return r;for(var s=0,i=r.length;s<i;s++){var a=r[s];a.refDataID&&e===a.refDataID&&t.push(a)}return t}isQuadrilateralOverLap(e,t){var r=e.length,s=t.length;if(5!==r||5!==s)return null;var i=!1;for(let s=0;s<r;s++)if(this.isPointInPoly(e[s],t)){i=!0;break}for(let r=0;r<s;r++)if(this.isPointInPoly(t[r],e)){i=!0;break}for(let a=0;a<r-1&&!i;a++)for(let r=0;r<s-1;r++){if("SuperMap.Geometry.Point"===ye.lineIntersection(e[a],e[a+1],t[r],t[r+1]).CLASS_NAME){i=!0;break}}return i}isPointInPoly(e,t){for(var r=!1,s=-1,i=t.length,a=i-1;++s<i;a=s)(t[s].y<=e.y&&e.y<t[a].y||t[a].y<=e.y&&e.y<t[s].y)&&e.x<(t[a].x-t[s].x)*(e.y-t[s].y)/(t[a].y-t[s].y)+t[s].x&&(r=!r);return r}isChartInMap(e,t){for(var r=e,s=!1,i=0,a=t.length;i<a;i++){var n=t[i];if(n.x>=r.left&&n.x<=r.right&&n.y>=r.top&&n.y<=r.bottom){s=!0;break}}return s}clearCache(){this.cache={},this.charts=[]}removeFeatures(e){this.clearCache(),super.removeFeatures(e)}removeAllFeatures(){this.clearCache(),super.removeAllFeatures()}redraw(){return this.clearCache(),!!this.renderer&&(this.redrawThematicFeatures(this.map.getBounds()),!0)}clear(){this.renderer&&(this.renderer.clearAll(),this.renderer.refresh()),this.removeAllFeatures(),this.clearCache()}}zn.a.supermap.GraphThemeLayer=Kn;
  /* Copyright© 2000 - 2019 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 Zn extends Xn{constructor(e,t){super(e,t),this.name=null,this.style=null,this.highlightStyle=null,this.nodesClipPixel=2,this.isHoverAble=!1,this.isMultiHover=!1,this.isClickAble=!0,this.isAllowFeatureStyle=!1,ye.extend(this,t),this.cache=t.cache||{},this.cacheFields=t.cacheFields||[],this.maxCacheCount=t.maxCacheCount||0,this.isCustomSetMaxCacheCount=void 0!==t.isCustomSetMaxCacheCount&&t.isCustomSetMaxCacheCount}addFeatures(e){zn.a.Evented.prototype.fire("beforefeaturesadded",{features:e}),this.features=this.toiClientFeature(e),this.isCustomSetMaxCacheCount||(this.maxCacheCount=5*this.features.length),this.renderer&&this.redrawThematicFeatures(this.map.getBounds())}removeFeatures(e){this.clearCache(),Xn.prototype.removeFeatures.apply(this,arguments)}removeAllFeatures(){this.clearCache(),Xn.prototype.removeAllFeatures.apply(this,arguments)}redrawThematicFeatures(e){this.clearCache();var t=this.renderer.getHoverOne(),r=null;t&&t.refDataID&&(r=t.refDataID),this.renderer.clearAll();for(var s=this.features,i=this.cache,a=this.cacheFields,n=this.map.getZoom(),o=this.maxCacheCount,l=0,h=s.length;l<h;l++){var u,c=s[l].id+"_zoom_"+n.toString();if(i[c])i[c].updateAndAddShapes();else{if((u=this.createThematicFeature(s[l])).getShapesCount()<1)continue;if(i[c]=u,a.push(c),a.length>o){var d=a[0];a.splice(0,1),delete i[d]}}}if(this.renderer.render(),r&&this.isHoverAble&&this.isMultiHover){var p=this.getShapesByFeatureID(r);this.renderer.updateHoverShapes(p)}}createThematicFeature(e){var t=ye.copyAttributesWithClip(this.style);e.style&&!0===this.isAllowFeatureStyle&&(t=ye.copyAttributesWithClip(e.style));var r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=sn.transformStyle(this.highlightStyle);for(var s=new ln(e,this,sn.transformStyle(t),r),i=0;i<s.shapes.length;i++)this.renderer.addShape(s.shapes[i]);return s}clearCache(){this.cache={},this.cacheFields=[]}clear(){this.renderer.clearAll(),this.renderer.refresh(),this.removeAllFeatures(),this.clearCache()}getCacheCount(){return this.cacheFields.length}setMaxCacheCount(e){isNaN(e)||(this.maxCacheCount=e,this.isCustomSetMaxCacheCount=!0)}getShapesByFeatureID(e){var t=[],r=this.renderer.getAllShapes();if(!e)return r;for(var s=0,i=r.length;s<i;s++){var a=r[s];a.refDataID&&e===a.refDataID&&t.push(a)}return t}}zn.a.supermap.GeoFeatureThemeLayer=Zn;
  /* Copyright© 2000 - 2019 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 $n extends Zn{constructor(e,t){super(e,t),this.isOverLay=!0,this.isAvoid=!0,this.themeField=null,this.styleGroups=null,ye.extend(this,t),this.defaultStyle={fontColor:"#000000",fontOpacity:1,fontSize:"12px",fontStyle:"normal",fontWeight:"normal",labelAlign:"cm",labelXOffset:0,labelYOffset:0,labelRotation:0,fill:!1,fillColor:"#ee9900",fillOpacity:.4,stroke:!1,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",labelRect:!0,labelSelect:!0,_isGeoTextStrategyStyle:!0},this.getPxBoundsMode=0,this.labelFeatures=[]}redrawThematicFeatures(e){if(this.features.length>0&&0==this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),r=0,s=t.length;r<s;r++)this.labelFeatures.push(t[r]);this.features=this.getDrawnLabels(this.labelFeatures),super.redrawThematicFeatures.call(this,e)}removeFeatures(e){this.labelFeatures=[],super.removeFeatures.call(this,arguments)}removeAllFeatures(){this.labelFeatures=[],super.removeAllFeatures.call(this,arguments)}createThematicFeature(e){var t=this.getStyleByData(e),r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=sn.transformStyle(this.highlightStyle);for(var s=new ln(e,this,sn.transformStyle(t),r),i=0;i<s.shapes.length;i++)this.renderer.addShape(s.shapes[i]);return s}getDrawnLabels(e){for(var t,r,s,i,a=[],n=[],o={labelAlign:"cm",labelXOffset:0,labelYOffset:0},l=this.map,h=l.getZoom(),u=l.getCanvas(),c={x:parseFloat(u.style.width),y:parseFloat(u.style.height)},d=0,p=e.length;d<p;d++){((r=e[d]).isStyleChange||void 0===r.isStyleChange)&&(r=this.setStyle(r));var m=this.getLabelPxLocation(r);if(m.x>=0&&m.x<=c.x&&m.y>=0&&m.y<=c.y){if(r.style.minZoomLevel>-1&&h<=r.style.minZoomLevel)continue;if(r.style.maxZoomLevel>-1&&h>r.style.maxZoomLevel)continue;var f=null;r.isStyleChange?(r.isStyleChange=null,f=this.calculateLabelBounds(r,m)):f=r.geometry.bsInfo.w&&r.geometry.bsInfo.h?this.calculateLabelBounds2(r,m):this.calculateLabelBounds(r,m);var y=new ve(0,c.y,c.x,0),g=f.length;if(this.isAvoid){var v=this.getAvoidInfo(y,f);if(v){if("left"===v.aspectW){r.style.labelXOffset+=v.offsetX;for(let e=0;e<g;e++)f[e].x+=v.offsetX}else if("right"===v.aspectW){r.style.labelXOffset+=-v.offsetX;for(let e=0;e<g;e++)f[e].x+=-v.offsetX}if("top"===v.aspectH){r.style.labelYOffset+=v.offsetY;for(let e=0;e<g;e++)f[e].y+=v.offsetY}else if("bottom"===v.aspectH){r.style.labelYOffset+=-v.offsetY;for(let e=0;e<g;e++)f[e].y+=-v.offsetY}r.isStyleChange=!0}}if(this.isOverLay){var S=!1;if(0!=d)for(let e=0;e<n.length;e++)if(this.isQuadrilateralOverLap(f,n[e])){S=!0;break}if(S)continue;n.push(f)}var b=[];for(let e=0;e<g-1;e++)b.push(l.unproject(f[e]));var x=b[3],C=b[1],_=new ve(x.lng,x.lat,C.lng,C.lat).getCenterLonLat(),T=new Ee(_.lon,_.lat,r.attributes[this.themeField]);T.calculateBounds(),s=ye.cloneObject(r.style),i=ye.cloneObject(ye.copyAttributes(s,o)),(t=new Re(T,r.attributes,i)).id=r.id,t.fid=r.fid,a.push(t)}}return a}getStyleByData(e){var t=e;if(t.style=ye.copyAttributes(t.style,this.defaultStyle),this.style&&this.style.fontSize&&parseFloat(this.style.fontSize)<12&&(this.style.fontSize="12px"),t.style=ye.copyAttributes(t.style,this.style),this.themeField&&this.styleGroups&&t.attributes){var r=this.themeField,s=t.attributes,i=this.styleGroups,a=!1,n=null;for(var o in s)if(r===o){a=!0,n=s[o];break}if(a)for(var l=0,h=i.length;l<h;l++)if(n>=i[l].start&&n<i[l].end){var u=i[l].style;u&&u.fontSize&&parseFloat(u.fontSize)<12&&(u.fontSize="12px"),t.style=ye.copyAttributes(t.style,u)}t.style.label=t.attributes[this.themeField]}return t.style}setLabelsStyle(e){for(var t,r=[],s=0,i=e.length;s<i;s++){var a=e[s];if("SuperMap.Geometry.GeoText"!==a.geometry.CLASS_NAME)return e;(a.geometry.bsInfo.w||a.geometry.bsInfo.h)&&(a.geometry.bsInfo.w=null,a.geometry.bsInfo.h=null,a.geometry.labelWTmp=null),(t=this.setStyle(a)).layer=this.layer,r.push(t)}return r}setStyle(e){var t=e;if(t.style=ye.copyAttributes(t.style,this.defaultStyle),this.style&&this.style.fontSize&&parseFloat(this.style.fontSize)<12&&(this.style.fontSize="12px"),t.style=ye.copyAttributes(t.style,this.style),this.groupField&&this.styleGroups&&t.attributes){var r=this.groupField,s=t.attributes,i=this.styleGroups,a=!1,n=null;for(var o in s)if(r===o){a=!0,n=s[o];break}if(a)for(var l=0,h=i.length;l<h;l++)if(n>=i[l].start&&n<i[l].end){var u=i[l].style;u&&u.fontSize&&parseFloat(u.fontSize)<12&&(u.fontSize="12px"),t.style=ye.copyAttributes(t.style,u)}}return t.style.label=t.geometry.text,t}getLabelPxLocation(e){var t=e.geometry,r=e.style,s=t.getCentroid(),i=this.map.project(new zn.a.LngLat(s.x,s.y)),a=new zn.a.Point(i.x,i.y);if(r.labelXOffset||r.labelYOffset){var n=isNaN(r.labelXOffset)?0:r.labelXOffset,o=isNaN(r.labelYOffset)?0:r.labelYOffset,l=a.add(new zn.a.Point(n,-o));return new zn.a.Point(l.x,l.y)}return new zn.a.Point(a.x,a.y)}calculateLabelBounds(e,t){var r=e.geometry,s=null,i=null;if(0==this.getPxBoundsMode)s=r.getLabelPxBoundsByText(t,e.style);else{if(1!==this.getPxBoundsMode)return null;i=this.getLabelInfo(e.geometry.getCentroid(),e.style),s=r.getLabelPxBoundsByLabel(t,i.w,i.h,e.style)}var a=[];return a=e.style.labelRotation%180==0?[{x:s.left,y:s.top},{x:s.right,y:s.top},{x:s.right,y:s.bottom},{x:s.left,y:s.bottom},{x:s.left,y:s.top}]:this.rotationBounds(s,t,e.style.labelRotation),r.bounds=new ve(a[1].x,a[3].y,a[2].x,a[4].y),a}calculateLabelBounds2(e,t){var r,s,i,a,n,o=e.geometry.bsInfo,l=e.style,h=ye.cloneObject(t);if(l.labelAlign&&"cm"!==l.labelAlign)switch(l.labelAlign){case"lt":h.x+=o.w/2,h.y+=o.h/2;break;case"lm":h.x+=o.w/2;break;case"lb":h.x+=o.w/2,h.y-=o.h/2;break;case"ct":h.y+=o.h/2;break;case"cb":h.y-=o.h/2;break;case"rt":h.x-=o.w/2,h.y+=o.h/2;break;case"rm":h.x-=o.w/2;break;case"rb":h.x-=o.w/2,h.y-=o.h/2}s=h.x-o.w/2,i=h.y+o.h/2,n=l.fontStyle&&"italic"===l.fontStyle?h.x+o.w/2+parseInt(parseFloat(l.fontSize)/2):h.x+o.w/2,a=h.y-o.h/2,r=new ve(s,i,n,a);var u=[];return u=l.labelRotation%180==0?[{x:r.left,y:r.top},{x:r.right,y:r.top},{x:r.right,y:r.bottom},{x:r.left,y:r.bottom},{x:r.left,y:r.top}]:this.rotationBounds(r,t,l.labelRotation),e.geometry.bounds=new ve(u[1].x,u[3].y,u[2].x,u[4].y),u}getLabelInfo(e,t){var r={l:"left",r:"right",t:"top",b:"bottom"},s={l:0,r:-1,t:0,b:-1};t=ye.extend({fontColor:"#000000",labelAlign:"cm"},t);var i=this.getLocalXY(e),a=0;if(t.labelXOffset||t.labelYOffset){var n=isNaN(t.labelXOffset)?0:t.labelXOffset,o=isNaN(t.labelYOffset)?0:t.labelYOffset;i[0]+=n,i[1]-=o}var l=document.createElement("canvas");l.globalAlpha=0,l.lineWidth=1;var h=l.getContext("2d");h.fillStyle=t.fontColor,h.globalAlpha=t.fontOpacity||1;var u,c,d,p=[t.fontStyle?t.fontStyle:"normal","normal",t.fontWeight?t.fontWeight:"normal",t.fontSize?t.fontSize:"1em",t.fontFamily?t.fontFamily:"sans-serif"].join(" "),m=t.label.split("\n"),f=m.length;if(h.fillText){h.font=p,h.textAlign=r[t.labelAlign[0]]||"center",h.textBaseline=r[t.labelAlign[1]]||"middle",null==(u=s[t.labelAlign[1]])&&(u=-.5),c=h.measureText("Mg").height||h.measureText("xx").width,i[1]+=c*u*(f-1);for(let e=0;e<f;e++)a<(d=h.measureText(m[e]).width)&&(a=d)}else if(h.mozDrawText){h.mozTextStyle=p,null==(u=s[t.labelAlign[1]])&&(u=-.5),c=h.mozMeasureText("xx"),i[1]+=c*(1+u*f);for(let e=0;e<f;e++)a<(d=h.measureText(m[e]).width)&&(a=d)}var y={};return a?(y.w=a,y.h=t.fontSize,y.rows=m.length,y):null}rotationBounds(e,t,r){var s=new zn.a.Point(e.left,e.top),i=new zn.a.Point(e.right,e.top),a=new zn.a.Point(e.right,e.bottom),n=new zn.a.Point(e.left,e.bottom),o=[];o.push(this.getRotatedLocation(s.x,s.y,t.x,t.y,r)),o.push(this.getRotatedLocation(i.x,i.y,t.x,t.y,r)),o.push(this.getRotatedLocation(a.x,a.y,t.x,t.y,r)),o.push(this.getRotatedLocation(n.x,n.y,t.x,t.y,r));for(var l=[],h=0;h<o.length;h++)l.push({x:o[h].x,y:o[h].y});return l.push({x:o[0].x,y:o[0].y}),l}getRotatedLocation(e,t,r,s,i){var a,n,o={};return t=-t,s=-s,i=-i,a=(e-r)*Math.cos(i/180*Math.PI)-(t-s)*Math.sin(i/180*Math.PI)+r,n=(e-r)*Math.sin(i/180*Math.PI)+(t-s)*Math.cos(i/180*Math.PI)+s,o.x=a,o.y=-n,o}getAvoidInfo(e,t){if(5!==t.length)return null;for(var r=[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.right,y:e.bottom},{x:e.left,y:e.bottom},{x:e.left,y:e.top}],s=!1,i=r.length,a=t.length,n=0,o=0,l="",h="",u=0;u<i-1;u++)for(var c=0;c<a-1;c++){"SuperMap.Geometry.Point"===ye.lineIntersection(r[u],r[u+1],t[c],t[c+1]).CLASS_NAME&&(d(t[c]),d(t[c+1]),s=!0)}return s?{aspectW:h,aspectH:l,offsetX:n,offsetY:o}:null;function d(t){if(!e.contains(t.x,t.y)){if(t.y<e.top){let r=Math.abs(e.top-t.y);r>o&&(o=r,l="top")}if(t.y>e.bottom){let r=Math.abs(t.y-e.bottom);r>o&&(o=r,l="bottom")}if(t.x<e.left){let r=Math.abs(e.left-t.x);r>n&&(n=r,h="left")}if(t.x>e.right){let r=Math.abs(t.x-e.right);r>n&&(n=r,h="right")}}}}isQuadrilateralOverLap(e,t){var r=e.length,s=t.length;if(5!==r||5!==s)return null;var i=!1;for(let s=0;s<r;s++)if(this.isPointInPoly(e[s],t)){i=!0;break}for(let r=0;r<s;r++)if(this.isPointInPoly(t[r],e)){i=!0;break}for(let n=0;n<r-1&&!i;n++)for(var a=0;a<s-1;a++){if("SuperMap.Geometry.Point"===ye.lineIntersection(e[n],e[n+1],t[a],t[a+1]).CLASS_NAME){i=!0;break}}return i}isPointInPoly(e,t){for(var r=!1,s=-1,i=t.length,a=i-1;++s<i;a=s)(t[s].y<=e.y&&e.y<t[a].y||t[a].y<=e.y&&e.y<t[s].y)&&e.x<(t[a].x-t[s].x)*(e.y-t[s].y)/(t[a].y-t[s].y)+t[s].x&&(r=!r);return r}}zn.a.supermap.LabelThemeLayer=$n;var eo=r(1),to=eo.baiduMapLayer?eo.baiduMapLayer.__proto__:Function;
  /* Copyright© 2000 - 2019 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 ro extends to{constructor(e,t,r,s){if(super(e,r,s),to){this.map=e;s=s||{},this.init(s),this.argCheck(s),this.canvasLayer=t,this.stopAniamation=!1,this.animation=s.animation,this.clickEvent=this.clickEvent.bind(this),this.mousemoveEvent=this.mousemoveEvent.bind(this),this.map.on("resize",this.resizeEvent.bind(this)),this.map.on("zoomstart",this.zoomStartEvent.bind(this)),this.map.on("zoomend",this.zoomEndEvent.bind(this)),this.map.on("rotatestart",this.rotateStartEvent.bind(this)),this.map.on("rotate",this.rotateEvent.bind(this)),this.map.on("rotateend",this.rotateEndEvent.bind(this)),this.map.on("movestart",this.moveStartEvent.bind(this)),this.map.on("move",this.moveEvent.bind(this)),this.map.on("moveend",this.moveEndEvent.bind(this)),this.map.on("remove",this.removeEvent.bind(this)),this.bindEvent(),this._expectShow=!0}}clickEvent(e){var t=e.point;super.clickEvent(t,e)}mousemoveEvent(e){var t=e.point;super.mousemoveEvent(t,e)}bindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.on("click",this.clickEvent),this.options.methods.mousemove&&e.on("mousemove",this.mousemoveEvent))}unbindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.off("click",this.clickEvent),this.options.methods.mousemove&&e.off("mousemove",this.mousemoveEvent))}getContext(){return this.canvasLayer.canvas.getContext(this.context)}addData(e,t){var r=e;e&&e.get&&(r=e.get()),this.dataSet.add(r),this.update({options:t})}update(e){var t=e||{},r=t.data;r&&r.get&&(r=r.get()),void 0!=r&&this.dataSet.set(r),super.update({options:t.options})}getData(){return this.dataSet}removeData(e){if(this.dataSet){var t=this.dataSet.get({filter:function(t){return null==e||"function"!=typeof e||!e(t)}});this.dataSet.set(t),this.update({options:null})}}clearData(){this.dataSet&&this.dataSet.clear(),this.update({options:null})}updateData(e,t){e&&e.get&&this.dataSet.set(e.get()),this.update({options:t})}_canvasUpdate(e){var t=this.map;if(this.canvasLayer&&!this.stopAniamation){var r=this,s=r.options.animation,i=this.getContext();if(r.isEnabledTime()){if(void 0===e)return void this.clear(i);"2d"===this.context&&(i.save(),i.globalCompositeOperation="destination-out",i.fillStyle="rgba(0, 0, 0, .1)",i.fillRect(0,0,i.canvas.width,i.canvas.height),i.restore())}else this.clear(i);if("2d"===this.context)for(var a in r.options)i[a]=r.options[a];else i.clear(i.COLOR_BUFFER_BIT);if(!(r.options.minZoom&&t.getZoom()<r.options.minZoom||r.options.maxZoom&&t.getZoom()>r.options.maxZoom)){var n=t.getBounds(),o=n.getEast()-n.getWest(),l=n.getNorth()-n.getSouth(),h=o/this.canvasLayer.canvas.width,u=l/this.canvasLayer.canvas.height,c=t.getCenter(),d=t.project(c),p={transferCoordinate:function(e){if(t.transform.rotationMatrix||"2d"===r.context){var s=t.project(new zn.a.LngLat(e[0],e[1]));return[s.x,s.y]}var i=[(e[0]-c.lng)/h,(c.lat-e[1])/u];return[i[0]+d.x,i[1]+d.y]}};void 0!==e&&(p.filter=function(t){var r=s.trails||10;return e&&t.time>e-r&&t.time<e});var m=r.dataSet.get(p);this.processData(m),r.options._size=r.options.size;var f=t.project(new zn.a.LngLat(0,0));this.drawContext(i,m,r.options,f),r.options.updateCallback&&r.options.updateCallback(e)}}}init(e){this.options=e,this.initDataRange(e),this.context=this.options.context||"2d",this.options.zIndex&&this.canvasLayer&&this.canvasLayer.setZIndex(this.options.zIndex),this.initAnimator()}destroy(){this.unbindEvent(),this.clearData(),this.animator&&this.animator.stop(),this.animator=null,this.canvasLayer=null}addAnimatorEvent(){}removeEvent(){this.canvasLayer.mapContainer.removeChild(this.canvasLayer.canvas)}resizeEvent(){this.canvasLayer.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.canvasLayer.canvas;e.style.position="absolute",e.style.top="0px",e.style.left="0px";var t="undefined"==typeof window?{}:window,r=this.canvasLayer.devicePixelRatio=t.devicePixelRatio||1;e.width=parseInt(this.map.getCanvas().style.width)*r,e.height=parseInt(this.map.getCanvas().style.height)*r,this.canvasLayer.mapVOptions.context&&"2d"!=this.canvasLayer.mapVOptions.context||e.getContext("2d").scale(r,r),e.style.width=this.map.getCanvas().style.width,e.style.height=this.map.getCanvas().style.height}moveEndEvent(){this.stopAniamation=!1,this.getContext().canvas.style.transform="",this._canvasUpdate(),!0===this._expectShow&&this._show()}moveStartEvent(){this.startPitch=this.map.getPitch(),this.startBearing=this.map.getBearing();var e=this.map.project(new zn.a.LngLat(0,0));this.startMoveX=e.x,this.startMoveY=e.y,this.animation&&(this.stopAniamation=!0),this.rotating||this.zooming||(this._expectShow="none"!==this.canvasLayer.canvas.style.display,0!==this.map.getPitch()&&this._hide())}moveEvent(){this.canvasLayer.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing,r=this.map.project(new zn.a.LngLat(0,0)),s=r.x-this.startMoveX,i=r.y-this.startMoveY;this.getContext().canvas.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg) translate3d("+s+"px, "+i+"px, 0px)"}zoomStartEvent(){this.zooming=!0,this._hide()}zoomEndEvent(){this.zooming=!1}rotateStartEvent(){this.rotating=!0,0!==this.map.getPitch()&&this._hide()}rotateEvent(){this.canvasLayer.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing;this.getContext().canvas.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg)"}rotateEndEvent(){this.rotating=!1}clear(e){e&&e.clearRect&&e.clearRect(0,0,parseInt(this.map.getCanvas().style.width),parseInt(this.map.getCanvas().style.height))}draw(){this._canvasUpdate()}_hide(){this.canvasLayer.canvas.style.display="none"}_show(){this.canvasLayer.canvas.style.display="block"}}
  /* Copyright© 2000 - 2019 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 so{constructor(e,t,r){this.map=e,this.id=r.layerID?r.layerID:ye.createUniqueID("mapvLayer_"),delete r.layerID,this.mapVOptions=r,this.dataSet=t,this.visibility=!0,this.map&&this.map.addLayer(this)}onAdd(e){this.map=e,this.renderer=new ro(this.map,this,this.dataSet,this.mapVOptions),this.canvas=this._createCanvas(),this.renderer._canvasUpdate(),this.mapContainer=e.getCanvasContainer(),this.mapContainer.appendChild(this.canvas),this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px"}removeFromMap(){this.mapContainer.removeChild(this.canvas),this.renderer.destroy()}setVisibility(e){e!==this.visibility&&(this.visibility=e,e?this.show():this.hide())}moveTo(e,t){const r=document.getElementById(this.canvas.id);if(t=void 0===t||t){const t=document.getElementById(e);return void(r&&t&&t.parentNode.insertBefore(r,t))}const s=document.getElementById(e);if(r){if(s.nextSibling)return void s.parentNode.insertBefore(r,s.nextSibling);s.parentNode.appendChild(r)}}getTopLeft(){var e,t=this.map;t&&(e=t.getBounds().getNorthWest());return e}addData(e,t){this.renderer.addData(e,t)}update(e){this.renderer.update(e)}getData(){return this.renderer&&(this.dataSet=this.renderer.getData()),this.dataSet}removeData(e){this.renderer&&this.renderer.removeData(e)}clearData(){this.renderer.clearData()}show(){return this.renderer&&this.renderer._show(),this}hide(){return this.renderer&&this.renderer._hide(),this}_createCanvas(){var e=document.createElement("canvas");e.id=this.id,e.style.position="absolute",e.style.top="0px",e.style.left="0px";var t="undefined"==typeof window?{}:window,r=this.devicePixelRatio=t.devicePixelRatio||1;return e.width=parseInt(this.map.getCanvas().style.width)*r,e.height=parseInt(this.map.getCanvas().style.height)*r,this.mapVOptions.context&&"2d"!=this.mapVOptions.context||e.getContext("2d").scale(r,r),e.style.width=this.map.getCanvas().style.width,e.style.height=this.map.getCanvas().style.height,e}setZIndex(e){this.canvas.style.zIndex=e}}zn.a.supermap.MapvLayer=so;
  /* Copyright© 2000 - 2019 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 io{constructor(e,t){this.id=e,this.map=null,this.opacity=1,this.parseNumber=!1,this.enableHighlight=!1,this.highlight={color:"#ADA91E"},this.baseHeightField=null,this.height=null,this.heightField="height",this.themeField=this.heightField,this.showLegend=!0,this.legendTitle=null,this.legendTheme="light",this.legendOrientation="horizontal",this.legendPosition="bottom-right",this._extend(this,t)}setLayerOptions(e){return this._extend(this,e),this}setHighlightStyleOptions(e){return this._extend(this.highlight,e),this}setData(e,t){var r=this;return r.data=e,null!=t&&(r.parseNumber=t),r.parseNumber&&r.data&&r.data.features&&r.data.features.map(function(e){return r.baseHeightField&&e.properties[r.baseHeightField]&&(e.properties[r.baseHeightField]=parseFloat(e.properties[r.baseHeightField])),r.heightField&&e.properties[r.heightField]&&(e.properties[r.heightField]=parseFloat(e.properties[r.heightField])),e}),this}getData(){return this.data}addTo(e){return this.map=e,this.map?(this.show(),this):this}show(e){return this._extend(this,e),this._addLayer(),this.enableHighlight&&this._addHighLightLayer(),this.showLegend&&(this.legend||(this.legend=this._createLegendControl()),this.map.addControl(this.legend,this.legendPosition)),this}remove(){if(!this.map)return this;var e=this.id?this.id:"theme3DLayer";this.map.getLayer(e)&&(this.map.off("mousemove",e,this._onMouseMove.bind(this)),this.map.on("mouseout",e,this._onMouseMove.bind(this)),this.map.removeLayer(e));return this.map.getLayer("highlightLayer")&&(this._selectFeatureId=null,this.map.removeLayer("highlightLayer")),this.legend&&this.map.removeControl(this.legend),this}getLayerStyleOptions(){}getHighlightStyleOptions(){}_createLegendControl(e){var t=this;function r(){}return r.prototype.onAdd=function(r){this._map=r,this._container=document.createElement("div");var s="legend-light";"dark"===t.legendTheme&&(s="legend-dark");var i=" legend-horizontal";if("vertical"===t.legendOrientation&&(i=" legend-vertical"),this._container.className="mapboxgl-ctrl legend "+s+i,e)this._container.innerHTML=e;else{var a=" <div class='legend-title'>"+(t.legendTitle||"")+"</div>",n="<div class='legend-content'>"+(t._createLegendElement.call(t)||"")+"</div>";this._container.innerHTML=a+n}return t._appendLegendCSSStyle(),this._container},r.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=void 0},new r}_createLegendElement(){}_addLayer(){var e=this.getLayerStyleOptions(),t=this.id?this.id:"theme3DLayer",r=this.sourceId=t+"Source";this.map.getSource(r)?(this.map.removeSource(r),this.map.addSource(r,{type:"geojson",data:this.data})):this.map.addSource(r,{type:"geojson",data:this.data}),this.map.addLayer({id:t,type:"fill-extrusion",source:r,paint:e}),this.map.moveLayer(t)}_addHighLightLayer(){if(this.map){var e=this.map;e.addLayer({id:"highlightLayer",type:"fill-extrusion",source:this.sourceId,paint:this.getHighlightStyleOptions(),filter:["in","$id",""]}),this._selectFeatureId=null,e.on("mousemove",this.id,this._onMouseMove.bind(this)),e.on("mouseout",this.id,this._onMouseMove.bind(this))}}_onMouseMove(e){var t=this,r=this.map,s=r.queryRenderedFeatures(e.point,{layers:[t.id]});if(t.highlight&&t.highlight.callback&&t.highlight.callback(s,e),!s||s.length<1)return t._clearHighlight.call(t),void(t._selectFeatureId=null);var i=s[0].id;t._selectFeatureId!==i&&(t._selectFeatureId=i,r.setFilter("highlightLayer",["==","$id",t._selectFeatureId]))}_clearHighlight(){this.map&&this.map.setFilter("highlightLayer",["in","$id",""])}_appendLegendCSSStyle(){var e=document.createElement("style");e.type="text/css";e.innerHTML="\n        .legend {\n            display: inline-block;\n            border-radius: 2px;\n            -moz-border-radius: 2px;\n            -webkit-border-radius: 2px;\n            font-size: 12px;\n            color: rgba(0, 0, 0, 0.8);\n            background-color: rgb(255, 255, 255);\n        }\n        .legend-light {\n            color: rgba(0, 0, 0, 0.8);\n            background-color: rgb(255, 255, 255);\n            box-shadow: 0px 0px 6px #bbbbbb;\n            -moz-box-shadow: 0px 6px 10px #bbbbbb;\n            -webkit-box-shadow: 0px 0px 6px #bbbbbb;\n        }\n        .legend-dark {\n            color: rgba(255, 255, 255, 0.8);\n            background-color: rgb(64, 64, 64);\n        }\n        .legend .legend-title {\n            min-height: 14px;\n            max-width: 500px;\n            padding:6px 10px;\n        }\n        .legend-light .legend-title {\n            color: rgba(0, 0, 0, 0.8);\n        }\n        .legend-dark .legend-title {\n            color: rgba(255, 255, 255, 0.8);\n        }\n        .legend-content{\n            padding:6px 10px;\n        }\n        "+this._legendCSSStyle(),document.getElementsByTagName("head")[0].appendChild(e)}_legendCSSStyle(){return"\n        .legend ul {\n            padding: 0;\n            margin: 0 16px;\n            height: 100%;\n            display: block;\n            list-style: none;\n        }\n\n        .legend li {\n            vertical-align: middle;\n        }\n\n        .legend li span:first-child {\n            vertical-align: middle;\n        }\n\n        .legend li span:last-child {\n            line-height: 28px;\n            max-width: 200px;\n            vertical-align: middle;\n            white-space: nowrap;\n            overflow: hidden;\n            text-overflow: ellipsis;\n            -ms-text-overflow: ellipsis;\n        }\n\n        .legend-vertical li {\n            height: 28px;\n        }\n\n        .legend-vertical li span:first-child {\n            display: inline-block;\n            width: 60px;\n            height: 100%;\n        }\n\n        .legend-vertical li span:last-child {\n            display: inline-block;\n            margin-left: 16px;\n            height: 100%;\n        }\n\n        .legend-horizontal li {\n            height: 56px;\n            float: left;\n        }\n\n        .legend-horizontal li span:first-child {\n            display: block;\n            width: 100%;\n            height: 50%;\n        }\n\n        .legend-horizontal li span:last-child {\n            display: block;\n            vertical-align: middle;\n            width: 60px;\n            height: 50%;\n            text-align: center;\n        }\n        "}_extend(e){for(var t=0;t<Object.getOwnPropertyNames(arguments).length;t++){var r=Object.getOwnPropertyNames(arguments)[t];if("caller"!=r&&"callee"!=r&&"length"!=r&&"arguments"!=r){var s=arguments[r];if(s)for(var i=0;i<Object.getOwnPropertyNames(s).length;i++){var a=Object.getOwnPropertyNames(s)[i];"caller"!=r&&"callee"!=r&&"length"!=r&&"arguments"!=r&&(e[a]=s[a])}}}return e}}zn.a.supermap.Theme3DLayer=io;
  /* Copyright© 2000 - 2019 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 ao extends io{constructor(e,t){super(e,t),this.heightStops=null,this.colorStops=null,this.base=null,this.legendRatio=1,this._extend(this,t)}getLayerStyleOptions(){var e=null==this.opacity?1:this.opacity;e=isNaN(parseFloat(e))?1:parseFloat(e);var t=/^[0-9]+.?[0-9]*$/,r={"fill-extrusion-color":{stops:this.colorStops,property:this.themeField||this.heightField,type:"interval",base:t.test(this.base)?this.base:1},"fill-extrusion-opacity":e};return this.heightStops?r["fill-extrusion-height"]={stops:this.heightStops,property:this.heightField||"height",base:t.test(this.base)?this.base:1}:this.height?r["fill-extrusion-height"]=this.height:r["fill-extrusion-height"]={property:this.heightField||"height",type:"identity"},this.baseHeightField&&(r["fill-extrusion-base"]={property:this.baseHeightField,type:"identity"}),r}getHighlightStyleOptions(){return{"fill-extrusion-color":this.highlight&&null!=this.highlight.color?this.highlight.color:"#ADA91E","fill-extrusion-height":{stops:this.heightStops,property:this.heightField},"fill-extrusion-opacity":this.highlight&&this.highlight.opacity||.6}}_createLegendElement(){var e,t=this.colorStops&&this.colorStops.length||0,r="<ul>";for(e=0;e<t;e++){var s=this.colorStops[e][0],i=this._getWrapperText(s);if(e===t-1)i="> "+i;else i=i+"-"+this._getWrapperText(this.colorStops[e+1][0]);r+="<li><span style='background-color:"+this.colorStops[e][1]+";'></span><span>"+i+"</span></li>"}return r+="</ul>"}_getWrapperText(e){var t=e*(null==this.legendRatio?1:parseFloat(this.legendRatio)),r=parseFloat(t);return r%1e6<=1e6?r.toString():parseInt(r/1e3)+"k"}}zn.a.supermap.RangeTheme3DLayer=ao;
  /* Copyright© 2000 - 2019 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 no extends Zn{constructor(e,t){super(e,t),this.style=t.style,this.isHoverAble=t.isHoverAble,this.highlightStyle=t.highlightStyle,this.themeField=t.themeField,this.styleGroups=t.styleGroups}createThematicFeature(e){var t=this.getStyleByData(e),r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=sn.transformStyle(this.highlightStyle);for(var s=new ln(e,this,sn.transformStyle(t),r),i=0;i<s.shapes.length;i++)this.renderer.addShape(s.shapes[i]);return s}getStyleByData(e){var t={},r=e;if(t=ye.copyAttributesWithClip(t,this.style),this.themeField&&this.styleGroups&&this.styleGroups.length>0&&r.attributes){var s=this.themeField,i=r.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(s===l){n=!0,o=i[l];break}if(n)for(var h=0,u=a.length;h<u;h++)if(o>=a[h].start&&o<a[h].end){var c=a[h].style;t=ye.copyAttributesWithClip(t,c)}}return r.style&&!0===this.isAllowFeatureStyle&&(t=ye.copyAttributesWithClip(r.style)),t}}zn.a.supermap.RangeThemeLayer=no;
  /* Copyright© 2000 - 2019 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 oo extends Kn{constructor(e,t,r){super(e,t,r),this.symbolType=t,this.symbolSetting=r.symbolSetting,this.themeField=r.themeField}setSymbolType(e){this.symbolType=e,this.redraw()}createThematicFeature(e){var t;return an[this.symbolType]&&this.themeField&&this.symbolSetting&&(t=new an[this.symbolType](e,this,[this.themeField],this.symbolSetting)),!!t&&(t.assembleShapes(),t)}}zn.a.supermap.RankSymbolThemeLayer=oo;
  /* Copyright© 2000 - 2019 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 lo extends io{constructor(e,t){super(e,t),this.colorStops=null,this._extend(this,t)}getLayerStyleOptions(){var e=null==this.opacity?1:this.opacity;e=isNaN(parseFloat(e))?1:parseFloat(e);var t={"fill-extrusion-color":{stops:this.colorStops,property:this.themeField,type:"categorical"},"fill-extrusion-opacity":e};return null!=this.height?t["fill-extrusion-height"]=this.height:t["fill-extrusion-height"]={property:this.heightField||"height",type:"categorical"},this.baseHeightField&&(t["fill-extrusion-base"]={property:this.baseHeightField,type:"identity"}),t}getHighlightStyleOptions(){var e={"fill-extrusion-color":this.highlight&&null!=this.highlight.color?this.highlight.color:"#ADA91E","fill-extrusion-height":{stops:this.heightStops,property:this.heightField,type:"categorical"},"fill-extrusion-opacity":this.highlight&&this.highlight.opacity||.6};return null!=this.height&&(e["fill-extrusion-height"]=this.height||0),e}_createLegendElement(){for(var e="<ul>",t=this.colorStops&&this.colorStops.length||0,r=0;r<t;r++){var s=this.colorStops[r][0];e+="<li><span style='background-color:"+this.colorStops[r][1]+";'></span><span>"+s+"</span></li>"}return e+="</ul>"}}zn.a.supermap.UniqueTheme3DLayer=lo;
  /* Copyright© 2000 - 2019 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 ho extends Zn{constructor(e,t){super(e,t),this.themeField=t.themeField,this.style=t.style,this.styleGroups=t.styleGroups,this.isHoverAble=t.isHoverAble,this.highlightStyle=t.highlightStyle}createThematicFeature(e){var t=this.getStyleByData(e),r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=sn.transformStyle(this.highlightStyle);for(var s=new ln(e,this,sn.transformStyle(t),r),i=0;i<s.shapes.length;i++)this.renderer.addShape(s.shapes[i]);return s}getStyleByData(e){var t={},r=e;if(t=ye.copyAttributesWithClip(t,this.style),this.themeField&&this.styleGroups&&this.styleGroups.length>0&&r.attributes){var s=this.themeField,i=r.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(s===l){n=!0,o=i[l];break}if(n)for(var h=0,u=a.length;h<u;h++)if(o.toString()===a[h].value.toString()){var c=a[h].style;t=ye.copyAttributesWithClip(t,c)}}return r.style&&!0===this.isAllowFeatureStyle&&(t=ye.copyAttributesWithClip(r.style)),t}}zn.a.supermap.UniqueThemeLayer=ho;
  /* Copyright© 2000 - 2019 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 uo{constructor(e,t,r){this.lngLat=Yn.isArray(e)?{lng:e[0],lat:e[1]}:e,this.style=Yn.extend({},t),this.attributes=r}getId(){return this.id}setId(e){this.id=e}getLngLat(){return this.lngLat}setLngLat(e){this.lngLat=Yn.isArray(e)?{lng:e[0],lat:e[1]}:e}setStyle(e){this.style=Yn.extend(this.style,e)}getStyle(){return this.style}setAttributes(e){this.attributes=Yn.extend({},this.attributes,e)}getAttributes(){return this.attributes}}zn.a.supermap.Graphic=uo;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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.*/
  const co={color:[0,0,0,255],opacity:.8,radius:10,radiusScale:1,radiusMinPixels:0,radiusMaxPixels:Number.MAX_SAFE_INTEGER,strokeWidth:1,outline:!1};class po{constructor(e,t){let r=Yn.extend(this,co,t);this.id=e||ye.createUniqueID("graphicLayer_"),this.graphics=[].concat(r.graphics),this.visibility=!0}addTo(e){this.onAdd(e)}onAdd(e){if(this.map=e,this.canvas)return this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas),this;this._initContainer(),e.getCRS&&e.getCRS()!==zn.a.CRS.EPSG3857&&(this.coordinateSystem=3,this.isGeographicCoordinateSystem=!0);let t=this.getState(),{data:r,color:s,radius:i,opacity:a,highlightColor:n,radiusScale:o,radiusMinPixels:l,radiusMaxPixels:h,strokeWidth:u,outline:c}=t,d=this,p={id:"scatter-plot",data:r,pickable:Boolean(this.onClick)||Boolean(this.onHover),autoHighlight:!0,color:s,opacity:a,radius:i,radiusScale:o,highlightColor:n,radiusMinPixels:l,radiusMaxPixels:h,strokeWidth:u,outline:c,isGeographicCoordinateSystem:this.isGeographicCoordinateSystem,coordinateSystem:this.coordinateSystem,getPosition:function(e){if(!e)return[0,0,0];let t=e.getLngLat();return t&&[t.lng,t.lat,0]},getColor:function(e){let t=e&&e.getStyle();return t&&t.color||d.color},getRadius:function(e){let t=e&&e.getStyle();return t&&t.radius||d.radius},updateTriggers:{getColor:[s],getRadius:[i]}};this.onClick&&(p.onClick=this.onClick),this.onHover&&(p.onHover=this.onHover),this.layer=new window.DeckGL.ScatterplotLayer(p);let m={};for(let e in t)m[e]=t[e];return m.layers=[this.layer],m.canvas=this.canvas,this.deckGL=new window.DeckGL.experimental.DeckGLJS(m),this.map.on("render",this._moveEvent.bind(this)),this.map.on("resize",this._resizeEvent.bind(this)),this.draw(),this}setStyle(e){let t={color:this.color,radius:this.radius,opacity:this.opacity,highlightColor:this.highlightColor,radiusScale:this.radiusScale,radiusMinPixels:this.radiusMinPixels,radiusMaxPixels:this.radiusMaxPixels,strokeWidth:this.strokeWidth,outline:this.outline};Yn.extend(this,t,e),this.update()}setGraphics(e){this.graphics=this.graphics||[],this.graphics.length=0;let t=Yn.isArray(e)?[].concat(e):[e];this.layer.props.data||(this.layer.props.data=[]),this.layer.props.data.length=0;for(let e=0;e<t.length;e++)this.layer.props.data.push(t[e]);this.update()}addGraphics(e){this.graphics=this.graphics||[];let t=Yn.isArray(e)?[].concat(e):[e];this.layer.props.data||(this.layer.props.data=[]);for(let e=0;e<t.length;e++)this.layer.props.data.push(t[e]);this.update()}getGraphicBy(e,t){let r=null;for(let s in this.graphics)if(this.graphics[s][e]===t){r=this.graphics[s];break}return r}getGraphicById(e){return this.getGraphicBy("id",e)}getGraphicsByAttribute(e,t){var r,s=[];for(let i in this.graphics)(r=this.graphics[i])&&r.attributes&&r.attributes[e]===t&&s.push(r);return s}removeGraphics(e=null){if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,this.layer.props.data&&(this.layer.props.data.length=0),void this.update();ye.isArray(e)||(e=[e]);for(let t=e.length-1;t>=0;t--){let r=e[t],s=ye.indexOf(this.graphics,r);-1!==s&&this.graphics.splice(s,1)}this.update()}update(){this.layer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0});let e=this.getState();this.layer.setState(e)}clear(){this.removeGraphics(),this.deckGL.finalize()}remove(){this.map.off("render",this._moveEvent.bind(this)),this.map.off("resize",this._resizeEvent.bind(this)),this.map.getCanvasContainer().removeChild(this.canvas)}removeFromMap(){this.remove(),this.clear()}moveTo(e,t){var r=document.getElementById(this.id);if(t=void 0===t||t){var s=document.getElementById(e);r&&s&&s.parentNode.insertBefore(r,s)}else{var i=document.getElementById(e);if(r){if(i.nextSibling)return void i.parentNode.insertBefore(r,i.nextSibling);i.parentNode.appendChild(r)}}}setVisibility(e){this.canvas&&e!==this.visibility&&(this.visibility=e,this.canvas.style.display=e?"block":"none")}getState(){let e=this.map,t=parseInt(this.canvas.style.width),r=parseInt(this.canvas.style.height),s=e.getCenter(),i={longitude:s.lng,latitude:s.lat,zoom:e.getZoom(),maxZoom:e.getMaxZoom(),pitch:e.getPitch(),bearing:e.getBearing()},a={};for(let e in i)a[e]=i[e];return a.width=t,a.height=r,a.data=this.graphics,a.color=this.color,a.radius=this.radius,a.opacity=this.opacity,a.highlightColor=this.highlightColor,a.radiusScale=this.radiusScale,a.radiusMinPixels=this.radiusMinPixels,a.radiusMaxPixels=this.radiusMaxPixels,a.strokeWidth=this.strokeWidth,a.outline=this.outline,e.getCRS&&e.getCRS()!==zn.a.CRS.EPSG3857&&(a.coordinateSystem=this.coordinateSystem,a.isGeographicCoordinateSystem=this.isGeographicCoordinateSystem),a}draw(){let e=this.getState(),t={};for(let r in e)t[r]=e[r];t.layers=[this.layer],t.canvas=this.canvas,this.deckGL.setProps(t)}_moveEvent(){this.draw()}_resizeEvent(){let e=this.canvas,t=this.map;e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,this.draw()}_initContainer(){this.canvas=this._createCanvas(),this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas)}_createCanvas(){let e=document.createElement("canvas");this.id&&(e.id=this.id),e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.cursor="";let t=this.map;return e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,e}}zn.a.supermap.GraphicLayer=po;var mo=r(2);
  /* Copyright© 2000 - 2019 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.*/function fo(e,t,r){if(e===r||e===t)return e;let s=r-t;return((e-t)%s+s)%s+t}function yo(e){return e*Math.PI/180}var go={matrix:[1,-1,0,0],projection:{R:6378137,minZoom:0,maxZoom:22,nativeMaxZoom:19,RAD:Math.PI/180,METERS_PER_DEGREE:6378137*Math.PI/180,MAX_LATITUDE:85.0511287798,project:function(e){const t=this.RAD,r=this.METERS_PER_DEGREE,s=this.MAX_LATITUDE;let i,a=e instanceof Array?{lng:e[0],lat:e[1]}:{lng:e.lng,lat:e.lat},n=a.lng,o=Math.max(Math.min(s,a.lat),-s);return{x:n*r,y:(i=0===o?0:Math.log(Math.tan((90+o)*t/2))/t)*r}},unproject:function(e){const t=e.x,r=e.y,s=this.RAD,i=this.METERS_PER_DEGREE;let a;return 0===r?a=0:(a=r/i,a=(2*Math.atan(Math.exp(a*s))-Math.PI/2)/s),{lng:fo(t/i,-180,180),lat:fo(a,-this.MAX_LATITUDE,this.MAX_LATITUDE)}},locate:function(e,t,r){if(!e)return null;if(t=t||0,r=r||0,!t&&!r)return e;let s=e.lng;if(0!==t){let r=Math.abs(t),i=yo(e.lng);s=fo(180*(i+=2*Math.sqrt(Math.pow(Math.sin(r/(2*this.R)),2)/Math.pow(Math.cos(i),2))*(r>0?1:-1))/Math.PI,-180,180)}let i=e.lat;if(0!==r){let t=Math.abs(r),s=yo(e.lat);i=fo(180*(s+=2*Math.sin(t/(2*this.R))*(t>0?1:-1))/Math.PI,-90,90)}return{lng:s,lat:i}},getResolution:function(e){if(!this.resolutions){for(var t=[],r=12756274*Math.PI,s=0;s<=this.maxZoom;s++)t[s]=r/(256*Math.pow(2,s));this.resolutions=t}let i=0|e,a=this.resolutions.length;i=i<0?0:i>a-1?a-1:i;const n=this.resolutions[i];if((0|e)!==e&&i!==a-1){return n+(this.resolutions[i+1]-n)*(e-i)}return n}},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},lngLatToPoint:function(e,t){var r=this.project(e);return this.transform(r,this.projection.getResolution(t))},locate:function(e,t,r){return this.projection.locate(e,t,r)},transform:function(e,t){return{x:this.matrix[0]*(e.x-this.matrix[2])/t,y:this.matrix[1]*(e.y-this.matrix[3])/t}}};zn.a.supermap.Transform=go;
  /* Copyright© 2000 - 2019 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.*/
  const vo=go.projection,{Color:So,Scene:bo,WebGLRenderer:xo,CanvasRenderer:Co,PerspectiveCamera:_o}=mo,To=Math.PI/180,Eo=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,wo=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame;class Ao{constructor(e,t,r){this._layer=e,this.renderer=t||"gl",this.options=r}setMap(e){this.map=e}render(){this._layer&&(this.prepare(),this._layer.fire("initialized"),this._layer&&this._layer.draw(this.context,this.scene,this.camera),this._layer.fire("draw"),this.renderScene())}update(){this.remove(),this.render()}renderScene(){this.locationCamera(),this.animationFrame=this.renderFrame(function(){this.animationFrame=null,this.context&&this.context.render(this.scene,this.camera)}.bind(this))}renderFrame(e){return Eo(function(){e&&"function"==typeof e&&e()})}resize(){this._resetElementSize(this.container),this._resetElementSize(this.canvas);let e=this.canvas.width,t=this.canvas.height,r=this.getMapSize();this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.context.setSize(r.width,r.height),this.renderScene()}prepare(){if(!this.map)return new Error("map object is necessary");this.canvas?this.clear(this.context):(this._initContainer(),this._initThreeRenderer(),this._layer.fire("rendererinitialized"))}getMapSize(){let e=this.map.getContainer();return{width:e.clientWidth,height:e.clientHeight}}cancelFrame(){null!=this.animationFrame&&wo(this.animationFrame)}remove(){null!=this.animationFrame&&wo(this.animationFrame),this.container.removeChild(this.canvas),this.container.parentNode.removeChild(this.container),this.context=null,this.canvas=null,this.container=null}clear(e){e&&e.clear&&e.clear(),e&&e.clearRect&&e.clearRect(0,0,e.canvas.width,e.canvas.height)}getScale(e){let t=this.map,r=null==e?t.getZoom():e,s=vo.getResolution(vo.nativeMaxZoom);return vo.getResolution(r)/s}getCanvasContainer(){return this.container}getCanvas(){return this.canvas}locationCamera(){let e=this.map,t=this.getMapSize(),r=e.transform.zoomScale(vo.nativeMaxZoom-e.getZoom()-1),s=Math.tan(e.transform.fov/2*To),i=this.camera,a=e.getPitch()*To,n=-r*t.height/2/s;i.position.z=n*Math.cos(a);let o=go.lngLatToPoint(e.getCenter(),vo.nativeMaxZoom),l=Math.sin(a)*n,h=e.getBearing()*To;i.position.x=o.x+l*Math.sin(h),i.position.y=o.y-l*Math.cos(h),i.up.set(Math.sin(h),-Math.cos(h),0),i.lookAt(new mo.Vector3(o.x,o.y,0)),i.updateProjectionMatrix()}_initContainer(){var e=this._createCanvas(),t=this.container=document.createElement("div");this._layer._layerId&&(t.id=this._layer._layerId),t.className="threejs-wrapper",t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.overflow="hidden",this._resetElementSize(t),t.appendChild(e),this.map.getCanvasContainer().appendChild(t)}_createCanvas(){if(this.canvas)return;const e=this.canvas=document.createElement("canvas");return e.className="threejs-overlay",e.style.outline="none",this._resetElementSize(e),e}_resetElementSize(e){if(!e)return;const t=this.getMapSize(),r=window.devicePixelRatio?window.devicePixelRatio:1,s=r*t.width,i=r*t.height;e.width=s,e.height=i,e.style.width=t.width+"px",e.style.height=t.height+"px"}_initThreeRenderer(){let e,t=this.map,r=this.getMapSize();"gl"===(this.renderer||"gl")?((e=new xo({canvas:this.canvas,alpha:!0,antialias:!0,preserveDrawingBuffer:!0},this.options)).autoClear=!0,e.clear()):e=new Co(ye.extend({canvas:this.canvas,alpha:!0},this.options)),e.setClearColor(new So(1,1,1),0),e.canvas=this.canvas,this.context=e;let s=t.transform.fov,i=Math.tan(s/2*To),a=this.getScale(vo.minZoom)/this.getScale(vo.nativeMaxZoom)*r.height/2/i;this.camera=new _o(s,r.width/r.height,1,a),this.scene=new bo,this.scene.add(this.camera)}}
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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.*/const{Vector3:Lo,Shape:Po,Mesh:No,BufferGeometry:Mo,ExtrudeGeometry:Oo}=mo;class Io extends zn.a.Evented{constructor(e,t,r){super(),this._layerId=e,this.options=r;let s=r&&r.threeOptions;this.renderer=new Ao(this,t,s)}toThreeShape(e){if(!e)return null;let t=this.getCoordinatesCenter(e),r=this.lngLatToPosition(t),s=e.map(e=>this.lngLatToPosition({lng:e[0],lat:e[1]}).sub(r));return new Po(s)}toThreeMesh(e,t,r,s){if(!e)return null;let i=e;s&&(i=this.removeDuplicatedCoordinates(e));let a=this.distanceToThreeVector3(t,t).x,n=this.toThreeShape(i),o=new Oo(n,{amount:a,bevelEnabled:!0}),l=(new Mo).fromGeometry(o),h=new No(l,r),u=this.lngLatToPosition(this.getCoordinatesCenter(i));return h.position.set(u.x,u.y,-a),h}addObject(e,t){t&&e&&this.setPosition(e,t),this.renderer&&this.renderer.scene.add(e)}getScene(){return this.renderer.scene}getCamera(){return this.renderer.camera}getThreeRenderer(){return this.renderer.context}clearMesh(){let e=this.renderer.scene;if(!e)return this;for(let t=e.children.length-1;t>=0;t--)e.children[t]instanceof mo.Mesh&&e.remove(e.children[t]);return this}clearAll(e){let t=this.renderer.scene;if(!t)return this;for(let r=t.children.length-1;r>=0;r--)!e&&t.children[r]instanceof mo.Camera||t.remove(t.children[r]);return this}setPosition(e,t){if(!e||!t)return this;var r=this.lngLatToPosition(t);return e.position.set(r.x,r.y,r.z),this}lngLatToPosition(e){let t=go.projection.nativeMaxZoom,r=go.lngLatToPoint(e,t);return new Lo(r.x,r.y,-0)}distanceToThreeVector3(e,t,r){let s=this._map,i=r||s.getCenter(),a=go.projection.nativeMaxZoom,n=go.locate(i,e,t),o=go.lngLatToPoint(i,a),l=go.lngLatToPoint(n,a),h=Math.abs(l.x-o.x)*Math.sign(e),u=Math.abs(l.y-o.y)*Math.sign(t);return new Lo(h,u,0)}removeDuplicatedCoordinates(e){function t(e,t){return e[0]===t[0]&&e[1]===t[1]}let r=[].concat(e);for(let e=r.length-1;e>=1;e--)t(r[e],r[e-1])&&r.splice(e,1);return t(r[0],r[r.length-1])&&r.splice(r.length-1,1),r}getCoordinatesCenter(e){let t=0,r=0,s=0,i=0,a=e.length;for(;i<a;i++)e[i]&&(t+=e[i][0],r+=e[i][1],s++);return{lng:t/s,lat:r/s}}addTo(e){var t=this;return t._map=e,t.renderer.setMap(e),t.renderer.render(),t._map.on("render",this._update.bind(t)),t._map.on("resize",this._resize.bind(t)),t.on("render",function(){this.context&&this.context.render(this.scene,this.camera)}.bind(t.renderer)),this}getCanvasContainer(){return this.renderer.getCanvasContainer()}getCanvas(){return this.renderer.getCanvas()}remove(){let e=this._map,t=this;e.off("render",t._update.bind(t)),e.off("resize",t._resize.bind(t)),t.renderer.remove(),t._map=null}draw(e,t,r){return this}renderScene(){return this.renderer.renderScene(),this.fire("renderscene"),this}_resize(){this.renderer.resize()}_update(){return this.renderScene(),this.fire("render"),this}}zn.a.supermap.ThreeLayer=Io;
  /* Copyright© 2000 - 2019 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 Fo extends zn.a.Evented{constructor(e,t){super();var r=t||{};this.name=e,this.id=r.id?r.id:ye.createUniqueID("HeatMapLayer_"),this.map=r.map?r.map:null,this.loadWhileAnimating=void 0===r.loadWhileAnimating||r.loadWhileAnimating,this.visibility=!0,this.opacity=r.opacity?r.opacity:1,this.colors=r.colors?r.colors:["blue","cyan","lime","yellow","red"],this.useGeoUnit=!!r.useGeoUnit&&r.useGeoUnit,this.radius=r.radius?r.radius:50,this.featureWeight=r.featureWeight?r.featureWeight:null,this.features=[],this.maxWeight=null,this.minWeight=null,this.EVENT_TYPES=["featuresadded","featuresremoved","featuresdrawcompleted"],this.supported=!1,this.rootCanvas=null,this.canvasContext=null,this.maxWidth=null,this.maxHeight=null}onAdd(e){this.map=e,0!==this.features.length&&(this._createCanvasContainer(),this.map.on("resize",this._resizeEvent.bind(this)),this.map.on("zoomstart",this._zoomStartEvent.bind(this)),this.map.on("zoomend",this._zoomEndEvent.bind(this)),this.map.on("rotatestart",this._rotateStartEvent.bind(this)),this.map.on("rotate",this._rotateEvent.bind(this)),this.map.on("rotateend",this._rotateEndEvent.bind(this)),this.map.on("dragend",this._dragEndEvent.bind(this)),this.map.on("movestart",this._moveStartEvent.bind(this)),this.map.on("move",this._moveEvent.bind(this)),this.map.on("moveend",this._moveEndEvent.bind(this)),this.map.on("remove",this.removeFromMap.bind(this)),this.refresh())}removeFromMap(){this.removeAllFeatures(),this.map.getCanvasContainer().removeChild(this.rootCanvas)}_createCanvasContainer(){this.supported=!0,this.mapContainer=this.map.getCanvasContainer(),this.rootCanvas=document.createElement("canvas"),this.rootCanvas.id=this.id;var e=this.map.getCanvas();this.rootCanvas.width=this.maxWidth=parseInt(e.width),this.rootCanvas.height=this.maxHeight=parseInt(e.height),ye.modifyDOMElement(this.rootCanvas,null,null,null,"absolute",null,null,this.opacity),this.canvasContext=this.rootCanvas.getContext("2d"),this.mapContainer.appendChild(this.rootCanvas)}addFeatures(e){this.features=this.toiClientFeature(e),this.fire(this.EVENT_TYPES[0],{features:e,succeed:!0}),this.refresh()}refresh(){if(0!==this.features.length&&this.map){var e=this.map.getBounds();this.updateHeatPoints(e)}}setOpacity(e){e!==this.opacity&&(this.opacity=e,ye.modifyDOMElement(this.rootCanvas,null,null,null,null,null,null,e),null!==this.map&&this.fire("changelayer",{layer:this,property:"opacity"}))}updateHeatPoints(e){this.features&&this.features.length>0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)}convertFastToPixelPoints(e){var t,r,s,i,a,n,o,l=[],h=e.getEast()-e.getWest(),u=e.getNorth()-e.getSouth(),c=this.map.getCanvas();i=h/c.width>u/c.height?h/c.width:u/c.height,this.useRadius=this.useGeoUnit?parseInt(this.radius/i):this.radius;for(var d=0;d<this.features.length;d++){var p=this.features[d],m=p.geometry,f=this.getPixelXY(new ge(m.x,m.y));this.featureWeight?(f.weight=p.attributes[this.featureWeight],this.maxWeight||(a=a||f.weight,n=n||f.weight,a=Math.max(a,f.weight),n=Math.min(n,f.weight))):f.weight=1,t=Math.floor(f.x),r=Math.floor(f.y),s=f.weight,l.push([t,r,s])}this.maxWeight?this.draw(l,this.maxWeight):(o=a&&n?(a+n)/2:1,this.draw(l,o))}draw(e,t){if(!(this.maxHeight>0&&this.maxWidth>0))return!1;var r=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var s=0;s<e.length;s++){var i=e[s];this.canvasContext.globalAlpha=Math.max(i[2]/t,.05),this.canvasContext.drawImage(this.circle,i[0]-this.useRadius,i[1]-this.useRadius)}var a=r.getImageData(0,0,this.maxWidth,this.maxHeight);this.colorize(a.data,this.grad),r.putImageData(a,0,0)}colorize(e,t){for(var r,s=0;s<e.length;s+=4)(r=4*e[s+3])&&(e[s]=t[r],e[s+1]=t[r+1],e[s+2]=t[r+2])}drawCircle(e){var t=e/2,r=this.circle=document.createElement("canvas"),s=r.getContext("2d");r.height=2*e,r.width=2*e,s.shadowOffsetX=s.shadowOffsetY=2*e,s.shadowBlur=t,s.shadowColor="#000000",s.beginPath(),s.arc(-e,-e,e/2,0,2*Math.PI,!0),s.closePath(),s.fill()}createGradient(){var e=this.colors,t=document.createElement("canvas"),r=t.getContext("2d"),s=r.createLinearGradient(0,0,0,256);t.height=256,t.width=1;for(var i=1,a=0,n=e.length;a<n;a++)s.addColorStop(i/n,e[a]),i++;r.fillStyle=s,r.fillRect(0,0,1,256),this.grad=r.getImageData(0,0,1,256).data}getPixelXY(e){var t,r=this.map;if(e instanceof _e||e instanceof Ee){let s=r.project(new zn.a.LngLat(e.x,e.y));t={x:parseInt(s.x),y:parseInt(s.y)}}if(e instanceof ge){let s=r.project(new zn.a.LngLat(e.lon,e.lat));t={x:parseInt(s.x),y:parseInt(s.y)}}return t}toiClientFeature(e){ye.isArray(e)||(e=[e]);let t=[];for(let r=0;r<e.length;r++)if(e[r]instanceof Re)t.push(e[r]);else if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e[r].type)){let s=new Je;t=t.concat(s.read(e[r]))}else{if(!e[r].geometry||!e[r].geometry.parts)throw new Error(`Features[${r}]'s type does not match, please check.`);t.push(bi.fromJson(e[r]).toFeature())}return t}removeFeatures(e){if(e&&0!==e.length&&this.features&&0!==this.features.length){if(e===this.features)return this.removeAllFeatures();ye.isArray(e)||(e=[e]);for(var t,r,s=[],i=0,a=e.length;i<a;i++)t=e[i],-1!==(r=ye.indexOf(this.features,t))?this.features.splice(r,1):s.push(t);var n=0==s.length;this.fire(this.EVENT_TYPES[1],{features:s,succeed:n}),this.refresh()}}removeAllFeatures(){this.features=[],this.refresh()}moveTo(e,t){var r=document.getElementById(this.rootCanvas.id);if(t=void 0===t||t){var s=document.getElementById(e);r&&s&&s.parentNode.insertBefore(r,s)}else{var i=document.getElementById(e);if(r){if(i.nextSibling)return void i.parentNode.insertBefore(r,i.nextSibling);i.parentNode.appendChild(r)}}}setVisibility(e){this.rootCanvas&&e!==this.visibility&&(this.visibility=e,this.rootCanvas.style.display=e?"block":"none")}_resizeEvent(){this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getCanvas();this.rootCanvas.style.width=e.style.width,this.rootCanvas.style.height=e.style.height,this.rootCanvas.width=this.maxWidth=parseInt(e.width),this.rootCanvas.height=this.maxHeight=parseInt(e.height);let t=window.devicePixelRatio||1;1!==t&&this.canvasContext&&this.canvasContext.scale(t,t),this.refresh()}_zoomStartEvent(){!this.loadWhileAnimating&&this.visibility&&(this.zooming=!0,this._hide())}_zoomEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.zooming=!1,this._show())}_rotateStartEvent(){!this.loadWhileAnimating&&this.visibility&&(this.rotating=!0)}_rotateEvent(){if(!this.loadWhileAnimating&&this.visibility){0!==this.map.getPitch()&&this._hide(),this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing;this.rootCanvas.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg)"}}_rotateEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.rotating=!1,this._show())}_dragEndEvent(){!this.loadWhileAnimating&&this.visibility&&this._hide()}_moveEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.rootCanvas.style.transform="",this.refresh(),this._show())}_moveStartEvent(){if(!this.loadWhileAnimating&&this.visibility){this.startPitch=this.map.getPitch(),this.startBearing=this.map.getBearing();var e=this.map.project(new zn.a.LngLat(0,0));this.startMoveX=e.x,this.startMoveY=e.y}}_moveEvent(){if(!this.loadWhileAnimating&&this.visibility){if(!this.rotating&&!this.zooming){0!==this.map.getPitch()&&this._hide(),this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing,r=this.map.project(new zn.a.LngLat(0,0)),s=r.x-this.startMoveX,i=r.y-this.startMoveY;this.rootCanvas.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg) translate3d("+s+"px, "+i+"px, 0px)"}}else this.refresh()}_hide(){this.rootCanvas.style.display="none"}_show(){this.rootCanvas.style.display="block"}}zn.a.supermap.HeatMapLayer=Fo;
  /* Copyright© 2000 - 2019 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 Ro{constructor(e,t){this.layerTypeID=e,this.data=[].concat(t.data),this.props=t.props?t.props:{},this.callback=t.callback?t.callback:{},this.id=t.layerId?t.layerId:ye.createUniqueID("graphicLayer_"+this.layerTypeID+"_"),this.visibility=!0}onAdd(e){if(this.map=e,this.canvas)return this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas),this;e.getCRS&&e.getCRS()!==zn.a.CRS.EPSG3857&&(this.coordinateSystem=3,this.isGeographicCoordinateSystem=!0),this._initContainer(),this._createLayerByLayerTypeID();var t=this._getState();let r={};for(let e in t)r[e]=t[e];return r.layers=[this.layer],r.canvas=this.canvas,this.deckGL=new window.DeckGL.experimental.DeckGLJS(r),this.map.on("render",this._moveEvent.bind(this)),this.map.on("resize",this._resizeEvent.bind(this)),this._draw(),this}remove(){this.map.off("render",this._moveEvent.bind(this)),this.map.off("resize",this._resizeEvent.bind(this)),this.map.getCanvasContainer().removeChild(this.canvas)}removeFromMap(){this.remove(),this.clear()}moveTo(e,t){var r=document.getElementById(this.id);if(t=void 0===t||t){var s=document.getElementById(e);r&&s&&s.parentNode.insertBefore(r,s)}else{var i=document.getElementById(e);if(r){if(i.nextSibling)return void i.parentNode.insertBefore(r,i.nextSibling);i.parentNode.appendChild(r)}}}setVisibility(e){this.canvas&&e!==this.visibility&&(this.visibility=e,this.canvas.style.display=e?"block":"none")}setStyle(e){Yn.extend(this.props,e),this.update()}setData(e){this.data=this.data||[],this.data.length=0;let t=Yn.isArray(e)?[].concat(e):[e];this.layer.props.data||(this.layer.props.data=[]),this.layer.props.data.length=0;for(let e=0;e<t.length;e++)this.layer.props.data.push(t[e]);this.data=this.layer.props.data,this.update()}addData(e){this.data=this.data||[];let t=Yn.isArray(e)?[].concat(e):[e];this.layer.props.data||(this.layer.props.data=[]);for(let e=0;e<t.length;e++)this.layer.props.data.push(t[e]);this.update()}update(){let e={dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0},t=this._getState();if("polygon-layer"!==this.layerTypeID)this.layer.setChangeFlags(e),this.layer.setState(t);else{const r=this.layer.getSubLayers();for(let s=0;s<r.length;s++)r[s].setChangeFlags(e),r[s].setState(t);this._draw()}}clear(){this.removeData(),this.deckGL.finalize()}removeData(){this.data.length=0,this.layer.props.data&&(this.layer.props.data.length=0),this.update()}_draw(){let e=this._getState();e.layers=[this.layer],e.canvas=this.canvas,this.deckGL.setProps(e)}_getState(){let e=this.map,t=parseInt(this.canvas.style.width),r=parseInt(this.canvas.style.height),s=e.getCenter(),i={width:t,height:r,longitude:s.lng,latitude:s.lat,zoom:e.getZoom(),maxZoom:e.getMaxZoom(),pitch:e.getPitch(),bearing:e.getBearing()},a={};for(let e in i)a[e]=i[e];for(let e in this.props)a[e]=this.props[e];return e.getCRS&&e.getCRS()!==zn.a.CRS.EPSG3857&&(a.coordinateSystem=this.coordinateSystem,a.isGeographicCoordinateSystem=this.isGeographicCoordinateSystem),a.data=this.data,a}_createLayerByLayerTypeID(){if(this.props.data=this.data,this.props.isGeographicCoordinateSystem=this.isGeographicCoordinateSystem,this.props.coordinateSystem=this.coordinateSystem,this.props.pickable=Boolean(this.props.onClick)||Boolean(this.props.onHover),"scatter-plot"===this.layerTypeID)this.props.id="scatter-plot",this._createScatterPlotLayer();else if("path-layer"===this.layerTypeID)this.props.id="path-layer",this._createPathLayer();else if("polygon-layer"===this.layerTypeID)this.props.id="polygon-layer",this._createPolygonLayer();else if("arc-layer"===this.layerTypeID)this.props.id="arc-layer",this._createArcLineLayer();else{if("hexagon-layer"!==this.layerTypeID)throw new Error(this.layerTypeID+" does not support");this.props.id="hexagon-layer",this._createHexagonLayer()}}_createScatterPlotLayer(){var e=this;this.props.getPosition=this.callback.getPosition?this.callback.getPosition:function(e){if(!e)return[0,0,0];let t=e.getLngLat();return t&&[t.lng,t.lat,0]},this.callback.getColor&&(this.props.getColor=this.callback.getColor?this.callback.getColor:function(t){let r=t&&t.getStyle();return r&&r.color||e.props.color}),this.callback.getRadius&&(this.props.getRadius=this.callback.getRadius?this.callback.getRadius:function(t){let r=t&&t.getStyle();return r&&r.radius||e.props.radius}),(this.props.color||this.props.radius)&&(this.props.updateTriggers={},this.props.radius&&(this.props.updateTriggers.getRadius=[this.props.radius]),this.props.color&&(this.props.updateTriggers.getColor=[this.props.color])),this.layer=new window.DeckGL.ScatterplotLayer(this.props)}_createPathLayer(){this.props.getPath=this.callback.getPath?this.callback.getPath:function(e){return e.geometry.coordinates},this.callback.getColor&&(this.props.getColor=this.callback.getColor),this.callback.getWidth&&(this.props.getWidth=this.callback.getWidth),this.callback.getDashArray&&(this.props.getDashArray=this.callback.getDashArray),this.layer=new window.DeckGL.PathLayer(this.props)}_createPolygonLayer(){this.props.getPolygon=this.callback.getPolygon?this.callback.getPolygon:function(e){return e.geometry.coordinates},this.callback.getElevation&&(this.props.getElevation=this.callback.getElevation),this.callback.getFillColor&&(this.props.getFillColor=this.callback.getFillColor),this.callback.getLineColor&&(this.props.getLineColor=this.callback.getLineColor),this.callback.getLineWidth&&(this.props.getLineWidth=this.callback.getLineWidth),this.props.updateTriggers={},this.props.updateTriggers.getColor=this.props.color?this.props.color:[0,0,128,128],this.layer=new window.DeckGL.PolygonLayer(this.props)}_createArcLineLayer(){this.props.getSourcePosition=this.callback.getSourcePosition?this.callback.getSourcePosition:function(e){return e?e.geometry.coordinates[0]:[0,0,0]},this.props.getTargetPosition=this.callback.getTargetPosition?this.callback.getTargetPosition:function(e){return e?e.geometry.coordinates[1]:[0,0,0]},this.callback.getStrokeWidth&&(this.props.getStrokeWidth=this.callback.getStrokeWidth),this.callback.getSourceColor&&(this.props.getSourceColor=this.callback.getSourceColor),this.callback.getTargetColor&&(this.props.getTargetColor=this.callback.getTargetColor),this.layer=new window.DeckGL.ArcLayer(this.props)}_createHexagonLayer(){this.props.getPosition=this.callback.getPosition?this.callback.getPosition:function(e){return e?e.geometry.coordinates:[0,0,0]},this.callback.getColorValue&&(this.props.getColorValue=this.callback.getColorValue),this.callback.getElevationValue&&(this.props.getElevationValue=this.callback.getElevationValue),this.layer=new window.DeckGL.HexagonLayer(this.props)}_initContainer(){this.canvas=this._createCanvas(),this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas)}_createCanvas(){let e=document.createElement("canvas");e.id=this.id,e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.cursor="";let t=this.map;return e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,e}_moveEvent(){this._draw()}_resizeEvent(){let e=this.canvas,t=this.map;e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,this._draw()}}zn.a.supermap.DeckglLayer=Ro;
  /* Copyright© 2000 - 2019 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 Do={getPoint:function(e){if(e&&e instanceof Array)return new eo.DataSet([{geometry:{type:"Point",coordinates:e}}])},getPoints:function(e){if(e&&e instanceof Array){var t=[];return e.map(function(e){return t.push({geometry:{type:"Point",coordinates:e.geometry.coordinates}}),e}),new eo.DataSet(t)}},getCurveLines:function(e,t){if(e&&e instanceof Array&&t&&t instanceof Array){var r=[];return t.map(function(t){var s=t.geometry&&t.geometry.coordinates,i={lng:s[0],lat:s[1]},a={lng:e[0],lat:e[1]},n=eo.utilCurve.getPoints([a,i]);return r.push({geometry:{type:"LineString",coordinates:n}}),t}),new eo.DataSet(r)}},getCurveDynamicPoints:function(e,t){if(e&&e instanceof Array&&t&&t instanceof Array){var r=[];return t.map(function(t){for(var s=t.geometry&&t.geometry.coordinates,i={lng:s[0],lat:s[1]},a={lng:e[0],lat:e[1]},n=eo.utilCurve.getPoints([a,i]),o=0;o<n.length;o++)r.push({geometry:{type:"Point",coordinates:n[o]},time:o});return t}),new eo.DataSet(r)}}};zn.a.supermap.MapvDataSet=Do,
  /* Copyright© 2000 - 2019 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.*/
  zn.a.supermap=zn.a.supermap||{},zn.a.supermap.map=zn.a.supermap.map||{};var ko=function(e,t){t=t||{};var r={};r.version=t.version||8,r.layers=t.layers||[],r.light=t.light||{anchor:"viewport",color:"#fcf6ef",intensity:.5,position:[1.15,201,20]};var s={version:r.version,sources:{"vector-tiles":{type:"vector",tiles:[e]}},layers:r.layers,light:r.light};return null!=t.sprite&&(s.sprite=t.sprite),null!=t.glyphs&&(s.glyphs=t.glyphs),s},Bo=function(e,t){t&&e&&e.addLayer({id:"background",type:"background",paint:{"background-color":t}},"background")},Go=function(e,t,r,s,i,a){if(t&&e){"[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]);for(var n=0;n<t.length;n++){var o=a?a[n]:null,l=Uo(t[n],r,i,o,s);e.addLayer(l,t[n]),e.moveLayer(t[n])}}};function Uo(e,t,r,s,i){return{id:e,type:t,source:r||"vector-tiles","source-layer":s||e,paint:i}}zn.a.supermap.map.getDefaultVectorTileStyle=ko,zn.a.supermap.map.setBackground=Bo,zn.a.supermap.map.setPaintProperty=Go;
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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.*/
  /* Copyright© 2000 - 2019 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 jo extends zn.a.Evented{constructor(e,t){super(),this.options=t||{},this.url=e,this.fire("initialized",this)}}zn.a.supermap.ServiceBase=jo;
  /* Copyright© 2000 - 2019 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 Ho extends jo{constructor(e,t){super(e,t)}code(e,t){var r=this;new mt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).code(r.url+"/geocoding",e)}decode(e,t){var r=this;new mt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).decode(r.url+"/geodecoding",e)}}zn.a.supermap.AddressMatchService=Ho;
  /* Copyright© 2000 - 2019 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 Jo extends jo{constructor(e,t){super(e,t)}queryChart(e,t,r){var s=this,i=s._processParams(e),a=s._processFormat(r);new Jt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:a}).processAsync(i)}getChartFeatureInfo(e){var t=this,r=t.url.concat();new Gt(r+="/chartFeatureInfoSpecs",{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}_processParams(e){if(!e)return{};e.returnContent=null==e.returnContent||e.returnContent,e.filter&&(e.chartQueryFilterParameters=Yn.isArray(e.filter)?e.filter:[e.filter]),e.bounds&&(e.bounds instanceof Array&&(e.bounds=new ve(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3])),e.bounds instanceof zn.a.LngLatBounds&&(e.bounds=new ve(e.bounds.getSouthWest().lng,e.bounds.getSouthWest().lat,e.bounds.getNorthEast().lng,e.bounds.getNorthEast().lat)))}_processFormat(e){return e||i.GEOJSON}}zn.a.supermap.ChartService=Jo;
  /* Copyright© 2000 - 2019 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 Vo extends jo{constructor(e,t){(t=t||{}).projection&&(t.prjCoordSys=t.projection),super(e,t),this.dataFlow=new Xt(e,t),this.dataFlow.events.on({broadcastSocketConnected:this._defaultEvent,broadcastSocketError:this._defaultEvent,broadcastFailed:this._defaultEvent,broadcastSucceeded:this._defaultEvent,subscribeSocketConnected:this._defaultEvent,subscribeSocketError:this._defaultEvent,messageSucceeded:this._defaultEvent,setFilterParamSucceeded:this._defaultEvent,scope:this});var r=this;r.on("subscribeSocketConnected",function(e){r.fire("subscribesucceeded",e)})}initBroadcast(){return this.dataFlow.initBroadcast(),this}broadcast(e){this.dataFlow.broadcast(e)}initSubscribe(){return this.dataFlow.initSubscribe(),this}setExcludeField(e){return this.dataFlow.setExcludeField(e),this.options.excludeField=e,this}setGeometry(e){return this.dataFlow.setGeometry(e),this.options.geometry=e,this}unSubscribe(){this.dataFlow.unSubscribe()}unBroadcast(){this.dataFlow.unBroadcast()}_defaultEvent(e){this.fire(e.eventType||e.type,e)}}zn.a.supermap.DataFlowService=Vo;
  /* Copyright© 2000 - 2019 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 zo extends jo{constructor(e,t){super(e,t)}getFeaturesByIDs(e,t,r){var s=this;new rs(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}getFeaturesByBounds(e,t,r){var s=this;new Xr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}getFeaturesByBuffer(e,t,r){var s=this;new Zr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}getFeaturesBySQL(e,t,r){var s=this;new is(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}getFeaturesByGeometry(e,t,r){var s=this;new es(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}editFeatures(e,t){if(e&&e.dataSourceName&&e.dataSetName){var r=this,s=r.url,i=e.dataSourceName,a=e.dataSetName;new lr(s+="/datasources/"+i+"/datasets/"+a,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(r._processParams(e))}}_processParams(e){if(!e)return{};var t=this;if(e.returnContent=null==e.returnContent||e.returnContent,e.fromIndex=e.fromIndex?e.fromIndex:0,e.toIndex=0===e.toIndex?0:e.toIndex?e.toIndex:-1,e.bounds&&(e.bounds=Yn.toSuperMapBounds(e.bounds)),e.editType&&(e.editType=e.editType.toLowerCase()),e.geometry&&(e.geometry instanceof zn.a.LngLatBounds?e.geometry=Yn.toSuperMapPolygon(e.geometry):e.geometry=Yn.toSuperMapGeometry(e.geometry)),e.features){var r=[];Yn.isArray(e.features)?e.features.map(function(e){return r.push(t._createServerFeature(e)),r}):r.push(t._createServerFeature(e.features)),e.features=r}return e}_createServerFeature(e){var t={},r=[],s=[],i=e.properties;for(var a in i)r.push(a),s.push(i[a]);return t.fieldNames=r,t.fieldValues=s,e.id&&(t.id=e.id),t.geometry=Yn.toSuperMapGeometry(e),t}_processFormat(e){return e||i.GEOJSON}}zn.a.supermap.FeatureService=zo;
  /* Copyright© 2000 - 2019 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 Wo extends jo{constructor(e,t){super(e,t)}getFields(e,t){var r=this;new as(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},datasource:e.datasource,dataset:e.dataset}).processAsync()}getFieldStatisticsInfo(e,t){var r=e.fieldName,s=e.statisticMode;for(var i in s&&!Yn.isArray(s)&&(s=[s]),this.currentStatisticResult={fieldName:r},this._statisticsCallback=t,s)this.currentStatisticResult[s[i]]=null,this._fieldStatisticRequest(e.datasource,e.dataset,r,s[i])}_fieldStatisticRequest(e,t,r,s){var i=this;new Er(i.url,{eventListeners:{scope:i,processCompleted:i._processCompleted,processFailed:i._statisticsCallback},datasource:e,dataset:t,field:r,statisticMode:s,crossOrigin:i.options.crossOrigin,headers:i.options.headers}).processAsync()}_processCompleted(e){var t=this,r=!0,s=e.result;for(var i in this.currentStatisticResult&&null==t.currentStatisticResult[s.mode]&&(this.currentStatisticResult[s.mode]=s.result),t.currentStatisticResult)if(null==t.currentStatisticResult[i]){r=!1;break}r&&t._statisticsCallback({result:t.currentStatisticResult})}}zn.a.supermap.FieldService=Wo;
  /* Copyright© 2000 - 2019 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 qo extends jo{constructor(e,t){super(e,t)}getGridCellInfos(e,t){if(!e)return null;var r=this;new os(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}}zn.a.supermap.GridCellInfosService=qo;
  /* Copyright© 2000 - 2019 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 Yo extends jo{constructor(e,t){super(e,t)}getLayersInfo(e){var t=this;new Gs(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{processCompleted:e,processFailed:e}}).processAsync()}setLayerInfo(e,t){if(e){var r=this,s=e.resourceID,i=e.tempLayerName,a=e.layerInfo;if(s&&i){var n=r.url.concat();new Ci(n+="/tempLayersSet/"+s+"/"+i,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(a)}}}setLayersInfo(e,t){if(e){var r=this,s=e.resourceID,i=!!e.isTempLayers&&e.isTempLayers,a=e.layersInfo;if((!i||s)&&a)new Ti(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},resourceID:s,isTempLayers:i}).processAsync(a)}}setLayerStatus(e,t){if(e){var r=this;new wi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(e)}}}zn.a.supermap.LayerInfoService=Yo;
  /* Copyright© 2000 - 2019 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 Qo extends jo{constructor(e,t){super(e,t)}getMapInfo(e){var t=this;new $s(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e},projection:t.options.projection}).processAsync()}getTilesets(e){var t=this;new Xi(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}}zn.a.supermap.MapService=Qo;
  /* Copyright© 2000 - 2019 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 Xo extends jo{constructor(e,t){super(e,t)}measureDistance(e,t){this.measure(e,"DISTANCE",t)}measureArea(e,t){this.measure(e,"AREA",t)}measure(e,t,r){var s=this;new si(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,measureMode:t,eventListeners:{scope:s,processCompleted:r,processFailed:r}}).processAsync(s._processParam(e))}_processParam(e){return!e||e.geometry instanceof Se||(e.geometry=Yn.toSuperMapGeometry(e.geometry)),e}}zn.a.supermap.MeasureService=Xo;
  /* Copyright© 2000 - 2019 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 Ko extends jo{constructor(e,t){super(e,t)}burstPipelineAnalyst(e,t){var r=this;new Bt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(r._processParams(e))}computeWeightMatrix(e,t){var r=this;new Qt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(r._processParams(e))}findClosestFacilities(e,t,r){var s=this;new Ar(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}streamFacilityAnalyst(e,t,r){var s=this;new fr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}findLocation(e,t,r){var s=this;new Pr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}findPath(e,t,r){var s=this;new Ir(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}findTSPPaths(e,t,r){var s=this;new kr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}findMTSPPaths(e,t,r){var s=this;new Mr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}findServiceAreas(e,t,r){var s=this;new Rr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}updateEdgeWeight(e,t){var r=this;new aa(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}updateTurnNodeWeight(e,t){var r=this;new oa(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}_processParams(e){if(!e)return{};var t=this;if(e.centers&&Yn.isArray(e.centers)&&e.centers.map(function(r,s){return e.centers[s]=t._toPointObject(r),e.centers[s]}),e.nodes&&Yn.isArray(e.nodes)&&e.nodes.map(function(r,s){return e.nodes[s]=t._toPointObject(r),e.nodes[s]}),e.event&&(e.event=t._toPointObject(e.event)),e.facilities&&Yn.isArray(e.facilities)&&e.facilities.map(function(r,s){return e.facilities[s]=t._toPointObject(r),e.facilities[s]}),e.parameter&&e.parameter.barrierPoints){var r=e.parameter.barrierPoints;Yn.isArray(r)?r.map(function(r,s){return e.parameter[s]=t._toPointObject(r),e.parameter.barrierPoints[s]}):e.parameter.barrierPoints=[r instanceof zn.a.LngLat?{x:r.lng,y:r.lat}:r]}return e}_toPointObject(e){return Yn.isArray(e)?{x:e[0],y:e[1]}:e instanceof zn.a.LngLat?{x:e.lng,y:e.lat}:e instanceof zn.a.Point?{x:e.x,y:e.y}:e}_processFormat(e){return e||i.GEOJSON}}zn.a.supermap.NetworkAnalystService=Ko;
  /* Copyright© 2000 - 2019 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 Zo extends jo{constructor(e,t){super(e,t)}sinksFacilityAnalyst(e,t){var r=this;new cr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}sourcesFacilityAnalyst(e,t){var r=this;new pr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}traceUpFacilityAnalyst(e,t){var r=this;new Sr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}traceDownFacilityAnalyst(e,t){var r=this;new gr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}upstreamFacilityAnalyst(e,t){var r=this;new xr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}}zn.a.supermap.NetworkAnalyst3DService=Zo;
  /* Copyright© 2000 - 2019 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 $o extends jo{constructor(e,t){super(e,t),this.kernelDensityJobs={},this.summaryMeshJobs={},this.queryJobs={},this.summaryRegionJobs={},this.vectorClipJobs={},this.overlayGeoJobs={},this.buffersJobs={},this.topologyValidatorJobs={},this.summaryAttributesJobs={}}getKernelDensityJobs(e,t){var r=this,s=r._processFormat(t);new qs(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getKernelDensityJobs()}getKernelDensityJob(e,t,r){var s=this,i=s._processFormat(r);new qs(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getKernelDensityJob(e)}addKernelDensityJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new qs(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.kernelDensityJobs[e.id]=e.state}},format:n}).addKernelDensityJob(a,r)}getKernelDensityJobState(e){return this.kernelDensityJobs[e]}getSummaryMeshJobs(e,t){var r=this,s=r._processFormat(t);new Fi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getSummaryMeshJobs()}getSummaryMeshJob(e,t,r){var s=this,i=s._processFormat(r);new Fi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getSummaryMeshJob(e)}addSummaryMeshJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Fi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryMeshJobs[e.id]=e.state}},format:n}).addSummaryMeshJob(a,r)}getSummaryMeshJobState(e){return this.summaryMeshJobs[e]}getQueryJobs(e,t){var r=this,s=r._processFormat(t);new Li(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getQueryJobs()}getQueryJob(e,t,r){var s=this,i=s._processFormat(r);new Li(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getQueryJob(e)}addQueryJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Li(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.queryJobs[e.id]=e.state}},format:n}).addQueryJob(a,r)}getQueryJobState(e){return this.queryJobs[e]}getSummaryRegionJobs(e,t){var r=this,s=r._processFormat(t);new Di(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getSummaryRegionJobs()}getSummaryRegionJob(e,t,r){var s=this,i=s._processFormat(r);new Di(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getSummaryRegionJob(e)}addSummaryRegionJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Di(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryRegionJobs[e.id]=e.state}},format:n}).addSummaryRegionJob(a,r)}getSummaryRegionJobState(e){return this.summaryRegionJobs[e]}getVectorClipJobs(e,t){var r=this,s=r._processFormat(t);new ha(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getVectorClipJobs()}getVectorClipJob(e,t,r){var s=this,i=s._processFormat(r);new ha(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getVectorClipJob(e)}addVectorClipJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new ha(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.vectorClipJobs[e.id]=e.state}},format:n}).addVectorClipJob(a,r)}getVectorClipJobState(e){return this.vectorClipJobs[e]}getOverlayGeoJobs(e,t){var r=this,s=r._processFormat(t);new ni(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getOverlayGeoJobs()}getOverlayGeoJob(e,t,r){var s=this,i=s._processFormat(r);new ni(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getOverlayGeoJob(e)}addOverlayGeoJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new ni(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.overlayGeoJobs[e.id]=e.state}},format:n}).addOverlayGeoJob(a,r)}getoverlayGeoJobState(e){return this.overlayGeoJobs[e]}getBuffersJobs(e,t){var r=this,s=r._processFormat(t);new Rt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getBuffersJobs()}getBuffersJob(e,t,r){var s=this,i=s._processFormat(r);new Rt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getBuffersJob(e)}addBuffersJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Rt(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.buffersJobs[e.id]=e.state}},format:n}).addBuffersJob(a,r)}getBuffersJobState(e){return this.buffersJobs[e]}getTopologyValidatorJobs(e,t){var r=this,s=r._processFormat(t);new Zi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getTopologyValidatorJobs()}getTopologyValidatorJob(e,t,r){var s=this,i=s._processFormat(r);new Zi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getTopologyValidatorJob(e)}addTopologyValidatorJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Zi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.topologyValidatorJobs[e.id]=e.state}},format:n}).addTopologyValidatorJob(a,r)}getTopologyValidatorJobState(e){return this.topologyValidatorJobs[e]}getSummaryAttributesJobs(e,t){var r=this,s=r._processFormat(t);new Oi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getSummaryAttributesJobs()}getSummaryAttributesJob(e,t,r){var s=this,i=s._processFormat(r);new Oi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getSummaryAttributesJob(e)}addSummaryAttributesJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Oi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryAttributesJobs[e.id]=e.state}},format:n}).addSummaryAttributesJob(a,r)}getSummaryAttributesJobState(e){return this.summaryAttributesJobs[e]}_processFormat(e){return e||i.GEOJSON}_processParams(e){return e?(e.bounds&&(e.bounds=Yn.toSuperMapBounds(e.bounds)),e.query&&(e.query=Yn.toSuperMapBounds(e.query)),e.geometryQuery&&(e.geometryQuery=Yn.toProcessingParam(e.geometryQuery)),e.geometryClip&&(e.geometryClip=Yn.toProcessingParam(e.geometryClip)),e):{}}}zn.a.supermap.ProcessingService=$o;
  /* Copyright© 2000 - 2019 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 el extends jo{constructor(e,t){super(e,t)}queryByBounds(e,t,r){var s=this;new hi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}queryByDistance(e,t,r){var s=this;new ci(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}queryBySQL(e,t,r){var s=this;new fi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}queryByGeometry(e,t,r){var s=this;new pi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.queryParams&&!Yn.isArray(e.queryParams)&&(e.queryParams=[e.queryParams]),e.bounds&&(e.bounds instanceof Array&&(e.bounds=new ve(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3])),e.bounds instanceof zn.a.LngLatBounds&&(e.bounds=new ve(e.bounds.getSouthWest().lng,e.bounds.getSouthWest().lat,e.bounds.getNorthEast().lng,e.bounds.getNorthEast().lat))),e.geometry&&(e.geometry instanceof zn.a.LngLat&&(e.geometry=new _e(e.geometry.lng,e.geometry.lat)),e.geometry instanceof zn.a.Point&&(e.geometry=new _e(e.geometry.x,e.geometry.y)),e.geometry instanceof zn.a.LngLatBounds&&(e.geometry=Yn.toSuperMapPolygon(e.geometry)),e.geometry instanceof Se||(e.geometry=Yn.toSuperMapGeometry(e.geometry))),e):{}}_processFormat(e){return e||i.GEOJSON}}zn.a.supermap.QueryService=el;
  /* Copyright© 2000 - 2019 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 tl extends jo{constructor(e,t){super(e,t)}getAreaSolarRadiationResult(e,t,r){var s=this;new St(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(e)}bufferAnalysis(e,t,r){var s=this;new Nt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}densityAnalysis(e,t,r){var s=this;new nr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}generateSpatialData(e,t,r){var s=this;new Gr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(e)}geoRelationAnalysis(e,t,r){var s=this;new Wr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(e)}interpolationAnalysis(e,t,r){var s=this;new zs(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}mathExpressionAnalysis(e,t,r){var s=this;new ti(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}overlayAnalysis(e,t,r){var s=this;new ii(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}routeCalculateMeasure(e,t,r){var s=this;new gi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}routeLocate(e,t,r){var s=this;new Si(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}surfaceAnalysis(e,t,r){var s=this;new Bi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}terrainCurvatureCalculate(e,t,r){var s=this;new Ui(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(e)}thiessenAnalysis(e,t,r){var s=this;new Yi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}geometrybatchAnalysis(e,t,r){for(var s=this,i=new Qi(s.url,{serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}),a=[],n=0;n<e.length;n++){var o=e[n];a.push({analystName:o.analystName,param:s._processParams(o.param)})}i.processAsync(a)}_processParams(e){if(!e)return{};if(e.bounds&&(e.bounds=Yn.toSuperMapBounds(e.bounds)),e.inputPoints)for(var t=0;t<e.inputPoints.length;t++){var r=e.inputPoints[t];Yn.isArray(r)&&(e.inputPoints[t]={x:r[0],y:r[1],tag:r[2]})}if(e.points)for(let t=0;t<e.points.length;t++){var s=e.points[t];e.points[t]=Yn.toSuperMapPoint(s)}if(e.point&&(e.point=Yn.toSuperMapPoint(e.point)),e.extractRegion&&(e.extractRegion=Yn.toSuperMapGeometry(e.extractRegion)),e.extractParameter&&e.extractParameter.clipRegion&&(e.extractParameter.clipRegion=Yn.toSuperMapGeometry(e.extractParameter.clipRegion)),e.clipParam&&e.clipParam.clipRegion&&(e.clipParam.clipRegion=Yn.toSuperMapGeometry(e.clipParam.clipRegion)),e.sourceRoute&&e.sourceRoute){var i={type:"LINEM"};i.parts=[e.sourceRoute.geometry.coordinates.length],i.points=[];for(let t=0;t<e.sourceRoute.geometry.coordinates.length;t++){var a=e.sourceRoute.geometry.coordinates[t];i.points=i.points.concat({x:a[0],y:a[1],measure:a[2]})}e.sourceRoute=i}if(e.operateRegions&&Yn.isArray(e.operateRegions)&&e.operateRegions.map(function(t,r){return e.operateRegions[r]=Yn.toSuperMapGeometry(t),e.operateRegions[r]}),e.sourceGeometry){var n=null;e.sourceGeometrySRID&&(n=e.sourceGeometrySRID),e.sourceGeometry=Yn.toSuperMapGeometry(e.sourceGeometry),n&&(e.sourceGeometry.SRID=n),delete e.sourceGeometry.sourceGeometrySRID}if(e.operateGeometry&&(e.operateGeometry=Yn.toSuperMapGeometry(e.operateGeometry)),e.sourceGeometries){for(var o=[],l=0;l<e.sourceGeometries.length;l++)o.push(Yn.toSuperMapGeometry(e.sourceGeometries[l]));e.sourceGeometries=o}if(e.operateGeometries){for(var h=[],u=0;u<e.operateGeometries.length;u++)h.push(Yn.toSuperMapGeometry(e.operateGeometries[u]));e.operateGeometries=h}return e.sourceRoute&&e.sourceRoute.components&&Yn.isArray(e.sourceRoute.components)&&e.sourceRoute.components.map(function(t,r){return e.sourceRoute.components[r]=Yn.toSuperMapGeometry(t),e.sourceRoute.components[r]}),e}_processFormat(e){return e||i.GEOJSON}}zn.a.supermap.SpatialAnalystService=tl;
  /* Copyright© 2000 - 2019 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 rl extends jo{constructor(e,t){super(e,t)}getThemeInfo(e,t){var r=this;new qi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}}zn.a.supermap.ThemeService=rl;
  /* Copyright© 2000 - 2019 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 sl extends jo{constructor(e,t){super(e,t)}queryStop(e,t){var r=this;new Ni(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}analysisTransferPath(e,t){var r=this;new ta(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(r._processParams(e))}analysisTransferSolution(e,t){var r=this;new sa(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(r._processParams(e))}_processParams(e){return e?(e.transferLines&&!Yn.isArray(e.transferLines)&&(e.transferLines=[e.transferLines]),e.points&&Yn.isArray(e.points)&&e.points.map(function(t,r){return e.points[r]=t instanceof zn.a.LngLat?{x:t.lng,y:t.lat}:t,e.points[r]}),e):{}}}zn.a.supermap.TrafficTransferAnalystService=sl;
  /* Copyright© 2000 - 2019 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 il=r(4),al=r.n(il),nl=r(7),ol=r.n(nl);
  /* Copyright© 2000 - 2019 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.*/
  zn.a.supermap=zn.a.supermap||{};const ll=["559082264.0287178","279541132.0143589","139770566.0071794","69885283.00358972","34942641.50179486","17471320.75089743","8735660.375448715","4367830.1877224357","2183915.093862179","1091957.546931089","545978.7734655447","272989.7734655447","272989.3867327723","136494.6933663862","68247.34668319309","34123.67334159654","17061.83667079827","8530.918335399136","4265.459167699568","2132.729583849784"],hl=["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"],ul=["GoogleCRS84Quad","GoogleMapsCompatible"];class cl extends zn.a.Evented{constructor(e,t){super(),this.mapId=e,t=t||{},this.server=t.server||"http://www.supermapol.com",this.credentialKey=t.credentialKey,this.credentialValue=t.credentialValue,this.withCredentials=t.withCredentials||!1,this.target=t.target||"map",this._createWebMap()}resize(){this.map.resize()}setMapId(e){this.mapId=e,this._createWebMap()}setWebMapOptions(e){this.server=e.server,this._createWebMap()}setMapOptions(e){let{center:t,zoom:r,maxBounds:s,minZoom:i,maxZoom:a,isWorldCopy:n,bearing:o,pitch:l}=e;t&&t.length&&this.map.setCenter(t),r&&this.map.setZoom(r),s&&this.map.setMaxBounds(s),i&&this.map.setMinZoom(i),a&&this.map.setMaxZoom(a),n&&this.map.setRenderWorldCopies(n),o&&this.map.setBearing(o),l&&this.map.setPitch(l)}_createWebMap(){let e=this.server.split("");"/"!==e[e.length-1]&&(this.server+="/");let t=this.server+"web/maps/"+this.mapId+"/map";this.credentialValue&&this.credentialKey&&(t+="?"+this.credentialKey+"="+this.credentialValue);let r="getUrlResource.json?url=";if(this.excludePortalProxyUrl&&this.server.indexOf(r)>-1){let e=this.server.split(r);e.length>1&&(t=e[0]+r+this.server+"web/maps/"+this.mapId+"/map.json")}this._getMapInfo(t)}_createMap(e){let t=[],r=e.layers;r&&r.length>0&&r.forEach(e=>{e.labelStyle&&t.push(e.labelStyle.fontFamily)},this),t.push("'supermapol-icons'");let s,i=t.join(","),a=e.center,n=e.level||0;n=0===n?0:n-1,s=a?this._unproject([a.x,a.y]):new zn.a.LngLat(0,0),this.map=new zn.a.Map({container:this.target,center:s,zoom:n,style:{version:8,sources:{},layers:[]},crs:this.baseProjection,localIdeographFontFamily:i||""}),this.fire("mapinitialized")}_getMapInfo(e){let t=-1===e.indexOf(".json")?`${e}.json`:e;et.get(t,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(e=>{this.baseProjection=e.projection,this.mapParams={title:e.title,description:e.description};if(!(this.baseProjection in{"EPSG:4490":"EPSG:4490","EPSG:4214":"EPSG:4214","EPSG:4610":"EPSG:4610","EPSG:3857":"EPSG:3857","EPSG:4326":"EPSG:4326"}))throw Error(wn.i18n("msg_crsunsupport"));{this._createMap(e,this.mapSetting);let t=e.layers;this.map.on("load",()=>{this._addBaseMap(e),t&&0!==t.length?this._addLayers(t):this._sendMapToUser(0,0)})}}).catch(e=>{this.fire("getmapfailed",{error:e})})}_addBaseMap(e){this._createBaseLayer(e)}_createBaseLayer(e){let t=e.baseLayer||e,r=t.layerType;(r.indexOf("TIANDITU_VEC")>-1||r.indexOf("TIANDITU_IMG")>-1||r.indexOf("TIANDITU_TER")>-1)&&(r=r.substr(0,12));let s,i={CLOUD:"http://t2.supermapcloud.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}",CLOUD_BLACK:"http://t3.supermapcloud.com/MapService/getGdp?x={x}&y={y}&z={z}",OSM:"http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",GOOGLE:"http://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:"http://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",JAPAN_PALE:"http://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",JAPAN_RELIEF:"http://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png",JAPAN_ORT:"http://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg"};switch(r){case"TIANDITU_VEC":case"TIANDITU_IMG":case"TIANDITU_TER":this._createTiandituLayer(e);break;case"BING":this._createBingLayer(t.name);break;case"WMS":this._createWMSLayer(t);break;case"WMTS":this._createWMTSLayer(t);break;case"TILE":case"SUPERMAP_REST":this._createDynamicTiledLayer(t);break;case"CLOUD":case"CLOUD_BLACK":case"OSM":case"JAPAN_ORT":case"JAPAN_RELIEF":case"JAPAN_PALE":case"JAPAN_STD":case"GOOGLE_CN":case"GOOGLE":s=i[r],this._createXYZLayer(t,s)}}_createTiandituLayer(e){let t=this._getTiandituUrl(e),r=e.baseLayer.layerType,s=Boolean(e.baseLayer.labelLayerVisible),i=t.labelUrl,a=t.tiandituUrl;this._addBaselayer(a,"tianditu-layers-"+r),s&&this._addBaselayer(i,"tianditu-label-layers-"+r)}_createWMTSLayer(e){let t=this._getWMTSUrl(e);this._filterWMTSIsMatched(e,(r,s)=>{r&&this._addBaselayer([t],"wmts-layers"+e.name,0,s)})}_filterWMTSIsMatched(e,t){let r=!1,s=22,i=e.url;et.get(i,null,{withCredentials:!1,withoutFormatSuffix:!0}).then(e=>e.text()).then(i=>{let a=al.a?al.a:window.convert,n=JSON.parse(a.xml2json(i,{compact:!0,spaces:4})).Capabilities.Contents.TileMatrixSet;for(let t=0;t<n.length;t++)if(n[t]["ows:Identifier"]&&n[t]["ows:Identifier"]._text===e.tileMatrixSet)if(ul.includes(n[t].WellKnownScaleSet._text))r=!0;else{if(!n[t].WellKnownScaleSet||"Custom"!==n[t].WellKnownScaleSet._text)throw Error(wn.i18n("msg_tilematrixsetunsupport"));{let e=[],i="EPSG:3857"===this.map.crs?ll:hl;for(let r=0,s=i.length;r<s&&n[t].TileMatrix[r]&&i[r]===n[t].TileMatrix[r].ScaleDenominator._text;r++)e.push(i[r]);if(s=e.length-1,0===e.length)throw Error(wn.i18n("msg_tilematrixsetunsupport"));r=!0}}t(r,s)}).catch(e=>{this.fire("getwmtsfailed",{error:e,map:this.map})})}_createBingLayer(e){this.addLayer(["http://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"],"bing-layers-"+e)}_createXYZLayer(e,t){let r=[];if("OSM"===e.layerType){let e=t.match(/\w\-\w/g)[0],s=e[0],i=e[2],a="";for(let e=97;e<123;e++)a+=String.fromCharCode(e);let n=a.split(""),o=n.indexOf(s),l=n.indexOf(i),h=n.slice(o,l+1);for(let e=0;e<h.length;e++){let s=t.replace(/{\w\-\w}/g,h[e]);r.push(s)}}else if("GOOGLE_CN"===e.layerType){let e=t.match(/\d\-\d/g)[0],s=e[0],i=e[2];for(let e=s;e<=i;e++){let s=t.replace(/{\d\-\d}/g,e);r.push(s)}}else r=[t];this._addBaselayer(r,"XYZ-layers-"+e.name)}_createDynamicTiledLayer(e){let t=e.url+"/zxyTileImage.png?z={z}&x={x}&y={y}";this._addBaselayer([t],"tile-layers-"+e.name)}_createWMSLayer(e){let t=this._getWMSUrl(e);this._addBaselayer([t],"WMS-layers-"+e.name)}_createVectorLayer(e,t){let r=e.style,s=e.featureType,i=e.layerID,a=e.visible,n={};n.style=this._transformStyleToMapBoxGl(r,s),n.layout={visibility:a};let o={type:"geojson",data:{type:"FeatureCollection",features:t}};this._addOverlayToMap(s,o,i,n),"POLYGON"===s&&r.strokeColor&&this._addStrokeLineForPoly(r,o,i+"-strokeLine",a)}_getTiandituUrl(e){let t=/t0/gi,r={},s=e.baseLayer.layerType.split("_")[1].toLowerCase(),i=Boolean(e.baseLayer.labelLayerVisible),a="http://t0.tianditu.gov.cn/{layer}_{proj}/wmts?",n=a,o={vec:"cva",ter:"cta",img:"cia"},l="EPSG:4326"===this.baseProjection?"c":"w",h={service:"WMTS",request:"GetTile",style:"default",version:"1.0.0",layer:s,tilematrixSet:l,format:"tiles",width:256,height:256},u=(a+=this._getParamString(h,a)+"&tilematrix={z}&tilerow={y}&tilecol={x}").replace("{layer}",s).replace("{proj}",l),c=[];for(let e=0;e<8;e++)c.push(u.replace(t,`t${e}`));if(r.tiandituUrl=c,i){let e=o[s];h.layer=e,n=(n+=this._getParamString(h,n)+"&tilematrix={z}&tilerow={y}&tilecol={x}").replace("{layer}",e).replace("{proj}",l);let i=[];for(let e=0;e<8;e++)i.push(n.replace(t,`t${e}`));r.labelUrl=i}return r}_getWMSUrl(e){let t=e.url,r=(t=t.split("?")[0]).split("/"),s={service:"WMS",request:"GetMap",layers:r[r.length-1],styles:"",format:"image/png",transparent:"true",version:"1.1.1",width:256,height:256,srs:this.baseProjection},i="EPSG:4326"===this.baseProjection?"{bbox-epsg-4326}":"{bbox-epsg-3857}";return t+=this._getParamString(s,t)+`&bbox=${i}`}_addLayers(e){this.layers=e;let t,r=0,s=e.length;e.forEach((e,i)=>{if(e.dataSource&&e.dataSource.serverId||"MARKER"===e.layerType){let a=e.dataSource?e.dataSource.serverId:e.serverId,n=`${this.server}web/datas/${a}/content.json?pageSize=9999999&currentPage=1`;a&&et.get(n,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(a=>{if(!1===a.succeed)return r++,this._sendMapToUser(r,s),void this.fire("getlayersfailed",{error:a.error,map:this.map});a.type&&("JSON"===a.type||"GEOJSON"===a.type?(a.content=JSON.parse(a.content.trim()),t=this._formatGeoJSON(a.content,e)):"EXCEL"!==a.type&&"CSV"!==a.type||(t=this._excelData2Feature(a.content,e)),this._addLayer(e,t,i),r++,this._sendMapToUser(r,s))}).catch(e=>{r++,this._sendMapToUser(r,s),this.fire("getlayersfailed",{error:e,map:this.map})})}else if("SUPERMAP_REST"===e.layerType||"TILE"===e.layerType||"WMS"===e.layerType||"WMTS"===e.layerType)this._createBaseLayer(e),r++,this._sendMapToUser(r,s);else if(e.dataSource&&"REST_DATA"===e.dataSource.type){let a=e.dataSource;this._getFeatureBySQL(a.url,[a.dataSourseName||e.name],a=>{t=this._parseGeoJsonData2Feature({allDatas:{features:a.result.features.features},fileCode:e.projection,featureProjection:this.baseProjection}),this._addLayer(e,t,i),r++,this._sendMapToUser(r,s)},e=>{r++,this._sendMapToUser(r,s),this.fire("getfeaturesfailed",{error:e})})}else e.dataSource&&"REST_MAP"===e.dataSource.type&&e.dataSource.url&&this._queryFeatureBySQL(e.dataSource.url,e.dataSource.layerName,"smid=1",null,null,t=>{let a=t&&t.result.recordsets,n=a&&a[0],o=n.fields;if(n&&o){let t=[];for(let e in o){let r=o[e];0===r.indexOf("Sm")&&"SmID"!==r||t.push(r)}this._getFeatures(t,e,t=>{this._addLayer(e,t,i),r++,this._sendMapToUser(r,s)},e=>{r++,this.fire("getfeaturesfailed",{error:e,map:this.map})})}},e=>{this.fire("getlayersfailed",{error:e,map:this.map})})},this)}_getFeatures(e,t,r,s){let i=t.dataSource,a=t.projection;this._queryFeatureBySQL(i.url,i.layerName,null,e,null,e=>{let t=e.result.recordsets[0].features.features,s=this._parseGeoJsonData2Feature({allDatas:{features:t},fileCode:a,featureProjection:this.baseProjection},"JSON");r(s)},e=>{s(e)})}_addLayer(e,t,r){let s=e.layerType;e.layerID=s+"-"+e.name+"-"+r,e.visible=e.visible?"visible":"none",t[0]&&"Polygon"===t[0].geometry.type&&(t=this._handleMultyPolygon(t)),e.style&&e.filterCondition&&"RANGE"!==s&&"UNIQUE"!==s&&(t=this._getFiterFeatures(e.filterCondition,t)),"VECTOR"===s?"POINT"===e.featureType?"SYMBOL_POINT"===e.style.type?this._createSymbolLayer(e,t):this._createGraphicLayer(e,t):this._createVectorLayer(e,t):"UNIQUE"===s?this._createUniqueLayer(e,t):"RANGE"===s?this._createRangeLayer(e,t):"HEAT"===s?this._createHeatLayer(e,t):"MARKER"===s&&this._createMarkerLayer(e,t),e.labelStyle&&e.labelStyle.labelField&&this._addLabelLayer(e,t)}_addLabelLayer(e,t){let r=e.labelStyle;this.map.addLayer({id:e.layerID+"label",type:"symbol",source:{type:"geojson",data:{type:"FeatureCollection",features:t}},paint:{"text-color":r.fill},layout:{"text-field":`{${r.labelField}}`,"text-size":parseFloat(r.fontSize)||12,"text-offset":r.offsetX?[r.offsetX/10||0,r.offsetY/10||0]:[0,-1.5],"text-font":["DIN Offc Pro Italic","Arial Unicode MS Regular"],visibility:e.visible}})}_createSymbolLayer(e,t){document.getElementById(`${this.target}`).classList.add("supermapol-icons-map");let r=e.style,s=e.style.unicode,i=String.fromCharCode(parseInt(s.replace(/^&#x/,""),16)),a=e.layerID;this.map.addSource(a+"-source",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:a,type:"symbol",source:a+"-source",paint:{"text-color":r.fillColor},layout:{"text-field":i,"text-font":["DIN Offc Pro Italic","Arial Unicode MS Regular"],visibility:e.visible}}),this.map.getSource(a+"-source").setData({type:"FeatureCollection",features:t})}_createGraphicLayer(e,t){let r=e.style,s={},i=e.layerID,a={type:"geojson",data:{type:"FeatureCollection",features:t}};if("IMAGE_POINT"===r.type){let t=r.imageInfo,s=t.img;s&&s.src||(t.url=this.server+t.url),this.map.loadImage(t.url||s.src,(t,s)=>{t&&console.log(t);let n=2*Number.parseFloat((r.radius/s.height).toFixed(2));this.map.addImage("imageIcon",s),this.map.addLayer({id:i,type:"symbol",source:a,layout:{"icon-image":"imageIcon","icon-size":n,visibility:e.visible}})})}else if("SVG_POINT"===r.type){let t=r.url;this.svgDiv||(this.svgDiv=document.createElement("div"),document.body.appendChild(this.svgDiv)),this._getCanvasFromSVG(t,this.svgDiv,t=>{let s=t.toDataURL("img/png");s&&this.map.loadImage(s,(s,n)=>{s&&console.log(s);let o=Number.parseFloat((r.radius/t.width).toFixed(2));this.map.addImage("imageIcon",n),this.map.addLayer({id:i,type:"symbol",source:a,layout:{"icon-image":"imageIcon","icon-size":o,visibility:e.visible}})},this)})}else s.style=this._transformStyleToMapBoxGl(r,e.featureType),s.layout={visibility:e.visible},this._addOverlayToMap("POINT",a,i,s)}_createUniqueLayer(e,t){let r=this._getUniqueStyleGroup(e,t);t=this._getFiterFeatures(e.filterCondition,t);let s=e.style,i={},a=e.themeSetting.themeField,n=e.featureType,o=["match",["get","index"]],l=e.layerID;t.forEach(e=>{r.forEach(t=>{t.value===e.properties[a]&&o.push(e.properties.index,t.color)})}),o.push("#ffffff"),i.style=this._transformStyleToMapBoxGl(s,n,o);let h=e.visible;i.layout={visibility:h};let u={type:"geojson",data:{type:"FeatureCollection",features:t}};this._addOverlayToMap(n,u,l,i),"POLYGON"===n&&s.strokeColor&&this._addStrokeLineForPoly(s,u,l+"-strokeLine",h)}_getUniqueStyleGroup(e,t){let r=e.featureType,s=e.style,i=e.themeSetting,a=i.themeField,n=i.colors,o=[],l=i.customSettings;for(let e in t){let r=t[e].properties[a],s=!1;for(let e in o)if(o[e]===r){s=!0;break}s||o.push(r)}let h=n||this.defaultParameters.colors;h=La.getGradientColors(h,o.length);let u=[];return o.forEach((e,t)=>{let i=h[t];e in l&&(i=l[e]),"LINE"===r?s.strokeColor=i:s.fillColor=i,u.push({color:i,value:e})},this),u}_getWMTSUrl(e){let t={service:"WMTS",request:"GetTile",version:"1.0.0",style:"default",layer:e.layer,tilematrixSet:e.tileMatrixSet,format:"image/png"},r=e.url;return r+=this._getParamString(t,r)+"&tilematrix={z}&tilerow={y}&tilecol={x}"}_createMarkerLayer(e,t){t&&t.forEach(t=>{let r=t.geometry.type.toUpperCase(),s=t.dv_v5_markerStyle;"POINT"===r&&s.text&&(r="TEXT");let i=this.setFeatureInfo(t);t.properties.useStyle=s,t.properties.featureInfo=i,"POINT"===r&&s.src&&-1===s.src.indexOf("http://")&&-1===s.src.indexOf("https://")&&(s.src=this.server+s.src);let a={type:"geojson",data:t},n=t.properties.index,o=r+"-"+n;if("POINT"===r&&s.src&&s.src.indexOf("svg")<=-1&&this.map.loadImage(s.src,(t,r)=>{t&&console.log(t),this.map.addImage(n+"",r),this.map.addLayer({id:o,type:"symbol",source:a,layout:{"icon-image":n+"","icon-size":s.scale,visibility:e.visible}})},this),"POINT"===r&&s.src&&s.src.indexOf("svg")>-1&&(this.svgDiv||(this.svgDiv=document.createElement("div"),document.body.appendChild(this.svgDiv)),this._getCanvasFromSVG(s.src,this.svgDiv,t=>{let r=t.toDataURL("img/png");r&&this.map.loadImage(r,(t,r)=>{t&&console.log(t),this.map.addImage(n+"",r),this.map.addLayer({id:o,type:"symbol",source:a,layout:{"icon-image":n+"","icon-size":s.scale,visibility:e.visible}})},this)})),!s.src){let t={layout:{}};"LINESTRING"===r&&s.lineCap&&(r="LINE",t.layout={"line-cap":s.lineCap});let i=e.visible;t.layout.visibility=i,t.style=this._transformStyleToMapBoxGl(s,r),this._addOverlayToMap(r,a,o,t),"POLYGON"===r&&s.strokeColor&&this._addStrokeLineForPoly(s,a,o+"-strokeLine",i)}},this)}setFeatureInfo(e){let t,r=e.dv_v5_markerInfo;if(!r||!r.dataViz_title)return r;t=r;let s=e.properties;for(let e in t)s[e]&&(t[e]=s[e],delete s[e]);return t}_createHeatLayer(e,t){let r=e.themeSetting,s={};s.gradient=r.colors.slice(),s.radius=parseInt(r.radius);let i=r.customSettings;for(let e in i)s.gradient[e]=i[e];r.weight&&this._changeWeight(t,r.weight);let a=["interpolate",["linear"],["heatmap-density"]],n=(1/s.gradient.length).toFixed(2);s.gradient.forEach((e,t)=>{a.push(t*n),0===t&&(e=Yn.hexToRgba(e,0)),a.push(e)});let o={"heatmap-color":a,"heatmap-radius":r.radius+15,"heatmap-intensity":{base:1,stops:[[0,.8],[22,1]]}};if(t[0].weight&&t.length>=4){let e=[];t.forEach(t=>{e.push(t.weight)});let r=Pa.getMax(e),s=Pa.getMin(e);o["heatmap-weight"]=["interpolate",["linear"],["get","weight"],s,0,r,1]}this.map.addLayer({id:e.layerID,type:"heatmap",source:{type:"geojson",data:{type:"FeatureCollection",features:t}},paint:o})}_changeWeight(e,t){this.fieldMaxValue={},this._getMaxValue(e,t);let r=this.fieldMaxValue[t];e.forEach(e=>{let s=e.properties[t];e.weight=s/r})}_getMaxValue(e,t){let r,s=[],i=t;this.fieldMaxValue[i]||(e.forEach(e=>{(r=e.properties)&&parseFloat(r[i])&&s.push(parseFloat(r[i]))}),this.fieldMaxValue[i]=Pa.getArrayStatistic(s,"Maximum"))}_createRangeLayer(e,t){let r=e.themeSetting.themeField,s=e.style,i=e.featureType,a=this._getRangeStyleGroup(e,t),n={type:"geojson",data:{type:"FeatureCollection",features:t=this._getFiterFeatures(e.filterCondition,t)}},o=["match",["get","index"]];t.forEach(e=>{let t=parseFloat(e.properties[r]);for(let r=0;r<a.length;r++)a[r].start<=t&&t<a[r].end&&o.push(e.properties.index,a[r].color);!t&&o.push(e.properties.index,"rgba(0, 0, 0, 0)")},this),o.push("rgba(0, 0, 0, 0)");let l={layout:{}};"LINE"===i&&s.lineCap&&(l.layout={"line-cap":s.lineCap});let h=e.visible;l.layout.visibility=h,l.style=this._transformStyleToMapBoxGl(s,i,o);let u=e.layerID;this._addOverlayToMap(i,n,u,l),"POLYGON"===i&&s.strokeColor&&this._addStrokeLineForPoly(s,n,u+"-strokeline",h)}_getFiterFeatures(e,t){if(!e)return t;let r="select * from json where ("+this._replaceFilterCharacter(e)+")",s=[];for(let e=0;e<t.length;e++){let i=t[e],a=!1;try{a=window.jsonsql.query(r,{properties:i.properties})}catch(e){continue}a&&a.length>0&&s.push(i)}return s}_replaceFilterCharacter(e){return e=e.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=")}_getRangeStyleGroup(e,t){let r,s=e.featureType,i=e.style,a=[],n=e.themeSetting,o=n.customSettings,l=n.themeField,h=n.segmentCount;t.forEach(e=>{(r=e.properties||e.get("Properties"))?r[l]&&Yn.isNumber(r[l])&&a.push(parseFloat(r[l])):e.get(l)&&Yn.isNumber(e.get(l))&&e.get(l)&&a.push(parseFloat(e.get(l)))},this);let u=Pa.getArraySegments(a,n.segmentMethod,h);if(u){let e=h;r&&u[0]===u[r.length-1]&&(e=1,u.length=2);for(let e in u){let t=u[e];t=0==e?Math.floor(100*t)/100:Math.ceil(100*t)/100+.1,u[e]=Number(t.toFixed(2))}let t=n.colors;for(let t=0;t<e;t++)t in o&&(o[t].segment.start&&(u[t]=o[t].segment.start),o[t].segment.end&&(u[t+1]=o[t].segment.end));let a=[];for(let r=0;r<e;r++){let e=t[r];r in o&&o[r].color&&(e=o[r].color),"LINE"===s?i.strokeColor=e:i.fillColor=e;let n=u[r],l=u[r+1],h=JSON.parse(JSON.stringify(i));a.push({style:h,color:e,start:n,end:l})}return a}}_formatGeoJSON(e){let t=e.features;return t.forEach((e,t)=>{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,r=-1,s=-1;for(let e=0,i=t.length;e<i;e++)this._isXField(t[e])&&(r=e),this._isYField(t[e])&&(s=e);let i=[];for(let t=0,a=e.rows.length;t<a;t++){let a=e.rows[t],n=Number(a[r]),o=Number(a[s]),l={};for(let r in e.colTitles){l[e.colTitles[r]]=e.rows[t][r]}l.index=t+"";let h={type:"Feature",geometry:{type:"Point",coordinates:[n,o]},properties:l};i.push(h)}return i}_sendMapToUser(e,t){e===t&&this.fire("addlayerssucceeded",{map:this.map,mapparams:this.mapParams,layers:this.layers})}_unproject(e){for(var t,r=180/Math.PI,s=6378137,i=Math.exp(-e[1]/s),a=Math.PI/2-2*Math.atan(i),n=0,o=.1;n<15&&Math.abs(o)>1e-7;n++)t=1,a+=o=Math.PI/2-2*Math.atan(i*t)-a;return new zn.a.LngLat(e[0]*r/s,a*r)}_getParamString(e,t,r){var s=[];for(var i in e)s.push((r?i.toUpperCase():i)+"="+e[i]);return(t&&-1!==t.indexOf("?")?"&":"?")+s.join("&")}_isXField(e){var t=e.toLowerCase();return"x"===t||"smx"===t||"jd"===t||"经度"===t||"东经"===t||"longitude"===t||"lot"===t||"lon"===t||"lng"===t}_isYField(e){var t=e.toLowerCase();return"y"===t||"smy"===t||"wd"===t||"纬度"===t||"北纬"===t||"latitude"===t||"lat"===t}_transformStyleToMapBoxGl(e,t,r){let s={};"POINT"!==e.type&&"BASIC_POINT"!==e.type&&"POINT"!==t||"LINE"===t?"LINE"===t?s={strokeWidth:"line-width",strokeColor:"line-color",strokeOpacity:"line-opacity"}:"POLYGON"===t&&(s={fillColor:"fill-color",fillOpacity:"fill-opacity",strokeColor:"fill-outline-color"}):s={fillColor:"circle-color",strokeWidth:"circle-stroke-width",fillOpacity:"circle-opacity",radius:"circle-radius",strokeColor:"circle-stroke-color",strokeOpacity:"circle-stroke-opacity"};let i={};for(let t in e)s[t]&&(i[s[t]]=e[t]);return r&&(i["circle-color"]?i["circle-color"]=r:i["line-color"]?i["line-color"]=r:i["fill-color"]=r),e.lineDash&&"solid"!==e.lineDash&&"LINE"===t&&(i["line-dasharray"]=this._dashStyle(e)),i}_dashStyle(e){if(!e)return[];var t=e.strokeDashstyle||e.lineDash;switch(t){case"solid":return[];case"dot":return[1,4];case"dash":return[4,4];case"dashdot":return[4,4,1,4];case"longdash":return[8,4];case"longdashdot":return[8,4,1,4];default:return t?ye.isArray(t)?t:(t=ue.trim(t).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(","):[]}}_getCanvasFromSVG(e,t,r){let s=document.createElement("canvas");s.id="dataviz-canvas-"+Yn.newGuid(8),s.style.display="none",t.appendChild(s),(window.canvg?window.canvg:ol.a)(s.id,e,{ignoreMouse:!0,ignoreAnimation:!0,renderCallback:()=>{s.width>300||s.height>300||r(s)},forceRedraw:()=>!1})}_addOverlayToMap(e,t,r,s){"circle"!==(e={POINT:"circle",LINE:"line",POLYGON:"fill"}[e])&&"line"!==e&&"fill"!==e||this.map.addLayer({id:r,type:e,source:t,paint:s.style,layout:s.layout||{}})}_addBaselayer(e,t,r=0,s=22){this.map.addLayer({id:t,type:"raster",source:{type:"raster",tiles:e,tileSize:256},minzoom:r,maxzoom:s})}_addStrokeLineForPoly(e,t,r,s){let i={};i.style=this._transformStyleToMapBoxGl(e,"LINE"),i.layout={visibility:s},this._addOverlayToMap("LINE",t,r,i)}_parseGeoJsonData2Feature(e){let t=e.allDatas.features,r=[];for(let e=0,s=t.length;e<s;e++){let s=t[e],i=s.geometry.coordinates;"Point"===t[e].geometry.type&&t[e].properties&&(t[e].properties.lon=i[0],t[e].properties.lat=i[1]),r.properties.index=e+"",r.push(s)}return r}_getFeatureBySQL(e,t,r,s){let i,a,n;i=new At({name:t.join().replace(":","@"),attributeFilter:"SMID > 0"}),n=new ss({queryParameter:i,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(a=new is(e,{eventListeners:{processCompleted:e=>{r&&r(e)},processFailed:e=>{s&&s(e)}}})).processAsync(n)}_queryFeatureBySQL(e,t,r,s,i,a,n,l,h,u){var c,d;c=new At({name:t,attributeFilter:r}),s&&(c.fields=s);var p={queryParams:[c]};u&&(p.queryOption=o.ATTRIBUTE),l&&(p.startRecord=l),h&&(p.expectCount=h),i&&(p.prjCoordSys={epsgCode:i}),d=new mi(p),new zn.a.supermap.QueryService(e).queryBySQL(d,e=>{"processCompleted"===e.type?a(e):n(e)})}_handleMultyPolygon(e){return e.forEach(e=>{if("Polygon"!==e.geometry.type)return;let t=e.geometry.coordinates;if(t.length>1){let r=[];t.forEach(e=>{r.push([e])}),e.geometry.coordinates=r,e.geometry.type="MultiPolygon"}}),e}}zn.a.supermap.WebMap=cl,r.d(t,"SuperMap",function(){return s}),r.d(t,"DataFormat",function(){return i}),r.d(t,"ServerType",function(){return a}),r.d(t,"GeometryType",function(){return n}),r.d(t,"QueryOption",function(){return o}),r.d(t,"JoinType",function(){return l}),r.d(t,"EngineType",function(){return m}),r.d(t,"MeasureMode",function(){return c}),r.d(t,"SpatialRelationType",function(){return u}),r.d(t,"DataReturnMode",function(){return D}),r.d(t,"Unit",function(){return d}),r.d(t,"BufferRadiusUnit",function(){return p}),r.d(t,"SpatialQueryMode",function(){return h}),r.d(t,"ThemeGraphTextFormat",function(){return f}),r.d(t,"ThemeGraphType",function(){return y}),r.d(t,"GraphAxesTextDisplayMode",function(){return g}),r.d(t,"GraduatedMode",function(){return v}),r.d(t,"RangeMode",function(){return S}),r.d(t,"ThemeType",function(){return b}),r.d(t,"ColorGradientType",function(){return x}),r.d(t,"TextAlignment",function(){return C}),r.d(t,"FillGradientMode",function(){return _}),r.d(t,"SideType",function(){return L}),r.d(t,"AlongLineDirection",function(){return T}),r.d(t,"LabelBackShape",function(){return E}),r.d(t,"LabelOverLengthMode",function(){return w}),r.d(t,"DirectionType",function(){return A}),r.d(t,"OverlayOperationType",function(){return O}),r.d(t,"SupplyCenterType",function(){return P}),r.d(t,"TurnType",function(){return N}),r.d(t,"BufferEndType",function(){return M}),r.d(t,"SmoothMethod",function(){return F}),r.d(t,"SurfaceAnalystMethod",function(){return R}),r.d(t,"ColorSpaceType",function(){return j}),r.d(t,"ChartType",function(){return K}),r.d(t,"EditType",function(){return k}),r.d(t,"TransferTactic",function(){return B}),r.d(t,"TransferPreference",function(){return G}),r.d(t,"GridType",function(){return U}),r.d(t,"ClientType",function(){return X}),r.d(t,"LayerType",function(){return H}),r.d(t,"UGCLayerType",function(){return J}),r.d(t,"StatisticMode",function(){return V}),r.d(t,"PixelFormat",function(){return z}),r.d(t,"SearchMode",function(){return W}),r.d(t,"SummaryType",function(){return re}),r.d(t,"InterpolationAlgorithmType",function(){return q}),r.d(t,"VariogramMode",function(){return Y}),r.d(t,"Exponent",function(){return Q}),r.d(t,"ClipAnalystMode",function(){return Z}),r.d(t,"AnalystAreaUnit",function(){return $}),r.d(t,"AnalystSizeUnit",function(){return ee}),r.d(t,"StatisticAnalystMode",function(){return te}),r.d(t,"TopologyValidatorRule",function(){return se}),r.d(t,"OutputType",function(){return I}),r.d(t,"AggregationQueryBuilderType",function(){return ae}),r.d(t,"AggregationType",function(){return ie}),r.d(t,"GetFeatureMode",function(){return ne}),r.d(t,"TimeFlowControl",function(){return We}),r.d(t,"IManager",function(){return it}),r.d(t,"IManagerServiceBase",function(){return rt}),r.d(t,"IManagerCreateNodeParam",function(){return st}),r.d(t,"IPortal",function(){return ut}),r.d(t,"IPortalMap",function(){return ht}),r.d(t,"IPortalMapsQueryParam",function(){return nt}),r.d(t,"IPortalService",function(){return lt}),r.d(t,"IPortalServiceBase",function(){return ot}),r.d(t,"IPortalServicesQueryParam",function(){return at}),r.d(t,"Online",function(){return ga}),r.d(t,"OnlineData",function(){return ya}),r.d(t,"OnlineQueryDatasParameter",function(){return va}),r.d(t,"ServiceStatus",function(){return ca}),r.d(t,"DataItemType",function(){return da}),r.d(t,"DataItemOrderBy",function(){return pa}),r.d(t,"FilterField",function(){return ma}),r.d(t,"OnlineServiceBase",function(){return fa}),r.d(t,"KeyServiceParameter",function(){return Sa}),r.d(t,"SecurityManager",function(){return tt}),r.d(t,"ServerInfo",function(){return ba}),r.d(t,"TokenServiceParameter",function(){return xa}),r.d(t,"ElasticSearch",function(){return Ta}),r.d(t,"FetchRequest",function(){return et}),r.d(t,"ColorsPickerUtil",function(){return La}),r.d(t,"ArrayStatistic",function(){return Pa}),r.d(t,"AreaSolarRadiationParameters",function(){return gt}),r.d(t,"AggregationParameter",function(){return yt}),r.d(t,"AggQueryBuilderParameter",function(){return ft}),r.d(t,"BufferAnalystParameters",function(){return Ct}),r.d(t,"BufferDistance",function(){return bt}),r.d(t,"BuffersAnalystJobsParameter",function(){return It}),r.d(t,"BufferSetting",function(){return xt}),r.d(t,"BurstPipelineAnalystParameters",function(){return Dt}),r.d(t,"ChartQueryFilterParameter",function(){return Ut}),r.d(t,"ChartQueryParameters",function(){return jt}),r.d(t,"ClipParameter",function(){return Vt}),r.d(t,"ColorDictionary",function(){return zt}),r.d(t,"ComputeWeightMatrixParameters",function(){return Yt}),r.d(t,"DataReturnOption",function(){return _t}),r.d(t,"DatasetBufferAnalystParameters",function(){return Lt}),r.d(t,"DatasetInfo",function(){return Kt}),r.d(t,"DatasetOverlayAnalystParameters",function(){return $t}),r.d(t,"DatasetSurfaceAnalystParameters",function(){return rr}),r.d(t,"DatasetThiessenAnalystParameters",function(){return ir}),r.d(t,"DatasourceConnectionInfo",function(){return Et}),r.d(t,"DensityKernelAnalystParameters",function(){return ar}),r.d(t,"EditFeaturesParameters",function(){return or}),r.d(t,"FacilityAnalyst3DParameters",function(){return hr}),r.d(t,"FacilityAnalystSinks3DParameters",function(){return ur}),r.d(t,"FacilityAnalystSources3DParameters",function(){return dr}),r.d(t,"FacilityAnalystStreamParameters",function(){return mr}),r.d(t,"FacilityAnalystTracedown3DParameters",function(){return yr}),r.d(t,"FacilityAnalystTraceup3DParameters",function(){return vr}),r.d(t,"FacilityAnalystUpstream3DParameters",function(){return br}),r.d(t,"FieldParameters",function(){return _r}),r.d(t,"FieldStatisticsParameters",function(){return Tr}),r.d(t,"FilterParameter",function(){return At}),r.d(t,"FilterAggParameter",function(){return Cr}),r.d(t,"FindClosestFacilitiesParameters",function(){return wr}),r.d(t,"FindLocationParameters",function(){return Lr}),r.d(t,"FindMTSPPathsParameters",function(){return Nr}),r.d(t,"FindPathParameters",function(){return Or}),r.d(t,"FindServiceAreasParameters",function(){return Fr}),r.d(t,"FindTSPPathsParameters",function(){return Dr}),r.d(t,"GenerateSpatialDataParameters",function(){return Br}),r.d(t,"GeoBoundingBoxQueryBuilderParameter",function(){return Ur}),r.d(t,"GeoCodingParameter",function(){return dt}),r.d(t,"GeoDecodingParameter",function(){return pt}),r.d(t,"GeoHashGridAggParameter",function(){return jr}),r.d(t,"GeometryBufferAnalystParameters",function(){return Pt}),r.d(t,"GeometryOverlayAnalystParameters",function(){return Hr}),r.d(t,"GeometrySurfaceAnalystParameters",function(){return Jr}),r.d(t,"GeometryThiessenAnalystParameters",function(){return Vr}),r.d(t,"GeoRelationAnalystParameters",function(){return zr}),r.d(t,"GetFeaturesByBoundsParameters",function(){return Yr}),r.d(t,"GetFeaturesByBufferParameters",function(){return Kr}),r.d(t,"GetFeaturesByGeometryParameters",function(){return $r}),r.d(t,"GetFeaturesByIDsParameters",function(){return ts}),r.d(t,"GetFeaturesBySQLParameters",function(){return ss}),r.d(t,"GetGridCellInfosParameters",function(){return ns}),r.d(t,"Grid",function(){return Ds}),r.d(t,"Image",function(){return Ua}),r.d(t,"InterpolationAnalystParameters",function(){return Us}),r.d(t,"InterpolationIDWAnalystParameters",function(){return Js}),r.d(t,"InterpolationKrigingAnalystParameters",function(){return Vs}),r.d(t,"InterpolationRBFAnalystParameters",function(){return js}),r.d(t,"JoinItem",function(){return Tt}),r.d(t,"KernelDensityJobParameter",function(){return Ws}),r.d(t,"LabelImageCell",function(){return Qs}),r.d(t,"LabelMatrixCell",function(){return Ys}),r.d(t,"LabelMixedTextStyle",function(){return fs}),r.d(t,"LabelSymbolCell",function(){return Xs}),r.d(t,"LabelThemeCell",function(){return Ks}),r.d(t,"LayerStatus",function(){return Zs}),r.d(t,"LinkItem",function(){return wt}),r.d(t,"MathExpressionAnalysisParameters",function(){return ei}),r.d(t,"MeasureParameters",function(){return ri}),r.d(t,"OutputSetting",function(){return Mt}),r.d(t,"MappingParameters",function(){return Ot}),r.d(t,"OverlapDisplayedOptions",function(){return Os}),r.d(t,"OverlayAnalystParameters",function(){return Zt}),r.d(t,"OverlayGeoJobParameter",function(){return ai}),r.d(t,"PointWithMeasure",function(){return Ue}),r.d(t,"QueryByBoundsParameters",function(){return oi}),r.d(t,"QueryByDistanceParameters",function(){return ui}),r.d(t,"QueryByGeometryParameters",function(){return di}),r.d(t,"QueryBySQLParameters",function(){return mi}),r.d(t,"QueryParameters",function(){return Ht}),r.d(t,"Route",function(){return je}),r.d(t,"RouteCalculateMeasureParameters",function(){return yi}),r.d(t,"RouteLocatorParameters",function(){return vi}),r.d(t,"ServerColor",function(){return Be}),r.d(t,"ServerFeature",function(){return bi}),r.d(t,"ServerGeometry",function(){return He}),r.d(t,"ServerStyle",function(){return Ge}),r.d(t,"ServerTextStyle",function(){return us}),r.d(t,"ServerTheme",function(){return Rs}),r.d(t,"SetLayerInfoParameters",function(){return xi}),r.d(t,"SetLayersInfoParameters",function(){return _i}),r.d(t,"SetLayerStatusParameters",function(){return Ei}),r.d(t,"SingleObjectQueryJobsParameter",function(){return Ai}),r.d(t,"StopQueryParameters",function(){return Pi}),r.d(t,"SummaryAttributesJobsParameter",function(){return Mi}),r.d(t,"SummaryMeshJobParameter",function(){return Ii}),r.d(t,"SummaryRegionJobParameter",function(){return Ri}),r.d(t,"SupplyCenter",function(){return ki}),r.d(t,"SurfaceAnalystParameters",function(){return tr}),r.d(t,"SurfaceAnalystParametersSetting",function(){return er}),r.d(t,"TerrainCurvatureCalculationParameters",function(){return Gi}),r.d(t,"Theme",function(){return hs}),r.d(t,"ThemeDotDensity",function(){return ws}),r.d(t,"ThemeFlow",function(){return ps}),r.d(t,"ThemeGraduatedSymbol",function(){return Ls}),r.d(t,"ThemeGraduatedSymbolStyle",function(){return As}),r.d(t,"ThemeGraph",function(){return Es}),r.d(t,"ThemeGraphAxes",function(){return xs}),r.d(t,"ThemeGraphItem",function(){return Ts}),r.d(t,"ThemeGraphSize",function(){return Cs}),r.d(t,"ThemeGraphText",function(){return _s}),r.d(t,"ThemeGridRange",function(){return Hi}),r.d(t,"ThemeGridRangeItem",function(){return ji}),r.d(t,"ThemeGridUnique",function(){return Vi}),r.d(t,"ThemeGridUniqueItem",function(){return Ji}),r.d(t,"ThemeLabel",function(){return Ss}),r.d(t,"ThemeLabelAlongLine",function(){return gs}),r.d(t,"ThemeLabelBackground",function(){return vs}),r.d(t,"ThemeLabelItem",function(){return cs}),r.d(t,"ThemeLabelText",function(){return ys}),r.d(t,"ThemeLabelUniqueItem",function(){return zi}),r.d(t,"ThemeMemoryData",function(){return ls}),r.d(t,"ThemeOffset",function(){return ms}),r.d(t,"ThemeParameters",function(){return Wi}),r.d(t,"ThemeRange",function(){return Ns}),r.d(t,"ThemeRangeItem",function(){return Ps}),r.d(t,"ThemeUnique",function(){return bs}),r.d(t,"ThemeUniqueItem",function(){return ds}),r.d(t,"ThiessenAnalystParameters",function(){return sr}),r.d(t,"TopologyValidatorJobsParameter",function(){return Ki}),r.d(t,"TransferLine",function(){return $i}),r.d(t,"TransferPathParameters",function(){return ea}),r.d(t,"TransferSolutionParameters",function(){return ra}),r.d(t,"TransportationAnalystParameter",function(){return qt}),r.d(t,"TransportationAnalystResultSetting",function(){return Wt}),r.d(t,"UGCLayer",function(){return Ms}),r.d(t,"UGCMapLayer",function(){return Is}),r.d(t,"UGCSubLayer",function(){return Fs}),r.d(t,"UpdateEdgeWeightParameters",function(){return ia}),r.d(t,"UpdateTurnNodeWeightParameters",function(){return na}),r.d(t,"Vector",function(){return Bs}),r.d(t,"VectorClipJobsParameter",function(){return la}),r.d(t,"FileTypes",function(){return bn}),r.d(t,"FileConfig",function(){return xn}),r.d(t,"FileModel",function(){return Cn}),r.d(t,"MessageBox",function(){return _n}),r.d(t,"CommonContainer",function(){return Fn}),r.d(t,"DropDownBox",function(){return Dn}),r.d(t,"Select",function(){return Rn}),r.d(t,"AttributesPopContainer",function(){return Bn}),r.d(t,"PopContainer",function(){return kn}),r.d(t,"IndexTabsPageContainer",function(){return Gn}),r.d(t,"CityTabsPage",function(){return Un}),r.d(t,"NavTabsPage",function(){return jn}),r.d(t,"PaginationContainer",function(){return Hn}),r.d(t,"ComponentsUtil",function(){return Jn}),r.d(t,"FileReaderUtil",function(){return Pn}),r.d(t,"ChartView",function(){return On}),r.d(t,"ChartViewModel",function(){return Mn}),r.d(t,"Logo",function(){return qn}),r.d(t,"Util",function(){return Yn}),r.d(t,"MapExtend",function(){return Wn}),r.d(t,"Graph",function(){return Kn}),r.d(t,"Label",function(){return $n}),r.d(t,"MapvLayer",function(){return so}),r.d(t,"RangeTheme3DLayer",function(){return ao}),r.d(t,"Range",function(){return no}),r.d(t,"RankSymbol",function(){return oo}),r.d(t,"UniqueTheme3DLayer",function(){return lo}),r.d(t,"Unique",function(){return ho}),r.d(t,"GraphicLayer",function(){return po}),r.d(t,"ThreeLayer",function(){return Io}),r.d(t,"HeatMapLayer",function(){return Fo}),r.d(t,"DeckglLayer",function(){return Ro}),r.d(t,"Graphic",function(){return uo}),r.d(t,"MapvDataSet",function(){return Do}),r.d(t,"MapvRenderer",function(){return ro}),r.d(t,"GeoFeature",function(){return Zn}),r.d(t,"Theme3DLayer",function(){return io}),r.d(t,"ThemeFeature",function(){return Qn}),r.d(t,"ThemeLayer",function(){return Xn}),r.d(t,"ThreeLayerRenderer",function(){return Ao}),r.d(t,"Transform",function(){return go}),r.d(t,"getDefaultVectorTileStyle",function(){return ko}),r.d(t,"setBackground",function(){return Bo}),r.d(t,"setPaintProperty",function(){return Go}),r.d(t,"AddressMatchService",function(){return Ho}),r.d(t,"ChartService",function(){return Jo}),r.d(t,"DataFlowService",function(){return Vo}),r.d(t,"FeatureService",function(){return zo}),r.d(t,"FieldService",function(){return Wo}),r.d(t,"GridCellInfosService",function(){return qo}),r.d(t,"LayerInfoService",function(){return Yo}),r.d(t,"MapService",function(){return Qo}),r.d(t,"MeasureService",function(){return Xo}),r.d(t,"NetworkAnalystService",function(){return Ko}),r.d(t,"NetworkAnalyst3DService",function(){return Zo}),r.d(t,"ProcessingService",function(){return $o}),r.d(t,"QueryService",function(){return el}),r.d(t,"ServiceBase",function(){return jo}),r.d(t,"SpatialAnalystService",function(){return tl}),r.d(t,"ThemeService",function(){return rl}),r.d(t,"TrafficTransferAnalystService",function(){return sl}),r.d(t,"WebMap",function(){return cl})},function(e,t,r){"use strict";r.r(t);r(25),r(19)},function(e,t){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){o.prototype.append=function(e,t){e=a(e),t=n(t);var r=this.map[e];r||(r=[],this.map[e]=r),r.push(t)},o.prototype.delete=function(e){delete this.map[a(e)]},o.prototype.get=function(e){var t=this.map[a(e)];return t?t[0]:null},o.prototype.getAll=function(e){return this.map[a(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(a(e))},o.prototype.set=function(e,t){this.map[a(e)]=[n(t)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(s){e.call(t,s,r,this)},this)},this)};var r={blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t},s=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this)},c.call(d.prototype),c.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var i=[301,302,303,307,308];m.redirect=function(e,t){if(-1===i.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},t.Headers=o,t.Request=d,t.Response=m,t.fetch=function(e,t){return new Promise(function(s,i){var a;a=d.prototype.isPrototypeOf(e)&&!t?e:new d(e,t);var n=new XMLHttpRequest;var l=!1;function h(){if(4===n.readyState){var e=1223===n.status?204:n.status;if(e<100||e>599){if(l)return;return l=!0,void i(new TypeError("Network request failed"))}var t={status:e,statusText:n.statusText,headers:function(e){var t=new o;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var r=e.trim().split(":"),s=r.shift().trim(),i=r.join(":").trim();t.append(s,i)}),t}(n),url:"responseURL"in n?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):void 0},r="response"in n?n.response:n.responseText;l||(l=!0,s(new m(r,t)))}}n.onreadystatechange=h,n.onload=h,n.onerror=function(){l||(l=!0,i(new TypeError("Network request failed")))},n.open(a.method,a.url,!0);try{"include"===a.credentials&&("withCredentials"in n?n.withCredentials=!0:console&&console.warn&&console.warn("withCredentials is not supported, you can ignore this warning"))}catch(e){console&&console.warn&&console.warn("set withCredentials error:"+e)}"responseType"in n&&r.blob&&(n.responseType="blob"),a.headers.forEach(function(e,t){n.setRequestHeader(t,e)}),n.send(void 0===a._bodyInit?null:a._bodyInit)})},t.fetch.polyfill=!0,void 0!==e&&e.exports&&(e.exports=t.fetch)}function a(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function u(e){var t=new FileReader;return t.readAsArrayBuffer(e),h(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(r.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(r.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!r.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},r.blob?(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(u)},this.text=function(){var e,t,r,s,i,a,n,o=l(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,r=new FileReader,s=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",i=/charset\=[0-9a-zA-Z\-\_]*;?/,a=e.type.match(i)||s.match(i),n=[e],a&&n.push(a[0].replace(/^charset\=/,"").replace(/;$/,"")),r.readAsText.apply(r,n),h(r);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=l(this);return e||Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function d(e,t){var r,i,a=(t=t||{}).body;if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,a||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=(r=t.method||this.method||"GET",i=r.toUpperCase(),s.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a,t)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),s=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(i))}}),t}function m(e,t){t||(t={}),this._initBody(e,t),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},function(e,t){var r,s,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{s="function"==typeof clearTimeout?clearTimeout:n}catch(e){s=n}}();var l,h=[],u=!1,c=-1;function d(){u&&l&&(u=!1,l.length?h=l.concat(h):c=-1,h.length&&p())}function p(){if(!u){var e=o(d);u=!0;for(var t=h.length;t;){for(l=h,h=[];++c<t;)l&&l[c].run();c=-1,t=h.length}l=null,u=!1,function(e){if(s===clearTimeout)return clearTimeout(e);if((s===n||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new m(e,t)),1!==h.length||u||o(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var s,i,a,n,o,l=1,h={},u=!1,c=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?s=function(e){t.nextTick(function(){m(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){m(e.data)},s=function(e){a.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(i=c.documentElement,s=function(e){var t=c.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):s=function(e){setTimeout(m,0,e)}:(n="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(n)&&m(+t.data.slice(n.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),s=function(t){e.postMessage(n+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return h[l]=i,s(l),l++},d.clearImmediate=p}function p(e){delete h[e]}function m(e){if(u)setTimeout(m,0,e);else{var t=h[e];if(t){u=!0;try{!function(e){var t=e.callback,s=e.args;switch(s.length){case 0:t();break;case 1:t(s[0]);break;case 2:t(s[0],s[1]);break;case 3:t(s[0],s[1],s[2]);break;default:t.apply(r,s)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(3),r(15))},function(e,t,r){(function(e){var s=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,s,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,s,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(s,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(16),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(3))},function(e,t,r){r(12),e.exports=r(13)},function(e,t){},,,,,,function(e,t){}]);