iclient-mapboxgl-es6.min.js 794 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668
  1. /*!
  2. *
  3. * iclient-mapboxgl.(https://iclient.supermap.io)
  4. * Copyright© 2000 - 2021 SuperMap Software Co.Ltd
  5. * license: Apache-2.0
  6. * version: v10.1.1
  7. *
  8. */(()=>{var e={693:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){o.prototype.append=function(e,t){e=a(e),t=n(t);var s=this.map[e];s||(s=[],this.map[e]=s),s.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(s){this.map[s].forEach(function(r){e.call(t,r,s,this)},this)},this)};var s={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},r=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this)},c.call(p.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=p,t.Response=m,t.fetch=function(e,t){return new Promise(function(r,i){var a;a=p.prototype.isPrototypeOf(e)&&!t?e:new p(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 s=e.trim().split(":"),r=s.shift().trim(),i=s.join(":").trim();t.append(r,i)}),t}(n),url:"responseURL"in n?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):void 0},s="response"in n?n.response:n.responseText;l||(l=!0,r(new m(s,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&&s.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,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,s){e.onload=function(){t(e.result)},e.onerror=function(){s(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(s.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(s.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!s.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},s.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,s,r,i,a,n,o=l(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,s=new FileReader,r=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",i=/charset\=[0-9a-zA-Z\-\_]*;?/,a=e.type.match(i)||r.match(i),n=[e],a&&n.push(a[0].replace(/^charset\=/,"").replace(/;$/,"")),s.readAsText.apply(s,n),h(s);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)},s.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(e,t){var s,i,a=(t=t||{}).body;if(p.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=(s=t.method||this.method||"GET",i=s.toUpperCase(),r.indexOf(i)>-1?i:s),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 d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var s=e.split("="),r=s.shift().replace(/\+/g," "),i=s.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),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)},144:function(e,t){var s,r,i;r=[t,e],void 0===(i="function"==typeof(s=function(e,t){"use strict";var s={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e){var t=document.getElementById(e);t&&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||s.timeout,o=t.jsonpCallback||s.jsonpCallback,l=void 0;return new Promise(function(s,h){var u=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),c=o+"_"+u;window[u]=function(e){s({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),i(c),r(u)},a+=-1===a.indexOf("?")?"?":"&";var p=document.createElement("script");p.setAttribute("src",""+a+o+"="+u),t.charset&&p.setAttribute("charset",t.charset),p.id=c,document.getElementsByTagName("head")[0].appendChild(p),l=setTimeout(function(){h(new Error("JSONP request to "+e+" timed out")),r(u),i(c),window[u]=function(){r(u)}},n),p.onerror=function(){h(new Error("JSONP request to "+e+" failed")),r(u),i(c),l&&clearTimeout(l)}})}})?s.apply(t,r):s)||(e.exports=i)},52:(e,t,s)=>{var r=9007199254740991,i="[object Arguments]",a="[object Function]",n="[object GeneratorFunction]",o="[object Map]",l="[object Set]",h=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,c="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,p="object"==typeof self&&self&&self.Object===Object&&self,d=c||p||Function("return this")();function m(e,t){return function(e,t){for(var s=-1,r=e?e.length:0,i=Array(r);++s<r;)i[s]=t(e[s],s,e);return i}(t,function(t){return[t,e[t]]})}var y=Function.prototype,f=Object.prototype,g=d["__core-js_shared__"],v=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),S=y.toString,b=f.hasOwnProperty,x=f.toString,C=RegExp("^"+S.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_=f.propertyIsEnumerable,T=function(e,t){return function(s){return e(t(s))}}(Object.keys,Object),E=B(d,"DataView"),A=B(d,"Map"),w=B(d,"Promise"),L=B(d,"Set"),P=B(d,"WeakMap"),O=H(E),N=H(A),M=H(w),I=H(L),F=H(P);function R(e,t){var s=j(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&J(e)}(e)&&b.call(e,"callee")&&(!_.call(e,"callee")||x.call(e)==i)}(e)?function(e,t){for(var s=-1,r=Array(e);++s<e;)r[s]=t(s);return r}(e.length,String):[],r=s.length,a=!!r;for(var n in e)!t&&!b.call(e,n)||a&&("length"==n||U(n,r))||s.push(n);return s}function D(e){return!(!W(e)||v&&v in e)&&(z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:h).test(H(e))}function k(e){if(s=(t=e)&&t.constructor,r="function"==typeof s&&s.prototype||f,t!==r)return T(e);var t,s,r,i=[];for(var a in Object(e))b.call(e,a)&&"constructor"!=a&&i.push(a);return i}function B(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return D(s)?s:void 0}var G=function(e){return x.call(e)};function U(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||u.test(e))&&e>-1&&e%1==0&&e<t}function H(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(E&&"[object DataView]"!=G(new E(new ArrayBuffer(1)))||A&&G(new A)!=o||w&&"[object Promise]"!=G(w.resolve())||L&&G(new L)!=l||P&&"[object WeakMap]"!=G(new P))&&(G=function(e){var t=x.call(e),s="[object Object]"==t?e.constructor:void 0,r=s?H(s):void 0;if(r)switch(r){case O:return"[object DataView]";case N:return o;case M:return"[object Promise]";case I:return l;case F:return"[object WeakMap]"}return t});var j=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!z(e)}function z(e){var t=W(e)?x.call(e):"";return t==a||t==n}function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var V=function(e){return function(t){var s,r,i,a=G(t);return a==o?(s=t,r=-1,i=Array(s.size),s.forEach(function(e,t){i[++r]=[t,e]}),i):a==l?function(e){var t=-1,s=Array(e.size);return e.forEach(function(e){s[++t]=[e,e]}),s}(t):m(t,e(t))}}(function(e){return J(e)?R(e):k(e)});e.exports=V},107:function(e,t,s){!function(){"use strict";function e(e){var t=this.constructor;return this.then(function(s){return t.resolve(e()).then(function(){return s})},function(s){return t.resolve(e()).then(function(){return t.reject(s)})})}var t=setTimeout;function r(e){return Boolean(e&&void 0!==e.length)}function i(){}function a(e){if(!(this instanceof a))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 s=1===e._state?t.onFulfilled:t.onRejected;if(null!==s){var r;try{r=s(e._value)}catch(e){return void l(t.promise,e)}o(t.promise,r)}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 s=t.then;if(t instanceof a)return e._state=3,e._value=t,void h(e);if("function"==typeof s)return void u((r=s,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,h(e)}catch(t){l(e,t)}var r,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,s=e._deferreds.length;t<s;t++)n(e,e._deferreds[t]);e._deferreds=null}function u(e,t){var s=!1;try{e(function(e){s||(s=!0,o(t,e))},function(e){s||(s=!0,l(t,e))})}catch(e){if(s)return;s=!0,l(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var s=new this.constructor(i);return n(this,new function(e,t,s){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=s}(e,t,s)),s},a.prototype.finally=e,a.all=function(e){return new a(function(t,s){if(!r(e))return s(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);var a=i.length;function n(e,r){try{if(r&&("object"==typeof r||"function"==typeof r)){var o=r.then;if("function"==typeof o)return void o.call(r,function(t){n(e,t)},s)}i[e]=r,0==--a&&t(i)}catch(e){s(e)}}for(var o=0;o<i.length;o++)n(o,i[o])})},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,s){s(e)})},a.race=function(e){return new a(function(t,s){if(!r(e))return s(new TypeError("Promise.race accepts an array"));for(var i=0,n=e.length;i<n;i++)a.resolve(e[i]).then(t,s)})},a._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){t(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var c=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==s.g)return s.g;throw new Error("unable to locate global object")}();"Promise"in c?c.Promise.prototype.finally||(c.Promise.prototype.finally=e):c.Promise=a}()}},t={};function s(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,s),i.exports}s.n=(e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t}),s.d=((e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}),s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),(()=>{"use strict";
  9. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  10. * This program are made available under the terms of the Apache License, Version 2.0
  11. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12. var e=window.SuperMap=window.SuperMap||{};e.Components=window.SuperMap.Components||{};
  13. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  14. * This program are made available under the terms of the Apache License, Version 2.0
  15. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  16. var t=e.DataFormat={GEOJSON:"GEOJSON",ISERVER:"ISERVER"},r=e.ServerType={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},i=e.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",GEOCOMPOUND:"GEOCOMPOUND"},a=e.QueryOption={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},n=(e.JoinType={INNERJOIN:"INNERJOIN",LEFTJOIN:"LEFTJOIN"},e.SpatialQueryMode={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"}),o=(e.SpatialRelationType={CONTAIN:"CONTAIN",INTERSECT:"INTERSECT",WITHIN:"WITHIN"},e.MeasureMode={DISTANCE:"DISTANCE",AREA:"AREA"}),l=e.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"},h=e.BufferRadiusUnit={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},u=(e.EngineType={IMAGEPLUGINS:"IMAGEPLUGINS",OGC:"OGC",ORACLEPLUS:"ORACLEPLUS",SDBPLUS:"SDBPLUS",SQLPLUS:"SQLPLUS",UDB:"UDB"},e.ThemeGraphTextFormat={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"}),c=e.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"},p=e.GraphAxesTextDisplayMode={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},d=e.GraduatedMode={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},m=e.RangeMode={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"},y=(e.ThemeType={DOTDENSITY:"DOTDENSITY",GRADUATEDSYMBOL:"GRADUATEDSYMBOL",GRAPH:"GRAPH",LABEL:"LABEL",RANGE:"RANGE",UNIQUE:"UNIQUE"},e.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"}),f=e.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"},g=(e.FillGradientMode={NONE:"NONE",LINEAR:"LINEAR",RADIAL:"RADIAL",CONICAL:"CONICAL",SQUARE:"SQUARE"},e.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"}),v=e.LabelBackShape={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},S=e.LabelOverLengthMode={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},b=(e.DirectionType={EAST:"EAST",NONE:"NONE",NORTH:"NORTH",SOURTH:"SOURTH",WEST:"WEST"},e.SideType={LEFT:"LEFT",MIDDLE:"MIDDLE",NONE:"NONE",RIGHT:"RIGHT"},e.SupplyCenterType={FIXEDCENTER:"FIXEDCENTER",NULL:"NULL",OPTIONALCENTER:"OPTIONALCENTER"},e.TurnType={AHEAD:"AHEAD",BACK:"BACK",END:"END",LEFT:"LEFT",NONE:"NONE",RIGHT:"RIGHT"},e.BufferEndType={FLAT:"FLAT",ROUND:"ROUND"}),x=e.OverlayOperationType={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},C=e.OutputType={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"},_=e.SmoothMethod={BSPLINE:"BSPLINE",POLISH:"POLISH"},T=e.SurfaceAnalystMethod={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},E=e.DataReturnMode={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},A=e.EditType={ADD:"add",UPDATE:"update",DELETE:"delete"},w=e.TransferTactic={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},L=e.TransferPreference={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},P=(e.GridType={CROSS:"CROSS",GRID:"GRID",POINT:"POINT"},e.ColorSpaceType={CMYK:"CMYK",RGB:"RGB"},e.LayerType={UGC:"UGC",WMS:"WMS",WFS:"WFS",CUSTOM:"CUSTOM"},e.UGCLayerType={THEME:"THEME",VECTOR:"VECTOR",GRID:"GRID",IMAGE:"IMAGE"},e.StatisticMode={AVERAGE:"AVERAGE",MAX:"MAX",MIN:"MIN",STDDEVIATION:"STDDEVIATION",SUM:"SUM",VARIANCE:"VARIANCE"},e.PixelFormat={BIT16:"BIT16",BIT32:"BIT32",BIT64:"BIT64",SINGLE:"SINGLE",DOUBLE:"DOUBLE",UBIT1:"UBIT1",UBIT4:"UBIT4",UBIT8:"UBIT8",UBIT24:"UBIT24",UBIT32:"UBIT32"},e.SearchMode={KDTREE_FIXED_COUNT:"KDTREE_FIXED_COUNT",KDTREE_FIXED_RADIUS:"KDTREE_FIXED_RADIUS",NONE:"NONE",QUADTREE:"QUADTREE"},e.InterpolationAlgorithmType={KRIGING:"KRIGING",SimpleKriging:"SimpleKriging",UniversalKriging:"UniversalKriging"},e.VariogramMode={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"}),O=e.Exponent={EXP1:"EXP1",EXP2:"EXP2"},N=e.ClientType={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},M=(e.ChartType={BAR:"Bar",BAR3D:"Bar3D",CIRCLE:"Circle",PIE:"Pie",POINT:"Point",LINE:"Line",RING:"Ring"},e.ClipAnalystMode={CLIP:"clip",INTERSECT:"intersect"}),I=e.AnalystAreaUnit={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},F=e.AnalystSizeUnit={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},R=e.StatisticAnalystMode={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},D=e.SummaryType={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},k=e.TopologyValidatorRule={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"},B=e.AggregationType={GEOHASH_GRID:"geohash_grid",FILTER:"filter"},G=e.AggregationQueryBuilderType={GEO_BOUNDING_BOX:"geo_bounding_box"},U=(e.GetFeatureMode={BOUNDS:"BOUNDS",BUFFER:"BUFFER",ID:"ID",SPATIAL:"SPATIAL",SQL:"SQL"},e.RasterFunctionType={NDVI:"NDVI",HILLSHADE:"HILLSHADE"});e.ResourceType={MAP:"MAP",SERVICE:"SERVICE",SCENE:"SCENE",DATA:"DATA",INSIGHTS_WORKSPACE:"INSIGHTS_WORKSPACE",MAP_DASHBOARD:"MAP_DASHBOARD"},e.OrderBy={UPDATETIME:"UPDATETIME",HEATLEVEL:"HEATLEVEL",RELEVANCE:"RELEVANCE"},e.OrderType={ASC:"ASC",DESC:"DESC"},e.SearchType={PUBLIC:"PUBLIC",MY_RES:"MY_RES",MYGROUP_RES:"MYGROUP_RES",MYDEPARTMENT_RES:"MYDEPARTMENT_RES",SHARETOME_RES:"SHARETOME_RES"},e.AggregationTypes={TAG:"TAG",TYPE:"TYPE"},e.PermissionType={SEARCH:"SEARCH",READ:"READ",READWRITE:"READWRITE",DELETE:"DELETE",DOWNLOAD:"DOWNLOAD"},e.EntityType={DEPARTMENT:"DEPARTMENT",GROUP:"GROUP",IPORTALGROUP:"IPORTALGROUP",ROLE:"ROLE",USER:"USER"},e.DataItemType={WORKSPACE:"WORKSPACE",UDB:"UDB",SHP:"SHP",EXCEL:"EXCEL",CSV:"CSV",GEOJSON:"GEOJSON",SMTILES:"SMTILES",SVTILES:"SVTILES",MBTILES:"MBTILES",TPK:"TPK",UGCV5:"UGCV5",UGCV5_MVT:"UGCV5_MVT",JSON:"JSON"},e.WebExportFormatType={PNG:"PNG",PDF:"PDF"},e.WebScaleOrientationType={HORIZONTALLABELSBELOW:"HORIZONTALLABELSBELOW",HORIZONTALLABELSABOVE:"HORIZONTALLABELSABOVE",VERTICALLABELSLEFT:"VERTICALLABELSLEFT",VERTICALLABELSRIGHT:"VERTICALLABELSRIGHT"},e.WebScaleType={LINE:"LINE",BAR:"BAR",BAR_SUB:"BAR_SUB"},e.WebScaleUnit={METER:"METER",FOOT:"FOOT",DEGREES:"DEGREES"};
  17. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  18. * This program are made available under the terms of the Apache License, Version 2.0
  19. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  20. class H{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 H(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}}e.Size=H;
  21. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  22. * This program are made available under the terms of the Apache License, Version 2.0
  23. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  24. class j{constructor(t,s,r){this.x=t?parseFloat(t):0,this.y=s?parseFloat(s):0,this.mode=r,this.CLASS_NAME="SuperMap.Pixel",e.Pixel.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"}}toString(){return"x="+this.x+",y="+this.y}clone(){return new j(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 j(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}}e.Pixel=j,
  25. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  26. * This program are made available under the terms of the Apache License, Version 2.0
  27. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  28. e.inherit=function(t,s){var r,i,a,n=function(){};for(n.prototype=s.prototype,t.prototype=new n,r=2,i=arguments.length;r<i;r++)"function"==typeof(a=arguments[r])&&(a=a.prototype),e.Util.extend(t.prototype,a)},e.mixin=function(...e){class t{constructor(t){for(var s=0;s<e.length;s++)i(this,new e[s](t))}}for(var s=0;s<e.length;s++){var r=e[s];i(t,r),i(t.prototype,r.prototype),i(t.prototype,new r)}return t;function i(e,t){var s=Object.getOwnPropertyNames(t);Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(t)));for(var r=0;r<s.length;r++){var i=s[r];if("constructor"!==i&&"prototype"!==i&&"name"!==i&&"length"!==i){let s=Object.getOwnPropertyDescriptor(t,i);window.ActiveXObject?Object.defineProperty(e,i,s||{}):Object.defineProperty(e,i,s)}}}};var J=e.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("-"),s=t[0],r=1,i=t.length;r<i;r++){var a=t[r];s+=a.charAt(0).toUpperCase()+a.substring(1)}return s},format:function(t,s,r){s||(s=window);return t.replace(e.String.tokenRegEx,function(e,t){for(var i,a=t.split(/\.+/),n=0;n<a.length;n++)0==n&&(i=s),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(t){return e.String.numberRegEx.test(t)},numericIf:function(t){return e.String.isNumeric(t)?parseFloat(t):t}},z=e.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(e,t){var s=0;return t>0&&(s=parseFloat(e.toPrecision(t))),s},format:function(t,s,r,i){s=void 0!==s?s:0,r=void 0!==r?r:e.Number.thousandsSeparator,i=void 0!==i?i:e.Number.decimalSeparator,null!=s&&(t=parseFloat(t.toFixed(s)));var a=t.toString().split(".");1===a.length&&null==s&&(s=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==s)n=o;else{var h=a.length>1?a[1]:"0";null!=s&&(h+=new Array(s-h.length+1).join("0")),n=o+i+h}return n}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return z.limitSigDigs(this,e)});var W=e.Function={bind:function(e,t){var s=Array.prototype.slice.apply(arguments,[2]);return function(){var r=s.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,r)}},bindAsEventListener:function(e,t){return function(s){return e.call(t,s||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},V=(e.Array={filter:function(e,t,s){var r=[];if(Array.prototype.filter)r=e.filter(t,s);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(s,n,a,e)&&r.push(n)}}return r}},e.Util=e.Util||{});e.Util.extend=function(e,t){if(e=e||{},t){for(var s in t){var r=t[s];void 0!==r&&(e[s]=r)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},e.Util.copy=function(e,t){var s;if(e=e||{},t)for(var r in e)void 0!==(s=t[r])&&(e[r]=s)},e.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 s in e[t])e[t][s].destroy&&e[t][s].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},e.Util.getElement=function(){for(var e=[],t=0,s=arguments.length;t<s;t++){var r=arguments[t];if("string"==typeof r&&(r=document.getElementById(r)),1===arguments.length)return r;e.push(r)}return e},e.Util.isElement=function(e){return!(!e||1!==e.nodeType)},e.Util.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.Util.removeItem=function(e,t){for(var s=e.length-1;s>=0;s--)e[s]===t&&e.splice(s,1);return e},e.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var s=0,r=e.length;s<r;s++)if(e[s]===t)return s;return-1},e.Util.modifyDOMElement=function(e,t,s,r,i,a,n,o){t&&(e.id=t),s&&(e.style.left=s.x+"px",e.style.top=s.y+"px"),r&&(e.style.width=r.w+"px",e.style.height=r.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="")},e.Util.applyDefaults=function(e,t){e=e||{};var s="function"==typeof window.Event&&t instanceof window.Event;for(var r in t)(void 0===e[r]||!s&&t.hasOwnProperty&&t.hasOwnProperty(r)&&!e.hasOwnProperty(r))&&(e[r]=t[r]);return!s&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},e.Util.getParameterString=function(e){var t=[];for(var s in e){var r,i=e[s];if(null!=i&&"function"!=typeof i)r=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(s)+"="+r)}return t.join("&")},e.Util.urlAppend=function(e,t){var s=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var r=(e+" ").split(/[?&]/);s+=" "===r.pop()?t:r.length?"&"+t:"?"+t}return s},e.Util.urlPathAppend=function(e,t){let s=e;if(!t)return s;0===t.indexOf("/")&&(t=t.substring(1));const r=e.split("?");return r[0].indexOf("/",r[0].length-1)<0&&(r[0]+="/"),s=`${r[0]}${t}${r.length>1?`?${r[1]}`:""}`},e.Util.DEFAULT_PRECISION=14,e.Util.toFloat=function(t,s){return null==s&&(s=e.Util.DEFAULT_PRECISION),"number"!=typeof t&&(t=parseFloat(t)),0===s?t:parseFloat(t.toPrecision(s))},e.Util.rad=function(e){return e*Math.PI/180},e.Util.getParameters=function(t){t=null===t||void 0===t?window.location.href:t;var s="";if(e.String.contains(t,"?")){var r=t.indexOf("?")+1,i=e.String.contains(t,"#")?t.indexOf("#"):t.length;s=t.substring(r,i)}for(var a={},n=s.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},e.Util.lastSeqID=0,e.Util.createUniqueID=function(t){return null==t&&(t="id_"),e.Util.lastSeqID+=1,t+e.Util.lastSeqID},e.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36},e.INCHES_PER_UNIT.in=e.INCHES_PER_UNIT.inches,e.INCHES_PER_UNIT.degrees=e.INCHES_PER_UNIT.dd,e.INCHES_PER_UNIT.nmi=1852*e.INCHES_PER_UNIT.m,e.METERS_PER_INCH=.0254000508001016,e.Util.extend(e.INCHES_PER_UNIT,{Inch:e.INCHES_PER_UNIT.inches,Meter:1/e.METERS_PER_INCH,Foot:.3048006096012192/e.METERS_PER_INCH,IFoot:.3048/e.METERS_PER_INCH,ClarkeFoot:.3047972651151/e.METERS_PER_INCH,SearsFoot:.30479947153867626/e.METERS_PER_INCH,GoldCoastFoot:.3047997101815088/e.METERS_PER_INCH,IInch:.0254/e.METERS_PER_INCH,MicroInch:254e-7/e.METERS_PER_INCH,Mil:2.54e-8/e.METERS_PER_INCH,Centimeter:.01/e.METERS_PER_INCH,Kilometer:1e3/e.METERS_PER_INCH,Yard:.9144018288036576/e.METERS_PER_INCH,SearsYard:.914398414616029/e.METERS_PER_INCH,IndianYard:.9143985307444408/e.METERS_PER_INCH,IndianYd37:.91439523/e.METERS_PER_INCH,IndianYd62:.9143988/e.METERS_PER_INCH,IndianYd75:.9143985/e.METERS_PER_INCH,IndianFoot:.30479951/e.METERS_PER_INCH,IndianFt37:.30479841/e.METERS_PER_INCH,IndianFt62:.3047996/e.METERS_PER_INCH,IndianFt75:.3047995/e.METERS_PER_INCH,Mile:1609.3472186944373/e.METERS_PER_INCH,IYard:.9144/e.METERS_PER_INCH,IMile:1609.344/e.METERS_PER_INCH,NautM:1852/e.METERS_PER_INCH,"Lat-66":110943.31648893273/e.METERS_PER_INCH,"Lat-83":110946.25736872235/e.METERS_PER_INCH,Decimeter:.1/e.METERS_PER_INCH,Millimeter:.001/e.METERS_PER_INCH,Dekameter:10/e.METERS_PER_INCH,Decameter:10/e.METERS_PER_INCH,Hectometer:100/e.METERS_PER_INCH,GermanMeter:1.0000135965/e.METERS_PER_INCH,CaGrid:.999738/e.METERS_PER_INCH,ClarkeChain:20.1166194976/e.METERS_PER_INCH,GunterChain:20.11684023368047/e.METERS_PER_INCH,BenoitChain:20.116782494375872/e.METERS_PER_INCH,SearsChain:20.11676512155/e.METERS_PER_INCH,ClarkeLink:.201166194976/e.METERS_PER_INCH,GunterLink:.2011684023368047/e.METERS_PER_INCH,BenoitLink:.20116782494375873/e.METERS_PER_INCH,SearsLink:.2011676512155/e.METERS_PER_INCH,Rod:5.02921005842012/e.METERS_PER_INCH,IntnlChain:20.1168/e.METERS_PER_INCH,IntnlLink:.201168/e.METERS_PER_INCH,Perch:5.02921005842012/e.METERS_PER_INCH,Pole:5.02921005842012/e.METERS_PER_INCH,Furlong:201.1684023368046/e.METERS_PER_INCH,Rood:3.778266898/e.METERS_PER_INCH,CapeFoot:.3047972615/e.METERS_PER_INCH,Brealey:375/e.METERS_PER_INCH,ModAmFt:.304812252984506/e.METERS_PER_INCH,Fathom:1.8288/e.METERS_PER_INCH,"NautM-UK":1853.184/e.METERS_PER_INCH,"50kilometers":5e4/e.METERS_PER_INCH,"150kilometers":15e4/e.METERS_PER_INCH}),e.Util.extend(e.INCHES_PER_UNIT,{mm:e.INCHES_PER_UNIT.Meter/1e3,cm:e.INCHES_PER_UNIT.Meter/100,dm:100*e.INCHES_PER_UNIT.Meter,km:1e3*e.INCHES_PER_UNIT.Meter,kmi:e.INCHES_PER_UNIT.nmi,fath:e.INCHES_PER_UNIT.Fathom,ch:e.INCHES_PER_UNIT.IntnlChain,link:e.INCHES_PER_UNIT.IntnlLink,"us-in":e.INCHES_PER_UNIT.inches,"us-ft":e.INCHES_PER_UNIT.Foot,"us-yd":e.INCHES_PER_UNIT.Yard,"us-ch":e.INCHES_PER_UNIT.GunterChain,"us-mi":e.INCHES_PER_UNIT.Mile,"ind-yd":e.INCHES_PER_UNIT.IndianYd37,"ind-ft":e.INCHES_PER_UNIT.IndianFt37,"ind-ch":20.11669506/e.METERS_PER_INCH}),e.DOTS_PER_INCH=96,e.Util.normalizeScale=function(e){return e>1?1/e:e},e.Util.getResolutionFromScale=function(t,s){var r;t&&(null==s&&(s="degrees"),r=1/(e.Util.normalizeScale(t)*e.INCHES_PER_UNIT[s]*e.DOTS_PER_INCH));return r},e.Util.getScaleFromResolution=function(t,s){return null==s&&(s="degrees"),t*e.INCHES_PER_UNIT[s]*e.DOTS_PER_INCH},e.IS_GECKO=function(){var e=navigator.userAgent.toLowerCase();return-1===e.indexOf("webkit")&&-1!==e.indexOf("gecko")}(),e.Browser=function(){var e,t="",s="",r="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.]+)/)),s=e?e[1]:"",i.indexOf("ipad")>-1||i.indexOf("ipod")>-1||i.indexOf("iphone")>-1?r="apple":i.indexOf("android")>-1&&(s=(e=i.match(/version\/([\d.]+)/))?e[1]:"",r="android"),{name:t,version:s,device:r}}(),e.Util.getBrowser=function(){return e.Browser},e.Util.isSupportCanvas=function(){var t=!0,s=e.Util.getBrowser();return document.createElement("canvas").getContext?("firefox"===s.name&&parseFloat(s.version)<5&&(t=!1),"safari"===s.name&&parseFloat(s.version)<4&&(t=!1),"opera"===s.name&&parseFloat(s.version)<10&&(t=!1),"msie"===s.name&&parseFloat(s.version)<9&&(t=!1)):t=!1,t}(),e.Util.supportCanvas=function(){return e.Util.isSupportCanvas},e.INCHES_PER_UNIT.degree=e.INCHES_PER_UNIT.dd,e.INCHES_PER_UNIT.meter=e.INCHES_PER_UNIT.m,e.INCHES_PER_UNIT.foot=e.INCHES_PER_UNIT.ft,e.INCHES_PER_UNIT.inch=e.INCHES_PER_UNIT.inches,e.INCHES_PER_UNIT.mile=e.INCHES_PER_UNIT.mi,e.INCHES_PER_UNIT.kilometer=e.INCHES_PER_UNIT.km,e.INCHES_PER_UNIT.yard=e.INCHES_PER_UNIT.yd,e.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),s=document.location.toString(),r=s.indexOf("//");if(-1===t)return!0;var i,a=i=e.substring(0,t),n=s.substring(r+2);r=n.indexOf("/");var o=n.indexOf(":"),l=n.substring(0,r),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,p=a.substring(0,t);return-1!==u?c=a.substring(0,u):(c=a.substring(0,t),p+=":"+("http:"===i.toLowerCase()?80:443)),c===document.domain&&p===l},e.Util.calculateDpi=function(e,t,s,r,i){if(e&&t&&s){var a,n=e.getWidth(),o=e.getHeight(),l=t.w,h=t.h;if(i=i||6378137,"degree"===(r=r||"degrees").toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()){let e=n/l,t=o/h;a=254/(e>t?e:t)/s/(2*Math.PI*i/360)/1e4}else{a=254/(n/l)/s/1e4}return a}},e.Util.toJSON=function(t){var s=t;if(null==s)return null;switch(s.constructor){case String:return s=(s=(s=(s=(s=(s=(s='"'+s.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=s.length;i<a;i++)r.push(e.Util.toJSON(s[i]));return"["+r.join(",")+"]";case Number:return isFinite(s)?String(s):null;case Boolean:return String(s);case Date:return"{'__type':\"System.DateTime\",'Year':"+s.getFullYear()+",'Month':"+(s.getMonth()+1)+",'Day':"+s.getDate()+",'Hour':"+s.getHours()+",'Minute':"+s.getMinutes()+",'Second':"+s.getSeconds()+",'Millisecond':"+s.getMilliseconds()+",'TimezoneOffset':"+s.getTimezoneOffset()+"}";default:if(null!=s.toJSON&&"function"==typeof s.toJSON)return s.toJSON();if("object"==typeof s){if(s.length){let t=[];for(let r=0,i=s.length;r<i;r++)t.push(e.Util.toJSON(s[r]));return"["+t.join(",")+"]"}let t=[];for(let r in s)"function"!=typeof s[r]&&"CLASS_NAME"!==r&&"parent"!==r&&t.push("'"+r+"':"+e.Util.toJSON(s[r]));return t.length>0?"{"+t.join(",")+"}":"{}"}return s.toString()}},e.Util.getResolutionFromScaleDpi=function(t,s,r,i){return i=i||6378137,r=r||"",t>0&&s>0?(t=e.Util.normalizeScale(t),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/s/t/(2*Math.PI*i/360)/1e4:254/s/t/1e4):-1},e.Util.getScaleFromResolutionDpi=function(e,t,s,r){return r=r||6378137,s=s||"",e>0&&t>0?"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*r/360)/1e4:254/t/e/1e4:-1},e.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},e.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var s in t){var r=t[s];void 0!==r&&"CLASS_NAME"!==s&&"function"!=typeof r&&(e[s]=r)}return e},e.Util.copyAttributesWithClip=function(e,t,s){if(e=e||{},t)for(var r in t){var i=!1;if(s&&s.length)for(var a=0,n=s.length;a<n;a++)if(r===s[a]){i=!0;break}if(!0!==i){var o=t[r];void 0!==o&&"CLASS_NAME"!==r&&"function"!=typeof o&&(e[r]=o)}}return e},e.Util.cloneObject=function(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date){let e=new Date;return e.setTime(t.getTime()),e}if(t instanceof Array){return t.slice(0)}if(t instanceof Object){let r={};for(var s in t)t.hasOwnProperty(s)&&(r[s]=e.Util.cloneObject(t[s]));return r}throw new Error("Unable to copy obj! Its type isn't supported.")},e.Util.lineIntersection=function(t,s,r,i){var a,n,o=null,l=(i.x-r.x)*(t.y-r.y)-(i.y-r.y)*(t.x-r.x),h=(s.x-t.x)*(t.y-r.y)-(s.y-t.y)*(t.x-r.x),u=(i.y-r.y)*(s.x-t.x)-(i.x-r.x)*(s.y-t.y);if(0!=u)n=h/u,o=(a=l/u)>=0&&n<=1&&a<=1&&n>=0?new e.Geometry.Point(t.x+a*(s.x-t.x),t.y+a*(s.y-t.y)):"No Intersection";else if(0==l&&0==h){var c=Math.max(t.y,s.y),p=Math.min(t.y,s.y),d=Math.max(t.x,s.x),m=Math.min(t.x,s.x);o=(r.y>=p&&r.y<=c||i.y>=p&&i.y<=c)&&r.x>=m&&r.x<=d||i.x>=m&&i.x<=d?"Coincident":"Parallel"}else o="Parallel";return o},e.Util.getTextBounds=function(e,t,s){document.body.appendChild(s),s.style.width="auto",s.style.height="auto",e.fontSize&&(s.style.fontSize=e.fontSize),e.fontFamily&&(s.style.fontFamily=e.fontFamily),e.fontWeight&&(s.style.fontWeight=e.fontWeight),s.style.position="relative",s.style.visibility="hidden",s.style.display="inline-block",s.innerHTML=t;var r=s.clientWidth,i=s.clientHeight;return document.body.removeChild(s),{textWidth:r,textHeight:i}};
  29. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  30. * This program are made available under the terms of the Apache License, Version 2.0
  31. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  32. class q{constructor(e,t){V.isArray(e)&&(t=e[1],e=e[0]),this.lon=e?V.toFloat(e):0,this.lat=t?V.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 q(this.lon,this.lat)}add(e,t){if(null==e||null==t)throw new TypeError("LonLat.add cannot receive null values");return new q(this.lon+V.toFloat(e),this.lat+V.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 q(t[0],t[1])}static fromArray(e){var t=V.isArray(e),s=t&&e[0],r=t&&e[1];return new q(s,r)}}
  33. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  34. * This program are made available under the terms of the Apache License, Version 2.0
  35. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  36. class Y{constructor(e,t,s,r){V.isArray(e)&&(r=e[3],s=e[2],t=e[1],e=e[0]),this.left=null!=e?V.toFloat(e):this.left,this.bottom=null!=t?V.toFloat(t):this.bottom,this.right=null!=s?V.toFloat(s):this.right,this.top=null!=r?V.toFloat(r):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new Y(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 s=Math.pow(10,e),r=Math.round(this.left*s)/s,i=Math.round(this.bottom*s)/s,a=Math.round(this.right*s)/s,n=Math.round(this.top*s)/s;return!0===t?i+","+r+","+n+","+a:r+","+i+","+a+","+n}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new H(this.getWidth(),this.getHeight())}getCenterPixel(){return new j((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new q((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var s,r;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(s=t.lon,r=t.lat):(s=t.x,r=t.y);var i=(this.left-s)*e+s,a=(this.bottom-r)*e+r,n=(this.right-s)*e+s,o=(this.top-r)*e+r;return new Y(i,a,n,o)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new Y(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 Y(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new Y(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 s=this.contains(e.lon,e.lat,t.inclusive),r=t.worldBounds;if(r&&!s){var i=r.getWidth(),a=(r.left+r.right)/2,n=Math.round((e.lon-a)/i);s=this.containsLonLat({lon:e.lon-n*i,lat:e.lat},{inclusive:t.inclusive})}return s}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,s){if(null==s&&(s=!0),null==e||null==t)return!1;return s?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 s=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else s=this;null==t.inclusive&&(t.inclusive=!0);var r=!1,i=s.left===e.right||s.right===e.left||s.top===e.bottom||s.bottom===e.top;if(t.inclusive||!i){var a=e.bottom>=s.bottom&&e.bottom<=s.top||s.bottom>=e.bottom&&s.bottom<=e.top,n=e.top>=s.bottom&&e.top<=s.top||s.top>e.bottom&&s.top<e.top,o=e.left>=s.left&&e.left<=s.right||s.left>=e.left&&s.left<=e.right,l=e.right>=s.left&&e.right<=s.right||s.right>=e.left&&s.right<=e.right;r=(a||n)&&(o||l)}if(t.worldBounds&&!r){var h=t.worldBounds,u=h.getWidth(),c=!h.containsBounds(s),p=!h.containsBounds(e);c&&!p?(e=e.add(-u,0),r=s.intersectsBounds(e,{inclusive:t.inclusive})):p&&!c&&(s=s.add(-u,0),r=e.intersectsBounds(s,{inclusive:t.inclusive}))}return r}containsBounds(e,t,s){null==t&&(t=!1),null==s&&(s=!0);var r=this.contains(e.left,e.bottom,s),i=this.contains(e.right,e.bottom,s),a=this.contains(e.left,e.top,s),n=this.contains(e.right,e.top,s);return t?r||i||a||n:r&&i&&a&&n}determineQuadrant(e){var t="",s=this.getCenterLonLat();return t+=e.lat<s.lat?"b":"t",t+=e.lon<s.lon?"l":"r"}wrapDateLine(e,t){var s=(t=t||{}).leftTolerance||0,r=t.rightTolerance||0,i=this.clone();if(e){for(var a=e.getWidth();i.left<e.left&&i.right-r<=e.left;)i=i.add(a,0);for(;i.left+s>=e.right&&i.right>e.right;)i=i.add(-a,0);var n=i.left+s;n<e.right&&n>e.left&&i.right-r>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 s=e.split(",");return Y.fromArray(s,t)}static fromArray(e,t){return!0===t?new Y(e[1],e[0],e[3],e[2]):new Y(e[0],e[1],e[2],e[3])}static fromSize(e){return new Y(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"}}e.Bounds=Y;
  37. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  38. * This program are made available under the terms of the Apache License, Version 2.0
  39. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  40. class X{constructor(){this.CLASS_NAME="SuperMap.Geometry",this.id=V.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 X}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}}e.Geometry=X;
  41. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  42. * This program are made available under the terms of the Apache License, Version 2.0
  43. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  44. class Q extends X{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 Q,t=0,s=this.components.length;t<s;t++)e.addComponent(this.components[t].clone());return V.applyDefaults(e,this),e}getComponentsString(){for(var e=[],t=0,s=this.components.length;t<s;t++)e.push(this.components[t].toShortString());return e.join(",")}calculateBounds(){this.bounds=null;var e=new Y,t=this.components;if(t)for(var s=0,r=t.length;s<r;s++)e.extend(t[s].getBounds());null!=e.left&&null!=e.bottom&&null!=e.right&&null!=e.top&&this.setBounds(e)}addComponents(e){V.isArray(e)||(e=[e]);for(var t=0,s=e.length;t<s;t++)this.addComponent(e[t])}addComponent(e,t){var s=!1;if(e&&(null==this.componentTypes||V.indexOf(this.componentTypes,e.CLASS_NAME)>-1)){if(null!=t&&t<this.components.length){var r=this.components.slice(0,t),i=this.components.slice(t,this.components.length);r.push(e),this.components=r.concat(i)}else this.components.push(e);e.parent=this,this.clearBounds(),s=!0}return s}removeComponents(e){var t=!1;V.isArray(e)||(e=[e]);for(var s=e.length-1;s>=0;--s)t=this.removeComponent(e[s])||t;return t}removeComponent(e){return V.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,s=this.components.length;t<s;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(V.isArray(e.components)&&e.components.length===this.components.length){for(var s=0,r=this.components.length;s<r;++s)if(!this.components[s].equals(e.components[s])){t=!1;break}}else t=!1;else t=!1;return t}getVertices(e){for(var t=[],s=0,r=this.components.length;s<r;++s)Array.prototype.push.apply(t,this.components[s].getVertices(e));return t}}e.Geometry.Collection=Q;
  45. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  46. * This program are made available under the terms of the Apache License, Version 2.0
  47. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  48. class K extends Q{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)}}e.Geometry.MultiPoint=K;
  49. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  50. * This program are made available under the terms of the Apache License, Version 2.0
  51. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  52. class Z extends K{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],this.CLASS_NAME="SuperMap.Geometry.Curve",this.geometryType="Curve"}}e.Geometry.Curve=Z;
  53. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  54. * This program are made available under the terms of the Apache License, Version 2.0
  55. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  56. class $ extends X{constructor(e,t,s,r){super(e,t,s,r),this.x=parseFloat(e),this.y=parseFloat(t),this.tag=r||0==r?parseFloat(r):null,this.type=s||"Point",this.CLASS_NAME="SuperMap.Geometry.Point",this.geometryType="Point"}clone(e){return null==e&&(e=new $(this.x,this.y)),V.applyDefaults(e,this),e}calculateBounds(){this.bounds=new Y(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]}}e.Geometry.Point=$;
  57. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  58. * This program are made available under the terms of the Apache License, Version 2.0
  59. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  60. class ee extends Z{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,s=this.components.length-1,r=new Array(s),i=0;i<s;++i)e=this.components[i],t=this.components[i+1],e.x<t.x?r[i]={x1:e.x,y1:e.y,x2:t.x,y2:t.y}:r[i]={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return r.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={},s=e[0],r=e[1],i=e[2],a=0,n=0,o=!0,l=0,h=0,u=0,c=[],p=(i.y-s.y)/(i.x-s.x),d=i.y-p*i.x;if(i.x!=s.x&&i.y!=s.y&&r.y==p*r.x+d||i.x==s.x&&r.x==s.x||i.y==s.y&&r.y==s.y||i.x==s.x&&i.y==s.y||i.x==r.x&&i.y==r.y||s.x==r.x&&s.y==r.y)c.push(s),c.push(r),c.push(i);else{var m=(r.x*r.x+r.y*r.y-(s.x*s.x+s.y*s.y))*(2*(i.y-s.y))-(i.x*i.x+i.y*i.y-(s.x*s.x+s.y*s.y))*(2*(r.y-s.y)),y=2*(r.x-s.x)*(i.x*i.x+i.y*i.y-(s.x*s.x+s.y*s.y))-2*(i.x-s.x)*(r.x*r.x+r.y*r.y-(s.x*s.x+s.y*s.y)),f=4*((r.x-s.x)*(i.y-s.y)-(i.x-s.x)*(r.y-s.y));t.x=m/f,t.y=y/f;var g=(2*(a=Math.sqrt((s.x-t.x)*(s.x-t.x)+(s.y-t.y)*(s.y-t.y)))*a-((s.x-i.x)*(s.x-i.x)+(s.y-i.y)*(s.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==s.x?t.x>s.x&&r.x>s.x||t.x<s.x&&r.x<s.x?360-u:u:t.y>p*t.x+d&&r.y>p*r.x+d||t.y<p*t.x+d&&r.y<p*r.x+d?360-u:u)/72,i.y!=s.y?i.x==s.x?i.y>s.y?r.x<s.x&&(o=!1):r.x>s.x&&(o=!1):i.x<s.x?r.y<p*r.x+d&&(o=!1):r.y>p*r.x+d&&(o=!1):i.x>s.x?r.y>s.y&&(o=!1):r.y<s.y&&(o=!1);var v=(s.y-t.y)/(s.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);s.y==b&&b==i.y&&s.x<i.x&&(S+=180);var x=s.y-t.y;c.push(s);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 $(_,T))}c.push(i)}return c}static createLineEPS(e){var t=[],s=e.length;if(s<2)return e;for(var r=0;r<s;){if("LTypeArc"==e[r].type){var i=ee.createLineArc(t,r,s,e);t=i[0],r=i[1]}else t.push(e[r]),r++}return t}static createLineArc(e,t,s,r){if(0==t){let i=ee.addPointEPS(r,t,s,"LTypeArc");Array.prototype.push.apply(e,i[0]),t=i[1]+1}else if(t==s-1){var i=[r[t-1],r[t]],a=ee.calculateCircle(i);Array.prototype.push.apply(e,a),t++}else{let i=ee.addPointEPS(r,t,s,"LTypeArc");e.pop(),Array.prototype.push.apply(e,i[0]),t=i[1]+1}return[e,t]}static addPointEPS(e,t,s,r){var i,a=[],n=t+1;return 0==t?Array.prototype.push.apply(a,[e[t],e[t+1]]):t==s-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"==r?i=ee.calculatePointsFBZN(a):"LTypeArc"==r&&(i=ee.calculateCircle(a)),[i,n]}}e.Geometry.LineString=ee;
  61. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  62. * This program are made available under the terms of the Apache License, Version 2.0
  63. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  64. class te extends X{constructor(e,t,s){super(e,t,s),this.x=parseFloat(e),this.y=parseFloat(t),this.text=s.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 $(this.x,this.y)}clone(e){return null==e&&(e=new te(this.x,this.y,this.text)),V.applyDefaults(e,this),e}calculateBounds(){this.bounds=new Y(this.x,this.y,this.x,this.y)}getLabelPxBoundsByLabel(e,t,s,r){var i,a,n,o,l=V.cloneObject(e),h=(r.label||this.text).split("\n").length;if(t=parseFloat(t),s=parseFloat(s),h>1&&(s=parseFloat(s)*h),r.labelAlign&&"cm"!==r.labelAlign)switch(r.labelAlign){case"lt":l.x+=t/2,l.y+=s/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=s/2;break;case"ct":l.y+=s/2;break;case"cb":l.y-=s/2;break;case"rt":l.x-=t/2,l.y+=s/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=s/2}return this.bsInfo.h=s,this.bsInfo.w=t,i=l.x-parseFloat(t)/2,a=l.y+parseFloat(s)/2,o=l.x+parseFloat(t)/2,n=l.y-parseFloat(s)/2,new Y(i,a,o,n)}getLabelPxBoundsByText(e,t){var s,r,i,a,n=this.getLabelPxSize(t),o=V.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,s=o.x-n.w/2,r=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 Y(s,r,a,i)}getLabelPxSize(e){var t,s,r,i,a=parseFloat(e.strokeWidth);t=e.label||this.text,s=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var n=t.split("\n"),o=n.length;i=o>1?s*o+o+a+.2*s:s+a+.2*s+1,r=0,this.labelWTmp&&r<this.labelWTmp&&(r=this.labelWTmp);for(var l=0;l<o;l++){var h=this.getTextCount(n[l]),u=this.labelWTmp=V.getTextBounds(e,n[l],this.element).textWidth+1*h.textC+a;r<u&&(r=u)}var c=new Object;return c.h=i,c.w=r,c}getTextCount(e){for(var t={},s=0,r=0,i=0;i<e.length;i++)e.charCodeAt(i)>255?s++:r++;return t.cnC=s,t.enC=r,t.textC=e.length,t}}e.Geometry.GeoText=te;
  65. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  66. * This program are made available under the terms of the Apache License, Version 2.0
  67. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  68. class se extends ee{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var s=!1,r=this.components.pop();null==t&&e.equals(r)||(s=super.addComponent.apply(this,arguments));var i=this.components[0];return super.addComponent.apply(this,[i]),s}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),super.removeComponent.apply(this,arguments);var s=this.components[0];super.addComponent.apply(this,[s])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,s=0,r=this.components.length;s<r-1;s++){var i=this.components[s],a=this.components[s+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)}}e.Geometry.LinearRing=se;
  69. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  70. * This program are made available under the terms of the Apache License, Version 2.0
  71. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  72. class re extends Q{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Geometry.MultiLineString",this.geometryType="MultiLineString"}}e.Geometry.MultiLineString=re;
  73. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  74. * This program are made available under the terms of the Apache License, Version 2.0
  75. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  76. class ie extends Q{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Polygon"],this.CLASS_NAME="SuperMap.Geometry.MultiPolygon",this.geometryType="MultiPolygon"}}e.Geometry.MultiPolygon=ie;
  77. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  78. * This program are made available under the terms of the Apache License, Version 2.0
  79. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  80. class ae extends Q{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,s=this.components.length;t<s;t++)e-=Math.abs(this.components[t].getArea())}return e}}e.Geometry.Polygon=ae;
  81. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  82. * This program are made available under the terms of the Apache License, Version 2.0
  83. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  84. class ne extends X{constructor(e,t,s,r){super(e,t,s,r),this.x=e,this.y=t,this.width=s,this.height=r,this.CLASS_NAME="SuperMap.Geometry.Rectangle",this.geometryType="Rectangle"}calculateBounds(){this.bounds=new Y(this.x,this.y,this.x+this.width,this.y+this.height)}getArea(){return this.width*this.height}}e.Geometry.Rectangle=ne;
  85. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  86. * This program are made available under the terms of the Apache License, Version 2.0
  87. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  88. class oe{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}}oe.CREDENTIAL=null,e.Credential=oe;
  89. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  90. * This program are made available under the terms of the Apache License, Version 2.0
  91. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  92. e.Date={toISOString:function(){if("toISOString"in Date.prototype)return function(e){return e.toISOString()};{function e(e,t){for(var s=e+"";s.length<t;)s="0"+s;return s}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,s=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(s&&(s[1]||s[7])){var r=parseInt(s[1],10)||0,i=parseInt(s[2],10)-1||0,a=parseInt(s[3],10)||1;t=new Date(Date.UTC(r,i,a));var n=s[7];if(n){var o=parseInt(s[4],10),l=parseInt(s[5],10),h=parseFloat(s[6]),u=0|h,c=Math.round(1e3*(h-u));if(t.setUTCHours(o,l,u,c),"Z"!==n){var p=-1e3*(60*parseInt(n,10)*60+60*(parseInt(s[8],10)||0));t=new Date(t.getTime()+p)}}}else t=new Date("invalid");return t}};var le=e.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(t,s){for(var r=e.Event.element(t);r.parentNode&&(!r.tagName||r.tagName.toUpperCase()!=s.toUpperCase());)r=r.parentNode;return r},observe:function(e,t,s,r){var i=V.getElement(e);if(r=r||!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=V.createUniqueID(a)}var n=i._eventCacheID;this.observers[n]||(this.observers[n]=[]),this.observers[n].push({element:i,name:t,observer:s,useCapture:r}),i.addEventListener?"mousewheel"===t?i.addEventListener(t,s,{useCapture:r,passive:!1}):i.addEventListener(t,s,r):i.attachEvent&&i.attachEvent("on"+t,s)},stopObservingElement:function(t){var s=V.getElement(t)._eventCacheID;this._removeElementObservers(e.Event.observers[s])},_removeElementObservers:function(t){if(t)for(var s=t.length-1;s>=0;s--){var r=t[s],i=new Array(r.element,r.name,r.observer,r.useCapture);e.Event.stopObserving.apply(this,i)}},stopObserving:function(t,s,r,i){i=i||!1;var a=V.getElement(t),n=a._eventCacheID;"keypress"===s&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.detachEvent)&&(s="keydown");var o=!1,l=e.Event.observers[n];if(l)for(var h=0;!o&&h<l.length;){var u=l[h];if(u.name===s&&u.observer===r&&u.useCapture===i){l.splice(h,1),0==l.length&&delete e.Event.observers[n],o=!0;break}h++}return o&&(a.removeEventListener?a.removeEventListener(s,r,i):a&&a.detachEvent&&a.detachEvent("on"+s,r)),o},unloadCache:function(){if(e.Event&&e.Event.observers){for(var t in e.Event.observers){var s=e.Event.observers[t];e.Event._removeElementObservers.apply(this,[s])}e.Event.observers=!1}},CLASS_NAME:"SuperMap.Event"};e.Event=le,e.Event.observe(window,"unload",e.Event.unloadCache,!1);
  93. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  94. * This program are made available under the terms of the Apache License, Version 2.0
  95. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  96. class he{constructor(e,t,s,r,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=r,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,V.extend(this,i),null!=s)for(var a=0,n=s.length;a<n;a++)this.addEventType(s[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&&(le.stopObservingElement(this.element),this.element.hasScrollEvent&&le.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?le.stopObservingElement(this.element):(this.eventHandler=W.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=W.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,s=this.BROWSER_EVENTS.length;t<s;t++){var r=this.BROWSER_EVENTS[t];this.addEventType(r),le.observe(e,r,this.eventHandler)}le.observe(e,"dragstart",le.stop)}on(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.register(t,e.scope,e[t])}register(e,t,s,r){if(e in he&&!this.extensions[e]&&(this.extensions[e]=new he[e](this)),null!=s&&-1!==V.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:s};r?(i.splice(this.extensionCount[e],0,a),"object"==typeof r&&r.extension&&this.extensionCount[e]++):i.push(a)}}registerPriority(e,t,s){this.register(e,t,s,!0)}un(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.unregister(t,e.scope,e[t])}unregister(e,t,s){null==t&&(t=this.object);var r=this.listeners[e];if(null!=r)for(var i=0,a=r.length;i<a;i++)if(r[i].obj===t&&r[i].func===s){r.splice(i,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var s=this.listeners[e];if(s&&0!=s.length){var r;null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var i=0,a=(s=s.slice()).length;i<a;i++){var n=s[i];if(void 0!=(r=n.func.apply(n.obj,[t]))&&!1===r)break}return this.fallThrough||le.stop(t,!0),r}}handleBrowserEvent(e){var t=e.type,s=this.listeners[t];if(s&&0!=s.length){var r=e.touches;if(r&&r[0]){for(var i,a=0,n=0,o=r.length,l=0;l<o;++l)a+=(i=r[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||(le.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var t=V.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=V.pagePosition(this.element)),new j(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])}}e.Events=he,e.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"];
  97. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  98. * This program are made available under the terms of the Apache License, Version 2.0
  99. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  100. class ue{constructor(e,t,s){this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=V.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=t,this.data=null!=s?s:{}}destroy(){this.id=null,this.lonlat=null,this.data=null}}e.Feature=ue;
  101. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  102. * This program are made available under the terms of the Apache License, Version 2.0
  103. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  104. class ce extends ue{constructor(t,s,r){super(null,null,s),this.fid=null,this.geometry=t||null,this.attributes={},s&&(this.attributes=V.extend(this.attributes,s)),this.bounds=null,this.state=null,this.style=r||null,this.url=null,this.lonlat=null,this.CLASS_NAME="SuperMap.Feature.Vector",e.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"},ce.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 ce(this.geometry?this.geometry.clone():null,this.attributes,this.style)}toState(t){if(t===e.State.UPDATE)switch(this.state){case e.State.UNKNOWN:case e.State.DELETE:this.state=t;break;case e.State.UPDATE:case e.State.INSERT:}else if(t===e.State.INSERT)switch(this.state){case e.State.UNKNOWN:break;default:this.state=t}else if(t===e.State.DELETE)switch(this.state){case e.State.INSERT:case e.State.DELETE:break;case e.State.UNKNOWN:case e.State.UPDATE:this.state=t}else t===e.State.UNKNOWN&&(this.state=t)}}e.Feature.Vector=ce;
  105. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  106. * This program are made available under the terms of the Apache License, Version 2.0
  107. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  108. class pe{constructor(e){this.data=null,this.keepData=!1,V.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}e.Format=e.Format||pe;
  109. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  110. * This program are made available under the terms of the Apache License, Version 2.0
  111. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  112. class de extends pe{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,s,r,i=["{"];this.level+=1;var a=!1;for(t in e)e.hasOwnProperty(t)&&(s=this.write.apply(this,[t,this.pretty]),r=this.write.apply(this,[e[t],this.pretty]),null!=s&&null!=r&&(a&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),s,":",this.writeSpace(),r),a=!0));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"}"),i.join("")},array:function(e){var t,s=["["];this.level+=1;for(var r=0,i=e.length;r<i;++r)null!=(t=this.write.apply(this,[e[r],this.pretty]))&&(r>0&&s.push(","),s.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,s.push(this.writeNewline(),this.writeIndent(),"]"),s.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,s){var r=t[s];return r||(r=s.charCodeAt(),"\\u00"+Math.floor(r/16).toString(16)+(r%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 s;if(this.nativeJSON)try{s=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=s),s}write(e,t){this.pretty=!!t;var s=null,r=typeof e;if(this.serialize[r])try{s=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[r].apply(this,[e])}catch(e){}return s}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:""}}e.Format.JSON=de;
  113. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  114. * This program are made available under the terms of the Apache License, Version 2.0
  115. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  116. class me{constructor(e,t,s){this.red=e||0==e?e:255,this.green=t||0,this.blue=s||0,this.CLASS_NAME="SuperMap.ServerColor"}destroy(){this.red=null,this.green=null,this.blue=null}static fromJson(e){if(e){var t=new me,s=255;null!==e.red&&(s=Number(e.red)),t.red=s;var r=0;null!==e.green&&(r=Number(e.green)),t.green=r;var i=0;return null!==e.blue&&(i=Number(e.blue)),t.blue=i,t}}}e.ServerColor=me;
  117. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  118. * This program are made available under the terms of the Apache License, Version 2.0
  119. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  120. class ye{constructor(e){this.fillBackColor=new me(255,255,255),this.fillBackOpaque=!1,this.fillForeColor=new me(255,0,0),this.fillGradientMode=null,this.fillGradientAngle=0,this.fillGradientOffsetRatioX=0,this.fillGradientOffsetRatioY=0,this.fillOpaqueRate=100,this.fillSymbolID=0,this.lineColor=new me(0,0,0),this.lineSymbolID=0,this.lineWidth=1,this.markerAngle=0,this.markerSize=1,this.markerSymbolID=-1,e&&V.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=V.copyAttributes(e,this)}static fromJson(e){if(e)return new ye({fillBackColor:me.fromJson(e.fillBackColor),fillBackOpaque:e.fillBackOpaque,fillForeColor:me.fromJson(e.fillForeColor),fillGradientMode:e.fillGradientMode,fillGradientAngle:e.fillGradientAngle,fillGradientOffsetRatioX:e.fillGradientOffsetRatioX,fillGradientOffsetRatioY:e.fillGradientOffsetRatioY,fillOpaqueRate:e.fillOpaqueRate,fillSymbolID:e.fillSymbolID,lineColor:me.fromJson(e.lineColor),lineSymbolID:e.lineSymbolID,lineWidth:e.lineWidth,markerAngle:e.markerAngle,markerSize:e.markerSize,markerSymbolID:e.markerSymbolID})}}e.ServerStyle=ye;
  121. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  122. * This program are made available under the terms of the Apache License, Version 2.0
  123. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  124. class fe extends ${constructor(e){super(e),this.measure=null,e&&V.extend(this,e),this.CLASS_NAME="SuperMap.PointWithMeasure"}equals(e){var t=!1;if(null!=e){var s=this.x===e.x&&this.y===e.y&&this.measure===e.measure,r=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),i=isNaN(e.x)&&isNaN(e.y)&&isNaN(e.measure);t=s||r&&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 fe({x:e.x,y:e.y,measure:e.measure})}}e.PointWithMeasure=fe;
  125. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  126. * This program are made available under the terms of the Apache License, Version 2.0
  127. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  128. class ge extends Q{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&&V.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 s=0,r=this.components.length;s<r;s++)for(var i=0,a=this.components[s].components.length;i<a;i++)e+=this.components[s].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||[],s=e.points||[],r=t.length,i=[];if(!(r>0))return null;for(var a=0,n=0,o=[];a<r;a++){for(var l=0;l<t[a];l++)o.push(fe.fromJson(s[n+l]));n+=t[a],o[0].equals(o[t[a]-1])?i.push(new se(o)):i.push(new ee(o)),o=[]}return new ge(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})}}}e.Route=ge;
  129. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  130. * This program are made available under the terms of the Apache License, Version 2.0
  131. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  132. class ve{constructor(e){this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&V.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 i.POINT:return e.toGeoPoint();case i.LINE:return e.toGeoLine();case i.LINEM:return e.toGeoLinem();case i.REGION:return e.toGeoRegion();case i.POINTEPS:return e.toGeoPoint();case i.LINEEPS:return e.toGeoLineEPS();case i.REGIONEPS:return e.toGeoRegionEPS();case i.GEOCOMPOUND:return e.transformGeoCompound()}}toGeoPoint(){var e=this.parts||[],t=this.points||[],s=e.length;if(s>0){if(1===s)return new $(t[0].x,t[0].y);var r=[];for(let e=0;e<s;e++)r.push(new $(t[e].x,t[e].y));return new K(r)}return null}toGeoLine(){var e=this.parts||[],t=this.points||[],s=e.length;if(s>0){if(1===s){let s=[];for(let r=0;r<e[0];r++)s.push(new $(t[r].x,t[r].y));return s[0].equals(s[e[0]-1])?new se(s):new ee(s)}{let r=[];for(let i=0;i<s;i++){let s=[];for(let r=0;r<e[i];r++)s.push(new $(t[r].x,t[r].y));r.push(new ee(s)),t.splice(0,e[i])}return new re(r)}}return null}toGeoLineEPS(){var e,t,s,r,i,a=this.parts||[],n=this.points||[],o=a.length;if(o>0){if(1===o){for(e=0,s=[];e<a[0];e++)s.push(new $(n[e].x,n[e].y,n[e].type));return s[0].equals(s[a[0]-1])?(i=ee.createLineEPS(s),new se(i)):(i=ee.createLineEPS(s),new ee(i))}for(e=0,r=[];e<o;e++){for(t=0,s=[];t<a[e];t++)s.push(new $(n[t].x,n[t].y));i=ee.createLineEPS(s),r.push(new ee(i)),n.splice(0,a[e])}return new re(r)}return null}toGeoLinem(){return ge.fromJson(this)}toGeoRegion(){var e=this.parts||[],t=this.partTopo||[],s=this.points||[],r=e.length;if(r<=0)return null;var i=[],a=[];if(1==r){for(let e=0;e<s.length;e++)a.push(new $(s[e].x,s[e].y));return i.push(new ae([new se(a)])),new ie(i)}var n=[],o=[],l=[],h=[],u=[];for(let i=0,n=0;i<r;i++){for(let t=0;t<e[i];t++)a.push(new $(s[n+t].x,s[n+t].y));n+=e[i];var c=new ae([new se(a)]);a=[],l.push(c),0===t.length&&h.push(c.getBounds()),u.push(1),o.push(c.getArea())}if(ve.bubbleSort(o,l,t,h),0===t.length){var p=[];for(let e=1;e<l.length;e++)for(let t=e-1;t>=0;t--)if(p[e]=-1,h[t].containsBounds(h[e])){u[e]=-1*u[t],u[e]<0&&(p[e]=t);break}for(let e=0;e<l.length;e++)u[e]>0?i.push(l[e]):(i[p[e]].components=i[p[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==r-1){var d=i.length;if(d)i[d-1].components=i[d-1].components.concat(n);else for(let e=0,t=n.length;e<t;e++)i.push(new ae(n))}}return new ie(i)}toGeoRegionEPS(){var e=this.parts||[],t=this.partTopo||[],s=this.points||[],r=e.length;if(r<=0)return null;var i,a=[],n=[];if(1==r){for(var o=0;o<s.length;o++)n.push(new $(s[o].x,s[o].y));return i=ee.createLineEPS(n),a.push(new ae([new se(i)])),new ie(a)}var l=[],h=[],u=[],c=[],p=[];for(let a=0,o=0;a<r;a++){for(let t=0;t<e[a];t++)n.push(new $(s[o+t].x,s[o+t].y));o+=e[a],i=ee.createLineEPS(n);var d=new ae([new se(i)]);n=[],u.push(d),0===t.length&&c.push(d.getBounds()),p.push(1),h.push(d.getArea())}if(ve.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])){p[e]=-1*p[t],p[e]<0&&(m[e]=t);break}for(let e=0;e<u.length;e++)p[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==r-1){var y=a.length;if(y)a[y-1].components=a[y-1].components.concat(l);else for(let e=0,t=l.length;e<t;e++)a.push(new ae(l))}}return new ie(a)}transformGeoCompound(){const e=this.geoParts||[],t=e.length;if(t<=0)return null;const s=[];for(let r=0;r<t;r++){const t=e[r];s.push(new ve(t).toGeometry())}return new Q(s)}static fromJson(e){if(e)return new ve({id:e.id,style:ye.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,s=[],r=[],a=null,n=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 K||e instanceof re)){let e=n.length;for(let t=0;t<e;t++){let e=n[t].getVertices().length;s.push(e);for(let s=0;s<e;s++)r.push(new $(n[t].getVertices()[s].x,n[t].getVertices()[s].y))}a="SuperMap.Geometry.MultiPoint"==o?i.POINT:i.LINE}else if(e instanceof ie){let e=n.length;for(let t=0;t<e;t++){let e=n[t].components,i=e.length;for(let t=0;t<i;t++){let i=e[t].getVertices().length+1;s.push(i);for(let s=0;s<i-1;s++)r.push(new $(e[t].getVertices()[s].x,e[t].getVertices()[s].y));r.push(new $(e[t].getVertices()[0].x,e[t].getVertices()[0].y))}}a=i.REGION}else if(e instanceof ae){let e=n.length;for(let t=0;t<e;t++){let e=n[t].getVertices().length+1;s.push(e);for(let s=0;s<e-1;s++)r.push(new $(n[t].getVertices()[s].x,n[t].getVertices()[s].y));r.push(new $(n[t].getVertices()[0].x,n[t].getVertices()[0].y))}a=i.REGION}else{let t=e.getVertices().length;for(let s=0;s<t;s++)r.push(new $(e.getVertices()[s].x,e.getVertices()[s].y));e instanceof se&&(r.push(new $(e.getVertices()[0].x,e.getVertices()[0].y)),t++),s.push(t),a=e instanceof $?i.POINT:i.LINE}return new ve({id:t,style:null,parts:s,points:r,type:a,prjCoordSys:l})}}static IsClockWise(e){var t=e.length;if(t<3)return 0;var s=e[0].y*(e[t-1].x-e[1].x);e.push(e[0]);for(var r=1;r<t;r++)s+=e[r].y*(e[r-1].x-e[r+1].x);return.5*s}static bubbleSort(e,t,s,r){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,s&&s.length>0){var l=s[a];s[a]=s[i],s[i]=l}if(r&&r.length>0){var h=r[a];r[a]=r[i],r[i]=h}}}}e.ServerGeometry=ve;
  133. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  134. * This program are made available under the terms of the Apache License, Version 2.0
  135. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  136. class Se extends de{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new $(e[0],e[1])},multipoint:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.point.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new K(t)},linestring:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.point.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new ee(t)},multilinestring:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.linestring.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new re(t)},polygon:function(e){for(var t,s,r=[],i=0,a=e.length;i<a;++i){try{s=this.parseCoords.linestring.apply(this,[e[i]])}catch(e){throw e}t=new se(s.components),r.push(t)}return new ae(r)},multipolygon:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.polygon.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new ie(t)},box:function(e){if(2!=e.length)throw"GeoJSON box coordinates must have 2 elements";return new ae([new se([new $(e[0][0],e[0][1]),new $(e[1][0],e[0][1]),new $(e[1][0],e[1][1]),new $(e[0][0],e[1][1]),new $(e[0][0],e[0][1])])])}},this.extract={feature:function(e){var t=this.extract.geometry.apply(this,[e.geometry]),s={type:"Feature",properties:this.createAttributes(e),geometry:t};return e.geometry&&"TEXT"===e.geometry.type&&(s.properties.texts=e.geometry.texts,s.properties.textStyle=e.geometry.textStyle),e.fid&&(s.id=e.fid),e.ID&&(s.id=e.ID),s},geometry:function(e){if(null==e)return null;!e.parts&&e.points&&(e.parts=[e.points.length]);var t,s=e.hasOwnProperty("geometryType")?e:new ve(e).toGeometry()||e,r=s.geometryType||s.type;return"LinearRing"===r&&(r="LineString"),"LINEM"===r&&(r="MultiLineString"),t=this.extract[r.toLowerCase()].apply(this,[s]),"Collection"===(r="TEXT"===r?"Point":r)?{type:"GeometryCollection",geometries:t}:{type:r,coordinates:t}},point:function(e){var t=[e.x,e.y];for(var s in e)"x"===s||"y"===s||null===e[s]||isNaN(e[s])||t.push(e[s]);return t},text:function(e){return[e.points[0].x,e.points[0].y]},multipoint:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.point.apply(this,[e.components[s]]));return t},linestring:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.point.apply(this,[e.components[s]]));return t},multilinestring:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.linestring.apply(this,[e.components[s]]));return t},polygon:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.linestring.apply(this,[e.components[s]]));return t},multipolygon:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.polygon.apply(this,[e.components[s]]));return t},collection:function(e){for(var t=e.components.length,s=new Array(t),r=0;r<t;++r)s[r]=this.extract.geometry.apply(this,[e.components[r]]);return s}}}read(e,t,s){t=t||"FeatureCollection";var r=null,i=null;if(i="string"==typeof e?super.read(e,s):e){if("string"!=typeof i.type);else if(this.isValidType(i,t))switch(t){case"Geometry":try{r=this.parseGeometry(i)}catch(e){}break;case"Feature":try{(r=this.parseFeature(i)).type="Feature"}catch(e){}break;case"FeatureCollection":switch(r=[],i.type){case"Feature":try{r.push(this.parseFeature(i))}catch(e){r=null}break;case"FeatureCollection":for(var a=0,n=i.features.length;a<n;++a)try{r.push(this.parseFeature(i.features[a]))}catch(e){r=null}break;default:try{var o=this.parseGeometry(i);r.push(new ce(o))}catch(e){r=null}}}}else;return r}write(e,t){return super.write(this.toGeoJSON(e),t)}fromGeoJSON(e,t,s){let r=this.read(e,t,s);return V.isArray(r)?r.map(e=>this._toiSevrerFeature(e)):this._toiSevrerFeature(r)}toGeoJSON(e){var t={type:null};if(V.isArray(e)){t.type="FeatureCollection";var s=e.length;t.features=new Array(s);for(var r=0;r<s;++r){var i=e[r];if(a(i)){let e={};e.geometry=i,t.features[r]=this.extract.feature.apply(this,[e])}else t.features[r]=this.extract.feature.apply(this,[i])}}else if(a(e)){let s={};s.geometry=e,t=this.extract.feature.apply(this,[s])}else t=this.extract.feature.apply(this,[e]);function a(e){return e.hasOwnProperty("parts")&&e.hasOwnProperty("points")||e.hasOwnProperty("geoParts")}return t}isValidType(e,t){var s=!1;switch(t){case"Geometry":-1==V.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],e.type)||(s=!0);break;case"FeatureCollection":s=!0;break;default:e.type==t&&(s=!0)}return s}parseFeature(e){var t,s,r,i;r=e.properties?e.properties:{},i=e.geometry&&e.geometry.bbox||e.bbox;try{s=this.parseGeometry(e.geometry)}catch(e){throw e}return t=new ce(s,r),i&&(t.bounds=Y.fromArray(i)),e.id&&(t.fid=e.id),t}parseGeometry(e){if(null==e)return null;var t;if("GeometryCollection"==e.type){if(!V.isArray(e.geometries))throw"GeometryCollection must have geometries array: "+e;for(var s=e.geometries.length,r=new Array(s),i=0;i<s;++i)r[i]=this.parseGeometry.apply(this,[e.geometries[i]]);t=new Q(r)}else{if(!V.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(),s={};if(t.match(/epsg:/i)){var r=parseInt(t.substring(t.indexOf(":")+1));s=4326==r?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+r}}}return s}_toiSevrerFeature(e){const t=e.attributes,s=[],r=[];for(var i in t)s.push(i),r.push(t[i]);const a={fieldNames:s,fieldValues:r,geometry:ve.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 s=e.fieldNames,r=e.fieldValues;for(var i in s)t[s[i]]=r[i]}(e,t);var s=["fieldNames","fieldValues","geometry","stringID","ID"];for(var r in e)s.indexOf(r)>-1||(t[r]=e[r]);return t}}e.Format.GeoJSON=Se;e.Format.WKT=
  137. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  138. * This program are made available under the terms of the Apache License, Version 2.0
  139. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  140. class extends pe{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=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.point.apply(this,[e.components[s]])+")");return t.join(",")},linestring(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.point.apply(this,[e.components[s]]));return t.join(",")},multilinestring(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.linestring.apply(this,[e.components[s]])+")");return t.join(",")},polygon(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.linestring.apply(this,[e.components[s]])+")");return t.join(",")},multipolygon(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.polygon.apply(this,[e.components[s]])+")");return t.join(",")},collection(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extractGeometry.apply(this,[e.components[s]]));return t.join(",")}},this.parse={point:function(e){var t=J.trim(e).split(this.regExes.spaces);return new ce(new $(t[0],t[1]))},multipoint:function(e){for(var t,s=J.trim(e).split(","),r=[],i=0,a=s.length;i<a;++i)t=s[i].replace(this.regExes.trimParens,"$1"),r.push(this.parse.point.apply(this,[t]).geometry);return new ce(new K(r))},linestring:function(e){for(var t=J.trim(e).split(","),s=[],r=0,i=t.length;r<i;++r)s.push(this.parse.point.apply(this,[t[r]]).geometry);return new ce(new ee(s))},multilinestring:function(e){for(var t,s=J.trim(e).split(this.regExes.parenComma),r=[],i=0,a=s.length;i<a;++i)t=s[i].replace(this.regExes.trimParens,"$1"),r.push(this.parse.linestring.apply(this,[t]).geometry);return new ce(new re(r))},polygon:function(e){for(var t,s,r,i=J.trim(e).split(this.regExes.parenComma),a=[],n=0,o=i.length;n<o;++n)t=i[n].replace(this.regExes.trimParens,"$1"),s=this.parse.linestring.apply(this,[t]).geometry,r=new se(s.components),a.push(r);return new ce(new ae(a))},multipolygon:function(e){for(var t,s=J.trim(e).split(this.regExes.doubleParenComma),r=[],i=0,a=s.length;i<a;++i)t=s[i].replace(this.regExes.trimParens,"$1"),r.push(this.parse.polygon.apply(this,[t]).geometry);return new ce(new ie(r))},geometrycollection:function(e){e=e.replace(/,\s*([A-Za-z])/g,"|$1");for(var t=J.trim(e).split("|"),s=[],r=0,i=t.length;r<i;++r)s.push(this.read(t[r]));return s}}}read(e){var t,s,r;e=e.replace(/[\n\r]/g," ");var i=this.regExes.typeStr.exec(e);return i&&(s=i[1].toLowerCase(),r=i[2],this.parse[s]&&(t=this.parse[s].apply(this,[r]))),t}write(e){var t,s,r;e.constructor===Array?(t=e,r=!0):(t=[e],r=!1);var i=[];r&&i.push("GEOMETRYCOLLECTION(");for(var a=0,n=t.length;a<n;++a)r&&a>0&&i.push(","),s=t[a].geometry,i.push(this.extractGeometry(s));return r&&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}};
  141. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  142. * This program are made available under the terms of the Apache License, Version 2.0
  143. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  144. class be{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 he(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(){}}e.TimeControlBase=be;e.TimeFlowControl=
  145. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  146. * This program are made available under the terms of the Apache License, Version 2.0
  147. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  148. class extends be{constructor(e,t){super(t);var s=this;s.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),s=this,r=function(){},i=function(){return s.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),s.update=s.update.bind(s),s.oldTime=s.currentTime,s.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)}}};
  149. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  150. * This program are made available under the terms of the Apache License, Version 2.0
  151. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  152. s(107),s(693);var xe=s(144),Ce=s.n(xe);
  153. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  154. * This program are made available under the terms of the Apache License, Version 2.0
  155. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  156. let _e=window.fetch;e.setCORS=function(t){e.CORS=t};var Te=e.isCORS=function(){return void 0!=e.CORS?e.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},Ee=(e.setRequestTimeout=function(t){return e.RequestTimeout=t},e.getRequestTimeout=function(){return e.RequestTimeout||45e3}),Ae=e.FetchRequest={commit:function(e,t,s,r){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,s,r);case"POST":return this.post(t,s,r);case"PUT":return this.put(t,s,r);case"DELETE":return this.delete(t,s,r);default:return this.get(t,s,r)}},supportDirectRequest:function(e,t){return!!V.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:Te()||t.proxy)},get:function(t,s,r){r=r||{};if(t=V.urlAppend(t,this._getParameterString(s||{})),t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){var i={url:t=t.replace(".json",".jsonp"),data:s};return e.Util.RequestJSONPPromise.GET(i)}return this.urlIsLong(t)?this._postSimulatie("GET",t.substring(0,t.indexOf("?")-1),s,r):this._fetch(t,s,r,"GET")},delete:function(t,s,r){r=r||{};if(t=V.urlAppend(t,this._getParameterString(s||{})),t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var i={url:t+="&_method=DELETE",data:s};return e.Util.RequestJSONPPromise.DELETE(i)}return this.urlIsLong(t)?this._postSimulatie("DELETE",t.substring(0,t.indexOf("?")-1),s,r):this._fetch(t,s,r,"DELETE")},post:function(t,s,r){if(r=r||{},!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var i={url:t+="&_method=POST",data:s};return e.Util.RequestJSONPPromise.POST(i)}return this._fetch(this._processUrl(t,r),s,r,"POST")},put:function(t,s,r){if(r=r||{},t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var i={url:t+="&_method=PUT",data:s};return e.Util.RequestJSONPPromise.PUT(i)}return this._fetch(t,s,r,"PUT")},urlIsLong:function(e){for(var t=0,s=null,r=0,i=e.length;r<i;r++)(s=e.charCodeAt(r))<127?t++:128<=s&&s<=2047?t+=2:2048<=s&&s<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,s,r){return t+=(t.indexOf("?")>-1?"&":"?")+"_method="+e,"string"!=typeof s&&(s=JSON.stringify(s)),this.post(t,s,r)},_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 s=e.split("?");2===s.length&&(e=s[0]+".json?"+s[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,s,r){return(s=s||{}).headers=s.headers||{},s.headers["Content-Type"]||(s.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),s.timeout?this._timeout(s.timeout,_e(e,{method:r,headers:s.headers,body:"PUT"===r||"POST"===r?t:void 0,credentials:this._getWithCredentials(s),mode:"cors",timeout:Ee()}).then(function(e){return e})):_e(e,{method:r,body:"PUT"===r||"POST"===r?t:void 0,headers:s.headers,credentials:this._getWithCredentials(s),mode:"cors",timeout:Ee()}).then(function(e){return e})},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},Ce()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(s,r){setTimeout(function(){r(new Error("timeout"))},e),t.then(s,r)})},_getParameterString:function(e){var t=[];for(var s in e){var r,i=e[s];if(null!=i&&"function"!=typeof i)r=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(s)+"="+r)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};e.Util.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(t){for(var s in t){this.queryKeys.push(s),"string"!=typeof t[s]&&(t[s]=e.Util.toJSON(t[s]));var r=encodeURIComponent(t[s]);this.queryValues.push(r)}},issue:function(e){for(var t=this,s=t.getUid(),r=e.url,i=[],a=new Promise(function(e){t.supermap_callbacks[s]=function(r){delete t.supermap_callbacks[s],e(r)}}),n=r,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=r,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 p=u.substring(0,c);"%"===p.substring(c-1,c)?(c-=1,p=u.substring(0,c)):"%"===p.substring(c-2,c-1)&&(c-=2,p=u.substring(0,c)),n+=t.queryKeys[h]+"="+p,u=u.substring(c),p.length>0&&(i.push(n),n=r,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["+s+"]",e&&e.proxy),a},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,s){var r=e.length;if(r>0)for(var i=(new Date).getTime(),a=0;a<r;a++){var n=e[a];n.indexOf("?")>-1?n+="&":n+="?",n+="sectionCount="+r,n+="&sectionIndex="+a,n+="&jsonpUserID="+i,s&&(n=decodeURIComponent(n),n=s+encodeURIComponent(n)),Ce()(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)}};
  157. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  158. * This program are made available under the terms of the Apache License, Version 2.0
  159. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  160. class we{static generateToken(e,t){var s=this.servers[e];if(s)return Ae.post(s.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}static registerServers(e){this.servers=this.servers||{},V.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++){var s=e[t];this.servers[s.server]=s}}static registerToken(e,t){if(this.tokens=this.tokens||{},e&&t){var s=this._getTokenStorageKey(e);this.tokens[s]=t}}static registerKey(e,t){if(this.keys=this.keys||{},e&&!(e.length<1)&&t){e=V.isArray(e)?e:[e];for(var s=0;s<e.length;s++){var r=this._getUrlRestString(e[0])||e[0];this.keys[r]=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,s,r){e=V.urlPathAppend(e,"services/security/login");var i={username:t&&t.toString(),password:s&&s.toString(),rememberme:r};i=JSON.stringify(i);return Ae.post(e,i,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(e){return e.json()})}static logoutiServer(e){e=V.urlPathAppend(e,"services/security/logout");return Ae.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 s=we.SSO+"/login?service="+e;this._open(s,t)}static loginiPortal(e,t,s){e=V.urlPathAppend(e,"web/login");var r={username:t&&t.toString(),password:s&&s.toString()};r=JSON.stringify(r);return Ae.post(e,r,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0}).then(function(e){return e.json()})}static logoutiPortal(e){e=V.urlPathAppend(e,"services/security/logout");return Ae.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,s){if(V.isInTheSameDomain(e)){var r=V.urlPathAppend(e,"icloud/security/tokens"),i=t||{},a={username:i.userName&&i.userName.toString(),password:i.password&&i.password.toString()};a=JSON.stringify(a);var n=this;return Ae.post(r,a,{headers:{Accept:"*/*","Content-Type":"application/json"}}).then(function(e){e.text().then(function(e){return n.imanagerToken=e,e})})}var o=!s||s.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 s=window.screen.availWidth/2-this.INNER_WINDOW_WIDTH/2,r=window.screen.availHeight/2-this.INNER_WINDOW_HEIGHT/2,i="height="+this.INNER_WINDOW_HEIGHT+", width="+this.INNER_WINDOW_WIDTH+",top="+r+", left="+s+",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|https):\/\/(.*\/rest)/i);return t?t[0]:e}}we.INNER_WINDOW_WIDTH=600,we.INNER_WINDOW_HEIGHT=600,we.SSO="https://sso.supermap.com",we.ONLINE="https://www.supermapol.com",e.SecurityManager=we;
  161. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  162. * This program are made available under the terms of the Apache License, Version 2.0
  163. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  164. class Le{constructor(e,t){if(e){var s=e.substr(e.length-1,1);this.serviceUrl="/"===s?e.substr(0,e.length-2):e}this.options=t||{},this.CLASS_NAME="SuperMap.iManagerServiceBase"}request(e,t,s,r){(r=r||{headers:{Accept:"*/*","Content-Type":"application/json"}}).hasOwnProperty("withCredentials")||(r.withCredentials=!0),r.crossOrigin=this.options.crossOrigin,r.headers=this.options.headers;var i=we.imanagerToken;return i&&(r.headers||(r.headers=[]),r.headers["X-Auth-Token"]=i),s&&(s=JSON.stringify(s)),Ae.commit(e,t,s,r).then(function(e){return e.json()})}}e.iManagerServiceBase=Le;
  165. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  166. * This program are made available under the terms of the Apache License, Version 2.0
  167. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  168. class Pe{constructor(e){e=e||{},this.nodeSpec="SMALL",this.nodeCount=1,this.nodeName="",this.password="",this.description="",this.physicalMachineName="",this.ips=[],this.userName="",V.extend(this,e)}}e.iManagerCreateNodeParam=Pe;e.iManager=
  169. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  170. * This program are made available under the terms of the Apache License, Version 2.0
  171. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  172. class extends Le{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 Pe(e))}createIPortal(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/portal.json",new Pe(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)}};
  173. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  174. * This program are made available under the terms of the Apache License, Version 2.0
  175. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  176. class Oe{constructor(e,t){t=t||{},this.serviceUrl=e,this.serverType=r.iPortal,this.CLASS_NAME="SuperMap.iPortalServiceBase",this.withCredentials=t.withCredentials||!1,this.crossOrigin=t.crossOrigin,this.headers=t.headers}request(e,t,s,r={headers:this.headers,crossOrigin:this.crossOrigin,withCredentials:this.withCredentials}){return t=this.createCredentialUrl(t),Ae.commit(e,t,s,r).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,s=this.getCredential();if(s){var r=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===r?t+=s.getUrlParameters():t.indexOf("?")>-1&&"?"!==r?t+="&"+s.getUrlParameters():t+="?"+s.getUrlParameters()}return t}getCredential(){var e,t=we.getToken(this.serviceUrl);return(e=t?new oe(t,"token"):null)||(e=(t=this.getKey())?new oe(t,"key"):null),e}getKey(){}}e.iPortalServiceBase=Oe;
  177. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  178. * This program are made available under the terms of the Apache License, Version 2.0
  179. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  180. class Ne{constructor(e){e=e||{},this.resourceType="",this.pageSize=12,this.currentPage=1,this.orderBy="UPDATETIME",this.orderType="DESC",this.searchType="PUBLIC",this.tags=[],this.dirIds=[],this.resourceSubTypes=[],this.aggregationTypes=[],this.text="",this.groupIds=[],this.departmentIds=[],V.extend(this,e)}}e.iPortalQueryParam=Ne;
  181. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  182. * This program are made available under the terms of the Apache License, Version 2.0
  183. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  184. class Me{constructor(e){e=e||{},this.content=[],this.total=0,this.currentPage=1,this.pageSize=12,this.aggregations=null,V.extend(this,e)}}e.iPortalQueryResult=Me;
  185. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  186. * This program are made available under the terms of the Apache License, Version 2.0
  187. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  188. class Ie extends Oe{constructor(e,t){super(e),t=t||{},this.authorizeSetting=[],this.bounds="",this.bounds4326="",this.checkStatus="",this.createTime=0,this.description=null,this.dirId=null,this.epsgCode=0,this.heatLevel=0,this.id=0,this.name="",this.personalDirId=null,this.resourceId=0,this.resourceSubType=null,this.resourceType=null,this.serviceRootUrlId=null,this.tags=null,this.thumbnail=null,this.updateTime=0,this.userName="",this.sourceJSON={},V.extend(this,t),this.resourceUrl=e+"/web/"+this.resourceType.replace("_","").toLowerCase()+"s/"+this.resourceId,this.withCredentials&&(this.resourceUrl=e+"/web/mycontent/"+this.resourceType.replace("_","").toLowerCase()+"s/"+this.resourceId)}load(){var e=this;return e.request("GET",e.resourceUrl+".json").then(function(t){if(t.error)return t;e.sourceJSON=t})}update(){var e=this.resourceType.replace("_","").toLowerCase();"data"===e&&(this.resourceUrl=this.resourceUrl+"/attributes.json");var t=JSON.stringify(this.sourceJSON);if("service"===e){var s={authorizeSetting:this.sourceJSON.authorizeSetting,metadata:this.sourceJSON.metadata,tags:this.sourceJSON.tags,thumbnail:this.sourceJSON.thumbnail,tokenRefreshUrl:this.sourceJSON.tokenRefreshUrl};t=JSON.stringify(s)}return this.request("PUT",this.resourceUrl,t,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}}e.iPortalResource=Ie;
  189. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  190. * This program are made available under the terms of the Apache License, Version 2.0
  191. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  192. class Fe{constructor(e){e=e||{},this.ids=[],this.entities=[],this.resourceType="",V.extend(this,e)}}e.iPortalShareParam=Fe;e.iPortal=
  193. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  194. * This program are made available under the terms of the Apache License, Version 2.0
  195. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  196. class extends Oe{constructor(e,t){super(e,t),this.iportalUrl=e,t=t||{},this.withCredentials=t.withCredentials||!1}load(){return Ae.get(this.iportalUrl+"/web")}queryResources(e){if(!(e instanceof Ne))return new Promise(function(e){e("queryParams is not instanceof iPortalQueryParam !")});var t=this,s=this.iportalUrl+"/gateway/catalog/resource/search.json";return e.t=(new Date).getTime(),this.request("GET",s,e).then(function(e){var s=[];e.content.forEach(function(e){s.push(new Ie(t.iportalUrl,e))});let r=new Me;return r.content=s,r.total=e.total,r.currentPage=e.currentPage,r.pageSize=e.pageSize,r.aggregations=e.aggregations,r})}updateResourcesShareSetting(e){if(!(e instanceof Fe))return new Promise(function(e){e("shareParams is not instanceof iPortalShareParam !")});var t=e.resourceType.replace("_","").toLowerCase()+"s";"datas"===t&&(t="mycontent/"+t);var s={ids:e.ids,entities:e.entities},r=this.iportalUrl+"/web/"+t+"/sharesetting.json";return this.request("PUT",r,JSON.stringify(s)).then(function(e){return e})}};e.iPortalShareEntity=
  197. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  198. * This program are made available under the terms of the Apache License, Version 2.0
  199. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  200. class{constructor(e){e=e||{},this.permissionType="",this.entityType="",this.entityName="GUEST",this.entityId=null,V.extend(this,e)}};
  201. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  202. * This program are made available under the terms of the Apache License, Version 2.0
  203. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  204. class Re{constructor(e){e=e||{},this.rootUrl="",this.tags=[],this.entities=[],V.extend(this,e)}}e.iPortalAddResourceParam=Re;
  205. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  206. * This program are made available under the terms of the Apache License, Version 2.0
  207. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  208. class De{constructor(e){e=e||{},this.type="",this.tags=[],this.entities=[],this.metadata={},this.addedMapNames=[],this.addedSceneNames=[],V.extend(this,e)}}e.iPortalRegisterServiceParam=De;
  209. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  210. * This program are made available under the terms of the Apache License, Version 2.0
  211. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  212. class ke{constructor(e){e=e||{},this.fileName="",this.type="",this.tags=[],this.dataMetaInfo={},V.extend(this,e)}}e.iPortalAddDataParam=ke;
  213. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  214. * This program are made available under the terms of the Apache License, Version 2.0
  215. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  216. class Be{constructor(e){e=e||{},this.xField="",this.yField="",this.fileEncoding="UTF-8",this.xIndex=1,this.yIndex=1,this.fieldTypes=[],this.separator="",this.firstRowIsHead=!0,this.url="",this.dataStoreInfo={},V.extend(this,e)}}e.iPortalDataMetaInfoParam=Be;
  217. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  218. * This program are made available under the terms of the Apache License, Version 2.0
  219. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  220. class Ge{constructor(e){e=e||{},this.type="",this.url="",this.connectionInfo={},V.extend(this,e)}}e.iPortalDataStoreInfoParam=Ge;
  221. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  222. * This program are made available under the terms of the Apache License, Version 2.0
  223. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  224. class Ue{constructor(e){e=e||{},this.dataBase="",this.server="",V.extend(this,e)}}e.iPortalDataConnectionInfoParam=Ue;e.iPortalUser=
  225. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  226. * This program are made available under the terms of the Apache License, Version 2.0
  227. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  228. class extends Oe{constructor(e){super(e),this.iportalUrl=e}deleteResources(e){var t=e.resourceType.replace("_","").toLowerCase(),s=this.iportalUrl+"/web/"+t+"s.json?ids="+encodeURI(JSON.stringify(e.ids));return"data"===t?(s=this.iportalUrl+"/web/mycontent/datas/delete.json",this.request("POST",s,JSON.stringify(e.ids))):this.request("DELETE",s)}addMap(e){if(!(e instanceof Re))return this.getErrMsgPromise("addMapParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},s=this.iportalUrl+"/web/maps/batchaddmaps.json";return this.request("POST",s,JSON.stringify(t)).then(function(e){return e})}addScene(e){if(!(e instanceof Re))return this.getErrMsgPromise("addSceneParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},s=this.iportalUrl+"/web/scenes/batchaddscenes.json";return this.request("POST",s,JSON.stringify(t)).then(function(e){return e})}registerService(e){if(!(e instanceof De))return this.getErrMsgPromise("registerParams is not instanceof IPortalRegisterServiceParam !");let t={type:e.type,tags:e.tags,authorizeSetting:e.entities,metadata:e.metadata,addedMapNames:e.addedMapNames,addedSceneNames:e.addedSceneNames},s=this.iportalUrl+"/web/services.json";return this.request("POST",s,JSON.stringify(t)).then(e=>e)}getErrMsgPromise(e){return new Promise(t=>{t(e)})}uploadDataRequest(e,t){var s=this.iportalUrl+"/web/mycontent/datas/"+e+"/upload.json";return this.request("POST",s,t)}addData(e,t){if(!(e instanceof ke))return this.getErrMsgPromise("params is not instanceof iPortalAddDataParam !");var s,r=this.iportalUrl+"/web/mycontent/datas.json",i={fileName:e.fileName,tags:e.tags,type:e.type},a=e.type.toLowerCase();if("excel"===a||"csv"===a){if(!(e.dataMetaInfo instanceof Be))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");s={xField:e.dataMetaInfo.xField,yField:e.dataMetaInfo.yField},"csv"===a&&(s.fileEncoding=e.dataMetaInfo.fileEncoding),i.coordType="WGS84",i.dataMetaInfo=s}else if("hdfs"===a||"hbase"===a){if(!(e.dataMetaInfo instanceof Be))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");if(!(e.dataMetaInfo.dataStoreInfo instanceof Ge))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo is not instanceof iPortalDataStoreInfoParam !");var n={type:e.dataMetaInfo.dataStoreInfo.type};switch(a){case"hdfs":n.url=e.dataMetaInfo.dataStoreInfo.url,s={url:e.dataMetaInfo.url,dataStoreInfo:n};break;case"hbase":if(!(e.dataMetaInfo.dataStoreInfo.connectionInfo instanceof Ue))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo.connectionInfo is not instanceof iPortalDataConnectionInfoParam !");n.connectionInfo={dataBase:e.dataMetaInfo.dataStoreInfo.connectionInfo.dataBase,server:e.dataMetaInfo.dataStoreInfo.connectionInfo.server,engineType:"HBASE"},n.datastoreType="SPATIAL",s={dataStoreInfo:n}}i.dataMetaInfo=s}return this.request("POST",r,JSON.stringify(i)).then(e=>"hdfs"===a||"hbase"===a?e:e.childID?this.uploadDataRequest(e.childID,t):e.customResult)}publishOrUnpublish(e,t){if(!e.dataId||!e.serviceType)return this.getErrMsgPromise("option.dataID and option.serviceType are Required!");var s=e.dataId,r=e.dataServiceId,i=e.serviceType,a=this.iportalUrl+"/web/mycontent/datas/"+s+"/publishstatus.json?serviceType="+i;return r&&(a+="&dataServiceId="+r),this.request("PUT",a,JSON.stringify(t)).then(e=>t?(r||(r=e.customResult),r):e)}getDataPublishedStatus(e,t){var s=this.iportalUrl+"/web/mycontent/datas/"+e+"/publishstatus.json?dataServiceId="+t+"&forPublish=true";return this.request("GET",s)}unPublishDataService(e){return this.publishOrUnpublish(e,!1)}publishDataService(e){return this.publishOrUnpublish(e,!0)}};
  229. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  230. * This program are made available under the terms of the Apache License, Version 2.0
  231. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  232. class He{constructor(e,t){let s=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,V.isArray(e)?(s.urls=e,s.length=e.length,s.totalTimes=s.length,1===s.length?s.url=e[0]:(s.index=parseInt(Math.random()*s.length),s.url=e[s.index])):(s.totalTimes=1,s.url=e),V.isArray(e)&&!s.isServiceSupportPolling()&&(s.url=e[0],s.totalTimes=1),s.serverType=s.serverType||r.ISERVER,t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,V.extend(this,t),s.isInTheSameDomain=V.isInTheSameDomain(s.url),s.events=new he(s,null,s.EVENT_TYPES,!0),s.eventListeners instanceof Object&&s.events.on(s.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){let e=this;V.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 s=this.getCredential(e.url);s&&(e.url=V.urlAppend(e.url,s.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,s,i=e;switch(this.serverType){case r.IPORTAL:(t=(s=we.getToken(i))?new oe(s,"token"):null)||(t=(s=we.getKey(i))?new oe(s,"key"):null);break;case r.ONLINE:t=(s=we.getKey(i))?new oe(s,"key"):null;break;default:t=(s=we.getToken(i))?new oe(s,"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,s=/^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(s,s.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=V.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=V.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){let t=(e=V.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){"POST"!==e.method&&"PUT"!==e.method||(e.params&&(e.url=V.urlAppend(e.url,V.getParameterString(e.params||{}))),e.params=e.data),Ae.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 s=t;("string"==typeof t&&(s=(new de).read(t)),(!s||s.error||s.code>=300&&304!==s.code)&&(s=s&&s.error?{error:s.error}:{error:s}),s.error)?(e.scope?W.bind(e.failure,e.scope):e.failure)(s):(s.succeed=void 0==s.succeed||s.succeed,(e.scope?W.bind(e.success,e.scope):e.success)(s))}).catch(function(t){(e.scope?W.bind(e.failure,e.scope):e.failure)(t)})}}e.CommonServiceBase=He;
  233. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  234. * This program are made available under the terms of the Apache License, Version 2.0
  235. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  236. class je{constructor(e){e.filters&&"string"==typeof e.filters&&(e.filters=e.filters.split(",")),this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,V.extend(this,e)}destroy(){this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null}}e.GeoCodingParameter=je;
  237. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  238. * This program are made available under the terms of the Apache License, Version 2.0
  239. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  240. class Je{constructor(e){e.filters&&(e.filters=e.filters.split(",")),this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null,V.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}}e.GeoDecodingParameter=Je;
  241. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  242. * This program are made available under the terms of the Apache License, Version 2.0
  243. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  244. class ze extends He{constructor(e,t){super(e,t),this.options=t||{},this.CLASS_NAME="SuperMap.AddressMatchService"}destroy(){super.destroy()}code(e,t){t instanceof je&&this.processAsync(e,t)}decode(e,t){t instanceof Je&&this.processAsync(e,t)}processAsync(e,t){this.request({method:"GET",url:e,params:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}serviceProcessCompleted(e){e.succeed&&delete e.succeed,super.serviceProcessCompleted(e)}serviceProcessFailed(e){super.serviceProcessFailed(e)}}e.AddressMatchService=ze;
  245. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  246. * This program are made available under the terms of the Apache License, Version 2.0
  247. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  248. class We{constructor(e){this.name=null,this.queryType=null,this.CLASS_NAME="SuperMap.AggQueryBuilderParameter",V.extend(this,e)}destroy(){this.name=null,this.queryType=null}}e.AggQueryBuilderParameter=We;
  249. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  250. * This program are made available under the terms of the Apache License, Version 2.0
  251. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  252. class Ve{constructor(e){this.aggName=null,this.aggType=null,this.aggFieldName=null,this.subAgg=null,this.CLASS_NAME="SuperMap.AggregationParameter",V.extend(this,e)}destroy(){var e=this;e.aggName=null,e.aggFieldName=null,e.aggType=null,e.subAgg&&(e.subAgg=null)}}e.AggregationParameter=Ve;
  253. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  254. * This program are made available under the terms of the Apache License, Version 2.0
  255. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  256. class qe{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,V.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 s={};for(var r in e){if("dataset"!==r)"latitude"===r||"timeMode"===r||"dayStart"===r||("dayEnd"===r||"hourStart"===r||"hourEnd"===r)||("transmittance"===r||"hourInterval"===r||"dayInterval"===r)?s[r]=e[r]:t[r]=e[r]}t.parameter=s}}e.AreaSolarRadiationParameters=qe;
  257. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  258. * This program are made available under the terms of the Apache License, Version 2.0
  259. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  260. class Ye extends He{constructor(e,s){super(e,s),this.format=t.GEOJSON,this.CLASS_NAME="SuperMap.SpatialAnalystBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var s,r=this;if((e=V.transformResult(e))&&r.format===t.GEOJSON&&"function"==typeof r.toGeoJSONResult)if(V.isArray(e)){for(var i=0;i<e.length;i++)e[i]=r.toGeoJSONResult(e[i]);s=e}else s=r.toGeoJSONResult(e);s||(s=e),r.events.triggerEvent("processCompleted",{result:s})}toGeoJSONResult(e){if(!e)return null;e.result&&e.result.resultGeometry&&(e=e.result);var t=new Se;if(e.recordsets)for(var s=0,r=e.recordsets,i=r.length;s<i;s++)r[s].features&&(r[s].features=t.toGeoJSON(r[s].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}}e.SpatialAnalystBase=Ye;
  261. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  262. * This program are made available under the terms of the Apache License, Version 2.0
  263. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  264. class Xe extends Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.AreaSolarRadiationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof qe){var t=this,s={};e instanceof qe&&(t.url=V.urlPathAppend(t.url,`datasets/${e.dataset}/solarradiation`)),t.url=V.urlAppend(t.url,"returnContent=true"),qe.toObject(e,s);var r=V.toJSON(s);t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}e.AreaSolarRadiationService=Xe;
  265. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  266. * This program are made available under the terms of the Apache License, Version 2.0
  267. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  268. class Qe{constructor(e){this.exp=null,this.value=100,V.extend(this,e),this.CLASS_NAME="SuperMap.BufferDistance"}destroy(){this.exp=null,this.value=null}}e.BufferDistance=Qe;
  269. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  270. * This program are made available under the terms of the Apache License, Version 2.0
  271. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  272. class Ke{constructor(e){this.endType=b.FLAT,this.leftDistance=new Qe,this.rightDistance=new Qe,this.semicircleLineSegment=4,this.radiusUnit=h.METER,e&&V.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}}e.BufferSetting=Ke;
  273. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  274. * This program are made available under the terms of the Apache License, Version 2.0
  275. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  276. class Ze{constructor(e){this.bufferSetting=new Ke,V.extend(this,e),this.CLASS_NAME="SuperMap.BufferAnalystParameters"}destroy(){this.bufferSetting&&(this.bufferSetting.destroy(),this.bufferSetting=null)}}e.BufferAnalystParameters=Ze;
  277. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  278. * This program are made available under the terms of the Apache License, Version 2.0
  279. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  280. class $e{constructor(e){this.expectCount=1e3,this.dataset=null,this.dataReturnMode=E.RECORDSET_ONLY,this.deleteExistResultDataset=!0,V.extend(this,e),this.CLASS_NAME="SuperMap.DataReturnOption"}destroy(){this.expectCount=null,this.dataset=null,this.dataReturnMode=null,this.deleteExistResultDataset=null}}e.DataReturnOption=$e;
  281. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  282. * This program are made available under the terms of the Apache License, Version 2.0
  283. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  284. class et{constructor(e){this.foreignTableName=null,this.joinFilter=null,this.joinType=null,e&&V.extend(this,e),this.CLASS_NAME="SuperMap.JoinItem"}destroy(){this.foreignTableName=null,this.joinFilter=null,this.joinType=null}toServerJSONObject(){var e={};return e=V.copyAttributes(e,this)}}e.JoinItem=et;
  285. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  286. * This program are made available under the terms of the Apache License, Version 2.0
  287. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  288. class tt{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&&V.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}}e.DatasourceConnectionInfo=tt;e.LinkItem=
  289. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  290. * This program are made available under the terms of the Apache License, Version 2.0
  291. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  292. class{constructor(e){this.datasourceConnectionInfo=null,this.foreignKeys=null,this.foreignTable=null,this.linkFields=null,this.linkFilter=null,this.name=null,this.primaryKeys=null,e&&V.extend(this,e),this.CLASS_NAME="SuperMap.LinkItem"}destroy(){var e=this;e.datasourceConnectionInfo instanceof tt&&(e.datasourceConnectionInfo.destroy(),e.datasourceConnectionInfo=null),e.foreignKeys=null,e.foreignTable=null,e.linkFields=null,e.linkFilter=null,e.name=null,e.primaryKeys=null}};
  293. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  294. * This program are made available under the terms of the Apache License, Version 2.0
  295. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  296. class st{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&&V.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,s=e.joinItems,r=s.length;t<r;t++)s[t].destroy();e.joinItems=null}if(e.linkItems){for(let t=0,s=e.linkItems,r=s.length;t<r;t++)s[t].destroy();e.linkItems=null}e.ids=null,e.orderBy=null,e.groupBy=null,e.fields=null}}e.FilterParameter=st;
  297. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  298. * This program are made available under the terms of the Apache License, Version 2.0
  299. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  300. class rt extends Ze{constructor(e){super(e),this.dataset=null,this.filterQueryParameter=new st,this.resultSetting=new $e,this.isAttributeRetained=!0,this.isUnion=!1,V.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 s in e)if("bufferSetting"===s)e.bufferSetting.radiusUnit=e.bufferSetting.radiusUnit.toUpperCase(),t.bufferAnalystParameter=e.bufferSetting;else if("resultSetting"===s)t.dataReturnOption=e.resultSetting;else{if("dataset"===s)continue;t[s]=e[s]}}}e.DatasetBufferAnalystParameters=rt;
  301. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  302. * This program are made available under the terms of the Apache License, Version 2.0
  303. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  304. class it extends Ze{constructor(e){super(e),this.sourceGeometry=null,this.sourceGeometrySRID=null,e&&V.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 s in e)if("bufferSetting"===s){var r={};for(var i in e.bufferSetting)r[i]=e.bufferSetting[i];t.analystParameter=r}else"sourceGeometry"===s?t.sourceGeometry=ve.fromGeometry(e.sourceGeometry):t[s]=e[s]}}e.GeometryBufferAnalystParameters=it;
  305. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  306. * This program are made available under the terms of the Apache License, Version 2.0
  307. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  308. class at extends Ye{constructor(e,t){super(e,t),this.mode=null,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.BufferAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof rt?(s.mode="datasets",s.url=V.urlPathAppend(s.url,"datasets/"+e.dataset+"/buffer"),rt.toObject(e,t)):e instanceof it&&(s.mode="geometry",s.url=V.urlPathAppend(s.url,"geometry/buffer"),it.toObject(e,t));var r=V.toJSON(t);s.url=V.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}e.BufferAnalystService=at;
  309. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  310. * This program are made available under the terms of the Apache License, Version 2.0
  311. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  312. class nt{constructor(e){this.type=C.UDB,this.datasetName="analystResult",this.datasourceInfo=null,this.outputPath="",V.extend(this,e),this.CLASS_NAME="SuperMap.OutputSetting"}destroy(){var e=this;e.type=null,e.datasetName=null,e.outputPath=null,e.datasourceInfo instanceof tt&&(e.datasourceInfo.destroy(),e.datasourceInfo=null)}}e.OutputSetting=nt;
  313. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  314. * This program are made available under the terms of the Apache License, Version 2.0
  315. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  316. class ot{constructor(e){this.items=null,this.numericPrecision=1,this.rangeMode=m.EQUALINTERVAL,this.rangeCount="",this.colorGradientType=y.YELLOW_RED,V.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}}e.MappingParameters=ot;
  317. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  318. * This program are made available under the terms of the Apache License, Version 2.0
  319. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  320. class lt{constructor(e){if(this.datasetName="",this.bounds="",this.distance="",this.distanceField="",this.distanceUnit=F.METER,this.dissolveField="",this.output=null,this.mappingParameters=null,!e)return this;V.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 nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},"bounds"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.BuffersAnalystJobsParameter=lt;
  321. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  322. * This program are made available under the terms of the Apache License, Version 2.0
  323. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  324. class ht extends He{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;Ae.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,s,r){var i=this,a=null;t&&t instanceof s&&(a=new Object,s.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};Ae.post(i._processUrl(e),JSON.stringify(a),o).then(function(e){return e.json()}).then(function(e){e.succeed?i.serviceProcessCompleted(e,r):i.serviceProcessFailed(e)}).catch(function(e){i.serviceProcessFailed({error:e})})}serviceProcessCompleted(e,t){e=V.transformResult(e),t=t||1e3;var s=this;if(e)var r=setInterval(function(){Ae.get(s._processUrl(e.newResourceLocation),{_t:(new Date).getTime()}).then(function(e){return e.json()}).then(function(e){s.events.triggerEvent("processRunning",{id:e.id,state:e.state}),"LOST"!==e.state.runState&&"KILLED"!==e.state.runState&&"FAILED"!==e.state.runState||(clearInterval(r),s.events.triggerEvent("processFailed",{error:e.state.errorMsg,state:e.state.runState})),"FINISHED"===e.state.runState&&e.setting.serviceInfo&&(clearInterval(r),s.events.triggerEvent("processCompleted",{result:e}))}).catch(function(e){clearInterval(r),s.events.triggerEvent("processFailed",{error:e})})},t)}serviceProcessFailed(e){super.serviceProcessFailed(e)}_processUrl(e){return we.getToken(e)&&(e=V.urlAppend(e,"token="+we.getToken(e))),e}}e.ProcessingServiceBase=ht;
  325. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  326. * This program are made available under the terms of the Apache License, Version 2.0
  327. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  328. class ut extends ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/buffers"),this.CLASS_NAME="SuperMap.BuffersAnalystJobsService"}destroy(){super.destroy()}getBuffersJobs(){super.getJobs(this.url)}getBuffersJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addBuffersJob(e,t){super.addJob(this.url,e,lt,t)}}e.BuffersAnalystJobsService=ut;
  329. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  330. * This program are made available under the terms of the Apache License, Version 2.0
  331. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  332. class ct{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,V.extend(this,e),this.CLASS_NAME="SuperMap.BurstPipelineAnalystParameters"}destroy(){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=null}}e.BurstPipelineAnalystParameters=ct;
  333. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  334. * This program are made available under the terms of the Apache License, Version 2.0
  335. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  336. class pt extends He{constructor(e,s){super(e,s),this.format=t.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var s;(e=V.transformResult(e))&&this.format===t.GEOJSON&&"function"==typeof this.toGeoJSONResult&&(s=this.toGeoJSONResult(e)),s||(s=e),this.events.triggerEvent("processCompleted",{result:s})}toGeoJSONResult(e){return null}}e.NetworkAnalystServiceBase=pt;
  337. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  338. * This program are made available under the terms of the Apache License, Version 2.0
  339. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  340. class dt extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof ct))return null;var t,s=this;if(s.url=V.urlPathAppend(s.url,"burstAnalyse"),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,s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}e.BurstPipelineAnalystService=dt;
  341. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  342. * This program are made available under the terms of the Apache License, Version 2.0
  343. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  344. class mt extends He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ChartFeatureInfoSpecsService"}destroy(){super.destroy(),V.reset(this)}processAsync(){var e=this;e.isTempLayers||V.urlPathAppend(e.url,"chartFeatureInfoSpecs"),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}e.ChartFeatureInfoSpecsService=mt;
  345. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  346. * This program are made available under the terms of the Apache License, Version 2.0
  347. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  348. class yt{constructor(e){this.isQueryPoint=null,this.isQueryLine=null,this.isQueryRegion=null,this.attributeFilter=null,this.chartFeatureInfoSpecCode=null,V.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)+"}"}}e.ChartQueryFilterParameter=yt;
  349. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  350. * This program are made available under the terms of the Apache License, Version 2.0
  351. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  352. class ft{constructor(e){this.queryMode=null,this.bounds=null,this.chartLayerNames=null,this.chartQueryFilterParameters=null,this.returnContent=!0,this.startRecord=0,this.expectCount=null,V.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=[],s=this.chartLayerNames.length,r=0;r<s;r++)t.push('"'+this.chartLayerNames[r]+'"');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 yt&&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+"}"}}e.ChartQueryParameters=ft;
  353. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  354. * This program are made available under the terms of the Apache License, Version 2.0
  355. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  356. class gt{constructor(e){e&&(this.customParams=null,this.prjCoordSys=null,this.expectCount=1e5,this.networkType=i.LINE,this.queryOption=a.ATTRIBUTEANDGEOMETRY,this.queryParams=null,this.startRecord=0,this.holdTime=10,this.returnCustomResult=!1,this.returnFeatureWithFieldCaption=!1,V.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,s=e.queryParams,r=s.length;t<r;t++)s[t].destroy();e.queryParams=null}e.startRecord=null,e.holdTime=null,e.returnCustomResult=null,e.prjCoordSys=null}}e.QueryParameters=gt;
  357. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  358. * This program are made available under the terms of the Apache License, Version 2.0
  359. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  360. class vt extends He{constructor(e,s){super(e,s),s=s||{},this.returnContent=null,this.format=t.GEOJSON,V.extend(this,s);s.format&&(this.format=s.format.toUpperCase()),this.url&&(this.url=V.urlPathAppend(this.url,"queryResults"),this.CLASS_NAME="SuperMap.ChartQueryService")}destroy(){He.prototype.destroy.apply(this,arguments),this.returnContent=null,this.format=null}processAsync(e){if(e instanceof ft){var t,s=this;s.returnContent=e.returnContent,t=e.getVariablesJson(),s.returnContent&&(s.url=V.urlAppend(s.url,"returnContent=true")),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){if((e=V.transformResult(e))&&e.recordsets&&this.format===t.GEOJSON)for(var s=0,r=e.recordsets,i=r.length;s<i;s++)if(r[s].features){var a=new Se;r[s].features=a.toGeoJSON(r[s].features)}this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new gt({queryMode:e.queryMode,bounds:e.bounds,chartLayerNames:e.chartLayerNames,chartQueryFilterParameters:e.chartQueryFilterParameters,returnContent:e.returnContent})}}e.ChartQueryService=vt;e.ClipParameter=
  361. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  362. * This program are made available under the terms of the Apache License, Version 2.0
  363. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  364. class{constructor(e){this.clipDatasetName=null,this.clipDatasourceName=null,this.clipRegion=null,this.isClipInRegion=!0,this.isExactClip=null,e&&V.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 V.toJSON({isClipInRegion:this.isClipInRegion,clipDatasetName:this.clipDatasetName,clipDatasourceName:this.clipDatasourceName,isExactClip:this.isExactClip,clipRegion:ve.fromGeometry(this.clipRegion)})}};
  365. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  366. * This program are made available under the terms of the Apache License, Version 2.0
  367. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  368. class St{constructor(e){e=e||{},this.elevation=null,this.color=null,V.extend(this,e);var t=this.color;t&&(this.color=new me(t.red,t.green,t.blue)),this.CLASS_NAME="SuperMap.ColorDictionary"}destroy(){V.reset(this)}toServerJSONObject(){var e={};return e=V.copyAttributes(e,this)}}e.ColorDictionary=St;
  369. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  370. * This program are made available under the terms of the Apache License, Version 2.0
  371. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  372. class bt{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,V.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}}e.TransportationAnalystResultSetting=bt;
  373. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  374. * This program are made available under the terms of the Apache License, Version 2.0
  375. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  376. class xt{constructor(e){e&&(this.barrierEdgeIDs=null,this.barrierNodeIDs=null,this.barrierPoints=null,this.weightFieldName=null,this.turnWeightField=null,this.resultSetting=new bt,V.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}}e.TransportationAnalystParameter=xt;
  377. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  378. * This program are made available under the terms of the Apache License, Version 2.0
  379. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  380. class Ct{constructor(e){this.isAnalyzeById=!1,this.nodes=null,this.parameter=new xt,V.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)}}e.ComputeWeightMatrixParameters=Ct;
  381. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  382. * This program are made available under the terms of the Apache License, Version 2.0
  383. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  384. class _t extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ComputeWeightMatrixService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ct){var t,s=this;s.url=V.urlPathAppend(s.url,"weightmatrix"),t={parameter:V.toJSON(e.parameter),nodes:s.getJson(e.isAnalyzeById,e.nodes)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}}e.ComputeWeightMatrixService=_t;
  385. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  386. * This program are made available under the terms of the Apache License, Version 2.0
  387. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  388. class Tt extends He{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,V.extend(this,t),this.CLASS_NAME="SuperMap.DataFlowService"}initBroadcast(){var e=this;return this.broadcastWebSocket=this._connect(V.urlPathAppend(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(V.urlPathAppend(e.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(){He.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 V.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 s=JSON.parse(e.data);e.featureResult=s,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=we.getToken(e);return t&&(e=V.urlAppend(e,"token="+t)),e}}e.DataFlowService=Tt;
  389. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  390. * This program are made available under the terms of the Apache License, Version 2.0
  391. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  392. class Et{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,V.extend(this,e);var t=this.bounds;t&&(this.bounds=new Y(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y)),this.CLASS_NAME="SuperMap.DatasetInfo"}destroy(){V.reset(this)}toServerJSONObject(){var e={};return(e=V.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}e.DatasetInfo=Et;
  393. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  394. * This program are made available under the terms of the Apache License, Version 2.0
  395. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  396. class At{constructor(e){this.operation=x.UNION,e&&V.extend(this,e),this.CLASS_NAME="SuperMap.OverlayAnalystParameters"}destroy(){this.operation=null}}e.OverlayAnalystParameters=At;
  397. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  398. * This program are made available under the terms of the Apache License, Version 2.0
  399. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  400. class wt extends At{constructor(e){super(e),this.operateDataset=null,this.operateDatasetFields=[],this.operateDatasetFilter=new st,this.operateRegions=[],this.sourceDataset=null,this.sourceDatasetFields=[],this.sourceDatasetFilter=new st,this.tolerance=0,this.resultSetting=new $e,V.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,s=e.operateRegions,r=s.length;t<r;t++)s[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 s in e)if("sourceDataset"!==s)if("operateRegions"===s){t.operateRegions=[];var r=e.operateRegions;for(var i in r)r.hasOwnProperty(i)&&(t.operateRegions[i]=ve.fromGeometry(r[i]))}else"resultSetting"===s?t.dataReturnOption=e.resultSetting:t[s]=e[s]}}e.DatasetOverlayAnalystParameters=wt;
  401. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  402. * This program are made available under the terms of the Apache License, Version 2.0
  403. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  404. class Lt{constructor(e){this.clipRegion=null,this.datumValue=0,this.expectedZValues=null,this.interval=0,this.resampleTolerance=0,this.smoothMethod=_.BSPLINE,this.smoothness=0,e&&V.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':"+V.toJSON(this.datumValue);if(e+=",'interval':"+V.toJSON(this.interval),e+=",'resampleTolerance':"+V.toJSON(this.resampleTolerance),e+=",'smoothMethod':"+V.toJSON(this.smoothMethod),e+=",'smoothness':"+V.toJSON(this.smoothness),null!=this.expectedZValues&&(e+=",'expectedZValues':"+V.toJSON(this.expectedZValues)),null!=this.clipRegion){var t=this.clipRegion;this.clipRegion instanceof X&&this.clipRegion.components&&(t=ve.fromGeometry(this.clipRegion)),e+=",'clipRegion':"+V.toJSON(t)}return"{"+e+"}"}}e.SurfaceAnalystParametersSetting=Lt;
  405. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  406. * This program are made available under the terms of the Apache License, Version 2.0
  407. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  408. class Pt{constructor(e){this.resolution=0,this.extractParameter=new Lt,this.resultSetting=new $e,this.surfaceAnalystMethod=T.ISOLINE,e&&V.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}}e.SurfaceAnalystParameters=Pt;
  409. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  410. * This program are made available under the terms of the Apache License, Version 2.0
  411. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  412. class Ot extends Pt{constructor(e){super(e),this.dataset=null,this.filterQueryParameter=new st,this.zValueFieldName=null,e&&V.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 s in e)if("filterQueryParameter"===s&&(t.filterQueryParameter=e.filterQueryParameter),"extractParameter"===s)e.extractParameter.clipRegion instanceof X&&e.extractParameter.clipRegion.components&&(e.extractParameter.clipRegion=ve.fromGeometry(e.extractParameter.clipRegion)),t.extractParameter=e.extractParameter;else{if("dataset"===s)continue;if("surfaceAnalystMethod"===s)continue;t[s]=e[s]}}}e.DatasetSurfaceAnalystParameters=Ot;
  413. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  414. * This program are made available under the terms of the Apache License, Version 2.0
  415. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  416. class Nt{constructor(e){e&&(this.clipRegion=null,this.createResultDataset=!1,this.resultDatasetName=null,this.resultDatasourceName=null,this.returnResultRegion=!0,V.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}}e.ThiessenAnalystParameters=Nt;
  417. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  418. * This program are made available under the terms of the Apache License, Version 2.0
  419. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  420. class Mt extends Nt{constructor(e){super(e),this.filterQueryParameter=null,this.dataset=null,e&&V.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 s in e)"clipRegion"===s?t.clipRegion=ve.fromGeometry(e.clipRegion):t[s]=e[s]}}e.DatasetThiessenAnalystParameters=Mt;
  421. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  422. * This program are made available under the terms of the Apache License, Version 2.0
  423. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  424. class It{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,V.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 s in e)"dataset"!==s&&(t[s]=e[s])}}e.DensityKernelAnalystParameters=It;
  425. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  426. * This program are made available under the terms of the Apache License, Version 2.0
  427. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  428. class Ft extends Ye{constructor(e,t){super(e,t),this.mode=null,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.DensityAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t=this,s=new Object;e instanceof It&&(t.url=V.urlPathAppend(t.url,"datasets/"+e.dataset+"/densityanalyst/kernel"),t.mode="kernel"),It.toObject(e,s);var r=V.toJSON(s);t.url=V.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}e.DensityAnalystService=Ft;
  429. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  430. * This program are made available under the terms of the Apache License, Version 2.0
  431. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  432. class Rt{constructor(e){this.dataSourceName=null,this.dataSetName=null,this.features=null,this.editType=A.ADD,this.IDs=null,this.returnContent=!1,this.isUseBatch=!1,V.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,s,r;if(e.editType===A.DELETE){if(null===e.IDs)return;r={ids:e.IDs}}else if(r=[],e.features){s=e.features.length;for(var i=0;i<s;i++)(t=e.features[i]).geometry=ve.fromGeometry(t.geometry),r.push(t)}return V.toJSON(r)}}e.EditFeaturesParameters=Rt;
  433. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  434. * This program are made available under the terms of the Apache License, Version 2.0
  435. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  436. class Dt extends He{constructor(e,t){super(e,t),this.returnContent=!1,this.isUseBatch=!1,t&&V.extend(this,t),this.url=V.urlPathAppend(this.url,"features"),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 Rt){var t=this,s="POST",r="",i=e.editType,a=null;t.returnContent=e.returnContent,t.isUseBatch=e.isUseBatch,a=Rt.toJsonParameters(e),i===A.DELETE?(r=V.toJSON(e.IDs),t.url=V.urlAppend(t.url,"ids="+r),s="DELETE",a=r):i===A.UPDATE?s="PUT":(t.isUseBatch&&(t.url=V.urlAppend(t.url,`isUseBatch=${t.isUseBatch}`),t.returnContent=!1),t.returnContent&&(t.url=V.urlAppend(t.url,"returnContent=true"),s="POST")),t.request({method:s,data:a,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}e.EditFeaturesService=Dt;
  437. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  438. * This program are made available under the terms of the Apache License, Version 2.0
  439. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  440. class kt{constructor(e){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=!1,V.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalyst3DParameters"}destroy(){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=null}}e.FacilityAnalyst3DParameters=kt;
  441. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  442. * This program are made available under the terms of the Apache License, Version 2.0
  443. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  444. class Bt extends kt{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystSinks3DParameters"}destroy(){super.destroy()}}e.FacilityAnalystSinks3DParameters=Bt;
  445. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  446. * This program are made available under the terms of the Apache License, Version 2.0
  447. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  448. class Gt extends He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystSinks3DService"}destroy(){He.prototype.destroy.apply(this,arguments)}processAsync(e){if(e instanceof Bt){var t,s=this;s.url=V.urlPathAppend(s.url,"sinks"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.FacilityAnalystSinks3DService=Gt;
  449. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  450. * This program are made available under the terms of the Apache License, Version 2.0
  451. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  452. class Ut extends kt{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystSources3DParameters"}destroy(){super.destroy()}}e.FacilityAnalystSources3DParameters=Ut;
  453. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  454. * This program are made available under the terms of the Apache License, Version 2.0
  455. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  456. class Ht extends He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystSources3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ut){var t,s=this;s.url=V.urlPathAppend(s.url,"sources"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.FacilityAnalystSources3DService=Ht;
  457. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  458. * This program are made available under the terms of the Apache License, Version 2.0
  459. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  460. class jt{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,this.queryType=null,V.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}}e.FacilityAnalystStreamParameters=jt;
  461. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  462. * This program are made available under the terms of the Apache License, Version 2.0
  463. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  464. class Jt extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystStreamService"}destroy(){super.destroy()}processAsync(e){if(e instanceof jt){var t,s=this;if(0===e.queryType)s.url=V.urlPathAppend(s.url,"upstreamcirticalfaclilities");else{if(1!==e.queryType)return;s.url=V.urlPathAppend(s.url,"downstreamcirticalfaclilities")}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,s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed}))}}}e.FacilityAnalystStreamService=Jt;
  465. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  466. * This program are made available under the terms of the Apache License, Version 2.0
  467. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  468. class zt extends kt{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DParameters"}destroy(){super.destroy()}}e.FacilityAnalystTracedown3DParameters=zt;
  469. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  470. * This program are made available under the terms of the Apache License, Version 2.0
  471. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  472. class Wt extends He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof zt){var t,s=this;s.url=V.urlPathAppend(s.url,"tracedownresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.FacilityAnalystTracedown3DService=Wt;
  473. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  474. * This program are made available under the terms of the Apache License, Version 2.0
  475. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  476. class Vt extends kt{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DParameters"}destroy(){super.destroy()}}e.FacilityAnalystTraceup3DParameters=Vt;
  477. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  478. * This program are made available under the terms of the Apache License, Version 2.0
  479. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  480. class qt extends He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Vt){var t,s=this;s.url=V.urlPathAppend(s.url,"traceupresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.FacilityAnalystTraceup3DService=qt;
  481. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  482. * This program are made available under the terms of the Apache License, Version 2.0
  483. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  484. class Yt extends kt{constructor(e){super(e),e=e||{},this.sourceNodeIDs=null,V.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystUpstream3DParameters"}destroy(){super.destroy(),this.sourceNodeIDs=null}}e.FacilityAnalystUpstream3DParameters=Yt;
  485. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  486. * This program are made available under the terms of the Apache License, Version 2.0
  487. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  488. class Xt extends He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystUpstream3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Yt){var t,s=this;s.url=V.urlPathAppend(s.url,"upstreamcirticalfaclilities"),t={sourceNodeIDs:e.sourceNodeIDs,edgeID:e.edgeID,nodeID:e.nodeID,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.FacilityAnalystUpstream3DService=Xt;e.FilterAggParameter=
  489. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  490. * This program are made available under the terms of the Apache License, Version 2.0
  491. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  492. class extends Ve{constructor(e){super(e),this.filterParam=null,this.aggType=B.FILTER,this.CLASS_NAME="SuperMap.FilterAggParameter",V.extend(this,e)}destroy(){super.destroy(),this.filterParam&&(this.filterParam=null)}};
  493. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  494. * This program are made available under the terms of the Apache License, Version 2.0
  495. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  496. class Qt{constructor(e){this.datasource=null,this.dataset=null,e&&V.extend(this,e),this.CLASS_NAME="SuperMap.FieldParameters"}destroy(){this.datasource=null,this.dataset=null}}e.FieldParameters=Qt;e.FieldStatisticsParameters=
  497. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  498. * This program are made available under the terms of the Apache License, Version 2.0
  499. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  500. class extends Qt{constructor(e){super(e),this.fieldName=null,this.statisticMode=null,e&&V.extend(this,e),this.CLASS_NAME="SuperMap.FieldStatisticsParameters"}destroy(){this.fieldName=null,this.statisticMode=null}};
  501. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  502. * This program are made available under the terms of the Apache License, Version 2.0
  503. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  504. class Kt extends He{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,this.field=null,this.statisticMode=null,t&&V.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="datasources/"+e.datasource+"/datasets/"+e.dataset+"/fields/"+e.field+"/"+e.statisticMode;e.url=V.urlPathAppend(e.url,t),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}e.FieldStatisticService=Kt;
  505. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  506. * This program are made available under the terms of the Apache License, Version 2.0
  507. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  508. class Zt{constructor(e){this.event=null,this.expectFacilityCount=1,this.facilities=null,this.fromEvent=!1,this.isAnalyzeById=!1,this.maxWeight=0,this.parameter=new xt,V.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)}}e.FindClosestFacilitiesParameters=Zt;
  509. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  510. * This program are made available under the terms of the Apache License, Version 2.0
  511. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  512. class $t extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindClosestFacilitiesService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Zt){var t,s=this;s.url=V.urlPathAppend(s.url,"closestfacility"),t={expectFacilityCount:e.expectFacilityCount,fromEvent:e.fromEvent,maxWeight:e.maxWeight,parameter:V.toJSON(e.parameter),event:V.toJSON(e.event),facilities:s.getJson(e.isAnalyzeById,e.facilities)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new Se;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}}e.FindClosestFacilitiesService=$t;
  513. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  514. * This program are made available under the terms of the Apache License, Version 2.0
  515. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  516. class es{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,V.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,s=e.supplyCenters,r=s.length;t<r;t++)s[t].destroy();e.supplyCenters=null}}}e.FindLocationParameters=es;
  517. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  518. * This program are made available under the terms of the Apache License, Version 2.0
  519. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  520. class ts extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindLocationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof es){var t,s=this;s.url=V.urlPathAppend(s.url,"location"),t={isFromCenter:e.isFromCenter,expectedSupplyCenterCount:e.expectedSupplyCenterCount,weightName:e.weightName,turnWeightField:e.turnWeightField,returnEdgeFeature:!0,returnEdgeGeometry:!0,returnNodeFeature:!0,mapParameter:V.toJSON(e.mapParameter),supplyCenters:s.getCentersJson(e.supplyCenters)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getCentersJson(e){for(var t="[",s=e?e.length:0,r=0;r<s;r++)r>0&&(t+=","),t+=V.toJSON(e[r]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new Se;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}e.FindLocationService=ts;
  521. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  522. * This program are made available under the terms of the Apache License, Version 2.0
  523. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  524. class ss{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new xt,V.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)}}e.FindMTSPPathsParameters=ss;
  525. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  526. * This program are made available under the terms of the Apache License, Version 2.0
  527. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  528. class rs extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ss){var t,s=this,r=s.getJson(e.isAnalyzeById,e.centers),i=s.getJson(e.isAnalyzeById,e.nodes);s.url=V.urlPathAppend(s.url,"mtsppath"),t={centers:r,nodes:i,parameter:V.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new Se;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}}e.FindMTSPPathsService=rs;
  529. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  530. * This program are made available under the terms of the Apache License, Version 2.0
  531. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  532. class is{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new xt,V.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)}}e.FindPathParameters=is;
  533. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  534. * This program are made available under the terms of the Apache License, Version 2.0
  535. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  536. class as extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof is){var t,s=this;s.url=V.urlPathAppend(s.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:V.toJSON(e.parameter),nodes:s.getJson(e.isAnalyzeById,e.nodes)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new Se;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}}e.FindPathService=as;
  537. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  538. * This program are made available under the terms of the Apache License, Version 2.0
  539. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  540. class ns{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new xt,V.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)}}e.FindServiceAreasParameters=ns;
  541. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  542. * This program are made available under the terms of the Apache License, Version 2.0
  543. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  544. class os extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ns){var t,s=this;s.url=V.urlPathAppend(s.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:V.toJSON(e.parameter),centers:s.getJson(e.isAnalyzeById,e.centers),weights:s.getJson(!0,e.weights)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new Se;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}}e.FindServiceAreasService=os;
  545. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  546. * This program are made available under the terms of the Apache License, Version 2.0
  547. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  548. class ls{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new xt,V.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)}}e.FindTSPPathsParameters=ls;
  549. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  550. * This program are made available under the terms of the Apache License, Version 2.0
  551. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  552. class hs extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(t){if(t instanceof ls){var s,r=this;r.url=V.urlPathAppend(r.url,"tsppath"),s={parameter:e.Util.toJSON(t.parameter),endNodeAssigned:t.endNodeAssigned,nodes:r.getNodesJson(t)},r.request({method:"GET",params:s,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getNodesJson(e){var t,s,r,i,a="";if(!1===e.isAnalyzeById){for(t="[",s=0,r=(i=e.nodes).length;s<r;s++)s>0&&(t+=","),t+='{"x":'+i[s].x+',"y":'+i[s].y+"}";a+=t+="]"}else if(!0===e.isAnalyzeById){let t="[",s=e.nodes,r=s.length;for(let e=0;e<r;e++)e>0&&(t+=","),t+=s[e];a+=t+="]"}return a}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new Se;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}}e.FindTSPPathsService=hs;
  553. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  554. * This program are made available under the terms of the Apache License, Version 2.0
  555. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  556. class us{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&&V.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)}}e.GenerateSpatialDataParameters=us;
  557. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  558. * This program are made available under the terms of the Apache License, Version 2.0
  559. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  560. class cs extends Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GenerateSpatialDataService"}destroy(){super.destroy()}processAsync(e){if(e instanceof us){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata";return this.url=V.urlPathAppend(this.url,t),this.url=V.urlAppend(this.url,"returnContent=true"),V.toJSON(e)}}e.GenerateSpatialDataService=cs;e.GeoBoundingBoxQueryBuilderParameter=
  561. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  562. * This program are made available under the terms of the Apache License, Version 2.0
  563. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  564. class extends We{constructor(e){super(e),this.bounds=null,this.queryType=G.GEO_BOUNDING_BOX,this.CLASS_NAME="SuperMap.GeoBoundingBoxQueryBuilderParameter",V.extend(this,e)}destroy(){super.destroy(),this.bounds=null,this.queryType=null}};e.GeoHashGridAggParameter=
  565. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  566. * This program are made available under the terms of the Apache License, Version 2.0
  567. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  568. class extends Ve{constructor(e){super(e),this.precision=5,this.aggType=B.GEOHASH_GRID,V.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),V.toJson(t)}};
  569. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  570. * This program are made available under the terms of the Apache License, Version 2.0
  571. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  572. class ps extends At{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&&V.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 s in e)if("sourceGeometry"===s)t.sourceGeometry=ve.fromGeometry(e.sourceGeometry);else if("sourceGeometries"===s){for(var r=[],i=0;i<e.sourceGeometries.length;i++)r.push(ve.fromGeometry(e.sourceGeometries[i]));t.sourceGeometries=r}else if("operateGeometry"===s)t.operateGeometry=ve.fromGeometry(e.operateGeometry);else if("operateGeometries"===s){for(var a=[],n=0;n<e.operateGeometries.length;n++)a.push(ve.fromGeometry(e.operateGeometries[n]));t.operateGeometries=a}else t[s]=e[s]}}e.GeometryOverlayAnalystParameters=ps;
  573. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  574. * This program are made available under the terms of the Apache License, Version 2.0
  575. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  576. class ds extends Pt{constructor(e){super(e),this.points=null,this.zValues=null,e&&V.extend(this,e),this.CLASS_NAME="SuperMap.GeometrySurfaceAnalystParameters"}destroy(){super.destroy();if(this.points){for(var e=0,t=this.points,s=t.length;e<s;e++)t[e].destroy();this.points=null}this.zValues=null}}e.GeometrySurfaceAnalystParameters=ds;
  577. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  578. * This program are made available under the terms of the Apache License, Version 2.0
  579. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  580. class ms extends Nt{constructor(e){super(e),this.points=null,e&&V.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 s in e)"clipRegion"===s?t.clipRegion=ve.fromGeometry(e.clipRegion):t[s]=e[s]}}e.GeometryThiessenAnalystParameters=ms;class ys extends He{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.GeoprocessingService",this.headers={},this.crossOrigin=!0}getTools(){this._get(`${this.url}/list`)}getTool(e){this._get(`${this.url}/${e}`)}execute(e,t,s){const r={parameter:t=t||null,environment:s=s||null};this._get(`${this.url}/${e}/execute`,r)}submitJob(e,t,s){const r={parameter:t=t||null,environments:s=s||null};this.request({url:`${this.url}/${e}/jobs`,headers:{"Content-type":"application/json"},method:"POST",data:JSON.stringify(r),scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}waitForJobCompletion(e,t,s){const r=this,i=setInterval(function(){r._get(`${r.url}/${t}/jobs/${e}`,null,function(e){const t=e.state.runState;switch(s.statusCallback&&s.statusCallback(t),t){case"FINISHED":clearInterval(i),r.events.triggerEvent("processCompleted",{result:e});break;case"FAILED":case"CANCELED":clearInterval(i),r.events.triggerEvent("processFailed",{result:e})}})},s.interval)}getJobInfo(e,t){this._get(`${this.url}/${e}/jobs/${t}`)}cancelJob(e,t){this._get(`${this.url}/${e}/jobs/${t}/cancel`)}getJobs(e){let t=`${this.url}/jobs`;e&&(t=`${this.url}/${e}/jobs`),this._get(t)}getResults(e,t,s){let r=`${this.url}/${e}/jobs/${t}/results`;s&&(r=`${r}/${s}`),this._get(r)}_get(e,t,s,r){this.request({url:e,method:"GET",params:t,headers:{"Content-type":"application/json"},scope:this,success:s||this.serviceProcessCompleted,failure:r||this.serviceProcessFailed})}}e.GeoprocessingService=ys;
  581. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  582. * This program are made available under the terms of the Apache License, Version 2.0
  583. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  584. class fs{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&&V.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}}e.GeoRelationAnalystParameters=fs;
  585. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  586. * This program are made available under the terms of the Apache License, Version 2.0
  587. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  588. class gs extends Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GeoRelationAnalystService"}destroy(){super.destroy()}processAsync(t){if(t instanceof fs){var s=this;s.url=V.urlPathAppend(s.url,"datasets/"+t.dataset+"/georelation");var r=e.Util.toJSON(t);s.url=V.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.GeoRelationAnalystService=gs;
  589. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  590. * This program are made available under the terms of the Apache License, Version 2.0
  591. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  592. class vs{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.aggregations=null,V.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.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}}e.GetFeaturesParametersBase=vs;
  593. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  594. * This program are made available under the terms of the Apache License, Version 2.0
  595. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  596. class Ss extends vs{constructor(e){super(e),this.getFeatureMode=Ss.getFeatureMode.BOUNDS,this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=n.CONTAIN,V.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,s,r;return s={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},r={datasetNames:e.datasetNames,getFeatureMode:Ss.getFeatureMode.BOUNDS,bounds:s,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new st).name=e.datasetNames,t.fields=e.fields,r.queryParameter=t),e.attributeFilter&&(r.attributeFilter=e.attributeFilter,r.getFeatureMode=Ss.getFeatureMode.BOUNDS_ATTRIBUTEFILTER),e.maxFeatures&&!isNaN(e.maxFeatures)&&(r.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(r.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(r.targetPrj=e.targetPrj),V.toJSON(r)}}Ss.getFeatureMode={BOUNDS:"BOUNDS",BOUNDS_ATTRIBUTEFILTER:"BOUNDS_ATTRIBUTEFILTER"},e.GetFeaturesByBoundsParameters=Ss;
  597. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  598. * This program are made available under the terms of the Apache License, Version 2.0
  599. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  600. class bs extends He{constructor(e,s){super(e,s),s=s||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.maxFeatures=null,this.format=t.GEOJSON,V.extend(this,s),this.url=V.urlPathAppend(this.url,"featureResults"),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,s=this,r=!0;s.returnContent=e.returnContent,s.fromIndex=e.fromIndex,s.toIndex=e.toIndex,s.maxFeatures=e.maxFeatures,s.returnContent&&(s.url=V.urlAppend(s.url,"returnContent="+s.returnContent),r=!1),null!=s.fromIndex&&null!=s.toIndex&&!isNaN(s.fromIndex)&&!isNaN(s.toIndex)&&s.fromIndex>=0&&s.toIndex>=0&&!r&&(s.url=V.urlAppend(s.url,`fromIndex=${s.fromIndex}&toIndex=${s.toIndex}`)),e.returnCountOnly&&(s.url=V.urlAppend(s.url,"&returnCountOnly="+e.returnContent)),t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){if(e=V.transformResult(e),this.format===t.GEOJSON&&e.features){var s=new Se;e.features=s.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}e.GetFeaturesServiceBase=bs;
  601. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  602. * This program are made available under the terms of the Apache License, Version 2.0
  603. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  604. class xs extends bs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return Ss.toJsonParameters(e)}}e.GetFeaturesByBoundsService=xs;
  605. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  606. * This program are made available under the terms of the Apache License, Version 2.0
  607. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  608. class Cs extends vs{constructor(e){super(e),this.bufferDistance=null,this.attributeFilter=null,this.geometry=null,this.fields=null,V.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,s,r;return r=ve.fromGeometry(e.geometry),s={datasetNames:e.datasetNames,getFeatureMode:"BUFFER",bufferDistance:e.bufferDistance,geometry:r},e.fields&&((t=new st).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode="BUFFER_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(s.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(s.targetPrj=e.targetPrj),V.toJSON(s)}}e.GetFeaturesByBufferParameters=Cs;
  609. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  610. * This program are made available under the terms of the Apache License, Version 2.0
  611. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  612. class _s extends bs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBufferService"}destroy(){super.destroy()}getJsonParameters(t){if(t instanceof Cs)return e.GetFeaturesByBufferParameters.toJsonParameters(t)}}e.GetFeaturesByBufferService=_s;
  613. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  614. * This program are made available under the terms of the Apache License, Version 2.0
  615. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  616. class Ts extends vs{constructor(e){super(e),this.getFeatureMode="SPATIAL",this.geometry=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=n.CONTAIN,V.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,s,r;return s=ve.fromGeometry(e.geometry),r={datasetNames:e.datasetNames,getFeatureMode:"SPATIAL",geometry:s,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new st).name=e.datasetNames,t.fields=e.fields,r.queryParameter=t),e.attributeFilter&&(r.attributeFilter=e.attributeFilter,r.getFeatureMode="SPATIAL_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(r.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(r.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(r.targetPrj=e.targetPrj),V.toJSON(r)}}e.GetFeaturesByGeometryParameters=Ts;
  617. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  618. * This program are made available under the terms of the Apache License, Version 2.0
  619. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  620. class Es extends bs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){return Ts.toJsonParameters(e)}}e.GetFeaturesByGeometryService=Es;
  621. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  622. * This program are made available under the terms of the Apache License, Version 2.0
  623. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  624. class As extends vs{constructor(e){super(e),this.getFeatureMode="ID",this.IDs=null,this.fields=null,V.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,s;return t={datasetNames:e.datasetNames,getFeatureMode:"ID",ids:e.IDs},e.fields&&((s=new st).name=e.datasetNames,s.fields=e.fields,t.queryParameter=s),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),V.toJSON(t)}}e.GetFeaturesByIDsParameters=As;
  625. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  626. * This program are made available under the terms of the Apache License, Version 2.0
  627. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  628. class ws extends bs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByIDsService"}destroy(){super.destroy()}getJsonParameters(e){return As.toJsonParameters(e)}}e.GetFeaturesByIDsService=ws;
  629. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  630. * This program are made available under the terms of the Apache License, Version 2.0
  631. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  632. class Ls extends vs{constructor(e){super(e),this.getFeatureMode="SQL",this.queryParameter=null,V.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),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),V.toJSON(t)}}e.GetFeaturesBySQLParameters=Ls;
  633. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  634. * This program are made available under the terms of the Apache License, Version 2.0
  635. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  636. class Ps extends bs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesBySQLService"}destroy(){super.destroy()}getJsonParameters(e){return Ls.toJsonParameters(e)}}e.GetFeaturesBySQLService=Ps;
  637. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  638. * This program are made available under the terms of the Apache License, Version 2.0
  639. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  640. class Os extends He{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.GetFieldsService"}destroy(){super.destroy();this.datasource=null,this.dataset=null}processAsync(){var e=this;e.url=V.urlPathAppend(e.url,`datasources/${e.datasource}/datasets/${e.dataset}/fields`),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}e.GetFieldsService=Os;
  641. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  642. * This program are made available under the terms of the Apache License, Version 2.0
  643. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  644. class Ns{constructor(e){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null,V.extend(this,e),this.CLASS_NAME="SuperMap.GetGridCellInfosParameters"}destroy(){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null}}e.GetGridCellInfosParameters=Ns;
  645. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  646. * This program are made available under the terms of the Apache License, Version 2.0
  647. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  648. class Ms extends He{constructor(e,t){super(e,t),this.datasetName=null,this.dataSourceName=null,this.datasetType=null,this.X=null,this.Y=null,t&&V.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){V.extend(this,e);var t=this;t.url=V.urlPathAppend(t.url,`datasources/${t.dataSourceName}/datasets/${t.datasetName}`),t.queryRequest(t.getDatasetInfoCompleted,t.getDatasetInfoFailed)}}queryRequest(e,t){this.request({method:"GET",data:null,scope:this,success:e,failure:t})}getDatasetInfoCompleted(e){e=V.transformResult(e),this.datasetType=e.datasetInfo.type,this.queryGridInfos()}queryGridInfos(){var e=this;e.url=V.urlPathAppend(e.url,"GRID"==e.datasetType?"gridValue":"imageValue"),null!=e.X&&null!=e.Y&&(e.url=V.urlAppend(e.url,`x=${e.X}&y=${e.Y}`)),e.queryRequest(e.serviceProcessCompleted,e.serviceProcessFailed)}getDatasetInfoFailed(e){this.serviceProcessFailed(e)}}e.GetGridCellInfosService=Ms;e.ThemeMemoryData=
  649. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  650. * This program are made available under the terms of the Apache License, Version 2.0
  651. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  652. class{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),s=0;s<t;s++)e+="'"+this.srcData[s]+"':'"+this.targetData[s]+"',";return s>0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}};
  653. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  654. * This program are made available under the terms of the Apache License, Version 2.0
  655. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  656. class Is{constructor(e,t){if(!e)return this;this.memoryData=null,this.type=e,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.Theme"}destroy(){this.memoryData&&(this.memoryData.destroy(),this.memoryData=null),this.type=null}toServerJSONObject(){}}e.Theme=Is;
  657. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  658. * This program are made available under the terms of the Apache License, Version 2.0
  659. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  660. class Fs{constructor(e){this.align=f.BASELINECENTER,this.backColor=new me(255,255,255),this.foreColor=new me(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&&V.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 Fs(e);return V.copy(t,e),t.backColor=me.fromJson(e.backColor),t.foreColor=me.fromJson(e.foreColor),t}}e.ServerTextStyle=Fs;
  661. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  662. * This program are made available under the terms of the Apache License, Version 2.0
  663. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  664. class Rs{constructor(e){this.caption=null,this.end=0,this.start=0,this.visible=!0,this.style=new Fs,e&&V.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 Rs;return V.copy(t,e),t}}}e.ThemeLabelItem=Rs;
  665. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  666. * This program are made available under the terms of the Apache License, Version 2.0
  667. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  668. class Ds{constructor(e){this.caption=null,this.style=new ye,this.unique=null,this.visible=!0,e&&V.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=V.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){var t=new Ds;return V.copy(t,e),t.style=ye.fromJson(e.style),t}}e.ThemeUniqueItem=Ds;
  669. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  670. * This program are made available under the terms of the Apache License, Version 2.0
  671. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  672. class ks{constructor(e){this.flowEnabled=!1,this.leaderLineDisplayed=!1,this.leaderLineStyle=new ye,e&&V.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 ks;return V.copy(t,e),t.leaderLineStyle=ye.fromJson(e.leaderLineStyle),t}}}e.ThemeFlow=ks;
  673. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  674. * This program are made available under the terms of the Apache License, Version 2.0
  675. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  676. class Bs{constructor(e){this.offsetFixed=!1,this.offsetX="0.0",this.offsetY="0.0",e&&V.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 Bs;return V.copy(t,e),t}}}e.ThemeOffset=Bs;
  677. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  678. * This program are made available under the terms of the Apache License, Version 2.0
  679. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  680. class Gs{constructor(e){this.defaultStyle=null,this.separator=null,this.separatorEnabled=!1,this.splitIndexes=null,this.styles=new Fs,e&&V.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,s=e.styles,r=s.length;t<r;t++)s[t].destroy();e.styles=null}}static fromObj(e){if(e){var t=new Gs,s=e.styles;if(V.copy(t,e),t.defaultStyle=new Fs(e.defaultStyle),s){t.styles=[];for(var r=0,i=s.length;r<i;r++)t.styles.push(new Fs(s[r]))}return t}}}e.LabelMixedTextStyle=Gs;
  681. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  682. * This program are made available under the terms of the Apache License, Version 2.0
  683. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  684. class Us{constructor(e){this.maxTextHeight=0,this.maxTextWidth=0,this.minTextHeight=0,this.minTextWidth=0,this.uniformStyle=new Fs,this.uniformMixedStyle=null,e&&V.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 Us;return V.copy(t,e),t.uniformStyle=Fs.fromObj(e.uniformStyle),t.uniformMixedStyle=Gs.fromObj(e.uniformMixedStyle),t}}}e.ThemeLabelText=Us;
  685. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  686. * This program are made available under the terms of the Apache License, Version 2.0
  687. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  688. class Hs{constructor(e){this.isAlongLine=!0,this.alongLineDirection=g.LB_TO_RT,this.angleFixed=!1,this.repeatedLabelAvoided=!1,this.repeatIntervalFixed=!1,this.labelRepeatInterval=0,e&&V.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 Hs;return V.copy(t,e),t}}}e.ThemeLabelAlongLine=Hs;
  689. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  690. * This program are made available under the terms of the Apache License, Version 2.0
  691. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  692. class js{constructor(e){this.labelBackShape=v.NONE,this.backStyle=new ye,e&&V.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 js;return t.labelBackShape=e.labelBackShape,t.backStyle=ye.fromJson(e.backStyle),t}}}e.ThemeLabelBackground=js;
  693. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  694. * This program are made available under the terms of the Apache License, Version 2.0
  695. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  696. class Js extends Is{constructor(e){super("LABEL",e),this.alongLine=new Hs,this.background=new js,this.flow=new ks,this.items=null,this.uniqueItems=null,this.labelExpression=null,this.labelOverLengthMode=S.NONE,this.matrixCells=null,this.maxLabelLength=256,this.numericPrecision=0,this.offset=new Bs,this.overlapAvoided=!0,this.rangeExpression=null,this.uniqueExpression=null,this.smallGeometryLabeled=!1,this.text=new Us,this.textSpace=0,e&&V.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,s=e.items,r=s.length;t<r;t++)s[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 V.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 Js,s=e.items,r=e.uniqueItems,i=e.matrixCells;if(e.matrixCells=null,V.copy(t,e),t.alongLine=Hs.fromObj(e),t.background=js.fromObj(e),t.flow=new ks({flowEnabled:e.flowEnabled,leaderLineDisplayed:e.leaderLineDisplayed,leaderLineStyle:e.leaderLineStyle}),s){t.items=[];for(var a=0,n=s.length;a<n;a++)t.items.push(Rs.fromObj(s[a]))}if(r){t.uniqueItems=[];for(let e=0,s=r.length;e<s;e++)t.uniqueItems.push(Ds.fromObj(r[e]))}if(i){t.matrixCells=[];for(let e=0,t=i.length;e<t;e++);}return t.offset=Bs.fromObj(e),t.text=Us.fromObj(e),t}}}e.ThemeLabel=Js;
  697. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  698. * This program are made available under the terms of the Apache License, Version 2.0
  699. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  700. class zs extends Is{constructor(e){super("UNIQUE",e),this.defaultStyle=new ye,this.items=null,this.uniqueExpression=null,this.colorGradientType=y.YELLOW_RED,e&&V.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=V.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],s=e.items.length,r=0;r<s;r++)t.push(e.items[r].toServerJSONObject());e.items=t}return e}static fromObj(e){var t=new zs,s=e.items,r=s?s.length:0;V.extend(t,e),t.items=[],t.defaultStyle=ye.fromJson(e.defaultStyle);for(var i=0;i<r;i++)t.items.push(Ds.fromObj(s[i]));return t}}e.ThemeUnique=zs;
  701. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  702. * This program are made available under the terms of the Apache License, Version 2.0
  703. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  704. class Ws{constructor(e){this.axesColor=new me(0,0,0),this.axesDisplayed=!1,this.axesGridDisplayed=!1,this.axesTextDisplayed=!1,this.axesTextStyle=new Fs,e&&V.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 Ws;return V.copy(t,e),t.axesColor=me.fromJson(e.axesColor),t.axesTextStyle=Fs.fromObj(e.axesTextStyle),t}}}e.ThemeGraphAxes=Ws;
  705. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  706. * This program are made available under the terms of the Apache License, Version 2.0
  707. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  708. class Vs{constructor(e){this.maxGraphSize=0,this.minGraphSize=0,e&&V.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphSize"}destroy(){this.maxGraphSize=null,this.minGraphSize=null}static fromObj(e){var t=new Vs;return V.copy(t,e),t}}e.ThemeGraphSize=Vs;
  709. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  710. * This program are made available under the terms of the Apache License, Version 2.0
  711. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  712. class qs{constructor(e){this.graphTextDisplayed=!1,this.graphTextFormat=u.CAPTION,this.graphTextStyle=new Fs,e&&V.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 qs;return V.copy(t,e),t.graphTextStyle=Fs.fromObj(e.graphTextStyle),t}}e.ThemeGraphText=qs;
  713. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  714. * This program are made available under the terms of the Apache License, Version 2.0
  715. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  716. class Ys{constructor(e){this.caption=null,this.graphExpression=null,this.memoryDoubleValues=null,this.uniformStyle=new ye,e&&V.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 Ys;return V.copy(t,e),t.uniformStyle=ye.fromJson(e.uniformStyle),t}}}e.ThemeGraphItem=Ys;
  717. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  718. * This program are made available under the terms of the Apache License, Version 2.0
  719. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  720. class Xs extends Is{constructor(e){super("GRAPH",e),this.barWidth=0,this.flow=new ks,this.graduatedMode=d.CONSTANT,this.graphAxes=new Ws,this.graphSize=new Vs,this.graphSizeFixed=!1,this.graphText=new qs,this.graphType=c.AREA,this.graphAxesTextDisplayMode=p.NONE,this.items=null,this.memoryKeys=null,this.negativeDisplayed=!1,this.offset=new Bs,this.overlapAvoided=!0,this.roseAngle=0,this.startAngle=0,e&&V.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,s=e.items,r=s.length;t<r;t++)s[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 V.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 Xs,s=e.items,r=s?s.length:0;V.copy(t,e),t.items=[],t.flow=ks.fromObj(e),t.graphAxes=Ws.fromObj(e),t.graphSize=Vs.fromObj(e),t.graphText=qs.fromObj(e),t.offset=Bs.fromObj(e);for(var i=0;i<r;i++)t.items.push(Ys.fromObj(s[i]));return t}}e.ThemeGraph=Xs;
  721. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  722. * This program are made available under the terms of the Apache License, Version 2.0
  723. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  724. class Qs extends Is{constructor(e){super("DOTDENSITY",e),this.dotExpression=null,this.style=new ye,this.value=null,e&&V.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=V.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){if(e){var t=new Qs;return V.copy(t,e),t.style=ye.fromJson(e.style),t}}}e.ThemeDotDensity=Qs;
  725. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  726. * This program are made available under the terms of the Apache License, Version 2.0
  727. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  728. class Ks{constructor(e){this.negativeDisplayed=!1,this.negativeStyle=new ye,this.positiveStyle=new ye,this.zeroDisplayed=!1,this.zeroStyle=new ye,e&&V.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 Ks;return V.copy(t,e),t.negativeStyle=ye.fromJson(e.negativeStyle),t.positiveStyle=ye.fromJson(e.positiveStyle),t.zeroStyle=ye.fromJson(e.zeroStyle),t}}}e.ThemeGraduatedSymbolStyle=Ks;
  729. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  730. * This program are made available under the terms of the Apache License, Version 2.0
  731. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  732. class Zs extends Is{constructor(t){super("GRADUATEDSYMBOL",t),this.baseValue=0,this.expression=null,this.flow=new ks,this.graduatedMode=e.GraduatedMode.CONSTAN,this.offset=new Bs,this.style=new Ks,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.ThemeGraduatedSymbol"}destroy(){super.destroy();var e=this;e.expression=null,e.flow&&(e.flow.destroy(),e.flow=null),e.graduatedMode=d.CONSTANT,e.offset&&(e.offset.destroy(),e.offset=null),e.style&&(e.style.destroy(),e.style=null)}toJSON(){return V.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(t){if(t){var s=new e.ThemeGraduatedSymbol;return V.copy(s,t),s.flow=ks.fromObj(t),s.offset=Bs.fromObj(t),s.style=Ks.fromObj(t),s}}}e.ThemeGraduatedSymbol=Zs;
  733. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  734. * This program are made available under the terms of the Apache License, Version 2.0
  735. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  736. class $s{constructor(e){this.caption=null,this.end=0,this.start=0,this.style=new ye,this.visible=!0,e&&V.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=V.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){if(e){var t=new $s;return V.copy(t,e),t.style=ye.fromJson(e.style),t}}}e.ThemeRangeItem=$s;
  737. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  738. * This program are made available under the terms of the Apache License, Version 2.0
  739. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  740. class er extends Is{constructor(e){super("RANGE",e),this.precision="1.0E-12",this.items=null,this.rangeExpression=null,this.rangeMode=m.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=y.YELLOW_RED,e&&V.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 er;V.copy(t,e);var s=e.items,r=s?s.length:0;t.items=[];for(var i=0;i<r;i++)t.items.push($s.fromObj(s[i]));return t}}}e.ThemeRange=er;
  741. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  742. * This program are made available under the terms of the Apache License, Version 2.0
  743. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  744. class tr{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,V.extend(this,e),this.CLASS_NAME="SuperMap.UGCLayer"}destroy(){V.reset(this)}fromJson(e){e=e||{},V.extend(this,e);var t=this.bounds;t&&(this.bounds=new Y(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y))}toServerJSONObject(){var e={};return(e=V.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}e.UGCLayer=tr;e.OverlapDisplayedOptions=
  745. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  746. * This program are made available under the terms of the Apache License, Version 2.0
  747. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  748. class{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,V.extend(this,e),this.ugcLayer=new tr(e),this.CLASS_NAME="SuperMap.OverlapDisplayedOptions"}destroy(){V.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 s in e)e.hasOwnProperty(s)&&(t+="'"+s+"':"+e[s]+",");return t=t.substr(0,t.length-1),t+="}"}};
  749. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  750. * This program are made available under the terms of the Apache License, Version 2.0
  751. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  752. class sr extends tr{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(),V.reset(this)}fromJson(e){super.fromJson(e)}toServerJSONObject(){return super.toServerJSONObject()}}e.UGCMapLayer=sr;
  753. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  754. * This program are made available under the terms of the Apache License, Version 2.0
  755. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  756. class rr extends sr{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 Et(this.datasetInfo)),this.joinItems&&this.joinItems.length){for(var t=[],s=0;s<this.joinItems.length;s++)t[s]=new et(this.joinItems[s]);this.joinItems=t}}destroy(){super.destroy(),V.reset(this)}toServerJSONObject(){var e=super.toServerJSONObject();if(e.joinItems){for(var t=[],s=0;s<e.joinItems.length;s++)e.joinItems[s].toServerJSONObject&&(t[s]=e.joinItems[s].toServerJSONObject());e.joinItems=t}return e.datasetInfo&&e.datasetInfo.toServerJSONObject&&(e.datasetInfo=e.datasetInfo.toServerJSONObject()),e}}e.UGCSubLayer=rr;
  757. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  758. * This program are made available under the terms of the Apache License, Version 2.0
  759. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  760. class ir extends rr{constructor(e){super(e=e||{}),this.theme=null,this.themeElementPosition=null,this.CLASS_NAME="SuperMap.ServerTheme"}destroy(){super.destroy(),V.reset(this)}fromJson(e){super.fromJson(e);var t=this.theme;switch(t&&t.type){case"LABEL":this.theme=Js.fromObj(t);break;case"UNIQUE":this.theme=zs.fromObj(t);break;case"GRAPH":this.theme=Xs.fromObj(t);break;case"DOTDENSITY":this.theme=Qs.fromObj(t);break;case"GRADUATEDSYMBOL":this.theme=Zs.fromObj(t);break;case"RANGE":this.theme=er.fromObj(t)}this.themeElementPosition&&(this.themeElementPosition=new q(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}}e.ServerTheme=ir;
  761. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  762. * This program are made available under the terms of the Apache License, Version 2.0
  763. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  764. class ar extends rr{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(),V.reset(this)}fromJson(e){if(super.fromJson(e),this.specialColor&&(this.specialColor=new me(this.specialColor.red,this.specialColor.green,this.specialColor.blue)),this.colors){var t,s=[];for(var r in this.colors)t=this.colors[r],s.push(new me(t.red,t.green,t.blue));this.colors=s}if(this.dashStyle&&(this.dashStyle=new ye(this.dashStyle)),this.solidStyle&&(this.solidStyle=new ye(this.solidStyle)),this.colorDictionary){var i,a=[];for(var n in this.colorDictionary)i=this.colorDictionary[n],a.push(new St({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}}e.Grid=ar;
  765. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  766. * This program are made available under the terms of the Apache License, Version 2.0
  767. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  768. class nr extends rr{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(),V.reset(this)}fromJson(e){super.fromJson(e),this.transparentColor&&(this.transparentColor=new me(this.transparentColor.red,this.transparentColor.green,this.transparentColor.blue))}toServerJSONObject(){return super.toServerJSONObject()}}e.Image=nr;
  769. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  770. * This program are made available under the terms of the Apache License, Version 2.0
  771. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  772. class or extends rr{constructor(e){super(e=e||{}),this.style=null,this.CLASS_NAME="SuperMap.Vector"}destroy(){super.destroy(),V.reset(this)}fromJson(e){super.fromJson(e);var t=this.style;t&&(this.style=new ye(t))}toServerJSONObject(){var t=e.toServerJSONObject();return t.style&&t.style.toServerJSONObject&&(t.style=t.style.toServerJSONObject()),t}}e.Vector=or;
  773. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  774. * This program are made available under the terms of the Apache License, Version 2.0
  775. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  776. class lr extends He{constructor(e,t){super(e,t),this.isTempLayers=!1,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.GetLayersInfoService"}destroy(){super.destroy(),V.reset(this)}processAsync(){var e=this;e.isTempLayers||(e.url=V.urlPathAppend(e.url,"layers")),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}serviceProcessCompleted(e){var t,s;s=(t=!!(e=V.transformResult(e))&&e.length>0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(s,t),this.events.triggerEvent("processCompleted",{result:e[0]})}handleLayers(e,t){var s;if(e)for(var r=0;r<e;r++){if(t[r].subLayers&&t[r].subLayers.layers&&t[r].subLayers.layers.length>0)this.handleLayers(t[r].subLayers.layers.length,t[r].subLayers.layers);else switch(t[r].ugcLayerType){case"THEME":(s=new ir).fromJson(t[r]),t[r]=s;break;case"GRID":(s=new ar).fromJson(t[r]),t[r]=s;break;case"IMAGE":(s=new nr).fromJson(t[r]),t[r]=s;break;case"VECTOR":(s=new or).fromJson(t[r]),t[r]=s}}}}e.GetLayersInfoService=lr;
  777. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  778. * This program are made available under the terms of the Apache License, Version 2.0
  779. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  780. class hr{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,V.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 s in e)if("inputPoints"===s&&"geometry"===e.InterpolationAnalystType){for(var r=[],i=0;i<e.inputPoints.length;i++){var a=e.inputPoints[i],n={x:a.x,y:a.y,z:a.tag};r.push(n)}t[s]=r}else t[s]=e[s]}}e.InterpolationAnalystParameters=hr;
  781. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  782. * This program are made available under the terms of the Apache License, Version 2.0
  783. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  784. class ur extends hr{constructor(e){super(e),this.smooth=.1,this.tension=40,this.searchMode=null,this.expectedCount=12,this.maxPointCountForInterpolation=200,this.maxPointCountInNode=50,e&&V.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 s in e)t[s]=e[s]}}e.InterpolationRBFAnalystParameters=ur;
  785. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  786. * This program are made available under the terms of the Apache License, Version 2.0
  787. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  788. class cr extends hr{constructor(e){super(e),e&&V.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationDensityAnalystParameters"}destroy(){super.destroy()}}e.InterpolationDensityAnalystParameters=cr;
  789. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  790. * This program are made available under the terms of the Apache License, Version 2.0
  791. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  792. class pr extends hr{constructor(e){super(e),this.power=2,this.searchMode=null,this.expectedCount=12,e&&V.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationIDWAnalystParameters"}destroy(){super.destroy();this.power=null,this.searchMode=null,this.expectedCount=null}}e.InterpolationIDWAnalystParameters=pr;
  793. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  794. * This program are made available under the terms of the Apache License, Version 2.0
  795. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  796. class dr extends hr{constructor(e){super(e),this.type=null,this.mean=null,this.angle=0,this.nugget=0,this.range=0,this.sill=0,this.variogramMode=P.SPHERICAL,this.exponent=O.EXP1,this.searchMode=null,this.expectedCount=12,this.maxPointCountForInterpolation=200,this.maxPointCountInNode=50,e&&V.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}}e.InterpolationKrigingAnalystParameters=dr;
  797. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  798. * This program are made available under the terms of the Apache License, Version 2.0
  799. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  800. class mr extends Ye{constructor(e,t){super(e,t),this.mode=null,t&&V.extend(this,t)}destroy(){super.destroy(),this.mode=null,this.CLASS_NAME="SuperMap.InterpolationAnalystService"}processAsync(e){var t={},s=this;e instanceof cr?(s.mode="Density","geometry"===e.InterpolationAnalystType?s.url=V.urlPathAppend(s.url,"geometry/interpolation/density"):s.url=V.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/density")):e instanceof pr?(s.mode="IDW","geometry"===e.InterpolationAnalystType?s.url=V.urlPathAppend(s.url,"geometry/interpolation/idw"):s.url=V.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/idw")):e instanceof ur?(s.mode="RBF","geometry"===e.InterpolationAnalystType?s.url=V.urlPathAppend(s.url,"geometry/interpolation/rbf"):s.url=V.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/rbf")):e instanceof dr&&(s.mode="Kriging","geometry"===e.InterpolationAnalystType?s.url=V.urlPathAppend(s.url,"geometry/interpolation/kriging"):s.url=V.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/kriging")),hr.toObject(e,t);var r=V.toJSON(t);s.url=V.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}e.InterpolationAnalystService=mr;
  801. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  802. * This program are made available under the terms of the Apache License, Version 2.0
  803. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  804. class yr{constructor(e){e&&(this.datasetName="",this.query="",this.resolution=80,this.method=0,this.meshType=0,this.fields="",this.radius=300,this.meshSizeUnit=F.METER,this.radiusUnit=F.METER,this.areaUnit=I.SQUAREMILE,this.output=null,this.mappingParameters=null,V.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 nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.KernelDensityJobParameter=yr;
  805. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  806. * This program are made available under the terms of the Apache License, Version 2.0
  807. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  808. class fr extends ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/density"),this.CLASS_NAME="SuperMap.KernelDensityJobsService"}destroy(){super.destroy()}getKernelDensityJobs(){super.getJobs(this.url)}getKernelDensityJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addKernelDensityJob(e,t){super.addJob(this.url,e,yr,t)}}e.KernelDensityJobsService=fr;
  809. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  810. * This program are made available under the terms of the Apache License, Version 2.0
  811. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  812. class gr{constructor(){this.CLASS_NAME="LabelMatrixCell"}}e.LabelMatrixCell=gr;e.LabelImageCell=
  813. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  814. * This program are made available under the terms of the Apache License, Version 2.0
  815. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  816. class extends gr{constructor(e){super(e),this.height=0,this.pathField=null,this.rotation=0,this.width=0,this.sizeFixed=!1,this.type="IMAGE",e&&V.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}};e.LabelSymbolCell=
  817. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  818. * This program are made available under the terms of the Apache License, Version 2.0
  819. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  820. class extends gr{constructor(e){super(e),this.style=new ye,this.symbolIDField=null,this.type="SYMBOL",e&&V.extend(this,e),this.CLASS_NAME="SuperMap.LabelSymbolCell"}destroy(){this.style&&(this.style.destroy(),this.style=null),this.symbolIDField=null}};e.LabelThemeCell=
  821. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  822. * This program are made available under the terms of the Apache License, Version 2.0
  823. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  824. class extends gr{constructor(e){super(e),this.themeLabel=new Js,this.type="THEME",e&&V.extend(this,e),this.CLASS_NAME=" SuperMap.LabelThemeCell"}destroy(){this.themeLabel&&(this.themeLabel.destroy(),this.themeLabel=null)}};e.LayerStatus=
  825. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  826. * This program are made available under the terms of the Apache License, Version 2.0
  827. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  828. class{constructor(e){this.layerName=null,this.isVisible=null,this.displayFilter=null,this.fieldValuesDisplayFilter=null,e&&V.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":'+V.toJSON(this.fieldValuesDisplayFilter)),e+=t,e+="}"}};
  829. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  830. * This program are made available under the terms of the Apache License, Version 2.0
  831. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  832. class vr extends He{constructor(e,t){super(e,t),this.projection=null,this.CLASS_NAME="SuperMap.MapService",t&&V.extend(this,t);var s=this;if(s.projection){var r=s.projection.split(":");r instanceof Array&&(2===r.length&&(s.url=V.urlAppend(s.url,`prjCoordSys=${encodeURIComponent(`{"epsgCode":"${r[1]}"}`)}`)),1===r.length&&(s.url=V.urlAppend(s.url,`prjCoordSys=${encodeURIComponent(`{"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=V.transformResult(e)).code>=200&&e.code<300||0==e.code||304===e.code,s=e.code&&t;!e.code||s?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}}e.MapService=vr;
  833. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  834. * This program are made available under the terms of the Apache License, Version 2.0
  835. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  836. class Sr{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,V.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 s in e)if("dataset"!==s&&(t[s]=e[s]),"extractRegion"===s&&e[s]){for(var r=e[s].components[0].components,i={},a=[],n=r.length,o=0;o<n-1;o++){var l={};l.x=r[o].x,l.y=r[o].y,a.push(l)}i.points=a,i.type="REGION",t[s]=i}}}e.MathExpressionAnalysisParameters=Sr;
  837. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  838. * This program are made available under the terms of the Apache License, Version 2.0
  839. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  840. class br extends Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.MathExpressionAnalysisService"}destroy(){super.destroy()}processAsync(e){var t=this,s={};e instanceof Sr&&(t.url=V.urlPathAppend(t.url,"datasets/"+e.dataset+"/mathanalyst")),Sr.toObject(e,s);var r=V.toJSON(s);t.url=V.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}e.MathExpressionAnalysisService=br;
  841. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  842. * This program are made available under the terms of the Apache License, Version 2.0
  843. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  844. class xr{constructor(e,t){e&&(this.geometry=e,this.unit=l.METER,this.prjCoordSys=null,this.distanceMode=null,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.MeasureParameters")}destroy(){this.geometry=null,this.unit=null,this.prjCoordSys=null}}e.MeasureParameters=xr;
  845. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  846. * This program are made available under the terms of the Apache License, Version 2.0
  847. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  848. class Cr extends He{constructor(e,t){super(e,t),this.measureMode=o.DISTANCE,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.MeasureService"}destroy(){super.destroy();this.measureMode=null}processAsync(e){if(e instanceof xr){var t,s,r=this,i=e.geometry;if(i){r.url=V.urlPathAppend(r.url,r.measureMode===o.AREA?"area":"distance");var a,n,l,h=ve.fromGeometry(i);if(h)t=h.parts[0],s=h.points.splice(0,t),e.prjCoordSys?("object"==typeof e.prjCoordSys?a='{"epsgCode"'+(n=e.prjCoordSys.projCode).substring(n.indexOf(":"),n.length)+"}":"string"==typeof e.prjCoordSys&&(a='{"epsgCode"'+e.prjCoordSys.substring(e.prjCoordSys.indexOf(":"),e.prjCoordSys.length)+"}"),l={point2Ds:V.toJSON(s),unit:e.unit,prjCoordSys:a}):l={point2Ds:V.toJSON(s),unit:e.unit},r.request({method:"GET",params:l,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}}e.MeasureService=Cr;
  849. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  850. * This program are made available under the terms of the Apache License, Version 2.0
  851. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  852. class _r extends Ye{constructor(e,t){super(e,t),this.mode=null,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.OverlayAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof wt?(s.mode="datasets",s.url=V.urlPathAppend(s.url,"datasets/"+e.sourceDataset+"/overlay"),wt.toObject(e,t)):e instanceof ps&&(s.mode="geometry",e.operateGeometries&&e.sourceGeometries?(s.url=V.urlPathAppend(s.url,"geometry/overlay/batch"),s.url=V.urlAppend(s.url,"ignoreAnalystParam=true")):s.url=V.urlPathAppend(s.url,"geometry/overlay"),ps.toObject(e,t)),s.url=V.urlAppend(s.url,"returnContent=true");var r=V.toJSON(t);s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}e.OverlayAnalystService=_r;
  853. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  854. * This program are made available under the terms of the Apache License, Version 2.0
  855. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  856. class Tr{constructor(e){e&&(this.datasetName="",this.datasetOverlay="",this.mode="",this.srcFields="",this.overlayFields="",this.output=null,this.mappingParameters=null,V.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 nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!=s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.OverlayGeoJobParameter=Tr;
  857. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  858. * This program are made available under the terms of the Apache License, Version 2.0
  859. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  860. class Er extends ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/overlay"),this.CLASS_NAME="SuperMap.OverlayGeoJobsService"}destroy(){super.destroy()}getOverlayGeoJobs(){super.getJobs(this.url)}getOverlayGeoJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addOverlayGeoJob(e,t){super.addJob(this.url,e,Tr,t)}}e.OverlayGeoJobsService=Er;
  861. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  862. * This program are made available under the terms of the Apache License, Version 2.0
  863. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  864. class Ar extends gt{constructor(e){e&&(super(e),this.returnContent=!0,this.bounds=null,V.extend(this,e),this.CLASS_NAME="SuperMap.QueryByBoundsParameters")}destroy(){super.destroy();this.returnContent=null,this.bounds&&(this.bounds=null)}}e.QueryByBoundsParameters=Ar;
  865. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  866. * This program are made available under the terms of the Apache License, Version 2.0
  867. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  868. class wr extends He{constructor(e,s){super(e,s),this.returnContent=!1,this.format=t.GEOJSON,this.returnFeatureWithFieldCaption=!1,s&&V.extend(this,s),this.CLASS_NAME="SuperMap.QueryService",this.url&&(s&&s.format&&(this.format=s.format.toUpperCase()),this.url=V.urlPathAppend(this.url,"queryResults"))}destroy(){super.destroy();this.returnContent=null,this.format=null}processAsync(e){if(e instanceof gt){var t,s=this,r=null;s.returnContent=e.returnContent,t=s.getJsonParameters(e),s.returnContent?s.url=V.urlAppend(s.url,"returnContent="+s.returnContent):(r=e.returnCustomResult)&&(s.url=V.urlAppend(s.url,"returnCustomResult="+r)),s.returnFeatureWithFieldCaption=e.returnFeatureWithFieldCaption,s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){e=V.transformResult(e);var s=new Se;if(e&&e.recordsets)for(var r=0,i=e.recordsets,a=i.length;r<a;r++)i[r].features&&(!0===this.returnFeatureWithFieldCaption&&i[r].features.map(e=>(e.fieldNames=i[r].fieldCaptions,e)),this.format===t.GEOJSON&&(i[r].features=s.toGeoJSON(i[r].features)));this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new gt({customParams:e.customParams,expectCount:e.expectCount,networkType:e.networkType,queryOption:e.queryOption,queryParams:e.queryParams,startRecord:e.startRecord,prjCoordSys:e.prjCoordSys,holdTime:e.holdTime})}}e.QueryService=wr;
  869. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  870. * This program are made available under the terms of the Apache License, Version 2.0
  871. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  872. class Lr extends wr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){if(!(e instanceof Ar))return null;var t,s="",r=e.bounds;return t=this.getQueryParameters(e),s+="'queryMode':'BoundsQuery','queryParameters':",s+=V.toJSON(t),s="{"+(s+=",'bounds': {'rightTop':{'y':"+r.top+",'x':"+r.right+"},'leftBottom':{'y':"+r.bottom+",'x':"+r.left+"}}")+"}"}}e.QueryByBoundsService=Lr;
  873. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  874. * This program are made available under the terms of the Apache License, Version 2.0
  875. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  876. class Pr extends gt{constructor(e){e&&(super(e),this.distance=0,this.geometry=null,this.isNearest=null,this.returnContent=!0,V.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)}}e.QueryByDistanceParameters=Pr;
  877. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  878. * This program are made available under the terms of the Apache License, Version 2.0
  879. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  880. class Or extends wr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByDistanceService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Pr){var t="",s=this.getQueryParameters(e),r=ve.fromGeometry(e.geometry);return t+=e.isNearest?"'queryMode':'FindNearest','queryParameters':":"'queryMode':'DistanceQuery','queryParameters':",t+=V.toJSON(s),t="{"+(t+=",'geometry':"+V.toJSON(r)+",'distance':"+e.distance)+"}"}}}e.QueryByDistanceService=Or;
  881. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  882. * This program are made available under the terms of the Apache License, Version 2.0
  883. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  884. class Nr extends gt{constructor(e){e&&(super(e),this.returnContent=!0,this.geometry=null,this.spatialQueryMode=n.INTERSECT,V.extend(this,e),this.CLASS_NAME="SuperMap.QueryByGeometryParameters")}destroy(){super.destroy();this.returnContent=null,this.geometry=null,this.spatialQueryMode=null}}e.QueryByGeometryParameters=Nr;
  885. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  886. * This program are made available under the terms of the Apache License, Version 2.0
  887. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  888. class Mr extends wr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Nr){var t,s="",r=e.geometry,i=ve.fromGeometry(r);return t=this.getQueryParameters(e),s+="'queryMode':'SpatialQuery','queryParameters':",s="{"+(s+=V.toJSON(t)+",'geometry':"+V.toJSON(i)+",'spatialQueryMode':"+V.toJSON(e.spatialQueryMode))+"}"}}}e.QueryByGeometryService=Mr;
  889. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  890. * This program are made available under the terms of the Apache License, Version 2.0
  891. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  892. class Ir extends gt{constructor(e){e&&(super(e),this.returnContent=!0,V.extend(this,e),this.CLASS_NAME="SuperMap.QueryBySQLParameters")}destroy(){super.destroy();this.returnContent=null}}e.QueryBySQLParameters=Ir;
  893. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  894. * This program are made available under the terms of the Apache License, Version 2.0
  895. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  896. class Fr extends wr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryBySQLService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Ir){var t,s="";return t=this.getQueryParameters(e),s+="'queryMode':'SqlQuery','queryParameters':",s="{"+(s+=V.toJSON(t))+"}"}}}e.QueryBySQLService=Fr;
  897. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  898. * This program are made available under the terms of the Apache License, Version 2.0
  899. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  900. class Rr{constructor(e){if(!e)return this;this.sourceRoute=null,this.point=null,this.tolerance=null,this.isIgnoreGap=!1,V.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)}}e.RouteCalculateMeasureParameters=Rr;
  901. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  902. * This program are made available under the terms of the Apache License, Version 2.0
  903. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  904. class Dr extends Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteCalculateMeasureService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Rr){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){return this.url=V.urlPathAppend(this.url,"geometry/calculatemeasure"),this.url=V.urlAppend(this.url,"returnContent=true"),V.toJSON(e)}}e.RouteCalculateMeasureService=Dr;
  905. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  906. * This program are made available under the terms of the Apache License, Version 2.0
  907. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  908. class kr{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,s={};if(t&&t instanceof X&&t.components){s.type=t.type,s.parts=t.parts;for(var r=[],i=0,a=t.components.length;i<a;i++)r=r.concat(t.components[i].components);s.points=r,e.sourceRoute=s}V.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}}e.RouteLocatorParameters=kr;
  909. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  910. * This program are made available under the terms of the Apache License, Version 2.0
  911. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  912. class Br extends Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteLocatorService"}destroy(){super.destroy()}processAsync(e){if(e instanceof kr){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="geometry/routelocator";return e.dataset&&(t="datasets/"+e.dataset+"/linearreferencing/routelocator",e.sourceRoute=null),this.url=V.urlPathAppend(this.url,t),this.url=V.urlAppend(this.url,"returnContent=true"),V.toJSON(e)}}e.RouteLocatorService=Br;
  913. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  914. * This program are made available under the terms of the Apache License, Version 2.0
  915. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  916. class Gr{constructor(e){this.fieldNames=null,this.fieldValues=null,this.geometry=null,e&&V.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,s,r,i={},a=this;for(var n in e=a.fieldNames,t=a.fieldValues,e)i[e[n]]=t[n];return a.geometry&&(s=a.geometry.toGeometry()),r=new ce(s,i),a.geometry&&a.geometry.id&&(r.fid=a.geometry.id),r}static fromJson(e){var t=null;if(e)return(t=e.geometry)&&(t=ve.fromJson(t)),new Gr({fieldNames:e.fieldNames,fieldValues:e.fieldValues,geometry:t})}}e.ServerFeature=Gr;e.SetLayerInfoParameters=
  917. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  918. * This program are made available under the terms of the Apache License, Version 2.0
  919. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  920. class{constructor(e){e=e||{},this.resourceID=null,this.tempLayerName=null,this.layerInfo=null,V.extend(this,e),this.CLASS_NAME="SuperMap.SetLayerInfoParameters"}destroy(){this.resourceID=null,this.tempLayerName=null,this.layerInfo=null}};
  921. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  922. * This program are made available under the terms of the Apache License, Version 2.0
  923. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  924. class Ur extends He{constructor(e,t){super(e,t),t&&V.extend(this,t),this.CLASS_NAME="SuperMap.SetLayerInfoService"}destroy(){super.destroy(),V.reset(this)}processAsync(e){if(e){var t=V.toJSON(e);this.request({method:"PUT",data:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}}}e.SetLayerInfoService=Ur;e.SetLayersInfoParameters=
  925. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  926. * This program are made available under the terms of the Apache License, Version 2.0
  927. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  928. class{constructor(e){e=e||{},this.isTempLayers=null,this.resourceID=null,this.layersInfo=null,V.extend(this,e),this.CLASS_NAME="SuperMap.SetLayersInfoParameters"}destroy(){this.isTempLayers=null,this.resourceID=null,this.layersInfo=null}};
  929. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  930. * This program are made available under the terms of the Apache License, Version 2.0
  931. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  932. class Hr extends He{constructor(t,s){super(t,s),this.resourceID=null,this.isTempLayers=!1,s&&e.Util.extend(this,s),this.CLASS_NAME="SuperMap.SetLayersInfoService"}destroy(){super.destroy(),V.reset(this)}processAsync(e){if(e){var t,s=[],r=this,i="";r.isTempLayers?(r.url=V.urlPathAppend(r.url,"tempLayersSet/"+r.resourceID),i="PUT"):(r.url=V.urlPathAppend(r.url,"tempLayersSet"),i="POST"),e.subLayers||(e.subLayers={layers:[]}),e.subLayers.layers||(e.subLayers.layers=[]);var a=e.subLayers.layers,n=a.length;for(let e in a){if("GRID"===a[e].ugcLayerType){var o={},l=a[e].colorDictionarys;for(var h in l){o[l[h].elevation]=l[h].color}}a[e].colorDictionary=o,delete a[e].colorDictionarys}for(let e=0;e<n;e++)a[e].toJsonObject?s.push(a[e].toJsonObject()):s.push(a[e]);(t=V.extend(t,e)).subLayers={layers:s},t.object=null;var u=V.toJSON([t]);r.request({method:i,data:u,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}e.SetLayersInfoService=Hr;
  933. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  934. * This program are made available under the terms of the Apache License, Version 2.0
  935. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  936. class jr{constructor(e){this.layerStatusList=[],this.holdTime=15,this.resourceID=null,e&&V.extend(this,e)}destroy(){this.layerStatusList=null,this.holdTime=null,this.resourceID=null}toJSON(){var e="{";e+='"layers":[';for(var t=[],s=0,r=this.layerStatusList.length;s<r;s++)t.push(this.layerStatusList[s].toJSON());return e+=t,e+="]",e+="}"}}e.SetLayerStatusParameters=jr;
  937. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  938. * This program are made available under the terms of the Apache License, Version 2.0
  939. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  940. class Jr extends He{constructor(e,t){super(e,t),this.lastparams=null,this.mapUrl=e,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.SetLayerStatusService"}destroy(){super.destroy(),V.reset(this)}processAsync(e){if(e instanceof jr){var t=this;if(t.url=t.mapUrl,null==e.resourceID)t.url=V.urlPathAppend(t.url,"tempLayersSet"),t.lastparams=e,t.request({method:"POST",scope:t,success:t.createTempLayerComplete,failure:t.serviceProcessFailed});else{t.url=V.urlPathAppend(t.url,"tempLayersSet/"+e.resourceID),t.url=V.urlAppend(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=V.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 s=t.lastIndexOf("/");return t.substring(s+1,t.length)}serviceProcessCompleted(e){null!=(e=V.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}e.SetLayerStatusService=Jr;
  941. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  942. * This program are made available under the terms of the Apache License, Version 2.0
  943. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  944. class zr{constructor(e){e&&(this.datasetName="",this.datasetQuery="",this.geometryQuery="",this.mode=n.CONTAIN,this.output=null,this.mappingParameters=null,V.extend(this,e),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsParameter")}destroy(){this.datasetName=null,this.datasetQuery=null,this.geometryQuery=null,this.mode=null,this.output instanceof nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.SingleObjectQueryJobsParameter=zr;
  945. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  946. * This program are made available under the terms of the Apache License, Version 2.0
  947. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  948. class Wr extends ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/query"),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsService"}destroy(){super.destroy()}getQueryJobs(){super.getJobs(this.url)}getQueryJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addQueryJob(e,t){super.addJob(this.url,e,zr,t)}}e.SingleObjectQueryJobsService=Wr;
  949. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  950. * This program are made available under the terms of the Apache License, Version 2.0
  951. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  952. class Vr{constructor(e){e=e||{},this.keyWord=null,this.returnPosition=!1,V.extend(this,e),this.CLASS_NAME="SuperMap.StopQueryParameters"}destroy(){V.reset(this)}}e.StopQueryParameters=Vr;
  953. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  954. * This program are made available under the terms of the Apache License, Version 2.0
  955. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  956. class qr extends He{constructor(e,t){super(e,t),t=t||{},V.extend(this,t),this.CLASS_NAME="SuperMap.StopQueryService"}destroy(){super.destroy(),V.reset(this)}processAsync(e){if(e instanceof Vr){var t=this;t.url=V.urlPathAppend(t.url,"stops/keyword/"+e.keyWord),t.request({method:"GET",params:{returnPosition:e.returnPosition},scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}e.StopQueryService=qr;
  957. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  958. * This program are made available under the terms of the Apache License, Version 2.0
  959. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  960. class Yr{constructor(e){e&&(this.datasetName="",this.groupField="",this.attributeField="",this.statisticModes="",this.output=null,this.mappingParameters=null,V.extend(this,e),this.CLASS_NAME="SuperMap.SummaryAttributesJobsParameter")}destroy(){this.datasetName=null,this.groupField=null,this.attributeField=null,this.statisticModes=null,this.output instanceof nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.SummaryAttributesJobsParameter=Yr;
  961. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  962. * This program are made available under the terms of the Apache License, Version 2.0
  963. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  964. class Xr extends ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/summaryattributes"),this.CLASS_NAME="SuperMap.SummaryAttributesJobsService"}destroy(){super.destroy()}getSummaryAttributesJobs(){super.getJobs(this.url)}getSummaryAttributesJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addSummaryAttributesJob(e,t){super.addJob(this.url,e,Yr,t)}}e.SummaryAttributesJobsService=Xr;
  965. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  966. * This program are made available under the terms of the Apache License, Version 2.0
  967. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  968. class Qr{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.query="",this.resolution=100,this.meshType=0,this.statisticModes=R.AVERAGE,this.fields="",this.type=D.SUMMARYMESH,this.output=null,this.mappingParameters=null,V.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 nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s?"output"!==s?("SUMMARYMESH"===e.type&&"regionDataset"!==s||"SUMMARYREGION"===e.type&&!r(["meshType","resolution","query"],s))&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s]);function r(e,t){for(var s=e.length;s--;)if(e[s]===t)return!0;return!1}}}e.SummaryMeshJobParameter=Qr;
  969. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  970. * This program are made available under the terms of the Apache License, Version 2.0
  971. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  972. class Kr extends ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/aggregatepoints"),this.CLASS_NAME="SuperMap.SummaryMeshJobsService"}destroy(){super.destroy()}getSummaryMeshJobs(){super.getJobs(this.url)}getSummaryMeshJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addSummaryMeshJob(e,t){super.addJob(this.url,e,Qr,t)}}e.SummaryMeshJobsService=Kr;
  973. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  974. * This program are made available under the terms of the Apache License, Version 2.0
  975. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  976. class Zr{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=F.METER,this.type=D.SUMMARYMESH,this.output=null,this.mappingParameters=null,V.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 nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s&&"type"!==s?"output"!==s?("SUMMARYREGION"===e.type||"SUMMARYMESH"===e.type&&"regionDataset"!==s)&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s])}}e.SummaryRegionJobParameter=Zr;
  977. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  978. * This program are made available under the terms of the Apache License, Version 2.0
  979. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  980. class $r extends ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/summaryregion"),this.CLASS_NAME="SuperMap.SummaryRegionJobsService"}destroy(){super.destroy()}getSummaryRegionJobs(){super.getJobs(this.url)}getSummaryRegionJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addSummaryRegionJob(e,t){super.addJob(this.url,e,Zr,t)}}e.SummaryRegionJobsService=$r;
  981. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  982. * This program are made available under the terms of the Apache License, Version 2.0
  983. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  984. class ei{constructor(e){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null,e&&V.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 ei({maxWeight:e.maxWeight,nodeID:e.nodeID,resourceValue:e.resourceValue,type:e.type})}}e.SupplyCenter=ei;
  985. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  986. * This program are made available under the terms of the Apache License, Version 2.0
  987. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  988. class ti extends Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.SurfaceAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Pt){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="",s={},r=this;if(e instanceof Ot)r.url=V.urlPathAppend(r.url,"datasets/"+e.dataset+"/"+e.surfaceAnalystMethod.toLowerCase()),Ot.toObject(e,s),t=V.toJSON(s);else{if(!(e instanceof ds))return;r.url=V.urlPathAppend(r.url,"geometry/"+e.surfaceAnalystMethod.toLowerCase()),t=V.toJSON(e)}return r.url=V.urlAppend(r.url,"returnContent=true"),t}}e.SurfaceAnalystService=ti;
  989. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  990. * This program are made available under the terms of the Apache License, Version 2.0
  991. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  992. class si{constructor(e){e&&(this.dataset=null,this.zFactor=1,this.averageCurvatureName=null,this.profileCurvatureName="",this.planCurvatureName="",this.deleteExistResultDataset=!1,V.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 s in e)"dataset"!==s&&(t[s]=e[s])}}e.TerrainCurvatureCalculationParameters=si;
  993. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  994. * This program are made available under the terms of the Apache License, Version 2.0
  995. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  996. class ri extends Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationService"}destroy(){super.destroy()}processAsync(t){var s=this,r={};t instanceof si&&(s.url=V.urlPathAppend(s.url,"datasets/"+t.dataset+"/terraincalculation/curvature")),si.toObject(t,r);var i=e.Util.toJSON(r);s.url=V.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:i,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}e.TerrainCurvatureCalculationService=ri;
  997. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  998. * This program are made available under the terms of the Apache License, Version 2.0
  999. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1000. class ii{constructor(e){this.caption=null,this.color=new me,this.end=0,this.start=0,this.visible=!0,e&&V.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=V.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){if(e){var t=new ii;return V.copy(t,e),t.color=me.fromJson(e.color),t}}}e.ThemeGridRangeItem=ii;
  1001. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1002. * This program are made available under the terms of the Apache License, Version 2.0
  1003. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1004. class ai extends Is{constructor(e){super("GRIDRANGE",e),this.items=null,this.rangeMode=m.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=y.YELLOW_RED,this.reverseColor=!1,e&&V.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 ai;V.copy(t,e);var s=e.items,r=s?s.length:0;t.items=[];for(var i=0;i<r;i++)t.items.push(ii.fromObj(s[i]));return t}}}e.ThemeGridRange=ai;
  1005. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1006. * This program are made available under the terms of the Apache License, Version 2.0
  1007. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1008. class ni{constructor(e){this.caption=null,this.color=new me,this.unique=null,this.visible=!0,e&&V.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=V.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){var t=new ni;return V.copy(t,e),t.color=me.fromJson(e.color),t}}e.ThemeGridUniqueItem=ni;
  1009. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1010. * This program are made available under the terms of the Apache License, Version 2.0
  1011. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1012. class oi extends Is{constructor(e){super("GRIDUNIQUE",e),this.defaultcolor=new me,this.items=null,e&&V.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=V.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],s=e.items.length,r=0;r<s;r++)t.push(e.items[r].toServerJSONObject());e.items=t}return e}static fromObj(e){var t=new oi,s=e.items,r=s?s.length:0;V.extend(t,e),t.items=[],t.defaultcolor=me.fromJson(e.defaultcolor);for(var i=0;i<r;i++)t.items.push(ni.fromObj(s[i]));return t}}e.ThemeGridUnique=oi;
  1013. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1014. * This program are made available under the terms of the Apache License, Version 2.0
  1015. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1016. class li{constructor(e){this.caption=null,this.unique=null,this.offsetX=0,this.offsetY=0,this.visible=!0,this.style=new Fs,e&&V.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 li;return V.copy(t,e),t}}}e.ThemeLabelUniqueItem=li;
  1017. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1018. * This program are made available under the terms of the Apache License, Version 2.0
  1019. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1020. class hi{constructor(e){this.datasetNames=null,this.dataSourceNames=null,this.joinItems=null,this.themes=null,this.displayFilters=null,this.displayOrderBys=null,this.fieldValuesDisplayFilter=null,e&&V.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,s=e.joinItems,r=s.length;t<r;t++)s[t].destroy();e.joinItems=null}if(e.themes){for(let t=0,s=e.themes,r=s.length;t<r;t++)s[t].destroy();e.themes=null}}}e.ThemeParameters=hi;
  1021. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1022. * This program are made available under the terms of the Apache License, Version 2.0
  1023. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1024. class ui extends He{constructor(t,s){super(t,s),s&&e.Util.extend(this,s),this.url=V.urlPathAppend(this.url,"tempLayersSet"),this.CLASS_NAME="SuperMap.ThemeService"}destroy(){super.destroy()}processAsync(e){if(e instanceof hi){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t,s="",r=null,i=null,a=null;s+="[{'type': 'UGC','subLayers': {'layers': [";for(var n=0;n<e.themes.length;n++){r=e.themes[n];var o=V.toJSON(r);if(s+="{'theme': "+(o=o.slice(0,-1))+"},'type': 'UGC','ugcLayerType': 'THEME',",(i=e.displayFilters)&&i.length>0&&(1===i.length?s+="'displayFilter':\""+i[0]+'",':s+="'displayFilter':\""+i[n]+'",'),(a=e.displayOrderBy)&&a.length>0&&(1===a.length?s+="'displayOrderBy':'"+a[0]+"',":s+="'displayOrderBy':'"+a[n]+"',"),(t=e.fieldValuesDisplayFilter)&&(s+="'fieldValuesDisplayFilter':"+V.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[n]&&(s+="'joinItems':["+V.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;s+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[h]+"'}},"}else s+="},"}e.themes&&e.themes.length>0&&(s=s.substring(0,s.length-1)),s+="]},";var u=this.url.split("/");return s+="'name': '"+u[u.length-2]+"'}]"}}e.ThemeService=ui;
  1025. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1026. * This program are made available under the terms of the Apache License, Version 2.0
  1027. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1028. class ci extends Ye{constructor(e,t){super(e,t),this.mode=null,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.ThiessenAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof Mt?(s.mode="datasets",s.url=V.urlPathAppend(s.url,"datasets/"+e.dataset+"/thiessenpolygon"),Mt.toObject(e,t)):e instanceof ms&&(s.mode="geometry",s.url=V.urlPathAppend(s.url,"geometry/thiessenpolygon"),ms.toObject(e,t));var r=V.toJSON(t);s.url=V.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}e.ThiessenAnalystService=ci;
  1029. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1030. * This program are made available under the terms of the Apache License, Version 2.0
  1031. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1032. class pi extends Ye{constructor(e,t){super(e,t),t&&V.extend(this,t),this.CLASS_NAME="SuperMap.GeometryBatchAnalystService"}processAsync(e){var t=this;t.url=V.urlPathAppend(t.url,"geometry/batchanalyst"),t.url=V.urlAppend(t.url,"returnContent=true&ignoreAnalystParam=true");var s=t._processParams(e),r=V.toJSON(s);t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}_processParams(e){var t=this;if(V.isArray(e)){var s=[];return e.map(function(e){return s.push(t._toJSON(e)),e}),s}}_toJSON(e){var t={};if("buffer"===e.analystName)t.analystName="buffer",t.param={},it.toObject(e.param,t.param);else if("overlay"===e.analystName)t.analystName="overlay",t.param={},ps.toObject(e.param,t.param);else if("interpolationDensity"===e.analystName)t.analystName="interpolationDensity",t.param={},hr.toObject(e.param,t.param);else if("interpolationidw"===e.analystName)t.analystName="interpolationidw",t.param={},hr.toObject(e.param,t.param);else if("interpolationRBF"===e.analystName)t.analystName="interpolationRBF",t.param={},hr.toObject(e.param,t.param);else if("interpolationKriging"===e.analystName)t.analystName="interpolationKriging",t.param={},hr.toObject(e.param,t.param);else{if("thiessenpolygon"!==e.analystName)return e;t.analystName="thiessenpolygon",t.param={},ms.toObject(e.param,t.param)}return t}destroy(){super.destroy()}}e.GeometryBatchAnalystService=pi;
  1033. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1034. * This program are made available under the terms of the Apache License, Version 2.0
  1035. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1036. class di extends He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TilesetsService"}destroy(){super.destroy()}processAsync(){if(this.url){var e=this;e.url=V.urlPathAppend(e.url,"tilesets"),e.request({method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}e.TilesetsService=di;
  1037. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1038. * This program are made available under the terms of the Apache License, Version 2.0
  1039. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1040. class mi{constructor(e){e&&(this.datasetName="",this.datasetTopology="",this.tolerance="",this.rule=k.REGIONNOOVERLAP,this.output=null,this.mappingParameters=null,V.extend(this,e),this.CLASS_NAME="SuperMap.TopologyValidatorJobsParameter")}destroy(){this.datasetName=null,this.datasetTopology=null,this.tolerance=null,this.rule=null,this.output instanceof nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.TopologyValidatorJobsParameter=mi;
  1041. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1042. * This program are made available under the terms of the Apache License, Version 2.0
  1043. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1044. class yi extends ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/topologyvalidator"),this.CLASS_NAME="SuperMap.TopologyValidatorJobsService"}destroy(){super.destroy()}getTopologyValidatorJobs(){super.getJobs(this.url)}getTopologyValidatorJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addTopologyValidatorJob(e,t){super.addJob(this.url,e,mi,t)}}e.TopologyValidatorJobsService=yi;
  1045. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1046. * This program are made available under the terms of the Apache License, Version 2.0
  1047. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1048. class fi{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,V.extend(this,e),this.CLASS_NAME="SuperMap.TransferLine"}destroy(){V.reset(this)}static fromJson(e){if(e)return new fi({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})}}e.TransferLine=fi;
  1049. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1050. * This program are made available under the terms of the Apache License, Version 2.0
  1051. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1052. class gi{constructor(e){e=e||{},this.transferLines=null,this.points=null,V.extend(this,e),this.CLASS_NAME="SuperMap.TransferPathParameters"}destroy(){V.reset(this)}static toJson(e){if(e)return V.toJSON(e)}}e.TransferPathParameters=gi;
  1053. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1054. * This program are made available under the terms of the Apache License, Version 2.0
  1055. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1056. class vi extends He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof gi){var t,s=this;s.url=V.urlPathAppend(s.url,"path"),t={points:V.toJSON(e.points),transferLines:V.toJSON(e.transferLines)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.TransferPathService=vi;
  1057. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1058. * This program are made available under the terms of the Apache License, Version 2.0
  1059. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1060. class Si{constructor(e){e=e||{},this.solutionCount=6,this.transferPreference=L.NONE,this.transferTactic=w.LESS_TIME,this.walkingRatio=null,this.points=!1,this.evadeLines=null,this.evadeStops=null,this.priorLines=null,this.priorStops=null,this.travelTime=null,V.extend(this,e),this.CLASS_NAME="SuperMap.TransferSolutionParameters"}destroy(){V.reset(this)}static toJson(e){if(e)return V.toJSON(e)}}e.TransferSolutionParameters=Si;
  1061. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1062. * This program are made available under the terms of the Apache License, Version 2.0
  1063. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1064. class bi extends He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferSolutionService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Si){var t,s=this;s.url=V.urlPathAppend(s.url,"solutions"),t={points:V.toJSON(e.points),walkingRatio:e.walkingRatio,transferTactic:e.transferTactic,solutionCount:e.solutionCount,transferPreference:e.transferPreference},e.evadeLines&&(t.evadeLines=V.toJSON(e.evadeLines)),e.evadeStops&&(t.evadeStops=V.toJSON(e.evadeStops)),e.priorLines&&(t.priorLines=V.toJSON(e.priorLines)),e.priorStops&&(t.priorStops=V.toJSON(e.priorStops)),e.travelTime&&(t.travelTime=e.travelTime),s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.TransferSolutionService=bi;
  1065. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1066. * This program are made available under the terms of the Apache License, Version 2.0
  1067. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1068. class xi{constructor(e){e&&(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",V.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}e.UpdateEdgeWeightParameters=xi;
  1069. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1070. * This program are made available under the terms of the Apache License, Version 2.0
  1071. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1072. class Ci extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof xi){var t=this,s=t.parse(e);t.url=V.urlPathAppend(t.url,s);var r=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:r,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var s in e)if(""!==e[s]&&"edgeWeight"!==e[s])switch(s){case"edgeId":t+="/edgeweight/"+e[s];break;case"fromNodeId":t+="/fromnode/"+e[s];break;case"toNodeId":t+="/tonode/"+e[s];break;case"weightField":t+="/weightfield/"+e[s]}return t}}}e.UpdateEdgeWeightService=Ci;
  1073. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1074. * This program are made available under the terms of the Apache License, Version 2.0
  1075. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1076. class _i{constructor(e){e&&(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",V.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}e.UpdateTurnNodeWeightParameters=_i;
  1077. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1078. * This program are made available under the terms of the Apache License, Version 2.0
  1079. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1080. class Ti extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _i){var t=this,s=t.parse(e);t.url=V.urlPathAppend(t.url,s);var r=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:r,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var s in e)if(""!==e[s]&&"turnNodeWeight"!==e[s])switch(s){case"nodeId":t+="/turnnodeweight/"+e[s];break;case"fromEdgeId":t+="/fromedge/"+e[s];break;case"toEdgeId":t+="/toedge/"+e[s];break;case"weightField":t+="/weightfield/"+e[s]}return t}}}e.UpdateTurnNodeWeightService=Ti;
  1081. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1082. * This program are made available under the terms of the Apache License, Version 2.0
  1083. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1084. class Ei{constructor(e){e=e||{},this.datasetName="",this.datasetVectorClip="",this.geometryClip="",this.mode=M.CLIP,this.output=null,this.mappingParameters=null,V.extend(this,e),this.CLASS_NAME="SuperMap.VectorClipJobsParameter"}destroy(){this.datasetName=null,this.datasetVectorClip=null,this.geometryClip=null,this.mode=null,this.output instanceof nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.VectorClipJobsParameter=Ei;
  1085. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1086. * This program are made available under the terms of the Apache License, Version 2.0
  1087. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1088. class Ai extends ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/vectorclip"),this.CLASS_NAME="SuperMap.VectorClipJobsService"}destroy(){super.destroy()}getVectorClipJobs(){super.getJobs(this.url)}getVectorClipJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addVectorClipJob(e,t){super.addJob(this.url,e,Ei,t)}}e.VectorClipJobsService=Ai;
  1089. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1090. * This program are made available under the terms of the Apache License, Version 2.0
  1091. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1092. class wi{constructor(e){e=e||{},this.type=null,V.extend(this,e),this.CLASS_NAME="SuperMap.RasterFunctionParameter"}destroy(){this.type=null}}e.RasterFunctionParameter=wi;e.NDVIParameter=
  1093. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1094. * This program are made available under the terms of the Apache License, Version 2.0
  1095. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1096. class extends wi{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=U.NDVI,V.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}}};e.HillshadeParameter=
  1097. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1098. * This program are made available under the terms of the Apache License, Version 2.0
  1099. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1100. class extends wi{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.zFactor=1,this.type=U.HILLSHADE,V.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}}};
  1101. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1102. * This program are made available under the terms of the Apache License, Version 2.0
  1103. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1104. class Li{constructor(e){this.name=null,this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobCustomItems",V.extend(this,e)}destroy(){this.name=null,this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={name:this.name};return this.title&&(e.title=this.title),this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),V.toJSON(e)}}e.WebPrintingJobCustomItems=Li;
  1105. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1106. * This program are made available under the terms of the Apache License, Version 2.0
  1107. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1108. class Pi{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobImage",V.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl&&(e.picAsUrl=this.picAsUrl),this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),V.toJSON(e)}}e.WebPrintingJobImage=Pi;
  1109. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1110. * This program are made available under the terms of the Apache License, Version 2.0
  1111. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1112. class Oi{constructor(e){this.name=null,this.layerType=null,this.url=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayers",V.extend(this,e)}destroy(){this.name=null,this.layerType=null,this.url=null}}e.WebPrintingJobLayers=Oi;
  1113. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1114. * This program are made available under the terms of the Apache License, Version 2.0
  1115. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1116. class Ni{constructor(e){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers=null,this.customItems=null,this.CLASS_NAME="SuperMap.WebPrintingJobLegendOptions",V.extend(this,e)}destroy(){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers instanceof Oi&&(this.layers.destroy(),this.layers=null),this.customItems instanceof Li&&(this.customItems.destroy(),this.customItems=null)}toJSON(){var e={title:this.title||""};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64?e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,""):this.customItems&&(e.customItems=this.customItems),V.toJSON(e)}}e.WebPrintingJobLegendOptions=Ni;
  1117. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1118. * This program are made available under the terms of the Apache License, Version 2.0
  1119. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1120. class Mi{constructor(e){this.center=null,this.scale=null,this.layerNames=null,this.image=null,this.layers=null,this.CLASS_NAME="SuperMap.WebPrintingJobLittleMapOptions",V.extend(this,e)}destroy(){this.center=null,this.scale=null,this.layerNames=null,this.image instanceof Pi&&(this.image.destroy(),this.image=null),this.layers instanceof Oi&&(this.layers.destroy(),this.layers=null)}toJSON(){var e={scale:this.scale,center:this.center};return this.layerNames?e.layerNames=this.layerNames:this.layers&&(e.layers=this.layers),this.image&&(e.image=this.image),V.toJSON(e)}}e.WebPrintingJobLittleMapOptions=Mi;
  1121. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1122. * This program are made available under the terms of the Apache License, Version 2.0
  1123. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1124. class Ii{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobNorthArrowOptions",V.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),V.toJSON(e)}}e.WebPrintingJobNorthArrowOptions=Ii;
  1125. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1126. * This program are made available under the terms of the Apache License, Version 2.0
  1127. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1128. class Fi{constructor(e){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null,this.CLASS_NAME="SuperMap.WebPrintingJobScaleBarOptions",V.extend(this,e)}destroy(){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null}toJSON(){var e={scaleText:this.scaleText||"",type:this.type||"BAR",intervals:this.intervals||"",unit:this.unit||"METER"};return this.orientation&&(e.orientation=this.orientation),V.toJSON(e)}}e.WebPrintingJobScaleBarOptions=Fi;
  1129. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1130. * This program are made available under the terms of the Apache License, Version 2.0
  1131. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1132. class Ri{constructor(e){this.type=null,this.url=null,this.token=null,this.value=null,this.CLASS_NAME="SuperMap.WebPrintingJobContent",V.extend(this,e)}destroy(){this.type="WEBMAP",this.url=null,this.token=null,this.value=null}toJSON(){var e={type:this.type};return this.token&&(e.token=this.token),this.url?e.url=this.url:this.value&&(e.value=this.value),V.toJSON(e)}}e.WebPrintingJobContent=Ri;
  1133. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1134. * This program are made available under the terms of the Apache License, Version 2.0
  1135. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1136. class Di{constructor(e){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions=null,this.northArrowOptions=null,this.littleMapOptions=null,this.legendOptions=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayoutOptions",V.extend(this,e)}destroy(){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions instanceof Fi&&(this.scaleBarOptions.destroy(),this.scaleBarOptions=null),this.northArrowOptions instanceof Ii&&(this.northArrowOptions.destroy(),this.northArrowOptions=null),this.littleMapOptions instanceof Mi&&(this.littleMapOptions.destroy(),this.littleMapOptions=null),this.legendOptions instanceof Ni&&(this.legendOptions.destroy(),this.legendOptions=null)}toJSON(){var e={templateName:this.templateName,title:this.title,subTitle:this.subTitle,author:this.author,copyright:this.copyright};return this.scaleBarOptions&&(e.scaleBarOptions=this.scaleBarOptions),this.northArrowOptions&&(e.northArrowOptions=this.northArrowOptions),this.littleMapOptions&&(e.littleMapOptions=this.littleMapOptions),this.legendOptions&&(e.legendOptions=this.legendOptions),V.toJSON(e)}}e.WebPrintingJobLayoutOptions=Di;
  1137. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1138. * This program are made available under the terms of the Apache License, Version 2.0
  1139. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1140. class ki{constructor(e){this.format=null,this.dpi=96,this.scale=null,this.rotation=null,this.center=null,this.CLASS_NAME="SuperMap.WebPrintingJobExportOptions",V.extend(this,e)}destroy(){this.format=null,this.dpi=null,this.scale=null,this.rotation=null,this.center=null,this.outputSize=null}toJSON(){var e={format:this.format||"PDF",dpi:this.dpi,scale:this.scale,center:this.center};return this.rotation&&(e.rotation=this.rotation),this.outputSize&&(e.outputSize=this.outputSize),V.toJSON(e)}}e.WebPrintingJobExportOptions=ki;e.WebPrintingJobParameters=
  1141. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1142. * This program are made available under the terms of the Apache License, Version 2.0
  1143. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1144. class{constructor(e){e&&(this.content=null,this.layoutOptions=null,this.exportOptions=null,V.extend(this,e),this.CLASS_NAME="SuperMap.WebPrintingJobParameters")}destroy(){this.content instanceof Ri&&(this.content.destroy(),this.content=null),this.layoutOptions instanceof Di&&(this.layoutOptions.destroy(),this.layoutOptions=null),this.exportOptions instanceof ki&&(this.exportOptions.destroy(),this.exportOptions=null)}};
  1145. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1146. * This program are made available under the terms of the Apache License, Version 2.0
  1147. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1148. class Bi extends He{constructor(e,t){super(e,t),t&&V.extend(this,t),this.CLASS_NAME="SuperMap.WebPrintingService",this.url}destroy(){super.destroy()}createWebPrintingJob(e){if(e){e.layoutOptions&&e.layoutOptions.legendOptions&&(!e.layoutOptions.legendOptions.title&&(e.layoutOptions.legendOptions.title=""),e.layoutOptions.legendOptions.picAsBase64=e.layoutOptions.legendOptions.picAsBase64&&e.layoutOptions.legendOptions.picAsBase64.replace(/^data:.+;base64,/,""),e.layoutOptions.legendOptions.customItems&&e.layoutOptions.legendOptions.customItems.hasOwnProperty("picAsBase64")&&(e.layoutOptions.legendOptions.customItems.picAsBase64=e.layoutOptions.legendOptions.customItems.picAsBase64.replace(/^data:.+;base64,/,"")));var t=this;t.request({url:t._processUrl("jobs"),method:"POST",data:V.toJSON(e),scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}getPrintingJob(e){var t=this,s=t._processUrl(`jobs/${e}`);t.request({url:s,method:"GET",scope:t,success:function(e){t.rollingProcess(e,s)},failure:t.serviceProcessFailed})}getPrintingJobResult(e){var t=this;t.request({url:t._processUrl(`jobs/${e}/result`),method:"GET",scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}getLayoutTemplates(){var e=this;e.request({url:e._processUrl("layouts"),method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}rollingProcess(e,t){var s=this;if(e)var r=setInterval(function(){s.request({url:t,method:"GET",scope:s,success:function(e){switch(e.status){case"FINISHED":clearInterval(r),s.serviceProcessCompleted(e);break;case"ERROR":clearInterval(r),s.serviceProcessFailed(e);break;case"RUNNING":s.events.triggerEvent("processRunning",e)}},failure:s.serviceProcessFailed})},1e3)}_processUrl(e){return e?V.urlPathAppend(this.url,e):this.url}}e.WebPrintingService=Bi;
  1149. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1150. * This program are made available under the terms of the Apache License, Version 2.0
  1151. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1152. e.ServiceStatus={DOES_NOT_INVOLVE:"DOES_NOT_INVOLVE",PUBLISH_FAILED:"PUBLISH_FAILED",PUBLISHED:"PUBLISHED",PUBLISHING:"PUBLISHING",UNPUBLISHED:"UNPUBLISHED",UNPUBLISHED_FAILED:"UNPUBLISHED_FAILED"},e.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"},e.DataItemOrderBy={FILENAME:"FILENAME",ID:"ID",LASTMODIFIEDTIME:"LASTMODIFIEDTIME",NICKNAME:"NICKNAME",SERVICESTATUS:"SERVICESTATUS",SIZE:"SIZE",STATUS:"STATUS",TYPE:"TYPE",UPDATETIME:"UPDATETIME",USERNAME:"USERNAME"},e.FilterField={LINKPAGE:"LINKPAGE",MAPTITLE:"MAPTITLE",NICKNAME:"NICKNAME",RESTITLE:"RESTITLE",USERNAME:"USERNAME"};
  1153. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1154. * This program are made available under the terms of the Apache License, Version 2.0
  1155. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1156. class Gi{constructor(e){e=e||{},V.extend(this,e),this.serverType=r.ONLINE,this.CLASS_NAME="SuperMap.OnlineServiceBase"}request(e,t,s,r={}){return t=this.createCredentialUrl(t),r.crossOrigin=this.options.crossOrigin,r.headers=this.options.headers,Ae.commit(e,t,s,r).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,s=this.getCredential();if(s){var r="key="+s,i=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===i?t+=r:t.indexOf("?")>-1&&"?"!==i?t+="&"+r:t+="?"+r}return t}getCredential(){}}e.OnlineServiceBase=Gi;
  1157. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1158. * This program are made available under the terms of the Apache License, Version 2.0
  1159. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1160. class Ui extends Gi{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,V.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){V.extend(e,t)})}}getPublishedServices(){return this.dataItemServices}getAuthorizeSetting(){return this.authorizeSetting}}e.OnlineData=Ui;e.Online=
  1161. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1162. * This program are made available under the terms of the Apache License, Version 2.0
  1163. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1164. class{constructor(){this.rootUrl="https://www.supermapol.com",this.webUrl=this.rootUrl+"/web";var e=this.webUrl+"/mycontent";this.mDatasUrl=e+"/datas",this.CLASS_NAME="SuperMap.Online"}load(){return Ae.get(this.rootUrl).then(function(e){return e})}login(){we.loginOnline(this.rootUrl,!0)}queryDatas(e){var t=this,s=t.mDatasUrl;return e&&(e=e.toJSON()),Ae.get(s,e).then(function(e){if(e&&e.content&&!(e.content.length<1)){for(var s=[],r=e.content,i=r.length,a=0;a<i;a++){var n=r[a],o=new Ui(t.mDatasUrl,n);s.push(o)}return s}})}};e.OnlineQueryDatasParameter=
  1165. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1166. * This program are made available under the terms of the Apache License, Version 2.0
  1167. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1168. class{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,V.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 s in t)null==t[s]&&delete t[s];return t}};e.KeyServiceParameter=
  1169. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1170. * This program are made available under the terms of the Apache License, Version 2.0
  1171. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1172. class{constructor(e){this.name=null,this.serviceIds=null,this.clientType=N.SERVER,this.limitation=null,V.extend(this,e),this.CLASS_NAME="SuperMap.KeyServiceParameter"}toJSON(){return{name:this.name,serviceIds:this.serviceIds,clientType:this.clientType,limitation:this.limitation}}};e.ServerInfo=
  1173. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1174. * This program are made available under the terms of the Apache License, Version 2.0
  1175. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1176. class{constructor(e,t){this.type=e,this.server=null,this.tokenServiceUrl=null,this.keyServiceUrl=null,V.extend(this,t),this.CLASS_NAME="SuperMap.ServerInfo",this.type=this.type||r.ISERVER,this.server||console.error("server url require is not undefined");var s="/services/security/tokens";this.type===r.ISERVER&&this.server.indexOf("iserver")<0&&(s="/iserver"+s),this.tokenServiceUrl||(this.tokenServiceUrl=V.urlPathAppend(this.server,s)),this.keyServiceUrl||(this.type===r.IPORTAL?this.keyServiceUrl=V.urlPathAppend(this.server,"/web/mycontent/keys/register"):this.type===r.ONLINE&&(this.keyServiceUrl=V.urlPathAppend(this.server,"/web/mycontent/keys")))}};e.TokenServiceParameter=
  1177. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1178. * This program are made available under the terms of the Apache License, Version 2.0
  1179. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1180. class{constructor(e){this.userName=null,this.password=null,this.clientType=N.NONE,this.ip=null,this.referer=null,this.expiration=60,V.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}}};const Hi=function(){try{return elasticsearch}catch(e){return{}}}();var ji=s.n(Hi);e.ElasticSearch=
  1181. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1182. * This program are made available under the terms of the Apache License, Version 2.0
  1183. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1184. class{constructor(e,t){t=t||{},this.url=e,this.client=new(ji().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 he(this,null,this.EVENT_TYPES),this.eventListeners=null,V.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 s=this;return s.client.msearch(e).then(function(e){return s._update(e.responses,t),e},function(e){return t(e),s.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 s=this;return s.client.search(e).then(function(e){return s._update(e.responses,t),e},function(e){return t(e),s.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 s=this;e&&(s.data=e,s.openGeoFence&&s.geoFence&&s._validateDatas(e),s.events.triggerEvent("change",{data:s.data}),s.change?s.change&&s.change(e):t&&t(void 0,{responses:e}))}_validateDatas(e){if(e){e instanceof Array||(e=[e]);var t,s=e.length;for(t=0;t<s;t++)this._validateData(e[t])}}_validateData(e){let t=this;e.hits.hits.map(function(s){let r=s._source,i=t._getMeterPerMapUnit(t.geoFence.unit),a=t.geoFence.center[0]*i,n=t.geoFence.center[1]*i,o=r.x*i,l=r.y*i;return t._distance(o,l,a,n)>t.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),s})}_distance(e,t,s,r){return Math.sqrt((e-s)*(e-s)+(t-r)*(t-r))}_getMeterPerMapUnit(e){let t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}};
  1185. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1186. * This program are made available under the terms of the Apache License, Version 2.0
  1187. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1188. class Ji{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 s=e;if(e instanceof Array){s=[];for(var r=0,i=e.length;r<i;r++)s[r]=this.clone(e[r])}else if(!t[Object.prototype.toString.call(e)])for(var a in s={},e)e.hasOwnProperty(a)&&(s[a]=this.clone(e[a]));return s}return e}mergeItem(e,t,s,r){var i=this.BUILTIN_OBJECT;t.hasOwnProperty(s)&&("object"!=typeof e[s]||i[Object.prototype.toString.call(e[s])]?!r&&s in e||(e[s]=t[s]):this.merge(e[s],t[s],r))}merge(e,t,s){for(var r in t)this.mergeItem(e,t,r,s);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 s,r=this._canvas,i=this._pixelCtx,a=this._width,n=this._height,o=this._offsetX,l=this._offsetY;e+o>a&&(a=e+o+100,r.width=a,s=!0),t+l>n&&(n=t+l+100,r.height=n,s=!0),e<-o&&(a+=o=100*Math.ceil(-e/100),r.width=a,s=!0),t<-l&&(n+=l=100*Math.ceil(-t/100),r.height=n,s=!0),s&&i.translate(o,l)}getPixelOffset(){return{x:this._offsetX,y:this._offsetY}}indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0,r=e.length;s<r;s++)if(e[s]===t)return s;return-1}inherits(e,t){var s=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,s)e.prototype[i]=s[i];e.constructor=e}}
  1189. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1190. * This program are made available under the terms of the Apache License, Version 2.0
  1191. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1192. class zi{constructor(){this.util=new Ji,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,s,r,i,a,n){var o=this.util;this._ctx||(this._ctx=o.getContext());for(var l=this._ctx.createRadialGradient(e,t,s,r,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,s,r,i){var a=this.util;this._ctx||(this._ctx=a.getContext());for(var n=this._ctx.createLinearGradient(e,t,s,r),o=0,l=i.length;o<l;o++)n.addColorStop(i[o][0],i[o][1]);return n.__nonRecursion=!0,n}getStepColors(e,t,s){e=this.toRGBA(e),t=this.toRGBA(t),e=this.getData(e);for(var r=[],i=((t=this.getData(t))[0]-e[0])/s,a=(t[1]-e[1])/s,n=(t[2]-e[2])/s,o=(t[3]-e[3])/s,l=0,h=e[0],u=e[1],c=e[2],p=e[3];l<s;l++)r[l]=this.toColor([this.adjust(Math.floor(h),[0,255]),this.adjust(Math.floor(u),[0,255]),this.adjust(Math.floor(c),[0,255]),p.toFixed(4)-0],"rgba"),h+=i,u+=a,c+=n,p+=o;return h=t[0],u=t[1],c=t[2],p=t[3],r[l]=this.toColor([h,u,c,p],"rgba"),r}getGradientColors(e,t){var s=[],r=e.length;if(void 0===t&&(t=20),1===r)s=this.getStepColors(e[0],e[0],t);else if(r>1)for(var i=0,a=r-1;i<a;i++){var n=this.getStepColors(e[i],e[i+1],t);i<a-1&&n.pop(),s=s.concat(n)}return s}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 s=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=s[0],e[2]=s[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=[],s=0;return e.replace(/[\d.]+/g,function(e){s<3?e|=0:e=+e,t[s++]=e}),t}convert(e,t){if(!this.isCalculableColor(e))return e;var s=this.getData(e),r=s[3];return void 0===r&&(r=1),e.indexOf("hsb")>-1?s=this._HSV_2_RGB(s):e.indexOf("hsl")>-1&&(s=this._HSL_2_RGB(s)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?s=this._RGB_2_HSB(s):t.indexOf("hsl")>-1&&(s=this._RGB_2_HSL(s)),s[3]=r,this.toColor(s,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,s=(240&e)<<4,r=15&e;e="#"+((1<<24)+(t<<4)+t+(s<<4)+s+(r<<4)+r).toString(16).slice(1)}return e}lift(e,t){if(!this.isCalculableColor(e))return e;var s=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var r=this.getData(e),i=0;i<3;i++)r[i]=1===s?r[i]*(1-t)|0:(255-r[i])*t+r[i]|0;return"rgb("+r.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,s){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===s&&(s=.5);for(var r=2*(s=1-this.adjust(s,[0,1]))-1,i=this.getData(this.toRGBA(e)),a=this.getData(this.toRGBA(t)),n=i[3]-a[3],o=((r*n==-1?r:(r+n)/(1+r*n))+1)/2,l=1-o,h=[],u=0;u<3;u++)h[u]=i[u]*o+a[u]*l;var c=i[3]*s+a[3]*(1-s);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,s,r=(e=this.normalize(e)).match(this.colorRegExp);if(null===r)throw new Error("The color format error");var i,a=[];if(r[2])i=[(t=r[2].replace("#","").split(""))[0]+t[1],t[2]+t[3],t[4]+t[5]],a=this.map(i,function(e){return zi.prototype.adjust.call(this,parseInt(e,16),[0,255])});else if(r[4]){var n=r[4].split(",");s=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),zi.prototype.adjust.call(this,e,[0,255])}),void 0!==s&&a.push(this.adjust(parseFloat(s),[0,1]))}else if(r[5]||r[6]){var o=(r[5]||r[6]).split(","),l=parseInt(o[0],0)/360,h=o[1],u=o[2];s=o[3],(a=this.map([h,u],function(e){return zi.prototype.adjust.call(this,parseFloat(e)/100,[0,1])})).unshift(l),void 0!==s&&a.push(this.adjust(parseFloat(s),[0,1]))}return a}alpha(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var s=this.getData(this.toRGBA(e));return s[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(s,"rgba")}map(e,t){if("function"!=typeof t)throw new TypeError;for(var s=e?e.length:0,r=0;r<s;r++)e[r]=t(e[r]);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,s,r,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,s=255*n,r=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))),p=0,d=0,m=0;0===l?(p=n,d=c,m=h):1===l?(p=u,d=n,m=h):2===l?(p=h,d=n,m=c):3===l?(p=h,d=u,m=n):4===l?(p=c,d=h,m=n):(p=n,d=h,m=u),t=255*p,s=255*d,r=255*m}return[t,s,r]}_HSL_2_RGB(e){var t,s,r,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,s=255*n,r=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),s=255*this._HUE_2_RGB(l,o,i),r=255*this._HUE_2_RGB(l,o,i-1/3)}return[t,s,r]}_HUE_2_RGB(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),6*s<1?e+6*(t-e)*s:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}_RGB_2_HSB(e){var t,s,r=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(r,i,a),o=Math.max(r,i,a),l=o-n,h=o;if(0===l)t=0,s=0;else{s=l/o;var u=((o-r)/6+l/2)/l,c=((o-i)/6+l/2)/l,p=((o-a)/6+l/2)/l;r===o?t=p-c:i===o?t=1/3+u-p:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,s*=100,h*=100]}_RGB_2_HSL(e){var t,s,r=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(r,i,a),o=Math.max(r,i,a),l=o-n,h=(o+n)/2;if(0===l)t=0,s=0;else{s=h<.5?l/(o+n):l/(2-o-n);var u=((o-r)/6+l/2)/l,c=((o-i)/6+l/2)/l,p=((o-a)/6+l/2)/l;r===o?t=p-c:i===o?t=1/3+u-p:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,s*=100,h*=100]}}var Wi=new zi;class Vi{static createCanvas(e,t){var s=document.createElement("canvas");return s.height=e,s.width=t,s.getContext("2d")}static getLinearGradient(e,t,s,r,i){this._ctx||(this._ctx=this.getContext());for(var a=this._ctx.createLinearGradient(e,t,s,r),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,s){e=Wi.toRGBA(e),t=Wi.toRGBA(t),e=Wi.getData(e);for(var r=[],i=((t=Wi.getData(t))[0]-e[0])/s,a=(t[1]-e[1])/s,n=(t[2]-e[2])/s,o=(t[3]-e[3])/s,l=0,h=e[0],u=e[1],c=e[2],p=e[3];l<s;l++)r[l]=Wi.toColor([Wi.adjust(Math.floor(h),[0,255]),Wi.adjust(Math.floor(u),[0,255]),Wi.adjust(Math.floor(c),[0,255]),p.toFixed(4)-0],"hex"),h+=i,u+=a,c+=n,p+=o;return h=t[0],u=t[1],c=t[2],p=t[3],r[l]=Wi.toColor([h,u,c,p],"hex"),r}static getGradientColors(e,t,s){var r,i,a,n=[],o=e.length;if(void 0!==t){if(o>=t)if("RANGE"===s)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 s=e.length-1-t;n.push(e[s])}}else{for(r=Math.ceil(t/(o-1)),i=0,a=o-1;i<a;i++){var l=this.getStepColors(e[i],e[i+1],r);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}}}e.ColorsPickerUtil=Vi;class qi{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,s){if("offset"===t)return this.getEqInterval(e,s);if("jenks"===t)return this.getJenks(e,s);if("square"===t){return this.getMin(e)>=0&&this.getSqrtInterval(e,s)}if("logarithm"===t){return this.getMin(e)>0&&this.getGeometricProgression(e,s)}}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)}}e.ArrayStatistic=qi;var Yi=function(e){var t;if(e===l.METER)t=1;else if(e===l.DEGREE)t=2*Math.PI*6378137/360;else if(e===l.KILOMETER)t=.001;else if(e===l.INCH)t=1/.025399999918;else{if(e!==l.FOOT)return t;t=.3048}return t};function Xi(e,t=!0,s=!0,r=[-180,180]){var i=r[1],a=r[0],n=i-a;return e===i&&t?e:e===a&&s?e:0===((e-a)%n+n)%n&&t?i:((e-a)%n+n)%n+a}function Qi(e){const t=parseInt(e);let s=parseInt(60*(e-t)),r=parseInt(60*(60*(e-t)-s));return`${t}°${s=0===parseInt(s/10)?`0${s}`:s}'${r=0===parseInt(r/10)?`0${r}`:r}`}
  1193. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1194. * This program are made available under the terms of the Apache License, Version 2.0
  1195. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1196. var Ki=s(52),Zi=s.n(Ki);
  1197. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1198. * This program are made available under the terms of the Apache License, Version 2.0
  1199. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1200. class $i{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(t){var s,r,i,a,n,o,l,h,u,c=this;function p(){a=l[i],n=r,h=r}function d(){l[i]=a,h=r=n}function m(){r>h&&(l[i]=l[i].slice(r-h),h=r)}function y(e){var t,a,n,o;if(e instanceof Function)return e.call(u.parsers);if("string"==typeof e)t=s.charAt(r)===e?e:null,a=1,m();else{if(m(),!(t=e.exec(l[i])))return null;a=t[0].length}if(t){var c=r+=a;for(o=r+l[i].length-a;r<o&&(32===(n=s.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 t?t:1===t.length?t[0]:t}}function f(e){var r,i={index:o,filename:t.filename,message:"Parse error.",line:0,column:-1};for(var a in i)0===e[a]&&(e[a]=i[a]);r=e.filename&&c.env.inputs&&c.env.inputs[e.filename]?c.env.inputs[e.filename]:s,e.line=(r.slice(0,e.index).match(/\n/g)||"").length+1;for(var n=e.index;n>=0&&"\n"!==r.charAt(n);n--)e.column++;return new Error([e.filename,e.line,e.column,e.message].join(";"))}return this.env=t=t||{},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=[],s=a.replace(/\r\n/g,"\n"),t.filename&&(c.env.inputs[t.filename]=s),l=function(e){for(var t,r,i,a,n=0,o=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,h=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,c=0,p=e[0],d=0;d<s.length;)if(o.lastIndex=d,(t=o.exec(s))&&t.index===d&&(d+=t[0].length,p.push(t[0])),i=s.charAt(d),l.lastIndex=h.lastIndex=d,(t=h.exec(s))&&t.index===d)d+=t[0].length,p.push(t[0]);else if(r||"/"!==i||"/"!==(a=s.charAt(d+1))&&"*"!==a||!(t=l.exec(s))||t.index!==d){switch(i){case"{":if(!r){c++,p.push(i);break}case"}":if(!r){c--,p.push(i),e[++n]=p=[];break}case"(":if(!r){r=!0,p.push(i);break}case")":if(r){r=!1,p.push(i);break}default:p.push(i)}d++}else d+=t[0].length,p.push(t[0]);return 0!==c&&(u={index:d-1,type:"Parse",message:c>0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),u)throw f(u);var p=function(e,t){var s=e.specificity,r=t.specificity;return s[0]!=r[0]?r[0]-s[0]:s[1]!=r[1]?r[1]-s[1]:s[2]!=r[2]?r[2]-s[2]:r[3]-s[3]};return(n=new e.CartoCSS.Tree.Ruleset([],y(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"+f(t).message:e.errors.message=f(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(p),t},n},parsers:{primary:function(){for(var e,t=[];(e=y(this.rule)||y(this.ruleset)||y(this.comment))||y(/^[\s\n]+/)||(e=y(this.invalid));)e&&t.push(e);return t},invalid:function(){var t=y(/^[^;\n]*[;\n]/);if(t)return new e.CartoCSS.Tree.Invalid(t,n)},comment:function(){var t;if("/"===s.charAt(r))return"/"===s.charAt(r+1)?new e.CartoCSS.Tree.Comment(y(/^\/\/.*/),!0):(t=y(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new e.CartoCSS.Tree.Comment(t):void 0},entities:{quoted:function(){if('"'===s.charAt(r)||"'"===s.charAt(r)){var t=y(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return t?new e.CartoCSS.Tree.Quoted(t[1]||t[2]):void 0}},field:function(){if(y("[")){var t=y(/(^[^\]]+)/);if(y("]"))return t?new e.CartoCSS.Tree.Field(t[1]):void 0}},comparison:function(){var e=y(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var t=y(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(t)return new e.CartoCSS.Tree.Keyword(t)},call:function(){var t,s;if(t=/^([\w\-]+|%)\(/.exec(l[i])){if("url"===(t=t[1]))return null;r+=t.length;if(y("("),s=y(this.entities.arguments),y(")"))return t?new e.CartoCSS.Tree.Call(t,s,r):void 0}},arguments:function(){for(var e,t=[];e=y(this.expression);){t.push(e);if(!y(","))break}return t},literal:function(){return y(this.entities.dimension)||y(this.entities.keywordcolor)||y(this.entities.hexcolor)||y(this.entities.quoted)},url:function(){var t;if("u"===s.charAt(r)&&y(/^url\(/)){t=y(this.entities.quoted)||y(this.entities.variable)||y(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return y(")")?new e.CartoCSS.Tree.URL(void 0!==t.value||t instanceof e.CartoCSS.Tree.Variable?t:new e.CartoCSS.Tree.Quoted(t)):new e.CartoCSS.Tree.Invalid(t,n,"Missing closing ) in URL.")}},variable:function(){var i,a=r;if("@"===s.charAt(r)&&(i=y(/^@[\w-]+/)))return new e.CartoCSS.Tree.Variable(i,a,t.filename)},hexcolor:function(){var t;if("#"===s.charAt(r)&&(t=y(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.CartoCSS.Tree.Color(t[1])},keywordcolor:function(){var t=l[i].match(/^[a-z]+/);if(t&&t[0]in e.CartoCSS.Tree.Reference.data.colors)return new e.CartoCSS.Tree.Color(e.CartoCSS.Tree.Reference.data.colors[y(/^[a-z]+/)])},dimension:function(){var t=s.charCodeAt(r);if(!(t>57||t<45||47===t)){var i=y(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return i?new e.CartoCSS.Tree.Dimension(i[1],i[2],n):void 0}}},variable:function(){var e;if("@"===s.charAt(r)&&(e=y(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=y(this.entities.call)||y(this.entities.literal),t=y(this.entities.field)||y(this.entities.variable),s=y(this.entities.url)||y(this.entities.keyword);return e||t||s},end:function(){var e;return y(";")||("string"==typeof(e="}")?s.charAt(r)===e:!!e.test(l[i]))},element:function(){var t=y(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(t)return new e.CartoCSS.Tree.Element(t)},attachment:function(){var e=y(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var t,i,a,o,l,h=[],u=new e.CartoCSS.Tree.Filterset,c=[],p=0,d=0;(a=y(this.element))||(l=y(this.zoom))||(o=y(this.filter))||(t=y(this.attachment));){if(p++,a)h.push(a);else if(l)c.push(l),d++;else if(o){var m=u.add(o);if(m)throw f({message:m,index:r-1});d++}else{if(i)throw f({message:"Encountered second attachment name.",index:r-1});i=t}var g=s.charAt(r);if("{"===g||"}"===g||";"===g||","===g)break}if(p)return new e.CartoCSS.Tree.Selector(u,c,h,i,d,n)},filter:function(){p();var s,r,i;if(y("[")&&(s=y(/^[a-zA-Z0-9\-_]+/)||y(this.entities.quoted)||y(this.entities.variable)||y(this.entities.keyword)||y(this.entities.field))&&(s instanceof e.CartoCSS.Tree.Quoted&&(s=new e.CartoCSS.Tree.Field(s.toString())),(r=y(this.entities.comparison))&&(i=y(this.entities.quoted)||y(this.entities.variable)||y(this.entities.dimension)||y(this.entities.keyword)||y(this.entities.field)))){if(!y("]"))throw f({message:"Missing closing ] of filter.",index:n-1});return s.is||(s=new e.CartoCSS.Tree.Field(s)),new e.CartoCSS.Tree.Filter(s,r,i,n,t.filename)}},zoom:function(){p();var t,s;if(y(/^\[\s*zoom/g)&&(t=y(this.entities.comparison))&&(s=y(this.entities.variable)||y(this.entities.dimension))&&y("]"))return new e.CartoCSS.Tree.Zoom(t,s,n);d()},block:function(){var e;if(y("{")&&(e=y(this.primary))&&y("}"))return e},ruleset:function(){var t,s,r=[];for(p();t=y(this.selector);){for(r.push(t);y(this.comment););if(!y(","))break;for(;y(this.comment););}if(t)for(;y(this.comment););if(r.length>0&&(s=y(this.block))){if(1===r.length&&r[0].elements.length&&"Map"===r[0].elements[0].value){var i=new e.CartoCSS.Tree.Ruleset(r,s);return i.isMap=!0,i}return new e.CartoCSS.Tree.Ruleset(r,s)}d()},rule:function(){var i,a,l=s.charAt(r);if(p(),"."!==l&&"#"!==l&&(i=y(this.variable)||y(this.property))){if((a=y(this.value))&&y(this.end))return new e.CartoCSS.Tree.Rule(i,a,n,t.filename);o=r,d()}},font:function(){for(var t,s=[],r=[];t=y(this.entity);)r.push(t);if(s.push(new e.CartoCSS.Tree.Expression(r)),y(","))for(;(t=y(this.expression))&&(s.push(t),y(",")););return new e.CartoCSS.Tree.Value(s)},value:function(){for(var t,s=[];(t=y(this.expression))&&(s.push(t),y(",")););return s.length>1?new e.CartoCSS.Tree.Value(s.map(function(e){return e.value[0]})):1===s.length?new e.CartoCSS.Tree.Value(s):void 0},sub:function(){var e;if(y("(")&&(e=y(this.expression))&&y(")"))return e},multiplication:function(){var t,s,r,i;if(t=y(this.operand)){for(;(r=y("/")||y("*")||y("%"))&&(s=y(this.operand));)i=new e.CartoCSS.Tree.Operation(r,[i||t,s],n);return i||t}},addition:function(){var t,i,a,o;if(t=y(this.multiplication)){for(;(a=y(/^[-+]\s+/)||" "!=s.charAt(r-1)&&(y("+")||y("-")))&&(i=y(this.multiplication));)o=new e.CartoCSS.Tree.Operation(a,[o||t,i],n);return o||t}},operand:function(){return y(this.sub)||y(this.entity)},expression:function(){for(var t,s=[];t=y(this.addition)||y(this.entity);)s.push(t);if(s.length>0)return new e.CartoCSS.Tree.Expression(s)},property:function(){var e=y(/^(([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 s={},r=[];this._toShaders(s,r,t);for(var i=[],a={},n=0,o=t.length;n<o;++n){var l=t[n],h=l.attachment,u=s[r[n]],c=[];if(!a[h]){var p=0;for(var d in u)if("zoom"!==d&&"frames"!==d&&"attachment"!==d&&"elements"!=d)if("layer-index"===d){var m=(u[d].join("\n"),null);Object.defineProperty(c,"layerIndex",{configurable:!0,enumerable:!1,value:m})}else c[p++]=function(e,t){if(!Array.isArray(e))return e;var s=e.join("\n"),r='attributes["FEATUREID"]&&attributes["FEATUREID"]',i=s.indexOf(r);if(i>=0){if(!t.featureFilter){var a=i+r.length,n=s.indexOf(")",a+1),o="featureId&&(featureId"+s.substring(a,n)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!o}})}return{property:d,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+s+";} return _value; ")}}return{property:d,getValue:Function("attributes","zoom","var _value = null;"+s+"; return _value; ")}}(u[d],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[r[n]]=!0}Object.defineProperty(c,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return i}}return null}_toShaders(t,s,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("_");s.push(h);let u=t[h]=t[h]||{};u.zoom=e.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}}e._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"]}},$i.mapnik_reference={version:{latest:e._mapnik_reference_latest,"2.1.1":e._mapnik_reference_latest}},e.CartoCSS=$i,e.CartoCSS.Tree={},e.CartoCSS.Tree.operate=function(e,t,s){switch(e){case"+":return t+s;case"-":return t-s;case"*":return t*s;case"%":return t%s;case"/":return t/s}},e.CartoCSS.Tree.functions={rgb:function(e,t,s){return this.rgba(e,t,s,1)},rgba:function(t,s,r,i){var a=this,n=[t,s,r].map(function(e){return a.number(e)});return i=a.number(i),n.some(isNaN)||isNaN(i)?null:new e.CartoCSS.Tree.Color(n,i)},stop:function(e){var t,s;return arguments.length>1&&(t=arguments[1]),arguments.length>2&&(s=arguments[2]),{is:"tag",val:e,color:t,mode:s,toString:r=>'\n\t<stop value="'+e.ev(r)+'"'+(t?' color="'+t.ev(r)+'" ':"")+(s?' mode="'+s.ev(r)+'" ':"")+"/>"}},hsl:function(e,t,s){return this.hsla(e,t,s,1)},hsla:function(e,t,s,r){if([e=this.number(e)%360/360,t=this.number(t),s=this.number(s),r=this.number(r)].some(isNaN))return null;var i=s<=.5?s*(t+1):s+t-s*t,a=2*s-i;return this.rgba(255*n(e+1/3),255*n(e),255*n(e-1/3),r);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(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(t.toHSL().h)):null},saturation:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(100*t.toHSL().s),"%"):null},lightness:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(100*t.toHSL().l),"%"):null},alpha:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(t.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.s+=t.value/100,s.s=this.clamp(s.s),this.hsla_simple(s)},desaturate:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.s-=t.value/100,s.s=this.clamp(s.s),this.hsla_simple(s)},lighten:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.l+=t.value/100,s.l=this.clamp(s.l),this.hsla_simple(s)},darken:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.l-=t.value/100,s.l=this.clamp(s.l),this.hsla_simple(s)},fadein:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.a+=t.value/100,s.a=this.clamp(s.a),this.hsla_simple(s)},fadeout:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.a-=t.value/100,s.a=this.clamp(s.a),this.hsla_simple(s)},spin:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL(),r=(s.h+t.value)%360;return s.h=r<0?360+r:r,this.hsla_simple(s)},replace:function(e,t,s){return"field"===e.is?e.toString+".replace("+t.toString()+", "+s.toString()+")":e.replace(t,s)},mix:function(t,s,r){var i=r.value/100,a=2*i-1,n=t.toHSL().a-s.toHSL().a,o=((a*n==-1?a:(a+n)/(1+a*n))+1)/2,l=1-o,h=[t.rgb[0]*o+s.rgb[0]*l,t.rgb[1]*o+s.rgb[1]*l,t.rgb[2]*o+s.rgb[2]*l],u=t.alpha*i+s.alpha*(1-i);return new e.CartoCSS.Tree.Color(h,u)},greyscale:function(t){return this.desaturate(t,new e.CartoCSS.Tree.Dimension(100))},"%":function(t){for(var s=Array.prototype.slice.call(arguments,1),r=t.value,i=0;i<s.length;i++)r=r.replace(/%s/,s[i].value).replace(/%[da]/,s[i].toString());return r=r.replace(/%%/g,"%"),new e.CartoCSS.Tree.Quoted(r)},hsla_simple:function(e){return this.hsla(e.h,e.s,e.l,e.a)},number:function(t){return t instanceof e.CartoCSS.Tree.Dimension?parseFloat("%"===t.unit?t.value/100:t.value):"number"==typeof t?t:NaN},clamp:function(e){return Math.min(1,Math.max(0,e))}},e.CartoCSS.Tree.Call=class{constructor(e,t,s){this.is="call",this.name=e,this.args=t,this.index=s}ev(t){for(var s=this.args.map(function(e){return e.ev(t)}),r=0;r<s.length;r++)if("undefined"===s[r].is)return{is:"undefined",value:"undefined"};if(this.name in e.CartoCSS.Tree.functions){if(e.CartoCSS.Tree.functions[this.name].length<=s.length){var i=e.CartoCSS.Tree.functions[this.name].apply(e.CartoCSS.Tree.functions,s);return null===i?(t.error({message:"incorrect arguments given to "+this.name+"()",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):i}return t.error({message:"incorrect number of arguments for "+this.name+"(). "+e.CartoCSS.Tree.functions[this.name].length+" expected.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}}var a=e.CartoCSS.Tree.Reference.mapnikFunctions[this.name];if(void 0===a){var n=Zi()(e.CartoCSS.Tree.Reference.mapnikFunctions),o=this.name,l=n.map(function(t){return[t[0],e.CartoCSS.Tree.Reference.editDistance(o,t[0]),t[1]]}).sort(function(e,t){return e[1]-t[1]});return t.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!==s.length&&-1!==a?(t.error({message:"function "+this.name+"() takes "+a+" arguments and was given "+s.length,index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):(this.args=s,this)}toString(e,t){return this.args.length?this.name+"("+this.args.join(",")+")":this.name}},e.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(t,s,r){var i=[];r instanceof e.CartoCSS.Tree.Color||(r=r.toColor());for(var a=0;a<3;a++)i[a]=e.CartoCSS.Tree.operate(s,this.rgb[a],r.rgb[a]);return new e.CartoCSS.Tree.Color(i)}toHSL(){var e,t,s=this.rgb[0]/255,r=this.rgb[1]/255,i=this.rgb[2]/255,a=this.alpha,n=Math.max(s,r,i),o=Math.min(s,r,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 s:e=(r-i)/h+(r<i?6:0);break;case r:e=(i-s)/h+2;break;case i:e=(s-r)/h+4}e/=6}return{h:360*e,s:t,l,a}}},e.CartoCSS.Tree.Comment=class{constructor(e,t){this.value=e,this.silent=!!t}toString(e){return"\x3c!--"+this.value+"--\x3e"}ev(){return this}},e.CartoCSS.Tree.Definition=class{constructor(e,t){this.elements=e.elements,this.rules=t,this.ruleIndex={};for(var s=0;s<this.rules.length;s++)"zoom"in this.rules[s]&&(this.rules[s]=this.rules[s].clone()),this.rules[s].zoom=e.zoom,this.ruleIndex[this.rules[s].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(t){var s={},r=this.zoom,i=this.filters.toJS(t),a=[r];function n(r){if(r instanceof e.CartoCSS.Tree.Rule)s[r.name]=s[r.name]||[],i?s[r.name].push("if("+i+"){"+r.value.toJS(t)+"}"):s[r.name].push(r.value.toJS(t));else if(r instanceof e.CartoCSS.Tree.Ruleset){var a=r.toJS(t);for(var n in a)for(var o in s[n]=s[n]||[],a[n])s[n].push(a[n][o])}}for(var o in i&&a.push(i),i=a.join(" && "),this.rules)n(this.rules[o]);return s}},e.CartoCSS.Tree.Dimension=class{constructor(e,t,s){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=s}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 e.CartoCSS.Tree.Color([this.value,this.value,this.value])}round(){return this.value=Math.round(this.value),this}toString(){return this.value.toString()}operate(t,s,r){return"%"===this.unit&&"%"!==r.unit?(t.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===r.unit?"*"===s||"/"===s||"%"===s?(t.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new e.CartoCSS.Tree.Dimension(e.CartoCSS.Tree.operate(s,this.value,this.value*r.value*.01),this.unit):new e.CartoCSS.Tree.Dimension(e.CartoCSS.Tree.operate(s,this.value,r.value),this.unit||r.unit)}},e.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}},e.CartoCSS.Tree.Expression=class{constructor(e){this.is="expression",this.value=e}ev(t){return this.value.length>1?new e.CartoCSS.Tree.Expression(this.value.map(function(e){return e.ev(t)})):this.value[0].ev(t)}toString(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}},e.CartoCSS.Tree.Field=class{constructor(e){this.is="field",this.value=e||""}toString(){return'["'+this.value.toUpperCase()+'"]'}ev(){return this}},e.CartoCSS.Tree.Filter=class{constructor(e,t,s,r,i){this.ops={"<":[" &lt; ","numeric"],">":[" &gt; ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" &lt;= ","numeric"],">=":[" &gt;= ","numeric"],"=~":[".match(","string",")"]},this.key=e,this.op=t,this.val=s,this.index=r,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+"]"}},e.CartoCSS.Tree.Filterset=class{constructor(){this.filters={}}toJS(e){function t(e){var t=e.op;"="===t&&(t="==");var s=e.val;void 0!==e._val&&(s=e._val.toString(!0)),e.key&&"scale"===e.key.value?s=+s:"string"!=typeof s&&"object"!=typeof s||(s="'"+s+"'");var r="attributes";return r+"&&"+r+e.key+"&&"+r+e.key+" "+t+s}var s=[];for(var r in this.filters)s.push(t(this.filters[r]));return s.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 t=new e.CartoCSS.Tree.Filterset;for(var s in this.filters)t.filters[s]=this.filters[s];return t}cloneWith(t){var s=[];for(var r in t.filters){var i=this.addable(t.filters[r]);if(!1===i)return!1;!0===i&&s.push(t.filters[r])}if(!s.length)return null;var a=new e.CartoCSS.Tree.Filterset;for(r in this.filters)a.filters[r]=this.filters[r];for(;r=s.shift();)a.add(r);return a}addable(e){var t=e.key.toString(),s=e.val.toString();switch(s.match(/^[0-9]+(\.[0-9]*)?_match/)&&(s=parseFloat(s)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==s&&null:void 0===this.filters[t+"!="+s]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s))));case"=~":return!0;case"!=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val!==s&&null:void 0!==this.filters[t+"!="+s]?null:void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s)||null;case">":return t+"="in this.filters?!(this.filters[t+"="].val<=s)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=s)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val<s)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=s)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=s)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=s)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s)||null));case"<=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>s)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=s)||null))}}conflict(e){var t=e.key.toString(),s=e.val.toString();return isNaN(parseFloat(s))||(s=parseFloat(s)),("="===e.op&&void 0!==this.filters[t+"="]&&s!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&s==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&s===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}add(e,t){var s,r=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===r&&delete this.filters[n];this.filters[r+"="]=e}else if("!="===i)this.filters[r+"!="+e.val]=e;else if("=~"===i)this.filters[r+"=~"+e.val]=e;else if(">"===i){for(var o in this.filters)this.filters[o].key===r&&this.filters[o].val<=e.val&&delete this.filters[o];this.filters[r+">"]=e}else if(">="===i){for(var l in this.filters)s=+this.filters[l].val.toString(),this.filters[l].key===r&&s<e.val&&delete this.filters[l];void 0!==this.filters[r+"!="+e.val]?(delete this.filters[r+"!="+e.val],e.op=">",this.filters[r+">"]=e):this.filters[r+">="]=e}else if("<"===i){for(var h in this.filters)s=+this.filters[h].val.toString(),this.filters[h].key===r&&s>=e.val&&delete this.filters[h];this.filters[r+"<"]=e}else if("<="===i){for(var u in this.filters)s=+this.filters[u].val.toString(),this.filters[u].key===r&&s>e.val&&delete this.filters[u];void 0!==this.filters[r+"!="+e.val]?(delete this.filters[r+"!="+e.val],e.op="<",this.filters[r+"<"]=e):this.filters[r+"<="]=e}}},e.CartoCSS.Tree.Fontset=class{constructor(e,t){this.fonts=t,this.name="fontset-"+e.effects.length}},e.CartoCSS.Tree.Invalid=class{constructor(e,t,s){this.is="invalid",this.chunk=e,this.index=t,this.type="syntax",this.message=s||"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"}}},e.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}},e.CartoCSS.Tree.Literal=class{constructor(e){this.value=e||"",this.is="field"}toString(){return this.value}ev(){return this}},e.CartoCSS.Tree.Operation=class{constructor(e,t,s){this.is="operation",this.op=e.trim(),this.operands=t,this.index=s}ev(t){var s,r=this.operands[0].ev(t),i=this.operands[1].ev(t);return"undefined"===r.is||"undefined"===i.is?{is:"undefined",value:"undefined"}:(r instanceof e.CartoCSS.Tree.Dimension&&i instanceof e.CartoCSS.Tree.Color&&("*"===this.op||"+"===this.op?(s=i,i=r,r=s):t.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),r instanceof e.CartoCSS.Tree.Quoted&&i instanceof e.CartoCSS.Tree.Quoted&&"+"!==this.op?(t.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r instanceof e.CartoCSS.Tree.Field||i instanceof e.CartoCSS.Tree.Field||r instanceof e.CartoCSS.Tree.Literal||i instanceof e.CartoCSS.Tree.Literal?"color"===r.is||"color"===i.is?(t.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new e.CartoCSS.Tree.Literal(r.ev(t).toString(!0)+this.op+i.ev(t).toString(!0)):void 0===r.operate?(t.error({message:"Cannot do math with type "+r.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r.operate(t,this.op,i))}},e.CartoCSS.Tree.Quoted=class{constructor(e){this.is="string",this.value=e||""}toString(e){var t=this.value.replace(/&/g,"&amp;"),s=t.replace(/\'/g,"\\'").replace(/\"/g,"&quot;").replace(/</g,"&lt;").replace(/\>/g,"&gt;");return!0===e?"'"+s+"'":t}ev(){return this}operate(t,s,r){return new e.CartoCSS.Tree.Quoted(e.CartoCSS.Tree.operate(s,this.toString(),r.toString(this.contains_field)))}},e.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 s in e.symbolizers)for(var r in e.symbolizers[s])e.symbolizers[s][r].hasOwnProperty("css")&&(t[e.symbolizers[s][r].css]=[e.symbolizers[s][r],s,r]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var s in e.symbolizers)for(var r in e.symbolizers[s])if("functions"===e.symbolizers[s][r].type)for(var i=0;i<e.symbolizers[s][r].functions.length;i++){var a=e.symbolizers[s][r].functions[i];t[a[0]]=a[1]}return t}(e),this.required_cache=function(e){var t={};for(var s in e.symbolizers)for(var r in t[s]=[],e.symbolizers[s])e.symbolizers[s][r].required&&t[s].push(e.symbolizers[s][r].css);return t}(e)},setVersion:function(t){return!!e.CartoCSS.mapnik_reference.version.hasOwnProperty(t)&&(this.setData(e.CartoCSS.mapnik_reference.version[t]),!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 s=this.required_cache[e];for(var r in s)if(!(s[r]in t))return"Property "+s[r]+" 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 s=[],r=0;r<=t.length;r++)s[r]=[r];for(var i=0;i<=e.length;i++)s[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?s[r][i]=s[r-1][i-1]:s[r][i]=Math.min(s[r-1][i-1]+1,Math.min(s[r][i-1]+1,s[r-1][i]+1));return s[t.length][e.length]},validValue:function(e,t,s){var r;if(this.selector(t)){if("keyword"===s.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}(s,t);if("undefined"===s.value[0].is)return!0;if("numbers"===this.selector(t).type){for(r in s.value)if("float"!==s.value[r].is)return!1;return!0}if("tags"===this.selector(t).type){if(!s.value)return!1;if(!s.value[0].value)return"tag"===s.value[0].is;for(r=0;r<s.value[0].value.length;r++)if("tag"!==s.value[0].value[r].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 s in e.value)for(var r in e.value[s].value){if("call"!==e.value[s].value[r].is)return!1;var i=find(this.selector(t).functions,function(t){return t[0]===e.value[s].value[r].name});if(!(i&&-1===i[1]||i&&i[1]===e.value[s].value[r].args.length))return!1}return!0}(s,t);if("expression"===this.selector(t).type)return!0;if("unsigned"===this.selector(t).type)return"float"===s.value[0].is&&(s.value[0].round(),!0);if(this.selector(t).validate){for(r=0;r<s.value.length;r++)if(this.selector(t).type===s.value[r].is&&this._validateValue[this.selector(t).validate](e,s.value[r].value))return!0;return!1}return this.selector(t).type===s.value[0].is}return!1}},e.CartoCSS.Tree.Reference.setVersion("latest"),e.CartoCSS.Tree.Rule=class{constructor(t,s,r,i){this.is="rule";var a=t.split("/");this.name=a.pop(),this.instance=a.length?a[0]:"__default__",this.value=s instanceof e.CartoCSS.Tree.Value?s:new e.CartoCSS.Tree.Value([s]),this.index=r,this.symbolizer=e.CartoCSS.Tree.Reference.symbolizer(this.name),this.filename=i,this.variable="@"===t.charAt(0)}clone(){var t=Object.create(e.CartoCSS.Tree.Rule.prototype);return t.name=this.name,t.value=this.value,t.index=this.index,t.instance=this.instance,t.symbolizer=this.symbolizer,t.filename=this.filename,t.variable=this.variable,t}updateID(){return this.id=this.zoom+"#"+this.instance+"#"+this.name}toString(){return"["+e.CartoCSS.Tree.Zoom.toString(this.zoom)+"] "+this.name+": "+this.value}ev(t){return new e.CartoCSS.Tree.Rule(this.name,this.value.ev(t),this.index,this.filename)}},e.CartoCSS.Tree.Ruleset=class{constructor(e,t){this.is="ruleset",this.selectors=e,this.rules=t,this._lookups={}}ev(t){var s,r,i=new e.CartoCSS.Tree.Ruleset(this.selectors,this.rules.slice(0));for(i.root=this.root,t.frames.unshift(i),s=0;s<i.rules.length;s++)r=i.rules[s],i.rules[s]=r.ev?r.ev(t):r;return t.frames.shift(),i}match(e){return!e||0===e.length}variables(){return this._variables?this._variables:this._variables=this.rules.reduce(function(t,s){return s instanceof e.CartoCSS.Tree.Rule&&!0===s.variable&&(t[s.name]=s),t},{})}variable(e){return this.variables()[e]}rulesets(){return this._rulesets?this._rulesets:this._rulesets=this.rules.filter(function(t){return t instanceof e.CartoCSS.Tree.Ruleset})}find(t,s){s=s||this;var r=[],i=t.toString();return i in this._lookups?this._lookups[i]:(this.rulesets().forEach(function(i){if(i!==s)for(var a=0;a<i.selectors.length;a++)if(t.match(i.selectors[a])){t.elements.length>1?Array.prototype.push.apply(r,i.find(new e.CartoCSS.Tree.Selector(null,null,t.elements.slice(1)),s)):r.push(i);break}}),this._lookups[i]=r)}evZooms(t){for(var s=0;s<this.selectors.length;s++){for(var r=e.CartoCSS.Tree.Zoom.all,i=0;i<this.selectors[s].zoom.length;i++)r=this.selectors[s].zoom[i].ev(t).zoom;this.selectors[s].zoom=r}}flatten(t,s,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(s.length)for(a=0;a<s.length;a++){var l=s[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(e.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 p=this.rules[i];p instanceof e.CartoCSS.Tree.Ruleset?p.flatten(t,n,r):p instanceof e.CartoCSS.Tree.Rule?c.push(p):p instanceof e.CartoCSS.Tree.Invalid&&r.error(p)}var d=!!c.length&&c[0].index;for(i=0;i<n.length;i++)!1!==d&&(n[i].index=d),t.push(new e.CartoCSS.Tree.Definition(n[i],c.slice()));return t}},e.CartoCSS.Tree.Selector=class{constructor(t,s,r,i,a,n){this.elements=r||[],this.attachment=i,this.filters=t||{},this.zoom=void 0!==s?s:e.CartoCSS.Tree.Zoom.all,this.conditions=a,this.index=n}specificity(){return this.elements.reduce(function(e,t){var s=t.specificity();return e[0]+=s[0],e[1]+=s[1],e},[0,0,this.conditions,this.index])}},e.CartoCSS.Tree.URL=class{constructor(e,t){this.is="uri",this.value=e,this.paths=t}toString(){return this.value.toString()}ev(t){return new e.CartoCSS.Tree.URL(this.value.ev(t),this.paths)}},e.CartoCSS.Tree.Value=class{constructor(e){this.is="value",this.value=e}ev(t){return 1===this.value.length?this.value[0].ev(t):new e.CartoCSS.Tree.Value(this.value.map(function(e){return e.ev(t)}))}toJS(e){var t=this.ev(e),s=t.toString();return"color"===t.is||"uri"===t.is||"string"===t.is||"keyword"===t.is?s="'"+s+"'":"field"===t.is?s=s.replace(/\[(.*)\]/g,"attributes['_match1']"):t.value&&"object"==typeof t.value&&(s="["+s+"]"),"_value = "+s+";"}toString(e,t,s,r){return this.value.map(function(t){return t.toString(e,r)}).join(s||", ")}clone(){var t=Object.create(e.CartoCSS.Tree.Value.prototype);return Array.isArray(t)?t.value=this.value.slice():t.value=this.value,t.is=this.is,t}},e.CartoCSS.Tree.Variable=class{constructor(e,t,s){this.is="variable",this.name=e,this.index=t,this.filename=s}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"})}},e.CartoCSS.Tree.Zoom=class{constructor(e,t,s){this.op=e,this.value=t,this.index=s}setZoom(e){return this.zoom=e,this}ev(t){var s=parseInt(this.value.ev(t).toString(),10);switch((s>e.CartoCSS.Tree.Zoom.maxZoom||s<0)&&t.error({message:"Only zoom levels between 0 and "+e.CartoCSS.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+s,this;case">":this.zoom="zoom && zoom > "+s;break;case">=":this.zoom="zoom && zoom >= "+s;break;case"<":this.zoom="zoom && zoom < "+s;break;case"<=":this.zoom="zoom && zoom <= "+s;break;default:return this}return this}toString(){for(var t="",s=0;s<=e.CartoCSS.Tree.Zoom.maxZoom;s++)t+=this.zoom&1<<s?"X":".";return t}},e.CartoCSS.Tree.Zoom.all=23,e.CartoCSS.Tree.Zoom.maxZoom=22,e.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};e.ThemeStyle=
  1201. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1202. * This program are made available under the terms of the Apache License, Version 2.0
  1203. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1204. 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,V.extend(this,e)}};
  1205. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1206. * This program are made available under the terms of the Apache License, Version 2.0
  1207. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1208. class ea{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}}e.Feature=e.Feature||{},e.Feature.ShapeParameters=ea;
  1209. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1210. * This program are made available under the terms of the Apache License, Version 2.0
  1211. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1212. class ta extends ea{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()}}e.Feature=e.Feature||{},e.Feature.ShapeParameters.Point=ta;
  1213. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1214. * This program are made available under the terms of the Apache License, Version 2.0
  1215. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1216. class sa extends ea{constructor(e){super(e),this.pointList=e,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Line"}destroy(){this.pointList=null,super.destroy()}}e.Feature=e.Feature||{},e.Feature.ShapeParameters.Line=sa;
  1217. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1218. * This program are made available under the terms of the Apache License, Version 2.0
  1219. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1220. class ra extends ea{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()}}e.Feature=e.Feature||{},e.Feature.ShapeParameters.Polygon=ra;
  1221. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1222. * This program are made available under the terms of the Apache License, Version 2.0
  1223. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1224. class ia extends ea{constructor(e,t,s,r){super(e,t,s,r),this.x=isNaN(e)?0:e,this.y=isNaN(e)?0:t,this.width=isNaN(s)?0:s,this.height=isNaN(r)?0:r,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Rectangle"}destroy(){this.x=null,this.y=null,this.width=null,this.height=null,super.destroy()}}e.Feature=e.Feature||{},e.Feature.ShapeParameters.Rectangle=ia;
  1225. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1226. * This program are made available under the terms of the Apache License, Version 2.0
  1227. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1228. class aa extends ea{constructor(e,t,s,r,i,a,n){super(e,t,s,r,i,a,n),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=isNaN(s)?0:s,this.startAngle=isNaN(r)?0:r,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()}}e.Feature=e.Feature||{},e.Feature.ShapeParameters.Sector=aa;
  1229. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1230. * This program are made available under the terms of the Apache License, Version 2.0
  1231. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1232. class na extends ea{constructor(e,t,s){super(e,t,s),this.x=e,this.y=t,this.text=s,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Label"}destroy(){this.x=null,this.y=null,this.text=null,super.destroy()}}e.Feature=e.Feature||{},e.Feature.ShapeParameters.Label=na;
  1233. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1234. * This program are made available under the terms of the Apache License, Version 2.0
  1235. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1236. class oa extends ea{constructor(e,t,s,r,i,a,n,o,l){super(e,t,s,r,i,a,n,o,l),this.x=e,this.y=t,this.image=s,this.width=r,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()}}e.Feature=e.Feature||{},e.Feature.ShapeParameters.Image=oa;
  1237. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1238. * This program are made available under the terms of the Apache License, Version 2.0
  1239. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1240. class la extends ea{constructor(e,t,s){super(e,t,s),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=isNaN(s)?0:s,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Circle"}destroy(){this.x=null,this.y=null,this.r=null,super.destroy()}}e.Feature=e.Feature||{},e.Feature.ShapeParameters.Circle=la;
  1241. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1242. * This program are made available under the terms of the Apache License, Version 2.0
  1243. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1244. class ha{constructor(){this._handlers={},this.CLASS_NAME="SuperMap.LevelRenderer.Eventful"}destroy(){this._handlers=null}one(e,t,s){var r=this._handlers;return t&&e?(r[e]||(r[e]=[]),r[e].push({h:t,one:!0,ctx:s||this}),this):this}bind(e,t,s){var r=this._handlers;return t&&e?(r[e]||(r[e]=[]),r[e].push({h:t,one:!1,ctx:s||this}),this):this}unbind(e,t){var s=this._handlers;if(!e)return this._handlers={},this;if(t){if(s[e]){for(var r=[],i=0,a=s[e].length;i<a;i++)s[e][i].h!=t&&r.push(s[e][i]);s[e]=r}s[e]&&0===s[e].length&&delete s[e]}else delete s[e];return this}dispatch(e){if(this._handlers[e]){var t=arguments,s=t.length;s>3&&(t=Array.prototype.slice.call(t,1));for(var r=this._handlers[e],i=r.length,a=0;a<i;){switch(s){case 1:r[a].h.call(r[a].ctx);break;case 2:r[a].h.call(r[a].ctx,t[1]);break;case 3:r[a].h.call(r[a].ctx,t[1],t[2]);break;default:r[a].h.apply(r[a].ctx,t)}r[a].one?(r.splice(a,1),i--):a++}}return this}dispatchWithContext(e){if(this._handlers[e]){var t=arguments,s=t.length;s>4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var r=t[t.length-1],i=this._handlers[e],a=i.length,n=0;n<a;){switch(s){case 1:i[n].h.call(r);break;case 2:i[n].h.call(r,t[1]);break;case 3:i[n].h.call(r,t[1],t[2]);break;default:i[n].h.apply(r,t)}i[n].one?(i.splice(n,1),a--):n++}}return this}}
  1245. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1246. * This program are made available under the terms of the Apache License, Version 2.0
  1247. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1248. class ua{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Vector"}create(e,t){var s=new(0,this.ArrayCtor)(2);return s[0]=e||0,s[1]=t||0,s}copy(e,t){return e[0]=t[0],e[1]=t[1],e}set(e,t,s){return e[0]=t,e[1]=s,e}add(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e}scaleAndAdd(e,t,s,r){return e[0]=t[0]+s[0]*r,e[1]=t[1]+s[1]*r,e}sub(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e}len(e){return Math.sqrt(this.lenSquare(e))}lenSquare(e){return e[0]*e[0]+e[1]*e[1]}mul(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e}div(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e}dot(e,t){return e[0]*t[0]+e[1]*t[1]}scale(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e}normalize(e,t){var s=this.len(t);return 0===s?(e[0]=0,e[1]=0):(e[0]=t[0]/s,e[1]=t[1]/s),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,s,r){return e[0]=t[0]+r*(s[0]-t[0]),e[1]=t[1]+r*(s[1]-t[1]),e}applyTransform(e,t,s){var r=t[0],i=t[1];return e[0]=s[0]*r+s[2]*i+s[4],e[1]=s[1]*r+s[3]*i+s[5],e}min(e,t,s){return e[0]=Math.min(t[0],s[0]),e[1]=Math.min(t[1],s[1]),e}max(e,t,s){return e[0]=Math.max(t[0],s[0]),e[1]=Math.max(t[1],s[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)}}
  1249. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1250. * This program are made available under the terms of the Apache License, Version 2.0
  1251. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1252. class ca{constructor(){this.vector=new ua,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,s,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*s)}cubicDerivativeAt(e,t,s,r,i){var a=1-i;return 3*(((t-e)*a+2*(s-t)*i)*a+(r-s)*i*i)}cubicRootAt(e,t,s,r,i,a){var n=r+3*(t-s)-e,o=3*(s-2*t+e),l=3*(t-e),h=e-i,u=o*o-3*n*l,c=o*l-9*n*h,p=l*l-3*o*h,d=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[d++]=e)}else{var m=c*c-4*u*p;if(this.isAroundZero(m)){var y=c/u;let e=-o/n+y,t=-y/2;e>=0&&e<=1&&(a[d++]=e),t>=0&&t<=1&&(a[d++]=t)}else if(m>0){let e=Math.sqrt(m),t=u*o+1.5*n*(-c+e),s=u*o+1.5*n*(-c-e),r=(-o-((t=t<0?-Math.pow(-t,this.ONE_THIRD):Math.pow(t,this.ONE_THIRD))+(s=s<0?-Math.pow(-s,this.ONE_THIRD):Math.pow(s,this.ONE_THIRD))))/(3*n);r>=0&&r<=1&&(a[d++]=r)}else{var f=(2*u*o-3*n*c)/(2*Math.sqrt(u*u*u)),g=Math.acos(f)/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),s=(-o+v*(S-this.THREE_SQRT*Math.sin(g)))/(3*n);e>=0&&e<=1&&(a[d++]=e),t>=0&&t<=1&&(a[d++]=t),s>=0&&s<=1&&(a[d++]=s)}}return d}cubicExtrema(e,t,s,r,i){var a=6*s-12*t+6*e,n=9*t+3*r-3*e-9*s,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),s=(-a-e)/(2*n);t>=0&&t<=1&&(i[l++]=t),s>=0&&s<=1&&(i[l++]=s)}}return l}cubicSubdivide(e,t,s,r,i,a){var n=(t-e)*i+e,o=(s-t)*i+t,l=(r-s)*i+s,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]=r}cubicProjectPoint(e,t,s,r,i,a,n,o,l,h,u){var c,p=this.vector.create(),d=this.vector.create(),m=this.vector.create(),y=.005,f=1/0;p[0]=l,p[1]=h;for(let l=0;l<1;l+=.05){d[0]=this.cubicAt(e,s,i,n,l),d[1]=this.cubicAt(t,r,a,o,l);let h=this.vector.distSquare(p,d);h<f&&(c=l,f=h)}f=1/0;for(let l=0;l<32&&!(y<this.EPSILON);l++){let l=c-y,h=c+y;d[0]=this.cubicAt(e,s,i,n,l),d[1]=this.cubicAt(t,r,a,o,l);let u=this.vector.distSquare(d,p);if(l>=0&&u<f)c=l,f=u;else{m[0]=this.cubicAt(e,s,i,n,h),m[1]=this.cubicAt(t,r,a,o,h);let l=this.vector.distSquare(m,p);h<=1&&l<f?(c=h,f=l):y*=.5}}return u&&(u[0]=this.cubicAt(e,s,i,n,c),u[1]=this.cubicAt(t,r,a,o,c)),Math.sqrt(f)}quadraticAt(e,t,s,r){var i=1-r;return i*(i*e+2*r*t)+r*r*s}quadraticDerivativeAt(e,t,s,r){return 2*((1-r)*(t-e)+r*(s-t))}quadraticRootAt(e,t,s,r,i){var a=e-2*t+s,n=2*(t-e),o=e-r,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),s=(-n-e)/(2*a);t>=0&&t<=1&&(i[l++]=t),s>=0&&s<=1&&(i[l++]=s)}}return l}quadraticExtremum(e,t,s){var r=e+s-2*t;return 0===r?.5:(e-t)/r}quadraticProjectPoint(e,t,s,r,i,a,n,o,l){var h,u=this.vector.create(),c=this.vector.create(),p=this.vector.create(),d=.005,m=1/0;u[0]=n,u[1]=o;for(let n=0;n<1;n+=.05){c[0]=this.quadraticAt(e,s,i,n),c[1]=this.quadraticAt(t,r,a,n);let o=this.vector.distSquare(u,c);o<m&&(h=n,m=o)}m=1/0;for(let n=0;n<32&&!(d<this.EPSILON);n++){let n=h-d,o=h+d;c[0]=this.quadraticAt(e,s,i,n),c[1]=this.quadraticAt(t,r,a,n);let l=this.vector.distSquare(c,u);if(n>=0&&l<m)h=n,m=l;else{p[0]=this.quadraticAt(e,s,i,o),p[1]=this.quadraticAt(t,r,a,o);let n=this.vector.distSquare(p,u);o<=1&&n<m?(h=o,m=n):d*=.5}}return l&&(l[0]=this.quadraticAt(e,s,i,h),l[1]=this.quadraticAt(t,r,a,h)),Math.sqrt(m)}}
  1253. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1254. * This program are made available under the terms of the Apache License, Version 2.0
  1255. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1256. class pa{}pa.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},pa.catchBrushException=!1,pa.debugMode=0;
  1257. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1258. * This program are made available under the terms of the Apache License, Version 2.0
  1259. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1260. class da{static SUtil_smoothBezier(e,t,s,r,i){i&&2===i||(i=[0,0]);var a,n,o=i,l=[],h=[],u=[],c=[],p=!!r;if(p){a=[1/0,1/0],n=[-1/0,-1/0];let t=e.length;for(let s=0;s<t;s++)da.Util_vector.min(a,a,[e[s][0]+o[0],e[s][1]+o[1]]),da.Util_vector.max(n,n,[e[s][0]+o[0],e[s][1]+o[1]]);da.Util_vector.min(a,a,r[0]),da.Util_vector.max(n,n,r[1])}let d=e.length;for(let r=0;r<d;r++){let i,m,y=[e[r][0]+o[0],e[r][1]+o[1]];if(s)i=[e[r?r-1:d-1][0]+o[0],e[r?r-1:d-1][1]+o[1]],m=[e[(r+1)%d][0]+o[0],e[(r+1)%d][1]+o[1]];else{if(0===r||r===d-1){l.push([e[r][0]+o[0],e[r][1]+o[1]]);continue}i=[e[r-1][0]+o[0],e[r-1][1]+o[1]],m=[e[r+1][0]+o[0],e[r+1][1]+o[1]]}da.Util_vector.sub(h,m,i),da.Util_vector.scale(h,h,t);let f=da.Util_vector.distance(y,i),g=da.Util_vector.distance(y,m),v=f+g;0!==v&&(f/=v,g/=v),da.Util_vector.scale(u,h,-f),da.Util_vector.scale(c,h,g);let S=da.Util_vector.add([],y,u),b=da.Util_vector.add([],y,c);p&&(da.Util_vector.max(S,S,a),da.Util_vector.min(S,S,n),da.Util_vector.max(b,b,a),da.Util_vector.min(b,b,n)),l.push(S),l.push(b)}return s&&l.push(l.shift()),l}static SUtil_smoothSpline(e,t,s,r){r&&2===r||(r=[0,0]);var i=r,a=e.length,n=[],o=0;for(let t=1;t<a;t++)o+=da.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 s=0;s<l;s++){let r,o,u,c=s/(l-1)*(t?a:a-1),p=Math.floor(c),d=c-p,m=[e[p%a][0]+i[0],e[p%a][1]+i[1]];t?(r=[e[(p-1+a)%a][0]+i[0],e[(p-1+a)%a][1]+i[1]],o=[e[(p+1)%a][0]+i[0],e[(p+1)%a][1]+i[1]],u=[e[(p+2)%a][0]+i[0],e[(p+2)%a][1]+i[1]]):(r=[e[0===p?p:p-1][0]+i[0],e[0===p?p:p-1][1]+i[1]],o=[e[p>a-2?a-1:p+1][0]+i[0],e[p>a-2?a-1:p+1][1]+i[1]],u=[e[p>a-3?a-1:p+2][0]+i[0],e[p>a-3?a-1:p+2][1]+i[1]]);let y=d*d,f=d*y;n.push([h(r[0],m[0],o[0],u[0],d,y,f),h(r[1],m[1],o[1],u[1],d,y,f)])}return n;function h(e,t,s,r,i,a,n){var o=.5*(s-e),l=.5*(r-t);return(2*(t-s)+o+l)*n+(-3*(t-s)-2*o-l)*a+o*i+t}}static SUtil_dashedLineTo(e,t,s,r,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,s),void e.lineTo(r,i);var l=r-t,h=i-s,u=Math.floor(Math.sqrt(l*l+h*h)/a);l/=u,h/=u;for(var c=!0,p=0;p<u;++p)c?e.moveTo(t,s):e.lineTo(t,s),c=!c,t+=l,s+=h;e.lineTo(r,i)}}da.Util_area=new
  1261. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1262. * This program are made available under the terms of the Apache License, Version 2.0
  1263. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1264. class{constructor(){this.util=new Ji,this.curve=new ca,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,s,r){if(!t||!e)return!1;var i=e.type;this._ctx=this._ctx||this.util.getContext();var a=this._mathMethod(e,t,s,r);if(void 0!==a)return a;if(e.buildPath&&this._ctx.isPointInPath)return this._buildPathMethod(e,this._ctx,t,s,r);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,s,r,n);case"rose":return this.isInsideCircle(t,s,r,t.maxr);default:return!1}}_mathMethod(e,t,s,r){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,s,r):this.isInsideCubicStroke(t.xStart,t.yStart,t.cpX1,t.cpY1,t.cpX2,t.cpY2,t.xEnd,t.yEnd,t.lineWidth,s,r);case"line":return this.isInsideLine(t.xStart,t.yStart,t.xEnd,t.yEnd,t.lineWidth,s,r);case"broken-line":return this.isInsideBrokenLine(t.pointList,t.lineWidth,s,r);case"smicbroken-line":{let i=s,a=r;return e.refOriginalPosition&&(i=s-e.refOriginalPosition[0],a=r-e.refOriginalPosition[1]),this.isInsideBrokenLine(t.pointList,t.lineWidth,i,a)}case"ring":return this.isInsideRing(t.x,t.y,t.r0,t.r,s,r);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,s,r)}case"circle":return this.isInsideCircle(t.x,t.y,t.r,s,r);case"smicpoint":{let i=s,a=r;return e.refOriginalPosition&&(i=s-e.refOriginalPosition[0],a=r-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,s,r)}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,s,r)}case"path":return this.isInsidePath(t.pathArray,Math.max(t.lineWidth,5),t.brushType,s,r);case"polygon":case"star":case"smicstar":case"isogon":case"smicisogon":return this.isInsidePolygon(t.pointList,s,r);case"smicpolygon":{let u=s,c=r;if(e.refOriginalPosition&&(u=s-e.refOriginalPosition[0],c=r-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,s,r);case"smictext":var c=e.getTextBackground(t);return this.isInsidePolygon(c,s,r);case"rectangle":case"image":return this.isInsideRect(t.x,t.y,t.width,t.height,s,r);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,s,r)}}}_buildPathMethod(e,t,s,r,i){return t.beginPath(),e.buildPath(t,s),t.closePath(),t.isPointInPath(r,i)}isOutside(e,t,s,r){return!this.isInside(e,t,s,r)}isInsideLine(e,t,s,r,i,a,n){if(0===i)return!1;var o=Math.max(i,5),l=0;if(n>t+o&&n>r+o||n<t-o&&n<r-o||a>e+o&&a>s+o||a<e-o&&a<s-o)return!1;if(e===s)return Math.abs(a-e)<=o/2;var h=(l=(t-r)/(e-s))*a-n+(e*r-s*t)/(e-s);return h*h/(l*l+1)<=o/2*o/2}isInsideCubicStroke(e,t,s,r,i,a,n,o,l,h,u){if(0===l)return!1;var c=Math.max(l,5);return!(u>t+c&&u>r+c&&u>a+c&&u>o+c||u<t-c&&u<r-c&&u<a-c&&u<o-c||h>e+c&&h>s+c&&h>i+c&&h>n+c||h<e-c&&h<s-c&&h<i-c&&h<n-c)&&this.curve.cubicProjectPoint(e,t,s,r,i,a,n,o,h,u,null)<=c/2}isInsideQuadraticStroke(e,t,s,r,i,a,n,o,l){if(0===n)return!1;var h=Math.max(n,5);return!(l>t+h&&l>r+h&&l>a+h||l<t-h&&l<r-h&&l<a-h||o>e+h&&o>s+h&&o>i+h||o<e-h&&o<s-h&&o<i-h)&&this.curve.quadraticProjectPoint(e,t,s,r,i,a,o,l,null)<=h/2}isInsideArcStroke(e,t,s,r,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>s||c+u<s)return!1;if(Math.abs(r-i)>=h)return!0;if(a){var p=r;r=this.normalizeRadian(i),i=this.normalizeRadian(p)}else r=this.normalizeRadian(r),i=this.normalizeRadian(i);r>i&&(i+=h);var d=Math.atan2(l,o);return d<0&&(d+=h),d>=r&&d<=i||d+h>=r&&d+h<=i}isInsideBrokenLine(e,t,s,r){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,s,r))return!0}return!1}isInsideRing(e,t,s,r,i,a){var n=(i-e)*(i-e)+(a-t)*(a-t);return n<r*r&&n>s*s}isInsideRect(e,t,s,r,i,a){return i>=e&&i<=e+s&&a>=t&&a<=t+r}isInsideCircle(e,t,s,r,i){return(r-e)*(r-e)+(i-t)*(i-t)<s*s}isInsideSector(e,t,s,r,i,a,n,o,l){return this.isInsideArcStroke(e,t,(s+r)/2,i,a,n,r-s,o,l)}isInsidePolygon(e,t,s){for(var r=e.length,i=0,a=0,n=r-1;a<r;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,s),n=a}return 0!==i}windingLine(e,t,s,r,i,a){return a>t&&a>r||a<t&&a<r?0:r==t?0:(a-t)/(r-t)*(s-e)+e>i?r<t?1:-1:0}swapExtrema(){var e=this.extrema[0];this.extrema[0]=this.extrema[1],this.extrema[1]=e}windingCubic(e,t,s,r,i,a,n,o,l,h){var u=this.curve,c=this.roots,p=this.extrema;if(h>t&&h>r&&h>a&&h>o||h<t&&h<r&&h<a&&h<o)return 0;var d=u.cubicRootAt(t,r,a,o,h,c);if(0===d)return 0;for(var m,y,f=0,g=-1,v=0;v<d;v++){var S=c[v];u.cubicAt(e,s,i,n,S)<l||(g<0&&(g=u.cubicExtrema(t,r,a,o,p),p[1]<p[0]&&g>1&&this.swapExtrema(),m=u.cubicAt(t,r,a,o,p[0]),g>1&&(y=u.cubicAt(t,r,a,o,p[1]))),2==g?S<p[0]?f+=m<t?1:-1:S<p[1]?f+=y<m?1:-1:f+=o<y?1:-1:S<p[0]?f+=m<t?1:-1:f+=o<m?1:-1)}return f}windingQuadratic(e,t,s,r,i,a,n,o){var l=this.curve,h=this.roots;if(o>t&&o>r&&o>a||o<t&&o<r&&o<a)return 0;var u=l.quadraticRootAt(t,r,a,o,h);if(0===u)return 0;var c=l.quadraticExtremum(t,r,a);if(c>=0&&c<=1){var p=0,d=l.quadraticAt(t,r,a,c);for(let r=0;r<u;r++)l.quadraticAt(e,s,i,h[r])>n||(h[r]<c?p+=d<t?1:-1:p+=a<d?1:-1);return p}return l.quadraticAt(e,s,i,h[0])>n?0:a<t?1:-1}windingArc(e,t,s,r,i,a,n,o){var l=this.roots,h=this.PI2;if((o-=t)>s||o<-s)return 0;let u=Math.sqrt(s*s-o*o);if(l[0]=-u,l[1]=u,Math.abs(r-i)>=h){r=0,i=h;var c=a?1:-1;return n>=l[0]+e&&n<=l[1]+e?c:0}if(a){let e=r;r=this.normalizeRadian(i),i=this.normalizeRadian(e)}else r=this.normalizeRadian(r),i=this.normalizeRadian(i);r>i&&(i+=h);var p=0;for(let t=0;t<2;t++){var d=l[t];if(d+e>n){let e=Math.atan2(o,d),t=a?1:-1;e<0&&(e=h+e),(e>=r&&e<=i||e+h>=r&&e+h<=i)&&(e>Math.PI/2&&e<1.5*Math.PI&&(t=-t),p+=t)}}return p}isInsidePath(e,t,s,r,i){for(var a=0,n=0,o=0,l=0,h=0,u=!0,c=!0,p="stroke"===(s=s||"fill")||"both"===s,d="fill"===s||"both"===s,m=0;m<e.length;m++){var y=e[m],f=y.points;if(u||"M"===y.command){if(m>0&&(d&&(a+=this.windingLine(n,o,l,h,r,i)),0!==a))return!0;l=f[f.length-2],h=f[f.length-1],u=!1,c&&"A"!==y.command&&(c=!1,n=l,o=h)}switch(y.command){case"M":n=f[0],o=f[1];break;case"L":if(p&&this.isInsideLine(n,o,f[0],f[1],t,r,i))return!0;d&&(a+=this.windingLine(n,o,f[0],f[1],r,i)),n=f[0],o=f[1];break;case"C":if(p&&this.isInsideCubicStroke(n,o,f[0],f[1],f[2],f[3],f[4],f[5],t,r,i))return!0;d&&(a+=this.windingCubic(n,o,f[0],f[1],f[2],f[3],f[4],f[5],r,i)),n=f[4],o=f[5];break;case"Q":if(p&&this.isInsideQuadraticStroke(n,o,f[0],f[1],f[2],f[3],t,r,i))return!0;d&&(a+=this.windingQuadratic(n,o,f[0],f[1],f[2],f[3],r,i)),n=f[2],o=f[3];break;case"A":var g=f[0],v=f[1],S=f[2],b=f[3],x=f[4],C=f[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=(r-g)*b/S+g;if(p&&this.isInsideArcStroke(g,v,b,x,x+C,1-f[7],t,E,i))return!0;d&&(a+=this.windingArc(g,v,b,x,x+C,1-f[7],E,i)),n=Math.cos(x+C)*S+g,o=Math.sin(x+C)*b+v;break;case"z":if(p&&this.isInsideLine(n,o,l,h,t,r,i))return!0;u=!0}}return d&&(a+=this.windingLine(n,o,l,h,r,i)),0!==a}getTextWidth(e,t){var s=e+":"+t;if(this._textWidthCache[s])return this._textWidthCache[s];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var r=0,i=0,a=(e=(e+"").split("\n")).length;i<a;i++)r=Math.max(this._ctx.measureText(e[i]).width,r);return this._ctx.restore(),this._textWidthCache[s]=r,++this._textWidthCacheCounter>this.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),r}getTextHeight(e,t){var s=e+":"+t;if(this._textHeightCache[s])return this._textHeightCache[s];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var r=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[s]=r,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),r}},da.Util_color=new zi,da.Util_computeBoundingBox=new
  1265. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1266. * This program are made available under the terms of the Apache License, Version 2.0
  1267. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1268. class{constructor(){3===arguments.length&&this.computeBoundingBox(arguments),this.CLASS_NAME="SuperMap.LevelRenderer.Tool.ComputeBoundingBox"}computeBoundingBox(e,t,s){if(0!==e.length){for(var r=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]<r&&(r=l[0]),l[0]>i&&(i=l[0]),l[1]<a&&(a=l[1]),l[1]>n&&(n=l[1])}t[0]=r,t[1]=a,s[0]=i,s[1]=n}}cubeBezier(e,t,s,r,i,a){var n=new ca,o=[];n.cubicExtrema(e[0],t[0],s[0],r[0],o);for(let i=0;i<o.length;i++)o[i]=n.cubicAt(e[0],t[0],s[0],r[0],o[i]);var l=[];n.cubicExtrema(e[1],t[1],s[1],r[1],l);for(let i=0;i<l.length;i++)l[i]=n.cubicAt(e[1],t[1],s[1],r[1],l[i]);o.push(e[0],r[0]),l.push(e[1],r[1]);var h=Math.min.apply(null,o),u=Math.max.apply(null,o),c=Math.min.apply(null,l),p=Math.max.apply(null,l);i[0]=h,i[1]=c,a[0]=u,a[1]=p}quadraticBezier(e,t,s,r,i){var a=new ca,n=a.quadraticExtremum(e[0],t[0],s[0]),o=a.quadraticExtremum(e[1],t[1],s[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*s[0],c=l*l*e[1]+2*l*n*t[1]+n*n*s[1],p=h*h*e[0]+2*h*o*t[0]+o*o*s[0],d=h*h*e[1]+2*h*o*t[1]+o*o*s[1];r[0]=Math.min(e[0],s[0],u,p),r[1]=Math.min(e[1],s[1],c,d),i[0]=Math.max(e[0],s[0],u,p),i[1]=Math.max(e[1],s[1],c,d)}arc(e,t,s,r,i,a,n,o){var l=new ua,h=l.create(),u=l.create(),c=l.create();if(h[0]=Math.cos(r)*s+e,h[1]=Math.sin(r)*s+t,u[0]=Math.cos(i)*s+e,u[1]=Math.sin(i)*s+t,l.min(n,h,u),l.max(o,h,u),(r%=2*Math.PI)<0&&(r+=2*Math.PI),(i%=2*Math.PI)<0&&(i+=2*Math.PI),r>i&&!a?i+=2*Math.PI:r<i&&a&&(r+=2*Math.PI),a){var p=i;i=r,r=p}for(var d=0;d<i;d+=Math.PI/2)d>r&&(c[0]=Math.cos(d)*s+e,c[1]=Math.sin(d)*s+t,l.min(n,c,n),l.max(o,c,o))}},da.Util_curve=new ca,da.Util_env=new
  1269. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1270. * This program are made available under the terms of the Apache License, Version 2.0
  1271. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1272. class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Env";var e,t,s,r,i,a,n,o,l,h,u,c,p,d,m,y,f,g,v,S,b,x=this;return e=navigator.userAgent,t=x.os={},s=x.browser={},r=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._]+)/),p=e.match(/(BlackBerry).*Version\/([\d.]+)/),d=e.match(/(BB10).*Version\/([\d.]+)/),m=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),y=e.match(/PlayBook/),f=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),g=e.match(/Firefox\/([\d.]+)/),v=e.match(/MSIE ([\d.]+)/),S=r&&e.match(/Mobile\//)&&!f,b=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!f,(s.webkit=!!r)&&(s.version=r[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),p&&(t.blackberry=!0,t.version=p[2]),d&&(t.bb10=!0,t.version=d[2]),m&&(t.rimtabletos=!0,t.version=m[2]),y&&(s.playbook=!0),u&&(t.kindle=!0,t.version=u[1]),c&&(s.silk=!0,s.version=c[1]),!c&&t.android&&e.match(/Kindle Fire/)&&(s.silk=!0),f&&(s.chrome=!0,s.version=f[1]),g&&(s.firefox=!0,s.version=g[1]),v&&(s.ie=!0,s.version=v[1]),S&&(e.match(/Safari/)||t.ios)&&(s.safari=!0),b&&(s.webview=!0),v&&(s.ie=!0,s.version=v[1]),t.tablet=!!(a||y||i&&!e.match(/Mobile/)||g&&e.match(/Tablet/)||v&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(i||o||l||p||d||f&&e.match(/Android/)||f&&e.match(/CriOS\/([\d.]+)/)||g&&e.match(/Mobile/)||v&&e.match(/Touch/))),{browser:s,os:t,canvasSupported:!!document.createElement("canvas").getContext}}destory(){return!0}},da.Util_event=new
  1273. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1274. * This program are made available under the terms of the Apache License, Version 2.0
  1275. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1276. 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}},da.Util_http=new
  1277. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1278. * This program are made available under the terms of the Apache License, Version 2.0
  1279. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1280. class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Http"}get(e,t,s){if("object"==typeof e){var r=e;e=r.url,t=r.onsuccess,s=r.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):s&&s(),i.onreadystatechange=new Function,i=null)},i.send(null)}},da.Util_log=new
  1281. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1282. * This program are made available under the terms of the Apache License, Version 2.0
  1283. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1284. class{constructor(){return this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Log",function(){if(0!==pa.debugMode)if(1==pa.debugMode)for(let e in arguments)throw new Error(arguments[e]);else if(pa.debugMode>1)for(let e in arguments)console.log(arguments[e])}}destory(){return!0}},da.Util_math=new
  1285. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1286. * This program are made available under the terms of the Apache License, Version 2.0
  1287. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1288. 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}},da.Util_matrix=new
  1289. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1290. * This program are made available under the terms of the Apache License, Version 2.0
  1291. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1292. 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,s){return e[0]=t[0]*s[0]+t[2]*s[1],e[1]=t[1]*s[0]+t[3]*s[1],e[2]=t[0]*s[2]+t[2]*s[3],e[3]=t[1]*s[2]+t[3]*s[3],e[4]=t[0]*s[4]+t[2]*s[5]+t[4],e[5]=t[1]*s[4]+t[3]*s[5]+t[5],e}translate(e,t,s){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+s[0],e[5]=t[5]+s[1],e}rotate(e,t,s){var r=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5],h=Math.sin(s),u=Math.cos(s);return e[0]=r*u+n*h,e[1]=-r*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,s){var r=s[0],i=s[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}invert(e,t){var s=t[0],r=t[2],i=t[4],a=t[1],n=t[3],o=t[5],l=s*n-a*r;return l?(l=1/l,e[0]=n*l,e[1]=-a*l,e[2]=-r*l,e[3]=s*l,e[4]=(r*o-n*i)*l,e[5]=(a*i-s*o)*l,e):null}mulVector(e,t,s){var r=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5];return e[0]=s[0]*r+s[1]*i+a,e[1]=s[0]*n+s[1]*o+l,e}},da.Util=new Ji,da.Util_vector=new ua;
  1293. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1294. * This program are made available under the terms of the Apache License, Version 2.0
  1295. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1296. class ma{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=da.Util_vector.create(),function(t){this.transform||(this.transform=da.Util_matrix.create());var s=this.transform;function r(e){return e>-5e-5&&e<5e-5}da.Util_vector.sub(e,t,this.position),r(e[0])&&r(e[1])||(da.Util_vector.normalize(e,e),s[2]=e[0]*this.scale[1],s[3]=e[1]*this.scale[1],s[0]=e[1]*this.scale[0],s[1]=-e[0]*this.scale[0],s[4]=this.position[0],s[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||da.Util_matrix.create();if(da.Util_matrix.identity(t),this.needLocalTransform){if(s(this.scale[0])||s(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;let r=s(e[0])||s(e[1]);r&&da.Util_matrix.translate(t,t,e),da.Util_matrix.scale(t,t,this.scale),r&&(e[0]=-e[0],e[1]=-e[1],da.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 r=s(e[0])||s(e[1]);r&&da.Util_matrix.translate(t,t,e),da.Util_matrix.rotate(t,t,this.rotation[0]),r&&(e[0]=-e[0],e[1]=-e[1],da.Util_matrix.translate(t,t,e))}}else 0!==this.rotation&&da.Util_matrix.rotate(t,t,this.rotation);(s(this.position[0])||s(this.position[1]))&&da.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?da.Util_matrix.mul(this.transform,this.parent.transform,this.transform):da.Util_matrix.copy(this.transform,this.parent.transform))}function s(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],s=this.position,r=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)),s[0]=e[4],s[1]=e[5],r[0]=t,r[1]=a,r[2]=r[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}}}
  1297. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1298. * This program are made available under the terms of the Apache License, Version 2.0
  1299. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1300. class ya extends(e.mixin(ha,ma)){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,V.extend(this,e),this.id=this.id||V.createUniqueID("smShape_"),this.CLASS_NAME="SuperMap.LevelRenderer.Shape",this.getTansform=(t=[],function(e,s){var r=[e,s];return this.needTransform&&this.transform&&(da.Util_matrix.invert(t,this.transform),da.Util_matrix.mulVector(r,t,[e,s,1]),e==r[0]&&s==r[1]&&this.updateNeedTransform()),r})}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 s=this.beforeBrush(e,t);switch(e.beginPath(),this.buildPath(e,s),s.brushType){case"both":this.setCtxGlobalAlpha(e,"fill",s),e.fill(),s.lineWidth>0&&(this.setCtxGlobalAlpha(e,"stroke",s),e.stroke()),this.setCtxGlobalAlpha(e,"reset",s);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",s),s.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",s);break;default:this.setCtxGlobalAlpha(e,"fill",s),e.fill(),this.setCtxGlobalAlpha(e,"reset",s)}this.drawText(e,s,this.style),this.afterBrush(e)}beforeBrush(e,t){var s=this.style;return this.brushTypeOnly&&(s.brushType=this.brushTypeOnly),t&&(s=this.getHighlightStyle(s,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(s.strokeColor=s.strokeColor||s.color),e.save(),this.doClip(e),this.setContext(e,s),this.setTransform(e),s}afterBrush(e){e.restore()}setContext(e,t){for(var s=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],r=0,i=s.length;r<i;r++){var a=t[s[r][0]],n=s[r][1];void 0!==a&&(e[n]=a)}}doClip(e){var t=da.Util_matrix.create();if(this.__clipShapes)for(var s=0;s<this.__clipShapes.length;s++){var r=this.__clipShapes[s];if(r.needTransform){let s=r.transform;da.Util_matrix.invert(t,s),e.transform(s[0],s[1],s[2],s[3],s[4],s[5])}if(e.beginPath(),r.buildPath(e,r.style),e.clip(),r.needTransform){let s=t;e.transform(s[0],s[1],s[2],s[3],s[4],s[5])}}}getHighlightStyle(e,t,s){var r={};for(let t in e)r[t]=e[t];var i=da.Util_color.getHighlightColor();"stroke"!=e.brushType?(r.strokeColor=i,r.lineWidth=e.lineWidth||1,r.brushType="both"):"stroke"!=s?(r.strokeColor=i,r.lineWidth=e.lineWidth||1):r.strokeColor=t.strokeColor||da.Util_color.mix(e.strokeColor,da.Util_color.toRGB(i));for(let e in t)void 0!==t[e]&&(r[e]=t[e]);return r}getHighlightZoom(){return"text"!=this.type?6:2}drift(e,t){this.position[0]+=e,this.position[1]+=t}buildPath(e,t){da.Util_log("buildPath not implemented in "+this.type)}getRect(e){da.Util_log("getRect not implemented in "+this.type)}isCover(e,t){var s=this.getTansform(e,t);e=s[0],t=s[1];var r=this.style.__rect;return r||(r=this.style.__rect=this.getRect(this.style)),e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height&&da.Util_area.isInside(this,this.style,e,t)}drawText(e,t,s){if(void 0!==t.text&&!1!==t.text){var r=t.textColor||t.color||t.strokeColor;e.fillStyle=r;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=(s||t).__rect||this.getRect(s||t);switch(h){case"inside":n=c.x+c.width/2,o=c.y+c.height/2,i="center",a="middle","stroke"!=t.brushType&&r==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 p=0,d=0,m=0,y=0;if(void 0!==t.pointList){var f=t.pointList;if(f.length<2)return;var g=f.length;switch(h){case"start":p=f[0][0]+u[0],d=f[1][0]+u[0],m=f[0][1]+u[1],y=f[1][1]+u[1];break;case"end":p=f[g-2][0]+u[0],d=f[g-1][0]+u[0],m=f[g-2][1]+u[1],y=f[g-1][1]+u[1]}}else p=t.xStart+u[0]||0,d=t.xEnd+u[0]||0,m=t.yStart+u[1]||0,y=t.yEnd+u[1]||0;switch(h){case"start":i=p<d?"end":"start",a=m<y?"bottom":"top",n=p,o=m;break;case"end":i=p<d?"start":"end",a=m<y?"top":"bottom",n=d,o=y}l-=4,p&&d&&p!=d?n-="end"==i?l:-l:i="center",m!=y?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,s){e.globalAlpha="fill"===t?void 0===s.fillOpacity?void 0===s.opacity?1:s.opacity:s.fillOpacity:"stroke"===t?void 0===s.strokeOpacity?void 0===s.opacity?1:s.opacity:s.strokeOpacity:void 0===s.opacity?1:s.opacity}static _fillText(e,t,s,r,i,a,n){i&&(e.font=i),e.textAlign=a,e.textBaseline=n;var o=ya._getTextRect(t,s,r,i,a,n);t=(t+"").split("\n");var l=da.Util_area.getTextHeight("ZH",i);switch(n){case"top":r=o.y;break;case"bottom":r=o.y+l;break;default:r=o.y+l/2}for(var h=0,u=t.length;h<u;h++)e.fillText(t[h],s,r),r+=l}static _getTextRect(e,t,s,r,i,a){var n=da.Util_area.getTextWidth(e,r),o=da.Util_area.getTextHeight("ZH",r);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":s-=o*e.length;break;default:s-=o*e.length/2}return{x:t,y:s,width:n,height:o*e.length}}}
  1301. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1302. * This program are made available under the terms of the Apache License, Version 2.0
  1303. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1304. class fa 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 s=this.refOriginalPosition;e.arc(t.x+s[0],t.y+s[1],t.r,0,2*Math.PI,!0)}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=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+s[0]-e.r-t/2),y:Math.round(e.y+s[1]-e.r-t/2),width:2*e.r+t,height:2*e.r+t},e.__rect)}}
  1305. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1306. * This program are made available under the terms of the Apache License, Version 2.0
  1307. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1308. class ga 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 s=this.refOriginalPosition,r=this.style;if(t&&(r=this.getHighlightStyle(r,this.highlightStyle||{})),void 0!==r.text&&!1!==r.text){e.save(),this.doClip(e),this.setContext(e,r),this.setTransform(e),r.textFont&&(e.font=r.textFont),e.textAlign=r.textAlign||"start",e.textBaseline=r.textBaseline||"middle";var i,a=(r.text+"").split("\n"),n=da.Util_area.getTextHeight("ZH",r.textFont),o=this.getRectNoRotation(r),l=r.x+s[0];i="top"==r.textBaseline?o.y:"bottom"==r.textBaseline?o.y+n:o.y+n/2;for(var h=r.x+s[0],u=r.y+s[1],c=0,p=a.length;c<p;c++){switch(r.labelRect&&(e.fillRect(o.x-2,o.y,o.width+4,o.height),e.fillStyle=r.strokeColor,e.strokeRect(o.x-2,o.y,o.width+4,o.height),e.fillStyle=r.textColor),r.brushType){case"stroke":this.setCtxGlobalAlpha(e,"stroke",r),r.textRotation&&0!==r.textRotation?(e.save(),e.translate(h,u),e.rotate(r.textRotation*Math.PI/180),"top"==r.textBaseline?r.maxWidth?e.strokeText(a[c],0,n*c,r.maxWidth):e.strokeText(a[c],0,n*c):"bottom"==r.textBaseline?r.maxWidth?e.strokeText(a[c],0,n*(c+1)-o.height,r.maxWidth):e.strokeText(a[c],0,n*(c+1)-o.height):r.maxWidth?e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth):e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2),e.restore()):r.maxWidth?e.strokeText(a[c],l,i,r.maxWidth):e.strokeText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r);break;case"both":r.textRotation&&0!==r.textRotation?(e.save(),e.translate(h,u),e.rotate(r.textRotation*Math.PI/180),"top"==r.textBaseline?r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*c,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*c,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*c),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*c),this.setCtxGlobalAlpha(e,"reset",r)):"bottom"==r.textBaseline?r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height),this.setCtxGlobalAlpha(e,"reset",r)):r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height/2-n/2),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2),this.setCtxGlobalAlpha(e,"reset",r)),e.restore()):r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],l,i,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],l,i,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r));break;default:this.setCtxGlobalAlpha(e,"fill",r),r.textRotation&&0!==r.textRotation?(e.save(),e.translate(h,u),e.rotate(r.textRotation*Math.PI/180),"top"==r.textBaseline?r.maxWidth?e.fillText(a[c],0,n*c,r.maxWidth):e.fillText(a[c],0,n*c):"bottom"==r.textBaseline?r.maxWidth?e.fillText(a[c],0,n*(c+1)-o.height,r.maxWidth):e.fillText(a[c],0,n*(c+1)-o.height):r.maxWidth?e.fillText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth):e.fillText(a[c],0,n*(c+1)-o.height/2-n/2),e.restore()):r.maxWidth?e.fillText(a[c],l,i,r.maxWidth):e.fillText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r)}i+=n}e.restore()}}getRect(e){if(e.__rect)return e.__rect;for(var t,s,r,i,a=this.getTextBackground(e,!0),n=0,o=a.length;n<o;n++){var l=a[n];0==n?(t=l[0],r=l[0],s=l[1],i=l[1]):(l[0]<t&&(t=l[0]),l[0]>r&&(r=l[0]),l[1]<s&&(s=l[1]),l[1]>i&&(i=l[1]))}return e.__rect={x:t,y:s,width:r-t,height:i-s},e.__rect}getRectNoRotation(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition,r=da.Util_area.getTextHeight("ZH",e.textFont),i=da.Util_area.getTextWidth(e.text,e.textFont),a=da.Util_area.getTextHeight(e.text,e.textFont),n=e.x+s[0];"end"==e.textAlign||"right"==e.textAlign?n-=i:"center"==e.textAlign&&(n-=i/2),t="top"==e.textBaseline?e.y+s[1]:"bottom"==e.textBaseline?e.y+s[1]-a:e.y+s[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+s[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?r/3*(i/o):r/3));return{x:n,y:t,width:i,height:a}}getTextBackground(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var r=this.getRectNoRotation(e),i=e.x+s[0],a=e.y+s[1],n=[];if(e.textRotation&&0!==e.textRotation){let t=e.textRotation,s=this.getRotatedLocation(r.x,r.y,i,a,t),o=this.getRotatedLocation(r.x+r.width,r.y,i,a,t),l=this.getRotatedLocation(r.x+r.width,r.y+r.height,i,a,t),h=this.getRotatedLocation(r.x,r.y+r.height,i,a,t);n.push(s),n.push(o),n.push(l),n.push(h)}else{let e=[r.x,r.y],t=[r.x+r.width,r.y],s=[r.x+r.width,r.y+r.height],i=[r.x,r.y+r.height];n.push(e),n.push(t),n.push(s),n.push(i)}return e.__textBackground=n,e.__textBackground}getRotatedLocation(e,t,s,r,i){var a,n,o=new Array;return t=-t,r=-r,i=-i,a=(e-s)*Math.cos(i/180*Math.PI)-(t-r)*Math.sin(i/180*Math.PI)+s,n=(e-s)*Math.sin(i/180*Math.PI)+(t-r)*Math.cos(i/180*Math.PI)+r,o[0]=a,o[1]=-n,o}}
  1309. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1310. * This program are made available under the terms of the Apache License, Version 2.0
  1311. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1312. class va 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 s=this.refOriginalPosition,r=t.x+s[0],i=t.y+s[1];return e.moveTo(r+t.r,i),e.arc(r,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,s=this.refOriginalPosition,r=e.x+s[0],i=e.y+s[1],a=e.r;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(r-a-t/2),y:Math.round(i-a-t/2),width:2*a+t,height:2*a+t},e.__rect}}
  1313. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1314. * This program are made available under the terms of the Apache License, Version 2.0
  1315. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1316. class Sa 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 s=this.style;t&&(s=this.getHighlightStyle(s,this.highlightStyle||{})),e.save(),this.setContext(e,s),this.setTransform(e);var r=!1;"fill"!=s.brushType&&"both"!=s.brushType&&void 0!==s.brushType||(e.beginPath(),"dashed"==s.lineType||"dotted"==s.lineType||"dot"==s.lineType||"dash"==s.lineType||"dashdot"==s.lineType||"longdash"==s.lineType||"longdashdot"==s.lineType?this.buildPath(e,{lineType:"solid",lineWidth:s.lineWidth,pointList:s.pointList}):(this.buildPath(e,s),r=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",s),e.fill(),this.setCtxGlobalAlpha(e,"reset",s)),s.lineWidth>0&&("stroke"==s.brushType||"both"==s.brushType)&&(r||(e.beginPath(),this.buildPath(e,s)),this.setCtxGlobalAlpha(e,"stroke",s),e.stroke(),this.setCtxGlobalAlpha(e,"reset",s)),this.drawText(e,s,this.style);var i=V.cloneObject(s);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",r=!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),r=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",i),e.fill(),this.setCtxGlobalAlpha(e,"reset",i)),i.lineWidth>0&&("stroke"==i.brushType||"both"==i.brushType)?(r||(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 s=this.refOriginalPosition,r=t.pointList;if(!(r.length<2))if(t.smooth&&"spline"!==t.smooth){var i,a,n,o=da.SUtil_smoothBezier(r,t.smooth,!0,t.smoothConstraint,s);e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(var l=r.length,h=0;h<l;h++)i=o[2*h],a=o[2*h+1],n=[r[(h+1)%l][0]+s[0],r[(h+1)%l][1]+s[1]],e.bezierCurveTo(i[0],i[1],a[0],a[1],n[0],n[1])}else if("spline"===t.smooth&&(r=da.SUtil_smoothSpline(r,!0,null,s)),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(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<r.length;t++)da.SUtil_dashedLineTo(e,r[t-1][0]+s[0],r[t-1][1]+s[1],r[t][0]+s[0],r[t][1]+s[1],a,[n,o]);da.SUtil_dashedLineTo(e,r[r.length-1][0]+s[0],r[r.length-1][1]+s[1],r[0][0]+s[0],r[0][1]+s[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(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<r.length;t++)da.SUtil_dashedLineTo(e,r[t-1][0]+s[0],r[t-1][1]+s[1],r[t][0]+s[0],r[t][1]+s[1],a,[n,o,l,h]);da.SUtil_dashedLineTo(e,r[r.length-1][0]+s[0],r[r.length-1][1]+s[1],r[0][0]+s[0],r[0][1]+s[1],a,[n,o,l,h])}}else{e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<r.length;t++)e.lineTo(r[t][0]+s[0],r[t][1]+s[1]);e.lineTo(r[0][0]+s[0],r[0][1]+s[1])}}getRect(e,t){var s;if(t?s=t:(this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),s=this.refOriginalPosition),e.__rect)return e.__rect;for(var r,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]+s[0]<i&&(i=l[h][0]+s[0]),l[h][0]+s[0]>a&&(a=l[h][0]+s[0]),l[h][1]+s[1]<n&&(n=l[h][1]+s[1]),l[h][1]+s[1]>o&&(o=l[h][1]+s[1]);return r="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(i-r/2),y:Math.round(n-r/2),width:a-i+r,height:o-n+r},e.__rect}}
  1317. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1318. * This program are made available under the terms of the Apache License, Version 2.0
  1319. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1320. class ba 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 s=this.refOriginalPosition,r=t.pointList;if(!(r.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=da.SUtil_smoothBezier(r,t.smooth,!1,t.smoothConstraint,s);e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=0;t<i-1;t++)a=l[2*t],n=l[2*t+1],o=[r[t+1][0]+s[0],r[t+1][1]+s[1]],e.bezierCurveTo(a[0],a[1],n[0],n[1],o[0],o[1])}else if("spline"===t.smooth&&(i=(r=da.SUtil_smoothSpline(r,null,null,s)).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(r[0][0]+s[0],r[0][1]+s[1]);for(var h=1;h<i;h++)da.SUtil_dashedLineTo(e,r[h-1][0]+s[0],r[h-1][1]+s[1],r[h][0]+s[0],r[h][1]+s[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(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<i;t++)da.SUtil_dashedLineTo(e,r[t-1][0]+s[0],r[t-1][1]+s[1],r[t][0]+s[0],r[t][1]+s[1],a,[n,o,l,h])}}else{e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<i;t++)e.lineTo(r[t][0]+s[0],r[t][1]+s[1])}}}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition;return Sa.prototype.getRect.apply(this,[e,t])}}
  1321. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1322. * This program are made available under the terms of the Apache License, Version 2.0
  1323. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1324. class xa 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,s){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=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(xa._refreshTimeout),xa._needsRefresh.push(n),xa._refreshTimeout=setTimeout(function(){s&&s(xa._needsRefresh),xa._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+r[0],c=i.y+r[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+r[0]||0,s=i.sy+r[1]||0;e.drawImage(a,t,s,i.sWidth,i.sHeight,u,c,l,h)}else if(i.sx&&i.sy){let t=i.sx+r[0],s=i.sy+r[1];var p=l-t,d=h-s;e.drawImage(a,t,s,p,d,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={}}}xa._needsRefresh=[],xa._refreshTimeout=null;
  1325. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1326. * This program are made available under the terms of the Apache License, Version 2.0
  1327. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1328. class Ca 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 s,r,i,a,n,o=this.refOriginalPosition,l=t.x+o[0],h=t.y+o[1],u=t.width,c=t.height,p=t.radius;"number"==typeof p?s=r=i=a=p:p instanceof Array?1===p.length?s=r=i=a=p[0]:2===p.length?(s=i=p[0],r=a=p[1]):3===p.length?(s=p[0],r=a=p[1],i=p[2]):(s=p[0],r=p[1],i=p[2],a=p[3]):s=r=i=a=0,s+r>u&&(s*=u/(n=s+r),r*=u/n),i+a>u&&(i*=u/(n=i+a),a*=u/n),r+i>c&&(r*=c/(n=r+i),i*=c/n),s+a>c&&(s*=c/(n=s+a),a*=c/n),e.moveTo(l+s,h),e.lineTo(l+u-r,h),0!==r&&e.quadraticCurveTo(l+u,h,l+u,h+r),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+s),0!==s&&e.quadraticCurveTo(l,h,l+s,h)}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+s[0],t.y+s[1]),e.lineTo(t.x+s[0]+t.width,t.y+s[1]),e.lineTo(t.x+s[0]+t.width,t.y+s[1]+t.height),e.lineTo(t.x+s[0],t.y+s[1]+t.height),e.lineTo(t.x+s[0],t.y+s[1])),e.closePath()}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=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+s[0]-t/2),y:Math.round(e.y+s[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}}
  1329. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1330. * This program are made available under the terms of the Apache License, Version 2.0
  1331. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1332. class _a 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 s=this.refOriginalPosition,r=t.x+s[0],i=t.y+s[1],a=t.r0||0,n=t.r,o=t.startAngle,l=t.endAngle,h=t.clockWise||!1;o=da.Util_math.degreeToRadian(o),l=da.Util_math.degreeToRadian(l),h||(o=-o,l=-l);var u=da.Util_math.cos(o),c=da.Util_math.sin(o);e.moveTo(u*a+r,c*a+i),e.lineTo(u*n+r,c*n+i),e.arc(r,i,n,o,l,!h),e.lineTo(da.Util_math.cos(l)*a+r,da.Util_math.sin(l)*a+i),0!==a&&e.arc(r,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,s=da.Util_vector.create(),r=da.Util_vector.create(),i=da.Util_vector.create(),a=da.Util_vector.create(),n=e.x+t[0],o=e.y+t[1],l=e.r0||0,h=e.r,u=da.Util_math.degreeToRadian(e.startAngle),c=da.Util_math.degreeToRadian(e.endAngle),p=e.clockWise;return p||(u=-u,c=-c),l>1?da.Util_computeBoundingBox.arc(n,o,l,u,c,!p,s,i):(s[0]=i[0]=n,s[1]=i[1]=o),da.Util_computeBoundingBox.arc(n,o,h,u,c,!p,r,a),da.Util_vector.min(s,s,r),da.Util_vector.max(i,i,a),e.__rect={x:s[0],y:s[1],width:i[0]-s[0],height:i[1]-s[1]},e.__rect}}
  1333. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1334. * This program are made available under the terms of the Apache License, Version 2.0
  1335. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1336. class Ta{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 ta){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e=V.copyAttributesWithClip(e,t.style,["x","y"]);let s=new fa;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","style","highlightStyle"]),s}if(t instanceof sa){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=V.copyAttributesWithClip(e,t.style,["pointList"]);let s=new ba;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["pointList","style","highlightStyle"]),s}if(t instanceof ra){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=V.copyAttributesWithClip(e,t.style,["pointList"]);let s=new Sa;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["pointList","style","highlightStyle"]),s}if(t instanceof ia){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=V.copyAttributesWithClip(e,t.style,["x","y","width","height"]);let s=new Ca;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","width","height","style","highlightStyle"]),s}if(t instanceof aa){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=V.copyAttributesWithClip(e,t.style,["x","y","r","startAngle","endAngle","r0","endAngle"]);let s=new _a;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","r","startAngle","endAngle","r0","endAngle","style","highlightStyle"]),s}if(t instanceof na){let e=new Object;e.x=t.x,e.y=t.y,e.text=t.text,e=V.copyAttributesWithClip(e,t.style,["x","y","text"]);let s=new ga;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","text","style","highlightStyle"]),s}if(t instanceof oa){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=V.copyAttributesWithClip(e,t.style,["x","y","image","width","height","sx","sy","sWidth","sHeight"]);let s=new xa;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","image","width","height","style","highlightStyle"]),s}if(t instanceof la){let e=new Object;e.x=t.x,e.r=t.r,e.y=t.y,e=V.copyAttributesWithClip(e,t.style,["x","y","r"]);let s=new va;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","r","style","highlightStyle","lineWidth","text","textPosition"]),s}return null}static transformStyle(e){var t={},s=["normal","normal","normal","12","arial,sans-serif"],r=[!0,!1];for(var i in e)switch(i){case"fill":r[0]=e[i];break;case"fillColor":t.color=e[i];break;case"stroke":r[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":s[0]=e[i];break;case"fontVariant":s[1]=e[i];break;case"fontWeight":s[2]=e[i];break;case"fontSize":var a="";e[i]&&e[i].toString().indexOf("px")<0&&(a="px"),s[3]=e[i]+a;break;case"fontFamily":s[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=s.join(" "),!0===r[0]&&!1===r[1]?t.brushType="fill":!1===r[0]&&!0===r[1]?t.brushType="stroke":!0===r[0]&&!0===r[1]?t.brushType="both":t.brushType="fill",null==t.lineWidth&&(t.lineWidth=1),t}static Background(e,t,s){var r=s||{},i=new ia(t[0],t[3],Math.abs(t[2]-t[0]),Math.abs(t[3]-t[1]));return i.style={fillColor:"#f3f3f3"},r.backgroundStyle&&V.copyAttributesWithClip(i.style,r.backgroundStyle),r.backgroundRadius&&(i.style.radius=r.backgroundRadius),i.clickable=!1,i.hoverable=!1,e.createShape(i)}static GraphAxis(e,t,s,r){var i=t,a=s||{},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 p=Math.abs(i[1]-i[3])/h,d=i[3];c.push([i[0],d-5]);for(var m=0;m<h;m++){if(c.push([i[0],d]),c.push([i[0]-5,d]),c.push([i[0],d]),l){var y=new sa([[i[0],d],[i[2],d]]);y.style={strokeColor:"#cfcfcf",strokeLinecap:"butt",strokeLineJoin:"round",strokeWidth:1},y.clickable=!1,y.hoverable=!1,a.xReferenceLineStyle&&V.copyAttributesWithClip(y.style,a.xReferenceLineStyle),n.push(e.createShape(y))}d+=p}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 f=[[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 ra(f);v.style={fillColor:"#008acd"},V.copyAttributesWithClip(v.style,a.axisStyle),o.push(e.createShape(v));var S=new ra(g);if(S.style={fillColor:"#008acd"},V.copyAttributesWithClip(S.style,a.axisStyle),o.push(e.createShape(S)),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){var b=new ra(u);b.style={fillColor:"#008acd"},V.copyAttributesWithClip(b.style,a.axisStyle),o.push(e.createShape(b))}}var x=new sa(c);x.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},a.axisStyle&&V.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 na(i[0]-5+E[0],i[3]+E[1],T[0]);t.style={labelAlign:"right"},a.axisYLabelsStyle&&V.copyAttributesWithClip(t.style,a.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,_.push(e.createShape(t))}else for(var A=i[3],w=Math.abs(i[1]-i[3])/(t-1),L=0;L<t;L++){let t=new na(i[0]-5+E[0],A+E[1],T[L]);t.style={labelAlign:"right"},a.axisYLabelsStyle&&V.copyAttributesWithClip(t.style,a.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,_.push(e.createShape(t)),A+=w}}var P=[];if(a.axisXLabels&&a.axisXLabels.length&&a.axisXLabels.length>0){let t=a.axisXLabels,s=t.length,n=[0,0];if(a.axisXLabelsOffset&&a.axisXLabelsOffset.length&&(n=a.axisXLabelsOffset),r&&r.xPositions&&r.xPositions.length&&r.xPositions.length==s){let o=r.xPositions;for(let r=0;r<s;r++){let s=new na(o[r]+n[0],i[1]+n[1],t[r]);s.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&V.copyAttributesWithClip(s.style,a.axisXLabelsStyle),s.clickable=!1,s.hoverable=!1,P.push(e.createShape(s))}}else if(1==s){let s=new na(i[0]-5+n[0],i[1]+n[0],t[0]);s.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&V.copyAttributesWithClip(s.style,a.axisXLabelsStyle),s.clickable=!1,s.hoverable=!1,P.push(e.createShape(s))}else{let r=i[0],o=Math.abs(i[2]-i[0])/(s-1);for(let l=0;l<s;l++){let s=new na(r+n[0],i[1]+n[1],t[l]);s.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&V.copyAttributesWithClip(s.style,a.axisXLabelsStyle),s.clickable=!1,s.hoverable=!1,P.push(e.createShape(s)),r+=o}}}return n.concat(C).concat(_).concat(P).concat(o)}static ShapeStyleTool(e,t,s,r,i,a){var n=e||{};if(t&&V.copyAttributesWithClip(n,t),s&&s.length&&void 0!==i&&!isNaN(i)&&i>=0&&s[i]&&V.copyAttributesWithClip(n,s[i]),r&&r.length&&void 0!==a)for(var o=r,l=o.length,h=parseFloat(a),u=0;u<l;u++)if(o[u].start<=h&&h<o[u].end){V.copyAttributesWithClip(n,o[u].style);break}return n}}e.Feature=e.Feature||{},e.Feature.ShapeFactory=Ta;
  1337. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1338. * This program are made available under the terms of the Apache License, Version 2.0
  1339. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1340. class Ea{constructor(e,t){e&&t&&t.map&&t.renderer&&(this.id=V.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(),s=this.layer.map.getExtent();if(e instanceof $||e instanceof te){return[e.x/t+-s.left/t,s.top/t-e.y/t]}if(e instanceof q){return[e.lon/t+-s.left/t,s.top/t-e.lat/t]}return null}}e.Feature=e.Feature||{},e.Feature.Theme=Ea;
  1341. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1342. * This program are made available under the terms of the Apache License, Version 2.0
  1343. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1344. class Aa extends Ea{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),this.shapeFactory=new Ta,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=s||[],this.dataValues=null,this.lonlat=i||this.data.geometry.getBounds().getCenterLonLat(),r&&r.width&&r.height&&r.codomain&&(this.setting=r),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,s=Ea.getDataValues(this.data,this.fields,t);this.dataValues=s||[],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 r=this.width,i=this.height,a=this.location;this.origonPoint=[a[0]-r/2,a[1]-i/2];var n=this.origonPoint;this.chartBox=[n[0],n[1]+i,n[0]+r,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 s=this.width,r=this.height,i=this.location;return this.chartBounds=new Y(i[0]-s/2,i[1]+r/2,i[0]+s/2,i[1]-r/2),this.resetLinearGradient(),i}resetLinearGradient(){}shapesConvertToRelativeCoordinate(){for(var e=this.shapes,t=this.location,s=0,r=e.length;s<r;s++){e[s].refOriginalPosition=t;var i=e[s].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)}}Ea.getDataValues=function(e,t,s){if(!e.attributes)return!1;for(var r=[],i=e.attributes,a=0;a<t.length;a++)for(var n in i)if(n===t[a])try{!isNaN(s)&&s>=0?r.push(parseFloat(i[n].toString()).toFixed(s)):r.push(parseFloat(i[n].toString()))}catch(e){throw new Error("not a number")}return r.length===t.length&&r},e.Feature.Theme.Graph=Aa;e.Feature.Theme.Bar=
  1345. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1346. * This program are made available under the terms of the Apache License, Version 2.0
  1347. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1348. class extends Aa{constructor(e,t,s,r,i){super(e,t,s,r,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 s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=this.dataViewBox,i=this.dataValues;if(!(i.length<1)){for(let e=0,t=i.length;e<t;e++)if(i[e]<s[0]||i[e]>s[1])return;var a=this.calculateXShapeInfo();if(a){var n=a.xPositions,o=a.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(Ta.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(Ta.GraphAxis(this.shapeFactory,r,t,a)));for(var l=0;l<i.length;l++){var h=r[1]-(i[l]-s[0])/this.DVBUnitValue,u=[[n[l]-o/2,r[1]-1],[n[l]+o/2,r[1]-1],[n[l]+o/2,h],[n[l]-o/2,h]],c=new ra(u);if(void 0===t.showShadow||t.showShadow){if(t.barShadowStyle){var p=t.barShadowStyle;p.shadowBlur&&(e.shadowBlur=p.shadowBlur),p.shadowColor&&(e.shadowColor=p.shadowColor),p.shadowOffsetX&&(e.shadowOffsetX=p.shadowOffsetX),p.shadowOffsetY&&(e.shadowOffsetY=p.shadowOffsetY)}c.style={},V.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,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=0,n=this.DVBWidth;if(s.xShapeBlank&&s.xShapeBlank.length&&3==s.xShapeBlank.length){var o=n-((e=s.xShapeBlank)[0]+e[2]+(r-1)*e[1]);if(o<=r)return null;a=o/r}else e=[a=n/(2*r+1),a,a];for(var l=0,h=0;h<r;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,s=-1,r=0;r<e;r++){var i=this.shapes[r];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];++s>=t.length&&(s%=t.length);var l=t[s][0],h=t[s][1],u=(new zi).getLinearGradient(n,0,o,0,[[0,l],[1,h]]);i.style.color=u}}}};e.Feature.Theme.Bar3D=
  1349. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1350. * This program are made available under the terms of the Apache License, Version 2.0
  1351. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1352. class extends Aa{constructor(e,t,s,r,i){super(e,t,s,r,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 s=this.dataViewBox,r=this.dataValues;if(!(r.length<1)){for(let e=0,s=r.length;e<s;e++)if(r[e]<t[0]||r[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(Ta.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(Ta.GraphAxis(this.shapeFactory,s,e,i)));var o=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10;for(let i=0;i<r.length;i++){var l=s[1]-(r[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]],p=[[u,l],[u-o,l+o],[u-o,s[1]+o],[u,s[1]]],d=[[h-o,s[1]+o],[u-o,s[1]+o],[u-o,l+o],[h-o,l+o]];o<=0&&(d=[[h,s[1]],[u,s[1]],[u,l],[h,l]]);var m=new ra(c),y=new ra(p),f=new ra(d);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,f.style=Ta.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barFaceStyle,e.barFaceStyleByFields,e.barFaceStyleByCodomain,i,r[i]),y.style=Ta.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barSideStyle,e.barSideStyleByFields,e.barSideStyleByCodomain,i,r[i]),m.style=Ta.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barTopStyle,e.barTopStyleByFields,e.barTopStyleByCodomain,i,r[i]),e.barSideHoverStyle=e.barSideHoverStyle?e.barSideHoverStyle:e.barFaceHoverStyle,e.barTopHoverStyle=e.barTopHoverStyle?e.barTopHoverStyle:e.barFaceHoverStyle,f.highlightStyle=Ta.ShapeStyleTool({stroke:!0},e.barFaceHoverStyle),y.highlightStyle=Ta.ShapeStyleTool({stroke:!0},e.barSideHoverStyle),m.highlightStyle=Ta.ShapeStyleTool({stroke:!0},e.barTopHoverStyle),m.refDataID=y.refDataID=f.refDataID=this.data.id,m.isHoverByRefDataID=y.isHoverByRefDataID=f.isHoverByRefDataID=!0,m.refDataHoverGroup=y.refDataHoverGroup=f.refDataHoverGroup=V.createUniqueID("lr_shg"),m.dataInfo=y.dataInfo=f.dataInfo={field:this.fields[i],value:r[i]},void 0!==e.barHoverAble&&(m.hoverable=y.hoverable=f.hoverable=e.barHoverAble),void 0!==e.barClickAble&&(m.clickable=y.clickable=f.clickable=e.barClickAble),this.shapes.push(this.shapeFactory.createShape(y)),this.shapes.push(this.shapeFactory.createShape(m)),this.shapes.push(this.shapeFactory.createShape(f))}this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=0,n=this.DVBWidth;if(s.xShapeBlank&&s.xShapeBlank.length&&3==s.xShapeBlank.length){var o=n-((e=s.xShapeBlank)[0]+e[2]+(r-1)*e[1]);if(o<=r)return null;a=o/r}else e=[a=n/(2*r+1),a,a];for(var l=0,h=0;h<r;h++)0==h?l=e[0]+a/2:l+=a+e[1],i.push(t[0]+l);return{xPositions:i,width:a}}};
  1353. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1354. * This program are made available under the terms of the Apache License, Version 2.0
  1355. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1356. class wa extends Aa{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),this.setting=null,r&&r.codomain&&(this.setting=r,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,s=this.height,r=this.location;this.origonPoint=[r[0]-t/2,r[1]-s/2];var i=this.origonPoint;this.chartBox=[i[0],i[1]+s,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)}}e.Feature.Theme.RankSymbol=wa;e.Feature.Theme.Circle=
  1357. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1358. * This program are made available under the terms of the Apache License, Version 2.0
  1359. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1360. class extends wa{constructor(e,t,s,r,i){super(e,t,s,r,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,s=Ea.getDataValues(this.data,this.fields,t);this.dataValues=s||[];var r=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=r[0]*a+e.minR;if(this.width=2*n,this.height=2*n,this.initBaseParameter()&&(!i||!(r[0]<i[0]||r[0]>i[1]))){var o=this.DVBCenterPoint,l=new la(o[0],o[1],n);l.style=Ta.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=Ta.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:r[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}};e.Feature.Theme.Line=
  1361. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1362. * This program are made available under the terms of the Apache License, Version 2.0
  1363. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1364. class extends Aa{constructor(e,t,s,r,i,a){super(e,t,s,r,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,s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=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(Ta.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(Ta.GraphAxis(this.shapeFactory,t,e,a));for(var h=[],u=[],c=0,p=i.length;c<p;c++){if(i[c]<s[0]||i[c]>s[1])return null;n=l[c],o=t[1]-(i[c]-s[0])/r;var d=new ta(n,o);d.style=Ta.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,c,i[c]),d.highlightStyle=Ta.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(d.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(d.clickable=e.pointClickAble),d.refDataID=this.data.id,d.dataInfo={field:this.fields[c],value:i[c]},u.push(this.shapeFactory.createShape(d));var m=[n,o];h.push(m)}var y=new sa(h);y.style=Ta.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),y.clickable=!1,y.hoverable=!1;var f=this.shapeFactory.createShape(y);this.shapes.push(f),this.shapes=this.shapes.concat(u),this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=this.DVBWidth,n=0;if(s.xShapeBlank&&s.xShapeBlank.length&&2==s.xShapeBlank.length){var o=a-((e=s.xShapeBlank)[0]+e[1]);if(o<=r)return null;n=o/(r-1)}else e=[n=a/(r+1),n,n];for(var l=0,h=0;h<r;h++)0==h?l=e[0]:l+=n,i.push(t[0]+l);return{xPositions:i,width:0}}};e.Feature.Theme.Pie=
  1365. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1366. * This program are made available under the terms of the Apache License, Version 2.0
  1367. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1368. class extends Aa{constructor(e,t,s,r,i){super(e,t,s,r,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(Ta.Background(this.shapeFactory,this.chartBox,e));var s=this.dataValues;if(!(s.length<1)){var r=this.DVBCodomain;for(let e=0;e<s.length;e++)if(s[e]<r[0]||s[e]>r[1])return;var i=0;for(let e=0;e<s.length;e++)i+=Math.abs(s[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<s.length;c++){var p=Math.abs(s[c]);(l=0===c?o+p*a:c===p.length-1?h:o+p*a)-o>=360&&(l=359.9999999);var d=new aa(n[0],n[1],u,o,l);if(void 0===e.sectorStyleByFields){var m=c%t.length;d.style=Ta.ShapeStyleTool(null,e.sectorStyle,t,null,m)}else d.style=Ta.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,c,s[c]);d.highlightStyle=Ta.ShapeStyleTool(null,e.sectorHoverStyle),void 0!==e.sectorHoverAble&&(d.hoverable=e.sectorHoverAble),void 0!==e.sectorClickAble&&(d.clickable=e.sectorClickAble),d.refDataID=this.data.id,d.dataInfo={field:this.fields[c],value:s[c]},this.shapes.push(this.shapeFactory.createShape(d)),o=l}this.shapesConvertToRelativeCoordinate()}}}};e.Feature.Theme.Point=
  1369. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1370. * This program are made available under the terms of the Apache License, Version 2.0
  1371. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1372. class extends Aa{constructor(e,t,s,r,i,a){super(e,t,s,r,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,s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=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(Ta.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(Ta.GraphAxis(this.shapeFactory,t,e,a));for(var h=0,u=i.length;h<u;h++){if(i[h]<s[0]||i[h]>s[1])return null;n=l[h],o=t[1]-(i[h]-s[0])/r;var c=new ta(n,o);c.style=Ta.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,h,i[h]),c.highlightStyle=Ta.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,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=this.DVBWidth,n=0;if(s.xShapeBlank&&s.xShapeBlank.length&&2==s.xShapeBlank.length){var o=a-((e=s.xShapeBlank)[0]+e[1]);if(o<=r)return null;n=o/(r-1)}else e=[n=a/(r+1),n,n];for(var l=0,h=0;h<r;h++)0==h?l=e[0]:l+=n,i.push(t[0]+l);return{xPositions:i,width:0}}};e.Feature.Theme.Ring=
  1373. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1374. * This program are made available under the terms of the Apache License, Version 2.0
  1375. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1376. class extends Aa{constructor(e,t,s,r,i){super(e,t,s,r,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(Ta.Background(this.shapeFactory,this.chartBox,t));var s=this.dataValues;if(!(s.length<1)){var r=this.DVBCodomain;for(let e=0;e<s.length;e++)if(s[e]<r[0]||s[e]>r[1])return;var i=0;for(let e=0;e<s.length;e++)i+=Math.abs(s[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,p=void 0!==t.innerRingRadius&&!isNaN(t.innerRingRadius)&&c?t.innerRingRadius:0,d=0;d<s.length;d++){var m=Math.abs(s[d]);l=0===d?o+m*a:d===m.length-1?h:o+m*a;var y=new aa(n[0],n[1],u,o,l,p);if(void 0===t.sectorStyleByFields){var f=d%e.length;y.style=Ta.ShapeStyleTool(null,t.sectorStyle,e,null,f)}else y.style=Ta.ShapeStyleTool(null,t.sectorStyle,t.sectorStyleByFields,t.sectorStyleByCodomain,d,s[d]);y.highlightStyle=Ta.ShapeStyleTool(null,t.sectorHoverStyle),void 0!==t.sectorHoverAble&&(y.hoverable=t.sectorHoverAble),void 0!==t.sectorClickAble&&(y.clickable=t.sectorClickAble),y.refDataID=this.data.id,y.dataInfo={field:this.fields[d],value:s[d]},this.shapes.push(this.shapeFactory.createShape(y)),o=l}this.shapesConvertToRelativeCoordinate()}}}};
  1377. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1378. * This program are made available under the terms of the Apache License, Version 2.0
  1379. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1380. class La extends Ea{constructor(e,t,s,r,i){if(super(e,t),e.geometry&&e.geometry instanceof X){this.dataBounds=e.geometry.getBounds(),this.nodesClipPixel=2,this.isHoverAble=!0,this.isMultiHover=!0,this.isClickAble=!0,this.highlightStyle=null,this.shapeOptions={},this.style=s||{},this.CLASS_NAME="SuperMap.Feature.Theme.Vector",this.style=s||{},r&&V.copyAttributesWithClip(this,r,["shapeOptions","dataBounds"]),i&&V.copyAttributesWithClip(this.shapeOptions,i);var a=e.geometry;this.lonlat=this.dataBounds.getCenterLonLat(),this.location=this.getLocalXY(this.lonlat),a instanceof se?this.lineToTF(a):a instanceof ee?this.lineToTF(a):a instanceof Z||(a instanceof K?this.multiPointToTF(a):a instanceof re?this.multiLineStringToTF(a):a instanceof ie?this.multiPolygonToTF(a):a instanceof ae?this.polygonToTF(a):a instanceof Q||(a instanceof $?this.pointToTF(a):a instanceof ne?this.rectangleToTF(a):a instanceof te&&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,s=[],r=[],i=this.location,a=[],n=this.nodesClipPixel,o=0;o<t.length;o++){var l=t[o];if(r=[],s=this.getLocalXY(l),r[0]=s[0]-i[0],r[1]=s[1]-i[1],a.length>0){var h=a[a.length-1];if(Math.abs(h[0]-r[0])<=n&&Math.abs(h[1]-r[1])<=n)continue}a.push(r)}if(a.length<2)return null;var u=new Object;(u=V.copyAttributesWithClip(u,this.style,["pointList"])).pointList=a;var c=new ba({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&&V.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}multiPointToTF(e){for(var t=e.components,s=[],r=[],i=this.location,a=[],n=this.nodesClipPixel,o=0;o<t.length;o++){var l=t[o];if(r=[],s=this.getLocalXY(l),r[0]=s[0]-i[0],r[1]=s[1]-i[1],a.length>0){var h=a[a.length-1];if(Math.abs(h[0]-r[0])<=n&&Math.abs(h[1]-r[1])<=n)continue}a.push(r);var u=new Object;u.r=6,(u=V.copyAttributesWithClip(u,this.style)).x=r[0],u.y=r[1];var c=new fa({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&&V.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}}multiLineStringToTF(e){for(var t=e.components,s=0;s<t.length;s++){var r=t[s];this.lineToTF(r)}}multiPolygonToTF(e){for(var t=e.components,s=0;s<t.length;s++){var r=t[s];this.polygonToTF(r)}}pointToTF(e){var t=this.location,s=this.getLocalXY(e),r=new Object;r.r=6,(r=V.copyAttributesWithClip(r,this.style)).x=s[0]-t[0],r.y=s[1]-t[1];var i=new fa({style:r,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&&V.copyAttributesWithClip(i,this.shapeOptions),this.shapes.push(i)}polygonToTF(e){for(var t=e.components,s=[],r=[],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(r=[],s=this.getLocalXY(u[c]),r[0]=s[0]-i[0],r[1]=s[1]-i[1],a.length>0){var p=a[a.length-1];if(Math.abs(p[0]-r[0])<=l&&Math.abs(p[1]-r[1])<=l)continue}a.push(r)}}else{n=[];for(var d=0;d<u.length;d++){if(r=[],s=this.getLocalXY(u[d]),r[0]=s[0]-i[0],r[1]=s[1]-i[1],n.length>0){var m=n[n.length-1];if(Math.abs(m[0]-r[0])<=l&&Math.abs(m[1]-r[1])<=l)continue}n.push(r)}}n.length<2||o.push(n)}if(!(a.length<2)){var y={};(y=V.copyAttributesWithClip(y,this.style,["pointList"])).pointList=a;var f=new Sa({style:y,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(f.highlightStyle=this.highlightStyle),f.refOriginalPosition=this.location,f.refDataID=this.data.id,f.isHoverByRefDataID=this.isMultiHover,o.length>0&&(f.holePolygonPointLists=o),this.shapeOptions&&V.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}}rectangleToTF(e){var t=this.location,s=new q(e.x,e.y),r=this.layer.map.getResolution(),i=this.getLocalXY(s),a=new Object;a.r=6,(a=V.copyAttributesWithClip(a,this.style)).x=i[0]-t[0],a.y=i[1]-t[1]-2*e.width/r,a.width=e.width/r,a.height=e.height/r;var n=new Ca({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&&V.copyAttributesWithClip(n,this.shapeOptions),this.shapes.push(n)}geoTextToTF(e){var t=this.location,s=this.getLocalXY(e),r=new Object;r.r=6,(r=V.copyAttributesWithClip(r,this.style,["x","y","text"])).x=s[0]-t[0],r.y=s[1]-t[1],r.text=e.text;var i=new ga({style:r,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&&V.copyAttributesWithClip(i,this.shapeOptions),this.shapes.push(i)}updateAndAddShapes(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,s=0,r=this.shapes.length;s<r;s++){var i=this.shapes[s];i.refOriginalPosition=e,t.addShape(i)}}getShapesCount(){return this.shapes.length}getLocalXY(e){return this.layer.getLocalXY(e)}}e.Feature.Theme.ThemeVector=La;
  1381. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1382. * This program are made available under the terms of the Apache License, Version 2.0
  1383. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1384. class Pa extends(e.mixin(ha,ma)){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,V.extend(this,e),this.id=this.id||V.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 Pa&&e.addChildrenToStorage(this._storage)))}removeChild(e){var t=V.indexOf(this._children,e);this._children.splice(t,1),e.parent=null,this._storage&&(this._storage.delFromMap(e.id),e instanceof Pa&&e.delChildrenFromStorage(this._storage))}eachChild(e,t){for(var s=!!t,r=0;r<this._children.length;r++){var i=this._children[r];s?e.call(t,i):e(i)}}traverse(e,t){for(var s=!!t,r=0;r<this._children.length;r++){var i=this._children[r];s?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 s=this._children[t];e.addToMap(s),"group"===s.type&&s.addChildrenToStorage(e)}}delChildrenFromStorage(e){for(var t=0;t<this._children.length;t++){var s=this._children[t];e.delFromMap(s.id),"group"===s.type&&s.delChildrenFromStorage(e)}}modSelf(){this.__dirty=!0}}
  1385. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1386. * This program are made available under the terms of the Apache License, Version 2.0
  1387. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1388. class Oa{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 s=0,r=this._hoverElements.length;s<r;s++){var i=this._hoverElements[s];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,s=this._shapeList.length;t<s;t++)if(e(this._shapeList[t]))return this}return this}getHoverShapes(e){var t=[],s=this._hoverElements.length;for(let e=0;e<s;e++){t.push(this._hoverElements[e]);var r=this._hoverElements[e].hoverConnect;if(r)for(var i,a=0,n=(r=r instanceof Array?r:[r]).length;a<n;a++)(i=r[a].id?r[a]:this.get(r[a]))&&t.push(i)}if(t.sort(Oa.shapeCompareFunc),e)for(let e=0,s=t.length;e<s;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(Oa.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 s=0;s<e._children.length;s++){var r=e._children[s];r.__dirty=e.__dirty||r.__dirty,this._updateAndAddShape(r,t)}e.__dirty=!1}else e.__clipShapes=t,this._shapeList[this._shapeListOffset++]=e}mod(e,t){var s=this._elements[e];if(s&&(s.modSelf(),t))if(t.parent||t._storage||t.__startClip){var r={};for(var i in t)"parent"!=i&&"_storage"!=i&&"__startClip"!=i&&t.hasOwnProperty(i)&&(r[i]=t[i]);(new Ji).merge(s,r,!0)}else(new Ji).merge(s,t,!0);return this}drift(e,t,s){var r=this._elements[e];return r&&(r.needTransform=!0,"horizontal"===r.draggable?s=0:"vertical"===r.draggable&&(t=0),(!r.ondrift||r.ondrift&&!r.ondrift(t,s))&&r.drift(t,s)),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 Pa&&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 s=this._roots[t];s instanceof Pa&&s.delChildrenFromStorage(this)}return this._elements={},this._hoverElements=[],void(this._roots=[])}if(e instanceof Array){var r=e.length;for(let t=0;t<r;t++)this.delRoot(e[t])}else{var i;i="string"==typeof e?this._elements[e]:e;var a=(new Ji).indexOf(this._roots,i);a>=0&&(this.delFromMap(i.id),this._roots.splice(a,1),i instanceof Pa&&i.delChildrenFromStorage(this))}}addToMap(e){return e instanceof Pa&&(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 Pa&&(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}}
  1389. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1390. * This program are made available under the terms of the Apache License, Version 2.0
  1391. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1392. class Na{constructor(e,t){this.root=e,this.storage=t,this._domRoot=null,this._layers={},this._zlevelList=[],this._layerConfig={},this._bgDom=null,this.shapeToImage=null,Na.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 s=document.createElement("div");this._domRoot=s,s.style.position="relative",s.style.overflow="hidden",s.style.width=this._width+"px",s.style.height=this._height+"px",this.root.appendChild(s),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=Na.createDom(V.createUniqueID("SuperMap.Theme_background_"),"div",this),s.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 r=new Ma(V.createUniqueID("_highLightLayer_"),this);this._layers.hover=r,s.appendChild(r.dom),r.initContext(),r.dom.onselectstart=a,r.dom.style["-webkit-user-select"]="none",r.dom.style["user-select"]="none",r.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 s=this.storage.getShapeList(!0);return this._paintList(s,t),"function"==typeof e&&e(),this}_paintList(e,t){var s,r,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(r!==h.zlevel&&(s&&s.needTransform&&i.restore(),i=(s=this.getLayer(h.zlevel)).ctx,r=h.zlevel,s.unusedCount=0,(s.dirty||t)&&s.clear(),s.needTransform&&(i.save(),s.setTransform(i))),i&&h.__startClip){var u=h.__startClip;if(i.save(),u.needTransform){let e=u.transform;da.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((s&&s.dirty||t)&&!h.invisible&&(!h.onbrush||h.onbrush&&!h.onbrush(i,!1)))if(pa.catchBrushException)try{h.brush(i,!1,this.updatePainter)}catch(e){da.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&&s&&s.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 s=this._zlevelList.length,r=null,i=-1;if(s>0&&e>this._zlevelList[0]){for(i=0;i<s-1&&!(this._zlevelList[i]<e&&this._zlevelList[i+1]>e);i++);r=this._layers[this._zlevelList[i]]}this._zlevelList.splice(i+1,0,e),t=new Ma(V.createUniqueID("_levelLayer_"+e),this);var a=r?r.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 Ji).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}getLayers(){return this._layers}_updateLayerStatus(e){var t=this._layers,s={};for(let e in t)"hover"!==e&&(s[e]=t[e].elCount,t[e].elCount=0);for(let s=0;s<e.length;s++){var r=e[s],i=t[r.zlevel];if(i){if(i.elCount++,i.dirty)continue;i.dirty=r.__dirty}}for(let e in t)"hover"!==e&&s[e]!==t[e].elCount&&(t[e].dirty=!0)}refreshShapes(e,t){for(var s=0,r=e.length;s<r;s++){var i=e[s];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 Ji).merge(this._layerConfig[e],t,!0):this._layerConfig[e]=t;var s=this._layers[e];s&&(new Ji).merge(s,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 Ji).indexOf(this._zlevelList,e),1))}refreshHover(){this.clearHover();for(var e=this.storage.getHoverShapes(!0),t=0,s=e.length;t<s;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(),s=this._getHeight();if(e.style.display="",this._width!=t||s!=this._height){for(var r in this._width=t,this._height=s,e.style.width=t+"px",e.style.height=s+"px",this._layers)this._layers[r].resize(t,s);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,s){var r=Na.createDom(V.createUniqueID("SuperMap.Theme.image_"),"canvas",this);this._bgDom.appendChild(r);var i=r.getContext("2d");1!=Na.devicePixelRatio&&i.scale(Na.devicePixelRatio,Na.devicePixelRatio),i.fillStyle=t||"#fff",i.rect(0,0,this._width*Na.devicePixelRatio,this._height*Na.devicePixelRatio),i.fill();var a=this;this.storage.iterShape(function(e){if(!e.invisible&&(!e.onbrush||e.onbrush&&!e.onbrush(i,!1)))if(pa.catchBrushException)try{e.brush(i,!1,a.updatePainter)}catch(t){da.Util_log(t,"brush error of "+e.type,e)}else e.brush(i,!1,a.updatePainter)},{normal:"up",update:!0});var n=r.toDataURL(e,s);return i=null,this._bgDom.removeChild(r),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 s=this.getLayer(e.zlevel);if(s.needTransform&&(t.save(),s.setTransform(t)),pa.catchBrushException)try{e.brush(t,!0,this.updatePainter)}catch(t){da.Util_log(t,"hoverBrush error of "+e.type,e)}else e.brush(t,!0,this.updatePainter);s.needTransform&&t.restore()}}_shapeToImage(e,t,s,r,i){var a=document.createElement("canvas"),n=a.getContext("2d"),o=i||window.devicePixelRatio||1;a.style.width=s+"px",a.style.height=r+"px",a.setAttribute("width",s*o),a.setAttribute("height",r*o),n.clearRect(0,0,s*o,r*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 xa({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,s,r,i){return e._shapeToImage(t,s,r,i,Na.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,s){var r=document.createElement(t),i=s._width,a=s._height;return r.style.position="absolute",r.style.left=0,r.style.top=0,r.style.width=i+"px",r.style.height=a+"px",r.setAttribute("width",i*Na.devicePixelRatio),r.setAttribute("height",a*Na.devicePixelRatio),r.setAttribute("id",e),r}}class Ma extends ma{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=Na.createDom(V.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,ma.destroy.apply(this,arguments)}initContext(){this.ctx=this.dom.getContext("2d"),1!=Na.devicePixelRatio&&this.ctx.scale(Na.devicePixelRatio,Na.devicePixelRatio)}createBackBuffer(){this.domBack=Na.createDom(V.createUniqueID("SuperMap.Theme.back-"+this.id),"canvas",this.painter),this.ctxBack=this.domBack.getContext("2d"),1!=Na.devicePixelRatio&&this.ctxBack.scale(Na.devicePixelRatio,Na.devicePixelRatio)}resize(e,t){this.dom.style.width=e+"px",this.dom.style.height=t+"px",this.dom.setAttribute("width",e*Na.devicePixelRatio),this.dom.setAttribute("height",t*Na.devicePixelRatio),1!=Na.devicePixelRatio&&this.ctx.scale(Na.devicePixelRatio,Na.devicePixelRatio),this.domBack&&(this.domBack.setAttribute("width",e*Na.devicePixelRatio),this.domBack.setAttribute("height",t*Na.devicePixelRatio),1!=Na.devicePixelRatio&&this.ctxBack.scale(Na.devicePixelRatio,Na.devicePixelRatio))}clear(){var e=this.dom,t=this.ctx,s=e.width,r=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,s/Na.devicePixelRatio,r/Na.devicePixelRatio)),i?(t.save(),t.fillStyle=this.config.clearColor,t.fillRect(0,0,s/Na.devicePixelRatio,r/Na.devicePixelRatio),t.restore()):t.clearRect(0,0,s/Na.devicePixelRatio,r/Na.devicePixelRatio),a){var o=this.domBack;t.save(),t.globalAlpha=n,t.drawImage(o,0,0,s/Na.devicePixelRatio,r/Na.devicePixelRatio),t.restore()}}}
  1393. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1394. * This program are made available under the terms of the Apache License, Version 2.0
  1395. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1396. class Ia extends ha{constructor(e,t,s){var r,i;super(e,t,s),this.root=e,this.storage=t,this.painter=s,this._lastX=0,this._lastY=0,this._mouseX=0,this._mouseY=0,this._findHover=null,this._domHover=null,this._findHover=(r=function(e,t,s){var r=this;if(r._draggingTarget&&r._draggingTarget.id==e.id||e.isSilent())return!1;var i=r._event;if(e.isCover(t,s)){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=r.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&&r.storage.addHover(u):r.storage.addHover(u))}}}else r.storage.addHover(e);for(var c=e.parent;c;){if(c.clipShape&&!c.clipShape.isCover(r._mouseX,r._mouseY))return!1;c=c.parent}return r._lastHover!=e&&(r._processOutShape(i),r._processDragLeave(i),r._lastHover=e,r._processDragEnter(i)),r._processOverShape(i),r._processDragOver(i),r._hasfound=1,!0}return!1},i=this,function(e,t,s){return r.call(i,e,t,s)}),this._domHover=s.getDomHover(),this.CLASS_NAME="SuperMap.LevelRenderer.Handler";var a={resize:function(e){e=e||window.event,this._lastHover=null,this._isMouseDown=0,this.dispatch(pa.EVENT.RESIZE,e)},click:function(e){e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._clickThreshold<10&&this._dispatchAgency(t,pa.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,pa.EVENT.DBLCLICK,e),this._mousemoveHandler(e)},mousewheel:function(e){var t=((e=this._zrenderEventFixed(e)).wheelDelta||-e.detail)>0?1.1:1/1.1,s=this.painter.getLayers(),r=!1;for(var i in s)if("hover"!==i){var a=s[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,r=!0}}r&&this.painter.refresh(),this._dispatchAgency(this._lastHover,pa.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=da.Util_event.getX(e),this._mouseY=da.Util_event.getY(e);var t=this._mouseX-this._lastX,s=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 r="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,s),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&&(r="move",o.position[0]+=t,o.position[1]+=s,a=!0,o.dirty=!0)}a&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?r="move":this._hasfound&&this._lastHover.clickable&&(r="pointer"),this.root.style.cursor=r,this._dispatchAgency(this._lastHover,pa.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(pa.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,pa.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,pa.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&&da.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment<pa.EVENT.touchClickDelay&&(this._mobildFindFixed(e),this._clickHandler(e),t-this._lastClickMoment<pa.EVENT.touchClickDelay/2&&(this._dblclickHandler(e),this._lastHover&&this._lastHover.clickable&&da.Util_event.stop(e)),this._lastClickMoment=t),this.painter.clearHover()}};function n(e,t){return function(s){return e.call(t,s)}}!function(e){var t=["resize","click","dblclick","mousewheel","mousemove","mouseout","mouseup","mousedown","touchstart","touchend","touchmove"],s=t.length;for(;s--;){var r=t[s];e["_"+r+"Handler"]=n(a[r],e)}}(this),window.addEventListener?(window.addEventListener("resize",this._resizeHandler),da.Util_env.os.tablet||da.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 s=pa.EVENT;switch(e){case s.RESIZE:case s.CLICK:case s.DBLCLICK:case s.MOUSEWHEEL:case s.MOUSEMOVE:case s.MOUSEDOWN:case s.MOUSEUP:case s.MOUSEOUT:this["_"+e+"Handler"](t)}}dispose(){var e=this.root;window.removeEventListener?(window.removeEventListener("resize",this._resizeHandler),da.Util_env.os.tablet||da.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 s=t;this._draggingTarget=s,this._isDragging=1,s.invisible=!0,this.storage.mod(s.id),this._dispatchAgency(s,pa.EVENT.DRAGSTART,e),this.painter.refresh()}}_processDragEnter(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,pa.EVENT.DRAGENTER,e,this._draggingTarget)}_processDragOver(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,pa.EVENT.DRAGOVER,e,this._draggingTarget)}_processDragLeave(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,pa.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,pa.EVENT.DROP,e,this._draggingTarget))}_processDragEnd(e){this._draggingTarget&&(this._dispatchAgency(this._draggingTarget,pa.EVENT.DRAGEND,e),this._lastHover=null),this._isDragging=0,this._draggingTarget=null}_processOverShape(e){this._dispatchAgency(this._lastHover,pa.EVENT.MOUSEOVER,e)}_processOutShape(e){this._dispatchAgency(this._lastHover,pa.EVENT.MOUSEOUT,e)}_dispatchAgency(e,t,s,r){var i="on"+t,a={type:t,event:s,target:e,cancelBubble:!1},n=e;for(r&&(a.dragged=r);n&&(n[i]&&(a.cancelBubble=n[i](a)),n.dispatch(t,a),n=n.parent,!a.cancelBubble););e?a.cancelBubble||this.dispatch(t,a):r||this.dispatch(t,{type:t,event:s})}_iterateAndFindHover(){for(var e,t=da.Util_matrix.create(),s=this.storage.getShapeList(),r=[0,0],i=s.length-1;i>=0;i--){var a=s[i];if(void 0!==a.zlevel&&(e=this.painter.getLayer(a.zlevel,e),r[0]=this._mouseX,r[1]=this._mouseY,e.needTransform&&(da.Util_matrix.invert(t,e.transform),da.Util_vector.applyTransform(r,r,t))),this._findHover(a,r[0],r[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 s=0;!this._lastHover&&s<t.length;s++){var r=t[s];r.x&&(this._mouseX+=r.x),r.y&&(this._mouseX+=r.y),this._iterateAndFindHover()}this._lastHover&&(e.zrenderX=this._mouseX,e.zrenderY=this._mouseY)}_zrenderEventFixed(e,t){if(e.zrenderFixed)return e;if(t){var s="touchend"!=e.type?e.targetTouches[0]:e.changedTouches[0];if(s){var r=this.root.getBoundingClientRect();e.zrenderX=s.clientX-r.left,e.zrenderY=s.clientY-r.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}}
  1397. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1398. * This program are made available under the terms of the Apache License, Version 2.0
  1399. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1400. class Fa{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,s=.1;return 0===e?0:1===e?1:(s<1?(s=1,t=.1):t=.4*Math.asin(1/s)/(2*Math.PI),-s*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))}ElasticOut(e){var t,s=.1;return 0===e?0:1===e?1:(s<1?(s=1,t=.1):t=.4*Math.asin(1/s)/(2*Math.PI),s*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)}ElasticInOut(e){var t,s=.1;return 0===e?0:1===e?1:(s<1?(s=1,t=.1):t=.4*Math.asin(1/s)/(2*Math.PI),(e*=2)<1?s*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*-.5:s*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}}
  1401. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1402. * This program are made available under the terms of the Apache License, Version 2.0
  1403. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1404. class Ra{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 Fa,s=(e-this._startTime)/this._life;if(!(s<0)){s=Math.min(s,1);var r="string"==typeof this.easing?t[this.easing]:this.easing,i="function"==typeof r?r(s):s;return this.fire("frame",i),1==s?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 s=0,r=this._targetPool.length;s<r;s++)this["on"+e]&&this["on"+e](this._targetPool[s],t)}}
  1405. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1406. * This program are made available under the terms of the Apache License, Version 2.0
  1407. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1408. class Da extends ha{constructor(e){super(e),e=e||{},this.stage={},this.onframe=function(){},this._clips=[],this._running=!1,this._time=0,V.extend(this,e),this.CLASS_NAME="SuperMap.LevelRenderer.Animation"}add(e){this._clips.push(e)}remove(e){var t=(new Ji).indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)}_update(){var e=(new Date).getTime(),t=e-this._time,s=this._clips,r=s.length,i=[],a=[];for(let t=0;t<r;t++){var n=s[t],o=n.step(e);o&&(i.push(o),a.push(n))}this.stage.update&&this.stage.update();for(let e=0;e<r;)s[e]._needsRemove?(s[e]=s[r-1],s.pop(),r--):e++;r=i.length;for(let e=0;e<r;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 s(){t._running&&(t._update(),e(s))})}stop(){this._running=!1}clear(){this._clips=[]}animate(e,t){var s=new ka(e,(t=t||{}).loop,t.getter,t.setter);return s.animation=this,s}static _interpolateNumber(e,t,s){return(t-e)*s+e}static _interpolateArray(e,t,s,r,i){var a=e.length;if(1==i)for(let i=0;i<a;i++)r[i]=Da._interpolateNumber(e[i],t[i],s);else{var n=e[0].length;for(let i=0;i<a;i++)for(let a=0;a<n;a++)r[i][a]=Da._interpolateNumber(e[i][a],t[i][a],s)}}static _isArrayLike(e){switch(typeof e){case"undefined":case"string":return!1}return void 0!==e.length}static _catmullRomInterpolateArray(e,t,s,r,i,a,n,o,l){var h=e.length;if(1==l)for(let l=0;l<h;l++)o[l]=Da._catmullRomInterpolate(e[l],t[l],s[l],r[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]=Da._catmullRomInterpolate(e[l][c],t[l][c],s[l][c],r[l][c],i,a,n)}}static _catmullRomInterpolate(e,t,s,r,i,a,n){var o=.5*(s-e),l=.5*(r-t);return(2*(t-s)+o+l)*n+(-3*(t-s)-2*o-l)*a+o*i+t}static _cloneValue(e){var t=Array.prototype.slice;if(Da._isArrayLike(e)){var s=e.length;if(Da._isArrayLike(e[0])){for(var r=[],i=0;i<s;i++)r.push(t.call(e[i]));return r}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 ka{constructor(e,t,s,r){this._tracks={},this._target=e,this._loop=t||!1,this._getter=s||function(e,t){return e[t]},this._setter=r||function(e,t,s){e[t]=s},this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[],this.CLASS_NAME="SuperMap.LevelRenderer.Animation.Animator"}when(e,t){for(var s in t)this._tracks[s]||(this._tracks[s]=[],0!==e&&this._tracks[s].push({time:0,value:Da._cloneValue(this._getter(this._target,s))})),this._tracks[s].push({time:parseInt(e,10),value:t[s]});return this}during(e){return this._onframeList.push(e),this}start(e){var t=this,s=this._setter,r=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,s=0;s<e;s++)t._doneList[s].call(t)}},o=function(o,l){var h=o.length;if(h){var u=o[0].value,c=Da._isArrayLike(u),p=!1,d=c&&Da._isArrayLike(u[0])?2:1;o.sort(function(e,t){return e.time-t.time});var m=o[h-1].time,y=[],f=[];for(let e=0;e<h;e++){y.push(o[e].time/m);var g=o[e].value;"string"==typeof g&&(0===(g=da.Util_color.toArray(g)).length&&(g[0]=g[1]=g[2]=0,g[3]=1),p=!0),f.push(g)}var v,S,b,x,C,_,T,E=0,A=0;if(p)var w=[0,0,0,0];var L=new Ra({target:t._target,life:m,loop:t._loop,delay:t._delay,onframe:function(e,n){if(n<A){for(v=Math.min(E+1,h-1),S=v;S>=0&&!(y[S]<=n);S--);S=Math.min(S,h-2)}else{for(S=E;S<h&&!(y[S]>n);S++);S=Math.min(S-1,h-2)}E=S,A=n;var o=y[S+1]-y[S];if(0!==o){if(b=(n-y[S])/o,a)if(C=f[S],x=f[0===S?S:S-1],_=f[S>h-2?h-1:S+1],T=f[S>h-3?h-1:S+2],c)Da._catmullRomInterpolateArray(x,C,_,T,b,b*b,b*b*b,r(e,l),d);else{let t;t=p?Da.rgba2String(w):Da._catmullRomInterpolate(x,C,_,T,b,b*b,b*b*b),s(e,l,t)}else if(c)Da._interpolateArray(f[S],f[S+1],b,r(e,l),d);else{let t;p?(Da._interpolateArray(f[S],f[S+1],b,w,1),t=Da.rgba2String(w)):t=Da._interpolateNumber(f[S],f[S+1],b),s(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}}
  1409. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1410. * This program are made available under the terms of the Apache License, Version 2.0
  1411. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1412. class Ba{constructor(e,t){this.id=e,this.storage=new Oa,this.painter=new Na(t,this.storage),this.handler=new Ia(t,this.storage,this.painter),this.animatingElements=[],this.animation=new Da({stage:{update:Ba.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,s){if("string"==typeof e&&(e=this.storage.get(e)),e){var r;if(t){for(var i=t.split("."),a=e,n=0,o=i.length;n<o;n++)a&&(a=a[i[n]]);a&&(r=a)}else r=e;if(!r)return void da.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(r,{loop:s}).done(function(){if(e.__aniCount--,0===e.__aniCount){var t=(new Ji).indexOf(l,e);l.splice(t,1)}})}da.Util_log("Element not existed")}clearAnimation(){this.animation.clear()}getWidth(){return this.painter.getWidth()}getHeight(){return this.painter.getHeight()}toDataURL(e,t,s){return this.painter.toDataURL(e,t,s)}shapeToImage(e,t,s){var r=V.createUniqueID("SuperMap.LevelRenderer.ToImage_");return this.painter.shapeToImage(r,e,t,s)}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 s=0,r=t.length;s<r;s++)e.storage.mod(t[s].id);(t.length||e._needsRefreshNextFrame)&&e.refresh()}}}}
  1413. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1414. * This program are made available under the terms of the Apache License, Version 2.0
  1415. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1416. class Ga{constructor(){Ga._instances={},Ga.Tool={},this.version="2.0.4",this.CLASS_NAME="SuperMap.LevelRenderer"}destroy(){this.dispose(),this.version=null}init(e){var t=new Ba(V.createUniqueID("LRenderer_"),e);return Ga._instances[t.id]=t,t}dispose(e){if(e)e.dispose(),this.delInstance(e.id);else{for(var t in Ga._instances)Ga._instances[t].dispose();Ga._instances={}}return this}getInstance(e){return Ga._instances[e]}delInstance(e){return delete Ga._instances[e],this}}e.LevelRenderer=Ga;
  1417. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1418. * This program are made available under the terms of the Apache License, Version 2.0
  1419. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1420. const Ua="EXCEL",Ha="CSV",ja="GEOJSON",Ja="JSON";
  1421. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1422. * This program are made available under the terms of the Apache License, Version 2.0
  1423. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1424. class za{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 s=document.createElement("div");s.setAttribute("class","component-messagebox"),s.innerHTML="",e.appendChild(s),this.messageBox=s;const r=document.createElement("div");r.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),r.appendChild(i),e.appendChild(r),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}}e.Components.MessageBox=za;const Wa=function(){try{return echarts}catch(e){return{}}}();var Va=s.n(Wa);
  1425. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1426. * This program are made available under the terms of the Apache License, Version 2.0
  1427. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1428. let qa={code:null,defaultCode:"en-US",getCode:function(){return e.Lang.code||e.Lang.setCode(),e.Lang.code},setCode:function(){var t=this.getLanguageFromCookie();t?e.Lang.code=t:(t=e.Lang.defaultCode,0===(t="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage).indexOf("zh")&&(t="zh-CN"),0===t.indexOf("en")&&(t="en-US"),e.Lang.code=t)},getLanguageFromCookie(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){for(var s=e[t];" "===s.charAt(0);)s=s.substring(1);if(-1!==s.indexOf("language="))return s.substring("language=".length,s.length)}return""},i18n:function(t){var s=e.Lang[e.Lang.getCode()],r=s&&s[t];return r||(r=t),r}};e.Lang=qa,e.i18n=e.Lang.i18n;const Ya=function(){try{return XLSX}catch(e){return{}}}();var Xa=s.n(Ya);
  1429. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1430. * This program are made available under the terms of the Apache License, Version 2.0
  1431. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1432. let Qa={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,s,r,i){Ja===e||ja===e?this.readTextFile(t,s,r,i):Ua!==e&&Ha!==e||this.readXLSXFile(t,s,r,i)},readTextFile(e,t,s,r){let i=new FileReader;i.onloadend=function(e){t&&t.call(r,e.target.result)},i.onerror=function(e){s&&s.call(r,e)},this.rAT?i.readAsText(e.file,"utf-8"):i.readAsBinaryString(e.file)},readXLSXFile(e,t,s,r){let i=new FileReader;i.onloadend=function(e){let i=new Uint8Array(e.target.result),a=Xa().read(i,{type:"array"});try{if(a&&a.SheetNames&&a.SheetNames.length>0){let e=a.SheetNames[0],s=Xa().utils.sheet_to_csv(a.Sheets[e]);t&&t.call(r,s)}}catch(e){s&&s.call(r,e)}},i.onerror=function(e){s&&s.call(r,e)},this.rABF&&i.readAsArrayBuffer(e.file)},processDataToGeoJson(e,t,s,r,i){let a=null;if("EXCEL"===e||"CSV"===e)a=this.processExcelDataToGeoJson(t),s&&s.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:r&&r.call(i,qa.i18n("msg_dataInWrongGeoJSONFormat")),s&&s.call(i,a)}else r&&r.call(i,qa.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson(e){let t=this.string2Csv(e),s=t.colTitles,r=-1,i=-1;for(let e=0,t=s.length;e<t;e++)this.isXField(s[e])&&(r=e),this.isYField(s[e])&&(i=e);let a=[];for(let e=0,s=t.rows.length;e<s;e++){let s=t.rows[e],n=Number(s[r]),o=Number(s[i]),l={};for(let s in t.colTitles){l[t.colTitles[s]]=t.rows[e][s]}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 s=e.split("\n"),r={};r.colTitles=t?[]:s[0].split(","),r.rows=[];for(let e=t?0:1;e<s.length;e++)s[e]&&r.rows.push(s[e].split(","));return r}};e.Components.FileReaderUtil=Qa;
  1433. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1434. * This program are made available under the terms of the Apache License, Version 2.0
  1435. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1436. class Ka{constructor(e){this.datasets=e,this.EVENT_TYPES=["getdatafailed"],this.events=new he(this,null,this.EVENT_TYPES)}getDatasetInfo(e){let t=this.datasets.url,s=this;Ae.get(t).then(function(e){return e.json()}).then(function(t){if(t.datasetInfo){let r=t.datasetInfo;s.datasetsInfo={dataSourceName:r.dataSourceName,datasetName:r.name,mapName:t.name},e({result:s.datasetsInfo})}}).catch(function(e){console.log(e),s._fireFailedEvent(e)})}getDataFeatures(t,s){let r,i,a,n=t.result,o={name:n.datasetName+"@"+n.dataSourceName};Object.assign(o,this.datasets.queryInfo),r=new e.FilterParameter(o),i=new e.GetFeaturesBySQLParameters({queryParameter:r,datasetNames:[n.dataSourceName+":"+n.datasetName],fromIndex:0,toIndex:1e5}),(a=new e.GetFeaturesBySQLService(n.dataUrl,{eventListeners:{processCompleted:s,processFailed:function(){}}})).processAsync(i)}getLayerFeatures(t,s){let r,i,a,n=t.result,o={name:n.mapName};Object.assign(o,this.datasets.queryInfo),r=new e.FilterParameter(o),i=new e.QueryBySQLParameters({queryParams:[r],expectCount:1e5}),(a=new e.QueryBySQLService(n.dataUrl,{eventListeners:{processCompleted:s,processFailed:function(){}}})).processAsync(i)}getDataInfoByIptl(e){this.getServiceInfo(this.datasets.url,e)}getServiceInfo(e,t){let s=this;Ae.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(r=>{if(!1!==r.succeed)if(r.dataItemServices&&r.dataItemServices.length>0){let i;r.dataItemServices.forEach(r=>{if("RESTDATA"===r.serviceType&&"PUBLISHED"===r.serviceStatus)i=r;else{if("RESTMAP"!==r.serviceType||"PUBLISHED"!==r.serviceStatus)return void s.getDatafromContent(e,t);i=r}}),i&&s.getDatafromRest(i.serviceType,i.address,t)}else s.getDatafromContent(e,t);else s._fireFailedEvent(r)}).catch(e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromContent(e,t){let s={result:{}},r=this;e+="/content.json?pageSize=9999999&currentPage=1",Ae.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(qa.i18n("msg_jsonResolveFiled"));let t=this._formatGeoJSON(e.content);s.result.features={type:e.content.type,features:t}}else if("EXCEL"===e.type||"CSV"===e.type){let t=this._excelData2Feature(e.content);s.result.features={type:"FeatureCollection",features:t}}t(s,"content")}}else r._fireFailedEvent(e)},this).catch(e=>{console.log(e),r._fireFailedEvent(e)})}getDatafromRest(e,t,s){let r=this,i=this.datasets.withCredentials;if("RESTDATA"===e){let e,a,n=`${t}/data/datasources`;Ae.get(n,null,{withCredentials:i}).then(e=>e.json()).then(o=>{e=o.datasourceNames[0],n=`${t}/data/datasources/${e}/datasets`,Ae.get(n,null,{withCredentials:i}).then(e=>e.json()).then(i=>(a=i.datasetNames[0],r.getDatafromRestData(`${t}/data`,[e+":"+a],s),[e+":"+a])).catch(function(e){r._fireFailedEvent(e)})}).catch(function(e){r._fireFailedEvent(e)})}else{let e,a,n,o=`${t}/maps`;Ae.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`,Ae.get(o,null,{withCredentials:i}).then(e=>e.json()).then(e=>(a=e[0].subLayers.layers[0].caption,r.getDatafromRestMap(a,n,s),a)).catch(function(e){r._fireFailedEvent(e)})}).catch(function(e){r._fireFailedEvent(e)})}}getDatafromRestData(e,t,s){let r=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,e=>{s(e,"RESTDATA")},e=>{console.log(e),r._fireFailedEvent(e)})}getDatafromRestMap(e,t,s){let r=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,e=>{s(e,"RESTMAP")},e=>{console.log(e),r._fireFailedEvent(e)})}_getFeatureBySQL(e,t,s,r,i){let a,n,o,l={name:t.join().replace(":","@")};Object.assign(l,s),a=new st(l),o=new Ls({queryParameter:a,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(n=new Ps(e,{eventListeners:{processCompleted:e=>{r&&r(e)},processFailed:e=>{i&&i(e)}}})).processAsync(o)}_queryFeatureBySQL(e,t,s,r,i,n,o,l,h,u){var c,p,d={name:t};Object.assign(d,s),c=new st(d),r&&(c.fields=r);var m={queryParams:[c]};u&&(m.queryOption=a.ATTRIBUTE),l&&(m.startRecord=l),h&&(m.expectCount=h),i&&(m.prjCoordSys={epsgCode:i}),p=new Ir(m),this._queryBySQL(e,p,e=>{"processCompleted"===e.type?n(e):o(e)})}_queryBySQL(e,t,s,r){new Fr(e,{eventListeners:{scope:this,processCompleted:s,processFailed:s},format:this._processFormat(r)}).processAsync(t)}_processFormat(e){return e||t.GEOJSON}_formatGeoJSON(e){let t=e.features;return t.forEach((e,t)=>{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,s=-1,r=-1;for(let e=0,i=t.length;e<i;e++)Qa.isXField(t[e])&&(s=e),Qa.isYField(t[e])&&(r=e);let i=[];for(let t=0,a=e.rows.length;t<a;t++){let a=e.rows[t],n=Number(a[s]),o=Number(a[r]),l={};for(let s in e.colTitles){l[e.colTitles[s]]=e.rows[t][s]}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:qa.i18n("msg_getdatafailed")}:{message:qa.i18n("msg_getdatafailed")};this.events.triggerEvent("getdatafailed",t)}}
  1437. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1438. * This program are made available under the terms of the Apache License, Version 2.0
  1439. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1440. class Za{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 he(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 Ka(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,s=t.indexOf("rest");if(s>0){let r=t.indexOf("/",s+5),i=t.substring(s+5,r),a=t.substring(0,s+4)+"/data";if("maps"===i){let i=t.indexOf("/",r+1),n=t.substring(r+1,i);a=t.substring(0,s+4)+"/maps/"+n,e.result.dataUrl=a,this._getLayerFeatures(e)}else"data"===i&&(e.result.dataUrl=a,this._getDataFeatures(e))}}_getDataInfoSuccess(e,t){let s=this;"RESTMAP"===t?s._getChartDatasFromLayer(e):s._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,s={};if(t.length){let e=t[0],r=[],i=[];for(let t in e.properties)r.push(t),i.push(this._getDataType(e.properties[t]));s={features:t,fieldCaptions:r,fieldTypes:i,fieldValues:[]};for(let e in i){let r=[];for(let i in t){let a=t[i],n=s.fieldCaptions[e],o=a.properties[n];r.push(o)}s.fieldValues.push(r)}this.createChart(s)}}}_getChartDatasFromLayer(e){if(e.result.recordsets){let t=e.result.recordsets[0],s=t.features.features;this.features=t.features;let r={};if(s.length){r={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]};for(let e in r.fieldCaptions){let t=[];for(let i in s){let a=s[i],n=r.fieldCaptions[e],o=a.properties[n];t.push(o)}r.fieldValues.push(t)}this.createChart(r)}}}_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,s){this.updateChart=s,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 s=this.grid,r=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&&(s=t.grid),t.tooltip&&(o=t.tooltip),t.backgroundColor&&(l=t.backgroundColor)),{backgroundColor:l,grid:s,series:r,xAxis:a,yAxis:n,tooltip:o}}}_createChartDatas(e){let t=0,s=[],r=e.fieldCaptions,i=this;r.forEach(function(e,s){i.xField[0]&&e===i.xField[0].field&&(t=s)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(i.yFieldName=i.yFieldName+","),i.yFieldName=i.yFieldName+e.name,r.forEach(function(t,r){t===e.field&&s.push(r)})});let a=this._getAttrData(e,t),n=[];if(s.length>0)s.forEach(function(t){let s=[];for(let r in e.fieldValues[t])s.push({value:e.fieldValues[t][r]});n.push(s)});else{let e=[],t=[],s=a.length;for(let r=0;r<s;r++){let s=!1;for(let i=0,n=t.length;i<n;i++)if(a[r].fieldsData===t[i].fieldsData){e[i].value++,t[i].recordIndexs.push(r),s=!0;break}s||a[r].fieldsData&&(t.push({fieldsData:a[r].fieldsData,recordIndexs:[r]}),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 s=[];for(let r=0,i=e.fieldValues[t].length;r<i;r++){let i=e.fieldValues[t][r];s.push({recordIndexs:r,fieldsData:i})}return s}_createChartSeries(e,t){let s=[];return e.YData.forEach(function(e){let r=0,i=[];for(let t of e)r=t.value,i.push({value:r});let a={type:t,data:i,name:"y"};s.push(a)}),s}_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)}}e.Components.ChartViewModel=Za;e.Components.Chart=
  1441. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1442. * This program are made available under the terms of the Apache License, Version 2.0
  1443. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1444. class{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 Za(t),this._fillDataToView()}onAdd(e){this.addChart=e}_fillDataToView(){let e=new za;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 s=this;this.viewModel.updateData(e,t,function(e){s._updateChart(e),s.addChart&&s.addChart()})}_createChart(e){this.echart=Va().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))}};
  1445. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1446. * This program are made available under the terms of the Apache License, Version 2.0
  1447. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1448. class $a{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}}e.Components.TemplateBase=$a;e.Components.CommonContainer=
  1449. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1450. * This program are made available under the terms of the Apache License, Version 2.0
  1451. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1452. class extends $a{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 s=document.createElement("div");s.setAttribute("class","component-title");const r=document.createElement("div");r.innerHTML=e,s.appendChild(r),t.appendChild(s);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)}};e.Components.Select=
  1453. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1454. * This program are made available under the terms of the Apache License, Version 2.0
  1455. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1456. class extends $a{constructor(e){super(e),this._initView(e)}_initView(e){let t=this._createElement("div","component-selecttool");e.labelName&&(this._createElement("label","component-selecttool__lable--describe",t).innerHTML=e.labelName);let s=this._createElement("div","component-selecttool--chart",t);s.setAttribute("tabindex","1");let r=this._createElement("div","component-selecttool__name",s);r.title=e.optionsArr[0],r.innerHTML=e.optionsArr[0];let i=this._createElement("div","component-selecttool__trianglebtn--chart",s),a=this._createElement("div","component-triangle-down-img",i),n=this._createElement("div","component-selecttool__content",s),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,r,e.optionsClickCb),this._selectClickEvent(s,n,a),this.rootContainer=t}createOptions(e,t){for(let s in t){let r=this._createElement("div","component-selecttool__option",e);r.title=t[s],r.innerHTML=t[s]}}_selectClickEvent(e,t,s){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",s.className="component-triangle-down-img"):(t.style.display="block",s.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",s.className="component-triangle-down-img"}}_createElement(e,t,s){let r=document.createElement(e||"div");return t&&(r.className=t),s&&s.appendChild(r),r}optionClickEvent(e,t,s){for(let r=0;r<e.children.length;r++){let i=e.children[r];i.onclick=function(){t.innerHTML=i.innerHTML,t.title=i.title,i.getAttribute("data-value")&&t.setAttribute("data-value",i.getAttribute("data-value")),s&&s(i)}}}};e.Components.DropDownBox=
  1457. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1458. * This program are made available under the terms of the Apache License, Version 2.0
  1459. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1460. class extends $a{constructor(e){super(e),this._initView(e)}_initView(e){let t=document.createElement("div");t.className="component-dropdownbox--container";let s=document.createElement("div");s.setAttribute("tabindex","1"),s.className="component-dropdownbox",t.appendChild(s);let r=document.createElement("div");s.appendChild(r),this._createDropDownOption(e[0],r);let i=document.createElement("div");i.className="component-dropdownbox__triangle-btn",s.appendChild(i);let a=document.createElement("div");a.className="component-triangle-down-img",i.appendChild(a);let n={parentEle:s,dropDownContent:["component-dropdownbox__content component-dropdownbox__content--chart","dropDownContent"],scrollareaContent:"component-selecttool__scrollarea__content",optionsArr:e,triangleBtn:a,dropDownTopContainer:r};this._createDropDownBox(n),this.rootContainer=t}_createDropDownBox(e){let t=e.parentEle,s=e.dropDownTopContainer,r=document.createElement("div");r.className=e.dropDownContent[0],t.appendChild(r);let i=document.createElement("div");i.className=e.scrollareaContent,r.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,r,n),this._eleOnblur(t,r,n);let o=i.children;for(let e=0;e<o.length;e++)o[e].onclick=function(){s.innerHTML=o[e].outerHTML}}_createDropDownOption(e,t){let s=document.createElement("div");s.className="component-dropdownbox__item";let r=e;r.dataValue&&s.setAttribute("data-value",r.dataValue),t.appendChild(s);let i=document.createElement("div");i.className="component-dropdownbox__item__img",s.appendChild(i);let a=document.createElement("div");r.icon.className&&(a.className=r.icon.className),r.icon.background&&(a.style.background=r.icon.background),i.appendChild(a);let n=document.createElement("div");n.className="component-dropdownbox__item__title",n.title=r.title,n.innerHTML=r.title,s.appendChild(n);let o=document.createElement("div");o.className="component-dropdownbox__item__remark",o.title=r.remark,o.innerHTML=r.remark,s.appendChild(o)}_dropDownClickEvent(e,t,s){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",s.className="component-triangle-down-img"):(t.style.display="block",s.className="triangle-up-img"),e.preventDefault(),e.stopPropagation()},e.onmousedown=function(e){e.target!==this&&(this.focus(),e.preventDefault(),e.stopPropagation())}}_eleOnblur(e,t,s){e.onblur=function(){t.style.display="none",s.className="component-triangle-down-img"}}_createElement(e,t,s){let r=document.createElement(e||"div");return t&&(r.className=t),s&&s.appendChild(r),r}};
  1461. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1462. * This program are made available under the terms of the Apache License, Version 2.0
  1463. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1464. class en extends $a{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 s=document.createElement("div");s.setAttribute("class","component-popcontainer__header");const r=document.createElement("label");r.setAttribute("class","component-popcontainer__header__title"),r.innerHTML=e,s.appendChild(r);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(s);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)}}e.Components.PopContainer=en;e.Components.AttributesPopContainer=
  1465. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1466. * This program are made available under the terms of the Apache License, Version 2.0
  1467. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1468. class extends en{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 s=document.createElement("tbody");let r=!0;for(let t in e){const i=document.createElement("tr");r&&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),s.appendChild(i),r=!r}t.appendChild(s),this.appendContent(t)}};
  1469. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1470. * This program are made available under the terms of the Apache License, Version 2.0
  1471. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1472. class tn extends $a{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 s=document.createElement("div");s.setAttribute("class","component-tabpage__content"),this.content=s,e.appendChild(t),e.appendChild(s),this.rootContainer=e}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t<e.length;t++){let s=document.createElement("span");s.index=t,s.appendChild(document.createTextNode(e[t].title)),s.onclick=this._changeTabsPage.bind(this);let r=e[t].content;r.index=t,r.hidden=!0,this.header.appendChild(s),this.content.appendChild(r)}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)}}e.Components.IndexTabsPageContainer=tn;e.Components.CityTabsPage=
  1473. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1474. * This program are made available under the terms of the Apache License, Version 2.0
  1475. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1476. class extends tn{constructor(e){super(e),this.rootContainer.classList.add("component-citytabpage--noneBoxShadow"),this.config=e.config,V.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(V.isArray(this.config))for(let e=0;e<this.config.length;e++){let t="";for(const s in this.config[e])t+=s;let s=document.createElement("li");s.innerHTML=t,this.header.appendChild(s)}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 s=document.createElement("div"),r=document.createElement("div");r.setAttribute("class","component-citytabpag__py-key"),r.innerHTML=e,s.appendChild(r);const i=document.createElement("div");i.setAttribute("class","component-citytabpag__content");for(let e=0;e<t.length;e++){let s=document.createElement("span");s.innerHTML=t[e],i.appendChild(s)}"HOT"===e&&(i.style.width="428px"),s.appendChild(i),this.content.appendChild(s)}};e.Components.NavTabsPage=
  1477. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1478. * This program are made available under the terms of the Apache License, Version 2.0
  1479. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1480. class extends $a{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 s=document.createElement("span");s.setAttribute("class","supermapol-icons-close"),s.onclick=this.closeView.bind(this),t.appendChild(s);const r=document.createElement("div");this.navTabsTitle=r,r.setAttribute("class","component-navtabspage__title"),t.appendChild(r);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 s=document.createElement("span");s.index=t,s.appendChild(document.createTextNode(e[t].title)),s.onclick=this._changeTabsPage.bind(this);let r=e[t].content;r.index=t,r.hidden=!0,this.navTabsTitle.appendChild(s),this.navTabsContent.appendChild(r)}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)}};e.Components.PaginationContainer=
  1481. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1482. * This program are made available under the terms of the Apache License, Version 2.0
  1483. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1484. class extends $a{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 s=document.createElement("div");s.setAttribute("class","component-pagination");const r=document.createElement("div");r.setAttribute("class","component-pagination__content"),s.appendChild(r),this.content=r;const i=document.createElement("ul");i.setAttribute("class","component-pagination__link"),i.onclick=this._changePageEvent.bind(this),s.appendChild(i),this._createLink(i),this.link=i,e&&this.setContent(e),0!==t&&this.setPageLink(t),this.rootContainer=s}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 s=document.createElement("li");s.setAttribute("class","disable");const r=document.createElement("span");s.appendChild(r),0===t?(r.id="first",r.setAttribute("class","supermapol-icons-first")):1===t?(r.id="prev",r.setAttribute("class","supermapol-icons-prev")):2===t?(r.id="next",r.setAttribute("class","supermapol-icons-next")):3===t&&(r.id="last",r.setAttribute("class","supermapol-icons-last")),e.appendChild(s)}}_changePageEvent(e){const t=e.target;if("disable"===t.parentElement.classList[0])return;let s;if(t.id)s=t.id;else{if(!Number(t.innerHTML))return;s=Number(t.innerHTML)}this._prePageNum(s),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)}};e.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!"};e.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:"获取数据失败!"};const sn=mapboxgl;var rn=s.n(sn);!function(){rn().Map.prototype.overlayLayersManager={},void 0===rn().Map.prototype.addLayerBak&&(rn().Map.prototype.addLayerBak=rn().Map.prototype.addLayer,rn().Map.prototype.addLayer=function(e,t){return e.source||"custom"===e.type||"background"===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&&e.onAdd(t)}(e,this),this.overlayLayersManager[e.id]=e,this)}),rn().Map.prototype.getLayer=function(e){return this.overlayLayersManager[e]?this.overlayLayersManager[e]:this.style.getLayer(e)},rn().Map.prototype.moveLayer=function(e,t){return this.overlayLayersManager[e]?(function(e,t){var s=document.getElementById(e);if(t){var r=document.getElementById(t);r||rn().Evented.prototype.fire("error",{error:new Error(`Layer with id "${t}" does not exist on this document.`)})}s&&r?r.parentNode.insertBefore(s,r):s.parentNode.appendChild(s)}(e,t),this):this.style._layers[e]?(this.style.moveLayer(e,t),this._update(!0),this):void 0},rn().Map.prototype.removeLayer=function(e){return this.overlayLayersManager[e]?((t=this.overlayLayersManager[e]).removeFromMap&&t.removeFromMap(),delete this.overlayLayersManager[e],this):(this.style.removeLayer(e),this._update(!0),this);var t},rn().Map.prototype.setLayoutProperty=function(e,t,s){return this.overlayLayersManager[e]?("visibility"===t&&(s="visible"===s,r=this.overlayLayersManager[e],i=s,r.setVisibility&&r.setVisibility(i),this.style.fire("data",{dataType:"style"})),this):(this.style.setLayoutProperty(e,t,s),this._update(!0),this);var r,i},rn().Map.prototype.updateTransform=function(e,t,s,r,i,a,n){this.transform.units=e;var o=this.mercatorZfromAltitude;rn().MercatorCoordinate.fromLngLat=function(e,r){r=r||0;const i=rn().LngLat.convert(e);return new(rn().MercatorCoordinate)((i.lng-t)/a,(s-i.lat)/n,o(r,i.lat))},rn().MercatorCoordinate.prototype.toLngLat=function(){return new(rn().LngLat)(this.x*a+t,s-this.y*n)},this.customConvertPoint=window.URL.createObjectURL(new Blob(["customConvertPoint = {projectX:function(x){return (x - "+r+") / "+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"}))}}();
  1485. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1486. * This program are made available under the terms of the Apache License, Version 2.0
  1487. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1488. rn().supermap=rn().supermap||{};
  1489. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1490. * This program are made available under the terms of the Apache License, Version 2.0
  1491. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1492. var an="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=";rn().supermap.LogoControl=
  1493. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1494. * This program are made available under the terms of the Apache License, Version 2.0
  1495. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1496. class{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=an;this.imageUrl&&(t=this.imageUrl);var s=this.alt,r="94px",i="29px",a="width:"+r+";height:"+i+";";this.imageUrl&&(a="width:"+(r=this.width)+";height:"+(i=this.height)+";",r&&i||(a=""));var n=this.link||"https://iclient.supermap.io";return this._container.innerHTML="<a href='"+n+"' target='_blank'><img src="+t+" alt='"+s+"' 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 s=Object.getOwnPropertyNames(arguments)[t];if("caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s){var r=arguments[s];if(r)for(var i=0;i<Object.getOwnPropertyNames(r).length;i++){var a=Object.getOwnPropertyNames(r)[i];"caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s&&(e[a]=r[a])}}}return e}};
  1497. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1498. * This program are made available under the terms of the Apache License, Version 2.0
  1499. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1500. class nn{static toSuperMapGeometry(e){if(e&&e.type)return(new Se).read(e,"FeatureCollection")[0].geometry}static toSuperMapBounds(e){return this.isArray(e)?new Y(e[0],e[1],e[2],e[3]):new Y(e.getWest(),e.getSouth(),e.getEast(),e.getNorth())}static toSuperMapPoint(e){return this.isArray(e)?new $(e[0],e[1]):e.lng&&e.lat?new $(e.lng,e.lat):new $(e.geometry.coordinates[0],e.geometry.coordinates[1])}static toSuperMapPolygon(e){const t=e.getWest(),s=e.getEast(),r=e.getSouth(),i=e.getNorth();return new ae([new se([new $(t,r),new $(s,r),new $(s,i),new $(t,i)])])}static isArray(e){return"[object Array]"==Object.prototype.toString.call(e)}static toGeoJSON(e){if(e)return(new Se).toGeoJSON(e)}static toProcessingParam(e){var t={};if(e.length<1)t="";else{for(var s=[],r=0;r<e.length;r++){var i={};i.x=e[r][0],i.y=e[r][1],s.push(i)}t.type="REGION",t.points=s}return t}static extend(e){for(var t=0;t<Object.getOwnPropertyNames(arguments).length;t++){var s=Object.getOwnPropertyNames(arguments)[t];if("caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s){var r=arguments[s];if(r)for(var i=0;i<Object.getOwnPropertyNames(r).length;i++){var a=Object.getOwnPropertyNames(r)[i];"caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s&&(e[a]=r[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,s="";for(let e=1;e<t;e++){s+=Math.floor(16*Math.random()).toString(16)}return s}static hexToRgba(e,t){var s=[],r=[];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)s[t]="0x"+e.substr(t,2),r.push(parseInt(Number(s[t])));return r.push(t),"rgba("+r.join(",")+")"}static isMatchAdministrativeName(e,t){if(this.isString(t)){let s=e.substr(0,2);return"张家"===s&&(s=e.substr(0,3)),!!t.match(new RegExp(s))}return!1}}rn().supermap.Util=nn;
  1501. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1502. * This program are made available under the terms of the Apache License, Version 2.0
  1503. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1504. class on{constructor(e,t){this.geometry=e,this.attributes=t}toFeature(){var e=nn.toSuperMapGeometry(this.geometry),t=[];return this.geometry instanceof rn().LngLat?t=[this.geometry.lng,this.geometry.lat]:this.geometry instanceof rn().Point?t=[this.geometry.x,this.geometry.y]:3===this.geometry.length&&(e=new te(this.geometry[0],this.geometry[1],this.geometry[2])),t.length>1&&(e=new $(t[0],t[1])),new ce(e,this.attributes)}}rn().supermap.ThemeFeature=on;
  1505. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1506. * This program are made available under the terms of the Apache License, Version 2.0
  1507. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1508. class ln{constructor(e,t){var s=t||{};this.name=e,this.id=s.id?s.id:V.createUniqueID("themeLayer_"),this.opacity=s.opacity?s.opacity:1,this.visibility=!0,this.loadWhileAnimating=void 0===s.loadWhileAnimating||s.loadWhileAnimating,this.map=s.map?s.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 Ga,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;V.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&rn().Evented.prototype.fire("changelayer",{layer:this,property:"opacity"})}}addFeatures(e){}removeFeatures(e){if(e&&0!==e.length){if(e===this.features)return this.removeAllFeatures();V.isArray(e)||(e=[e]);for(var t=[],s=e.length-1;s>=0;s--){var r=e[s],i=V.indexOf(this.features,r);-1!==i?this.features.splice(i,1):t.push(r)}for(var a=[],n=0,o=this.features.length;n<o;n++)r=this.features[n],a.push(r);this.features=[],this.addFeatures(a),this.renderer&&this.redrawThematicFeatures(this.map.getBounds());var l=0==t.length;rn().Evented.prototype.fire("featuresremoved",{features:t,succeed:l})}}removeAllFeatures(){this.renderer&&this.renderer.clear(),this.features=[],rn().Evented.prototype.fire("featuresremoved",{features:[],succeed:!0})}getFeatures(){for(var e=this.features.length,t=new Array(e),s=0;s<e;++s)t[s]=this.features[s];return t}getFeatureBy(e,t){var s=null;for(var r in this.features)if(this.features[r][e]===t){s=this.features[r];break}return s}getFeatureById(e){return this.getFeatureBy("id",e)}getFeaturesByAttribute(e,t){var s,r=[];for(var i in this.features)(s=this.features[i])&&s.attributes&&s.attributes[e]===t&&r.push(s);return r}redrawThematicFeatures(e){}on(e,t,s){return this.renderer?this.renderer.on(e,t):this.map.on(e,t),this}off(e,t,s){return this.renderer?this.renderer.off(e,t):this.map.off(e,t),this}addTFEvents(){for(var e=this.TFEvents,t=e.length,s=0;s<t;s++)this.renderer.on(e[s][0],e[s][1])}getLocalXY(e){var t,s=this.map;if(e instanceof $||e instanceof te){let r=s.project(new(rn().LngLat)(e.x,e.y));t=[r.x,r.y]}if(e instanceof q){let r=s.project(new(rn().LngLat)(e.lon,e.lat));t=[r.x,r.y]}return t}toiClientFeature(e){V.isArray(e)||(e=[e]);let t=[];for(let s=0;s<e.length;s++)if(e[s]instanceof on)t.push(e[s].toFeature());else if(e[s]instanceof ce)t.push(e[s]);else if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e[s].type)){let r=new Se;t=t.concat(r.read(e[s]))}else{if(!e[s].geometry||!e[s].geometry.parts)throw new Error("features's type is not be supported.");t.push(Gr.fromJson(e[s]).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(rn().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,s=this.map.project(new(rn().LngLat)(0,0)),r=s.x-this.startMoveX,i=s.y-this.startMoveY;this.div.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg) translate3d("+r+"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 s=document.getElementById(this.div.id);if(t=void 0===t||t){const t=document.getElementById(e);return void(s&&t&&t.parentNode.insertBefore(s,t))}const r=document.getElementById(e);if(s){if(r.nextSibling)return void r.parentNode.insertBefore(s,r.nextSibling);r.parentNode.appendChild(s)}}_hide(){this.renderer.painter.root.style.display="none"}_show(){this.renderer.painter.root.style.display="block"}}rn().supermap.ThemeLayer=ln;
  1509. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1510. * This program are made available under the terms of the Apache License, Version 2.0
  1511. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1512. class hn extends ln{constructor(e,t,s){super(e,s),this.chartsSetting=s.chartsSetting||{},this.themeFields=s.themeFields||null,this.overlayWeightField=s.overlayWeightField||null,this.isOverLay=void 0===s.isOverLay||s.isOverLay,this.charts=s.charts||[],this.cache=s.cache||{},this.chartsType=t}setChartsType(e){this.chartsType=e,this.redraw()}addFeatures(e){!1!==rn().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,s=0,r=t.length;s<r;s++){var i=t[s],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 Ea[this.chartsType]&&this.themeFields&&this.chartsSetting&&(t=new Ea[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 s=e[l],r=s.resetLocation(),i=s.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=s.shapes;for(let e=0,t=o.length;e<t;e++)o[e].refOriginalPosition=r,this.renderer.addShape(o[e])}}}else for(var l=0,h=e.length;l<h;l++)for(var u=e[l],c=u.resetLocation(),p=u.shapes,d=0,m=p.length;d<m;d++)p[d].refOriginalPosition=c,this.renderer.addShape(p[d]);this.renderer.render()}}getShapesByFeatureID(e){var t=[],s=this.renderer.getAllShapes();if(!e)return s;for(var r=0,i=s.length;r<i;r++){var a=s[r];a.refDataID&&e===a.refDataID&&t.push(a)}return t}isQuadrilateralOverLap(e,t){var s=e.length,r=t.length;if(5!==s||5!==r)return null;var i=!1;for(let r=0;r<s;r++)if(this.isPointInPoly(e[r],t)){i=!0;break}for(let s=0;s<r;s++)if(this.isPointInPoly(t[s],e)){i=!0;break}for(let a=0;a<s-1&&!i;a++)for(let s=0;s<r-1;s++){if("SuperMap.Geometry.Point"===V.lineIntersection(e[a],e[a+1],t[s],t[s+1]).CLASS_NAME){i=!0;break}}return i}isPointInPoly(e,t){for(var s=!1,r=-1,i=t.length,a=i-1;++r<i;a=r)(t[r].y<=e.y&&e.y<t[a].y||t[a].y<=e.y&&e.y<t[r].y)&&e.x<(t[a].x-t[r].x)*(e.y-t[r].y)/(t[a].y-t[r].y)+t[r].x&&(s=!s);return s}isChartInMap(e,t){for(var s=e,r=!1,i=0,a=t.length;i<a;i++){var n=t[i];if(n.x>=s.left&&n.x<=s.right&&n.y>=s.top&&n.y<=s.bottom){r=!0;break}}return r}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()}}rn().supermap.GraphThemeLayer=hn;
  1513. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1514. * This program are made available under the terms of the Apache License, Version 2.0
  1515. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1516. class un extends ln{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,V.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){rn().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(),ln.prototype.removeFeatures.apply(this,arguments)}removeAllFeatures(){this.clearCache(),ln.prototype.removeAllFeatures.apply(this,arguments)}redrawThematicFeatures(e){this.clearCache();var t=this.renderer.getHoverOne(),s=null;t&&t.refDataID&&(s=t.refDataID),this.renderer.clearAll();for(var r=this.features,i=this.cache,a=this.cacheFields,n=this.map.getZoom(),o=this.maxCacheCount,l=0,h=r.length;l<h;l++){var u,c=r[l].id+"_zoom_"+n.toString();if(i[c])i[c].updateAndAddShapes();else{if((u=this.createThematicFeature(r[l])).getShapesCount()<1)continue;if(i[c]=u,a.push(c),a.length>o){var p=a[0];a.splice(0,1),delete i[p]}}}if(this.renderer.render(),s&&this.isHoverAble&&this.isMultiHover){var d=this.getShapesByFeatureID(s);this.renderer.updateHoverShapes(d)}}createThematicFeature(e){var t=V.copyAttributesWithClip(this.style);e.style&&!0===this.isAllowFeatureStyle&&(t=V.copyAttributesWithClip(e.style));var s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new La(e,this,Ta.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}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=[],s=this.renderer.getAllShapes();if(!e)return s;for(var r=0,i=s.length;r<i;r++){var a=s[r];a.refDataID&&e===a.refDataID&&t.push(a)}return t}}rn().supermap.GeoFeatureThemeLayer=un;rn().supermap.LabelThemeLayer=
  1517. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1518. * This program are made available under the terms of the Apache License, Version 2.0
  1519. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1520. class extends un{constructor(e,t){super(e,t),this.isOverLay=!0,this.isAvoid=!0,this.themeField=null,this.styleGroups=null,V.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),s=0,r=t.length;s<r;s++)this.labelFeatures.push(t[s]);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),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new La(e,this,Ta.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}getDrawnLabels(e){for(var t,s,r,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)},p=0,d=e.length;p<d;p++){((s=e[p]).isStyleChange||void 0===s.isStyleChange)&&(s=this.setStyle(s));var m=this.getLabelPxLocation(s);if(m.x>=0&&m.x<=c.x&&m.y>=0&&m.y<=c.y){if(s.style.minZoomLevel>-1&&h<=s.style.minZoomLevel)continue;if(s.style.maxZoomLevel>-1&&h>s.style.maxZoomLevel)continue;var y=null;s.isStyleChange?(s.isStyleChange=null,y=this.calculateLabelBounds(s,m)):y=s.geometry.bsInfo.w&&s.geometry.bsInfo.h?this.calculateLabelBounds2(s,m):this.calculateLabelBounds(s,m);var f=new Y(0,c.y,c.x,0),g=y.length;if(this.isAvoid){var v=this.getAvoidInfo(f,y);if(v){if("left"===v.aspectW){s.style.labelXOffset+=v.offsetX;for(let e=0;e<g;e++)y[e].x+=v.offsetX}else if("right"===v.aspectW){s.style.labelXOffset+=-v.offsetX;for(let e=0;e<g;e++)y[e].x+=-v.offsetX}if("top"===v.aspectH){s.style.labelYOffset+=v.offsetY;for(let e=0;e<g;e++)y[e].y+=v.offsetY}else if("bottom"===v.aspectH){s.style.labelYOffset+=-v.offsetY;for(let e=0;e<g;e++)y[e].y+=-v.offsetY}s.isStyleChange=!0}}if(this.isOverLay){var S=!1;if(0!=p)for(let e=0;e<n.length;e++)if(this.isQuadrilateralOverLap(y,n[e])){S=!0;break}if(S)continue;n.push(y)}var b=[];for(let e=0;e<g-1;e++)b.push(l.unproject(y[e]));var x=b[3],C=b[1],_=new Y(x.lng,x.lat,C.lng,C.lat).getCenterLonLat(),T=new te(_.lon,_.lat,s.attributes[this.themeField]);T.calculateBounds(),r=V.cloneObject(s.style),i=V.cloneObject(V.copyAttributes(r,o)),(t=new ce(T,s.attributes,i)).id=s.id,t.fid=s.fid,a.push(t)}}return a}getStyleByData(e){var t=e;if(t.style=V.copyAttributes(t.style,this.defaultStyle),this.style&&this.style.fontSize&&parseFloat(this.style.fontSize)<12&&(this.style.fontSize="12px"),t.style=V.copyAttributes(t.style,this.style),this.themeField&&this.styleGroups&&t.attributes){var s=this.themeField,r=t.attributes,i=this.styleGroups,a=!1,n=null;for(var o in r)if(s===o){a=!0,n=r[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=V.copyAttributes(t.style,u)}t.style.label=t.attributes[this.themeField]}return t.style}setLabelsStyle(e){for(var t,s=[],r=0,i=e.length;r<i;r++){var a=e[r];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,s.push(t)}return s}setStyle(e){var t=e;if(t.style=V.copyAttributes(t.style,this.defaultStyle),this.style&&this.style.fontSize&&parseFloat(this.style.fontSize)<12&&(this.style.fontSize="12px"),t.style=V.copyAttributes(t.style,this.style),this.groupField&&this.styleGroups&&t.attributes){var s=this.groupField,r=t.attributes,i=this.styleGroups,a=!1,n=null;for(var o in r)if(s===o){a=!0,n=r[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=V.copyAttributes(t.style,u)}}return t.style.label=t.geometry.text,t}getLabelPxLocation(e){var t=e.geometry,s=e.style,r=t.getCentroid(),i=this.map.project(new(rn().LngLat)(r.x,r.y)),a=new(rn().Point)(i.x,i.y);if(s.labelXOffset||s.labelYOffset){var n=isNaN(s.labelXOffset)?0:s.labelXOffset,o=isNaN(s.labelYOffset)?0:s.labelYOffset,l=a.add(new(rn().Point)(n,-o));return new(rn().Point)(l.x,l.y)}return new(rn().Point)(a.x,a.y)}calculateLabelBounds(e,t){var s=e.geometry,r=null,i=null;if(0==this.getPxBoundsMode)r=s.getLabelPxBoundsByText(t,e.style);else{if(1!==this.getPxBoundsMode)return null;i=this.getLabelInfo(e.geometry.getCentroid(),e.style),r=s.getLabelPxBoundsByLabel(t,i.w,i.h,e.style)}var a=[];return a=e.style.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,e.style.labelRotation),s.bounds=new Y(a[1].x,a[3].y,a[2].x,a[4].y),a}calculateLabelBounds2(e,t){var s,r,i,a,n,o=e.geometry.bsInfo,l=e.style,h=V.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}r=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,s=new Y(r,i,n,a);var u=[];return u=l.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,l.labelRotation),e.geometry.bounds=new Y(u[1].x,u[3].y,u[2].x,u[4].y),u}getLabelInfo(e,t){var s={l:"left",r:"right",t:"top",b:"bottom"},r={l:0,r:-1,t:0,b:-1};t=V.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,p,d=[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"),y=m.length;if(h.fillText){h.font=d,h.textAlign=s[t.labelAlign[0]]||"center",h.textBaseline=s[t.labelAlign[1]]||"middle",null==(u=r[t.labelAlign[1]])&&(u=-.5),c=h.measureText("Mg").height||h.measureText("xx").width,i[1]+=c*u*(y-1);for(let e=0;e<y;e++)a<(p=h.measureText(m[e]).width)&&(a=p)}else if(h.mozDrawText){h.mozTextStyle=d,null==(u=r[t.labelAlign[1]])&&(u=-.5),c=h.mozMeasureText("xx"),i[1]+=c*(1+u*y);for(let e=0;e<y;e++)a<(p=h.measureText(m[e]).width)&&(a=p)}var f={};return a?(f.w=a,f.h=t.fontSize,f.rows=m.length,f):null}rotationBounds(e,t,s){var r=new(rn().Point)(e.left,e.top),i=new(rn().Point)(e.right,e.top),a=new(rn().Point)(e.right,e.bottom),n=new(rn().Point)(e.left,e.bottom),o=[];o.push(this.getRotatedLocation(r.x,r.y,t.x,t.y,s)),o.push(this.getRotatedLocation(i.x,i.y,t.x,t.y,s)),o.push(this.getRotatedLocation(a.x,a.y,t.x,t.y,s)),o.push(this.getRotatedLocation(n.x,n.y,t.x,t.y,s));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,s,r,i){var a,n,o={};return t=-t,r=-r,i=-i,a=(e-s)*Math.cos(i/180*Math.PI)-(t-r)*Math.sin(i/180*Math.PI)+s,n=(e-s)*Math.sin(i/180*Math.PI)+(t-r)*Math.cos(i/180*Math.PI)+r,o.x=a,o.y=-n,o}getAvoidInfo(e,t){if(5!==t.length)return null;for(var s=[{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}],r=!1,i=s.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"===V.lineIntersection(s[u],s[u+1],t[c],t[c+1]).CLASS_NAME&&(p(t[c]),p(t[c+1]),r=!0);return r?{aspectW:h,aspectH:l,offsetX:n,offsetY:o}:null;function p(t){if(!e.contains(t.x,t.y)){if(t.y<e.top){let s=Math.abs(e.top-t.y);s>o&&(o=s,l="top")}if(t.y>e.bottom){let s=Math.abs(t.y-e.bottom);s>o&&(o=s,l="bottom")}if(t.x<e.left){let s=Math.abs(e.left-t.x);s>n&&(n=s,h="left")}if(t.x>e.right){let s=Math.abs(t.x-e.right);s>n&&(n=s,h="right")}}}}isQuadrilateralOverLap(e,t){var s=e.length,r=t.length;if(5!==s||5!==r)return null;var i=!1;for(let r=0;r<s;r++)if(this.isPointInPoly(e[r],t)){i=!0;break}for(let s=0;s<r;s++)if(this.isPointInPoly(t[s],e)){i=!0;break}for(let n=0;n<s-1&&!i;n++)for(var a=0;a<r-1;a++)if("SuperMap.Geometry.Point"===V.lineIntersection(e[n],e[n+1],t[a],t[a+1]).CLASS_NAME){i=!0;break}return i}isPointInPoly(e,t){for(var s=!1,r=-1,i=t.length,a=i-1;++r<i;a=r)(t[r].y<=e.y&&e.y<t[a].y||t[a].y<=e.y&&e.y<t[r].y)&&e.x<(t[a].x-t[r].x)*(e.y-t[r].y)/(t[a].y-t[r].y)+t[r].x&&(s=!s);return s}};const cn=function(){try{return mapv}catch(e){return{}}}();
  1521. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1522. * This program are made available under the terms of the Apache License, Version 2.0
  1523. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1524. var pn=cn.baiduMapLayer?cn.baiduMapLayer.__proto__:Function;class dn extends pn{constructor(e,t,s,r){if(super(e,s,r),pn){this.map=e;r=r||{},this.init(r),this.argCheck(r),this.canvasLayer=t,this.stopAniamation=!1,this.animation=r.animation,this.clickEvent=this.clickEvent.bind(this),this.mousemoveEvent=this.mousemoveEvent.bind(this),this.bindMapEvent(),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 s=e;e&&e.get&&(s=e.get()),this.dataSet.add(s),this.update({options:t})}update(e){var t=e||{},s=t.data;s&&s.get&&(s=s.get()),void 0!=s&&this.dataSet.set(s),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 s=this,r=s.options.animation,i=this.getContext();if(s.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 s.options)i[a]=s.options[a];else i.clear(i.COLOR_BUFFER_BIT);if(!(s.options.minZoom&&t.getZoom()<s.options.minZoom||s.options.maxZoom&&t.getZoom()>s.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=Yi("DEGREE")*h,p=t.getCenter(),d=t.project(p),m={transferCoordinate:function(e){if(t.transform.rotationMatrix||"2d"===s.context){var r=t.project(new(rn().LngLat)(e[0],e[1]));return[r.x,r.y]}var i=[(e[0]-p.lng)/h,(p.lat-e[1])/u];return[i[0]+d.x,i[1]+d.y]}};void 0!==e&&(m.filter=function(t){var s=r.trails||10;return e&&t.time>e-s&&t.time<e});var y=s.dataSet.get(m);this.processData(y),"m"===s.options.unit?(s.options.size&&(s.options._size=s.options.size/c),s.options.width&&(s.options._width=s.options.width/c),s.options.height&&(s.options._height=s.options.height/c)):(s.options._size=s.options.size,s.options._height=s.options.height,s.options._width=s.options.width);var f=t.project(new(rn().LngLat)(0,0));this.drawContext(i,y,s.options,f),s.options.updateCallback&&s.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()}bindMapEvent(){this.mapEvent={resizeEvent:this.resizeEvent.bind(this),zoomStartEvent:this.zoomStartEvent.bind(this),zoomEndEvent:this.zoomEndEvent.bind(this),rotateStartEvent:this.rotateStartEvent.bind(this),rotateEvent:this.rotateEvent.bind(this),moveStartEvent:this.moveStartEvent.bind(this),rotateEndEvent:this.rotateEndEvent.bind(this),moveEvent:this.moveEvent.bind(this),moveEndEvent:this.moveEndEvent.bind(this),removeEvent:this.removeEvent.bind(this)},this.map.on("resize",this.mapEvent.resizeEvent),this.map.on("zoomstart",this.mapEvent.zoomStartEvent),this.map.on("zoomend",this.mapEvent.zoomEndEvent),this.map.on("rotatestart",this.mapEvent.rotateStartEvent),this.map.on("rotate",this.mapEvent.rotateEvent),this.map.on("rotateend",this.mapEvent.rotateEndEvent),this.map.on("movestart",this.mapEvent.moveStartEvent),this.map.on("move",this.mapEvent.moveEvent),this.map.on("moveend",this.mapEvent.moveEndEvent),this.map.on("remove",this.mapEvent.removeEvent)}unbindMapEvent(){this.map.off("resize",this.mapEvent.resizeEvent),this.map.off("zoomstart",this.mapEvent.zoomStartEvent),this.map.off("zoomend",this.mapEvent.zoomEndEvent),this.map.off("rotatestart",this.mapEvent.rotateStartEvent),this.map.off("rotate",this.mapEvent.rotateEvent),this.map.off("rotateend",this.mapEvent.rotateEndEvent),this.map.off("movestart",this.mapEvent.moveStartEvent),this.map.off("move",this.mapEvent.moveEvent),this.map.off("moveend",this.mapEvent.moveEndEvent),this.map.off("remove",this.mapEvent.removeEvent)}destroy(){this.unbindMapEvent(),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,s=this.canvasLayer.devicePixelRatio=t.devicePixelRatio||1;e.width=parseInt(this.map.getCanvas().style.width)*s,e.height=parseInt(this.map.getCanvas().style.height)*s,this.canvasLayer.mapVOptions.context&&"2d"!=this.canvasLayer.mapVOptions.context||e.getContext("2d").scale(s,s),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(rn().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,s=this.map.project(new(rn().LngLat)(0,0)),r=s.x-this.startMoveX,i=s.y-this.startMoveY;this.getContext().canvas.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg) translate3d("+r+"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"}}rn().supermap.MapvLayer=
  1525. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1526. * This program are made available under the terms of the Apache License, Version 2.0
  1527. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1528. class{constructor(e,t,s){this.map=e,this.id=s.layerID?s.layerID:V.createUniqueID("mapvLayer_"),delete s.layerID,this.mapVOptions=s,this.dataSet=t,this.visibility=!0,this.map&&this.map.addLayer(this)}onAdd(e){this.map=e,this.renderer=new dn(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 s=document.getElementById(this.canvas.id);if(t=void 0===t||t){const t=document.getElementById(e);return void(s&&t&&t.parentNode.insertBefore(s,t))}const r=document.getElementById(e);if(s){if(r.nextSibling)return void r.parentNode.insertBefore(s,r.nextSibling);r.parentNode.appendChild(s)}}getTopLeft(){var e,t=this.map;return t&&(e=t.getBounds().getNorthWest()),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,s=this.devicePixelRatio=t.devicePixelRatio||1;return e.width=parseInt(this.map.getCanvas().style.width)*s,e.height=parseInt(this.map.getCanvas().style.height)*s,this.mapVOptions.context&&"2d"!=this.mapVOptions.context||e.getContext("2d").scale(s,s),e.style.width=this.map.getCanvas().style.width,e.style.height=this.map.getCanvas().style.height,e}setZIndex(e){this.canvas.style.zIndex=e}};
  1529. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1530. * This program are made available under the terms of the Apache License, Version 2.0
  1531. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1532. class mn{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._highlightLayerId=`${this.id}-highlightLayer`,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 s=this;return s.data=e,null!=t&&(s.parseNumber=t),s.parseNumber&&s.data&&s.data.features&&s.data.features.map(function(e){return s.baseHeightField&&e.properties[s.baseHeightField]&&(e.properties[s.baseHeightField]=parseFloat(e.properties[s.baseHeightField])),s.heightField&&e.properties[s.heightField]&&(e.properties[s.heightField]=parseFloat(e.properties[s.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";return 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)),this.map.getLayer(this._highlightLayerId)&&(this._selectFeatureId=null,this.map.removeLayer(this._highlightLayerId)),this.legend&&this.map.removeControl(this.legend),this}getLayerStyleOptions(){}getHighlightStyleOptions(){}_createLegendControl(e){var t=this;function s(){}return s.prototype.onAdd=function(s){this._map=s,this._container=document.createElement("div");var r="legend-light";"dark"===t.legendTheme&&(r="legend-dark");var i=" legend-horizontal";if("vertical"===t.legendOrientation&&(i=" legend-vertical"),this._container.className="mapboxgl-ctrl legend "+r+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},s.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=void 0},new s}_createLegendElement(){}_addLayer(){var e=this.getLayerStyleOptions(),t=this.id?this.id:"theme3DLayer",s=this.sourceId=t+"Source";this.map.getSource(s)?(this.map.removeSource(s),this.map.addSource(s,{type:"geojson",data:this.data})):this.map.addSource(s,{type:"geojson",data:this.data}),this.map.addLayer({id:t,type:"fill-extrusion",source:s,paint:e}),this.map.moveLayer(t)}_addHighLightLayer(){if(this.map){var e=this.map;e.addLayer({id:this._highlightLayerId,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,s=this.map,r=s.queryRenderedFeatures(e.point,{layers:[t.id]});if(t.highlight&&t.highlight.callback&&t.highlight.callback(r,e),!r||r.length<1)return t._clearHighlight.call(t),void(t._selectFeatureId=null);var i=r[0].id;t._selectFeatureId!==i&&(t._selectFeatureId=i,s.setFilter(t._highlightLayerId,["==","$id",t._selectFeatureId]))}_clearHighlight(){this.map&&this.map.setFilter(this._highlightLayerId,["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 s=Object.getOwnPropertyNames(arguments)[t];if("caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s){var r=arguments[s];if(r)for(var i=0;i<Object.getOwnPropertyNames(r).length;i++){var a=Object.getOwnPropertyNames(r)[i];"caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s&&(e[a]=r[a])}}}return e}}rn().supermap.Theme3DLayer=mn;rn().supermap.RangeTheme3DLayer=
  1533. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1534. * This program are made available under the terms of the Apache License, Version 2.0
  1535. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1536. class extends mn{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]*$/,s={"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?s["fill-extrusion-height"]={stops:this.heightStops,property:this.heightField||"height",base:t.test(this.base)?this.base:1}:this.height?s["fill-extrusion-height"]=this.height:s["fill-extrusion-height"]={property:this.heightField||"height",type:"identity"},this.baseHeightField&&(s["fill-extrusion-base"]={property:this.baseHeightField,type:"identity"}),s}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,s="<ul>";for(e=0;e<t;e++){var r=this.colorStops[e][0],i=this._getWrapperText(r);i=e===t-1?"> "+i:i+"-"+this._getWrapperText(this.colorStops[e+1][0]),s+="<li><span style='background-color:"+this.colorStops[e][1]+";'></span><span>"+i+"</span></li>"}return s+="</ul>"}_getWrapperText(e){var t=e*(null==this.legendRatio?1:parseFloat(this.legendRatio)),s=parseFloat(t);return s%1e6<=1e6?s.toString():parseInt(s/1e3)+"k"}};rn().supermap.RangeThemeLayer=
  1537. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1538. * This program are made available under the terms of the Apache License, Version 2.0
  1539. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1540. class extends un{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),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new La(e,this,Ta.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}getStyleByData(e){var t={},s=e;if(t=V.copyAttributesWithClip(t,this.style),this.themeField&&this.styleGroups&&this.styleGroups.length>0&&s.attributes){var r=this.themeField,i=s.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(r===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=V.copyAttributesWithClip(t,c)}}return s.style&&!0===this.isAllowFeatureStyle&&(t=V.copyAttributesWithClip(s.style)),t}};rn().supermap.RankSymbolThemeLayer=
  1541. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1542. * This program are made available under the terms of the Apache License, Version 2.0
  1543. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1544. class extends hn{constructor(e,t,s){super(e,t,s),this.symbolType=t,this.symbolSetting=s.symbolSetting,this.themeField=s.themeField}setSymbolType(e){this.symbolType=e,this.redraw()}createThematicFeature(e){var t;return Ea[this.symbolType]&&this.themeField&&this.symbolSetting&&(t=new Ea[this.symbolType](e,this,[this.themeField],this.symbolSetting)),!!t&&(t.assembleShapes(),t)}};rn().supermap.UniqueTheme3DLayer=
  1545. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1546. * This program are made available under the terms of the Apache License, Version 2.0
  1547. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1548. class extends mn{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,s=0;s<t;s++){var r=this.colorStops[s][0];e+="<li><span style='background-color:"+this.colorStops[s][1]+";'></span><span>"+r+"</span></li>"}return e+="</ul>"}};rn().supermap.UniqueThemeLayer=
  1549. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1550. * This program are made available under the terms of the Apache License, Version 2.0
  1551. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1552. class extends un{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),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new La(e,this,Ta.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}getStyleByData(e){var t={},s=e;if(t=V.copyAttributesWithClip(t,this.style),this.themeField&&this.styleGroups&&this.styleGroups.length>0&&s.attributes){var r=this.themeField,i=s.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(r===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=V.copyAttributesWithClip(t,c)}}return s.style&&!0===this.isAllowFeatureStyle&&(t=V.copyAttributesWithClip(s.style)),t}};rn().supermap.Graphic=
  1553. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1554. * This program are made available under the terms of the Apache License, Version 2.0
  1555. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1556. class{constructor(e,t,s){this.lngLat=nn.isArray(e)?{lng:e[0],lat:e[1]}:e,this.style=nn.extend({},t),this.attributes=s}getId(){return this.id}setId(e){this.id=e}getLngLat(){return this.lngLat}setLngLat(e){this.lngLat=nn.isArray(e)?{lng:e[0],lat:e[1]}:e}setStyle(e){this.style=nn.extend(this.style,e)}getStyle(){return this.style}setAttributes(e){this.attributes=nn.extend({},this.attributes,e)}getAttributes(){return this.attributes}};
  1557. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1558. * This program are made available under the terms of the Apache License, Version 2.0
  1559. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1560. const yn={color:[0,0,0,255],opacity:.8,radius:10,radiusScale:1,radiusMinPixels:0,radiusMaxPixels:Number.MAX_SAFE_INTEGER,strokeWidth:1,outline:!1};rn().supermap.GraphicLayer=class{constructor(e,t){let s=nn.extend(this,yn,t);this.id=e||V.createUniqueID("graphicLayer_"),this.graphics=[].concat(s.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()!==rn().CRS.EPSG3857&&(this.coordinateSystem=3,this.isGeographicCoordinateSystem=!0);let t=this.getState(),{data:s,color:r,radius:i,opacity:a,highlightColor:n,radiusScale:o,radiusMinPixels:l,radiusMaxPixels:h,strokeWidth:u,outline:c}=t,p=this,d={id:"scatter-plot",data:s,pickable:Boolean(this.onClick)||Boolean(this.onHover),autoHighlight:!0,color:r,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||p.color},getRadius:function(e){let t=e&&e.getStyle();return t&&t.radius||p.radius},updateTriggers:{getColor:[r],getRadius:[i]}};this.onClick&&(d.onClick=this.onClick),this.onHover&&(d.onHover=this.onHover),this.layer=new window.DeckGL.ScatterplotLayer(d);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};nn.extend(this,t,e),this.update()}setGraphics(e){this.graphics=this.graphics||[],this.graphics.length=0;let t=nn.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=nn.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 s=null;for(let r in this.graphics)if(this.graphics[r][e]===t){s=this.graphics[r];break}return s}getGraphicById(e){return this.getGraphicBy("id",e)}getGraphicsByAttribute(e,t){var s,r=[];for(let i in this.graphics)(s=this.graphics[i])&&s.attributes&&s.attributes[e]===t&&r.push(s);return r}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();V.isArray(e)||(e=[e]);for(let t=e.length-1;t>=0;t--){let s=e[t],r=V.indexOf(this.graphics,s);-1!==r&&this.graphics.splice(r,1)}this.update()}update(){if("Awaiting state"!==this.layer.lifecycle){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 s=document.getElementById(this.id);if(t=void 0===t||t){var r=document.getElementById(e);s&&r&&r.parentNode.insertBefore(s,r)}else{var i=document.getElementById(e);if(s){if(i.nextSibling)return void i.parentNode.insertBefore(s,i.nextSibling);i.parentNode.appendChild(s)}}}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),s=parseInt(this.canvas.style.height),r=e.getCenter(),i={longitude:r.lng,latitude:r.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=s,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()!==rn().CRS.EPSG3857&&(a.coordinateSystem=this.coordinateSystem,a.isGeographicCoordinateSystem=this.isGeographicCoordinateSystem),a}draw(){let e=this.getState(),t={};for(let s in e)t[s]=e[s];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}};const fn=function(){try{return THREE}catch(e){return{}}}();
  1561. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1562. * This program are made available under the terms of the Apache License, Version 2.0
  1563. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1564. function gn(e,t,s){if(e===s||e===t)return e;let r=s-t;return((e-t)%r+r)%r+t}function vn(e){return e*Math.PI/180}var Sn={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,s=this.METERS_PER_DEGREE,r=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(r,a.lat),-r);return{x:n*s,y:(i=0===o?0:Math.log(Math.tan((90+o)*t/2))/t)*s}},unproject:function(e){const t=e.x,s=e.y,r=this.RAD,i=this.METERS_PER_DEGREE;let a;return 0===s?a=0:(a=s/i,a=(2*Math.atan(Math.exp(a*r))-Math.PI/2)/r),{lng:gn(t/i,-180,180),lat:gn(a,-this.MAX_LATITUDE,this.MAX_LATITUDE)}},locate:function(e,t,s){if(!e)return null;if(t=t||0,s=s||0,!t&&!s)return e;let r=e.lng;if(0!==t){let s=Math.abs(t),i=vn(e.lng);r=gn(180*(i+=2*Math.sqrt(Math.pow(Math.sin(s/(2*this.R)),2)/Math.pow(Math.cos(i),2))*(s>0?1:-1))/Math.PI,-180,180)}let i=e.lat;if(0!==s){let t=Math.abs(s),r=vn(e.lat);i=gn(180*(r+=2*Math.sin(t/(2*this.R))*(t>0?1:-1))/Math.PI,-90,90)}return{lng:r,lat:i}},getResolution:function(e){if(!this.resolutions){for(var t=[],s=12756274*Math.PI,r=0;r<=this.maxZoom;r++)t[r]=s/(256*Math.pow(2,r));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 s=this.project(e);return this.transform(s,this.projection.getResolution(t))},locate:function(e,t,s){return this.projection.locate(e,t,s)},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}}};rn().supermap.Transform=Sn;
  1565. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1566. * This program are made available under the terms of the Apache License, Version 2.0
  1567. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1568. const bn=Sn.projection,{Color:xn,Scene:Cn,WebGLRenderer:_n,CanvasRenderer:Tn,PerspectiveCamera:En}=fn,An=Math.PI/180,wn=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,Ln=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame;class Pn{constructor(e,t,s){this._layer=e,this.renderer=t||"gl",this.options=s}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 wn(function(){e&&"function"==typeof e&&e()})}resize(){this._resetElementSize(this.container),this._resetElementSize(this.canvas);let e=this.canvas.width,t=this.canvas.height,s=this.getMapSize();this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.context.setSize(s.width,s.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&&Ln(this.animationFrame)}remove(){null!=this.animationFrame&&Ln(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,s=null==e?t.getZoom():e,r=bn.getResolution(bn.nativeMaxZoom);return bn.getResolution(s)/r}getCanvasContainer(){return this.container}getCanvas(){return this.canvas}locationCamera(){let e=this.map,t=this.getMapSize(),s=e.transform.zoomScale(bn.nativeMaxZoom-e.getZoom()-1),r=Math.tan(e.transform.fov/2*An),i=this.camera,a=e.getPitch()*An,n=-s*t.height/2/r;i.position.z=n*Math.cos(a);let o=Sn.lngLatToPoint(e.getCenter(),bn.nativeMaxZoom),l=Math.sin(a)*n,h=e.getBearing()*An;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 fn.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(),s=window.devicePixelRatio?window.devicePixelRatio:1,r=s*t.width,i=s*t.height;e.width=r,e.height=i,e.style.width=t.width+"px",e.style.height=t.height+"px"}_initThreeRenderer(){let e,t=this.map,s=this.getMapSize();"gl"===(this.renderer||"gl")?((e=new _n({canvas:this.canvas,alpha:!0,antialias:!0,preserveDrawingBuffer:!0},this.options)).autoClear=!0,e.clear()):e=new Tn(V.extend({canvas:this.canvas,alpha:!0},this.options)),e.setClearColor(new xn(1,1,1),0),e.canvas=this.canvas,this.context=e;let r=t.transform.fov,i=Math.tan(r/2*An),a=this.getScale(bn.minZoom)/this.getScale(bn.nativeMaxZoom)*s.height/2/i;this.camera=new En(r,s.width/s.height,1,a),this.scene=new Cn,this.scene.add(this.camera)}}
  1569. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1570. * This program are made available under the terms of the Apache License, Version 2.0
  1571. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1572. const{Vector3:On,Shape:Nn,Mesh:Mn,BufferGeometry:In,ExtrudeGeometry:Fn}=fn;rn().supermap.ThreeLayer=class extends rn().Evented{constructor(e,t,s){super(),this._layerId=e,this.options=s;let r=s&&s.threeOptions;this.renderer=new Pn(this,t,r)}toThreeShape(e){if(!e)return null;let t=this.getCoordinatesCenter(e),s=this.lngLatToPosition(t),r=e.map(e=>this.lngLatToPosition({lng:e[0],lat:e[1]}).sub(s));return new Nn(r)}toThreeMesh(e,t,s,r){if(!e)return null;let i=e;r&&(i=this.removeDuplicatedCoordinates(e));let a=this.distanceToThreeVector3(t,t).x,n=this.toThreeShape(i),o=new Fn(n,{amount:a,bevelEnabled:!0}),l=(new In).fromGeometry(o),h=new Mn(l,s),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 fn.Mesh&&e.remove(e.children[t]);return this}clearAll(e){let t=this.renderer.scene;if(!t)return this;for(let s=t.children.length-1;s>=0;s--)!e&&t.children[s]instanceof fn.Camera||t.remove(t.children[s]);return this}setPosition(e,t){if(!e||!t)return this;var s=this.lngLatToPosition(t);return e.position.set(s.x,s.y,s.z),this}lngLatToPosition(e){let t=Sn.projection.nativeMaxZoom,s=Sn.lngLatToPoint(e,t);return new On(s.x,s.y,-0)}distanceToThreeVector3(e,t,s){let r=this._map,i=s||r.getCenter(),a=Sn.projection.nativeMaxZoom,n=Sn.locate(i,e,t),o=Sn.lngLatToPoint(i,a),l=Sn.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 On(h,u,0)}removeDuplicatedCoordinates(e){function t(e,t){return e[0]===t[0]&&e[1]===t[1]}let s=[].concat(e);for(let e=s.length-1;e>=1;e--)t(s[e],s[e-1])&&s.splice(e,1);return t(s[0],s[s.length-1])&&s.splice(s.length-1,1),s}getCoordinatesCenter(e){let t=0,s=0,r=0,i=0,a=e.length;for(;i<a;i++)e[i]&&(t+=e[i][0],s+=e[i][1],r++);return{lng:t/r,lat:s/r}}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,s){return this}renderScene(){return this.renderer.renderScene(),this.fire("renderscene"),this}_resize(){this.renderer.resize()}_update(){return this.renderScene(),this.fire("render"),this}};rn().supermap.HeatMapLayer=
  1573. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1574. * This program are made available under the terms of the Apache License, Version 2.0
  1575. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1576. class extends rn().Evented{constructor(e,t){super();var s=t||{};this.name=e,this.id=s.id?s.id:V.createUniqueID("HeatMapLayer_"),this.map=s.map?s.map:null,this.loadWhileAnimating=void 0===s.loadWhileAnimating||s.loadWhileAnimating,this.visibility=!0,this.opacity=s.opacity?s.opacity:1,this.colors=s.colors?s.colors:["blue","cyan","lime","yellow","red"],this.useGeoUnit=!!s.useGeoUnit&&s.useGeoUnit,this.radius=s.radius?s.radius:50,this.featureWeight=s.featureWeight?s.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),V.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,V.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,s,r,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 p=0;p<this.features.length;p++){var d=this.features[p],m=d.geometry,y=this.getPixelXY(new q(m.x,m.y));this.featureWeight?(y.weight=d.attributes[this.featureWeight],this.maxWeight||(a=a||y.weight,n=n||y.weight,a=Math.max(a,y.weight),n=Math.min(n,y.weight))):y.weight=1,t=Math.floor(y.x),s=Math.floor(y.y),r=y.weight,l.push([t,s,r])}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 s=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var r=0;r<e.length;r++){var i=e[r];this.canvasContext.globalAlpha=Math.max(i[2]/t,.05),this.canvasContext.drawImage(this.circle,i[0]-this.useRadius,i[1]-this.useRadius)}var a=s.getImageData(0,0,this.maxWidth,this.maxHeight);this.colorize(a.data,this.grad),s.putImageData(a,0,0)}colorize(e,t){for(var s,r=0;r<e.length;r+=4)(s=4*e[r+3])&&(e[r]=t[s],e[r+1]=t[s+1],e[r+2]=t[s+2])}drawCircle(e){var t=e/2,s=this.circle=document.createElement("canvas"),r=s.getContext("2d");s.height=2*e,s.width=2*e,r.shadowOffsetX=r.shadowOffsetY=2*e,r.shadowBlur=t,r.shadowColor="#000000",r.beginPath(),r.arc(-e,-e,e/2,0,2*Math.PI,!0),r.closePath(),r.fill()}createGradient(){var e=this.colors,t=document.createElement("canvas"),s=t.getContext("2d"),r=s.createLinearGradient(0,0,0,256);t.height=256,t.width=1;for(var i=1,a=0,n=e.length;a<n;a++)r.addColorStop(i/n,e[a]),i++;s.fillStyle=r,s.fillRect(0,0,1,256),this.grad=s.getImageData(0,0,1,256).data}getPixelXY(e){var t,s=this.map;if(e instanceof $||e instanceof te){let r=s.project(new(rn().LngLat)(e.x,e.y));t={x:parseInt(r.x),y:parseInt(r.y)}}if(e instanceof q){let r=s.project(new(rn().LngLat)(e.lon,e.lat));t={x:parseInt(r.x),y:parseInt(r.y)}}return t}toiClientFeature(e){V.isArray(e)||(e=[e]);let t=[];for(let s=0;s<e.length;s++)if(e[s]instanceof ce)t.push(e[s]);else if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e[s].type)){let r=new Se;t=t.concat(r.read(e[s]))}else{if(!e[s].geometry||!e[s].geometry.parts)throw new Error(`Features[${s}]'s type does not match, please check.`);t.push(Gr.fromJson(e[s]).toFeature())}return t}removeFeatures(e){if(e&&0!==e.length&&this.features&&0!==this.features.length){if(e===this.features)return this.removeAllFeatures();V.isArray(e)||(e=[e]);for(var t,s,r=[],i=0,a=e.length;i<a;i++)t=e[i],-1!==(s=V.indexOf(this.features,t))?this.features.splice(s,1):r.push(t);var n=0==r.length;this.fire(this.EVENT_TYPES[1],{features:r,succeed:n}),this.refresh()}}removeAllFeatures(){this.features=[],this.refresh()}moveTo(e,t){var s=document.getElementById(this.rootCanvas.id);if(t=void 0===t||t){var r=document.getElementById(e);s&&r&&r.parentNode.insertBefore(s,r)}else{var i=document.getElementById(e);if(s){if(i.nextSibling)return void i.parentNode.insertBefore(s,i.nextSibling);i.parentNode.appendChild(s)}}}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(rn().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,s=this.map.project(new(rn().LngLat)(0,0)),r=s.x-this.startMoveX,i=s.y-this.startMoveY;this.rootCanvas.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg) translate3d("+r+"px, "+i+"px, 0px)"}}else this.refresh()}_hide(){this.rootCanvas.style.display="none"}_show(){this.rootCanvas.style.display="block"}};rn().supermap.DeckglLayer=
  1577. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1578. * This program are made available under the terms of the Apache License, Version 2.0
  1579. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1580. class{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:V.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()!==rn().CRS.EPSG3857&&(this.coordinateSystem=3,this.isGeographicCoordinateSystem=!0),this._initContainer(),this._createLayerByLayerTypeID();var t=this._getState();let s={};for(let e in t)s[e]=t[e];return s.layers=[this.layer],s.canvas=this.canvas,this.deckGL=new window.DeckGL.experimental.DeckGLJS(s),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 s=document.getElementById(this.id);if(t=void 0===t||t){var r=document.getElementById(e);s&&r&&r.parentNode.insertBefore(s,r)}else{var i=document.getElementById(e);if(s){if(i.nextSibling)return void i.parentNode.insertBefore(s,i.nextSibling);i.parentNode.appendChild(s)}}}setVisibility(e){this.canvas&&e!==this.visibility&&(this.visibility=e,this.canvas.style.display=e?"block":"none")}setStyle(e){nn.extend(this.props,e),this._createLayerByLayerTypeID(),this.update()}setData(e){this.data=this.data||[],this.data.length=0;let t=nn.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=nn.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(){if("Awaiting state"!==this.layer.lifecycle){let e={dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0};this.layer.setChangeFlags(e)}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),s=parseInt(this.canvas.style.height),r=e.getCenter(),i={width:t,height:s,longitude:r.lng,latitude:r.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()!==rn().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 s=t&&t.getStyle();return s&&s.color||e.props.color}),this.callback.getRadius&&(this.props.getRadius=this.callback.getRadius?this.callback.getRadius:function(t){let s=t&&t.getStyle();return s&&s.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()}};
  1581. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1582. * This program are made available under the terms of the Apache License, Version 2.0
  1583. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1584. const Rn={textSize:"12px",textFont:["12px Calibri","sans-serif"],textAnchor:"bottom",textColor:"rgba(0,0,0,1)",textHaloColor:"rgba(255,255,255,1)",textHaloWidth:1},Dn={lineColor:"red",lineCap:"round",lineJoin:"round",lindDasharray:[.4,5],lineDashOffset:0,lineWidth:1},kn={showLabel:!0,opacity:1,visible:!0,interval:10,extent:null,minZoom:0,maxZoom:50,wrapX:!0,strokeStyle:Dn,lngLabelFormatter:null,latLabelFormatter:null,lngLabelStyle:Rn,latLabelStyle:Rn};rn().supermap.GraticuleLayer=class{constructor(e){this.id=e&&e.layerID?e.layerID:V.createUniqueID("graticuleLayer_"),this.sourceId=this.id+"_line",this.canvasId=this.id,this.options=e,this.resetEvent=this._reset.bind(this),this.styleDataEevent=this._setLayerTop.bind(this),this.resizeEvent=this._resizeCallback.bind(this),this.zoomendEvent=this.setVisibility.bind(this)}onAdd(e=this.map){this.map=e,this._initialize(),this._createCanvas(),this._bindEvent(),this._drawCanvas(),this._addGraticuleLayer(),this.setVisibility()}removeFromMap(){this.mapContainer.removeChild(this.canvas),this.canvas=null,this._unbindEvent()}setVisibility(e){const t=this.map&&this.map.getZoom();this.options.visible="boolean"==typeof e?e:this.options.visible,this.visible="boolean"==typeof e?e:this.options.visible&&t>=this.options.minZoom&&t<=this.options.maxZoom,this.map.getLayer(this.sourceId)&&this.map.setLayoutProperty(this.sourceId,"visibility",this.visible?"visible":"none"),this._drawLabel()}setMinZoom(e){this.options.minZoom=e,this.setVisibility()}setMaxZoom(e){this.options.maxZoom=e,this.setVisibility()}setShowLabel(e){this.options.showLabel=e,this._drawLabel()}setExtent(e){this.options.extent=this._getDefaultExtent(e,this.map),this.features=this._getGraticuleFeatures(),this._updateGraticuleLayer(),this._drawLabel()}setStrokeStyle(e){if(!this.map||!this.map.getLayer(this.sourceId))return;this.options.strokeStyle=e;const{layout:t,paint:s}=this._transformStrokeStyle(e);for(let e in t)this.map.setLayoutProperty(this.sourceId,e,t[e]);for(let e in s)this.map.setPaintProperty(this.sourceId,e,s[e])}setLngLabelStyle(e){this.options.lngLabelStyle=e,this._drawLabel()}setLatLabelStyle(e){this.options.latLabelStyle=e,this._drawLabel()}setIntervals(e){this.options.interval=e,this._calcInterval(),this.features=this._getGraticuleFeatures(),this._updateGraticuleLayer(),this._drawLabel()}_bindEvent(){this.map.on("move",this.resetEvent),this.map.on("moveend",this.resetEvent),this.map.on("styledata",this.styleDataEevent),this.map.on("resize",this.resizeEvent),this.map.on("zoomend",this.zoomendEvent)}_unbindEvent(){this.map.off("move",this.resetEvent),this.map.off("moveend",this.resetEvent),this.map.off("styledata",this.styleDataEevent),this.map.off("resize",this.resizeEvent),this.map.off("zoomend",this.zoomendEvent)}_initialize(e=this.map,t=this.options){(t=t||{}).strokeStyle={...Dn,...t.strokeStyle||{}},t.lngLabelStyle={...Rn,...t.lngLabelStyle||{}},t.latLabelStyle={...Rn,...t.latLabelStyle||{}},this.options={...kn,...t,extent:this._getDefaultExtent(t.extent,e),wrapX:"boolean"==typeof t.wrapX?t.wrapX:e.getRenderWorldCopies()},this.oldExtent=this.options.extent,this._calcInterval(),this.isRotate=!1,this.visible=!0,this.features=this._getGraticuleFeatures()}_createCanvas(){if(!this.canvas){this.canvas=document.createElement("canvas"),this.canvas.id=this.canvasId,this.canvas.style.position="absolute",this.canvas.style.top="0px",this.canvas.style.left="0px";var e=("undefined"==typeof window?{}:window).devicePixelRatio||1;this.canvas.width=parseInt(this.map.getCanvas().style.width)*e,this.canvas.height=parseInt(this.map.getCanvas().style.height)*e,this.canvas.style.width=this.map.getCanvas().style.width,this.canvas.style.height=this.map.getCanvas().style.height,this.canvas.globalAlpha=this.options.opacity,this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas)}}_drawCanvas(){this.canvas||this._createCanvas(),this.setVisibility(),this._reset()}_resizeCallback(){this.mapContainer&&this.mapContainer.removeChild(this.canvas),this.canvas=null,this._drawCanvas()}_reset(){this._updateRotate(),this._updateExtent(),this._calcInterval(),this._drawLabel()}_setLayerTop(e=this.map){if(!e)return;const t=e.getStyle&&e.getStyle().layers;t&&t.length&&t.findIndex(e=>e.id===this.sourceId)!==t.length-1&&e.getLayer(this.sourceId)&&(e.removeLayer(this.sourceId),this._addGraticuleLayer())}_getDefaultExtent(e,t=this.map){const s=t.getCRS&&t.getCRS()||{};let{extent:r}=s;if(r||(r=[-180,-85.05119,180,85.05119]),!e||0===e.length)return r;const{_sw:i,_ne:a}=rn().LngLatBounds.convert(e);return e=[i.lng,i.lat,a.lng,a.lat],e=[Math.max(r[0],e[0]),Math.max(r[1],e[1]),Math.min(r[2],e[2]),Math.min(r[3],e[3])]}_updateRotate(){const e=this.map.getBearing();this.isRotate=e>-180&&e<=-90||e>=90&&e<180}_updateExtent(){if(this.options.wrapX&&!this.oldExtent){const{_ne:e,_sw:t}=this.map.getBounds();this.options.extent=[t.lng,t.lat,e.lng,e.lat]}}_calcInterval(e=this.options.interval){"function"==typeof e?(e=e(this.map),this._currLngInterval=e,this._currLatInterval=e):(this._currLngInterval=e,this._currLatInterval=e)}_formatLat(e){return this.options.latFormatTickLabel?this.options.latLabelFormatter(e):e<0?Qi(-1*e)+"S":e>0?Qi(e)+"N":""+Qi(e)}_formatLng(e){return this.options.lngLabelFormatter?this.options.lngLabelFormatter(e):(e=Xi(e))>0&&e<=180?Qi(e)+"E":e<0&&e>=-180?Qi(-1*e)+"W":""+Qi(e)}_parsePxToInt(e){e.length>2&&"p"===e.charAt(e.length-2)&&(e=e.substr(0,e.length-2));try{return parseInt(e,10)}catch(e){console.log(e)}return 0}_drawLabel(e=this.visible){const t=this.canvas,s=t.getContext("2d");if(e&&this.options.showLabel){if(this.map){this._currLngInterval&&this._currLatInterval||this._calcInterval(),s.clearRect(0,0,t.width,t.height);const{lngLabelStyle:e,latLabelStyle:r}=this.options,{lngPoints:i,latPonits:a}=this._getGridiculePoints();i.forEach(t=>{this._drawLng(s,t[0],t[1],t[2],e)}),a.forEach(e=>{this._drawLat(s,e[0],e[1],e[2],r)})}}else s.clearRect(0,0,t.width,t.height)}_drawLat(e,t,s,r,i){e=this._setLabelStyle(e,i);const a=this.canvas.width;let n=12;try{const t=e.font.split(" ")[0];n=this._parsePxToInt(t)}catch(e){console.log(e)}if(!r){const e=t;t=s,s=this.map.project([e,t])}const o=this._formatLat(t),l=e.measureText(o).width;e.strokeText(o,(r?a:s.x)-l,(r?s:s.y)+n/2),e.fillText(o,(r?a:s.x)-l,(r?s:s.y)+n/2)}_drawLng(e,t,s,r,i){e=this._setLabelStyle(e,i);const a=this.canvas.height;if(!r){const e=s;s=this.map.project([t,e])}const n=this._formatLng(t),o=e.measureText(n).width;e.strokeText(n,(r?s:s.x)-o/2,r?a:s.y),e.fillText(n,(r?s:s.x)-o/2,r?a:s.y)}_getLatPoints(e=[-180,180],t,s,r=this.features){if(!r)return;if(this.options.wrapX&&-180===e[0]&&180===e[1])return[];let i=[];return r.forEach(r=>{const a=r.geometry.coordinates[0][1];if(r.geometry.coordinates[1][1]===a){let r="number"==typeof s?s:e[1];this.isRotate&&(r="number"==typeof t?t:e[0]),this.options.wrapX&&(i=i.concat(this._getWrapPoints(r,a,[r,r]))),i.push([r,a])}}),i}_getLngPoints(e=[-90,90],t,s,r=this.features){if(!r)return;let i="number"==typeof t?t:e[0];this.isRotate&&(i="number"==typeof s?s:e[1]);let a=[];return r.forEach(e=>{let t=e.geometry.coordinates[0][0];e.geometry.coordinates[1][0]===t&&(a.push([t,i]),this.options.wrapX&&(a=a.concat(this._getWrapPoints(t,i))))}),a}_getWrapPoints(e,t,s=this.oldExtent){const r=[],{_ne:i,_sw:a}=this.map.getBounds(),n=s.length>2?s[2]:s[1];for(;e>=a.lng;){const i=Xi(e,180===n,-180===s[0]);(!s||i>=s[0]&&i<=n)&&r.push([e,t]),e-=360}for(;e<=i.lng;){const i=Xi(e,180===n,-180===s[0]);(!s||i>=s[0]&&i<=n)&&r.push([e,t]),e+=360}return r}_getGridiculePoints(){const e=this._getEdgeLat(),t=this._getEdgeLng(),{latRange:s,lngRange:r,firstLat:i,firstLng:a,lastLat:n,lastLng:o}=this._getRange();return{latPonits:this._getUniquePoint(this._getLatPoints(r,a,o),e,1),lngPoints:this._getUniquePoint(this._getLngPoints(s,i,n),t,0)}}_getEdgeLat(e=this._currLatInterval,t=this.map){let s,r=[],i=[];const a=this.canvas.width,n=this.canvas.height,{extent:o}=this._getRange(),{_ne:l}=this.map.getBounds();if(this.options.wrapX&&Xi(l.lng)>o[2])return[];const h=this._countDecimals(e);for(let l=0;l<=n;l++){const n=t.unproject([a,l]),u=Xi(n.lng);(this.options.wrapX?u>=o[0]&&u<=o[2]:n.lng>=o[0]&&n.lng<=o[2])&&n.lat>=o[1]&&n.lat<=o[3]&&(r.push([n.lat,l]),i.push(n.lat),void 0===s&&n.lat.toFixed(h)%e==0&&(s=Number(n.lat.toFixed(h))))}const{first:u,last:c,coordinates:p,points:d}=this._getIntersectRange(s,i,r,e);s=Math.min(Math.max(u,-90),90);const m=Math.max(Math.min(Math.round(c),90),-90);return-90!==s||-90!==m?this._getClosestCoordinate(s,m,p,d,e):[]}_getEdgeLng(e=this._currLngInterval,t=this.map){let s,r=[],i=[];const a=this.canvas.width,n=this.canvas.height,o=this.options.extent,l=this._countDecimals(e),{_sw:h}=this.map.getBounds();if(this.options.wrapX&&Xi(h.lat)>o[3])return[];for(let h=0;h<=a;h++){const a=t.unproject([h,n]),u=Xi(a.lng);(this.options.wrapX?u>=o[0]&&u<=o[2]:a.lng>=o[0]&&a.lng<=o[2])&&a.lat>=o[1]&&a.lat<=o[3]&&(r.push([a.lng,h]),i.push(a.lng),void 0===s&&a.lng.toFixed(l)%e==0&&(s=Number(a.lng.toFixed(l))))}const{first:u,last:c,coordinates:p,points:d}=this._getIntersectRange(s,i,r,e);return s=u,this._getClosestCoordinate(s,c,p,d,e)}_getIntersectRange(e,t,s,r){let i=t[t.length-1];if(e>i){i=e,t.reverse(),s.reverse();const a=this._countDecimals(r);for(let s=0;s<=t.length;s++){const i=t[s];if(i.toFixed(a)%r==0){e=Number(i.toFixed(a));break}}}return{first:e,last:i,coordinates:t,points:s}}_getClosestCoordinate(e,t,s,r,i){let a=[],n=e;for(;n<=t;){const e=this._getClosestNumberIndex(n,s),t=r[e];a.push([Math.round(t[0]),t[1],!0]),n+=i,s=s.slice(e),r=r.slice(e)}return a}_getClosestNumberIndex(e,t){for(var s=0,r=Number.MAX_VALUE,i=0;i<t.length;i++){var a=Math.abs(t[i]-e);if(a<=r){if(a===r&&t[i]<t[s])continue;s=i,r=a}}return s}_getUniquePoint(e,t,s=0){if(this.options.wrapX)return e.concat(t);if(!t||0===t.length)return e;var r=t;const i=this.canvas.width,a=this.canvas.height;for(var n in e){const t=this.map.project(e[n]),o=r.findIndex(t=>t[0]===e[n][s]);o<=-1?r.push(e[n]):t&&t.x>=0&&t.x<=i&&t.y>=0&&t.y<=a&&(r[o]=e[n])}return r}_countDecimals(e){return Math.floor(e)!==e&&e.toString().split(".")[1].length||0}_addGraticuleLayer(e=this.features){if(!this.map.getSource(this.sourceId)){const t={type:"geojson",data:{type:"FeatureCollection",features:e}};this.map.addSource(this.sourceId,t)}this.map.getLayer(this.sourceId)||this.map.addLayer({id:this.sourceId,type:"line",source:this.sourceId,...this._transformStrokeStyle()})}_updateGraticuleLayer(e=this.features){if(this.map.getSource(this.sourceId)){const t={type:"FeatureCollection",features:e};this.map.getSource(this.sourceId).setData(t)}this._addGraticuleLayer()}_getGraticuleFeatures(){const e=this._currLngInterval||10,t=this._currLatInterval||10,s=[];let{latRange:r,lngRange:i,firstLat:a,firstLng:n,lastLat:o,lastLng:l}=this._getRange();this.options.wrapX&&!this.oldExtent&&(r=[-90,90],i=[-180,180],a=n=o=l=null),"number"==typeof n&&s.unshift(this._makeLineFeature(this._makeLineCoords(n,r,a,o))),"number"==typeof l&&s.unshift(this._makeLineFeature(this._makeLineCoords(l,r,a,o)));for(var h=i[0];h<=i[1];h+=e)s.unshift(this._makeLineFeature(this._makeLineCoords(h,r,a,o)));"number"==typeof a&&s.unshift(this._makeLineFeature(this._makeLineCoords(a,i,n,l,"lat"))),"number"==typeof o&&s.unshift(this._makeLineFeature(this._makeLineCoords(o,i,n,l,"lat")));for(var u=r[0];u<=r[1];u+=t)s.unshift(this._makeLineFeature(this._makeLineCoords(u,i,n,l,"lat")));return s}_getRange(e=this.options.extent&&[...this.options.extent]){e&&0!==e.length||(e=this._getDefaultExtent());const t={};if((e=e.map(e=>Number(e.toFixed(6))))[1]%this._currLatInterval!=0){t.firstLat=e[1];const s=Math.ceil(e[1]/this._currLatInterval);e[1]=s*this._currLatInterval}if(e[3]%this._currLatInterval!=0){t.lastLat=e[3];const s=Math.floor(e[3]/this._currLatInterval);e[3]=s*this._currLatInterval}if(e[0]%this._currLngInterval!=0){t.firstLng=e[0];const s=Math.ceil(e[0]/this._currLngInterval);e[0]=s*this._currLngInterval}if(e[2]%this._currLngInterval!=0){t.lastLng=e[2];const s=Math.floor(e[2]/this._currLngInterval);e[2]=s*this._currLngInterval}return{latRange:[e[1],e[3]],lngRange:[e[0],e[2]],extent:e,...t}}_makeLineCoords(e,t=[-90,90],s,r,i="lng"){e="lng"===i?this._lngFix(e):e,s="number"==typeof s?s:t[0],r="number"==typeof r?r:t[1];const a=Math.abs(s-r),n=[];for(var o=s;o<=r;o+=a)"lng"===i?n.push([e,o]):n.push([o,e]);return n}_makeLineFeature(e,t="LineString"){return{type:"Feature",geometry:{type:t,coordinates:e}}}_lngFix(e){return e>=180?180:e<=-180?-180:e}_transformStrokeStyle(e=this.options.strokeStyle){if(!e||"string"==typeof e)return{paint:{"line-color":e||"rgba(0,0,0,0.2)"}};const t={visibility:this.visible?"visible":"none","line-join":e.lineJoin||"round","line-cap":e.lineCap||"round"},s={"line-color":e.lineColor||"rgba(0,0,0,0.2)","line-width":e.lineWidth||1,"line-offset":e.lineDashOffset||0,"line-translate-anchor":"viewport"};return e.lineWidth&&("function"==typeof e.lineWidth?s["line-width"]=e.lineWidth(this.map):s["line-width"]=e.lineWidth),e.lindDasharray&&("function"==typeof e.lindDasharray?s["line-dasharray"]=e.lindDasharray(this.map):s["line-dasharray"]=e.lindDasharray),{layout:t,paint:s}}_setLabelStyle(e,t){return t.textColor&&(e.fillStyle=t.textColor),t.textSize&&(e.font=t.textSize+" "+(t.textFont||["Calibri","sans-serif"]).join(",")),t.textHaloColor&&(e.strokeStyle=t.textHaloColor,e.lineWidth=t.textHaloWidth||1),t.textAnchor&&(e.textBaseline=this._getTxetBaseline(t.textAnchor),e.textAligin=this._getTxetAlign(t.textAligin)),e}_getTxetBaseline(e){if(!e)return"bottom";const t=e.split("-");return t.includes("bottom")?"bottom":t.includes("top")?"top":t.includes("center")?"middle":void 0}_getTxetAlign(e){if(!e)return"center";const t=e.split("-");return t.includes("left")?"left":t.includes("right")?"right":t.includes("center")?"center":void 0}};
  1585. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1586. * This program are made available under the terms of the Apache License, Version 2.0
  1587. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1588. var Bn={getPoint:function(e){if(e&&e instanceof Array)return new cn.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 cn.DataSet(t)}},getCurveLines:function(e,t){if(e&&e instanceof Array&&t&&t instanceof Array){var s=[];return t.map(function(t){var r=t.geometry&&t.geometry.coordinates,i={lng:r[0],lat:r[1]},a={lng:e[0],lat:e[1]},n=cn.utilCurve.getPoints([a,i]);return s.push({geometry:{type:"LineString",coordinates:n}}),t}),new cn.DataSet(s)}},getCurveDynamicPoints:function(e,t){if(e&&e instanceof Array&&t&&t instanceof Array){var s=[];return t.map(function(t){for(var r=t.geometry&&t.geometry.coordinates,i={lng:r[0],lat:r[1]},a={lng:e[0],lat:e[1]},n=cn.utilCurve.getPoints([a,i]),o=0;o<n.length;o++)s.push({geometry:{type:"Point",coordinates:n[o]},time:o});return t}),new cn.DataSet(s)}}};rn().supermap.MapvDataSet=Bn,
  1589. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1590. * This program are made available under the terms of the Apache License, Version 2.0
  1591. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1592. rn().supermap=rn().supermap||{},rn().supermap.map=rn().supermap.map||{};function Gn(e,t,s,r,i){return{id:e,type:t,source:s||"vector-tiles","source-layer":r||e,paint:i}}rn().supermap.map.getDefaultVectorTileStyle=function(e,t){t=t||{};var s={};s.version=t.version||8,s.layers=t.layers||[],s.light=t.light||{anchor:"viewport",color:"#fcf6ef",intensity:.5,position:[1.15,201,20]};var r={version:s.version,sources:{"vector-tiles":{type:"vector",tiles:[e]}},layers:s.layers,light:s.light};return null!=t.sprite&&(r.sprite=t.sprite),null!=t.glyphs&&(r.glyphs=t.glyphs),r},rn().supermap.map.setBackground=function(e,t){t&&e&&e.addLayer({id:"background",type:"background",paint:{"background-color":t}},"background")},rn().supermap.map.setPaintProperty=function(e,t,s,r,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=Gn(t[n],s,i,o,r);e.addLayer(l,t[n]),e.moveLayer(t[n])}}};
  1593. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1594. * This program are made available under the terms of the Apache License, Version 2.0
  1595. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1596. class Un extends rn().Evented{constructor(e,t){super(),this.options=t||{},this.url=e,this.fire("initialized",this)}}rn().supermap.ServiceBase=Un;rn().supermap.AddressMatchService=
  1597. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1598. * This program are made available under the terms of the Apache License, Version 2.0
  1599. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1600. class extends Un{constructor(e,t){super(e,t)}code(e,t){var s=this;new ze(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}}).code(V.urlPathAppend(s.url,"geocoding"),e)}decode(e,t){var s=this;new ze(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}}).decode(V.urlPathAppend(s.url,"geodecoding"),e)}};rn().supermap.ChartService=
  1601. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1602. * This program are made available under the terms of the Apache License, Version 2.0
  1603. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1604. class extends Un{constructor(e,t){super(e,t)}queryChart(e,t,s){var r=this,i=r._processParams(e),a=r._processFormat(s);new vt(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},format:a}).processAsync(i)}getChartFeatureInfo(e){var t=this,s=t.url.concat();s=V.urlPathAppend(s,"chartFeatureInfoSpecs"),new mt(s,{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=nn.isArray(e.filter)?e.filter:[e.filter]),e.bounds&&(e.bounds instanceof Array&&(e.bounds=new Y(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3])),e.bounds instanceof rn().LngLatBounds&&(e.bounds=new Y(e.bounds.getSouthWest().lng,e.bounds.getSouthWest().lat,e.bounds.getNorthEast().lng,e.bounds.getNorthEast().lat)))}_processFormat(e){return e||t.GEOJSON}};rn().supermap.DataFlowService=
  1605. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1606. * This program are made available under the terms of the Apache License, Version 2.0
  1607. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1608. class extends Un{constructor(e,t){(t=t||{}).projection&&(t.prjCoordSys=t.projection),super(e,t),this.dataFlow=new Tt(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 s=this;s.on("subscribeSocketConnected",function(e){s.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)}};rn().supermap.FeatureService=
  1609. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1610. * This program are made available under the terms of the Apache License, Version 2.0
  1611. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1612. class extends Un{constructor(e,t){super(e,t)}getFeaturesByIDs(e,t,s){var r=this;new ws(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesByBounds(e,t,s){var r=this;new xs(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesByBuffer(e,t,s){var r=this;new _s(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesBySQL(e,t,s){var r=this;new Ps(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesByGeometry(e,t,s){var r=this;new Es(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}editFeatures(e,t){if(e&&e.dataSourceName&&e.dataSetName){var s=this,r=s.url,i=e.dataSourceName,a=e.dataSetName;r=V.urlPathAppend(r,"datasources/"+i+"/datasets/"+a),new Dt(r,{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}}).processAsync(s._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=nn.toSuperMapBounds(e.bounds)),e.editType&&(e.editType=e.editType.toLowerCase()),e.geometry&&(e.geometry instanceof rn().LngLatBounds?e.geometry=nn.toSuperMapPolygon(e.geometry):e.geometry=nn.toSuperMapGeometry(e.geometry)),e.features){var s=[];nn.isArray(e.features)?e.features.map(function(e){return s.push(t._createServerFeature(e)),s}):s.push(t._createServerFeature(e.features)),e.features=s}return e}_createServerFeature(e){var t={},s=[],r=[],i=e.properties;for(var a in i)s.push(a),r.push(i[a]);return t.fieldNames=s,t.fieldValues=r,e.id&&(t.id=e.id),t.geometry=nn.toSuperMapGeometry(e),t}_processFormat(e){return e||t.GEOJSON}};rn().supermap.FieldService=
  1613. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1614. * This program are made available under the terms of the Apache License, Version 2.0
  1615. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1616. class extends Un{constructor(e,t){super(e,t)}getFields(e,t){var s=this;new Os(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},datasource:e.datasource,dataset:e.dataset}).processAsync()}getFieldStatisticsInfo(e,t){var s=this,r=e.fieldName,i=e.statisticMode;i&&!nn.isArray(i)&&(i=[i]),s.currentStatisticResult={fieldName:r},s._statisticsCallback=t,i.forEach(t=>{s.currentStatisticResult[t]=null,s._fieldStatisticRequest(e.datasource,e.dataset,r,t)})}_fieldStatisticRequest(e,t,s,r){var i=this;new Kt(i.url,{eventListeners:{scope:i,processCompleted:i._processCompleted,processFailed:i._statisticsCallback},datasource:e,dataset:t,field:s,statisticMode:r,crossOrigin:i.options.crossOrigin,headers:i.options.headers}).processAsync()}_processCompleted(e){var t=this,s=!0,r=e.result;for(var i in this.currentStatisticResult&&null==t.currentStatisticResult[r.mode]&&(this.currentStatisticResult[r.mode]=r.result),t.currentStatisticResult)if(null==t.currentStatisticResult[i]){s=!1;break}s&&t._statisticsCallback({result:t.currentStatisticResult})}};rn().supermap.GridCellInfosService=
  1617. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1618. * This program are made available under the terms of the Apache License, Version 2.0
  1619. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1620. class extends Un{constructor(e,t){super(e,t)}getGridCellInfos(e,t){if(!e)return null;var s=this;new Ms(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}}).processAsync(e)}};rn().supermap.GeoprocessingService=class extends Un{constructor(e,t){super(e,t),this.headers={},this.crossOrigin=!0,this.withCredentials=!0,this.proxy=!0}getTools(e){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:e,processFailed:e}}).getTools()}getTool(e,t){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getTool(e)}execute(e,t,s,r){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).execute(e,t,s)}submitJob(e,t,s,r){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).submitJob(e,t,s)}waitForJobCompletion(e,t,s,r){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).waitForJobCompletion(e,t,s)}getJobInfo(e,t,s){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).getJobInfo(e,t)}cancelJob(e,t,s){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).cancelJob(e,t)}getJobs(e,t){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getJobs(e)}getResults(e,t,s,r){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).getResults(e,t,s)}};rn().supermap.LayerInfoService=
  1621. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1622. * This program are made available under the terms of the Apache License, Version 2.0
  1623. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1624. class extends Un{constructor(e,t){super(e,t)}getLayersInfo(e){var t=this;new lr(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 s=this,r=e.resourceID,i=e.tempLayerName,a=e.layerInfo;if(r&&i){var n=V.urlPathAppend(s.url,"tempLayersSet/"+r+"/"+i);new Ur(n,{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}}).processAsync(a)}}}setLayersInfo(e,t){if(e){var s=this,r=e.resourceID,i=!!e.isTempLayers&&e.isTempLayers,a=e.layersInfo;i&&!r||!a||new Hr(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},resourceID:r,isTempLayers:i}).processAsync(a)}}setLayerStatus(e,t){if(e){var s=this;new Jr(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}}).processAsync(e)}}};rn().supermap.MapService=
  1625. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1626. * This program are made available under the terms of the Apache License, Version 2.0
  1627. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1628. class extends Un{constructor(e,t){super(e,t)}getMapInfo(e){var t=this;new vr(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 di(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()}};rn().supermap.MeasureService=
  1629. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1630. * This program are made available under the terms of the Apache License, Version 2.0
  1631. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1632. class extends Un{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,s){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,measureMode:t,eventListeners:{scope:r,processCompleted:s,processFailed:s}}).processAsync(r._processParam(e))}_processParam(e){return!e||e.geometry instanceof X||(e.geometry=nn.toSuperMapGeometry(e.geometry)),e}};rn().supermap.NetworkAnalystService=
  1633. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1634. * This program are made available under the terms of the Apache License, Version 2.0
  1635. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1636. class extends Un{constructor(e,t){super(e,t)}burstPipelineAnalyst(e,t){var s=this;new dt(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}}).processAsync(s._processParams(e))}computeWeightMatrix(e,t){var s=this;new _t(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}}).processAsync(s._processParams(e))}findClosestFacilities(e,t,s){var r=this;new $t(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}streamFacilityAnalyst(e,t,s){var r=this;new Jt(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}findLocation(e,t,s){var r=this;new ts(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}findPath(e,t,s){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},format:r._processFormat(s)}).processAsync(r._processParams(e))}findTSPPaths(e,t,s){var r=this;new hs(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}findMTSPPaths(e,t,s){var r=this;new rs(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}findServiceAreas(e,t,s){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},format:r._processFormat(s)}).processAsync(r._processParams(e))}updateEdgeWeight(e,t){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}}).processAsync(e)}updateTurnNodeWeight(e,t){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}}).processAsync(e)}_processParams(e){if(!e)return{};var t=this;if(e.centers&&nn.isArray(e.centers)&&e.centers.map(function(s,r){return e.centers[r]=t._toPointObject(s),e.centers[r]}),e.nodes&&nn.isArray(e.nodes)&&e.nodes.map(function(s,r){return e.nodes[r]=t._toPointObject(s),e.nodes[r]}),e.event&&(e.event=t._toPointObject(e.event)),e.facilities&&nn.isArray(e.facilities)&&e.facilities.map(function(s,r){return e.facilities[r]=t._toPointObject(s),e.facilities[r]}),e.parameter&&e.parameter.barrierPoints){var s=e.parameter.barrierPoints;nn.isArray(s)?s.map(function(s,r){return e.parameter[r]=t._toPointObject(s),e.parameter.barrierPoints[r]}):e.parameter.barrierPoints=[s instanceof rn().LngLat?{x:s.lng,y:s.lat}:s]}return e}_toPointObject(e){return nn.isArray(e)?{x:e[0],y:e[1]}:e instanceof rn().LngLat?{x:e.lng,y:e.lat}:e instanceof rn().Point?{x:e.x,y:e.y}:e}_processFormat(e){return e||t.GEOJSON}};rn().supermap.NetworkAnalyst3DService=
  1637. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1638. * This program are made available under the terms of the Apache License, Version 2.0
  1639. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1640. class extends Un{constructor(e,t){super(e,t)}sinksFacilityAnalyst(e,t){var s=this;new Gt(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}}).processAsync(e)}sourcesFacilityAnalyst(e,t){var s=this;new Ht(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}}).processAsync(e)}traceUpFacilityAnalyst(e,t){var s=this;new qt(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}}).processAsync(e)}traceDownFacilityAnalyst(e,t){var s=this;new Wt(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}}).processAsync(e)}upstreamFacilityAnalyst(e,t){var s=this;new Xt(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}}).processAsync(e)}};rn().supermap.ProcessingService=
  1641. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1642. * This program are made available under the terms of the Apache License, Version 2.0
  1643. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1644. class extends Un{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 s=this,r=s._processFormat(t);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:e,processFailed:e},format:r}).getKernelDensityJobs()}getKernelDensityJob(e,t,s){var r=this,i=r._processFormat(s);new fr(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},format:i}).getKernelDensityJob(e)}addKernelDensityJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new fr(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,s)}getKernelDensityJobState(e){return this.kernelDensityJobs[e]}getSummaryMeshJobs(e,t){var s=this,r=s._processFormat(t);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:e,processFailed:e},format:r}).getSummaryMeshJobs()}getSummaryMeshJob(e,t,s){var r=this,i=r._processFormat(s);new Kr(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},format:i}).getSummaryMeshJob(e)}addSummaryMeshJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Kr(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,s)}getSummaryMeshJobState(e){return this.summaryMeshJobs[e]}getQueryJobs(e,t){var s=this,r=s._processFormat(t);new Wr(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:e,processFailed:e},format:r}).getQueryJobs()}getQueryJob(e,t,s){var r=this,i=r._processFormat(s);new Wr(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},format:i}).getQueryJob(e)}addQueryJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Wr(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,s)}getQueryJobState(e){return this.queryJobs[e]}getSummaryRegionJobs(e,t){var s=this,r=s._processFormat(t);new $r(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:e,processFailed:e},format:r}).getSummaryRegionJobs()}getSummaryRegionJob(e,t,s){var r=this,i=r._processFormat(s);new $r(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},format:i}).getSummaryRegionJob(e)}addSummaryRegionJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new $r(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,s)}getSummaryRegionJobState(e){return this.summaryRegionJobs[e]}getVectorClipJobs(e,t){var s=this,r=s._processFormat(t);new Ai(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:e,processFailed:e},format:r}).getVectorClipJobs()}getVectorClipJob(e,t,s){var r=this,i=r._processFormat(s);new Ai(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:t,processFailed:t},format:i}).getVectorClipJob(e)}addVectorClipJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Ai(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,s)}getVectorClipJobState(e){return this.vectorClipJobs[e]}getOverlayGeoJobs(e,t){var s=this,r=s._processFormat(t);new Er(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:e,processFailed:e},format:r}).getOverlayGeoJobs()}getOverlayGeoJob(e,t,s){var r=this,i=r._processFormat(s);new Er(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:t,processFailed:t},format:i}).getOverlayGeoJob(e)}addOverlayGeoJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Er(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,s)}getoverlayGeoJobState(e){return this.overlayGeoJobs[e]}getBuffersJobs(e,t){var s=this,r=s._processFormat(t);new ut(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:e,processFailed:e},format:r}).getBuffersJobs()}getBuffersJob(e,t,s){var r=this,i=r._processFormat(s);new ut(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:t,processFailed:t},format:i}).getBuffersJob(e)}addBuffersJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new ut(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,s)}getBuffersJobState(e){return this.buffersJobs[e]}getTopologyValidatorJobs(e,t){var s=this,r=s._processFormat(t);new yi(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:e,processFailed:e},format:r}).getTopologyValidatorJobs()}getTopologyValidatorJob(e,t,s){var r=this,i=r._processFormat(s);new yi(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:t,processFailed:t},format:i}).getTopologyValidatorJob(e)}addTopologyValidatorJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new yi(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,s)}getTopologyValidatorJobState(e){return this.topologyValidatorJobs[e]}getSummaryAttributesJobs(e,t){var s=this,r=s._processFormat(t);new Xr(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:e,processFailed:e},format:r}).getSummaryAttributesJobs()}getSummaryAttributesJob(e,t,s){var r=this,i=r._processFormat(s);new Xr(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:t,processFailed:t},format:i}).getSummaryAttributesJob(e)}addSummaryAttributesJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Xr(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,s)}getSummaryAttributesJobState(e){return this.summaryAttributesJobs[e]}_processFormat(e){return e||t.GEOJSON}_processParams(e){return e?(e.bounds&&(e.bounds=nn.toSuperMapBounds(e.bounds)),e.query&&(e.query=nn.toSuperMapBounds(e.query)),e.geometryQuery&&(e.geometryQuery=nn.toProcessingParam(e.geometryQuery)),e.geometryClip&&(e.geometryClip=nn.toProcessingParam(e.geometryClip)),e):{}}};rn().supermap.QueryService=
  1645. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1646. * This program are made available under the terms of the Apache License, Version 2.0
  1647. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1648. class extends Un{constructor(e,t){super(e,t)}queryByBounds(e,t,s){var r=this;new Lr(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryByDistance(e,t,s){var r=this;new Or(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryBySQL(e,t,s){var r=this;new Fr(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryByGeometry(e,t,s){var r=this;new Mr(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.queryParams&&!nn.isArray(e.queryParams)&&(e.queryParams=[e.queryParams]),e.bounds&&(e.bounds instanceof Array&&(e.bounds=new Y(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3])),e.bounds instanceof rn().LngLatBounds&&(e.bounds=new Y(e.bounds.getSouthWest().lng,e.bounds.getSouthWest().lat,e.bounds.getNorthEast().lng,e.bounds.getNorthEast().lat))),e.geometry&&(e.geometry instanceof rn().LngLat&&(e.geometry=new $(e.geometry.lng,e.geometry.lat)),e.geometry instanceof rn().Point&&(e.geometry=new $(e.geometry.x,e.geometry.y)),e.geometry instanceof rn().LngLatBounds&&(e.geometry=nn.toSuperMapPolygon(e.geometry)),e.geometry instanceof X||(e.geometry=nn.toSuperMapGeometry(e.geometry))),e):{}}_processFormat(e){return e||t.GEOJSON}};rn().supermap.SpatialAnalystService=
  1649. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1650. * This program are made available under the terms of the Apache License, Version 2.0
  1651. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1652. class extends Un{constructor(e,t){super(e,t)}getAreaSolarRadiationResult(e,t,s){var r=this;new Xe(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},format:r._processFormat(s)}).processAsync(e)}bufferAnalysis(e,t,s){var r=this;new at(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}densityAnalysis(e,t,s){var r=this;new Ft(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}generateSpatialData(e,t,s){var r=this;new cs(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},format:r._processFormat(s)}).processAsync(e)}geoRelationAnalysis(e,t,s){var r=this;new gs(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},format:r._processFormat(s)}).processAsync(e)}interpolationAnalysis(e,t,s){var r=this;new mr(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}mathExpressionAnalysis(e,t,s){var r=this;new br(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}overlayAnalysis(e,t,s){var r=this;new _r(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}routeCalculateMeasure(e,t,s){var r=this;new Dr(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}routeLocate(e,t,s){var r=this;new Br(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}surfaceAnalysis(e,t,s){var r=this;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:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}terrainCurvatureCalculate(e,t,s){var r=this;new ri(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},format:r._processFormat(s)}).processAsync(e)}thiessenAnalysis(e,t,s){var r=this;new ci(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}geometrybatchAnalysis(e,t,s){for(var r=this,i=new pi(r.url,{serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}),a=[],n=0;n<e.length;n++){var o=e[n];a.push({analystName:o.analystName,param:r._processParams(o.param)})}i.processAsync(a)}_processParams(e){if(!e)return{};if(e.bounds&&(e.bounds=nn.toSuperMapBounds(e.bounds)),e.inputPoints)for(var t=0;t<e.inputPoints.length;t++){var s=e.inputPoints[t];nn.isArray(s)&&(e.inputPoints[t]={x:s[0],y:s[1],tag:s[2]})}if(e.points)for(let t=0;t<e.points.length;t++){var r=e.points[t];e.points[t]=nn.toSuperMapPoint(r)}if(e.point&&(e.point=nn.toSuperMapPoint(e.point)),e.extractRegion&&(e.extractRegion=nn.toSuperMapGeometry(e.extractRegion)),e.extractParameter&&e.extractParameter.clipRegion&&(e.extractParameter.clipRegion=nn.toSuperMapGeometry(e.extractParameter.clipRegion)),e.clipParam&&e.clipParam.clipRegion&&(e.clipParam.clipRegion=nn.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&&nn.isArray(e.operateRegions)&&e.operateRegions.map(function(t,s){return e.operateRegions[s]=nn.toSuperMapGeometry(t),e.operateRegions[s]}),e.sourceGeometry){var n=null;e.sourceGeometrySRID&&(n=e.sourceGeometrySRID),e.sourceGeometry=nn.toSuperMapGeometry(e.sourceGeometry),n&&(e.sourceGeometry.SRID=n),delete e.sourceGeometry.sourceGeometrySRID}if(e.operateGeometry&&(e.operateGeometry=nn.toSuperMapGeometry(e.operateGeometry)),e.sourceGeometries){for(var o=[],l=0;l<e.sourceGeometries.length;l++)o.push(nn.toSuperMapGeometry(e.sourceGeometries[l]));e.sourceGeometries=o}if(e.operateGeometries){for(var h=[],u=0;u<e.operateGeometries.length;u++)h.push(nn.toSuperMapGeometry(e.operateGeometries[u]));e.operateGeometries=h}return e.sourceRoute&&e.sourceRoute.components&&nn.isArray(e.sourceRoute.components)&&e.sourceRoute.components.map(function(t,s){return e.sourceRoute.components[s]=nn.toSuperMapGeometry(t),e.sourceRoute.components[s]}),e}_processFormat(e){return e||t.GEOJSON}};rn().supermap.ThemeService=
  1653. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1654. * This program are made available under the terms of the Apache License, Version 2.0
  1655. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1656. class extends Un{constructor(e,t){super(e,t)}getThemeInfo(e,t){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}}).processAsync(e)}};rn().supermap.TrafficTransferAnalystService=
  1657. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1658. * This program are made available under the terms of the Apache License, Version 2.0
  1659. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1660. class extends Un{constructor(e,t){super(e,t)}queryStop(e,t){var s=this;new qr(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}}).processAsync(e)}analysisTransferPath(e,t){var s=this;new vi(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}}).processAsync(s._processParams(e))}analysisTransferSolution(e,t){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}}).processAsync(s._processParams(e))}_processParams(e){return e?(e.transferLines&&!nn.isArray(e.transferLines)&&(e.transferLines=[e.transferLines]),e.points&&nn.isArray(e.points)&&e.points.map(function(t,s){return e.points[s]=t instanceof rn().LngLat?{x:t.lng,y:t.lat}:t,e.points[s]}),e):{}}};rn().supermap.WebPrintingJobService=
  1661. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1662. * This program are made available under the terms of the Apache License, Version 2.0
  1663. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1664. class extends Un{constructor(e,t){super(e,t)}createWebPrintingJob(e,t){if(e){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}}).createWebPrintingJob(s._processParams(e))}}getPrintingJob(e,t){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}}).getPrintingJob(e)}getPrintingJobResult(e,t){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}}).getPrintingJobResult(e)}getLayoutTemplates(e){var t=this;new Bi(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}}).getLayoutTemplates()}_processParams(e){return e.layoutOptions&&e.layoutOptions.littleMapOptions&&(e.layoutOptions.littleMapOptions.center=this._toPointObject(e.layoutOptions.littleMapOptions.center)),e.exportOptions&&(e.exportOptions.center=this._toPointObject(e.exportOptions.center)),e}_toPointObject(t){return nn.isArray(t)?{x:t[0],y:t[1]}:t instanceof e.Geometry.Point||t instanceof rn().Point?{x:t.x,y:t.y}:t instanceof rn().LngLat?{x:t.lng,y:t.lat}:t}};const Hn=function(){try{return convert}catch(e){return{}}}();var jn=s.n(Hn);const Jn=function(){try{return canvg}catch(e){return{}}}();var zn=s.n(Jn);
  1665. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1666. * This program are made available under the terms of the Apache License, Version 2.0
  1667. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1668. rn().supermap=rn().supermap||{};const Wn=["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"],Vn=["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"],qn=["GoogleCRS84Quad","GoogleMapsCompatible"];rn().supermap.WebMap=class extends rn().Evented{constructor(e,t){super(),this.mapId=e,t=t||{},this.server=t.server||"https://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:s,maxBounds:r,minZoom:i,maxZoom:a,isWorldCopy:n,bearing:o,pitch:l}=e;t&&t.length&&this.map.setCenter(t),s&&this.map.setZoom(s),r&&this.map.setMaxBounds(r),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 s="getUrlResource.json?url=";if(this.excludePortalProxyUrl&&this.server.indexOf(s)>-1){let e=this.server.split(s);e.length>1&&(t=e[0]+s+this.server+"web/maps/"+this.mapId+"/map.json")}this._getMapInfo(t)}_createMap(e){let t=[],s=e.layers;s&&s.length>0&&s.forEach(e=>{e.labelStyle&&t.push(e.labelStyle.fontFamily)},this),t.push("'supermapol-icons'");let r,i=t.join(","),a=e.center,n=e.level||0,o=0;if(e.minScale&&e.maxScale)o=this._transformScaleToZoom(e.minScale,rn().CRS?rn().CRS.get(this.baseProjection):"EPSG:3857");else{const t=this._getResolution(rn().CRS?rn().CRS.get(this.baseProjection).getExtent():[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892])/this._getResolution(e.extent);o=+Math.log(t)/Math.LN2.toFixed(2)}n+=o,r=a?this._unproject([a.x,a.y]):new(rn().LngLat)(0,0),this.map=new(rn().Map)({container:this.target,center:r,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;Ae.get(t,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(e=>{if(this.baseProjection=e.projection,this.mapParams={title:e.title,description:e.description},!(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(qa.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,s=t.layerType;(s.indexOf("TIANDITU_VEC")>-1||s.indexOf("TIANDITU_IMG")>-1||s.indexOf("TIANDITU_TER")>-1)&&(s=s.substr(0,12));let r,i={CLOUD:"http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}",CLOUD_BLACK:"http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}",OSM:"http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",GOOGLE:"https://www.google.cn/maps/vt/pb=!1m4!1m3!1i{z}!2i{x}!3i{y}!2m3!1e0!2sm!3i380072576!3m8!2szh-CN!3scn!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0!5m1!1e0",GOOGLE_CN:"https://mt{0-3}.google.cn/vt/lyrs=m&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}",JAPAN_STD:"https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",JAPAN_PALE:"https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",JAPAN_RELIEF:"https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png",JAPAN_ORT:"https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg"};switch(s){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":r=i[s],this._createXYZLayer(t,r);break;case"MAPBOXSTYLE":this._createMapboxStyle(t)}}_createMapboxStyle(e){let t,s=this,{dataSource:r={}}=e,{serverId:i,url:a}=r;t=void 0!==i?`${this.server}web/datas/${i}/download`:a,Ae.get(t,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(e=>e.json()).then(e=>{s._matchStyleObject(e),s.map.setStyle(e)})}_matchStyleObject(e){let{sprite:t,glyphs:s}=e;t&&"object"==typeof t&&(e.sprite=Object.values(t)[0]),s&&"object"==typeof s&&(e.glyphs=Object.values(s)[0])}_createTiandituLayer(e){let t=this._getTiandituUrl(e),s=e.baseLayer.layerType,r=Boolean(e.baseLayer.labelLayerVisible),i=t.labelUrl,a=t.tiandituUrl;this._addBaselayer(a,"tianditu-layers-"+s),r&&this._addBaselayer(i,"tianditu-label-layers-"+s)}_createWMTSLayer(e){let t=this._getWMTSUrl(e);this._filterWMTSIsMatched(e,(s,r)=>{s&&this._addBaselayer([t],"wmts-layers"+e.name,0,r)})}_filterWMTSIsMatched(e,t){let s=!1,r=22,i=e.url;Ae.get(i,null,{withCredentials:!1,withoutFormatSuffix:!0}).then(e=>e.text()).then(i=>{let a=jn()?jn():window.convert,n=JSON.parse(a.xml2json(i,{compact:!0,spaces:4})).Capabilities.Contents.TileMatrixSet;Array.isArray(n)||(n=[n]);for(let t=0;t<n.length;t++)if(n[t]["ows:Identifier"]&&n[t]["ows:Identifier"]._text===e.tileMatrixSet)if(qn.indexOf(n[t].WellKnownScaleSet._text)>-1)s=!0;else{if(!n[t].WellKnownScaleSet||"Custom"!==n[t].WellKnownScaleSet._text)throw Error(qa.i18n("msg_tilematrixsetunsupport"));{let e=[],i="EPSG:3857"===this.map.crs?Wn:Vn;for(let s=0,r=i.length;s<r&&n[t].TileMatrix[s]&&i[s]===n[t].TileMatrix[s].ScaleDenominator._text;s++)e.push(i[s]);if(r=e.length-1,0===e.length)throw Error(qa.i18n("msg_tilematrixsetunsupport"));s=!0}}t(s,r)}).catch(e=>{this.fire("getwmtsfailed",{error:e,map:this.map})})}_createBingLayer(e){this.addLayer(["https://dynamic.t0.tiles.ditu.live.com/comp/ch/{quadkey}?it=G,TW,L,LA&mkt=zh-cn&og=109&cstl=w4c&ur=CN&n=z"],"bing-layers-"+e)}_createXYZLayer(e,t){let s=[];if("OSM"===e.layerType){let e=t.match(/\w\-\w/g)[0],r=e[0],i=e[2],a="";for(let e=97;e<123;e++)a+=String.fromCharCode(e);let n=a.split(""),o=n.indexOf(r),l=n.indexOf(i),h=n.slice(o,l+1);for(let e=0;e<h.length;e++){let r=t.replace(/{\w\-\w}/g,h[e]);s.push(r)}}else if("GOOGLE_CN"===e.layerType){let e=t.match(/\d\-\d/g)[0],r=e[0],i=e[2];for(let e=r;e<=i;e++){let r=t.replace(/{\d\-\d}/g,e);s.push(r)}}else s=[t];this._addBaselayer(s,"XYZ-layers-"+e.name)}_createDynamicTiledLayer(e){let t=e.url;const s=e.layerID||e.name,{minzoom:r,maxzoom:i}=e;this._addBaselayer([t],s,r,i,!0)}_createWMSLayer(e){let t=this._getWMSUrl(e);this._addBaselayer([t],"WMS-layers-"+e.name)}_createVectorLayer(e,t){let s=e.style,r=e.featureType,i=e.layerID,a=e.visible,n={};n.style=this._transformStyleToMapBoxGl(s,r),n.layout={visibility:a};let o={type:"geojson",data:{type:"FeatureCollection",features:t}};this._addOverlayToMap(r,o,i,n),"POLYGON"===r&&s.strokeColor&&this._addStrokeLineForPoly(s,o,i+"-strokeLine",a)}_getTiandituUrl(e){let t=/t0/gi,s={},r=e.baseLayer.layerType.split("_")[1].toLowerCase(),i=Boolean(e.baseLayer.labelLayerVisible),a="https://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:r,tilematrixSet:l,format:"tiles",width:256,height:256},u=(a+=this._getParamString(h,a)+"&tilematrix={z}&tilerow={y}&tilecol={x}").replace("{layer}",r).replace("{proj}",l),c=[];for(let e=0;e<8;e++)c.push(u.replace(t,`t${e}`));if(s.tiandituUrl=c,i){let e=o[r];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}`));s.labelUrl=i}return s}_getWMSUrl(e){let t=e.url,s=(t=t.split("?")[0]).split("/"),r={service:"WMS",request:"GetMap",layers:s[s.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(r,t)+`&bbox=${i}`}_addLayers(e){this.layers=e;let t,s=0,r=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&&Ae.get(n,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(a=>{if(!1===a.succeed)return s++,this._sendMapToUser(s,r),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),s++,this._sendMapToUser(s,r))}).catch(e=>{s++,this._sendMapToUser(s,r),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),s++,this._sendMapToUser(s,r);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),s++,this._sendMapToUser(s,r)},e=>{s++,this._sendMapToUser(s,r),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 s=o[e];0===s.indexOf("Sm")&&"SmID"!==s||t.push(s)}this._getFeatures(t,e,t=>{this._addLayer(e,t,i),s++,this._sendMapToUser(s,r)},e=>{s++,this.fire("getfeaturesfailed",{error:e,map:this.map})})}},e=>{this.fire("getlayersfailed",{error:e,map:this.map})})},this)}_getFeatures(e,t,s,r){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,r=this._parseGeoJsonData2Feature({allDatas:{features:t},fileCode:a,featureProjection:this.baseProjection},"JSON");s(r)},e=>{r(e)})}_addLayer(e,t,s){let r=e.layerType;e.layerID=r+"-"+e.name+"-"+s,e.visible=e.visible?"visible":"none",t[0]&&"Polygon"===t[0].geometry.type&&(t=this._handleMultyPolygon(t)),e.style&&e.filterCondition&&"RANGE"!==r&&"UNIQUE"!==r&&(t=this._getFiterFeatures(e.filterCondition,t)),"VECTOR"===r?"POINT"===e.featureType?"SYMBOL_POINT"===e.style.type?this._createSymbolLayer(e,t):this._createGraphicLayer(e,t):this._createVectorLayer(e,t):"UNIQUE"===r?this._createUniqueLayer(e,t):"RANGE"===r?this._createRangeLayer(e,t):"HEAT"===r?this._createHeatLayer(e,t):"MARKER"===r&&this._createMarkerLayer(e,t),e.labelStyle&&e.labelStyle.labelField&&this._addLabelLayer(e,t)}_addLabelLayer(e,t){let s=e.labelStyle;this.map.addLayer({id:e.layerID+"label",type:"symbol",source:{type:"geojson",data:{type:"FeatureCollection",features:t}},paint:{"text-color":s.fill},layout:{"text-field":`{${s.labelField}}`,"text-size":parseFloat(s.fontSize)||12,"text-offset":s.offsetX?[s.offsetX/10||0,s.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 s=e.style,r=e.style.unicode,i=String.fromCharCode(parseInt(r.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":s.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 s=e.style,r={},i=e.layerID,a={type:"geojson",data:{type:"FeatureCollection",features:t}};if("IMAGE_POINT"===s.type){let t=s.imageInfo,r=t.img;r&&r.src||(t.url=this.server+t.url),this.map.loadImage(t.url||r.src,(t,r)=>{t&&console.log(t);let n=2*Number.parseFloat((s.radius/r.height).toFixed(2));this.map.addImage("imageIcon",r),this.map.addLayer({id:i,type:"symbol",source:a,layout:{"icon-image":"imageIcon","icon-size":n,visibility:e.visible}})})}else if("SVG_POINT"===s.type){let t=s.url;this.svgDiv||(this.svgDiv=document.createElement("div"),document.body.appendChild(this.svgDiv)),this._getCanvasFromSVG(t,this.svgDiv,t=>{let r=t.toDataURL("img/png");r&&this.map.loadImage(r,(r,n)=>{r&&console.log(r);let o=Number.parseFloat((s.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 r.style=this._transformStyleToMapBoxGl(s,e.featureType),r.layout={visibility:e.visible},this._addOverlayToMap("POINT",a,i,r)}_createUniqueLayer(e,t){let s=this._getUniqueStyleGroup(e,t);t=this._getFiterFeatures(e.filterCondition,t);let r=e.style,i={},a=e.themeSetting.themeField,n=e.featureType,o=["match",["get","index"]],l=e.layerID;t.forEach(e=>{s.forEach(t=>{t.value===e.properties[a]&&o.push(e.properties.index,t.color)})}),o.push("#ffffff"),i.style=this._transformStyleToMapBoxGl(r,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&&r.strokeColor&&this._addStrokeLineForPoly(r,u,l+"-strokeLine",h)}_getUniqueStyleGroup(e,t){let s=e.featureType,r=e.style,i=e.themeSetting,a=i.themeField,n=i.colors,o=[],l=i.customSettings;for(let e in t){let s=t[e].properties[a],r=!1;for(let e in o)if(o[e]===s){r=!0;break}r||o.push(s)}let h=n||this.defaultParameters.colors;h=Vi.getGradientColors(h,o.length);let u=[];return o.forEach((e,t)=>{let i=h[t];e in l&&(i=l[e]),"LINE"===s?r.strokeColor=i:r.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"},s=e.url;return s+=this._getParamString(t,s)+"&tilematrix={z}&tilerow={y}&tilecol={x}"}_createMarkerLayer(e,t){t&&t.forEach(t=>{let s=t.geometry.type.toUpperCase(),r=t.dv_v5_markerStyle;"POINT"===s&&r.text&&(s="TEXT");let i=this.setFeatureInfo(t);t.properties.useStyle=r,t.properties.featureInfo=i,"POINT"===s&&r.src&&-1===r.src.indexOf("http://")&&-1===r.src.indexOf("https://")&&(r.src=this.server+r.src);let a={type:"geojson",data:t},n=t.properties.index,o=s+"-"+n;if("POINT"===s&&r.src&&r.src.indexOf("svg")<=-1&&this.map.loadImage(r.src,(t,s)=>{t&&console.log(t),this.map.addImage(n+"",s),this.map.addLayer({id:o,type:"symbol",source:a,layout:{"icon-image":n+"","icon-size":r.scale,visibility:e.visible}})},this),"POINT"===s&&r.src&&r.src.indexOf("svg")>-1&&(this.svgDiv||(this.svgDiv=document.createElement("div"),document.body.appendChild(this.svgDiv)),this._getCanvasFromSVG(r.src,this.svgDiv,t=>{let s=t.toDataURL("img/png");s&&this.map.loadImage(s,(t,s)=>{t&&console.log(t),this.map.addImage(n+"",s),this.map.addLayer({id:o,type:"symbol",source:a,layout:{"icon-image":n+"","icon-size":r.scale,visibility:e.visible}})},this)})),!r.src){let t={layout:{}};"LINESTRING"===s&&r.lineCap&&(s="LINE",t.layout={"line-cap":r.lineCap});let i=e.visible;t.layout.visibility=i,t.style=this._transformStyleToMapBoxGl(r,s),this._addOverlayToMap(s,a,o,t),"POLYGON"===s&&r.strokeColor&&this._addStrokeLineForPoly(r,a,o+"-strokeLine",i)}},this)}setFeatureInfo(e){let t,s=e.dv_v5_markerInfo;if(!s||!s.dataViz_title)return s;t=s;let r=e.properties;for(let e in t)r[e]&&(t[e]=r[e],delete r[e]);return t}_createHeatLayer(e,t){let s=e.themeSetting,r={};r.gradient=s.colors.slice(),r.radius=parseInt(s.radius);let i=s.customSettings;for(let e in i)r.gradient[e]=i[e];s.weight&&this._changeWeight(t,s.weight);let a=["interpolate",["linear"],["heatmap-density"]],n=(1/r.gradient.length).toFixed(2);r.gradient.forEach((e,t)=>{a.push(t*n),0===t&&(e=nn.hexToRgba(e,0)),a.push(e)});let o={"heatmap-color":a,"heatmap-radius":s.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 s=qi.getMax(e),r=qi.getMin(e);o["heatmap-weight"]=["interpolate",["linear"],["get","weight"],r,0,s,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 s=this.fieldMaxValue[t];e.forEach(e=>{let r=e.properties[t];e.weight=r/s})}_getMaxValue(e,t){let s,r=[],i=t;this.fieldMaxValue[i]||(e.forEach(e=>{(s=e.properties)&&parseFloat(s[i])&&r.push(parseFloat(s[i]))}),this.fieldMaxValue[i]=qi.getArrayStatistic(r,"Maximum"))}_createRangeLayer(e,t){let s=e.themeSetting.themeField,r=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[s]);for(let s=0;s<a.length;s++)a[s].start<=t&&t<a[s].end&&o.push(e.properties.index,a[s].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&&r.lineCap&&(l.layout={"line-cap":r.lineCap});let h=e.visible;l.layout.visibility=h,l.style=this._transformStyleToMapBoxGl(r,i,o);let u=e.layerID;this._addOverlayToMap(i,n,u,l),"POLYGON"===i&&r.strokeColor&&this._addStrokeLineForPoly(r,n,u+"-strokeline",h)}_getFiterFeatures(e,t){if(!e)return t;let s="select * from json where ("+this._replaceFilterCharacter(e)+")",r=[];for(let e=0;e<t.length;e++){let i=t[e],a=!1;try{a=window.jsonsql.query(s,{properties:i.properties})}catch(e){continue}a&&a.length>0&&r.push(i)}return r}_replaceFilterCharacter(e){return e=e.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=")}_getRangeStyleGroup(e,t){let s,r=e.featureType,i=e.style,a=[],n=e.themeSetting,o=n.customSettings,l=n.themeField,h=n.segmentCount;t.forEach(e=>{(s=e.properties||e.get("Properties"))?s[l]&&nn.isNumber(s[l])&&a.push(parseFloat(s[l])):e.get(l)&&nn.isNumber(e.get(l))&&e.get(l)&&a.push(parseFloat(e.get(l)))},this);let u=qi.getArraySegments(a,n.segmentMethod,h);if(u){let e=h;s&&u[0]===u[s.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 s=0;s<e;s++){let e=t[s];s in o&&o[s].color&&(e=o[s].color),"LINE"===r?i.strokeColor=e:i.fillColor=e;let n=u[s],l=u[s+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,s=-1,r=-1;for(let e=0,i=t.length;e<i;e++)this._isXField(t[e])&&(s=e),this._isYField(t[e])&&(r=e);let i=[];for(let t=0,a=e.rows.length;t<a;t++){let a=e.rows[t],n=Number(a[s]),o=Number(a[r]),l={};for(let s in e.colTitles)l[e.colTitles[s]]=e.rows[t][s];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,s=180/Math.PI,r=6378137,i=Math.exp(-e[1]/r),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(rn().LngLat)(e[0]*s/r,a*s)}_getParamString(e,t,s){var r=[];for(var i in e)r.push((s?i.toUpperCase():i)+"="+e[i]);return(t&&-1!==t.indexOf("?")?"&":"?")+r.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,s){let r={};"POINT"!==e.type&&"BASIC_POINT"!==e.type&&"POINT"!==t||"LINE"===t?"LINE"===t?r={strokeWidth:"line-width",strokeColor:"line-color",strokeOpacity:"line-opacity"}:"POLYGON"===t&&(r={fillColor:"fill-color",fillOpacity:"fill-opacity",strokeColor:"fill-outline-color"}):r={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)r[t]&&(i[r[t]]=e[t]);return s&&(i["circle-color"]?i["circle-color"]=s:i["line-color"]?i["line-color"]=s:i["fill-color"]=s),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?V.isArray(t)?t:(t=J.trim(t).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(","):[]}}_getCanvasFromSVG(e,t,s){let r=document.createElement("canvas");r.id="dataviz-canvas-"+nn.newGuid(8),r.style.display="none",t.appendChild(r),(window.canvg?window.canvg:zn())(r.id,e,{ignoreMouse:!0,ignoreAnimation:!0,renderCallback:()=>{r.width>300||r.height>300||s(r)},forceRedraw:()=>!1})}_addOverlayToMap(e,t,s,r){"circle"!==(e={POINT:"circle",LINE:"line",POLYGON:"fill"}[e])&&"line"!==e&&"fill"!==e||this.map.addLayer({id:s,type:e,source:t,paint:r.style,layout:r.layout||{}})}_addBaselayer(e,t,s=0,r=22,i){this.map.addLayer({id:t,type:"raster",source:{type:"raster",tiles:e,tileSize:256,rasterSource:i?"iserver":"",prjCoordSys:i?{epsgCode:this.baseProjection.split(":")[1]}:""},minzoom:s,maxzoom:r})}_addStrokeLineForPoly(e,t,s,r){let i={};i.style=this._transformStyleToMapBoxGl(e,"LINE"),i.layout={visibility:r},this._addOverlayToMap("LINE",t,s,i)}_parseGeoJsonData2Feature(e){let t=e.allDatas.features,s=[];for(let e=0,r=t.length;e<r;e++){let r=t[e],i=r.geometry.coordinates;"Point"===t[e].geometry.type&&t[e].properties&&(t[e].properties.lon=i[0],t[e].properties.lat=i[1]),s.properties.index=e+"",s.push(r)}return s}_getFeatureBySQL(e,t,s,r){let i,a,n;i=new st({name:t.join().replace(":","@"),attributeFilter:"SMID > 0"}),n=new Ls({queryParameter:i,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(a=new Ps(e,{eventListeners:{processCompleted:e=>{s&&s(e)},processFailed:e=>{r&&r(e)}}})).processAsync(n)}_queryFeatureBySQL(e,t,s,r,i,n,o,l,h,u){var c,p;c=new st({name:t,attributeFilter:s}),r&&(c.fields=r);var d={queryParams:[c]};u&&(d.queryOption=a.ATTRIBUTE),l&&(d.startRecord=l),h&&(d.expectCount=h),i&&(d.prjCoordSys={epsgCode:i}),p=new Ir(d),new(rn().supermap.QueryService)(e).queryBySQL(p,e=>{"processCompleted"===e.type?n(e):o(e)})}_handleMultyPolygon(e){return e.forEach(e=>{if("Polygon"!==e.geometry.type)return;let t=e.geometry.coordinates;if(t.length>1){let s=[];t.forEach(e=>{s.push([e])}),e.geometry.coordinates=s,e.geometry.type="MultiPolygon"}}),e}_transformScaleToZoom(e,t){let s=295829515.2024169;"EPSG:3857"!==(t||this.map.getCRS()).epsgCode&&(s=295295895);const r=e.split(":")[1];return Math.min(24,+Math.log2(s/+r).toFixed(2))}_getResolution(e,t=512){return e.leftBottom&&e.rightTop?Math.max(e.rightTop.x-e.leftBottom.x,e.rightTop.y-e.leftBottom.y)/t:Math.max(e[2]-e[0],e[3]-e[1])/t}}})(),(()=>{"use strict"})()})();