/*! * * iclient-ol * Copyright© 2000 - 2023 SuperMap Software Co.Ltd * license: Apache-2.0 * version: v11.1.1 * */!function(){var e={5023:function(e,t,r){"use strict";var n=r(6727);e.exports=n},3123:function(e,t,r){"use strict";var n=r(8690);e.exports=n},879:function(e,t,r){"use strict";r(7422);var n=r(97);e.exports=n.Object.assign},3723:function(e,t,r){"use strict";r(4835);var n=r(8384);e.exports=n.f("asyncIterator")},5980:function(e,t,r){"use strict";var n=r(729),o=r(8434),i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not a function")}},7563:function(e,t,r){"use strict";var n=r(691),o=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not an object")}},8632:function(e,t,r){"use strict";var n=r(6462),o=r(5333),i=r(6803),a=function(e){return function(t,r,a){var s,u=n(t),l=i(u),c=o(a,l);if(e&&r!=r){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2177:function(e,t,r){"use strict";var n=r(9738),o=n({}.toString),i=n("".slice);e.exports=function(e){return i(o(e),8,-1)}},9029:function(e,t,r){"use strict";var n=r(1675),o=r(9402),i=r(7238),a=r(704);e.exports=function(e,t,r){for(var s=o(t),u=a.f,l=i.f,c=0;c0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),e.exports=o},8525:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7926:function(e,t,r){"use strict";function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(5835),i=r(7238).f,a=r(8268),s=r(7454),u=r(161),l=r(9029),c=r(3175);e.exports=function(e,t){var r,f,p,h,y,d=e.target,b=e.global,v=e.stat;if(r=b?o:v?o[d]||u(d,{}):(o[d]||{}).prototype)for(f in t){if(h=t[f],p=e.dontCallGetSet?(y=i(r,f))&&y.value:r[f],!c(b?f:d+(v?".":"#")+f,e.forced)&&void 0!==p){if(n(h)==n(p))continue;l(h,p)}(e.sham||p&&p.sham)&&a(h,"sham",!0),s(r,f,h,e)}}},6583:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},9096:function(e,t,r){"use strict";var n=r(6583);e.exports=!n(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},5057:function(e,t,r){"use strict";var n=r(9096),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},1864:function(e,t,r){"use strict";var n=r(6539),o=r(1675),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),u=s&&"something"===function(){}.name,l=s&&(!n||n&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:l}},9738:function(e,t,r){"use strict";var n=r(9096),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);e.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}},8078:function(e,t,r){"use strict";var n=r(5835),o=r(729);e.exports=function(e,t){return arguments.length<2?(r=n[e],o(r)?r:void 0):n[e]&&n[e][t];var r}},2337:function(e,t,r){"use strict";var n=r(5980),o=r(6254);e.exports=function(e,t){var r=e[t];return o(r)?void 0:n(r)}},5835:function(e,t,r){"use strict";function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=function(e){return e&&e.Math==Math&&e};e.exports=o("object"==("undefined"==typeof globalThis?"undefined":n(globalThis))&&globalThis)||o("object"==("undefined"==typeof window?"undefined":n(window))&&window)||o("object"==("undefined"==typeof self?"undefined":n(self))&&self)||o("object"==(void 0===r.g?"undefined":n(r.g))&&r.g)||function(){return this}()||this||Function("return this")()},1675:function(e,t,r){"use strict";var n=r(9738),o=r(5825),i=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},940:function(e){"use strict";e.exports={}},2175:function(e,t,r){"use strict";var n=r(6539),o=r(6583),i=r(3343);e.exports=!n&&!o(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},5407:function(e,t,r){"use strict";var n=r(9738),o=r(6583),i=r(2177),a=Object,s=n("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"==i(e)?s(e,""):a(e)}:a},6111:function(e,t,r){"use strict";var n=r(9738),o=r(729),i=r(9700),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},4751:function(e,t,r){"use strict";var n,o,i,a=r(9801),s=r(5835),u=r(691),l=r(8268),c=r(1675),f=r(9700),p=r(7307),h=r(940),y=s.TypeError,d=s.WeakMap;if(a||f.state){var b=f.state||(f.state=new d);b.get=b.get,b.has=b.has,b.set=b.set,n=function(e,t){if(b.has(e))throw y("Object already initialized");return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},i=function(e){return b.has(e)}}else{var v=p("state");h[v]=!0,n=function(e,t){if(c(e,v))throw y("Object already initialized");return t.facade=e,l(e,v,t),t},o=function(e){return c(e,v)?e[v]:{}},i=function(e){return c(e,v)}}e.exports={set:n,get:o,has:i,enforce:function(e){return i(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=o(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return r}}}},729:function(e,t,r){"use strict";var n=r(9967),o=n.all;e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===o}:function(e){return"function"==typeof e}},3175:function(e,t,r){"use strict";var n=r(6583),o=r(729),i=/#|\.prototype\./,a=function(e,t){var r=u[s(e)];return r==c||r!=l&&(o(t)?n(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=a.data={},l=a.NATIVE="N",c=a.POLYFILL="P";e.exports=a},6254:function(e){"use strict";e.exports=function(e){return null===e||void 0===e}},691:function(e,t,r){"use strict";function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(729),i=r(9967),a=i.all;e.exports=i.IS_HTMLDDA?function(e){return"object"==n(e)?null!==e:o(e)||e===a}:function(e){return"object"==n(e)?null!==e:o(e)}},1437:function(e){"use strict";e.exports=!1},4192:function(e,t,r){"use strict";function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(8078),i=r(729),a=r(5522),s=r(7860),u=Object;e.exports=s?function(e){return"symbol"==n(e)}:function(e){var t=o("Symbol");return i(t)&&a(t.prototype,u(e))}},6803:function(e,t,r){"use strict";var n=r(5108);e.exports=function(e){return n(e.length)}},7948:function(e,t,r){"use strict";var n=r(9738),o=r(6583),i=r(729),a=r(1675),s=r(6539),u=r(1864).CONFIGURABLE,l=r(6111),c=r(4751),f=c.enforce,p=c.get,h=String,y=Object.defineProperty,d=n("".slice),b=n("".replace),v=n([].join),m=s&&!o(function(){return 8!==y(function(){},"length",{value:8}).length}),g=String(String).split("String"),w=e.exports=function(e,t,r){"Symbol("===d(h(t),0,7)&&(t="["+b(h(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||u&&e.name!==t)&&(s?y(e,"name",{value:t,configurable:!0}):e.name=t),m&&r&&a(r,"arity")&&e.length!==r.arity&&y(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&y(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=f(e);return a(n,"source")||(n.source=v(g,"string"==typeof t?t:"")),e};Function.prototype.toString=w(function(){return i(this)&&p(this).source||l(this)},"toString")},4920:function(e){"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},7328:function(e,t,r){"use strict";var n=r(6539),o=r(9738),i=r(5057),a=r(6583),s=r(5403),u=r(7485),l=r(5339),c=r(5825),f=r(5407),p=Object.assign,h=Object.defineProperty,y=o([].concat);e.exports=!p||a(function(){if(n&&1!==p({b:1},p(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!=p({},e)[r]||"abcdefghijklmnopqrst"!=s(p({},t)).join("")})?function(e,t){for(var r=c(e),o=arguments.length,a=1,p=u.f,h=l.f;o>a;)for(var d,b=f(arguments[a++]),v=p?y(s(b),p(b)):s(b),m=v.length,g=0;m>g;)d=v[g++],n&&!i(h,b,d)||(r[d]=b[d]);return r}:p},704:function(e,t,r){"use strict";var n=r(6539),o=r(2175),i=r(4821),a=r(7563),s=r(9737),u=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.f=n?i?function(e,t,r){if(a(e),t=s(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=c(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return l(e,t,r)}:l:function(e,t,r){if(a(e),t=s(t),a(r),o)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},7238:function(e,t,r){"use strict";var n=r(6539),o=r(5057),i=r(5339),a=r(4925),s=r(6462),u=r(9737),l=r(1675),c=r(2175),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(e,t){if(e=s(e),t=u(t),c)try{return f(e,t)}catch(e){}if(l(e,t))return a(!o(i.f,e,t),e[t])}},5454:function(e,t,r){"use strict";var n=r(497),o=r(8525).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},7485:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},5522:function(e,t,r){"use strict";var n=r(9738);e.exports=n({}.isPrototypeOf)},497:function(e,t,r){"use strict";var n=r(9738),o=r(1675),i=r(6462),a=r(8632).indexOf,s=r(940),u=n([].push);e.exports=function(e,t){var r,n=i(e),l=0,c=[];for(r in n)!o(s,r)&&o(n,r)&&u(c,r);for(;t.length>l;)o(n,r=t[l++])&&(~a(c,r)||u(c,r));return c}},5403:function(e,t,r){"use strict";var n=r(497),o=r(8525);e.exports=Object.keys||function(e){return n(e,o)}},5339:function(e,t){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);t.f=o?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},2821:function(e,t,r){"use strict";var n=r(5057),o=r(729),i=r(691),a=TypeError;e.exports=function(e,t){var r,s;if("string"===t&&o(r=e.toString)&&!i(s=n(r,e)))return s;if(o(r=e.valueOf)&&!i(s=n(r,e)))return s;if("string"!==t&&o(r=e.toString)&&!i(s=n(r,e)))return s;throw a("Can't convert object to primitive value")}},9402:function(e,t,r){"use strict";var n=r(8078),o=r(9738),i=r(5454),a=r(7485),s=r(7563),u=o([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=i.f(s(e)),r=a.f;return r?u(t,r(e)):t}},97:function(e,t,r){"use strict";var n=r(5835);e.exports=n},1894:function(e,t,r){"use strict";var n=r(6254),o=TypeError;e.exports=function(e){if(n(e))throw o("Can't call method on "+e);return e}},7307:function(e,t,r){"use strict";var n=r(5464),o=r(6065),i=n("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},9700:function(e,t,r){"use strict";var n=r(5835),o=r(161),i=n["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},5464:function(e,t,r){"use strict";var n=r(1437),o=r(9700);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.32.0",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4993:function(e,t,r){"use strict";var n=r(9282),o=r(6583),i=r(5835).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol();return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},5333:function(e,t,r){"use strict";var n=r(1087),o=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?o(r+t,0):i(r,t)}},6462:function(e,t,r){"use strict";var n=r(5407),o=r(1894);e.exports=function(e){return n(o(e))}},1087:function(e,t,r){"use strict";var n=r(4920);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},5108:function(e,t,r){"use strict";var n=r(1087),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},5825:function(e,t,r){"use strict";var n=r(1894),o=Object;e.exports=function(e){return o(n(e))}},1044:function(e,t,r){"use strict";var n=r(5057),o=r(691),i=r(4192),a=r(2337),s=r(2821),u=r(3121),l=TypeError,c=u("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,u=a(e,c);if(u){if(void 0===t&&(t="default"),r=n(u,e,t),!o(r)||i(r))return r;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},9737:function(e,t,r){"use strict";var n=r(1044),o=r(4192);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},8434:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6065:function(e,t,r){"use strict";var n=r(9738),o=0,i=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},7860:function(e,t,r){"use strict";function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(4993);e.exports=o&&!Symbol.sham&&"symbol"==n(Symbol.iterator)},4821:function(e,t,r){"use strict";var n=r(6539),o=r(6583);e.exports=n&&o(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},9801:function(e,t,r){"use strict";var n=r(5835),o=r(729),i=n.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},5336:function(e,t,r){"use strict";var n=r(97),o=r(1675),i=r(8384),a=r(704).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},8384:function(e,t,r){"use strict";var n=r(3121);t.f=n},3121:function(e,t,r){"use strict";var n=r(5835),o=r(5464),i=r(1675),a=r(6065),s=r(4993),u=r(7860),l=n.Symbol,c=o("wks"),f=u?l.for||l:l&&l.withoutSetter||a;e.exports=function(e){return i(c,e)||(c[e]=s&&i(l,e)?l[e]:f("Symbol."+e)),c[e]}},7422:function(e,t,r){"use strict";var n=r(7926),o=r(7328);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},4835:function(e,t,r){"use strict";r(5336)("asyncIterator")},6727:function(e,t,r){"use strict";var n=r(879);e.exports=n},8690:function(e,t,r){"use strict";var n=r(3723);e.exports=n},5937:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){s.prototype.append=function(e,t){e=i(e),t=a(t);var r=this.map[e];r||(r=[],this.map[e]=r),r.push(t)},s.prototype.delete=function(e){delete this.map[i(e)]},s.prototype.get=function(e){var t=this.map[i(e)];return t?t[0]:null},s.prototype.getAll=function(e){return this.map[i(e)]||[]},s.prototype.has=function(e){return this.map.hasOwnProperty(i(e))},s.prototype.set=function(e,t){this.map[i(e)]=[a(t)]},s.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){e.call(t,n,r,this)},this)},this)};var r={blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t},n=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this)},f.call(p.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var o=[301,302,303,307,308];y.redirect=function(e,t){if(-1===o.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},t.Headers=s,t.Request=p,t.Response=y,t.fetch=function(e,t){return new Promise(function(n,o){var i;i=p.prototype.isPrototypeOf(e)&&!t?e:new p(e,t);var a=new XMLHttpRequest;var u=!1;function l(){if(4===a.readyState){var e=1223===a.status?204:a.status;if(e<100||e>599){if(u)return;return u=!0,void o(new TypeError("Network request failed"))}var t={status:e,statusText:a.statusText,headers:function(e){var t=new s;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var r=e.trim().split(":"),n=r.shift().trim(),o=r.join(":").trim();t.append(n,o)}),t}(a),url:"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0},r="response"in a?a.response:a.responseText;u||(u=!0,n(new y(r,t)))}}a.onreadystatechange=l,a.onload=l,a.onerror=function(){u||(u=!0,o(new TypeError("Network request failed")))},a.open(i.method,i.url,!0);try{"include"===i.credentials&&("withCredentials"in a?a.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 a&&r.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function i(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 a(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){this.map={},e instanceof s?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function c(e){var t=new FileReader;return t.readAsArrayBuffer(e),l(t)}function f(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(r.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(r.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!r.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},r.blob?(this.blob=function(){var e=u(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(c)},this.text=function(){var e,t,r,n,o,i,a,s=u(this);if(s)return s;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,r=new FileReader,n=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",o=/charset\=[0-9a-zA-Z\-\_]*;?/,i=e.type.match(o)||n.match(o),a=[e],i&&a.push(i[0].replace(/^charset\=/,"").replace(/;$/,"")),r.readAsText.apply(r,a),l(r);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=u(this);return e||Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(e,t){var r,o,i=(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 s(e.headers)),this.method=e.method,this.mode=e.mode,i||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new s(t.headers)),this.method=(r=t.method||this.method||"GET",o=r.toUpperCase(),n.indexOf(o)>-1?o:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i,t)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function y(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 s?t.headers:new s(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},4238:function(e,t){var r,n,o;n=[t,e],void 0===(o="function"==typeof(r=function(e,t){"use strict";var r={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function n(e){try{delete window[e]}catch(t){window[e]=void 0}}function o(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],i=e,a=t.timeout||r.timeout,s=t.jsonpCallback||r.jsonpCallback,u=void 0;return new Promise(function(r,l){var c=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),f=s+"_"+c;window[c]=function(e){r({ok:!0,json:function(){return Promise.resolve(e)}}),u&&clearTimeout(u),o(f),n(c)},i+=-1===i.indexOf("?")?"?":"&";var p=document.createElement("script");p.setAttribute("src",""+i+s+"="+c),t.charset&&p.setAttribute("charset",t.charset),p.id=f,document.getElementsByTagName("head")[0].appendChild(p),u=setTimeout(function(){l(new Error("JSONP request to "+e+" timed out")),n(c),o(f),window[c]=function(){n(c)}},a),p.onerror=function(){l(new Error("JSONP request to "+e+" failed")),n(c),o(f),u&&clearTimeout(u)}})}})?r.apply(t,n):r)||(e.exports=o)},8813:function(e){var t=[],r=[],n="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function o(e,o){if(o=o||{},void 0===e)throw new Error(n);var i,a=!0===o.prepend?"prepend":"append",s=void 0!==o.container?o.container:document.querySelector("head"),u=t.indexOf(s);return-1===u&&(u=t.push(s)-1,r[u]={}),void 0!==r[u]&&void 0!==r[u][a]?i=r[u][a]:(i=r[u][a]=function(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}(),"prepend"===a?s.insertBefore(i,s.childNodes[0]):s.appendChild(i)),65279===e.charCodeAt(0)&&(e=e.substr(1,e.length)),i.styleSheet?i.styleSheet.cssText+=e:i.textContent+=e,i}e.exports=o,e.exports.insertCss=o},2138:function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e=r.nmd(e);var o=200,i="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",u="[object Boolean]",l="[object Date]",c="[object Function]",f="[object GeneratorFunction]",p="[object Map]",h="[object Number]",y="[object Object]",d="[object RegExp]",b="[object Set]",v="[object String]",m="[object Symbol]",g="[object ArrayBuffer]",w="[object DataView]",O="[object Float32Array]",S="[object Float64Array]",_="[object Int8Array]",P="[object Int16Array]",x="[object Int32Array]",k="[object Uint8Array]",j="[object Uint8ClampedArray]",E="[object Uint16Array]",T="[object Uint32Array]",C=/\w*$/,R=/^\[object .+?Constructor\]$/,A=/^(?:0|[1-9]\d*)$/,M={};M[s]=M["[object Array]"]=M[g]=M[w]=M[u]=M[l]=M[O]=M[S]=M[_]=M[P]=M[x]=M[p]=M[h]=M[y]=M[d]=M[b]=M[v]=M[m]=M[k]=M[j]=M[E]=M[T]=!0,M["[object Error]"]=M[c]=M["[object WeakMap]"]=!1;var L="object"==(void 0===r.g?"undefined":n(r.g))&&r.g&&r.g.Object===Object&&r.g,I="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,N=L||I||Function("return this")(),D="object"==n(t)&&t&&!t.nodeType&&t,F=D&&"object"==n(e)&&e&&!e.nodeType&&e,B=F&&F.exports===D;function G(e,t){return e.set(t[0],t[1]),e}function U(e,t){return e.add(t),e}function V(e,t,r,n){var o=-1,i=e?e.length:0;for(n&&i&&(r=e[++o]);++o-1},je.prototype.set=function(e,t){var r=this.__data__,n=Ae(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Ee.prototype.clear=function(){this.__data__={hash:new ke,map:new(ye||je),string:new ke}},Ee.prototype.delete=function(e){return De(this,e).delete(e)},Ee.prototype.get=function(e){return De(this,e).get(e)},Ee.prototype.has=function(e){return De(this,e).has(e)},Ee.prototype.set=function(e,t){return De(this,e).set(e,t),this},Te.prototype.clear=function(){this.__data__=new je},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var r=this.__data__;if(r instanceof je){var n=r.__data__;if(!ye||n.length-1&&e%1==0&&e-1&&e%1==0&&e<=a}(e.length)&&!Ye(e)}var We=fe||function(){return!1};function Ye(e){var t=Xe(e)?te.call(e):"";return t==c||t==f}function Xe(e){var t=n(e);return!!e&&("object"==t||"function"==t)}function Qe(e){return He(e)?Ce(e):function(e){if(!Ve(e))return pe(e);var t=[];for(var r in Object(e))ee.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}e.exports=function(e){return Me(e,!0,!0)}},4940:function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=200,i="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",u="[object Function]",l="[object GeneratorFunction]",c=/^\[object .+?Constructor\]$/,f="object"==(void 0===r.g?"undefined":n(r.g))&&r.g&&r.g.Object===Object&&r.g,p="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,h=f||p||Function("return this")();function y(e,t){return!!(e?e.length:0)&&function(e,t,r){if(t!=t)return function(e,t,r,n){var o=e.length,i=r+(n?1:-1);for(;n?i--:++i-1}function d(e,t,r){for(var n=-1,o=e?e.length:0;++n=o&&(s=m,u=!1,t=new B(t));e:for(;++a-1},D.prototype.set=function(e,t){var r=this.__data__,n=G(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},F.prototype.clear=function(){this.__data__={hash:new N,map:new(L||D),string:new N}},F.prototype.delete=function(e){return J(this,e).delete(e)},F.prototype.get=function(e){return J(this,e).get(e)},F.prototype.has=function(e){return J(this,e).has(e)},F.prototype.set=function(e,t){return J(this,e).set(e,t),this},B.prototype.add=B.prototype.push=function(e){return this.__data__.set(e,i),this},B.prototype.has=function(e){return this.__data__.has(e)};var H,W,Y=(H=function(e,t){return Z(e)?U(e,function e(t,r,n,o,i){var a=-1,s=t.length;for(n||(n=q),i||(i=[]);++a0&&n(u)?r>1?e(u,r-1,n,o,i):b(i,u):o||(i[i.length]=u)}return i}(t,1,Z,!0)):[]},W=M(void 0===W?H.length-1:W,0),function(){for(var e=arguments,t=-1,r=M(e.length-W,0),n=Array(r);++t-1&&e%1==0&&e<=a}(e.length)&&!K(e)}function Z(e){return function(e){return!!e&&"object"==n(e)}(e)&&Q(e)}function K(e){var t=$(e)?j.call(e):"";return t==u||t==l}function $(e){var t=n(e);return!!e&&("object"==t||"function"==t)}e.exports=Y},1944:function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e=r.nmd(e);var o=200,i="Expected a function",a="__lodash_hash_undefined__",s=1,u=2,l=1/0,c=9007199254740991,f="[object Arguments]",p="[object Array]",h="[object Boolean]",y="[object Date]",d="[object Error]",b="[object Function]",v="[object GeneratorFunction]",m="[object Map]",g="[object Number]",w="[object Object]",O="[object RegExp]",S="[object Set]",_="[object String]",P="[object Symbol]",x="[object ArrayBuffer]",k="[object DataView]",j=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/,T=/^\./,C=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R=/\\(\\)?/g,A=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,L={};L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L[f]=L[p]=L[x]=L[h]=L[k]=L[y]=L[d]=L[b]=L[m]=L[g]=L[w]=L[O]=L[S]=L[_]=L["[object WeakMap]"]=!1;var I="object"==(void 0===r.g?"undefined":n(r.g))&&r.g&&r.g.Object===Object&&r.g,N="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,D=I||N||Function("return this")(),F="object"==n(t)&&t&&!t.nodeType&&t,B=F&&"object"==n(e)&&e&&!e.nodeType&&e,G=B&&B.exports===F&&I.process,U=function(){try{return G&&G.binding("util")}catch(e){}}(),V=U&&U.isTypedArray;function J(e,t){for(var r=-1,n=e?e.length:0;++rl))return!1;var f=i.get(e);if(f&&i.get(t))return f==t;var p=-1,h=!0,y=o&s?new je:void 0;for(i.set(e,t),i.set(t,e);++p-1},xe.prototype.set=function(e,t){var r=this.__data__,n=Ce(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},ke.prototype.clear=function(){this.__data__={hash:new Pe,map:new(fe||xe),string:new Pe}},ke.prototype.delete=function(e){return Be(this,e).delete(e)},ke.prototype.get=function(e){return Be(this,e).get(e)},ke.prototype.has=function(e){return Be(this,e).has(e)},ke.prototype.set=function(e,t){return Be(this,e).set(e,t),this},je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,a),this},je.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.clear=function(){this.__data__=new xe},Ee.prototype.delete=function(e){return this.__data__.delete(e)},Ee.prototype.get=function(e){return this.__data__.get(e)},Ee.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.set=function(e,t){var r=this.__data__;if(r instanceof xe){var n=r.__data__;if(!fe||n.length-1&&e%1==0&&eo?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n-1&&e%1==0&&e<=c}function ot(e){var t=n(e);return!!e&&("object"==t||"function"==t)}function it(e){return!!e&&"object"==n(e)}function at(e){return"symbol"==n(e)||it(e)&&ne.call(e)==P}var st=V?function(e){return function(t){return e(t)}}(V):function(e){return it(e)&&nt(e.length)&&!!L[ne.call(e)]};function ut(e){return tt(e)?Te(e):Ne(e)}function lt(e){return e}e.exports=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],i=e.length;for(t=Ie(t);++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}(e.length)&&!Y(e)}function Y(e){var t=X(e)?x.call(e):"";return t==a||t==s}function X(e){var t=n(e);return!!e&&("object"==t||"function"==t)}var Q,Z=(Q=function(e){return W(e)?B(e):U(e)},function(e){var t,r,n,o=J(e);return o==u?(t=e,r=-1,n=Array(t.size),t.forEach(function(e,t){n[++r]=[t,e]}),n):o==l?function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}(e):d(e,Q(e))});e.exports=Z},9819:function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e=r.nmd(e);var o=200,i="Expected a function",a="__lodash_hash_undefined__",s=1,u=2,l=1/0,c=9007199254740991,f="[object Arguments]",p="[object Array]",h="[object Boolean]",y="[object Date]",d="[object Error]",b="[object Function]",v="[object GeneratorFunction]",m="[object Map]",g="[object Number]",w="[object Object]",O="[object RegExp]",S="[object Set]",_="[object String]",P="[object Symbol]",x="[object ArrayBuffer]",k="[object DataView]",j=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/,T=/^\./,C=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R=/\\(\\)?/g,A=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,L={};L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L[f]=L[p]=L[x]=L[h]=L[k]=L[y]=L[d]=L[b]=L[m]=L[g]=L[w]=L[O]=L[S]=L[_]=L["[object WeakMap]"]=!1;var I="object"==(void 0===r.g?"undefined":n(r.g))&&r.g&&r.g.Object===Object&&r.g,N="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,D=I||N||Function("return this")(),F="object"==n(t)&&t&&!t.nodeType&&t,B=F&&"object"==n(e)&&e&&!e.nodeType&&e,G=B&&B.exports===F&&I.process,U=function(){try{return G&&G.binding("util")}catch(e){}}(),V=U&&U.isTypedArray;function J(e,t){return!!(e?e.length:0)&&function(e,t,r){if(t!=t)return function(e,t,r,n){var o=e.length,i=r+(n?1:-1);for(;n?i--:++i-1}function z(e,t,r){for(var n=-1,o=e?e.length:0;++n-1},Te.prototype.set=function(e,t){var r=this.__data__,n=Le(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Ce.prototype.clear=function(){this.__data__={hash:new Ee,map:new(de||Te),string:new Ee}},Ce.prototype.delete=function(e){return ze(this,e).delete(e)},Ce.prototype.get=function(e){return ze(this,e).get(e)},Ce.prototype.has=function(e){return ze(this,e).has(e)},Ce.prototype.set=function(e,t){return ze(this,e).set(e,t),this},Re.prototype.add=Re.prototype.push=function(e){return this.__data__.set(e,a),this},Re.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new Te},Ae.prototype.delete=function(e){return this.__data__.delete(e)},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Te){var n=r.__data__;if(!de||n.lengthl))return!1;var f=i.get(e);if(f&&i.get(t))return f==t;var p=-1,h=!0,y=o&s?new Re:void 0;for(i.set(e,t),i.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=c}function st(e){var t=n(e);return!!e&&("object"==t||"function"==t)}function ut(e){return!!e&&"object"==n(e)}function lt(e){return"symbol"==n(e)||ut(e)&&se.call(e)==P}var ct=V?function(e){return function(t){return e(t)}}(V):function(e){return ut(e)&&at(e.length)&&!!L[se.call(e)]};function ft(e){return ot(e)?Me(e):Ge(e)}function pt(e){return e}e.exports=function(e,t){return e&&e.length?function(e,t,r){var n=-1,i=J,a=e.length,s=!0,u=[],l=u;if(r)s=!1,i=z;else if(a>=o){var c=t?null:Ve(e);if(c)return Q(c);s=!1,i=W,l=new Re}else l=t?[]:u;e:for(;++n0&&(r=parseFloat(e.toPrecision(t))),r},format:function(e,t,r,n){t=void 0!==t?t:0,r=void 0!==r?r:K.thousandsSeparator,n=void 0!==n?n:K.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var o=e.toString().split(".");1===o.length&&null==t&&(t=0);var i,a=o[0];if(r)for(var s=/(-?[0-9]+)([0-9]{3})/;s.test(a);)a=a.replace(s,"$1"+r+"$2");if(0==t)i=a;else{var u=o.length>1?o[1]:"0";null!=t&&(u+=new Array(t-u.length+1).join("0")),i=a+n+u}return i}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return K.limitSigDigs(this,e)});var $={bind:function(e,t){var r=Array.prototype.slice.apply(arguments,[2]);return function(){var n=r.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,n)}},bindAsEventListener:function(e,t){return function(r){return e.call(t,r||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},ee={filter:function(e,t,r){var n=[];if(Array.prototype.filter)n=e.filter(t,r);else{var o=e.length;if("function"!=typeof t)throw new TypeError;for(var i=0;i-1||ue.indexOf("trident")>-1&&ue.indexOf("rv")>-1?(ie="msie",oe=ue.match(/msie ([\d.]+)/)||ue.match(/rv:([\d.]+)/)):ue.indexOf("chrome")>-1?(ie="chrome",oe=ue.match(/chrome\/([\d.]+)/)):ue.indexOf("firefox")>-1?(ie="firefox",oe=ue.match(/firefox\/([\d.]+)/)):ue.indexOf("opera")>-1?(ie="opera",oe=ue.match(/version\/([\d.]+)/)):ue.indexOf("safari")>-1&&(ie="safari",oe=ue.match(/version\/([\d.]+)/)),ae=oe?oe[1]:"",ue.indexOf("ipad")>-1||ue.indexOf("ipod")>-1||ue.indexOf("iphone")>-1?se="apple":ue.indexOf("android")>-1&&(ae=(oe=ue.match(/version\/([\d.]+)/))?oe[1]:"",se="android"),{name:ie,version:ae,device:se}),pe=(le=!0,ce=fe,document.createElement("canvas").getContext?("firefox"===ce.name&&parseFloat(ce.version)<5&&(le=!1),"safari"===ce.name&&parseFloat(ce.version)<4&&(le=!1),"opera"===ce.name&&parseFloat(ce.version)<10&&(le=!1),"msie"===ce.name&&parseFloat(ce.version)<9&&(le=!1)):le=!1,le),he=function(){var e=navigator.userAgent.toLowerCase();return-1===e.indexOf("webkit")&&-1!==e.indexOf("gecko")}(),ye={assign:function(e){for(var t=0;t=0;r--)e[r]===t&&e.splice(r,1);return e},indexOf:function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},applyDefaults:function(e,t){e=e||{};var r="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!r&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!r&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},getParameterString:function(e){var t=[];for(var r in e){var n,o=e[r];if(null!=o&&"function"!=typeof o)n=Array.isArray(o)||"[object Object]"===o.toString()?encodeURIComponent(JSON.stringify(o)):encodeURIComponent(o),t.push(encodeURIComponent(r)+"="+n)}return t.join("&")},urlAppend:function(e,t){var r=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);r+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return r},urlPathAppend:function(e,t){var r=e;if(!t)return r;0===t.indexOf("/")&&(t=t.substring(1));var n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),r="".concat(n[0]).concat(t).concat(n.length>1?"?".concat(n[1]):"")},DEFAULT_PRECISION:14,toFloat:function(e,t){return null==t&&(t=ye.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},rad:function(e){return e*Math.PI/180},getParameters:function(e){e=null===e||void 0===e?window.location.href:e;var t="";if(Z.contains(e,"?")){var r=e.indexOf("?")+1,n=Z.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(r,n)}for(var o={},i=t.split(/[&;]/),a=0,s=i.length;a1?1/e:e},getResolutionFromScale:function(e,t){var r;e&&(null==t&&(t="degrees"),r=1/(ye.normalizeScale(e)*de[t]*96));return r},getScaleFromResolution:function(e,t){return null==t&&(t="degrees"),e*de[t]*96},getBrowser:function(){return fe},isSupportCanvas:pe,supportCanvas:function(){return ye.isSupportCanvas},isInTheSameDomain:function(e){if(!e)return!0;var t=e.indexOf("//"),r=document.location.toString(),n=r.indexOf("//");if(-1===t)return!0;var o,i=o=e.substring(0,t),a=r.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),u=a.substring(0,n),l=document.location.protocol;if(-1!==s||(u+=":"+("http:"===l.toLowerCase()?80:443)),l.toLowerCase()!==i.toLowerCase())return!1;var c=(i=e.substring(t+2)).indexOf(":");t=i.indexOf("/");var f,p=i.substring(0,t);return-1!==c?f=i.substring(0,c):(f=i.substring(0,t),p+=":"+("http:"===o.toLowerCase()?80:443)),f===document.domain&&p===u},calculateDpi:function(e,t,r,n,o){if(e&&t&&r){var i,a=e.getWidth(),s=e.getHeight(),u=t.w,l=t.h;if(o=o||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){var c=a/u,f=s/l;i=254/(c>f?c:f)/r/(2*Math.PI*o/360)/1e4}else{i=254/(a/u)/r/1e4}return i}},toJSON:function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var r="",n=0,o=t.length;n0?"{"+u.join(",")+"}":"{}"}return t.toString()}},getResolutionFromScaleDpi:function(e,t,r,n){return n=n||6378137,r=r||"",e>0&&t>0?(e=ye.normalizeScale(e),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4):-1},getScaleFromResolutionDpi:function(e,t,r,n){return n=n||6378137,r=r||"",e>0&&t>0?"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4:-1},transformResult:function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},copyAttributes:function(e,t){if(e=e||{},t)for(var r in t){var n=t[r];void 0!==n&&"CLASS_NAME"!==r&&"function"!=typeof n&&(e[r]=n)}return e},copyAttributesWithClip:function(e,t,r){if(e=e||{},t)for(var n in t){var o=!1;if(r&&r.length)for(var i=0,a=r.length;i=0&&i<=1&&o<=1&&i>=0?new re.Point(e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)):"No Intersection";else if(0==s&&0==u){var c=Math.max(e.y,t.y),f=Math.min(e.y,t.y),p=Math.max(e.x,t.x),h=Math.min(e.x,t.x);a=(r.y>=f&&r.y<=c||n.y>=f&&n.y<=c)&&r.x>=h&&r.x<=p||n.x>=h&&n.x<=p?"Coincident":"Parallel"}else a="Parallel";return a},getTextBounds:function(e,t,r){document.body.appendChild(r),r.style.width="auto",r.style.height="auto",e.fontSize&&(r.style.fontSize=e.fontSize),e.fontFamily&&(r.style.fontFamily=e.fontFamily),e.fontWeight&&(r.style.fontWeight=e.fontWeight),r.style.position="relative",r.style.visibility="hidden",r.style.display="inline-block",r.innerHTML=t;var n=r.clientWidth,o=r.clientHeight;return document.body.removeChild(r),{textWidth:n,textHeight:o}},convertPath:function(e,t){return t?e.replace(/\{([\w-\.]+)\}/g,function(e,r){var n;return n=t.hasOwnProperty(r)?function(e){if(void 0==e||null==e)return"";if(e instanceof Date)return e.toJSON();if(function(e){if("string"!=typeof e&&"object"!==ne(e))return!1;try{var t=e.toString();return"[object Object]"===t||"[object Array]"===t}catch(e){return!1}}(e))return JSON.stringify(e);return e.toString()}(t[r]):e,encodeURIComponent(n)}):e}},de={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};de.in=de.inches,de.degrees=de.dd,de.nmi=1852*de.m;var be=.0254000508001016;function ve(e,t){for(var r=0;re.right;)t.lon-=e.getWidth()}return t}},{key:"destroy",value:function(){this.lon=null,this.lat=null}}])&&ve(t.prototype,r),n&&ve(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ge(e,t){for(var r=0;rthis.right)&&(this.right=r.right),(null==this.top||r.top>this.top)&&(this.top=r.top))}}},{key:"containsLonLat",value:function(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var r=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!r){var o=n.getWidth(),i=(n.left+n.right)/2,a=Math.round((e.lon-i)/o);r=this.containsLonLat({lon:e.lon-a*o,lat:e.lat},{inclusive:t.inclusive})}return r}},{key:"containsPixel",value:function(e,t){return this.contains(e.x,e.y,t)}},{key:"contains",value:function(e,t,r){if(null==r&&(r=!0),null==e||null==t)return!1;var n=!1;return n=r?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&ethis.bottom&&t=r.bottom&&e.bottom<=r.top||r.bottom>=e.bottom&&r.bottom<=e.top,a=e.top>=r.bottom&&e.top<=r.top||r.top>e.bottom&&r.top=r.left&&e.left<=r.right||r.left>=e.left&&r.left<=e.right,u=e.right>=r.left&&e.right<=r.right||r.right>=e.left&&r.right<=e.right;n=(i||a)&&(s||u)}if(t.worldBounds&&!n){var l=t.worldBounds,c=l.getWidth(),f=!l.containsBounds(r),p=!l.containsBounds(e);f&&!p?(e=e.add(-c,0),n=r.intersectsBounds(e,{inclusive:t.inclusive})):p&&!f&&(r=r.add(-c,0),n=e.intersectsBounds(r,{inclusive:t.inclusive}))}return n}},{key:"containsBounds",value:function(e,t,r){null==t&&(t=!1),null==r&&(r=!0);var n=this.contains(e.left,e.bottom,r),o=this.contains(e.right,e.bottom,r),i=this.contains(e.left,e.top,r),a=this.contains(e.right,e.top,r);return t?n||o||i||a:n&&o&&i&&a}},{key:"determineQuadrant",value:function(e){var t="",r=this.getCenterLonLat();return t+=e.lat=e.right&&o.right>e.right;)o=o.add(-i,0);var a=o.left+r;ae.left&&o.right-n>e.right&&(o=o.add(-i,0))}return o}},{key:"toServerJSONObject",value:function(){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}}},{key:"destroy",value:function(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}}])&&ge(t.prototype,r),n&&ge(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Oe(e){"@babel/helpers - typeof";return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Se(e,t){for(var r=0;r-1)){if(null!=t&&t=0;--r)t=this.removeComponent(e[r])||t;return t}},{key:"removeComponent",value:function(e){return ye.removeItem(this.components,e),this.clearBounds(),!0}},{key:"getArea",value:function(){for(var e=0,t=0,r=this.components.length;t=1?1:v)<=-1?-1:v,c=180*Math.acos(v)/Math.PI,a=(c=o.x==r.x?t.x>r.x&&n.x>r.x||t.xp*t.x+h&&n.y>p*n.x+h||t.yr.y?n.xr.x&&(s=!1):o.xp*n.x+h&&(s=!1):o.x>r.x?n.y>r.y&&(s=!1):n.y=0?180*Math.atan(m)/Math.PI:Math.abs(180*Math.atan(m)/Math.PI)+90,w=Math.abs(t.y);r.y==w&&w==o.y&&r.x=0?m>=0?l+=u:l=180-(l-90)+u:l=m>0?l-180+u:90-l+u:O>=0?m>=0?l-=u:l=180-(l-90)-u:l=m>=0?l-180-u:90-l-u,l=l*Math.PI/180;var _=t.x+i*Math.cos(l),P=t.y+i*Math.sin(l);f.push(new He(_,P))}f.push(o)}return f}},{key:"createLineEPS",value:function(e){var t=[],r=e.length;if(r<2)return e;for(var n=0;n2;return t&&Xe(Ke(i.prototype),"removeComponent",this).apply(this,arguments),t}},{key:"getSortedSegments",value:function(){for(var e,t,r=this.components.length-1,n=new Array(r),o=0;o1&&(r=parseFloat(r)*l),n.labelAlign&&"cm"!==n.labelAlign)switch(n.labelAlign){case"lt":u.x+=t/2,u.y+=r/2;break;case"lm":u.x+=t/2;break;case"lb":u.x+=t/2,u.y-=r/2;break;case"ct":u.y+=r/2;break;case"cb":u.y-=r/2;break;case"rt":u.x-=t/2,u.y+=r/2;break;case"rm":u.x-=t/2;break;case"rb":u.x-=t/2,u.y-=r/2}return this.bsInfo.h=r,this.bsInfo.w=t,o=u.x-parseFloat(t)/2,i=u.y+parseFloat(r)/2,s=u.x+parseFloat(t)/2,a=u.y-parseFloat(r)/2,new we(o,i,s,a)}},{key:"getLabelPxBoundsByText",value:function(e,t){var r,n,o,i,a=this.getLabelPxSize(t),s=ye.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":s.x+=a.w/2,s.y+=a.h/2;break;case"lm":s.x+=a.w/2;break;case"lb":s.x+=a.w/2,s.y-=a.h/2;break;case"ct":s.y+=a.h/2;break;case"cb":s.y-=a.h/2;break;case"rt":s.x-=a.w/2,s.y+=a.h/2;break;case"rm":s.x-=a.w/2;break;case"rb":s.x-=a.w/2,s.y-=a.h/2}return this.bsInfo.h=a.h,this.bsInfo.w=a.w,r=s.x-a.w/2,n=s.y+a.h/2,i=t.fontStyle&&"italic"===t.fontStyle?s.x+a.w/2+parseInt(parseFloat(t.fontSize)/2):s.x+a.w/2,o=s.y-a.h/2,new we(r,n,i,o)}},{key:"getLabelPxSize",value:function(e){var t,r,n,o,i=parseFloat(e.strokeWidth);t=e.label||this.text,r=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var a=t.split("\n"),s=a.length;o=s>1?r*s+s+i+.2*r:r+i+.2*r+1,n=0,this.labelWTmp&&n255?r++:n++;return t.cnC=r,t.enC=n,t.textC=e.length,t}}])&&tt(t.prototype,r),n&&tt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function st(e){"@babel/helpers - typeof";return(st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ut(e,t){for(var r=0;r3;if(t){this.components.pop(),lt(pt(i.prototype),"removeComponent",this).apply(this,arguments);var r=this.components[0];lt(pt(i.prototype),"addComponent",this).apply(this,[r])}return t}},{key:"getArea",value:function(){var e=0;if(this.components&&this.components.length>2){for(var t=0,r=0,n=this.components.length;r0){e+=Math.abs(this.components[0].getArea());for(var t=1,r=this.components.length;t1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var r=Ut.element(e);r.parentNode&&(!r.tagName||r.tagName.toUpperCase()!=t.toUpperCase());)r=r.parentNode;return r},observe:function(e,t,r,n){var o=ye.getElement(e);if(n=n||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||o.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!o._eventCacheID){var i="eventCacheID_";o.id&&(i=o.id+"_"+i),o._eventCacheID=ye.createUniqueID(i)}var a=o._eventCacheID;this.observers[a]||(this.observers[a]=[]),this.observers[a].push({element:o,name:t,observer:r,useCapture:n}),o.addEventListener?"mousewheel"===t?o.addEventListener(t,r,{useCapture:n,passive:!1}):o.addEventListener(t,r,n):o.attachEvent&&o.attachEvent("on"+t,r)},stopObservingElement:function(e){var t=ye.getElement(e)._eventCacheID;this._removeElementObservers(Ut.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var r=e[t],n=new Array(r.element,r.name,r.observer,r.useCapture);Ut.stopObserving.apply(this,n)}},stopObserving:function(e,t,r,n){n=n||!1;var o=ye.getElement(e),i=o._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||o.detachEvent)&&(t="keydown");var a=!1,s=Ut.observers[i];if(s)for(var u=0;!a&&u0))return null;for(var a=0,s=0,u=[];a0){e+='"points":[';for(var r=0,n=this.components.length;re[i]){var a=e[i];e[i]=e[o],e[o]=a;var s=t[i];if(t[i]=t[o],t[o]=s,r&&r.length>0){var u=r[i];r[i]=r[o],r[o]=u}if(n&&n.length>0){var l=n[i];n[i]=n[o],n[o]=l}}}}],(r=[{key:"destroy",value:function(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}},{key:"toGeometry",value:function(){var e=this;switch(e.type.toUpperCase()){case a.POINT:return e.toGeoPoint();case a.LINE:return e.toGeoLine();case a.LINEM:return e.toGeoLinem();case a.REGION:return e.toGeoRegion();case a.POINTEPS:return e.toGeoPoint();case a.LINEEPS:return e.toGeoLineEPS();case a.REGIONEPS:return e.toGeoRegionEPS();case a.GEOCOMPOUND:return e.transformGeoCompound()}}},{key:"toGeoPoint",value:function(){var e=this.parts||[],t=this.points||[],r=e.length;if(r>0){if(1===r)return new He(t[0].x,t[0].y);for(var n=[],o=0;o0){if(1===r){for(var n=[],o=0;o0){if(1===s){for(e=0,r=[];e=0;g--)if(v[m]=-1,f[g].containsBounds(f[m])){p[m]=-1*p[g],p[m]<0&&(v[m]=g);break}for(var w=0;w0?i.push(c[w]):(i[v[w]].components=i[v[w]].components.concat(c[w].components),i.push(""))}else{i=new Array;for(var O=0;O0&&i.length>0&&(i[i.length-1].components=i[i.length-1].components.concat(u),u=[]),i.push(c[O])),O==o-1){var S=i.length;if(S)i[S-1].components=i[S-1].components.concat(u);else for(var _=0,P=u.length;_=0;w--)if(m[g]=-1,p[w].containsBounds(p[g])){h[g]=-1*h[w],h[g]<0&&(m[g]=w);break}for(var O=0;O0?a.push(f[O]):(a[m[O]].components=a[m[O]].components.concat(f[O].components),a.push(""))}else{a=new Array;for(var S=0;S0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(l),l=[]),a.push(f[S])),S==o-1){var _=a.length;if(_)a[_-1].components=a[_-1].components.concat(l);else for(var P=0,x=l.length;P0&&r.push(","),r.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,r.push(this.writeNewline(),this.writeIndent(),"]"),r.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,function(e,r){var n=t[r];return n||(n=r.charCodeAt(),"\\u00"+Math.floor(n/16).toString(16)+(n%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())+'"'}},t}return t=i,(r=[{key:"read",value:function(e,t){var r;if(this.nativeJSON)try{r=JSON.parse(e,t)}catch(t){return{data:e}}return this.keepData&&(this.data=r),r}},{key:"write",value:function(e,t){this.pretty=!!t;var r=null,n=Mr(e);if(this.serialize[n])try{r=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[n].apply(this,[e])}catch(e){}return r}},{key:"writeIndent",value:function(){var e=[];if(this.pretty)for(var t=0;t-1||(t[n]=e[n]);return t}}])&&Gr(t.prototype,r),n&&Gr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Hr(e){"@babel/helpers - typeof";return(Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wr(e,t){for(var r=0;r0&&o.push(","),r=t[i].geometry,o.push(this.extractGeometry(r));return n&&o.push(")"),o.join("")}},{key:"extractGeometry",value:function(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}}])&&Wr(t.prototype,r),n&&Wr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Kr(e,t){for(var r=0;r=0?t.speed:1,this.frequency=t.speed&&t.frequency>=0?t.frequency:1e3,this.startTime=t.startTime&&null!=t.startTime?t.startTime:0,this.endTime=t.endTime&&null!=t.endTime&&t.endTime>=r.startTime?t.endTime:+new Date,this.repeat=void 0===t.repeat||t.repeat,this.reverse=void 0!==t.reverse&&t.reverse,this.currentTime=null,this.oldTime=null,this.running=!1,this.EVENT_TYPES=["start","pause","stop"],r.events=new zt(this,null,this.EVENT_TYPES),r.speed=Number(r.speed),r.frequency=Number(r.frequency),r.startTime=Number(r.startTime),r.endTime=Number(r.endTime),r.startTime=Date.parse(new Date(r.startTime)),r.endTime=Date.parse(new Date(r.endTime)),r.currentTime=r.startTime,this.CLASS_NAME="SuperMap.TimeControlBase"}var t,r,n;return t=e,(r=[{key:"updateOptions",value:function(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)}},{key:"start",value:function(){var e=this;e.running||(e.running=!0,e.tick(),e.events.triggerEvent("start",e.currentTime))}},{key:"pause",value:function(){this.running=!1,this.events.triggerEvent("pause",this.currentTime)}},{key:"stop",value:function(){var e=this;e.currentTime=e.startTime,e.running&&(e.running=!1),e.events.triggerEvent("stop",e.currentTime)}},{key:"toggle",value:function(){this.running?this.pause():this.start()}},{key:"setSpeed",value:function(e){return e>=0&&(this.speed=e,!0)}},{key:"getSpeed",value:function(){return this.speed}},{key:"setFrequency",value:function(e){return e>=0&&(this.frequency=e,!0)}},{key:"getFrequency",value:function(){return this.frequency}},{key:"setStartTime",value:function(e){var t=this;return!((e=Date.parse(new Date(e)))>t.endTime)&&(t.startTime=e,t.currentTime=t.endTime&&(t.currentTime=t.startTime,t.tick()),!0)}},{key:"getEndTime",value:function(){return this.endTime}},{key:"setCurrentTime",value:function(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)}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"setRepeat",value:function(e){this.repeat=e}},{key:"getRepeat",value:function(){return this.repeat}},{key:"setReverse",value:function(e){this.reverse=e}},{key:"getReverse",value:function(){return this.reverse}},{key:"getRunning",value:function(){return this.running}},{key:"destroy",value:function(){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}},{key:"tick",value:function(){}}])&&Kr(t.prototype,r),n&&Kr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function en(e){"@babel/helpers - typeof";return(en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tn(e,t){for(var r=0;r=e.endTime&&(e.currentTime=e.endTime)}}}])&&tn(t.prototype,r),n&&tn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),fn=(r(9957),r(5937),r(4238)),pn=r.n(fn),hn=window.fetch,yn={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=ye.toJSON(e[t]));var r=encodeURIComponent(e[t]);this.queryValues.push(r)}},issue:function(e){for(var t=this,r=t.getUid(),n=e.url,o=[],i=n,a=0,s=t.queryKeys?t.queryKeys.length:0,u=0;u=t.limitLength){if(0==a)return!1;o.push(i),i=n,a=0,u--}else if(i.length+t.queryKeys[u].length+2+t.queryValues[u].length>t.limitLength)for(var l=t.queryValues[u];l.length>0;){var c=t.limitLength-i.length-t.queryKeys[u].length-2;i.indexOf("?")>-1?i+="&":i+="?";var f=l.substring(0,c);"%"===f.substring(c-1,c)?(c-=1,f=l.substring(0,c)):"%"===f.substring(c-2,c-1)&&(c-=2,f=l.substring(0,c)),i+=t.queryKeys[u]+"="+f,l=l.substring(c),f.length>0&&(o.push(i),i=n,a=0)}else a++,i.indexOf("?")>-1?i+="&":i+="?",i+=t.queryKeys[u]+"="+t.queryValues[u];return o.push(i),t.send(o,"SuperMapJSONPCallbacks_"+r,e&&e.proxy)},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,r){var n=e.length;if(n>0)return new Promise(function(o){for(var i=(new Date).getTime(),a=0;a-1?s+="&":s+="?",s+="sectionCount="+n,s+="§ionIndex="+a,s+="&jsonpUserID="+i,r&&(s=decodeURIComponent(s),s=r+encodeURIComponent(s)),pn()(s,{jsonpCallbackFunction:t,timeout:3e4}).then(function(e){o(e.json())})}})},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)}},dn=function(){return void 0!=un?un:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},bn=function(){return ln||45e3},vn={commit:function(e,t,r,n){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,r,n);case"POST":return this.post(t,r,n);case"PUT":return this.put(t,r,n);case"DELETE":return this.delete(t,r,n);default:return this.get(t,r,n)}},supportDirectRequest:function(e,t){return!!ye.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:dn()||t.proxy)},get:function(e,t,r){r=r||{};if(e=ye.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){var n={url:e=e.replace(".json",".jsonp"),data:t};return yn.GET(n)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")),t,r):this._fetch(e,t,r,"GET")},delete:function(e,t,r){r=r||{};if(e=ye.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=DELETE",data:t};return yn.DELETE(n)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")),t,r):this._fetch(e,t,r,"DELETE")},post:function(e,t,r){if(r=r||{},e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var n={url:ye.urlAppend(e,"_method=POST"),data:t};return yn.POST(n)}return this._fetch(e,t,r,"POST")},put:function(e,t,r){if(r=r||{},e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=PUT",data:t};return yn.PUT(n)}return this._fetch(e,t,r,"PUT")},urlIsLong:function(e){for(var t=0,r=null,n=0,o=e.length;n-1?"&":"?")+"_method="+e,"string"!=typeof r&&(r=JSON.stringify(r)),this.post(t,r,n)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var r=e.split("?");2===r.length&&(e=r[0]+".json?"+r[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,r,n){return(r=r||{}).headers=r.headers||{},r.headers["Content-Type"]||FormData.prototype.isPrototypeOf(t)||(r.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),r.timeout?this._timeout(r.timeout,hn(e,{method:n,headers:r.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(r),mode:"cors",timeout:bn()}).then(function(e){return e})):hn(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:r.headers,credentials:this._getWithCredentials(r),mode:"cors",timeout:bn()}).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||{},pn()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(r,n){setTimeout(function(){n(new Error("timeout"))},e),t.then(r,n)})},_getParameterString:function(e){var t=[];for(var r in e){var n,o=e[r];if(null!=o&&"function"!=typeof o)n=Array.isArray(o)||"[object Object]"===o.toString()?encodeURIComponent(JSON.stringify(o)):encodeURIComponent(o),t.push(encodeURIComponent(r)+"="+n)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};function mn(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:{headers:this.headers,crossOrigin:this.crossOrigin,withCredentials:this.withCredentials};return t=gn.appendCredential(t),vn.commit(e,t,r,n).then(function(e){return e.json()})}}])&&Cn(t.prototype,r),n&&Cn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function An(e,t){for(var r=0;r0?(r.totalTimes--,r.ajaxPolling(e)):r._commit(e)}},{key:"ajaxPolling",value:function(e){var t=this,r=e.url,n=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;return t.index=parseInt(Math.random()*t.length),t.url=t.urls[t.index],r=r.replace(n,n.exec(t.url)[0]),e.url=r,e.isInTheSameDomain=ye.isInTheSameDomain(r),t._commit(e)}},{key:"calculatePollingTimes",value:function(){var e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.timese.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}},{key:"isServiceSupportPolling",value:function(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}},{key:"transformResult",value:function(e,t){return{result:e=ye.transformResult(e),options:t}}},{key:"transformErrorResult",value:function(e,t){return{error:(e=ye.transformResult(e)).error||e,options:t}}},{key:"serviceProcessCompleted",value:function(e,t){e=this.transformResult(e).result,this.events.triggerEvent("processCompleted",{result:e,options:t})}},{key:"serviceProcessFailed",value:function(e,t){var r=(e=this.transformErrorResult(e).error).error||e;this.events.triggerEvent("processFailed",{error:r,options:t})}},{key:"_returnContent",value:function(e){return e.scope.format!==o.FGB&&!!e.scope.returnContent}},{key:"supportDataFormat",value:function(e){return this.dataFormat().includes(e)}},{key:"dataFormat",value:function(){return[o.GEOJSON,o.ISERVER]}},{key:"_commit",value:function(e){var t=this;if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=ye.urlAppend(e.url,ye.getParameterString(e.params||{}))),"object"===Oo(e.data))try{e.params=ye.toJSON(e.data)}catch(e){console.log("不是json对象")}else e.params=e.data;return vn.commit(e.method,e.url,e.params,{headers:e.headers,withoutFormatSuffix:e.withoutFormatSuffix,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then(function(e){return e.text?e.text():e.json?e.json():e}).then(function(t){var r=t;return"string"==typeof t&&(r=(new Fr).read(t)),(!r||r.error||r.code>=300&&304!==r.code)&&(r=r&&r.error?{error:r.error}:{error:r}),r&&e.scope.format===o.FGB&&(r.newResourceLocation=r.newResourceLocation.replace(".json","")+".fgb"),r}).catch(function(e){return{error:e}}).then(function(r){var n={object:t};if(r.error){var o="processFailed";if(t.events&&t.events.listeners[o]&&t.events.listeners[o].length){var i=e.failure&&(e.scope?$.bind(e.failure,e.scope):e.failure);i?i(r,e):t.serviceProcessFailed(r,e)}else(n=go(go({},n),t.transformErrorResult(r,e))).type=o,e.failure&&e.failure(n)}else{var a="processCompleted";if(t.events&&t.events.listeners[a]&&t.events.listeners[a].length){var s=e.success&&(e.scope?$.bind(e.success,e.scope):e.success);s?s(r,e):t.serviceProcessCompleted(r,e)}else r.succeed=void 0==r.succeed||r.succeed,(n=go(go({},n),t.transformResult(r,e))).type=a,e.success&&e.success(n)}return n})}}])&&So(t.prototype,r),n&&So(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Po(e,t){for(var r=0;r0)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}}])&&Ki(t.prototype,r),n&&Ki(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ea(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}}])&&cs(t.prototype,r),n&&cs(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function bs(e){"@babel/helpers - typeof";return(bs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vs(e,t){for(var r=0;r=0){var t=JSON.parse(e.data);return e.filterParam=t,e.eventType="setFilterParamSucceeded",void this.events.triggerEvent("setFilterParamSucceeded",e)}var r=JSON.parse(e.data);e.featureResult=r,e.eventType="messageSucceeded",this.events.triggerEvent("messageSucceeded",e)}},{key:"_connect",value:function(e){return e=gn.appendCredential(e),"WebSocket"in window?new WebSocket(e):"MozWebSocket"in window?new(0,window.MozWebSocket)(e):(console.log("no WebSocket"),null)}}])&&vs(t.prototype,r),n&&vs(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function _s(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.facilityPathList)return e;var t=new qr;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}}])&&xc(t.prototype,r),n&&xc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Rc(e,t){for(var r=0;r0&&(t+=","),t+=ye.toJSON(e[n]);return t+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e)return null;var t=new qr;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}])&&Lc(t.prototype,r),n&&Lc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Gc(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.pathList)return null;var t=new qr;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}}])&&Jc(t.prototype,r),n&&Jc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Xc(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new qr;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}}])&&Kc(t.prototype,r),n&&Kc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function of(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.serviceAreaList)return e;var t=new qr;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}}])&&uf(t.prototype,r),n&&uf(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function yf(e,t){for(var r=0;r0&&(t+=","),t+='{"x":'+o[r].x+',"y":'+o[r].y+"}";i+=t+="]"}else if(!0===e.isAnalyzeById){for(var a="[",s=e.nodes,u=s.length,l=0;l0&&(a+=","),a+=s[l];i+=a+="]"}return i}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.tspPathList)return null;var t=new qr;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}}])&&vf(t.prototype,r),n&&vf(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function _f(e,t){for(var r=0;r=0;e--)this.points[e].destroy();this.points=null}}}])&&np(t.prototype,r),n&&np(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function cp(e){"@babel/helpers - typeof";return(cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fp(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}}])&&Dp(t.prototype,r),n&&Dp(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function zp(e){"@babel/helpers - typeof";return(zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qp(e,t){for(var r=0;r=0&&n.toIndex>=0&&!o&&(n.url=ye.urlAppend(n.url,"fromIndex=".concat(n.fromIndex,"&toIndex=").concat(n.toIndex))),e.returnCountOnly&&(n.url=ye.urlAppend(n.url,"&returnCountOnly="+e.returnContent)),r=n.getJsonParameters(e),n.request({method:"POST",data:r,scope:n,success:t,failure:t})}}},{key:"transformResult",value:function(e,t){if(e=ye.transformResult(e),this.format===o.GEOJSON&&e.features){var r=new qr;e.features=r.toGeoJSON(e.features)}return{result:e,options:t}}},{key:"dataFormat",value:function(){return[o.GEOJSON,o.ISERVER,o.FGB]}}])&&qp(t.prototype,r),n&&qp(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}();function Kp(e){"@babel/helpers - typeof";return(Kp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $p(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}}])&&ah(t.prototype,r),n&&ah(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function hh(e){"@babel/helpers - typeof";return(hh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yh(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}}])&&Oh(t.prototype,r),n&&Oh(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Eh(e){"@babel/helpers - typeof";return(Eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Th(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}}}])&&Nh(t.prototype,r),n&&Nh(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Jh(e){"@babel/helpers - typeof";return(Jh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zh(e,t){for(var r=0;r0)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)}},{key:"toServerJSONObject",value:function(){var e={};if((e=ye.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,n=0;n0)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}}])&&qd(t.prototype,r),n&&qd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Kd(e,t){for(var r=0;r0?e[0].subLayers.layers:null)?r.length:0,this.handleLayers(n,r),{result:e[0],options:t}}},{key:"handleLayers",value:function(e,t){var r;if(e)for(var n=0;n0)this.handleLayers(t[n].subLayers.layers.length,t[n].subLayers.layers);else switch(t[n].ugcLayerType){case"THEME":(r=new Sb).fromJson(t[n]),t[n]=r;break;case"GRID":(r=new Tb).fromJson(t[n]),t[n]=r;break;case"IMAGE":(r=new Nb).fromJson(t[n]),t[n]=r;break;case"VECTOR":(r=new Jb).fromJson(t[n]),t[n]=r}}}}])&&qb(t.prototype,r),n&&qb(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Kb(e,t){for(var r=0;r=200&&e.code<300||0==e.code||304===e.code,n=e.code&&r;return!e.code||n?{result:e,options:t}:{error:e,options:t}}}])&&_m(t.prototype,r),n&&_m(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Cm(e,t){for(var r=0;r0&&(n+='"subLayers":'+e.toJSON()),n+=',"visible":true,',n+='"name":"'+this.getMapName(this.mapUrl)+'"',n+="}]",r.request({method:"PUT",data:n,scope:r,success:t,failure:t})}}},{key:"createTempLayerComplete",value:function(e,t){return t.result=ye.transformResult(t.result),t.result.succeed&&(this.lastparams.resourceID=t.result.newResourceID),this.processAsync(this.lastparams,e)}},{key:"getMapName",value:function(e){var t=e;"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1));var r=t.lastIndexOf("/");return t.substring(r+1,t.length)}},{key:"transformResult",value:function(e,t){return null!=(e=ye.transformResult(e))&&null!=this.lastparams&&null!=this.lastparams.resourceID&&(e.newResourceID=this.lastparams.resourceID),{result:e,options:t}}}])&&i_(t.prototype,r),n&&i_(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function p_(e,t){for(var r=0;r0)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}}])&&TP(t.prototype,r),n&&TP(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function NP(e,t){for(var r=0;r0)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)}},{key:"toServerJSONObject",value:function(){var e={};if((e=ye.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,n=0;n0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}}])&&YP(t.prototype,r),n&&YP(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function QP(e,t){for(var r=0;r0&&(1===o.length?r+="'displayFilter':\""+o[0]+'",':r+="'displayFilter':\""+o[a]+'",'),(i=e.displayOrderBy)&&i.length>0&&(1===i.length?r+="'displayOrderBy':'"+i[0]+"',":r+="'displayOrderBy':'"+i[a]+"',"),(t=e.fieldValuesDisplayFilter)&&(r+="'fieldValuesDisplayFilter':"+ye.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[a]&&(r+="'joinItems':["+ye.toJSON(e.joinItems[a])+"],"),e.datasetNames&&e.dataSourceNames){var u=e.datasetNames[a]?a:e.datasetNames.length-1,l=e.dataSourceNames[a]?a:e.dataSourceNames.length-1;r+="'datasetInfo': {'name': '"+e.datasetNames[u]+"','dataSourceName': '"+e.dataSourceNames[l]+"'}},"}else r+="},"}e.themes&&e.themes.length>0&&(r=r.substring(0,r.length-1)),r+="]},";var c=this.url.split("/");return r+="'name': '"+c[c.length-2]+"'}]"}}])&&$P(t.prototype,r),n&&$P(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function ax(e){"@babel/helpers - typeof";return(ax="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sx(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function yE(e){return function(e){if(Array.isArray(e))return dE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return dE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r3&&void 0!==arguments[3]?arguments[3]:{};return t=gn.appendCredential(t),n.crossOrigin=this.options.crossOrigin,n.headers=this.options.headers,vn.commit(e,t,r,n).then(function(e){return e.json()})}}])&&_E(t.prototype,r),n&&_E(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function xE(e){"@babel/helpers - typeof";return(xE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kE(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);rt.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),r})}},{key:"_distance",value:function(e,t,r,n){return Math.sqrt((e-r)*(e-r)+(t-n)*(t-n))}},{key:"_getMeterPerMapUnit",value:function(e){var t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}}])&&qE(t.prototype,r),n&&qE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function WE(e){"@babel/helpers - typeof";return(WE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function YE(e,t){for(var r=0;ri&&(i=e+s+100,n.width=i,r=!0),t+u>a&&(a=t+u+100,n.height=a,r=!0),e<-s&&(i+=s=100*Math.ceil(-e/100),n.width=i,r=!0),t<-u&&(a+=u=100*Math.ceil(-t/100),n.height=a,r=!0),r&&o.translate(s,u)}},{key:"getPixelOffset",value:function(){return{x:this._offsetX,y:this._offsetY}}},{key:"indexOf",value:function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r1)for(var o=0,i=n-1;o1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var r=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=r[0],e[2]=r[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=this.adjust(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}},{key:"toArray",value:function(e){(e=this.trim(e)).indexOf("rgba")<0&&(e=this.toRGBA(e));var t=[],r=0;return e.replace(/[\d.]+/g,function(e){r<3?e|=0:e=+e,t[r++]=e}),t}},{key:"convert",value:function(e,t){if(!this.isCalculableColor(e))return e;var r=this.getData(e),n=r[3];return void 0===n&&(n=1),e.indexOf("hsb")>-1?r=this._HSV_2_RGB(r):e.indexOf("hsl")>-1&&(r=this._HSL_2_RGB(r)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?r=this._RGB_2_HSB(r):t.indexOf("hsl")>-1&&(r=this._RGB_2_HSL(r)),r[3]=n,this.toColor(r,t)}},{key:"toRGBA",value:function(e){return this.convert(e,"rgba")}},{key:"toRGB",value:function(e){return this.convert(e,"rgb")}},{key:"toHex",value:function(e){return this.convert(e,"hex")}},{key:"toHSVA",value:function(e){return this.convert(e,"hsva")}},{key:"toHSV",value:function(e){return this.convert(e,"hsv")}},{key:"toHSBA",value:function(e){return this.convert(e,"hsba")}},{key:"toHSB",value:function(e){return this.convert(e,"hsb")}},{key:"toHSLA",value:function(e){return this.convert(e,"hsla")}},{key:"toHSL",value:function(e){return this.convert(e,"hsl")}},{key:"toName",value:function(e){for(var t in this._nameColors)if(this.toHex(this._nameColors[t])===this.toHex(e))return t;return null}},{key:"trim",value:function(e){return String(e).replace(/\s+/g,"")}},{key:"normalize",value:function(e){if(this._nameColors[e]&&(e=this._nameColors[e]),e=(e=this.trim(e)).replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){var t=(3840&(e=parseInt(e.slice(1),16)))<<8,r=(240&e)<<4,n=15&e;e="#"+((1<<24)+(t<<4)+t+(r<<4)+r+(n<<4)+n).toString(16).slice(1)}return e}},{key:"lift",value:function(e,t){if(!this.isCalculableColor(e))return e;var r=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var n=this.getData(e),o=0;o<3;o++)n[o]=1===r?n[o]*(1-t)|0:(255-n[o])*t+n[o]|0;return"rgb("+n.join(",")+")"}},{key:"reverse",value:function(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")}},{key:"mix",value:function(e,t,r){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===r&&(r=.5);for(var n=2*(r=1-this.adjust(r,[0,1]))-1,o=this.getData(this.toRGBA(e)),i=this.getData(this.toRGBA(t)),a=o[3]-i[3],s=((n*a==-1?n:(n+a)/(1+n*a))+1)/2,u=1-s,l=[],c=0;c<3;c++)l[c]=o[c]*s+i[c]*u;var f=o[3]*r+i[3]*(1-r);return f=Math.max(0,Math.min(1,f)),1===o[3]&&1===i[3]?this.toColor(l,"rgb"):(l[3]=f,this.toColor(l,"rgba"))}},{key:"random",value:function(){return"#"+Math.random().toString(16).slice(2,8)}},{key:"getData",value:function(t){var r,n,o=(t=this.normalize(t)).match(this.colorRegExp);if(null===o)throw new Error("The color format error");var i,a=[];if(o[2])i=[(r=o[2].replace("#","").split(""))[0]+r[1],r[2]+r[3],r[4]+r[5]],a=this.map(i,function(t){return e.prototype.adjust.call(this,parseInt(t,16),[0,255])});else if(o[4]){var s=o[4].split(",");n=s[3],i=s.slice(0,3),a=this.map(i,function(t){return t=Math.floor(t.indexOf("%")>0?2.55*parseInt(t,0):t),e.prototype.adjust.call(this,t,[0,255])}),void 0!==n&&a.push(this.adjust(parseFloat(n),[0,1]))}else if(o[5]||o[6]){var u=(o[5]||o[6]).split(","),l=parseInt(u[0],0)/360,c=u[1],f=u[2];n=u[3],(a=this.map([c,f],function(t){return e.prototype.adjust.call(this,parseFloat(t)/100,[0,1])})).unshift(l),void 0!==n&&a.push(this.adjust(parseFloat(n),[0,1]))}return a}},{key:"alpha",value:function(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var r=this.getData(this.toRGBA(e));return r[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(r,"rgba")}},{key:"map",value:function(e,t){if("function"!=typeof t)throw new TypeError;for(var r=e?e.length:0,n=0;n=t[1]&&(e=t[1]),e}},{key:"isCalculableColor",value:function(e){return e instanceof Array||"string"==typeof e}},{key:"_HSV_2_RGB",value:function(e){var t,r,n,o=e[0],i=e[1],a=e[2];if(0===i)t=255*a,r=255*a,n=255*a;else{var s=6*o;6===s&&(s=0);var u=0|s,l=a*(1-i),c=a*(1-i*(s-u)),f=a*(1-i*(1-(s-u))),p=0,h=0,y=0;0===u?(p=a,h=f,y=l):1===u?(p=c,h=a,y=l):2===u?(p=l,h=a,y=f):3===u?(p=l,h=c,y=a):4===u?(p=f,h=l,y=a):(p=a,h=l,y=c),t=255*p,r=255*h,n=255*y}return[t,r,n]}},{key:"_HSL_2_RGB",value:function(e){var t,r,n,o=e[0],i=e[1],a=e[2];if(0===i)t=255*a,r=255*a,n=255*a;else{var s,u=2*a-(s=a<.5?a*(1+i):a+i-i*a);t=255*this._HUE_2_RGB(u,s,o+1/3),r=255*this._HUE_2_RGB(u,s,o),n=255*this._HUE_2_RGB(u,s,o-1/3)}return[t,r,n]}},{key:"_HUE_2_RGB",value:function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),6*r<1?e+6*(t-e)*r:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}},{key:"_RGB_2_HSB",value:function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(n,o,i),s=Math.max(n,o,i),u=s-a,l=s;if(0===u)t=0,r=0;else{r=u/s;var c=((s-n)/6+u/2)/u,f=((s-o)/6+u/2)/u,p=((s-i)/6+u/2)/u;n===s?t=p-f:o===s?t=1/3+c-p:i===s&&(t=2/3+f-c),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,l*=100]}},{key:"_RGB_2_HSL",value:function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(n,o,i),s=Math.max(n,o,i),u=s-a,l=(s+a)/2;if(0===u)t=0,r=0;else{r=l<.5?u/(s+a):u/(2-s-a);var c=((s-n)/6+u/2)/u,f=((s-o)/6+u/2)/u,p=((s-i)/6+u/2)/u;n===s?t=p-f:o===s?t=1/3+c-p:i===s&&(t=2/3+f-c),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,l*=100]}}])&&QE(t.prototype,r),n&&QE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function KE(e,t){for(var r=0;r=t)if("RANGE"===r)for(o=0;o=0&&this.getSqrtInterval(e,r):"logarithm"===t?this.getMin(e)>0&&this.getGeometricProgression(e,r):void 0}},{key:"getSum",value:function(e){return this.getInstance(e).sum()}},{key:"getMax",value:function(e){return this.getInstance(e).max()}},{key:"getMin",value:function(e){return this.getInstance(e).min()}},{key:"getMean",value:function(e){return this.getInstance(e).mean()}},{key:"getMedian",value:function(e){return this.getInstance(e).median()}},{key:"getTimes",value:function(e){return e.length}},{key:"getEqInterval",value:function(e,t){return this.getInstance(e).getClassEqInterval(t)}},{key:"getJenks",value:function(e,t){return this.getInstance(e).getClassJenks(t)}},{key:"getSqrtInterval",value:function(e,t){return e=e.map(function(e){return Math.sqrt(e)}),this.getInstance(e).getClassEqInterval(t).map(function(e){return e*e})}},{key:"getGeometricProgression",value:function(e,t){return this.getInstance(e).getClassGeometricProgression(t)}}],(r=null)&&tT(t.prototype,r),n&&tT(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),nT=function(e){var t;if(e===c.METER)t=1;else if(e===c.DEGREE)t=2*Math.PI*6378137/360;else if(e===c.KILOMETER)t=.001;else if(e===c.INCH)t=1/.025399999918;else{if(e!==c.FOOT)return t;t=.3048}return t};function oT(e,t,r){return 1/(e*t*(1/.0254)*nT(r))}var iT=r(7820),aT=r.n(iT);function sT(e){"@babel/helpers - typeof";return(sT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lT(e,t){for(var r=0;rl&&(u[o]=u[o].slice(n-l),l=n)}function d(e){var t,i,a,s;if(e instanceof Function)return e.call(c.parsers);if("string"==typeof e)t=r.charAt(n)===e?e:null,i=1,y();else{if(y(),!(t=e.exec(u[o])))return null;i=t[0].length}if(t){var f=n+=i;for(s=n+u[o].length-i;n=0&&"\n"!==n.charAt(a);a--)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||{},c={parse:function(i){var a,c=null;if(n=o=l=s=0,u=[],r=i.replace(/\r\n/g,"\n"),t.filename&&(f.env.inputs[t.filename]=r),u=function(e){for(var t,n,o,i,a=0,s=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,u=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,l=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,f=0,p=e[0],h=0;h0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),c)throw b(c);var p=function(e,t){var r=e.specificity,n=t.specificity;return r[0]!=n[0]?n[0]-r[0]:r[1]!=n[1]?n[1]-r[1]:r[2]!=n[2]?n[2]-r[2]:n[3]-r[3]};return(a=new e.Tree.Ruleset([],d(this.parsers.primary))).root=!0,a.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+b(t).message:e.errors.message=b(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(p),t},a},parsers:{primary:function(){for(var e,t=[];(e=d(this.rule)||d(this.ruleset)||d(this.comment))||d(/^[\s\n]+/)||(e=d(this.invalid));)e&&t.push(e);return t},invalid:function(){var t=d(/^[^;\n]*[;\n]/);if(t)return new e.Tree.Invalid(t,a)},comment:function(){var t;if("/"===r.charAt(n))return"/"===r.charAt(n+1)?new e.Tree.Comment(d(/^\/\/.*/),!0):(t=d(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new e.Tree.Comment(t):void 0},entities:{quoted:function(){if('"'===r.charAt(n)||"'"===r.charAt(n)){var t=d(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return t?new e.Tree.Quoted(t[1]||t[2]):void 0}},field:function(){if(d("[")){var t=d(/(^[^\]]+)/);if(d("]"))return t?new e.Tree.Field(t[1]):void 0}},comparison:function(){var e=d(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var t=d(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(t)return new e.Tree.Keyword(t)},call:function(){var t,r;if(t=/^([\w\-]+|%)\(/.exec(u[o])){if("url"===(t=t[1]))return null;n+=t.length;if(d("("),r=d(this.entities.arguments),d(")"))return t?new e.Tree.Call(t,r,n):void 0}},arguments:function(){for(var e,t=[];e=d(this.expression);){t.push(e);if(!d(","))break}return t},literal:function(){return d(this.entities.dimension)||d(this.entities.keywordcolor)||d(this.entities.hexcolor)||d(this.entities.quoted)},url:function(){var t;if("u"===r.charAt(n)&&d(/^url\(/)){t=d(this.entities.quoted)||d(this.entities.variable)||d(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return d(")")?new e.Tree.URL(void 0!==t.value||t instanceof e.Tree.Variable?t:new e.Tree.Quoted(t)):new e.Tree.Invalid(t,a,"Missing closing ) in URL.")}},variable:function(){var o,i=n;if("@"===r.charAt(n)&&(o=d(/^@[\w-]+/)))return new e.Tree.Variable(o,i,t.filename)},hexcolor:function(){var t;if("#"===r.charAt(n)&&(t=d(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.Tree.Color(t[1])},keywordcolor:function(){var t=u[o].match(/^[a-z]+/);if(t&&t[0]in e.Tree.Reference.data.colors)return new e.Tree.Color(e.Tree.Reference.data.colors[d(/^[a-z]+/)])},dimension:function(){var t=r.charCodeAt(n);if(!(t>57||t<45||47===t)){var o=d(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return o?new e.Tree.Dimension(o[1],o[2],a):void 0}}},variable:function(){var e;if("@"===r.charAt(n)&&(e=d(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=d(this.entities.call)||d(this.entities.literal),t=d(this.entities.field)||d(this.entities.variable),r=d(this.entities.url)||d(this.entities.keyword);return e||t||r},end:function(){var e;return d(";")||("string"==typeof(e="}")?r.charAt(n)===e:!!e.test(u[o]))},element:function(){var t=d(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(t)return new e.Tree.Element(t)},attachment:function(){var e=d(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var t,o,i,s,u,l=[],c=new e.Tree.Filterset,f=[],p=0,h=0;(i=d(this.element))||(u=d(this.zoom))||(s=d(this.filter))||(t=d(this.attachment));){if(p++,i)l.push(i);else if(u)f.push(u),h++;else if(s){var y=c.add(s);if(y)throw b({message:y,index:n-1});h++}else{if(o)throw b({message:"Encountered second attachment name.",index:n-1});o=t}var v=r.charAt(n);if("{"===v||"}"===v||";"===v||","===v)break}if(p)return new e.Tree.Selector(c,f,l,o,h,a)},filter:function(){p();var r,n,o;if(d("[")&&(r=d(/^[a-zA-Z0-9\-_]+/)||d(this.entities.quoted)||d(this.entities.variable)||d(this.entities.keyword)||d(this.entities.field))&&(r instanceof e.Tree.Quoted&&(r=new e.Tree.Field(r.toString())),(n=d(this.entities.comparison))&&(o=d(this.entities.quoted)||d(this.entities.variable)||d(this.entities.dimension)||d(this.entities.keyword)||d(this.entities.field)))){if(!d("]"))throw b({message:"Missing closing ] of filter.",index:a-1});return r.is||(r=new e.Tree.Field(r)),new e.Tree.Filter(r,n,o,a,t.filename)}},zoom:function(){p();var t,r;if(d(/^\[\s*zoom/g)&&(t=d(this.entities.comparison))&&(r=d(this.entities.variable)||d(this.entities.dimension))&&d("]"))return new e.Tree.Zoom(t,r,a);h()},block:function(){var e;if(d("{")&&(e=d(this.primary))&&d("}"))return e},ruleset:function(){var t,r,n=[];for(p();t=d(this.selector);){for(n.push(t);d(this.comment););if(!d(","))break;for(;d(this.comment););}if(t)for(;d(this.comment););if(n.length>0&&(r=d(this.block))){if(1===n.length&&n[0].elements.length&&"Map"===n[0].elements[0].value){var o=new e.Tree.Ruleset(n,r);return o.isMap=!0,o}return new e.Tree.Ruleset(n,r)}h()},rule:function(){var o,i,u=r.charAt(n);if(p(),"."!==u&&"#"!==u&&(o=d(this.variable)||d(this.property))){if((i=d(this.value))&&d(this.end))return new e.Tree.Rule(o,i,a,t.filename);s=n,h()}},font:function(){for(var t,r=[],n=[];t=d(this.entity);)n.push(t);if(r.push(new e.Tree.Expression(n)),d(","))for(;(t=d(this.expression))&&(r.push(t),d(",")););return new e.Tree.Value(r)},value:function(){for(var t,r=[];(t=d(this.expression))&&(r.push(t),d(",")););return r.length>1?new e.Tree.Value(r.map(function(e){return e.value[0]})):1===r.length?new e.Tree.Value(r):void 0},sub:function(){var e;if(d("(")&&(e=d(this.expression))&&d(")"))return e},multiplication:function(){var t,r,n,o;if(t=d(this.operand)){for(;(n=d("/")||d("*")||d("%"))&&(r=d(this.operand));)o=new e.Tree.Operation(n,[o||t,r],a);return o||t}},addition:function(){var t,o,i,s;if(t=d(this.multiplication)){for(;(i=d(/^[-+]\s+/)||" "!=r.charAt(n-1)&&(d("+")||d("-")))&&(o=d(this.multiplication));)s=new e.Tree.Operation(i,[s||t,o],a);return s||t}},operand:function(){return d(this.sub)||d(this.entity)},expression:function(){for(var t,r=[];t=d(this.addition)||d(this.entity);)r.push(t);if(r.length>0)return new e.Tree.Expression(r)},property:function(){var e=d(/^(([a-z][-a-z_0-9]*\/)?\*?-?[-a-z_0-9]+)\s*:/);if(e)return e[1]}}}}},{key:"parse",value:function(e){var t=this.parser;return this.ruleSet=t.parse(e)}},{key:"toShaders",value:function(){if(this.ruleSet){var e=this.ruleSet;if(e){var t=e.toList(this.env);t.reverse();var r={},n=[];this._toShaders(r,n,t);for(var o=[],i={},a=0,s=t.length;a=0){if(!t.featureFilter){var i=o+n.length,a=r.indexOf(")",i+1),s="featureId&&(featureId"+r.substring(i,a)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!s}})}return{property:h,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+r+";} return _value; ")}}return{property:h,getValue:Function("attributes","zoom","var _value = null;"+r+"; return _value; ")}}(c[h],f);Object.defineProperty(f,"attachment",{configurable:!0,enumerable:!1,value:l}),Object.defineProperty(f,"elements",{configurable:!0,enumerable:!1,value:u.elements}),o.push(f),i[n[a]]=!0}Object.defineProperty(f,"zoom",{configurable:!0,enumerable:!1,value:u.zoom})}return o}}return null}},{key:"_toShaders",value:function(t,r,n){for(var o=0,i=n.length;o= 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"]}};function hT(e,t){for(var r=0;r1&&(t=arguments[1]),arguments.length>2&&(r=arguments[2]),{is:"tag",val:e,color:t,mode:r,toString:function(n){return'\n\t"}}},hsl:function(e,t,r){return this.hsla(e,t,r,1)},hsla:function(e,t,r,n){if([e=this.number(e)%360/360,t=this.number(t),r=this.number(r),n=this.number(n)].some(isNaN))return null;var o=r<=.5?r*(t+1):r+t-r*t,i=2*r-o;return this.rgba(255*a(e+1/3),255*a(e),255*a(e-1/3),n);function a(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?i+(o-i)*e*6:2*e<1?o:3*e<2?i+(o-i)*(2/3-e)*6:i}},hue:function(e){return"toHSL"in e?new fT.Tree.Dimension(Math.round(e.toHSL().h)):null},saturation:function(e){return"toHSL"in e?new fT.Tree.Dimension(Math.round(100*e.toHSL().s),"%"):null},lightness:function(e){return"toHSL"in e?new fT.Tree.Dimension(Math.round(100*e.toHSL().l),"%"):null},alpha:function(e){return"toHSL"in e?new fT.Tree.Dimension(e.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s+=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},desaturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s-=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},lighten:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l+=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},darken:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l-=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},fadein:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a+=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},fadeout:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a-=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},spin:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL(),n=(r.h+t.value)%360;return r.h=n<0?360+n:n,this.hsla_simple(r)},replace:function(e,t,r){return"field"===e.is?e.toString+".replace("+t.toString()+", "+r.toString()+")":e.replace(t,r)},mix:function(e,t,r){var n=r.value/100,o=2*n-1,i=e.toHSL().a-t.toHSL().a,a=((o*i==-1?o:(o+i)/(1+o*i))+1)/2,s=1-a,u=[e.rgb[0]*a+t.rgb[0]*s,e.rgb[1]*a+t.rgb[1]*s,e.rgb[2]*a+t.rgb[2]*s],l=e.alpha*n+t.alpha*(1-n);return new fT.Tree.Color(u,l)},greyscale:function(e){return this.desaturate(e,new fT.Tree.Dimension(100))},"%":function(e){for(var t=Array.prototype.slice.call(arguments,1),r=e.value,n=0;n.5?l/(2-a-s):l/(a+s),a){case r:e=(n-o)/l+(n=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}},{key:"toColor",value:function(){return new fT.Tree.Color([this.value,this.value,this.value])}},{key:"round",value:function(){return this.value=Math.round(this.value),this}},{key:"toString",value:function(){return this.value.toString()}},{key:"operate",value:function(e,t,r){return"%"===this.unit&&"%"!==r.unit?(e.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===r.unit?"*"===t||"/"===t||"%"===t?(e.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new fT.Tree.Dimension(fT.Tree.operate(t,this.value,this.value*r.value*.01),this.unit):new fT.Tree.Dimension(fT.Tree.operate(t,this.value,r.value),this.unit||r.unit)}}]),e}(),fT.Tree.Element=function(){function e(t){uT(this,e),this.value=t.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")}return cT(e,[{key:"specificity",value:function(){return["id"===this.type?1:0,"class"===this.type?1:0]}},{key:"toString",value:function(){return this.value}}]),e}(),fT.Tree.Expression=function(){function e(t){uT(this,e),this.is="expression",this.value=t}return cT(e,[{key:"ev",value:function(e){return this.value.length>1?new fT.Tree.Expression(this.value.map(function(t){return t.ev(e)})):this.value[0].ev(e)}},{key:"toString",value:function(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}}]),e}(),fT.Tree.Field=function(){function e(t){uT(this,e),this.is="field",this.value=t||""}return cT(e,[{key:"toString",value:function(){return'["'+this.value.toUpperCase()+'"]'}},{key:"ev",value:function(){return this}}]),e}(),fT.Tree.Filter=function(){function e(t,r,n,o,i){uT(this,e),this.ops={"<":[" < ","numeric"],">":[" > ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" <= ","numeric"],">=":[" >= ","numeric"],"=~":[".match(","string",")"]},this.key=t,this.op=r,this.val=n,this.index=o,this.filename=i,this.id=this.key+this.op+this.val}return cT(e,[{key:"ev",value:function(e){return this.key=this.key.ev(e),this.val=this.val.ev(e),this}},{key:"toString",value:function(){return"["+this.id+"]"}}]),e}(),fT.Tree.Filterset=function(){function e(){uT(this,e),this.filters={}}return cT(e,[{key:"toJS",value:function(e){function t(e){var t=e.op;"="===t&&(t="==");var r=e.val;void 0!==e._val&&(r=e._val.toString(!0)),e.key&&"scale"===e.key.value?r=+r:"string"!=typeof r&&"object"!==sT(r)||(r="'"+r+"'");var n="attributes";return n+"&&"+n+e.key+"&&"+n+e.key+" "+t+r}var r=[];for(var n in this.filters)r.push(t(this.filters[n]));return r.join(" && ")}},{key:"toString",value:function(){var e=[];for(var t in this.filters)e.push(this.filters[t].id);return e.sort().join("\t")}},{key:"ev",value:function(e){for(var t in this.filters)this.filters[t].ev(e);return this}},{key:"clone",value:function(){var e=new fT.Tree.Filterset;for(var t in this.filters)e.filters[t]=this.filters[t];return e}},{key:"cloneWith",value:function(e){var t=[];for(var r in e.filters){var n=this.addable(e.filters[r]);if(!1===n)return!1;!0===n&&t.push(e.filters[r])}if(!t.length)return null;var o=new fT.Tree.Filterset;for(r in this.filters)o.filters[r]=this.filters[r];for(;r=t.shift();)o.add(r);return o}},{key:"addable",value:function(e){var t=e.key.toString(),r=e.val.toString();switch(r.match(/^[0-9]+(\.[0-9]*)?_match/)&&(r=parseFloat(r)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==r&&null:void 0===this.filters[t+"!="+r]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val"]&&this.filters[t+">"].val>=r?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val":return t+"="in this.filters?!(this.filters[t+"="].val<=r)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=r)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].valr)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)||null))}}},{key:"conflict",value:function(e){var t=e.key.toString(),r=e.val.toString();return isNaN(parseFloat(r))||(r=parseFloat(r)),("="===e.op&&void 0!==this.filters[t+"="]&&r!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&r==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&r===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}},{key:"add",value:function(e,t){var r,n=e.key.toString(),o=e.op,i=this.conflict(e);if(i)return i;if("="===o){for(var a in this.filters)this.filters[a].key===n&&delete this.filters[a];this.filters[n+"="]=e}else if("!="===o)this.filters[n+"!="+e.val]=e;else if("=~"===o)this.filters[n+"=~"+e.val]=e;else if(">"===o){for(var s in this.filters)this.filters[s].key===n&&this.filters[s].val<=e.val&&delete this.filters[s];this.filters[n+">"]=e}else if(">="===o){for(var u in this.filters)r=+this.filters[u].val.toString(),this.filters[u].key===n&&r",this.filters[n+">"]=e):this.filters[n+">="]=e}else if("<"===o){for(var l in this.filters)r=+this.filters[l].val.toString(),this.filters[l].key===n&&r>=e.val&&delete this.filters[l];this.filters[n+"<"]=e}else if("<="===o){for(var c in this.filters)r=+this.filters[c].val.toString(),this.filters[c].key===n&&r>e.val&&delete this.filters[c];void 0!==this.filters[n+"!="+e.val]?(delete this.filters[n+"!="+e.val],e.op="<",this.filters[n+"<"]=e):this.filters[n+"<="]=e}}}]),e}(),fT.Tree.Fontset=cT(function e(t,r){uT(this,e),this.fonts=r,this.name="fontset-"+t.effects.length}),fT.Tree.Invalid=function(){function e(t,r,n){uT(this,e),this.is="invalid",this.chunk=t,this.index=r,this.type="syntax",this.message=n||"Invalid code: "+this.chunk}return cT(e,[{key:"ev",value:function(e){return e.error({chunk:this.chunk,index:this.index,type:"syntax",message:this.message||"Invalid code: "+this.chunk}),{is:"undefined"}}}]),e}(),fT.Tree.Keyword=function(){function e(t){uT(this,e),this.value=t;var r={transparent:"color",true:"boolean",false:"boolean"};this.is=r[t]?r[t]:"keyword"}return cT(e,[{key:"ev",value:function(){return this}},{key:"toString",value:function(){return this.value}}]),e}(),fT.Tree.Literal=function(){function e(t){uT(this,e),this.value=t||"",this.is="field"}return cT(e,[{key:"toString",value:function(){return this.value}},{key:"ev",value:function(){return this}}]),e}(),fT.Tree.Operation=function(){function e(t,r,n){uT(this,e),this.is="operation",this.op=t.trim(),this.operands=r,this.index=n}return cT(e,[{key:"ev",value:function(e){var t,r=this.operands[0].ev(e),n=this.operands[1].ev(e);return"undefined"===r.is||"undefined"===n.is?{is:"undefined",value:"undefined"}:(r instanceof fT.Tree.Dimension&&n instanceof fT.Tree.Color&&("*"===this.op||"+"===this.op?(t=n,n=r,r=t):e.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),r instanceof fT.Tree.Quoted&&n instanceof fT.Tree.Quoted&&"+"!==this.op?(e.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r instanceof fT.Tree.Field||n instanceof fT.Tree.Field||r instanceof fT.Tree.Literal||n instanceof fT.Tree.Literal?"color"===r.is||"color"===n.is?(e.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new fT.Tree.Literal(r.ev(e).toString(!0)+this.op+n.ev(e).toString(!0)):void 0===r.operate?(e.error({message:"Cannot do math with type "+r.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r.operate(e,this.op,n))}}]),e}(),fT.Tree.Quoted=function(){function e(t){uT(this,e),this.is="string",this.value=t||""}return cT(e,[{key:"toString",value:function(e){var t=this.value.replace(/&/g,"&"),r=t.replace(/\'/g,"\\'").replace(/\"/g,""").replace(//g,">");return!0===e?"'"+r+"'":t}},{key:"ev",value:function(){return this}},{key:"operate",value:function(e,t,r){return new fT.Tree.Quoted(fT.Tree.operate(t,this.toString(),r.toString(this.contains_field)))}}]),e}(),fT.Tree.Reference={_validateValue:{font:function(e,t){return!e.validation_data||!e.validation_data.fonts||-1!=e.validation_data.fonts.indexOf(t)}},setData:function(e){this.data=e,this.selector_cache=function(e){var t={};for(var r in e.symbolizers)for(var n in e.symbolizers[r])e.symbolizers[r][n].hasOwnProperty("css")&&(t[e.symbolizers[r][n].css]=[e.symbolizers[r][n],r,n]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var r in e.symbolizers)for(var n in e.symbolizers[r])if("functions"===e.symbolizers[r][n].type)for(var o=0;o1?Array.prototype.push.apply(r,n.find(new fT.Tree.Selector(null,null,e.elements.slice(1)),t)):r.push(n);break}}),this._lookups[n]=r)}},{key:"evZooms",value:function(e){for(var t=0;tfT.Tree.Zoom.maxZoom||t<0)&&e.error({message:"Only zoom levels between 0 and "+fT.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+t,this;case">":this.zoom="zoom && zoom > "+t;break;case">=":this.zoom="zoom && zoom >= "+t;break;case"<":this.zoom="zoom && zoom < "+t;break;case"<=":this.zoom="zoom && zoom <= "+t}return this}},{key:"toString",value:function(){for(var e="",t=0;t<=fT.Tree.Zoom.maxZoom;t++)e+=this.zoom&1<3&&(t=Array.prototype.slice.call(t,1));for(var n=this._handlers[e],o=n.length,i=0;i4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var n=t[t.length-1],o=this._handlers[e],i=o.length,a=0;a-this.EPSILON&&ethis.EPSILON||e<-this.EPSILON}},{key:"cubicAt",value:function(e,t,r,n,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*n+3*i*r)}},{key:"cubicDerivativeAt",value:function(e,t,r,n,o){var i=1-o;return 3*(((t-e)*i+2*(r-t)*o)*i+(n-r)*o*o)}},{key:"cubicRootAt",value:function(e,t,r,n,o,i){var a=n+3*(t-r)-e,s=3*(r-2*t+e),u=3*(t-e),l=e-o,c=s*s-3*a*u,f=s*u-9*a*l,p=u*u-3*s*l,h=0;if(this.isAroundZero(c)&&this.isAroundZero(f))if(this.isAroundZero(s))i[0]=0;else{var y=-u/s;y>=0&&y<=1&&(i[h++]=y)}else{var d=f*f-4*c*p;if(this.isAroundZero(d)){var b=f/c,v=-s/a+b,m=-b/2;v>=0&&v<=1&&(i[h++]=v),m>=0&&m<=1&&(i[h++]=m)}else if(d>0){var g=Math.sqrt(d),w=c*s+1.5*a*(-f+g),O=c*s+1.5*a*(-f-g),S=(-s-((w=w<0?-Math.pow(-w,this.ONE_THIRD):Math.pow(w,this.ONE_THIRD))+(O=O<0?-Math.pow(-O,this.ONE_THIRD):Math.pow(O,this.ONE_THIRD))))/(3*a);S>=0&&S<=1&&(i[h++]=S)}else{var _=(2*c*s-3*a*f)/(2*Math.sqrt(c*c*c)),P=Math.acos(_)/3,x=Math.sqrt(c),k=Math.cos(P),j=(-s-2*x*k)/(3*a),E=(-s+x*(k+this.THREE_SQRT*Math.sin(P)))/(3*a),T=(-s+x*(k-this.THREE_SQRT*Math.sin(P)))/(3*a);j>=0&&j<=1&&(i[h++]=j),E>=0&&E<=1&&(i[h++]=E),T>=0&&T<=1&&(i[h++]=T)}}return h}},{key:"cubicExtrema",value:function(e,t,r,n,o){var i=6*r-12*t+6*e,a=9*t+3*n-3*e-9*r,s=3*t-3*e,u=0;if(this.isAroundZero(a)){if(this.isNotAroundZero(i)){var l=-s/i;l>=0&&l<=1&&(o[u++]=l)}}else{var c=i*i-4*a*s;if(this.isAroundZero(c))o[0]=-i/(2*a);else if(c>0){var f=Math.sqrt(c),p=(-i+f)/(2*a),h=(-i-f)/(2*a);p>=0&&p<=1&&(o[u++]=p),h>=0&&h<=1&&(o[u++]=h)}}return u}},{key:"cubicSubdivide",value:function(e,t,r,n,o,i){var a=(t-e)*o+e,s=(r-t)*o+t,u=(n-r)*o+r,l=(s-a)*o+a,c=(u-s)*o+s,f=(c-l)*o+l;i[0]=e,i[1]=a,i[2]=l,i[3]=f,i[4]=f,i[5]=c,i[6]=u,i[7]=n}},{key:"cubicProjectPoint",value:function(e,t,r,n,o,i,a,s,u,l,c){var f,p=this.vector.create(),h=this.vector.create(),y=this.vector.create(),d=.005,b=1/0;p[0]=u,p[1]=l;for(var v=0;v<1;v+=.05){h[0]=this.cubicAt(e,r,o,a,v),h[1]=this.cubicAt(t,n,i,s,v);var m=this.vector.distSquare(p,h);m=0&&S=0&&l<=1&&(o[u++]=l)}}else{var c=a*a-4*i*s;if(this.isAroundZero(c)){var f=-a/(2*i);f>=0&&f<=1&&(o[u++]=f)}else if(c>0){var p=Math.sqrt(c),h=(-a+p)/(2*i),y=(-a-p)/(2*i);h>=0&&h<=1&&(o[u++]=h),y>=0&&y<=1&&(o[u++]=y)}}return u}},{key:"quadraticExtremum",value:function(e,t,r){var n=e+r-2*t;return 0===n?.5:(e-t)/n}},{key:"quadraticProjectPoint",value:function(e,t,r,n,o,i,a,s,u){var l,c=this.vector.create(),f=this.vector.create(),p=this.vector.create(),h=.005,y=1/0;c[0]=a,c[1]=s;for(var d=0;d<1;d+=.05){f[0]=this.quadraticAt(e,r,o,d),f[1]=this.quadraticAt(t,n,i,d);var b=this.vector.distSquare(c,f);b=0&&w0){for(var m=this.isInsidePolygon(t.pointList,b,v),g=e.holePolygonPointLists,w=!1,O=0,S=g.length;Ot+s&&a>n+s||ae+s&&i>r+s||it+f&&c>n+f&&c>i+f&&c>s+f||ce+f&&l>r+f&&l>o+f&&l>a+f||lt+l&&u>n+l&&u>i+l||ue+l&&s>r+l&&s>o+l||sr||f+c=l)return!0;if(i){var p=n;n=this.normalizeRadian(o),o=this.normalizeRadian(p)}else n=this.normalizeRadian(n),o=this.normalizeRadian(o);n>o&&(o+=l);var h=Math.atan2(u,s);return h<0&&(h+=l),h>=n&&h<=o||h+l>=n&&h+l<=o}},{key:"isInsideBrokenLine",value:function(e,t,r,n){for(var o=Math.max(t,10),i=0,a=e.length-1;ir*r}},{key:"isInsideRect",value:function(e,t,r,n,o,i){return o>=e&&o<=e+r&&i>=t&&i<=t+n}},{key:"isInsideCircle",value:function(e,t,r,n,o){return(n-e)*(n-e)+(o-t)*(o-t)t&&i>n||io?nt&&l>n&&l>i&&l>s||l1&&this.swapExtrema(),y=c.cubicAt(t,n,i,s,p[0]),v>1&&(d=c.cubicAt(t,n,i,s,p[1]))),2==v?gt&&s>n&&s>i||s=0&&f<=1){for(var p=0,h=u.quadraticAt(t,n,i,f),y=0;ya||(l[y]a?0:ir||s<-r)return 0;var c=Math.sqrt(r*r-s*s);if(u[0]=-c,u[1]=c,Math.abs(n-o)>=l){n=0,o=l;var f=i?1:-1;return a>=u[0]+e&&a<=u[1]+e?f:0}if(i){var p=n;n=this.normalizeRadian(o),o=this.normalizeRadian(p)}else n=this.normalizeRadian(n),o=this.normalizeRadian(o);n>o&&(o+=l);for(var h=0,y=0;y<2;y++){var d=u[y];if(d+e>a){var b=Math.atan2(s,d),v=i?1:-1;b<0&&(b=l+b),(b>=n&&b<=o||b+l>=n&&b+l<=o)&&(b>Math.PI/2&&b<1.5*Math.PI&&(v=-v),h+=v)}}return h}},{key:"isInsidePath",value:function(e,t,r,n,o){for(var i=0,a=0,s=0,u=0,l=0,c=!0,f=!0,p="stroke"===(r=r||"fill")||"both"===r,h="fill"===r||"both"===r,y=0;y0&&(h&&(i+=this.windingLine(a,s,u,l,n,o)),0!==i))return!0;u=b[b.length-2],l=b[b.length-1],c=!1,f&&"A"!==d.command&&(f=!1,a=u,s=l)}switch(d.command){case"M":a=b[0],s=b[1];break;case"L":if(p&&this.isInsideLine(a,s,b[0],b[1],t,n,o))return!0;h&&(i+=this.windingLine(a,s,b[0],b[1],n,o)),a=b[0],s=b[1];break;case"C":if(p&&this.isInsideCubicStroke(a,s,b[0],b[1],b[2],b[3],b[4],b[5],t,n,o))return!0;h&&(i+=this.windingCubic(a,s,b[0],b[1],b[2],b[3],b[4],b[5],n,o)),a=b[4],s=b[5];break;case"Q":if(p&&this.isInsideQuadraticStroke(a,s,b[0],b[1],b[2],b[3],t,n,o))return!0;h&&(i+=this.windingQuadratic(a,s,b[0],b[1],b[2],b[3],n,o)),a=b[2],s=b[3];break;case"A":var v=b[0],m=b[1],g=b[2],w=b[3],O=b[4],S=b[5],_=Math.cos(O)*g+v,P=Math.sin(O)*w+m;f?(f=!1,u=_,l=P):i+=this.windingLine(a,s,_,P);var x=(n-v)*w/g+v;if(p&&this.isInsideArcStroke(v,m,w,O,O+S,1-b[7],t,x,o))return!0;h&&(i+=this.windingArc(v,m,w,O,O+S,1-b[7],x,o)),a=Math.cos(O+S)*g+v,s=Math.sin(O+S)*w+m;break;case"z":if(p&&this.isInsideLine(a,s,u,l,t,n,o))return!0;c=!0}}return h&&(i+=this.windingLine(a,s,u,l,n,o)),0!==i}},{key:"getTextWidth",value:function(e,t){var r=e+":"+t;if(this._textWidthCache[r])return this._textWidthCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var n=0,o=0,i=(e=(e+"").split("\n")).length;othis.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),n}},{key:"getTextHeight",value:function(e,t){var r=e+":"+t;if(this._textHeightCache[r])return this._textHeightCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var n=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[r]=n,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),n}}])&&xC(t.prototype,r),n&&xC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function jC(e,t){for(var r=0;ro&&(o=u[0]),u[1]a&&(a=u[1])}t[0]=n,t[1]=i,r[0]=o,r[1]=a}}},{key:"cubeBezier",value:function(e,t,r,n,o,i){var a=new PC,s=[];a.cubicExtrema(e[0],t[0],r[0],n[0],s);for(var u=0;uo&&!i?o+=2*Math.PI:nn&&(f[0]=Math.cos(h)*r+e,f[1]=Math.sin(h)*r+t,u.min(a,f,a),u.max(s,f,s))}}])&&jC(t.prototype,r),n&&jC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function TC(e,t){for(var r=0;r=200&&o.status<300||304===o.status?t&&t(o.responseText):r&&r(),o.onreadystatechange=new Function,o=null)},o.send(null)}}])&&LC(t.prototype,r),n&&LC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function NC(e,t){for(var r=0;r1)for(var t in arguments)console.log(arguments[t])}}var t,r,n;return t=e,(r=[{key:"destory",value:function(){return!0}}])&&FC(t.prototype,r),n&&FC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function GC(e,t){for(var r=0;ra-2?a-1:h+1][0]+i[0],t[h>a-2?a-1:h+1][1]+i[1]],m=[t[h>a-3?a-1:h+2][0]+i[0],t[h>a-3?a-1:h+2][1]+i[1]]);var g=y*y,w=y*g;s.push([O(d[0],b[0],v[0],m[0],y,g,w),O(d[1],b[1],v[1],m[1],y,g,w)])}return s;function O(e,t,r,n,o,i,a){var s=.5*(r-e),u=.5*(n-t);return(2*(t-r)+s+u)*a+(-3*(t-r)-2*s-u)*i+s*o+t}}},{key:"SUtil_dashedLineTo",value:function(e,t,r,n,o,i,a){var s=[5,5];if(i="number"!=typeof i?5:i,e.setLineDash)return s[0]=i,s[1]=i,a&&a instanceof Array?e.setLineDash(a):e.setLineDash(s),e.moveTo(t,r),void e.lineTo(n,o);var u=n-t,l=o-r,c=Math.floor(Math.sqrt(u*u+l*l)/i);u/=c,l/=c;for(var f=!0,p=0;p-5e-5&&e<5e-5}qC.Util_vector.sub(t,e,this.position),n(t[0])&&n(t[1])||(qC.Util_vector.normalize(t,t),r[2]=t[0]*this.scale[1],r[3]=t[1]*this.scale[1],r[0]=t[1]*this.scale[0],r[1]=-t[0]*this.scale[0],r[4]=this.position[0],r[5]=this.position[1],this.decomposeTransform())})}var t,r,n;return t=e,(r=[{key:"destroy",value:function(){this.position=null,this.rotation=null,this.scale=null,this.needLocalTransform=null,this.needTransform=null}},{key:"updateNeedTransform",value:function(){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)}},{key:"updateTransform",value:function(){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||qC.Util_matrix.create();if(qC.Util_matrix.identity(t),this.needLocalTransform){if(o(this.scale[0])||o(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;var r=o(e[0])||o(e[1]);r&&qC.Util_matrix.translate(t,t,e),qC.Util_matrix.scale(t,t,this.scale),r&&(e[0]=-e[0],e[1]=-e[1],qC.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;var n=o(e[0])||o(e[1]);n&&qC.Util_matrix.translate(t,t,e),qC.Util_matrix.rotate(t,t,this.rotation[0]),n&&(e[0]=-e[0],e[1]=-e[1],qC.Util_matrix.translate(t,t,e))}}else 0!=+this.rotation&&qC.Util_matrix.rotate(t,t,this.rotation);(o(this.position[0])||o(this.position[1]))&&qC.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?qC.Util_matrix.mul(this.transform,this.parent.transform,this.transform):qC.Util_matrix.copy(this.transform,this.parent.transform))}function o(e){return e>5e-5||e<-5e-5}}},{key:"setTransform",value:function(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}},{key:"decomposeTransform",value:function(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],r=this.position,n=this.scale,o=this.rotation;a(t-1)&&(t=Math.sqrt(t));var i=e[2]*e[2]+e[3]*e[3];a(i-1)&&(i=Math.sqrt(i)),r[0]=e[4],r[1]=e[5],n[0]=t,n[1]=i,n[2]=n[3]=0,o[0]=Math.atan2(-e[1]/i,e[0]/t),o[1]=o[2]=0}function a(e){return e>5e-5||e<-5e-5}}}])&&HC(t.prototype,r),n&&HC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function YC(e){"@babel/helpers - typeof";return(YC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function XC(e,t){for(var r=0;r0&&(this.setCtxGlobalAlpha(e,"stroke",r),e.stroke()),this.setCtxGlobalAlpha(e,"reset",r);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",r),r.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",r);break;default:this.setCtxGlobalAlpha(e,"fill",r),e.fill(),this.setCtxGlobalAlpha(e,"reset",r)}this.drawText(e,r,this.style),this.afterBrush(e)}},{key:"beforeBrush",value:function(e,t){var r=this.style;return this.brushTypeOnly&&(r.brushType=this.brushTypeOnly),t&&(r=this.getHighlightStyle(r,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(r.strokeColor=r.strokeColor||r.color),e.save(),this.doClip(e),this.setContext(e,r),this.setTransform(e),r}},{key:"afterBrush",value:function(e){e.restore()}},{key:"setContext",value:function(e,t){for(var r=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],n=0,o=r.length;n=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height&&qC.Util_area.isInside(this,this.style,e,t)}},{key:"drawText",value:function(e,t,r){if(void 0!==t.text&&!1!==t.text){var n=t.textColor||t.color||t.strokeColor;e.fillStyle=n;var o,a,s,u,l=10,c=t.textPosition||this.textPosition||"top",f=[];switch(f=this.refOriginalPosition&&2===this.refOriginalPosition.length?this.refOriginalPosition:[0,0],c){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var p=(r||t).__rect||this.getRect(r||t);switch(c){case"inside":s=p.x+p.width/2,u=p.y+p.height/2,o="center",a="middle","stroke"!=t.brushType&&n==t.color&&(e.fillStyle="#fff");break;case"left":s=p.x-l,u=p.y+p.height/2,o="end",a="middle";break;case"right":s=p.x+p.width+l,u=p.y+p.height/2,o="start",a="middle";break;case"top":s=p.x+p.width/2,u=p.y-l,o="center",a="bottom";break;case"bottom":s=p.x+p.width/2,u=p.y+p.height+l,o="center",a="top"}}break;case"start":case"end":var h=0,y=0,d=0,b=0;if(void 0!==t.pointList){var v=t.pointList;if(v.length<2)return;var m=v.length;switch(c){case"start":h=v[0][0]+f[0],y=v[1][0]+f[0],d=v[0][1]+f[1],b=v[1][1]+f[1];break;case"end":h=v[m-2][0]+f[0],y=v[m-1][0]+f[0],d=v[m-2][1]+f[1],b=v[m-1][1]+f[1]}}else h=t.xStart+f[0]||0,y=t.xEnd+f[0]||0,d=t.yStart+f[1]||0,b=t.yEnd+f[1]||0;switch(c){case"start":o=hn&&(n=u[0]),u[1]o&&(o=u[1]))}return e.__rect={x:t,y:r,width:n-t,height:o-r},e.__rect}},{key:"getRectNoRotation",value:function(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition,n=qC.Util_area.getTextHeight("ZH",e.textFont),o=qC.Util_area.getTextWidth(e.text,e.textFont),i=qC.Util_area.getTextHeight(e.text,e.textFont),a=e.x+r[0];"end"==e.textAlign||"right"==e.textAlign?a-=o:"center"==e.textAlign&&(a-=o/2),t="top"==e.textBaseline?e.y+r[1]:"bottom"==e.textBaseline?e.y+r[1]-i:e.y+r[1]-i/2;var s,u=!1;if(e.maxWidth){var l=parseInt(e.maxWidth);l-1&&(o+=!0===u?n/3*(o/s):n/3));return{x:a,y:t,width:o,height:i}}},{key:"getTextBackground",value:function(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var n=this.getRectNoRotation(e),o=e.x+r[0],i=e.y+r[1],a=[];if(e.textRotation&&0!==e.textRotation){var s=e.textRotation,u=this.getRotatedLocation(n.x,n.y,o,i,s),l=this.getRotatedLocation(n.x+n.width,n.y,o,i,s),c=this.getRotatedLocation(n.x+n.width,n.y+n.height,o,i,s),f=this.getRotatedLocation(n.x,n.y+n.height,o,i,s);a.push(u),a.push(l),a.push(c),a.push(f)}else{var p=[n.x,n.y],h=[n.x+n.width,n.y],y=[n.x+n.width,n.y+n.height],d=[n.x,n.y+n.height];a.push(p),a.push(h),a.push(y),a.push(d)}return e.__textBackground=a,e.__textBackground}},{key:"getRotatedLocation",value:function(e,t,r,n,o){var i,a,s=new Array;return t=-t,n=-n,o=-o,i=(e-r)*Math.cos(o/180*Math.PI)-(t-n)*Math.sin(o/180*Math.PI)+r,a=(e-r)*Math.sin(o/180*Math.PI)+(t-n)*Math.cos(o/180*Math.PI)+n,s[0]=i,s[1]=-a,s}}])&&cR(t.prototype,r),n&&cR(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function bR(e){"@babel/helpers - typeof";return(bR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vR(e,t){for(var r=0;r0&&("stroke"==r.brushType||"both"==r.brushType)&&(n||(e.beginPath(),this.buildPath(e,r)),this.setCtxGlobalAlpha(e,"stroke",r),e.stroke(),this.setCtxGlobalAlpha(e,"reset",r)),this.drawText(e,r,this.style);var o=ye.cloneObject(r);if(o.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var i=this.holePolygonPointLists,a=i.length,s=0;s0&&("stroke"==o.brushType||"both"==o.brushType)?(n||(e.beginPath(),this.buildPath(e,o)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",o),e.stroke(),this.setCtxGlobalAlpha(e,"reset",o)):e.globalCompositeOperation="source-over"}e.restore()}},{key:"buildPath",value:function(e,t){t.showShadow&&(e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY),this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,n=t.pointList;if(!(n.length<2))if(t.smooth&&"spline"!==t.smooth){var o,i,a,s=qC.SUtil_smoothBezier(n,t.smooth,!0,t.smoothConstraint,r);e.moveTo(n[0][0]+r[0],n[0][1]+r[1]);for(var u=n.length,l=0;li&&(i=u[l][0]+r[0]),u[l][1]+r[1]s&&(s=u[l][1]+r[1]);return n="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(o-n/2),y:Math.round(a-n/2),width:i-o+n,height:s-a+n},e.__rect}}])&&PR(t.prototype,r),n&&PR(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function CR(e){"@babel/helpers - typeof";return(CR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RR(e,t){for(var r=0;rc&&(r*=c/(a=r+n),n*=c/a),o+i>c&&(o*=c/(a=o+i),i*=c/a),n+o>f&&(n*=f/(a=n+o),o*=f/a),r+i>f&&(r*=f/(a=r+i),i*=f/a),e.moveTo(u+r,l),e.lineTo(u+c-n,l),0!==n&&e.quadraticCurveTo(u+c,l,u+c,l+n),e.lineTo(u+c,l+f-o),0!==o&&e.quadraticCurveTo(u+c,l+f,u+c-o,l+f),e.lineTo(u+i,l+f),0!==i&&e.quadraticCurveTo(u,l+f,u,l+f-i),e.lineTo(u,l+r),0!==r&&e.quadraticCurveTo(u,l,u+r,l)}},{key:"buildPath",value:function(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+r[0],t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1])),e.closePath()}},{key:"getRect",value:function(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+r[0]-t/2),y:Math.round(e.y+r[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}}])&&qR(t.prototype,r),n&&qR(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function ZR(e){"@babel/helpers - typeof";return(ZR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KR(e,t){for(var r=0;r1?qC.Util_computeBoundingBox.arc(a,s,u,c,f,!p,r,o):(r[0]=o[0]=a,r[1]=o[1]=s),qC.Util_computeBoundingBox.arc(a,s,l,c,f,!p,n,i),qC.Util_vector.min(r,r,n),qC.Util_vector.max(o,o,i),e.__rect={x:r[0],y:r[1],width:o[0]-r[0],height:o[1]-r[1]},e.__rect}}])&&KR(t.prototype,r),n&&KR(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function oA(e,t){for(var r=0;r=15){var p=parseInt(i.axis3DParameter),h=[o[0]-p,o[1]+p];i.axisUseArrow?(c.push([h[0]+1.5,h[1]-7.5]),c.push([h[0]-1,h[1]+1]),c.push([h[0]+7.5,h[1]-1.5]),f.push([h[0],h[1]])):f.push([h[0],h[1]]),f.push([o[0],o[1]])}f.push([o[2]+5,o[1]])}else{var y=Math.abs(o[1]-o[3])/l,d=o[3];f.push([o[0],d-5]);for(var b=0;b=15){var m=parseInt(i.axis3DParameter),g=[o[0]-m,o[1]+m];i.axisUseArrow?(c.push([g[0]+1.5,g[1]-7.5]),c.push([g[0]-1,g[1]+1]),c.push([g[0]+7.5,g[1]-1.5]),f.push([g[0],g[1]])):f.push([g[0],g[1]]),f.push([o[0],o[1]])}f.push([o[2]+5,o[1]])}if(i.axisUseArrow){var w=[[o[2]+5,o[1]+4],[o[2]+13,o[1]],[o[2]+5,o[1]-4]],O=[[o[0]-4,o[3]-5],[o[0],o[3]-13],[o[0]+4,o[3]-5]],S=new DT(w);S.style={fillColor:"#008acd"},ye.copyAttributesWithClip(S.style,i.axisStyle),s.push(e.createShape(S));var _=new DT(O);if(_.style={fillColor:"#008acd"},ye.copyAttributesWithClip(_.style,i.axisStyle),s.push(e.createShape(_)),i.axis3DParameter&&!isNaN(i.axis3DParameter)&&i.axis3DParameter>=15){var P=new DT(c);P.style={fillColor:"#008acd"},ye.copyAttributesWithClip(P.style,i.axisStyle),s.push(e.createShape(P))}}var x=new CT(f);x.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},i.axisStyle&&ye.copyAttributesWithClip(x.style,i.axisStyle),x.clickable=!1,x.hoverable=!1;var k=[e.createShape(x)],j=[];if(i.axisYLabels&&i.axisYLabels.length&&i.axisYLabels.length>0){var E=i.axisYLabels,T=E.length,C=[0,0];if(i.axisYLabelsOffset&&i.axisYLabelsOffset.length&&(C=i.axisYLabelsOffset),1==T){var R=new oC(o[0]-5+C[0],o[3]+C[1],E[0]);R.style={labelAlign:"right"},i.axisYLabelsStyle&&ye.copyAttributesWithClip(R.style,i.axisYLabelsStyle),R.clickable=!1,R.hoverable=!1,j.push(e.createShape(R))}else for(var A=o[3],M=Math.abs(o[1]-o[3])/(T-1),L=0;L0){var D=i.axisXLabels,F=D.length,B=[0,0];if(i.axisXLabelsOffset&&i.axisXLabelsOffset.length&&(B=i.axisXLabelsOffset),n&&n.xPositions&&n.xPositions.length&&n.xPositions.length==F)for(var G=n.xPositions,U=0;U=0&&r[o]&&ye.copyAttributesWithClip(a,r[o]),n&&n.length&&void 0!==i)for(var s=n,u=s.length,l=parseFloat(i),c=0;c=l[2]||l[1]<=l[3])&&(this.DVBOrigonPoint=[l[0],l[3]],this.DVBWidth=Math.abs(l[2]-l[0]),this.DVBHeight=Math.abs(l[1]-l[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-a[0],this.DVBOrigonPoint[1]-a[1]],!0)}},{key:"resetLocation",value:function(e){e&&(this.lonlat=e);var t=this.getLocalXY(this.lonlat);t[0]+=this.XOffset,t[1]+=this.YOffset,this.location=t;var r=this.width,n=this.height,o=this.location;return this.chartBounds=new we(o[0]-r/2,o[1]+n/2,o[0]+r/2,o[1]-n/2),this.resetLinearGradient(),o}},{key:"resetLinearGradient",value:function(){}},{key:"shapesConvertToRelativeCoordinate",value:function(){for(var e=this.shapes,t=this.location,r=0,n=e.length;r=0?n.push(parseFloat(o[a].toString()).toFixed(r)):n.push(parseFloat(o[a].toString()))}catch(e){throw new Error("not a number")}return n.length===t.length&&n};var OA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mA(e,t)}(i,yA);var t,r,n,o=gA(i);function i(e,t,r,n,a){var s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(s=o.call(this,e,t,r,n,a)).CLASS_NAME="SuperMap.Feature.Theme.Bar",s}return t=i,(r=[{key:"destroy",value:function(){vA(wA(i.prototype),"destroy",this).call(this)}},{key:"assembleShapes",value:function(){var e={showShadow:!0,shadowBlur:8,shadowColor:"rgba(100,100,100,0.8)",shadowOffsetX:2,shadowOffsetY:2},t=this.setting;if(t.barLinearGradient||(t.barLinearGradient=[["#00FF00","#00CD00"],["#00CCFF","#5E87A2"],["#00FF66","#669985"],["#CCFF00","#94A25E"],["#FF9900","#A2945E"]]),t.dataViewBoxParameter||(void 0===t.useAxis||t.useAxis?t.dataViewBoxParameter=[45,15,15,15]:t.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var r=this.DVBCodomain;this.DVBUnitValue=(r[1]-r[0])/this.DVBHeight;var n=this.dataViewBox,o=this.dataValues;if(!(o.length<1)){for(var i=0,a=o.length;ir[1])return;var s=this.calculateXShapeInfo();if(s){var u=s.xPositions,l=s.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(iA.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(iA.GraphAxis(this.shapeFactory,n,t,s)));for(var c=0;c=t.length&&(r%=t.length);var u=t[r][0],l=t[r][1],c=(new ZE).getLinearGradient(a,0,s,0,[[0,u],[1,l]]);o.style.color=c}}}}])&&bA(t.prototype,r),n&&bA(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function SA(e){"@babel/helpers - typeof";return(SA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _A(e,t){for(var r=0;rt[1])return;var a=this.calculateXShapeInfo();if(a){var s=a.xPositions,u=a.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(iA.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(iA.GraphAxis(this.shapeFactory,r,e,a)));for(var l=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10,c=0;c=s[2]||s[1]<=s[3])&&(this.DVBOrigonPoint=[s[0],s[3]],this.DVBWidth=Math.abs(s[2]-s[0]),this.DVBHeight=Math.abs(s[1]-s[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-o[0],this.DVBOrigonPoint[1]-o[1]],!0)}}])&&CA(t.prototype,r),n&&CA(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function NA(e){"@babel/helpers - typeof";return(NA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DA(e,t){for(var r=0;r0?this.DVBUnitValue=e.maxR/(o[1]-o[0]):this.DVBUnitValue=e.maxR;var i=this.DVBUnitValue,a=n[0]*i+e.minR;if(this.width=2*a,this.height=2*a,this.initBaseParameter()&&(!o||!(n[0]o[1]))){var s=this.DVBCenterPoint,u=new mC(s[0],s[1],a);u.style=iA.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?u.style.fillColor=e.fillColor:u.style.fillColor="#ff9277",u.highlightStyle=iA.ShapeStyleTool(null,e.circleHoverStyle),void 0!==e.circleHoverAble&&(u.hoverable=e.circleHoverAble),void 0!==e.circleClickAble&&(u.clickable=e.circleClickAble),u.refDataID=this.data.id,u.dataInfo={field:this.fields[0],r:a,value:n[0]},this.shapes.push(this.shapeFactory.createShape(u)),this.shapesConvertToRelativeCoordinate()}}}])&&DA(t.prototype,r),n&&DA(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function JA(e){"@babel/helpers - typeof";return(JA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zA(e,t){for(var r=0;rr[1])return null;a=u[f],s=t[1]-(o[f]-r[0])/n;var h=new _T(a,s);h.style=iA.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,f,o[f]),h.highlightStyle=iA.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(h.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(h.clickable=e.pointClickAble),h.refDataID=this.data.id,h.dataInfo={field:this.fields[f],value:o[f]},c.push(this.shapeFactory.createShape(h));var y=[a,s];l.push(y)}var d=new CT(l);d.style=iA.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),d.clickable=!1,d.hoverable=!1;var b=this.shapeFactory.createShape(d);this.shapes.push(b),this.shapes=this.shapes.concat(c),this.shapesConvertToRelativeCoordinate()}}}}},{key:"calculateXShapeInfo",value:function(){var e,t=this.dataViewBox,r=this.setting,n=this.dataValues.length;if(n<1)return null;var o=[],i=this.DVBWidth,a=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var s=i-((e=r.xShapeBlank)[0]+e[1]);if(s<=n)return null;a=s/(n-1)}else e=[a=i/(n+1),a,a];for(var u=0,l=0;ln[1])return;for(var i=0,a=0;a=360&&(c=359.9999999);var d=new ZT(u[0],u[1],p,l,c);if(void 0===e.sectorStyleByFields){var b=h%t.length;d.style=iA.ShapeStyleTool(null,e.sectorStyle,t,null,b)}else d.style=iA.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,h,r[h]);d.highlightStyle=iA.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[h],value:r[h]},this.shapes.push(this.shapeFactory.createShape(d)),l=c}this.shapesConvertToRelativeCoordinate()}}}}])&&ZA(t.prototype,r),n&&ZA(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function nM(e){"@babel/helpers - typeof";return(nM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oM(e,t){for(var r=0;rr[1])return null;a=u[l],s=t[1]-(o[l]-r[0])/n;var f=new _T(a,s);f.style=iA.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,l,o[l]),f.highlightStyle=iA.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(f.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(f.clickable=e.pointClickAble),f.refDataID=this.data.id,f.dataInfo={field:this.fields[l],value:o[l]},this.shapes.push(this.shapeFactory.createShape(f))}this.shapesConvertToRelativeCoordinate()}}}},{key:"calculateXShapeInfo",value:function(){var e,t=this.dataViewBox,r=this.setting,n=this.dataValues.length;if(n<1)return null;var o=[],i=this.DVBWidth,a=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var s=i-((e=r.xShapeBlank)[0]+e[1]);if(s<=n)return null;a=s/(n-1)}else e=[a=i/(n+1),a,a];for(var u=0,l=0;ln[1])return;for(var i=0,a=0;a=0&&t.innerRingRadius0){var l=i[i.length-1];if(Math.abs(l[0]-n[0])<=a&&Math.abs(l[1]-n[1])<=a)continue}i.push(n)}if(i.length<2)return null;var c=new Object;(c=ye.copyAttributesWithClip(c,this.style,["pointList"])).pointList=i;var f=new NR({style:c,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,this.shapeOptions&&ye.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}},{key:"multiPointToTF",value:function(e){for(var t=e.components,r=[],n=[],o=this.location,i=[],a=this.nodesClipPixel,s=0;s0){var l=i[i.length-1];if(Math.abs(l[0]-n[0])<=a&&Math.abs(l[1]-n[1])<=a)continue}i.push(n);var c=new Object;c.r=6,(c=ye.copyAttributesWithClip(c,this.style)).x=n[0],c.y=n[1];var f=new uR({style:c,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(f.highlightStyle=this.highlightStyle),f.refOriginalPosition=o,f.refDataID=this.data.id,f.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}}},{key:"multiLineStringToTF",value:function(e){for(var t=e.components,r=0;r0){var p=i[i.length-1];if(Math.abs(p[0]-n[0])<=u&&Math.abs(p[1]-n[1])<=u)continue}i.push(n)}}else{a=[];for(var h=0;h0){var y=a[a.length-1];if(Math.abs(y[0]-n[0])<=u&&Math.abs(y[1]-n[1])<=u)continue}a.push(n)}}a.length<2||s.push(a)}if(!(i.length<2)){var d={};(d=ye.copyAttributesWithClip(d,this.style,["pointList"])).pointList=i;var b=new TR({style:d,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(b.highlightStyle=this.highlightStyle),b.refOriginalPosition=this.location,b.refDataID=this.data.id,b.isHoverByRefDataID=this.isMultiHover,s.length>0&&(b.holePolygonPointLists=s),this.shapeOptions&&ye.copyAttributesWithClip(b,this.shapeOptions),this.shapes.push(b)}}},{key:"rectangleToTF",value:function(e){var t=this.location,r=new me(e.x,e.y),n=this.layer.map.getResolution(),o=this.getLocalXY(r),i=new Object;i.r=6,(i=ye.copyAttributesWithClip(i,this.style)).x=o[0]-t[0],i.y=o[1]-t[1]-2*e.width/n,i.width=e.width/n,i.height=e.height/n;var a=new QR({style:i,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(a.highlightStyle=this.highlightStyle),a.refOriginalPosition=t,a.refDataID=this.data.id,a.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(a,this.shapeOptions),this.shapes.push(a)}},{key:"geoTextToTF",value:function(e){var t=this.location,r=this.getLocalXY(e),n=new Object;n.r=6,(n=ye.copyAttributesWithClip(n,this.style,["x","y","text"])).x=r[0]-t[0],n.y=r[1]-t[1],n.text=e.text;var o=new dR({style:n,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(o.highlightStyle=this.highlightStyle),o.refOriginalPosition=t,o.refDataID=this.data.id,o.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(o,this.shapeOptions),this.shapes.push(o)}},{key:"updateAndAddShapes",value:function(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,r=0,n=this.shapes.length;r0}},{key:"addRoot",value:function(e){e instanceof MM&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}},{key:"delRoot",value:function(e){if(void 0===e){for(var t=0;t=0&&(this.delFromMap(i.id),this._roots.splice(a,1),i instanceof MM&&i.delChildrenFromStorage(this))}}},{key:"addToMap",value:function(e){return e instanceof MM&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this}},{key:"get",value:function(e){return this._elements[e]}},{key:"delFromMap",value:function(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof MM&&(t._storage=null)),this}},{key:"dispose",value:function(){this._elements=null,this._roots=null,this._hoverElements=null}}])&&LM(t.prototype,r),n&&LM(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function NM(e){"@babel/helpers - typeof";return(NM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DM(e,t){return(DM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function FM(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=BM(e);if(t){var o=BM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===NM(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function BM(e){return(BM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function GM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UM(e,t){for(var r=0;r0&&e>this._zlevelList[0]){for(o=0;oe);o++);n=this._layers[this._zlevelList[o]]}this._zlevelList.splice(o+1,0,e),t=new zM(ye.createUniqueID("_levelLayer_"+e),this);var i=n?n.dom:this._bgDom;i.nextSibling?i.parentNode.insertBefore(t.dom,i.nextSibling):i.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new XE).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}},{key:"getLayers",value:function(){return this._layers}},{key:"_updateLayerStatus",value:function(e){var t=this._layers,r={};for(var n in t)"hover"!==n&&(r[n]=t[n].elCount,t[n].elCount=0);for(var o=0;o0?1.1:1/1.1,r=this.painter.getLayers(),n=!1;for(var o in r)if("hover"!==o){var i=r[o],a=i.position;if(i.zoomable){i.__zoom=i.__zoom||1;var s=i.__zoom;s*=t,t=(s=Math.max(Math.min(i.maxZoom,s),i.minZoom))/i.__zoom,i.__zoom=s,a[0]-=(this._mouseX-a[0])*(t-1),a[1]-=(this._mouseY-a[1])*(t-1),i.scale[0]*=t,i.scale[1]*=t,i.dirty=!0,n=!0}}n&&this.painter.refresh(),this._dispatchAgency(this._lastHover,DC.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=qC.Util_event.getX(e),this._mouseY=qC.Util_event.getY(e);var t=this._mouseX-this._lastX,r=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(e),this._processDragLeave(e)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var n="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,r),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var o=this.painter.getLayers(),i=!1;for(var a in o)if("hover"!==a){var s=o[a];s.panable&&(n="move",s.position[0]+=t,s.position[1]+=r,i=!0,s.dirty=!0)}i&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?n="move":this._hasfound&&this._lastHover.clickable&&(n="pointer"),this.root.style.cursor=n,this._dispatchAgency(this._lastHover,DC.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(DC.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,DC.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,DC.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&&qC.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment=0;o--){var i=r[o];if(void 0!==i.zlevel&&(e=this.painter.getLayer(i.zlevel,e),n[0]=this._mouseX,n[1]=this._mouseY,e.needTransform&&(qC.Util_matrix.invert(t,e.transform),qC.Util_vector.applyTransform(n,n,t))),this._findHover(i,n[0],n[1]))break}}},{key:"_mobildFindFixed",value:function(e){var t=[{x:10},{x:-20},{x:10,y:10},{y:-20}];this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var r=0;!this._lastHover&&r=0&&this._clips.splice(t,1)}},{key:"_update",value:function(){for(var e=(new Date).getTime(),t=e-this._time,r=this._clips,n=r.length,o=[],i=[],a=0;a=0&&!(d[w]<=a);w--);w=Math.min(w,l-2)}else{for(w=k;wa);w++);w=Math.min(w-1,l-2)}k=w,j=a;var s=d[w+1]-d[w];if(0!==s){var c,y;for(O=(a-d[w])/s,i?(_=b[w],S=b[0===w?w:w-1],P=b[w>l-2?l-1:w+1],x=b[w>l-3?l-1:w+2],f?cL._catmullRomInterpolateArray(S,_,P,x,O,O*O,O*O*O,n(e,u),h):(c=p?cL.rgba2String(E):cL._catmullRomInterpolate(S,_,P,x,O,O*O,O*O*O),r(e,u,c))):f?cL._interpolateArray(b[w],b[w+1],O,n(e,u),h):(p?(cL._interpolateArray(b[w],b[w+1],O,E,1),y=cL.rgba2String(E)):y=cL._interpolateNumber(b[w],b[w+1],O),r(e,u,y)),w=0;w1&&void 0!==arguments[1]?arguments[1]:"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}}])&&SL(t.prototype,r),n&&SL(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),PL=function(){try{return echarts}catch(e){return{}}}(),xL={"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!"},"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:"获取数据失败!"},code:null,defaultCode:"en-US",getCode:function(){return xL.code||xL.setCode(),xL.code},setCode:function(){var e=this.getLanguageFromCookie();e||(e=xL.defaultCode,e="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage),0===e.indexOf("zh")&&(e="zh-CN"),0===e.indexOf("en")&&(e="en-US"),xL.code=e},getLanguageFromCookie:function(){for(var e=document.cookie.split(";"),t=0;t0){var a=i.SheetNames[0],s=kL.utils.sheet_to_csv(i.Sheets[a]);t&&t.call(n,s)}}catch(e){r&&r.call(n,e)}},o.onerror=function(e){r&&r.call(n,e)},this.rABF&&o.readAsArrayBuffer(e.file)},processDataToGeoJson:function(e,t,r,n,o){var i=null;if("EXCEL"===e||"CSV"===e)i=this.processExcelDataToGeoJson(t),r&&r.call(o,i);else if("JSON"===e||"GEOJSON"===e){var a=t;"string"==typeof a&&(a=JSON.parse(a)),"ISERVER"===a.type?i=a.data.recordsets[0].features:"FeatureCollection"===a.type?i=a:n&&n.call(o,xL.i18n("msg_dataInWrongGeoJSONFormat")),r&&r.call(o,i)}else n&&n.call(o,xL.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson:function(e){for(var t=this.string2Csv(e),r=t.colTitles,n=-1,o=-1,i=0,a=r.length;i0?(n.dataItemServices.forEach(function(n){if("RESTDATA"===n.serviceType&&"PUBLISHED"===n.serviceStatus)o=n;else{if("RESTMAP"!==n.serviceType||"PUBLISHED"!==n.serviceStatus)return void r.getDatafromContent(e,t);o=n}}),o&&r.getDatafromRest(o.serviceType,o.address,t)):r.getDatafromContent(e,t):r._fireFailedEvent(n)}).catch(function(e){console.log(e),r._fireFailedEvent(e)})}},{key:"getDatafromContent",value:function(e,t){var r=this,n={result:{}},o=this;e+="/content.json?pageSize=9999999¤tPage=1",vn.get(e,null,{withCredentials:this.datasets.withCredentials}).then(function(e){return e.json()}).then(function(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(xL.i18n("msg_jsonResolveFiled"));var i=r._formatGeoJSON(e.content);n.result.features={type:e.content.type,features:i}}else if("EXCEL"===e.type||"CSV"===e.type){var a=r._excelData2Feature(e.content);n.result.features={type:"FeatureCollection",features:a}}t(n,"content")}}else o._fireFailedEvent(e)},this).catch(function(e){console.log(e),o._fireFailedEvent(e)})}},{key:"getDatafromRest",value:function(e,t,r){var n=this,o=this.datasets.withCredentials;if("RESTDATA"===e){var i,a,s="".concat(t,"/data/datasources");vn.get(s,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){i=e.datasourceNames[0],s="".concat(t,"/data/datasources/").concat(i,"/datasets"),vn.get(s,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){return a=e.datasetNames[0],n.getDatafromRestData("".concat(t,"/data"),[i+":"+a],r),[i+":"+a]}).catch(function(e){n._fireFailedEvent(e)})}).catch(function(e){n._fireFailedEvent(e)})}else{var u,l,c,f="".concat(t,"/maps");vn.get(f,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){u=e[0].name,c=e[0].path,f=f="".concat(t,"/maps/").concat(u,"/layers"),vn.get(f,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){return l=e[0].subLayers.layers[0].caption,n.getDatafromRestMap(l,c,r),l}).catch(function(e){n._fireFailedEvent(e)})}).catch(function(e){n._fireFailedEvent(e)})}}},{key:"getDatafromRestData",value:function(e,t,r){var n=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,function(e){r(e,"RESTDATA")},function(e){console.log(e),n._fireFailedEvent(e)})}},{key:"getDatafromRestMap",value:function(e,t,r){var n=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,function(e){r(e,"RESTMAP")},function(e){console.log(e),n._fireFailedEvent(e)})}},{key:"_getFeatureBySQL",value:function(e,t,r,n,o){var i,a,s={name:t.join().replace(":","@")};Object.assign(s,r),i=new _i(s),a=new ny({queryParameter:i,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),new cy(e).processAsync(a,function(e){"processCompleted"===e.type?n&&n(e):o&&o(e)})}},{key:"_queryFeatureBySQL",value:function(e,t,r,n,o,i,a,u,l,c){var f,p,h={name:t};Object.assign(h,r),f=new _i(h),n&&(f.fields=n);var y={queryParams:[f]};c&&(y.queryOption=s.ATTRIBUTE),u&&(y.startRecord=u),l&&(y.expectCount=l),o&&(y.prjCoordSys={epsgCode:o}),p=new Ow(y),this._queryBySQL(e,p,function(e){"processCompleted"===e.type?i(e):a(e)})}},{key:"_queryBySQL",value:function(e,t,r,n){new Ew(e,{format:this._processFormat(n)}).processAsync(t,r)}},{key:"_processFormat",value:function(e){return e||o.GEOJSON}},{key:"_formatGeoJSON",value:function(e){var t=e.features;return t.forEach(function(e,t){e.properties.index=t}),t}},{key:"_excelData2Feature",value:function(e){for(var t=e.colTitles,r=-1,n=-1,o=0,i=t.length;o=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function RL(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&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})})}},{key:"getDatasetInfo",value:function(e){var t=this;this.createChart=e,this.datasets&&this._checkUrl(this.datasets.url)&&(this.chartModel=new TL(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:function(e){t.events.triggerEvent("getdatafailed",e)}}))}},{key:"_getDatasetInfoSuccess",value:function(e){var t=this.datasets.url,r=t.indexOf("rest");if(r>0){var n=t.indexOf("/",r+5),o=t.substring(r+5,n),i=t.substring(0,r+4)+"/data";if("maps"===o){var a=t.indexOf("/",n+1),s=t.substring(n+1,a);i=t.substring(0,r+4)+"/maps/"+s,e.result.dataUrl=i,this._getLayerFeatures(e)}else"data"===o&&(e.result.dataUrl=i,this._getDataFeatures(e))}}},{key:"_getDataInfoSuccess",value:function(e,t){"RESTMAP"===t?this._getChartDatasFromLayer(e):this._getChartDatas(e)}},{key:"_getDataFeatures",value:function(e){this.chartModel.getDataFeatures(e,this._getChartDatas.bind(this))}},{key:"_getLayerFeatures",value:function(e){this.chartModel.getLayerFeatures(e,this._getChartDatasFromLayer.bind(this))}},{key:"_getChartDatas",value:function(e){if(e){this.features=e.result.features;var t=this.features.features,r={};if(t.length){var n=t[0],o=[],i=[];for(var a in n.properties)o.push(a),i.push(this._getDataType(n.properties[a]));for(var s in r={features:t,fieldCaptions:o,fieldTypes:i,fieldValues:[]},i){var u=[];for(var l in t){var c=t[l],f=r.fieldCaptions[s],p=c.properties[f];u.push(p)}r.fieldValues.push(u)}this.createChart(r)}}}},{key:"_getChartDatasFromLayer",value:function(e){if(e.result.recordsets){var t=e.result.recordsets[0],r=t.features.features;this.features=t.features;var n={};if(r.length){for(var o in(n={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]}).fieldCaptions){var i=[];for(var a in r){var s=r[a],u=n.fieldCaptions[o],l=s.properties[u];i.push(l)}n.fieldValues.push(i)}this.createChart(n)}}}},{key:"_createChartOptions",value:function(e){return this.calculatedData=this._createChartDatas(e),this.updateChartOptions(this.chartType)}},{key:"changeType",value:function(e){if(e!==this.chartType)return this.chartType=e,this.updateChartOptions(this.chartType)}},{key:"updateData",value:function(e,t,r){this.updateChart=r,this.xField=[],this.yField=[],this._initXYField(t),e.type=e.type||"iServer",e.withCredentials=e.withCredentials||!1,this.datasets=e,this.getDatasetInfo(this._updateDataSuccess.bind(this))}},{key:"_updateDataSuccess",value:function(e){var t=this._createChartOptions(e);this.updateChart(t)}},{key:"updateChartOptions",value:function(e,t){if(this.calculatedData){var r=this.grid,n=this._createChartSeries(this.calculatedData,e),o=[];for(var i in this.calculatedData.XData)o.push({value:this.calculatedData.XData[i].fieldsData});var a={type:"category",name:this.xField[0].name||"X",data:o,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},s={type:"value",name:this.yFieldName||"Y",data:{},nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},u={formatter:"{b0}: {c0}"},l="#404a59";return t&&(t.grid&&(r=t.grid),t.tooltip&&(u=t.tooltip),t.backgroundColor&&(l=t.backgroundColor)),{backgroundColor:l,grid:r,series:n,xAxis:a,yAxis:s,tooltip:u}}}},{key:"_createChartDatas",value:function(e){var t=0,r=[],n=e.fieldCaptions,o=this;n.forEach(function(e,r){o.xField[0]&&e===o.xField[0].field&&(t=r)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(o.yFieldName=o.yFieldName+","),o.yFieldName=o.yFieldName+e.name,n.forEach(function(t,n){t===e.field&&r.push(n)})});var i=this._getAttrData(e,t),a=[];if(r.length>0)r.forEach(function(t){var r=[];for(var n in e.fieldValues[t])r.push({value:e.fieldValues[t][n]});a.push(r)});else{for(var s=[],u=[],l=i.length,c=0;c0;e--)this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}},{key:"_changeTabsPage",value:function(e){for(var t=e.target.index,r=0;r0;t--)this.content.removeChild(this.content.children[t-1]);var r=this.config[e];for(var n in r)this._createCityItem(n,r[n])}},{key:"_createCityItem",value:function(e,t){var r=document.createElement("div"),n=document.createElement("div");n.setAttribute("class","component-citytabpag__py-key"),n.innerHTML=e,r.appendChild(n);var o=document.createElement("div");o.setAttribute("class","component-citytabpag__content");for(var i=0;i0&&this.appendTabs(e),this.rootContainer=t}},{key:"setTabs",value:function(e){this.removeAllTabs(),this.appendTabs(e)}},{key:"appendTabs",value:function(e){for(var t=0;t0;e--)this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}},{key:"_changeTabsPage",value:function(e){for(var t=e.target.index,r=0;r=0;e--)this.content.removeChild(this.content.children[e])}},{key:"setPageLink",value:function(e){this.pageNumberLis=[],this.currentPageNumberLis=[],this.clearPageLink(),this._createPageLi(e),this._appendPageLink()}},{key:"_createPageLi",value:function(e){for(var t=0;t1;e--)this.link.removeChild(this.link.children[e])}},{key:"_createLink",value:function(e){for(var t=0;t<4;t++){var r=document.createElement("li");r.setAttribute("class","disable");var n=document.createElement("span");r.appendChild(n),0===t?(n.id="first",n.setAttribute("class","supermapol-icons-first")):1===t?(n.id="prev",n.setAttribute("class","supermapol-icons-prev")):2===t?(n.id="next",n.setAttribute("class","supermapol-icons-next")):3===t&&(n.id="last",n.setAttribute("class","supermapol-icons-last")),e.appendChild(r)}}},{key:"_changePageEvent",value:function(e){var t=e.target;if("disable"!==t.parentElement.classList[0]){var r;if(t.id)r=t.id;else{if(!Number(t.innerHTML))return;r=Number(t.innerHTML)}this._prePageNum(r),this.clearPageLink(),this._appendPageLink()}}},{key:"_changeDisableState",value:function(){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"))}},{key:"_prePageNum",value:function(e){var 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(var r=0;r=this.pageNumberLis.length-3)for(var o=this.pageNumberLis.length-5;o0&&(this.currentPageNumberLis=t)}}])&&MI(t.prototype,r),n&&MI(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),FI=r(9819),BI=r.n(FI);function GI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function UI(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:"id";return BI()(e,t)}function WI(e){return e.hasOwnProperty("start")&&e.hasOwnProperty("end")}function YI(e,t,r){var n=e.id,o=e.properties,i=e.lables,a=t?function(e,t){if(!t)return{};for(var r=e.id,n=e.labels,o=t.filter(function(e){return"entity"===e.type}),i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n
  • 展开
  • \n ":"
      \n
    • 折叠
    • \n
    ":void 0}},handleMenuClick:function(t,r){switch(t.id.split("-")[0]){case"hide":e.hideItem(r);break;case"expand":e.expandNode(r);break;case"collapse":e.collapseNode(r);break;case"show":e.showItem(r)}},offsetX:26,offsetY:0,itemTypes:["node","edge","canvas"]})}},{key:"_getGraphConfig",value:function(e){var t=this,r={speed:120,maxIteration:83,tick:function(){t.refreshPositions()}},n={type:"fruchterman",gravity:5},o={},i={type:"line",style:{endArrow:{path:"M 0,0 L 4,2 L 4,-2 Z",fill:"#e0e0e0"},lineWidth:.5},labelCfg:{autoRotate:!0,style:{fontSize:4,fill:"#333"}}},a={default:["drag-canvas","zoom-canvas","drag-node"]},s=this._getContextMenu(),u=[new($I().ToolBar),s],l={lineWidth:3,stroke:"#b4d6ff"},c={stroke:"#b4d6ff",shadowColor:"#b4d6ff",shadowBlur:5,endArrow:{path:"M 0,0 L 4,2 L 4,-2 Z",fill:"#b4d6ff"}};if(!e)return this._setToolBarStyle(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"knowledgeGraph",t=document.querySelector("#".concat(e));return{container:e,width:t.scrollWidth,height:t.scrollHeight,plugins:u,modes:a,layout:iN(iN({},n),r),defaultNode:o,defaultEdge:i,nodeStateStyles:{hover:l},edgeStateStyles:{hover:c}}}();e.container=e.container||"knowledgeGraph";var f="string"==typeof e.container?document.querySelector("#".concat(e.container)):e.container;return e.width=e.width||f.scrollWidth,e.height=e.height||f.scrollHeight,e.layout=iN(iN(iN({},n),e.layout||{}),!1!==e.animate?r:{}),e.defaultNode=iN(iN({},o),e.defaultNode||{}),e.defaultEdge=iN(iN({},i),e.defaultEdge||{}),e.modes={default:[!1!==e.dragCanvas&&"drag-canvas",!1!==e.zoomCanvas&&"zoom-canvas",!1!==e.dragNode&&"drag-node"]},e.nodeStateStyles={hover:iN(iN({},l),e.nodeHighlightStyle||{})},e.edgeStateStyles={hover:iN(iN({},c),e.edgeHighlightStyle||{})},!1!==e.showToolBar&&(e.plugins=[new($I().ToolBar)],this._setToolBarStyle()),!1!==e.showContextMenu&&(e.plugins=[].concat(rN(e.plugins||[]),[s]),this._setToolBarStyle()),e}},{key:"changeSize",value:function(e,t){return this.graph.changeSize(e,t)}},{key:"autoResize",value:function(){var e=this,t=this.getContainer();window.addEventListener("resize",function(){var r=t.scrollWidth,n=t.scrollHeight;e.graph.changeSize(r,n),e.graph.refresh()})}},{key:"zoom",value:function(e,t,r,n){this.graph.zoom(e,t,r,n)}},{key:"zoomTo",value:function(e,t,r,n){this.graph.zoomTo(e,t,r,n)}},{key:"fitView",value:function(e,t,r,n){this.graph.fitView(e,t,r,n)}},{key:"fitCenter",value:function(e,t){this.graph.fitCenter(e,t)}},{key:"getGraphCenterPoint",value:function(){return this.graph.getGraphCenterPoint()}},{key:"getViewPortCenterPoint",value:function(){return this.graph.getViewPortCenterPoint()}},{key:"getZoom",value:function(){return this.graph.getZoom()}},{key:"getMinZoom",value:function(){return this.graph.getMinZoom()}},{key:"setMinZoom",value:function(e){this.graph.setMinZoom(e)}},{key:"getMaxZoom",value:function(){return this.graph.getMaxZoom()}},{key:"setMaxZoom",value:function(e){this.graph.setMaxZoom(e)}},{key:"getWidth",value:function(){return this.graph.getWidth()}},{key:"getHeight",value:function(){return this.graph.getHeight()}},{key:"setCenter",value:function(e){var t=this.graph.getWidth()/2,r=this.graph.getHeight()/2,n=this.graph.getCanvasByPoint(e.x,e.y);this.graph.translate(t-n.x,r-n.y)}},{key:"_setToolBarStyle",value:function(){tN()("\n .g6-component-toolbar li[code='redo'],\n .g6-component-toolbar li[code='undo'],\n .g6-component-toolbar li[code='realZoom'] {\n display: none;\n }\n .g6-component-contextmenu {\n position: absolute;\n z-index: 2;\n list-style-type: none;\n border-radius: 6px;\n font-size: 14px;\n width: fit-content;\n transition: opacity .2s;\n text-align: center;\n box-shadow: 0 5px 18px 0 rgba(0, 0, 0, 0.6);\n border: 0px;\n }\n .g6-component-contextmenu ul {\n padding-left: 0px;\n margin: 0;\n }\n .g6-component-contextmenu li {\n cursor: pointer;\n list-style-type: none;\n list-style: none;\n margin-left: 0;\n line-height: 38px;\n padding: 0px 35px;\n }\n .g6-component-contextmenu li:hover {\n color: #333;\n background: #aaaaaa45;\n }\n ")}},{key:"highlightNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph;e.on("node:mouseenter",function(t){var r=t.item;e.setAutoPaint(!1),e.getNodes().forEach(function(t){e.clearItemStates(t)}),e.setItemState(r,"hover",!0),e.paint(),e.setAutoPaint(!0)}),e.on("node:mouseleave",function(){e.setAutoPaint(!1),e.getNodes().forEach(function(t){e.clearItemStates(t)}),e.paint(),e.setAutoPaint(!0)})}},{key:"highlightEdge",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph;e.on("edge:mouseenter",function(t){var r=t.item;e.setAutoPaint(!1),e.getNodes().forEach(function(t){e.clearItemStates(t)}),e.setItemState(r,"hover",!0),e.paint(),e.setAutoPaint(!0)}),e.on("edge:mouseleave",function(){e.setAutoPaint(!1),e.getEdges().forEach(function(t){e.clearItemStates(t)}),e.paint(),e.setAutoPaint(!0)})}},{key:"setData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.graph;this.data?t.changeData(e):t.data(e),this.data=e}},{key:"render",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph).render()}},{key:"updateGraph",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.graph;this.data=e,t.changeData(e)}},{key:"refresh",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph).refresh()}},{key:"getContainer",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph).getContainer()}},{key:"getCanvas",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph).get("canvas")}},{key:"getNodes",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph).getNodes()}},{key:"getEdges",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph).getEdges()}},{key:"getNeighbors",value:function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.graph).getNeighbors(e,t)}},{key:"findById",value:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.graph).findById(e)}},{key:"find",value:function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.graph).find(e,t)}},{key:"findAll",value:function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.graph).findAll(e,t)}},{key:"getEdgesByNode",value:function(e){return e.getEdges()}},{key:"getInEdges",value:function(e){return e.getInEdges()}},{key:"getOutEdges",value:function(e){return e.getOutEdges()}},{key:"getSourceByEdge",value:function(e){return e.getSource()}},{key:"getTargetByEdge",value:function(e){return e.getTarget()}},{key:"expandNode",value:function(e){var t=e.getModel().id;this._expandCollapseNode(this.collpasedData[t],"show"),delete this.collpasedData[t]}},{key:"collapseNode",value:function(e){var t=e.getModel().id,r=[];this._collapseFunc(e,r),this.collpasedData[t]=r,this._expandCollapseNode(r)}},{key:"isCollpased",value:function(e){return!!this.collpasedData[e]}},{key:"_collapseFunc",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.getNeighbors(e,"target"),n=this.getNeighbors(e,"source"),o=0;o1&&void 0!==arguments[1]?arguments[1]:"hide";e&&e.forEach(function(e){"hide"===r?t.hideItem(e.id):(t.showItem(e.id),t.isCollpased(e.id)&&delete t.collpasedData[e.id]),e.children&&t._expandCollapseNode(e.children,r)})}},{key:"showItem",value:function(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.graph).showItem(e,t)}},{key:"hideItem",value:function(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.graph).hideItem(e,t)}},{key:"show",value:function(e){e.show()}},{key:"hide",value:function(e){e.hide()}},{key:"changeVisibility",value:function(e,t){e.changeVisibility(t)}},{key:"isVisible",value:function(e){return e.isVisible()}},{key:"getModel",value:function(e){return e.getModel()}},{key:"addItem",value:function(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.graph).addItem(e,t)}},{key:"removeItem",value:function(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.graph).removeItem(e)}},{key:"updateItem",value:function(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.graph).updateItem(e,t)}},{key:"refreshItem",value:function(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.graph).refreshItem(e)}},{key:"refreshPositions",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph).refreshPositions()}},{key:"on",value:function(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.graph).on(e,t)}},{key:"off",value:function(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.graph).off(e,t)}},{key:"toDataURL",value:function(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.graph).toDataURL(e,t)}},{key:"bindNodeDefaultDragEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph;e.on("node:dragstart",function(e){lN(e)}),e.on("node:drag",function(e){lN(e)}),e.on("node:dragend",function(e){e.item.get("model").fx=null,e.item.get("model").fy=null})}},{key:"stopDefaultEventPropagation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph;e.on("click",function(e){e.stopPropagation()}),e.on("mousedown",function(e){e.stopPropagation()}),e.on("mouseover",function(e){e.stopPropagation()}),e.on("mouseout",function(e){e.stopPropagation()})}},{key:"clear",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph).clear()}},{key:"destroy",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph).destroy()}}])&&sN(t.prototype,r),n&&sN(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function lN(e){var t=e.item.get("model");return t.fx=e.x,t.fy=e.y,t.x=e.x,t.y=e.y,t}var cN=r(2138),fN=r.n(cN);function pN(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"G6";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.graph=null,this.config=fN()(t),this.graphRender=null,this.type=r,this.createGraphRender(this.type),this.config=this.graphRender._getGraphConfig(this.config),this.createGraph(this.config),this.CLASS_NAME="SuperMap.KnowledgeGraph"}var t,r,n;return t=e,n=[{key:"dataFromGraphMap",value:function(e,t){return qI(e,t)}},{key:"dataFromKnowledgeGraphQuery",value:function(e){return qI(e)}}],(r=[{key:"handleNodeStatus",value:function(e){var t=e.expand,r=e.collapse,n=e.hidden;this.expandNodes(t),this.collapseNodes(r),this.hideNodes(n)}},{key:"expandNodes",value:function(e){var t=this;e&&e.forEach(function(e){t.expandNode(e+"")})}},{key:"collapseNodes",value:function(e){var t=this;e&&e.forEach(function(e){t.collapseNode(e+"")})}},{key:"hideNodes",value:function(e){var t=this;e&&e.forEach(function(e){t.hideItem(e+"")})}},{key:"createGraphRender",value:function(e){"G6"===e&&(this.graphRender=new uN)}},{key:"createGraph",value:function(e){var t=this.initGraph(e);return this.graph=t,this.autoResize(),t}},{key:"getGraph",value:function(){return this.graph}},{key:"autoResize",value:function(){this.config&&!1!==this.config.autoResize&&this.graphRender.autoResize()}},{key:"zoom",value:function(e,t,r,n){this.graphRender.zoom(e,t,r,n)}},{key:"zoomTo",value:function(e,t,r,n){this.graphRender.zoomTo(e,t,r,n)}},{key:"fitView",value:function(e,t,r,n){this.graphRender.fitView(e,t,r,n)}},{key:"fitCenter",value:function(e,t){this.graphRender.fitCenter(e,t)}},{key:"getGraphCenterPoint",value:function(){return this.graphRender.getGraphCenterPoint()}},{key:"getViewPortCenterPoint",value:function(){return this.graphRender.getViewPortCenterPoint()}},{key:"getZoom",value:function(){return this.graphRender.getZoom()}},{key:"getMinZoom",value:function(){return this.graphRender.getMinZoom()}},{key:"setMinZoom",value:function(e){this.graphRender.setMinZoom(e)}},{key:"getMaxZoom",value:function(){return this.graphRender.getMaxZoom()}},{key:"setMaxZoom",value:function(e){this.graphRender.setMaxZoom(e)}},{key:"getWidth",value:function(){return this.graphRender.getWidth()}},{key:"getHeight",value:function(){return this.graphRender.getHeight()}},{key:"initGraph",value:function(e){var t=this,r=this.graphRender.initGraph(e);this.graph=r;return this.graph.on("beforelayout",function(){void 0!==t.config.zoom&&t.zoom(t.config.zoom),void 0!==t.config.center&&t.graphRender.setCenter({x:t.config.center[0],y:t.config.center[1]})}),r}},{key:"setData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.graph;e=e||{nodes:[],edges:[]},this.config&&this.config.nodeLabelMaxWidth&&(e.nodes=this.nodeLabelOpenEllipsis(this.config.nodeLabelMaxWidth,e.nodes)),this.graphRender.setData(e,t),this.render(t),this.data=e}},{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph;e&&this.graphRender.render(e)}},{key:"updateGraph",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.graph;t&&this.graphRender.updateGraph(e,t)}},{key:"refresh",value:function(){return this.graphRender.refresh()}},{key:"changeSize",value:function(e,t){return this.graphRender.changeSize(e,t)}},{key:"resize",value:function(e,t){this.graphRender.changeSize(e,t),this.graphRender.refresh()}},{key:"getContainer",value:function(){return this.graphRender.getContainer()}},{key:"getCanvas",value:function(){return this.graphRender.getCanvas()}},{key:"getNodes",value:function(){return this.graphRender.getNodes()}},{key:"getEdges",value:function(){return this.graphRender.getEdges()}},{key:"getNeighbors",value:function(e,t){return this.graphRender.getNeighbors(e,t)}},{key:"findById",value:function(e){return this.graphRender.findById(e)}},{key:"find",value:function(e,t){return this.graphRender.find(e,t)}},{key:"findAll",value:function(e,t){return this.graphRender.findAll(e,t)}},{key:"getEdgesByNode",value:function(e){return this.graphRender.getEdgesByNode(e)}},{key:"getInEdges",value:function(e){return this.graphRender.getInEdges(e)}},{key:"getOutEdges",value:function(e){return this.graphRender.getOutEdges(e)}},{key:"getSourceByEdge",value:function(e){return this.graphRender.getSourceByEdge(e)}},{key:"getTargetByEdge",value:function(e){return this.graphRender.getTargetByEdge(e)}},{key:"expandNode",value:function(e){var t=this.findById(e);t&&this.graphRender.expandNode(t)}},{key:"collapseNode",value:function(e){var t=this.findById(e);t&&this.graphRender.collapseNode(t)}},{key:"showItem",value:function(e,t){this.graphRender.showItem(e,t)}},{key:"hideItem",value:function(e,t){this.graphRender.hideItem(e,t)}},{key:"show",value:function(e){this.graphRender.show(e)}},{key:"hide",value:function(e){this.graphRender.hide(e)}},{key:"changeVisibility",value:function(e,t){this.graphRender.changeVisibility(e,t)}},{key:"isVisible",value:function(e){return this.graphRender.isVisible(e)}},{key:"getModel",value:function(e){return this.graphRender.getModel(e)}},{key:"addItem",value:function(e,t){return this.graphRender.addItem(e,t)}},{key:"removeItem",value:function(e){return this.graphRender.removeItem(e)}},{key:"updateItem",value:function(e,t){return this.graphRender.updateItem(e,t)}},{key:"refreshItem",value:function(e){return this.graphRender.refreshItem(e)}},{key:"refreshPositions",value:function(){return this.graphRender.refreshPositions()}},{key:"on",value:function(e,t){this.graphRender.on(e,t)}},{key:"off",value:function(e,t){this.graphRender.off(e,t)}},{key:"toDataURL",value:function(e,t){this.graphRender.toDataURL(e,t)}},{key:"nodeLabelOpenEllipsis",value:function(e,t){var r=this;return t?e?t.map(function(t){var n=t.labelCfg&&t.labelCfg.fontSize||r.defaultNode&&r.defaultNode.labelCfg&&r.defaultNode.labelCfg.fontSize||14;return t.label=function(e,t,r){var n=1*r;t*=1.6;if(function(e){for(var t=0,r=0;r0&&e.charCodeAt(r)<128?t++:t+=2;return t}(e)*n>t){var o=Math.floor((t-20)/n),i=e.substring(0,o);return(e.substring(o).length+"…".length)*n>t?i+"\n"+e.substring(o,o+o-2)+"…":0==e.substring(o).length?i:i+"\n"+e.substring(o)}return e}(t.label,e,n),t}):t:[]}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph;e&&e.clear()}},{key:"destroy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.graph;e&&e.destroy()}}])&&pN(t.prototype,r),n&&pN(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function yN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dN(e){for(var t=1;t0&&(this.length=e,this.max=this.length-1,this.slider.setAttribute("max",this.max))}},{key:"setLayer",value:function(e){e&&(this.options.layer=e);var t=this,r=t.options.layer;r.on("tilesetsinfoloaded",function(e){var r=e.value&&e.value.tileVersions;t.update(r)}),r.on("tileversionschanged",function(e){var r=e.value&&e.value.tileVersion;t.setContent(r)}),t.getTileSetsInfo()}},{key:"update",value:function(e){this.tileVersions=e||[],this.updateLength(this.tileVersions.length)}},{key:"getTileSetsInfo",value:function(){var e=this;e.options.layer&&new RN(e.options.layer._url).getTilesets(function(t){e.options.layer.setTileSetsInfo(t.result)})}},{key:"removeLayer",value:function(){this.options.layer=null}},{key:"nextTilesVersion",value:function(){return this.firstLoad?(this.options.layer.nextTilesVersion(),this.firstLoad=!1,this):parseInt(this.slider.value)>this.max-1?this:(this.slider.value=parseInt(this.slider.value)+1,this.options.layer.nextTilesVersion(),this)}},{key:"lastTilesVersion",value:function(){return parseInt(this.slider.value)=this.minWidth_)break;++h}this.renderedHTML_=this.renderedHTML_||this.D||this.am,this.innerElement_=this.innerElement_||this.l||this.Tm,this.renderedWidth_=this.renderedWidth_||this.B||this.Am,this.renderedVisible_=this.renderedVisible_||this.j||this.yn,this.element_=this.element_||this.c;var d=l.toFixed(f<0?-f:0)+" "+s;this.renderedHTML_!=d&&(this.innerElement_.innerHTML=d,this.renderedHTML_=d),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}}])&&WN(t.prototype,r),n&&WN(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),KN="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=";function $N(e){"@babel/helpers - typeof";return($N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eD(e,t){for(var r=0;r"+r+"",e}.call(nD(t)),t}return t=i,r&&eD(t.prototype,r),n&&eD(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(),aD={"point-file":"pointFile","point-fill":"fillStyle","point-radius":"pointRadius","point-halo-radius":"pointHaloRadius","point-halo-color":"pointHaloColor","point-dx":"offsetX","point-dy":"offsetY","point-opacity":"globalAlpha","point-comp-op":"globalCompositeOperation"},sD={"line-color":"strokeStyle","line-width":"lineWidth","line-cap":"lineCap","line-join":"lineJoin","line-miterlimit":"miterLimit","line-dash-offset":"lineDashOffset","line-opacity":"strokeOpacity","line-dasharray":"lineDasharray","line-offset":"offset","line-comp-op":"globalCompositeOperation"},uD={"line-color":"strokeStyle","line-width":"lineWidth","line-cap":"lineCap","line-join":"lineJoin","line-miterlimit":"miterLimit","line-dash-offset":"lineDashOffset","line-opacity":"strokeOpacity","line-dasharray":"lineDasharray","polygon-fill":"fillStyle","polygon-dx":"offsetX","polygon-dy":"offsetY","polygon-opacity":"fillOpacity","polygon-comp-op":"globalCompositeOperation"},lD={CartoStyleMap:{TEXT:{"text-size":"fontSize","text-face-name":"fontFamily","text-align":"textAlign","text-vertical-alignment":"textBaseline","text-horizontal-alignment":"textAlign","text-bold":"bold","text-weight":"fontWeight","text-name":"textName","text-halo-radius":"haloRadius","text-halo-color":"backColor","text-fill":"foreColor","text-opacity":"globalAlpha","text-dx":"offsetX","text-dy":"offsetY","text-comp-op":"globalCompositeOperation"},POINT:aD,MULTIPOINT:aD,LINE:sD,LINESTRING:sD,MULTILINESTRING:sD,REGION:uD,POLYGON:uD,MULTIPOLYGON:uD},ServerStyleMap:{fillBackOpaque:{canvasStyle:"",type:"bool",defaultValue:!0},lineWidth:{canvasStyle:"lineWidth",type:"number",unit:"mm",defaultValue:.1},fillBackColor:{canvasStyle:"",type:"color",defaultValue:"rgba(0,0,0,0)"},markerWidth:{canvasStyle:"",type:"number",unit:"mm",defaultValue:""},markerAngle:{canvasStyle:"",type:"number",unit:"degree",defaultValue:""},fillForeColor:{canvasStyle:"fillStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},foreColor:{canvasStyle:"fillStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},markerSize:{canvasStyle:"markerSize",type:"number",unit:"mm",defaultValue:2.4},fillGradientOffsetRatioX:{canvasStyle:"",type:"number",defaultValue:0},fillGradientOffsetRatioY:{canvasStyle:"",type:"number",defaultValue:0},lineColor:{canvasStyle:"strokeStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},fillOpaqueRate:{canvasStyle:"",type:"number",defaultValue:100},markerHeight:{canvasStyle:"",type:"number",unit:"mm",defaultValue:0},fillGradientMode:{canvasStyle:"",type:"string",defaultValue:"NONE"},fillSymbolID:{canvasStyle:"",type:"number",defaultValue:0},fillGradientAngle:{canvasStyle:"",type:"number",unit:"degree",defaultValue:0},markerSymbolID:{canvasStyle:"",type:"number",defaultValue:0},lineSymbolID:{canvasStyle:"",type:"number",defaultValue:0}},CartoCompOpMap:{clear:"",src:"",dst:"","src-over":"source-over","dst-over":"destination-over","src-in":"source-in","dst-in":"destination-in","src-out":"source-out","dst-out":"destination-out","src-atop":"source-atop","dst-atop":"destination-atop",xor:"xor",plus:"lighter",minus:"",multiply:"",screen:"",overlay:"",darken:"",lighten:"lighter","color-dodge":"","color-burn":"","hard-light":"","soft-light":"",difference:"",exclusion:"",contrast:"",invert:"","invert-rgb":"","grain-merge":"","grain-extract":"",hue:"",saturation:"",color:"",value:""}},cD={pointFile:"",pointRadius:3,pointHaloRadius:1,pointHaloColor:"#c33",offsetX:0,offsetY:0,fillStyle:"#fc0",globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},fD={strokeStyle:"rgba(0,0,0,0)",lineWidth:1,lineCap:"butt",lineJoin:"round",miterLimit:10,lineDashOffset:0,lineDasharray:[],strokeOpacity:1,offset:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},pD={strokeStyle:"rgba(0,0,0,0)",lineWidth:1,lineCap:"butt",lineJoin:"round",miterLimit:10,lineDashOffset:0,lineOpacity:1,fillOpacity:1,lineDasharray:[],fillStyle:"rgba(0,0,0,0)",polygonOpacity:1,offsetX:0,offsetY:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},hD={TEXT:{font:"10px sans-serif",textAlign:"middle",textBaseline:"center",direction:"ltr",bold:!1,haloRadius:0,backColor:"rgba(255,255,255,1)",foreColor:"rgba(0,0,0,1)",offsetX:0,offsetY:0,textHeight:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},POINT:cD,MULTIPOINT:cD,LINE:fD,LINESTRING:fD,MULTILINESTRING:fD,REGION:pD,POLYGON:pD,MULTIPOLYGON:pD,SHADOW:{shadowBlur:0,shadowColor:"rgba(0,0,0,0)",shadowOffsetX:0,shadowOffsetY:0},GLOBAL:{globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0}},yD=ol.util,dD=ol.geom.Geometry,bD=r.n(dD),vD=ol.render,mD=ol.source.Vector,gD=r.n(mD),wD=ol.layer.Vector,OD=r.n(wD),SD=ol.style,_D=ol.Feature,PD=r.n(_D),xD=ol.proj.Projection,kD=r.n(xD),jD={getOlVersion:function(){if(yD&&yD.VERSION)return yD.VERSION.split(".")[0];if(window&&window.ol){if(window.ol.util)return"6";if(window.ol.WebGLMap)return"5"}return"4"},toGeoJSON:function(e){return e?(new qr).toGeoJSON(e):null},toSuperMapGeometry:function(e){return e&&e.type?(new qr).read(e,"FeatureCollection")[0].geometry:null},resolutionToScale:function(e,t,r){return 1/(e*t*(1/.0254)*nT(r))},toSuperMapBounds:function(e){return new we(e[0],e[1],e[2],e[3])},toProcessingParam:function(e){if(e.length<1)return"";for(var t={},r=[],n=0;n-180&&l<90&&l>-90;if(a.length===o.length&&c){var f={type:"Feature",geometry:{},properties:{}};f.geometry.type="Point",f.geometry.coordinates=[u,l];for(var p=0;p0&&void 0!==arguments[0]?arguments[0]:"").replace(/(^\s*)|(\s*$)/g,"")},newGuid:function(e){for(var t=e||32,r="",n=1;nr&&(r=o,n=e)}),n},setMask:function(e,t){if(t&&((t instanceof PD()?t.getGeometry():t)instanceof bD()||!(["MultiPolygon","Polygon"].indexOf(t.getType())<0))){var r=t instanceof PD()?t:new(PD())(t),n=new SD.Style({fill:new SD.Fill({color:"black"})}),o=new(OD())({source:new(gD())({features:[r],wrapX:!1})}),i=function(e){var t=(0,vD.getVectorContext)(e);e.context.globalCompositeOperation="destination-in",o.getSource().forEachFeature(function(r){t.drawFeature(r,n),e.context.globalCompositeOperation="source-over"})},a=Array.isArray(e)?e:[e];TD(a),a.forEach(function(e){e.classNameBak_=e.className_,e.className_="ol_mask_layer_".concat(e.ol_uid),e.clipRender=i,e.extentBak_=e.getExtent(),e.setExtent(o.getSource().getExtent()),e.on("postrender",i),e.changed()})}},unsetMask:TD,getZoomByResolution:function(e,t){return function(e,t){for(var r,n=0,o=0;oMath.abs(e-t[o])&&(r=Math.abs(e-t[o]),n=o);return n}(e,t)},scalesToResolutions:function(e,t,r,n,o,i){return function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:22,i=[];if(e&&e.length>0)for(var a=0;a=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function WD(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function YD(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){WD(i,n,o,a,s,"next",e)}function s(e){WD(i,n,o,a,s,"throw",e)}a(void 0)})}}function XD(e,t){for(var r=0;r0&&y[y.length-1]}p=t.getProperties().attributes?t.getProperties().attributes[h]:t.getProperties()[h]}return t.getProperties().TEXT_FEATURE_CONTENT&&(p=t.getProperties().TEXT_FEATURE_CONTENT),p?this.toOLTextStyle(i,p):this.toOLPointStyle(this.getDefaultStyle("POINT"))}if(o){var d=o.fillSymbolID>7?0:o.fillSymbolID,b=o.lineSymbolID>5?0:o.lineSymbolID;for(var v in o){var m,g=lD.ServerStyleMap[v],w=g.canvasStyle;if(w&&""!=w)switch(g.type){case"number":m=o[v],g.unit&&(m=96*m*de[g.unit]*2.5),i[w]=m;break;case"color":var O=o[v],S=o.fillBackColor,_=1;if("fillStyle"===w)if(0===d||1===d)_=1-d,m="rgba("+O.red+","+O.green+","+O.blue+","+_+")";else try{var P=document.createElement("canvas");P.height=8,P.width=8;var x=P.getContext("2d"),k=new Image;this.layer&&this.layer.fillImages&&x.drawImage(this.layer.fillImages["System "+d],0,0);for(var j=x.getImageData(0,0,P.width,P.height),E=j.data,T=0,C=E.length;T0&&void 0!==arguments[0]?arguments[0]:.5,arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5]}},{key:"getCircleDisplacement",value:function(e){return[e*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),-(e*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0))]}},{key:"getTextOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.substr(0,e.length-2)/2;return{x:n*t,y:n*r}}},{key:"getCanvas",value:function(e){var t;e.canvas?t=document.querySelector("#"+e.canvas)?document.getElemntById(e.canvas):this.createCanvas(e):(t=this.createCanvas(e),e.canvas=t.id),t.style.display="none";var r=t.getContext("2d"),n=Number(e.font.replace(/[^0-9]/gi,"")),o=e.text.split("\r\n"),i=o.length;r.font=e.font;var a=this.drawRect(r,e,o,n,t);return this.positionY=8,i>1?o.forEach(function(t,o){0!==o&&(this.positionY=this.positionY+n),this.canvasTextAutoLine(t,e,r,n,a.width)},this):this.canvasTextAutoLine(o[0],e,r,n,a.width),{canvas:t,width:a.width,height:a.height}}},{key:"createCanvas",value:function(e){var t=document.createElement("div");document.body.appendChild(t);var r=document.createElement("canvas");return r.id=e.canvas?e.canvas:"textCanvas"+jD.newGuid(8),t.appendChild(r),r}},{key:"drawRect",value:function(e,t,r,n,o){var i,a=t.backgroundFill,s=t.maxWidth-16,u=0,l=0,c=[];return r.forEach(function(t){var r,n="";l++;for(var o=0;os&&o>0||"\n"===t[o]?(n=t[o],l++,r=!0):(n=a,i=u)}r?c.push(s):c.push(i)},this),i=this.getCanvasWidth(c,s),u=l*n,u+=16,o.width=i,o.height=u,e.fillStyle=a,e.fillRect(0,0,i,u),{width:i,height:u}}},{key:"getCanvasWidth",value:function(e,t){for(var r=0,n=0;n=t)return t+16;o>r&&(r=o)}return r+16}},{key:"canvasTextAutoLine",value:function(e,t,r,n,o){r.font=t.font;for(var i=t.textAlign,a=this.getPositionX(i,o),s=e.split(""),u="",l=t.fillColor,c=t.maxWidth-16,f=0;fc&&f>0||"\n"===s[f]?(r.fillStyle=l,r.textAlign=i,r.textBaseline="top",r.fillText(u,a,this.positionY),u=s[f],this.positionY+=n):u=p}r.fillStyle=l,r.textAlign=i,r.textBaseline="top",r.fillText(u,a,this.positionY)}},{key:"getPositionX",value:function(e,t){var r,n=t-16;switch(e){case"center":r=n/2;break;case"right":r=n;break;default:r=8}return r}},{key:"hexToRgb",value:function(e){if(e){var t=e.replace("#","").split(""),r=[t[0]+t[1],t[2]+t[3],t[4]+t[5]];return r=r.map(function(e){return parseInt(e,16)})}}},{key:"formatRGB",value:function(e){var t;return 3===e.length?(t="rgb(",e.forEach(function(e,r){t+=2===r?e:e+","})):(t="rgba(",e.forEach(function(e,r){t+=3===r?e:e+","})),t+=")"}},{key:"getCanvasFromSVG",value:function(){var e=YD(HD().mark(function e(t,r,n){var o,i,a;return HD().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=window.canvg&&window.canvg.default?window.canvg.default:AD(),(i=document.createElement("canvas")).id="dataviz-canvas-"+jD.newGuid(8),i.style.display="none",r.appendChild(i),e.prev=5,a=i.getContext("2d"),e.next=9,o.from(a,t,{ignoreMouse:!0,ignoreAnimation:!0,forceRedraw:function(){return!1}});case 9:if(e.sent.start(),!(i.width>300||i.height>300)){e.next=13;break}return e.abrupt("return");case 13:n(i),e.next=19;break;case 16:return e.prev=16,e.t0=e.catch(5),e.abrupt("return");case 19:case"end":return e.stop()}},e,null,[[5,16]])}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"stopCanvg",value:function(){this.canvgsV.forEach(function(e){return e.stop()}),this.canvgsV=[]}},{key:"getMarkerDefaultStyle",value:function(e,t){var r;switch(e){case"POINT":r={src:"".concat(t,"apps/dataviz/static/imgs/markers/mark_red.png"),scale:1,anchor:[.5,1]};break;case"LINE":case"LINESTRING":case"MULTILINESTRING":r={strokeColor:"#3498db",strokeOpacity:1,strokeWidth:5,lineCap:"round",lineDash:"solid"};break;case"REGION":case"POLYGON":case"MULTIPOLYGON":r={fillColor:"#1abd9c",fillOpacity:1,strokeColor:"#3498db",strokeOpacity:1,strokeWidth:3,lineCap:"round",lineDash:"solid"}}return r}},{key:"getOpenlayersStyle",value:function(){var e=YD(HD().mark(function e(t,r,n){var o;return HD().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("BASIC_POINT"!==t.type){e.next=6;break}return e.next=3,this.toOpenLayersStyle(t,r);case 3:o=e.sent,e.next=17;break;case 6:if("SYMBOL_POINT"!==t.type){e.next=10;break}o=this.getSymbolStyle(t,n),e.next=17;break;case 10:if("SVG_POINT"!==t.type){e.next=16;break}return e.next=13,this.getSVGStyle(t);case 13:o=e.sent,e.next=17;break;case 16:"IMAGE_POINT"===t.type&&(o=this.getImageStyle(t));case 17:return e.abrupt("return",o);case 18:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getSymbolStyle",value:function(t,r){var n="";t.unicode&&(n=String.fromCharCode(parseInt(t.unicode.replace(/^&#x/,""),16)));var o=e.hexToRgb(t.fillColor);o.push(t.fillOpacity);var i=e.hexToRgb(t.strokeColor);i.push(t.strokeOpacity);var a=r?2*t.radius+"px":t.fontSize,s=t.offsetX,u=t.offsetY,l=t.rotation,c=void 0===l?0:l,f=e.getTextOffset(a,s,u);return new(LD())({text:new(zD())({text:n,font:a+" supermapol-icons",placement:"point",textAlign:"center",fill:new(GD())({color:o}),backgroundFill:new(GD())({color:[0,0,0,0]}),stroke:new(VD())({width:t.strokeWidth||1e-6,color:i}),offsetX:f.x,offsetY:f.y,rotation:c})})}},{key:"getSVGStyle",value:function(){var t=YD(HD().mark(function t(r){var n,o,i,a,s,u,l,c,f;return HD().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(o=this).svgDiv||(o.svgDiv=document.createElement("div"),document.body.appendChild(o.svgDiv)),i=r.url,a=r.radius,s=r.offsetX,u=r.offsetY,l=r.fillOpacity,c=r.rotation,f=this.getIconAnchor(s,u),t.next=6,e.getCanvasFromSVG(i,o.svgDiv,function(e){n=new(LD())({image:new(ND())({img:o.setColorToCanvas(e,r),scale:2*a/e.width,imgSize:[e.width,e.height],anchor:f||[.5,.5],opacity:l,anchorOrigin:"bottom-right",rotation:c})})});case 6:return t.abrupt("return",n);case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"setColorToCanvas",value:function(t,r){var n=t.getContext("2d"),o=e.hexToRgb(r.fillColor);o&&o.push(r.fillOpacity);var i=e.hexToRgb(r.strokeColor);return i&&i.push(r.strokeOpacity),n.fillStyle=e.formatRGB(o),n.fill(),n.strokeStyle=e.formatRGB(i),n.lineWidth=r.strokeWidth,n.stroke(),t}},{key:"getImageStyle",value:function(e){var t=e.imageInfo.size,r=2*e.radius/t.w,n=e.imageInfo,o=n.img;o&&o.src||((o=new Image).src=n.url);var i=e.offsetX,a=e.offsetY,s=e.rotation,u=this.getIconAnchor(i,a);return new(LD())({image:new(ND())({img:o,scale:r,imgSize:[t.w,t.h],anchor:u||[.5,.5],anchorOrigin:"bottom-right",rotation:s})})}},{key:"getRoadPath",value:function(e,t){var r=e.strokeWidth,n=void 0===r?1e-7:r,o=e.lineCap,i=e.strokeColor,a=e.strokeOpacity,s=this.hexToRgb(i);s&&s.push(a);var u=new(LD())({stroke:new(VD())({width:n||1e-7,color:s,lineCap:o||"round",lineDash:[0]})}),l=t.strokeColor,c=this.hexToRgb(l);c&&c.push(a);var f=t.strokeWidth||(0===n?1e-7:n+2);return[new(LD())({stroke:new(VD())({width:f,color:c,lineCap:o||"round",lineDash:[0]})}),u]}},{key:"getPathway",value:function(e,t){var r,n=e.strokeWidth,o=void 0===n?1e-7:n,i=e.strokeColor,a=e.strokeOpacity,s=[r=4*o,r+2*o],u=this.hexToRgb(i);u&&u.push(a);var l=new(LD())({stroke:new(VD())({width:.5*o||1e-7,color:u,lineCap:"square",lineDash:s})}),c=t.strokeColor,f=this.hexToRgb(c);return f&&f.push(a),[new(LD())({stroke:new(VD())({width:o||1e-7,color:f,lineCap:"square"})}),l]}}],r&&XD(t.prototype,r),n&&XD(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),KD=ol.Map,$D=r.n(KD),eF=ol.layer.Group,tF=r.n(eF),rF=(QD=function e(t,r,n,o,i,a){t instanceof tF()?t.getLayers().forEach(function(t){e(t,r,n,o,i,a)}):t.getSource()._forEachFeatureAtCoordinate&&t.getSource()._forEachFeatureAtCoordinate(r,n,function(e){o(e,t)},i,a)},$D().prototype.forEachFeatureAtPixelDefault=$D().prototype.forEachFeatureAtPixel,$D().prototype.forEachFeatureAtPixel=$D().prototype.Tc=function(e,t,r,n){for(var o=r&&r.layerFilter?r.layerFilter:function(){return!0},i=this.getLayers().getArray(),a=this.getView().getResolution(),s=this.getCoordinateFromPixel(e),u=0;u© SuperMap iClient",a=i.defaultTileGrid(),s=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",u=void 0!==r.url?r.url:"https://maponline{num}.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles={styles}&udt=20170408",l=r.hidpi||(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1;u=u.replace("{styles}",l?"ph":"pl"),t=o.call(this,{attributions:n,cacheSize:r.cacheSize,crossOrigin:s,opaque:void 0===r.opaque||r.opaque,maxZoom:void 0!==r.maxZoom?r.maxZoom:19,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileLoadFunction:r.tileLoadFunction,projection:"EPSG:3857",wrapX:r.wrapX,tilePixelRatio:l?2:1,tileGrid:a,tileUrlFunction:function(e,t,r){var n=u.replace("{num}",Math.abs((e[1]+e[2])%4)).replace("{z}",e[0].toString()).replace("{x}",e[1].toString()).replace("{y}",function(){console.log(jD.getOlVersion());var t=["4","5"].indexOf(jD.getOlVersion())>-1?e[2]:-e[2]-1;return t.toString()}).replace("{-y}",function(){var t=e[0],r=a.getFullTileRange(t);oF.assert(r,55);var n=r.getHeight()+e[2];return n.toString()});c.tileProxy&&(n=c.tileProxy+encodeURIComponent(n));return n}}),r.tileProxy&&(t.tileProxy=r.tileProxy);var c=fF(t);return t}return t=i,n=[{key:"defaultTileGrid",value:function(){return new(aF())({extent:[-33554432,-33554432,33554432,33554432],resolutions:[262144,131072,65536,32768,16284,8192,4096,2048,1024,512,256,128,64,32,16,8,4,2,1,.5],origin:[0,0],minZoom:3})}}],(r=null)&&uF(t.prototype,r),n&&uF(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),yF=ol.source.Image,dF=r.n(yF),bF=ol.Image,vF=r.n(bF),mF=ol.format.GeoJSON,gF=r.n(mF),wF=ol.extent;function OF(e){"@babel/helpers - typeof";return(OF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function SF(e,t){for(var r=0;r© SuperMap iServer with © SuperMap iClient",e.format=e.format?e.format:"png",t._layerUrl=ye.urlPathAppend(e.url,"image."+e.format),t._layerUrl=gn.appendCredential(t._layerUrl);var r={},n=void 0===e.transparent||e.transparent;r.transparent=n;var a=void 0===e.cacheEnabled||e.cacheEnabled;r.cacheEnabled=a,void 0!==e.layersID&&(r.layersID=e.layersID);var s=!1;return void 0!==e.redirect&&(s=e.redirect),r.redirect=s,e.prjCoordSys&&(r.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.clipRegionEnabled&&e.clipRegion instanceof bD()&&(e.clipRegion=jD.toSuperMapGeometry((new(gF())).writeGeometryObject(e.clipRegion)),e.clipRegion=ye.toJSON(pr.fromGeometry(e.clipRegion)),r.clipRegionEnabled=e.clipRegionEnabled,r.clipRegion=JSON.stringify(e.clipRegion)),e.overlapDisplayed&&e.overlapDisplayedOptions&&(r.overlapDisplayed=e.overlapDisplayed,r.overlapDisplayedOptions=e.overlapDisplayedOptions.toString()),!0===a&&e.tileversion&&(r.tileversion=e.tileversion),e.rasterfunction&&(r.rasterfunction=JSON.stringify(e.rasterfunction)),void 0!==e.antialias&&(r.antialias=e.antialias),void 0!==e.markerAngleFixed&&(r.markerAngleFixed=e.markerAngleFixed),void 0!==e.textAngleFixed&&(r.textAngleFixed=e.textAngleFixed),void 0!==e.textOrientationFixed&&(r.textOrientationFixed=e.textOrientationFixed),void 0!==e.paintBackground&&(r.paintBackground=e.paintBackground),isNaN(e.maxVisibleTextSize)||(r.maxVisibleTextSize=+e.maxVisibleTextSize),isNaN(e.minVisibleTextSize)||(r.maxVisibleTextSize=+e.minVisibleTextSize),isNaN(e.maxVisibleVertex)||(r.maxVisibleVertex=Math.round(+e.maxVisibleVertex)),t._layerUrl=ye.urlAppend(t._layerUrl,ye.getParameterString(r)),t.cacheEnabled=a,e.tileProxy&&(t.tileProxy=e.tileProxy),t}return t=i,n=[{key:"optionsFromMapJSON",value:function(e,t){var r=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top];return{url:e,resolutions:function(){var e,n=r[2]-r[0],o=r[3]-r[1],i=n>=o?n:o;e=i===n?i/t.viewer.width:i/t.viewer.height;var a=[],s=c.METER;t.coordUnit===c.DEGREE&&(s=c.DEGREE);if(t.visibleScales.length>0)for(var u=0;u© SuperMap iClient",a=r.mapName||"quanguo",s=r.mapType||"web",u=r.url||"http://t2.dituhui.com/FileService/image?map={mapName}&type={type}&x={x}&y={y}&z={z}";u=u.replace("{mapName}",a).replace("{type}",s);var l={attributions:n,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,opaque:void 0===r.opaque||r.opaque,maxZoom:r.maxZoom||18,reprojectionErrorThreshold:r.reprojectionErrorThreshold,url:u,wrapX:r.wrapX};r.tileProxy&&(l.tileLoadFunction=function(e,t){e.getImage().src=c.tileProxy+encodeURIComponent(t)}),t=o.call(this,l),r.tileProxy&&(t.tileProxy=r.tileProxy);var c=LF(t);return t}return t=i,r&&RF(t.prototype,r),n&&RF(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(),DF=ol.source.WMTS,FF=r.n(DF),BF=ol.tilegrid.WMTS,GF=r.n(BF);function UF(e){"@babel/helpers - typeof";return(UF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VF(e,t){for(var r=0;r with © SuperMap iClient";r.layerType=r.layerType||"vec",r.layerType=r.isLabel?{vec:"cva",ter:"cta",img:"cia"}[r.layerType]:r.layerType,r.matrixSet="EPSG:4326"===r.projection||"EPSG:4490"===r.projection?"c":"w",r.url||r.urls||(r.url="http://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?"),r.key&&(r.url="".concat(r.url,"tk=").concat(r.key)),r.url=r.url.replace("{layer}",r.layerType).replace("{proj}",r.matrixSet);var a=r.tileGrid||i.getTileGrid(r.projection||"EPSG:3857"),s=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",u={version:r.version||"1.0.0",format:r.format||"tiles",dimensions:r.dimensions||{},layer:r.layerType,matrixSet:r.matrixSet,tileGrid:a,style:r.style||"default",attributions:n,cacheSize:r.cacheSize,crossOrigin:s,opaque:void 0===r.opaque||r.opaque,maxZoom:{vec:18,ter:14,img:18}[r.layerType],reprojectionErrorThreshold:r.reprojectionErrorThreshold,url:r.url,urls:r.urls,projection:r.projection||"EPSG:3857",wrapX:r.wrapX};r.tileProxy&&(u.tileLoadFunction=function(e,t){e.getImage().src=l.tileProxy+encodeURIComponent(t)}),t=o.call(this,u),r.tileProxy&&(t.tileProxy=r.tileProxy);var l=qF(t);return t}return t=i,n=[{key:"getTileGrid",value:function(e){return"EPSG:4326"===e||"EPSG:4490"===e?i.default4326TileGrid():i.default3857TileGrid()}},{key:"default4326TileGrid",value:function(){for(var e=[],t=[],r=1;r<19;r++)e.push(1.40625/Math.pow(2,r)),t.push(r);return new(GF())({extent:[-180,-90,180,90],resolutions:e,origin:[-180,90],matrixIds:t,minZoom:1})}},{key:"default3857TileGrid",value:function(){for(var e=[],t=[],r=1;r<19;r++)e.push(156543.03392804062/Math.pow(2,r)),t.push(r);return new(GF())({extent:[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892],resolutions:e,matrixIds:t,origin:[-20037508.3427892,20037508.3427892],minZoom:1})}}],(r=null)&&VF(t.prototype,r),n&&VF(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),YF=ol.size,XF=ol.tilegrid;function QF(e){"@babel/helpers - typeof";return(QF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZF(e,t){for(var r=0;r© SuperMap iServer with © SuperMap iClient",e.format=e.format?e.format:"png",t=o.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,logo:"4"===jD.getOlVersion()?e.logo:null,opaque:e.opaque,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:e.state,tileClass:e.tileClass,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:function(t,n,o){r.tileGrid||(e.extent?(r.tileGrid=i.createTileGrid(e.extent),r.resolutions&&(r.tileGrid.resolutions=r.resolutions)):("EPSG:3857"===o.getCode()&&(r.tileGrid=i.createTileGrid([-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),r.extent=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),"EPSG:4326"===o.getCode()&&(r.tileGrid=i.createTileGrid([-180,-90,180,90]),r.extent=[-180,-90,180,90])));r.origin=r.tileGrid.getOrigin(0);var s=t[0],u=t[1],l=["4","5"].indexOf(jD.getOlVersion())>-1?-t[2]-1:t[2],f=r.tileGrid.getResolution(s),p=r.dpi||96,h=o.getUnits()||c.DEGREE;"degrees"!==h&&"degree"!==h||(h=c.DEGREE);"m"!==h&&"meter"!==h||(h=c.METER);var y=jD.resolutionToScale(f,p,h),d=YF.toSize(r.tileGrid.getTileSize(s,r.tmpSize)),b=function(){this._paramsChanged&&(this._layerUrl=a.call(this),this._paramsChanged=!1);return this._layerUrl||a.call(this)}.call(r)+encodeURI("&x="+u+"&y="+l+"&width="+d[0]+"&height="+d[1]+"&scale="+y);r.tileProxy&&(b=r.tileProxy+encodeURIComponent(b));r.cacheEnabled||(b+="&_t="+(new Date).getTime());return b},wrapX:void 0!==e.wrapX&&e.wrapX,cacheEnabled:e.cacheEnabled,layersID:e.layersID}),e.tileProxy&&(t.tileProxy=e.tileProxy),t.options=e,t._url=e.url,t.tileSetsIndex=-1,t.tempIndex=-1,t.dpi=t.options.dpi||96;var r=eB(t),n=ye.urlPathAppend(e.url,"tileImage."+e.format);function a(){return this.requestParams=this.requestParams||function(){var t={};return t.redirect=void 0!==e.redirect&&e.redirect,t.transparent=void 0===e.transparent||e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),this.cacheEnabled=t.cacheEnabled,t._cache=t.cacheEnabled,this.origin&&(t.origin=JSON.stringify({x:this.origin[0],y:this.origin[1]})),e.prjCoordSys&&(t.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.layersID&&(t.layersID=e.layersID.toString()),e.clipRegion instanceof bD()&&(e.clipRegionEnabled=!0,e.clipRegion=jD.toSuperMapGeometry((new(gF())).writeGeometryObject(e.clipRegion)),e.clipRegion=ye.toJSON(pr.fromGeometry(e.clipRegion)),t.clipRegionEnabled=e.clipRegionEnabled,t.clipRegion=JSON.stringify(e.clipRegion)),e.overlapDisplayed?t.overlapDisplayed=!0:(t.overlapDisplayed=!1,e.overlapDisplayedOptions&&(t.overlapDisplayedOptions=this.overlapDisplayedOptions.toString())),t.cacheEnabled&&e.tileversion&&(t.tileversion=e.tileversion.toString()),e.rasterfunction&&(t.rasterfunction=JSON.stringify(e.rasterfunction)),t}.call(this),this._layerUrl=ye.urlAppend(n,ye.getParameterString(this.requestParams)),this._layerUrl=gn.appendCredential(this._layerUrl),this._layerUrl}return t}return t=i,n=[{key:"optionsFromMapJSON",value:function(e,t){var r={};r.url=e,r.crossOrigin="anonymous";var n=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],o=t.visibleScales,i=t.bounds,a=t.dpi,s=t.coordUnit,u=jD.scalesToResolutions(o,i,a,s);return r.tileGrid=new(aF())({extent:n,resolutions:u}),r}},{key:"createTileGrid",value:function(e,t,r,n,o){var i=XF.createXYZ({extent:e,maxZoom:t,minZoom:r,tileSize:n});return new(aF())({extent:e,minZoom:r,origin:o,resolutions:i.getResolutions(),tileSize:i.getTileSize()})}}],(r=[{key:"setTileSetsInfo",value:function(e){this.tileSets=e,jD.isArray(this.tileSets)&&(this.tileSets=e[0]),this.tileSets&&(this.dispatchEvent({type:"tilesetsinfoloaded",value:{tileVersions:this.tileSets.tileVersions}}),this.changeTilesVersion())}},{key:"lastTilesVersion",value:function(){this.tempIndex=this.tileSetsIndex-1,this.changeTilesVersion()}},{key:"nextTilesVersion",value:function(){this.tempIndex=this.tileSetsIndex+1,this.changeTilesVersion()}},{key:"changeTilesVersion",value:function(){var e=this;if(null!=e.tileSets&&!(e.tempIndex===e.tileSetsIndex||this.tempIndex<0)){var t=e.tileSets.tileVersions;if(t&&e.tempIndex=0){var r=t[e.tempIndex].name;e.mergeTileVersionParam(r)&&(e.tileSetsIndex=e.tempIndex,e.dispatchEvent({type:"tileversionschanged",value:{tileVersion:t[e.tempIndex]}}))}}}},{key:"updateCurrentTileSetsIndex",value:function(e){this.tempIndex=e}},{key:"mergeTileVersionParam",value:function(e){return!!e&&(this.requestParams.tileversion=e,this._paramsChanged=!0,this.refresh(),!0)}}])&&ZF(t.prototype,r),n&&ZF(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();var nB=1,oB=2,iB=3,aB=4,sB=5,uB=6378137,lB=6356752.314,cB=.0066943799901413165,fB=484813681109536e-20,pB=Math.PI/2,hB=.16666666666666666,yB=.04722222222222222,dB=.022156084656084655,bB=1e-10,vB=.017453292519943295,mB=57.29577951308232,gB=Math.PI/4,wB=2*Math.PI,OB=3.14159265359,SB={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},_B={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},PB=/[\s_\-\/\(\)]/g;function xB(e,t){if(e[t])return e[t];for(var r,n=Object.keys(e),o=t.toLowerCase().replace(PB,""),i=-1;++i=this.text.length)return;e=this.text[this.place++]}switch(this.state){case EB:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},LB.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(AB.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},LB.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=EB)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=EB,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},LB.prototype.number=function(e){if(!MB.test(e)){if(AB.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},LB.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},LB.prototype.keyword=function(e){if(RB.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=EB)}if(!AB.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},LB.prototype.neutral=function(e){if(CB.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(MB.test(e))return this.word=e,void(this.state=3);if(!AB.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},LB.prototype.output=function(){for(;this.place0?90:-90)):(e.lat0=BB(e.lat1>0?90:-90),e.lat_ts=e.lat1)}(o),o}function UB(e){var t=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?UB[e]=kB(arguments[1]):UB[e]=GB(arguments[1]):UB[e]=r}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?UB.apply(t,e):UB(e)});if("string"==typeof e){if(e in UB)return UB[e]}else"EPSG"in e?UB["EPSG:"+e.EPSG]=e:"ESRI"in e?UB["ESRI:"+e.ESRI]=e:"IAU2000"in e?UB["IAU2000:"+e.IAU2000]=e:console.log(e);return}}!function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}(UB);var VB=UB;var JB=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var zB=["3857","900913","3785","102113"];var qB=function(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in VB}(e))return VB[e];if(function(e){return JB.some(function(t){return e.indexOf(t)>-1})}(e)){var t=GB(e);if(function(e){var t=xB(e,"authority");if(t){var r=xB(t,"epsg");return r&&zB.indexOf(r)>-1}}(t))return VB["EPSG:3857"];var r=function(e){var t=xB(e,"extension");if(t)return xB(t,"proj4")}(t);return r?kB(r):t}return function(e){return"+"===e[0]}(e)?kB(e):void 0};function HB(e,t){var r,n;if(e=e||{},!t)return e;for(n in t)void 0!==(r=t[n])&&(e[n]=r);return e}function WB(e,t,r){var n=e*t;return r/Math.sqrt(1-n*n)}function YB(e){return e<0?-1:1}function XB(e){return Math.abs(e)<=OB?e:e-YB(e)*wB}function QB(e,t,r){var n=e*r,o=.5*e;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(pB-t))/n}function ZB(e,t){for(var r,n,o=.5*e,i=pB-2*Math.atan(t),a=0;a<=15;a++)if(r=e*Math.sin(i),i+=n=pB-2*Math.atan(t*Math.pow((1-r)/(1+r),o))-i,Math.abs(n)<=1e-10)return i;return-9999}function KB(e){return e}var $B=[{init:function(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=WB(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(e){var t,r,n=e.x,o=e.y;if(o*mB>90&&o*mB<-90&&n*mB>180&&n*mB<-180)return null;if(Math.abs(Math.abs(o)-pB)<=bB)return null;if(this.sphere)t=this.x0+this.a*this.k0*XB(n-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(gB+.5*o));else{var i=Math.sin(o),a=QB(this.e,o,i);t=this.x0+this.a*this.k0*XB(n-this.long0),r=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=r,e},inverse:function(e){var t,r,n=e.x-this.x0,o=e.y-this.y0;if(this.sphere)r=pB-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var i=Math.exp(-o/(this.a*this.k0));if(-9999===(r=ZB(this.e,i)))return null}return t=XB(this.long0+n/(this.a*this.k0)),e.x=t,e.y=r,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:KB,inverse:KB,names:["longlat","identity"]}],eG={},tG=[];function rG(e,t){var r=tG.length;return e.names?(tG[r]=e,e.names.forEach(function(e){eG[e.toLowerCase()]=r}),this):(console.log(t),!0)}var nG={start:function(){$B.forEach(rG)},add:rG,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==eG[t]&&tG[eG[t]]?tG[eG[t]]:void 0}},oG={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},iG=oG.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};oG.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var aG={};aG.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},aG.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},aG.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},aG.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},aG.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},aG.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},aG.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},aG.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},aG.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},aG.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},aG.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},aG.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},aG.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},aG.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},aG.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},aG.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},aG.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var sG=function(e,t,r,n,o,i,a){var s={};return s.datum_type=void 0===e||"none"===e?sB:aB,t&&(s.datum_params=t.map(parseFloat),0===s.datum_params[0]&&0===s.datum_params[1]&&0===s.datum_params[2]||(s.datum_type=nB),s.datum_params.length>3&&(0===s.datum_params[3]&&0===s.datum_params[4]&&0===s.datum_params[5]&&0===s.datum_params[6]||(s.datum_type=oB,s.datum_params[3]*=fB,s.datum_params[4]*=fB,s.datum_params[5]*=fB,s.datum_params[6]=s.datum_params[6]/1e6+1))),a&&(s.datum_type=iB,s.grids=a),s.a=r,s.b=n,s.es=o,s.ep2=i,s},uG={};function lG(e){if(0===e.length)return null;var t="@"===e[0];return t&&(e=e.slice(1)),"null"===e?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:uG[e]||null,isNull:!1}}function cG(e){return e/3600*Math.PI/180}function fG(e,t,r){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,r)))}function pG(e){return e.map(function(e){return[cG(e.longitudeShift),cG(e.latitudeShift)]})}function hG(e,t,r){return{name:fG(e,t+8,t+16).trim(),parent:fG(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,r),upperLatitude:e.getFloat64(t+88,r),lowerLongitude:e.getFloat64(t+104,r),upperLongitude:e.getFloat64(t+120,r),latitudeInterval:e.getFloat64(t+136,r),longitudeInterval:e.getFloat64(t+152,r),gridNodeCount:e.getInt32(t+168,r)}}function yG(e,t,r,n){for(var o=t+176,i=[],a=0;a-1.001*pB)u=-pB;else if(u>pB&&u<1.001*pB)u=pB;else{if(u<-pB)return{x:-1/0,y:-1/0,z:e.z};if(u>pB)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),o=Math.sin(u),a=Math.cos(u),i=o*o,{x:((n=r/Math.sqrt(1-t*i))+l)*a*Math.cos(s),y:(n+l)*a*Math.sin(s),z:(n*(1-t)+l)*o}}function gG(e,t,r,n){var o,i,a,s,u,l,c,f,p,h,y,d,b,v,m,g=e.x,w=e.y,O=e.z?e.z:0;if(o=Math.sqrt(g*g+w*w),i=Math.sqrt(g*g+w*w+O*O),o/r<1e-12){if(v=0,i/r<1e-12)return pB,m=-n,{x:e.x,y:e.y,z:e.z}}else v=Math.atan2(w,g);a=O/i,f=(s=o/i)*(1-t)*(u=1/Math.sqrt(1-t*(2-t)*s*s)),p=a*u,b=0;do{b++,l=t*(c=r/Math.sqrt(1-t*p*p))/(c+(m=o*f+O*p-c*(1-t*p*p))),d=(y=a*(u=1/Math.sqrt(1-l*(2-l)*s*s)))*f-(h=s*(1-l)*u)*p,f=h,p=y}while(d*d>1e-24&&b<30);return{x:v,y:Math.atan(y/Math.abs(h)),z:m}}function wG(e){return e===nB||e===oB}function OG(e,t,r){if(function(e,t){return e.datum_type===t.datum_type&&!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===nB?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==oB||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}(e,t))return r;if(e.datum_type===sB||t.datum_type===sB)return r;var n=e.a,o=e.es;if(e.datum_type===iB){if(0!==SG(e,!1,r))return;n=uB,o=cB}var i=t.a,a=t.b,s=t.es;if(t.datum_type===iB&&(i=uB,a=lB,s=cB),o===s&&n===i&&!wG(e.datum_type)&&!wG(t.datum_type))return r;if((r=mG(r,o,n),wG(e.datum_type)&&(r=function(e,t,r){if(t===nB)return{x:e.x+r[0],y:e.y+r[1],z:e.z+r[2]};if(t===oB){var n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],u=r[5],l=r[6];return{x:l*(e.x-u*e.y+s*e.z)+n,y:l*(u*e.x+e.y-a*e.z)+o,z:l*(-s*e.x+a*e.y+e.z)+i}}}(r,e.datum_type,e.datum_params)),wG(t.datum_type)&&(r=function(e,t,r){if(t===nB)return{x:e.x-r[0],y:e.y-r[1],z:e.z-r[2]};if(t===oB){var n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],u=r[5],l=r[6],c=(e.x-n)/l,f=(e.y-o)/l,p=(e.z-i)/l;return{x:c+u*f-s*p,y:-u*c+f+a*p,z:s*c-a*f+p}}}(r,t.datum_type,t.datum_params)),r=gG(r,s,i,a),t.datum_type===iB)&&0!==SG(t,!0,r))return;return r}function SG(e,t,r){if(null===e.grids||0===e.grids.length)return console.log("Grid shift grids not found"),-1;for(var n={x:-r.x,y:r.y},o={x:Number.NaN,y:Number.NaN},i=[],a=0;an.y||c>n.x||h1e-12&&Math.abs(a.y)>1e-12);if(u<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=XB(i.x+r.ll[0]),n.y=i.y+r.ll[1]}else isNaN(i.x)||(n.x=e.x+i.x,n.y=e.y+i.y);return n}function PG(e,t){var r,n={x:e.x/t.del[0],y:e.y/t.del[1]},o=Math.floor(n.x),i=Math.floor(n.y),a=n.x-1*o,s=n.y-1*i,u={x:Number.NaN,y:Number.NaN};if(o<0||o>=t.lim[0])return u;if(i<0||i>=t.lim[1])return u;r=i*t.lim[0]+o;var l=t.cvs[r][0],c=t.cvs[r][1];r++;var f=t.cvs[r][0],p=t.cvs[r][1];r+=t.lim[0];var h=t.cvs[r][0],y=t.cvs[r][1];r--;var d=t.cvs[r][0],b=t.cvs[r][1],v=a*s,m=a*(1-s),g=(1-a)*(1-s),w=(1-a)*s;return u.x=g*l+m*f+w*d+v*h,u.y=g*c+m*p+w*b+v*y,u}function xG(e,t,r){var n,o,i,a=r.x,s=r.y,u=r.z||0,l={};for(i=0;i<3;i++)if(!t||2!==i||void 0!==r.z)switch(0===i?(n=a,o=-1!=="ew".indexOf(e.axis[i])?"x":"y"):1===i?(n=s,o=-1!=="ns".indexOf(e.axis[i])?"y":"x"):(n=u,o="z"),e.axis[i]){case"e":l[o]=n;break;case"w":l[o]=-n;break;case"n":l[o]=n;break;case"s":l[o]=-n;break;case"u":void 0!==r[o]&&(l.z=n);break;case"d":void 0!==r[o]&&(l.z=-n);break;default:return null}return l}function kG(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}function jG(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function EG(e,t,r,n){var o,i=void 0!==(r=Array.isArray(r)?kG(r):{x:r.x,y:r.y,z:r.z,m:r.m}).z;if(function(e){jG(e.x),jG(e.y)}(r),e.datum&&t.datum&&function(e,t){return(e.datum.datum_type===nB||e.datum.datum_type===oB||e.datum.datum_type===iB)&&"WGS84"!==t.datumCode||(t.datum.datum_type===nB||t.datum.datum_type===oB||t.datum.datum_type===iB)&&"WGS84"!==e.datumCode}(e,t)&&(r=EG(e,o=new vG("WGS84"),r,n),e=o),n&&"enu"!==e.axis&&(r=xG(e,!1,r)),"longlat"===e.projName)r={x:r.x*vB,y:r.y*vB,z:r.z||0};else if(e.to_meter&&(r={x:r.x*e.to_meter,y:r.y*e.to_meter,z:r.z||0}),!(r=e.inverse(r)))return;if(e.from_greenwich&&(r.x+=e.from_greenwich),r=OG(e.datum,t.datum,r))return t.from_greenwich&&(r={x:r.x-t.from_greenwich,y:r.y,z:r.z||0}),"longlat"===t.projName?r={x:r.x*mB,y:r.y*mB,z:r.z||0}:(r=t.forward(r),t.to_meter&&(r={x:r.x/t.to_meter,y:r.y/t.to_meter,z:r.z||0})),n&&"enu"!==t.axis?xG(t,!0,r):(i||delete r.z,r)}var TG=vG("WGS84");function CG(e,t,r,n){var o,i,a;return Array.isArray(r)?(o=EG(e,t,r,n)||{x:NaN,y:NaN},r.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof o.z?[o.x,o.y,o.z].concat(r.splice(3)):[o.x,o.y,r[2]].concat(r.splice(3)):[o.x,o.y].concat(r.splice(2)):[o.x,o.y]):(i=EG(e,t,r,n),2===(a=Object.keys(r)).length?i:(a.forEach(function(n){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;i[n]=r[n]}),i))}function RG(e){return e instanceof vG?e:e.oProj?e.oProj:vG(e)}var AG=function(e,t,r){e=RG(e);var n,o=!1;return void 0===t?(t=e,e=TG,o=!0):(void 0!==t.x||Array.isArray(t))&&(r=t,t=e,e=TG,o=!0),t=RG(t),r?CG(e,t,r):(n={forward:function(r,n){return CG(e,t,r,n)},inverse:function(r,n){return CG(t,e,r,n)}},o&&(n.oProj=t),n)},MG=6,LG="AJSAJS",IG="AFAFAF",NG=65,DG=73,FG=79,BG=86,GG=90,UG={forward:VG,inverse:function(e){var t=HG(YG(e.toUpperCase()));if(t.lat&&t.lon)return[t.lon,t.lat,t.lon,t.lat];return[t.left,t.bottom,t.right,t.top]},toPoint:JG};function VG(e,t){return t=t||5,function(e,t){var r="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+(h=e.easting,y=e.northing,d=e.zoneNumber,b=WG(d),v=Math.floor(h/1e5),m=Math.floor(y/1e5)%20,o=v,i=m,a=b,s=a-1,u=LG.charCodeAt(s),l=IG.charCodeAt(s),c=u+o-1,f=l+i,p=!1,c>GG&&(c=c-GG+NG-1,p=!0),(c===DG||uDG||(c>DG||uFG||(c>FG||uGG&&(c=c-GG+NG-1),f>BG?(f=f-BG+NG-1,p=!0):p=!1,(f===DG||lDG||(f>DG||lFG||(f>FG||lBG&&(f=f-BG+NG-1),String.fromCharCode(c)+String.fromCharCode(f))+r.substr(r.length-5,t)+n.substr(n.length-5,t);var o,i,a,s,u,l,c,f,p;var h,y,d,b,v,m}(function(e){var t,r,n,o,i,a,s,u=e.lat,l=e.lon,c=6378137,f=zG(u),p=zG(l);s=Math.floor((l+180)/6)+1,180===l&&(s=60);u>=56&&u<64&&l>=3&&l<12&&(s=32);u>=72&&u<84&&(l>=0&&l<9?s=31:l>=9&&l<21?s=33:l>=21&&l<33?s=35:l>=33&&l<42&&(s=37));a=zG(6*(s-1)-180+3),.006739496752268451,t=c/Math.sqrt(1-.00669438*Math.sin(f)*Math.sin(f)),r=Math.tan(f)*Math.tan(f),n=.006739496752268451*Math.cos(f)*Math.cos(f),o=Math.cos(f)*(p-a),i=c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-3.418046101696858e-9*Math.sin(6*f));var h=.9996*t*(o+(1-r+n)*o*o*o/6+(5-18*r+r*r+72*n-.39089081163157013)*o*o*o*o*o/120)+5e5,y=.9996*(i+t*Math.tan(f)*(o*o/2+(5-r+9*n+4*n*n)*o*o*o*o/24+(61-58*r+r*r+600*n-2.2240339282485886)*o*o*o*o*o*o/720));u<0&&(y+=1e7);return{northing:Math.round(y),easting:Math.round(h),zoneNumber:s,zoneLetter:function(e){var t="Z";84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C");return t}(u)}}({lat:e[1],lon:e[0]}),t)}function JG(e){var t=HG(YG(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function zG(e){return e*(Math.PI/180)}function qG(e){return e/Math.PI*180}function HG(e){var t=e.northing,r=e.easting,n=e.zoneLetter,o=e.zoneNumber;if(o<0||o>60)return null;var i,a,s,u,l,c,f,p,h=6378137,y=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),d=r-5e5,b=t;n<"N"&&(b-=1e7),c=6*(o-1)-180+3,p=(f=b/.9996/6367449.145945056)+(3*y/2-27*y*y*y/32)*Math.sin(2*f)+(21*y*y/16-55*y*y*y*y/32)*Math.sin(4*f)+151*y*y*y/96*Math.sin(6*f),i=h/Math.sqrt(1-.00669438*Math.sin(p)*Math.sin(p)),a=Math.tan(p)*Math.tan(p),s=.006739496752268451*Math.cos(p)*Math.cos(p),u=.99330562*h/Math.pow(1-.00669438*Math.sin(p)*Math.sin(p),1.5),l=d/(.9996*i);var v=p-i*Math.tan(p)/u*(l*l/2-(5+3*a+10*s-4*s*s-.06065547077041606)*l*l*l*l/24+(61+90*a+298*s+45*a*a-1.6983531815716497-3*s*s)*l*l*l*l*l*l/720);v=qG(v);var m,g=(l-(1+2*a+s)*l*l*l/6+(5-2*s+28*a-3*s*s+.05391597401814761+24*a*a)*l*l*l*l*l/120)/Math.cos(p);if(g=c+qG(g),e.accuracy){var w=HG({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});m={top:w.lat,right:w.lon,bottom:v,left:g}}else m={lat:v,lon:g};return m}function WG(e){var t=e%MG;return 0===t&&(t=MG),t}function YG(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,r=e.length,n=null,o="",i=0;!/[A-Z]/.test(t=e.charAt(i));){if(i>=2)throw"MGRSPoint bad conversion from: "+e;o+=t,i++}var a=parseInt(o,10);if(0===i||i+3>r)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(i++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(i,i+=2);for(var u=WG(a),l=function(e,t){var r=LG.charCodeAt(t-1),n=1e5,o=!1;for(;r!==e.charCodeAt(0);){if(++r===DG&&r++,r===FG&&r++,r>GG){if(o)throw"Bad character: "+e;r=NG,o=!0}n+=1e5}return n}(n.charAt(0),u),c=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;var r=IG.charCodeAt(t-1),n=0,o=!1;for(;r!==e.charCodeAt(0);){if(++r===DG&&r++,r===FG&&r++,r>BG){if(o)throw"Bad character: "+e;r=NG,o=!0}n+=1e5}return n}(n.charAt(1),u);c0&&(p=1e5/Math.pow(10,d),h=e.substring(i,i+d),b=parseFloat(h)*p,y=e.substring(i+d),v=parseFloat(y)*p),{easting:b+l,northing:v+c,zoneLetter:s,zoneNumber:a,accuracy:p}}function XG(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function QG(e){"@babel/helpers - typeof";return(QG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZG(e,t,r){if(!(this instanceof ZG))return new ZG(e,t,r);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"===QG(e))this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}ZG.fromMGRS=function(e){return new ZG(JG(e))},ZG.prototype.toMGRS=function(e){return VG([this.x,this.y],e)};var KG=ZG,$G=1,eU=.25,tU=.046875,rU=.01953125,nU=.01068115234375,oU=.75,iU=.46875,aU=.013020833333333334,sU=.007120768229166667,uU=.3645833333333333,lU=.005696614583333333,cU=.3076171875;function fU(e){var t=[];t[0]=$G-e*(eU+e*(tU+e*(rU+e*nU))),t[1]=e*(oU-e*(tU+e*(rU+e*nU)));var r=e*e;return t[2]=r*(iU-e*(aU+e*sU)),r*=e,t[3]=r*(uU-e*lU),t[4]=r*e*cU,t}function pU(e,t,r,n){return r*=t,t*=t,n[0]*e-r*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var hU=20;function yU(e,t,r){for(var n=1/(1-t),o=e,i=hU;i;--i){var a=Math.sin(o),s=1-t*a*a;if(o-=s=(pU(o,a,Math.cos(o),r)-e)*(s*Math.sqrt(s))*n,Math.abs(s)bB?Math.tan(i):0,y=Math.pow(h,2),d=Math.pow(y,2);t=1-this.es*Math.pow(s,2),l/=Math.sqrt(t);var b=pU(i,s,u,this.en);r=this.a*(this.k0*l*(1+c/6*(1-y+f+c/20*(5-18*y+d+14*f-58*y*f+c/42*(61+179*d-d*y-479*y)))))+this.x0,n=this.a*(this.k0*(b-this.ml0+s*a*l/2*(1+c/12*(5-y+9*f+4*p+c/30*(61+d-58*y+270*f-330*y*f+c/56*(1385+543*d-d*y-3111*y))))))+this.y0}else{var v=u*Math.sin(a);if(Math.abs(Math.abs(v)-1)=1){if(v-1>bB)return 93;n=0}else n=Math.acos(n);i<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=r,e.y=n,e},inverse:function(e){var t,r,n,o,i=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(r=yU(t=this.ml0+a/this.k0,this.es,this.en),Math.abs(r)bB?Math.tan(r):0,c=this.ep2*Math.pow(u,2),f=Math.pow(c,2),p=Math.pow(l,2),h=Math.pow(p,2);t=1-this.es*Math.pow(s,2);var y=i*Math.sqrt(t)/this.k0,d=Math.pow(y,2);n=r-(t*=l)*d/(1-this.es)*.5*(1-d/12*(5+3*p-9*c*p+c-4*f-d/30*(61+90*p-252*c*p+45*h+46*c-d/56*(1385+3633*p+4095*h+1574*h*p)))),o=XB(this.long0+y*(1-d/6*(1+2*p+c-d/20*(5+28*p+24*h+8*c*p+6*c-d/42*(61+662*p+1320*h+720*h*p))))/u)}else n=pB*YB(a),o=0;else{var b=Math.exp(i/this.k0),v=.5*(b-1/b),m=this.lat0+a/this.k0,g=Math.cos(m);t=Math.sqrt((1-Math.pow(g,2))/(1+Math.pow(v,2))),n=Math.asin(t),a<0&&(n=-n),o=0===v&&0===g?0:XB(Math.atan2(v,g)+this.long0)}return e.x=o,e.y=n,e},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function bU(e){var t=Math.exp(e);return t=(t-1/t)/2}function vU(e,t){e=Math.abs(e),t=Math.abs(t);var r=Math.max(e,t),n=Math.min(e,t)/(r||1);return r*Math.sqrt(1+Math.pow(n,2))}function mU(e){var t=Math.abs(e);return t=function(e){var t=1+e,r=t-1;return 0===r?e:e*Math.log(t)/r}(t*(1+t/(vU(1,t)+1))),e<0?-t:t}function gU(e,t){for(var r,n=2*Math.cos(2*t),o=e.length-1,i=e[o],a=0;--o>=0;)r=n*i-a+e[o],a=i,i=r;return t+r*Math.sin(2*t)}function wU(e,t,r){for(var n,o,i=Math.sin(t),a=Math.cos(t),s=bU(r),u=function(e){var t=Math.exp(e);return t=(t+1/t)/2}(r),l=2*a*u,c=-2*i*s,f=e.length-1,p=e[f],h=0,y=0,d=0;--f>=0;)n=y,o=h,p=l*(y=p)-n-c*(h=d)+e[f],d=c*y-o+l*h;return[(l=i*u)*p-(c=a*s)*d,l*d+c*p]}var OU={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(dU.init.apply(this),this.forward=dU.forward,this.inverse=dU.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),r=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),r*=t,this.cgb[1]=r*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),r*=t,this.cgb[2]=r*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=r*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),r*=t,this.cgb[3]=r*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=r*(1237/630+t*(t*(-24832/14175)-2.4)),r*=t,this.cgb[4]=r*(4174/315+t*(-144838/6237)),this.cbg[4]=r*(-734/315+t*(109598/31185)),r*=t,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+r*(.25+r*(1/64+r/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=r*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=r*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),r*=t,this.utg[2]=r*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=r*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),r*=t,this.utg[3]=r*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=r*(49561/161280+t*(-179/168+t*(6601661/7257600))),r*=t,this.utg[4]=r*(-4583/161280+t*(108847/3991680)),this.gtu[4]=r*(34729/80640+t*(-3418889/1995840)),r*=t,this.utg[5]=-.03233083094085698*r,this.gtu[5]=.6650675310896665*r;var n=gU(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(e,t){for(var r,n=2*Math.cos(t),o=e.length-1,i=e[o],a=0;--o>=0;)r=n*i-a+e[o],a=i,i=r;return Math.sin(t)*r}(this.gtu,2*n))},forward:function(e){var t=XB(e.x-this.long0),r=e.y;r=gU(this.cbg,r);var n=Math.sin(r),o=Math.cos(r),i=Math.sin(t),a=Math.cos(t);r=Math.atan2(n,a*o),t=Math.atan2(i*o,vU(n,o*a)),t=mU(Math.tan(t));var s,u,l=wU(this.gtu,2*r,2*t);return r+=l[0],t+=l[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,u=this.a*(this.Qn*r+this.Zb)+this.y0):(s=1/0,u=1/0),e.x=s,e.y=u,e},inverse:function(e){var t,r,n=(e.x-this.x0)*(1/this.a),o=(e.y-this.y0)*(1/this.a);if(o=(o-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var i=wU(this.utg,2*o,2*n);o+=i[0],n+=i[1],n=Math.atan(bU(n));var a=Math.sin(o),s=Math.cos(o),u=Math.sin(n),l=Math.cos(n);o=Math.atan2(a*l,vU(u,l*s)),t=XB((n=Math.atan2(u,l*s))+this.long0),r=gU(this.cgb,o)}else t=1/0,r=1/0;return e.x=t,e.y=r,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]};var SU={init:function(){var e=function(e,t){if(void 0===e){if((e=Math.floor(30*(XB(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e}(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*vB,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,OU.init.apply(this),this.forward=OU.forward,this.inverse=OU.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function _U(e,t){return Math.pow((1-e)/(1+e),t)}var PU=20;var xU={init:function(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+gB)/(Math.pow(Math.tan(.5*this.lat0+gB),this.C)*_U(this.e*e,this.ratexp))},forward:function(e){var t=e.x,r=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+gB),this.C)*_U(this.e*Math.sin(r),this.ratexp))-pB,e.x=this.C*t,e},inverse:function(e){for(var t=e.x/this.C,r=e.y,n=Math.pow(Math.tan(.5*r+gB)/this.K,1/this.C),o=PU;o>0&&(r=2*Math.atan(n*_U(this.e*Math.sin(e.y),-.5*this.e))-pB,!(Math.abs(r-e.y)<1e-14));--o)e.y=r;return o?(e.x=t,e.y=r,e):null},names:["gauss"]};var kU={init:function(){xU.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(e){var t,r,n,o;return e.x=XB(e.x-this.long0),xU.forward.apply(this,[e]),t=Math.sin(e.y),r=Math.cos(e.y),n=Math.cos(e.x),o=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*r*n),e.x=o*r*Math.sin(e.x),e.y=o*(this.cosc0*t-this.sinc0*r*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(e){var t,r,n,o,i;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,i=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(i,this.R2);t=Math.sin(a),r=Math.cos(a),o=Math.asin(r*this.sinc0+e.y*t*this.cosc0/i),n=Math.atan2(e.x*t,i*this.cosc0*r-e.y*this.sinc0*t)}else o=this.phic0,n=0;return e.x=n,e.y=o,xU.inverse.apply(this,[e]),e.x=XB(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var jU={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=bB&&(this.k0=.5*(1+YB(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=bB&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=bB&&(this.k0=.5*this.cons*WB(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/QB(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=WB(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-pB,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var t,r,n,o,i,a,s=e.x,u=e.y,l=Math.sin(u),c=Math.cos(u),f=XB(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=bB&&Math.abs(u+this.lat0)<=bB?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(f)),e.x=this.a*t*c*Math.sin(f)+this.x0,e.y=this.a*t*(this.coslat0*l-this.sinlat0*c*Math.cos(f))+this.y0,e):(r=2*Math.atan(this.ssfn_(u,l,this.e))-pB,o=Math.cos(r),n=Math.sin(r),Math.abs(this.coslat0)<=bB?(i=QB(this.e,u*this.con,this.con*l),a=2*this.a*this.k0*i/this.cons,e.x=this.x0+a*Math.sin(s-this.long0),e.y=this.y0-this.con*a*Math.cos(s-this.long0),e):(Math.abs(this.sinlat0)0?XB(this.long0+Math.atan2(e.x,-1*e.y)):XB(this.long0+Math.atan2(e.x,e.y)):XB(this.long0+Math.atan2(e.x*Math.sin(s),a*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=r,e)}if(Math.abs(this.coslat0)<=bB){if(a<=bB)return r=this.lat0,t=this.long0,e.x=t,e.y=r,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),r=this.con*ZB(this.e,n),t=this.con*XB(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else o=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=bB?i=this.X0:(i=Math.asin(Math.cos(o)*this.sinX0+e.y*Math.sin(o)*this.cosX0/a),t=XB(this.long0+Math.atan2(e.x*Math.sin(o),a*this.cosX0*Math.cos(o)-e.y*this.sinX0*Math.sin(o)))),r=-1*ZB(this.e,Math.tan(.5*(pB+i)));return e.x=t,e.y=r,e},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(e,t,r){return t*=r,Math.tan(.5*(pB+e))*Math.pow((1-t)/(1+t),.5*r)}};var EU={init:function(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),r=this.a,n=1/this.rf,o=2*n-Math.pow(n,2),i=this.e=Math.sqrt(o);this.R=this.k0*r*Math.sqrt(1-o)/(1-o*Math.pow(t,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),u=Math.log((1+i*t)/(1-i*t));this.K=a-this.alpha*s+this.alpha*i/2*u},forward:function(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+r)+this.K,o=2*(Math.atan(Math.exp(n))-Math.PI/4),i=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(i)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(i))),s=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(i));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e},inverse:function(e){for(var t=e.x-this.x0,r=e.y-this.y0,n=t/this.R,o=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),i=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),s=this.lambda0+a/this.alpha,u=0,l=i,c=-1e3,f=0;Math.abs(l-c)>1e-7;){if(++f>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+i/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(u))-Math.PI/2}return e.x=s,e.y=l,e},names:["somerc"]};function TU(e){"@babel/helpers - typeof";return(TU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var CU=1e-7;var RU={init:function(){var e,t,r,n,o,i,a,s,u,l,c,f,p,h=0,y=0,d=0,b=0,v=0,m=0,g=0;this.no_off=(p="object"===TU((f=this).PROJECTION)?Object.keys(f.PROJECTION)[0]:f.PROJECTION,"no_uoff"in f||"no_off"in f||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(p)),this.no_rot="no_rot"in this;var w=!1;"alpha"in this&&(w=!0);var O=!1;if("rectified_grid_angle"in this&&(O=!0),w&&(g=this.alpha),O&&(h=this.rectified_grid_angle*vB),w||O)y=this.longc;else if(d=this.long1,v=this.lat1,b=this.long2,m=this.lat2,Math.abs(v-m)<=CU||(e=Math.abs(v))<=CU||Math.abs(e-pB)<=CU||Math.abs(Math.abs(this.lat0)-pB)<=CU||Math.abs(Math.abs(m)-pB)<=CU)throw new Error;var S=1-this.es;t=Math.sqrt(S),Math.abs(this.lat0)>bB?(s=Math.sin(this.lat0),r=Math.cos(this.lat0),e=1-this.es*s*s,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/S),this.A=this.B*this.k0*t/e,(o=(n=this.B*t/(r*Math.sqrt(e)))*n-1)<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=n,this.E*=Math.pow(QB(this.e,this.lat0,s),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=o=1),w||O?(w?(c=Math.asin(Math.sin(g)/n),O||(h=g)):(c=h,g=Math.asin(n*Math.sin(c))),this.lam0=y-Math.asin(.5*(o-1/o)*Math.tan(c))/this.B):(i=Math.pow(QB(this.e,v,Math.sin(v)),this.B),a=Math.pow(QB(this.e,m,Math.sin(m)),this.B),o=this.E/i,u=(a-i)/(a+i),l=((l=this.E*this.E)-a*i)/(l+a*i),(e=d-b)<-Math.pi?b-=wB:e>Math.pi&&(b+=wB),this.lam0=XB(.5*(d+b)-Math.atan(l*Math.tan(.5*this.B*(d-b))/u)/this.B),c=Math.atan(2*Math.sin(this.B*XB(d-this.lam0))/(o-1/o)),h=g=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(h),this.cosrot=Math.cos(h),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(g))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(gB-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(gB+o))},forward:function(e){var t,r,n,o,i,a,s,u,l={};if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-pB)>bB){if(t=.5*((i=this.E/Math.pow(QB(this.e,e.y,Math.sin(e.y)),this.B))-(a=1/i)),r=.5*(i+a),o=Math.sin(this.B*e.x),n=(t*this.singam-o*this.cosgam)/r,Math.abs(Math.abs(n)-1)0?this.v_pole_n:this.v_pole_s,s=this.ArB*e.y;return this.no_rot?(l.x=s,l.y=u):(s-=this.u_0,l.x=u*this.cosrot+s*this.sinrot,l.y=s*this.cosrot-u*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(e){var t,r,n,o,i,a,s,u={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(r=e.y,t=e.x):(r=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),o=.5*((n=Math.exp(-this.BrA*r))-1/n),i=.5*(n+1/n),s=((a=Math.sin(this.BrA*t))*this.cosgam+o*this.singam)/i,Math.abs(Math.abs(s)-1)bB?this.ns=Math.log(n/s)/Math.log(o/u):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var t=e.x,r=e.y;Math.abs(2*Math.abs(r)-Math.PI)<=bB&&(r=YB(r)*(pB-2*bB));var n,o,i=Math.abs(Math.abs(r)-pB);if(i>bB)n=QB(this.e,r,Math.sin(r)),o=this.a*this.f0*Math.pow(n,this.ns);else{if((i=r*this.ns)<=0)return null;o=0}var a=this.ns*XB(t-this.long0);return e.x=this.k0*(o*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-o*Math.cos(a))+this.y0,e},inverse:function(e){var t,r,n,o,i,a=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),r=1):(t=-Math.sqrt(a*a+s*s),r=-1);var u=0;if(0!==t&&(u=Math.atan2(r*a,r*s)),0!==t||this.ns>0){if(r=1/this.ns,n=Math.pow(t/(this.a*this.f0),r),-9999===(o=ZB(this.e,n)))return null}else o=-pB;return i=XB(u/this.ns+this.long0),e.x=i,e.y=o,e},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};var MU={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(e){var t,r,n,o,i,a,s,u=e.x,l=e.y,c=XB(u-this.long0);return t=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(n)),i=Math.asin(Math.cos(r)*Math.sin(n)/Math.cos(o)),a=this.n*i,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e},inverse:function(e){var t,r,n,o,i,a,s,u=e.x;e.x=e.y,e.y=u,this.czech||(e.y*=-1,e.x*=-1),i=Math.sqrt(e.x*e.x+e.y*e.y),o=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/i,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(o)),r=Math.asin(Math.cos(n)*Math.sin(o)/Math.cos(t)),e.x=this.long0-r/this.alfa,a=t,s=0;var l=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,l+=1}while(0===s&&l<15);return l>=15?null:e},names:["Krovak","krovak"]};function LU(e,t,r,n,o){return e*o-t*Math.sin(2*o)+r*Math.sin(4*o)-n*Math.sin(6*o)}function IU(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function NU(e){return.375*e*(1+.25*e*(1+.46875*e))}function DU(e){return.05859375*e*e*(1+.75*e)}function FU(e){return e*e*e*(35/3072)}function BU(e,t,r){var n=t*r;return e/Math.sqrt(1-n*n)}function GU(e){return Math.abs(e)1e-7?(1-e*e)*(t/(1-(r=e*t)*r)-.5/e*Math.log((1-r)/(1+r))):2*t}var zU=.3333333333333333,qU=.17222222222222222,HU=.10257936507936508,WU=.06388888888888888,YU=.0664021164021164,XU=.016415012942191543;var QU={init:function(){var e,t=Math.abs(this.lat0);if(Math.abs(t-pB)0)switch(this.qp=JU(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,r=[];return r[0]=e*zU,t=e*e,r[0]+=t*qU,r[1]=t*WU,t*=e,r[0]+=t*HU,r[1]+=t*YU,r[2]=t*XU,r}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=JU(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(e){var t,r,n,o,i,a,s,u,l,c,f=e.x,p=e.y;if(f=XB(f-this.long0),this.sphere){if(i=Math.sin(p),c=Math.cos(p),n=Math.cos(f),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+c*n:1+this.sinph0*i+this.cosph0*c*n)<=bB)return null;t=(r=Math.sqrt(2/r))*c*Math.sin(f),r*=this.mode===this.EQUIT?i:this.cosph0*i-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(p+this.lat0)=0?(t=(l=Math.sqrt(a))*o,r=n*(this.mode===this.S_POLE?l:-l)):t=r=0}}return e.x=this.a*t+this.x0,e.y=this.a*r+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,r,n,o,i,a,s,u,l,c,f=e.x/this.a,p=e.y/this.a;if(this.sphere){var h,y=0,d=0;if((r=.5*(h=Math.sqrt(f*f+p*p)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(d=Math.sin(r),y=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(h)<=bB?0:Math.asin(p*d/h),f*=d,p=y*h;break;case this.OBLIQ:r=Math.abs(h)<=bB?this.lat0:Math.asin(y*this.sinph0+p*d*this.cosph0/h),f*=d*this.cosph0,p=(y-Math.sin(r)*this.sinph0)*h;break;case this.N_POLE:p=-p,r=pB-r;break;case this.S_POLE:r-=pB}t=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(f,p):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(f/=this.dd,p*=this.dd,(a=Math.sqrt(f*f+p*p))1&&(e=e>1?1:-1),Math.asin(e)}var KU={init:function(){Math.abs(this.lat1+this.lat2)bB?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,r=e.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var n=JU(this.e3,this.sin_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,i=this.ns0*XB(t-this.long0),a=o*Math.sin(i)+this.x0,s=this.rh-o*Math.cos(i)+this.y0;return e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),o=0,0!==t&&(o=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(r=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,r)),i=XB(o/this.ns0+this.long0),e.x=i,e.y=a,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var r,n,o,i,a,s=ZU(.5*t);if(e0||Math.abs(i)<=bB?(a=this.x0+1*this.a*r*Math.sin(n)/i,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*o)/i):(a=this.x0+this.infinity_dist*r*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*r*o)),e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(o=Math.atan2(t,this.rc),r=Math.sin(o),a=ZU((n=Math.cos(o))*this.sin_p14+e.y*r*this.cos_p14/t),i=Math.atan2(e.x*r,t*this.cos_p14*n-e.y*this.sin_p14*r),i=XB(this.long0+i)):(a=this.phic0,i=0),e.x=i,e.y=a,e},names:["gnom"]};var eV={init:function(){this.sphere||(this.k0=WB(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(e){var t,r,n=e.x,o=e.y,i=XB(n-this.long0);if(this.sphere)t=this.x0+this.a*i*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(o)/Math.cos(this.lat_ts);else{var a=JU(this.e,Math.sin(o));t=this.x0+this.a*this.k0*i,r=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=r,e},inverse:function(e){var t,r;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=XB(this.long0+e.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(r=function(e,t){var r=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-r)<1e-6)return t<0?-1*pB:pB;for(var n,o,i,a,s=Math.asin(.5*t),u=0;u<30;u++)if(o=Math.sin(s),i=Math.cos(s),a=e*o,s+=n=Math.pow(1-a*a,2)/(2*i)*(t/(1-e*e)-o/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return s;return NaN}(this.e,2*e.y*this.k0/this.a),t=XB(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=r,e},names:["cea"]};var tV={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(e){var t=e.x,r=e.y,n=XB(t-this.long0),o=GU(r-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*o,e},inverse:function(e){var t=e.x,r=e.y;return e.x=XB(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=GU(this.lat0+(r-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},rV=20;var nV={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=IU(this.es),this.e1=NU(this.es),this.e2=DU(this.es),this.e3=FU(this.es),this.ml0=this.a*LU(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,r,n,o=e.x,i=e.y,a=XB(o-this.long0);if(n=a*Math.sin(i),this.sphere)Math.abs(i)<=bB?(t=this.a*a,r=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(i),r=this.a*(GU(i-this.lat0)+(1-Math.cos(n))/Math.tan(i)));else if(Math.abs(i)<=bB)t=this.a*a,r=-1*this.ml0;else{var s=BU(this.a,this.e,Math.sin(i))/Math.tan(i);t=s*Math.sin(n),r=this.a*LU(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=r+this.y0,e},inverse:function(e){var t,r,n,o,i,a,s,u,l;if(n=e.x-this.x0,o=e.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=bB)t=XB(n/this.a+this.long0),r=0;else{var c;for(a=this.lat0+o/this.a,s=n*n/this.a/this.a+a*a,u=a,i=rV;i;--i)if(u+=l=-1*(a*(u*(c=Math.tan(u))+1)-u-.5*(u*u+s)*c)/((u-a)/c-1),Math.abs(l)<=bB){r=u;break}t=XB(this.long0+Math.asin(n*Math.tan(u)/this.a)/Math.sin(r))}else if(Math.abs(o+this.ml0)<=bB)r=0,t=XB(this.long0+n/this.a);else{var f,p,h,y,d;for(a=(this.ml0+o)/this.a,s=n*n/this.a/this.a+a*a,u=a,i=rV;i;--i)if(d=this.e*Math.sin(u),f=Math.sqrt(1-d*d)*Math.tan(u),p=this.a*LU(this.e0,this.e1,this.e2,this.e3,u),h=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),u-=l=(a*(f*(y=p/this.a)+1)-y-.5*f*(y*y+s))/(this.es*Math.sin(2*u)*(y*y+s-2*a*y)/(4*f)+(a-y)*(f*h-2/Math.sin(2*u))-h),Math.abs(l)<=bB){r=u;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),t=XB(this.long0+Math.asin(n*f/this.a)/Math.sin(r))}return e.x=t,e.y=r,e},names:["Polyconic","poly"]};var oV={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(e){var t,r=e.x,n=e.y-this.lat0,o=r-this.long0,i=n/fB*1e-5,a=o,s=1,u=0;for(t=1;t<=10;t++)s*=i,u+=this.A[t]*s;var l,c=u,f=a,p=1,h=0,y=0,d=0;for(t=1;t<=6;t++)l=h*c+p*f,p=p*c-h*f,h=l,y=y+this.B_re[t]*p-this.B_im[t]*h,d=d+this.B_im[t]*p+this.B_re[t]*h;return e.x=d*this.a+this.x0,e.y=y*this.a+this.y0,e},inverse:function(e){var t,r,n=e.x,o=e.y,i=n-this.x0,a=(o-this.y0)/this.a,s=i/this.a,u=1,l=0,c=0,f=0;for(t=1;t<=6;t++)r=l*a+u*s,u=u*a-l*s,l=r,c=c+this.C_re[t]*u-this.C_im[t]*l,f=f+this.C_im[t]*u+this.C_re[t]*l;for(var p=0;p.999999999999&&(r=.999999999999),t=Math.asin(r);var n=XB(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),r=(2*t+Math.sin(2*t))/Math.PI,Math.abs(r)>1&&(r=1);var o=Math.asin(r);return e.x=n,e.y=o,e},names:["Mollweide","moll"]};var lV={init:function(){Math.abs(this.lat1+this.lat2)=0?(r=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(r=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var i=0;return 0!==r&&(i=Math.atan2(t*e.x,t*e.y)),this.sphere?(o=XB(this.long0+i/this.ns),n=GU(this.g-r/this.a),e.x=o,e.y=n,e):(n=UU(this.g-r/this.a,this.e0,this.e1,this.e2,this.e3),o=XB(this.long0+i/this.ns),e.x=o,e.y=n,e)},names:["Equidistant_Conic","eqdc"]};var cV={init:function(){this.R=this.a},forward:function(e){var t,r,n=e.x,o=e.y,i=XB(n-this.long0);Math.abs(o)<=bB&&(t=this.x0+this.R*i,r=this.y0);var a=ZU(2*Math.abs(o/Math.PI));(Math.abs(i)<=bB||Math.abs(Math.abs(o)-pB)<=bB)&&(t=this.x0,r=o>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/i-i/Math.PI),u=s*s,l=Math.sin(a),c=Math.cos(a),f=c/(l+c-1),p=f*f,h=f*(2/l-1),y=h*h,d=Math.PI*this.R*(s*(f-y)+Math.sqrt(u*(f-y)*(f-y)-(y+u)*(p-y)))/(y+u);i<0&&(d=-d),t=this.x0+d;var b=u+f;return d=Math.PI*this.R*(h*b-s*Math.sqrt((y+u)*(u+1)-b*b))/(y+u),r=o>=0?this.y0+d:this.y0-d,e.x=t,e.y=r,e},inverse:function(e){var t,r,n,o,i,a,s,u,l,c,f,p;return e.x-=this.x0,e.y-=this.y0,f=Math.PI*this.R,i=(n=e.x/f)*n+(o=e.y/f)*o,f=3*(o*o/(u=-2*(a=-Math.abs(o)*(1+i))+1+2*o*o+i*i)+(2*(s=a-2*o*o+n*n)*s*s/u/u/u-9*a*s/u/u)/27)/(l=(a-s*s/3/u)/u)/(c=2*Math.sqrt(-l/3)),Math.abs(f)>1&&(f=f>=0?1:-1),p=Math.acos(f)/3,r=e.y>=0?(-c*Math.cos(p+Math.PI/3)-s/3/u)*Math.PI:-(-c*Math.cos(p+Math.PI/3)-s/3/u)*Math.PI,t=Math.abs(n)2*pB*this.a)return;return r=t/this.a,n=Math.sin(r),o=Math.cos(r),i=this.long0,Math.abs(t)<=bB?a=this.lat0:(a=ZU(o*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-pB,i=Math.abs(s)<=bB?this.lat0>=0?XB(this.long0+Math.atan2(e.x,-e.y)):XB(this.long0-Math.atan2(-e.x,e.y)):XB(this.long0+Math.atan2(e.x*n,t*this.cos_p12*o-e.y*this.sin_p12*n))),e.x=i,e.y=a,e}return u=IU(this.es),l=NU(this.es),c=DU(this.es),f=FU(this.es),Math.abs(this.sin_p12-1)<=bB?(a=UU(((p=this.a*LU(u,l,c,f,pB))-(t=Math.sqrt(e.x*e.x+e.y*e.y)))/this.a,u,l,c,f),i=XB(this.long0+Math.atan2(e.x,-1*e.y)),e.x=i,e.y=a,e):Math.abs(this.sin_p12+1)<=bB?(p=this.a*LU(u,l,c,f,pB),a=UU(((t=Math.sqrt(e.x*e.x+e.y*e.y))-p)/this.a,u,l,c,f),i=XB(this.long0+Math.atan2(e.x,e.y)),e.x=i,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),d=Math.atan2(e.x,e.y),h=BU(this.a,this.e,this.sin_p12),b=Math.cos(d),m=-(v=this.e*this.cos_p12*b)*v/(1-this.es),g=3*this.es*(1-m)*this.sin_p12*this.cos_p12*b/(1-this.es),S=1-m*(O=(w=t/h)-m*(1+m)*Math.pow(w,3)/6-g*(1+3*m)*Math.pow(w,4)/24)*O/2-w*O*O*O/6,y=Math.asin(this.sin_p12*Math.cos(O)+this.cos_p12*Math.sin(O)*b),i=XB(this.long0+Math.asin(Math.sin(d)*Math.sin(O)/Math.cos(y))),_=Math.sin(y),a=Math.atan2((_-this.es*S*this.sin_p12)*Math.tan(y),_*(1-this.es)),e.x=i,e.y=a,e)},names:["Azimuthal_Equidistant","aeqd"]};var pV={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(e){var t,r,n,o,i,a,s,u=e.x,l=e.y;return n=XB(u-this.long0),t=Math.sin(l),r=Math.cos(l),o=Math.cos(n),((i=this.sin_p14*t+this.cos_p14*r*o)>0||Math.abs(i)<=bB)&&(a=1*this.a*r*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*o)),e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a,s;return e.x-=this.x0,e.y-=this.y0,r=ZU((t=Math.sqrt(e.x*e.x+e.y*e.y))/this.a),n=Math.sin(r),o=Math.cos(r),a=this.long0,Math.abs(t)<=bB?(s=this.lat0,e.x=a,e.y=s,e):(s=ZU(o*this.sin_p14+e.y*n*this.cos_p14/t),i=Math.abs(this.lat0)-pB,Math.abs(i)<=bB?(a=this.lat0>=0?XB(this.long0+Math.atan2(e.x,-e.y)):XB(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=XB(this.long0+Math.atan2(e.x*n,t*this.cos_p14*o-e.y*this.sin_p14*n)),e.x=a,e.y=s,e))},names:["ortho"]},hV={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},yV={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function dV(e,t,r,n){var o;return egB&&o<=pB+gB?(n.value=yV.AREA_1,o-=pB):o>pB+gB||o<=-(pB+gB)?(n.value=yV.AREA_2,o=o>=0?o-OB:o+OB):(n.value=yV.AREA_3,o+=pB)),o}function bV(e,t){var r=e+t;return r<-OB?r+=wB:r>+OB&&(r-=wB),r}var vV={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=pB-gB/2?this.face=hV.TOP:this.lat0<=-(pB-gB/2)?this.face=hV.BOTTOM:Math.abs(this.long0)<=gB?this.face=hV.FRONT:Math.abs(this.long0)<=pB+gB?this.face=this.long0>0?hV.RIGHT:hV.LEFT:this.face=hV.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(e){var t,r,n,o,i,a,s={x:0,y:0},u={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,r=e.x,this.face===hV.TOP)o=pB-t,r>=gB&&r<=pB+gB?(u.value=yV.AREA_0,n=r-pB):r>pB+gB||r<=-(pB+gB)?(u.value=yV.AREA_1,n=r>0?r-OB:r+OB):r>-(pB+gB)&&r<=-gB?(u.value=yV.AREA_2,n=r+pB):(u.value=yV.AREA_3,n=r);else if(this.face===hV.BOTTOM)o=pB+t,r>=gB&&r<=pB+gB?(u.value=yV.AREA_0,n=-r+pB):r=-gB?(u.value=yV.AREA_1,n=-r):r<-gB&&r>=-(pB+gB)?(u.value=yV.AREA_2,n=-r-pB):(u.value=yV.AREA_3,n=r>0?-r+OB:-r-OB);else{var l,c,f,p,h,y;this.face===hV.RIGHT?r=bV(r,+pB):this.face===hV.BACK?r=bV(r,+OB):this.face===hV.LEFT&&(r=bV(r,-pB)),p=Math.sin(t),h=Math.cos(t),y=Math.sin(r),l=h*Math.cos(r),c=h*y,f=p,this.face===hV.FRONT?n=dV(o=Math.acos(l),f,c,u):this.face===hV.RIGHT?n=dV(o=Math.acos(c),f,-l,u):this.face===hV.BACK?n=dV(o=Math.acos(-l),f,-c,u):this.face===hV.LEFT?n=dV(o=Math.acos(-c),f,l,u):(o=n=0,u.value=yV.AREA_0)}return a=Math.atan(12/OB*(n+Math.acos(Math.sin(n)*Math.cos(gB))-pB)),i=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),u.value===yV.AREA_1?a+=pB:u.value===yV.AREA_2?a+=OB:u.value===yV.AREA_3&&(a+=1.5*OB),s.x=i*Math.cos(a),s.y=i*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,e.x=s.x,e.y=s.y,e},inverse:function(e){var t,r,n,o,i,a,s,u,l,c,f,p,h={lam:0,phi:0},y={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,r=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?y.value=yV.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(y.value=yV.AREA_1,t-=pB):e.x<0&&-e.x>=Math.abs(e.y)?(y.value=yV.AREA_2,t=t<0?t+OB:t-OB):(y.value=yV.AREA_3,t+=pB),l=OB/12*Math.tan(t),i=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),a=Math.atan(i),(s=1-(n=Math.cos(t))*n*(o=Math.tan(r))*o*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),this.face===hV.TOP)u=Math.acos(s),h.phi=pB-u,y.value===yV.AREA_0?h.lam=a+pB:y.value===yV.AREA_1?h.lam=a<0?a+OB:a-OB:y.value===yV.AREA_2?h.lam=a-pB:h.lam=a;else if(this.face===hV.BOTTOM)u=Math.acos(s),h.phi=u-pB,y.value===yV.AREA_0?h.lam=-a+pB:y.value===yV.AREA_1?h.lam=-a:y.value===yV.AREA_2?h.lam=-a-pB:h.lam=a<0?-a-OB:-a+OB;else{var d,b,v;l=(d=s)*d,b=(l+=(v=l>=1?0:Math.sqrt(1-l)*Math.sin(a))*v)>=1?0:Math.sqrt(1-l),y.value===yV.AREA_1?(l=b,b=-v,v=l):y.value===yV.AREA_2?(b=-b,v=-v):y.value===yV.AREA_3&&(l=b,b=v,v=-l),this.face===hV.RIGHT?(l=d,d=-b,b=l):this.face===hV.BACK?(d=-d,b=-b):this.face===hV.LEFT&&(l=d,d=b,b=-l),h.phi=Math.acos(-v)-pB,h.lam=Math.atan2(b,d),this.face===hV.RIGHT?h.lam=bV(h.lam,-pB):this.face===hV.BACK?h.lam=bV(h.lam,-OB):this.face===hV.LEFT&&(h.lam=bV(h.lam,+pB))}return 0!==this.es&&(c=h.phi<0?1:0,f=Math.tan(h.phi),p=this.b/Math.sqrt(f*f+this.one_minus_f_squared),h.phi=Math.atan(Math.sqrt(this.a*this.a-p*p)/(this.one_minus_f*p)),c&&(h.phi=-h.phi)),h.lam+=this.long0,e.x=h.lam,e.y=h.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},mV=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],gV=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],wV=.8487,OV=1.3523,SV=mB/5,_V=1/SV,PV=18,xV=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},kV=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};var jV={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(e){var t=XB(e.x-this.long0),r=Math.abs(e.y),n=Math.floor(r*SV);n<0?n=0:n>=PV&&(n=PV-1),r=mB*(r-_V*n);var o={x:xV(mV[n],r)*t,y:xV(gV[n],r)};return e.y<0&&(o.y=-o.y),o.x=o.x*this.a*wV+this.x0,o.y=o.y*this.a*OV+this.y0,o},inverse:function(e){var t={x:(e.x-this.x0)/(this.a*wV),y:Math.abs(e.y-this.y0)/(this.a*OV)};if(t.y>=1)t.x/=mV[PV][0],t.y=e.y<0?-pB:pB;else{var r=Math.floor(t.y*PV);for(r<0?r=0:r>=PV&&(r=PV-1);;)if(gV[r][0]>t.y)--r;else{if(!(gV[r+1][0]<=t.y))break;++r}var n=gV[r],o=5*(t.y-n[0])/(gV[r+1][0]-n[0]);o=function(e,t,r,n){for(var o=t;n;--n){var i=e(o);if(o-=i,Math.abs(i)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var e=1-this.es,t=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(e){var t,r,n,o,i=e.x,a=e.y;if(i-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var s=this.radius_p/vU(this.radius_p*Math.cos(a),Math.sin(a));if(r=s*Math.cos(i)*Math.cos(a),n=s*Math.sin(i)*Math.cos(a),o=s*Math.sin(a),(this.radius_g-r)*r-n*n-o*o*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;t=this.radius_g-r,this.flip_axis?(e.x=this.radius_g_1*Math.atan(n/vU(o,t)),e.y=this.radius_g_1*Math.atan(o/t)):(e.x=this.radius_g_1*Math.atan(n/t),e.y=this.radius_g_1*Math.atan(o/vU(n,t)))}else"sphere"===this.shape&&(t=Math.cos(a),r=Math.cos(i)*t,n=Math.sin(i)*t,o=Math.sin(a),t=this.radius_g-r,this.flip_axis?(e.x=this.radius_g_1*Math.atan(n/vU(o,t)),e.y=this.radius_g_1*Math.atan(o/t)):(e.x=this.radius_g_1*Math.atan(n/t),e.y=this.radius_g_1*Math.atan(o/vU(n,t))));return e.x=e.x*this.a,e.y=e.y*this.a,e},inverse:function(e){var t,r,n,o,i=-1,a=0,s=0;if(e.x=e.x/this.a,e.y=e.y/this.a,"ellipse"===this.shape){this.flip_axis?(s=Math.tan(e.y/this.radius_g_1),a=Math.tan(e.x/this.radius_g_1)*vU(1,s)):(a=Math.tan(e.x/this.radius_g_1),s=Math.tan(e.y/this.radius_g_1)*vU(1,a));var u=s/this.radius_p;if(t=a*a+u*u+i*i,(n=(r=2*this.radius_g*i)*r-4*t*this.C)<0)return e.x=Number.NaN,e.y=Number.NaN,e;o=(-r-Math.sqrt(n))/(2*t),i=this.radius_g+o*i,a*=o,s*=o,e.x=Math.atan2(a,i),e.y=Math.atan(s*Math.cos(e.x)/i),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if("sphere"===this.shape){if(this.flip_axis?(s=Math.tan(e.y/this.radius_g_1),a=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+s*s)):(a=Math.tan(e.x/this.radius_g_1),s=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+a*a)),t=a*a+s*s+i*i,(n=(r=2*this.radius_g*i)*r-4*t*this.C)<0)return e.x=Number.NaN,e.y=Number.NaN,e;o=(-r-Math.sqrt(n))/(2*t),i=this.radius_g+o*i,a*=o,s*=o,e.x=Math.atan2(a,i),e.y=Math.atan(s*Math.cos(e.x)/i)}return e.x=e.x+this.long0,e},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};AG.defaultDatum="WGS84",AG.Proj=vG,AG.WGS84=new AG.Proj("WGS84"),AG.Point=KG,AG.toPoint=kG,AG.defs=VB,AG.nadgrid=function(e,t){var r=new DataView(t),n=function(e){var t=e.getInt32(8,!1);return 11!==t&&(11!==(t=e.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(r),o=function(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:fG(e,56,64).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}(r,n);o.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var i={header:o,subgrids:function(e,t,r){for(var n=[],o=0;o|<|=|!/g," ").split(" ").filter(function(e){return e}).forEach(function(e){var n=t.find(function(t){return t===e});if(DV(e)&&n&&(r=r.replace(n,"$"+n)),n){var o=LV(n);r=r.replace(n,o)}}),r}function NV(e){var t={};for(var r in e){var n=r;DV(r)&&(n="$"+r),t[n=LV(n)]=e[r]}return t}function DV(e){return/^\d/.test(e)}var FV=ol.geom.Point,BV=r.n(FV);function GV(e){"@babel/helpers - typeof";return(GV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function UV(e,t){for(var r=0;r1){for(var p=1;p© SuperMap iServer with © SuperMap iClient",canvasFunction:a,logo:"4"===jD.getOlVersion()?n.logo:null,projection:n.projection,ratio:n.ratio,resolutions:n.resolutions,state:n.state})).on=r.onInternal,r.id=n.id?n.id:ye.createUniqueID("themeLayer_"),r.canvasFunctionInternal_=a,r.EVENT_TYPES=["loadstart","loadend","loadcancel","visibilitychanged","move","moveend","added","removed","tileloaded","beforefeaturesadded","featuresadded","featuresremoved"],r.features=[],r.TFEvents=n.TFEvents||[],r.map=n.map;var s=r.map.getSize();return r.div=document.createElement("div"),r.map.getViewport().appendChild(r.div),r.div.style.width=s[0]+"px",r.div.style.height=s[1]+"px",r.setOpacity(n.opacity),r.levelRenderer=new dL,r.movingOffset=[0,0],r.renderer=r.levelRenderer.init(r.div),r.map.getViewport().removeChild(r.div),r.renderer.clear(),r.addTFEvents(),r}return t=i,(r=[{key:"destroy",value:function(){this.EVENT_TYPES=null,this.isBaseLayer=null,this.TFEvents=null,this.destroyFeatures(),this.features=null,this.renderer&&this.renderer.dispose(),this.renderer=null,this.levelRenderer=null,this.movingOffset=null,this.currentMousePosition=null}},{key:"destroyFeatures",value:function(e){if(void 0==e&&(e=this.features),e){this.removeFeatures(e),Array.isArray(e)||(e=[e]);for(var t=e.length-1;t>=0;t--)e[t].destroy()}}},{key:"setOpacity",value:function(e){if(e!==this.opacity){this.opacity=e;var t=this.div;ye.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&this.dispatchEvent({type:"changelayer",value:{layer:this,property:"opacity"}})}}},{key:"addFeatures",value:function(e){}},{key:"removeFeatures",value:function(e){var t=this;if(e){if(e===t.features)return t.removeAllFeatures();ye.isArray(e)||"function"==typeof e||(e=[e]);for(var r=[],n=0;n=r.left&&a.x<=r.right&&a.y>=r.top&&a.y<=r.bottom){n=!0;break}}return n}},{key:"clearCache",value:function(){this.cache={},this.charts=[]}},{key:"removeFeatures",value:function(e){this.clearCache(),CJ(MJ(i.prototype),"removeFeatures",this).call(this,e)}},{key:"removeAllFeatures",value:function(){this.clearCache(),CJ(MJ(i.prototype),"removeAllFeatures",this).call(this)}},{key:"redraw",value:function(){return this.clearCache(),!!this.renderer&&(this.redrawThematicFeatures(this.map.getView().calculateExtent()),!0)}},{key:"clear",value:function(){this.renderer&&(this.renderer.clearAll(),this.renderer.refresh()),this.removeAllFeatures(),this.clearCache()}},{key:"canvasFunctionInternal_",value:function(e,t,r,n,o){return jJ.prototype.canvasFunctionInternal_.apply(this,arguments)}}])&&TJ(t.prototype,r),n&&TJ(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),IJ=ol.style.RegularShape,NJ=r.n(IJ);function DJ(e){"@babel/helpers - typeof";return(DJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FJ(e,t){for(var r=0;r-1&&(this._data=e),this._renderLayer){this._renderLayer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0}),this._refreshData();var t=this._getLayerState();t.data=this._data||[],this._renderLayer.setNeedsRedraw(!0),this._renderLayer.setState(t)}}},{key:"drawGraphics",value:function(e){this._data=e||(this._data?this._data:[]),this._renderLayer||this._createInnerRender(),this._clearBuffer(),this._draw()}},{key:"_initContainer",value:function(){this._canvas=this._createCanvas(this.width,this.height),this._layerContainer=this.container,this._wrapper=document.createElement("div"),this._wrapper.className="deck-wrapper",this._wrapper.style.position="absolute",this._wrapper.style.top="0",this._wrapper.style.left="0",this._wrapper.appendChild(this._canvas),this._layerContainer&&this._layerContainer.appendChild(this._wrapper)}},{key:"_createCanvas",value:function(e,t){var r=document.createElement("canvas");return r.oncontextmenu=nz,r.width=e,r.height=t,r.style.width=e+"px",r.style.height=t+"px",r}},{key:"_createInnerRender",value:function(){var e=this,t=this._getLayerState(),r=t.color,n=t.radius,o=t.opacity,i=t.highlightColor,a=t.radiusScale,s=t.radiusMinPixels,u=t.radiusMaxPixels,l=t.strokeWidth,c=t.outline;n=this._pixelToMeter(n);var f={id:"scatter-plot",data:[],pickable:Boolean(this.onClick)||Boolean(this.onHover),autoHighlight:!0,color:r,opacity:o,radius:n,radiusScale:a,highlightColor:i,radiusMinPixels:s,radiusMaxPixels:u,strokeWidth:l,outline:c,getPosition:function(t){if(!t)return[0,0,0];var r=t.getGeometry(),n=r&&r.getCoordinates();return(n=e._project(n))&&[n[0],n[1],0]},getColor:function(t){var r=e._getLayerDefaultStyle(),n=t&&t.getStyle();return n&&n.getColor&&n.getColor()||r.color},getRadius:function(t){var r=e._getLayerDefaultStyle(),n=t&&t.getStyle();return n&&n.getRadius&&n.getRadius()||r.radius},updateTriggers:{getColor:[r],getRadius:[n]}};e._renderLayer=new window.DeckGL.ScatterplotLayer(f)}},{key:"_getLayerDefaultStyle",value:function(){var e=this._getLayerState(),t=e.color,r=e.opacity,n=e.radius,o=e.radiusScale,i=e.radiusMinPixels,a=e.radiusMaxPixels,s=e.strokeWidth,u=e.outline;return{color:t,opacity:r,radius:n=this._pixelToMeter(n),radiusScale:o,radiusMinPixels:i,radiusMaxPixels:a,strokeWidth:s,outline:u}}},{key:"_getLayerState",value:function(){var e=this.layer.getLayerState(),t=this.map.getView().getProjection().getCode(),r=JN.transform([e.longitude,e.latitude],t,"EPSG:4326");return e.longitude=r[0],e.latitude=r[1],e.zoom=e.zoom-1,e}},{key:"_draw",value:function(){this._refreshData();var e=this._getLayerState();e.data=this._data||[];var t={};for(var r in e)t[r]=e[r];this._renderLayer.setNeedsRedraw(!0),t.layers=[this._renderLayer],t.canvas=this._canvas,this.onBeforeRender&&(t.onBeforeRender=this.onBeforeRender.bind(this)),this.onAfterRender&&(t.onAfterRender=this.onAfterRender.bind(this)),this.deckGL?this.deckGL.setProps(t):this.deckGL=new window.DeckGL.experimental.DeckGLJS(t)}},{key:"_refreshData",value:function(){var e=this._data||[],t=jD.isArray(e)?[].concat(e):[e];this._renderLayer.props.data||(this._renderLayer.props.data=[]),this._renderLayer.props.data.length=0;for(var r=0;r=0;s--){var u=a[s].getStyle();if(!u)return;if(!(u instanceof YJ)){var l=a[s].getGeometry().getCoordinates(),c=new(LD())({image:u}).getImage(),f=!1;if(c instanceof VJ&&1===c.getCount()){var p=180*c.getRotation()/Math.PI,h=Number.parseFloat(c.getAngle()),y=c.getRadius()*t,d=null;if(h>355)d=new(FD())(l,y);else{var b=[];b.push(l);for(var v=h/8,m=0;m<8;m++){var g=(p+m*v)/180*Math.PI;b.push([l[0]+y*Math.cos(g),l[1]-y*Math.sin(g)])}b.push(l),d=new(wz())([b])}d.intersectsCoordinate(this.map.getCoordinateFromPixel(o))&&(f=!0)}else{var w=[];w[0]=l[0]-c.getAnchor()[0]*t,w[2]=l[0]+c.getAnchor()[0]*t,w[1]=l[1]-c.getAnchor()[1]*t,w[3]=l[1]+c.getAnchor()[1]*t,wF.containsCoordinate(w,e)&&(f=!0)}!0!==f||n&&n(a[s],i)}}return},t._options=e;var r=jz(t);return e.onClick&&r.map.on("click",function(t){if(r.isDeckGLRender){var n=r.renderer.deckGL.pickObject({x:t.pixel[0],y:t.pixel[1]});e.onClick(n)}else{var o=r.findGraphicByPixel(t,r);o&&(e.onClick(o,t),r.isHighLight&&r._highLight(o.getGeometry().getCoordinates(),new(LD())({image:o.getStyle()}).getImage(),o,t.pixel))}}),r.map.on("pointermove",function(t){if(r.isDeckGLRender){var n=r.renderer.deckGL.pickObject({x:t.pixel[0],y:t.pixel[1]});e.onHover&&e.onHover(n)}}),t}return t=i,(r=[{key:"findGraphicByPixel",value:function(e,t){for(var r=t.map.getFeaturesAtPixel(e.pixel)||[],n=0;n-1)return o}}},{key:"setGraphics",value:function(e){this.graphics=this.graphics||[],this.graphics.length=0;var t=jD.isArray(e)?[].concat(e):[e];this.graphics=[].concat(t),this.update()}},{key:"addGraphics",value:function(e){this.graphics=this.graphics||[];var t=jD.isArray(e)?[].concat(e):[e];this.graphics=this.graphics.concat(t),this.update()}},{key:"getGraphicBy",value:function(e,t){var r=null;for(var n in this.graphics)if(this.graphics[n][e]===t){r=this.graphics[n];break}return r}},{key:"getGraphicById",value:function(e){return this.getGraphicBy("id",e)}},{key:"getGraphicsByAttribute",value:function(e,t){var r,n=[];for(var o in this.graphics)(r=this.graphics[o])&&r.attributes&&r.attributes[e]===t&&n.push(r);return n}},{key:"removeGraphics",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,void this.update();ye.isArray(e)||(e=[e]);for(var t=e.length-1;t>=0;t--){var r=e[t],n=ye.indexOf(this.graphics,r);-1!==n&&this.graphics.splice(n,1)}this.update()}},{key:"clear",value:function(){this.removeGraphics()}},{key:"update",value:function(){this.renderer.update(this.graphics,this._getDefaultStyle())}},{key:"_getDefaultStyle",value:function(){var e={};return this.color&&(e.fill=new(GD())({color:this.toRGBA(this.color)})),this.radius&&(e.radius=this.radius),this.outline&&(e.stroke=new(GD())({color:this.toRGBA(this.color),width:this.strokeWidth})),new(FD())(e)}},{key:"toRGBA",value:function(e){return"rgba(".concat(e[0],",").concat(e[1],",").concat(e[2],",").concat((e[3]||255)/255,")")}},{key:"setStyle",value:function(e){var 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};ye.extend(this,ye.extend(t,e)),this.update()}},{key:"getLayerState",value:function(){var e=this.map,t=e.getSize()[0],r=e.getSize()[1],n=e.getView(),o=n.getCenter(),i={longitude:o[0],latitude:o[1],zoom:n.getZoom(),maxZoom:n.getMaxZoom(),pitch:0,bearing:180*-n.getRotation()/Math.PI},a={};for(var s in i)a[s]=i[s];return a.width=t,a.height=r,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,a}},{key:"_highLightClose",value:function(){this.selected=null,this.hitGraphicLayer&&(this.map.removeLayer(this.hitGraphicLayer),this.hitGraphicLayer=null),this.changed()}},{key:"_highLight",value:function(e,t,r,n){if(r.getStyle()instanceof VJ){this.hitGraphicLayer&&(this.map.removeLayer(this.hitGraphicLayer),this.hitGraphicLayer=null);var o=this.map.getPixelFromCoordinate([e[0],e[1]]);n=n||[0,0];var a=Math.atan2(n[1]-o[1],n[0]-o[0])/Math.PI*180;a=a>0?a:360+a;var s=(Math.ceil(a/(t.getAngle()+t.getSpaceAngle()))-1)*(t.getAngle()+t.getSpaceAngle()),u={stroke:new(VD())({color:"#ff0000",width:1}),fill:new(GD())({color:"#0099ff"}),radius:t.getRadius(),angle:t.getAngle(),eAngle:s+t.getAngle(),sAngle:s,rotation:t.getRotation()};this.highLightStyle&&this.highLightStyle instanceof YJ&&(u.stroke=this.highLightStyle.getStroke(),u.fill=this.highLightStyle.getFill(),u.radius=this.highLightStyle.getRadius(),u.angle=this.highLightStyle.getAngle());var l=new mz(new(BV())(e));l.setStyle(new YJ(u)),this.hitGraphicLayer=new(Sz())({source:new i({map:this.map,graphics:[l]})}),this.map.addLayer(this.hitGraphicLayer)}else this.selected=r,this.changed()}},{key:"getGraphicsInExtent",value:function(e){var t=[];return e?(this.graphics.forEach(function(r){wF.containsExtent(e,r.getGeometry().getExtent())&&t.push(r)}),t):(this.graphics.forEach(function(e){t.push(e)}),t)}}])&&Pz(t.prototype,r),n&&Pz(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Az(e){"@babel/helpers - typeof";return(Az="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mz(e,t){for(var r=0;rs){var y=i[0];i.splice(0,1),delete o[y]}}}}if(this.renderer.render(),r&&this.isHoverAble&&this.isMultiHover){var d=this.getShapesByFeatureID(r);this.renderer.updateHoverShapes(d)}}},{key:"createThematicFeature",value:function(e){var t=ye.copyAttributesWithClip(this.style);e.style&&!0===this.isAllowFeatureStyle&&(t=ye.copyAttributesWithClip(e.style));var r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=iA.transformStyle(this.highlightStyle);for(var n=new xM(e,this,iA.transformStyle(t),r),o=0;o0&&0===this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),r=0,n=t.length;r=0&&h.x<=l.x&&h.y>=0&&h.y<=l.y){if(r.style.minZoomLevel>-1&&c<=r.style.minZoomLevel)continue;if(r.style.maxZoomLevel>-1&&c>r.style.maxZoomLevel)continue;var y=null;r.isStyleChange?(r.isStyleChange=null,y=this.calculateLabelBounds(r,h)):y=r.geometry.bsInfo.w&&r.geometry.bsInfo.h?this.calculateLabelBounds2(r,h):this.calculateLabelBounds(r,h);var d=new we(0,l.y,l.x,0),b=y.length;if(this.isAvoid){var v=this.getAvoidInfo(d,y);if(v){if("left"===v.aspectW){r.style.labelXOffset+=v.offsetX;for(var m=0;m=o[u].start&&a=o[u].start&&as&&(s=r,u="top")}if(t.y>e.bottom){var n=Math.abs(t.y-e.bottom);n>s&&(s=n,u="bottom")}if(t.xa&&(a=o,l="left")}if(t.x>e.right){var i=Math.abs(t.x-e.right);i>a&&(a=i,l="right")}}}}},{key:"isQuadrilateralOverLap",value:function(e,t){var r=e.length,n=t.length;if(5!==r||5!==n)return null;for(var o=!1,i=0;ie-n&&t.time© SuperMap iClient",canvasFunction:function(e,t,r,n,o){var i=n[0]/r,a=n[1]/r,s=this.map.getSize()[0],u=this.map.getSize()[1];this.layer||(this.layer=new oq(this.map,this.dataSet,this.mapvOptions,i,a,this));this.layer.pixelRatio=r,this.layer.offset=[(i-s)/2,(a-u)/2],this.rotate?this.rotate!==this.map.getView().getRotation()&&(this.layer.canvasLayer.resize(i,a),this.rotate=this.map.getView().getRotation()):this.rotate=this.map.getView().getRotation();var l=this.layer.canvasLayer.canvas;this.layer.isEnabledTime()||(this.layer.canvasLayer.resize(i,a),this.layer.canvasLayer.draw());this.context||(this.context=jD.createCanvasContext2D(i,a));var c=this.context.canvas;this.context.clearRect(0,0,c.width,c.height),c.width=n[0],c.height=n[1],c.style.width=n[0]+"px",c.style.height=n[1]+"px",this.context.drawImage(l,0,0),(this.resolution!==t||JSON.stringify(this.extent)!==JSON.stringify(e))&&(this.resolution=t,this.extent=e);return this.context.canvas},logo:"4"===jD.getOlVersion()?r.logo:null,projection:r.projection,ratio:r.ratio,resolutions:r.resolutions,state:r.state})).map=e.map,t.dataSet=e.dataSet,t.mapvOptions=e.mapvOptions,t}return t=i,(r=[{key:"addData",value:function(e,t){this.layer.addData(e,t)}},{key:"getData",value:function(){return this.layer&&(this.dataSet=this.layer.getData()),this.dataSet}},{key:"removeData",value:function(e){this.layer&&this.layer.removeData(e)}},{key:"clearData",value:function(){this.layer.clearData()}},{key:"update",value:function(e){this.layer.update(e),this.changed()}}])&&aq(t.prototype,r),n&&aq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function fq(e){"@babel/helpers - typeof";return(fq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pq(e,t){for(var r=0;r0&&r.attributes){var n=this.themeField,o=r.attributes,i=this.styleGroups,a=!1,s=null;for(var u in o)if(n===u){a=!0,s=o[u];break}if(a)for(var l=0,c=i.length;l=i[l].start&&s© turfjs with © SuperMap iClient",features:r.features,format:r.format,extent:r.extent,logo:"4"===jD.getOlVersion()?r.logo:null,projection:r.projection,wrapX:r.wrapX})).turfMap={"Measurement.along":["line","distance","units"],"Measurement.area":["geojson"],"Measurement.bbox":["geojson"],"Measurement.bboxPolygon":["bbox"],"Measurement.bearing":["start","end","final"],"Measurement.center":["geojson","properties"],"Measurement.centerOfMass":["geojson","properties"],"Measurement.centroid":["geojson","properties"],"Measurement.destination":["origin","distance","bearing","units"],"Measurement.distance":["from","to","units"],"Measurement.envelope":["geojson"],"Measurement.length":["geojson","units"],"Measurement.midpoint":["point1","point2"],"Measurement.pointOnFeature":["geojson"],"Measurement.polygonTangents":["point","polygon"],"Measurement.rhumbBearing":["start","end","final"],"Measurement.rhumbDestination":["origin","distance","bearing","units"],"Measurement.rhumbDistance":["from","to","units"],"Measurement.square":["bbox"],"Measurement.greatCircle":["start","end","properties","npoints","offset"],"CoordinateMutation.cleanCoords":["geojson","mutate"],"CoordinateMutation.flip":["geojson","mutate"],"CoordinateMutation.rewind":["geojson","reverse","mutate"],"CoordinateMutation.round":["num","precision"],"CoordinateMutation.truncate":["geojson","precision","coordinates","mutate"],"Transformation.bboxClip":["feature","bbox"],"Transformation.bezierSpline":["line","resolution","sharpness"],"Transformation.buffer":["geojson","radius","units","steps"],"Transformation.circle":["center","radius","steps","units","properties"],"Transformation.clone":["geojson"],"Transformation.concave":["points","maxEdge","units"],"Transformation.convex":["geojson","concavity"],"Transformation.difference":["polygon1","polygon2"],"Transformation.dissolve":["featureCollection","propertyName"],"Transformation.intersect":["poly1","poly2"],"Transformation.lineOffset":["geojson","distance","units"],"Transformation.simplify":["feature","tolerance","highQuality"],"Transformation.tesselate":["poly"],"Transformation.transformRotate":["geojson","angle","pivot","mutate"],"Transformation.transformTranslate":["geojson","distance","direction","units","zTranslation","mutate"],"Transformation.transformScale":["geojson","factor","origin","mutate"],"Transformation.union":["A"],"Transformation.voronoi":["points","bbox"],"featureConversion.combine":["fc"],"featureConversion.explode":["geojson"],"featureConversion.flatten":["geojson"],"featureConversion.lineStringToPolygon":["lines","properties","autoComplete","orderCoords"],"featureConversion.polygonize":["geojson"],"featureConversion.polygonToLineString":["polygon","properties"],"Misc.kinks":["featureIn"],"Misc.lineArc":["center","radius","bearing1","bearing2","steps","units"],"Misc.lineChunk":["geojson","segmentLength","units","reverse"],"Misc.lineIntersect":["line1","line2"],"Misc.lineOverlap":["line1","line2"],"Misc.lineSegment":["geojson"],"Misc.lineSlice":["startPt","stopPt","line"],"Misc.lineSliceAlong":["line","startDist","stopDist","units"],"Misc.lineSplit":["line","splitter"],"Misc.mask":["polygon","mask"],"Misc.pointOnLine":["lines","pt","units"],"Misc.sector":["center","radius","bearing1","bearing2","steps","units"],"Misc.shortestPath":["start","end","obstacles","units","resolution"],"Misc.unkinkPolygon":["geojson"],"Helper.featureCollection":["features","bbox","id"],"Helper.feature":["geometry","properties","bbox","id"],"Helper.geometryCollection":["geometries","properties","bbox","id"],"Helper.lineString":["coordinates","properties","bbox","id"],"Helper.multiLineString":["coordinates","properties","bbox","id"],"Helper.multiPoint":["coordinates","properties","bbox","id"],"Helper.multiPolygon":["coordinates","properties","bbox","id"],"Helper.point":["coordinates","properties","bbox","id"],"Helper.polygon":["coordinates","properties","bbox","id"],"Data.sample":["featurecollection","num"],"Interpolation.interpolate":["points","cellSize","gridType","property","units","weight"],"Interpolation.isobands":["pointGrid","breaks","zProperty","commonProperties","breaksProperties"],"Interpolation.isolines":["pointGrid","breaks","zProperty","commonProperties","breaksProperties"],"Interpolation.planepoint":["point","triangle"],"Interpolation.tin":["points","z"],"Joins.pointsWithinPolygon":["points","polygons"],"Joins.tag":["points","polygons","field","outField","mask","properties"],"Grids.hexGrid":["bbox","cellSide","units","triangles"],"Grids.pointGrid":["bbox","cellSide","units","mask","properties"],"Grids.squareGrid":["bbox","cellSide","units","mask","properties"],"Grids.triangleGrid":["bbox","cellSide","units","mask","properties"],"Classification.nearestPoint":["targetPoint","points"],"Aggregation.collect":["polygons","points","inProperty","outProperty"],"Aggregation.clustersDbscan":["points","maxDistance","units","minPoints","mutate"],"Aggregation.clustersKmeans":["points","numberOfClusters","mutate"],"Meta.coordAll":["geojson"],"Meta.coordEach":["geojson","callback","excludeWrapCoord"],"Meta.coordReduce":["geojson","callback","initialValue","excludeWrapCoord"],"Meta.featureEach":["geojson","callback"],"Meta.featureReduce":["geojson","callback","initialValue"],"Meta.flattenEach":["geojson","callback"],"Meta.flattenReduce":["geojson","callback","initialValue"],"Meta.getCoord":["coord"],"Meta.getCoords":["coords"],"Meta.getGeom":["geojson"],"Meta.getGeomType":["geojson","name"],"Meta.geomEach":["geojson","callback"],"Meta.geomReduce":["geojson","callback","initialValue"],"Meta.propEach":["geojson","callback"],"Meta.propReduce":["geojson","callback","initialValue"],"Meta.segmentEach":["geojson","callback"],"Meta.segmentReduce":["geojson","callback","initialValue"],"Meta.getCluster":["geojson","filter"],"Meta.clusterEach":["geojson","property","callback"],"Meta.clusterReduce":["geojson","property","callback","initialValue"],"Assertions.collectionOf":["featureCollection","type","name"],"Assertions.containsNumber":["coordinates"],"Assertions.geojsonType":["value","type","name"],"Assertions.featureOf":["feature","type","name"],"Booleans.booleanClockwise":["line"],"Booleans.booleanContains":["feature1","feature2"],"Booleans.booleanCrosses":["feature1","feature2"],"Booleans.booleanDisjoint":["feature1","feature2"],"Booleans.booleanEqual":["feature1","feature2"],"Booleans.booleanOverlap":["feature1","feature2"],"Booleans.booleanParallel":["feature1","feature2"],"Booleans.booleanPointInPolygon":["point","polygon","ignoreBoundary"],"Booleans.booleanPointOnLine":["point","linestring","ignoreEndVertices"],"UnitConversion.bearingToAngle":["bearing"],"UnitConversion.convertArea":["area","originalUnit","finalUnit"],"UnitConversion.convertLength":["length","originalUnit","finalUnit"],"UnitConversion.degreesToradians":["degrees"],"UnitConversion.lengthToRadians":["distance","units"],"UnitConversion.lengthToDegrees":["distance","units"],"UnitConversion.radiansToLength":["radians","units"],"UnitConversion.radiansToDegrees":["radians"],"UnitConversion.toMercator":["geojson","mutate"],"UnitConversion.toWgs84":["geojson","mutate"]},t.turfOptionMap={"Measurement.along":["line","distance",{units:""}],"Measurement.bboxPolygon":["bbox",{properties:"",id:""}],"Measurement.bearing":["start","end",{final:""}],"Measurement.center":["geojson",{properties:""}],"Measurement.destination":["origin","distance","bearing",{units:"",properties:""}],"Measurement.distance":["from","to",{units:""}],"Measurement.length":["geojson",{units:""}],"Measurement.rhumbBearing":["start","end",{final:""}],"Measurement.rhumbDestination":["origin","distance","bearing",{units:"",properties:""}],"Measurement.rhumbDistance":["from","to",{units:""}],"Measurement.greatCircle":["start","end",{properties:"",npoints:"",offset:""}],"CoordinateMutation.cleanCoords":["geojson",{mutate:""}],"CoordinateMutation.flip":["geojson",{mutate:""}],"CoordinateMutation.rewind":["geojson",{mutate:"",reverse:""}],"CoordinateMutation.truncate":["geojson",{precision:"",coordinates:"",mutate:""}],"Transformation.bezierSpline":["line",{resolution:"",sharpness:""}],"Transformation.buffer":["geojson","radius",{units:"",steps:""}],"Transformation.circle":["center","radius",{units:"",steps:"",properties:""}],"Transformation.concave":["points",{maxEdge:"",units:""}],"Transformation.convex":["geojson",{concavity:""}],"Transformation.dissolve":["featureCollection",{propertyName:""}],"Transformation.lineOffset":["geojson","distance",{units:""}],"Transformation.simplify":["geojson",{tolerance:"",highQuality:""}],"Transformation.transformRotate":["geojson","angle",{pivot:"",mutate:""}],"Transformation.transformTranslate":["geojson","distance","direction",{units:"",zTranslation:"",mutate:""}],"Transformation.transformScale":["geojson","factor",{origin:"",mutate:""}],"Transformation.voronoi":["points",{bbox:""}],"featureConversion.lineStringToPolygon":["lines",{properties:"",autoComplete:"",orderCoords:""}],"featureConversion.polygonToLineString":["polygon",{properties:""}],"Misc.lineArc":["center","radius","bearing1","bearing2",{steps:"",units:""}],"Misc.lineChunk":["geojson","segmentLength",{units:"",reverse:""}],"Misc.lineOverlap":["line1","line2",{tolerance:""}],"Misc.lineSliceAlong":["line","startDist","stopDist",{units:""}],"Misc.pointOnLine":["lines","pt",{units:""}],"Misc.sector":["center","radius","bearing1","bearing2",{units:"",steps:"",properties:""}],"Misc.shortestPath":["start","end",{obstacles:"",units:"",resolution:""}],"Helper.feature":["geometry","properties",{bbox:"",id:""}],"Helper.geometryCollection":["geometries","properties",{bbox:"",id:""}],"Helper.lineString":["coordinates","properties",{bbox:"",id:""}],"Helper.multiLineString":["coordinates","properties",{bbox:"",id:""}],"Helper.multiPoint":["coordinates","properties",{bbox:"",id:""}],"Helper.multiPolygon":["coordinates","properties",{bbox:"",id:""}],"Helper.point":["coordinates","properties",{bbox:"",id:""}],"Helper.polygon":["coordinates","properties",{bbox:"",id:""}],"Interpolation.interpolate":["points","cellSize",{gridType:"",property:"",units:"",weight:""}],"Interpolation.isobands":["pointGrid","breaks",{zProperty:"",commonProperties:"",breaksProperties:""}],"Interpolation.isolines":["pointGrid","breaks",{zProperty:"",commonProperties:"",breaksProperties:""}],"Grids.hexGrid":["bbox","cellSide",{units:"",triangles:"",properties:"",mask:""}],"Grids.pointGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Grids.squareGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Grids.triangleGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Aggregation.clustersDbscan":["points","maxDistance",{units:"",minPoints:"",mutate:""}],"Aggregation.clustersKmeans":["points",{numberOfClusters:"",mutate:""}],"Booleans.booleanPointInPolygon":["point","polygon",{ignoreBoundary:""}],"Booleans.booleanPointOnLine":["point","linestring",{ignoreEndVertices:""}],"UnitConversion.toMercator":["geojson",{mutate:""}],"UnitConversion.toWgs84":["geojson",{mutate:""}]},t}return t=i,(r=[{key:"process",value:function(e,t,r,n){var o;try{o=_q[e.split(".")[1]].apply(this,this.parse(e,t))}catch(r){o=_q[e.split(".")[1]].apply(this,this.parseOption(e,t))}var i=null;try{i=(new(gF())).readFeatures(o)}catch(e){return void(r&&r(o))}(n=null==n||n)&&this.addFeatures(i),r&&r(o)}},{key:"parse",value:function(e,t){if("Transformation.union"===e)return t.A;var r=[],n=this.turfMap[e];return n&&n.map(function(e){return r.push(t[e]),t[e]}),r}},{key:"parseOption",value:function(e,t){var r=[];return this.turfOptionMap[e].map(function(e){if(e instanceof Object){var n=e;Object.keys(n).forEach(function(e){n[e]=t[e]}),r.push(n)}else r.push(t[e]);return t}),r}}])&&xq(t.prototype,r),n&&xq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Cq(e){"@babel/helpers - typeof";return(Cq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rq(e,t){for(var r=0;r0&&r.attributes){var n=this.themeField,o=r.attributes,i=this.styleGroups,a=!1,s=null;for(var u in o)if(n===u){a=!0,s=o[u];break}if(a)for(var l=0,c=i.length;l-1;a--)if(t.indexOf(i[a])>-1){o=t.replace(i[a],n[i[a]]);break}o=o.replace(/[#]/gi,"#"),n[t]=r,e=e.replace(new RegExp(o,"g"),r)}),e=(e=e.replace(/[#]/gi,"\n#")).replace(/\[zoom/gi,"[scale")}var o={};new fT(e).getShaders().forEach(function(e){return o[e.elements[0].clean]=o[e.elements[0].clean]||{},o[e.elements[0].clean][e.attachment]=o[e.elements[0].clean][e.attachment]||[],o[e.elements[0].clean][e.attachment].push(e),e}),i.setCartoShaders(o)}},u.send(null)}if(i.getCartoCss()){var c={};new fT(i.getCartoCss()).getShaders().forEach(function(e){return c[e.elements[0].clean]=c[e.elements[0].clean]||{},c[e.elements[0].clean][e.attachment]=c[e.elements[0].clean][e.attachment]||[],c[e.elements[0].clean][e.attachment].push(e),e}),i.setClientCartoShaders(c)}}},l.open("GET",ye.urlPathAppend(i.getUrl(),"layers.json"),!1),l.send(null),t.on("featureSelected",function(e){i.setSelectedId(e.selectedId),i.setLayerName(e.layerName)}),t}return t=i,n=[{key:"setCartoShaders",value:function(e){this.cartoShaders=e}},{key:"getCartoShaders",value:function(){return this.cartoShaders}},{key:"setClientCartoShaders",value:function(e){this.clientCartoShaders=e}},{key:"getClientCartoShaders",value:function(){return this.clientCartoShaders}},{key:"setCartoCss",value:function(e){this.cartoCss=e}},{key:"getCartoCss",value:function(){return this.cartoCss}},{key:"setDonotNeedServerCartoCss",value:function(e){this.donotNeedServerCartoCss=e}},{key:"getDonotNeedServerCartoCss",value:function(){return this.donotNeedServerCartoCss}},{key:"setLayersInfo",value:function(e){this.layersInfo=e}},{key:"getLayersInfo",value:function(){return this.layersInfo}},{key:"setUrl",value:function(e){this.url=e}},{key:"getUrl",value:function(){return this.url}},{key:"setView",value:function(e){this.view=e}},{key:"getView",value:function(){return this.view}},{key:"setSelectedId",value:function(e){this.selectedId=e}},{key:"getSelectedId",value:function(){return this.selectedId}},{key:"setLayerName",value:function(e){this.layerName=e}},{key:"getLayerName",value:function(){return this.layerName}},{key:"setSelectedPointStyle",value:function(e){this.selectedPointStyle=e}},{key:"setSelectedLineStyle",value:function(e){this.selectedLineStyle=e}},{key:"setSelectedRegionStyle",value:function(e){this.selectedRegionStyle=e}},{key:"setSelectedTextStyle",value:function(e){this.selectedTextStyle=e}},{key:"getSelectedStyle",value:function(e){return"POINT"===e||"MULTIPOINT"===e?this.selectedPointStyle:"LINESTRING"===e||"MULTILINESTRING"===e?this.selectedLineStyle:"POLYGON"===e||"MULTIPOLYGON"===e?this.selectedRegionStyle:"TEXT"===e?this.selectedTextStyle:void 0}},{key:"getLayerInfo",value:function(e){var t=i.getLayersInfo();if(void 0===t)return null;var r=t[e];if(!r)return null;var n={layerIndex:r.layerIndex,ugcLayerType:r.ugcLayerType};switch(r.ugcLayerType){case"VECTOR":n.layerStyle=r.style?r.style:null;break;case"THEME":var o=r.theme;n.layerStyle=o?o.defaultStyle:null,o&&"LABEL"===o.type&&(n.type=o.type,n.textField=o.labelExpression);break;default:r.style&&(n.layerStyle=r.style)}return n}},{key:"getStyle",value:function(e,t){var r=i.getUrl(),n=i.getView(),o=n.getZoom(),a=jD.resolutionToScale(n.getResolution(),96,c.METER),s=e.replace(/(@)/gi,"___").replace(/(#)/gi,"___");if(i.getCartoCss()&&i.getClientCartoShaders()[s])return f(i.getClientCartoShaders()[s]);var u=i.getLayerInfo(e);if(!i.getDonotNeedServerCartoCss()&&i.getCartoShaders()[s]){if(t.getProperties().textStyle||t.getProperties().TEXT_FEATURE_CONTENT||"LABEL"==u.type&&u.textField){var l=ZD.getValidStyleFromLayerInfo(u,t,r);return"POINT"===t.getGeometry().getType().toUpperCase()&&(l=function(e,t,r){var n=ZD.getValidStyleFromLayerInfo(e,t,r);if("LABEL"==e.type){t.setProperties({type:"TEXT"});for(var o=f(i.getCartoShaders()[s]),a=n.getText(),u=0;u© SuperMap iServer with © SuperMap iClient",["4","5"].indexOf(jD.getOlVersion())<0&&(e.tileSize=e.format instanceof Hq()&&e.style?512:256);var u=Zq(t=o.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,format:e.format||new(gF()),logo:"4"===jD.getOlVersion()?e.logo:null,overlaps:e.overlaps,projection:e.projection,state:e.format instanceof Hq()&&e.style&&"[object String]"==Object.prototype.toString.call(e.style)?"loading":e.state,tileClass:e.tileClass,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction||(e.format instanceof Hq()&&e.style?function(e){return e?u._tileUrl.replace(r,e[0].toString()).replace(n,e[1].toString()).replace(a,function(){var t=["4","5"].indexOf(jD.getOlVersion())>-1?-e[2]-1:e[2];return t.toString()}).replace(s,function(){var t=e[0],r=u.tileGrid.getFullTileRange(t),n=r.getHeight()+e[2];return n.toString()}):void 0}:function(e,t,r){u.tileGrid||(u.tileGrid=u.getTileGridForProjection(r));var n=e[0],o=e[1],i=["4","5"].indexOf(jD.getOlVersion())>-1?-e[2]-1:e[2],a=YF.toSize(u.tileGrid.getTileSize(n,u.tmpSize)),s="";if("ZXY"===u.tileType)s="&width="+a[0]+"&height="+a[1]+"&x="+o+"&y="+i+"&z="+n;else if("ViewBounds"===u.tileType){var l=u.tileGrid.getTileCoordExtent(e);s="&width="+a[0]+"&height="+a[1]+"&viewBounds="+l[0]+","+l[1]+","+l[2]+","+l[3]}else{var f=u.tileGrid.getOrigin(n),p=u.tileGrid.getResolution(n),h=r.getUnits()||"degrees";"degrees"===h&&(h=c.DEGREE),"m"===h&&(h=c.METER);var y=jD.resolutionToScale(p,96,h);s="&x="+o+"&y="+i+"&width="+a[0]+"&height="+a[1]+"&scale="+y+"&origin={'x':"+f[0]+",'y':"+f[1]+"}"}return u._tileUrl+encodeURI(s)}),tileLoadFunction:e.tileLoadFunction||(e.format instanceof Hq()?function(e,t){var r=e.getFormat(),n=e.onLoad.bind(e),o=e.onError.bind(e);e.setLoader(function(e,i,a){var s=new XMLHttpRequest;s.open("GET","function"==typeof t?t(e,i,a):t,!0),"arraybuffer"==r.getType()&&(s.responseType="arraybuffer"),s.withCredentials=u.withCredentials,s.onload=function(){if(!s.status||s.status>=200&&s.status<300){var t=r.getType(),i=void 0;"json"===t||"text"===t?i=s.responseText:"xml"===t?(i=s.responseXML)||(i=(new DOMParser).parseFromString(s.responseText,"application/xml")):"arraybuffer"===t&&(i=s.response),i?["4","5"].indexOf(jD.getOlVersion())>-1?n.call(this,r.readFeatures(i,{featureProjection:a}),r.readProjection(i),r.getLastExtent()):n.call(this,r.readFeatures(i,{extent:e,featureProjection:a}),r.readProjection(i)):o.call(this)}else o.call(this)}.bind(this),s.onerror=function(){o.call(this)}.bind(this),s.send()})}:function(e,t){var r=new RegExp("(^|\\?|&)width=([^&]*)(\\s|&|$)"),n=new RegExp("(^|\\?|&)height=([^&]*)(\\s|&|$)"),o=Number(t.match(r)[2]),i=Number(t.match(n)[2]);e.setLoader(function(r,n,a){vn.get(t).then(function(t){if(e.getFormat()instanceof gF())return t.json()}).then(function(t){var n=[];if(e.getFormat()instanceof gF()){t.recordsets.map(function(e){return e.features.map(function(e){for(var t=[],r=0,n=0;n-1?(e.setExtent([0,0,o,i]),e.setProjection(s),n=e.getFormat().readFeatures(jD.toGeoJSON(n))):n=e.getFormat().readFeatures(jD.toGeoJSON(n),{extent:r,dataProjection:s,featureProjection:a}),e.setFeatures(n)}})})}),wrapX:void 0!==e.wrapX&&e.wrapX,tileSize:e.tileSize||null,zDirection:["4","5"].indexOf(jD.getOlVersion())>-1?null:0}));if(u.withCredentials=e.withCredentials,u._tileType=e.tileType||"ScaleXY",t.vectorTileStyles=new Vq,e.format instanceof Hq()&&e.style)if("[object String]"==Object.prototype.toString.call(e.style)){var l=gn.appendCredential(e.style);vn.get(l,null,{withCredentials:e.withCredentials}).then(function(e){return e.json()}).then(function(r){t._fillByStyleJSON(r,e.source),t.setState("ready")})}else t._fillByStyleJSON(e.style,e.source);else t._fillByRestMapOptions(e.url,e);return t}return t=i,n=[{key:"optionsFromMapJSON",value:function(e,t){var r={};r.url=e,r.crossOrigin="anonymous";var n=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],o=function(){var e,r=n[2]-n[0],o=n[3]-n[1],i=r>=o?r:o;e=i===r?i/t.viewer.width:i/t.viewer.height;var a=[],s=c.METER;t.coordUnit===c.DEGREE&&(s=c.DEGREE);if(t.visibleScales.length>0)for(var u=function(e){var t=e.visibleScales;if(!t)return null;var r=e.viewBounds,n=e.coordUnit,o=e.viewer,i=e.scale,a=e.datumAxis;r=new we(r.left,r.bottom,r.right,r.top),o=new H(o.rightBottom.x,o.rightBottom.y),n=n.toLowerCase(),a=a||6378137;var s=n,u=ye.calculateDpi(r,o,i,s,a),l=function(e){if(null===e)return;var t,r;r=e.length,t=[r];for(var n=0;n© SuperMap iServer with © SuperMap iClient",canvasFunction:a,logo:"4"===jD.getOlVersion()?n.logo:null,projection:n.projection,ratio:n.ratio,resolutions:n.resolutions,state:n.state})).canvasFunctionInternal_=a,r.features=[],r.name=e,!n.map)throw new Error("options.map is not found.");r.map=n.map,r.id=n.id?n.id:ye.createUniqueID("HeatMapSource_"),r.opacity=n.opacity?n.opacity:1,r.colors=n.colors?n.colors:["blue","cyan","lime","yellow","red"],r.useGeoUnit=!!n.useGeoUnit&&n.useGeoUnit,r.radius=n.radius?n.radius:50,r.featureWeight=n.featureWeight?n.featureWeight:null,r.maxWeight=null,r.minWeight=null,r.maxWidth=null,r.maxHeight=null,r.rootCanvas=document.createElement("canvas");var s=r.map.getSize();return r.rootCanvas.width=r.maxWidth=parseInt(s[0]),r.rootCanvas.height=r.maxHeight=parseInt(s[1]),ye.modifyDOMElement(r.rootCanvas,null,null,null,null,null,null,r.opacity),r.canvasContext=r.rootCanvas.getContext("2d"),r}return t=i,(r=[{key:"addFeatures",value:function(e){this.features=this.toiClientFeature(e),this.changed()}},{key:"setOpacity",value:function(e){if(e!==this.opacity){this.opacity=e;var t=this.rootCanvas;ye.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&this.changed()}}},{key:"updateHeatPoints",value:function(e){this.features&&this.features.length>0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)}},{key:"convertFastToPixelPoints",value:function(e){var t,r,n,o,i,a,s=[];this.useRadius=this.useGeoUnit?parseInt(this.radius/e):this.radius;for(var u=0;u0&&this.maxWidth>0))return!1;var r=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var n=0;n>24}},{key:"readUint8",value:function(e){return this.bytes_[e]}},{key:"readInt16",value:function(e){return this.readUint16(e)<<16>>16}},{key:"readUint16",value:function(e){return this.bytes_[e]|this.bytes_[e+1]<<8}},{key:"readInt32",value:function(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}},{key:"readUint32",value:function(e){return this.readInt32(e)>>>0}},{key:"readInt64",value:function(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<>8}},{key:"writeUint16",value:function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}},{key:"writeInt32",value:function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}},{key:"writeUint32",value:function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}},{key:"writeInt64",value:function(e,t){this.writeInt32(e,Number(BigInt.asIntN(32,t))),this.writeInt32(e+4,Number(BigInt.asIntN(32,t>>BigInt(32))))}},{key:"writeUint64",value:function(e,t){this.writeUint32(e,Number(BigInt.asUintN(32,t))),this.writeUint32(e+4,Number(BigInt.asUintN(32,t>>BigInt(32))))}},{key:"writeFloat32",value:function(e,t){lH[0]=t,this.writeInt32(e,uH[0])}},{key:"writeFloat64",value:function(e,t){cH[0]=t,this.writeInt32(e,uH[fH?0:1]),this.writeInt32(e+4,uH[fH?1:0])}},{key:"getBufferIdentifier",value:function(){if(this.bytes_.length>10),56320+(1023&i)))}return n}},{key:"__union_with_string",value:function(e,t){return"string"==typeof e?this.__string(t):this.__union(e,t)}},{key:"__indirect",value:function(e){return e+this.readInt32(e)}},{key:"__vector",value:function(e){return e+this.readInt32(e)+4}},{key:"__vector_len",value:function(e){return this.readInt32(e+this.readInt32(e))}},{key:"__has_identifier",value:function(e){if(4!=e.length)throw new Error("FlatBuffers: file identifier must be length 4");for(var t=0;t<4;t++)if(e.charCodeAt(t)!=this.readInt8(this.position()+4+t))return!1;return!0}},{key:"createScalarList",value:function(e,t){for(var r=[],n=0;n=0;r--)e.addInt32(t[r]);return e.endVector()}},{key:"startEndsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"addXy",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"createXyVector",value:function(e,t){e.startVector(8,t.length,8);for(var r=t.length-1;r>=0;r--)e.addFloat64(t[r]);return e.endVector()}},{key:"startXyVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addZ",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"createZVector",value:function(e,t){e.startVector(8,t.length,8);for(var r=t.length-1;r>=0;r--)e.addFloat64(t[r]);return e.endVector()}},{key:"startZVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addM",value:function(e,t){e.addFieldOffset(3,t,0)}},{key:"createMVector",value:function(e,t){e.startVector(8,t.length,8);for(var r=t.length-1;r>=0;r--)e.addFloat64(t[r]);return e.endVector()}},{key:"startMVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addT",value:function(e,t){e.addFieldOffset(4,t,0)}},{key:"createTVector",value:function(e,t){e.startVector(8,t.length,8);for(var r=t.length-1;r>=0;r--)e.addFloat64(t[r]);return e.endVector()}},{key:"startTVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addTm",value:function(e,t){e.addFieldOffset(5,t,0)}},{key:"createTmVector",value:function(e,t){e.startVector(8,t.length,8);for(var r=t.length-1;r>=0;r--)e.addInt64(t[r]);return e.endVector()}},{key:"startTmVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addType",value:function(e,t){e.addFieldInt8(6,t,iH.Unknown)}},{key:"addParts",value:function(e,t){e.addFieldOffset(7,t,0)}},{key:"createPartsVector",value:function(e,t){e.startVector(4,t.length,4);for(var r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}},{key:"startPartsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endGeometry",value:function(e){return e.endObject()}},{key:"createGeometry",value:function(t,r,n,o,i,a,s,u,l){return e.startGeometry(t),e.addEnds(t,r),e.addXy(t,n),e.addZ(t,o),e.addM(t,i),e.addT(t,a),e.addTm(t,s),e.addType(t,u),e.addParts(t,l),e.endGeometry(t)}}],(r=[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"ends",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readUint32(this.bb.__vector(this.bb_pos+t)+4*e):0}},{key:"endsLength",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"endsArray",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?new Uint32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"xy",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readFloat64(this.bb.__vector(this.bb_pos+t)+8*e):0}},{key:"xyLength",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"xyArray",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"z",value:function(e){var t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readFloat64(this.bb.__vector(this.bb_pos+t)+8*e):0}},{key:"zLength",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"zArray",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"m",value:function(e){var t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readFloat64(this.bb.__vector(this.bb_pos+t)+8*e):0}},{key:"mLength",value:function(){var e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"mArray",value:function(){var e=this.bb.__offset(this.bb_pos,10);return e?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"t",value:function(e){var t=this.bb.__offset(this.bb_pos,12);return t?this.bb.readFloat64(this.bb.__vector(this.bb_pos+t)+8*e):0}},{key:"tLength",value:function(){var e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"tArray",value:function(){var e=this.bb.__offset(this.bb_pos,12);return e?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"tm",value:function(e){var t=this.bb.__offset(this.bb_pos,14);return t?this.bb.readUint64(this.bb.__vector(this.bb_pos+t)+8*e):BigInt(0)}},{key:"tmLength",value:function(){var e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"type",value:function(){var e=this.bb.__offset(this.bb_pos,16);return e?this.bb.readUint8(this.bb_pos+e):iH.Unknown}},{key:"parts",value:function(t,r){var n=this.bb.__offset(this.bb_pos,18);return n?(r||new e).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}},{key:"partsLength",value:function(){var e=this.bb.__offset(this.bb_pos,18);return e?this.bb.__vector_len(this.bb_pos+e):0}}])&&yH(t.prototype,r),n&&yH(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function vH(e,t){for(var r=[],n=0;n>1]),r.push(o)}return r}function mH(e,t,r){if(!r||0===r.length)return[vH(e,t)];var n,o=0,i=Array.from(r).map(function(t){return e.slice(o,o=t<<1)});return t&&(o=0,n=Array.from(r).map(function(e){return t.slice(o,o=e)})),i.map(function(e,t){return vH(e,n?n[t]:void 0)})}function gH(e,t){var r=t;if(r===iH.Unknown&&(r=e.type()),r===iH.GeometryCollection){for(var n=[],o=0;o=0;r--)e.addInt8(t[r]);return e.endVector()}},{key:"startPropertiesVector",value:function(e,t){e.startVector(1,t,1)}},{key:"addColumns",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"createColumnsVector",value:function(e,t){e.startVector(4,t.length,4);for(var r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}},{key:"startColumnsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endFeature",value:function(e){return e.endObject()}},{key:"finishFeatureBuffer",value:function(e,t){e.finish(t)}},{key:"finishSizePrefixedFeatureBuffer",value:function(e,t){e.finish(t,void 0,!0)}},{key:"createFeature",value:function(t,r,n,o){return e.startFeature(t),e.addGeometry(t,r),e.addProperties(t,n),e.addColumns(t,o),e.endFeature(t)}}],(r=[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"geometry",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?(e||new bH).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}},{key:"properties",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb.__vector(this.bb_pos+t)+e):0}},{key:"propertiesLength",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"propertiesArray",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"columns",value:function(e,t){var r=this.bb.__offset(this.bb_pos,8);return r?(t||new OH).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}},{key:"columnsLength",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}}])&&SH(t.prototype,r),n&&SH(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),PH=(new TextEncoder,new TextDecoder);function xH(e,t){var r={};if(!t||0===t.length)return r;var n=e.propertiesArray();if(!n)return r;for(var o=new DataView(n.buffer,n.byteOffset),i=e.propertiesLength(),a=0;a0?{done:!1,value:t}:{done:!0,value:void 0}:{done:!1,value:function(e,t){if(!e.length)return t;if(!t.length)return e;var r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}(t,r.value)}})},EH.prototype.slice=function(e){if((e|=0)<0)throw new Error("invalid length");var t=this,r=this._array.length-this._index;if(this._index+e<=this._array.length)return Promise.resolve(this._array.subarray(this._index,this._index+=e));var n=new Uint8Array(e);return n.set(this._array.subarray(this._index)),function o(){return t._source.read().then(function(i){return i.done?(t._array=jH,t._index=0,r>0?n.subarray(0,r):null):r+i.value.length>=e?(t._array=i.value,t._index=e-r,n.set(i.value.subarray(0,e-r),r),n):(n.set(i.value,r),r+=i.value.length,o())})}()},EH.prototype.cancel=function(){return this._source.cancel()};var CH=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bb=null,this.bb_pos=0}var t,r,n;return t=e,n=[{key:"getRootAsCrs",value:function(t,r){return(r||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"getSizePrefixedRootAsCrs",value:function(t,r){return t.setPosition(t.position()+4),(r||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startCrs",value:function(e){e.startObject(6)}},{key:"addOrg",value:function(e,t){e.addFieldOffset(0,t,0)}},{key:"addCode",value:function(e,t){e.addFieldInt32(1,t,0)}},{key:"addName",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"addDescription",value:function(e,t){e.addFieldOffset(3,t,0)}},{key:"addWkt",value:function(e,t){e.addFieldOffset(4,t,0)}},{key:"addCodeString",value:function(e,t){e.addFieldOffset(5,t,0)}},{key:"endCrs",value:function(e){return e.endObject()}},{key:"createCrs",value:function(t,r,n,o,i,a,s){return e.startCrs(t),e.addOrg(t,r),e.addCode(t,n),e.addName(t,o),e.addDescription(t,i),e.addWkt(t,a),e.addCodeString(t,s),e.endCrs(t)}}],(r=[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"org",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"code",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}},{key:"name",value:function(e){var t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"description",value:function(e){var t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"wkt",value:function(e){var t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"codeString",value:function(e){var t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__string(this.bb_pos+t,e):null}}])&&TH(t.prototype,r),n&&TH(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function RH(e,t){for(var r=0;r=0;r--)e.addFloat64(t[r]);return e.endVector()}},{key:"startEnvelopeVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addGeometryType",value:function(e,t){e.addFieldInt8(2,t,iH.Unknown)}},{key:"addHasZ",value:function(e,t){e.addFieldInt8(3,+t,0)}},{key:"addHasM",value:function(e,t){e.addFieldInt8(4,+t,0)}},{key:"addHasT",value:function(e,t){e.addFieldInt8(5,+t,0)}},{key:"addHasTm",value:function(e,t){e.addFieldInt8(6,+t,0)}},{key:"addColumns",value:function(e,t){e.addFieldOffset(7,t,0)}},{key:"createColumnsVector",value:function(e,t){e.startVector(4,t.length,4);for(var r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}},{key:"startColumnsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"addFeaturesCount",value:function(e,t){e.addFieldInt64(8,t,BigInt("0"))}},{key:"addIndexNodeSize",value:function(e,t){e.addFieldInt16(9,t,16)}},{key:"addCrs",value:function(e,t){e.addFieldOffset(10,t,0)}},{key:"addTitle",value:function(e,t){e.addFieldOffset(11,t,0)}},{key:"addDescription",value:function(e,t){e.addFieldOffset(12,t,0)}},{key:"addMetadata",value:function(e,t){e.addFieldOffset(13,t,0)}},{key:"endHeader",value:function(e){return e.endObject()}},{key:"finishHeaderBuffer",value:function(e,t){e.finish(t)}},{key:"finishSizePrefixedHeaderBuffer",value:function(e,t){e.finish(t,void 0,!0)}}],(r=[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"name",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"envelope",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readFloat64(this.bb.__vector(this.bb_pos+t)+8*e):0}},{key:"envelopeLength",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"envelopeArray",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"geometryType",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):iH.Unknown}},{key:"hasZ",value:function(){var e=this.bb.__offset(this.bb_pos,10);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}},{key:"hasM",value:function(){var e=this.bb.__offset(this.bb_pos,12);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}},{key:"hasT",value:function(){var e=this.bb.__offset(this.bb_pos,14);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}},{key:"hasTm",value:function(){var e=this.bb.__offset(this.bb_pos,16);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}},{key:"columns",value:function(e,t){var r=this.bb.__offset(this.bb_pos,18);return r?(t||new OH).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}},{key:"columnsLength",value:function(){var e=this.bb.__offset(this.bb_pos,18);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"featuresCount",value:function(){var e=this.bb.__offset(this.bb_pos,20);return e?this.bb.readUint64(this.bb_pos+e):BigInt("0")}},{key:"indexNodeSize",value:function(){var e=this.bb.__offset(this.bb_pos,22);return e?this.bb.readUint16(this.bb_pos+e):16}},{key:"crs",value:function(e){var t=this.bb.__offset(this.bb_pos,24);return t?(e||new CH).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}},{key:"title",value:function(e){var t=this.bb.__offset(this.bb_pos,26);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"description",value:function(e){var t=this.bb.__offset(this.bb_pos,28);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"metadata",value:function(e){var t=this.bb.__offset(this.bb_pos,30);return t?this.bb.__string(this.bb_pos+t,e):null}}])&&RH(t.prototype,r),n&&RH(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function MH(e){for(var t=AH.getRootAsHeader(e),r=t.featuresCount(),n=t.indexNodeSize(),o=[],i=0;i0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function FH(e){return this instanceof FH?(this.v=e,this):new FH(e)}function BH(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||s(e,t)})})}function s(e,t){try{(r=o[e](t)).value instanceof FH?Promise.resolve(r.value.v).then(u,l):c(i[0][2],r)}catch(e){c(i[0][3],e)}var r}function u(e){s("next",e)}function l(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}var GH=function(e){function t(t){var r=e.call(this,t)||this;return Object.defineProperty(r,"name",{value:"RepeaterOverflowError",enumerable:!1}),"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(r,r.constructor.prototype):r.__proto__=r.constructor.prototype,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(r,r.constructor),r}return function(e,t){function r(){this.constructor=e}LH(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t}(Error);(function(){function e(e){if(e<0)throw new RangeError("Capacity may not be less than 0");this._c=e,this._q=[]}Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this._q.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return this._q.length>=this._c},enumerable:!1,configurable:!0}),e.prototype.add=function(e){if(this.full)throw new Error("Buffer full");this._q.push(e)},e.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()}})(),function(){function e(e){if(e<1)throw new RangeError("Capacity may not be less than 1");this._c=e,this._q=[]}Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this._q.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.add=function(e){for(;this._q.length>=this._c;)this._q.shift();this._q.push(e)},e.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()}}(),function(){function e(e){if(e<1)throw new RangeError("Capacity may not be less than 1");this._c=e,this._q=[]}Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this._q.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.add=function(e){this._q.length=qH;return Promise.resolve(t).then(function(t){return!r&&e.state>=HH?XH(e).then(function(e){return{value:e,done:!0}}):{value:t,done:r}})}function ZH(e,t){var r,n;if(!(e.state>=zH))if(e.state=zH,e.onnext(),e.onstop(),null==e.err&&(e.err=t),0!==e.pushes.length||void 0!==e.buffer&&!e.buffer.empty)try{for(var o=DH(e.pushes),i=o.next();!i.done;i=o.next()){i.value.resolve()}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}else KH(e)}function KH(e){var t,r;if(!(e.state>=qH)){e.state=HH||(e.state=JH)){e.state=JH;var t=function(e,t){if(UH(t),e.pushes.length>=WH)throw new GH("No more than "+WH+" pending calls to push are allowed on a single repeater.");if(e.state>=zH)return Promise.resolve(void 0);var r,n=void 0===e.pending?Promise.resolve(t):e.pending.then(function(){return t});n=n.catch(function(t){e.state=WH)throw new GH("No more than "+WH+" pending calls to next are allowed on a single repeater.");if(t.state<=VH&&eW(t),t.onnext(e),void 0!==t.buffer&&!t.buffer.empty){var r=QH(t,t.buffer.remove());if(t.pushes.length){var n=t.pushes.shift();t.buffer.add(n.value),t.onnext=n.resolve}return r}if(t.pushes.length){var o=t.pushes.shift();return t.onnext=o.resolve,QH(t,o.value)}return t.state>=zH?(KH(t),QH(t,XH(t))):new Promise(function(r){return t.nexts.push({resolve:r,value:e})})},e.prototype.return=function(e){UH(e);var t=tW.get(this);if(void 0===t)throw new Error("WeakMap error");return KH(t),t.execution=Promise.resolve(t.execution).then(function(){return e}),QH(t,XH(t))},e.prototype.throw=function(e){var t=tW.get(this);if(void 0===t)throw new Error("WeakMap error");return t.state<=VH||t.state>=zH||void 0!==t.buffer&&!t.buffer.empty?(KH(t),null==t.err&&(t.err=e),QH(t,XH(t))):this.next(Promise.reject(e))},e.prototype[Symbol.asyncIterator]=function(){return this},e.race=oW,e.merge=iW,e.zip=aW,e.latest=sW,e}();function nW(e,t){var r,n,o=[],i=function(e){null!=e&&"function"==typeof e[Symbol.asyncIterator]?o.push(e[Symbol.asyncIterator]()):null!=e&&"function"==typeof e[Symbol.iterator]?o.push(e[Symbol.iterator]()):o.push(function(){return BH(this,arguments,function(){return NH(this,function(r){switch(r.label){case 0:return t.yieldValues?[4,FH(e)]:[3,3];case 1:return[4,r.sent()];case 2:r.sent(),r.label=3;case 3:return t.returnValues?[4,FH(e)]:[3,5];case 4:return[2,r.sent()];case 5:return[2]}})})}())};try{for(var a=DH(e),s=a.next();!s.done;s=a.next()){i(s.value)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o}function oW(e){var t=this,r=nW(e,{returnValues:!0});return new rW(function(e,n){return IH(t,void 0,void 0,function(){var t,o,i,a,s,u;return NH(this,function(l){switch(l.label){case 0:if(!r.length)return n(),[2];o=!1,n.then(function(){t(),o=!0}),l.label=1;case 1:l.trys.push([1,,5,7]),a=void 0,s=0,u=function(){var o,u,l,c,f,p;return NH(this,function(h){switch(h.label){case 0:o=s;try{for(f=void 0,u=DH(r),l=u.next();!l.done;l=u.next())c=l.value,Promise.resolve(c.next()).then(function(e){e.done?(n(),void 0===i&&(i=e)):s===o&&(s++,t(e))},function(e){return n(e)})}catch(e){f={error:e}}finally{try{l&&!l.done&&(p=u.return)&&p.call(u)}finally{if(f)throw f.error}}return[4,new Promise(function(e){return t=e})];case 1:return void 0===(a=h.sent())?[3,3]:[4,e(a.value)];case 2:h.sent(),h.label=3;case 3:return[2]}})},l.label=2;case 2:return o?[3,4]:[5,u()];case 3:return l.sent(),[3,2];case 4:return[2,i&&i.value];case 5:return n(),[4,Promise.race(r.map(function(e){return e.return&&e.return()}))];case 6:return l.sent(),[7];case 7:return[2]}})})})}function iW(e){var t=this,r=nW(e,{yieldValues:!0});return new rW(function(e,n){return IH(t,void 0,void 0,function(){var t,o,i,a=this;return NH(this,function(s){switch(s.label){case 0:if(!r.length)return n(),[2];t=[],o=!1,n.then(function(){var e,r;o=!0;try{for(var n=DH(t),i=n.next();!i.done;i=n.next()){(0,i.value)()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}),s.label=1;case 1:return s.trys.push([1,,3,4]),[4,Promise.all(r.map(function(r,s){return IH(a,void 0,void 0,function(){var a;return NH(this,function(u){switch(u.label){case 0:u.trys.push([0,,6,9]),u.label=1;case 1:return o?[3,5]:(Promise.resolve(r.next()).then(function(e){return t[s](e)},function(e){return n(e)}),[4,new Promise(function(e){t[s]=e})]);case 2:return void 0===(a=u.sent())?[3,4]:a.done?(i=a,[2]):[4,e(a.value)];case 3:u.sent(),u.label=4;case 4:return[3,1];case 5:return[3,9];case 6:return r.return?[4,r.return()]:[3,8];case 7:u.sent(),u.label=8;case 8:return[7];case 9:return[2]}})})}))];case 2:return s.sent(),[2,i&&i.value];case 3:return n(),[7];case 4:return[2]}})})})}function aW(e){var t=this,r=nW(e,{returnValues:!0});return new rW(function(e,n){return IH(t,void 0,void 0,function(){var t,o,i,a;return NH(this,function(s){switch(s.label){case 0:if(!r.length)return n(),[2,[]];o=!1,n.then(function(){t(),o=!0}),s.label=1;case 1:s.trys.push([1,,6,8]),s.label=2;case 2:return o?[3,5]:(Promise.all(r.map(function(e){return e.next()})).then(function(e){return t(e)},function(e){return n(e)}),[4,new Promise(function(e){return t=e})]);case 3:return void 0===(i=s.sent())?[2]:(a=i.map(function(e){return e.value}),i.some(function(e){return e.done})?[2,a]:[4,e(a)]);case 4:return s.sent(),[3,2];case 5:return[3,8];case 6:return n(),[4,Promise.all(r.map(function(e){return e.return&&e.return()}))];case 7:return s.sent(),[7];case 8:return[2]}})})})}function sW(e){var t=this,r=nW(e,{yieldValues:!0,returnValues:!0});return new rW(function(e,n){return IH(t,void 0,void 0,function(){var t,o,i,a,s,u=this;return NH(this,function(l){switch(l.label){case 0:if(!r.length)return n(),[2,[]];o=[],i=!1,n.then(function(){var e,r;t();try{for(var n=DH(o),a=n.next();!a.done;a=n.next()){(0,a.value)()}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}i=!0}),l.label=1;case 1:return l.trys.push([1,,5,7]),Promise.all(r.map(function(e){return e.next()})).then(function(e){return t(e)},function(e){return n(e)}),[4,new Promise(function(e){return t=e})];case 2:return void 0===(a=l.sent())?[2]:(s=a.map(function(e){return e.value}),a.every(function(e){return e.done})?[2,s]:[4,e(s.slice())]);case 3:return l.sent(),[4,Promise.all(r.map(function(t,r){return IH(u,void 0,void 0,function(){var u;return NH(this,function(l){switch(l.label){case 0:if(a[r].done)return[2,a[r].value];l.label=1;case 1:return i?[3,4]:(Promise.resolve(t.next()).then(function(e){return o[r](e)},function(e){return n(e)}),[4,new Promise(function(e){return o[r]=e})]);case 2:return void 0===(u=l.sent())?[2,a[r].value]:u.done?[2,u.value]:(s[r]=u.value,[4,e(s.slice())]);case 3:return l.sent(),[3,1];case 4:return[2]}})})}))];case 4:return[2,l.sent()];case 5:return n(),[4,Promise.all(r.map(function(e){return e.return&&e.return()}))];case 6:return l.sent(),[7];case 7:return[2]}})})})}function uW(e,t){for(var r=0;re)){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function dW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return bW(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bW(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bW(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rthis.nodes[1]),this.nodes[1]=e}},{key:"toString",value:function(){return"[NodeRange level: ".concat(this._level,", nodes: ").concat(this.nodes[0],"-").concat(this.nodes[1],"]")}}])&&mW(t.prototype,r),n&&mW(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),a=n.minX,s=n.minY,u=n.maxX,l=n.maxY,pW.info("tree items: ".concat(t,", nodeSize: ").concat(r)),c=_W(t,r),f=c[0][0],void 0,d=c.length-1,p=new i([0,1],d),h=[p],pW.debug("starting stream search with queue: ".concat(h,", numItems: ").concat(t,", nodeSize: ").concat(r,", levelBounds: ").concat(c)),y=yW().mark(function e(){var n,p,y,d,b,v,m,g,w,O,S,_;return yW().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=h.shift(),pW.debug("popped node: ".concat(n,", queueLength: ").concat(h.length)),p=n.startNode(),y=p>=f,d=dW(c[n.level()],2),b=d[1],v=Math.min(n.endNode()+r,b),m=v-p,e.next=9,new wW(o(p*OW,m*OW),0);case 9:g=e.sent,w=new Float64Array(g),O=new Uint32Array(g),S=yW().mark(function e(r){var o,c,d,b,v,m,g,S;return yW().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(uw[o+2])){e.next=7;break}return e.abrupt("return",0);case 7:if(!(s>w[o+3])){e.next=9;break}return e.abrupt("return",0);case 9:if(c=O[8+(o<<1)],d=O[9+(o<<1)],b=kW(d,c),!y){e.next=17;break}return v=function(){if(r ").concat(b)),g.extendEndNodeToNewOffset(b),e.abrupt("return",0);case 23:void 0,_=n.level()-1,S=new i([b,b+1],_),void 0!==g&&g.level()==S.level()?pW.info("Same level, but too far away. Pushing new request at offset: ".concat(b," rather than merging with distant ").concat(g)):pW.info("Pushing new level for ".concat(S," onto queue with nearestNodeRange: ").concat(g," since there's not already a range for this level.")),h.push(S);case 26:case"end":return e.stop()}var _},e)}),_=p;case 14:if(!(_=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function RW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||AW(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AW(e,t){if(e){if("string"==typeof e)return MW(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?MW(e,t):void 0}}function MW(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function IW(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function NW(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){IW(i,n,o,a,s,"next",e)}function s(e){IW(i,n,o,a,s,"throw",e)}a(void 0)})}}function DW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FW(e,t){for(var r=0;rcW.global.extraRequestThreshold()&&(pW.info("Pushing new feature batch, since gap ".concat(w," was too large")),a.push(s),s=[]),s.push([d,v]);case 23:u=!1,r.next=9;break;case 26:r.next=32;break;case 28:r.prev=28,r.t0=r.catch(7),l=!0,c=r.t0;case 32:if(r.prev=32,r.prev=33,!u||null==f.return){r.next=37;break}return r.next=37,VW(f.return());case 37:if(r.prev=37,!l){r.next=40;break}throw c;case 40:return r.finish(37);case 41:return r.finish(32);case 42:return t.headerClient.logUsage("header+index"),s.length>0&&a.push(s),O=a.flatMap(function(e){return t.readFeatureBatch(e)}),r.delegateYield(JW(qW(rW.merge(O))),"t1",46);case 46:case"end":return r.stop()}},r,null,[[7,28,32,42],[33,,37,41]])}))()}},{key:"lengthBeforeTree",value:function(){return jW.length+EW+this.headerLength}},{key:"lengthBeforeFeatures",value:function(){return this.lengthBeforeTree()+this.indexLength}},{key:"buildFeatureClient",value:function(){return new YW(this.headerClient.httpClient)}},{key:"readFeatureBatch",value:function(e){var t=this;return GW(LW().mark(function r(){var n,o,i,a,s,u,l,c,f,p,h;return LW().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:n=RW(e[0],1),o=n[0],i=RW(e[e.length-1],2),a=i[0],s=i[1],u=a+s-o,l=t.buildFeatureClient(),c=CW(e),r.prev=7,c.s();case 9:if((f=c.n()).done){r.next=17;break}return p=RW(f.value,1),h=p[0],r.next=13,VW(t.readFeature(l,h,u));case 13:return r.next=15,r.sent;case 15:r.next=9;break;case 17:r.next=22;break;case 19:r.prev=19,r.t0=r.catch(7),c.e(r.t0);case 22:return r.prev=22,c.f(),r.finish(22);case 25:l.logUsage("feature");case 26:case"end":return r.stop()}},r,null,[[7,19,22,25]])}))()}},{key:"readFeature",value:function(){var e=NW(LW().mark(function e(t,r,n){var o,i,a,s,u,l,c;return LW().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=r+this.lengthBeforeFeatures(),e.next=3,t.getRange(o,4,n,"feature length");case 3:return a=e.sent,i=new DataView(a).getUint32(0,!0),e.next=7,t.getRange(o+4,i,n,"feature data");case 7:return s=e.sent,u=new Uint8Array(s),(l=new Uint8Array(i+EW)).set(u,EW),(c=new hH(l)).setPosition(EW),e.abrupt("return",_H.getRootAsFeature(c));case 14:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()}],[{key:"open",value:function(){var t=NW(LW().mark(function t(r){var n,o,i,a,s,u,l,c,f,p,h;return LW().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=2024,o=new YW(r),i=function(){var e,t=0;for(e=0;e<3;e++){t+=Math.pow(16,e)*OW}return t}(),a=n+i,pW.debug("fetching header. minReqLength: ".concat(a," (assumedHeaderLength: ").concat(n,", assumedIndexLength: ").concat(i,")")),t.t0=Uint8Array,t.next=8,o.getRange(0,8,a,"header");case 8:if(t.t1=t.sent,(s=new t.t0(t.t1)).subarray(0,3).every(function(e,t){return jW[t]===e})){t.next=13;break}throw pW.error("bytes: ".concat(s," != ").concat(jW)),new Error("Not a FlatGeobuf file");case 13:return pW.debug("magic bytes look good"),t.next=16,o.getRange(8,4,a,"header");case 16:if(l=t.sent,!((u=new DataView(l).getUint32(0,!0))>10485760||u<8)){t.next=21;break}throw new Error("Invalid header size");case 21:return pW.debug("headerLength: ".concat(u)),t.next=24,o.getRange(12,u,a,"header");case 24:return c=t.sent,f=new hH(new Uint8Array(c)),p=MH(f),h=SW(p.featuresCount,p.indexNodeSize),pW.debug("completed: opening http reader"),t.abrupt("return",new e(o,p,u,h));case 30:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()}]),e}(),YW=function(){function e(t){DW(this,e),this.bytesEverUsed=0,this.bytesEverFetched=0,this.buffer=new ArrayBuffer(0),this.head=0,this.httpClient="string"==typeof t?new XW(t):t}return BW(e,[{key:"getRange",value:function(){var e=NW(LW().mark(function e(t,r,n,o){var i,a,s;return LW().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.bytesEverUsed+=r,i=t-this.head,a=i+r,!(i>=0&&a<=this.buffer.byteLength)){e.next=5;break}return e.abrupt("return",this.buffer.slice(i,a));case 5:return s=Math.max(r,n),this.bytesEverFetched+=s,pW.debug("requesting for new Range: ".concat(t,"-").concat(t+r-1)),e.next=10,this.httpClient.getRange(t,s,o);case 10:return this.buffer=e.sent,this.head=t,e.abrupt("return",this.buffer.slice(0,r));case 13:case"end":return e.stop()}},e,this)}));return function(t,r,n,o){return e.apply(this,arguments)}}()},{key:"logUsage",value:function(e){var t=e.split(" ")[0],r=this.bytesEverUsed,n=this.bytesEverFetched,o=(100*r/n).toFixed(2);pW.info("".concat(t," bytes used/requested: ").concat(r," / ").concat(n," = ").concat(o,"%"))}}]),e}(),XW=function(){function e(t){DW(this,e),this.requestsEverMade=0,this.bytesEverRequested=0,this.url=t}return BW(e,[{key:"getRange",value:function(){var e=NW(LW().mark(function e(t,r,n){var o,i;return LW().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.requestsEverMade+=1,this.bytesEverRequested+=r,o="bytes=".concat(t,"-").concat(t+r-1),pW.info("request: #".concat(this.requestsEverMade,", purpose: ").concat(n,"), bytes: (this_request: ").concat(r,", ever: ").concat(this.bytesEverRequested,"), Range: ").concat(o)),e.next=6,fetch(this.url,{headers:{Range:o}});case 6:return i=e.sent,e.abrupt("return",i.arrayBuffer());case 8:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()}]),e}();function QW(e){"@babel/helpers - typeof";return(QW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZW(){ZW=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return x()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===c)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,a),i}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function f(){}function p(){}function h(){}var y={};s(y,o,function(){return this});var d=Object.getPrototypeOf,b=d&&d(d(P([])));b&&b!==t&&r.call(b,o)&&(y=b);var v=h.prototype=f.prototype=Object.create(y);function m(e){["next","throw","return"].forEach(function(t){s(e,t,function(e){return this._invoke(t,e)})})}function g(e,t){var n;this._invoke=function(o,i){function a(){return new t(function(n,a){!function n(o,i,a,s){var u=l(e[o],e,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==QW(f)&&r.call(f,"__await")?t.resolve(f.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(f).then(function(e){c.value=e,a(c)},function(e){return n("throw",e,a,s)})}s(u.arg)}(o,i,n,a)})}return n=n?n.then(a,a):a()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=l(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,c;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function KW(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function $W(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){KW(i,n,o,a,s,"next",e)}function s(e){KW(i,n,o,a,s,"throw",e)}a(void 0)})}}function eY(e){var t,r,n,o=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new tY(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function tY(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(tY=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new tY(e)}function rY(e){return new iY(e,0)}function nY(e){return function(){return new oY(e.apply(this,arguments))}}function oY(e){var t,r;function n(t,r){try{var i=e[t](r),a=i.value,s=a instanceof iY;Promise.resolve(s?a.v:a).then(function(r){if(s){var u="return"===t?"return":"next";if(!a.k||r.done)return n(u,r);r=e[u](r).value}o(i.done?"return":"normal",r)},function(e){n("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,o){return new Promise(function(i,a){var s={key:e,arg:o,resolve:i,reject:a,next:null};r?r=r.next=s:(t=r=s,n(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}function iY(e,t){this.v=e,this.k=t}function aY(){return(aY=nY(ZW().mark(function e(t,r,n){var o,i,a,s,u,l,c,f,p,h;return ZW().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o="function"==typeof(y=t).slice?y:new EH("function"==typeof y.read?y:y.getReader()),i=function(){var e=$W(ZW().mark(function e(t){return ZW().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.slice(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),e.t0=Uint8Array,e.next=5,rY(i(8,"magic bytes"));case 5:if(e.t1=e.sent,(a=new e.t0(e.t1)).subarray(0,3).every(function(e,t){return jW[t]===e})){e.next=9;break}throw new Error("Not a FlatGeobuf file");case 9:return e.t2=Uint8Array,e.next=12,rY(i(4,"header length"));case 12:return e.t3=e.sent,a=new e.t2(e.t3),s=new hH(a),u=s.readUint32(0),e.t4=Uint8Array,e.next=19,rY(i(u,"header data"));case 19:if(e.t5=e.sent,a=new e.t4(e.t5),s=new hH(a),l=MH(s),n&&n(l),c=l.indexNodeSize,f=l.featuresCount,!(c>0)){e.next=29;break}return p=SW(f,c),e.next=29,rY(i(p,"entire index, w/o rect"));case 29:return e.next=31,rY(uY(i,l,r));case 31:if(!(h=e.sent)){e.next=36;break}return e.next=34,h;case 34:e.next=29;break;case 36:case"end":return e.stop()}var y},e)}))).apply(this,arguments)}function sY(){return(sY=nY(ZW().mark(function e(t,r,n,o){var i,a,s,u,l,c,f;return ZW().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rY(WW.open(t));case 2:i=e.sent,pW.debug("opened reader"),o&&o(i.header),a=!1,s=!1,e.prev=7,l=eY(i.selectBbox(r));case 9:return e.next=11,rY(l.next());case 11:if(!(a=!(c=e.sent).done)){e.next=18;break}return f=c.value,e.next=15,n(f,i.header);case 15:a=!1,e.next=9;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(7),s=!0,u=e.t0;case 24:if(e.prev=24,e.prev=25,!a||null==l.return){e.next=29;break}return e.next=29,rY(l.return());case 29:if(e.prev=29,!s){e.next=32;break}throw u;case 32:return e.finish(29);case 33:return e.finish(24);case 34:case"end":return e.stop()}},e,null,[[7,20,24,34],[25,,29,33]])}))).apply(this,arguments)}function uY(e,t,r){return lY.apply(this,arguments)}function lY(){return(lY=$W(ZW().mark(function e(t,r,n){var o,i,a,s,u;return ZW().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Uint8Array,e.next=3,t(4,"feature length");case 3:if(e.t1=e.sent,0!==(o=new e.t0(e.t1)).byteLength){e.next=7;break}return e.abrupt("return");case 7:return i=new hH(o),a=i.readUint32(0),e.t2=Uint8Array,e.next=12,t(a,"feature data");case 12:return e.t3=e.sent,o=new e.t2(e.t3),(s=new Uint8Array(a+4)).set(o,4),(i=new hH(s)).setPosition(EW),u=_H.getRootAsFeature(i),e.abrupt("return",n(u,r));case 20:case"end":return e.stop()}},e)}))).apply(this,arguments)}function cY(e,t){return{type:"FeatureCollection",features:function(e,t,r){if(!e.subarray(0,3).every(function(e,t){return jW[t]===e}))throw new Error("Not a FlatGeobuf file");var n=new hH(e),o=n.readUint32(jW.length);n.setPosition(jW.length+EW);var i=MH(n);r&&r(i);var a=jW.length+EW+o,s=i.indexNodeSize,u=i.featuresCount;s>0&&(a+=SW(u,s));for(var l=[];a=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function vY(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function mY(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){vY(i,n,o,a,s,"next",e)}function s(e){vY(i,n,o,a,s,"throw",e)}a(void 0)})}}function gY(e,t){for(var r=0;r=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}(o,i=t)&&(o[0]>i[0]?a[0]=o[0]:a[0]=i[0],o[1]>i[1]?a[1]=o[1]:a[1]=i[1],o[2]=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function EY(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function TY(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function NY(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function DY(e,t){for(var r=0;r1?(l=p,f=new t.geom.MultiPolygon(null)):f=new t.geom.Polygon(null)}else f=c===t.geom.GeometryType.POINT?new t.geom.Point(null):c===t.geom.GeometryType.LINE_STRING?new t.geom.LineString(null):c===t.geom.GeometryType.POLYGON?new t.geom.Polygon(null):c===t.geom.GeometryType.MULTI_POINT?new t.geom.MultiPoint(null):c===t.geom.GeometryType.MULTI_LINE_STRING?new t.geom.MultiLineString(null):null;if(f){f.setFlatCoordinates(t.geom.GeometryLayout.XY,u,l),o=new this.featureClass_,this.geometryName_&&o.setGeometryName(this.geometryName_);var m=t.format.Feature.transformWithOptions(f,!1,this.adaptOptions(n));o.setGeometry(m),o.setId(a),o.setProperties(s)}}return o},t.geom.flat.textpath.lineString=function(e,r,n,o,i,a,s,u){for(var l=[],c=Math.atan2(e[n-o+1]-e[r+1],e[n-o]-e[r]),f=c<-.785||c>2.356,p=c<-.785&&c>-2.356||c>.785&&c<2.356,h=i.length,y=e[r],d=e[r+1],b=e[r+=o],v=e[r+1],m=0,g=Math.sqrt(Math.pow(b-y,2)+Math.pow(v-d,2));r=19968&&R<=40907,M=a(j=f?C+j:j+C)-E;for(E+=M;r1?F:F<0||F>1?D:D1?F:F<0||F>1?D:D0?-Math.PI:Math.PI),A&&p&&(J+=J>0?-Math.PI/2:Math.PI/2),void 0!==S){var z=J-S;if(z+=z>Math.PI?-2*Math.PI:z<-Math.PI?2*Math.PI:0,A===_?Math.abs(z)>u:Math.abs(z)>u+Math.PI/2)return null}S!=J||p?(E=M,w=[B,G,M/2,J,j=C],f?l.unshift(w):l.push(w),S=J,_=A):(f&&(w[0]=B,w[1]=G,w[2]=M/2),w[4]=j),x=U,k=V,s+=M}return l},t.layer.VectorTile.prototype.setFastRender=function(e){return this.fastRender=e},t.renderer.canvas.VectorTileLayer.prototype.postCompose=function(e,r,n){var o,i,a=this.getLayer(),s=a.getDeclutter()?{}:null,u=a.getSource(),l=a.getRenderMode(),c=t.renderer.canvas.VectorTileLayer.VECTOR_REPLAYS[l],f=r.pixelRatio,p=r.viewState.rotation,h=r.size;p&&(o=Math.round(f*h[0]/2),i=Math.round(f*h[1]/2),t.render.canvas.rotateAtOffset(e,-p,o,i)),s&&this.declutterTree_.clear();for(var y=this.renderedTiles,d=u.getTileGridForProjection(r.viewState.projection),b=[],v=[],m=y.length-1;m>=0;--m){var g=y[m];if(g.getState()!=t.TileState.ABORT)for(var w=g.tileCoord,O=d.getTileCoordExtent(w)[0]-d.getTileCoordExtent(g.wrappedTileCoord)[0],S=void 0,_=0,P=g.tileKeys.length;_e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length)break;if(t[o.id]){var i=JSON.parse(JSON.stringify(t[o.id]));i.paint&&(i.paint=Object.assign({},o.paint,i.paint)),i.layout&&(i.layout=Object.assign({},o.layout,i.layout)),Object.assign(o,i),r++}}this._createStyleFunction()}},{key:"setStyle",value:function(e){this.layersBySourceLayer={},this._loadStyle(e)}},{key:"_loadStyle",value:function(e){var t=this;if("[object Object]"==Object.prototype.toString.call(e))this._mbStyle=e,this._resolve();else{var r=gn.appendCredential(e);vn.get(r,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){t._mbStyle=e,t._resolve()})}}},{key:"_resolve",value:function(){var e=this;if(this.source||(this.source=Object.keys(this._mbStyle.sources)[0]),this._mbStyle.sprite){var t=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"";this._mbStyle.sprite=this._mbStyle.sprite.replace("@2x","");var r=this._toSpriteUrl(this._mbStyle.sprite,this.path,t+".json");vn.get(gn.appendCredential(r),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(r){e._spriteData=r,e._spriteImageUrl=gn.appendCredential(e._toSpriteUrl(e._mbStyle.sprite,e.path,t+".png")),e._spriteImage=null;var n=new Image;n.crossOrigin=e.withCredentials?"use-credentials":"anonymous",n.onload=function(){e._spriteImage=n,e._initStyleFunction()},n.onerror=function(){e._spriteImage=null,e._initStyleFunction()},n.src=e._spriteImageUrl}).catch(function(t){console.log(t),e._spriteImage=null,e._initStyleFunction()})}else this._initStyleFunction()}},{key:"_initStyleFunction",value:function(){if(!this.resolutions&&this._mbStyle.metadata&&this._mbStyle.metadata.indexbounds){for(var e=this._mbStyle.metadata.indexbounds,t=Math.max(e[2]-e[0],e[3]-e[1]),r=[],n=0;n<30;n++)r.push(t/512/Math.pow(2,n));this.resolutions=r}this._createStyleFunction(),this.dispatchEvent("styleloaded")}},{key:"_createStyleFunction",value:function(){this.map&&window.olms.applyBackground(this.map,this._mbStyle),this.featureStyleFuntion=this._getStyleFunction()}},{key:"_getStyleFunction",value:function(){var e=this;return this.fun=window.olms.stylefunction({setStyle:function(){},set:function(){},changed:function(){}},this._mbStyle,this.source,this.resolutions,this._spriteData,"",this._spriteImage),function(t,r){var n=e.fun(t,r);if(e.selectedObjects.length>0&&e.selectedObjects.find(function(e){return e.id===t.getId()&&e.sourceLayer===t.get("layer")})){var o=n&&n[0]?n[0].getZIndex():99999,i=e.selectedStyle(t,r);Array.isArray(i)||(i=[i]);for(var a=0;a2?n[2]:""):e+r}}])&&QY(t.prototype,r),n&&QY(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function tX(e){"@babel/helpers - typeof";return(tX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rX(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function YZ(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function XZ(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){YZ(i,n,o,a,s,"next",e)}function s(e){YZ(i,n,o,a,s,"throw",e)}a(void 0)})}}function QZ(e,t){for(var r=0;r-1){var o=this.server.split(n);o.length>1&&(t=o[0]+n+this.server+"web/maps/"+this.mapId+"/map.json")}}this.getMapInfo(t)}},{key:"getMapInfo",value:function(e){var t=this,r=e;-1===e.indexOf(".json")&&(r=e=this.handleJSONSuffix(e)),vn.get(t.getRequestUrl(r),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){t.getMapInfoSuccess(e)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)})}},{key:"getMapInfoSuccess",value:function(){var e=XZ(WZ().mark(function e(t){var r,n;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this,!1!==t.succeed){e.next=4;break}return r.errorCallback&&r.errorCallback(t.error,"getMapFaild",r.map),e.abrupt("return");case 4:return e.next=6,r.handleCRS(t.projection,t.baseLayer.url);case 6:if(n=e.sent,r.mapParams={title:t.title,description:t.description},"BrowseMap"!==n.action){e.next=12;break}r.createSpecLayer(t),e.next=34;break;case 12:if("OpenMap"!==n.action){e.next=32;break}if(r.baseProjection=n.newCrs||t.projection,r.webMapVersion=t.version,r.baseLayer=t.baseLayer,r.isHaveGraticule=t.grid&&t.grid.graticule,!t.baseLayer||"MAPBOXSTYLE"!==t.baseLayer.layerType){e.next=21;break}r.addMVTMapLayer(t,t.baseLayer,0).then(XZ(WZ().mark(function e(){return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r.createView(t),t.layers&&0!==t.layers.length){e.next=5;break}r.sendMapToUser(0),e.next=7;break;case 5:return e.next=7,r.addLayers(t);case 7:r.addGraticule(t);case 8:case"end":return e.stop()}},e)}))).catch(function(e){r.errorCallback&&r.errorCallback(e,"getMapFaild",r.map)}),e.next=30;break;case 21:return e.next=23,r.addBaseMap(t);case 23:if(t.layers&&0!==t.layers.length){e.next=27;break}r.sendMapToUser(0),e.next=29;break;case 27:return e.next=29,r.addLayers(t);case 29:r.addGraticule(t);case 30:e.next=34;break;case 32:return r.errorCallback&&r.errorCallback({type:"Not support CS",errorMsg:"Not support CS: ".concat(t.projection)},"getMapFaild",r.map),e.abrupt("return");case 34:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"handleCRS",value:function(){var e=XZ(WZ().mark(function e(t,r){var n,o,i,a;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this,o={},i=t,a="OpenMap",!this.isCustomProjection(t)){e.next=7;break}return e.next=5,vn.get(n.getRequestUrl("".concat(r,"/prjCoordSys.wkt")),null,{withCredentials:n.withCredentials,withoutFormatSuffix:!0}).then(function(e){return e.text()}).then(function(){var e=XZ(WZ().mark(function e(r){return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(-1!==r.indexOf("")){e.next=5;break}n.addProjctionFromWKT(r,t),o={action:a,newCrs:i},e.next=6;break;case 5:throw"ERROR";case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(){o={action:a="BrowseMap",newCrs:i}});case 5:e.next=9;break;case 7:0===t.indexOf("EPSG")&&t.split(":")[1]<=0?a="BrowseMap":"EPSG:910111"===t||"EPSG:910112"===t?i="EPSG:3857":"EPSG:910101"===t||"EPSG:910102"===t?i="EPSG:4326":0!==t.indexOf("EPSG")&&(n.addProjctionFromWKT(i),i=n.getEpsgInfoFromWKT(t)),o={action:a,newCrs:i};case 9:return e.abrupt("return",o);case 10:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getScales",value:function(e){var t,r,n=this,o=[],i={},a=[],s=e.coordUnit||JN.get(e.projection).getUnits();if(s||(s="EPSG:3857"==this.baseProjection?"m":"degree"),e.visibleScales&&e.visibleScales.length>0)e.visibleScales.forEach(function(e){var r=1/e;t=n.getResFromScale(r,s),e="1:".concat(r),i[n.formatScale(e)]=t,a.push(t),o.push(e)},this);else if("WMTS"===e.layerType)e.scales.forEach(function(e){t=n.getResFromScale(e,s,90.7),e="1:".concat(e),i[n.formatScale(e)]=t,a.push(t),o.push(e)},this);else for(var u=e.minZoom,l=void 0===u?0:u,c=e.maxZoom,f=void 0===c?22:c,p=this.map.getView(),h=l;h<=f;h++)if(t=p.getResolutionForZoom(h),r=this.getScaleFromRes(t,s),-1===o.indexOf(r)){o.push(r);var y=r.replace(/,/g,"");i[y]=t,a.push(t)}this.scales=o,this.resolutions=i,this.resolutionArray=a}},{key:"getResFromScale",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DEGREE";return.0254*e/(arguments.length>2&&void 0!==arguments[2]?arguments[2]:96)/rK[t.toUpperCase()]}},{key:"getScaleFromRes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DEGREE";return"1:"+e*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:96)*rK[t.toUpperCase()]/.0254}},{key:"formatScale",value:function(e){return e.replace(/,/g,"")}},{key:"createSpecLayer",value:function(e){var t=this,r=e.baseLayer,n=r.url,o=r.layerType,i=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y],a=new JN.Projection({extent:i,units:"m",code:"EPSG:0"});JN.addProjection(a);var s={center:e.center,level:0};t.baseProjection=a;var u={center:s.center?[s.center.x,s.center.y]:[0,0],zoom:0,projection:a};["4","5"].indexOf(jD.getOlVersion())<0&&(u.multiWorld=!0);var l,c=new(SZ())(u);t.map.setView(c),t.mapParams&&(t.mapParams.extent=i,t.mapParams.projection=e.projection),n&&n.indexOf("?token=")>-1&&(t.credentialKey="token",t.credentialValue=e.baseLayer.credential=n.split("?token=")[1],n=n.split("?token=")[0]),"TILE"===o?(n=this.handleJSONSuffix(n),vn.get(t.getRequestUrl(n),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){r.originResult=e;var o="IPORTAL",i=r.credential,a="Token",s=r.url;(r.url.indexOf("www.supermapol.com")>-1||r.url.indexOf("itest.supermapol.com")>-1)&&(a="Key",s=[s],o="ONLINE"),i&&gn["register".concat(a)](s,i);var u={serverType:o,url:n,tileGrid:rB.optionsFromMapJSON(n,e).tileGrid};!n||ye.isInTheSameDomain(n)||this.isIportalProxyServiceUrl(n)||(u.tileProxy=t.server+"apps/viewer/getUrlResource.png?url="),l=new rB(u),t.addSpecToMap(l)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)})):"WMS"===o?(l=t.createWMSSource(r),t.addSpecToMap(l)):"WMTS"===o?vn.get(t.getRequestUrl(n,!0),null,{withCredentials:this.withCredentials}).then(function(e){return e.text()}).then(function(n){r.extent=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y],r.scales=t.getWMTSScales(r.tileMatrixSet,n),r.dpi=oK,l=t.createWMTSSource(r),t.addSpecToMap(l)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)}):t.errorCallback&&t.errorCallback({type:"Not support CS",errorMsg:"Not support CS: ".concat(o)},"getMapFaild",t.map),c&&c.fit(i)}},{key:"addSpecToMap",value:function(e){var t=new EZ.Tile({source:e,zIndex:0});this.map.addLayer(t),this.sendMapToUser(0)}},{key:"getWMTSScales",value:function(e,t){for(var r=(new(CZ())).read(t).Contents.TileMatrixSet,n=[],o=0;o=1)}},{key:"limitScale",value:function(e,t){if(this.validScale(e.minScale)&&this.validScale(e.maxScale)){var r,n,o;if("WMTS"===t.layerType)r=t.scales,n=+e.minScale.split(":")[1],o=+e.maxScale.split(":")[1];else{var i=this.scales.map(function(e){return 1/e.split(":")[1]});r=Array.isArray(t.visibleScales)&&t.visibleScales.length&&t.visibleScales?t.visibleScales:i,n=1/+e.minScale.split(":")[1],o=1/+e.maxScale.split(":")[1]}var a=this.findNearest(r,n),s=this.findNearest(r,o),u=r.indexOf(a),l=r.indexOf(s);if(u>l){var c=[l,u];u=c[0],l=c[1]}0===u&&l===r.length-1||(this.map.setView(new(SZ())(Object.assign({},this.map.getView().options_,{maxResolution:void 0,minResolution:void 0,minZoom:u,maxZoom:l,constrainResolution:!1}))),this.map.addInteraction(new(PZ())({constrainResolution:!0})))}}},{key:"parseNumber",value:function(e){return Number(e.split(":")[1])}},{key:"findNearest",value:function(e,t){for(var r=0,n=t,o=1,i=e.length;o0||l.scales&&l.scales.length>0)this.getScales(l);else if(e.baseLayer&&t&&4===t.length){var c=(t[2]-t[0])/512,f=(t[3]-t[1])/512;u=Math.max(c,f)}this.map.setView(new(SZ())({zoom:n,center:a,projection:i,maxZoom:o,maxResolution:u}));var p={};if(l.scales&&l.scales.length>0&&"WMTS"===l.layerType||this.resolutionArray&&this.resolutionArray.length>0?p={zoom:n,center:a,projection:i,resolutions:this.resolutionArray,maxZoom:o}:"WMTS"===l.layerType?(p={zoom:n,center:a,projection:i,maxZoom:o},this.getScales(l)):(p={zoom:n,center:a,projection:i,maxResolution:u,maxZoom:o},this.getScales(l)),["4","5"].indexOf(jD.getOlVersion())<0&&(p.multiWorld=!0,p.showFullExtent=!0,p.enableRotation=!1,p.constrainResolution=!0),this.map.setView(new(SZ())(p)),e.visibleExtent){var h=this.map.getView(),y=h.getResolutionForExtent(e.visibleExtent,this.map.getSize());h.setResolution(y),h.setCenter((0,wF.getCenter)(e.visibleExtent))}}},{key:"createBaseLayer",value:function(e,t,r,n,o){var i,a=this;n&&(a=n);var s=e.layerType;switch((s.indexOf("TIANDITU_VEC")>-1||s.indexOf("TIANDITU_IMG")>-1||s.indexOf("TIANDITU_TER")>-1)&&(s=s.substr(0,12)),s){case"TIANDITU_VEC":case"TIANDITU_IMG":case"TIANDITU_TER":i=this.createTiandituSource(s,e.projection);break;case"BAIDU":i=this.createBaiduSource();break;case"BING":i=this.createBingSource(e,e.projection);break;case"WMS":i=this.createWMSSource(e);break;case"WMTS":i=a.createWMTSSource(e);break;case"TILE":case"SUPERMAP_REST":i=a.createDynamicTiledSource(e,o);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":i=this.createXYZSource(e)}var u=new EZ.Tile({source:i,zIndex:e.zIndex||1,visible:e.visible}),l=jD.newGuid(8);e.name&&u.setProperties({name:e.name,layerID:l}),void 0!==e.visible&&null!==e.visible||(e.visible=!0),u.setVisible(e.visible),e.opacity&&u.setOpacity(e.opacity),t&&u.setZIndex(t),e.layer=u,e.layerID=l;var c,f,p=e.visibleScale,h=e.autoUpdateTime;return p&&(f=this.resolutions[p.minScale],c=this.resolutions[p.maxScale],f>1?u.setMaxResolution(Math.ceil(f)):u.setMaxResolution(1.1*f),u.setMinResolution(c)),h&&!e.autoUpdateInterval&&(e.autoUpdateInterval=setInterval(function(){a.updateTileToMap(e,t)},h)),r&&(u.setZIndex(0),a.map.addLayer(u)),u}},{key:"updateTileToMap",value:function(e,t){this.map.removeLayer(e.layer),this.map.addLayer(this.createBaseLayer(e,t))}},{key:"getInternetMapInfo",value:function(e){var t=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892],r=[-20037508.34,-20037508.34,20037508.34,20037508.34];switch(e.units="m",e.layerType){case"BAIDU":e.iServerUrl="https://map.baidu.com/",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=1,e.extent=t;break;case"CLOUD":e.url="http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"CLOUD_BLACK":e.url="http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"tencent":e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"TIANDITU_VEC_3857":case"TIANDITU_IMG_3857":case"TIANDITU_TER_3857":e.iserverUrl="https://map.tianditu.gov.cn/",e.epsgCode="EPSG:3857",e.minZoom=0,e.maxZoom=19,e.level=1,e.extent=t,"TIANDITU_TER_3857"===e.layerType&&(e.maxZoom=14);break;case"TIANDITU_VEC_4326":case"TIANDITU_IMG_4326":case"TIANDITU_TER_4326":e.iserverUrl="https://map.tianditu.gov.cn/",e.epsgCode="EPSG:4326",e.minZoom=0,e.maxZoom=19,e.level=1,e.extent=[-180,-90,180,90],"TIANDITU_TER_4326"===e.layerType&&(e.maxZoom=14);break;case"OSM":e.url="http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=1,e.extent=r,e.iserverUrl="https://www.openstreetmap.org";break;case"GOOGLE":e.url="https://maps.googleapis.com/maps/vt?pb=!1m5!1m4!1i{z}!2i{x}!3i{y}!4i256!2m3!1e0!2sm!3i540264686!3m12!2s".concat(this.getLang(),"!3sUS!5e18!12m4!1e68!2m2!1sset!2sRoadmap!12m3!1e37!2m1!1ssmartmaps!4e0&key=").concat(this.googleMapsAPIKey),e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=22,e.level=1,e.extent=r,e.iserverUrl="https://www.google.cn/maps";break;case"JAPAN_STD":e.url="https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=0,e.extent=r;break;case"JAPAN_PALE":e.url="https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=2,e.maxZoom=19,e.level=2,e.extent=r;break;case"JAPAN_RELIEF":e.url="https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=5,e.maxZoom=14,e.level=5,e.extent=[12555667.53929,1281852.98656,17525908.86651,7484870.70596];break;case"JAPAN_ORT":e.url="https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg",e.epsgCode="EPSG:3857",e.minZoom=2,e.maxZoom=12,e.level=2,e.extent=[-19741117.14519,-10003921.36848,19981677.71404,19660983.56089]}}},{key:"createDynamicTiledSource",value:function(e,t){var r="IPORTAL",n=e.credential?e.credential.token:void 0,o="Token",i=e.url;(e.url.indexOf("www.supermapol.com")>-1||e.url.indexOf("itest.supermapol.com")>-1)&&(o="Key",i=[i],r="ONLINE"),n&&gn["register".concat(o)](i,n);var a={transparent:!0,url:e.url,wrapX:!1,serverType:r,format:e.format};if(t||this.isCustomProjection(this.baseProjection)||(a.prjCoordSys={epsgCode:this.baseProjection.split(":")[1]}),e.visibleScales&&e.visibleScales.length>0){var s=[];for(var u in e.visibleScales){var l=jD.scaleToResolution(e.visibleScales[u],nK,e.coordUnit);s.push(l)}e.visibleResolutions=s;var c=new(aF())({extent:e.extent,resolutions:s});a.tileGrid=c}else{a.extent=this.baseLayerExtent;var f=new(aF())({extent:e.extent,resolutions:this.getResolutionsFromBounds(e.extent)});a.tileGrid=f}!e.url||ye.isInTheSameDomain(e.url)||this.isIportalProxyServiceUrl(e.url)||"webp"===e.format||(a.tileProxy=this.server+"apps/viewer/getUrlResource.png?url=");var p=new rB(a);return gn["register".concat(o)](e.url),p}},{key:"getResolutionsFromBounds",value:function(e){for(var t=[],r=Math.abs(e[0]-e[2])/512,n=0;n<22;n++)0!==n?(r/=2,t[n]=r):t[n]=r;return t}},{key:"createTiandituSource",value:function(e,t,r){var n={layerType:e.split("_")[1].toLowerCase(),isLabel:r||!1,projection:t,url:"https://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?tk=".concat(this.tiandituKey)};return new WF(n)}},{key:"createBaiduSource",value:function(){return new hF}},{key:"createBingSource",value:function(e,t){return new(TF())({wrapX:!1,projection:t,crossOrigin:"anonymous",tileUrlFunction:function(e){var t=zZ(e),r=t[0],n=t[1],o=t[2];o=o>0?o-1:-o-1;for(var i="",a=r;a>0;a--){var s=0,u=1<1&&void 0!==arguments[1])||arguments[1],n=this,o=e.url.trim(),i=e.credential,a={withCredentials:this.withCredentials,withoutFormatSuffix:!0};if(r){var s={epsgCode:n.baseProjection.split(":")[1]};n.isCustomProjection(n.baseProjection)||(o+=".json?prjCoordSys="+encodeURI(JSON.stringify(s)))}return i&&(o="".concat(o,"&token=").concat(encodeURI(i.token)),t=i.token),o=this.handleJSONSuffix(o),vn.get(n.getRequestUrl(o),null,a).then(function(e){return e.json()}).then(function(){var r=XZ(WZ().mark(function r(o){var i,a;return WZ().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!1!==o.succeed){r.next=2;break}return r.abrupt("return",o);case 2:if(i="png","webp"!==n.tileFormat){r.next=8;break}return r.next=6,n.isSupportWebp(e.url,t);case 6:a=r.sent,i=a?"webp":"png";case 8:return r.abrupt("return",{units:o.coordUnit&&o.coordUnit.toLowerCase(),coordUnit:o.coordUnit,visibleScales:o.visibleScales,extent:[o.bounds.left,o.bounds.bottom,o.bounds.right,o.bounds.top],projection:"EPSG:".concat(o.prjCoordSys.epsgCode),format:i});case 9:case"end":return r.stop()}},r)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){return{succeed:!1,error:e}})}},{key:"getTileInfo",value:function(e,t,r){var n=this,o={withCredentials:this.withCredentials,withoutFormatSuffix:!0};e.url.indexOf("?token=")>-1&&(n.credentialKey="token",n.credentialValue=e.credential=e.url.split("?token=")[1],e.url=e.url.split("?token=")[0]);var i=this.handleJSONSuffix(e.url);return vn.get(n.getRequestUrl(i),null,o).then(function(e){return e.json()}).then(function(){var o=XZ(WZ().mark(function o(i){var a,s;return WZ().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!i||!i.code||200===i.code){o.next=2;break}throw i;case 2:if(i.visibleScales&&(e.visibleScales=i.visibleScales,e.coordUnit=i.coordUnit),e.maxZoom=i.maxZoom,e.maxZoom=i.minZoom,a=e.credential?e.credential.token:void 0,e.format="png","webp"!==n.tileFormat||"https://maptiles.supermapol.com/iserver/services/map_China/rest/maps/China_Dark"===e.url){o.next=12;break}return o.next=10,n.isSupportWebp(e.url,a);case 10:s=o.sent,e.format=s?"webp":"png";case 12:r?t&&t(r,null,!0,n):t&&t(e);case 13:case"end":return o.stop()}},o)}));return function(e){return o.apply(this,arguments)}}()).catch(function(e){n.errorCallback&&n.errorCallback(e,"getTileInfo",n.map)})}},{key:"getWMTSUrl",value:function(e,t){var r="?";return e.indexOf("?")>-1&&(r="&"),e+=t?r+"SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities":r+"/1.0.0/WMTSCapabilities.xml",this.getRequestUrl(e,!0)}},{key:"getWmtsInfo",value:function(e,t){var r=this,n={withCredentials:r.withCredentials,withoutFormatSuffix:!0},o=!e.requestEncoding||"KVP"===e.requestEncoding;return vn.get(r.getWMTSUrl(e.url,o),null,n).then(function(e){return e.text()}).then(function(n){var i=(new(CZ())).read(n);if(r.isValidResponse(i)){for(var a,s,u=i.Contents,l=u.TileMatrixSet,c=u.Layer,f="default",p=0;p-1?[g[1],g[0]]:g;break}var w,O=e.name;h?(h[0]<-180&&(h[0]=-180),h[1]<-90&&(h[1]=-90),h[2]>180&&(h[2]=180),h[3]>90&&(h[3]=90),w=JN.transformExtent(h,"EPSG:4326",r.baseProjection)):w=JN.get(r.baseProjection).getExtent(),e.tileUrl=r.getTileUrl(i.OperationsMetadata.GetTile.DCP.HTTP.Get,a,s,o),e.extent=w,e.name=O,e.orginEpsgCode=e.projection,e.overLayer=!0,e.scales=y,e.style=f,e.title=O,e.unit="m",e.layerFormat=s,e.matrixIds=d,t&&t(e)}}).catch(function(e){r.errorCallback&&r.errorCallback(e,"getWmtsFaild",r.map)})}},{key:"getWmsInfo",value:function(e){var t=this,r=e.url.trim();r+=r.indexOf("?")>-1?"&SERVICE=WMS&REQUEST=GetCapabilities":"?SERVICE=WMS&REQUEST=GetCapabilities";var n={withCredentials:t.withCredentials,withoutFormatSuffix:!0};return new Promise(function(o){return vn.get(t.getRequestUrl(r,!0),null,n).then(function(e){return e.text()}).then(function(){var t=XZ(WZ().mark(function t(r){var n,i,a,s,u,l,c;return WZ().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=new(AZ()),!(i=n.read(r))){t.next=17;break}a=i.Capability.Layer.Layer,s=e.projection,e.subLayers=e.layers[0],e.version=i.version,u=0;case 7:if(!(u=0?t.getImage().src="".concat(r,"&tk=").concat(ye.getParameters(e.url).tk):t.getImage().src=r}})}},{key:"getWMTSTileGrid",value:function(e,t,r,n,o,i){var a=this.getReslutionsFromScales(t,n||oK,r);return new(GF())({origin:o,extent:e,resolutions:a.res,matrixIds:i||a.matrixIds})}},{key:"getReslutionsFromScales",value:function(e,t,r,n){r=r&&r.toLowerCase()||"degrees",t=t||oK,n=n||6378137;var o=[],i=[];if(jD.isArray(e))e&&e.forEach(function(e,a){e>1&&(i.push(a),o.push(this.getResolutionFromScale(e,t,r,n)))},this);else{var a=e.TileMatrix;a&&a.forEach(function(e){i.push(e.Identifier),o.push(this.getResolutionFromScale(e.ScaleDenominator,t,r,n))},this)}return{res:o,matrixIds:i}}},{key:"getResolutionFromScale",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nK,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return e=(e=+e)>1?1/e:e,"degrees"===r||"dd"===r||"degree"===r?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4}},{key:"isValidResponse",value:function(e){for(var t=["Contents","OperationsMetadata"],r=!0,n=0;n0)){e.next=14;break}this.layers=r,a=WZ().mark(function e(){var a,s,c,f,p,h,y,d,b;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r[u],s=u+1,c=a.dataSource,f=c&&"SAMPLE_DATA"===c.type&&!!c.name,"MAPBOXSTYLE"!==a.layerType){e.next=6;break}n.addMVTMapLayer(t,a,s).then(function(){n.layerAdded++,n.sendMapToUser(i)}).catch(function(e){n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(e,"getLayerFaild",n.map)}),e.next=18;break;case 6:if(!(c&&c.serverId||"MARKER"===a.layerType||"HOSTED_TILE"===a.layerType||f)){e.next=17;break}if(p=a.dataSource,(h=p?p.serverId:a.serverId)||f){e.next=14;break}return e.next=11,n.addLayer(a,null,s);case 11:return n.layerAdded++,n.sendMapToUser(i),e.abrupt("return",{v:void 0});case 14:"MARKER"===a.layerType||p&&(!p.accessType||"DIRECT"===p.accessType)||f?(y=f?"".concat(n.server,"apps/dataviz/libs/sample-datas/").concat(p.name,".json"):"".concat(n.server,"web/datas/").concat(h,"/content.json?pageSize=9999999¤tPage=1"),y=n.getRequestUrl(y),vn.get(y,null,{withCredentials:l.withCredentials}).then(function(e){return e.json()}).then(function(){var e=XZ(WZ().mark(function e(t){var r,u,l,c,f;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.succeed){e.next=5;break}return n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(t.error,"getLayerFaild",n.map),e.abrupt("return");case 5:if(!t||!t.type){e.next=29;break}if("JSON"!==t.type&&"GEOJSON"!==t.type){e.next=11;break}t.content=t.content.type?t.content:JSON.parse(t.content),o=n.geojsonToFeature(t.content,a),e.next=25;break;case 11:if("EXCEL"!==t.type&&"CSV"!==t.type){e.next=24;break}if(!a.dataSource||!a.dataSource.administrativeInfo){e.next=19;break}t.content.rows.unshift(t.content.colTitles),r=a.dataSource.administrativeInfo,u=r.divisionType,l=r.divisionField,c=n.excelData2FeatureByDivision(t.content,u,l),o=n._parseGeoJsonData2Feature({allDatas:{features:c.features},fileCode:a.projection}),e.next=22;break;case 19:return e.next=21,n.excelData2Feature(t.content,a);case 21:o=e.sent;case 22:e.next=25;break;case 24:"SHP"===t.type&&(f=JSON.parse(t.content),t.content=f.layers[0],o=n.geojsonToFeature(t.content,a));case 25:return e.next=27,n.addLayer(a,o,s);case 27:n.layerAdded++,n.sendMapToUser(i);case 29:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(e,"getLayerFaild",n.map)})):(d="HOSTED_TILE"===a.layerType,b=p?p.serverId:a.serverId,n.checkUploadToRelationship(b).then(function(e){if(e&&e.length>0){var t=e[0].name,r=e[0].type.toUpperCase();n.getDataService(b,t).then(function(){var e=XZ(WZ().mark(function e(o){var u,l;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==(u=o.dataItemServices).length){e.next=6;break}return n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(null,"getLayerFaild",n.map),e.abrupt("return");case 6:if(!d){e.next=11;break}l=n.getService(u,"RESTDATA"),n.isMvt(l.address,t).then(function(){var e=XZ(WZ().mark(function e(o){return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.getServiceInfoFromLayer(s,i,a,u,t,r,o);case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(XZ(WZ().mark(function e(){return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.getServiceInfoFromLayer(s,i,a,u,t,r);case 2:case"end":return e.stop()}},e)}))),e.next=13;break;case 11:return e.next=13,n.getServiceInfoFromLayer(s,i,a,u,t,r);case 13:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())}else n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(null,"getLayerFaild",n.map)}).catch(function(e){n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(e,"getLayerFaild",n.map)})),e.next=18;break;case 17:c&&"USER_DATA"===c.type?n.addGeojsonFromUrl(a,i,s,!1):"TILE"===a.layerType?n.getTileLayerExtent(a,function(e){n.map.addLayer(n.createBaseLayer(e,s)),n.layerAdded++,n.sendMapToUser(i)},function(e){n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(e,"getLayerFaild",n.map)}):"SUPERMAP_REST"===a.layerType||"WMS"===a.layerType||"WMTS"===a.layerType?"WMTS"===a.layerType?n.getWmtsInfo(a,function(e){n.map.addLayer(n.createBaseLayer(e,s)),n.layerAdded++,n.sendMapToUser(i)}):"WMS"===a.layerType?n.getWmsInfo(a).then(function(){n.map.addLayer(n.createBaseLayer(a,s)),n.layerAdded++,n.sendMapToUser(i)}):(a.projection=n.baseProjection,n.map.addLayer(n.createBaseLayer(a,s)),n.layerAdded++,n.sendMapToUser(i)):c&&"REST_DATA"===c.type?n.getFeaturesFromRestData(a,s,i):c&&"REST_MAP"===c.type&&c.url?rJ(c.url,c.layerName,"smid=1",null,null,function(e){var t=e&&e.result.recordsets,r=t&&t[0],o=r.fields;if(r&&o){var u=[];for(var l in o){var c=o[l];0===c.indexOf("Sm")&&"SmID"!==c||u.push(c)}n.getFeatures(u,a,function(){var e=XZ(WZ().mark(function e(t){return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.addLayer(a,t,s);case 2:n.layerAdded++,n.sendMapToUser(i);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),function(e){n.layerAdded++,n.errorCallback&&n.errorCallback(e,"getFeatureFaild",n.map)})}},function(e){n.errorCallback&&n.errorCallback(e,"getFeatureFaild",n.map)}):"DATAFLOW_POINT_TRACK"!==a.layerType&&"DATAFLOW_HEAT"!==a.layerType||n.getDataflowInfo(a,XZ(WZ().mark(function e(){return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.addLayer(a,o,s);case 2:n.layerAdded++,n.sendMapToUser(i);case 4:case"end":return e.stop()}},e)})),function(e){n.layerAdded++,n.errorCallback&&n.errorCallback(e,"getFeatureFaild",n.map)});case 18:case"end":return e.stop()}},e)}),u=0;case 6:if(!(u3&&void 0!==arguments[3]?arguments[3]:this.withCredentials,o=e.dataSource.url,i=this;vn.get(o,null,{withCredentials:n,withoutFormatSuffix:!0}).then(function(e){return e.json()}).then(function(){var n=XZ(WZ().mark(function n(o){var a,s,u,l,c,f;return WZ().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(o&&!1!==o.succeed){n.next=3;break}return t?i.errorCallback&&i.errorCallback(o.error,"autoUpdateFaild",i.map):(i.layerAdded++,i.sendMapToUser(t),i.errorCallback&&i.errorCallback(o.error,"getLayerFaild",i.map)),n.abrupt("return");case 3:if("CSV"!==o.type&&"EXCEL"!==o.type){n.next=16;break}if(!e.dataSource||!e.dataSource.administrativeInfo){n.next=11;break}o.content.rows.unshift(o.content.colTitles),s=e.dataSource.administrativeInfo,u=s.divisionType,l=s.divisionField,c=i.excelData2FeatureByDivision(o.content,u,l),a=i._parseGeoJsonData2Feature({allDatas:{features:c.features},fileCode:e.projection}),n.next=14;break;case 11:return n.next=13,i.excelData2Feature(o.content,e);case 13:a=n.sent;case 14:n.next=18;break;case 16:f=o.content?JSON.parse(o.content):o,a=i.geojsonToFeature(f,e);case 18:if(!t){n.next=25;break}return n.next=21,i.addLayer(e,a,r);case 21:i.layerAdded++,i.sendMapToUser(t),n.next=29;break;case 25:return i.map.removeLayer(e.layer),e.labelLayer&&i.map.removeLayer(e.labelLayer),n.next=29,i.addLayer(e,a,r);case 29:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){i.layerAdded++,i.sendMapToUser(t),i.errorCallback&&i.errorCallback(e,"getLayerFaild",i.map)})}},{key:"getServiceInfoFromLayer",value:function(){var e=XZ(WZ().mark(function e(t,r,n,o,i,a,s){var u,l,c,f,p,h;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:u=this,l=s?!s.isMvt:"HOSTED_TILE"===n.layerType,c=!1,f=WZ().mark(function e(){var f,p;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(f=o[h],!c){e.next=3;break}return e.abrupt("return",{v:void 0});case 3:if(!f||!l||"RESTMAP"!==f.serviceType){e.next=8;break}c=!0,u.getTileLayerInfo(f.address).then(function(e){e.forEach(function(e){var o=e.bounds;n.layerType="TILE",n.orginEpsgCode=u.baseProjection,n.units=e.coordUnit&&e.coordUnit.toLowerCase(),n.extent=[o.left,o.bottom,o.right,o.top],n.visibleScales=e.visibleScales,n.url=e.url,n.sourceType="TILE",u.map.addLayer(u.createBaseLayer(n,t)),u.layerAdded++,u.sendMapToUser(r)})}),e.next=24;break;case 8:if(!f||l||"RESTDATA"!==f.serviceType){e.next=24;break}if(c=!0,!s||!s.isMvt){e.next=22;break}return p=s.bounds,n=Object.assign(n,{layerType:"VECTOR_TILE",epsgCode:s.epsgCode,projection:"EPSG:".concat(s.epsgCode),bounds:p,extent:[p.left,p.bottom,p.right,p.top],name:n.name,url:s.url,visible:n.visible,featureType:a,serverId:n.serverId.toString()}),e.t0=u.map,e.next=16,u.addVectorTileLayer(n,t,"RESTDATA");case 16:e.t1=e.sent,e.t0.addLayer.call(e.t0,e.t1),u.layerAdded++,u.sendMapToUser(r),e.next=24;break;case 22:c=!0,u.getDatasources(f.address).then(function(e){n.dataSource.dataSourceName=e+":"+i,n.dataSource.url="".concat(f.address,"/data"),u.getFeaturesFromRestData(n,t,r)});case 24:case"end":return e.stop()}},e)}),h=0;case 4:if(!(h-1?w[k+"_1"]=g[P]:w[k]=g[P];case 33:P++,e.next=27;break;case 36:j=new(PD())({geometry:_,attributes:w}),l.push(j);case 38:v++,e.next=21;break;case 41:return e.abrupt("return",Promise.resolve(l));case 42:case"end":return e.stop()}},e,this,[[4,17]])}));return function(t,r){return e.apply(this,arguments)}}()},{key:"excelData2FeatureByDivision",value:function(e,t,r){var n;if("Province"===t?n=window.ProvinceData:"City"===t?n=window.MunicipalData:"GB-T_2260"===t&&(n=window.AdministrativeArea),n)return this.changeExcel2Geojson(n.features,e.rows,t,r)}},{key:"_parseGeoJsonData2Feature",value:function(e){for(var t=e.allDatas.features,r=[],n=0,o=t.length;n-1||y._smiportal_imgLinkUrl.indexOf("https://")>-1?d=y._smiportal_imgLinkUrl:void 0!==y._smiportal_imgLinkUrl&&null!==y._smiportal_imgLinkUrl&&""!==y._smiportal_imgLinkUrl&&(d="".concat(jD.getIPortalUrl(),"resources/markerIcon/").concat(y._smiportal_imgLinkUrl)),c={dataViz_description:y._smiportal_description,dataViz_imgUrl:d,dataViz_title:y._smiportal_title,dataViz_url:y._smiportal_otherLinkUrl},h.anchor=[.5,1],h.src=h.externalGraphic,f=h,p=Object.assign({},{attributes:c},{useStyle:f}),delete y._smiportal_description,delete y._smiportal_imgLinkUrl,delete y._smiportal_title,delete y._smiportal_otherLinkUrl}else p={attributes:a};s.setProperties(p),n.push(s)}return n}},{key:"parseGeoJsonData2Feature",value:function(e){for(var t=e.allDatas.features,r=[],n=0,o=t.length;n-1?(t.strokeColor="#4CC8A3",t.strokeWidth=2):["REGION","POLYGON","MULTIPOLYGON"].indexOf(e)>-1&&(t.fillColor="#826DBA"),t}},{key:"getFiterFeatures",value:function(e,t){for(var r=this.parseFilterCondition(e),n=[],o=0;o0&&n.push(i)}return n}},{key:"parseFilterCondition",value:function(e){return e.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=").replace(/\(?[^\(]+?\s*in\s*\([^\)]+?\)\)?/gi,function(e){var t=e.match(/([^(]+?)\s*in\s*\(([^)]+?)\)/i);return 3===t.length?"(".concat(t[2].split(",").map(function(e){return"".concat(t[1]," == ").concat(e.trim())}).join(" || "),")"):e})}},{key:"createGraphicLayer",value:function(){var e=XZ(WZ().mark(function e(t,r){var n,o;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.filterCondition?this.getFiterFeatures(t.filterCondition,r):r,e.next=3,this.getGraphicsFromFeatures(r,t.style,t.featureType);case 3:return n=e.sent,o=new Rz({graphics:n,render:"canvas",map:this.map,isHighLight:!1}),e.abrupt("return",new EZ.Image({source:o}));case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getGraphicsFromFeatures",value:function(){var e=XZ(WZ().mark(function e(t,r,n){var o,i,a,s,u;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ZD.getOpenlayersStyle(r,n);case 2:for(s in o=e.sent,i=o.getImage(),a=[],t)(u=new mz(t[s].getGeometry())).setStyle(i),u.setProperties({attributes:t[s].get("attributes")}),a.push(u);return e.abrupt("return",a);case 7:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"createSymbolLayer",value:function(e,t){var r=ZD.getSymbolStyle(e.style);return new EZ.Vector({style:r,source:new(gD())({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1}),renderMode:"image"})}},{key:"addLabelLayer",value:function(e,t){var r=e.labelStyle,n=this.getLabelStyle(r,e),o=e.labelLayer=new EZ.Vector({declutter:!0,styleOL:n,labelField:r.labelField,source:new(gD())({features:t,wrapX:!1})});o.setStyle(function(e){var t=r.labelField,n=e.get("attributes")[t.trim()]+"";if("undefined"===n)return null;var i=o.get("styleOL"),a=i.getText();return a&&a.setText&&a.setText(n),i}),this.map.addLayer(o),o.setVisible(e.visible),o.setZIndex(1e3);var i=e.visibleScale;return i&&this.setVisibleScales(o,i),o}},{key:"setVisibleScales",value:function(e,t){var r=this.resolutions[t.minScale],n=this.resolutions[t.maxScale];r>1?e.setMaxResolution(Math.ceil(r)):e.setMaxResolution(1.1*r),e.setMinResolution(n)}},{key:"getLabelStyle",value:function(e,t){var r=t.style||t.pointStyle,n=r.radius,o=void 0===n?0:n,i=r.strokeWidth,a=-(o+(void 0===i?0:i)),s=e.fontSize,u=void 0===s?"14px":s,l=e.fontFamily,c=e.fill,f=e.backgroundFill,p=e.offsetX,h=void 0===p?0:p,y=e.offsetY,d=void 0===y?a:y,b=e.placement,v=void 0===b?"point":b,m=e.textBaseline,g=void 0===m?"bottom":m,w=e.textAlign,O=void 0===w?"center":w,S=e.outlineColor,_=void 0===S?"#000000":S,P=e.outlineWidth,x=void 0===P?0:P,k={font:"".concat(u," ").concat(l),placement:v,textBaseline:g,fill:new(GD())({color:c}),backgroundFill:new(GD())({color:f}),padding:[3,3,3,3],offsetX:"POINT"===t.featureType?h:0,offsetY:"POINT"===t.featureType?d:0,overflow:!0,maxAngle:0};return"POINT"===t.featureType&&(k.textAlign=O),x>0&&(k.stroke=new(VD())({color:_,width:x})),new(LD())({text:new(zD())(k)})}},{key:"createVectorLayer",value:function(){var e=XZ(WZ().mark(function e(t,r){var n,o,i,a,s,u;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.featureType,o=t.style,"LINE"!==n||!jD.isArray(o)||2!==o.length){e.next=6;break}a=JZ(o,2),s=a[0],u=a[1],i=u.lineDash&&"solid"!==u.lineDash?ZD.getPathway(u,s):ZD.getRoadPath(u,s),e.next=10;break;case 6:return jD.isArray(o)&&(t.style=o[0]),e.next=9,ZD.toOpenLayersStyle(t.style,t.featureType);case 9:i=e.sent;case 10:return e.abrupt("return",new EZ.Vector({style:i,source:new(gD())({features:t.filterCondition?this.getFiterFeatures(t.filterCondition,r):r,wrapX:!1})}));case 11:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"createHeatLayer",value:function(e,t){t=e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t;var r={source:new(gD())({features:t,wrapX:!1})},n=e.themeSetting;r.gradient=n.colors.slice(),r.radius=parseInt(n.radius);var o=n.customSettings;for(var i in o)r.gradient[i]=o[i];return n.weight&&this.changeWeight(t,n.weight),new EZ.Heatmap(r)}},{key:"changeWeight",value:function(e,t){var r=this;this.fieldMaxValue={},this.getMaxValue(e,t);var n=this.fieldMaxValue[t];e.forEach(function(e){var o=e.get("attributes");try{var i=o[t];e.set("weight",i/n)}catch(e){r.errorCallback&&r.errorCallback(e)}})}},{key:"getMaxValue",value:function(e,t){var r,n=[],o=this,i=t;this.fieldMaxValue[i]||(e.forEach(function(e){r=e.get("attributes");try{n.push(parseFloat(r[i]))}catch(e){o.errorCallback&&o.errorCallback(e)}}),this.fieldMaxValue[i]=rT.getArrayStatistic(n,"Maximum"))}},{key:"createUniqueLayer",value:function(){var e=XZ(WZ().mark(function e(t,r){var n,o;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.createUniqueSource(t,r);case 2:return n=e.sent,(o=new EZ.Vector({styleSource:n,source:new(gD())({features:t.filterCondition?this.getFiterFeatures(t.filterCondition,r):r,wrapX:!1})})).setStyle(function(e){var t=o.get("styleSource"),r=t.themeField,n=e.get("attributes")[r];return t.styleGroups.find(function(e){return e.value===n}).olStyle}),e.abrupt("return",o);case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"createUniqueSource",value:function(){var e=XZ(WZ().mark(function e(t,r){var n;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getUniqueStyleGroup(t,r);case 2:return n=e.sent,e.abrupt("return",{map:this.map,style:t.style,isHoverAble:t.isHoverAble,highlightStyle:t.highlightStyle,themeField:t.themeSetting.themeField,styleGroups:n});case 4:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getUniqueStyleGroup",value:function(){var e=XZ(WZ().mark(function e(t,r){var n,o,i,a,s,u,l,c,f,p,h,y,d,b,v,m,g,w,O,S,_;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t.featureType,o=t.style,i=t.themeSetting,a=i.themeField,s=[],u=i.customSettings,e.t0=WZ().keys(r);case 4:if((e.t1=e.t0()).done){e.next=20;break}l=e.t1.value,c=r[l].get("attributes"),f=c[a],p=!1,e.t2=WZ().keys(s);case 10:if((e.t3=e.t2()).done){e.next=17;break}if(h=e.t3.value,s[h]!==f){e.next=15;break}return p=!0,e.abrupt("break",17);case 15:e.next=10;break;case 17:p||s.push(f),e.next=4;break;case 20:y=[],d=this.getCustomSettingColors(u,n).map(function(e){return e.toLowerCase()}),b=this.getUniqueColors(i.colors||this.defaultParameters.themeSetting.colors,s.length+Object.keys(u).length).map(function(e){return e.toLowerCase()}),v=UZ()(b,d),m=0;case 25:if(!(m=i[a].start&&n<=i[a].end)return i[a].olStyle}else if(n>i[a].start&&n<=i[a].end)return i[a].olStyle}),e.abrupt("return",o);case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"createRangeSource",value:function(){var e=XZ(WZ().mark(function e(t,r){var n;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRangeStyleGroup(t,r);case 2:if(!(n=e.sent)){e.next=7;break}return e.abrupt("return",{style:t.style,themeField:t.themeSetting.themeField,styleGroups:n});case 7:return e.abrupt("return",!1);case 8:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getRangeStyleGroup",value:function(){var e=XZ(WZ().mark(function e(t,r){var n,o,i,a,s,u,l,c,f,p,h,y,d,b,v,m,g,w,O,S,_,P,x,k,j;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t.featureType,o=t.themeSetting,i=t.style,a=o.segmentCount,s=o.segmentMethod,u=o.colors,l=o.customSettings,c=o.themeField,f=[],h=a,y=s,d=this,r.forEach(function(e){p=e.get("attributes");try{if(p){var t=p[c.trim()];void 0!==t&&null!==t&&jD.isNumber(t)&&f.push(parseFloat(t))}else e.get(c)&&jD.isNumber(e.get(c))&&e.get(c)&&f.push(parseFloat(e.get(c)))}catch(e){d.errorCallback&&d.errorCallback(e)}});try{b=rT.getArraySegments(f,y,h)}catch(e){d.errorCallback&&d.errorCallback(e)}if(!b){e.next=33;break}for(m in v=h,p&&b[0]===b[p.length-1]&&(v=1,b.length=2),b)g=b[m],g=0===Number(m)?Math.floor(100*g)/100:Math.ceil(100*g)/100+.1,b[m]=Number(g.toFixed(2));for(w=u,w=eT.getGradientColors(w,v,"RANGE"),O=0;O0&&d.addDataflowFeature(o,t.identifyField,{dataflowSource:i,featureCache:e,labelSource:s,labelFeatureCache:r,pathSource:l,pathFeatureCache:n,maxPointCount:t.maxPointCount})}else d.addDataflowFeature(o,t.identifyField,{dataflowSource:i,featureCache:e,labelSource:s,labelFeatureCache:r,pathSource:l,pathFeatureCache:n,maxPointCount:t.maxPointCount})}}(p,h,y)),this.setFeatureStyle(c,t.directionField,n.type),e.abrupt("return",c);case 21:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"addDataflowFeature",value:function(e,t,r){r.dataflowSource&&this.addFeatureFromDataflowService(r.dataflowSource,e,t,r.featureCache),r.labelSource&&this.addFeatureFromDataflowService(r.labelSource,e,t,r.labelFeatureCache),r.pathSource&&this.addPathFeature(r.pathSource,e,t,r.pathFeatureCache,r.maxPointCount)}},{key:"addPathFeature",value:function(e,t,r,n,o){var i=[],a=t.get(r);n[a]?((i=n[a].getGeometry().getCoordinates()).push(t.getGeometry().getCoordinates()),o&&i.length>o&&i.splice(0,i.length-o),n[a].getGeometry().setCoordinates(i)):(i.push(t.getGeometry().getCoordinates()),n[a]=new(PD())({geometry:new MZ.LineString(i)}),e.addFeature(n[a]))}},{key:"setFeatureStyle",value:function(e,t,r){var n=e.get("styleOL");e.setStyle(function(e){var o,i;if((o=void 0!==t&&"未设置"!==t&&"None"!==t?e.get("attributes")[t]:0)>360||o<0)return null;i="SYMBOL_POINT"===r?n.getText():n.getImage();var a=Math.PI*o/180;return i&&i.setRotation(a),n})}},{key:"createDataflowHeatLayer",value:function(e){var t={source:this.createDataflowHeatSource(e)};if(t.gradient=e.themeSetting.colors.slice(),t.radius=parseInt(e.themeSetting.radius),e.themeSetting.customSettings){var r=e.themeSetting.customSettings;for(var n in r)t.gradient[n]=r[n]}return new EZ.Heatmap(t)}},{key:"createDataflowHeatSource",value:function(e){var t=this,r=new(gD())({wrapX:!1});return this.createDataflowService(e,function(n){return function(o){if(e.filterCondition){var i=t.parseFilterCondition(e.filterCondition),a=o.get("attributes"),s=IV(i,Object.keys(a)),u=NV(a),l="select * from json where ("+s+")",c=window.jsonsql.query(l,{attributes:u});c&&c.length>0&&t.addDataflowFeature(o,e.identifyField,{dataflowSource:r,featureCache:n})}else t.addDataflowFeature(o,e.identifyField,{dataflowSource:r,featureCache:n});e.themeSetting.weight&&t.changeWeight(r.getFeatures(),e.themeSetting.weight)}}({})),r}},{key:"addFeatureFromDataflowService",value:function(e,t,r,n){var o=t.get(r);void 0!==o&&n[o]?(n[o].setGeometry(t.getGeometry()),n[o].setProperties(t.getProperties()),e.changed()):(e.addFeature(t),n[o]=t)}},{key:"createDataflowService",value:function(e,t){var r=this,n=new cJ(e.wsUrl).initSubscribe();n.on("messageSucceeded",function(n){var o=JSON.parse(n.value.data),i=tK.readFeature(o,{dataProjection:e.projection||"EPSG:4326",featureProjection:r.baseProjection||"EPSG:4326"});i.setProperties({attributes:o.properties}),t(i)}),e.dataflowService=n}},{key:"setEachFeatureDefaultStyle",value:function(){var e=XZ(WZ().mark(function e(t){var r,n,o,i,a,s;return WZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=this,t=jD.isArray(t)||t instanceof BZ()?t:[t],n=0;case 3:if(!(n=i[a].start&&n0&&r>0&&"EPSG:".concat(e.substring(t,r).split(",")[1].substr(1))}},{key:"createMigrationLayer",value:function(e,t){window.ol3Echarts.prototype.getContainer||(window.ol3Echarts.prototype.getContainer=function(){return this.$container}),window.ol3Echarts.prototype.setVisible||(window.ol3Echarts.prototype.setVisible=function(e){if(e){var t=this.get("options");t&&(this.setChartOptions(t),this.unset("options"))}else{var r=this.getChartOptions();this.set("options",r),this.clear(),this.setChartOptions({})}}),window.ol3Echarts.prototype.setZIndex||(window.ol3Echarts.prototype.setZIndex=function(e){var t=this.getContainer();t&&(t.style.zIndex=e)}),window.ol3Echarts.prototype.setCursor||(window.ol3Echarts.prototype.setCursor=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=this.getContainer();t&&"default"===e&&t.classList.add("cursor-default")});var r=eJ(t),n=this.createLinesData(e,r),o=this.createPointsData(n,e,r),i=this.createOptions(e,n,o),a=new window.ol3Echarts(i,{hideOnMoving:!1,hideOnZooming:!1,forcedPrecomposeRerender:!0});return a.type="ECHARTS",a}},{key:"createOptions",value:function(e,t,r){var n,o=this.createLineSeries(e,t);if(r&&r.length){var i=this.createPointSeries(e,r);n=o.concat(i)}else n=o.slice();return{series:n}}},{key:"createLineSeries",value:function(e,t){var r=e.lineSetting,n=e.animationSetting,o=[{name:"line-series",type:"lines",zlevel:1,silent:!0,effect:{show:n.show,constantSpeed:n.constantSpeed,trailLength:0,symbol:n.symbol,symbolSize:n.symbolSize},lineStyle:{normal:{color:r.color,type:r.type,width:r.width,opacity:r.opacity,curveness:r.curveness}},data:t}];return t.length>1e3&&(o[0].blendMode="lighter"),o}},{key:"createPointSeries",value:function(e,t){var r=e.lineSetting,n=e.animationSetting,o=e.labelSetting,i=[{name:"point-series",coordinateSystem:"geo",zlevel:2,silent:!0,label:{normal:{show:o.show,position:"right",formatter:"{b}",color:o.color,fontFamily:o.fontFamily}},itemStyle:{normal:{color:r.color||o.color}},data:t}];return n.show?(i[0].type="effectScatter",i[0].rippleEffect={brushType:"stroke"}):i[0].type="scatter",i}},{key:"createPointsData",value:function(e,t,r){var n=[],o=t.labelSetting;if(!o.show||!e.length)return n;var i=[],a=[];return e.forEach(function(e,t){var n=e.coords,s=n[0],u=n[1],l=r[t][o.from],c=r[t][o.to];!i.find(function(e){return e.value[0]===s[0]&&e.value[1]===s[1]})&&i.push({name:l,value:s}),!a.find(function(e){return e.value[0]===u[0]&&e.value[1]===u[1]})&&a.push({name:c,value:u})}),n=i.concat(a)}},{key:"createLinesData",value:function(e,t){var r=[];if(t&&t.length){var n,o,i=e.from,a=e.to;if("XY_FIELD"===i.type&&i.xField&&i.yField&&a.xField&&a.yField)t.forEach(function(e){var t=e[i.xField],s=e[i.yField],u=e[a.xField],l=e[a.yField];t&&s&&u&&l&&(n=[e[i.xField],e[i.yField]],o=[e[a.xField],e[a.yField]],r.push({coords:[n,o]}))});else if("PLACE_FIELD"===i.type&&i.field&&a.field){var s=mZ.concat(gZ);t.forEach(function(e){var t=e[i.field],u=e[a.field];n=s.find(function(e){return jD.isMatchAdministrativeName(e.name,t)}),o=s.find(function(e){return jD.isMatchAdministrativeName(e.name,u)}),n&&o&&r.push({coords:[n.coord,o.coord]})})}}return r}},{key:"getService",value:function(e,t){return e.filter(function(e){return e&&e.serviceType===t})[0]}},{key:"isMvt",value:function(e,t){var r=this;return this.getDatasetsInfo(e,t).then(function(e){return e.epsgCode==r.baseProjection.split("EPSG:")[1]?vn.get(r.getRequestUrl("".concat(e.url,"/tilefeature.mvt")),null,{withCredentials:r.withCredentials}).then(function(e){return e.json()}).then(function(t){return e.isMvt=t.error&&400===t.error.code,e}).catch(function(){return e}):e})}},{key:"getDatasetsInfo",value:function(e,t){var r=this;return r.getDatasources(e).then(function(n){var o="".concat(e,"/data/datasources/").concat(n,"/datasets/").concat(t,".json");return vn.get(r.getRequestUrl(o),null,{withCredentials:r.withCredentials}).then(function(e){return e.json()}).then(function(e){return{epsgCode:e.datasetInfo.prjCoordSys.epsgCode,bounds:e.datasetInfo.bounds,url:o}})})}},{key:"isRestMapMapboxStyle",value:function(e){var t=e.dataSource,r=e.layerType;return!(!(t&&"EXTERNAL"===t.type&&t.url.indexOf("/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY")>-1)||"MAPBOXSTYLE"!==r&&"VECTOR_TILE"!==r)}},{key:"getMapboxStyleLayerInfo",value:function(e,t){var r=this;return new Promise(function(n,o){return r.getMapLayerExtent(t).then(function(t){return r.getMapboxStyle(e,t).then(function(e){Object.assign(t,e),n(t)}).catch(function(e){o(e)})}).catch(function(e){o(e)})})}},{key:"getMapLayerExtent",value:function(e){var t=e.dataSource.url;this.isRestMapMapboxStyle(e)&&(t=t.replace("/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY","")),t=this.getRequestUrl(t+".json");var r,n,o=e.credential;return o&&(r=o[n=Object.keys(o)[0]],t="".concat(t,"?").concat(n,"=").concat(r)),vn.get(t,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(function(t){return e.visibleScales=t.visibleScales,e.coordUnit=t.coordUnit,e.scale=t.scale,e.epsgCode=t.prjCoordSys.epsgCode,e.bounds=t.bounds,e}).catch(function(e){throw e})}},{key:"getMapboxStyle",value:function(e,t){var r=this,n=t.url||t.dataSource.url,o=n;o.indexOf("/restjsr/")>-1&&(o="".concat(o,"/style.json")),o=this.getRequestUrl(o);var i,a,s=t.credential;return s&&(a=Object.keys(s)[0],i=s[a],o="".concat(o,"?").concat(a,"=").concat(i)),vn.get(o,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(function(o){r._matchStyleObject(o);var s=t.bounds;if(i){o.sprite="".concat(o.sprite,"?").concat(a,"=").concat(i);var u=o.sources;Object.keys(u).forEach(function(e){o.sources[e].tiles.forEach(function(t,r){o.sources[e].tiles[r]="".concat(t,"?").concat(a,"=").concat(i)})})}var l={url:n,sourceType:"VECTOR_TILE",layerType:"VECTOR_TILE",styles:o,extent:s&&[s.left,s.bottom,s.right,s.top],bounds:t.bounds,projection:"EPSG:"+t.epsgCode,epsgCode:t.epsgCode,name:t.name};return Object.assign(t,l),t.zIndex>0&&r.modifyMapboxstyleLayer(e,t),t}).catch(function(e){return e})}},{key:"modifyMapboxstyleLayer",value:function(e,t){var r=this;if(!e.layers||0!==e.layers.length){var n=t.styles.layers;if(n){n=n.filter(function(e){return"background"!==e.type}),t.styles.layers=n;var o=e.layers.filter(function(e){return"VECTOR_TILE"===e.layerType&&e.zIndex!==t.zIndex}).map(function(e){return e.styles&&e.styles.layers});!o||o&&0===o.length||o.forEach(function(e){n.forEach(function(t){r.renameLayerId(e,t)})})}}}},{key:"renameLayerId",value:function(e,t){if(e.find(function(e){return e.id===t.id})){var r=t.id.match(/(.+)\((\w)\)$/);r?t.id="".concat(r[1],"(").concat(+r[2]+1,")"):t.id+="(1)",e.find(function(e){return e.id===t.id})&&this.renameLayerId(e,t)}}},{key:"_matchStyleObject",value:function(e){var t=e.sprite,r=e.glyphs;t&&"object"===VZ(t)&&(e.sprite=Object.values(t)[0]),r&&"object"===VZ(r)&&(e.glyphs=Object.values(r)[0])}},{key:"isIportalProxyServiceUrl",value:function(e){if(this.serviceProxy&&this.serviceProxy.enable&&e){var t="";return this.serviceProxy.proxyServerRootUrl?t="".concat(this.serviceProxy.proxyServerRootUrl,"/"):this.serviceProxy.rootUrlPostfix?t="".concat(this.serviceProxy.port,"/").concat(this.serviceProxy.rootUrlPostfix,"/"):this.serviceProxy.rootUrlPostfix||(t="".concat(this.serviceProxy.port,"/")),80!==this.serviceProxy.port?e.indexOf(t)>=0:e.indexOf(t)>=0||e.indexOf(t.replace(":80",""))>=0}return!1}},{key:"getStyleResolutions",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:22,n=[],o=Math.abs(e.left-e.right)/512,i=t;i<=r;i++)0!==i?(o/=2,n[i]=o):n[i]=o;return n}},{key:"createVisibleResolution",value:function(e,t,r,n){var o=this,i=[];if(e&&e.length>0)i=e.map(function(e){var t=1/e;return o.getResFromScale(t,n)});else{var a=this.getEnvelope(t,r);i=this.getStyleResolutions(a)}return i}},{key:"getEnvelope",value:function(e,t){var r={};return e&&4===e.length?(r.left=e[0],r.bottom=e[1],r.right=e[2],r.top=e[3]):r=t,r}},{key:"createMVTLayer",value:function(e){var t=e.styles,r=t&&t.metadata&&t.metadata.indexbounds,n=this.createVisibleResolution(e.visibleScales,r,e.bounds,e.coordUnit),o=this.getEnvelope(r,e.bounds),i=this.getStyleResolutions(o),a=this.isIportalProxyServiceUrl(t.sprite),s=new eX({style:t,source:t.name,resolutions:i,map:this.map,withCredentials:a});return new Promise(function(r){s.on("styleloaded",function(){var o=n[n.length-1],i=n[0],u=new EZ.VectorTile({declutter:!0,source:new $q({style:t,withCredentials:a,projection:e.projection,format:new(Hq())({featureClass:DZ()}),wrapX:!1}),style:s.featureStyleFuntion,visible:e.visible,zIndex:e.zIndex,opacity:e.opacity,minResolution:o,maxResolution:i>1?Math.ceil(i):1.1*i});r(u)})})}},{key:"isSupportWebp",value:function(e,t){var r;return!(this.isIE()||this.isFirefox()&&this.getFirefoxVersion()<65||this.isChrome()&&this.getChromeVersion()<32)&&(e=t?"".concat(e,"/tileImage.webp?token=").concat(t):"".concat(e,"/tileImage.webp"),r=!(ye.isInTheSameDomain(e)&&!t),e=this.getRequestUrl(e,r),vn.get(e,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0}).then(function(e){if(200!==e.status)throw e.status;return e}).then(function(){return!0}).catch(function(){return!1}))}},{key:"isIE",value:function(){return!!(window.ActiveXObject||"ActiveXObject"in window)}},{key:"isFirefox",value:function(){return navigator.userAgent.indexOf("Firefox")>-1}},{key:"isChrome",value:function(){return navigator.userAgent.indexOf("Chrome")>-1}},{key:"getFirefoxVersion",value:function(){return+navigator.userAgent.toLowerCase().match(/firefox\/([\d.]+)/)[1]}},{key:"getChromeVersion",value:function(){return+navigator.userAgent.toLowerCase().match(/chrome\/([\d.]+)/)[1]}},{key:"addGraticule",value:function(e){if(this.isHaveGraticule){this.createGraticuleLayer(e.grid.graticule),this.layerAdded++;var t=e.layers?e.layers.length:0;this.sendMapToUser(t)}}},{key:"createGraticuleLayer",value:function(e){var t=e.strokeColor,r=e.strokeWidth,n=e.lineDash,o=e.extent,i=e.visible,a=e.interval,s=e.lonLabelStyle,u=e.latLabelStyle,l=this.baseProjection,c=new JN.get(l);c.setExtent(o),c.setWorldExtent(JN.transformExtent(o,l,"EPSG:4326"));var f={layerID:"graticule_layer",strokeStyle:new(VD())({color:t,width:r,lineDash:n}),extent:o,visible:i,intervals:a,showLabels:!0,zIndex:9999,wrapX:!1,targetSize:0};s&&(f.lonLabelStyle=new(zD())({font:"".concat(s.fontSize," ").concat(s.fontFamily),textBaseline:s.textBaseline,fill:new(GD())({color:s.fill}),stroke:new(VD())({color:s.outlineColor,width:s.outlineWidth})})),u&&(f.latLabelStyle=new(zD())({font:"".concat(u.fontSize," ").concat(u.fontFamily),textBaseline:u.textBaseline,fill:new(GD())({color:u.fill}),stroke:new(VD())({color:u.outlineColor,width:u.outlineWidth})}));var p=new EZ.Graticule(f);this.map.addLayer(p)}},{key:"getLang",value:function(){if(this.getCookie("language")){var e=this.getCookie("language");return this.formatCookieLang(e)}return navigator.language||navigator.browserLanguage}},{key:"getCookie",value:function(e){e=e.toLowerCase();var t=null;return document.cookie.split(";").forEach(function(r){var n=r.split("=");n[0].toLowerCase().trim()!==e||(t=n[1].trim())}),t}},{key:"formatCookieLang",value:function(e){var t;switch(e){case"zh":t="zh-CN";break;case"ar":t="ar-EG";break;case"bg":t="bg-BG";break;case"ca":t="ca-ES";break;case"cs":t="cs-CZ";break;case"da":t="da-DK";break;case"de":t="de-DE";break;case"el":t="el-GR";break;case"es":t="es-ES";break;case"et":t="et-EE";break;case"fa":t="fa-IR";break;case"fl":t="fi-FI";break;case"fr":t="fr-FR";break;case"he":t="he-IL";break;case"hu":t="hu-HU";break;case"id":t="id-ID";break;case"is":t="is-IS";break;case"it":t="it-IT";break;case"ja":t="ja-JP";break;case"ko":t="ko-KR";break;case"ku":t="ku-IQ";break;case"mn":t="mn-MN";break;case"nb":t="nb-NO";break;case"ne":t="ne-NP";break;case"nl":t="nl-NL";break;case"pl":t="pl-PL";break;case"pt":t="pt-PT";break;case"ru":t="ru-RU";break;case"sk":t="sk-SK";break;case"sl":t="sl-SI";break;case"sr":t="sr-RS";break;case"sv":t="sv-SE";break;case"th":t="th-TH";break;case"tr":t="tr-TR";break;case"uk":t="uk-UA";break;case"vi":t="vi-VN";break;default:t="en-US"}return t}},{key:"isCustomProjection",value:function(e){return jD.isNumber(e)?[-1e3,-1].includes(+e):["EPSG:-1000","EPSG:-1"].includes(e)}},{key:"handleJSONSuffix",value:function(e){if(!e.includes(".json"))if(e.includes("?")){var t=e.split("?");t[0]=t[0]+".json",e=t.join("?")}else e+=".json";return e}}])&&QZ(t.prototype,r),n&&QZ(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function aK(e){"@babel/helpers - typeof";return(aK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sK(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function uK(e){for(var t=1;t© SuperMap iServer",n=function(e,t){var r=ye.urlPathAppend(e,"/collections/".concat(t.collectionId,"/tile.").concat(t.format,"?x={x}&y={y}&z={z}")),n=function(e){var t={};t.transparent=e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),e.sqlFilter&&(t.sqlFilter=e.sqlFilter);e.renderingRule&&(t.renderingRule=JSON.stringify(e.renderingRule));e.ids&&(t.ids=e.ids.join(","));e.names&&(t.names=e.names.join(","));return t}(t);r=ye.urlAppend(r,function(e){var t=[];for(var r in e)t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")}(n)),r=gn.appendCredential(r),t.cacheEnabled||(r+="&_t="+(new Date).getTime());return r}(e.url,e),a=uK(uK({},e),{},{attributions:r,url:n});!e.tileLoadFunction&&e.tileProxy&&(a.tileLoadFunction=function(e,t){e.getImage().src=s.tileProxy+encodeURIComponent(t)});var s=hK(t=o.call(this,a));return t.options=e,e.tileProxy&&(t.tileProxy=e.tileProxy),t}return t=i,r&&cK(t.prototype,r),n&&cK(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}();function bK(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function xK(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function kK(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:22,r=e.bounds,n=e.dpi,o=e.center,i=e.visibleScales,a=e.scale,s=e.coordUnit,u=e.prjCoordSys,l=o.x&&o.y?[o.x,o.y]:[(r.left+r.right)/2,(r.bottom+r.top)/2],c=[r.left,r.bottom,r.right,r.top],f=jD.getProjection(u,c),p=jD.scalesToResolutions(i,r,n,s,t);return{center:l,projection:f,zoom:jD.getZoomByResolution(jD.scaleToResolution(a,n,s),p),resolutions:p}}function jK(e,t,r){var n=kK(e);return new($D())(SK({target:"map",view:new(SZ())(SK(SK({},n),r))},t))}function EK(e,t,r){var n=[r.left,r.bottom,r.right,r.top],o="EPSG:".concat(e);(!(0,JN.get)(o)&&MV.defs(o,t),xZ&&xZ.register)&&(xZ.register(MV),(0,JN.get)(o).setExtent(n))}function TK(e,t,r,n){var o=rB.optionsFromMapJSON(e,t,!0);o=SK(SK({},o),r);var i=new rB(o);return{layer:new(gK())(SK({source:i},n)),source:i}}function CK(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function RK(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=t.mapOptions,n=t.viewOptions,o=t.layerOptions,i=t.sourceOptions,a=new vK(RN,e,t);return a.getMapInfo((s=PK().mark(function t(s,u,l){var c,f,p,h,y,d,b,v;return PK().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(s&&s.result){t.next=3;break}return l("service is not work!"),t.abrupt("return");case 3:if(c=s.result,f=c.prjCoordSys,p=c.bounds,(0,JN.get)("EPSG:".concat(f.epsgCode))||"PCS_NON_EARTH"===f.type){t.next=9;break}return t.next=7,a.getWKT();case 7:h=t.sent,EK(f.epsgCode,h,p);case 9:y=jK(s.result,r,n),d=TK(e,s.result,i,o),b=d.layer,v=d.source,y.addLayer(b),u({map:y,source:v,layer:b});case 13:case"end":return t.stop()}},t)}),u=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=s.apply(e,t);function i(e){xK(o,r,n,i,a,"next",e)}function a(e){xK(o,r,n,i,a,"throw",e)}i(void 0)})},function(e,t,r){return u.apply(this,arguments)}));var s,u},MK.supermap.viewOptionsFromMapJSON=kK,MK.supermap.CommonUtil=ye}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r(3123),r(5023),r(4997);r(3884)}();