{ "pandav:/dist/maptalks.gltf.es.js": { "cubeCode": "Cube(\"pandav:/npm/@maptalks/gltf-layer/0.105.1/dist/maptalks.gltf.es\", [\"pandav:/npm/maptalks/1.2.1\", \"pandav:/npm/@maptalks/gl/0.108.1\", \"pandav:/npm/frustum-intersects/0.2.4\", \"pandav:/npm/@maptalks/function-type/1.4.1\", \"pandav:/npm/@maptalks/feature-filter/1.3.0\"], function (module, exports, require, load, process, global) {\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true });\n\n exports.MultiGLTFMarker = exports.GlowMarkerLayer = exports.GlowMarker = exports.GLTFMercatorGeometry = exports.GLTFMarker = exports.GLTFLineString = exports.GLTFLayer = exports.GLTFGeometry = exports.EffectRingLayer = exports.EffectRing = exports.EffectMarker = exports.EffectLineLayer = exports.EffectLine = exports.EffectLayer = exports.AEMarker = void 0;\n var _maptalks = _interopRequireWildcard(require('pandav:/npm/maptalks/1.2.1'));\n var t = _maptalks;\n var _gl = _interopRequireWildcard(require('pandav:/npm/@maptalks/gl/0.108.1'));\n var c = _gl;\n var _frustumIntersects = require('pandav:/npm/frustum-intersects/0.2.4');\n var _functionType = require('pandav:/npm/@maptalks/function-type/1.4.1');\n var _featureFilter = require('pandav:/npm/@maptalks/feature-filter/1.3.0');\n function _getRequireWildcardCache(e) {if (\"function\" != typeof WeakMap) return null;var r = new WeakMap(),t = new WeakMap();return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {return e ? t : r;})(e);}\n function _interopRequireWildcard(e, r) {if (!r && e && e.__esModule) return e;if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e };var t = _getRequireWildcardCache(r);if (t && t.has(e)) return t.get(e);var n = { __proto__: null },a = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) {var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];}return n.default = e, t && t.set(e, n), n;}\n function _typeof(o) {\"@babel/helpers - typeof\";return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;}, _typeof(o);}\n function _toConsumableArray(r) {return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();}\n function _nonIterableSpread() {throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");}\n function _unsupportedIterableToArray(r, a) {if (r) {if (\"string\" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}\n function _iterableToArray(r) {if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);}\n function _arrayWithoutHoles(r) {if (Array.isArray(r)) return _arrayLikeToArray(r);}\n function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}\n function _superPropGet(t, o, e, r) {var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e);return 2 & r && \"function\" == typeof p ? function (t) {return p.apply(e, t);} : p;}\n function _get() {return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {var p = _superPropBase(e, t);if (p) {var n = Object.getOwnPropertyDescriptor(p, t);return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;}}, _get.apply(null, arguments);}\n function _superPropBase(t, o) {for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););return t;}\n function _classCallCheck(a, n) {if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");}\n function _defineProperties(e, r) {for (var t = 0; t < r.length; t++) {var o = r[t];o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);}}\n function _createClass(e, r, t) {return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e;}\n function _toPropertyKey(t) {var i = _toPrimitive(t, \"string\");return \"symbol\" == _typeof(i) ? i : i + \"\";}\n function _toPrimitive(t, r) {if (\"object\" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || \"default\");if (\"object\" != _typeof(i)) return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\");}return (\"string\" === r ? String : Number)(t);}\n function _callSuper(t, o, e) {return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));}\n function _possibleConstructorReturn(t, e) {if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e;if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(t);}\n function _assertThisInitialized(e) {if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e;}\n function _isNativeReflectConstruct() {try {var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));} catch (t) {}return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {return !!t;})();}\n function _getPrototypeOf(t) {return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {return t.__proto__ || Object.getPrototypeOf(t);}, _getPrototypeOf(t);}\n function _inherits(t, e) {if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e);}\n function _setPrototypeOf(t, e) {return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {return t.__proto__ = e, t;}, _setPrototypeOf(t, e);}\n var M = 'function(e){\\n/*!\\n * @maptalks/gl v0.108.1\\n * LICENSE : UNLICENSED\\n * (c) 2016-2025 maptalks.com\\n */\\nconst n=function(){if(\"undefined\"!=typeof undefinedThis)return globalThis;if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof undefined)return global;throw new Error(\"unable to locate global object\")},t=n(),r=t.gl_trans__coders=t.gl_trans__coders||{};r.inject=function(e){const r=e.toString(),o=r.indexOf(\"{\")+1,s=r.substring(0,o),a=t.gl_trans__coders=t.gl_trans__coders||{};let c=`${s}\\\\n const _____getGlobal = ${n.toString()};\\\\n const g___lobals = _____getGlobal()\\\\n const tran_____scoders = g___lobals[\\'gl_trans__coders\\'] = g___lobals[\\'gl_trans__coders\\'] || {};`;for(const e in a)\"inject\"!==e&&\"getTranscoder\"!==e&&\"registerTranscoder\"!==e&&(c+=\\'tran_____scoders[\"\\'+e+\\'\"] =\\'+a[e].toString()+\"\\\\n;\");return c+=\"\\\\n(\"+n().maptalks_gltf_loader_bundle.toString()+\")({});\\\\n\",c+=\"\\\\n\"+r.substring(s.length),c},r.registerTranscoder=function(e,n){r[e]=n},r.getTranscoder=function(e){return r[e]};const o=n().maptalks_gltf_loader,s={\"image/crn\":r.crn&&r.crn(),\"image/ktx2\":r.ktx2&&r.ktx2(),\"image/cttf\":r.ktx2&&r.ktx2(),\"draco\":r.draco&&r.draco()};let a;const c={};function i(e,n,t){return new o.GLTFLoader(e,n,t).load({skipAttributeTransform:!0})}function f(e,n,t,r){const a=n.lastIndexOf(\"/\"),c=n.slice(0,a);r&&(n=r(n));const f=(...n)=>l.call(this,e,...n);return function(e,n){return o.Ajax.getArrayBuffer(e,n)}(n,t).then((e=>{if(e.message)return e;const a=e.data;return new DataView(a,a.byteOffset,a.byteLength).getUint32(4,!0)>2?function(e,n){return o.Ajax.getJSON(e,n)}(n,t).then((e=>e.message?e:i(c,e,{requestImage:f,decoders:s,transferable:!0,fetchOptions:t,urlModifier:r}))):i(c,{buffer:e.data,byteOffset:0},{requestImage:f,decoders:s,transferable:!0,fetchOptions:t,urlModifier:r})}))}function l(e,n,t,r){e?c[n]?c[n].push(r):(c[n]=[r],self.postMessage({type:\"\",command:\"sendImageData\",actorId:e,workerId:a,params:n})):function(e,n){const t=new Image;t.onload=()=>{if(!u)return void n(new Error(\"There is no canvas to draw image!\"));u.width=t.width,u.height=t.height;const e=u.getContext(\"2d\");e.drawImage(t,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height),o={width:t.width,height:t.height,data:new Uint8Array(r.data)};n(null,o,[o.data.buffer])},t.onerror=function(e){n(e)},t.src=e}(n,r)}const u=\"undefined\"==typeof document?null:document.createElement(\"canvas\");e.loadGLTF=f,e.onmessage=function(e){const n=e.data,t=n.url;if(\"addLayer\"===n.command||\"removeLayer\"===n.command)a=e.workerId,self.postMessage({type:\"\",actorId:n.actorId,workerId:a,params:\"ok\"});else if(t)!function(e){const n=e.data,t=e.callback,r=e.actorId,o=n.url,s=n.fetchOptions||{};s.referrerPolicy=s.referrerPolicy||\"origin\",s.referrer=n.referrer,f(r,o,s).then((e=>{e.message?self.postMessage({callback:t,error:e}):self.postMessage({callback:t,data:e},e.transferables)})).catch((e=>{self.postMessage({callback:t,error:e})})),c.receive=t}(e);else if(n.imageUrl){const e=c[n.imageUrl];if(delete c[n.imageUrl],e)for(let t=0;t 0 ? r / h : o,\n c = Math.floor(r / a),\n l = [],\n u = n.map,\n f = n.rotateAlongLine + function (t, i, s) {\n var n = s.getGLRes(),\n r = s.coordinateToPointAtRes(t, n),\n o = s.coordinateToPointAtRes(i, n);\n return _maptalks.Util.computeDegree(o.x, o.y, r.x, r.y) / Math.PI * 180;\n }(t, i, u);\n if (c >= 1) {\n var _e = 0,\n _s = c;\n if (n.snapToEndVertexes) for (var _n = _e; _n <= _s; _n++) {\n var _e2 = {\n coordinates: P(t, i, a * _n / r),\n scale: [1, 1, 1],\n rotation: [0, 0, f] };\n\n l.push(_e2);\n } else for (var _n2 = _e + 1; _n2 <= _s; _n2++) {\n var _e3 = {\n coordinates: P(t, i, a * (_n2 - .5) / r),\n scale: [1, 1, 1],\n rotation: [0, 0, f] };\n\n l.push(_e3);\n }\n if (n.scaleEndModel) {\n var _e4 = (r - a * c) / a,\n _s2 = {\n coordinates: P(t, i, (a * c + (r - a * c) / 2) / r),\n scale: [_e4, 1, 1],\n rotation: [0, 0, f] };\n\n l.push(_s2);\n }\n } else if (n.scaleEndModel) {\n var _e5 = r / a,\n _s3 = {\n coordinates: P(t, i, .5),\n scale: [_e5, 1, 1],\n rotation: [0, 0, f] };\n\n l.push(_s3);\n }\n return l;\n }\n function P(t, e, s) {\n var n = C(t.x, e.x, s),\n r = C(t.y, e.y, s);\n return new _maptalks.Coordinate(n, r);\n }\n function C(t, e, i) {\n return t + i * (e - t);\n }\n var L = {};\n var I = \"undefined\" == typeof document ? null : document.createElement(\"canvas\");\n var F = function (_t$worker$Actor) {\n function F(t, e) {\n var _this;\n _classCallCheck(this, F);\n _this = _callSuper(this, F, [t]), _this.mapId = e.getMap().id, _this.i = e;\n return _this;\n }\n _inherits(F, _t$worker$Actor);\n return _createClass(F, [{\n key: \"loadGLTF\",\n value: function loadGLTF(t) {\n var _this2 = this;\n var e = function (t) {\n var e = document.createElement(\"a\");\n return e.href = t, t = e.href, e = null, t;\n }(t),\n i = {\n url: e,\n referrer: window && window.location.href,\n fetchOptions: this.i.options.fetchOptions };\n\n return new Promise(function (t, e) {\n _this2.send(i, null, function (i, s) {\n i ? e(i) : t(s);\n });\n });\n } },\n {\n key: \"sendImageData\",\n value: function sendImageData(t, e) {\n var _this3 = this;\n !function (t, e) {\n var i = new Image();\n i.onload = function () {\n if (!I) return void e(new Error(\"There is no canvas to draw image!\"));\n I.width = i.width, I.height = i.height;\n var t = I.getContext(\"2d\");\n t.drawImage(i, 0, 0, i.width, i.height);\n var s = t.getImageData(0, 0, i.width, i.height),\n n = {\n width: i.width,\n height: i.height,\n data: new Uint8Array(s.data) };\n\n e(null, n, [n.data.buffer]);\n }, i.onerror = function (t) {\n e(t);\n }, i.src = t;\n }(t, function (i, s) {\n i || _this3.isActive() && e(null, {\n result: s,\n imageUrl: t });\n\n });\n } },\n {\n key: \"addLayer\",\n value: function addLayer(t, e, i) {\n var s = {\n actorId: this.actorId,\n mapId: this.mapId,\n layerId: t,\n command: \"addLayer\",\n params: {\n options: e } };\n\n\n this.broadcast(s, null, i);\n } },\n {\n key: \"removeLayer\",\n value: function removeLayer(t, e, i) {\n var s = {\n mapId: this.mapId,\n layerId: t,\n command: \"removeLayer\" };\n\n this.broadcast(s, null, i);\n } }]);\n\n }(t.worker.Actor);\n var D = function D() {\n if (\"undefined\" != typeof globalThis) return globalThis;\n if (\"undefined\" != typeof self) return self;\n if (\"undefined\" != typeof window) return window;\n if (\"undefined\" != typeof global) return global;\n throw new Error(\"unable to locate global object\");\n },\n G = D(),\n N = G.gl_trans__coders = G.gl_trans__coders || {};\n N.inject = function (t) {\n var e = t.toString(),\n i = e.indexOf(\"{\") + 1,\n s = e.substring(0, i),\n n = G.gl_trans__coders = G.gl_trans__coders || {};\n var r = \"\".concat(s, \"\\n const _____getGlobal = \").concat(D.toString(), \";\\n const g___lobals = _____getGlobal()\\n const tran_____scoders = g___lobals['gl_trans__coders'] = g___lobals['gl_trans__coders'] || {};\");\n for (var _t2 in n) \"inject\" !== _t2 && \"getTranscoder\" !== _t2 && \"registerTranscoder\" !== _t2 && (r += 'tran_____scoders[\"' + _t2 + '\"] =' + n[_t2].toString() + \"\\n;\");\n return r += \"\\n(\" + D().maptalks_gltf_loader_bundle.toString() + \")({});\\n\", r += \"\\n\" + e.substring(s.length), r;\n }, N.registerTranscoder = function (t, e) {\n N[t] = e;\n }, N.getTranscoder = function (t) {\n return N[t];\n };\n var E = D().maptalks_gltf_loader,\n B = {\n \"image/crn\": N.crn && N.crn(),\n \"image/ktx2\": N.ktx2 && N.ktx2(),\n \"image/cttf\": N.ktx2 && N.ktx2(),\n \"draco\": N.draco && N.draco() };\n\n var R;\n var j = {};\n function U(t, e, i) {\n return new E.GLTFLoader(t, e, i).load({\n skipAttributeTransform: !0 });\n\n }\n function z(t, e, i, s) {\n var _this4 = this;\n var n = e.lastIndexOf(\"/\"),\n r = e.slice(0, n);\n s && (e = s(e));\n var o = function o() {\n for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {\n e[_key] = arguments[_key];\n }\n return J.call.apply(J, [_this4, t].concat(e));\n };\n return function (t, e) {\n return E.Ajax.getArrayBuffer(t, e);\n }(e, i).then(function (t) {\n if (t.message) return t;\n var n = t.data;\n return new DataView(n, n.byteOffset, n.byteLength).getUint32(4, !0) > 2 ? function (t, e) {\n return E.Ajax.getJSON(t, e);\n }(e, i).then(function (t) {\n return t.message ? t : U(r, t, {\n requestImage: o,\n decoders: B,\n transferable: !0,\n fetchOptions: i,\n urlModifier: s });\n\n }) : U(r, {\n buffer: t.data,\n byteOffset: 0 },\n {\n requestImage: o,\n decoders: B,\n transferable: !0,\n fetchOptions: i,\n urlModifier: s });\n\n });\n }\n function J(t, e, i, s) {\n t ? j[e] ? j[e].push(s) : (j[e] = [s], self.postMessage({\n type: \"\",\n command: \"sendImageData\",\n actorId: t,\n workerId: R,\n params: e })) :\n function (t, e) {\n var i = new Image();\n i.onload = function () {\n if (!H) return void e(new Error(\"There is no canvas to draw image!\"));\n H.width = i.width, H.height = i.height;\n var t = H.getContext(\"2d\");\n t.drawImage(i, 0, 0, i.width, i.height);\n var s = t.getImageData(0, 0, i.width, i.height),\n n = {\n width: i.width,\n height: i.height,\n data: new Uint8Array(s.data) };\n\n e(null, n, [n.data.buffer]);\n }, i.onerror = function (t) {\n e(t);\n }, i.src = t;\n }(e, s);\n }\n var H = \"undefined\" == typeof document ? null : document.createElement(\"canvas\");\n var V = [],\n Z = [],\n q = [],\n W = [],\n X = [1, 1, 1],\n Y = [],\n $ = [],\n K = [1, 1, 1],\n Q = [],\n tt = new _gl.reshader.BoundingBox(),\n et = function (t, e) {\n var i = [];\n return i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = 0, i[4] = t[3], i[5] = t[4], i[6] = t[5], i[7] = 0, i[8] = t[6], i[9] = t[7], i[10] = t[8], i[11] = 0, i[12] = e[0], i[13] = e[1], i[14] = e[2], i[15] = 1, i;\n }(function (t) {\n var e = Math.cos(t),\n i = Math.sin(t),\n s = [];\n return s[0] = 1, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = e, s[5] = i, s[6] = 0, s[7] = -i, s[8] = e, s;\n }(.5 * Math.PI), [0, 0, 0]),\n it = new _maptalks.Point(0, 0),\n st = [186 / 255, 186 / 255, 186 / 255, 1],\n nt = {\n \"lightAmbient\": [1, 1, 1],\n \"lightDiffuse\": [1, 1, 1],\n \"lightSpecular\": [1, 1, 1],\n \"lightDirection\": [1, 1, 1] },\n\n rt = new Set([\"url\", \"translationX\", \"translationY\", \"translationZ\", \"rotationX\", \"rotationY\", \"rotationZ\", \"scaleX\", \"scaleY\", \"scaleZ\", \"anchorZ\", \"markerPixelHeight\", \"modelHeight\"]),\n _ot = [1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1],\n ht = [0, 1, 1, 2, 2, 3, 3, 0, 0, 4, 1, 5, 2, 6, 3, 7, 4, 5, 5, 6, 6, 7, 7, 4],\n at = [.8, .8, .1, 1];\n var ct = exports.GLTFMarker = function (_r) {\n function ct(t, i) {\n var _this5;\n _classCallCheck(this, ct);\n var s = _maptalks.Util.extend({}, i),\n n = s.symbol;\n _this5 = _callSuper(this, ct, [t, s]), _this5.options.symbol = n, _this5.o = !1, _this5.h = _gl.mat4.identity([]), _this5.l = \"gltfmarker\", _this5.u = !0, _this5.m = !0, _this5.p = {\n get translation() {\n return [0, 0, 0];\n },\n get rotation() {\n return [0, 0, 0];\n },\n get scale() {\n return [1, 1, 1];\n } },\n _this5._();\n return _this5;\n }\n _inherits(ct, _r);\n return _createClass(ct, [{\n key: \"setTransformOrigin\",\n value: function setTransformOrigin(t) {\n this.v = t;\n } },\n {\n key: \"getTransformOrigin\",\n value: function getTransformOrigin() {\n return this.v || this.getCenter();\n } },\n {\n key: \"getMeshes\",\n value: function getMeshes(t, e, i) {\n var _this6 = this;\n var s = [];\n var n = this.getMap();\n if (e && (this.regl = e), this.getLayer().isVisible() && this.isVisible() && this.M()) {\n if (!this.S) return this.O(t, e), s;\n var _r2 = this.isAnimated() || this.T() && n.isZooming() || this.m || \"multigltfmarker\" === this.getGLTFMarkerType() && this.u || \"effectmarker\" === this.getGLTFMarkerType();\n if (!_r2) {\n var _t3 = this.h;\n _gl.mat4.copy(Y, _t3), this._(), _r2 = !_gl.mat4.exactEquals(_t3, Y);\n }\n _r2 && this.A(this.S, i), s = this.S.filter(function (t) {\n return !!((0, _frustumIntersects.intersectsBox)(n.projViewMatrix, t.getBoundingBox()) || t instanceof _gl.reshader.InstancedMesh) && (_this6.k(t, i), _this6.P(t), !0);\n }), this.C(!1);\n }\n return s;\n } },\n {\n key: \"getGLTFJSON\",\n value: function getGLTFJSON() {\n return this.L;\n } },\n {\n key: \"getAllMeshes\",\n value: function getAllMeshes() {\n return this.S;\n } },\n {\n key: \"I\",\n value: function I() {\n return this.L;\n } },\n {\n key: \"F\",\n value: function F(t) {\n this.L = t;\n } },\n {\n key: \"D\",\n value: function D(t, e) {\n this._externSymbol = this._externSymbol || {}, this._externSymbol[t] = e, \"uniforms\" === t && (this.G = !0);\n } },\n {\n key: \"setUrl\",\n value: function setUrl(t) {\n return this.updateSymbol({\n url: t }),\n this;\n } },\n {\n key: \"setSymbol\",\n value: function setSymbol(t) {\n var e = this.getUrl();\n _superPropGet(ct, \"setSymbol\", this, 3)([t]);\n var i = this.getShader(),\n s = this.N;\n s && t.url !== e && (s.logoutGLTF(e), this.B = !1, this.R(!1), delete this.S), this.j && this.j !== i && this.U(s, this.regl), this.j = i, this.G = !0, this.u = !0;\n } },\n {\n key: \"getCenter\",\n value: function getCenter() {\n var t = this.getMap();\n if (!t) return null;\n var e = T(t, _superPropGet(ct, \"getCenter\", this, 3)([]) || this.getCoordinates());\n if (!e) return null;\n var i = this.J(),\n s = new _maptalks.Point([e[0] + i[0], e[1] + i[1], e[2] + i[2]]),\n r = t.getGLRes(),\n o = t.pointAtResToCoord(s, r);\n return o.z = s.z / t.altitudeToPoint(100, r) * 100, o;\n } },\n {\n key: \"getPointZ\",\n value: function getPointZ() {\n var t = this.getCoordinates(),\n e = this.getMap();\n if (!e || !t) return null;\n return e.altitudeToPoint(t.z || 0, e.getGLRes());\n } },\n {\n key: \"getUrl\",\n value: function getUrl() {\n var t = this._getInternalSymbol();\n return t && t.url || \"pyramid\";\n } },\n {\n key: \"addTo\",\n value: function addTo(t) {\n if (this.getLayer()) throw new Error(\"GLTFMarker cannot be added to two or more layers at the same time.\");\n return t.addGeometry(this), this;\n } },\n {\n key: \"O\",\n value: function O(t, e) {\n var i = this.getUrl();\n if (this.N = t, !this.B) {\n var _e6 = this.getLayer().getRenderer();\n t.loginGLTF(i, function () {\n for (var _len2 = arguments.length, t = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n t[_key2] = arguments[_key2];\n }\n return _e6.H.apply(_e6, t);\n }), this.B = !0;\n }\n var s = t.getGLTF(i);\n s && !s.then && (this.R(!0), this.V(s, t, e));\n } },\n {\n key: \"k\",\n value: function k(t, e) {\n \"effectmarker\" === this.getGLTFMarkerType() ? this.updateUV(e) : \"glowmarker\" === this.getGLTFMarkerType() && this.Z();\n var i = this.getUniforms();\n if (i && this.isDirty() && this.q()) for (var _e7 in i) t.setUniform(_e7, i[_e7]);\n this.W() && (t.transparent = !0), t.setUniform(\"uPickingId\", this.X()), t.properties.isAnimated = this.isAnimated();\n } },\n {\n key: \"P\",\n value: function P(t) {\n var e = this.getShader(),\n i = t.getDefines();\n var s = !1;\n if (\"pbr\" === e || \"pbr-lite\" === e) {\n var _t4 = this.getLayer(),\n _l$pbr$PBRUtils$getIB = _gl.reshader.pbr.PBRUtils.getIBLResOnCanvas(_t4.getRenderer().canvas),\n _e8 = _l$pbr$PBRUtils$getIB.iblTexes;\n _e8 ? i.HAS_IBL_LIGHTING || (i.HAS_IBL_LIGHTING = 1, s = !0) : i.HAS_IBL_LIGHTING && (s = !0, delete i.HAS_IBL_LIGHTING);\n }\n s && t.setDefines(i);\n var n = this.getLayer().getRenderer();\n n && n.updateMaskDefines(t);\n } },\n {\n key: \"U\",\n value: function U(t) {\n var _this7 = this;\n var e = this.getUrl(),\n i = this.S;\n if (!t || !i) return;\n if (t.isSimpleModel(e)) return void this.Y(i);\n t.getGLTF(e) && (i.forEach(function (t) {\n _this7.k(t);\n }), this.Y(i));\n } },\n {\n key: \"Y\",\n value: function Y(t) {\n var _this8 = this;\n var e = this.getShader();\n t.forEach(function (t) {\n var i = _this8.$(t.properties.geometryResource);\n \"wireframe\" === e ? (t.properties.geometryResource && !t.properties.geometryResource.copyGeometry && t.properties.geometryResource.copyEdgeGeometry(), t.geometry = t.properties.geometryResource.copyGeometry) : t.geometry = t.properties.geometryResource.geometry, t.material = i;\n });\n } },\n {\n key: \"A\",\n value: function A(t, e) {\n var _this9 = this;\n _gl.vec3.set(X, 1, 1, 1);\n var i = _gl.mat4.identity(Y),\n s = this.isAnimated();\n this._();\n var n = this.getModelMatrix(),\n _this$K = this.K(e),\n r = _this$K.nodeMatrixMap,\n o = _this$K.skinMap;\n this.tt(X);\n var h = 0;\n t.forEach(function (t) {\n var e = t.properties.geometryResource.nodeIndex,\n a = r[e],\n c = s && a ? a : t.nodeMatrix;\n _gl.mat4.scale(i, n, X), _gl.mat4.multiply(i, i, et), t.et = t.et || _gl.mat4.identity([]);\n var f = _gl.mat4.multiply(Q, t.et, c);\n t instanceof _gl.reshader.InstancedMesh ? (t.positionMatrix = _gl.mat4.multiply(t.positionMatrix, i, f), t.localTransform = _this9.it(), _this9.st(t)) : t.localTransform = _gl.mat4.multiply(t.localTransform, i, f);\n var d = t.geometry.boundingBox.copy(tt);\n d.transform(t.positionMatrix, t.localTransform);\n var m = _this9.nt(d);\n if (Math.abs(m) > Math.abs(h) && (h = m), s) {\n var _i = o[e];\n _i && (t.material.set(\"skinAnimation\", 1), t.material.set(\"jointTextureSize\", _i.jointTextureSize), t.material.set(\"numJoints\", _i.numJoints), t.material.set(\"jointTexture\", _i.jointTexture));\n var _s4 = t.geometry.properties.morphWeights;\n _s4 && _this9.rt(_s4, t.material);\n } else t.material.set(\"skinAnimation\", 0);\n });\n var a = this.ot();\n if (a && (_gl.mat4.scale(i, n, X), _gl.mat4.multiply(i, i, et), this.ht.localTransform = _gl.mat4.multiply(this.ht.localTransform, i, this.ht.ct)), 0 !== h) {\n _gl.vec3.set($, 0, 0, h);\n var _e9 = _gl.mat4.fromTranslation(Y, $);\n t.forEach(function (t) {\n if (t instanceof _gl.reshader.InstancedMesh) t.positionMatrix = _gl.mat4.multiply(t.positionMatrix, _e9, t.positionMatrix), _this9.st(t);else {\n var _i2 = _gl.mat4.multiply(t.localTransform, _e9, t.localTransform);\n t.localTransform = _i2;\n }\n }), a && (this.ht.localTransform = _gl.mat4.multiply(this.ht.localTransform, _e9, this.ht.localTransform));\n }\n t.forEach(function (t) {\n t instanceof _gl.reshader.InstancedMesh && _this9.st(t);\n }), this.fire(\"updatematrix\", {\n target: this });\n\n } },\n {\n key: \"getBoundingBoxCenter\",\n value: function getBoundingBoxCenter() {\n var t = this.lt,\n e = this.getMap();\n if (!t || !this.ht || !e) return null;\n var i = e.getGLRes(),\n s = t.min,\n r = t.max,\n o = _gl.vec3.add([], s, r);\n _gl.vec3.scale(o, o, .5), _gl.vec3.transformMat4(o, o, this.ht.localTransform);\n var h = new _maptalks.Point(o),\n a = e.pointAtResToCoordinate(h, i);\n return a.z = 100 / e.altitudeToPoint(100, i) * o[2], a;\n } },\n {\n key: \"getBoundingBoxWidth\",\n value: function getBoundingBoxWidth(t) {\n var e = this.lt;\n if (!e) return 0;\n var i = 0;\n \"x\" === t ? i = 0 : \"y\" === t ? i = 2 : \"z\" === t && (i = 1);\n var s = e.min,\n n = e.max,\n r = this.ut()[i];\n return (n[i] - s[i]) * r;\n } },\n {\n key: \"getAxisXWidth\",\n value: function getAxisXWidth() {\n return this.getBoundingBoxWidth(\"x\");\n } },\n {\n key: \"getAxisYWidth\",\n value: function getAxisYWidth() {\n return this.getBoundingBoxWidth(\"y\");\n } },\n {\n key: \"getAxisZWidth\",\n value: function getAxisZWidth() {\n return this.getBoundingBoxWidth(\"z\");\n } },\n {\n key: \"tt\",\n value: function tt(t) {\n var e = this.getMap(),\n i = e.getGLRes(),\n s = e.altitudeToPoint(100, i);\n return t[0] *= s / 100, t[1] *= s / 100, t[2] *= s / 100, t;\n } },\n {\n key: \"ft\",\n value: function ft(t, e) {\n return this.gltfPack.calModelHeightScale(t, e);\n } },\n {\n key: \"dt\",\n value: function dt(t, e) {\n var i = this.lt;\n if (!e || e < 0 || !i) return t;\n var s = this.getMap(),\n n = Math.abs(i.max[1] - i.min[1]),\n r = s.altitudeToPoint(n, s.getGLRes()),\n o = e * s.getGLScale() / r;\n return _gl.vec3.set(t, o, o, o);\n } },\n {\n key: \"getCurrentPixelHeight\",\n value: function getCurrentPixelHeight() {\n var t = this.getBoundingBox();\n return Math.abs(t.max[2] - t.min[2]) / this.getMap().getGLScale();\n } },\n {\n key: \"getFitTranslate\",\n value: function getFitTranslate(t) {\n var e = this.lt,\n i = _gl.vec3.set(t, (e.min[0] + e.max[0]) / 2, (e.min[1] + e.max[1]) / 2, (e.min[2] + e.max[2]) / 2);\n return _gl.vec3.scale(i, i, -1);\n } },\n {\n key: \"nt\",\n value: function nt(t) {\n var e = this.getSymbol(),\n i = e && e.anchorZ || \"center\";\n var s = 0;\n var n = t.max[2] - t.min[2];\n return \"bottom\" === i ? s = n / 2 : \"top\" === i && (s = -n / 2), s;\n } },\n {\n key: \"K\",\n value: function K(t) {\n var e = this.isAnimated(),\n i = this.gt(),\n s = {},\n n = this._t();\n if (t && e && this.gltfPack && i) {\n var _e10 = this.xt();\n if (O(_e10)) {\n this.yt(t);\n var _i3 = this.vt(),\n _r3 = this.isAnimationLooped(),\n _o = this.getAnimationSpeed(),\n _h = this.getSymbol(),\n _a = _h && _h.animationNodes;\n for (var _h2 = 0; _h2 < _e10.length; _h2++) this.gltfPack.updateAnimation(t, _r3, _o, _e10[_h2], _i3, s, n, _a);\n } else console.warn(\"animation specified does not exist!\");\n }\n return {\n nodeMatrixMap: s,\n skinMap: n };\n\n } },\n {\n key: \"V\",\n value: function V(t, e, i) {\n var s = this.getUrl();\n this.F(t.json), this.wt(s, e, i), this.U(e, i), this.createdBygltfmarker || (this.fire(\"load\", {\n data: t.json }),\n this.fire(\"setUrl-debug\"), this._fireEvent(\"meshcreate\", {\n url: s }));\n\n } },\n {\n key: \"wt\",\n value: function wt(t, e, i) {\n var _this10 = this;\n var s = [],\n n = this.getShader(),\n r = e.getGLTF(t);\n if (r && r.resources) {\n if (!r.resources.length) return void this._fireEvent(\"modelerror\", {\n url: t,\n info: \"there are no geomtries in the gltf model\" });\n\n this.gltfPack = r.gltfPack, r.resources.forEach(function (t) {\n var e = _this10.bt(t, n, i);\n s.push(e);\n });\n }\n this.S = s, this.lt = this.Mt(), this.St(this.S), this.fire(\"createscene-debug\", {\n meshes: this.S });\n\n } },\n {\n key: \"St\",\n value: function St(t) {\n this.A(t);\n var e = this.getBoundingBox();\n if (!e) return;\n var i = this.getMap(),\n s = e.max,\n n = e.min;\n _gl.vec3.length([s[0] - n[0], s[1] - n[1], s[2] - n[2]]) / i.getGLScale() < 20 && (console.warn(\"Model's size on screen is too small, try to increase its symbol.scaleX/Y/Z\"), this.fire(\"smallonscreen\"));\n } },\n {\n key: \"ot\",\n value: function ot() {\n if (this.ht) return this.ht.material.set(\"lineColor\", this.Ot || at), this.ht.material.set(\"lineOpacity\", this.Tt || 1), this.ht;\n var t = this.lt;\n if (!t) return null;\n var e = t.min,\n i = t.max;\n _ot[0] = i[0], _ot[1] = e[1], _ot[2] = i[2], _ot[3] = i[0], _ot[4] = i[1], _ot[5] = i[2], _ot[6] = e[0], _ot[7] = i[1], _ot[8] = i[2], _ot[9] = e[0], _ot[10] = e[1], _ot[11] = i[2], _ot[12] = i[0], _ot[13] = e[1], _ot[14] = e[2], _ot[15] = i[0], _ot[16] = i[1], _ot[17] = e[2], _ot[18] = e[0], _ot[19] = i[1], _ot[20] = e[2], _ot[21] = e[0], _ot[22] = e[1], _ot[23] = e[2];\n var s = new _gl.reshader.Geometry({\n POSITION: _ot },\n ht, 0, {\n primitive: \"lines\",\n positionAttribute: \"POSITION\" });\n\n s.generateBuffers(this.regl);\n var n = new _gl.reshader.Mesh(s, new _gl.reshader.Material({\n lineColor: this.Ot || at,\n lineOpacity: this.Tt || 1 }));\n\n return this.ht = n, this.ht.ct = _gl.mat4.copy([], n.localTransform), n;\n } },\n {\n key: \"showBoundingBox\",\n value: function showBoundingBox(t) {\n this.options.showDebugBoundingBox = !0, this.Ot = t && t.lineColor, this.Tt = t && t.lineOpacity, this.u = !0;\n } },\n {\n key: \"hideBoundingBox\",\n value: function hideBoundingBox() {\n this.options.showDebugBoundingBox = !1, this.u = !0;\n } },\n {\n key: \"getBoundingBox\",\n value: function getBoundingBox() {\n var _this11 = this;\n var t = this.S;\n if (!t || !t.length) return null;\n if (!this.m) return this.At;\n \"multigltfmarker\" === this.getGLTFMarkerType() && t.forEach(function (t) {\n _this11.st(t), t.updateBoundingBox();\n });\n var e = t[0].getBoundingBox(),\n i = _gl.vec3.copy([], e[0]),\n s = _gl.vec3.copy([], e[1]);\n for (var _e11 = 1; _e11 < t.length; _e11++) {\n var _n3 = t[_e11].getBoundingBox(),\n _r4 = _gl.vec3.copy([], _n3[0]),\n _o2 = _gl.vec3.copy([], _n3[1]);\n _r4[0] < i[0] && (i[0] = _r4[0]), _r4[1] < i[1] && (i[1] = _r4[1]), _r4[2] < i[2] && (i[2] = _r4[2]), _o2[0] > s[0] && (s[0] = _o2[0]), _o2[1] > s[1] && (s[1] = _o2[1]), _o2[2] > s[2] && (s[2] = _o2[2]);\n }\n var n = {\n min: i,\n max: s };\n\n return this.At = n, \"multigltfmarker\" === this.getGLTFMarkerType() ? this.kt.length && (this.m = !1) : this.m = !1, n;\n } },\n {\n key: \"Mt\",\n value: function Mt() {\n return this.gltfPack.getGLTFBBox();\n } },\n {\n key: \"bt\",\n value: function bt(t, e, i) {\n var s = t,\n n = this.Pt(s, e, i),\n r = n.getDefines();\n return n instanceof _gl.reshader.InstancedMesh ? (r.HAS_PICKING_ID = 1, r.HAS_INSTANCE_COLOR = 1) : r.HAS_PICKING_ID = 2, n.geometry.data.COLOR_0 && (r.HAS_COLOR0 = 1), r.HAS_MIN_ALTITUDE = 1, r.HAS_LAYER_OPACITY = 1, n.setDefines(r), n;\n } },\n {\n key: \"Pt\",\n value: function Pt(t, e, i) {\n var s = this.getGLTFMarkerType();\n var n = null;\n var r = this.$(t);\n var o = t.geometry;\n if (\"wireframe\" === e && (t.copyEdgeGeometry(), o = t.copyGeometry), i ? o.generateBuffers(i) : (this.Ct = this.Ct || [], this.Ct.push(o)), \"multigltfmarker\" === s) {\n this.Lt();\n var _t5 = this.It(_gl.mat4.identity(W)),\n _e12 = this.Ft();\n n = new _gl.reshader.InstancedMesh(_t5.attributesData, _e12, o, r), n.setUniform(\"instance\", 1), i ? n.generateInstancedBuffers(i) : (this.Dt = this.Dt || [], this.Dt.push(n));\n } else n = new _gl.reshader.Mesh(o, r), n.setUniform(\"instance\", 0);\n n.nodeMatrix = _gl.mat4.copy([], t.nodeMatrix), n.properties.geometryResource = t, n.properties.nodeIndex = t.nodeIndex, this.isBloom() && (n.bloom = 1), n.transparent = this.W();\n \"BLEND\" === t.extraInfo.alphaMode && (n.transparent = !0), n.properties.pickingId = this.X(), this.Gt(n);\n var h = this.getLayer();\n return Object.defineProperty(n.uniforms, \"minAltitude\", {\n enumerable: !0,\n get: function get() {\n return h.options.altitude || 0;\n } }),\n n;\n } },\n {\n key: \"$\",\n value: function $(t) {\n var e = null;\n var i = this.getShader(),\n s = this.getUniforms() || {},\n n = t.materialInfo || {},\n r = this.getLayer().getRenderer();\n if (\"phong\" === i) {\n if (\"pbrSpecularGlossiness\" === n.name) e = new _gl.reshader.PhongSpecularGlossinessMaterial(n);else {\n for (var _t6 in nt) s[_t6] = s[_t6] || nt[_t6];\n e = new _gl.reshader.PhongMaterial(n);\n }\n } else if (\"pbr\" === i) {\n if (e = \"pbrSpecularGlossiness\" === n.name ? new _gl.reshader.pbr.StandardSpecularGlossinessMaterial(n) : new _gl.reshader.pbr.StandardMaterial(n), r.regl && !_gl.reshader.pbr.PBRUtils.isSupported(r.regl)) {\n e = _gl.reshader.PhongMaterial.convertFrom(e);\n for (var _t7 in nt) s[_t7] = s[_t7] || nt[_t7];\n }\n } else e = \"pbr-lite\" === i ? new _gl.reshader.StandardLiteMaterial(n) : new _gl.reshader.Material(n);\n var o = this.getSymbol(),\n h = o && o.doubleSided;\n O(h) && (e.doubleSided = h);\n for (var _t8 in s) e.set(_t8, s[_t8]);\n return t.morphWeights && this.rt(t.morphWeights, e), t.skin && e.set(\"skinAnimation\", 0), e;\n } },\n {\n key: \"rt\",\n value: function rt(t, e) {\n var i = e.get(\"morphWeights1\") || [],\n s = e.get(\"morphWeights2\") || [];\n for (var _e13 = 0; _e13 < 4; _e13++) i[_e13] = t[_e13] || 0, s[_e13] = t[_e13 + 4] || 0;\n e.set(\"morphWeights1\", i), e.set(\"morphWeights2\", s);\n } },\n {\n key: \"Gt\",\n value: function Gt(t) {\n var e = this.getSymbol();\n e && e.uniforms ? (t.setUniform(\"polygonFill\", e.uniforms.polygonFill || st), t.setUniform(\"polygonOpacity\", void 0 === e.uniforms.polygonOpacity ? 1 : e.uniforms.polygonOpacity), t.setUniform(\"lineColor\", e.uniforms.lineColor || st), t.setUniform(\"lineOpacity\", void 0 === e.uniforms.lineOpacity ? 1 : e.uniforms.lineOpacity)) : (t.setUniform(\"polygonFill\", st), t.setUniform(\"polygonOpacity\", 1), t.setUniform(\"lineColor\", st), t.setUniform(\"lineOpacity\", 1));\n } },\n {\n key: \"Nt\",\n value: function Nt() {\n var t = this.getLayer();\n if (!t) return null;\n var e = t.getMap();\n if (!e) return null;\n var i = this.getBoundingBox();\n if (!i) return null;\n var s = this.getPointZ() || 0,\n n = i.min,\n r = i.max,\n h = _gl.vec4.set(Z, (n[0] + r[0]) / 2, (n[1] + r[1]) / 2, n[2] + s, 1),\n a = _gl.vec4.set(q, (n[0] + r[0]) / 2, (n[1] + r[1]) / 2, r[2] + s, 1),\n c = _gl.vec4.transformMat4(h, h, e.projViewMatrix),\n l = _gl.vec4.transformMat4(a, a, e.projViewMatrix),\n u = (c[0] / c[3] + 1) * e.width / 2,\n f = (1 - c[1] / c[3]) * e.height / 2,\n m = (l[0] / l[3] + 1) * e.width / 2,\n g = (1 - l[1] / l[3]) * e.height / 2,\n p = Math.min(u, m),\n _ = Math.max(u, m),\n x = Math.min(f, g),\n y = Math.max(f, g);\n return new _maptalks.Extent({\n xmin: p,\n ymin: x,\n xmax: _,\n ymax: y });\n\n } },\n {\n key: \"onAdd\",\n value: function onAdd() {\n var t = this.getLayer().getMap();\n if (t && !O(this.Et)) {\n var _e14 = t.getZoom();\n this.Et = _e14;\n }\n } },\n {\n key: \"onRemove\",\n value: function onRemove() {\n this.Bt();\n } },\n {\n key: \"remove\",\n value: function remove() {\n var t = this.getUrl();\n if (this.N && (delete this.S, this.N.logoutGLTF(t), delete this.N), this.Rt) {\n for (var _t9 in this.Rt) this.Rt[_t9] && this.Rt[_t9].jointTexture && this.Rt[_t9].jointTexture.destroy();\n delete this.Rt;\n }\n this.ht && (this.ht.geometry.dispose(), this.ht.dispose(), delete this.ht), this.S && this.S.forEach(function (t) {\n t.dispose(), t.properties.bloomMesh && (t.properties.bloomMesh.dispose(), delete t.properties.bloomMesh);\n }), this.B = !1, delete this.L, delete this.gltfPack, _superPropGet(ct, \"remove\", this, 3)([]);\n } },\n {\n key: \"show\",\n value: function show() {\n return _superPropGet(ct, \"updateSymbol\", this, 3)([{\n visible: !0 }]),\n this;\n } },\n {\n key: \"hide\",\n value: function hide() {\n _superPropGet(ct, \"updateSymbol\", this, 3)([{\n visible: !1 }]);\n\n } },\n {\n key: \"setBloom\",\n value: function setBloom(t) {\n return this.updateSymbol({\n bloom: t }),\n this;\n } },\n {\n key: \"isBloom\",\n value: function isBloom() {\n var t = this._getInternalSymbol();\n return t && t.bloom;\n } },\n {\n key: \"setCastShadow\",\n value: function setCastShadow(t) {\n return _superPropGet(ct, \"updateSymbol\", this, 3)([{\n shadow: t }]),\n this;\n } },\n {\n key: \"isCastShadow\",\n value: function isCastShadow() {\n var t = this._getInternalSymbol();\n return t && (t.shadow || void 0 === t.shadow);\n } },\n {\n key: \"outlineNodes\",\n value: function outlineNodes(t) {\n var e = this.S;\n return e ? (e.forEach(function (e) {\n t.indexOf(e.properties.nodeIndex) > -1 && (e.properties.outline = !0);\n }), this.u = !0, this) : this;\n } },\n {\n key: \"outline\",\n value: function outline() {\n this.updateSymbol({\n outline: !0 });\n\n var t = this.S;\n return t ? (t.forEach(function (t) {\n t.properties.outline = !0;\n }), this.u = !0, this) : this;\n } },\n {\n key: \"cancelOutline\",\n value: function cancelOutline(t) {\n this.updateSymbol({\n outline: !1 });\n\n var e = this.S;\n return e ? (e.forEach(function (e) {\n t ? t.indexOf(e.properties.nodeIndex) > -1 && (e.properties.outline = !1) : e.properties.outline = !1;\n }), this.u = !0, this) : this;\n } },\n {\n key: \"isOutline\",\n value: function isOutline() {\n var t = this._getInternalSymbol();\n return !(!t || !O(t.outline)) && t.outline;\n } },\n {\n key: \"isVisible\",\n value: function isVisible() {\n var t = this._getInternalSymbol();\n return !t || !O(t.visible) || t.visible;\n } },\n {\n key: \"setCoordinates\",\n value: function setCoordinates(t) {\n return _superPropGet(ct, \"setCoordinates\", this, 3)([t]), this.u = !0, this.m = !0, this;\n } },\n {\n key: \"copy\",\n value: function copy() {\n var t = this.toJSON(),\n e = ct.fromJSON(t);\n return e.setZoomOnAdded(this.Et), e;\n } },\n {\n key: \"setShader\",\n value: function setShader(t) {\n return _superPropGet(ct, \"updateSymbol\", this, 3)([{\n shader: t }]),\n this;\n } },\n {\n key: \"getShader\",\n value: function getShader() {\n var t = this._getInternalSymbol();\n return t && t.shader || \"pbr\";\n } },\n {\n key: \"setUniforms\",\n value: function setUniforms(t) {\n return _superPropGet(ct, \"updateSymbol\", this, 3)([{\n uniforms: t }]),\n this.G = !0, this;\n } },\n {\n key: \"getUniforms\",\n value: function getUniforms() {\n var t = this._getInternalSymbol();\n return t && t.uniforms;\n } },\n {\n key: \"setUniform\",\n value: function setUniform(t, e) {\n var i = this.getUniforms() || {};\n return i[t] = e, _superPropGet(ct, \"updateSymbol\", this, 3)([{\n uniforms: i }]),\n this.G = !0, this;\n } },\n {\n key: \"getUniform\",\n value: function getUniform(t) {\n var e = this._getInternalSymbol();\n return e && e.uniforms && e.uniforms[t];\n } },\n {\n key: \"isAnimated\",\n value: function isAnimated() {\n var t = this._getInternalSymbol();\n return t && t.animation && this.L && this.L.animations;\n } },\n {\n key: \"isDashAnimated\",\n value: function isDashAnimated() {\n var t = this._getInternalSymbol();\n return t && t.uniforms && t.uniforms.dashEnabled && t.uniforms.dashAnimate;\n } },\n {\n key: \"setAnimation\",\n value: function setAnimation(t) {\n return _superPropGet(ct, \"updateSymbol\", this, 3)([{\n animation: t }]),\n delete this.jt, this;\n } },\n {\n key: \"setAnimationLoop\",\n value: function setAnimationLoop(t) {\n return _superPropGet(ct, \"updateSymbol\", this, 3)([{\n loop: t }]),\n delete this.jt, this.u = !0, this;\n } },\n {\n key: \"isAnimationLooped\",\n value: function isAnimationLooped() {\n var t = this._getInternalSymbol();\n return t && t.loop;\n } },\n {\n key: \"getAnimationSpeed\",\n value: function getAnimationSpeed() {\n var t = this._getInternalSymbol();\n return t && O(t.speed) ? t.speed : 1;\n } },\n {\n key: \"setAnimationSpeed\",\n value: function setAnimationSpeed(t) {\n return _superPropGet(ct, \"updateSymbol\", this, 3)([{\n speed: t }]),\n this;\n } },\n {\n key: \"Ut\",\n value: function Ut(t) {\n var e = this.getMap();\n return e ? T(e, t || this.getCoordinates()) : null;\n } },\n {\n key: \"setTRS\",\n value: function setTRS(t, e, i) {\n var s = t || this.p.translation;\n return this.updateSymbol({\n translationX: s[0],\n translationY: s[1],\n translationZ: s[2],\n rotationX: e[0],\n rotationY: e[1],\n rotationZ: e[2],\n scaleX: i[0],\n scaleY: i[1],\n scaleZ: i[2] }),\n this;\n } },\n {\n key: \"zt\",\n value: function zt() {\n var t = this.J(),\n e = this.Ut();\n return e ? _gl.vec3.add(t, t, e) : t;\n } },\n {\n key: \"updateSymbol\",\n value: function updateSymbol(t) {\n var _this12 = this;\n var _loop = function _loop(_e15) {\n if (\"bloom\" === _e15 && _this12.S && _this12.S.forEach(function (i) {\n i.bloom = +!!t[_e15];\n }), rt.has(_e15)) {\n _this12.m = !0;\n return 1;\n }\n };\n for (var _e15 in t) {\n if (_loop(_e15)) break;\n }\n return _superPropGet(ct, \"updateSymbol\", this, 3)([t]);\n } },\n {\n key: \"setTranslation\",\n value: function setTranslation(t, e, i) {\n return this.updateSymbol({\n translationX: t,\n translationY: e,\n translationZ: i }),\n this;\n } },\n {\n key: \"setRotation\",\n value: function setRotation(t, e, i) {\n return this.updateSymbol({\n rotationX: t,\n rotationY: e,\n rotationZ: i }),\n this;\n } },\n {\n key: \"rotateAround\",\n value: function rotateAround(t, e) {\n var i = this.getMap();\n if (!i) return;\n var s = i.getGLRes();\n var n = this.getCoordinates();\n var r = i.coordinateToPointAtRes(n, s),\n o = i.coordinateToPointAtRes(t, s),\n h = r.x - o.x,\n a = r.y - o.y,\n c = 180 * Math.atan2(a, h) / Math.PI + e,\n l = Math.sqrt(h * h + a * a),\n u = Math.PI * c / 180,\n f = l * Math.cos(u) + o.x,\n d = l * Math.sin(u) + o.y;\n it.set(f, d), n = i.pointAtResToCoordinate(it, s), this.setCoordinates(n), this.updateSymbol({\n rotationZ: c });\n\n } },\n {\n key: \"setScale\",\n value: function setScale(t, e, i) {\n return this.updateSymbol({\n scaleX: t,\n scaleY: e,\n scaleZ: i }),\n this;\n } },\n {\n key: \"getTranslation\",\n value: function getTranslation() {\n var t = this._getInternalSymbol(),\n e = t && t.translationX || 0,\n i = t && t.translationY || 0,\n s = t && t.translationZ || 0;\n return _gl.vec3.set(this.p.translation, e, i, s);\n } },\n {\n key: \"J\",\n value: function J() {\n var t = this.getTranslation();\n return this.getMap() ? this.Jt(t) : this.p.translation;\n } },\n {\n key: \"Jt\",\n value: function Jt(t) {\n var e = this.getMap(),\n i = e.distanceToPointAtRes(t[0], t[1], e.getGLRes(), it),\n s = e.altitudeToPoint(t[2], e.getGLRes());\n return _gl.vec3.set($, A(i.x, t[0]), A(i.y, t[1]), A(s, t[2]));\n } },\n {\n key: \"getRotation\",\n value: function getRotation() {\n var t = this._getInternalSymbol(),\n e = t && t.rotationX || 0,\n i = t && t.rotationY || 0,\n s = t && t.rotationZ || 0;\n return _gl.vec3.set(this.p.rotation, e, i, s);\n } },\n {\n key: \"getScale\",\n value: function getScale() {\n var t = this._getInternalSymbol();\n if (!t) return _gl.vec3.set(this.p.scale, 1, 1, 1);\n var i = _maptalks.Util.isNil(t.scaleX) ? 1 : t.scaleX,\n s = _maptalks.Util.isNil(t.scaleY) ? 1 : t.scaleY,\n n = _maptalks.Util.isNil(t.scaleZ) ? 1 : t.scaleZ;\n return _gl.vec3.set(this.p.scale, i, s, n);\n } },\n {\n key: \"ut\",\n value: function ut() {\n var t = this.getScale();\n if (this.lt) {\n var _e16 = this.T(),\n _i4 = this.getModelHeight();\n if (_e16 && _e16 > 0) {\n var _i5 = this.dt(K, _e16);\n return _gl.vec3.multiply(_i5, _i5, t);\n }\n if (_i4) {\n var _e17 = this.ft(K, _i4);\n return _gl.vec3.multiply(_e17, _e17, t);\n }\n }\n return t;\n } },\n {\n key: \"cancelMarkerPixelHeight\",\n value: function cancelMarkerPixelHeight() {\n return this.updateSymbol({\n markerPixelHeight: null });\n\n } },\n {\n key: \"setAnchorZ\",\n value: function setAnchorZ(t) {\n return this.updateSymbol({\n anchorZ: t }),\n this;\n } },\n {\n key: \"getAnchorZ\",\n value: function getAnchorZ() {\n var t = this._getInternalSymbol();\n return t && t.anchorZ || \"bottom\";\n } },\n {\n key: \"_setExternSymbol\",\n value: function _setExternSymbol(t) {\n return this.u = !0, _superPropGet(ct, \"_setExternSymbol\", this, 3)([t]);\n } },\n {\n key: \"Ht\",\n value: function Ht(t) {\n var _this13 = this;\n return (0, _functionType.loadFunctionTypes)(t, function () {\n var t = _this13.getMap();\n if (t) {\n return [t.getZoom()];\n }\n return null;\n });\n } },\n {\n key: \"_prepareSymbol\",\n value: function _prepareSymbol(t) {\n _superPropGet(ct, \"_prepareSymbol\", this, 3)([t]);\n var e = this.Ht(t);\n return e && e.uniforms && (e.uniforms = this.Ht(t.uniforms)), delete this.Vt, e;\n } },\n {\n key: \"hasFunctionDefinition\",\n value: function hasFunctionDefinition() {\n if (O(this.Vt)) return this.Vt;\n var t = this._getInternalSymbol();\n return this.Vt = (0, _functionType.hasFunctionDefinition)(t) || t && t.uniforms && (0, _functionType.hasFunctionDefinition)(t.uniforms), this.Vt;\n } },\n {\n key: \"setModelMatrix\",\n value: function setModelMatrix(t) {\n var e = _gl.mat4.getTranslation(this.p.translation, t),\n i = _gl.mat4.getRotation(this.p.rotation, t),\n s = _gl.mat4.getScaling(this.p.scale, t);\n return this.setTranslation(e[0], e[1], e[2]), this.setRotation(i[0], i[1], i[2]), this.setScale(s[0], s[1], s[2]), this;\n } },\n {\n key: \"getModelMatrix\",\n value: function getModelMatrix() {\n return this.h;\n } },\n {\n key: \"_\",\n value: function _() {\n var t = this.zt(),\n e = this.getRotation(),\n i = _gl.quat.fromEuler(V, e[0], e[1], e[2]),\n s = this.ut();\n this.h = _gl.mat4.fromRotationTranslationScale(this.h, i, t, s);\n } },\n {\n key: \"isDirty\",\n value: function isDirty() {\n return this.u;\n } },\n {\n key: \"C\",\n value: function C(t) {\n return this.u = t, this;\n } },\n {\n key: \"Zt\",\n value: function Zt() {\n var t = this.toJSON();\n return t.zoomOnAdded = this.Et, t;\n } },\n {\n key: \"toJSON\",\n value: function toJSON() {\n var t = JSON.parse(JSON.stringify({\n coordinates: this.getCoordinates(),\n options: this.options || {},\n type: \"GLTFMarker\" })),\n\n i = this.getId();\n _maptalks.Util.isNil(i) || (t.options.id = i);\n var s = this.getProperties();\n s && (t.options.properties = JSON.parse(JSON.stringify(s)));\n var n = this.getSymbol();\n return n && (t.options.symbol = JSON.parse(JSON.stringify(n))), t;\n } },\n {\n key: \"setZoomOnAdded\",\n value: function setZoomOnAdded(t) {\n this.Et = t;\n } },\n {\n key: \"getZoomOnAdded\",\n value: function getZoomOnAdded() {\n return this.Et;\n } },\n {\n key: \"W\",\n value: function W() {\n return this.M() < 1;\n } },\n {\n key: \"M\",\n value: function M() {\n var t = this.getUniforms(),\n e = this.getShader();\n return \"pbr\" === e || \"phong\" === e ? t && O(t.polygonOpacity) ? t.polygonOpacity : 1 : \"wireframe\" === e && t && O(t.lineOpacity) ? t.lineOpacity : 1;\n } },\n {\n key: \"R\",\n value: function R(t) {\n this.o = t;\n } },\n {\n key: \"isLoaded\",\n value: function isLoaded() {\n return this.o;\n } },\n {\n key: \"getGLTFMarkerType\",\n value: function getGLTFMarkerType() {\n return this.l;\n } },\n {\n key: \"qt\",\n value: function qt(t) {\n this.Wt = t;\n } },\n {\n key: \"X\",\n value: function X() {\n return this.Wt;\n } },\n {\n key: \"getCount\",\n value: function getCount() {\n return 1;\n } },\n {\n key: \"getContainerExtent\",\n value: function getContainerExtent() {\n return this.Nt();\n } },\n {\n key: \"getGLTFAsset\",\n value: function getGLTFAsset() {\n return this.L && this.L.asset;\n } },\n {\n key: \"openInfoWindow\",\n value: function openInfoWindow(t) {\n var _this14 = this;\n this.L ? _superPropGet(ct, \"openInfoWindow\", this, 3)([t]) : this.once(\"load\", function () {\n _superPropGet(ct, \"openInfoWindow\", _this14, 3)([t]);\n });\n } },\n {\n key: \"getAnimations\",\n value: function getAnimations() {\n if (!this.L) return null;\n var t = this.L,\n e = t.animations ? t.animations.map(function (t, e) {\n return {\n name: O(t.name) ? t.name : e };\n\n }) : null;\n return e ? e.map(function (t, e) {\n return t.name || e;\n }) : null;\n } },\n {\n key: \"getCurrentAnimation\",\n value: function getCurrentAnimation() {\n var t = this._getInternalSymbol();\n return t && t.animationName;\n } },\n {\n key: \"xt\",\n value: function xt() {\n var t = this.getAnimations();\n if (!t) return null;\n var e = this.getCurrentAnimation();\n if (!O(e)) return t.slice(0, 1);\n var i = [];\n e = Array.isArray(e) ? e : [e];\n for (var _s5 = 0; _s5 < e.length; _s5++) t.indexOf(e[_s5]) > -1 && i.push(e[_s5]);\n return i.length ? i : null;\n } },\n {\n key: \"setCurrentAnimation\",\n value: function setCurrentAnimation(t) {\n this.updateSymbol({\n animationName: t });\n\n } },\n {\n key: \"yt\",\n value: function yt(t) {\n O(this.jt) || (this.jt = t);\n } },\n {\n key: \"vt\",\n value: function vt() {\n return this.jt || 0;\n } },\n {\n key: \"_t\",\n value: function _t() {\n return this.Rt = this.Rt || {}, this.Rt;\n } },\n {\n key: \"T\",\n value: function T() {\n var t = this._getInternalSymbol();\n return t && t.markerPixelHeight;\n } },\n {\n key: \"setModelHeight\",\n value: function setModelHeight(t) {\n return this.updateSymbol({\n modelHeight: t }),\n this;\n } },\n {\n key: \"getModelHeight\",\n value: function getModelHeight() {\n var t = this._getInternalSymbol();\n return t && t.modelHeight;\n } },\n {\n key: \"getGLTFBBox\",\n value: function getGLTFBBox() {\n return this.lt;\n } },\n {\n key: \"zoomTo\",\n value: function zoomTo() {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n animation: !0 };\n\n var e = arguments.length > 1 ? arguments[1] : undefined;\n var i = this.getBoundingBox(),\n s = this.getMap();\n if (!s || !i) return;\n var n = i.min,\n r = i.max;\n it.set((n[0] + r[0]) / 2, (n[1] + r[1]) / 2);\n var o = s.getGLRes(),\n h = s.pointAtResToCoordinate(it, o);\n return h.z = (n[2] + r[2]) / 2 / s.altitudeToPoint(1, o), this.Xt(h, t, e);\n } },\n {\n key: \"Xt\",\n value: function Xt(t, e, i) {\n var s = this.getMap(),\n n = e.pitch || s.getPitch(),\n r = e.bearing || s.getBearing(),\n o = e.duration || 500,\n h = e.easing || \"linear\",\n a = this.Yt(e.heightOffset || 0) + (e.zoomOffset || 0);\n return e.animation || void 0 === e.animation ? s.animateTo({\n center: t,\n zoom: a,\n bearing: r,\n pitch: n },\n {\n duration: o,\n easing: h },\n i) : s.setView({\n center: t,\n zoom: a,\n bearing: r,\n pitch: n }),\n this;\n } },\n {\n key: \"Yt\",\n value: function Yt(t) {\n var e = this.getMap(),\n i = e.getGLRes(),\n s = e.distanceToPointAtRes(100, 0, i).x / 100,\n n = this.getBoundingBox(),\n r = n.min,\n h = n.max,\n a = h[2] / e.altitudeToPoint(1, i) + t,\n c = e.getFitZoomForAltitude(a * s);\n it.set(r[0], r[1]);\n var l = e.pointAtResToCoordinate(it, e.getGLRes());\n it.set(h[0], h[1]);\n var u = e.pointAtResToCoordinate(it, e.getGLRes()),\n f = new _maptalks.Extent(l, u),\n d = e.getFitZoom(f);\n return c < d ? c : d;\n } },\n {\n key: \"q\",\n value: function q() {\n return this.G;\n } },\n {\n key: \"$t\",\n value: function $t() {\n this.G = !1;\n } },\n {\n key: \"setAnimationTimeframe\",\n value: function setAnimationTimeframe(t) {\n var e = this.vt(),\n i = this._t();\n this.gltfPack.updateAnimation(t, this.isAnimationLooped(), this.getAnimationSpeed(), e, {}, i);\n } },\n {\n key: \"Bt\",\n value: function Bt() {\n delete this.At, delete this.Et;\n } },\n {\n key: \"gt\",\n value: function gt() {\n return \"effectmarker\" !== this.getGLTFMarkerType() && \"glowmarker\" !== this.getGLTFMarkerType();\n } },\n {\n key: \"_onEvent\",\n value: function _onEvent(t, e) {\n var i = this.getLayer();\n if (!i) return;\n var s = i.getId();\n this.Kt = t.gltfPickingInfo && t.gltfPickingInfo[s] || {}, _superPropGet(ct, \"_onEvent\", this, 3)([t, e]);\n } },\n {\n key: \"_fireEvent\",\n value: function _fireEvent(t, e) {\n for (var _t10 in this.Kt) e[_t10] = this.Kt[_t10];\n delete this.Kt, _superPropGet(ct, \"_fireEvent\", this, 3)([t, e]);\n } },\n {\n key: \"Qt\",\n value: function Qt() {\n var t = [];\n return this.S && this.isVisible() && this.M() ? this.isOutline && this.isOutline() ? this.S : (t = this.S.filter(function (t) {\n return t.properties.outline;\n }), t) : t;\n } },\n {\n key: \"highlightNodes\",\n value: function highlightNodes(t) {\n var _this15 = this;\n var e = this.S;\n e ? this.te(t, e) : this.once(\"load\", function () {\n _this15.te(t, _this15.S);\n }, this);\n } },\n {\n key: \"te\",\n value: function te(t, e) {\n var _this16 = this;\n t.forEach(function (t) {\n e.forEach(function (e) {\n e.properties.nodeIndex === t.nodeIndex && _this16.ee(e, t.color, t.opacity, t.bloom);\n });\n }), this.u = !0;\n } },\n {\n key: \"highlight\",\n value: function highlight(t) {\n var _this17 = this;\n var e = t.color,\n i = t.opacity,\n s = t.bloom,\n n = this.S;\n n ? (n.forEach(function (t) {\n _this17.ee(t, e, i, s);\n }), this.u = !0) : this.once(\"load\", function () {\n _this17.S.forEach(function (t) {\n _this17.ee(t, e, i, s);\n }), _this17.u = !0;\n }, this);\n } },\n {\n key: \"ee\",\n value: function ee(t, e, i, s) {\n t.properties.polygonFill || (t.properties.polygonFill = t.getUniform(\"polygonFill\") || st), t.properties.polygonOpacity || (t.properties.polygonOpacity = t.getUniform(\"polygonOpacity\") || 1), t.setUniform(\"polygonFill\", e || st), t.setUniform(\"polygonOpacity\", i || 1), t.bloom = s;\n } },\n {\n key: \"ie\",\n value: function ie() {\n if (this.se) if (Array.isArray(this.se)) {\n var _t11 = this.se.map(function (t) {\n return t.nodeIndex;\n });\n this.cancelHighlight(_t11);\n } else this.cancelHighlight(this.se.nodeIndex);\n } },\n {\n key: \"cancelHighlight\",\n value: function cancelHighlight(t) {\n var e = this.getLayer();\n if (!e) return;\n var i = e.getRenderer();\n if (!i) return;\n var s = this.S;\n if (s) {\n if (t) {\n var _e18 = t;\n Array.isArray(_e18) || (_e18 = [_e18]), s = s.filter(function (t) {\n return _e18.indexOf(t.properties.nodeIndex) > -1;\n });\n }\n s.forEach(function (t) {\n var _t$properties = t.properties,\n e = _t$properties.polygonFill,\n i = _t$properties.polygonOpacity;\n t.setUniform(\"polygonFill\", e), t.setUniform(\"polygonOpacity\", i), t.bloom = !1;\n }), i.setToRedraw();\n }\n } },\n {\n key: \"setNodeTRS\",\n value: function setNodeTRS(t) {\n var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var i = this.S;\n if (!i) return;\n var s = e.translation || this.p.translation,\n n = e.rotation || this.p.rotation,\n r = _gl.quat.fromEuler(V, n[0], n[1], n[2]),\n o = e.scale || this.p.scale;\n return i.forEach(function (e) {\n e.properties.nodeIndex === t && (e.et = _gl.mat4.fromRotationTranslationScale(e.et || [], r, s, o));\n }), this.A(i), this.u = !0, this;\n } }],\n [{\n key: \"parseJSONData\",\n value: function parseJSONData(t) {\n var e = ct.fromJSON(t);\n return e.setZoomOnAdded(t.zoomOnAdded), e;\n } },\n {\n key: \"fromJSON\",\n value: function fromJSON(t) {\n return new ct(t.coordinates, t.options);\n } },\n {\n key: \"getGLTFAnchorsAlongLineString\",\n value: function getGLTFAnchorsAlongLineString(t, i, s, n) {\n var r = [];\n for (var _o3 = 0; _o3 < t.length - 1; _o3++) {\n var _h3 = k(t[_o3], t[_o3 + 1], {\n map: s,\n bboxWidth: i,\n gapLength: n.gapLength || 0,\n count: n.count,\n rotateAlongLine: n.rotateAlongLine,\n snapToEndVertexes: n.snapToEndVertexes,\n scaleEndModel: n.scaleEndModel });\n\n _maptalks.Util.pushIn(r, _h3);\n }\n return r;\n } },\n {\n key: \"combineGLTFBoundingBox\",\n value: function combineGLTFBoundingBox(t) {\n var e = [];\n for (var _i6 = 0; _i6 < t.length; _i6++) {\n var _s6 = t[_i6].getBoundingBox();\n e.push([_s6.min, _s6.max]);\n }\n var i = e[0];\n if (!i) return null;\n var s = _gl.vec3.copy([], i[0]),\n n = _gl.vec3.copy([], i[1]);\n for (var _t12 = 1; _t12 < e.length; _t12++) {\n var _i7 = e[_t12],\n _r5 = _gl.vec3.copy([], _i7[0]),\n _o4 = _gl.vec3.copy([], _i7[1]);\n _r5[0] < s[0] && (s[0] = _r5[0]), _r5[1] < s[1] && (s[1] = _r5[1]), _r5[2] < s[2] && (s[2] = _r5[2]), _o4[0] > n[0] && (n[0] = _o4[0]), _o4[1] > n[1] && (n[1] = _o4[1]), _o4[2] > n[2] && (n[2] = _o4[2]);\n }\n return {\n min: s,\n max: n };\n\n } }]);\n\n }(_maptalks.Marker);\n ct.mergeOptions({\n symbol: null }),\n ct.registerJSONType(\"GLTFMarker\");\n var lt = [1, 1, 1, 1],\n ut = [],\n ft = [],\n dt = [1, 1, 1],\n mt = new _maptalks.Coordinate(0, 0),\n gt = [1, 1, 1],\n pt = [1, 1, 1];\n var _t = exports.MultiGLTFMarker = function (_ct) {\n function _t(t, e) {\n var _this18;\n _classCallCheck(this, _t);\n _this18 = _callSuper(this, _t, [null, e]), _this18.kt = t || [], _this18.ne = [], _this18.re = [0, 0, 0], _this18.oe = _gl.mat4.identity([]), _this18.l = \"multigltfmarker\", _this18.he = [];\n return _this18;\n }\n _inherits(_t, _ct);\n return _createClass(_t, [{\n key: \"setCoordinates\",\n value: function setCoordinates(t) {\n if (!Array.isArray(t)) {\n var _e19 = this.getCenter(),\n _s7 = t.sub(_e19);\n for (var _t13 = 0; _t13 < this.kt.length; _t13++) this.kt[_t13].coordinates instanceof _maptalks.Coordinate ? this.kt[_t13].coordinates = this.kt[_t13].coordinates.add(_s7) : (this.kt[_t13].coordinates[0] += _s7.x, this.kt[_t13].coordinates[1] += _s7.y);\n return this.u = !0, this;\n }\n return Array.isArray(t[0]) ? this.ae = t.map(function (t) {\n return new _maptalks.Coordinate(t);\n }) : this.ae = t, this.updateAllData(\"coordinates\", this.ae), this.u = !0, this;\n } },\n {\n key: \"getCoordinates\",\n value: function getCoordinates(t) {\n if (t && this.kt && this.kt.length) {\n var _e20 = t.index;\n return this.kt[_e20].coordinates;\n }\n return null;\n } },\n {\n key: \"addData\",\n value: function addData(t) {\n this.kt || (this.kt = []), this.kt.push(t);\n var e = this.getLayer();\n return e && e.ce(), this.u = !0, this;\n } },\n {\n key: \"removeData\",\n value: function removeData(t) {\n this.kt.splice(t, 1), this.ne && this.ne.splice(t, 1);\n var e = this.getLayer();\n return e && e.ce(), this.u = !0, this;\n } },\n {\n key: \"getData\",\n value: function getData(t) {\n return this.kt[t];\n } },\n {\n key: \"updateData\",\n value: function updateData(t, e, i) {\n return this.kt[t][e] = i, this.u = !0, this;\n } },\n {\n key: \"getAllData\",\n value: function getAllData() {\n return this.kt;\n } },\n {\n key: \"updateAllData\",\n value: function updateAllData(t, e) {\n for (var _i8 = 0; _i8 < this.kt.length; _i8++) this.updateData(_i8, t, e[_i8]);\n return this;\n } },\n {\n key: \"removeAllData\",\n value: function removeAllData() {\n this.kt && (this.kt = [], this.ne = [], this.u = !0);\n } },\n {\n key: \"Lt\",\n value: function Lt() {\n var t = this.getMap();\n if (this.kt && t) {\n this.le(), this.ne = this.ne || [];\n for (var _t14 = 0; _t14 < this.kt.length; _t14++) if (!1 !== this.kt[_t14].visible) {\n var _e21 = this.ue(_t14);\n this.ne[_t14] = _e21;\n }\n }\n } },\n {\n key: \"openInfoWindow\",\n value: function openInfoWindow(t) {\n var e = null;\n e = O(t) && this.kt[t] ? this.kt[t].coordinates : this.getCenter(), _superPropGet(_t, \"openInfoWindow\", this, 3)([e]);\n } },\n {\n key: \"getCenter\",\n value: function getCenter() {\n var t = 0,\n e = 0,\n s = 0,\n n = 0;\n for (var _r6 = 0, _o5 = this.kt.length; _r6 < _o5; _r6++) {\n var _o6 = this.kt[_r6].coordinates;\n _o6 instanceof _maptalks.Coordinate && (_o6 = _o6.toArray()), t += _o6[0], e += _o6[1], s += _o6[2] || 0, n++;\n }\n if (0 === n) return null;\n return mt.set(t / n, e / n, s / n);\n } },\n {\n key: \"getMap\",\n value: function getMap() {\n return _superPropGet(_t, \"getMap\", this, 3)([]) || this.i && this.i.getMap();\n } },\n {\n key: \"fe\",\n value: function fe(t) {\n this.i = t;\n } },\n {\n key: \"getLayer\",\n value: function getLayer() {\n return _superPropGet(_t, \"getLayer\", this, 3)([]) || this.i;\n } },\n {\n key: \"le\",\n value: function le() {\n var t = this.getMap(),\n e = this.getCenter();\n if (!e) return;\n this.re = T(t, e);\n var i = _gl.quat.fromEuler(ft, 0, 0, 0);\n _gl.mat4.fromRotationTranslationScale(this.oe, i, this.re, dt);\n } },\n {\n key: \"ue\",\n value: function ue(t) {\n var e = this.kt[t],\n i = this.Ut(e.coordinates);\n if (!i) return null;\n var s = _gl.vec3.sub(ut, i, this.re),\n n = this.Jt(e.translation || this.p.translation),\n r = _gl.vec3.add(ut, n || this.p.translation, s || this.p.translation),\n o = e.rotation || this.p.rotation,\n h = this.de(t),\n a = _gl.quat.fromEuler(ft, o[0] || 0, o[1] || 0, o[2] || 0);\n return _gl.mat4.fromRotationTranslationScale(this.ne[t] || [], a, r, h);\n } },\n {\n key: \"de\",\n value: function de(t) {\n var e = this.kt[t],\n i = e.modelHeight,\n s = e.markerPixelHeight,\n n = e.scale || this.p.scale;\n if (this.lt) {\n if (s && s > 0) {\n var _t15 = this.dt(gt, s);\n return _gl.vec3.multiply(_t15, _t15, n);\n }\n if (i) {\n var _t16 = this.ft(gt, i);\n return _gl.vec3.multiply(_t16, _t16, n);\n }\n }\n return n;\n } },\n {\n key: \"R\",\n value: function R(t) {\n if (_superPropGet(_t, \"R\", this, 3)([t]), this.kt) for (var _e22 = 0; _e22 < this.kt.length; _e22++) {\n var _i9 = this.kt[_e22];\n _i9.target && _i9.target instanceof ct && _i9.target.R(t);\n }\n } },\n {\n key: \"_\",\n value: function _() {\n _superPropGet(_t, \"_\", this, 3)([]), this.Lt();\n } },\n {\n key: \"me\",\n value: function me() {\n this.ge = {\n \"instance_vectorA\": [],\n \"instance_vectorB\": [],\n \"instance_vectorC\": [],\n \"instance_color\": [],\n \"aPickingId\": [],\n \"aOutline\": [],\n \"highlight_color\": [],\n \"aBloom\": [] },\n this.pe = {\n \"instance_vectorA\": [],\n \"instance_vectorB\": [],\n \"instance_vectorC\": [],\n \"instance_color\": [],\n \"aPickingId\": [],\n \"aOutline\": [],\n \"highlight_color\": [],\n \"aBloom\": [] };\n\n for (var _t17 = 0; _t17 < this.ne.length; _t17++) {\n var _e23 = this.ge;\n this.kt[_t17].bloom && (_e23 = this.pe);\n var _i10 = this.ne[_t17],\n _s8 = _e23.instance_vectorA.length / 4;\n this._e(_e23, \"instance_vectorA\", _s8, _i10, 0), this._e(_e23, \"instance_vectorB\", _s8, _i10, 1), this._e(_e23, \"instance_vectorC\", _s8, _i10, 2);\n var _n4 = this.kt[_t17].color || lt,\n _r7 = this.kt[_t17].highlightColor || lt;\n _e23.instance_color[4 * _s8] = _n4[0], _e23.instance_color[4 * _s8 + 1] = _n4[1], _e23.instance_color[4 * _s8 + 2] = _n4[2], _e23.instance_color[4 * _s8 + 3] = _n4[3], _e23.aPickingId[_s8] = this.X() + _t17, _e23.aOutline[_s8] = this.kt[_t17].outline ? 1 : 0, _e23.highlight_color[4 * _s8] = _r7[0], _e23.highlight_color[4 * _s8 + 1] = _r7[1], _e23.highlight_color[4 * _s8 + 2] = _r7[2], _e23.highlight_color[4 * _s8 + 3] = _r7[3], _e23.aBloom[_s8] = this.kt[_t17].bloom ? 1 : 0;\n }\n return {\n attributesData: this.ge,\n bloomAttributesData: this.pe };\n\n } },\n {\n key: \"st\",\n value: function st(t) {\n var _this$It = this.It(),\n e = _this$It.attributesData,\n i = _this$It.bloomAttributesData;\n for (var _i11 in e) t.updateInstancedData(_i11, e[_i11]);\n if (this.regl ? t.generateInstancedBuffers(this.regl) : (this.Dt = this.Dt || [], this.Dt.push(t)), t.instanceCount = this.ge.instance_vectorA.length / 4, this.xe()) {\n var _e24 = i,\n _s9 = _e24.aBloom.length;\n t.properties.bloomMesh = t.properties.bloomMesh || new _gl.reshader.InstancedMesh(_e24, _s9, t.geometry, t.material);\n var _n5 = t.properties.bloomMesh;\n _n5.positionMatrix = t.positionMatrix, _n5.localTransform = t.localTransform;\n for (var _t18 in _e24) _n5.updateInstancedData(_t18, _e24[_t18]);\n _n5.generateInstancedBuffers(this.regl);\n var _r8 = t.getDefines();\n _n5.setDefines(_r8), _n5.uniforms = t.uniforms, _n5.bloom = 1, _n5.instanceCount = _s9;\n } else t.properties.bloomMesh && (t.properties.bloomMesh.dispose(), delete t.properties.bloomMesh);\n } },\n {\n key: \"ye\",\n value: function ye(t, e, i, s) {\n this.pe[t] && i && (this.pe[t][4 * e] = i[s], this.pe[t][4 * e + 1] = i[s + 4], this.pe[t][4 * e + 2] = i[s + 8], this.pe[t][4 * e + 3] = i[s + 12]);\n } },\n {\n key: \"xe\",\n value: function xe() {\n return this.pe && this.pe.aBloom.length;\n } },\n {\n key: \"_e\",\n value: function _e(t, e, i, s, n) {\n t[e] && s && (t[e][4 * i] = s[n], t[e][4 * i + 1] = s[n + 4], t[e][4 * i + 2] = s[n + 8], t[e][4 * i + 3] = s[n + 12]);\n } },\n {\n key: \"It\",\n value: function It(t) {\n return !this.u && this.ge ? {\n attributesData: this.ge,\n bloomAttributesData: this.pe } :\n this.me(t);\n } },\n {\n key: \"it\",\n value: function it() {\n return this.oe;\n } },\n {\n key: \"getCount\",\n value: function getCount() {\n return this.kt.length;\n } },\n {\n key: \"ve\",\n value: function ve() {\n return this.Lt(), this.pe ? this.pe.aBloom.length : 0;\n } },\n {\n key: \"Ft\",\n value: function Ft() {\n return this.getCount() - this.ve();\n } },\n {\n key: \"toJSON\",\n value: function toJSON() {\n var t = JSON.parse(JSON.stringify({\n data: this.kt,\n options: this.options,\n type: \"MultiGLTFMarker\" })),\n\n e = this.getProperties();\n return t.options && (t.options.properties = e), t;\n } },\n {\n key: \"getIndexByPickingId\",\n value: function getIndexByPickingId(t) {\n return t - this.X();\n } },\n {\n key: \"outline\",\n value: function outline(t) {\n return O(t) && this.updateData(t, \"outline\", !0), this;\n } },\n {\n key: \"cancelOutline\",\n value: function cancelOutline(t) {\n return O(t) && this.updateData(t, \"outline\", !1), this;\n } },\n {\n key: \"isOutline\",\n value: function isOutline() {\n if (!this.kt || !this.kt.length) return !1;\n for (var _t19 = 0; _t19 < this.kt.length; _t19++) if (this.kt[_t19].outline) return !0;\n return !1;\n } },\n {\n key: \"W\",\n value: function W() {\n var t = this.getAllData();\n for (var _e25 = 0; _e25 < t.length; _e25++) {\n var _i12 = t[_e25].color;\n if (_i12 && _i12[3] < 1) return !0;\n }\n return !1;\n } },\n {\n key: \"highlightNodes\",\n value: function highlightNodes(t, e) {\n var i = this.S;\n if (!i) return;\n var s = this.kt[t];\n s && (e.forEach(function (t) {\n i.forEach(function (e) {\n if (e.properties.nodeIndex === t.nodeIndex) {\n var _i13 = t.color,\n _n6 = t.opacity,\n _r9 = t.bloom;\n s.highlightColor = _i13 || pt, s.highlightColor[3] = _n6 || 1, s.highlightBloom = _r9;\n var _o7 = e.getDefines();\n _o7.HAS_INSTANCE_HIGHLIGHT = 1, e.setDefines(_o7);\n }\n });\n }), this.u = !0);\n } },\n {\n key: \"highlight\",\n value: function highlight(t, e) {\n var i = e.color,\n s = e.opacity,\n n = e.bloom,\n r = this.S;\n if (!r) return;\n var o = this.kt[t];\n o && (o.highlightColor = i || pt, o.highlightColor[3] = s || 1, o.highlightBloom = n, r.forEach(function (t) {\n var e = t.getDefines();\n e.HAS_INSTANCE_HIGHLIGHT = 1, t.setDefines(e);\n }), this.u = !0);\n } },\n {\n key: \"cancelHighlight\",\n value: function cancelHighlight(t, e) {\n var i = this.S;\n if (!i) return;\n var s = this.kt[t];\n if (s) {\n if (e) {\n var _t20 = e;\n Array.isArray(_t20) || (_t20 = [_t20]), i = i.filter(function (e) {\n return _t20.indexOf(e.properties.nodeIndex) > -1;\n });\n }\n i.forEach(function (t) {\n var e = t.getDefines();\n delete e.HAS_INSTANCE_HIGHLIGHT, t.setDefines(e), s.highlightColor = pt, s.highlightColor[3] = 1, s.highlightBloom = 0;\n }), this.u = !0;\n }\n } },\n {\n key: \"zoomAt\",\n value: function zoomAt(t) {\n var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n animation: !0,\n zoomOffset: 0 };\n\n var s = arguments.length > 2 ? arguments[2] : undefined;\n var n = this.kt[t];\n if (!n) throw new Error(\"data item is not exist\");\n var r = new _maptalks.Coordinate(n.coordinates);\n return this.Xt(r, e, s);\n } }],\n [{\n key: \"fromJSON\",\n value: function fromJSON(t) {\n return new _t(t.data, t.options);\n } }]);\n\n }(ct);\n _t.registerJSONType(\"MultiGLTFMarker\");\n var xt = [],\n yt = [],\n vt = [\"points\", \"lines\", \"line strip\", \"line loop\"];\n var wt = function (_g) {\n function wt(t) {\n var _this19;\n _classCallCheck(this, wt);\n _this19 = _callSuper(this, wt, [t]), _this19.we = {}, _this19.be = [], _this19.Me = {};\n return _this19;\n }\n _inherits(wt, _g);\n return _createClass(wt, [{\n key: \"onAdd\",\n value: function onAdd() {\n _superPropGet(wt, \"onAdd\", this, 3)([]), this.prepareWorker();\n } },\n {\n key: \"draw\",\n value: function draw(t, e) {\n this.prepareCanvas(), this.Se(e, t);\n } },\n {\n key: \"drawOnInteracting\",\n value: function drawOnInteracting(t, e, i) {\n this.Se(i, e);\n } },\n {\n key: \"Se\",\n value: function Se(e, i) {\n this.Oe = e, this.Te = i;\n var s = 0;\n this.Ae(e), this.ke = {}, this.Pe(e);\n var n = this.Ce(e);\n this.Le(i);\n var r = e && e.renderTarget ? e.renderTarget.fbo : null;\n var o = 0;\n for (var _i14 in this.we) {\n if (\"pointline\" === _i14) continue;\n if (e) {\n var _this$Ie = this.Ie(e, _i14),\n _s10 = _this$Ie.newShader,\n _r10 = _this$Ie.uniforms;\n this.we[_i14].shader = _s10, t.Util.extend(n, _r10);\n }\n var _h4 = this.Fe(_i14),\n _a2 = this.we[_i14].shader;\n _a2.filter = e && e.sceneFilter || null, o += this.renderer.render(_a2, n, _h4, r), s++;\n }\n var h = this.Fe(\"pointline\");\n if (h.getMeshes().length) {\n n.pointSize = this.layer.options.pointSize || 1;\n var _t21 = this.we.pointline.shader;\n _t21.filter = e && e.sceneFilter || null, o += this.renderer.render(_t21, n, h, r), s++;\n }\n this.De(n, r), o && this.layer.fire(\"canvasisdirty\", {\n renderCount: o }),\n this.Ge = !0, this.completeRender(), this.layer.fire(\"rendercomplete-debug\", {\n count: s });\n\n } },\n {\n key: \"De\",\n value: function De(t, e) {\n this.Ne || (this.Ne = new _gl.reshader.Scene());\n var i = this.layer.getGeometries(),\n s = [];\n for (var _t22 = 0; _t22 < i.length; _t22++) {\n if (!i[_t22].options.showDebugBoundingBox) continue;\n var _e26 = i[_t22].ot();\n _e26 && s.push(_e26);\n }\n s.length && (this.Ne.setMeshes(s), this.renderer.render(this.we.wireframe.shader, t, this.Ne, e));\n } },\n {\n key: \"Ee\",\n value: function Ee(t) {\n var e = t.getUniform(\"polygonFill\") || [1, 1, 1, 1],\n i = t.getUniform(\"polygonOpacity\") || 1;\n return e[3] = i, {\n coordinates: t.getCoordinates(),\n translation: t.getTranslation(),\n rotation: t.getRotation(),\n scale: t.getScale(),\n visible: t.isVisible(),\n color: e,\n bloom: t.isBloom(),\n outline: t.isOutline(),\n modelHeight: t.getModelHeight(),\n markerPixelHeight: t.T(),\n anchorZ: t.getAnchorZ(),\n pickingId: t.X(),\n target: t };\n\n } },\n {\n key: \"Be\",\n value: function Be(t) {\n var e = this.Ee(t),\n i = new _t([e], {\n symbol: {\n url: t.getUrl(),\n shader: t.getShader(),\n shadow: t.isCastShadow() } });\n\n\n return i.Re = i.Re || [], t.je = !0, i.Re.push(t), i.fe(t.getLayer()), i;\n } },\n {\n key: \"Ue\",\n value: function Ue() {\n for (var _t23 in this.Me) {\n this.Me[_t23].removeAllData();\n }\n } },\n {\n key: \"ze\",\n value: function ze(e, i) {\n var s = e.getMeshes(this.N, this.regl, i),\n n = e.getShader();\n if (s.length) {\n this.be.push(e), this.ke[n] = this.ke[n] || [], t.Util.pushIn(this.ke[n], s);\n for (var _t24 = 0; _t24 < s.length; _t24++) s[_t24].properties.bloomMesh && this.ke[n].push(s[_t24].properties.bloomMesh);\n }\n } },\n {\n key: \"Le\",\n value: function Le(t) {\n this.be.length = 0;\n var e = this.layer.getGeometries();\n this.Je() && this.Ue();\n for (var _i15 = 0; _i15 < e.length; _i15++) {\n var _s11 = e[_i15],\n _n7 = _s11.getUrl();\n if (_s11 instanceof _t || _s11.isAnimated() || !_s11.je) this.ze(_s11, t);else if (this.Je()) {\n var _t25 = \"\".concat(_n7, \"_\").concat(_s11.getShader(), \"_\").concat(_s11.isCastShadow() ? 1 : 0);\n this.Me[_t25] ? this.Me[_t25].addData(this.Ee(_s11)) : this.Me[_t25] = this.Be(_s11);\n }\n }\n for (var _e27 in this.Me) {\n var _i16 = this.Me[_e27];\n _i16.createdBygltfmarker = !0, this.ze(_i16, t);\n }\n } },\n {\n key: \"Ce\",\n value: function Ce() {\n var e = {};\n this.He.outSize = [this.canvas.width, this.canvas.height], this.He.halton = [0, 0];\n var i = this.canvas.gl && this.canvas.gl.wrap ? this.layer.options.opacity || 0 : 1;\n e.layerOpacity = i, t.Util.extend(e, this.He);\n var s = this.getMaskUniforms();\n return t.Util.extend(e, s), e;\n } },\n {\n key: \"Fe\",\n value: function Fe(t) {\n var e = [],\n i = [];\n if (\"pointline\" === t) {\n for (var _t26 in this.ke) {\n if (\"wireframe\" === _t26) continue;\n this.ke[_t26].forEach(function (t) {\n vt.indexOf(t.geometry.desc.primitive) > -1 && e.push(t);\n });\n }\n var _t27 = new _gl.reshader.Scene(e);\n return _t27.sortMeshes(this.He.cameraPosition), _t27;\n }\n for (var _e28 in this.ke) {\n var _s12 = this.ke[_e28];\n _e28 === t && _s12.forEach(function (e) {\n (vt.indexOf(e.geometry.desc.primitive) < 0 || \"wireframe\" === t) && i.push(e);\n });\n }\n var s = this.Ve = this.Ve || new _gl.reshader.Scene();\n return s.setMeshes(i), s.sortMeshes(this.He.cameraPosition), s;\n } },\n {\n key: \"needToRedraw\",\n value: function needToRedraw() {\n return !!_superPropGet(wt, \"needToRedraw\", this, 3)([]) || this.Je();\n } },\n {\n key: \"Je\",\n value: function Je() {\n var t = this.layer.getGeometries();\n for (var _e29 = 0; _e29 < t.length; _e29++) if (this.be.indexOf(t[_e29]) > -1 && (t[_e29].isDirty() || t[_e29].isAnimated())) return !0;\n return !1;\n } },\n {\n key: \"onRemove\",\n value: function onRemove() {\n this.workerConn && (this.workerConn.removeLayer(this.layer.getId(), function (t) {\n if (t) throw t;\n }), this.workerConn.remove(), delete this.workerConn), _superPropGet(wt, \"onRemove\", this, 3)([]);\n } },\n {\n key: \"hitDetect\",\n value: function hitDetect() {\n return !1;\n } },\n {\n key: \"createContext\",\n value: function createContext() {\n var _this20 = this;\n var t = this.canvas.gl && this.canvas.gl.wrap;\n if (t) this.gl = this.canvas.gl.wrap(), this.regl = this.canvas.gl.regl;else {\n var _t28 = this.layer.options.glOptions || {\n alpha: !0,\n depth: !0,\n stencil: !0 };\n\n this.glOptions = _t28, this.gl = this.gl || this.Ze(this.canvas, _t28), this.regl = (0, _gl.createREGL)({\n gl: this.gl,\n optionalExtensions: [\"ANGLE_instanced_arrays\", \"OES_element_index_uint\", \"OES_standard_derivatives\", \"OES_vertex_array_object\", \"OES_texture_half_float\", \"OES_texture_half_float_linear\", \"OES_texture_float\", \"OES_texture_float_linear\", \"WEBGL_depth_texture\", \"EXT_shader_texture_lod\", \"WEBGL_compressed_texture_s3tc\"] });\n\n }\n t && (this.canvas.pickingFBO = this.canvas.pickingFBO || this.regl.framebuffer(this.canvas.width, this.canvas.height)), this.pickingFBO = this.canvas.pickingFBO || this.regl.framebuffer(this.canvas.width, this.canvas.height), this.N = this.regl.gltfManager = this.regl.gltfManager || this.qe(), this.We(), this.Dt && this.Dt.forEach(function (t) {\n t.generateInstancedBuffers(_this20.regl);\n }), this.Ct && this.Ct.forEach(function (t) {\n t.generateBuffers(_this20.regl);\n }), this.layer.fire(\"contextcreate\", {\n regl: this.regl });\n\n } },\n {\n key: \"getGLTFManager\",\n value: function getGLTFManager() {\n return this.N;\n } },\n {\n key: \"qe\",\n value: function qe() {\n return new _gl.reshader.GLTFManager(this.regl);\n } },\n {\n key: \"We\",\n value: function We() {\n var t = this.layer.getMap(),\n e = new _gl.reshader.Renderer(this.regl);\n this.renderer = e, this.He = {\n \"projMatrix\": t.projMatrix,\n \"projViewMatrix\": t.projViewMatrix,\n \"viewMatrix\": t.viewMatrix,\n \"cameraPosition\": t.cameraPosition,\n \"altitudeScale\": 1 },\n _gl.reshader.pbr.PBRUtils.loginIBLResOnCanvas(this.canvas, this.regl, t), this.Xe = new _gl.reshader.FBORayPicking(e, {\n vert: \"#include \\n\\nattribute vec3 aPosition;\\n\\nuniform mat4 projMatrix;\\n\\nuniform mat4 modelMatrix;\\n\\nuniform mat4 positionMatrix;\\n\\nuniform mat4 modelViewMatrix;\\n\\nuniform float pointSize;\\n\\n#include \\n\\n#include \\n\\nvoid main()\\n\\n{\\n\\n mat4 localPositionMatrix = getPositionMatrix();\\n\\n gl_Position = projMatrix * modelViewMatrix * localPositionMatrix * getPosition(aPosition);\\n\\n gl_PointSize = pointSize;\\n\\n fbo_picking_setData(gl_Position.w, true);\\n\\n}\\n\\n\",\n uniforms: [{\n name: \"modelViewMatrix\",\n type: \"function\",\n fn: function fn(t, e) {\n return _gl.mat4.multiply([], e.viewMatrix, e.modelMatrix);\n } }] },\n\n this.pickingFBO, t);\n } },\n {\n key: \"prepareWorker\",\n value: function prepareWorker() {\n var _this21 = this;\n this.workerConn || (this.workerConn = new F(\"@maptalks/gltf-layer\", this.layer));\n var t = this.workerConn;\n if (!t.isActive()) return;\n var e = this.layer.options || {},\n i = this.layer.getId();\n t.addLayer(i, {\n markerType: e.markerTypes,\n pointSize: e.pointSize },\n function (t) {\n if (t) throw t;\n _this21.layer && (_this21.ready = !0, _this21.layer.fire(\"workerready\"));\n });\n } },\n {\n key: \"H\",\n value: function H(t) {\n var _this22 = this;\n var e;\n if (this.layer.getURLModifier()) {\n var _i17 = this.layer.options.fetchOptions;\n e = z(null, t, _i17, function (t) {\n var e = _this22.layer.getURLModifier();\n return e ? e(t) : t;\n });\n } else e = this.workerConn.loadGLTF(t);\n return e.then(function (t) {\n return _this22.setToRedraw(), _this22.Ye = !0, t;\n }).catch(function (e) {\n console.error(e), _this22.layer.fire(\"modelerror\", {\n type: \"modelerror\",\n url: t,\n info: e });\n\n });\n } },\n {\n key: \"Pe\",\n value: function Pe(t) {\n var e = L;\n for (var _i18 in e) {\n if (this.we[_i18]) continue;\n var _s13 = e[_i18];\n this.$e(t, _s13.name, _s13.type, _s13.config);\n }\n } },\n {\n key: \"$e\",\n value: function $e(e, i, s, n) {\n var _this23 = this;\n this.viewport || (this.viewport = {\n x: 0,\n y: 0,\n width: function width() {\n return _this23.canvas ? _this23.canvas.width : 1;\n },\n height: function height() {\n return _this23.canvas ? _this23.canvas.height : 1;\n } }),\n n.extraCommandProps || (n.extraCommandProps = {});\n var r = {};\n e && this.Ke(r, xt, e);\n var o = t.Util.extend({}, n);\n o.extraCommandProps = t.Util.extend({}, n.extraCommandProps), o.extraCommandProps.viewport = this.viewport, o.uniforms = t.Util.extend([], n.uniforms, xt), o.defines = t.Util.extend({}, o.defines, r), s.indexOf(\".\") > -1 ? (s = s.split(\".\"), this.we[i] = {\n shader: new _gl.reshader[s[0]][s[1]](o),\n type: s }) :\n this.we[i] = {\n shader: new _gl.reshader[s](o),\n type: s };\n\n } },\n {\n key: \"remove\",\n value: function remove() {\n this.Qe();\n var t = this.we;\n for (var _e30 in t) t[_e30].shader.dispose();\n this.extentShader && this.extentShader.dispose(), _superPropGet(wt, \"remove\", this, 3)([]);\n } },\n {\n key: \"clearCanvas\",\n value: function clearCanvas() {\n this.canvas && (this.regl.clear({\n color: [0, 0, 0, 0],\n depth: 1,\n stencil: 0 }),\n _superPropGet(wt, \"clearCanvas\", this, 3)([]));\n } },\n {\n key: \"resizeCanvas\",\n value: function resizeCanvas(t) {\n _superPropGet(wt, \"resizeCanvas\", this, 3)([t]), this.pickingFBO && this.pickingFBO.resize(this.canvas.width, this.canvas.height), this.layer.fire(\"resizecanvas\", {\n size: t });\n\n } },\n {\n key: \"getFrameTimestamp\",\n value: function getFrameTimestamp() {\n return this.Te;\n } },\n {\n key: \"getFrameContext\",\n value: function getFrameContext() {\n return this.Oe;\n } },\n {\n key: \"needRetireFrames\",\n value: function needRetireFrames() {\n return this.Ye;\n } },\n {\n key: \"Ke\",\n value: function Ke(e, i, s) {\n var n = s && s.includes;\n if (n) for (var _r11 in n) n[_r11] && (s[_r11].uniformDeclares && (i.length = 0, i.push.apply(i, _toConsumableArray(s[_r11].uniformDeclares))), s[_r11].defines && t.Util.extend(e, s[_r11].defines));\n } },\n {\n key: \"ti\",\n value: function ti(e, i) {\n var s = i && i.includes;\n if (s) for (var _n8 in s) s[_n8] && i[_n8].renderUniforms && t.Util.extend(e, i[_n8].renderUniforms);\n } },\n {\n key: \"Ie\",\n value: function Ie(e, i) {\n var _this$we$i = this.we[i],\n s = _this$we$i.shader,\n n = _this$we$i.type;\n var r = null;\n var o = {};\n if (this.ti(o, e), e.states.includesChanged) {\n var _i19 = {};\n this.Ke(_i19, xt, e);\n var _o8 = {\n vert: s.vert,\n frag: s.frag,\n uniforms: s.uniforms,\n extraCommandProps: s.extraCommandProps };\n\n _o8.defines = _i19, _o8.uniforms = t.Util.extend([], _o8.uniforms, xt), r = Array.isArray(n) ? new _gl.reshader[n[0]][n[1]](_o8) : new _gl.reshader[n](_o8), s.dispose();\n } else r = s;\n return {\n uniforms: o,\n newShader: r };\n\n } },\n {\n key: \"ei\",\n value: function ei(e, i, s) {\n if (e.viewshed) {\n for (var _t29 in e.viewshed.renderUniforms) s[_t29] = e.viewshed.renderUniforms[_t29];\n t.Util.extend(i.shaderDefines, e.viewshed.defines);\n }\n if (e.floodAnalysis) {\n for (var _t30 in e.floodAnalysis.renderUniforms) s[_t30] = e.floodAnalysis.renderUniforms[_t30];\n t.Util.extend(i.shaderDefines, e.floodAnalysis.defines);\n }\n return s;\n } },\n {\n key: \"getShadowMeshes\",\n value: function getShadowMeshes() {\n var e = [];\n if (!this.layer || !this.layer.isVisible() || !this.ke) return e;\n var i = this.layer.getGeometries();\n for (var _s14 = 0; _s14 < i.length; _s14++) if (i[_s14].isCastShadow() && i[_s14].isVisible() && i[_s14].M() && !i[_s14].je) {\n var _n9 = i[_s14].S || [];\n t.Util.pushIn(e, _n9);\n }\n for (var _i20 in this.Me) {\n var _s15 = this.Me[_i20];\n if (_s15.isCastShadow() && _s15.isVisible() && _s15.M()) {\n var _i21 = _s15.S || [];\n t.Util.pushIn(e, _i21);\n }\n }\n return e;\n } },\n {\n key: \"ii\",\n value: function ii() {\n var e = [];\n if (!this.ke || !Object.keys(this.ke).length) return e;\n for (var _i22 in this.ke) t.Util.pushIn(e, this.ke[_i22]);\n return e;\n } },\n {\n key: \"getAnalysisMeshes\",\n value: function getAnalysisMeshes() {\n return this.ii();\n } },\n {\n key: \"getRayCastData\",\n value: function getRayCastData(t) {\n var e = this.layer.getGeometries();\n for (var _i23 = 0; _i23 < e.length; _i23++) {\n var _s16 = e[_i23].S;\n if (_s16 && _s16.indexOf(t) > -1) return e[_i23];\n }\n return null;\n } },\n {\n key: \"drawOutline\",\n value: function drawOutline(t) {\n this.extentShader || (this.extentShader = new _gl.reshader.MeshShader({\n vert: \"attribute vec3 aPosition;\\n\\nattribute float aOutline;\\n\\nuniform mat4 projMatrix;\\n\\nuniform mat4 modelMatrix;\\n\\nuniform mat4 modelViewMatrix;\\n\\nuniform mat4 positionMatrix;\\n\\nuniform float instance;\\n\\n#include \\n\\n\\n\\nvarying float vOutline;\\n\\nvoid main()\\n\\n{\\n\\n mat4 localPositionMatrix = getPositionMatrix();\\n\\n gl_Position = projMatrix * modelViewMatrix * localPositionMatrix * getPosition(aPosition);\\n\\n if (instance == 0.0) {\\n\\n vOutline = 1.0;\\n\\n } else {\\n\\n vOutline = aOutline;\\n\\n }\\n\\n}\\n\\n\",\n frag: \"precision highp float;\\n\\nvarying float vOutline;\\n\\nvoid main() {\\n\\n gl_FragColor = vec4(vOutline);\\n\\n}\\n\\n\",\n uniforms: [{\n name: \"modelViewMatrix\",\n type: \"function\",\n fn: function fn(t, e) {\n return _gl.mat4.multiply([], e.viewMatrix, e.modelMatrix);\n } }],\n\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n viewport: this.viewport,\n cull: {\n enable: !1 },\n\n blend: {\n enable: !0,\n func: {\n src: \"src alpha\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } }));\n\n\n\n var e = this.getOutlineMeshes();\n e.length && (this.si = this.si || new _gl.reshader.Scene(), this.si.setMeshes(e), this.renderer.render(this.extentShader, {\n \"projMatrix\": this.He.projMatrix,\n \"viewMatrix\": this.He.viewMatrix },\n this.si, t));\n } },\n {\n key: \"getOutlineMeshes\",\n value: function getOutlineMeshes() {\n var e = [];\n if (!this.layer) return e;\n var i = this.layer.getGeometries();\n for (var _s17 = 0; _s17 < i.length; _s17++) {\n if (i[_s17].je) continue;\n var _n10 = i[_s17].Qt();\n t.Util.pushIn(e, _n10);\n }\n for (var _i24 in this.Me) {\n var _s18 = this.Me[_i24].Qt();\n t.Util.pushIn(e, _s18);\n }\n return e;\n } },\n {\n key: \"Qe\",\n value: function Qe() {\n this.canvas && _gl.reshader.pbr.PBRUtils.logoutIBLResOnCanvas(this.canvas, this.getMap());\n } },\n {\n key: \"Ae\",\n value: function Ae(e) {\n var i = this.layer.getMap(),\n _l$pbr$PBRUtils$getIB2 = _gl.reshader.pbr.PBRUtils.getIBLResOnCanvas(this.canvas),\n s = _l$pbr$PBRUtils$getIB2.iblTexes,\n n = _l$pbr$PBRUtils$getIB2.dfgLUT;\n if (i && i.getLights()) {\n var _r12 = _gl.reshader.pbr.PBRUtils.getPBRUniforms(i, s, n, e && e.ssr, e && e.jitter),\n _o9 = i.getLights(),\n _h5 = _o9.ambient && _o9.ambient.color ? _o9.ambient.color : [.2, .2, .2];\n this.He.ambientColor = _h5, _r12 && t.Util.extend(this.He, _r12);\n } else {\n var _s19 = _gl.reshader.pbr.PBRUtils.getPBRUniforms(i, null, n, e && e.ssr, e && e.jitter);\n t.Util.extend(this.He, _s19);\n }\n } },\n {\n key: \"Ze\",\n value: function Ze(t, e) {\n var i = [\"webgl\", \"experimental-webgl\"];\n var s = null;\n for (var _n11 = 0; _n11 < i.length; ++_n11) {\n try {\n s = t.getContext(i[_n11], e);\n } catch (t) {}\n if (s) break;\n }\n return s;\n } },\n {\n key: \"ni\",\n value: function ni(e, i) {\n var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (!this.Xe || !this.layer.isVisible()) return null;\n var n = this.layer.getMap(),\n r = this.canvas.gl && this.canvas.gl.wrap;\n if (this.Ge || r) {\n if (!this.ke || !Object.keys(this.ke).length) return null;\n var _e31 = this.ii(),\n _i25 = t.Util.extend({}, this.He);\n _i25.pointSize = this.layer.options.pointSize || 1, this.Xe.render(_e31, _i25, !0), this.Ge = !1;\n }\n var o = s.returnAll ? \"pickAll\" : \"pick\",\n h = this.Xe[o](e, i, s.tolerance || 3, {\n \"projMatrix\": n.projMatrix,\n \"viewMatrix\": n.viewMatrix,\n \"pointSize\": this.layer.options.pointSize || 1 },\n {\n viewMatrix: n.viewMatrix,\n projMatrix: n.projMatrix,\n returnPoint: !0 });\n\n if (h.length) {\n var _t31 = {},\n _e32 = [];\n for (var _i26 = 0; _i26 < h.length; _i26++) if (!_t31[h[_i26].pickingId]) {\n var _s20 = this.ri(h[_i26]);\n _t31[h[_i26].pickingId] = !0, _e32.push(_s20);\n }\n return _e32;\n }\n return this.ri(h);\n } },\n {\n key: \"ri\",\n value: function ri(t) {\n var e = t.meshId,\n i = t.pickingId,\n s = t.point,\n n = t.coordinate,\n r = this.ii()[e],\n o = this.oi(i);\n return {\n meshId: e,\n mesh: r,\n data: this.layer.hi()[o],\n pickingId: i,\n point: s,\n coordinate: n,\n index: i - o,\n nodeIndex: this.ai(e) };\n\n } },\n {\n key: \"ai\",\n value: function ai(t) {\n var e = this.ii()[t];\n return e && e.properties.nodeIndex;\n } },\n {\n key: \"oi\",\n value: function oi(t) {\n if (!O(t)) return null;\n if (this.layer.hi()[t]) return t;\n var e = Object.keys(this.layer.hi()),\n i = e.length;\n var s = 0,\n n = i - 1,\n r = Math.floor((s + n) / 2);\n for (; s <= i - 1 && n >= 0;) {\n if (s === n) return e[s];\n if (e[r] <= t && t < e[r + 1]) return e[r];\n t < e[r] ? (n = r - 1, r = Math.floor((s + n) / 2)) : e[r + 1] < t && (s = r + 1, r = Math.floor((s + n) / 2));\n }\n return null;\n } },\n {\n key: \"isInFrustum\",\n value: function isInFrustum(t) {\n var e = this.layer.getMap(),\n i = t.getBoundingBox();\n if (!i || \"multigltfmarker\" === t.getGLTFMarkerType()) return !0;\n var s = _gl.vec2.set(yt, i.min, i.max);\n return !!(0, _frustumIntersects.intersectsBox)(e.projViewMatrix, s);\n } },\n {\n key: \"getRenderMeshesTest\",\n value: function getRenderMeshesTest() {\n return this.ii();\n } },\n {\n key: \"isMarkerTransparent\",\n value: function isMarkerTransparent(t) {\n return t.W();\n } },\n {\n key: \"getMarkerFitSizeScale\",\n value: function getMarkerFitSizeScale(t) {\n return t.ci();\n } },\n {\n key: \"getMarkerFitTranslate\",\n value: function getMarkerFitTranslate(t) {\n return t.li();\n } },\n {\n key: \"getFBORayPicking\",\n value: function getFBORayPicking() {\n return this.Xe;\n } },\n {\n key: \"getShaderList\",\n value: function getShaderList() {\n return this.we;\n } }]);\n\n }((0, _gl.MaskRendererMixin)(t.renderer.OverlayLayerCanvasRenderer));\n var bt = /\\{ *([\\w_]+) *\\}/g;\n var Mt = exports.EffectMarker = function (_ct2) {\n function Mt(t, e) {\n var _this24;\n _classCallCheck(this, Mt);\n _this24 = _callSuper(this, Mt, [t, e]), _this24.l = \"effectmarker\";\n return _this24;\n }\n _inherits(Mt, _ct2);\n return _createClass(Mt, [{\n key: \"isAnimated\",\n value: function isAnimated() {\n return !0;\n } },\n {\n key: \"setTexture\",\n value: function setTexture(t) {\n var e = this.getLayer() && this.getLayer().getRenderer();\n if (e) {\n var _i27 = this.getTextureUrl();\n e.ui(_i27), e.fi(t);\n }\n return _superPropGet(Mt, \"updateSymbol\", this, 3)([{\n textureUrl: t }]),\n this;\n } },\n {\n key: \"di\",\n value: function di(t) {\n var e = this.getTextureUrl(),\n i = this.getLayer() && this.getLayer().getRenderer();\n if (i) {\n var _s21 = e;\n var _n12 = this.mi();\n if (_n12) {\n var _i28 = this.isAnimationLooped(),\n _r13 = this.getAnimationSpeed() || 1,\n _o10 = _i28 ? Math.floor(.01 * t * _r13) % _n12.length : Math.floor(.01 * t);\n _s21 = e.replace(bt, _n12[_o10]), this.setUniform(\"width\", 1), this.setUniform(\"height\", 1), this.setUniform(\"uvOffset\", [0, 0]);\n }\n return i.gi(_s21, this.X());\n }\n return null;\n } },\n {\n key: \"mi\",\n value: function mi() {\n var t = this._getInternalSymbol();\n return t && t.textureNames;\n } },\n {\n key: \"getTextureUrl\",\n value: function getTextureUrl() {\n var t = this._getInternalSymbol();\n return t && t.textureUrl || \"default\";\n } },\n {\n key: \"getUrl\",\n value: function getUrl() {\n return \"plane\";\n } },\n {\n key: \"getShader\",\n value: function getShader() {\n return \"effect\";\n } },\n {\n key: \"setTransparent\",\n value: function setTransparent(t) {\n return this.options.symbol.transparent = t, this;\n } },\n {\n key: \"isTransparent\",\n value: function isTransparent() {\n return this.options.symbol.transparent;\n } },\n {\n key: \"updateUV\",\n value: function updateUV(t) {\n var e = this.isAnimationLooped(),\n i = this.getAnimationSpeed() || 1,\n s = this.getUniforms() || {},\n n = s.width || 1,\n r = s.height || 1;\n var o;\n var h = this.getEffectType();\n \"uv\" === h ? o = e ? .01 * t * i % (n * r) : .01 * t : \"sequence\" === h && (o = e ? Math.floor(.01 * t * i) % (n * r) : Math.floor(.01 * t));\n var a = Math.floor(o % n),\n c = Math.floor(o / n),\n l = this.di(t);\n this._getSymbol() ? (this.setUniform(\"uvOffset\", [a, c]), this.setUniform(\"width\", n), this.setUniform(\"height\", r), this.setUniform(\"texture\", l)) : this.D(\"uniforms\", {\n uvOffset: [a, c],\n width: n,\n height: r,\n texture: l });\n\n } },\n {\n key: \"_setExternSymbol\",\n value: function _setExternSymbol(t) {\n _superPropGet(Mt, \"_setExternSymbol\", this, 3)([t]);\n var e = this.getLayer() && this.getLayer().getRenderer();\n if (e) {\n var _t32 = this.getTextureUrl();\n e.fi(_t32);\n }\n } },\n {\n key: \"getEffectType\",\n value: function getEffectType() {\n var t = this._getInternalSymbol();\n return t && t.effect || \"uv\";\n } },\n {\n key: \"setEffectType\",\n value: function setEffectType(t) {\n return this._getInternalSymbol().effect = t, this;\n } },\n {\n key: \"remove\",\n value: function remove() {\n var t = this.getLayer() && this.getLayer().getRenderer();\n if (t) {\n var _e33 = this.getTextureUrl();\n t.ui(_e33);\n }\n _superPropGet(Mt, \"remove\", this, 3)([]);\n } }],\n [{\n key: \"fromJSON\",\n value: function fromJSON(t) {\n return new Mt(t.coordinates, t.options);\n } }]);\n\n }(ct);\n var St = [\"Point\", \"Polygon\", \"LineString\", \"MultiPoint\", \"MultiPolygon\", \"MultiLineString\", \"GeometryCollection\", \"Feature\", \"FeatureCollection\"].reduce(function (t, e) {\n return t[e] = !0, t;\n }, {}),\n Ot = {\n toGeometry: function toGeometry(t, i) {\n if (_maptalks.Util.isString(t) && (t = _maptalks.Util.parseJSON(t)), Array.isArray(t)) {\n var _s22 = [];\n for (var _n13 = 0, _r14 = t.length; _n13 < _r14; _n13++) {\n var _r15 = Ot.pi(t[_n13], i);\n Array.isArray(_r15) ? _maptalks.Util.pushIn(_s22, _r15) : _s22.push(_r15);\n }\n return _s22;\n }\n return Ot.pi(t, i);\n },\n pi: function pi(t, i) {\n if (!t || _maptalks.Util.isNil(t.type)) return null;\n var s = t.type;\n if (\"Feature\" === s) {\n var _e34 = t.geometry,\n _s23 = Ot.pi(_e34, i);\n return _s23 ? (_s23.setId(t.id), _s23.setProperties(t.properties), _s23) : null;\n }\n if (\"FeatureCollection\" === s) {\n var _e35 = t.features;\n if (!_e35) return null;\n return Ot.toGeometry(_e35, i);\n }\n if (\"Point\" === s) return function (t, e) {\n if (\"EffectLayer\" === e) return new Mt(t);\n return new ct(t);\n }(t.coordinates, i);\n if (\"GeometryCollection\" === s) {\n var _e36 = t.geometries,\n _s24 = [],\n _n14 = _e36.length;\n for (var _t33 = 0; _t33 < _n14; _t33++) _s24.push(Ot.pi(_e36[_t33], i));\n return _s24;\n }\n throw new Error(\"geometry's type is invalid, only support type of Point\");\n },\n isGeoJSON: function isGeoJSON(t) {\n return !(!t || \"object\" != _typeof(t)) && !!t.type && !!St[t.type] && !(t instanceof _maptalks.Geometry);\n } };\n\n var Tt = /\\{*(\\$root)*\\}/g;\n var At = function (_t$OverlayLayer) {\n function At(e, i, s) {\n var _this25;\n _classCallCheck(this, At);\n !i || i instanceof t.Geometry || Array.isArray(i) || St[i.type] || (s = i, i = null), _this25 = _callSuper(this, At, [e, null, s]), _this25.pickingId = 0, _this25._i = {}, _this25.xi = {}, _this25.yi = {};\n var n = s && s.style;\n _this25.setStyle(n), i && _this25.addGeometry(i);\n return _this25;\n }\n _inherits(At, _t$OverlayLayer);\n return _createClass(At, [{\n key: \"addGeometry\",\n value: function addGeometry(t, e) {\n var i = Ot.isGeoJSON(t) ? Ot.toGeometry(t, this.getJSONType()) : t;\n i = Array.isArray(i) ? i : [i];\n for (var _t34 = 0; _t34 < i.length; _t34++) if (!this.vi(i[_t34])) return void console.error(\"type of geometry is invalid\");\n _superPropGet(At, \"addGeometry\", this, 3)([i, e]), Array.isArray(i) && this.addMarker(i);\n } },\n {\n key: \"addMarker\",\n value: function addMarker(t) {\n for (var _e37 = 0; _e37 < t.length; _e37++) {\n var _i29 = t[_e37];\n _i29.qt(this.pickingId), this._i[this.pickingId] = _i29;\n var _s25 = _i29.getId();\n _s25 && (this.yi[_s25] = _i29), _i29.fire(\"add\", {\n type: \"add\",\n target: _i29,\n layer: this });\n\n var _n15 = _i29.getUrl(),\n _r16 = this.getRenderer();\n if (_r16 && _r16.Me[_n15]) {\n var _t35 = _r16.Me[_n15];\n _i29.fire(\"load\", {\n type: \"load\",\n target: _i29,\n data: _t35.I() });\n\n }\n if (\"multigltfmarker\" === _i29.getGLTFMarkerType()) {\n var _t36 = _i29.getCount() || 1;\n this.pickingId += _t36;\n } else this.pickingId++;\n }\n } },\n {\n key: \"wi\",\n value: function wi(t) {\n var e = this.getRenderer();\n e && e.loginGLTFMarker(t);\n } },\n {\n key: \"toJSON\",\n value: function toJSON(t) {\n t || (t = {});\n var e = {\n \"type\": this.getJSONType(),\n \"id\": this.getId(),\n \"options\": this.config() };\n\n if ((S(t.style) || t.style) && (e.style = this.getStyle()), S(t.geometries) || t.geometries) {\n var _t37 = [],\n _i30 = this._geoList;\n for (var _e38 = 0; _e38 < _i30.length; _e38++) {\n var _s26 = _i30[_e38].Zt();\n _t37.push(_s26);\n }\n e.geometries = _t37;\n }\n return e;\n } },\n {\n key: \"vi\",\n value: function vi(t) {\n if (!t.getGLTFMarkerType) return !1;\n return this.options.markerTypes.indexOf(t.getGLTFMarkerType()) > -1;\n } },\n {\n key: \"setStyle\",\n value: function setStyle(t) {\n return t ? (this.options.style = t, this.bi = JSON.parse(JSON.stringify(t)), this.Mi(), this.fire(\"setstyle\", {\n target: this,\n style: this.bi }),\n this) : (delete this.bi, delete this.options.style, this);\n } },\n {\n key: \"getStyle\",\n value: function getStyle() {\n return this.options.style;\n } },\n {\n key: \"updateSymbol\",\n value: function updateSymbol(t, e) {\n var i = this.getStyle();\n this.Si(t, e, i), this.Si(t, e, this.bi), this.Mi(), this.fire(\"updatesymbol\", {\n target: this,\n index: t,\n symbol: e });\n\n } },\n {\n key: \"Si\",\n value: function Si(t, e, i) {\n if (!i) return;\n var s = (i.style ? i.style : i)[t].symbol || {};\n for (var _t38 in e) s[_t38] = e[_t38];\n } },\n {\n key: \"Mi\",\n value: function Mi() {\n this._processRootUrl(this.bi);\n var t = this.bi.style ? this.bi.style : this.bi;\n this.Oi = (0, _featureFilter.compileStyle)(t);\n this._geoList.forEach(function (t) {\n this.Ti(t);\n }, this);\n } },\n {\n key: \"getGLTFUrls\",\n value: function getGLTFUrls() {\n return Object.keys(this.xi);\n } },\n {\n key: \"_processRootUrl\",\n value: function _processRootUrl(e) {\n t.Util.isString(e.$root) && e.style.forEach(function (t) {\n var i = t.symbol.url;\n i && i.indexOf(\"{$root}\") > -1 && (t.symbol.url = i.replace(Tt, e.$root));\n });\n } },\n {\n key: \"Ti\",\n value: function Ti(t) {\n if (!this.Oi) return !1;\n for (var _e39 = 0, _i31 = this.Oi.length; _e39 < _i31; _e39++) if (!0 === this.Oi[_e39].filter({\n properties: t.getProperties() }))\n {\n var _i32 = this.Oi[_e39].symbol,\n _s27 = _i32.url;\n return t.D(\"url\", _s27), t.updateSymbol(_i32), !0;\n }\n return !1;\n } },\n {\n key: \"Ai\",\n value: function Ai(t) {\n if (this.Oi) for (var _e40 = 0, _i33 = this.Oi.length; _e40 < _i33; _e40++) !0 === this.Oi[_e40].filter({\n properties: t.getProperties() }) &&\n this.Oi[_e40].outline && t.outline();\n } },\n {\n key: \"ki\",\n value: function ki(e) {\n var i = t.Util.isString(e) ? this.yi[e].X() : e.X(),\n s = this.getRenderer();\n s && s.Pi(i), delete this._i[i], delete this.yi[e];\n } },\n {\n key: \"clear\",\n value: function clear() {\n return _superPropGet(At, \"clear\", this, 3)([]), this._i = {}, this.yi = {}, this;\n } },\n {\n key: \"hi\",\n value: function hi() {\n return this._i;\n } },\n {\n key: \"ni\",\n value: function ni(t, e, i) {\n var s = this.getRenderer();\n return s ? s.ni(t, e, i) : null;\n } },\n {\n key: \"_isModelsLoadComplete\",\n value: function _isModelsLoadComplete() {\n var t = this._geoList;\n for (var _e41 = 0; _e41 < t.length; _e41++) if (!t[_e41].isLoaded()) return !1;\n return !0;\n } },\n {\n key: \"Nt\",\n value: function Nt(t) {\n var e = this.getRenderer();\n return e ? e.Nt(t) : null;\n } },\n {\n key: \"U\",\n value: function U(t) {\n var e = this.getRenderer();\n e && e.U(t);\n } },\n {\n key: \"outlineBatch\",\n value: function outlineBatch(t) {\n var _this26 = this;\n var e = this.bi.style ? this.bi.style : this.bi;\n e[t].outline = !0, this.Oi = (0, _featureFilter.compileStyle)(e);\n this._geoList.forEach(function (t) {\n _this26.Ai(t);\n });\n } },\n {\n key: \"outlineAll\",\n value: function outlineAll() {\n this._geoList.forEach(function (t) {\n t.outline();\n });\n } },\n {\n key: \"cancelOutline\",\n value: function cancelOutline() {\n if (this.bi) {\n (this.bi.style ? this.bi.style : this.bi).forEach(function (t) {\n delete t.outline;\n });\n }\n this._geoList.forEach(function (t) {\n t.cancelOutline();\n });\n } }],\n [{\n key: \"registerShader\",\n value: function registerShader(t, e, i, s) {\n L[t] = {\n name: t,\n type: e,\n config: i,\n uniforms: s };\n\n } },\n {\n key: \"removeShader\",\n value: function removeShader(t) {\n delete L[t];\n } },\n {\n key: \"getShaders\",\n value: function getShaders() {\n var t = [];\n for (var _e42 in L) t.push({\n shader: _e42,\n uniforms: L[_e42].uniforms });\n\n return t;\n } },\n {\n key: \"getShaderMap\",\n value: function getShaderMap() {\n return L;\n } }]);\n\n }(t.OverlayLayer);\n At.mergeOptions({\n \"renderer\": \"gl\",\n \"doubleBuffer\": !1,\n \"glOptions\": null,\n \"markerEvents\": !0,\n \"forceRenderOnZooming\": !0,\n \"forceRenderOnMoving\": !0,\n \"forceRenderOnRotating\": !0 });\n\n var kt = exports.GLTFLayer = function (_x) {\n function kt() {\n _classCallCheck(this, kt);\n return _callSuper(this, kt, arguments);\n }\n _inherits(kt, _x);\n return _createClass(kt, [{\n key: \"setURLModifier\",\n value: function setURLModifier(t) {\n return this.Ci = t, this;\n } },\n {\n key: \"getURLModifier\",\n value: function getURLModifier() {\n return this.Ci;\n } },\n {\n key: \"onAdd\",\n value: function onAdd() {\n var t = this.getMap();\n this._geoList.forEach(function (e) {\n O(e.getZoomOnAdded()) || e.setZoomOnAdded(t.getZoom());\n }), _superPropGet(kt, \"onAdd\", this, 3)([]);\n } },\n {\n key: \"onRemove\",\n value: function onRemove() {\n _superPropGet(kt, \"onRemove\", this, 3)([]), this.clear();\n } },\n {\n key: \"identify\",\n value: function identify(e, i) {\n var s = this.getMap();\n if (!s) return [];\n var n = s.coordinateToContainerPoint(new t.Coordinate(e));\n return this.identifyAtPoint(n, i);\n } },\n {\n key: \"identifyAtPoint\",\n value: function identifyAtPoint(e) {\n var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var s = [];\n if (!i.excludeMasks) {\n var _n16 = this.identifyMask(e, i);\n _n16 && _n16.length && t.Util.pushIn(s, _n16);\n }\n var n = this.getMap();\n if (!n) return [];\n var r = n.getDevicePixelRatio(),\n o = e.x * r,\n h = e.y * r,\n a = this.ni(o, h, i);\n if (a && (a.data || a.length)) if (i.includeInternals && !i.excludeMasks) {\n s.push(a.data);\n var _t39 = i.domEvent;\n _t39 && (_t39.gltfPickingInfo = _t39.gltfPickingInfo || {}, _t39.gltfPickingInfo[this.getId()] = a);\n } else s.push(a);\n return i && i.filter && !i.excludeMasks ? s.filter(function (t) {\n return i.filter(t.data || t);\n }) : s;\n } },\n {\n key: \"ce\",\n value: function ce() {\n this.pickingId = 0;\n var t = {};\n for (var _e43 in this._i) {\n var _i34 = this._i[_e43];\n _i34.qt(this.pickingId), _i34.C(!0), t[this.pickingId] = _i34;\n var _s28 = _i34.getCount() || 1;\n this.pickingId += _s28;\n }\n this._i = t;\n } },\n {\n key: \"_onGeometryEvent\",\n value: function _onGeometryEvent(t) {\n if (!t || !t.target) return;\n var e = t.type;\n if (\"meshcreate\" === e) this.Li(t);else if (\"modelerror\" === e) this.Ii(t);else if (\"positionchange\" === e) {\n var _t40 = this.getRenderer();\n _t40 && _t40.setToRedraw();\n }\n _superPropGet(kt, \"_onGeometryEvent\", this, 3)([t]);\n } },\n {\n key: \"Ii\",\n value: function Ii(t) {\n var e = t.url,\n i = t.info;\n console.error(i), this.fire(\"modelerror\", {\n type: \"modelerror\",\n url: e,\n info: i });\n\n } },\n {\n key: \"Li\",\n value: function Li(t) {\n var e = t.url;\n this.xi[e] = 1, this.getRenderer().setToRedraw(), this._isModelsLoadComplete() && this.fire(\"modelload\", {\n models: this.getGLTFUrls() });\n\n } }],\n [{\n key: \"initDefaultShader\",\n value: function initDefaultShader() {\n var t = function () {\n var t = {\n positionAttribute: \"POSITION\",\n normalAttribute: \"NORMAL\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n src: \"src alpha\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new _gl.reshader.PhongMaterial();\n return {\n shader: t,\n material: e };\n\n }();\n kt.registerShader(\"phong\", \"PhongShader\", t.shader, t.material.getUniforms());\n var e = function () {\n var t = {\n positionAttribute: \"POSITION\",\n normalAttribute: \"NORMAL\",\n tangentAttribute: \"TANGENT\",\n colorAttribute: \"COLOR_0\",\n uv0Attribute: \"TEXCOORD_0\",\n uv1Attribute: \"TEXCOORD_1\",\n extraCommandProps: {\n cull: {\n enable: !0 },\n\n frontFace: \"ccw\",\n blend: {\n enable: function enable(t, e) {\n return !!e.meshConfig.transparent;\n },\n func: {\n srcRGB: \"src alpha\",\n srcAlpha: 1,\n dstRGB: \"one minus src alpha\",\n dstAlpha: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new _gl.reshader.pbr.StandardMaterial({});\n return {\n shader: t,\n material: e };\n\n }();\n kt.registerShader(\"pbr\", \"pbr.StandardShader\", e.shader, e.material.getUniforms()), kt.registerShader(\"depth\", \"pbr.StandardDepthShader\", e.shader, e.material.getUniforms());\n var i = function () {\n var t = {\n positionAttribute: \"POSITION\",\n color0Attribute: \"COLOR_0\",\n extraCommandProps: {\n blend: {\n enable: !1,\n func: {\n src: \"src alpha\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new _gl.reshader.Material();\n return {\n shader: t,\n material: e };\n\n }();\n kt.registerShader(\"pointline\", \"PointLineShader\", i.shader, i.material.getUniforms());\n var s = function () {\n var t = {\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n srcRGB: \"src alpha\",\n srcAlpha: 1,\n dstRGB: \"one minus src alpha\",\n dstAlpha: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new _gl.reshader.Material({\n lineColor: [0, 0, 0, 1],\n lineOpacity: 1 });\n\n return {\n shader: t,\n material: e };\n\n }();\n kt.registerShader(\"wireframe\", \"EdgeShader\", s.shader, s.material.getUniforms());\n var n = function () {\n var t = {\n positionAttribute: \"POSITION\",\n normalAttribute: \"NORMAL\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n src: \"src alpha\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new _gl.reshader.StandardLiteMaterial();\n return {\n shader: t,\n material: e };\n\n }();\n kt.registerShader(\"pbr-lite\", \"StandardLiteShader\", n.shader, n.material.getUniforms());\n } },\n {\n key: \"fromJSON\",\n value: function fromJSON(t) {\n if (!t || \"GLTFLayer\" !== t.type) return null;\n var e = new kt(t.id, t.options),\n i = t.geometries,\n s = [];\n for (var _t41 = 0; _t41 < i.length; _t41++) {\n var _e44 = i[_t41].type,\n _n17 = ct.getJSONClass(_e44);\n if (!_n17 || !_n17.fromJSON) throw new Error(\"unsupported gltfmarker type:\" + _e44);\n var _r17 = _n17.fromJSON(i[_t41]);\n _r17 && s.push(_r17);\n }\n return e.addGeometry(s), t.style && e.setStyle(t.style), e;\n } }]);\n\n }((0, _gl.MaskLayerMixin)(At));\n kt.initDefaultShader(), kt.mergeOptions({\n markerTypes: [\"gltfmarker\", \"multigltfmarker\"],\n pointSize: 1 }),\n kt.registerJSONType(\"GLTFLayer\"), kt.registerRenderer(\"gl\", wt);\n var Pt = exports.GLTFGeometry = function (_ct3) {\n function Pt() {\n _classCallCheck(this, Pt);\n return _callSuper(this, Pt, arguments);\n }\n _inherits(Pt, _ct3);\n return _createClass(Pt, [{\n key: \"tt\",\n value: function tt(t) {\n var e = this.getMap(),\n i = e.getGLRes(),\n s = e.distanceToPointAtRes(100, 100, i, this.getCenter()),\n n = e.altitudeToPoint(100, i);\n return t[0] *= s.x / 100, t[1] *= s.y / 100, t[2] *= n / 100, t;\n } }]);\n\n }(ct);\n var Ct = new _maptalks.Coordinate(0, 0),\n Lt = new _maptalks.Point(0, 0),\n It = new _maptalks.Point(0, 0),\n Ft = new _maptalks.Point(0, 0);\n var Dt = exports.GLTFMercatorGeometry = function (_ct4) {\n function Dt() {\n _classCallCheck(this, Dt);\n return _callSuper(this, Dt, arguments);\n }\n _inherits(Dt, _ct4);\n return _createClass(Dt, [{\n key: \"tt\",\n value: function tt(t) {\n var e = this.getMap(),\n i = e.getGLRes(),\n s = this.getCoordinates(),\n n = e.coordToPointAtRes(s, i, It),\n r = _maptalks.projection.EPSG3857.project(s, Ct)._add(1, 1),\n o = _maptalks.projection.EPSG3857.unproject(r, Lt),\n h = e.coordToPointAtRes(o, i, Ft),\n c = h.x - n.x,\n l = h.y - n.y,\n u = e.altitudeToPoint(100, i);\n return t[0] *= c, t[1] *= l, t[2] *= u / 100, t;\n } }]);\n\n }(ct);\n var Gt = new _maptalks.Coordinate(0, 0),\n Nt = [],\n Et = new _maptalks.Point(0, 0),\n Bt = new _maptalks.Point(0, 0);\n var Rt = exports.GLTFLineString = function (_t42) {\n function Rt(t, e) {\n var _this27;\n _classCallCheck(this, Rt);\n _this27 = _callSuper(this, Rt, [null, e]), _this27.on(\"load\", function () {\n _this27.setCoordinates(t);\n });\n return _this27;\n }\n _inherits(Rt, _t42);\n return _createClass(Rt, [{\n key: \"setCoordinates\",\n value: function setCoordinates(t) {\n this.ae = t, this.Fi();\n } },\n {\n key: \"getCoordinates\",\n value: function getCoordinates() {\n return this.ae;\n } },\n {\n key: \"toJSON\",\n value: function toJSON() {\n var t = JSON.parse(JSON.stringify({\n coordinates: this.ae,\n options: this.options,\n type: \"GLTFLineString\" })),\n\n i = this.getId();\n _maptalks.Util.isNil(i) || (t.options.id = i);\n var s = this.getProperties();\n return t.options && (t.options.properties = s), t;\n } },\n {\n key: \"Fi\",\n value: function Fi() {\n var _this28 = this;\n var t = this.ae;\n if (!t) return;\n this.removeAllData();\n var e = this.getMap(),\n i = e.getGLRes(),\n s = e.getProjection(),\n n = this.Di();\n var _loop2 = function _loop2() {\n var o = _this28.Gi(t[_r18]),\n h = _this28.Gi(t[_r18 + 1]),\n a = e.coordinateToPointAtRes(o, i, Et),\n c = e.coordinateToPointAtRes(h, i, Bt),\n l = _this28.Ni(o, h),\n u = s.measureLenBetween(o, h);\n _this28.gltfPack.arrangeAlongLine(a, c, u, n, l, _this28.options).forEach(function (t) {\n t.coordinates = jt(o, h, t.t), _this28.addData(t);\n });\n };\n for (var _r18 = 0; _r18 < t.length - 1; _r18++) {\n _loop2();\n }\n this.u = !0;\n } },\n {\n key: \"Di\",\n value: function Di() {\n var t = [1, 1, 1],\n i = this.getModelHeight();\n i && this.ft(t, i);\n var s = this.getSymbol();\n return _gl.vec3.set(Nt, _maptalks.Util.isNil(s.scaleX) ? 1 : s.scaleX, _maptalks.Util.isNil(s.scaleY) ? 1 : s.scaleY, _maptalks.Util.isNil(s.scaleZ) ? 1 : s.scaleZ), _gl.vec3.multiply(t, t, Nt);\n } },\n {\n key: \"Ni\",\n value: function Ni(t, e) {\n var i = this.getMap(),\n s = i.getGLRes();\n Gt.set(0, (t.y + e.y) / 2);\n return i.altitudeToPoint(100, s, Gt) / i.altitudeToPoint(100, s);\n } },\n {\n key: \"Gi\",\n value: function Gi(t) {\n return Array.isArray(t) ? new _maptalks.Coordinate(t) : t;\n } }],\n [{\n key: \"fromJSON\",\n value: function fromJSON(t) {\n return new Rt(t.data, t.options);\n } }]);\n\n }(_t);\n function jt(t, e, i) {\n var s = Ut(t.x, e.x, i),\n n = Ut(t.y, e.y, i),\n r = Ut(t.z || 0, e.z || 0, i);\n return new t.constructor(s, n, r);\n }\n function Ut(t, e, i) {\n return t + i * (e - t);\n }\n Rt.mergeOptions({\n direction: 0,\n gapLength: 0,\n scaleVertex: !0 }),\n Rt.registerJSONType(\"GLTFLineString\");\n var zt = new _gl.reshader.Texture2D({\n url: void 0,\n mag: \"linear\" });\n\n var Jt = function (_g2) {\n function Jt(t) {\n var _this29;\n _classCallCheck(this, Jt);\n _this29 = _callSuper(this, Jt, [t]), _this29._textureMap = {};\n return _this29;\n }\n _inherits(Jt, _g2);\n return _createClass(Jt, [{\n key: \"gi\",\n value: function gi(t) {\n return this.regl && this._textureMap[t] ? this._textureMap[t].texture.getREGLTexture(this.regl) : zt;\n } },\n {\n key: \"fi\",\n value: function fi(t) {\n var _this30 = this;\n if (this._textureMap[t]) this._textureMap[t].count++;else {\n this.Ei = this.Ei || new _gl.reshader.ResourceLoader();\n var _e45 = \"default\" === t ? void 0 : t,\n _i35 = new _gl.reshader.Texture2D({\n url: _e45,\n mag: \"linear\" },\n this.Ei);\n _i35.once(\"complete\", function () {\n _this30.setToRedraw();\n }, this), this._textureMap[t] = {\n count: 1,\n texture: _i35 };\n\n }\n } },\n {\n key: \"ui\",\n value: function ui(t) {\n this._textureMap[t] && (this._textureMap[t].count--, this._textureMap[t].count < 1 && (this._textureMap[t].texture.dispose(), delete this._textureMap[t]));\n } }]);\n\n }((0, _gl.MaskRendererMixin)(wt));\n var Ht = exports.EffectLayer = function (_x2) {\n function Ht() {\n _classCallCheck(this, Ht);\n return _callSuper(this, Ht, arguments);\n }\n _inherits(Ht, _x2);\n return _createClass(Ht, [{\n key: \"onAddGeometry\",\n value: function onAddGeometry(t) {\n _superPropGet(Ht, \"onAddGeometry\", this, 3)([t]);\n var e = t.getTextureUrl(),\n i = this.getRenderer();\n i ? i.fi(e) : this.on(\"renderercreate\", function (t) {\n t.renderer.fi(e);\n });\n } },\n {\n key: \"remove\",\n value: function remove() {\n var t = this.getRenderer();\n t && this._geoList.forEach(function (e) {\n var i = e.getTextureUrl();\n t.ui(i);\n }), _superPropGet(Ht, \"remove\", this, 3)([]);\n } },\n {\n key: \"clear\",\n value: function clear() {\n var t = this.getRenderer();\n t && this._geoList.forEach(function (e) {\n var i = e.getTextureUrl();\n t.ui(i);\n }), _superPropGet(Ht, \"clear\", this, 3)([]);\n } },\n {\n key: \"getTextureMapTest\",\n value: function getTextureMapTest() {\n var t = this.getRenderer();\n return t ? t._textureMap : null;\n } }],\n [{\n key: \"initDefaultShader\",\n value: function initDefaultShader() {\n var t = function () {\n var t = {\n vert: \"\\n attribute vec3 aPosition;\\n attribute vec2 aTexCoord;\\n uniform mat4 projViewMatrix;\\n uniform mat4 modelMatrix;\\n uniform vec2 uvOffset;\\n uniform float width;\\n uniform float height;\\n varying vec2 vTexCoords;\\n void main()\\n {\\n gl_Position = projViewMatrix * modelMatrix * vec4(aPosition, 1.0);\\n vTexCoords = (uvOffset + aTexCoord) * vec2(1.0 / width, 1.0 / height);\\n }\\n \",\n frag: \"\\n precision mediump float;\\n uniform sampler2D texture;\\n\\n varying vec2 vTexCoords;\\n void main() {\\n vec4 color = texture2D(texture, vTexCoords);\\n gl_FragColor = vec4(color.rgb, color.a) * color.a;\\n }\\n \",\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n src: \"one\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" },\n\n depth: {\n enable: !0,\n func: \"always\",\n mask: !0,\n range: [0, 0] } } },\n\n\n\n e = new _gl.reshader.Material();\n return {\n shader: t,\n material: e };\n\n }();\n Ht.registerShader(\"effect\", \"MeshShader\", t.shader, t.material.getUniforms());\n } }]);\n\n }((0, _gl.MaskLayerMixin)(At));\n Ht.initDefaultShader(), Ht.mergeOptions({\n markerTypes: [\"effectmarker\"] }),\n Ht.registerJSONType(\"EffectLayer\"), Ht.registerRenderer(\"gl\", Jt);\n var Vt = exports.GlowMarker = function (_ct5) {\n function Vt(t, e) {\n var _this31;\n _classCallCheck(this, Vt);\n _this31 = _callSuper(this, Vt, [t, e]), _this31.l = \"glowmarker\";\n return _this31;\n }\n _inherits(Vt, _ct5);\n return _createClass(Vt, [{\n key: \"getUrl\",\n value: function getUrl() {\n return \"plane\";\n } },\n {\n key: \"setSpeed\",\n value: function setSpeed(t) {\n this.setUniform(\"speed\", t);\n } },\n {\n key: \"getSpeed\",\n value: function getSpeed() {\n return this._getInternalSymbol().uniforms.speed;\n } },\n {\n key: \"getShader\",\n value: function getShader() {\n return \"glowmarker\";\n } },\n {\n key: \"isAnimated\",\n value: function isAnimated() {\n var t = this._getInternalSymbol();\n return t && t.animation;\n } },\n {\n key: \"Z\",\n value: function Z() {\n var t = this._getInternalSymbol().uniforms.time || 0;\n t += .01, this.setUniform(\"time\", t);\n } }],\n [{\n key: \"fromJSON\",\n value: function fromJSON(t) {\n return new Vt(t.coordinates, t.options);\n } }]);\n\n }(ct);\n Vt.mergeOptions({\n visible: !0 });\n\n var Zt = exports.GlowMarkerLayer = function (_At) {\n function Zt() {\n _classCallCheck(this, Zt);\n return _callSuper(this, Zt, arguments);\n }\n _inherits(Zt, _At);\n return _createClass(Zt, null, [{\n key: \"initDefaultShader\",\n value: function initDefaultShader() {\n var t = function () {\n var t = {\n vert: \"\\n #ifdef GL_ES\\n precision highp float;\\n #endif\\n attribute vec3 aPosition;\\n uniform mat4 projViewModelMatrix;\\n uniform mat4 modelMatrix;\\n uniform mat4 positionMatrix;\\n varying vec3 v_FragPos;\\n varying vec3 v_center;\\n #include \\n void main(){\\n mat4 localPositionMatrix = getPositionMatrix();\\n vec4 localVertex = getPosition(aPosition);\\n vec4 position = localPositionMatrix * localVertex;\\n gl_Position = projViewModelMatrix * position;\\n vec4 worldPos = modelMatrix * position;\\n v_FragPos = worldPos.xyz;\\n v_center = (modelMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;\\n }\\n \",\n frag: \"\\n #ifdef GL_ES\\n precision highp float;\\n #endif\\n #define pi 3.14159\\n const float dotsnb = 30.0; // Number of dots\\n\\n varying vec3 v_FragPos;\\n varying vec3 v_center;\\n uniform float time;\\n uniform float radius;\\n uniform vec3 color;\\n uniform float speed;\\n vec3 hsb2rgb(in vec3 c)\\n {\\n vec3 rgb = clamp(abs(mod(c.x*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0,0.0,1.0 );\\n rgb = rgb*rgb*(4.0-2.0*rgb);\\n return c.z * mix( vec3(1.0), rgb, c.y);\\n }\\n\\n void main()\\n {\\n float r = length(v_FragPos - v_center);\\n r = r*2.-1.;\\n if(r>radius) {\\n gl_FragColor = vec4(1.0,1.0,1.0, 0.0);\\n } else {\\n //vec3 color = hsb2rgb(vec3(fract(time*.1),.7,.4));\\n vec3 color = color;\\n float s = abs(sin(pow(r+5.0, 1.5)-time*speed+sin(r*0.9))*sin(r+.99));\\n color *= (abs(1./(s*10.8))-.01);\\n gl_FragColor = vec4(color, (color.x + color.y + color.z) / 1.0);\\n }\\n }\\n \",\n uniforms: [{\n name: \"projViewModelMatrix\",\n type: \"function\",\n fn: function fn(t, e) {\n return _gl.mat4.multiply([], e.projViewMatrix, e.modelMatrix);\n } }],\n\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n srcRGB: \"src alpha\",\n srcAlpha: 1,\n dstRGB: \"one\",\n dstAlpha: 1 },\n\n equation: {\n rgb: \"add\",\n alpha: \"add\" },\n\n color: [0, 0, 0, 0] } } },\n\n\n\n e = new _gl.reshader.Material();\n return {\n shader: t,\n material: e };\n\n }();\n Zt.registerShader(\"glowmarker\", \"MeshShader\", t.shader, t.material.getUniforms());\n } }]);\n\n }(At);\n Zt.initDefaultShader(), Zt.mergeOptions({\n markerTypes: [\"glowmarker\"] }),\n Zt.registerJSONType(\"GlowMarkerLayer\"), Zt.registerRenderer(\"gl\", wt);\n var qt = {\n url: \"plane\",\n animation: !0,\n loop: !0,\n rotation: [0, 0, 0],\n translation: [0, 0, 30],\n scale: [1, 1, 30] },\n\n Wt = {\n width: 1,\n height: 1,\n modelHeight: 60,\n startOpacity: 0,\n endOpacity: 1 };\n\n var Xt = exports.EffectLine = function (_Mt) {\n function Xt(t, i) {\n var _this32;\n _classCallCheck(this, Xt);\n _this32 = _callSuper(this, Xt, [t, i]);\n var s = _maptalks.Util.extend({}, qt, _this32.options.symbol);\n _this32.setSymbol(s);\n var n = _maptalks.Util.extend({}, Wt, _this32.options.symbol.uniforms);\n _this32.setUniforms(n), _this32.setShader(\"effectline\"), _this32.l = \"effectmarker\";\n return _this32;\n }\n _inherits(Xt, _Mt);\n return _createClass(Xt, [{\n key: \"getEffectType\",\n value: function getEffectType() {\n return \"sequence\";\n } },\n {\n key: \"setTexture\",\n value: function setTexture(t) {\n return this.setUniform(\"texture\", t), this;\n } },\n {\n key: \"setHeight\",\n value: function setHeight(t) {\n return this.setUniform(\"modelHeight\", t), this;\n } },\n {\n key: \"setStartOpacity\",\n value: function setStartOpacity(t) {\n return this.setUniform(\"startOpacity\", t), this;\n } },\n {\n key: \"setEndOpacity\",\n value: function setEndOpacity(t) {\n return this.setUniform(\"endOpacity\", t), this;\n } }]);\n\n }(Mt);\n var Yt = exports.EffectLineLayer = function (_At2) {\n function Yt() {\n _classCallCheck(this, Yt);\n return _callSuper(this, Yt, arguments);\n }\n _inherits(Yt, _At2);\n return _createClass(Yt, null, [{\n key: \"initDefaultShader\",\n value: function initDefaultShader() {\n var t = function () {\n var t = {\n vert: \"\\n attribute vec3 aPosition;\\n attribute vec2 aTexCoord;\\n uniform mat4 projViewMatrix;\\n uniform mat4 modelMatrix;\\n uniform vec2 uvOffset;\\n uniform float width;\\n uniform float height;\\n varying vec2 vTexCoords;\\n varying float vHeight;\\n void main()\\n {\\n vec4 worldPosition = modelMatrix * vec4(aPosition, 1.0);\\n gl_Position = projViewMatrix * worldPosition;\\n vHeight = worldPosition.z;\\n vTexCoords = (uvOffset + aTexCoord) * vec2(1.0 / width, 1.0 / height);\\n }\\n \",\n frag: \"\\n precision mediump float;\\n uniform sampler2D texture;\\n uniform float modelHeight;\\n uniform float startOpacity;\\n uniform float endOpacity;\\n varying float vHeight;\\n varying vec2 vTexCoords;\\n void main() {\\n vec4 color = texture2D(texture, vTexCoords);\\n float opacity = (endOpacity - startOpacity) * (1.0 - vHeight / modelHeight);\\n gl_FragColor = vec4(color.rgb, color.a) * color.a * opacity;\\n }\\n \",\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n src: \"one\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new _gl.reshader.Material();\n return {\n shader: t,\n material: e };\n\n }();\n Yt.registerShader(\"effectline\", \"MeshShader\", t.shader);\n } }]);\n\n }(At);\n Yt.initDefaultShader(), Yt.mergeOptions({\n markerTypes: [\"effectmarker\"] }),\n Yt.registerJSONType(\"EffectLineLayer\"), Yt.registerRenderer(\"gl\", Jt);\n var $t = {\n offsetX: 0,\n offsetY: 0,\n uReflectivity: .8,\n opacity: .9,\n color: [.9, 0, 0, 1] };\n\n var Kt = exports.EffectRing = function (_ct6) {\n function Kt(t, i) {\n var _this33;\n _classCallCheck(this, Kt);\n _this33 = _callSuper(this, Kt, [t, i]);\n var s = _maptalks.Util.extend({}, $t, _this33.options.symbol.uniforms);\n _this33.setUniforms(s), _this33.setShader(\"effectring\"), _this33.l = \"effectring\";\n return _this33;\n }\n _inherits(Kt, _ct6);\n return _createClass(Kt);\n }(ct);\n var Qt = exports.EffectRingLayer = function (_At3) {\n function Qt() {\n _classCallCheck(this, Qt);\n return _callSuper(this, Qt, arguments);\n }\n _inherits(Qt, _At3);\n return _createClass(Qt, null, [{\n key: \"initDefaultShader\",\n value: function initDefaultShader() {\n var t = function () {\n var t = {\n vert: \"\\n attribute vec3 aPosition;\\n attribute vec2 aTexCoord;\\n attribute vec3 aNormal;\\n uniform mat4 projViewMatrix;\\n uniform mat4 modelMatrix;\\n uniform mat4 normalMatrix;\\n uniform float offsetX;\\n uniform float offsetY;\\n varying vec2 uv;\\n void main()\\n {\\n gl_Position = projViewMatrix * modelMatrix * vec4(aPosition, 1.0);\\n uv = vec2(aTexCoord.x + offsetX, aTexCoord.y + offsetY);\\n }\\n \",\n frag: \"\\n precision mediump float;\\n uniform sampler2D effectTexture;\\n uniform vec3 uCameraPosition;\\n uniform mat4 viewMatrix;\\n uniform float uReflectivity;\\n uniform vec4 color;\\n uniform float opacity;\\n\\n varying vec2 uv;\\n\\n vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {\\n return normalize((vec4(dir, 0.0) * matrix).xyz);\\n }\\n\\n const float GAMMA_FACTOR = 2.0;\\n vec4 GammaToLinear(in vec4 value, in float gammaFactor) {\\n return vec4(pow(value.xyz, vec3(gammaFactor)), value.w);\\n }\\n\\n vec4 mixTexelToLinear(vec4 value) {\\n return GammaToLinear(value, float(GAMMA_FACTOR));\\n }\\n\\n void main() {\\n vec4 texColor = texture2D(effectTexture, uv);\\n if (color.a == 0.0) {\\n discard;\\n }\\n vec4 mixColor = mixTexelToLinear(color);\\n texColor.rgb += mixColor.xyz * uReflectivity;\\n texColor.a*= opacity;\\n gl_FragColor = texColor;\\n }\\n \",\n uniforms: [{\n name: \"normalMatrix\",\n type: \"function\",\n fn: function fn(t, e) {\n var i = [];\n return _gl.mat4.invert(i, e.modelMatrix), _gl.mat4.transpose(i, i), i;\n } }],\n\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n depth: {\n enable: !0,\n mask: !1 },\n\n blend: {\n enable: !0,\n func: {\n src: \"one\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new _gl.reshader.Material();\n return {\n shader: t,\n material: e };\n\n }();\n Qt.registerShader(\"effectring\", \"MeshShader\", t.shader);\n } }]);\n\n }(At);\n Qt.initDefaultShader(), Qt.mergeOptions({\n markerTypes: [\"effectring\"] }),\n Qt.registerJSONType(\"EffectRingLayer\"), Qt.registerRenderer(\"gl\", wt);\n var te = {\n animation: !0,\n loop: !0,\n url: \"plane\",\n effect: \"sequence\",\n speed: 1,\n scale: [1, 1, 1],\n rotation: [90, 0, 0] },\n\n ee = {\n width: 9,\n height: 5 };\n\n var ie = exports.AEMarker = function (_Mt2) {\n function ie(t, i) {\n var _this34;\n _classCallCheck(this, ie);\n _this34 = _callSuper(this, ie, [t, i]);\n var s = _maptalks.Util.extend({}, te, _this34.options.symbol);\n _this34.setSymbol(s);\n var n = _maptalks.Util.extend({}, ee, _this34.options.symbol.uniforms);\n _this34.setUniforms(n);\n return _this34;\n }\n _inherits(ie, _Mt2);\n return _createClass(ie);\n }(Mt);\n if (c.transcoders) {\n var _e46 = t.Map.VERSION;\n if (_e46.indexOf(\"1.0.0-beta\") >= 0 || _e46.indexOf(\"1.0.0-alpha\") >= 0) {\n var _e47 = c.transcoders.inject(M);\n t.registerWorkerAdapter(\"@maptalks/gltf-layer\", _e47);\n } else t.registerWorkerAdapter(\"@maptalks/gltf-layer\", function () {\n return c.transcoders.inject(M);\n });\n } else t.registerWorkerAdapter(\"@maptalks/gltf-layer\", M);\n \"undefined\" != typeof console && console.log(\"@maptalks/gltf-layer v0.105.1\");return module.exports;});", "requires": [], "buildLevel": 0, "fileName": "/dist/maptalks.gltf.es.js" }, "pandav:/dist/maptalks.gltf.js": { "cubeCode": "Cube(\"pandav:/npm/@maptalks/gltf-layer/0.105.1/dist/maptalks.gltf\", [\"pandav:/npm/maptalks/1.2.1\", \"pandav:/npm/@maptalks/gl/0.108.1\"], function (module, exports, require, load, process, global) {\n\n function _toConsumableArray(r) {return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();}\n function _nonIterableSpread() {throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");}\n function _iterableToArray(r) {if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);}\n function _arrayWithoutHoles(r) {if (Array.isArray(r)) return _arrayLikeToArray(r);}\n function _superPropGet(t, o, e, r) {var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e);return 2 & r && \"function\" == typeof p ? function (t) {return p.apply(e, t);} : p;}\n function _get() {return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {var p = _superPropBase(e, t);if (p) {var n = Object.getOwnPropertyDescriptor(p, t);return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;}}, _get.apply(null, arguments);}\n function _superPropBase(t, o) {for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););return t;}\n function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}\n function _nonIterableRest() {throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");}\n function _unsupportedIterableToArray(r, a) {if (r) {if (\"string\" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}\n function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}\n function _iterableToArrayLimit(r, l) {var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}\n function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}\n function _readOnlyError(r) {throw new TypeError('\"' + r + '\" is read-only');}\n function _classCallCheck(a, n) {if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");}\n function _defineProperties(e, r) {for (var t = 0; t < r.length; t++) {var o = r[t];o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);}}\n function _createClass(e, r, t) {return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e;}\n function _toPropertyKey(t) {var i = _toPrimitive(t, \"string\");return \"symbol\" == _typeof(i) ? i : i + \"\";}\n function _toPrimitive(t, r) {if (\"object\" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || \"default\");if (\"object\" != _typeof(i)) return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\");}return (\"string\" === r ? String : Number)(t);}\n function _callSuper(t, o, e) {return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));}\n function _possibleConstructorReturn(t, e) {if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e;if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(t);}\n function _assertThisInitialized(e) {if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e;}\n function _isNativeReflectConstruct() {try {var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));} catch (t) {}return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {return !!t;})();}\n function _getPrototypeOf(t) {return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {return t.__proto__ || Object.getPrototypeOf(t);}, _getPrototypeOf(t);}\n function _inherits(t, e) {if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e);}\n function _setPrototypeOf(t, e) {return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {return t.__proto__ = e, t;}, _setPrototypeOf(t, e);}\n function _typeof(o) {\"@babel/helpers - typeof\";return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;}, _typeof(o);}\n !function (t, e) {\n \"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) && \"undefined\" != typeof module ? e(exports, require('pandav:/npm/maptalks/1.2.1'), require('pandav:/npm/@maptalks/gl/0.108.1')) : \"function\" == typeof define && define.amd ? define([\"exports\", \"maptalks\", \"@maptalks/gl\"], e) : e((t = \"undefined\" != typeof globalThis ? globalThis : t || self).maptalks = t.maptalks || {}, t.maptalks, t.maptalks);\n }(void 0, function (t, e, n) {\n \"use strict\";\n\n function i(t) {\n var e = Object.create(null);\n return t && Object.keys(t).forEach(function (n) {\n if (\"default\" !== n) {\n var i = Object.getOwnPropertyDescriptor(t, n);\n Object.defineProperty(e, n, i.get ? i : {\n enumerable: !0,\n get: function get() {\n return t[n];\n } });\n\n }\n }), e.default = t, Object.freeze(e);\n }\n var s = i(e),\n r = i(n);\n var o = 'function(e){\\n/*!\\n * @maptalks/gl v0.108.1\\n * LICENSE : UNLICENSED\\n * (c) 2016-2025 maptalks.com\\n */\\nconst n=function(){if(\"undefined\"!=typeof undefinedThis)return globalThis;if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof undefined)return global;throw new Error(\"unable to locate global object\")},t=n(),r=t.gl_trans__coders=t.gl_trans__coders||{};r.inject=function(e){const r=e.toString(),o=r.indexOf(\"{\")+1,s=r.substring(0,o),a=t.gl_trans__coders=t.gl_trans__coders||{};let c=`${s}\\\\n const _____getGlobal = ${n.toString()};\\\\n const g___lobals = _____getGlobal()\\\\n const tran_____scoders = g___lobals[\\'gl_trans__coders\\'] = g___lobals[\\'gl_trans__coders\\'] || {};`;for(const e in a)\"inject\"!==e&&\"getTranscoder\"!==e&&\"registerTranscoder\"!==e&&(c+=\\'tran_____scoders[\"\\'+e+\\'\"] =\\'+a[e].toString()+\"\\\\n;\");return c+=\"\\\\n(\"+n().maptalks_gltf_loader_bundle.toString()+\")({});\\\\n\",c+=\"\\\\n\"+r.substring(s.length),c},r.registerTranscoder=function(e,n){r[e]=n},r.getTranscoder=function(e){return r[e]};const o=n().maptalks_gltf_loader,s={\"image/crn\":r.crn&&r.crn(),\"image/ktx2\":r.ktx2&&r.ktx2(),\"image/cttf\":r.ktx2&&r.ktx2(),\"draco\":r.draco&&r.draco()};let a;const c={};function i(e,n,t){return new o.GLTFLoader(e,n,t).load({skipAttributeTransform:!0})}function f(e,n,t,r){const a=n.lastIndexOf(\"/\"),c=n.slice(0,a);r&&(n=r(n));const f=(...n)=>l.call(this,e,...n);return function(e,n){return o.Ajax.getArrayBuffer(e,n)}(n,t).then((e=>{if(e.message)return e;const a=e.data;return new DataView(a,a.byteOffset,a.byteLength).getUint32(4,!0)>2?function(e,n){return o.Ajax.getJSON(e,n)}(n,t).then((e=>e.message?e:i(c,e,{requestImage:f,decoders:s,transferable:!0,fetchOptions:t,urlModifier:r}))):i(c,{buffer:e.data,byteOffset:0},{requestImage:f,decoders:s,transferable:!0,fetchOptions:t,urlModifier:r})}))}function l(e,n,t,r){e?c[n]?c[n].push(r):(c[n]=[r],self.postMessage({type:\"\",command:\"sendImageData\",actorId:e,workerId:a,params:n})):function(e,n){const t=new Image;t.onload=()=>{if(!u)return void n(new Error(\"There is no canvas to draw image!\"));u.width=t.width,u.height=t.height;const e=u.getContext(\"2d\");e.drawImage(t,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height),o={width:t.width,height:t.height,data:new Uint8Array(r.data)};n(null,o,[o.data.buffer])},t.onerror=function(e){n(e)},t.src=e}(n,r)}const u=\"undefined\"==typeof document?null:document.createElement(\"canvas\");e.loadGLTF=f,e.onmessage=function(e){const n=e.data,t=n.url;if(\"addLayer\"===n.command||\"removeLayer\"===n.command)a=e.workerId,self.postMessage({type:\"\",actorId:n.actorId,workerId:a,params:\"ok\"});else if(t)!function(e){const n=e.data,t=e.callback,r=e.actorId,o=n.url,s=n.fetchOptions||{};s.referrerPolicy=s.referrerPolicy||\"origin\",s.referrer=n.referrer,f(r,o,s).then((e=>{e.message?self.postMessage({callback:t,error:e}):self.postMessage({callback:t,data:e},e.transferables)})).catch((e=>{self.postMessage({callback:t,error:e})})),c.receive=t}(e);else if(n.imageUrl){const e=c[n.imageUrl];if(delete c[n.imageUrl],e)for(let t=0;t 0 ? s / o : r,\n a = Math.floor(s / h),\n c = [],\n l = i.map,\n u = i.rotateAlongLine + function (t, n, i) {\n var s = i.getGLRes(),\n r = i.coordinateToPointAtRes(t, s),\n o = i.coordinateToPointAtRes(n, s);\n return e.Util.computeDegree(o.x, o.y, r.x, r.y) / Math.PI * 180;\n }(t, n, l);\n if (a >= 1) {\n var _e2 = 0,\n _r = a;\n if (i.snapToEndVertexes) for (var _i = _e2; _i <= _r; _i++) {\n var _e3 = {\n coordinates: f(t, n, h * _i / s),\n scale: [1, 1, 1],\n rotation: [0, 0, u] };\n\n c.push(_e3);\n } else for (var _i2 = _e2 + 1; _i2 <= _r; _i2++) {\n var _e4 = {\n coordinates: f(t, n, h * (_i2 - .5) / s),\n scale: [1, 1, 1],\n rotation: [0, 0, u] };\n\n c.push(_e4);\n }\n if (i.scaleEndModel) {\n var _e5 = (s - h * a) / h,\n _i3 = {\n coordinates: f(t, n, (h * a + (s - h * a) / 2) / s),\n scale: [_e5, 1, 1],\n rotation: [0, 0, u] };\n\n c.push(_i3);\n }\n } else if (i.scaleEndModel) {\n var _e6 = s / h,\n _i4 = {\n coordinates: f(t, n, .5),\n scale: [_e6, 1, 1],\n rotation: [0, 0, u] };\n\n c.push(_i4);\n }\n return c;\n }\n function f(t, n, i) {\n var s = d(t.x, n.x, i),\n r = d(t.y, n.y, i);\n return new e.Coordinate(s, r);\n }\n function d(t, e, n) {\n return t + n * (e - t);\n }\n for (var m = [], p = 0; p < 6; p++) m[p] = [];\n var g = [];\n function _(t, e, n) {\n var i, s, r, o, h, a, c, l, u, f, d, p, _, x, w, b, M;\n s = (i = t)[0], r = i[1], o = i[2], h = i[3], a = i[4], c = i[5], l = i[6], u = i[7], f = i[8], d = i[9], p = i[10], _ = i[11], x = i[12], w = i[13], b = i[14], M = i[15], y(m[0], h - s, u - a, _ - f, M - x), y(m[1], h + s, u + a, _ + f, M + x), y(m[2], h + r, u + c, _ + d, M + w), y(m[3], h - r, u - c, _ - d, M - w), y(m[4], h - o, u - l, _ - p, M - b), y(m[5], h + o, u + l, _ + p, M + b);\n for (var O = 0; O < 6; O++) {\n var S = m[O];\n if (g[0] = S[0] > 0 ? e[1][0] : e[0][0], g[1] = S[1] > 0 ? e[1][1] : e[0][1], g[2] = S[2] > 0 ? e[1][2] : e[0][2], v(S, g) < 0) return !1;\n }\n return !0;\n }\n function y(t, e, n, i, s) {\n var r = 1 / Math.sqrt(e * e + n * n + i * i);\n return t[0] = e * r, t[1] = n * r, t[2] = i * r, t[3] = s * r, t;\n }\n function v(t, e) {\n return t[0] * e[0] + t[1] * e[1] + t[2] * e[2] + t[3];\n }\n var x = {};\n var w = \"undefined\" == typeof document ? null : document.createElement(\"canvas\");\n var b = function (_s$worker$Actor) {\n function b(t, e) {\n var _this;\n _classCallCheck(this, b);\n _this = _callSuper(this, b, [t]), _this.mapId = e.getMap().id, _this.i = e;\n return _this;\n }\n _inherits(b, _s$worker$Actor);\n return _createClass(b, [{\n key: \"loadGLTF\",\n value: function loadGLTF(t) {\n var _this2 = this;\n var e = function (t) {\n var e = document.createElement(\"a\");\n return e.href = t, t = e.href, e = null, t;\n }(t),\n n = {\n url: e,\n referrer: window && window.location.href,\n fetchOptions: this.i.options.fetchOptions };\n\n return new Promise(function (t, e) {\n _this2.send(n, null, function (n, i) {\n n ? e(n) : t(i);\n });\n });\n } },\n {\n key: \"sendImageData\",\n value: function sendImageData(t, e) {\n var _this3 = this;\n !function (t, e) {\n var n = new Image();\n n.onload = function () {\n if (!w) return void e(new Error(\"There is no canvas to draw image!\"));\n w.width = n.width, w.height = n.height;\n var t = w.getContext(\"2d\");\n t.drawImage(n, 0, 0, n.width, n.height);\n var i = t.getImageData(0, 0, n.width, n.height),\n s = {\n width: n.width,\n height: n.height,\n data: new Uint8Array(i.data) };\n\n e(null, s, [s.data.buffer]);\n }, n.onerror = function (t) {\n e(t);\n }, n.src = t;\n }(t, function (n, i) {\n n || _this3.isActive() && e(null, {\n result: i,\n imageUrl: t });\n\n });\n } },\n {\n key: \"addLayer\",\n value: function addLayer(t, e, n) {\n var i = {\n actorId: this.actorId,\n mapId: this.mapId,\n layerId: t,\n command: \"addLayer\",\n params: {\n options: e } };\n\n\n this.broadcast(i, null, n);\n } },\n {\n key: \"removeLayer\",\n value: function removeLayer(t, e, n) {\n var i = {\n mapId: this.mapId,\n layerId: t,\n command: \"removeLayer\" };\n\n this.broadcast(i, null, n);\n } }]);\n\n }(s.worker.Actor);\n var M = function M() {\n if (\"undefined\" != typeof globalThis) return globalThis;\n if (\"undefined\" != typeof self) return self;\n if (\"undefined\" != typeof window) return window;\n if (\"undefined\" != typeof global) return global;\n throw new Error(\"unable to locate global object\");\n },\n O = M(),\n S = O.gl_trans__coders = O.gl_trans__coders || {};\n S.inject = function (t) {\n var e = t.toString(),\n n = e.indexOf(\"{\") + 1,\n i = e.substring(0, n),\n s = O.gl_trans__coders = O.gl_trans__coders || {};\n var r = \"\".concat(i, \"\\n const _____getGlobal = \").concat(M.toString(), \";\\n const g___lobals = _____getGlobal()\\n const tran_____scoders = g___lobals['gl_trans__coders'] = g___lobals['gl_trans__coders'] || {};\");\n for (var _t2 in s) \"inject\" !== _t2 && \"getTranscoder\" !== _t2 && \"registerTranscoder\" !== _t2 && (r += 'tran_____scoders[\"' + _t2 + '\"] =' + s[_t2].toString() + \"\\n;\");\n return r += \"\\n(\" + M().maptalks_gltf_loader_bundle.toString() + \")({});\\n\", r += \"\\n\" + e.substring(i.length), r;\n }, S.registerTranscoder = function (t, e) {\n S[t] = e;\n }, S.getTranscoder = function (t) {\n return S[t];\n };\n var T = M().maptalks_gltf_loader,\n A = {\n \"image/crn\": S.crn && S.crn(),\n \"image/ktx2\": S.ktx2 && S.ktx2(),\n \"image/cttf\": S.ktx2 && S.ktx2(),\n \"draco\": S.draco && S.draco() };\n\n var k;\n var P = {};\n function C(t, e, n) {\n return new T.GLTFLoader(t, e, n).load({\n skipAttributeTransform: !0 });\n\n }\n function L(t, e, n, i) {\n var _this4 = this;\n var s = e.lastIndexOf(\"/\"),\n r = e.slice(0, s);\n i && (e = i(e));\n var o = function o() {\n for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {\n e[_key] = arguments[_key];\n }\n return I.call.apply(I, [_this4, t].concat(e));\n };\n return function (t, e) {\n return T.Ajax.getArrayBuffer(t, e);\n }(e, n).then(function (t) {\n if (t.message) return t;\n var s = t.data;\n return new DataView(s, s.byteOffset, s.byteLength).getUint32(4, !0) > 2 ? function (t, e) {\n return T.Ajax.getJSON(t, e);\n }(e, n).then(function (t) {\n return t.message ? t : C(r, t, {\n requestImage: o,\n decoders: A,\n transferable: !0,\n fetchOptions: n,\n urlModifier: i });\n\n }) : C(r, {\n buffer: t.data,\n byteOffset: 0 },\n {\n requestImage: o,\n decoders: A,\n transferable: !0,\n fetchOptions: n,\n urlModifier: i });\n\n });\n }\n function I(t, e, n, i) {\n t ? P[e] ? P[e].push(i) : (P[e] = [i], self.postMessage({\n type: \"\",\n command: \"sendImageData\",\n actorId: t,\n workerId: k,\n params: e })) :\n function (t, e) {\n var n = new Image();\n n.onload = function () {\n if (!F) return void e(new Error(\"There is no canvas to draw image!\"));\n F.width = n.width, F.height = n.height;\n var t = F.getContext(\"2d\");\n t.drawImage(n, 0, 0, n.width, n.height);\n var i = t.getImageData(0, 0, n.width, n.height),\n s = {\n width: n.width,\n height: n.height,\n data: new Uint8Array(i.data) };\n\n e(null, s, [s.data.buffer]);\n }, n.onerror = function (t) {\n e(t);\n }, n.src = t;\n }(e, i);\n }\n var F = \"undefined\" == typeof document ? null : document.createElement(\"canvas\");\n var N;\n var D = {\n width: 100,\n height: 10 };\n\n var G = !1;\n try {\n var _t3 = new OffscreenCanvas(1, 1);\n _t3.getContext(\"2d\").fillText(\"hello\", 0, 0), G = !0;\n } catch (t) {\n G = !1;\n }\n function E() {\n if (!N) {\n var _t4 = D.width,\n _e7 = D.height;\n G ? N = new OffscreenCanvas(_t4, _e7) : (N = document.createElement(\"canvas\"), N.width = _t4, N.height = _e7);\n }\n return N;\n }\n var j = function () {\n function j(t) {\n var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, j);\n if (!Array.isArray(t)) return void console.error(\"colors is not array\");\n if (t.length < 2) return void console.error(\"colors.length should >1\");\n this.colors = t;\n var n = 1 / 0,\n i = -1 / 0;\n for (var _e8 = 0, _s = t.length; _e8 < _s; _e8++) {\n var _s2 = t[_e8][0];\n n = Math.min(_s2, n), i = Math.max(_s2, i);\n }\n this.min = n, this.max = i, this.valueOffset = this.max - this.min, this.options = Object.assign({}, D, e), this.o();\n }\n return _createClass(j, [{\n key: \"getImageData\",\n value: function getImageData() {\n return this.imgData;\n } },\n {\n key: \"o\",\n value: function o() {\n var t = E(),\n _this$options = this.options,\n e = _this$options.width,\n n = _this$options.height;\n t.width = e, t.height = n;\n var i = t.getContext(\"2d\");\n i.clearRect(0, 0, t.width, t.height);\n var s = i.createLinearGradient(0, 0, t.width, 0),\n r = this.colors,\n o = this.valueOffset;\n for (var _t5 = 0, _e9 = r.length; _t5 < _e9; _t5++) {\n var _r$_t = _slicedToArray(r[_t5], 2),\n _e10 = _r$_t[0],\n _n = _r$_t[1],\n _i5 = (_e10 - this.min) / o;\n s.addColorStop(_i5, _n);\n }\n i.fillStyle = s, i.fillRect(0, 0, t.width, t.height), this.imgData = i.getImageData(0, 0, t.width, t.height);\n } },\n {\n key: \"getColor\",\n value: function getColor(t) {\n t = Math.max(this.min, t);\n var e = ((t = Math.min(t, this.max)) - this.min) / this.valueOffset;\n var n = Math.round(e * this.imgData.width);\n n = Math.min(n, this.imgData.width - 1);\n var i = 4 * n;\n return [this.imgData.data[i], this.imgData.data[i + 1], this.imgData.data[i + 2], this.imgData.data[i + 3]];\n } }]);\n\n }();\n var B;\n function R(t) {\n return null == t;\n }\n function U(t) {\n return !R(t);\n }\n function J(t) {\n return \"\" === t;\n }\n function z(t, e) {\n var n, i, s;\n if (Q(t)) {\n var r,\n o = t.stops && \"object\" == _typeof(t.stops[0][0]),\n h = o || U(t.property),\n a = o || !h,\n c = t.type || e || \"exponential\";\n if (\"exponential\" === c) r = V;else if (\"interval\" === c) r = H;else if (\"categorical\" === c) r = $;else if (\"identity\" === c) r = W;else if (\"color-interpolate\" === c) r = Z;else {\n if (\"calculate-expression\" !== c) throw new Error('Unknown function type \"' + c + '\"');\n r = X;\n }\n if (o) {\n var l = {},\n u = [];\n for (var _e11 = 0; _e11 < t.stops.length; _e11++) {\n var f = t.stops[_e11];\n void 0 === l[f[0].zoom] && (l[f[0].zoom] = {\n zoom: f[0].zoom,\n type: t.type,\n property: t.property,\n default: t.default,\n stops: [] }),\n l[f[0].zoom].stops.push([f[0].value, f[1]]);\n }\n for (var _t6 in l) u.push([l[_t6].zoom, z(l[_t6])]);\n n = function n(e, _n2) {\n var i = V({\n stops: u,\n base: t.base },\n e)(e, _n2);\n return \"function\" == typeof i ? i(e, _n2) : i;\n }, i = !1, s = !1;\n } else a ? (n = function n(e) {\n var n = r(t, e);\n return \"function\" == typeof n ? n(e) : n;\n }, i = !0, s = !1) : (n = function n(e, _n3) {\n var i = r(t, _n3 ? _n3[t.property] : null);\n return \"function\" == typeof i ? i(e, _n3) : i;\n }, i = !1, s = !0);\n } else n = function n() {\n return t;\n }, i = !0, s = !0;\n return n.isZoomConstant = s, n.isFeatureConstant = i, n;\n }\n function $(t, e) {\n for (var _n4 = 0; _n4 < t.stops.length; _n4++) if (e === t.stops[_n4][0]) return t.stops[_n4][1];\n return t.default;\n }\n function H(t, e) {\n for (var n = 0; n < t.stops.length && !(e < t.stops[n][0]); n++);\n return t.stops[Math.max(n - 1, 0)][1];\n }\n function V(t, e) {\n for (var n = U(t.base) && !J(t.base) ? t.base : 1, i = 0; !(i >= t.stops.length || e <= t.stops[i][0]);) i++;\n return 0 === i ? t.stops[i][1] : i === t.stops.length ? t.stops[i - 1][1] : Y(e, n, t.stops[i - 1][0], t.stops[i][0], t.stops[i - 1][1], t.stops[i][1]);\n }\n \"function\" == typeof Map && (B = new Map());\n var q = {\n width: 100,\n height: 1 };\n\n function Z(t, e) {\n var n = t.stops;\n if (n && n.length > 1) {\n var _t7;\n if (B) {\n var _e12 = JSON.stringify(n);\n if (!B.has(_e12)) {\n var _t8 = new j(n, q);\n B.set(_e12, _t8);\n }\n _t7 = B.get(_e12);\n } else _t7 = new j(n, q);\n var _t7$getColor = _t7.getColor(e),\n _t7$getColor2 = _slicedToArray(_t7$getColor, 4),\n _i6 = _t7$getColor2[0],\n _s3 = _t7$getColor2[1],\n _r2 = _t7$getColor2[2],\n _o = _t7$getColor2[3];\n return [_i6 / 255, _s3 / 255, _r2 / 255, _o / 255];\n }\n return n && 1 === n.length ? n[0][1] : null;\n }\n function W(t, e) {\n return n = e, i = t.default, U(n) ? n : U(i) ? i : U(s) ? s : null;\n var n, i, s;\n }\n function X(t, e) {\n var n = String(t.property),\n i = t.expression,\n s = e;\n function r(e) {\n return R(e) || J(e) || isNaN(e) ? t.default : e;\n }\n if (!U(e) || J(e) || isNaN(e) || e < 0) return r(t.default);\n {\n var _e13 = function t(e, n, i) {\n var s = Number(i),\n r = String(n);\n return Array.isArray(e) ? e.map(function (e) {\n return t(e, r, s);\n }) : e === r ? s : e;\n }(i, n, s);\n return r(function e(n) {\n if (!Array.isArray(n)) {\n if (\"number\" == typeof n) return n;\n throw new Error(\"Invalid expression format\");\n }\n {\n var _i7 = n[0];\n if (![\"+\", \"-\", \"*\", \"/\"].includes(_i7)) throw new Error(\"Unknown operator: \".concat(_i7));\n var _s4 = n.slice(1).map(function (t) {\n return e(t);\n });\n switch (_i7) {\n case \"+\":\n return _s4.reduce(function (t, e) {\n return t + e;\n }, 0);\n case \"-\":\n return _s4.reduce(function (t, e) {\n return t - e;\n });\n case \"*\":\n return _s4.reduce(function (t, e) {\n return t * e;\n }, 1);\n case \"/\":\n return _s4.some(function (t) {\n return 0 === t;\n }) ? t.default : _s4.reduce(function (t, e) {\n return t / e;\n });\n default:\n throw new Error(\"Unsupported operator: \".concat(_i7));}\n\n }\n }(_e13));\n }\n }\n function Y(t, e, n, i, s, r) {\n return \"function\" == typeof s ? function () {\n var o = s.apply(void 0, arguments),\n h = r.apply(void 0, arguments);\n return Y(t, e, n, i, o, h);\n } : s.length ? function (t, e, n, i, s, r) {\n var o = [];\n for (var _h = 0; _h < s.length; _h++) o[_h] = K(t, e, n, i, s[_h], r[_h]);\n return o;\n }(t, e, n, i, s, r) : K(t, e, n, i, s, r);\n }\n function K(t, e, n, i, s, r) {\n var o,\n h = i - n,\n a = t - n;\n return s * (1 - (o = 1 === e ? a / h : (Math.pow(e, a) - 1) / (Math.pow(e, h) - 1))) + r * o;\n }\n function Q(t) {\n return t && \"object\" == _typeof(t) && (t.stops || t.property && \"identity\" === t.type || t.expression && \"calculate-expression\" === t.type);\n }\n function tt(t) {\n for (var _e14 in t) if (Q(t[_e14])) return !0;\n return !1;\n }\n function et(t) {\n return it(t, \"exponential\");\n }\n function nt(t, e) {\n if (!t) return null;\n var n = !1;\n if (Array.isArray(t)) {\n var i,\n s = [];\n for (var _r3 = 0; _r3 < t.length; _r3++) (i = nt(t[_r3], e)) ? (s.push(i), n = !0) : s.push(t[_r3]);\n return n ? s : t;\n }\n var r,\n o = {\n \"__fn_types_loaded\": !0 },\n\n h = [];\n for (r in t) t.hasOwnProperty(r) && h.push(r);\n var a = function a(t) {\n Object.defineProperty(o, t, {\n get: function get() {\n return this[\"__fn_\" + t] || (this[\"__fn_\" + t] = et(this[\"_\" + t])), this[\"__fn_\" + t].apply(this, e());\n },\n set: function set(e) {\n this[\"_\" + t] = e;\n },\n configurable: !0,\n enumerable: !0 });\n\n };\n for (var _e15 = 0, _i8 = h.length; _e15 < _i8; _e15++) Q(t[r = h[_e15]]) ? (n = !0, o[\"_\" + r] = t[r], a(r)) : o[r] = t[r];\n return n ? o : t;\n }\n function it(t, e) {\n if (!Q(t)) return function () {\n return t;\n };\n var n = !0,\n i = !0;\n var s = (t = JSON.parse(JSON.stringify(t))).stops;\n if (s) for (var _t9 = 0; _t9 < s.length; _t9++) if (Q(s[_t9][1])) {\n var _r4 = it(s[_t9][1], e);\n n = n && _r4.isZoomConstant, i = i && _r4.isFeatureConstant, s[_t9] = [s[_t9][0], _r4];\n }\n var r = z(t, e);\n return r.isZoomConstant = n && r.isZoomConstant, r.isFeatureConstant = i && r.isFeatureConstant, r;\n }\n var st = [],\n rt = [],\n ot = [],\n ht = [],\n at = [1, 1, 1],\n ct = [],\n lt = [],\n ut = [1, 1, 1],\n ft = [],\n dt = new n.reshader.BoundingBox(),\n mt = function (t, e) {\n var n = [];\n return n[0] = t[0], n[1] = t[1], n[2] = t[2], n[3] = 0, n[4] = t[3], n[5] = t[4], n[6] = t[5], n[7] = 0, n[8] = t[6], n[9] = t[7], n[10] = t[8], n[11] = 0, n[12] = e[0], n[13] = e[1], n[14] = e[2], n[15] = 1, n;\n }(function (t) {\n var e = Math.cos(t),\n n = Math.sin(t),\n i = [];\n return i[0] = 1, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = e, i[5] = n, i[6] = 0, i[7] = -n, i[8] = e, i;\n }(.5 * Math.PI), [0, 0, 0]),\n pt = new e.Point(0, 0),\n gt = [186 / 255, 186 / 255, 186 / 255, 1],\n _t = {\n \"lightAmbient\": [1, 1, 1],\n \"lightDiffuse\": [1, 1, 1],\n \"lightSpecular\": [1, 1, 1],\n \"lightDirection\": [1, 1, 1] },\n\n yt = new Set([\"url\", \"translationX\", \"translationY\", \"translationZ\", \"rotationX\", \"rotationY\", \"rotationZ\", \"scaleX\", \"scaleY\", \"scaleZ\", \"anchorZ\", \"markerPixelHeight\", \"modelHeight\"]),\n vt = [1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1],\n xt = [0, 1, 1, 2, 2, 3, 3, 0, 0, 4, 1, 5, 2, 6, 3, 7, 4, 5, 5, 6, 6, 7, 7, 4],\n wt = [.8, .8, .1, 1];\n var bt = function (_e$Marker) {\n function bt(t, i) {\n var _this5;\n _classCallCheck(this, bt);\n var s = e.Util.extend({}, i),\n r = s.symbol;\n _this5 = _callSuper(this, bt, [t, s]), _this5.options.symbol = r, _this5.h = !1, _this5.l = n.mat4.identity([]), _this5.u = \"gltfmarker\", _this5.m = !0, _this5.p = !0, _this5._ = {\n get translation() {\n return [0, 0, 0];\n },\n get rotation() {\n return [0, 0, 0];\n },\n get scale() {\n return [1, 1, 1];\n } },\n _this5.v();\n return _this5;\n }\n _inherits(bt, _e$Marker);\n return _createClass(bt, [{\n key: \"setTransformOrigin\",\n value: function setTransformOrigin(t) {\n this.M = t;\n } },\n {\n key: \"getTransformOrigin\",\n value: function getTransformOrigin() {\n return this.M || this.getCenter();\n } },\n {\n key: \"getMeshes\",\n value: function getMeshes(t, e, i) {\n var _this6 = this;\n var s = [];\n var r = this.getMap();\n if (e && (this.regl = e), this.getLayer().isVisible() && this.isVisible() && this.O()) {\n if (!this.S) return this.T(t, e), s;\n var _o2 = this.isAnimated() || this.A() && r.isZooming() || this.p || \"multigltfmarker\" === this.getGLTFMarkerType() && this.m || \"effectmarker\" === this.getGLTFMarkerType();\n if (!_o2) {\n var _t10 = this.l;\n n.mat4.copy(ct, _t10), this.v(), _o2 = !n.mat4.exactEquals(_t10, ct);\n }\n _o2 && this.k(this.S, i), s = this.S.filter(function (t) {\n return !!(_(r.projViewMatrix, t.getBoundingBox()) || t instanceof n.reshader.InstancedMesh) && (_this6.P(t, i), _this6.C(t), !0);\n }), this.L(!1);\n }\n return s;\n } },\n {\n key: \"getGLTFJSON\",\n value: function getGLTFJSON() {\n return this.I;\n } },\n {\n key: \"getAllMeshes\",\n value: function getAllMeshes() {\n return this.S;\n } },\n {\n key: \"F\",\n value: function F() {\n return this.I;\n } },\n {\n key: \"N\",\n value: function N(t) {\n this.I = t;\n } },\n {\n key: \"D\",\n value: function D(t, e) {\n this._externSymbol = this._externSymbol || {}, this._externSymbol[t] = e, \"uniforms\" === t && (this.G = !0);\n } },\n {\n key: \"setUrl\",\n value: function setUrl(t) {\n return this.updateSymbol({\n url: t }),\n this;\n } },\n {\n key: \"setSymbol\",\n value: function setSymbol(t) {\n var e = this.getUrl();\n _superPropGet(bt, \"setSymbol\", this, 3)([t]);\n var n = this.getShader(),\n i = this.j;\n i && t.url !== e && (i.logoutGLTF(e), this.B = !1, this.R(!1), delete this.S), this.U && this.U !== n && this.J(i, this.regl), this.U = n, this.G = !0, this.m = !0;\n } },\n {\n key: \"getCenter\",\n value: function getCenter() {\n var t = this.getMap();\n if (!t) return null;\n var n = c(t, _superPropGet(bt, \"getCenter\", this, 3)([]) || this.getCoordinates());\n if (!n) return null;\n var i = this.$(),\n s = new e.Point([n[0] + i[0], n[1] + i[1], n[2] + i[2]]),\n r = t.getGLRes(),\n o = t.pointAtResToCoord(s, r);\n return o.z = s.z / t.altitudeToPoint(100, r) * 100, o;\n } },\n {\n key: \"getPointZ\",\n value: function getPointZ() {\n var t = this.getCoordinates(),\n e = this.getMap();\n if (!e || !t) return null;\n return e.altitudeToPoint(t.z || 0, e.getGLRes());\n } },\n {\n key: \"getUrl\",\n value: function getUrl() {\n var t = this._getInternalSymbol();\n return t && t.url || \"pyramid\";\n } },\n {\n key: \"addTo\",\n value: function addTo(t) {\n if (this.getLayer()) throw new Error(\"GLTFMarker cannot be added to two or more layers at the same time.\");\n return t.addGeometry(this), this;\n } },\n {\n key: \"T\",\n value: function T(t, e) {\n var n = this.getUrl();\n if (this.j = t, !this.B) {\n var _e16 = this.getLayer().getRenderer();\n t.loginGLTF(n, function () {\n for (var _len2 = arguments.length, t = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n t[_key2] = arguments[_key2];\n }\n return _e16.H.apply(_e16, t);\n }), this.B = !0;\n }\n var i = t.getGLTF(n);\n i && !i.then && (this.R(!0), this.V(i, t, e));\n } },\n {\n key: \"P\",\n value: function P(t, e) {\n \"effectmarker\" === this.getGLTFMarkerType() ? this.updateUV(e) : \"glowmarker\" === this.getGLTFMarkerType() && this.q();\n var n = this.getUniforms();\n if (n && this.isDirty() && this.Z()) for (var _e17 in n) t.setUniform(_e17, n[_e17]);\n this.W() && (t.transparent = !0), t.setUniform(\"uPickingId\", this.X()), t.properties.isAnimated = this.isAnimated();\n } },\n {\n key: \"C\",\n value: function C(t) {\n var e = this.getShader(),\n i = t.getDefines();\n var s = !1;\n if (\"pbr\" === e || \"pbr-lite\" === e) {\n var _t11 = this.getLayer(),\n _n$reshader$pbr$PBRUt = n.reshader.pbr.PBRUtils.getIBLResOnCanvas(_t11.getRenderer().canvas),\n _e18 = _n$reshader$pbr$PBRUt.iblTexes;\n _e18 ? i.HAS_IBL_LIGHTING || (i.HAS_IBL_LIGHTING = 1, s = !0) : i.HAS_IBL_LIGHTING && (s = !0, delete i.HAS_IBL_LIGHTING);\n }\n s && t.setDefines(i);\n var r = this.getLayer().getRenderer();\n r && r.updateMaskDefines(t);\n } },\n {\n key: \"J\",\n value: function J(t) {\n var _this7 = this;\n var e = this.getUrl(),\n n = this.S;\n if (!t || !n) return;\n if (t.isSimpleModel(e)) return void this.Y(n);\n t.getGLTF(e) && (n.forEach(function (t) {\n _this7.P(t);\n }), this.Y(n));\n } },\n {\n key: \"Y\",\n value: function Y(t) {\n var _this8 = this;\n var e = this.getShader();\n t.forEach(function (t) {\n var n = _this8.K(t.properties.geometryResource);\n \"wireframe\" === e ? (t.properties.geometryResource && !t.properties.geometryResource.copyGeometry && t.properties.geometryResource.copyEdgeGeometry(), t.geometry = t.properties.geometryResource.copyGeometry) : t.geometry = t.properties.geometryResource.geometry, t.material = n;\n });\n } },\n {\n key: \"k\",\n value: function k(t, e) {\n var _this9 = this;\n n.vec3.set(at, 1, 1, 1);\n var i = n.mat4.identity(ct),\n s = this.isAnimated();\n this.v();\n var r = this.getModelMatrix(),\n _this$tt = this.tt(e),\n o = _this$tt.nodeMatrixMap,\n h = _this$tt.skinMap;\n this.et(at);\n var a = 0;\n t.forEach(function (t) {\n var e = t.properties.geometryResource.nodeIndex,\n c = o[e],\n l = s && c ? c : t.nodeMatrix;\n n.mat4.scale(i, r, at), n.mat4.multiply(i, i, mt), t.nt = t.nt || n.mat4.identity([]);\n var u = n.mat4.multiply(ft, t.nt, l);\n t instanceof n.reshader.InstancedMesh ? (t.positionMatrix = n.mat4.multiply(t.positionMatrix, i, u), t.localTransform = _this9.it(), _this9.st(t)) : t.localTransform = n.mat4.multiply(t.localTransform, i, u);\n var f = t.geometry.boundingBox.copy(dt);\n f.transform(t.positionMatrix, t.localTransform);\n var d = _this9.rt(f);\n if (Math.abs(d) > Math.abs(a) && (a = d), s) {\n var _n5 = h[e];\n _n5 && (t.material.set(\"skinAnimation\", 1), t.material.set(\"jointTextureSize\", _n5.jointTextureSize), t.material.set(\"numJoints\", _n5.numJoints), t.material.set(\"jointTexture\", _n5.jointTexture));\n var _i9 = t.geometry.properties.morphWeights;\n _i9 && _this9.ot(_i9, t.material);\n } else t.material.set(\"skinAnimation\", 0);\n });\n var c = this.ht();\n if (c && (n.mat4.scale(i, r, at), n.mat4.multiply(i, i, mt), this.ct.localTransform = n.mat4.multiply(this.ct.localTransform, i, this.ct.lt)), 0 !== a) {\n n.vec3.set(lt, 0, 0, a);\n var _e19 = n.mat4.fromTranslation(ct, lt);\n t.forEach(function (t) {\n if (t instanceof n.reshader.InstancedMesh) t.positionMatrix = n.mat4.multiply(t.positionMatrix, _e19, t.positionMatrix), _this9.st(t);else {\n var _i10 = n.mat4.multiply(t.localTransform, _e19, t.localTransform);\n t.localTransform = _i10;\n }\n }), c && (this.ct.localTransform = n.mat4.multiply(this.ct.localTransform, _e19, this.ct.localTransform));\n }\n t.forEach(function (t) {\n t instanceof n.reshader.InstancedMesh && _this9.st(t);\n }), this.fire(\"updatematrix\", {\n target: this });\n\n } },\n {\n key: \"getBoundingBoxCenter\",\n value: function getBoundingBoxCenter() {\n var t = this.ut,\n i = this.getMap();\n if (!t || !this.ct || !i) return null;\n var s = i.getGLRes(),\n r = t.min,\n o = t.max,\n h = n.vec3.add([], r, o);\n n.vec3.scale(h, h, .5), n.vec3.transformMat4(h, h, this.ct.localTransform);\n var a = new e.Point(h),\n c = i.pointAtResToCoordinate(a, s);\n return c.z = 100 / i.altitudeToPoint(100, s) * h[2], c;\n } },\n {\n key: \"getBoundingBoxWidth\",\n value: function getBoundingBoxWidth(t) {\n var e = this.ut;\n if (!e) return 0;\n var n = 0;\n \"x\" === t ? n = 0 : \"y\" === t ? n = 2 : \"z\" === t && (n = 1);\n var i = e.min,\n s = e.max,\n r = this.ft()[n];\n return (s[n] - i[n]) * r;\n } },\n {\n key: \"getAxisXWidth\",\n value: function getAxisXWidth() {\n return this.getBoundingBoxWidth(\"x\");\n } },\n {\n key: \"getAxisYWidth\",\n value: function getAxisYWidth() {\n return this.getBoundingBoxWidth(\"y\");\n } },\n {\n key: \"getAxisZWidth\",\n value: function getAxisZWidth() {\n return this.getBoundingBoxWidth(\"z\");\n } },\n {\n key: \"et\",\n value: function et(t) {\n var e = this.getMap(),\n n = e.getGLRes(),\n i = e.altitudeToPoint(100, n);\n return t[0] *= i / 100, t[1] *= i / 100, t[2] *= i / 100, t;\n } },\n {\n key: \"dt\",\n value: function dt(t, e) {\n return this.gltfPack.calModelHeightScale(t, e);\n } },\n {\n key: \"gt\",\n value: function gt(t, e) {\n var i = this.ut;\n if (!e || e < 0 || !i) return t;\n var s = this.getMap(),\n r = Math.abs(i.max[1] - i.min[1]),\n o = s.altitudeToPoint(r, s.getGLRes()),\n h = e * s.getGLScale() / o;\n return n.vec3.set(t, h, h, h);\n } },\n {\n key: \"getCurrentPixelHeight\",\n value: function getCurrentPixelHeight() {\n var t = this.getBoundingBox();\n return Math.abs(t.max[2] - t.min[2]) / this.getMap().getGLScale();\n } },\n {\n key: \"getFitTranslate\",\n value: function getFitTranslate(t) {\n var e = this.ut,\n i = n.vec3.set(t, (e.min[0] + e.max[0]) / 2, (e.min[1] + e.max[1]) / 2, (e.min[2] + e.max[2]) / 2);\n return n.vec3.scale(i, i, -1);\n } },\n {\n key: \"rt\",\n value: function rt(t) {\n var e = this.getSymbol(),\n n = e && e.anchorZ || \"center\";\n var i = 0;\n var s = t.max[2] - t.min[2];\n return \"bottom\" === n ? i = s / 2 : \"top\" === n && (i = -s / 2), i;\n } },\n {\n key: \"tt\",\n value: function tt(t) {\n var e = this.isAnimated(),\n n = this._t(),\n i = {},\n s = this.yt();\n if (t && e && this.gltfPack && n) {\n var _e20 = this.vt();\n if (a(_e20)) {\n this.xt(t);\n var _n6 = this.wt(),\n _r5 = this.isAnimationLooped(),\n _o3 = this.getAnimationSpeed(),\n _h2 = this.getSymbol(),\n _a = _h2 && _h2.animationNodes;\n for (var _h3 = 0; _h3 < _e20.length; _h3++) this.gltfPack.updateAnimation(t, _r5, _o3, _e20[_h3], _n6, i, s, _a);\n } else console.warn(\"animation specified does not exist!\");\n }\n return {\n nodeMatrixMap: i,\n skinMap: s };\n\n } },\n {\n key: \"V\",\n value: function V(t, e, n) {\n var i = this.getUrl();\n this.N(t.json), this.bt(i, e, n), this.J(e, n), this.createdBygltfmarker || (this.fire(\"load\", {\n data: t.json }),\n this.fire(\"setUrl-debug\"), this._fireEvent(\"meshcreate\", {\n url: i }));\n\n } },\n {\n key: \"bt\",\n value: function bt(t, e, n) {\n var _this10 = this;\n var i = [],\n s = this.getShader(),\n r = e.getGLTF(t);\n if (r && r.resources) {\n if (!r.resources.length) return void this._fireEvent(\"modelerror\", {\n url: t,\n info: \"there are no geomtries in the gltf model\" });\n\n this.gltfPack = r.gltfPack, r.resources.forEach(function (t) {\n var e = _this10.Mt(t, s, n);\n i.push(e);\n });\n }\n this.S = i, this.ut = this.Ot(), this.St(this.S), this.fire(\"createscene-debug\", {\n meshes: this.S });\n\n } },\n {\n key: \"St\",\n value: function St(t) {\n this.k(t);\n var e = this.getBoundingBox();\n if (!e) return;\n var i = this.getMap(),\n s = e.max,\n r = e.min;\n n.vec3.length([s[0] - r[0], s[1] - r[1], s[2] - r[2]]) / i.getGLScale() < 20 && (console.warn(\"Model's size on screen is too small, try to increase its symbol.scaleX/Y/Z\"), this.fire(\"smallonscreen\"));\n } },\n {\n key: \"ht\",\n value: function ht() {\n if (this.ct) return this.ct.material.set(\"lineColor\", this.Tt || wt), this.ct.material.set(\"lineOpacity\", this.At || 1), this.ct;\n var t = this.ut;\n if (!t) return null;\n var e = t.min,\n i = t.max;\n vt[0] = i[0], vt[1] = e[1], vt[2] = i[2], vt[3] = i[0], vt[4] = i[1], vt[5] = i[2], vt[6] = e[0], vt[7] = i[1], vt[8] = i[2], vt[9] = e[0], vt[10] = e[1], vt[11] = i[2], vt[12] = i[0], vt[13] = e[1], vt[14] = e[2], vt[15] = i[0], vt[16] = i[1], vt[17] = e[2], vt[18] = e[0], vt[19] = i[1], vt[20] = e[2], vt[21] = e[0], vt[22] = e[1], vt[23] = e[2];\n var s = new n.reshader.Geometry({\n POSITION: vt },\n xt, 0, {\n primitive: \"lines\",\n positionAttribute: \"POSITION\" });\n\n s.generateBuffers(this.regl);\n var r = new n.reshader.Mesh(s, new n.reshader.Material({\n lineColor: this.Tt || wt,\n lineOpacity: this.At || 1 }));\n\n return this.ct = r, this.ct.lt = n.mat4.copy([], r.localTransform), r;\n } },\n {\n key: \"showBoundingBox\",\n value: function showBoundingBox(t) {\n this.options.showDebugBoundingBox = !0, this.Tt = t && t.lineColor, this.At = t && t.lineOpacity, this.m = !0;\n } },\n {\n key: \"hideBoundingBox\",\n value: function hideBoundingBox() {\n this.options.showDebugBoundingBox = !1, this.m = !0;\n } },\n {\n key: \"getBoundingBox\",\n value: function getBoundingBox() {\n var _this11 = this;\n var t = this.S;\n if (!t || !t.length) return null;\n if (!this.p) return this.kt;\n \"multigltfmarker\" === this.getGLTFMarkerType() && t.forEach(function (t) {\n _this11.st(t), t.updateBoundingBox();\n });\n var e = t[0].getBoundingBox(),\n i = n.vec3.copy([], e[0]),\n s = n.vec3.copy([], e[1]);\n for (var _e21 = 1; _e21 < t.length; _e21++) {\n var _r6 = t[_e21].getBoundingBox(),\n _o4 = n.vec3.copy([], _r6[0]),\n _h4 = n.vec3.copy([], _r6[1]);\n _o4[0] < i[0] && (i[0] = _o4[0]), _o4[1] < i[1] && (i[1] = _o4[1]), _o4[2] < i[2] && (i[2] = _o4[2]), _h4[0] > s[0] && (s[0] = _h4[0]), _h4[1] > s[1] && (s[1] = _h4[1]), _h4[2] > s[2] && (s[2] = _h4[2]);\n }\n var r = {\n min: i,\n max: s };\n\n return this.kt = r, \"multigltfmarker\" === this.getGLTFMarkerType() ? this.Pt.length && (this.p = !1) : this.p = !1, r;\n } },\n {\n key: \"Ot\",\n value: function Ot() {\n return this.gltfPack.getGLTFBBox();\n } },\n {\n key: \"Mt\",\n value: function Mt(t, e, i) {\n var s = t,\n r = this.Ct(s, e, i),\n o = r.getDefines();\n return r instanceof n.reshader.InstancedMesh ? (o.HAS_PICKING_ID = 1, o.HAS_INSTANCE_COLOR = 1) : o.HAS_PICKING_ID = 2, r.geometry.data.COLOR_0 && (o.HAS_COLOR0 = 1), o.HAS_MIN_ALTITUDE = 1, o.HAS_LAYER_OPACITY = 1, r.setDefines(o), r;\n } },\n {\n key: \"Ct\",\n value: function Ct(t, e, i) {\n var s = this.getGLTFMarkerType();\n var r = null;\n var o = this.K(t);\n var h = t.geometry;\n if (\"wireframe\" === e && (t.copyEdgeGeometry(), h = t.copyGeometry), i ? h.generateBuffers(i) : (this.Lt = this.Lt || [], this.Lt.push(h)), \"multigltfmarker\" === s) {\n this.It();\n var _t12 = this.Ft(n.mat4.identity(ht)),\n _e22 = this.Nt();\n r = new n.reshader.InstancedMesh(_t12.attributesData, _e22, h, o), r.setUniform(\"instance\", 1), i ? r.generateInstancedBuffers(i) : (this.Dt = this.Dt || [], this.Dt.push(r));\n } else r = new n.reshader.Mesh(h, o), r.setUniform(\"instance\", 0);\n r.nodeMatrix = n.mat4.copy([], t.nodeMatrix), r.properties.geometryResource = t, r.properties.nodeIndex = t.nodeIndex, this.isBloom() && (r.bloom = 1), r.transparent = this.W();\n \"BLEND\" === t.extraInfo.alphaMode && (r.transparent = !0), r.properties.pickingId = this.X(), this.Gt(r);\n var a = this.getLayer();\n return Object.defineProperty(r.uniforms, \"minAltitude\", {\n enumerable: !0,\n get: function get() {\n return a.options.altitude || 0;\n } }),\n r;\n } },\n {\n key: \"K\",\n value: function K(t) {\n var e = null;\n var i = this.getShader(),\n s = this.getUniforms() || {},\n r = t.materialInfo || {},\n o = this.getLayer().getRenderer();\n if (\"phong\" === i) {\n if (\"pbrSpecularGlossiness\" === r.name) e = new n.reshader.PhongSpecularGlossinessMaterial(r);else {\n for (var _t13 in _t) s[_t13] = s[_t13] || _t[_t13];\n e = new n.reshader.PhongMaterial(r);\n }\n } else if (\"pbr\" === i) {\n if (e = \"pbrSpecularGlossiness\" === r.name ? new n.reshader.pbr.StandardSpecularGlossinessMaterial(r) : new n.reshader.pbr.StandardMaterial(r), o.regl && !n.reshader.pbr.PBRUtils.isSupported(o.regl)) {\n e = n.reshader.PhongMaterial.convertFrom(e);\n for (var _t14 in _t) s[_t14] = s[_t14] || _t[_t14];\n }\n } else e = \"pbr-lite\" === i ? new n.reshader.StandardLiteMaterial(r) : new n.reshader.Material(r);\n var h = this.getSymbol(),\n c = h && h.doubleSided;\n a(c) && (e.doubleSided = c);\n for (var _t15 in s) e.set(_t15, s[_t15]);\n return t.morphWeights && this.ot(t.morphWeights, e), t.skin && e.set(\"skinAnimation\", 0), e;\n } },\n {\n key: \"ot\",\n value: function ot(t, e) {\n var n = e.get(\"morphWeights1\") || [],\n i = e.get(\"morphWeights2\") || [];\n for (var _e23 = 0; _e23 < 4; _e23++) n[_e23] = t[_e23] || 0, i[_e23] = t[_e23 + 4] || 0;\n e.set(\"morphWeights1\", n), e.set(\"morphWeights2\", i);\n } },\n {\n key: \"Gt\",\n value: function Gt(t) {\n var e = this.getSymbol();\n e && e.uniforms ? (t.setUniform(\"polygonFill\", e.uniforms.polygonFill || gt), t.setUniform(\"polygonOpacity\", void 0 === e.uniforms.polygonOpacity ? 1 : e.uniforms.polygonOpacity), t.setUniform(\"lineColor\", e.uniforms.lineColor || gt), t.setUniform(\"lineOpacity\", void 0 === e.uniforms.lineOpacity ? 1 : e.uniforms.lineOpacity)) : (t.setUniform(\"polygonFill\", gt), t.setUniform(\"polygonOpacity\", 1), t.setUniform(\"lineColor\", gt), t.setUniform(\"lineOpacity\", 1));\n } },\n {\n key: \"Et\",\n value: function Et() {\n var t = this.getLayer();\n if (!t) return null;\n var i = t.getMap();\n if (!i) return null;\n var s = this.getBoundingBox();\n if (!s) return null;\n var r = this.getPointZ() || 0,\n o = s.min,\n h = s.max,\n a = n.vec4.set(rt, (o[0] + h[0]) / 2, (o[1] + h[1]) / 2, o[2] + r, 1),\n c = n.vec4.set(ot, (o[0] + h[0]) / 2, (o[1] + h[1]) / 2, h[2] + r, 1),\n l = n.vec4.transformMat4(a, a, i.projViewMatrix),\n u = n.vec4.transformMat4(c, c, i.projViewMatrix),\n f = (l[0] / l[3] + 1) * i.width / 2,\n d = (1 - l[1] / l[3]) * i.height / 2,\n m = (u[0] / u[3] + 1) * i.width / 2,\n p = (1 - u[1] / u[3]) * i.height / 2,\n g = Math.min(f, m),\n _ = Math.max(f, m),\n y = Math.min(d, p),\n v = Math.max(d, p);\n return new e.Extent({\n xmin: g,\n ymin: y,\n xmax: _,\n ymax: v });\n\n } },\n {\n key: \"onAdd\",\n value: function onAdd() {\n var t = this.getLayer().getMap();\n if (t && !a(this.jt)) {\n var _e24 = t.getZoom();\n this.jt = _e24;\n }\n } },\n {\n key: \"onRemove\",\n value: function onRemove() {\n this.Bt();\n } },\n {\n key: \"remove\",\n value: function remove() {\n var t = this.getUrl();\n if (this.j && (delete this.S, this.j.logoutGLTF(t), delete this.j), this.Rt) {\n for (var _t16 in this.Rt) this.Rt[_t16] && this.Rt[_t16].jointTexture && this.Rt[_t16].jointTexture.destroy();\n delete this.Rt;\n }\n this.ct && (this.ct.geometry.dispose(), this.ct.dispose(), delete this.ct), this.S && this.S.forEach(function (t) {\n t.dispose(), t.properties.bloomMesh && (t.properties.bloomMesh.dispose(), delete t.properties.bloomMesh);\n }), this.B = !1, delete this.I, delete this.gltfPack, _superPropGet(bt, \"remove\", this, 3)([]);\n } },\n {\n key: \"show\",\n value: function show() {\n return _superPropGet(bt, \"updateSymbol\", this, 3)([{\n visible: !0 }]),\n this;\n } },\n {\n key: \"hide\",\n value: function hide() {\n _superPropGet(bt, \"updateSymbol\", this, 3)([{\n visible: !1 }]);\n\n } },\n {\n key: \"setBloom\",\n value: function setBloom(t) {\n return this.updateSymbol({\n bloom: t }),\n this;\n } },\n {\n key: \"isBloom\",\n value: function isBloom() {\n var t = this._getInternalSymbol();\n return t && t.bloom;\n } },\n {\n key: \"setCastShadow\",\n value: function setCastShadow(t) {\n return _superPropGet(bt, \"updateSymbol\", this, 3)([{\n shadow: t }]),\n this;\n } },\n {\n key: \"isCastShadow\",\n value: function isCastShadow() {\n var t = this._getInternalSymbol();\n return t && (t.shadow || void 0 === t.shadow);\n } },\n {\n key: \"outlineNodes\",\n value: function outlineNodes(t) {\n var e = this.S;\n return e ? (e.forEach(function (e) {\n t.indexOf(e.properties.nodeIndex) > -1 && (e.properties.outline = !0);\n }), this.m = !0, this) : this;\n } },\n {\n key: \"outline\",\n value: function outline() {\n this.updateSymbol({\n outline: !0 });\n\n var t = this.S;\n return t ? (t.forEach(function (t) {\n t.properties.outline = !0;\n }), this.m = !0, this) : this;\n } },\n {\n key: \"cancelOutline\",\n value: function cancelOutline(t) {\n this.updateSymbol({\n outline: !1 });\n\n var e = this.S;\n return e ? (e.forEach(function (e) {\n t ? t.indexOf(e.properties.nodeIndex) > -1 && (e.properties.outline = !1) : e.properties.outline = !1;\n }), this.m = !0, this) : this;\n } },\n {\n key: \"isOutline\",\n value: function isOutline() {\n var t = this._getInternalSymbol();\n return !(!t || !a(t.outline)) && t.outline;\n } },\n {\n key: \"isVisible\",\n value: function isVisible() {\n var t = this._getInternalSymbol();\n return !t || !a(t.visible) || t.visible;\n } },\n {\n key: \"setCoordinates\",\n value: function setCoordinates(t) {\n return _superPropGet(bt, \"setCoordinates\", this, 3)([t]), this.m = !0, this.p = !0, this;\n } },\n {\n key: \"copy\",\n value: function copy() {\n var t = this.toJSON(),\n e = bt.fromJSON(t);\n return e.setZoomOnAdded(this.jt), e;\n } },\n {\n key: \"setShader\",\n value: function setShader(t) {\n return _superPropGet(bt, \"updateSymbol\", this, 3)([{\n shader: t }]),\n this;\n } },\n {\n key: \"getShader\",\n value: function getShader() {\n var t = this._getInternalSymbol();\n return t && t.shader || \"pbr\";\n } },\n {\n key: \"setUniforms\",\n value: function setUniforms(t) {\n return _superPropGet(bt, \"updateSymbol\", this, 3)([{\n uniforms: t }]),\n this.G = !0, this;\n } },\n {\n key: \"getUniforms\",\n value: function getUniforms() {\n var t = this._getInternalSymbol();\n return t && t.uniforms;\n } },\n {\n key: \"setUniform\",\n value: function setUniform(t, e) {\n var n = this.getUniforms() || {};\n return n[t] = e, _superPropGet(bt, \"updateSymbol\", this, 3)([{\n uniforms: n }]),\n this.G = !0, this;\n } },\n {\n key: \"getUniform\",\n value: function getUniform(t) {\n var e = this._getInternalSymbol();\n return e && e.uniforms && e.uniforms[t];\n } },\n {\n key: \"isAnimated\",\n value: function isAnimated() {\n var t = this._getInternalSymbol();\n return t && t.animation && this.I && this.I.animations;\n } },\n {\n key: \"isDashAnimated\",\n value: function isDashAnimated() {\n var t = this._getInternalSymbol();\n return t && t.uniforms && t.uniforms.dashEnabled && t.uniforms.dashAnimate;\n } },\n {\n key: \"setAnimation\",\n value: function setAnimation(t) {\n return _superPropGet(bt, \"updateSymbol\", this, 3)([{\n animation: t }]),\n delete this.Ut, this;\n } },\n {\n key: \"setAnimationLoop\",\n value: function setAnimationLoop(t) {\n return _superPropGet(bt, \"updateSymbol\", this, 3)([{\n loop: t }]),\n delete this.Ut, this.m = !0, this;\n } },\n {\n key: \"isAnimationLooped\",\n value: function isAnimationLooped() {\n var t = this._getInternalSymbol();\n return t && t.loop;\n } },\n {\n key: \"getAnimationSpeed\",\n value: function getAnimationSpeed() {\n var t = this._getInternalSymbol();\n return t && a(t.speed) ? t.speed : 1;\n } },\n {\n key: \"setAnimationSpeed\",\n value: function setAnimationSpeed(t) {\n return _superPropGet(bt, \"updateSymbol\", this, 3)([{\n speed: t }]),\n this;\n } },\n {\n key: \"Jt\",\n value: function Jt(t) {\n var e = this.getMap();\n return e ? c(e, t || this.getCoordinates()) : null;\n } },\n {\n key: \"setTRS\",\n value: function setTRS(t, e, n) {\n var i = t || this._.translation;\n return this.updateSymbol({\n translationX: i[0],\n translationY: i[1],\n translationZ: i[2],\n rotationX: e[0],\n rotationY: e[1],\n rotationZ: e[2],\n scaleX: n[0],\n scaleY: n[1],\n scaleZ: n[2] }),\n this;\n } },\n {\n key: \"zt\",\n value: function zt() {\n var t = this.$(),\n e = this.Jt();\n return e ? n.vec3.add(t, t, e) : t;\n } },\n {\n key: \"updateSymbol\",\n value: function updateSymbol(t) {\n var _this12 = this;\n var _loop = function _loop(_e25) {\n if (\"bloom\" === _e25 && _this12.S && _this12.S.forEach(function (n) {\n n.bloom = +!!t[_e25];\n }), yt.has(_e25)) {\n _this12.p = !0;\n return 1;\n }\n };\n for (var _e25 in t) {\n if (_loop(_e25)) break;\n }\n return _superPropGet(bt, \"updateSymbol\", this, 3)([t]);\n } },\n {\n key: \"setTranslation\",\n value: function setTranslation(t, e, n) {\n return this.updateSymbol({\n translationX: t,\n translationY: e,\n translationZ: n }),\n this;\n } },\n {\n key: \"setRotation\",\n value: function setRotation(t, e, n) {\n return this.updateSymbol({\n rotationX: t,\n rotationY: e,\n rotationZ: n }),\n this;\n } },\n {\n key: \"rotateAround\",\n value: function rotateAround(t, e) {\n var n = this.getMap();\n if (!n) return;\n var i = n.getGLRes();\n var s = this.getCoordinates();\n var r = n.coordinateToPointAtRes(s, i),\n o = n.coordinateToPointAtRes(t, i),\n h = r.x - o.x,\n a = r.y - o.y,\n c = 180 * Math.atan2(a, h) / Math.PI + e,\n l = Math.sqrt(h * h + a * a),\n u = Math.PI * c / 180,\n f = l * Math.cos(u) + o.x,\n d = l * Math.sin(u) + o.y;\n pt.set(f, d), s = n.pointAtResToCoordinate(pt, i), this.setCoordinates(s), this.updateSymbol({\n rotationZ: c });\n\n } },\n {\n key: \"setScale\",\n value: function setScale(t, e, n) {\n return this.updateSymbol({\n scaleX: t,\n scaleY: e,\n scaleZ: n }),\n this;\n } },\n {\n key: \"getTranslation\",\n value: function getTranslation() {\n var t = this._getInternalSymbol(),\n e = t && t.translationX || 0,\n i = t && t.translationY || 0,\n s = t && t.translationZ || 0;\n return n.vec3.set(this._.translation, e, i, s);\n } },\n {\n key: \"$\",\n value: function $() {\n var t = this.getTranslation();\n return this.getMap() ? this.$t(t) : this._.translation;\n } },\n {\n key: \"$t\",\n value: function $t(t) {\n var e = this.getMap(),\n i = e.distanceToPointAtRes(t[0], t[1], e.getGLRes(), pt),\n s = e.altitudeToPoint(t[2], e.getGLRes());\n return n.vec3.set(lt, l(i.x, t[0]), l(i.y, t[1]), l(s, t[2]));\n } },\n {\n key: \"getRotation\",\n value: function getRotation() {\n var t = this._getInternalSymbol(),\n e = t && t.rotationX || 0,\n i = t && t.rotationY || 0,\n s = t && t.rotationZ || 0;\n return n.vec3.set(this._.rotation, e, i, s);\n } },\n {\n key: \"getScale\",\n value: function getScale() {\n var t = this._getInternalSymbol();\n if (!t) return n.vec3.set(this._.scale, 1, 1, 1);\n var i = e.Util.isNil(t.scaleX) ? 1 : t.scaleX,\n s = e.Util.isNil(t.scaleY) ? 1 : t.scaleY,\n r = e.Util.isNil(t.scaleZ) ? 1 : t.scaleZ;\n return n.vec3.set(this._.scale, i, s, r);\n } },\n {\n key: \"ft\",\n value: function ft() {\n var t = this.getScale();\n if (this.ut) {\n var _e26 = this.A(),\n _i11 = this.getModelHeight();\n if (_e26 && _e26 > 0) {\n var _i12 = this.gt(ut, _e26);\n return n.vec3.multiply(_i12, _i12, t);\n }\n if (_i11) {\n var _e27 = this.dt(ut, _i11);\n return n.vec3.multiply(_e27, _e27, t);\n }\n }\n return t;\n } },\n {\n key: \"cancelMarkerPixelHeight\",\n value: function cancelMarkerPixelHeight() {\n return this.updateSymbol({\n markerPixelHeight: null });\n\n } },\n {\n key: \"setAnchorZ\",\n value: function setAnchorZ(t) {\n return this.updateSymbol({\n anchorZ: t }),\n this;\n } },\n {\n key: \"getAnchorZ\",\n value: function getAnchorZ() {\n var t = this._getInternalSymbol();\n return t && t.anchorZ || \"bottom\";\n } },\n {\n key: \"_setExternSymbol\",\n value: function _setExternSymbol(t) {\n return this.m = !0, _superPropGet(bt, \"_setExternSymbol\", this, 3)([t]);\n } },\n {\n key: \"Ht\",\n value: function Ht(t) {\n var _this13 = this;\n return nt(t, function () {\n var t = _this13.getMap();\n if (t) {\n return [t.getZoom()];\n }\n return null;\n });\n } },\n {\n key: \"_prepareSymbol\",\n value: function _prepareSymbol(t) {\n _superPropGet(bt, \"_prepareSymbol\", this, 3)([t]);\n var e = this.Ht(t);\n return e && e.uniforms && (e.uniforms = this.Ht(t.uniforms)), delete this.Vt, e;\n } },\n {\n key: \"hasFunctionDefinition\",\n value: function hasFunctionDefinition() {\n if (a(this.Vt)) return this.Vt;\n var t = this._getInternalSymbol();\n return this.Vt = tt(t) || t && t.uniforms && tt(t.uniforms), this.Vt;\n } },\n {\n key: \"setModelMatrix\",\n value: function setModelMatrix(t) {\n var e = n.mat4.getTranslation(this._.translation, t),\n i = n.mat4.getRotation(this._.rotation, t),\n s = n.mat4.getScaling(this._.scale, t);\n return this.setTranslation(e[0], e[1], e[2]), this.setRotation(i[0], i[1], i[2]), this.setScale(s[0], s[1], s[2]), this;\n } },\n {\n key: \"getModelMatrix\",\n value: function getModelMatrix() {\n return this.l;\n } },\n {\n key: \"v\",\n value: function v() {\n var t = this.zt(),\n e = this.getRotation(),\n i = n.quat.fromEuler(st, e[0], e[1], e[2]),\n s = this.ft();\n this.l = n.mat4.fromRotationTranslationScale(this.l, i, t, s);\n } },\n {\n key: \"isDirty\",\n value: function isDirty() {\n return this.m;\n } },\n {\n key: \"L\",\n value: function L(t) {\n return this.m = t, this;\n } },\n {\n key: \"qt\",\n value: function qt() {\n var t = this.toJSON();\n return t.zoomOnAdded = this.jt, t;\n } },\n {\n key: \"toJSON\",\n value: function toJSON() {\n var t = JSON.parse(JSON.stringify({\n coordinates: this.getCoordinates(),\n options: this.options || {},\n type: \"GLTFMarker\" })),\n\n n = this.getId();\n e.Util.isNil(n) || (t.options.id = n);\n var i = this.getProperties();\n i && (t.options.properties = JSON.parse(JSON.stringify(i)));\n var s = this.getSymbol();\n return s && (t.options.symbol = JSON.parse(JSON.stringify(s))), t;\n } },\n {\n key: \"setZoomOnAdded\",\n value: function setZoomOnAdded(t) {\n this.jt = t;\n } },\n {\n key: \"getZoomOnAdded\",\n value: function getZoomOnAdded() {\n return this.jt;\n } },\n {\n key: \"W\",\n value: function W() {\n return this.O() < 1;\n } },\n {\n key: \"O\",\n value: function O() {\n var t = this.getUniforms(),\n e = this.getShader();\n return \"pbr\" === e || \"phong\" === e ? t && a(t.polygonOpacity) ? t.polygonOpacity : 1 : \"wireframe\" === e && t && a(t.lineOpacity) ? t.lineOpacity : 1;\n } },\n {\n key: \"R\",\n value: function R(t) {\n this.h = t;\n } },\n {\n key: \"isLoaded\",\n value: function isLoaded() {\n return this.h;\n } },\n {\n key: \"getGLTFMarkerType\",\n value: function getGLTFMarkerType() {\n return this.u;\n } },\n {\n key: \"Zt\",\n value: function Zt(t) {\n this.Wt = t;\n } },\n {\n key: \"X\",\n value: function X() {\n return this.Wt;\n } },\n {\n key: \"getCount\",\n value: function getCount() {\n return 1;\n } },\n {\n key: \"getContainerExtent\",\n value: function getContainerExtent() {\n return this.Et();\n } },\n {\n key: \"getGLTFAsset\",\n value: function getGLTFAsset() {\n return this.I && this.I.asset;\n } },\n {\n key: \"openInfoWindow\",\n value: function openInfoWindow(t) {\n var _this14 = this;\n this.I ? _superPropGet(bt, \"openInfoWindow\", this, 3)([t]) : this.once(\"load\", function () {\n _superPropGet(bt, \"openInfoWindow\", _this14, 3)([t]);\n });\n } },\n {\n key: \"getAnimations\",\n value: function getAnimations() {\n if (!this.I) return null;\n var t = this.I,\n e = t.animations ? t.animations.map(function (t, e) {\n return {\n name: a(t.name) ? t.name : e };\n\n }) : null;\n return e ? e.map(function (t, e) {\n return t.name || e;\n }) : null;\n } },\n {\n key: \"getCurrentAnimation\",\n value: function getCurrentAnimation() {\n var t = this._getInternalSymbol();\n return t && t.animationName;\n } },\n {\n key: \"vt\",\n value: function vt() {\n var t = this.getAnimations();\n if (!t) return null;\n var e = this.getCurrentAnimation();\n if (!a(e)) return t.slice(0, 1);\n var n = [];\n e = Array.isArray(e) ? e : [e];\n for (var _i13 = 0; _i13 < e.length; _i13++) t.indexOf(e[_i13]) > -1 && n.push(e[_i13]);\n return n.length ? n : null;\n } },\n {\n key: \"setCurrentAnimation\",\n value: function setCurrentAnimation(t) {\n this.updateSymbol({\n animationName: t });\n\n } },\n {\n key: \"xt\",\n value: function xt(t) {\n a(this.Ut) || (this.Ut = t);\n } },\n {\n key: \"wt\",\n value: function wt() {\n return this.Ut || 0;\n } },\n {\n key: \"yt\",\n value: function yt() {\n return this.Rt = this.Rt || {}, this.Rt;\n } },\n {\n key: \"A\",\n value: function A() {\n var t = this._getInternalSymbol();\n return t && t.markerPixelHeight;\n } },\n {\n key: \"setModelHeight\",\n value: function setModelHeight(t) {\n return this.updateSymbol({\n modelHeight: t }),\n this;\n } },\n {\n key: \"getModelHeight\",\n value: function getModelHeight() {\n var t = this._getInternalSymbol();\n return t && t.modelHeight;\n } },\n {\n key: \"getGLTFBBox\",\n value: function getGLTFBBox() {\n return this.ut;\n } },\n {\n key: \"zoomTo\",\n value: function zoomTo() {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n animation: !0 };\n\n var e = arguments.length > 1 ? arguments[1] : undefined;\n var n = this.getBoundingBox(),\n i = this.getMap();\n if (!i || !n) return;\n var s = n.min,\n r = n.max;\n pt.set((s[0] + r[0]) / 2, (s[1] + r[1]) / 2);\n var o = i.getGLRes(),\n h = i.pointAtResToCoordinate(pt, o);\n return h.z = (s[2] + r[2]) / 2 / i.altitudeToPoint(1, o), this.Xt(h, t, e);\n } },\n {\n key: \"Xt\",\n value: function Xt(t, e, n) {\n var i = this.getMap(),\n s = e.pitch || i.getPitch(),\n r = e.bearing || i.getBearing(),\n o = e.duration || 500,\n h = e.easing || \"linear\",\n a = this.Yt(e.heightOffset || 0) + (e.zoomOffset || 0);\n return e.animation || void 0 === e.animation ? i.animateTo({\n center: t,\n zoom: a,\n bearing: r,\n pitch: s },\n {\n duration: o,\n easing: h },\n n) : i.setView({\n center: t,\n zoom: a,\n bearing: r,\n pitch: s }),\n this;\n } },\n {\n key: \"Yt\",\n value: function Yt(t) {\n var n = this.getMap(),\n i = n.getGLRes(),\n s = n.distanceToPointAtRes(100, 0, i).x / 100,\n r = this.getBoundingBox(),\n o = r.min,\n h = r.max,\n a = h[2] / n.altitudeToPoint(1, i) + t,\n c = n.getFitZoomForAltitude(a * s);\n pt.set(o[0], o[1]);\n var l = n.pointAtResToCoordinate(pt, n.getGLRes());\n pt.set(h[0], h[1]);\n var u = n.pointAtResToCoordinate(pt, n.getGLRes()),\n f = new e.Extent(l, u),\n d = n.getFitZoom(f);\n return c < d ? c : d;\n } },\n {\n key: \"Z\",\n value: function Z() {\n return this.G;\n } },\n {\n key: \"Kt\",\n value: function Kt() {\n this.G = !1;\n } },\n {\n key: \"setAnimationTimeframe\",\n value: function setAnimationTimeframe(t) {\n var e = this.wt(),\n n = this.yt();\n this.gltfPack.updateAnimation(t, this.isAnimationLooped(), this.getAnimationSpeed(), e, {}, n);\n } },\n {\n key: \"Bt\",\n value: function Bt() {\n delete this.kt, delete this.jt;\n } },\n {\n key: \"_t\",\n value: function _t() {\n return \"effectmarker\" !== this.getGLTFMarkerType() && \"glowmarker\" !== this.getGLTFMarkerType();\n } },\n {\n key: \"_onEvent\",\n value: function _onEvent(t, e) {\n var n = this.getLayer();\n if (!n) return;\n var i = n.getId();\n this.Qt = t.gltfPickingInfo && t.gltfPickingInfo[i] || {}, _superPropGet(bt, \"_onEvent\", this, 3)([t, e]);\n } },\n {\n key: \"_fireEvent\",\n value: function _fireEvent(t, e) {\n for (var _t17 in this.Qt) e[_t17] = this.Qt[_t17];\n delete this.Qt, _superPropGet(bt, \"_fireEvent\", this, 3)([t, e]);\n } },\n {\n key: \"te\",\n value: function te() {\n var t = [];\n return this.S && this.isVisible() && this.O() ? this.isOutline && this.isOutline() ? this.S : (t = this.S.filter(function (t) {\n return t.properties.outline;\n }), t) : t;\n } },\n {\n key: \"highlightNodes\",\n value: function highlightNodes(t) {\n var _this15 = this;\n var e = this.S;\n e ? this.ee(t, e) : this.once(\"load\", function () {\n _this15.ee(t, _this15.S);\n }, this);\n } },\n {\n key: \"ee\",\n value: function ee(t, e) {\n var _this16 = this;\n t.forEach(function (t) {\n e.forEach(function (e) {\n e.properties.nodeIndex === t.nodeIndex && _this16.ne(e, t.color, t.opacity, t.bloom);\n });\n }), this.m = !0;\n } },\n {\n key: \"highlight\",\n value: function highlight(t) {\n var _this17 = this;\n var e = t.color,\n n = t.opacity,\n i = t.bloom,\n s = this.S;\n s ? (s.forEach(function (t) {\n _this17.ne(t, e, n, i);\n }), this.m = !0) : this.once(\"load\", function () {\n _this17.S.forEach(function (t) {\n _this17.ne(t, e, n, i);\n }), _this17.m = !0;\n }, this);\n } },\n {\n key: \"ne\",\n value: function ne(t, e, n, i) {\n t.properties.polygonFill || (t.properties.polygonFill = t.getUniform(\"polygonFill\") || gt), t.properties.polygonOpacity || (t.properties.polygonOpacity = t.getUniform(\"polygonOpacity\") || 1), t.setUniform(\"polygonFill\", e || gt), t.setUniform(\"polygonOpacity\", n || 1), t.bloom = i;\n } },\n {\n key: \"ie\",\n value: function ie() {\n if (this.se) if (Array.isArray(this.se)) {\n var _t18 = this.se.map(function (t) {\n return t.nodeIndex;\n });\n this.cancelHighlight(_t18);\n } else this.cancelHighlight(this.se.nodeIndex);\n } },\n {\n key: \"cancelHighlight\",\n value: function cancelHighlight(t) {\n var e = this.getLayer();\n if (!e) return;\n var n = e.getRenderer();\n if (!n) return;\n var i = this.S;\n if (i) {\n if (t) {\n var _e28 = t;\n Array.isArray(_e28) || (_e28 = [_e28]), i = i.filter(function (t) {\n return _e28.indexOf(t.properties.nodeIndex) > -1;\n });\n }\n i.forEach(function (t) {\n var _t$properties = t.properties,\n e = _t$properties.polygonFill,\n n = _t$properties.polygonOpacity;\n t.setUniform(\"polygonFill\", e), t.setUniform(\"polygonOpacity\", n), t.bloom = !1;\n }), n.setToRedraw();\n }\n } },\n {\n key: \"setNodeTRS\",\n value: function setNodeTRS(t) {\n var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var i = this.S;\n if (!i) return;\n var s = e.translation || this._.translation,\n r = e.rotation || this._.rotation,\n o = n.quat.fromEuler(st, r[0], r[1], r[2]),\n h = e.scale || this._.scale;\n return i.forEach(function (e) {\n e.properties.nodeIndex === t && (e.nt = n.mat4.fromRotationTranslationScale(e.nt || [], o, s, h));\n }), this.k(i), this.m = !0, this;\n } }],\n [{\n key: \"parseJSONData\",\n value: function parseJSONData(t) {\n var e = bt.fromJSON(t);\n return e.setZoomOnAdded(t.zoomOnAdded), e;\n } },\n {\n key: \"fromJSON\",\n value: function fromJSON(t) {\n return new bt(t.coordinates, t.options);\n } },\n {\n key: \"getGLTFAnchorsAlongLineString\",\n value: function getGLTFAnchorsAlongLineString(t, n, i, s) {\n var r = [];\n for (var _o5 = 0; _o5 < t.length - 1; _o5++) {\n var _h5 = u(t[_o5], t[_o5 + 1], {\n map: i,\n bboxWidth: n,\n gapLength: s.gapLength || 0,\n count: s.count,\n rotateAlongLine: s.rotateAlongLine,\n snapToEndVertexes: s.snapToEndVertexes,\n scaleEndModel: s.scaleEndModel });\n\n e.Util.pushIn(r, _h5);\n }\n return r;\n } },\n {\n key: \"combineGLTFBoundingBox\",\n value: function combineGLTFBoundingBox(t) {\n var e = [];\n for (var _n7 = 0; _n7 < t.length; _n7++) {\n var _i14 = t[_n7].getBoundingBox();\n e.push([_i14.min, _i14.max]);\n }\n var i = e[0];\n if (!i) return null;\n var s = n.vec3.copy([], i[0]),\n r = n.vec3.copy([], i[1]);\n for (var _t19 = 1; _t19 < e.length; _t19++) {\n var _i15 = e[_t19],\n _o6 = n.vec3.copy([], _i15[0]),\n _h6 = n.vec3.copy([], _i15[1]);\n _o6[0] < s[0] && (s[0] = _o6[0]), _o6[1] < s[1] && (s[1] = _o6[1]), _o6[2] < s[2] && (s[2] = _o6[2]), _h6[0] > r[0] && (r[0] = _h6[0]), _h6[1] > r[1] && (r[1] = _h6[1]), _h6[2] > r[2] && (r[2] = _h6[2]);\n }\n return {\n min: s,\n max: r };\n\n } }]);\n\n }(e.Marker);\n bt.mergeOptions({\n symbol: null }),\n bt.registerJSONType(\"GLTFMarker\");\n var Mt = [1, 1, 1, 1],\n Ot = [],\n St = [],\n Tt = [1, 1, 1],\n At = new e.Coordinate(0, 0),\n kt = [1, 1, 1],\n Pt = [1, 1, 1];\n var Ct = function (_bt) {\n function Ct(t, e) {\n var _this18;\n _classCallCheck(this, Ct);\n _this18 = _callSuper(this, Ct, [null, e]), _this18.Pt = t || [], _this18.re = [], _this18.oe = [0, 0, 0], _this18.he = n.mat4.identity([]), _this18.u = \"multigltfmarker\", _this18.ae = [];\n return _this18;\n }\n _inherits(Ct, _bt);\n return _createClass(Ct, [{\n key: \"setCoordinates\",\n value: function setCoordinates(t) {\n if (!Array.isArray(t)) {\n var _n8 = this.getCenter(),\n _i16 = t.sub(_n8);\n for (var _t20 = 0; _t20 < this.Pt.length; _t20++) this.Pt[_t20].coordinates instanceof e.Coordinate ? this.Pt[_t20].coordinates = this.Pt[_t20].coordinates.add(_i16) : (this.Pt[_t20].coordinates[0] += _i16.x, this.Pt[_t20].coordinates[1] += _i16.y);\n return this.m = !0, this;\n }\n return Array.isArray(t[0]) ? this.ce = t.map(function (t) {\n return new e.Coordinate(t);\n }) : this.ce = t, this.updateAllData(\"coordinates\", this.ce), this.m = !0, this;\n } },\n {\n key: \"getCoordinates\",\n value: function getCoordinates(t) {\n if (t && this.Pt && this.Pt.length) {\n var _e29 = t.index;\n return this.Pt[_e29].coordinates;\n }\n return null;\n } },\n {\n key: \"addData\",\n value: function addData(t) {\n this.Pt || (this.Pt = []), this.Pt.push(t);\n var e = this.getLayer();\n return e && e.le(), this.m = !0, this;\n } },\n {\n key: \"removeData\",\n value: function removeData(t) {\n this.Pt.splice(t, 1), this.re && this.re.splice(t, 1);\n var e = this.getLayer();\n return e && e.le(), this.m = !0, this;\n } },\n {\n key: \"getData\",\n value: function getData(t) {\n return this.Pt[t];\n } },\n {\n key: \"updateData\",\n value: function updateData(t, e, n) {\n return this.Pt[t][e] = n, this.m = !0, this;\n } },\n {\n key: \"getAllData\",\n value: function getAllData() {\n return this.Pt;\n } },\n {\n key: \"updateAllData\",\n value: function updateAllData(t, e) {\n for (var _n9 = 0; _n9 < this.Pt.length; _n9++) this.updateData(_n9, t, e[_n9]);\n return this;\n } },\n {\n key: \"removeAllData\",\n value: function removeAllData() {\n this.Pt && (this.Pt = [], this.re = [], this.m = !0);\n } },\n {\n key: \"It\",\n value: function It() {\n var t = this.getMap();\n if (this.Pt && t) {\n this.ue(), this.re = this.re || [];\n for (var _t21 = 0; _t21 < this.Pt.length; _t21++) if (!1 !== this.Pt[_t21].visible) {\n var _e30 = this.fe(_t21);\n this.re[_t21] = _e30;\n }\n }\n } },\n {\n key: \"openInfoWindow\",\n value: function openInfoWindow(t) {\n var e = null;\n e = a(t) && this.Pt[t] ? this.Pt[t].coordinates : this.getCenter(), _superPropGet(Ct, \"openInfoWindow\", this, 3)([e]);\n } },\n {\n key: \"getCenter\",\n value: function getCenter() {\n var t = 0,\n n = 0,\n i = 0,\n s = 0;\n for (var _r7 = 0, _o7 = this.Pt.length; _r7 < _o7; _r7++) {\n var _o8 = this.Pt[_r7].coordinates;\n _o8 instanceof e.Coordinate && (_o8 = _o8.toArray()), t += _o8[0], n += _o8[1], i += _o8[2] || 0, s++;\n }\n if (0 === s) return null;\n return At.set(t / s, n / s, i / s);\n } },\n {\n key: \"getMap\",\n value: function getMap() {\n return _superPropGet(Ct, \"getMap\", this, 3)([]) || this.i && this.i.getMap();\n } },\n {\n key: \"de\",\n value: function de(t) {\n this.i = t;\n } },\n {\n key: \"getLayer\",\n value: function getLayer() {\n return _superPropGet(Ct, \"getLayer\", this, 3)([]) || this.i;\n } },\n {\n key: \"ue\",\n value: function ue() {\n var t = this.getMap(),\n e = this.getCenter();\n if (!e) return;\n this.oe = c(t, e);\n var i = n.quat.fromEuler(St, 0, 0, 0);\n n.mat4.fromRotationTranslationScale(this.he, i, this.oe, Tt);\n } },\n {\n key: \"fe\",\n value: function fe(t) {\n var e = this.Pt[t],\n i = this.Jt(e.coordinates);\n if (!i) return null;\n var s = n.vec3.sub(Ot, i, this.oe),\n r = this.$t(e.translation || this._.translation),\n o = n.vec3.add(Ot, r || this._.translation, s || this._.translation),\n h = e.rotation || this._.rotation,\n a = this.me(t),\n c = n.quat.fromEuler(St, h[0] || 0, h[1] || 0, h[2] || 0);\n return n.mat4.fromRotationTranslationScale(this.re[t] || [], c, o, a);\n } },\n {\n key: \"me\",\n value: function me(t) {\n var e = this.Pt[t],\n i = e.modelHeight,\n s = e.markerPixelHeight,\n r = e.scale || this._.scale;\n if (this.ut) {\n if (s && s > 0) {\n var _t22 = this.gt(kt, s);\n return n.vec3.multiply(_t22, _t22, r);\n }\n if (i) {\n var _t23 = this.dt(kt, i);\n return n.vec3.multiply(_t23, _t23, r);\n }\n }\n return r;\n } },\n {\n key: \"R\",\n value: function R(t) {\n if (_superPropGet(Ct, \"R\", this, 3)([t]), this.Pt) for (var _e31 = 0; _e31 < this.Pt.length; _e31++) {\n var _n10 = this.Pt[_e31];\n _n10.target && _n10.target instanceof bt && _n10.target.R(t);\n }\n } },\n {\n key: \"v\",\n value: function v() {\n _superPropGet(Ct, \"v\", this, 3)([]), this.It();\n } },\n {\n key: \"pe\",\n value: function pe() {\n this.ge = {\n \"instance_vectorA\": [],\n \"instance_vectorB\": [],\n \"instance_vectorC\": [],\n \"instance_color\": [],\n \"aPickingId\": [],\n \"aOutline\": [],\n \"highlight_color\": [],\n \"aBloom\": [] },\n this._e = {\n \"instance_vectorA\": [],\n \"instance_vectorB\": [],\n \"instance_vectorC\": [],\n \"instance_color\": [],\n \"aPickingId\": [],\n \"aOutline\": [],\n \"highlight_color\": [],\n \"aBloom\": [] };\n\n for (var _t24 = 0; _t24 < this.re.length; _t24++) {\n var _e32 = this.ge;\n this.Pt[_t24].bloom && (_e32 = this._e);\n var _n11 = this.re[_t24],\n _i17 = _e32.instance_vectorA.length / 4;\n this.ye(_e32, \"instance_vectorA\", _i17, _n11, 0), this.ye(_e32, \"instance_vectorB\", _i17, _n11, 1), this.ye(_e32, \"instance_vectorC\", _i17, _n11, 2);\n var _s5 = this.Pt[_t24].color || Mt,\n _r8 = this.Pt[_t24].highlightColor || Mt;\n _e32.instance_color[4 * _i17] = _s5[0], _e32.instance_color[4 * _i17 + 1] = _s5[1], _e32.instance_color[4 * _i17 + 2] = _s5[2], _e32.instance_color[4 * _i17 + 3] = _s5[3], _e32.aPickingId[_i17] = this.X() + _t24, _e32.aOutline[_i17] = this.Pt[_t24].outline ? 1 : 0, _e32.highlight_color[4 * _i17] = _r8[0], _e32.highlight_color[4 * _i17 + 1] = _r8[1], _e32.highlight_color[4 * _i17 + 2] = _r8[2], _e32.highlight_color[4 * _i17 + 3] = _r8[3], _e32.aBloom[_i17] = this.Pt[_t24].bloom ? 1 : 0;\n }\n return {\n attributesData: this.ge,\n bloomAttributesData: this._e };\n\n } },\n {\n key: \"st\",\n value: function st(t) {\n var _this$Ft = this.Ft(),\n e = _this$Ft.attributesData,\n i = _this$Ft.bloomAttributesData;\n for (var _n12 in e) t.updateInstancedData(_n12, e[_n12]);\n if (this.regl ? t.generateInstancedBuffers(this.regl) : (this.Dt = this.Dt || [], this.Dt.push(t)), t.instanceCount = this.ge.instance_vectorA.length / 4, this.ve()) {\n var _e33 = i,\n _s6 = _e33.aBloom.length;\n t.properties.bloomMesh = t.properties.bloomMesh || new n.reshader.InstancedMesh(_e33, _s6, t.geometry, t.material);\n var _r9 = t.properties.bloomMesh;\n _r9.positionMatrix = t.positionMatrix, _r9.localTransform = t.localTransform;\n for (var _t25 in _e33) _r9.updateInstancedData(_t25, _e33[_t25]);\n _r9.generateInstancedBuffers(this.regl);\n var _o9 = t.getDefines();\n _r9.setDefines(_o9), _r9.uniforms = t.uniforms, _r9.bloom = 1, _r9.instanceCount = _s6;\n } else t.properties.bloomMesh && (t.properties.bloomMesh.dispose(), delete t.properties.bloomMesh);\n } },\n {\n key: \"xe\",\n value: function xe(t, e, n, i) {\n this._e[t] && n && (this._e[t][4 * e] = n[i], this._e[t][4 * e + 1] = n[i + 4], this._e[t][4 * e + 2] = n[i + 8], this._e[t][4 * e + 3] = n[i + 12]);\n } },\n {\n key: \"ve\",\n value: function ve() {\n return this._e && this._e.aBloom.length;\n } },\n {\n key: \"ye\",\n value: function ye(t, e, n, i, s) {\n t[e] && i && (t[e][4 * n] = i[s], t[e][4 * n + 1] = i[s + 4], t[e][4 * n + 2] = i[s + 8], t[e][4 * n + 3] = i[s + 12]);\n } },\n {\n key: \"Ft\",\n value: function Ft(t) {\n return !this.m && this.ge ? {\n attributesData: this.ge,\n bloomAttributesData: this._e } :\n this.pe(t);\n } },\n {\n key: \"it\",\n value: function it() {\n return this.he;\n } },\n {\n key: \"getCount\",\n value: function getCount() {\n return this.Pt.length;\n } },\n {\n key: \"we\",\n value: function we() {\n return this.It(), this._e ? this._e.aBloom.length : 0;\n } },\n {\n key: \"Nt\",\n value: function Nt() {\n return this.getCount() - this.we();\n } },\n {\n key: \"toJSON\",\n value: function toJSON() {\n var t = JSON.parse(JSON.stringify({\n data: this.Pt,\n options: this.options,\n type: \"MultiGLTFMarker\" })),\n\n e = this.getProperties();\n return t.options && (t.options.properties = e), t;\n } },\n {\n key: \"getIndexByPickingId\",\n value: function getIndexByPickingId(t) {\n return t - this.X();\n } },\n {\n key: \"outline\",\n value: function outline(t) {\n return a(t) && this.updateData(t, \"outline\", !0), this;\n } },\n {\n key: \"cancelOutline\",\n value: function cancelOutline(t) {\n return a(t) && this.updateData(t, \"outline\", !1), this;\n } },\n {\n key: \"isOutline\",\n value: function isOutline() {\n if (!this.Pt || !this.Pt.length) return !1;\n for (var _t26 = 0; _t26 < this.Pt.length; _t26++) if (this.Pt[_t26].outline) return !0;\n return !1;\n } },\n {\n key: \"W\",\n value: function W() {\n var t = this.getAllData();\n for (var _e34 = 0; _e34 < t.length; _e34++) {\n var _n13 = t[_e34].color;\n if (_n13 && _n13[3] < 1) return !0;\n }\n return !1;\n } },\n {\n key: \"highlightNodes\",\n value: function highlightNodes(t, e) {\n var n = this.S;\n if (!n) return;\n var i = this.Pt[t];\n i && (e.forEach(function (t) {\n n.forEach(function (e) {\n if (e.properties.nodeIndex === t.nodeIndex) {\n var _n14 = t.color,\n _s7 = t.opacity,\n _r10 = t.bloom;\n i.highlightColor = _n14 || Pt, i.highlightColor[3] = _s7 || 1, i.highlightBloom = _r10;\n var _o10 = e.getDefines();\n _o10.HAS_INSTANCE_HIGHLIGHT = 1, e.setDefines(_o10);\n }\n });\n }), this.m = !0);\n } },\n {\n key: \"highlight\",\n value: function highlight(t, e) {\n var n = e.color,\n i = e.opacity,\n s = e.bloom,\n r = this.S;\n if (!r) return;\n var o = this.Pt[t];\n o && (o.highlightColor = n || Pt, o.highlightColor[3] = i || 1, o.highlightBloom = s, r.forEach(function (t) {\n var e = t.getDefines();\n e.HAS_INSTANCE_HIGHLIGHT = 1, t.setDefines(e);\n }), this.m = !0);\n } },\n {\n key: \"cancelHighlight\",\n value: function cancelHighlight(t, e) {\n var n = this.S;\n if (!n) return;\n var i = this.Pt[t];\n if (i) {\n if (e) {\n var _t27 = e;\n Array.isArray(_t27) || (_t27 = [_t27]), n = n.filter(function (e) {\n return _t27.indexOf(e.properties.nodeIndex) > -1;\n });\n }\n n.forEach(function (t) {\n var e = t.getDefines();\n delete e.HAS_INSTANCE_HIGHLIGHT, t.setDefines(e), i.highlightColor = Pt, i.highlightColor[3] = 1, i.highlightBloom = 0;\n }), this.m = !0;\n }\n } },\n {\n key: \"zoomAt\",\n value: function zoomAt(t) {\n var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n animation: !0,\n zoomOffset: 0 };\n\n var i = arguments.length > 2 ? arguments[2] : undefined;\n var s = this.Pt[t];\n if (!s) throw new Error(\"data item is not exist\");\n var r = new e.Coordinate(s.coordinates);\n return this.Xt(r, n, i);\n } }],\n [{\n key: \"fromJSON\",\n value: function fromJSON(t) {\n return new Ct(t.data, t.options);\n } }]);\n\n }(bt);\n Ct.registerJSONType(\"MultiGLTFMarker\");\n var Lt = [],\n It = [],\n Ft = [\"points\", \"lines\", \"line strip\", \"line loop\"];\n var Nt = function (_n$MaskRendererMixin) {\n function Nt(t) {\n var _this19;\n _classCallCheck(this, Nt);\n _this19 = _callSuper(this, Nt, [t]), _this19.be = {}, _this19.Me = [], _this19.Oe = {};\n return _this19;\n }\n _inherits(Nt, _n$MaskRendererMixin);\n return _createClass(Nt, [{\n key: \"onAdd\",\n value: function onAdd() {\n _superPropGet(Nt, \"onAdd\", this, 3)([]), this.prepareWorker();\n } },\n {\n key: \"draw\",\n value: function draw(t, e) {\n this.prepareCanvas(), this.Se(e, t);\n } },\n {\n key: \"drawOnInteracting\",\n value: function drawOnInteracting(t, e, n) {\n this.Se(n, e);\n } },\n {\n key: \"Se\",\n value: function Se(t, e) {\n this.Te = t, this.Ae = e;\n var n = 0;\n this.ke(t), this.Pe = {}, this.Ce(t);\n var i = this.Le(t);\n this.Ie(e);\n var r = t && t.renderTarget ? t.renderTarget.fbo : null;\n var o = 0;\n for (var _e35 in this.be) {\n if (\"pointline\" === _e35) continue;\n if (t) {\n var _this$Fe = this.Fe(t, _e35),\n _n15 = _this$Fe.newShader,\n _r11 = _this$Fe.uniforms;\n this.be[_e35].shader = _n15, s.Util.extend(i, _r11);\n }\n var _h7 = this.Ne(_e35),\n _a2 = this.be[_e35].shader;\n _a2.filter = t && t.sceneFilter || null, o += this.renderer.render(_a2, i, _h7, r), n++;\n }\n var h = this.Ne(\"pointline\");\n if (h.getMeshes().length) {\n i.pointSize = this.layer.options.pointSize || 1;\n var _e36 = this.be.pointline.shader;\n _e36.filter = t && t.sceneFilter || null, o += this.renderer.render(_e36, i, h, r), n++;\n }\n this.De(i, r), o && this.layer.fire(\"canvasisdirty\", {\n renderCount: o }),\n this.Ge = !0, this.completeRender(), this.layer.fire(\"rendercomplete-debug\", {\n count: n });\n\n } },\n {\n key: \"De\",\n value: function De(t, e) {\n this.Ee || (this.Ee = new n.reshader.Scene());\n var i = this.layer.getGeometries(),\n s = [];\n for (var _t28 = 0; _t28 < i.length; _t28++) {\n if (!i[_t28].options.showDebugBoundingBox) continue;\n var _e37 = i[_t28].ht();\n _e37 && s.push(_e37);\n }\n s.length && (this.Ee.setMeshes(s), this.renderer.render(this.be.wireframe.shader, t, this.Ee, e));\n } },\n {\n key: \"je\",\n value: function je(t) {\n var e = t.getUniform(\"polygonFill\") || [1, 1, 1, 1],\n n = t.getUniform(\"polygonOpacity\") || 1;\n return e[3] = n, {\n coordinates: t.getCoordinates(),\n translation: t.getTranslation(),\n rotation: t.getRotation(),\n scale: t.getScale(),\n visible: t.isVisible(),\n color: e,\n bloom: t.isBloom(),\n outline: t.isOutline(),\n modelHeight: t.getModelHeight(),\n markerPixelHeight: t.A(),\n anchorZ: t.getAnchorZ(),\n pickingId: t.X(),\n target: t };\n\n } },\n {\n key: \"Be\",\n value: function Be(t) {\n var e = this.je(t),\n n = new Ct([e], {\n symbol: {\n url: t.getUrl(),\n shader: t.getShader(),\n shadow: t.isCastShadow() } });\n\n\n return n.Re = n.Re || [], t.Ue = !0, n.Re.push(t), n.de(t.getLayer()), n;\n } },\n {\n key: \"Je\",\n value: function Je() {\n for (var _t29 in this.Oe) {\n this.Oe[_t29].removeAllData();\n }\n } },\n {\n key: \"ze\",\n value: function ze(t, e) {\n var n = t.getMeshes(this.j, this.regl, e),\n i = t.getShader();\n if (n.length) {\n this.Me.push(t), this.Pe[i] = this.Pe[i] || [], s.Util.pushIn(this.Pe[i], n);\n for (var _t30 = 0; _t30 < n.length; _t30++) n[_t30].properties.bloomMesh && this.Pe[i].push(n[_t30].properties.bloomMesh);\n }\n } },\n {\n key: \"Ie\",\n value: function Ie(t) {\n this.Me.length = 0;\n var e = this.layer.getGeometries();\n this.$e() && this.Je();\n for (var _n16 = 0; _n16 < e.length; _n16++) {\n var _i18 = e[_n16],\n _s8 = _i18.getUrl();\n if (_i18 instanceof Ct || _i18.isAnimated() || !_i18.Ue) this.ze(_i18, t);else if (this.$e()) {\n var _t31 = \"\".concat(_s8, \"_\").concat(_i18.getShader(), \"_\").concat(_i18.isCastShadow() ? 1 : 0);\n this.Oe[_t31] ? this.Oe[_t31].addData(this.je(_i18)) : this.Oe[_t31] = this.Be(_i18);\n }\n }\n for (var _e38 in this.Oe) {\n var _n17 = this.Oe[_e38];\n _n17.createdBygltfmarker = !0, this.ze(_n17, t);\n }\n } },\n {\n key: \"Le\",\n value: function Le() {\n var t = {};\n this.He.outSize = [this.canvas.width, this.canvas.height], this.He.halton = [0, 0];\n var e = this.canvas.gl && this.canvas.gl.wrap ? this.layer.options.opacity || 0 : 1;\n t.layerOpacity = e, s.Util.extend(t, this.He);\n var n = this.getMaskUniforms();\n return s.Util.extend(t, n), t;\n } },\n {\n key: \"Ne\",\n value: function Ne(t) {\n var e = [],\n i = [];\n if (\"pointline\" === t) {\n for (var _t32 in this.Pe) {\n if (\"wireframe\" === _t32) continue;\n this.Pe[_t32].forEach(function (t) {\n Ft.indexOf(t.geometry.desc.primitive) > -1 && e.push(t);\n });\n }\n var _t33 = new n.reshader.Scene(e);\n return _t33.sortMeshes(this.He.cameraPosition), _t33;\n }\n for (var _e39 in this.Pe) {\n var _n18 = this.Pe[_e39];\n _e39 === t && _n18.forEach(function (e) {\n (Ft.indexOf(e.geometry.desc.primitive) < 0 || \"wireframe\" === t) && i.push(e);\n });\n }\n var s = this.Ve = this.Ve || new n.reshader.Scene();\n return s.setMeshes(i), s.sortMeshes(this.He.cameraPosition), s;\n } },\n {\n key: \"needToRedraw\",\n value: function needToRedraw() {\n return !!_superPropGet(Nt, \"needToRedraw\", this, 3)([]) || this.$e();\n } },\n {\n key: \"$e\",\n value: function $e() {\n var t = this.layer.getGeometries();\n for (var _e40 = 0; _e40 < t.length; _e40++) if (this.Me.indexOf(t[_e40]) > -1 && (t[_e40].isDirty() || t[_e40].isAnimated())) return !0;\n return !1;\n } },\n {\n key: \"onRemove\",\n value: function onRemove() {\n this.workerConn && (this.workerConn.removeLayer(this.layer.getId(), function (t) {\n if (t) throw t;\n }), this.workerConn.remove(), delete this.workerConn), _superPropGet(Nt, \"onRemove\", this, 3)([]);\n } },\n {\n key: \"hitDetect\",\n value: function hitDetect() {\n return !1;\n } },\n {\n key: \"createContext\",\n value: function createContext() {\n var _this20 = this;\n var t = this.canvas.gl && this.canvas.gl.wrap;\n if (t) this.gl = this.canvas.gl.wrap(), this.regl = this.canvas.gl.regl;else {\n var _t34 = this.layer.options.glOptions || {\n alpha: !0,\n depth: !0,\n stencil: !0 };\n\n this.glOptions = _t34, this.gl = this.gl || this.qe(this.canvas, _t34), this.regl = n.createREGL({\n gl: this.gl,\n optionalExtensions: [\"ANGLE_instanced_arrays\", \"OES_element_index_uint\", \"OES_standard_derivatives\", \"OES_vertex_array_object\", \"OES_texture_half_float\", \"OES_texture_half_float_linear\", \"OES_texture_float\", \"OES_texture_float_linear\", \"WEBGL_depth_texture\", \"EXT_shader_texture_lod\", \"WEBGL_compressed_texture_s3tc\"] });\n\n }\n t && (this.canvas.pickingFBO = this.canvas.pickingFBO || this.regl.framebuffer(this.canvas.width, this.canvas.height)), this.pickingFBO = this.canvas.pickingFBO || this.regl.framebuffer(this.canvas.width, this.canvas.height), this.j = this.regl.gltfManager = this.regl.gltfManager || this.Ze(), this.We(), this.Dt && this.Dt.forEach(function (t) {\n t.generateInstancedBuffers(_this20.regl);\n }), this.Lt && this.Lt.forEach(function (t) {\n t.generateBuffers(_this20.regl);\n }), this.layer.fire(\"contextcreate\", {\n regl: this.regl });\n\n } },\n {\n key: \"getGLTFManager\",\n value: function getGLTFManager() {\n return this.j;\n } },\n {\n key: \"Ze\",\n value: function Ze() {\n return new n.reshader.GLTFManager(this.regl);\n } },\n {\n key: \"We\",\n value: function We() {\n var t = this.layer.getMap(),\n e = new n.reshader.Renderer(this.regl);\n this.renderer = e, this.He = {\n \"projMatrix\": t.projMatrix,\n \"projViewMatrix\": t.projViewMatrix,\n \"viewMatrix\": t.viewMatrix,\n \"cameraPosition\": t.cameraPosition,\n \"altitudeScale\": 1 },\n n.reshader.pbr.PBRUtils.loginIBLResOnCanvas(this.canvas, this.regl, t), this.Xe = new n.reshader.FBORayPicking(e, {\n vert: \"#include \\n\\nattribute vec3 aPosition;\\n\\nuniform mat4 projMatrix;\\n\\nuniform mat4 modelMatrix;\\n\\nuniform mat4 positionMatrix;\\n\\nuniform mat4 modelViewMatrix;\\n\\nuniform float pointSize;\\n\\n#include \\n\\n#include \\n\\nvoid main()\\n\\n{\\n\\n mat4 localPositionMatrix = getPositionMatrix();\\n\\n gl_Position = projMatrix * modelViewMatrix * localPositionMatrix * getPosition(aPosition);\\n\\n gl_PointSize = pointSize;\\n\\n fbo_picking_setData(gl_Position.w, true);\\n\\n}\\n\\n\",\n uniforms: [{\n name: \"modelViewMatrix\",\n type: \"function\",\n fn: function fn(t, e) {\n return n.mat4.multiply([], e.viewMatrix, e.modelMatrix);\n } }] },\n\n this.pickingFBO, t);\n } },\n {\n key: \"prepareWorker\",\n value: function prepareWorker() {\n var _this21 = this;\n this.workerConn || (this.workerConn = new b(\"@maptalks/gltf-layer\", this.layer));\n var t = this.workerConn;\n if (!t.isActive()) return;\n var e = this.layer.options || {},\n n = this.layer.getId();\n t.addLayer(n, {\n markerType: e.markerTypes,\n pointSize: e.pointSize },\n function (t) {\n if (t) throw t;\n _this21.layer && (_this21.ready = !0, _this21.layer.fire(\"workerready\"));\n });\n } },\n {\n key: \"H\",\n value: function H(t) {\n var _this22 = this;\n var e;\n if (this.layer.getURLModifier()) {\n var _n19 = this.layer.options.fetchOptions;\n e = L(null, t, _n19, function (t) {\n var e = _this22.layer.getURLModifier();\n return e ? e(t) : t;\n });\n } else e = this.workerConn.loadGLTF(t);\n return e.then(function (t) {\n return _this22.setToRedraw(), _this22.Ye = !0, t;\n }).catch(function (e) {\n console.error(e), _this22.layer.fire(\"modelerror\", {\n type: \"modelerror\",\n url: t,\n info: e });\n\n });\n } },\n {\n key: \"Ce\",\n value: function Ce(t) {\n var e = x;\n for (var _n20 in e) {\n if (this.be[_n20]) continue;\n var _i19 = e[_n20];\n this.Ke(t, _i19.name, _i19.type, _i19.config);\n }\n } },\n {\n key: \"Ke\",\n value: function Ke(t, e, i, r) {\n var _this23 = this;\n this.viewport || (this.viewport = {\n x: 0,\n y: 0,\n width: function width() {\n return _this23.canvas ? _this23.canvas.width : 1;\n },\n height: function height() {\n return _this23.canvas ? _this23.canvas.height : 1;\n } }),\n r.extraCommandProps || (r.extraCommandProps = {});\n var o = {};\n t && this.Qe(o, Lt, t);\n var h = s.Util.extend({}, r);\n h.extraCommandProps = s.Util.extend({}, r.extraCommandProps), h.extraCommandProps.viewport = this.viewport, h.uniforms = s.Util.extend([], r.uniforms, Lt), h.defines = s.Util.extend({}, h.defines, o), i.indexOf(\".\") > -1 ? (i = i.split(\".\"), this.be[e] = {\n shader: new n.reshader[i[0]][i[1]](h),\n type: i }) :\n this.be[e] = {\n shader: new n.reshader[i](h),\n type: i };\n\n } },\n {\n key: \"remove\",\n value: function remove() {\n this.tn();\n var t = this.be;\n for (var _e41 in t) t[_e41].shader.dispose();\n this.extentShader && this.extentShader.dispose(), _superPropGet(Nt, \"remove\", this, 3)([]);\n } },\n {\n key: \"clearCanvas\",\n value: function clearCanvas() {\n this.canvas && (this.regl.clear({\n color: [0, 0, 0, 0],\n depth: 1,\n stencil: 0 }),\n _superPropGet(Nt, \"clearCanvas\", this, 3)([]));\n } },\n {\n key: \"resizeCanvas\",\n value: function resizeCanvas(t) {\n _superPropGet(Nt, \"resizeCanvas\", this, 3)([t]), this.pickingFBO && this.pickingFBO.resize(this.canvas.width, this.canvas.height), this.layer.fire(\"resizecanvas\", {\n size: t });\n\n } },\n {\n key: \"getFrameTimestamp\",\n value: function getFrameTimestamp() {\n return this.Ae;\n } },\n {\n key: \"getFrameContext\",\n value: function getFrameContext() {\n return this.Te;\n } },\n {\n key: \"needRetireFrames\",\n value: function needRetireFrames() {\n return this.Ye;\n } },\n {\n key: \"Qe\",\n value: function Qe(t, e, n) {\n var i = n && n.includes;\n if (i) for (var _r12 in i) i[_r12] && (n[_r12].uniformDeclares && (e.length = 0, e.push.apply(e, _toConsumableArray(n[_r12].uniformDeclares))), n[_r12].defines && s.Util.extend(t, n[_r12].defines));\n } },\n {\n key: \"en\",\n value: function en(t, e) {\n var n = e && e.includes;\n if (n) for (var _i20 in n) n[_i20] && e[_i20].renderUniforms && s.Util.extend(t, e[_i20].renderUniforms);\n } },\n {\n key: \"Fe\",\n value: function Fe(t, e) {\n var _this$be$e = this.be[e],\n i = _this$be$e.shader,\n r = _this$be$e.type;\n var o = null;\n var h = {};\n if (this.en(h, t), t.states.includesChanged) {\n var _e42 = {};\n this.Qe(_e42, Lt, t);\n var _h8 = {\n vert: i.vert,\n frag: i.frag,\n uniforms: i.uniforms,\n extraCommandProps: i.extraCommandProps };\n\n _h8.defines = _e42, _h8.uniforms = s.Util.extend([], _h8.uniforms, Lt), o = Array.isArray(r) ? new n.reshader[r[0]][r[1]](_h8) : new n.reshader[r](_h8), i.dispose();\n } else o = i;\n return {\n uniforms: h,\n newShader: o };\n\n } },\n {\n key: \"nn\",\n value: function nn(t, e, n) {\n if (t.viewshed) {\n for (var _e43 in t.viewshed.renderUniforms) n[_e43] = t.viewshed.renderUniforms[_e43];\n s.Util.extend(e.shaderDefines, t.viewshed.defines);\n }\n if (t.floodAnalysis) {\n for (var _e44 in t.floodAnalysis.renderUniforms) n[_e44] = t.floodAnalysis.renderUniforms[_e44];\n s.Util.extend(e.shaderDefines, t.floodAnalysis.defines);\n }\n return n;\n } },\n {\n key: \"getShadowMeshes\",\n value: function getShadowMeshes() {\n var t = [];\n if (!this.layer || !this.layer.isVisible() || !this.Pe) return t;\n var e = this.layer.getGeometries();\n for (var _n21 = 0; _n21 < e.length; _n21++) if (e[_n21].isCastShadow() && e[_n21].isVisible() && e[_n21].O() && !e[_n21].Ue) {\n var _i21 = e[_n21].S || [];\n s.Util.pushIn(t, _i21);\n }\n for (var _e45 in this.Oe) {\n var _n22 = this.Oe[_e45];\n if (_n22.isCastShadow() && _n22.isVisible() && _n22.O()) {\n var _e46 = _n22.S || [];\n s.Util.pushIn(t, _e46);\n }\n }\n return t;\n } },\n {\n key: \"sn\",\n value: function sn() {\n var t = [];\n if (!this.Pe || !Object.keys(this.Pe).length) return t;\n for (var _e47 in this.Pe) s.Util.pushIn(t, this.Pe[_e47]);\n return t;\n } },\n {\n key: \"getAnalysisMeshes\",\n value: function getAnalysisMeshes() {\n return this.sn();\n } },\n {\n key: \"getRayCastData\",\n value: function getRayCastData(t) {\n var e = this.layer.getGeometries();\n for (var _n23 = 0; _n23 < e.length; _n23++) {\n var _i22 = e[_n23].S;\n if (_i22 && _i22.indexOf(t) > -1) return e[_n23];\n }\n return null;\n } },\n {\n key: \"drawOutline\",\n value: function drawOutline(t) {\n this.extentShader || (this.extentShader = new n.reshader.MeshShader({\n vert: \"attribute vec3 aPosition;\\n\\nattribute float aOutline;\\n\\nuniform mat4 projMatrix;\\n\\nuniform mat4 modelMatrix;\\n\\nuniform mat4 modelViewMatrix;\\n\\nuniform mat4 positionMatrix;\\n\\nuniform float instance;\\n\\n#include \\n\\n\\n\\nvarying float vOutline;\\n\\nvoid main()\\n\\n{\\n\\n mat4 localPositionMatrix = getPositionMatrix();\\n\\n gl_Position = projMatrix * modelViewMatrix * localPositionMatrix * getPosition(aPosition);\\n\\n if (instance == 0.0) {\\n\\n vOutline = 1.0;\\n\\n } else {\\n\\n vOutline = aOutline;\\n\\n }\\n\\n}\\n\\n\",\n frag: \"precision highp float;\\n\\nvarying float vOutline;\\n\\nvoid main() {\\n\\n gl_FragColor = vec4(vOutline);\\n\\n}\\n\\n\",\n uniforms: [{\n name: \"modelViewMatrix\",\n type: \"function\",\n fn: function fn(t, e) {\n return n.mat4.multiply([], e.viewMatrix, e.modelMatrix);\n } }],\n\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n viewport: this.viewport,\n cull: {\n enable: !1 },\n\n blend: {\n enable: !0,\n func: {\n src: \"src alpha\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } }));\n\n\n\n var e = this.getOutlineMeshes();\n e.length && (this.rn = this.rn || new n.reshader.Scene(), this.rn.setMeshes(e), this.renderer.render(this.extentShader, {\n \"projMatrix\": this.He.projMatrix,\n \"viewMatrix\": this.He.viewMatrix },\n this.rn, t));\n } },\n {\n key: \"getOutlineMeshes\",\n value: function getOutlineMeshes() {\n var t = [];\n if (!this.layer) return t;\n var e = this.layer.getGeometries();\n for (var _n24 = 0; _n24 < e.length; _n24++) {\n if (e[_n24].Ue) continue;\n var _i23 = e[_n24].te();\n s.Util.pushIn(t, _i23);\n }\n for (var _e48 in this.Oe) {\n var _n25 = this.Oe[_e48].te();\n s.Util.pushIn(t, _n25);\n }\n return t;\n } },\n {\n key: \"tn\",\n value: function tn() {\n this.canvas && n.reshader.pbr.PBRUtils.logoutIBLResOnCanvas(this.canvas, this.getMap());\n } },\n {\n key: \"ke\",\n value: function ke(t) {\n var e = this.layer.getMap(),\n _n$reshader$pbr$PBRUt2 = n.reshader.pbr.PBRUtils.getIBLResOnCanvas(this.canvas),\n i = _n$reshader$pbr$PBRUt2.iblTexes,\n r = _n$reshader$pbr$PBRUt2.dfgLUT;\n if (e && e.getLights()) {\n var _o11 = n.reshader.pbr.PBRUtils.getPBRUniforms(e, i, r, t && t.ssr, t && t.jitter),\n _h9 = e.getLights(),\n _a3 = _h9.ambient && _h9.ambient.color ? _h9.ambient.color : [.2, .2, .2];\n this.He.ambientColor = _a3, _o11 && s.Util.extend(this.He, _o11);\n } else {\n var _i24 = n.reshader.pbr.PBRUtils.getPBRUniforms(e, null, r, t && t.ssr, t && t.jitter);\n s.Util.extend(this.He, _i24);\n }\n } },\n {\n key: \"qe\",\n value: function qe(t, e) {\n var n = [\"webgl\", \"experimental-webgl\"];\n var i = null;\n for (var _s9 = 0; _s9 < n.length; ++_s9) {\n try {\n i = t.getContext(n[_s9], e);\n } catch (t) {}\n if (i) break;\n }\n return i;\n } },\n {\n key: \"hn\",\n value: function hn(t, e) {\n var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (!this.Xe || !this.layer.isVisible()) return null;\n var i = this.layer.getMap(),\n r = this.canvas.gl && this.canvas.gl.wrap;\n if (this.Ge || r) {\n if (!this.Pe || !Object.keys(this.Pe).length) return null;\n var _t35 = this.sn(),\n _e49 = s.Util.extend({}, this.He);\n _e49.pointSize = this.layer.options.pointSize || 1, this.Xe.render(_t35, _e49, !0), this.Ge = !1;\n }\n var o = n.returnAll ? \"pickAll\" : \"pick\",\n h = this.Xe[o](t, e, n.tolerance || 3, {\n \"projMatrix\": i.projMatrix,\n \"viewMatrix\": i.viewMatrix,\n \"pointSize\": this.layer.options.pointSize || 1 },\n {\n viewMatrix: i.viewMatrix,\n projMatrix: i.projMatrix,\n returnPoint: !0 });\n\n if (h.length) {\n var _t36 = {},\n _e50 = [];\n for (var _n26 = 0; _n26 < h.length; _n26++) if (!_t36[h[_n26].pickingId]) {\n var _i25 = this.an(h[_n26]);\n _t36[h[_n26].pickingId] = !0, _e50.push(_i25);\n }\n return _e50;\n }\n return this.an(h);\n } },\n {\n key: \"an\",\n value: function an(t) {\n var e = t.meshId,\n n = t.pickingId,\n i = t.point,\n s = t.coordinate,\n r = this.sn()[e],\n o = this.cn(n);\n return {\n meshId: e,\n mesh: r,\n data: this.layer.ln()[o],\n pickingId: n,\n point: i,\n coordinate: s,\n index: n - o,\n nodeIndex: this.un(e) };\n\n } },\n {\n key: \"un\",\n value: function un(t) {\n var e = this.sn()[t];\n return e && e.properties.nodeIndex;\n } },\n {\n key: \"cn\",\n value: function cn(t) {\n if (!a(t)) return null;\n if (this.layer.ln()[t]) return t;\n var e = Object.keys(this.layer.ln()),\n n = e.length;\n var i = 0,\n s = n - 1,\n r = Math.floor((i + s) / 2);\n for (; i <= n - 1 && s >= 0;) {\n if (i === s) return e[i];\n if (e[r] <= t && t < e[r + 1]) return e[r];\n t < e[r] ? (s = r - 1, r = Math.floor((i + s) / 2)) : e[r + 1] < t && (i = r + 1, r = Math.floor((i + s) / 2));\n }\n return null;\n } },\n {\n key: \"isInFrustum\",\n value: function isInFrustum(t) {\n var e = this.layer.getMap(),\n i = t.getBoundingBox();\n if (!i || \"multigltfmarker\" === t.getGLTFMarkerType()) return !0;\n var s = n.vec2.set(It, i.min, i.max);\n return !!_(e.projViewMatrix, s);\n } },\n {\n key: \"getRenderMeshesTest\",\n value: function getRenderMeshesTest() {\n return this.sn();\n } },\n {\n key: \"isMarkerTransparent\",\n value: function isMarkerTransparent(t) {\n return t.W();\n } },\n {\n key: \"getMarkerFitSizeScale\",\n value: function getMarkerFitSizeScale(t) {\n return t.dn();\n } },\n {\n key: \"getMarkerFitTranslate\",\n value: function getMarkerFitTranslate(t) {\n return t.mn();\n } },\n {\n key: \"getFBORayPicking\",\n value: function getFBORayPicking() {\n return this.Xe;\n } },\n {\n key: \"getShaderList\",\n value: function getShaderList() {\n return this.be;\n } }]);\n\n }(n.MaskRendererMixin(s.renderer.OverlayLayerCanvasRenderer));\n var Dt = [\"Unknown\", \"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\", \"GeometryCollection\"];\n function Gt(t) {\n return new Function(\"f\", \"var p = (f && f.properties || {}); return \".concat(Et(t)));\n }\n function Et(t) {\n if (!t) return \"true\";\n var e = t[0];\n if (t.length <= 1) return \"any\" === e ? \"false\" : \"true\";\n return \"(\".concat(\"==\" === e ? Bt(t[1], t[2], \"===\", !1) : \"!=\" === e ? Bt(t[1], t[2], \"!==\", !1) : \"<\" === e || \">\" === e || \"<=\" === e || \">=\" === e ? Bt(t[1], t[2], e, !0) : \"any\" === e ? Ut(t.slice(1), \"||\") : \"all\" === e ? Ut(t.slice(1), \"&&\") : \"none\" === e ? $t(Ut(t.slice(1), \"||\")) : \"in\" === e ? Jt(t[1], t.slice(2)) : \"!in\" === e ? $t(Jt(t[1], t.slice(2))) : \"has\" === e ? zt(t[1]) : \"!has\" === e ? $t(zt(t[1])) : \"contains\" === e ? function (t, e, n) {\n var i = jt(t);\n return void 0 !== n ? \"(\".concat(i, \" + '').indexOf(\\\"\").concat(e, \"\\\") === \").concat(n) : \"(\".concat(i, \" + '').indexOf(\\\"\").concat(e, \"\\\") >= 0\");\n }(t[1], t[2], t[3]) : \"true\", \")\");\n }\n function jt(t) {\n return \"$\" === t[0] ? \"f.\" + t.substring(1) : \"p[\" + JSON.stringify(t) + \"]\";\n }\n function Bt(t, e, n, i) {\n if (\"object\" == _typeof(s = t) && s && t.op) return function (t, e, n, i) {\n var s = t.property,\n r = t.op;\n var o = jt(s);\n return \"length\" !== r ? (console.error(\"not support \".concat(r, \" op\")), \"false\") : (o = \"((\".concat(o, \"+='').length)\"), Rt(o, s, e, n, i));\n }(t, e, n, i);\n var s;\n return Rt(jt(t), t, e, n, i);\n }\n function Rt(t, e, n, i, s) {\n var r = \"$type\" === e ? Dt.indexOf(n) : JSON.stringify(n);\n return (s ? \"typeof \".concat(t, \"=== typeof \").concat(r, \"&&\") : \"\") + t + i + r;\n }\n function Ut(t, e) {\n return t.map(Et).join(e);\n }\n function Jt(t, e) {\n \"$type\" === t && (e = e.map(function (t) {\n return Dt.indexOf(t);\n }));\n var n = JSON.stringify(e.sort(Ht)),\n i = jt(t);\n return e.length <= 200 ? \"\".concat(n, \".indexOf(\").concat(i, \") !== -1\") : \"function(v, a, i, j) {\\n while (i <= j) { var m = (i + j) >> 1;\\n if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;\\n }\\n return false; }(\".concat(i, \", \").concat(n, \",0,\").concat(e.length - 1, \")\");\n }\n function zt(t) {\n return \"$id\" === t ? '\"id\" in f' : \"\".concat(JSON.stringify(t), \" in p\");\n }\n function $t(t) {\n return \"!(\".concat(t, \")\");\n }\n function Ht(t, e) {\n return t < e ? -1 : t > e ? 1 : 0;\n }\n function Vt(t) {\n if (!Array.isArray(t)) return Vt([t]);\n var e = [];\n for (var _n27 = 0; _n27 < t.length; _n27++) {\n var _i26 = void 0;\n _i26 = !0 === t[_n27].filter ? function () {\n return !0;\n } : Gt(t[_n27].filter), e.push(qt({}, t[_n27], {\n filter: _i26 }));\n\n }\n return e;\n }\n function qt(t) {\n for (var _e51 = 1; _e51 < arguments.length; _e51++) {\n var _n28 = arguments[_e51];\n for (var _e52 in _n28) t[_e52] = _n28[_e52];\n }\n return t;\n }\n var Zt = /\\{ *([\\w_]+) *\\}/g;\n var Wt = function (_bt2) {\n function Wt(t, e) {\n var _this24;\n _classCallCheck(this, Wt);\n _this24 = _callSuper(this, Wt, [t, e]), _this24.u = \"effectmarker\";\n return _this24;\n }\n _inherits(Wt, _bt2);\n return _createClass(Wt, [{\n key: \"isAnimated\",\n value: function isAnimated() {\n return !0;\n } },\n {\n key: \"setTexture\",\n value: function setTexture(t) {\n var e = this.getLayer() && this.getLayer().getRenderer();\n if (e) {\n var _n29 = this.getTextureUrl();\n e.pn(_n29), e.gn(t);\n }\n return _superPropGet(Wt, \"updateSymbol\", this, 3)([{\n textureUrl: t }]),\n this;\n } },\n {\n key: \"_n\",\n value: function _n(t) {\n var e = this.getTextureUrl(),\n n = this.getLayer() && this.getLayer().getRenderer();\n if (n) {\n var _i27 = e;\n var _s10 = this.yn();\n if (_s10) {\n var _n30 = this.isAnimationLooped(),\n _r13 = this.getAnimationSpeed() || 1,\n _o12 = _n30 ? Math.floor(.01 * t * _r13) % _s10.length : Math.floor(.01 * t);\n _i27 = e.replace(Zt, _s10[_o12]), this.setUniform(\"width\", 1), this.setUniform(\"height\", 1), this.setUniform(\"uvOffset\", [0, 0]);\n }\n return n.vn(_i27, this.X());\n }\n return null;\n } },\n {\n key: \"yn\",\n value: function yn() {\n var t = this._getInternalSymbol();\n return t && t.textureNames;\n } },\n {\n key: \"getTextureUrl\",\n value: function getTextureUrl() {\n var t = this._getInternalSymbol();\n return t && t.textureUrl || \"default\";\n } },\n {\n key: \"getUrl\",\n value: function getUrl() {\n return \"plane\";\n } },\n {\n key: \"getShader\",\n value: function getShader() {\n return \"effect\";\n } },\n {\n key: \"setTransparent\",\n value: function setTransparent(t) {\n return this.options.symbol.transparent = t, this;\n } },\n {\n key: \"isTransparent\",\n value: function isTransparent() {\n return this.options.symbol.transparent;\n } },\n {\n key: \"updateUV\",\n value: function updateUV(t) {\n var e = this.isAnimationLooped(),\n n = this.getAnimationSpeed() || 1,\n i = this.getUniforms() || {},\n s = i.width || 1,\n r = i.height || 1;\n var o;\n var h = this.getEffectType();\n \"uv\" === h ? o = e ? .01 * t * n % (s * r) : .01 * t : \"sequence\" === h && (o = e ? Math.floor(.01 * t * n) % (s * r) : Math.floor(.01 * t));\n var a = Math.floor(o % s),\n c = Math.floor(o / s),\n l = this._n(t);\n this._getSymbol() ? (this.setUniform(\"uvOffset\", [a, c]), this.setUniform(\"width\", s), this.setUniform(\"height\", r), this.setUniform(\"texture\", l)) : this.D(\"uniforms\", {\n uvOffset: [a, c],\n width: s,\n height: r,\n texture: l });\n\n } },\n {\n key: \"_setExternSymbol\",\n value: function _setExternSymbol(t) {\n _superPropGet(Wt, \"_setExternSymbol\", this, 3)([t]);\n var e = this.getLayer() && this.getLayer().getRenderer();\n if (e) {\n var _t37 = this.getTextureUrl();\n e.gn(_t37);\n }\n } },\n {\n key: \"getEffectType\",\n value: function getEffectType() {\n var t = this._getInternalSymbol();\n return t && t.effect || \"uv\";\n } },\n {\n key: \"setEffectType\",\n value: function setEffectType(t) {\n return this._getInternalSymbol().effect = t, this;\n } },\n {\n key: \"remove\",\n value: function remove() {\n var t = this.getLayer() && this.getLayer().getRenderer();\n if (t) {\n var _e53 = this.getTextureUrl();\n t.pn(_e53);\n }\n _superPropGet(Wt, \"remove\", this, 3)([]);\n } }],\n [{\n key: \"fromJSON\",\n value: function fromJSON(t) {\n return new Wt(t.coordinates, t.options);\n } }]);\n\n }(bt);\n var Xt = [\"Point\", \"Polygon\", \"LineString\", \"MultiPoint\", \"MultiPolygon\", \"MultiLineString\", \"GeometryCollection\", \"Feature\", \"FeatureCollection\"].reduce(function (t, e) {\n return t[e] = !0, t;\n }, {}),\n Yt = {\n toGeometry: function toGeometry(t, n) {\n if (e.Util.isString(t) && (t = e.Util.parseJSON(t)), Array.isArray(t)) {\n var _i28 = [];\n for (var _s11 = 0, _r14 = t.length; _s11 < _r14; _s11++) {\n var _r15 = Yt.xn(t[_s11], n);\n Array.isArray(_r15) ? e.Util.pushIn(_i28, _r15) : _i28.push(_r15);\n }\n return _i28;\n }\n return Yt.xn(t, n);\n },\n xn: function xn(t, n) {\n if (!t || e.Util.isNil(t.type)) return null;\n var i = t.type;\n if (\"Feature\" === i) {\n var _e54 = t.geometry,\n _i29 = Yt.xn(_e54, n);\n return _i29 ? (_i29.setId(t.id), _i29.setProperties(t.properties), _i29) : null;\n }\n if (\"FeatureCollection\" === i) {\n var _e55 = t.features;\n if (!_e55) return null;\n return Yt.toGeometry(_e55, n);\n }\n if (\"Point\" === i) return function (t, e) {\n if (\"EffectLayer\" === e) return new Wt(t);\n return new bt(t);\n }(t.coordinates, n);\n if (\"GeometryCollection\" === i) {\n var _e56 = t.geometries,\n _i30 = [],\n _s12 = _e56.length;\n for (var _t38 = 0; _t38 < _s12; _t38++) _i30.push(Yt.xn(_e56[_t38], n));\n return _i30;\n }\n throw new Error(\"geometry's type is invalid, only support type of Point\");\n },\n isGeoJSON: function isGeoJSON(t) {\n return !(!t || \"object\" != _typeof(t)) && !!t.type && !!Xt[t.type] && !(t instanceof e.Geometry);\n } };\n\n var Kt = /\\{*(\\$root)*\\}/g;\n var Qt = function (_s$OverlayLayer) {\n function Qt(t, e, n) {\n var _this25;\n _classCallCheck(this, Qt);\n !e || e instanceof s.Geometry || Array.isArray(e) || Xt[e.type] || (n = e, e = null), _this25 = _callSuper(this, Qt, [t, null, n]), _this25.pickingId = 0, _this25.wn = {}, _this25.bn = {}, _this25.Mn = {};\n var i = n && n.style;\n _this25.setStyle(i), e && _this25.addGeometry(e);\n return _this25;\n }\n _inherits(Qt, _s$OverlayLayer);\n return _createClass(Qt, [{\n key: \"addGeometry\",\n value: function addGeometry(t, e) {\n var n = Yt.isGeoJSON(t) ? Yt.toGeometry(t, this.getJSONType()) : t;\n n = Array.isArray(n) ? n : [n];\n for (var _t39 = 0; _t39 < n.length; _t39++) if (!this.On(n[_t39])) return void console.error(\"type of geometry is invalid\");\n _superPropGet(Qt, \"addGeometry\", this, 3)([n, e]), Array.isArray(n) && this.addMarker(n);\n } },\n {\n key: \"addMarker\",\n value: function addMarker(t) {\n for (var _e57 = 0; _e57 < t.length; _e57++) {\n var _n31 = t[_e57];\n _n31.Zt(this.pickingId), this.wn[this.pickingId] = _n31;\n var _i31 = _n31.getId();\n _i31 && (this.Mn[_i31] = _n31), _n31.fire(\"add\", {\n type: \"add\",\n target: _n31,\n layer: this });\n\n var _s13 = _n31.getUrl(),\n _r16 = this.getRenderer();\n if (_r16 && _r16.Oe[_s13]) {\n var _t40 = _r16.Oe[_s13];\n _n31.fire(\"load\", {\n type: \"load\",\n target: _n31,\n data: _t40.F() });\n\n }\n if (\"multigltfmarker\" === _n31.getGLTFMarkerType()) {\n var _t41 = _n31.getCount() || 1;\n this.pickingId += _t41;\n } else this.pickingId++;\n }\n } },\n {\n key: \"Sn\",\n value: function Sn(t) {\n var e = this.getRenderer();\n e && e.loginGLTFMarker(t);\n } },\n {\n key: \"toJSON\",\n value: function toJSON(t) {\n t || (t = {});\n var e = {\n \"type\": this.getJSONType(),\n \"id\": this.getId(),\n \"options\": this.config() };\n\n if ((h(t.style) || t.style) && (e.style = this.getStyle()), h(t.geometries) || t.geometries) {\n var _t42 = [],\n _n32 = this._geoList;\n for (var _e58 = 0; _e58 < _n32.length; _e58++) {\n var _i32 = _n32[_e58].qt();\n _t42.push(_i32);\n }\n e.geometries = _t42;\n }\n return e;\n } },\n {\n key: \"On\",\n value: function On(t) {\n if (!t.getGLTFMarkerType) return !1;\n return this.options.markerTypes.indexOf(t.getGLTFMarkerType()) > -1;\n } },\n {\n key: \"setStyle\",\n value: function setStyle(t) {\n return t ? (this.options.style = t, this.Tn = JSON.parse(JSON.stringify(t)), this.An(), this.fire(\"setstyle\", {\n target: this,\n style: this.Tn }),\n this) : (delete this.Tn, delete this.options.style, this);\n } },\n {\n key: \"getStyle\",\n value: function getStyle() {\n return this.options.style;\n } },\n {\n key: \"updateSymbol\",\n value: function updateSymbol(t, e) {\n var n = this.getStyle();\n this.kn(t, e, n), this.kn(t, e, this.Tn), this.An(), this.fire(\"updatesymbol\", {\n target: this,\n index: t,\n symbol: e });\n\n } },\n {\n key: \"kn\",\n value: function kn(t, e, n) {\n if (!n) return;\n var i = (n.style ? n.style : n)[t].symbol || {};\n for (var _t43 in e) i[_t43] = e[_t43];\n } },\n {\n key: \"An\",\n value: function An() {\n this._processRootUrl(this.Tn);\n var t = this.Tn.style ? this.Tn.style : this.Tn;\n this.Pn = Vt(t);\n this._geoList.forEach(function (t) {\n this.Cn(t);\n }, this);\n } },\n {\n key: \"getGLTFUrls\",\n value: function getGLTFUrls() {\n return Object.keys(this.bn);\n } },\n {\n key: \"_processRootUrl\",\n value: function _processRootUrl(t) {\n s.Util.isString(t.$root) && t.style.forEach(function (e) {\n var n = e.symbol.url;\n n && n.indexOf(\"{$root}\") > -1 && (e.symbol.url = n.replace(Kt, t.$root));\n });\n } },\n {\n key: \"Cn\",\n value: function Cn(t) {\n if (!this.Pn) return !1;\n for (var _e59 = 0, _n33 = this.Pn.length; _e59 < _n33; _e59++) if (!0 === this.Pn[_e59].filter({\n properties: t.getProperties() }))\n {\n var _n34 = this.Pn[_e59].symbol,\n _i33 = _n34.url;\n return t.D(\"url\", _i33), t.updateSymbol(_n34), !0;\n }\n return !1;\n } },\n {\n key: \"Ln\",\n value: function Ln(t) {\n if (this.Pn) for (var _e60 = 0, _n35 = this.Pn.length; _e60 < _n35; _e60++) !0 === this.Pn[_e60].filter({\n properties: t.getProperties() }) &&\n this.Pn[_e60].outline && t.outline();\n } },\n {\n key: \"In\",\n value: function In(t) {\n var e = s.Util.isString(t) ? this.Mn[t].X() : t.X(),\n n = this.getRenderer();\n n && n.Fn(e), delete this.wn[e], delete this.Mn[t];\n } },\n {\n key: \"clear\",\n value: function clear() {\n return _superPropGet(Qt, \"clear\", this, 3)([]), this.wn = {}, this.Mn = {}, this;\n } },\n {\n key: \"ln\",\n value: function ln() {\n return this.wn;\n } },\n {\n key: \"hn\",\n value: function hn(t, e, n) {\n var i = this.getRenderer();\n return i ? i.hn(t, e, n) : null;\n } },\n {\n key: \"_isModelsLoadComplete\",\n value: function _isModelsLoadComplete() {\n var t = this._geoList;\n for (var _e61 = 0; _e61 < t.length; _e61++) if (!t[_e61].isLoaded()) return !1;\n return !0;\n } },\n {\n key: \"Et\",\n value: function Et(t) {\n var e = this.getRenderer();\n return e ? e.Et(t) : null;\n } },\n {\n key: \"J\",\n value: function J(t) {\n var e = this.getRenderer();\n e && e.J(t);\n } },\n {\n key: \"outlineBatch\",\n value: function outlineBatch(t) {\n var _this26 = this;\n var e = this.Tn.style ? this.Tn.style : this.Tn;\n e[t].outline = !0, this.Pn = Vt(e);\n this._geoList.forEach(function (t) {\n _this26.Ln(t);\n });\n } },\n {\n key: \"outlineAll\",\n value: function outlineAll() {\n this._geoList.forEach(function (t) {\n t.outline();\n });\n } },\n {\n key: \"cancelOutline\",\n value: function cancelOutline() {\n if (this.Tn) {\n (this.Tn.style ? this.Tn.style : this.Tn).forEach(function (t) {\n delete t.outline;\n });\n }\n this._geoList.forEach(function (t) {\n t.cancelOutline();\n });\n } }],\n [{\n key: \"registerShader\",\n value: function registerShader(t, e, n, i) {\n x[t] = {\n name: t,\n type: e,\n config: n,\n uniforms: i };\n\n } },\n {\n key: \"removeShader\",\n value: function removeShader(t) {\n delete x[t];\n } },\n {\n key: \"getShaders\",\n value: function getShaders() {\n var t = [];\n for (var _e62 in x) t.push({\n shader: _e62,\n uniforms: x[_e62].uniforms });\n\n return t;\n } },\n {\n key: \"getShaderMap\",\n value: function getShaderMap() {\n return x;\n } }]);\n\n }(s.OverlayLayer);\n Qt.mergeOptions({\n \"renderer\": \"gl\",\n \"doubleBuffer\": !1,\n \"glOptions\": null,\n \"markerEvents\": !0,\n \"forceRenderOnZooming\": !0,\n \"forceRenderOnMoving\": !0,\n \"forceRenderOnRotating\": !0 });\n\n var te = function (_n$MaskLayerMixin) {\n function te() {\n _classCallCheck(this, te);\n return _callSuper(this, te, arguments);\n }\n _inherits(te, _n$MaskLayerMixin);\n return _createClass(te, [{\n key: \"setURLModifier\",\n value: function setURLModifier(t) {\n return this.Nn = t, this;\n } },\n {\n key: \"getURLModifier\",\n value: function getURLModifier() {\n return this.Nn;\n } },\n {\n key: \"onAdd\",\n value: function onAdd() {\n var t = this.getMap();\n this._geoList.forEach(function (e) {\n a(e.getZoomOnAdded()) || e.setZoomOnAdded(t.getZoom());\n }), _superPropGet(te, \"onAdd\", this, 3)([]);\n } },\n {\n key: \"onRemove\",\n value: function onRemove() {\n _superPropGet(te, \"onRemove\", this, 3)([]), this.clear();\n } },\n {\n key: \"identify\",\n value: function identify(t, e) {\n var n = this.getMap();\n if (!n) return [];\n var i = n.coordinateToContainerPoint(new s.Coordinate(t));\n return this.identifyAtPoint(i, e);\n } },\n {\n key: \"identifyAtPoint\",\n value: function identifyAtPoint(t) {\n var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var n = [];\n if (!e.excludeMasks) {\n var _i34 = this.identifyMask(t, e);\n _i34 && _i34.length && s.Util.pushIn(n, _i34);\n }\n var i = this.getMap();\n if (!i) return [];\n var r = i.getDevicePixelRatio(),\n o = t.x * r,\n h = t.y * r,\n a = this.hn(o, h, e);\n if (a && (a.data || a.length)) if (e.includeInternals && !e.excludeMasks) {\n n.push(a.data);\n var _t44 = e.domEvent;\n _t44 && (_t44.gltfPickingInfo = _t44.gltfPickingInfo || {}, _t44.gltfPickingInfo[this.getId()] = a);\n } else n.push(a);\n return e && e.filter && !e.excludeMasks ? n.filter(function (t) {\n return e.filter(t.data || t);\n }) : n;\n } },\n {\n key: \"le\",\n value: function le() {\n this.pickingId = 0;\n var t = {};\n for (var _e63 in this.wn) {\n var _n36 = this.wn[_e63];\n _n36.Zt(this.pickingId), _n36.L(!0), t[this.pickingId] = _n36;\n var _i35 = _n36.getCount() || 1;\n this.pickingId += _i35;\n }\n this.wn = t;\n } },\n {\n key: \"_onGeometryEvent\",\n value: function _onGeometryEvent(t) {\n if (!t || !t.target) return;\n var e = t.type;\n if (\"meshcreate\" === e) this.Dn(t);else if (\"modelerror\" === e) this.Gn(t);else if (\"positionchange\" === e) {\n var _t45 = this.getRenderer();\n _t45 && _t45.setToRedraw();\n }\n _superPropGet(te, \"_onGeometryEvent\", this, 3)([t]);\n } },\n {\n key: \"Gn\",\n value: function Gn(t) {\n var e = t.url,\n n = t.info;\n console.error(n), this.fire(\"modelerror\", {\n type: \"modelerror\",\n url: e,\n info: n });\n\n } },\n {\n key: \"Dn\",\n value: function Dn(t) {\n var e = t.url;\n this.bn[e] = 1, this.getRenderer().setToRedraw(), this._isModelsLoadComplete() && this.fire(\"modelload\", {\n models: this.getGLTFUrls() });\n\n } }],\n [{\n key: \"initDefaultShader\",\n value: function initDefaultShader() {\n var t = function () {\n var t = {\n positionAttribute: \"POSITION\",\n normalAttribute: \"NORMAL\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n src: \"src alpha\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new n.reshader.PhongMaterial();\n return {\n shader: t,\n material: e };\n\n }();\n te.registerShader(\"phong\", \"PhongShader\", t.shader, t.material.getUniforms());\n var e = function () {\n var t = {\n positionAttribute: \"POSITION\",\n normalAttribute: \"NORMAL\",\n tangentAttribute: \"TANGENT\",\n colorAttribute: \"COLOR_0\",\n uv0Attribute: \"TEXCOORD_0\",\n uv1Attribute: \"TEXCOORD_1\",\n extraCommandProps: {\n cull: {\n enable: !0 },\n\n frontFace: \"ccw\",\n blend: {\n enable: function enable(t, e) {\n return !!e.meshConfig.transparent;\n },\n func: {\n srcRGB: \"src alpha\",\n srcAlpha: 1,\n dstRGB: \"one minus src alpha\",\n dstAlpha: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new n.reshader.pbr.StandardMaterial({});\n return {\n shader: t,\n material: e };\n\n }();\n te.registerShader(\"pbr\", \"pbr.StandardShader\", e.shader, e.material.getUniforms()), te.registerShader(\"depth\", \"pbr.StandardDepthShader\", e.shader, e.material.getUniforms());\n var i = function () {\n var t = {\n positionAttribute: \"POSITION\",\n color0Attribute: \"COLOR_0\",\n extraCommandProps: {\n blend: {\n enable: !1,\n func: {\n src: \"src alpha\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new n.reshader.Material();\n return {\n shader: t,\n material: e };\n\n }();\n te.registerShader(\"pointline\", \"PointLineShader\", i.shader, i.material.getUniforms());\n var s = function () {\n var t = {\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n srcRGB: \"src alpha\",\n srcAlpha: 1,\n dstRGB: \"one minus src alpha\",\n dstAlpha: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new n.reshader.Material({\n lineColor: [0, 0, 0, 1],\n lineOpacity: 1 });\n\n return {\n shader: t,\n material: e };\n\n }();\n te.registerShader(\"wireframe\", \"EdgeShader\", s.shader, s.material.getUniforms());\n var r = function () {\n var t = {\n positionAttribute: \"POSITION\",\n normalAttribute: \"NORMAL\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n src: \"src alpha\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new n.reshader.StandardLiteMaterial();\n return {\n shader: t,\n material: e };\n\n }();\n te.registerShader(\"pbr-lite\", \"StandardLiteShader\", r.shader, r.material.getUniforms());\n } },\n {\n key: \"fromJSON\",\n value: function fromJSON(t) {\n if (!t || \"GLTFLayer\" !== t.type) return null;\n var e = new te(t.id, t.options),\n n = t.geometries,\n i = [];\n for (var _t46 = 0; _t46 < n.length; _t46++) {\n var _e64 = n[_t46].type,\n _s14 = bt.getJSONClass(_e64);\n if (!_s14 || !_s14.fromJSON) throw new Error(\"unsupported gltfmarker type:\" + _e64);\n var _r17 = _s14.fromJSON(n[_t46]);\n _r17 && i.push(_r17);\n }\n return e.addGeometry(i), t.style && e.setStyle(t.style), e;\n } }]);\n\n }(n.MaskLayerMixin(Qt));\n te.initDefaultShader(), te.mergeOptions({\n markerTypes: [\"gltfmarker\", \"multigltfmarker\"],\n pointSize: 1 }),\n te.registerJSONType(\"GLTFLayer\"), te.registerRenderer(\"gl\", Nt);\n var ee = new e.Coordinate(0, 0),\n ne = new e.Point(0, 0),\n ie = new e.Point(0, 0),\n se = new e.Point(0, 0);\n var re = new e.Coordinate(0, 0),\n oe = [],\n he = new e.Point(0, 0),\n ae = new e.Point(0, 0);\n var ce = function (_Ct) {\n function ce(t, e) {\n var _this27;\n _classCallCheck(this, ce);\n _this27 = _callSuper(this, ce, [null, e]), _this27.on(\"load\", function () {\n _this27.setCoordinates(t);\n });\n return _this27;\n }\n _inherits(ce, _Ct);\n return _createClass(ce, [{\n key: \"setCoordinates\",\n value: function setCoordinates(t) {\n this.ce = t, this.En();\n } },\n {\n key: \"getCoordinates\",\n value: function getCoordinates() {\n return this.ce;\n } },\n {\n key: \"toJSON\",\n value: function toJSON() {\n var t = JSON.parse(JSON.stringify({\n coordinates: this.ce,\n options: this.options,\n type: \"GLTFLineString\" })),\n\n n = this.getId();\n e.Util.isNil(n) || (t.options.id = n);\n var i = this.getProperties();\n return t.options && (t.options.properties = i), t;\n } },\n {\n key: \"En\",\n value: function En() {\n var _this28 = this;\n var t = this.ce;\n if (!t) return;\n this.removeAllData();\n var e = this.getMap(),\n n = e.getGLRes(),\n i = e.getProjection(),\n s = this.jn();\n var _loop2 = function _loop2() {\n var o = _this28.Bn(t[_r18]),\n h = _this28.Bn(t[_r18 + 1]),\n a = e.coordinateToPointAtRes(o, n, he),\n c = e.coordinateToPointAtRes(h, n, ae),\n l = _this28.Rn(o, h),\n u = i.measureLenBetween(o, h);\n _this28.gltfPack.arrangeAlongLine(a, c, u, s, l, _this28.options).forEach(function (t) {\n t.coordinates = le(o, h, t.t), _this28.addData(t);\n });\n };\n for (var _r18 = 0; _r18 < t.length - 1; _r18++) {\n _loop2();\n }\n this.m = !0;\n } },\n {\n key: \"jn\",\n value: function jn() {\n var t = [1, 1, 1],\n i = this.getModelHeight();\n i && this.dt(t, i);\n var s = this.getSymbol();\n return n.vec3.set(oe, e.Util.isNil(s.scaleX) ? 1 : s.scaleX, e.Util.isNil(s.scaleY) ? 1 : s.scaleY, e.Util.isNil(s.scaleZ) ? 1 : s.scaleZ), n.vec3.multiply(t, t, oe);\n } },\n {\n key: \"Rn\",\n value: function Rn(t, e) {\n var n = this.getMap(),\n i = n.getGLRes();\n re.set(0, (t.y + e.y) / 2);\n return n.altitudeToPoint(100, i, re) / n.altitudeToPoint(100, i);\n } },\n {\n key: \"Bn\",\n value: function Bn(t) {\n return Array.isArray(t) ? new e.Coordinate(t) : t;\n } }],\n [{\n key: \"fromJSON\",\n value: function fromJSON(t) {\n return new ce(t.data, t.options);\n } }]);\n\n }(Ct);\n function le(t, e, n) {\n var i = ue(t.x, e.x, n),\n s = ue(t.y, e.y, n),\n r = ue(t.z || 0, e.z || 0, n);\n return new t.constructor(i, s, r);\n }\n function ue(t, e, n) {\n return t + n * (e - t);\n }\n ce.mergeOptions({\n direction: 0,\n gapLength: 0,\n scaleVertex: !0 }),\n ce.registerJSONType(\"GLTFLineString\");\n var fe = new n.reshader.Texture2D({\n url: void 0,\n mag: \"linear\" });\n\n var de = function (_n$MaskRendererMixin2) {\n function de(t) {\n var _this29;\n _classCallCheck(this, de);\n _this29 = _callSuper(this, de, [t]), _this29._textureMap = {};\n return _this29;\n }\n _inherits(de, _n$MaskRendererMixin2);\n return _createClass(de, [{\n key: \"vn\",\n value: function vn(t) {\n return this.regl && this._textureMap[t] ? this._textureMap[t].texture.getREGLTexture(this.regl) : fe;\n } },\n {\n key: \"gn\",\n value: function gn(t) {\n var _this30 = this;\n if (this._textureMap[t]) this._textureMap[t].count++;else {\n this.Un = this.Un || new n.reshader.ResourceLoader();\n var _e65 = \"default\" === t ? void 0 : t,\n _i36 = new n.reshader.Texture2D({\n url: _e65,\n mag: \"linear\" },\n this.Un);\n _i36.once(\"complete\", function () {\n _this30.setToRedraw();\n }, this), this._textureMap[t] = {\n count: 1,\n texture: _i36 };\n\n }\n } },\n {\n key: \"pn\",\n value: function pn(t) {\n this._textureMap[t] && (this._textureMap[t].count--, this._textureMap[t].count < 1 && (this._textureMap[t].texture.dispose(), delete this._textureMap[t]));\n } }]);\n\n }(n.MaskRendererMixin(Nt));\n var me = function (_n$MaskLayerMixin2) {\n function me() {\n _classCallCheck(this, me);\n return _callSuper(this, me, arguments);\n }\n _inherits(me, _n$MaskLayerMixin2);\n return _createClass(me, [{\n key: \"onAddGeometry\",\n value: function onAddGeometry(t) {\n _superPropGet(me, \"onAddGeometry\", this, 3)([t]);\n var e = t.getTextureUrl(),\n n = this.getRenderer();\n n ? n.gn(e) : this.on(\"renderercreate\", function (t) {\n t.renderer.gn(e);\n });\n } },\n {\n key: \"remove\",\n value: function remove() {\n var t = this.getRenderer();\n t && this._geoList.forEach(function (e) {\n var n = e.getTextureUrl();\n t.pn(n);\n }), _superPropGet(me, \"remove\", this, 3)([]);\n } },\n {\n key: \"clear\",\n value: function clear() {\n var t = this.getRenderer();\n t && this._geoList.forEach(function (e) {\n var n = e.getTextureUrl();\n t.pn(n);\n }), _superPropGet(me, \"clear\", this, 3)([]);\n } },\n {\n key: \"getTextureMapTest\",\n value: function getTextureMapTest() {\n var t = this.getRenderer();\n return t ? t._textureMap : null;\n } }],\n [{\n key: \"initDefaultShader\",\n value: function initDefaultShader() {\n var t = function () {\n var t = {\n vert: \"\\n attribute vec3 aPosition;\\n attribute vec2 aTexCoord;\\n uniform mat4 projViewMatrix;\\n uniform mat4 modelMatrix;\\n uniform vec2 uvOffset;\\n uniform float width;\\n uniform float height;\\n varying vec2 vTexCoords;\\n void main()\\n {\\n gl_Position = projViewMatrix * modelMatrix * vec4(aPosition, 1.0);\\n vTexCoords = (uvOffset + aTexCoord) * vec2(1.0 / width, 1.0 / height);\\n }\\n \",\n frag: \"\\n precision mediump float;\\n uniform sampler2D texture;\\n\\n varying vec2 vTexCoords;\\n void main() {\\n vec4 color = texture2D(texture, vTexCoords);\\n gl_FragColor = vec4(color.rgb, color.a) * color.a;\\n }\\n \",\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n src: \"one\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" },\n\n depth: {\n enable: !0,\n func: \"always\",\n mask: !0,\n range: [0, 0] } } },\n\n\n\n e = new n.reshader.Material();\n return {\n shader: t,\n material: e };\n\n }();\n me.registerShader(\"effect\", \"MeshShader\", t.shader, t.material.getUniforms());\n } }]);\n\n }(n.MaskLayerMixin(Qt));\n me.initDefaultShader(), me.mergeOptions({\n markerTypes: [\"effectmarker\"] }),\n me.registerJSONType(\"EffectLayer\"), me.registerRenderer(\"gl\", de);\n var pe = function (_bt3) {\n function pe(t, e) {\n var _this31;\n _classCallCheck(this, pe);\n _this31 = _callSuper(this, pe, [t, e]), _this31.u = \"glowmarker\";\n return _this31;\n }\n _inherits(pe, _bt3);\n return _createClass(pe, [{\n key: \"getUrl\",\n value: function getUrl() {\n return \"plane\";\n } },\n {\n key: \"setSpeed\",\n value: function setSpeed(t) {\n this.setUniform(\"speed\", t);\n } },\n {\n key: \"getSpeed\",\n value: function getSpeed() {\n return this._getInternalSymbol().uniforms.speed;\n } },\n {\n key: \"getShader\",\n value: function getShader() {\n return \"glowmarker\";\n } },\n {\n key: \"isAnimated\",\n value: function isAnimated() {\n var t = this._getInternalSymbol();\n return t && t.animation;\n } },\n {\n key: \"q\",\n value: function q() {\n var t = this._getInternalSymbol().uniforms.time || 0;\n t += .01, this.setUniform(\"time\", t);\n } }],\n [{\n key: \"fromJSON\",\n value: function fromJSON(t) {\n return new pe(t.coordinates, t.options);\n } }]);\n\n }(bt);\n pe.mergeOptions({\n visible: !0 });\n\n var ge = function (_Qt) {\n function ge() {\n _classCallCheck(this, ge);\n return _callSuper(this, ge, arguments);\n }\n _inherits(ge, _Qt);\n return _createClass(ge, null, [{\n key: \"initDefaultShader\",\n value: function initDefaultShader() {\n var t = function () {\n var t = {\n vert: \"\\n #ifdef GL_ES\\n precision highp float;\\n #endif\\n attribute vec3 aPosition;\\n uniform mat4 projViewModelMatrix;\\n uniform mat4 modelMatrix;\\n uniform mat4 positionMatrix;\\n varying vec3 v_FragPos;\\n varying vec3 v_center;\\n #include \\n void main(){\\n mat4 localPositionMatrix = getPositionMatrix();\\n vec4 localVertex = getPosition(aPosition);\\n vec4 position = localPositionMatrix * localVertex;\\n gl_Position = projViewModelMatrix * position;\\n vec4 worldPos = modelMatrix * position;\\n v_FragPos = worldPos.xyz;\\n v_center = (modelMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;\\n }\\n \",\n frag: \"\\n #ifdef GL_ES\\n precision highp float;\\n #endif\\n #define pi 3.14159\\n const float dotsnb = 30.0; // Number of dots\\n\\n varying vec3 v_FragPos;\\n varying vec3 v_center;\\n uniform float time;\\n uniform float radius;\\n uniform vec3 color;\\n uniform float speed;\\n vec3 hsb2rgb(in vec3 c)\\n {\\n vec3 rgb = clamp(abs(mod(c.x*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0,0.0,1.0 );\\n rgb = rgb*rgb*(4.0-2.0*rgb);\\n return c.z * mix( vec3(1.0), rgb, c.y);\\n }\\n\\n void main()\\n {\\n float r = length(v_FragPos - v_center);\\n r = r*2.-1.;\\n if(r>radius) {\\n gl_FragColor = vec4(1.0,1.0,1.0, 0.0);\\n } else {\\n //vec3 color = hsb2rgb(vec3(fract(time*.1),.7,.4));\\n vec3 color = color;\\n float s = abs(sin(pow(r+5.0, 1.5)-time*speed+sin(r*0.9))*sin(r+.99));\\n color *= (abs(1./(s*10.8))-.01);\\n gl_FragColor = vec4(color, (color.x + color.y + color.z) / 1.0);\\n }\\n }\\n \",\n uniforms: [{\n name: \"projViewModelMatrix\",\n type: \"function\",\n fn: function fn(t, e) {\n return n.mat4.multiply([], e.projViewMatrix, e.modelMatrix);\n } }],\n\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n srcRGB: \"src alpha\",\n srcAlpha: 1,\n dstRGB: \"one\",\n dstAlpha: 1 },\n\n equation: {\n rgb: \"add\",\n alpha: \"add\" },\n\n color: [0, 0, 0, 0] } } },\n\n\n\n e = new n.reshader.Material();\n return {\n shader: t,\n material: e };\n\n }();\n ge.registerShader(\"glowmarker\", \"MeshShader\", t.shader, t.material.getUniforms());\n } }]);\n\n }(Qt);\n ge.initDefaultShader(), ge.mergeOptions({\n markerTypes: [\"glowmarker\"] }),\n ge.registerJSONType(\"GlowMarkerLayer\"), ge.registerRenderer(\"gl\", Nt);\n var _e = {\n url: \"plane\",\n animation: !0,\n loop: !0,\n rotation: [0, 0, 0],\n translation: [0, 0, 30],\n scale: [1, 1, 30] },\n\n ye = {\n width: 1,\n height: 1,\n modelHeight: 60,\n startOpacity: 0,\n endOpacity: 1 };\n\n var ve = function (_Qt2) {\n function ve() {\n _classCallCheck(this, ve);\n return _callSuper(this, ve, arguments);\n }\n _inherits(ve, _Qt2);\n return _createClass(ve, null, [{\n key: \"initDefaultShader\",\n value: function initDefaultShader() {\n var t = function () {\n var t = {\n vert: \"\\n attribute vec3 aPosition;\\n attribute vec2 aTexCoord;\\n uniform mat4 projViewMatrix;\\n uniform mat4 modelMatrix;\\n uniform vec2 uvOffset;\\n uniform float width;\\n uniform float height;\\n varying vec2 vTexCoords;\\n varying float vHeight;\\n void main()\\n {\\n vec4 worldPosition = modelMatrix * vec4(aPosition, 1.0);\\n gl_Position = projViewMatrix * worldPosition;\\n vHeight = worldPosition.z;\\n vTexCoords = (uvOffset + aTexCoord) * vec2(1.0 / width, 1.0 / height);\\n }\\n \",\n frag: \"\\n precision mediump float;\\n uniform sampler2D texture;\\n uniform float modelHeight;\\n uniform float startOpacity;\\n uniform float endOpacity;\\n varying float vHeight;\\n varying vec2 vTexCoords;\\n void main() {\\n vec4 color = texture2D(texture, vTexCoords);\\n float opacity = (endOpacity - startOpacity) * (1.0 - vHeight / modelHeight);\\n gl_FragColor = vec4(color.rgb, color.a) * color.a * opacity;\\n }\\n \",\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n blend: {\n enable: !0,\n func: {\n src: \"one\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new n.reshader.Material();\n return {\n shader: t,\n material: e };\n\n }();\n ve.registerShader(\"effectline\", \"MeshShader\", t.shader);\n } }]);\n\n }(Qt);\n ve.initDefaultShader(), ve.mergeOptions({\n markerTypes: [\"effectmarker\"] }),\n ve.registerJSONType(\"EffectLineLayer\"), ve.registerRenderer(\"gl\", de);\n var xe = {\n offsetX: 0,\n offsetY: 0,\n uReflectivity: .8,\n opacity: .9,\n color: [.9, 0, 0, 1] };\n\n var we = function (_Qt3) {\n function we() {\n _classCallCheck(this, we);\n return _callSuper(this, we, arguments);\n }\n _inherits(we, _Qt3);\n return _createClass(we, null, [{\n key: \"initDefaultShader\",\n value: function initDefaultShader() {\n var t = function () {\n var t = {\n vert: \"\\n attribute vec3 aPosition;\\n attribute vec2 aTexCoord;\\n attribute vec3 aNormal;\\n uniform mat4 projViewMatrix;\\n uniform mat4 modelMatrix;\\n uniform mat4 normalMatrix;\\n uniform float offsetX;\\n uniform float offsetY;\\n varying vec2 uv;\\n void main()\\n {\\n gl_Position = projViewMatrix * modelMatrix * vec4(aPosition, 1.0);\\n uv = vec2(aTexCoord.x + offsetX, aTexCoord.y + offsetY);\\n }\\n \",\n frag: \"\\n precision mediump float;\\n uniform sampler2D effectTexture;\\n uniform vec3 uCameraPosition;\\n uniform mat4 viewMatrix;\\n uniform float uReflectivity;\\n uniform vec4 color;\\n uniform float opacity;\\n\\n varying vec2 uv;\\n\\n vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {\\n return normalize((vec4(dir, 0.0) * matrix).xyz);\\n }\\n\\n const float GAMMA_FACTOR = 2.0;\\n vec4 GammaToLinear(in vec4 value, in float gammaFactor) {\\n return vec4(pow(value.xyz, vec3(gammaFactor)), value.w);\\n }\\n\\n vec4 mixTexelToLinear(vec4 value) {\\n return GammaToLinear(value, float(GAMMA_FACTOR));\\n }\\n\\n void main() {\\n vec4 texColor = texture2D(effectTexture, uv);\\n if (color.a == 0.0) {\\n discard;\\n }\\n vec4 mixColor = mixTexelToLinear(color);\\n texColor.rgb += mixColor.xyz * uReflectivity;\\n texColor.a*= opacity;\\n gl_FragColor = texColor;\\n }\\n \",\n uniforms: [{\n name: \"normalMatrix\",\n type: \"function\",\n fn: function fn(t, e) {\n var i = [];\n return n.mat4.invert(i, e.modelMatrix), n.mat4.transpose(i, i), i;\n } }],\n\n positionAttribute: \"POSITION\",\n extraCommandProps: {\n depth: {\n enable: !0,\n mask: !1 },\n\n blend: {\n enable: !0,\n func: {\n src: \"one\",\n dst: \"one minus src alpha\" },\n\n equation: \"add\" } } },\n\n\n\n e = new n.reshader.Material();\n return {\n shader: t,\n material: e };\n\n }();\n we.registerShader(\"effectring\", \"MeshShader\", t.shader);\n } }]);\n\n }(Qt);\n we.initDefaultShader(), we.mergeOptions({\n markerTypes: [\"effectring\"] }),\n we.registerJSONType(\"EffectRingLayer\"), we.registerRenderer(\"gl\", Nt);\n var be = {\n animation: !0,\n loop: !0,\n url: \"plane\",\n effect: \"sequence\",\n speed: 1,\n scale: [1, 1, 1],\n rotation: [90, 0, 0] },\n\n Me = {\n width: 9,\n height: 5 };\n\n if (r.transcoders) {\n var _t47 = s.Map.VERSION;\n if (_t47.indexOf(\"1.0.0-beta\") >= 0 || _t47.indexOf(\"1.0.0-alpha\") >= 0) {\n var _t48 = r.transcoders.inject(o);\n s.registerWorkerAdapter(\"@maptalks/gltf-layer\", _t48);\n } else s.registerWorkerAdapter(\"@maptalks/gltf-layer\", function () {\n return r.transcoders.inject(o);\n });\n } else s.registerWorkerAdapter(\"@maptalks/gltf-layer\", o);\n t.AEMarker = function (_Wt) {\n function _class(t, n) {\n var _this32;\n _classCallCheck(this, _class);\n _this32 = _callSuper(this, _class, [t, n]);\n var i = e.Util.extend({}, be, _this32.options.symbol);\n _this32.setSymbol(i);\n var s = e.Util.extend({}, Me, _this32.options.symbol.uniforms);\n _this32.setUniforms(s);\n return _this32;\n }\n _inherits(_class, _Wt);\n return _createClass(_class);\n }(Wt), t.EffectLayer = me, t.EffectLine = function (_Wt2) {\n function _class2(t, n) {\n var _this33;\n _classCallCheck(this, _class2);\n _this33 = _callSuper(this, _class2, [t, n]);\n var i = e.Util.extend({}, _e, _this33.options.symbol);\n _this33.setSymbol(i);\n var s = e.Util.extend({}, ye, _this33.options.symbol.uniforms);\n _this33.setUniforms(s), _this33.setShader(\"effectline\"), _this33.u = \"effectmarker\";\n return _this33;\n }\n _inherits(_class2, _Wt2);\n return _createClass(_class2, [{\n key: \"getEffectType\",\n value: function getEffectType() {\n return \"sequence\";\n } },\n {\n key: \"setTexture\",\n value: function setTexture(t) {\n return this.setUniform(\"texture\", t), this;\n } },\n {\n key: \"setHeight\",\n value: function setHeight(t) {\n return this.setUniform(\"modelHeight\", t), this;\n } },\n {\n key: \"setStartOpacity\",\n value: function setStartOpacity(t) {\n return this.setUniform(\"startOpacity\", t), this;\n } },\n {\n key: \"setEndOpacity\",\n value: function setEndOpacity(t) {\n return this.setUniform(\"endOpacity\", t), this;\n } }]);\n\n }(Wt), t.EffectLineLayer = ve, t.EffectMarker = Wt, t.EffectRing = function (_bt4) {\n function _class3(t, n) {\n var _this34;\n _classCallCheck(this, _class3);\n _this34 = _callSuper(this, _class3, [t, n]);\n var i = e.Util.extend({}, xe, _this34.options.symbol.uniforms);\n _this34.setUniforms(i), _this34.setShader(\"effectring\"), _this34.u = \"effectring\";\n return _this34;\n }\n _inherits(_class3, _bt4);\n return _createClass(_class3);\n }(bt), t.EffectRingLayer = we, t.GLTFGeometry = function (_bt5) {\n function _class4() {\n _classCallCheck(this, _class4);\n return _callSuper(this, _class4, arguments);\n }\n _inherits(_class4, _bt5);\n return _createClass(_class4, [{\n key: \"et\",\n value: function et(t) {\n var e = this.getMap(),\n n = e.getGLRes(),\n i = e.distanceToPointAtRes(100, 100, n, this.getCenter()),\n s = e.altitudeToPoint(100, n);\n return t[0] *= i.x / 100, t[1] *= i.y / 100, t[2] *= s / 100, t;\n } }]);\n\n }(bt), t.GLTFLayer = te, t.GLTFLineString = ce, t.GLTFMarker = bt, t.GLTFMercatorGeometry = function (_bt6) {\n function _class5() {\n _classCallCheck(this, _class5);\n return _callSuper(this, _class5, arguments);\n }\n _inherits(_class5, _bt6);\n return _createClass(_class5, [{\n key: \"et\",\n value: function et(t) {\n var n = this.getMap(),\n i = n.getGLRes(),\n s = this.getCoordinates(),\n r = n.coordToPointAtRes(s, i, ie),\n o = e.projection.EPSG3857.project(s, ee)._add(1, 1),\n h = e.projection.EPSG3857.unproject(o, ne),\n a = n.coordToPointAtRes(h, i, se),\n c = a.x - r.x,\n l = a.y - r.y,\n u = n.altitudeToPoint(100, i);\n return t[0] *= c, t[1] *= l, t[2] *= u / 100, t;\n } }]);\n\n }(bt), t.GlowMarker = pe, t.GlowMarkerLayer = ge, t.MultiGLTFMarker = Ct, \"undefined\" != typeof console && console.log(\"@maptalks/gltf-layer v0.105.1\");\n });return module.exports;});", "requires": [], "buildLevel": 0, "fileName": "/dist/maptalks.gltf.js" } }